Jonny
Well-known member
Let me know if this is useful and how you might use it, or any problems.
You may want to change object size and bounding box to get desired effect.
You may want to change object size and bounding box to get desired effect.
Code:
;;; WAIT UNTIL SCREEN HAS UPDATED ;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA updateScreenData
AND #%00000100
BEQ screenUpdated
RTS
screenUpdated:
;;; CHECK NOT PLAYER ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CPX player1_object ;; COMPARE X TO P1O ;;
BNE isNotPlayer
JMP notMonster ;; DONT CHANGE TILE ;;
isNotPlayer:
;;; TILE CHANGE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA Object_v_speed_hi,x ;; CHECK MOVING DOWN ;;
BEQ changeToChain
BMI changeToChain ;; EQUAL OR NEGATIVE ;;
JMP changeToWall
changeToChain:
ChangeTileAtCollision #00, #$0C ;; TILE FOR UP ;;
RTS
changeToWall:
ChangeTileAtCollision #76, #$0C ;; TILE FOR DOWN ;;
RTS
notMonster: