PasseGaming
Active member
Davey actually found this when I was having checkpoint issues after having had hit a "hurt" tile. i figured I'd share it because it cause me a few new grey hairs. If you look at the code here you can find on line 26 warpMap. This command doesn't actually do anything as it should be warpToMap. If you check out line 39 you can see that it does indeed call for warpToMap and not warpMap.
Code:
;;;;;;;;;;;;;;;;;; Presumes there is a variable called myLives defined in user variables.
;;;;;;;;;;;;;;;;;; You could also create your own variable for this.
LDA gameHandler
AND #%10000000
BEQ +canHurtPlayer
JMP +skipHurt
+canHurtPlayer:
CPX player1_object
BEQ +doPlayer
LDA Object_flags,x
AND #%00000100
BNE +notWeapon
DestroyObject
+notWeapon
JMP +done
+doPlayer
DEC myLives
LDA myLives
BNE +notGameOver
;; is game over.
JMP RESET
+notGameOver
LDA continueMap
STA warpMap
LDA continueX
STA newX
LDA continueY
STA newY
LDA continueScreen
STA warpToScreen
STA camScreen
WarpToScreen warpToMap, warpToScreen, #$02
;; arg0 = warp to map. 0= map1. 1= map2.
;; arg1 = screen to warp to.
;; arg2 = screen transition type - most likely use 1 here.
;; 1 = warp, where it observes the warp in position for the player.
+done