mirror of
https://github.com/pret/pokepinball.git
synced 2026-04-25 23:36:59 -05:00
Use some of the SPRITE_XXX_COUNT constants
This commit is contained in:
parent
891ee4b8cb
commit
214ddbcb2e
|
|
@ -174,7 +174,7 @@ SpriteDataPointers: ; 0x4000
|
|||
SpriteDataPointer HighScoresErrorDialog2Sprite, SPRITE_HIGH_SCORES_ERROR_DIALOG_2
|
||||
SpriteDataPointer HighScoresErrorDialog3Sprite, SPRITE_HIGH_SCORES_ERROR_DIALOG_3
|
||||
SpriteDataPointer HighScoresErrorDialog4Sprite, SPRITE_HIGH_SCORES_ERROR_DIALOG_4
|
||||
DEF SPRITE_HIGH_SCORES_ERROR_DIALOGS_LENGTH = const_value - SPRITE_HIGH_SCORES_ERROR_DIALOGS
|
||||
DEF SPRITE_HIGH_SCORES_ERROR_DIALOGS_COUNT = const_value - SPRITE_HIGH_SCORES_ERROR_DIALOGS
|
||||
SpriteDataPointer HighScoresDeleteDataSprite, SPRITE_HIGH_SCORES_DELETE_DATA
|
||||
SpriteDataPointer HighScoresRightArrowSprite, SPRITE_HIGH_SCORES_ARROW_RIGHT
|
||||
SpriteDataPointer HighScoresLeftArrowSprite, SPRITE_HIGH_SCORES_ARROW_LEFT
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ SendHighScoresAnimationData: ; 0xcf4b
|
|||
db $00 ; terminator
|
||||
|
||||
Func_cf58: ; 0xcf58
|
||||
cp $5
|
||||
cp SPRITE_HIGH_SCORES_ERROR_DIALOGS_COUNT + 1
|
||||
ret z
|
||||
push af
|
||||
lb de, $00, $02
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ DrawPikachuSavers_BlueStage: ; 0x1f448
|
|||
sub e
|
||||
ld c, a
|
||||
ld a, [wPikachuSaverAnimationFrame]
|
||||
add SPRITE_PIKACHU_SAVER_0
|
||||
add SPRITE_PIKACHU_SAVER
|
||||
call LoadSpriteData
|
||||
ret
|
||||
|
||||
|
|
@ -381,8 +381,8 @@ DrawSlotGlow_BlueField: ; 0x1f55e
|
|||
srl a
|
||||
srl a
|
||||
and $3
|
||||
add SPRITE_SLOT_GLOW_0
|
||||
cp SPRITE_SLOT_GLOW_2 + 1
|
||||
add SPRITE_SLOT_GLOW
|
||||
cp SPRITE_SLOT_GLOW + SPRITE_SLOT_GLOW_COUNT
|
||||
call nz, LoadSpriteData
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ DrawPinball: ; 0x17e81
|
|||
srl a
|
||||
srl a ; divide wBallRotation by 8 because
|
||||
srl a ; there are 8 frames of the ball spinning
|
||||
assert SPRITE_BALL_SPIN_COUNT == 8 ; or any power of two
|
||||
and SPRITE_BALL_SPIN_COUNT - 1
|
||||
add SPRITE_BALL_SPIN
|
||||
call LoadSpriteData
|
||||
|
|
|
|||
|
|
@ -594,6 +594,6 @@ DrawSlotGlow_RedField: ; 0x17fca
|
|||
srl a
|
||||
and $3
|
||||
add SPRITE_SLOT_GLOW
|
||||
cp SPRITE_SLOT_GLOW + 3
|
||||
cp SPRITE_SLOT_GLOW + SPRITE_SLOT_GLOW_COUNT
|
||||
call nz, LoadSpriteData
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user