facing.asm 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. SpriteFacingAndAnimationTable:
  2. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; facing down, walk animation frame 0
  3. dw SpriteFacingDownAndWalking, SpriteOAMParameters ; facing down, walk animation frame 1
  4. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; facing down, walk animation frame 2
  5. dw SpriteFacingDownAndWalking, SpriteOAMParametersFlipped ; facing down, walk animation frame 3
  6. dw SpriteFacingUpAndStanding, SpriteOAMParameters ; facing up, walk animation frame 0
  7. dw SpriteFacingUpAndWalking, SpriteOAMParameters ; facing up, walk animation frame 1
  8. dw SpriteFacingUpAndStanding, SpriteOAMParameters ; facing up, walk animation frame 2
  9. dw SpriteFacingUpAndWalking, SpriteOAMParametersFlipped ; facing up, walk animation frame 3
  10. dw SpriteFacingLeftAndStanding, SpriteOAMParameters ; facing left, walk animation frame 0
  11. dw SpriteFacingLeftAndWalking, SpriteOAMParameters ; facing left, walk animation frame 1
  12. dw SpriteFacingLeftAndStanding, SpriteOAMParameters ; facing left, walk animation frame 2
  13. dw SpriteFacingLeftAndWalking, SpriteOAMParameters ; facing left, walk animation frame 3
  14. dw SpriteFacingLeftAndStanding, SpriteOAMParametersFlipped ; facing right, walk animation frame 0
  15. dw SpriteFacingLeftAndWalking, SpriteOAMParametersFlipped ; facing right, walk animation frame 1
  16. dw SpriteFacingLeftAndStanding, SpriteOAMParametersFlipped ; facing right, walk animation frame 2
  17. dw SpriteFacingLeftAndWalking, SpriteOAMParametersFlipped ; facing right, walk animation frame 3
  18. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; ---
  19. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; This table is used for sprites $a and $b.
  20. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; All orientation and animation parameters
  21. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; lead to the same result. Used for immobile
  22. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; sprites like items on the ground
  23. dw SpriteFacingDownAndStanding, SpriteOAMParameters ; ---
  24. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  25. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  26. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  27. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  28. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  29. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  30. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  31. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  32. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  33. dw SpriteFacingDownAndStanding, SpriteOAMParameters
  34. SpriteFacingDownAndStanding:
  35. db $00,$01,$02,$03
  36. SpriteFacingDownAndWalking:
  37. db $80,$81,$82,$83
  38. SpriteFacingUpAndStanding:
  39. db $04,$05,$06,$07
  40. SpriteFacingUpAndWalking:
  41. db $84,$85,$86,$87
  42. SpriteFacingLeftAndStanding:
  43. db $08,$09,$0a,$0b
  44. SpriteFacingLeftAndWalking:
  45. db $88,$89,$8a,$8b
  46. SpriteOAMParameters:
  47. db $00,$00, $00 ; top left
  48. db $00,$08, $00 ; top right
  49. db $08,$00, OAMFLAG_CANBEMASKED ; bottom left
  50. db $08,$08, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
  51. SpriteOAMParametersFlipped:
  52. db $00,$08, OAMFLAG_VFLIPPED
  53. db $00,$00, OAMFLAG_VFLIPPED
  54. db $08,$08, OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED
  55. db $08,$00, OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA