diff options
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 |