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 call GetCelebiSpriteTile
inc d inc d
push de push de
ld a, $90 ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurrSpriteOAMAddr], a ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites farcall DoNextFrameForAllSprites
call CelebiEvent_CountDown call CelebiEvent_CountDown

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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