Move more tables from engine/ to data/

This also splits the end of engine/battle/core.asm into engine/battle/effects.asm.
This commit is contained in:
Rangi 2020-06-23 17:50:50 -04:00
parent bdeb494add
commit 0a62d48df2
65 changed files with 2863 additions and 2825 deletions

View file

@ -248,16 +248,4 @@ ReplaceTreeTileBlock:
ld [hl], a
ret
CutTreeBlockSwaps:
; first byte = tileset block containing the cut tree
; second byte = corresponding tileset block after the cut animation happens
db $32, $6D
db $33, $6C
db $34, $6F
db $35, $4C
db $60, $6E
db $0B, $0A
db $3C, $35
db $3F, $35
db $3D, $36
db $FF ; list terminator
INCLUDE "data/cut_tree_blocks.asm"

View file

@ -25,51 +25,4 @@ IsPlayerStandingOnDoorTile:
and a
ret
DoorTileIDPointers:
dbw OVERWORLD, OverworldDoorTileIDs
dbw FOREST, ForestDoorTileIDs
dbw MART, MartDoorTileIDs
dbw HOUSE, HouseDoorTileIDs
dbw FOREST_GATE, TilesetMuseumDoorTileIDs
dbw MUSEUM, TilesetMuseumDoorTileIDs
dbw GATE, TilesetMuseumDoorTileIDs
dbw SHIP, ShipDoorTileIDs
dbw LOBBY, LobbyDoorTileIDs
dbw MANSION, MansionDoorTileIDs
dbw LAB, LabDoorTileIDs
dbw FACILITY, FacilityDoorTileIDs
dbw PLATEAU, PlateauDoorTileIDs
db $ff
OverworldDoorTileIDs:
db $1B,$58,$00
ForestDoorTileIDs:
db $3a,$00
MartDoorTileIDs:
db $5e,$00
HouseDoorTileIDs:
db $54,$00
TilesetMuseumDoorTileIDs:
db $3b,$00
ShipDoorTileIDs:
db $1e,$00
LobbyDoorTileIDs:
db $1c,$38,$1a,$00
MansionDoorTileIDs:
db $1a,$1c,$53,$00
LabDoorTileIDs:
db $34,$00
FacilityDoorTileIDs:
db $43,$58,$1b,$00
PlateauDoorTileIDs:
db $3b,$1b,$00
INCLUDE "data/door_tile_ids.asm"

View file

@ -54,17 +54,7 @@ HandleLedges:
call PlaySound
ret
; (player direction) (tile player standing on) (ledge tile) (input required)
LedgeTiles:
db SPRITE_FACING_DOWN, $2C,$37,D_DOWN
db SPRITE_FACING_DOWN, $39,$36,D_DOWN
db SPRITE_FACING_DOWN, $39,$37,D_DOWN
db SPRITE_FACING_LEFT, $2C,$27,D_LEFT
db SPRITE_FACING_LEFT, $39,$27,D_LEFT
db SPRITE_FACING_RIGHT,$2C,$0D,D_RIGHT
db SPRITE_FACING_RIGHT,$2C,$1D,D_RIGHT
db SPRITE_FACING_RIGHT,$39,$0D,D_RIGHT
db $FF
INCLUDE "data/ledge_tiles.asm"
LoadHoppingShadowOAM:
ld hl, vChars1 + $7f0

View file

@ -349,7 +349,7 @@ GetPlayerTeleportAnimFrameDelay:
IsPlayerStandingOnWarpPadOrHole:
ld b, 0
ld hl, .warpPadAndHoleData
ld hl, WarpPadAndHoleData
ld a, [wCurMapTileset]
ld c, a
.loop
@ -373,13 +373,7 @@ IsPlayerStandingOnWarpPadOrHole:
ld [wStandingOnWarpPadOrHole], a
ret
; format: db tileset id, tile id, value to be put in [wStandingOnWarpPadOrHole]
.warpPadAndHoleData:
db FACILITY, $20, 1 ; warp pad
db FACILITY, $11, 2 ; hole
db CAVERN, $22, 2 ; hole
db INTERIOR, $55, 1 ; warp pad
db $FF
INCLUDE "data/warp_pad_hole_tile_ids.asm"
FishingAnim:
ld c, 10

View file

@ -157,12 +157,12 @@ IsWarpTileInFrontOfPlayer:
call _GetTileAndCoordsInFrontOfPlayer
ld a, [wCurMap]
cp SS_ANNE_BOW
jr z, .ssAnne5
jr z, IsSSAnneBowWarpTileInFrontOfPlayer
ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
srl a
ld c, a
ld b, 0
ld hl, .warpTileListPointers
ld hl, WarpTileListPointers
add hl, bc
ld a, [hli]
ld h, [hl]
@ -176,33 +176,17 @@ IsWarpTileInFrontOfPlayer:
pop hl
ret
.warpTileListPointers:
dw .facingDownWarpTiles
dw .facingUpWarpTiles
dw .facingLeftWarpTiles
dw .facingRightWarpTiles
INCLUDE "data/warp_carpet_tile_ids.asm"
.facingDownWarpTiles
db $01,$12,$17,$3D,$04,$18,$33,$FF
.facingUpWarpTiles
db $01,$5C,$FF
.facingLeftWarpTiles
db $1A,$4B,$FF
.facingRightWarpTiles
db $0F,$4E,$FF
.ssAnne5
IsSSAnneBowWarpTileInFrontOfPlayer:
ld a, [wTileInFrontOfPlayer]
cp $15
jr nz, .notSSAnne5Warp
scf
jr .done
jr IsWarpTileInFrontOfPlayer.done
.notSSAnne5Warp
and a
jr .done
jr IsWarpTileInFrontOfPlayer.done
IsPlayerStandingOnDoorTileOrWarpTile:
push hl

View file

@ -12,5 +12,4 @@ RemoveGuardDrink:
jr z, .drinkLoop
jpba RemoveItemByID
GuardDrinksList:
db FRESH_WATER, SODA_POP, LEMONADE, $00
INCLUDE "data/guard_drink_items.asm"

View file

@ -22,8 +22,4 @@ SetLastBlackoutMap:
pop hl
ret
SafariZoneRestHouses:
db SAFARI_ZONE_WEST_REST_HOUSE
db SAFARI_ZONE_EAST_REST_HOUSE
db SAFARI_ZONE_NORTH_REST_HOUSE
db -1
INCLUDE "data/rest_house_maps.asm"