More OAM coordinate consistency

This commit is contained in:
Rangi 2018-07-15 11:58:01 -04:00
parent 33ad00f1ab
commit dba7f59d83
9 changed files with 35 additions and 31 deletions

View File

@ -31,7 +31,7 @@ CelebiShrineEvent:
call GetCelebiSpriteTile
inc d
push de
ld a, $90
ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call CelebiEvent_CountDown

View File

@ -1,3 +1,7 @@
FIELDMOVE_GRASS EQU $80
FIELDMOVE_TREE EQU $84
FIELDMOVE_FLY EQU $84
PlayWhirlpoolSound:
call WaitSFX
ld de, SFX_SURF
@ -20,11 +24,11 @@ BlindingFlash:
ShakeHeadbuttTree:
farcall ClearSpriteAnims
ld de, CutGrassGFX
ld hl, vTiles1 tile $00
ld hl, vTiles0 tile FIELDMOVE_GRASS
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, HeadbuttTreeGFX
ld hl, vTiles1 tile $04
ld hl, vTiles0 tile FIELDMOVE_TREE
lb bc, BANK(HeadbuttTreeGFX), 8
call Request2bpp
call Cut_Headbutt_GetPixelFacing
@ -32,8 +36,8 @@ ShakeHeadbuttTree:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $84
ld a, 36 * 4
ld [hl], FIELDMOVE_TREE
ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call HideHeadbuttTree
@ -48,7 +52,7 @@ ShakeHeadbuttTree:
and a
jr z, .done
dec [hl]
ld a, 36 * 4
ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call DelayFrame
@ -111,7 +115,7 @@ OWCutAnimation:
; 0: Split tree in half
; 1: Mow the lawn
ld a, e
and $1
and 1
ld [wJumptableIndex], a
call .LoadCutGFX
call WaitSFX
@ -121,7 +125,7 @@ OWCutAnimation:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .finish
ld a, 36 * 4
ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForAllSprites
call OWCutJumptable
@ -134,11 +138,11 @@ OWCutAnimation:
.LoadCutGFX:
callfar ClearSpriteAnims ; pointless to farcall
ld de, CutGrassGFX
ld hl, vTiles1 tile $00
ld hl, vTiles0 tile FIELDMOVE_GRASS
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, CutTreeGFX
ld hl, vTiles1 tile $04
ld hl, vTiles0 tile FIELDMOVE_TREE
lb bc, BANK(CutTreeGFX), 4
call Request2bpp
ret
@ -173,7 +177,7 @@ Cut_SpawnAnimateTree:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $84
ld [hl], FIELDMOVE_TREE
ld a, 32
ld [wFrameCounter], a
; Cut_StartWaiting
@ -226,7 +230,7 @@ Cut_SpawnLeaf:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $80
ld [hl], FIELDMOVE_GRASS
ld hl, SPRITEANIMSTRUCT_0E
add hl, bc
ld [hl], $4
@ -313,7 +317,7 @@ FlyFromAnim:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $84
ld [hl], FIELDMOVE_FLY
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_FLY_FROM
@ -323,7 +327,7 @@ FlyFromAnim:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .exit
ld a, 0 * 4
ld a, 0 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
@ -347,7 +351,7 @@ FlyToAnim:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $84
ld [hl], FIELDMOVE_FLY
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_FLY_TO
@ -360,7 +364,7 @@ FlyToAnim:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .exit
ld a, 0 * 4
ld a, 0 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
@ -394,7 +398,7 @@ endr
FlyFunction_InitGFX:
callfar ClearSpriteAnims
ld de, CutGrassGFX
ld hl, vTiles1 tile $00
ld hl, vTiles0 tile FIELDMOVE_GRASS
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld a, [wCurPartyMon]
@ -404,7 +408,7 @@ FlyFunction_InitGFX:
add hl, de
ld a, [hl]
ld [wd265], a
ld e, $84
ld e, FIELDMOVE_FLY
farcall FlyFunction_GetMonIcon
xor a
ld [wJumptableIndex], a
@ -446,5 +450,5 @@ FlyFunction_FrameTimer:
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $80
ld [hl], FIELDMOVE_GRASS
ret

View File

@ -17,7 +17,7 @@ LoadFishingGFX:
call .LoadGFX
ld hl, vTiles0 tile $0a
call .LoadGFX
ld hl, vTiles1 tile $7c
ld hl, vTiles0 tile $fc
call .LoadGFX
pop af

View File

@ -19,11 +19,11 @@ _UnownPuzzle:
xor a
call ByteFill
ld hl, UnownPuzzleCursorGFX
ld de, vTiles1 tile $60
ld de, vTiles0 tile $e0
ld bc, 4 tiles
call CopyBytes
ld hl, UnownPuzzleStartCancelLZ
ld de, vTiles1 tile $6d
ld de, vTiles0 tile $ed
call Decompress
call LoadUnownPuzzlePiecesGFX
hlcoord 0, 0

View File

@ -246,8 +246,8 @@ SuicuneFrameIterator:
ret
.Frames:
db $80 ; vTiles4 tile $00
db $88 ; vTiles4 tile $08
db $80 ; vTiles3 tile $80
db $88 ; vTiles3 tile $88
db $00 ; vTiles5 tile $00
db $08 ; vTiles5 tile $08

View File

@ -586,7 +586,7 @@ Function8b690:
ld a, BANK(GFX_17afa5)
call FarCopyBytes
ld hl, GFX_17afa5 + $514 + $160
ld de, vTiles1 tile $6e
ld de, vTiles0 tile $ee
ld bc, $10
ld a, BANK(GFX_17afa5)
call FarCopyBytes

View File

@ -5543,7 +5543,7 @@ Function11ac51:
call Function11b314
call Function11acb7
call Function11ad6e
ld a, 30 * 4
ld a, 30 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
farcall ReloadMapPart

View File

@ -279,7 +279,7 @@ Function170d02:
ld a, $1
ld [rVBK], a
ld de, GFX_171848
ld hl, vTiles1 tile $41
ld hl, vTiles0 tile $c1
lb bc, BANK(GFX_171848), 24
call Get2bpp
xor a

View File

@ -605,7 +605,7 @@ Function17d370:
call ClearScreen
farcall ReloadMapPart
call DisableLCD
ld hl, vTiles1 tile $6e
ld hl, vTiles0 tile $ee
ld de, $c608
ld bc, 1 tiles
call CopyBytes
@ -620,7 +620,7 @@ Function17d370:
ld bc, 1 tiles
call ByteFill
ld hl, $c608
ld de, vTiles1 tile $6e
ld de, vTiles0 tile $ee
ld bc, 1 tiles
call CopyBytes
xor a
@ -652,7 +652,7 @@ Function17d3f6:
Function17d405:
call DisableLCD
ld hl, vTiles1 tile $6e
ld hl, vTiles0 tile $ee
ld de, $c608
ld bc, 1 tiles
call CopyBytes
@ -667,7 +667,7 @@ Function17d405:
ld bc, 1 tiles
call ByteFill
ld hl, $c608
ld de, vTiles1 tile $6e
ld de, vTiles0 tile $ee
ld bc, 1 tiles
call CopyBytes
xor a