diff options
author | Yuchen Pei <me@ypei.me> | 2018-01-15 13:59:49 +0100 |
---|---|---|
committer | Yuchen Pei <me@ypei.me> | 2018-01-15 13:59:49 +0100 |
commit | 225da72f92b9e0b5caded3e0b85de30633af55fb (patch) | |
tree | 58f7f98104796746de0894898155c3496ec4841c /projects/11/Pong | |
parent | ac0b05010df8f676fd12240073e5417ae865a686 (diff) |
finished project 11
Diffstat (limited to 'projects/11/Pong')
-rw-r--r-- | projects/11/Pong/Ball.vm | 18 | ||||
-rw-r--r-- | projects/11/Pong/Bat.vm | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/projects/11/Pong/Ball.vm b/projects/11/Pong/Ball.vm index b8154eb..9d7b984 100644 --- a/projects/11/Pong/Ball.vm +++ b/projects/11/Pong/Ball.vm @@ -86,11 +86,11 @@ return function Ball.setDestination 3 push argument 0 pop pointer 0 -push argument 0 +push argument 1 push this 0 sub pop this 2 -push argument 1 +push argument 2 push this 1 sub pop this 3 @@ -114,21 +114,21 @@ pop local 0 push local 2 pop local 1 push this 1 -push argument 1 +push argument 2 lt pop this 8 push this 0 -push argument 0 +push argument 1 lt pop this 9 goto setDestination.Endif0 label setDestination.Else0 push this 0 -push argument 0 +push argument 1 lt pop this 8 push this 1 -push argument 1 +push argument 2 lt pop this 9 label setDestination.Endif0 @@ -300,7 +300,7 @@ push this 3 push constant 10 call Math.divide 2 pop local 3 -push argument 0 +push argument 1 push constant 0 eq not @@ -313,14 +313,14 @@ push this 2 push constant 0 lt not -push argument 0 +push argument 1 push constant 1 eq and push this 2 push constant 0 lt -push argument 0 +push argument 1 push constant 1 neg eq diff --git a/projects/11/Pong/Bat.vm b/projects/11/Pong/Bat.vm index 23b4033..77acfe4 100644 --- a/projects/11/Pong/Bat.vm +++ b/projects/11/Pong/Bat.vm @@ -66,7 +66,7 @@ return function Bat.setDirection 0 push argument 0 pop pointer 0 -push argument 0 +push argument 1 pop this 4 push constant 0 return @@ -88,7 +88,7 @@ pop pointer 0 push pointer 0 call Bat.hide 1 pop temp 0 -push argument 0 +push argument 1 pop this 2 push pointer 0 call Bat.show 1 |