mirror of
https://github.com/alpine9000/amiga_examples
synced 2025-12-08 14:59:01 +00:00
new joystick wait
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</layer>
|
||||
<layer name="items" width="100" height="8">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztVVsOgzAMo9fZLRiDsfe0rdv9b7IhrVKoSOOkFeIDf4LtJPZHq2rFkrB1ek0Nah5ONyPwjoadJM+5UGLekG8q48aNuRZ/6vEUPE6ZNzUFMrF6IDrp/pAxkjXtbsfwz8x3jh/jkOC9MrKe2ivHD9Fas/C//+0/655w75GO9uEVPQa0ANcTDsK/ALflQKPfKL2H++L9pTz7RCdxXwg6QWPxfCs03Pxr4beG85Pun4L2ndBmuE/wLX3MiZuw32fh+6/A8QXUoxQE
|
||||
eJztVVsOgjAQpNfxFooooqIBq/e/CZDQpJbusw3hg/mEmdnZ2Y8WxY4t4WTkmiNT0xnZDMdrFJkoz7WQY97UL9Zxaf65Gn/foyc87ok7lRk60XpwdNT+ruNY1x+z5DreGfB9AN8hfogbwgvzSBDLleLH0Wq7sOP/au669rhv5B4WuSOEisG1HofDfzJ2S4FEfxB6T/uF+ak+a+Qm4b04uBAajedXoIHmt5nfGsiP2j8G6Tsh7fCK8DX3WBMvIt9v4/l38DEAYj8UWQ==
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
||||
|
||||
+16
-35
@@ -150,12 +150,7 @@ SetupBoardLoop:
|
||||
bra SetupBoardLoop
|
||||
.gotoGameLoop:
|
||||
add.l #1,d6
|
||||
jsr WaitVerticalBlank
|
||||
cmp.l #50,d6
|
||||
ble .gotoGameLoop
|
||||
jsr ReadJoystick
|
||||
btst.b #0,joystick
|
||||
beq .gotoGameLoop
|
||||
jsr WaitForJoystick
|
||||
move.w #0,moving
|
||||
move.l #FOREGROUND_SCROLL_PIXELS,foregroundScrollPixels
|
||||
bsr HideMessagePanel
|
||||
@@ -181,7 +176,8 @@ FadeInLoop:
|
||||
bra GameLoop
|
||||
.c1:
|
||||
bra FadeInLoop
|
||||
|
||||
|
||||
|
||||
GameLoop:
|
||||
|
||||
move.l verticalBlankCount,d0
|
||||
@@ -306,18 +302,9 @@ GameOver:
|
||||
move.w #128,d0
|
||||
jsr Message
|
||||
jsr InstallPaletteA
|
||||
|
||||
move.l #100,d0
|
||||
.pause:
|
||||
jsr WaitVerticalBlank
|
||||
dbra d0,.pause
|
||||
|
||||
.waitForJoystick:
|
||||
jsr ReadJoystick
|
||||
btst.b #0,joystick
|
||||
bne .gotJoystick
|
||||
bra .waitForJoystick
|
||||
.gotJoystick:
|
||||
|
||||
jsr WaitForJoystick
|
||||
|
||||
move.l #level1ForegroundMap,startForegroundMapPtr
|
||||
move.l #level1PathwayMap,startPathwayMapPtr
|
||||
move.l #'0004',livesCounterText
|
||||
@@ -345,19 +332,9 @@ LevelComplete:
|
||||
lea levelCompleteMessage,a1
|
||||
move.w #100,d0
|
||||
jsr Message
|
||||
|
||||
jsr WaitForJoystick
|
||||
|
||||
move.l #100,d0
|
||||
.pause:
|
||||
jsr WaitVerticalBlank
|
||||
jsr PlayNextSound
|
||||
dbra d0,.pause
|
||||
|
||||
.waitForJoystick:
|
||||
jsr ReadJoystick
|
||||
btst.b #0,joystick
|
||||
bne .gotJoystick
|
||||
bra .waitForJoystick
|
||||
.gotJoystick:
|
||||
move.l #level1ForegroundMap,startForegroundMapPtr
|
||||
move.l #level1PathwayMap,startPathwayMapPtr
|
||||
move.l #'0004',livesCounterText
|
||||
@@ -532,9 +509,9 @@ RenderPathway:
|
||||
rts
|
||||
|
||||
|
||||
ClearPathway:
|
||||
ClearPathway:
|
||||
sub.w #1,pathwayClearPending
|
||||
move.w pathwayXIndex,d5 ; x index
|
||||
move.w pathwayXIndex,d5 ; x index
|
||||
.loopX:
|
||||
move.w #6,d6 ; y index
|
||||
.loopY:
|
||||
@@ -542,6 +519,12 @@ ClearPathway:
|
||||
bsr GetMapTile
|
||||
move.l d0,a2
|
||||
move.w (a2),d0
|
||||
|
||||
if 0
|
||||
move.l foregroundMapPtr,a3
|
||||
move.w (a3),d0
|
||||
endif
|
||||
|
||||
cmp.w #0,d0
|
||||
beq .dontBlit
|
||||
|
||||
@@ -565,8 +548,6 @@ ClearPathway:
|
||||
jsr BlitTile
|
||||
bra .next
|
||||
.dontBlit:
|
||||
cmp.w pathwayXIndex,d5
|
||||
beq .next
|
||||
.next:
|
||||
dbra d6,.loopY
|
||||
dbra d5,.loopX
|
||||
|
||||
+18
-1
@@ -1,6 +1,7 @@
|
||||
;; http://eab.abime.net/showpost.php?p=986196&postcount=2
|
||||
|
||||
xdef ReadJoystick
|
||||
xdef WaitForJoystick
|
||||
xdef joystick
|
||||
xdef joystickpos
|
||||
|
||||
@@ -28,7 +29,23 @@ ReadJoystick:
|
||||
.conv:
|
||||
dc.b 0,5,4,3,1,0,3,2,8,7,0,1,7,6,5,0
|
||||
|
||||
WaitForJoystick:
|
||||
.joystickPressed:
|
||||
jsr ReadJoystick
|
||||
jsr WaitVerticalBlank
|
||||
jsr PlayNextSound
|
||||
btst.b #0,joystick
|
||||
bne .joystickPressed
|
||||
.wait:
|
||||
jsr ReadJoystick
|
||||
jsr WaitVerticalBlank
|
||||
jsr PlayNextSound
|
||||
btst.b #0,joystick
|
||||
beq .wait
|
||||
rts
|
||||
|
||||
joystick:
|
||||
dc.b 0
|
||||
joystickpos:
|
||||
dc.b 0
|
||||
dc.b 0
|
||||
|
||||
Reference in New Issue
Block a user