mirror of https://github.com/zeldaret/tmc
Rename metaTiles
Now the 16x16 tiles are just called tiles and the 8x8 tiles are called subTiles.
This commit is contained in:
parent
c3b771a209
commit
aced0bef69
|
|
@ -3,17 +3,17 @@
|
|||
|
||||
.set TOP_TILEDATA, gMapTop+0x4
|
||||
.set TOP_COLLISIONDATA, gMapTop+0x2004
|
||||
.set TOP_TILEDATACLONE, gMapTop+0x3004
|
||||
.set TOP_METATILETYPES, gMapTop+0x5004
|
||||
.set TOP_TILEDATAORIGINAL, gMapTop+0x3004
|
||||
.set TOP_TILETYPES, gMapTop+0x5004
|
||||
.set TOP_UNKDATA2, gMapTop+0x6004
|
||||
.set TOP_METATILES, gMapTop+0x7004
|
||||
.set TOP_TILES, gMapTop+0x7004
|
||||
.set TOP_UNKDATA3, gMapTop+0xb004
|
||||
.set BOTTOM_TILEDATA, gMapBottom+0x4
|
||||
.set BOTTOM_COLLISIONDATA, gMapBottom+0x2004
|
||||
.set BOTTOM_TILEDATACLONE, gMapBottom+0x3004
|
||||
.set BOTTOM_METATILETYPES, gMapBottom+0x5004
|
||||
.set BOTTOM_TILEDATAORIGINAL, gMapBottom+0x3004
|
||||
.set BOTTOM_TILETYPES, gMapBottom+0x5004
|
||||
.set BOTTOM_UNKDATA2, gMapBottom+0x6004
|
||||
.set BOTTOM_METATILES, gMapBottom+0x7004
|
||||
.set BOTTOM_TILES, gMapBottom+0x7004
|
||||
.set BOTTOM_UNKDATA3, gMapBottom+0xb004
|
||||
|
||||
.macro room_header map_x, map_y, pixel_width, pixel_height, tileset_id
|
||||
|
|
@ -41,19 +41,19 @@
|
|||
.4byte 0x0
|
||||
.endm
|
||||
|
||||
.macro metatiles_bottom src_offset, size, compressed, terminator=0
|
||||
.macro tiles_bottom src_offset, size, compressed, terminator=0
|
||||
map_data \src_offset, gMapBottom+0x7004, \size, \compressed, \terminator
|
||||
.endm
|
||||
|
||||
.macro metatiles_top src_offset, size, compressed, terminator=0
|
||||
.macro tiles_top src_offset, size, compressed, terminator=0
|
||||
map_data \src_offset, gMapTop+0x7004, \size, \compressed, \terminator
|
||||
.endm
|
||||
|
||||
.macro metatile_types_bottom src_offset, size, compressed, terminator=0
|
||||
.macro tile_types_bottom src_offset, size, compressed, terminator=0
|
||||
map_data \src_offset, gMapBottom+0x5004, \size, \compressed, \terminator
|
||||
.endm
|
||||
|
||||
.macro metatile_types_top src_offset, size, compressed, terminator=0
|
||||
.macro tile_types_top src_offset, size, compressed, terminator=0
|
||||
map_data \src_offset, gMapTop+0x5004, \size, \compressed, \terminator
|
||||
.endm
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// TODO cannot add this at the end of mapVvvToSurfaceType.c due to alignment?
|
||||
.2byte 0
|
||||
|
||||
// TODO unused?
|
||||
// TODO unused? might also be code?
|
||||
gUnk_08007DBE:: @ 08007DBE
|
||||
.byte 0x42, 0x7b, 0x01, 0x32, 0x42, 0x73, 0x70, 0x47, 0x02, 0x73, 0x00, 0x23, 0x43, 0x73, 0x0b, 0x73
|
||||
|
||||
|
|
@ -20,18 +20,18 @@ sub_08007DCE:
|
|||
pop {pc}
|
||||
|
||||
|
||||
// Find the key in the map of u16 to u16
|
||||
// r0: value
|
||||
// r1: array of u16*
|
||||
// Searches for a KeyValuePair with the key in the keyValuePairList and returns its value. Returns 0 if the key is not found.
|
||||
// r0: key
|
||||
// r1: keyValuePairList
|
||||
non_word_aligned_thumb_func_start FindValueForKey
|
||||
FindValueForKey: @ 0x08007DD6
|
||||
push {lr}
|
||||
bl ActTileConv
|
||||
bl FindEntryForKey
|
||||
adds r0, r3, #0 // move the found value into r0
|
||||
pop {pc}
|
||||
|
||||
thumb_func_start ActTileConv // TODO rename
|
||||
ActTileConv: @ 0x08007DE0
|
||||
thumb_func_start FindEntryForKey // TODO rename
|
||||
FindEntryForKey: @ 0x08007DE0
|
||||
subs r1, #4
|
||||
_08007DE2:
|
||||
adds r1, #4 // add +4 to r1 at the end of loop
|
||||
|
|
|
|||
|
|
@ -86,12 +86,12 @@ arm_sub_080B1A0C: @ 0x080B1A0C
|
|||
add r1, r1, r2
|
||||
ldrb r2, [r0, #0x38]
|
||||
mov r0, r3
|
||||
b arm_GetMetaTileTypeByPos
|
||||
arm_GetMetaTileTypeByEntity: // GetCell
|
||||
b arm_GetTileTypeByPos
|
||||
arm_GetTileTypeByEntity: // GetCell
|
||||
ldrb r2, [r0, #0x38]
|
||||
ldrh r1, [r0, #0x32]
|
||||
ldrh r0, [r0, #0x2e]
|
||||
arm_GetMetaTileTypeByPos:
|
||||
arm_GetTileTypeByPos:
|
||||
ldr ip, _080B1C18 @ =gRoomControls
|
||||
ldrh r3, [ip, #6]
|
||||
sub r0, r0, r3
|
||||
|
|
@ -106,8 +106,8 @@ arm_sub_080B1A58:
|
|||
add r0, r0, r1, lsl #6
|
||||
mov r1, r2
|
||||
|
||||
arm_func_start arm_GetMetaTileType
|
||||
arm_GetMetaTileType: @ 0x080B1A60
|
||||
arm_func_start arm_GetTileType
|
||||
arm_GetTileType: @ 0x080B1A60
|
||||
ldr r2, _080B1C1C @ =gMapDataPtrs
|
||||
_080B1A64:
|
||||
add r2, r2, r1, lsl #3
|
||||
|
|
@ -150,7 +150,7 @@ arm_GetVvvAtRoomCoords: @ room pixel coordinates to room tile coordinates
|
|||
arm_GetVvvAtRoomTile:
|
||||
add r0, r0, r1, lsl #6
|
||||
mov r1, r2 @ move layer to r1
|
||||
arm_GetVvvAtMetaTilePos:
|
||||
arm_GetVvvAtTilePos:
|
||||
ldr r2, _080B1C24 @ =gVvvPtrs
|
||||
ldr r2, [r2, r1, lsl #2]
|
||||
ldrb r0, [r2, r0]
|
||||
|
|
@ -187,17 +187,17 @@ arm_GetCollisionDataAtRoomCoords:
|
|||
arm_GetCollisionDataAtRoomTile:
|
||||
add r0, r0, r1, lsl #6 @ convert coords to tile index
|
||||
mov r1, r2
|
||||
arm_GetCollisionDataAtMetaTilePos:
|
||||
arm_GetCollisionDataAtTilePos:
|
||||
ldr r2, _080B1C2C @ =gCollisionDataPtrs
|
||||
ldr r1, [r2, r1, lsl #2]
|
||||
ldrb r0, [r1, r0] @ load collision tile at my location
|
||||
bx lr
|
||||
|
||||
arm_func_start arm_GetVvvForMetaTileType
|
||||
arm_GetVvvForMetaTileType: @ 0x080B1B54
|
||||
arm_func_start arm_GetVvvForTileType
|
||||
arm_GetVvvForTileType: @ 0x080B1B54
|
||||
lsls r0, r0, #0x12
|
||||
ldrlo r1, _080B1C30 @ =gMapMetaTileTypeToVvv
|
||||
ldrhs r1, _080B1C34 @ =gMapSpecialMetaTileToVvv
|
||||
ldrlo r1, _080B1C30 @ =gMapTileTypeToVvv
|
||||
ldrhs r1, _080B1C34 @ =gMapSpecialTileToVvv
|
||||
ldrb r0, [r1, r0, lsr #18]
|
||||
bx lr
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ arm_GetVvvForMetaTileType: @ 0x080B1B54
|
|||
arm_sub_080B1B68: @ 0x080B1B68
|
||||
lsrs r2, r0, #0xe
|
||||
bxne lr
|
||||
ldr r2, _080B1C38 @ =gMetatileTypesPtrs
|
||||
ldr r2, _080B1C38 @ =gTileTypesPtrs
|
||||
ldr r1, [r2, r1, lsl #3]
|
||||
lsl r0, r0, #1
|
||||
ldrh r0, [r1, r0]
|
||||
|
|
@ -214,7 +214,7 @@ arm_sub_080B1B68: @ 0x080B1B68
|
|||
arm_func_start arm_sub_080B1B84
|
||||
arm_sub_080B1B84: @ 0x080B1B84
|
||||
mov ip, lr
|
||||
bl arm_GetMetaTileType
|
||||
bl arm_GetTileType
|
||||
lsls r0, r0, #0x12
|
||||
ldrlo r1, _080B1C3C @ =gUnk_08000360
|
||||
ldrhs r1, _080B1C40 @ =gUnk_080B7A3E
|
||||
|
|
@ -226,7 +226,7 @@ arm_sub_080B1B84: @ 0x080B1B84
|
|||
arm_sub_080B1BA4: @ 0x080B1BA4
|
||||
mov ip, lr
|
||||
mov r3, r2
|
||||
bl arm_GetMetaTileType
|
||||
bl arm_GetTileType
|
||||
lsls r0, r0, #0x12
|
||||
ldrlo r1, _080B1C44 @ =gUnk_08000360
|
||||
ldrhs r1, _080B1C48 @ =gUnk_080B7A3E
|
||||
|
|
@ -263,9 +263,9 @@ _080B1C20: .4byte gRoomControls
|
|||
_080B1C24: .4byte gVvvPtrs
|
||||
_080B1C28: .4byte gRoomControls
|
||||
_080B1C2C: .4byte gCollisionDataPtrs
|
||||
_080B1C30: .4byte gMapMetaTileTypeToVvv
|
||||
_080B1C34: .4byte gMapSpecialMetaTileToVvv
|
||||
_080B1C38: .4byte gMetatileTypesPtrs
|
||||
_080B1C30: .4byte gMapTileTypeToVvv
|
||||
_080B1C34: .4byte gMapSpecialTileToVvv
|
||||
_080B1C38: .4byte gTileTypesPtrs
|
||||
_080B1C3C: .4byte gUnk_08000360
|
||||
_080B1C40: .4byte gUnk_080B7A3E
|
||||
_080B1C44: .4byte gUnk_08000360
|
||||
|
|
|
|||
|
|
@ -326,9 +326,9 @@ DoTileInteraction: @ 0x08008796
|
|||
adds r1, r7, #0
|
||||
movs r2, #0x38
|
||||
ldrb r2, [r4, r2] // collision layer
|
||||
bl GetMetaTileTypeByPos
|
||||
bl GetTileTypeByPos
|
||||
ldr r1, _080088D8 @ =gUnk_080046A4
|
||||
bl ActTileConv
|
||||
bl FindEntryForKey
|
||||
beq _080087CE_return0
|
||||
lsls r1, r3, #3
|
||||
adds r3, r5, #0
|
||||
|
|
@ -764,7 +764,7 @@ CheckNEastTile: @ 0x08008B02
|
|||
tst r0, r1
|
||||
bne _08008B1E
|
||||
ldr r1, =gMapVvvToSurfaceType
|
||||
bl ActTileConv
|
||||
bl FindEntryForKey
|
||||
movs r2, #1
|
||||
cmp r3, #1
|
||||
beq _08008B20
|
||||
|
|
|
|||
|
|
@ -78,11 +78,11 @@ ResolveCollisionLayer::
|
|||
ldrh r0, [r4, #0x2e]
|
||||
ldrh r1, [r4, #0x32]
|
||||
movs r2, #2
|
||||
bl GetMetaTileTypeByPos
|
||||
bl GetTileTypeByPos
|
||||
movs r3, #1
|
||||
cmp r0, #0
|
||||
beq _08016A62
|
||||
bl GetVvvForMetaTileType
|
||||
bl GetVvvForTileType
|
||||
movs r3, #2
|
||||
add r1, pc, #0x40
|
||||
_08016A54:
|
||||
|
|
|
|||
138
asm/src/veneer.s
138
asm/src/veneer.s
|
|
@ -55,45 +55,45 @@ CloneTile: @ 0x08000152
|
|||
ldrh r0, [r3, r0]
|
||||
lsrs r2, r2, #2
|
||||
|
||||
non_word_aligned_thumb_func_start SetMetaTile
|
||||
SetMetaTile: @ r0 = tile type, r1, = tile position, r2 = layer
|
||||
non_word_aligned_thumb_func_start SetTile
|
||||
SetTile: @ r0 = tile index, r1, = tile position, r2 = layer
|
||||
push {r4-r7, lr}
|
||||
lsls r3, r2, #3 @ 1: 8, 2: 16
|
||||
ldr r4, _08000208 @ =gMapDataPtrs
|
||||
ldr r5, [r4, r3] @ layer 1: gMapBottom.mapData, 2: gMapTop.mapData
|
||||
lsls r6, r1, #1
|
||||
ldrh r7, [r5, r6] @ r7 (oldMetaTile) = gMapBottom.mapData[metaTilePos]
|
||||
strh r0, [r5, r6] @ gMapBottom.mapData[metaTilePos] = metaTile
|
||||
ldrh r7, [r5, r6] @ r7 (oldTile) = gMapBottom.mapData[tilePos]
|
||||
strh r0, [r5, r6] @ gMapBottom.mapData[tilePos] = tileIndex
|
||||
ldr r6, _0800020C @ =0x00004000
|
||||
cmp r0, r6
|
||||
blo tile_wrong_type @ jump if metaTile < 0x4000
|
||||
blo tile_wrong_type @ jump if tileIndex < 0x4000
|
||||
push {r1, r2}
|
||||
subs r4, r0, r6 @ r4 = metaTile - 0x4000
|
||||
ldr r3, _08000210 @ =gMapSpecialMetaTileToVvv
|
||||
ldrb r0, [r3, r4] @ r0 = gMapSpecialMetaTileToVvv[metaTile - 0x4000]
|
||||
bl SetVvvAtMetaTilePos
|
||||
ldr r3, _08000214 @ =gMapSpecialMetaTileToCollisionData
|
||||
ldrb r0, [r3, r4] @ r0 = gMapSpecialMetaTileToCollisionData[metaTile - 0x4000]
|
||||
subs r4, r0, r6 @ r4 = tileIndex - 0x4000
|
||||
ldr r3, _08000210 @ =gMapSpecialTileToVvv
|
||||
ldrb r0, [r3, r4] @ r0 = gMapSpecialTileToVvv[tileIndex - 0x4000]
|
||||
bl SetVvvAtTilePos
|
||||
ldr r3, _08000214 @ =gMapSpecialTileToCollisionData
|
||||
ldrb r0, [r3, r4] @ r0 = gMapSpecialTileToCollisionData[tileIndex - 0x4000]
|
||||
lsrs r2, r2, #2 @ r2 = layer
|
||||
bl SetCollisionData
|
||||
pop {r0, r1} @ tilepos, layer
|
||||
push {r0, r1}
|
||||
bl UnregisterInteractTile @ DeleteLoadedTileEntity(metaTilePos, layer)
|
||||
adds r0, r7, #0 @ r0 = oldMetaTile
|
||||
bl UnregisterInteractTile @ DeleteLoadedTileEntity(tilePos, layer)
|
||||
adds r0, r7, #0 @ r0 = oldTile
|
||||
pop {r1, r2}
|
||||
bl RegisterInteractTile @ StoreMetaTileForSpecialTile(oldMetaTile, metaTilePos, layer)
|
||||
bl RegisterInteractTile @ StoreTileForSpecialTile(oldTile, tilePos, layer)
|
||||
pop {r4, r5, r6, r7, pc} @ pop pc results in returning to the calling function
|
||||
tile_wrong_type:
|
||||
adds r3, #4 @ r3 = layer * 8 + 4
|
||||
ldr r4, [r4, r3]
|
||||
lsls r0, r0, #1 @ r0 = metaTile * 2
|
||||
ldrh r4, [r4, r0] @ r4 (metaTileType) = gMapBottom.metatileTypes[metaTile]
|
||||
lsls r0, r0, #1 @ r0 = tileIndex * 2
|
||||
ldrh r4, [r4, r0] @ r4 (tileType) = gMapBottom.tileTypes[tileIndex]
|
||||
push {r1, r2}
|
||||
ldr r3, _08000218 @ =gMapMetaTileTypeToVvv
|
||||
ldrb r0, [r3, r4] @ r0 = gMapMetaTileTypeToVvv[metaTileType]
|
||||
bl SetVvvAtMetaTilePos
|
||||
ldr r3, _0800021C @ =gMapMetaTileTypeToCollisionData
|
||||
ldrb r0, [r3, r4] @ r0 = gMapMetaTileTypeToCollisionData[metaTileType]
|
||||
ldr r3, _08000218 @ =gMapTileTypeToVvv
|
||||
ldrb r0, [r3, r4] @ r0 = gMapTileTypeToVvv[tileType]
|
||||
bl SetVvvAtTilePos
|
||||
ldr r3, _0800021C @ =gMapTileTypeToCollisionData
|
||||
ldrb r0, [r3, r4] @ r0 = gMapTileTypeToCollisionData[tileType]
|
||||
lsrs r2, r2, #2 @ r2 = layer
|
||||
bl SetCollisionData
|
||||
pop {r0, r1}
|
||||
|
|
@ -105,17 +105,17 @@ _080001C4: .4byte gMapBottom+0x6004
|
|||
_080001C8: .4byte gMapTop+0x6004
|
||||
_080001CC: .4byte gMapBottom+0x6004
|
||||
|
||||
@ r0: @see gMapSpecialMetaTileToVvv r1: metaTilePos, r2: layer
|
||||
thumb_func_start SetVvvAtMetaTilePos
|
||||
SetVvvAtMetaTilePos: @ 0x080001D0
|
||||
@ r0: @see gMapSpecialTileToVvv r1: tilePos, r2: layer
|
||||
thumb_func_start SetVvvAtTilePos
|
||||
SetVvvAtTilePos: @ 0x080001D0
|
||||
lsls r2, r2, #2
|
||||
ldr r3, _08000220 @ =gVvvPtrs
|
||||
ldr r3, [r3, r2] @ r3 = gMapBottom.vvv
|
||||
strb r0, [r3, r1] @ gMapBottom.vvv[metaTilePos] = r0
|
||||
strb r0, [r3, r1] @ gMapBottom.vvv[tilePos] = r0
|
||||
bx lr
|
||||
|
||||
non_word_aligned_thumb_func_start GetMetaTileIndex
|
||||
GetMetaTileIndex: @ 0x080001DA
|
||||
non_word_aligned_thumb_func_start GetTileIndex
|
||||
GetTileIndex: @ 0x080001DA
|
||||
lsls r1, r1, #3
|
||||
ldr r2, _08000224 @ =gMapDataPtrs
|
||||
ldr r1, [r2, r1]
|
||||
|
|
@ -133,37 +133,37 @@ _08000200: .4byte gBG2Buffer+0x40
|
|||
_08000204: .4byte gCollisionDataPtrs
|
||||
_08000208: .4byte gMapDataPtrs
|
||||
_0800020C: .4byte 0x00004000
|
||||
_08000210: .4byte gMapSpecialMetaTileToVvv
|
||||
_08000214: .4byte gMapSpecialMetaTileToCollisionData
|
||||
_08000218: .4byte gMapMetaTileTypeToVvv
|
||||
_0800021C: .4byte gMapMetaTileTypeToCollisionData
|
||||
_08000210: .4byte gMapSpecialTileToVvv
|
||||
_08000214: .4byte gMapSpecialTileToCollisionData
|
||||
_08000218: .4byte gMapTileTypeToVvv
|
||||
_0800021C: .4byte gMapTileTypeToCollisionData
|
||||
_08000220: .4byte gVvvPtrs
|
||||
_08000224: .4byte gMapDataPtrs
|
||||
|
||||
gMapDataPtrs::
|
||||
.4byte BOTTOM_TILEDATA @ layer 0
|
||||
gMetatileTypesPtrs::
|
||||
.4byte BOTTOM_METATILETYPES
|
||||
gTileTypesPtrs::
|
||||
.4byte BOTTOM_TILETYPES
|
||||
.4byte BOTTOM_TILEDATA @ layer 1
|
||||
.4byte BOTTOM_METATILETYPES
|
||||
.4byte BOTTOM_TILETYPES
|
||||
.4byte TOP_TILEDATA @ layer 2
|
||||
.4byte TOP_METATILETYPES
|
||||
.4byte TOP_TILETYPES
|
||||
.4byte BOTTOM_TILEDATA @ layer 3
|
||||
.4byte BOTTOM_METATILETYPES
|
||||
.4byte BOTTOM_TILETYPES
|
||||
gCollisionDataPtrs::
|
||||
.4byte BOTTOM_COLLISIONDATA @ layer 0
|
||||
.4byte BOTTOM_COLLISIONDATA @ layer 1
|
||||
.4byte TOP_COLLISIONDATA @ layer 2
|
||||
.4byte BOTTOM_COLLISIONDATA @ layer 3
|
||||
gUnk_08000258:: @ mapDataClone and metatileTypes
|
||||
.4byte BOTTOM_TILEDATACLONE @ layer 0
|
||||
.4byte BOTTOM_METATILETYPES
|
||||
.4byte BOTTOM_TILEDATACLONE @ layer 1
|
||||
.4byte BOTTOM_METATILETYPES
|
||||
.4byte TOP_TILEDATACLONE @ layer 2
|
||||
.4byte TOP_METATILETYPES
|
||||
.4byte BOTTOM_TILEDATACLONE @ layer 3
|
||||
.4byte BOTTOM_METATILETYPES
|
||||
gUnk_08000258:: @ mapDataOriginal and tileTypes
|
||||
.4byte BOTTOM_TILEDATAORIGINAL @ layer 0
|
||||
.4byte BOTTOM_TILETYPES
|
||||
.4byte BOTTOM_TILEDATAORIGINAL @ layer 1
|
||||
.4byte BOTTOM_TILETYPES
|
||||
.4byte TOP_TILEDATAORIGINAL @ layer 2
|
||||
.4byte TOP_TILETYPES
|
||||
.4byte BOTTOM_TILEDATAORIGINAL @ layer 3
|
||||
.4byte BOTTOM_TILETYPES
|
||||
gVvvPtrs:: @ vvv for layers
|
||||
.4byte BOTTOM_UNKDATA3 @ layer 0
|
||||
.4byte BOTTOM_UNKDATA3 @ layer 1
|
||||
|
|
@ -222,9 +222,9 @@ sub_080B1A0C: @ 0x0800029C
|
|||
@ call 0x080B1A28
|
||||
@ r0: entity
|
||||
@ return: u32 (tileType)
|
||||
thumb_func_start GetMetaTileTypeByEntity
|
||||
GetMetaTileTypeByEntity: @ 0x080002A0
|
||||
ldr r3, _0800030C @ =ram_GetMetaTileTypeByEntity
|
||||
thumb_func_start GetTileTypeByEntity
|
||||
GetTileTypeByEntity: @ 0x080002A0
|
||||
ldr r3, _0800030C @ =ram_GetTileTypeByEntity
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1A34
|
||||
|
|
@ -232,9 +232,9 @@ GetMetaTileTypeByEntity: @ 0x080002A0
|
|||
@ r1: s32 (yPos)
|
||||
@ r2: u32 (layer)
|
||||
@ return: u32 (tileType)
|
||||
thumb_func_start GetMetaTileTypeByPos
|
||||
GetMetaTileTypeByPos: @ 0x080002A4
|
||||
ldr r3, _08000310 @ =ram_GetMetaTileTypeByPos
|
||||
thumb_func_start GetTileTypeByPos
|
||||
GetTileTypeByPos: @ 0x080002A4
|
||||
ldr r3, _08000310 @ =ram_GetTileTypeByPos
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1A48
|
||||
|
|
@ -259,9 +259,9 @@ sub_080B1A58: @ 0x080002AC
|
|||
@ r0: u32 (tileIndex)
|
||||
@ r1: u32 (layer)
|
||||
@ return: u32 (tileType)
|
||||
thumb_func_start GetMetaTileType
|
||||
GetMetaTileType: @ 0x080002B0
|
||||
ldr r3, _0800031C @ =ram_GetMetaTileType
|
||||
thumb_func_start GetTileType
|
||||
GetTileType: @ 0x080002B0
|
||||
ldr r3, _0800031C @ =ram_GetTileType
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1A8C
|
||||
|
|
@ -318,9 +318,9 @@ GetVvvAtRoomTile: @ 0x080002C4
|
|||
@ call 0x080B1AE0
|
||||
@ r0: u32 (tileIndex)
|
||||
@ r1: u32 (layer)
|
||||
thumb_func_start GetVvvAtMetaTilePos
|
||||
GetVvvAtMetaTilePos: @ 0x080002C8
|
||||
ldr r3, _08000334 @ =ram_GetVvvAtMetaTilePos
|
||||
thumb_func_start GetVvvAtTilePos
|
||||
GetVvvAtTilePos: @ 0x080002C8
|
||||
ldr r3, _08000334 @ =ram_GetVvvAtTilePos
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1AF0
|
||||
|
|
@ -365,16 +365,16 @@ GetCollisionDataAtRoomTile: @ 0x080002DC
|
|||
bx r3
|
||||
|
||||
@ call 0x080B1B44
|
||||
thumb_func_start GetCollisionDataAtMetaTilePos
|
||||
GetCollisionDataAtMetaTilePos: @ 0x080002E0
|
||||
ldr r3, _0800034C @ =ram_GetCollisionDataAtMetaTilePos
|
||||
thumb_func_start GetCollisionDataAtTilePos
|
||||
GetCollisionDataAtTilePos: @ 0x080002E0
|
||||
ldr r3, _0800034C @ =ram_GetCollisionDataAtTilePos
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1B54
|
||||
@ r0: u32 (tileIndex)
|
||||
thumb_func_start GetVvvForMetaTileType
|
||||
GetVvvForMetaTileType: @ 0x080002E4
|
||||
ldr r3, _08000350 @ =ram_GetVvvForMetaTileType
|
||||
thumb_func_start GetVvvForTileType
|
||||
GetVvvForTileType: @ 0x080002E4
|
||||
ldr r3, _08000350 @ =ram_GetVvvForTileType
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1B68
|
||||
|
|
@ -408,24 +408,24 @@ _080002FC: .4byte ram_sub_080B19EC
|
|||
_08000300: .4byte ram_sub_080B19FC
|
||||
_08000304: .4byte ram_sub_080B1A04
|
||||
_08000308: .4byte ram_sub_080B1A0C
|
||||
_0800030C: .4byte ram_GetMetaTileTypeByEntity
|
||||
_08000310: .4byte ram_GetMetaTileTypeByPos
|
||||
_0800030C: .4byte ram_GetTileTypeByEntity
|
||||
_08000310: .4byte ram_GetTileTypeByPos
|
||||
_08000314: .4byte ram_sub_080B1A48
|
||||
_08000318: .4byte ram_sub_080B1A58
|
||||
_0800031C: .4byte ram_GetMetaTileType
|
||||
_0800031C: .4byte ram_GetTileType
|
||||
_08000320: .4byte ram_GetVvvRelativeToEntity
|
||||
_08000324: .4byte ram_GetVvvAtEntity
|
||||
_08000328: .4byte ram_GetVvvAtWorldCoords
|
||||
_0800032C: .4byte ram_GetVvvAtRoomCoords
|
||||
_08000330: .4byte ram_GetVvvAtRoomTile
|
||||
_08000334: .4byte ram_GetVvvAtMetaTilePos
|
||||
_08000334: .4byte ram_GetVvvAtTilePos
|
||||
_08000338: .4byte ram_GetCollisionDataRelativeTo
|
||||
_0800033C: .4byte ram_GetCollisionDataAtEntity
|
||||
_08000340: .4byte ram_GetCollisionDataAtWorldCoords
|
||||
_08000344: .4byte ram_GetCollisionDataAtRoomCoords
|
||||
_08000348: .4byte ram_GetCollisionDataAtRoomTile
|
||||
_0800034C: .4byte ram_GetCollisionDataAtMetaTilePos
|
||||
_08000350: .4byte ram_GetVvvForMetaTileType
|
||||
_0800034C: .4byte ram_GetCollisionDataAtTilePos
|
||||
_08000350: .4byte ram_GetVvvForTileType
|
||||
_08000354: .4byte ram_sub_080B1B68
|
||||
_08000358: .4byte ram_sub_080B1B84
|
||||
_0800035C: .4byte ram_sub_080B1BA4
|
||||
|
|
|
|||
3820
assets/map.json
3820
assets/map.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,476 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
.include "map_offsets.inc"
|
||||
|
||||
gAreaMetatiles_MinishWoods:: @ 081026AC
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishWoods_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MinishWoods_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishWoods_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MinishWoods_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_LakeHylia:: @ 081026DC
|
||||
metatiles_bottom offset_gAreaMetaTileset_LakeHylia_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_LakeHylia_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_LakeHylia_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_LakeHylia_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_CastorWilds:: @ 0810270C
|
||||
metatiles_bottom offset_gAreaMetaTileset_CastorWilds_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CastorWilds_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CastorWilds_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CastorWilds_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_HyruleTown:: @ 0810273C
|
||||
metatiles_bottom offset_gAreaMetaTileset_HyruleTown_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HyruleTown_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HyruleTown_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HyruleTown_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_MtCrenel:: @ 0810276C
|
||||
metatiles_bottom offset_gAreaMetaTileset_MtCrenel_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MtCrenel_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MtCrenel_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MtCrenel_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_HyruleField:: @ 0810279C
|
||||
metatiles_bottom offset_gAreaMetaTileset_HyruleField_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HyruleField_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HyruleField_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HyruleField_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_CastleGarden:: @ 081027CC
|
||||
metatiles_bottom offset_gAreaMetaTileset_CastleGarden_bottom, 0x3000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CastleGarden_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CastleGarden_bottom, 0xC00, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CastleGarden_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_CloudTops:: @ 081027FC
|
||||
metatiles_bottom offset_gAreaMetaTileset_CloudTops_bottom, 0x3FB0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CloudTops_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CloudTops_bottom, 0xFEC, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CloudTops_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_RoyalValley:: @ 0810282C
|
||||
metatiles_bottom offset_gAreaMetaTileset_RoyalValley_bottom, 0x4000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_RoyalValley_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_RoyalValley_bottom, 0x1000, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_RoyalValley_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_Beanstalks:: @ 0810285C
|
||||
metatiles_bottom offset_gAreaMetaTileset_Beanstalks_bottom, 0x5A8, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_Beanstalks_bottom, 0x16A, 1, 1
|
||||
|
||||
gAreaMetatiles_CrenelCaves:: @ 08102874
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishHouseInteriors_bottom, 0x3F80, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MinishHouseInteriors_top, 0x3F40, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishHouseInteriors_bottom, 0xFE0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MinishHouseInteriors_top, 0xFD0, 1, 1
|
||||
|
||||
gAreaMetatiles_GreatFairies:: @ 081028A4
|
||||
metatiles_bottom offset_gAreaMetaTileset_GreatFairies_bottom, 0x17A8, 1
|
||||
metatiles_top offset_gAreaMetaTileset_GreatFairies_top, 0x1070, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_GreatFairies_bottom, 0x5EA, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_GreatFairies_top, 0x41C, 1, 1
|
||||
|
||||
gAreaMetatiles_MinishVillage:: @ 081028D4
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishVillage_bottom, 0x35A8, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MinishVillage_top, 0x3228, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishVillage_bottom, 0xD6A, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MinishVillage_top, 0xC8A, 1, 1
|
||||
|
||||
gAreaMetatiles_MelarisMine:: @ 08102904
|
||||
metatiles_bottom offset_gAreaMetaTileset_MelarisMine_bottom, 0x27C0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MelarisMine_top, 0x308, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MelarisMine_bottom, 0x9F0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MelarisMine_top, 0xC2, 1, 1
|
||||
|
||||
gAreaMetatiles_MnishPaths1:: @ 08102934
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishPaths_bottom, 0x1420, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishPaths_bottom, 0x508, 1, 1
|
||||
|
||||
gAreaMetatiles_CrenelMinishPaths:: @ 0810294C
|
||||
metatiles_bottom offset_gAreaMetaTileset_CrenelMinishPaths_bottom, 0x1EB8, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CrenelMinishPaths_bottom, 0x7AE, 1, 1
|
||||
|
||||
gAreaMetatiles_MinishHouseInteriors:: @ 08102964
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishHouseInteriors_bottom, 0x3F80, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MinishHouseInteriors_top, 0x3F40, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishHouseInteriors_bottom, 0xFE0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MinishHouseInteriors_top, 0xFD0, 1, 1
|
||||
|
||||
gAreaMetatiles_HouseInteriors1:: @ 08102994
|
||||
metatiles_bottom offset_gAreaMetaTileset_HouseInteriors1_bottom, 0x3188, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HouseInteriors1_bottom, 0xC62, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_HouseInteriors2:: @ 081029C4
|
||||
metatiles_bottom offset_gAreaMetaTileset_HouseInteriors2_bottom, 0x33A0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HouseInteriors2_bottom, 0xCE8, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_HouseInteriors4:: @ 081029F4
|
||||
metatiles_bottom offset_gAreaMetaTileset_HouseInteriors4_bottom, 0x33A0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HouseInteriors4_bottom, 0xCE8, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_HouseInteriors3:: @ 08102A24
|
||||
metatiles_bottom offset_gAreaMetaTileset_HouseInteriors3_bottom, 0x2F20, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HouseInteriors3_bottom, 0xBC8, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_TreeInteriors:: @ 08102A54
|
||||
metatiles_bottom offset_gAreaMetaTileset_TreeInteriors_bottom, 0x3000, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_TreeInteriors_bottom, 0xC00, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_Dojos:: @ 08102A84
|
||||
metatiles_bottom offset_gAreaMetaTileset_Dojos_bottom, 0x33A0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_Dojos_bottom, 0xCE8, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_MinishCracks:: @ 08102AB4
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishCracks_bottom, 0x3180, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishCracks_bottom, 0xC60, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_ArmosInteriors:: @ 08102AE4
|
||||
metatiles_bottom offset_gAreaMetaTileset_ArmosInteriors_bottom, 0xC50, 1
|
||||
metatiles_top offset_gAreaMetaTileset_ArmosInteriors_top, 0xC50, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_ArmosInteriors_bottom, 0x314, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_ArmosInteriors_top, 0x314, 1, 1
|
||||
|
||||
gAreaMetatiles_MinishRafters:: @ 08102B14
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishRafters_bottom, 0x1A30, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishRafters_bottom, 0x68C, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_GoronCave:: @ 08102B44
|
||||
metatiles_bottom offset_gAreaMetaTileset_GoronCave_bottom, 0x3F80, 1
|
||||
metatiles_top offset_gAreaMetaTileset_GoronCave_top, 0x3400, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_GoronCave_bottom, 0xFE0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_GoronCave_top, 0xD00, 1, 1
|
||||
|
||||
gAreaMetatiles_WindTribeTower:: @ 08102B74
|
||||
metatiles_bottom offset_gAreaMetaTileset_WindTribeTower_bottom, 0x2EB0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_WindTribeTower_bottom, 0xBAC, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_WindTribeTowerRoof:: @ 08102BA4
|
||||
metatiles_bottom offset_gAreaMetaTileset_WindTribeTowerRoof_bottom, 0xBC0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_WindTribeTowerRoof_top, 0xBC0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_WindTribeTowerRoof_bottom, 0x2F0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_WindTribeTowerRoof_top, 0x2F0, 1, 1
|
||||
|
||||
gAreaMetatiles_MinishCaves:: @ 08102BD4
|
||||
metatiles_bottom offset_gAreaMetaTileset_MinishCaves_bottom, 0x3F80, 1
|
||||
metatiles_top offset_gAreaMetaTileset_MinishCaves_top, 0x3F80, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_MinishCaves_bottom, 0xFE0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_MinishCaves_top, 0xFE0, 1, 1
|
||||
|
||||
gAreaMetatiles_CastleGardenMinishHoles:: @ 08102C04
|
||||
metatiles_bottom offset_gAreaMetaTileset_CastleGardenMinishHoles_bottom, 0x13A8, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CastleGardenMinishHoles_top, 0x1680, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CastleGardenMinishHoles_bottom, 0x4EA, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CastleGardenMinishHoles_top, 0x5A0, 1, 1
|
||||
|
||||
gAreaMetatiles_EzloCutscene:: @ 08102C34
|
||||
metatiles_bottom offset_gAreaMetaTileset_EzloCutscene_bottom, 0x1A20, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_EzloCutscene_bottom, 0x688, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaMetatiles_HyruleTownUnderground:: @ 08102C64
|
||||
metatiles_bottom offset_gAreaMetaTileset_40_bottom, 0x3E80, 1
|
||||
metatiles_top offset_gAreaMetaTileset_40_top, 0x3610, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_40_bottom, 0xFA0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_40_top, 0xD84, 1, 1
|
||||
|
||||
gAreaMetatiles_DeepwoodShrine:: @ 08102C94
|
||||
metatiles_bottom offset_gAreaMetaTileset_DeepwoodShrine_bottom, 0x3B28, 1
|
||||
metatiles_top offset_gAreaMetaTileset_DeepwoodShrine_top, 0x3620, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_DeepwoodShrine_bottom, 0xECA, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_DeepwoodShrine_top, 0xD88, 1, 1
|
||||
|
||||
gAreaMetatiles_DeepwoodShrineBoss:: @ 08102CC4
|
||||
metatiles_bottom offset_gAreaMetaTileset_DeepwoodShrineBoss_bottom, 0x3620, 1
|
||||
metatiles_top offset_gAreaMetaTileset_DeepwoodShrineBoss_top, 0x11F8, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_DeepwoodShrineBoss_bottom, 0xD88, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_DeepwoodShrineBoss_top, 0x47E, 1, 1
|
||||
|
||||
gAreaMetatiles_DeepwoodShrineEntry:: @ 08102CF4
|
||||
metatiles_bottom offset_gAreaMetaTileset_DeepwoodShrineEntry_bottom, 0xD08, 1
|
||||
metatiles_top offset_gAreaMetaTileset_DeepwoodShrineEntry_top, 0x9F8, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_DeepwoodShrineEntry_bottom, 0x342, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_DeepwoodShrineEntry_top, 0x27E, 1, 1
|
||||
|
||||
gAreaMetatiles_CaveOfFlames:: @ 08102D24
|
||||
metatiles_bottom offset_gAreaMetaTileset_CaveOfFlames_bottom, 0x3B08, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CaveOfFlames_top, 0x3F28, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CaveOfFlames_bottom, 0xEC2, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CaveOfFlames_top, 0xFCA, 1, 1
|
||||
|
||||
gAreaMetatiles_CaveOfFlamesBoss:: @ 08102D54
|
||||
metatiles_bottom offset_gAreaMetaTileset_CaveOfFlamesBoss_bottom, 0x3B08, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CaveOfFlamesBoss_top, 0x3610, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CaveOfFlamesBoss_bottom, 0xEC2, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CaveOfFlamesBoss_top, 0xD84, 1, 1
|
||||
|
||||
gAreaMetatiles_FortressOfWinds:: @ 08102D84
|
||||
metatiles_bottom offset_gAreaMetaTileset_CastorDarknut_bottom, 0x3868, 1
|
||||
metatiles_top offset_gAreaMetaTileset_CastorDarknut_top, 0x3850, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_CastorDarknut_bottom, 0xE1A, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_CastorDarknut_top, 0xE14, 1, 1
|
||||
|
||||
gAreaMetatiles_FortressOfWindsTop:: @ 08102DB4
|
||||
metatiles_bottom offset_gAreaMetaTileset_FortressOfWindsTop_bottom, 0x1440, 1
|
||||
metatiles_top offset_gAreaMetaTileset_FortressOfWindsTop_top, 0x1368, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_FortressOfWindsTop_bottom, 0x510, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_FortressOfWindsTop_top, 0x4DA, 1, 1
|
||||
|
||||
gAreaMetatiles_InnerMazaal:: @ 08102DE4
|
||||
metatiles_bottom offset_gAreaMetaTileset_InnerMazaal_bottom, 0x3C00, 1
|
||||
metatiles_top offset_gAreaMetaTileset_InnerMazaal_top, 0x3E70, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_InnerMazaal_bottom, 0xF00, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_InnerMazaal_top, 0xF9C, 1, 1
|
||||
|
||||
gAreaMetatiles_TempleOfDroplets:: @ 08102E14
|
||||
metatiles_bottom offset_gAreaMetaTileset_TempleOfDroplets_bottom, 0x3D68, 1
|
||||
metatiles_top offset_gAreaMetaTileset_TempleOfDroplets_top, 0x4000, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_TempleOfDroplets_bottom, 0xF5A, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_TempleOfDroplets_top, 0x1000, 1, 1
|
||||
|
||||
gAreaMetatiles_61:: @ 08102E44
|
||||
metatiles_bottom offset_gAreaMetaTileset_Null61_bottom, 0x600, 1
|
||||
metatiles_top offset_gAreaMetaTileset_Null61_top, 0x398, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_Null61_bottom, 0x180, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_Null61_top, 0xE6, 1, 1
|
||||
|
||||
gAreaMetatiles_RoyalCrypt:: @ 08102E74
|
||||
metatiles_bottom offset_gAreaMetaTileset_RoyalCrypt_bottom, 0x3610, 1
|
||||
metatiles_top offset_gAreaMetaTileset_RoyalCrypt_top, 0x3610, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_RoyalCrypt_bottom, 0xD84, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_RoyalCrypt_top, 0xD84, 1, 1
|
||||
|
||||
gAreaMetatiles_PalaceOfWinds:: @ 08102EA4
|
||||
metatiles_bottom offset_gAreaMetaTileset_PalaceOfWinds_bottom, 0x3620, 1
|
||||
metatiles_top offset_gAreaMetaTileset_PalaceOfWinds_top, 0x3620, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_PalaceOfWinds_bottom, 0xD88, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_PalaceOfWinds_top, 0xD88, 1, 1
|
||||
|
||||
gAreaMetatiles_PalaceOfWindsBoss:: @ 08102ED4
|
||||
metatiles_top offset_gAreaMetaTileset_PalaceOfWindsBoss_top, 0x108, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_PalaceOfWindsBoss_top, 0x42, 1, 1
|
||||
|
||||
gAreaMetatiles_Sanctuary:: @ 08102EEC
|
||||
metatiles_bottom offset_gAreaMetaTileset_Sanctuary_bottom, 0x3620, 1
|
||||
metatiles_top offset_gAreaMetaTileset_Sanctuary_top, 0x3620, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_Sanctuary_bottom, 0xD88, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_Sanctuary_top, 0xD88, 1, 1
|
||||
|
||||
gAreaMetatiles_HyruleCastle:: @ 08102F1C
|
||||
metatiles_bottom offset_gAreaMetaTileset_HyruleCastle_bottom, 0x37C0, 1
|
||||
metatiles_top offset_gAreaMetaTileset_HyruleCastle_top, 0x3610, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_HyruleCastle_bottom, 0xDF0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_HyruleCastle_top, 0xD84, 1, 1
|
||||
|
||||
gAreaMetatiles_SanctuaryEntrance:: @ 08102F4C
|
||||
metatiles_bottom offset_gAreaMetaTileset_SanctuaryEntrance_bottom, 0x1478, 1
|
||||
metatiles_top offset_gAreaMetaTileset_SanctuaryEntrance_top, 0xFF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_SanctuaryEntrance_bottom, 0x51E, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_SanctuaryEntrance_top, 0x3FC, 1, 1
|
||||
|
||||
gAreaMetatiles_DarkHyruleCastle:: @ 08102F7C
|
||||
metatiles_bottom offset_gAreaMetaTileset_DarkHyruleCastle_bottom, 0x3FD8, 1
|
||||
metatiles_top offset_gAreaMetaTileset_DarkHyruleCastle_top, 0x37C0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_DarkHyruleCastle_bottom, 0xFF6, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_DarkHyruleCastle_top, 0xDF0, 1, 1
|
||||
|
||||
gAreaMetatiles_DarkHyruleCastleOutside:: @ 08102FAC
|
||||
metatiles_bottom offset_gAreaMetaTileset_DarkHyruleCastleOutside_bottom, 0x3340, 1
|
||||
metatiles_top offset_gAreaMetaTileset_DarkHyruleCastleOutside_top, 0x1EF0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_DarkHyruleCastleOutside_bottom, 0xCD0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_DarkHyruleCastleOutside_top, 0x7BC, 1, 1
|
||||
|
||||
gAreaMetatiles_DarkHyruleCastleBridge:: @ 08102FDC
|
||||
metatiles_bottom offset_gAreaMetaTileset_DarkHyruleCastleBridge_bottom, 0x3610, 1
|
||||
metatiles_top offset_gAreaMetaTileset_DarkHyruleCastleBridge_top, 0x3610, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_DarkHyruleCastleBridge_bottom, 0xD84, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_DarkHyruleCastleBridge_top, 0xD84, 1, 1
|
||||
|
||||
gAreaMetatiles_VaatisArms:: @ 0810300C
|
||||
metatiles_bottom offset_gAreaMetaTileset_VaatisArms_bottom, 0x17C8, 1
|
||||
metatiles_top offset_gAreaMetaTileset_VaatisArms_top, 0xBC0, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_VaatisArms_bottom, 0x5F2, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_VaatisArms_top, 0x2F0, 1, 1
|
||||
|
||||
gAreaMetatiles_Vaati3:: @ 0810303C
|
||||
metatiles_bottom offset_gAreaMetaTileset_Vaati3_bottom, 0xE80, 1
|
||||
metatiles_top offset_gAreaMetaTileset_Vaati3_top, 0x9B8, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_Vaati3_bottom, 0x3A0, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_Vaati3_top, 0x26E, 1, 1
|
||||
|
||||
gAreaMetatiles_Vaati2:: @ 0810306C
|
||||
metatiles_bottom offset_gAreaMetaTileset_Vaati2_bottom, 0x850, 1
|
||||
metatiles_top offset_gAreaMetaTileset_Vaati2_top, 0x298, 1
|
||||
metatile_types_bottom offset_gAreaMetaTilesetTypes_Vaati2_bottom, 0x214, 1
|
||||
metatile_types_top offset_gAreaMetaTilesetTypes_Vaati2_top, 0xA6, 1, 1
|
||||
|
||||
|
||||
gAreaMetatiles:: @ 0810309C
|
||||
.4byte gAreaMetatiles_MinishWoods @ 0x0
|
||||
.4byte gAreaMetatiles_MinishVillage @ 0x1
|
||||
.4byte gAreaMetatiles_HyruleTown @ 0x2
|
||||
.4byte gAreaMetatiles_HyruleField @ 0x3
|
||||
.4byte gAreaMetatiles_CastorWilds @ 0x4
|
||||
.4byte gAreaMetatiles_CastorWilds @ 0x5
|
||||
.4byte gAreaMetatiles_MtCrenel @ 0x6
|
||||
.4byte gAreaMetatiles_CastleGarden @ 0x7
|
||||
.4byte gAreaMetatiles_CloudTops @ 0x8
|
||||
.4byte gAreaMetatiles_RoyalValley @ 0x9
|
||||
.4byte gAreaMetatiles_MtCrenel @ 0xA
|
||||
.4byte gAreaMetatiles_LakeHylia @ 0xB
|
||||
.4byte gAreaMetatiles_MinishWoods @ 0xC
|
||||
.4byte gAreaMetatiles_Beanstalks @ 0xD
|
||||
.4byte gAreaMetatiles_MinishWoods @ 0xE
|
||||
.4byte gAreaMetatiles_HyruleTown @ 0xF
|
||||
.4byte gAreaMetatiles_MelarisMine @ 0x10
|
||||
.4byte gAreaMetatiles_MnishPaths1 @ 0x11
|
||||
.4byte gAreaMetatiles_CrenelMinishPaths @ 0x12
|
||||
.4byte gAreaMetatiles_HyruleField @ 0x13
|
||||
.4byte gAreaMetatiles_MtCrenel @ 0x14
|
||||
.4byte gAreaMetatiles_HyruleTown @ 0x15
|
||||
.4byte gAreaMetatiles_MtCrenel @ 0x16
|
||||
.4byte gAreaMetatiles_CastorWilds @ 0x17
|
||||
.4byte gAreaMetatiles_CastorWilds @ 0x18
|
||||
.4byte gAreaMetatiles_LakeHylia @ 0x19
|
||||
.4byte gAreaMetatiles_MtCrenel @ 0x1A
|
||||
.4byte gAreaMetatiles_Unused @ 0x1B
|
||||
.4byte gAreaMetatiles_Unused @ 0x1C
|
||||
.4byte gAreaMetatiles_HyruleField @ 0x1D
|
||||
.4byte gAreaMetatiles_MinishWoods @ 0x1E
|
||||
.4byte gAreaMetatiles_HyruleField @ 0x1F
|
||||
.4byte gAreaMetatiles_MinishHouseInteriors @ 0x20
|
||||
.4byte gAreaMetatiles_HouseInteriors1 @ 0x21
|
||||
.4byte gAreaMetatiles_HouseInteriors2 @ 0x22
|
||||
.4byte gAreaMetatiles_HouseInteriors3 @ 0x23
|
||||
.4byte gAreaMetatiles_TreeInteriors @ 0x24
|
||||
.4byte gAreaMetatiles_Dojos @ 0x25
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x26
|
||||
.4byte gAreaMetatiles_MinishCracks @ 0x27
|
||||
.4byte gAreaMetatiles_HouseInteriors4 @ 0x28
|
||||
.4byte gAreaMetatiles_GreatFairies @ 0x29
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x2A
|
||||
.4byte gAreaMetatiles_FortressOfWinds @ 0x2B
|
||||
.4byte gAreaMetatiles_ArmosInteriors @ 0x2C
|
||||
.4byte gAreaMetatiles_MinishHouseInteriors @ 0x2D
|
||||
.4byte gAreaMetatiles_MinishRafters @ 0x2E
|
||||
.4byte gAreaMetatiles_GoronCave @ 0x2F
|
||||
.4byte gAreaMetatiles_WindTribeTower @ 0x30
|
||||
.4byte gAreaMetatiles_WindTribeTowerRoof @ 0x31
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x32
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x33
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x34
|
||||
.4byte gAreaMetatiles_MinishCaves @ 0x35
|
||||
.4byte gAreaMetatiles_CastleGardenMinishHoles @ 0x36
|
||||
.4byte gAreaMetatiles_CastleGardenMinishHoles @ 0x37
|
||||
.4byte gAreaMetatiles_EzloCutscene @ 0x38
|
||||
.4byte gAreaMetatiles_Unused @ 0x39
|
||||
.4byte gAreaMetatiles_Unused @ 0x3A
|
||||
.4byte gAreaMetatiles_Unused @ 0x3B
|
||||
.4byte gAreaMetatiles_Unused @ 0x3C
|
||||
.4byte gAreaMetatiles_Unused @ 0x3D
|
||||
.4byte gAreaMetatiles_Unused @ 0x3E
|
||||
.4byte gAreaMetatiles_Unused @ 0x3F
|
||||
.4byte gAreaMetatiles_HyruleTownUnderground @ 0x40
|
||||
.4byte gAreaMetatiles_HyruleTownUnderground @ 0x41
|
||||
.4byte gAreaMetatiles_HyruleTownUnderground @ 0x42
|
||||
.4byte gAreaMetatiles_HyruleTownUnderground @ 0x43
|
||||
.4byte gAreaMetatiles_HyruleTownUnderground @ 0x44
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x45
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x46
|
||||
.4byte gAreaMetatiles_CrenelCaves @ 0x47
|
||||
.4byte gAreaMetatiles_DeepwoodShrine @ 0x48
|
||||
.4byte gAreaMetatiles_DeepwoodShrineBoss @ 0x49
|
||||
.4byte gAreaMetatiles_DeepwoodShrineEntry @ 0x4A
|
||||
.4byte gAreaMetatiles_Unused @ 0x4B
|
||||
.4byte gAreaMetatiles_Unused @ 0x4C
|
||||
.4byte gAreaMetatiles_DeepwoodShrine @ 0x4D
|
||||
.4byte gAreaMetatiles_DeepwoodShrine @ 0x4E
|
||||
.4byte gAreaMetatiles_DeepwoodShrineBoss @ 0x4F
|
||||
.4byte gAreaMetatiles_CaveOfFlames @ 0x50
|
||||
.4byte gAreaMetatiles_CaveOfFlamesBoss @ 0x51
|
||||
.4byte gAreaMetatiles_Unused @ 0x52
|
||||
.4byte gAreaMetatiles_Unused @ 0x53
|
||||
.4byte gAreaMetatiles_Unused @ 0x54
|
||||
.4byte gAreaMetatiles_Unused @ 0x55
|
||||
.4byte gAreaMetatiles_CaveOfFlames @ 0x56
|
||||
.4byte gAreaMetatiles_CaveOfFlames @ 0x57
|
||||
.4byte gAreaMetatiles_FortressOfWinds @ 0x58
|
||||
.4byte gAreaMetatiles_FortressOfWindsTop @ 0x59
|
||||
.4byte gAreaMetatiles_InnerMazaal @ 0x5A
|
||||
.4byte gAreaMetatiles_Unused @ 0x5B
|
||||
.4byte gAreaMetatiles_Unused @ 0x5C
|
||||
.4byte gAreaMetatiles_Unused @ 0x5D
|
||||
.4byte gAreaMetatiles_Unused @ 0x5E
|
||||
.4byte gAreaMetatiles_FortressOfWinds @ 0x5F
|
||||
.4byte gAreaMetatiles_TempleOfDroplets @ 0x60
|
||||
.4byte gAreaMetatiles_61 @ 0x61
|
||||
.4byte gAreaMetatiles_TempleOfDroplets @ 0x62
|
||||
.4byte gAreaMetatiles_Unused @ 0x63
|
||||
.4byte gAreaMetatiles_Unused @ 0x64
|
||||
.4byte gAreaMetatiles_Unused @ 0x65
|
||||
.4byte gAreaMetatiles_Unused @ 0x66
|
||||
.4byte gAreaMetatiles_TempleOfDroplets @ 0x67
|
||||
.4byte gAreaMetatiles_RoyalCrypt @ 0x68
|
||||
.4byte gAreaMetatiles_Unused @ 0x69
|
||||
.4byte gAreaMetatiles_Unused @ 0x6A
|
||||
.4byte gAreaMetatiles_Unused @ 0x6B
|
||||
.4byte gAreaMetatiles_Unused @ 0x6C
|
||||
.4byte gAreaMetatiles_Unused @ 0x6D
|
||||
.4byte gAreaMetatiles_Unused @ 0x6E
|
||||
.4byte gAreaMetatiles_RoyalCrypt @ 0x6F
|
||||
.4byte gAreaMetatiles_PalaceOfWinds @ 0x70
|
||||
.4byte gAreaMetatiles_PalaceOfWindsBoss @ 0x71
|
||||
.4byte gAreaMetatiles_Unused @ 0x72
|
||||
.4byte gAreaMetatiles_Unused @ 0x73
|
||||
.4byte gAreaMetatiles_Unused @ 0x74
|
||||
.4byte gAreaMetatiles_Unused @ 0x75
|
||||
.4byte gAreaMetatiles_Unused @ 0x76
|
||||
.4byte gAreaMetatiles_PalaceOfWinds @ 0x77
|
||||
.4byte gAreaMetatiles_Sanctuary @ 0x78
|
||||
.4byte gAreaMetatiles_Unused @ 0x79
|
||||
.4byte gAreaMetatiles_Unused @ 0x7A
|
||||
.4byte gAreaMetatiles_Unused @ 0x7B
|
||||
.4byte gAreaMetatiles_Unused @ 0x7C
|
||||
.4byte gAreaMetatiles_Unused @ 0x7D
|
||||
.4byte gAreaMetatiles_Unused @ 0x7E
|
||||
.4byte gAreaMetatiles_Sanctuary @ 0x7F
|
||||
.4byte gAreaMetatiles_HyruleCastle @ 0x80
|
||||
.4byte gAreaMetatiles_SanctuaryEntrance @ 0x81
|
||||
.4byte gAreaMetatiles_Unused @ 0x82
|
||||
.4byte gAreaMetatiles_Unused @ 0x83
|
||||
.4byte gAreaMetatiles_Unused @ 0x84
|
||||
.4byte gAreaMetatiles_Unused @ 0x85
|
||||
.4byte gAreaMetatiles_Unused @ 0x86
|
||||
.4byte gAreaMetatiles_HyruleCastle @ 0x87
|
||||
.4byte gAreaMetatiles_DarkHyruleCastle @ 0x88
|
||||
.4byte gAreaMetatiles_DarkHyruleCastleOutside @ 0x89
|
||||
.4byte gAreaMetatiles_VaatisArms @ 0x8A
|
||||
.4byte gAreaMetatiles_Vaati3 @ 0x8B
|
||||
.4byte gAreaMetatiles_Vaati2 @ 0x8C
|
||||
.4byte gAreaMetatiles_DarkHyruleCastleBridge @ 0x8D
|
||||
.4byte gAreaMetatiles_Unused @ 0x8E
|
||||
.4byte gAreaMetatiles_DarkHyruleCastle @ 0x8F
|
||||
|
|
@ -0,0 +1,476 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
.include "map_offsets.inc"
|
||||
|
||||
gAreaTiles_MinishWoods:: @ 081026AC
|
||||
tiles_bottom offset_gAreaTileset_MinishWoods_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_MinishWoods_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishWoods_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MinishWoods_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_LakeHylia:: @ 081026DC
|
||||
tiles_bottom offset_gAreaTileset_LakeHylia_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_LakeHylia_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_LakeHylia_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_LakeHylia_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_CastorWilds:: @ 0810270C
|
||||
tiles_bottom offset_gAreaTileset_CastorWilds_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_CastorWilds_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CastorWilds_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CastorWilds_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_HyruleTown:: @ 0810273C
|
||||
tiles_bottom offset_gAreaTileset_HyruleTown_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_HyruleTown_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HyruleTown_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HyruleTown_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_MtCrenel:: @ 0810276C
|
||||
tiles_bottom offset_gAreaTileset_MtCrenel_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_MtCrenel_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MtCrenel_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MtCrenel_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_HyruleField:: @ 0810279C
|
||||
tiles_bottom offset_gAreaTileset_HyruleField_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_HyruleField_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HyruleField_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HyruleField_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_CastleGarden:: @ 081027CC
|
||||
tiles_bottom offset_gAreaTileset_CastleGarden_bottom, 0x3000, 1
|
||||
tiles_top offset_gAreaTileset_CastleGarden_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CastleGarden_bottom, 0xC00, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CastleGarden_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_CloudTops:: @ 081027FC
|
||||
tiles_bottom offset_gAreaTileset_CloudTops_bottom, 0x3FB0, 1
|
||||
tiles_top offset_gAreaTileset_CloudTops_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CloudTops_bottom, 0xFEC, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CloudTops_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_RoyalValley:: @ 0810282C
|
||||
tiles_bottom offset_gAreaTileset_RoyalValley_bottom, 0x4000, 1
|
||||
tiles_top offset_gAreaTileset_RoyalValley_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_RoyalValley_bottom, 0x1000, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_RoyalValley_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_Beanstalks:: @ 0810285C
|
||||
tiles_bottom offset_gAreaTileset_Beanstalks_bottom, 0x5A8, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_Beanstalks_bottom, 0x16A, 1, 1
|
||||
|
||||
gAreaTiles_CrenelCaves:: @ 08102874
|
||||
tiles_bottom offset_gAreaTileset_MinishHouseInteriors_bottom, 0x3F80, 1
|
||||
tiles_top offset_gAreaTileset_MinishHouseInteriors_top, 0x3F40, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishHouseInteriors_bottom, 0xFE0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MinishHouseInteriors_top, 0xFD0, 1, 1
|
||||
|
||||
gAreaTiles_GreatFairies:: @ 081028A4
|
||||
tiles_bottom offset_gAreaTileset_GreatFairies_bottom, 0x17A8, 1
|
||||
tiles_top offset_gAreaTileset_GreatFairies_top, 0x1070, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_GreatFairies_bottom, 0x5EA, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_GreatFairies_top, 0x41C, 1, 1
|
||||
|
||||
gAreaTiles_MinishVillage:: @ 081028D4
|
||||
tiles_bottom offset_gAreaTileset_MinishVillage_bottom, 0x35A8, 1
|
||||
tiles_top offset_gAreaTileset_MinishVillage_top, 0x3228, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishVillage_bottom, 0xD6A, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MinishVillage_top, 0xC8A, 1, 1
|
||||
|
||||
gAreaTiles_MelarisMine:: @ 08102904
|
||||
tiles_bottom offset_gAreaTileset_MelarisMine_bottom, 0x27C0, 1
|
||||
tiles_top offset_gAreaTileset_MelarisMine_top, 0x308, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MelarisMine_bottom, 0x9F0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MelarisMine_top, 0xC2, 1, 1
|
||||
|
||||
gAreaTiles_MnishPaths1:: @ 08102934
|
||||
tiles_bottom offset_gAreaTileset_MinishPaths_bottom, 0x1420, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishPaths_bottom, 0x508, 1, 1
|
||||
|
||||
gAreaTiles_CrenelMinishPaths:: @ 0810294C
|
||||
tiles_bottom offset_gAreaTileset_CrenelMinishPaths_bottom, 0x1EB8, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CrenelMinishPaths_bottom, 0x7AE, 1, 1
|
||||
|
||||
gAreaTiles_MinishHouseInteriors:: @ 08102964
|
||||
tiles_bottom offset_gAreaTileset_MinishHouseInteriors_bottom, 0x3F80, 1
|
||||
tiles_top offset_gAreaTileset_MinishHouseInteriors_top, 0x3F40, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishHouseInteriors_bottom, 0xFE0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MinishHouseInteriors_top, 0xFD0, 1, 1
|
||||
|
||||
gAreaTiles_HouseInteriors1:: @ 08102994
|
||||
tiles_bottom offset_gAreaTileset_HouseInteriors1_bottom, 0x3188, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HouseInteriors1_bottom, 0xC62, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_HouseInteriors2:: @ 081029C4
|
||||
tiles_bottom offset_gAreaTileset_HouseInteriors2_bottom, 0x33A0, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HouseInteriors2_bottom, 0xCE8, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_HouseInteriors4:: @ 081029F4
|
||||
tiles_bottom offset_gAreaTileset_HouseInteriors4_bottom, 0x33A0, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HouseInteriors4_bottom, 0xCE8, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_HouseInteriors3:: @ 08102A24
|
||||
tiles_bottom offset_gAreaTileset_HouseInteriors3_bottom, 0x2F20, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HouseInteriors3_bottom, 0xBC8, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_TreeInteriors:: @ 08102A54
|
||||
tiles_bottom offset_gAreaTileset_TreeInteriors_bottom, 0x3000, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_TreeInteriors_bottom, 0xC00, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_Dojos:: @ 08102A84
|
||||
tiles_bottom offset_gAreaTileset_Dojos_bottom, 0x33A0, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_Dojos_bottom, 0xCE8, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_MinishCracks:: @ 08102AB4
|
||||
tiles_bottom offset_gAreaTileset_MinishCracks_bottom, 0x3180, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishCracks_bottom, 0xC60, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_ArmosInteriors:: @ 08102AE4
|
||||
tiles_bottom offset_gAreaTileset_ArmosInteriors_bottom, 0xC50, 1
|
||||
tiles_top offset_gAreaTileset_ArmosInteriors_top, 0xC50, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_ArmosInteriors_bottom, 0x314, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_ArmosInteriors_top, 0x314, 1, 1
|
||||
|
||||
gAreaTiles_MinishRafters:: @ 08102B14
|
||||
tiles_bottom offset_gAreaTileset_MinishRafters_bottom, 0x1A30, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishRafters_bottom, 0x68C, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_GoronCave:: @ 08102B44
|
||||
tiles_bottom offset_gAreaTileset_GoronCave_bottom, 0x3F80, 1
|
||||
tiles_top offset_gAreaTileset_GoronCave_top, 0x3400, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_GoronCave_bottom, 0xFE0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_GoronCave_top, 0xD00, 1, 1
|
||||
|
||||
gAreaTiles_WindTribeTower:: @ 08102B74
|
||||
tiles_bottom offset_gAreaTileset_WindTribeTower_bottom, 0x2EB0, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_WindTribeTower_bottom, 0xBAC, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_WindTribeTowerRoof:: @ 08102BA4
|
||||
tiles_bottom offset_gAreaTileset_WindTribeTowerRoof_bottom, 0xBC0, 1
|
||||
tiles_top offset_gAreaTileset_WindTribeTowerRoof_top, 0xBC0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_WindTribeTowerRoof_bottom, 0x2F0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_WindTribeTowerRoof_top, 0x2F0, 1, 1
|
||||
|
||||
gAreaTiles_MinishCaves:: @ 08102BD4
|
||||
tiles_bottom offset_gAreaTileset_MinishCaves_bottom, 0x3F80, 1
|
||||
tiles_top offset_gAreaTileset_MinishCaves_top, 0x3F80, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_MinishCaves_bottom, 0xFE0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_MinishCaves_top, 0xFE0, 1, 1
|
||||
|
||||
gAreaTiles_CastleGardenMinishHoles:: @ 08102C04
|
||||
tiles_bottom offset_gAreaTileset_CastleGardenMinishHoles_bottom, 0x13A8, 1
|
||||
tiles_top offset_gAreaTileset_CastleGardenMinishHoles_top, 0x1680, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CastleGardenMinishHoles_bottom, 0x4EA, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CastleGardenMinishHoles_top, 0x5A0, 1, 1
|
||||
|
||||
gAreaTiles_EzloCutscene:: @ 08102C34
|
||||
tiles_bottom offset_gAreaTileset_EzloCutscene_bottom, 0x1A20, 1
|
||||
tiles_top offset_gAreaTileset_HouseInteriors1_top, 0x3FF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_EzloCutscene_bottom, 0x688, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HouseInteriors1_top, 0xFFC, 1, 1
|
||||
|
||||
gAreaTiles_HyruleTownUnderground:: @ 08102C64
|
||||
tiles_bottom offset_gAreaTileset_40_bottom, 0x3E80, 1
|
||||
tiles_top offset_gAreaTileset_40_top, 0x3610, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_40_bottom, 0xFA0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_40_top, 0xD84, 1, 1
|
||||
|
||||
gAreaTiles_DeepwoodShrine:: @ 08102C94
|
||||
tiles_bottom offset_gAreaTileset_DeepwoodShrine_bottom, 0x3B28, 1
|
||||
tiles_top offset_gAreaTileset_DeepwoodShrine_top, 0x3620, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_DeepwoodShrine_bottom, 0xECA, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_DeepwoodShrine_top, 0xD88, 1, 1
|
||||
|
||||
gAreaTiles_DeepwoodShrineBoss:: @ 08102CC4
|
||||
tiles_bottom offset_gAreaTileset_DeepwoodShrineBoss_bottom, 0x3620, 1
|
||||
tiles_top offset_gAreaTileset_DeepwoodShrineBoss_top, 0x11F8, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_DeepwoodShrineBoss_bottom, 0xD88, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_DeepwoodShrineBoss_top, 0x47E, 1, 1
|
||||
|
||||
gAreaTiles_DeepwoodShrineEntry:: @ 08102CF4
|
||||
tiles_bottom offset_gAreaTileset_DeepwoodShrineEntry_bottom, 0xD08, 1
|
||||
tiles_top offset_gAreaTileset_DeepwoodShrineEntry_top, 0x9F8, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_DeepwoodShrineEntry_bottom, 0x342, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_DeepwoodShrineEntry_top, 0x27E, 1, 1
|
||||
|
||||
gAreaTiles_CaveOfFlames:: @ 08102D24
|
||||
tiles_bottom offset_gAreaTileset_CaveOfFlames_bottom, 0x3B08, 1
|
||||
tiles_top offset_gAreaTileset_CaveOfFlames_top, 0x3F28, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CaveOfFlames_bottom, 0xEC2, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CaveOfFlames_top, 0xFCA, 1, 1
|
||||
|
||||
gAreaTiles_CaveOfFlamesBoss:: @ 08102D54
|
||||
tiles_bottom offset_gAreaTileset_CaveOfFlamesBoss_bottom, 0x3B08, 1
|
||||
tiles_top offset_gAreaTileset_CaveOfFlamesBoss_top, 0x3610, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CaveOfFlamesBoss_bottom, 0xEC2, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CaveOfFlamesBoss_top, 0xD84, 1, 1
|
||||
|
||||
gAreaTiles_FortressOfWinds:: @ 08102D84
|
||||
tiles_bottom offset_gAreaTileset_CastorDarknut_bottom, 0x3868, 1
|
||||
tiles_top offset_gAreaTileset_CastorDarknut_top, 0x3850, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_CastorDarknut_bottom, 0xE1A, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_CastorDarknut_top, 0xE14, 1, 1
|
||||
|
||||
gAreaTiles_FortressOfWindsTop:: @ 08102DB4
|
||||
tiles_bottom offset_gAreaTileset_FortressOfWindsTop_bottom, 0x1440, 1
|
||||
tiles_top offset_gAreaTileset_FortressOfWindsTop_top, 0x1368, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_FortressOfWindsTop_bottom, 0x510, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_FortressOfWindsTop_top, 0x4DA, 1, 1
|
||||
|
||||
gAreaTiles_InnerMazaal:: @ 08102DE4
|
||||
tiles_bottom offset_gAreaTileset_InnerMazaal_bottom, 0x3C00, 1
|
||||
tiles_top offset_gAreaTileset_InnerMazaal_top, 0x3E70, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_InnerMazaal_bottom, 0xF00, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_InnerMazaal_top, 0xF9C, 1, 1
|
||||
|
||||
gAreaTiles_TempleOfDroplets:: @ 08102E14
|
||||
tiles_bottom offset_gAreaTileset_TempleOfDroplets_bottom, 0x3D68, 1
|
||||
tiles_top offset_gAreaTileset_TempleOfDroplets_top, 0x4000, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_TempleOfDroplets_bottom, 0xF5A, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_TempleOfDroplets_top, 0x1000, 1, 1
|
||||
|
||||
gAreaTiles_61:: @ 08102E44
|
||||
tiles_bottom offset_gAreaTileset_Null61_bottom, 0x600, 1
|
||||
tiles_top offset_gAreaTileset_Null61_top, 0x398, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_Null61_bottom, 0x180, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_Null61_top, 0xE6, 1, 1
|
||||
|
||||
gAreaTiles_RoyalCrypt:: @ 08102E74
|
||||
tiles_bottom offset_gAreaTileset_RoyalCrypt_bottom, 0x3610, 1
|
||||
tiles_top offset_gAreaTileset_RoyalCrypt_top, 0x3610, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_RoyalCrypt_bottom, 0xD84, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_RoyalCrypt_top, 0xD84, 1, 1
|
||||
|
||||
gAreaTiles_PalaceOfWinds:: @ 08102EA4
|
||||
tiles_bottom offset_gAreaTileset_PalaceOfWinds_bottom, 0x3620, 1
|
||||
tiles_top offset_gAreaTileset_PalaceOfWinds_top, 0x3620, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_PalaceOfWinds_bottom, 0xD88, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_PalaceOfWinds_top, 0xD88, 1, 1
|
||||
|
||||
gAreaTiles_PalaceOfWindsBoss:: @ 08102ED4
|
||||
tiles_top offset_gAreaTileset_PalaceOfWindsBoss_top, 0x108, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_PalaceOfWindsBoss_top, 0x42, 1, 1
|
||||
|
||||
gAreaTiles_Sanctuary:: @ 08102EEC
|
||||
tiles_bottom offset_gAreaTileset_Sanctuary_bottom, 0x3620, 1
|
||||
tiles_top offset_gAreaTileset_Sanctuary_top, 0x3620, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_Sanctuary_bottom, 0xD88, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_Sanctuary_top, 0xD88, 1, 1
|
||||
|
||||
gAreaTiles_HyruleCastle:: @ 08102F1C
|
||||
tiles_bottom offset_gAreaTileset_HyruleCastle_bottom, 0x37C0, 1
|
||||
tiles_top offset_gAreaTileset_HyruleCastle_top, 0x3610, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_HyruleCastle_bottom, 0xDF0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_HyruleCastle_top, 0xD84, 1, 1
|
||||
|
||||
gAreaTiles_SanctuaryEntrance:: @ 08102F4C
|
||||
tiles_bottom offset_gAreaTileset_SanctuaryEntrance_bottom, 0x1478, 1
|
||||
tiles_top offset_gAreaTileset_SanctuaryEntrance_top, 0xFF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_SanctuaryEntrance_bottom, 0x51E, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_SanctuaryEntrance_top, 0x3FC, 1, 1
|
||||
|
||||
gAreaTiles_DarkHyruleCastle:: @ 08102F7C
|
||||
tiles_bottom offset_gAreaTileset_DarkHyruleCastle_bottom, 0x3FD8, 1
|
||||
tiles_top offset_gAreaTileset_DarkHyruleCastle_top, 0x37C0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_DarkHyruleCastle_bottom, 0xFF6, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_DarkHyruleCastle_top, 0xDF0, 1, 1
|
||||
|
||||
gAreaTiles_DarkHyruleCastleOutside:: @ 08102FAC
|
||||
tiles_bottom offset_gAreaTileset_DarkHyruleCastleOutside_bottom, 0x3340, 1
|
||||
tiles_top offset_gAreaTileset_DarkHyruleCastleOutside_top, 0x1EF0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_DarkHyruleCastleOutside_bottom, 0xCD0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_DarkHyruleCastleOutside_top, 0x7BC, 1, 1
|
||||
|
||||
gAreaTiles_DarkHyruleCastleBridge:: @ 08102FDC
|
||||
tiles_bottom offset_gAreaTileset_DarkHyruleCastleBridge_bottom, 0x3610, 1
|
||||
tiles_top offset_gAreaTileset_DarkHyruleCastleBridge_top, 0x3610, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_DarkHyruleCastleBridge_bottom, 0xD84, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_DarkHyruleCastleBridge_top, 0xD84, 1, 1
|
||||
|
||||
gAreaTiles_VaatisArms:: @ 0810300C
|
||||
tiles_bottom offset_gAreaTileset_VaatisArms_bottom, 0x17C8, 1
|
||||
tiles_top offset_gAreaTileset_VaatisArms_top, 0xBC0, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_VaatisArms_bottom, 0x5F2, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_VaatisArms_top, 0x2F0, 1, 1
|
||||
|
||||
gAreaTiles_Vaati3:: @ 0810303C
|
||||
tiles_bottom offset_gAreaTileset_Vaati3_bottom, 0xE80, 1
|
||||
tiles_top offset_gAreaTileset_Vaati3_top, 0x9B8, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_Vaati3_bottom, 0x3A0, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_Vaati3_top, 0x26E, 1, 1
|
||||
|
||||
gAreaTiles_Vaati2:: @ 0810306C
|
||||
tiles_bottom offset_gAreaTileset_Vaati2_bottom, 0x850, 1
|
||||
tiles_top offset_gAreaTileset_Vaati2_top, 0x298, 1
|
||||
tile_types_bottom offset_gAreaTilesetTypes_Vaati2_bottom, 0x214, 1
|
||||
tile_types_top offset_gAreaTilesetTypes_Vaati2_top, 0xA6, 1, 1
|
||||
|
||||
|
||||
gAreaTiles:: @ 0810309C
|
||||
.4byte gAreaTiles_MinishWoods @ 0x0
|
||||
.4byte gAreaTiles_MinishVillage @ 0x1
|
||||
.4byte gAreaTiles_HyruleTown @ 0x2
|
||||
.4byte gAreaTiles_HyruleField @ 0x3
|
||||
.4byte gAreaTiles_CastorWilds @ 0x4
|
||||
.4byte gAreaTiles_CastorWilds @ 0x5
|
||||
.4byte gAreaTiles_MtCrenel @ 0x6
|
||||
.4byte gAreaTiles_CastleGarden @ 0x7
|
||||
.4byte gAreaTiles_CloudTops @ 0x8
|
||||
.4byte gAreaTiles_RoyalValley @ 0x9
|
||||
.4byte gAreaTiles_MtCrenel @ 0xA
|
||||
.4byte gAreaTiles_LakeHylia @ 0xB
|
||||
.4byte gAreaTiles_MinishWoods @ 0xC
|
||||
.4byte gAreaTiles_Beanstalks @ 0xD
|
||||
.4byte gAreaTiles_MinishWoods @ 0xE
|
||||
.4byte gAreaTiles_HyruleTown @ 0xF
|
||||
.4byte gAreaTiles_MelarisMine @ 0x10
|
||||
.4byte gAreaTiles_MnishPaths1 @ 0x11
|
||||
.4byte gAreaTiles_CrenelMinishPaths @ 0x12
|
||||
.4byte gAreaTiles_HyruleField @ 0x13
|
||||
.4byte gAreaTiles_MtCrenel @ 0x14
|
||||
.4byte gAreaTiles_HyruleTown @ 0x15
|
||||
.4byte gAreaTiles_MtCrenel @ 0x16
|
||||
.4byte gAreaTiles_CastorWilds @ 0x17
|
||||
.4byte gAreaTiles_CastorWilds @ 0x18
|
||||
.4byte gAreaTiles_LakeHylia @ 0x19
|
||||
.4byte gAreaTiles_MtCrenel @ 0x1A
|
||||
.4byte gAreaTiles_Unused @ 0x1B
|
||||
.4byte gAreaTiles_Unused @ 0x1C
|
||||
.4byte gAreaTiles_HyruleField @ 0x1D
|
||||
.4byte gAreaTiles_MinishWoods @ 0x1E
|
||||
.4byte gAreaTiles_HyruleField @ 0x1F
|
||||
.4byte gAreaTiles_MinishHouseInteriors @ 0x20
|
||||
.4byte gAreaTiles_HouseInteriors1 @ 0x21
|
||||
.4byte gAreaTiles_HouseInteriors2 @ 0x22
|
||||
.4byte gAreaTiles_HouseInteriors3 @ 0x23
|
||||
.4byte gAreaTiles_TreeInteriors @ 0x24
|
||||
.4byte gAreaTiles_Dojos @ 0x25
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x26
|
||||
.4byte gAreaTiles_MinishCracks @ 0x27
|
||||
.4byte gAreaTiles_HouseInteriors4 @ 0x28
|
||||
.4byte gAreaTiles_GreatFairies @ 0x29
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x2A
|
||||
.4byte gAreaTiles_FortressOfWinds @ 0x2B
|
||||
.4byte gAreaTiles_ArmosInteriors @ 0x2C
|
||||
.4byte gAreaTiles_MinishHouseInteriors @ 0x2D
|
||||
.4byte gAreaTiles_MinishRafters @ 0x2E
|
||||
.4byte gAreaTiles_GoronCave @ 0x2F
|
||||
.4byte gAreaTiles_WindTribeTower @ 0x30
|
||||
.4byte gAreaTiles_WindTribeTowerRoof @ 0x31
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x32
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x33
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x34
|
||||
.4byte gAreaTiles_MinishCaves @ 0x35
|
||||
.4byte gAreaTiles_CastleGardenMinishHoles @ 0x36
|
||||
.4byte gAreaTiles_CastleGardenMinishHoles @ 0x37
|
||||
.4byte gAreaTiles_EzloCutscene @ 0x38
|
||||
.4byte gAreaTiles_Unused @ 0x39
|
||||
.4byte gAreaTiles_Unused @ 0x3A
|
||||
.4byte gAreaTiles_Unused @ 0x3B
|
||||
.4byte gAreaTiles_Unused @ 0x3C
|
||||
.4byte gAreaTiles_Unused @ 0x3D
|
||||
.4byte gAreaTiles_Unused @ 0x3E
|
||||
.4byte gAreaTiles_Unused @ 0x3F
|
||||
.4byte gAreaTiles_HyruleTownUnderground @ 0x40
|
||||
.4byte gAreaTiles_HyruleTownUnderground @ 0x41
|
||||
.4byte gAreaTiles_HyruleTownUnderground @ 0x42
|
||||
.4byte gAreaTiles_HyruleTownUnderground @ 0x43
|
||||
.4byte gAreaTiles_HyruleTownUnderground @ 0x44
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x45
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x46
|
||||
.4byte gAreaTiles_CrenelCaves @ 0x47
|
||||
.4byte gAreaTiles_DeepwoodShrine @ 0x48
|
||||
.4byte gAreaTiles_DeepwoodShrineBoss @ 0x49
|
||||
.4byte gAreaTiles_DeepwoodShrineEntry @ 0x4A
|
||||
.4byte gAreaTiles_Unused @ 0x4B
|
||||
.4byte gAreaTiles_Unused @ 0x4C
|
||||
.4byte gAreaTiles_DeepwoodShrine @ 0x4D
|
||||
.4byte gAreaTiles_DeepwoodShrine @ 0x4E
|
||||
.4byte gAreaTiles_DeepwoodShrineBoss @ 0x4F
|
||||
.4byte gAreaTiles_CaveOfFlames @ 0x50
|
||||
.4byte gAreaTiles_CaveOfFlamesBoss @ 0x51
|
||||
.4byte gAreaTiles_Unused @ 0x52
|
||||
.4byte gAreaTiles_Unused @ 0x53
|
||||
.4byte gAreaTiles_Unused @ 0x54
|
||||
.4byte gAreaTiles_Unused @ 0x55
|
||||
.4byte gAreaTiles_CaveOfFlames @ 0x56
|
||||
.4byte gAreaTiles_CaveOfFlames @ 0x57
|
||||
.4byte gAreaTiles_FortressOfWinds @ 0x58
|
||||
.4byte gAreaTiles_FortressOfWindsTop @ 0x59
|
||||
.4byte gAreaTiles_InnerMazaal @ 0x5A
|
||||
.4byte gAreaTiles_Unused @ 0x5B
|
||||
.4byte gAreaTiles_Unused @ 0x5C
|
||||
.4byte gAreaTiles_Unused @ 0x5D
|
||||
.4byte gAreaTiles_Unused @ 0x5E
|
||||
.4byte gAreaTiles_FortressOfWinds @ 0x5F
|
||||
.4byte gAreaTiles_TempleOfDroplets @ 0x60
|
||||
.4byte gAreaTiles_61 @ 0x61
|
||||
.4byte gAreaTiles_TempleOfDroplets @ 0x62
|
||||
.4byte gAreaTiles_Unused @ 0x63
|
||||
.4byte gAreaTiles_Unused @ 0x64
|
||||
.4byte gAreaTiles_Unused @ 0x65
|
||||
.4byte gAreaTiles_Unused @ 0x66
|
||||
.4byte gAreaTiles_TempleOfDroplets @ 0x67
|
||||
.4byte gAreaTiles_RoyalCrypt @ 0x68
|
||||
.4byte gAreaTiles_Unused @ 0x69
|
||||
.4byte gAreaTiles_Unused @ 0x6A
|
||||
.4byte gAreaTiles_Unused @ 0x6B
|
||||
.4byte gAreaTiles_Unused @ 0x6C
|
||||
.4byte gAreaTiles_Unused @ 0x6D
|
||||
.4byte gAreaTiles_Unused @ 0x6E
|
||||
.4byte gAreaTiles_RoyalCrypt @ 0x6F
|
||||
.4byte gAreaTiles_PalaceOfWinds @ 0x70
|
||||
.4byte gAreaTiles_PalaceOfWindsBoss @ 0x71
|
||||
.4byte gAreaTiles_Unused @ 0x72
|
||||
.4byte gAreaTiles_Unused @ 0x73
|
||||
.4byte gAreaTiles_Unused @ 0x74
|
||||
.4byte gAreaTiles_Unused @ 0x75
|
||||
.4byte gAreaTiles_Unused @ 0x76
|
||||
.4byte gAreaTiles_PalaceOfWinds @ 0x77
|
||||
.4byte gAreaTiles_Sanctuary @ 0x78
|
||||
.4byte gAreaTiles_Unused @ 0x79
|
||||
.4byte gAreaTiles_Unused @ 0x7A
|
||||
.4byte gAreaTiles_Unused @ 0x7B
|
||||
.4byte gAreaTiles_Unused @ 0x7C
|
||||
.4byte gAreaTiles_Unused @ 0x7D
|
||||
.4byte gAreaTiles_Unused @ 0x7E
|
||||
.4byte gAreaTiles_Sanctuary @ 0x7F
|
||||
.4byte gAreaTiles_HyruleCastle @ 0x80
|
||||
.4byte gAreaTiles_SanctuaryEntrance @ 0x81
|
||||
.4byte gAreaTiles_Unused @ 0x82
|
||||
.4byte gAreaTiles_Unused @ 0x83
|
||||
.4byte gAreaTiles_Unused @ 0x84
|
||||
.4byte gAreaTiles_Unused @ 0x85
|
||||
.4byte gAreaTiles_Unused @ 0x86
|
||||
.4byte gAreaTiles_HyruleCastle @ 0x87
|
||||
.4byte gAreaTiles_DarkHyruleCastle @ 0x88
|
||||
.4byte gAreaTiles_DarkHyruleCastleOutside @ 0x89
|
||||
.4byte gAreaTiles_VaatisArms @ 0x8A
|
||||
.4byte gAreaTiles_Vaati3 @ 0x8B
|
||||
.4byte gAreaTiles_Vaati2 @ 0x8C
|
||||
.4byte gAreaTiles_DarkHyruleCastleBridge @ 0x8D
|
||||
.4byte gAreaTiles_Unused @ 0x8E
|
||||
.4byte gAreaTiles_DarkHyruleCastle @ 0x8F
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
.include "map_offsets.inc"
|
||||
|
||||
gAreaTileset_Unused_0:: @ 08100CE4
|
||||
gAreaMetatiles_Unused::
|
||||
gAreaTiles_Unused::
|
||||
gAreaRoomMap_Unused::
|
||||
tileset_palette_set 0, 1
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ typedef struct {
|
|||
u16 map_y;
|
||||
MapDataDefinition* tileset;
|
||||
MapDataDefinition* map;
|
||||
MapDataDefinition* metatiles;
|
||||
MapDataDefinition* tiles;
|
||||
void* bg_anim;
|
||||
const Transition* exits;
|
||||
void** properties;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
extern u32 Random(void);
|
||||
extern u32 GetRandomByWeight(const u8*);
|
||||
extern void CloneTile(u32, u32, u32);
|
||||
extern u32 GetMetaTileTypeByEntity(struct Entity_*);
|
||||
extern u32 GetMetaTileTypeByPos(s32 x, s32 y, u32 layer);
|
||||
extern u32 GetMetaTileType(u32 metaTilePos, u32 layer);
|
||||
extern u32 GetTileTypeByEntity(struct Entity_*);
|
||||
extern u32 GetTileTypeByPos(s32 x, s32 y, u32 layer);
|
||||
extern u32 GetTileType(u32 tilePos, u32 layer);
|
||||
|
||||
extern void SetMetaTile(u32 metaTile, u32 metaTilePos, u32 layer);
|
||||
extern void SetTile(u32 tileIndex, u32 tilePos, u32 layer);
|
||||
|
||||
extern void UpdateScrollVram(void);
|
||||
extern u32 sub_080B1BA4(u32, u32, u32);
|
||||
|
|
@ -50,7 +50,7 @@ extern u32 sub_0800132C(struct Entity_*, struct Entity_*);
|
|||
|
||||
extern u32 sub_080B1A48(u32, u32, u32);
|
||||
extern u32 sub_0800445C(struct Entity_*);
|
||||
extern bool32 GetVvvForMetaTileType(u32);
|
||||
extern bool32 GetVvvForTileType(u32);
|
||||
extern u32 CheckRectOnScreen(s32, s32, u32, u32);
|
||||
|
||||
extern u32 GetVvvRelativeToEntity(struct Entity_* entity, s32 xOffset, s32 yOffset);
|
||||
|
|
@ -58,38 +58,38 @@ extern u32 GetVvvAtEntity(struct Entity_* entity);
|
|||
extern u32 GetVvvAtWorldCoords(u32 worldX, u32 worldY, u32 layer);
|
||||
extern u32 GetVvvAtRoomCoords(u32 roomX, u32 roomY, u32 layer);
|
||||
extern u32 GetVvvAtRoomTile(u32 roomTileX, u32 roomTileY, u32 layer);
|
||||
extern u32 GetVvvAtMetaTilePos(u16 metaTilePos, u8 layer);
|
||||
extern u32 GetVvvAtTilePos(u16 tilePos, u8 layer);
|
||||
|
||||
/**
|
||||
* Sets vvv for a metaTilePos.
|
||||
* Sets vvv for a tilePos.
|
||||
*/
|
||||
extern void SetVvvAtMetaTilePos(u32 vvv, u32 metaTilePos, u32 layer);
|
||||
extern void SetVvvAtTilePos(u32 vvv, u32 tilePos, u32 layer);
|
||||
|
||||
// Get CollisionData for entity (relative to entity?)
|
||||
extern u32 GetCollisionDataRelativeTo(struct Entity_* entity, s32 xOffset, s32 yOffset);
|
||||
|
||||
extern u32 GetCollisionDataAtEntity(struct Entity_* entity);
|
||||
/**
|
||||
* Returns the collision data for one metatile. (x, y in pixels relative to the world)
|
||||
* Returns the collision data for one tile. (x, y in pixels relative to the world)
|
||||
*/
|
||||
extern u32 GetCollisionDataAtWorldCoords(u32 worldX, u32 worldY, u32 layer);
|
||||
/**
|
||||
* Returns the collision data for one metatile. (x, y in pixels relative to the room)
|
||||
* Returns the collision data for one tile. (x, y in pixels relative to the room)
|
||||
*/
|
||||
extern u32 GetCollisionDataAtRoomCoords(u32 roomX, u32 roomY, u32 layer);
|
||||
/**
|
||||
* Returns the collision data for one metatile. (x, y in metatiles relative to the room)
|
||||
* Returns the collision data for one tile. (x, y in tiles relative to the room)
|
||||
*/
|
||||
extern u32 GetCollisionDataAtRoomTile(u32 roomTileX, u32 roomTileY, u32 layer);
|
||||
/**
|
||||
* Returns the collision data for one metatile.
|
||||
* Returns the collision data for one tile.
|
||||
*/
|
||||
extern u32 GetCollisionDataAtMetaTilePos(u32 metaTilePos, u32 layer);
|
||||
extern u32 GetCollisionDataAtTilePos(u32 tilePos, u32 layer);
|
||||
|
||||
/**
|
||||
* Sets the collision data for one metatile.
|
||||
* Sets the collision data for one tile.
|
||||
*/
|
||||
extern void SetCollisionData(u32 collisionData, u32 metaTilePos, u32 layer);
|
||||
extern void SetCollisionData(u32 collisionData, u32 tilePos, u32 layer);
|
||||
|
||||
typedef struct {
|
||||
u16 key;
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ tiles 0x4000 and above create an entry here
|
|||
*/
|
||||
#define MAX_SPECIAL_TILES 0x100
|
||||
typedef struct {
|
||||
u16 metaTilePosAndLayer; // (layer << 12) | position
|
||||
u16 metaTileIndex;
|
||||
u16 tilePosAndLayer; // (layer << 12) | position
|
||||
u16 tileIndex;
|
||||
} SpecialTileEntry;
|
||||
extern SpecialTileEntry gMetaTilesForSpecialTiles[MAX_SPECIAL_TILES];
|
||||
extern SpecialTileEntry gTilesForSpecialTiles[MAX_SPECIAL_TILES];
|
||||
|
||||
typedef struct {
|
||||
u16 collision;
|
||||
|
|
@ -22,10 +22,10 @@ typedef struct {
|
|||
void LoadMapData(MapDataDefinition* dataDefinition);
|
||||
|
||||
/**
|
||||
* Renders a metaTleMap with 16x16 meta tiles into a tilemap with 8x8 tiles.
|
||||
* Renders a tileMap with 16x16 tiles into a subTileMap with 8x8 tiles.
|
||||
*
|
||||
* Takes into account the special meta tiles >= 0x4000 using GetMetaTileSetIndexForSpecialTile.
|
||||
* Takes into account the special tile indicess >= 0x4000 using GetTileSetIndexForSpecialTile.
|
||||
*/
|
||||
void RenderMapLayerToTileMap(u16* tileMap, MapLayer* mapLayer);
|
||||
void RenderMapLayerToSubTileMap(u16* tileMap, MapLayer* mapLayer);
|
||||
|
||||
#endif // BEANSTALKSUBTASK_H
|
||||
|
|
|
|||
|
|
@ -65,6 +65,6 @@ void CalculateEntityTileCollisions(Entity* this, u32 direction, u32 collisionTyp
|
|||
bool32 ProcessMovementInternal(Entity*, s32, s32, u32);
|
||||
u32 sub_080176E4(Entity*);
|
||||
|
||||
extern const u8 gMapMetaTileTypeToVvv[]; // vvv for tileType?
|
||||
extern const u8 gMapTileTypeToVvv[]; // vvv for tileType?
|
||||
|
||||
#endif // COLLISION_H
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ typedef struct {
|
|||
/*0x81*/ u8 timer1;
|
||||
/*0x82*/ u8 timer2;
|
||||
/*0x83*/ u8 unk_83;
|
||||
/*0x84*/ u16 tilePosition;
|
||||
/*0x84*/ u16 tilePos;
|
||||
/*0x86*/ u16 tileIndex;
|
||||
} WizzrobeEntity;
|
||||
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ extern u8 gManagerCount;
|
|||
|
||||
/** @name Tile Macros */ /// @{
|
||||
#define TILE(x, y) (((((x)-gRoomControls.origin_x) >> 4) & 0x3F) | ((((y)-gRoomControls.origin_y) >> 4) & 0x3F) << 6)
|
||||
// Calculate metatilePosition from x and y coordinates where x and y are already relative to the current room.
|
||||
// Calculate tilePos from x and y coordinates where x and y are already relative to the current room.
|
||||
#define TILE_LOCAL(x, y) ((((x) >> 4) & 0x3F) | (((y) >> 4) & 0x3F) << 6)
|
||||
#define TILE_POS(x, y) (x + (y << 6))
|
||||
#define TILE_POS_X_COMPONENT 0x3f
|
||||
|
|
|
|||
|
|
@ -5,27 +5,27 @@
|
|||
|
||||
// clang-format off
|
||||
|
||||
bool32 CheckFlags(u32);
|
||||
bool32 CheckGlobalFlag(u32);
|
||||
bool32 CheckGlobalFlags(u32, u32);
|
||||
bool32 CheckFlags(u32 flags);
|
||||
bool32 CheckGlobalFlag(u32 flag);
|
||||
bool32 CheckGlobalFlags(u32 flag, u32 count);
|
||||
extern bool32 CheckLocalFlag(u32 flag);
|
||||
extern bool32 CheckLocalFlagByBank(u32 bank, u32 flag);
|
||||
bool32 CheckLocalFlags(u32, u32);
|
||||
bool32 CheckLocalFlagsByBank(u32, u32, u32);
|
||||
bool32 CheckRoomFlag(u32);
|
||||
bool32 CheckRoomFlags(u32, u32);
|
||||
bool32 CheckLocalFlags(u32 flag, u32 count);
|
||||
bool32 CheckLocalFlagsByBank(u32 offset, u32 flag, u32 count);
|
||||
bool32 CheckRoomFlag(u32 flag);
|
||||
bool32 CheckRoomFlags(u32 flag, u32 count);
|
||||
|
||||
void ClearFlag(u32);
|
||||
void ClearGlobalFlag(u32);
|
||||
void ClearLocalFlag(u32);
|
||||
void ClearLocalFlagByBank(u32, u32);
|
||||
void ClearRoomFlag(u32);
|
||||
void ClearFlag(u32 flag);
|
||||
void ClearGlobalFlag(u32 flag);
|
||||
void ClearLocalFlag(u32 flag);
|
||||
void ClearLocalFlagByBank(u32 offset, u32 flag);
|
||||
void ClearRoomFlag(u32 flag);
|
||||
|
||||
void SetFlag(u32);
|
||||
void SetGlobalFlag(u32);
|
||||
void SetLocalFlag(u32);
|
||||
void SetLocalFlagByBank(u32, u32);
|
||||
void SetRoomFlag(u32);
|
||||
void SetFlag(u32 flag);
|
||||
void SetGlobalFlag(u32 flag);
|
||||
void SetLocalFlag(u32 flag);
|
||||
void SetLocalFlagByBank(u32 offset, u32 flag);
|
||||
void SetRoomFlag(u32 flag);
|
||||
|
||||
extern u32 ReadBit(void*, u32);
|
||||
extern u32 CheckBits(void*, u32, u32);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ extern u32 CreateRandomItemDrop(Entity*, u32);
|
|||
extern void DrawDirect(u32 spriteIndex, u32 frameIndex);
|
||||
extern void DrawEntities(void);
|
||||
extern void FlushSprites(void);
|
||||
extern u32 GetMetaTileIndex(u32 metaTilePos, u32 layer);
|
||||
extern u32 GetTileIndex(u32 tilePos, u32 layer);
|
||||
extern u32 GiveItem(u32, u32);
|
||||
extern bool32 LoadFixedGFX(Entity*, u32);
|
||||
extern void LoadResources(void);
|
||||
|
|
|
|||
|
|
@ -529,11 +529,11 @@
|
|||
|
||||
// BGCNT
|
||||
#define BGCNT_PRIORITY(n) (n) // Values 0 - 3. Lower priority BGs will be drawn on top of higher priority BGs.
|
||||
#define BGCNT_CHARBASE(n) ((n) << 2) // Values 0 - 3. Base block for tile pixel data.
|
||||
#define BGCNT_CHARBASE(n) ((n) << 2) // Values 0 - 3. Base block for sub tile pixel data.
|
||||
#define BGCNT_MOSAIC 0x0040
|
||||
#define BGCNT_16COLOR 0x0000 // 4 bits per pixel
|
||||
#define BGCNT_256COLOR 0x0080 // 8 bits per pixel
|
||||
#define BGCNT_SCREENBASE(n) ((n) << 8) // Values 0 - 31. Base block for tile map.
|
||||
#define BGCNT_SCREENBASE(n) ((n) << 8) // Values 0 - 31. Base block for sub tile map.
|
||||
#define BGCNT_WRAP 0x2000 // Only affects affine BGs. Text BGs wrap by default.
|
||||
#define BGCNT_TXT256x256 0x0000 // Internal screen size size of text mode BG in pixels.
|
||||
#define BGCNT_TXT512x256 0x4000
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ typedef struct {
|
|||
u8 field_0x37;
|
||||
s16 x;
|
||||
u16 y;
|
||||
u16 metaTilePos;
|
||||
u16 tilePos;
|
||||
u16 flag;
|
||||
} BombableWallManager;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
typedef struct {
|
||||
struct Manager base;
|
||||
u8 field_0x20[0x18];
|
||||
s16 metaTilePos; // x
|
||||
s16 tilePos; // x
|
||||
s16 field_0x3a; // y
|
||||
} FlameManager;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ typedef struct {
|
|||
u8 field_0x20[0x16];
|
||||
u8 layer;
|
||||
u8 field_0x37;
|
||||
s16 metaTilePos;
|
||||
s16 tilePos;
|
||||
u16 field_0x3a;
|
||||
u8 field_0x3c;
|
||||
u8 field_0x3d;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ typedef struct {
|
|||
u8 field_0x35;
|
||||
u8 field_0x36;
|
||||
u8 field_0x37;
|
||||
u16 tilePosition;
|
||||
u16 tilePos;
|
||||
u16 field_0x3a;
|
||||
u8 field_0x3c;
|
||||
u8 field_0x3d;
|
||||
|
|
|
|||
|
|
@ -8,26 +8,30 @@
|
|||
* @page TileMap TileMap
|
||||
* @brief
|
||||
*
|
||||
* 16x16 tiles
|
||||
* 8x8 subTiles
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Layer of the MetaTileMap.
|
||||
* @brief Layer of the TileMap.
|
||||
* @ingroup TileMap
|
||||
*/
|
||||
typedef struct {
|
||||
/*0x0000*/ BgSettings* bgSettings;
|
||||
/*0x0004*/ u16 mapData[0x40 * 0x40];
|
||||
/**< MetaTileIndex for each tile on the current layer. */ // tilemap data? <-- gMapDataTop / gMapDataBottom
|
||||
/**< TileIndex for each tile on the current layer. */ // tilemap data? <-- gMapDataTop / gMapDataBottom
|
||||
/*0x2004*/ u8 collisionData[0x40 * 0x40]; // more tilemap data? <-- gUnk_0200D654 / gUnk_02027EB4
|
||||
/*0x3004*/ u16 mapDataOriginal[0x40 * 0x40]; // more tilemap data? <-- gUnk_0200E654 / gUnk_02028EB4
|
||||
// Tileset
|
||||
/*0x5004*/ u16 metatileTypes[0x800];
|
||||
/**< Maps from the MetaTileIndex to the MetaTileType. */ // gMetatileTypesTop, gMetatileTypesBottom
|
||||
/*0x5004*/ u16 tileTypes[0x800];
|
||||
/**< Maps from the TileIndex to the TileType. */ // gTileTypesTop, gTileTypesBottom
|
||||
/*0x6004*/ u16 unkData2[0x800];
|
||||
/**< Maps from a MetaTileType to a MetaTileIndex. */ // gUnk_02011654,gUnk_0202BEB4 // TODO metatile index for
|
||||
// the metatile type??
|
||||
/*0x7004*/ u16 metatiles[0x800 * 4];
|
||||
/**< Mapping from a metatile to the four tile_attrs it consists of.*/ // gMetatilesTop, gMetatilesBottom
|
||||
/**< Maps from a TileType to a TileIndex. */ // gUnk_02011654,gUnk_0202BEB4 // TODO tile index for
|
||||
// the tile type??
|
||||
/*0x7004*/ u16 tiles[0x800 * 4];
|
||||
/**< Mapping from a tile to the four tile_attrs it consists of.*/ // gTilesTop, gTilesBottom
|
||||
|
||||
/*
|
||||
Temporarily call this vvv
|
||||
|
|
@ -41,7 +45,7 @@ typedef struct {
|
|||
// 0x637
|
||||
// 0x2030eb4 + 0x637
|
||||
// 0x20314eb
|
||||
// e.g. GetVvvAtMetaTilePos accesses this
|
||||
// e.g. GetVvvAtTilePos accesses this
|
||||
// TODO check whether this also affects sound played when walking?
|
||||
/*
|
||||
0x10: water
|
||||
|
|
|
|||
|
|
@ -516,7 +516,7 @@ typedef struct {
|
|||
/*0x1e*/ u8 dash_state;
|
||||
/*0x1f*/ u8 field_0x1f[2];
|
||||
/*0x21*/ u8 bow_state;
|
||||
/*0x22*/ u16 tilePosition;
|
||||
/*0x22*/ u16 tilePos;
|
||||
/*0x24*/ u16 tileType;
|
||||
/*0x26*/ u8 swim_state; /**< Is the player swimming? 0x80 for diving */
|
||||
/*0x27*/ u8 field_0x27[5];
|
||||
|
|
@ -718,13 +718,13 @@ void sub_08078D60(void);
|
|||
void PlayerSetNormalAndCollide(void);
|
||||
bool32 PlayerTryDropObject(ItemBehavior* arg0, u32 unk);
|
||||
void InitItemGetSequence(u32, u32, u32);
|
||||
void sub_0807B7D8(u32 metaTileType, u32 metaTilePos, u32 layer);
|
||||
void sub_0807B7D8(u32 tileType, u32 tilePos, u32 layer);
|
||||
void SetInteractableObjectCollision(Entity*, u32, u32, const void*);
|
||||
void sub_08079D84(void);
|
||||
u32 sub_0807953C(void);
|
||||
void sub_0807BB68(const s16*, u32, u32);
|
||||
void SetMetaTileByIndex(u32 tileIndex, u32 metaTilePos, u32 layer);
|
||||
void RestorePrevTileEntity(u32 metaTilePos, u32 layer);
|
||||
void SetTileByIndex(u32 tileIndex, u32 tilePos, u32 layer);
|
||||
void RestorePrevTileEntity(u32 tilePos, u32 layer);
|
||||
void UpdateItemAnim(ItemBehavior*);
|
||||
void PlayerCancelHoldItem(ItemBehavior*, u32);
|
||||
void RegisterCarryEntity(Entity*);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ typedef struct {
|
|||
/*0x0A*/ s16 scroll_x;
|
||||
/*0x0C*/ s16 scroll_y;
|
||||
/*0x0E*/ u8 scrollSpeed; /**< Pixels per frame that the camera can scroll. */
|
||||
/*0x0F*/ u8 scroll_flags; // 0x2 = ?? (apply collision value on bottom map no matter the layer SetMetaTileType is
|
||||
/*0x0F*/ u8 scroll_flags; // 0x2 = ?? (apply collision value on bottom map no matter the layer SetTileType is
|
||||
// called for), 0x4 = camera scrolling
|
||||
/*0x10*/ u8 scroll_direction;
|
||||
/*0x11*/ s8 oam_offset_x;
|
||||
|
|
@ -73,7 +73,7 @@ typedef struct {
|
|||
/* 0x09 */ u8 fight_bgm;
|
||||
/* 0x0a */ u8 needHealthDrop;
|
||||
/* 0x0c */ s16 lightLevel;
|
||||
/* 0x0e */ u16 tileEntityCount; // Number of previous values for special tiles stored in gMetaTilesForSpecialTiles
|
||||
/* 0x0e */ u16 tileEntityCount; // Number of previous values for special tiles stored in gTilesForSpecialTiles
|
||||
/* 0x10 */ u8 graphicsGroups[4];
|
||||
/* 0x14 */ u8 flags[52];
|
||||
/* 0x48 */ Droptable currentAreaDroptable;
|
||||
|
|
@ -151,7 +151,7 @@ typedef struct {
|
|||
/* 0x06 */ u16 field_0x6;
|
||||
/* 0x08 */ bool8 transitioningOut;
|
||||
/* 0x09 */ u8 type; // transition when changing areas
|
||||
/* 0x0a */ u16 stairs_idx; // seems to be a tile type @see MetaTileType, set in UpdateDoorTransition()
|
||||
/* 0x0a */ u16 stairs_idx; // seems to be a tile type @see TileType, set in UpdateDoorTransition()
|
||||
/* 0x0c */ PlayerRoomStatus player_status;
|
||||
/* 0x2c */ u8 entity_update_type; // differentiates entity priority on kinstone menu?
|
||||
/* 0x2d */ u8 field2d;
|
||||
|
|
@ -234,7 +234,7 @@ typedef enum {
|
|||
|
||||
extern void** gCurrentRoomProperties;
|
||||
|
||||
void SetMetaTileType(u32 metaTileType, u32 metaTilePos, u32 layer);
|
||||
void SetTileType(u32 tileType, u32 tilePos, u32 layer);
|
||||
void InitScreenShake(u32 time, u32 magnitude);
|
||||
|
||||
void CallRoomProp5And7(void);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ typedef struct {
|
|||
u16 xOffset;
|
||||
u16 yOffset;
|
||||
u16 updated;
|
||||
void* tilemap;
|
||||
void* subTileMap;
|
||||
} BgSettings;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -24,7 +24,7 @@ typedef struct {
|
|||
s16 xOffset;
|
||||
s16 yOffset;
|
||||
u16 updated;
|
||||
void* tilemap;
|
||||
void* subTileMap;
|
||||
} BgAffSettings;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -352,8 +352,8 @@ typedef struct {
|
|||
extern struct_02018EB0 gUnk_02018EB0;
|
||||
|
||||
typedef struct {
|
||||
s16 tile;
|
||||
s16 position;
|
||||
s16 tileIndex;
|
||||
s16 tilePosOffset;
|
||||
} TileData;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
3130
include/tiles.h
3130
include/tiles.h
File diff suppressed because it is too large
Load Diff
16
linker.ld
16
linker.ld
|
|
@ -33,7 +33,7 @@ SECTIONS {
|
|||
. = 0x00006F00; gUnk_02006F00 = .;
|
||||
. = 0x0000AF00; gHUD = .;
|
||||
. = 0x0000AF34; gUnk_0200AF34 = .;
|
||||
. = 0x0000B240; gMetaTilesForSpecialTiles = .;
|
||||
. = 0x0000B240; gTilesForSpecialTiles = .;
|
||||
. = 0x0000B640; gUnk_0200B640 = .;
|
||||
. = 0x0000B644; gUsedPalettes = .;
|
||||
. = 0x0000B650; gMapTop = .;
|
||||
|
|
@ -160,24 +160,24 @@ SECTIONS {
|
|||
. = 0x00005770; ram_sub_080B19FC = .;
|
||||
. = 0x00005778; ram_sub_080B1A04 = .;
|
||||
. = 0x00005780; ram_sub_080B1A0C = .;
|
||||
. = 0x0000579C; ram_GetMetaTileTypeByEntity = .;
|
||||
. = 0x000057A8; ram_GetMetaTileTypeByPos = .;
|
||||
. = 0x0000579C; ram_GetTileTypeByEntity = .;
|
||||
. = 0x000057A8; ram_GetTileTypeByPos = .;
|
||||
. = 0x000057BC; ram_sub_080B1A48 = .;
|
||||
. = 0x000057CC; ram_sub_080B1A58 = .;
|
||||
. = 0x000057D4; ram_GetMetaTileType = .;
|
||||
. = 0x000057D4; ram_GetTileType = .;
|
||||
. = 0x00005800; ram_GetVvvRelativeToEntity = .;
|
||||
. = 0x0000581C; ram_GetVvvAtEntity = .;
|
||||
. = 0x00005828; ram_GetVvvAtWorldCoords = .;
|
||||
. = 0x0000583C; ram_GetVvvAtRoomCoords = .;
|
||||
. = 0x0000584C; ram_GetVvvAtRoomTile = .;
|
||||
. = 0x00005854; ram_GetVvvAtMetaTilePos = .;
|
||||
. = 0x00005854; ram_GetVvvAtTilePos = .;
|
||||
. = 0x00005864; ram_GetCollisionDataRelativeTo = .;
|
||||
. = 0x00005880; ram_GetCollisionDataAtEntity = .;
|
||||
. = 0x0000588C; ram_GetCollisionDataAtWorldCoords = .;
|
||||
. = 0x000058A0; ram_GetCollisionDataAtRoomCoords = .;
|
||||
. = 0x000058B0; ram_GetCollisionDataAtRoomTile = .;
|
||||
. = 0x000058B8; ram_GetCollisionDataAtMetaTilePos = .;
|
||||
. = 0x000058C8; ram_GetVvvForMetaTileType = .;
|
||||
. = 0x000058B8; ram_GetCollisionDataAtTilePos = .;
|
||||
. = 0x000058C8; ram_GetVvvForTileType = .;
|
||||
. = 0x000058DC; ram_sub_080B1B68 = .;
|
||||
. = 0x000058F8; ram_sub_080B1B84 = .;
|
||||
. = 0x00005918; ram_sub_080B1BA4 = .;
|
||||
|
|
@ -1122,7 +1122,7 @@ SECTIONS {
|
|||
data/gfx/gfx_groups.o(.rodata);
|
||||
src/main.o(.rodata);
|
||||
data/map/tileset_headers.o(.rodata);
|
||||
data/map/metatile_headers.o(.rodata);
|
||||
data/map/tile_headers.o(.rodata);
|
||||
data/map/map_headers.o(.rodata);
|
||||
src/message.o(.rodata);
|
||||
. = ALIGN(4);
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ extern const Data gUnk_080B44C2[];
|
|||
void sub_0801AD6C(const Data*, u32);
|
||||
bool32 sub_0801A4F8(void);
|
||||
bool32 sub_0801AA58(Entity*, u32, u32);
|
||||
void RenderMapLayerToTileMap(u16* tileMap, MapLayer* mapLayer);
|
||||
void RenderMapLayerToSubTileMap(u16* subTileMap, MapLayer* mapLayer);
|
||||
|
||||
u32 GetMetaTileSetIndexForSpecialTile(u32 position, u32 data);
|
||||
u32 GetTileSetIndexForSpecialTile(u32 position, u32 tileIndex);
|
||||
|
||||
extern u32 sub_0807BDB8(Entity* this, u32 param_2);
|
||||
extern void sub_0804B388(u32 a1, u32 a2);
|
||||
|
|
@ -202,7 +202,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
index = sub_0807BDB8(&gPlayerEntity.base, direction >> 2);
|
||||
if (index != 0xff && (gRoomControls.scroll_flags & 4) == 0) {
|
||||
ptr1 = &gUnk_080B4490[index * 2];
|
||||
if (GetCollisionDataAtMetaTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr1[0], -ptr1[1]),
|
||||
if (GetCollisionDataAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr1[0], -ptr1[1]),
|
||||
gPlayerEntity.base.collisionLayer) == COLLISION_DATA_255) {
|
||||
if ((((gPlayerState.flags & (PL_FLAGS10000 | PL_FLAGS2)) != 0) ||
|
||||
((gPlayerState.sword_state & 0x10) != 0)) ||
|
||||
|
|
@ -220,9 +220,9 @@ u32 UpdatePlayerCollision(void) {
|
|||
mapLayer = GetLayerByIndex(gPlayerEntity.base.collisionLayer);
|
||||
ptr1 = &gUnk_080B4468[gPlayerEntity.base.animationState & 6];
|
||||
position = COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr1[0], -ptr1[1]);
|
||||
tileType = GetMetaTileType(position, gPlayerEntity.base.collisionLayer);
|
||||
tileType = GetTileType(position, gPlayerEntity.base.collisionLayer);
|
||||
if (tileType < 0x4000) {
|
||||
direction = GetVvvForMetaTileType(tileType);
|
||||
direction = GetVvvForTileType(tileType);
|
||||
} else {
|
||||
direction = tileType;
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
animationState2 = animationState1 & 0xff;
|
||||
|
||||
switch (direction) {
|
||||
case SPECIAL_META_TILE_0:
|
||||
case SPECIAL_TILE_0:
|
||||
if (sub_0801A458(mapLayer, position, 2) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
if ((gPlayerEntity.base.direction & DIR_NOT_MOVING_CHECK) != 0) {
|
||||
return 0;
|
||||
}
|
||||
if (GetCollisionDataAtMetaTilePos(position, gPlayerEntity.base.collisionLayer) != COLLISION_DATA_15) {
|
||||
if (GetCollisionDataAtTilePos(position, gPlayerEntity.base.collisionLayer) != COLLISION_DATA_15) {
|
||||
return 0;
|
||||
}
|
||||
if (sub_08079778() == 0) {
|
||||
|
|
@ -281,12 +281,12 @@ u32 UpdatePlayerCollision(void) {
|
|||
}
|
||||
sub_08078AC0(4, 0, 1);
|
||||
return 0;
|
||||
case SPECIAL_META_TILE_27:
|
||||
case SPECIAL_TILE_27:
|
||||
if (sub_0801A2B0(mapLayer, position, 0xb) == 0) {
|
||||
return 0;
|
||||
}
|
||||
// Start moving the boulder.
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_28 + (gPlayerEntity.base.animationState / 2);
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_28 + (gPlayerEntity.base.animationState / 2);
|
||||
gPlayerState.pushedObject = 0xa0;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
gPlayerState.flags |= PL_BUSY;
|
||||
|
|
@ -306,7 +306,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
return 0;
|
||||
case VVV_58:
|
||||
case VVV_91:
|
||||
case SPECIAL_META_TILE_81:
|
||||
case SPECIAL_TILE_81:
|
||||
if (gPlayerState.flags & PL_MINISH) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -346,7 +346,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
sub_0804B388(position, gPlayerEntity.base.collisionLayer);
|
||||
return 2;
|
||||
case VVV_61:
|
||||
case SPECIAL_META_TILE_64 ... SPECIAL_META_TILE_72:
|
||||
case SPECIAL_TILE_64 ... SPECIAL_TILE_72:
|
||||
if ((gPlayerState.flags & PL_DRUGGED) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -374,14 +374,14 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.zVelocity = 0x20000;
|
||||
COLLISION_OFF(&gPlayerEntity.base);
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_11:
|
||||
case SPECIAL_TILE_11:
|
||||
if (sub_0801A2B0(mapLayer, position, 8) == 0) {
|
||||
return 0;
|
||||
}
|
||||
if ((gPlayerEntity.base.collisionLayer == 3) && (gMapTop.mapData[position] == SPECIAL_META_TILE_11)) {
|
||||
gMapTop.mapData[position] = SPECIAL_META_TILE_12 + (gPlayerEntity.base.animationState >> 1);
|
||||
if ((gPlayerEntity.base.collisionLayer == 3) && (gMapTop.mapData[position] == SPECIAL_TILE_11)) {
|
||||
gMapTop.mapData[position] = SPECIAL_TILE_12 + (gPlayerEntity.base.animationState >> 1);
|
||||
} else {
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_12 + (gPlayerEntity.base.animationState >> 1);
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_12 + (gPlayerEntity.base.animationState >> 1);
|
||||
}
|
||||
gPlayerState.pushedObject = 0xa0;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
|
|
@ -390,12 +390,12 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.y.HALF.LO = 0;
|
||||
gPlayerEntity.base.direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_90:
|
||||
case SPECIAL_TILE_90:
|
||||
if (sub_0801A2B0(mapLayer, position, 2) == 0) {
|
||||
return 0;
|
||||
}
|
||||
// Move ice block.
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_91 + (gPlayerEntity.base.animationState >> 1);
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_91 + (gPlayerEntity.base.animationState >> 1);
|
||||
gPlayerState.pushedObject = 0x98;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
gPlayerState.flags |= PL_BUSY;
|
||||
|
|
@ -403,11 +403,11 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.y.HALF.LO = 0;
|
||||
gPlayerEntity.base.direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_54:
|
||||
case SPECIAL_TILE_54:
|
||||
if (sub_0801A2B0(mapLayer, position, 0xb) == 0) {
|
||||
return 0;
|
||||
}
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_55 + (gPlayerEntity.base.animationState >> 1);
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_55 + (gPlayerEntity.base.animationState >> 1);
|
||||
gPlayerState.pushedObject = 0xa0;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
gPlayerState.flags |= PL_BUSY;
|
||||
|
|
@ -415,7 +415,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.y.HALF.LO = 0;
|
||||
gPlayerEntity.base.direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_62:
|
||||
case SPECIAL_TILE_62:
|
||||
if ((animationState1 & 0xff) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -425,7 +425,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
if ((gPlayerEntity.base.frame & 2) == 0) {
|
||||
return 0;
|
||||
}
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_63;
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_63;
|
||||
gPlayerState.pushedObject = 0x82;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
gPlayerState.flags |= PL_BUSY;
|
||||
|
|
@ -474,9 +474,9 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.y.HALF.LO = 0;
|
||||
gPlayerEntity.base.direction = pushedBlock->direction;
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_43 ... SPECIAL_META_TILE_45:
|
||||
case SPECIAL_TILE_43 ... SPECIAL_TILE_45:
|
||||
if (sub_0801A370(mapLayer, position) != 0) {
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_48 + ((gPlayerEntity.base.animationState & 4) >> 2);
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_48 + ((gPlayerEntity.base.animationState & 4) >> 2);
|
||||
if ((gPlayerState.flags & PL_MINISH) != 0) {
|
||||
gPlayerState.pushedObject = 0xa0;
|
||||
} else {
|
||||
|
|
@ -491,11 +491,11 @@ u32 UpdatePlayerCollision(void) {
|
|||
} else {
|
||||
return 0;
|
||||
}
|
||||
case SPECIAL_META_TILE_74:
|
||||
case SPECIAL_TILE_74:
|
||||
if (sub_0801A458(mapLayer, position, 8) == 0) {
|
||||
return 0;
|
||||
}
|
||||
mapLayer->mapData[position] = SPECIAL_META_TILE_75 + (gPlayerEntity.base.animationState >> 1);
|
||||
mapLayer->mapData[position] = SPECIAL_TILE_75 + (gPlayerEntity.base.animationState >> 1);
|
||||
if ((gPlayerState.flags & PL_MINISH) != 0) {
|
||||
gPlayerState.pushedObject = 0xc0;
|
||||
} else {
|
||||
|
|
@ -507,22 +507,22 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.y.HALF.LO = 0;
|
||||
gPlayerEntity.base.direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_82:
|
||||
case SPECIAL_TILE_82:
|
||||
if (gPlayerState.field_0x35 != 0) {
|
||||
return 0;
|
||||
}
|
||||
SetMetaTile(SPECIAL_META_TILE_84, position, gPlayerEntity.base.collisionLayer);
|
||||
SetTile(SPECIAL_TILE_84, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
case SPECIAL_META_TILE_83:
|
||||
case SPECIAL_TILE_83:
|
||||
if (gPlayerState.field_0x35 != 6) {
|
||||
return 0;
|
||||
}
|
||||
SetMetaTile(SPECIAL_META_TILE_84, position, gPlayerEntity.base.collisionLayer);
|
||||
SetTile(SPECIAL_TILE_84, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
case SPECIAL_META_TILE_85:
|
||||
case SPECIAL_TILE_85:
|
||||
position--;
|
||||
// fallthrough
|
||||
case SPECIAL_META_TILE_86:
|
||||
case SPECIAL_TILE_86:
|
||||
if (gPlayerState.field_0x35 != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -531,15 +531,15 @@ u32 UpdatePlayerCollision(void) {
|
|||
}
|
||||
for (index = 0; index < 3; index++) {
|
||||
if (sub_0801A8D0(gPlayerClones[index], 0) == position) {
|
||||
SetMetaTile(SPECIAL_META_TILE_89, position, gPlayerEntity.base.collisionLayer);
|
||||
SetTile(SPECIAL_TILE_89, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case SPECIAL_META_TILE_87:
|
||||
case SPECIAL_TILE_87:
|
||||
position -= 0x40;
|
||||
// fallthrough
|
||||
case SPECIAL_META_TILE_88:
|
||||
case SPECIAL_TILE_88:
|
||||
if (gPlayerState.field_0x35 != 6) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -548,12 +548,12 @@ u32 UpdatePlayerCollision(void) {
|
|||
}
|
||||
for (index = 0; index < 3; index++) {
|
||||
if (sub_0801A8D0(gPlayerClones[index], 6) == position) {
|
||||
SetMetaTile(SPECIAL_META_TILE_89, position, gPlayerEntity.base.collisionLayer);
|
||||
SetTile(SPECIAL_TILE_89, position, gPlayerEntity.base.collisionLayer);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case SPECIAL_META_TILE_95:
|
||||
case SPECIAL_TILE_95:
|
||||
animationState3 = 2;
|
||||
animationState3 &= animationState1;
|
||||
if (animationState3 == 0) {
|
||||
|
|
@ -565,7 +565,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
if ((gPlayerEntity.base.frame & 1) == 0) {
|
||||
return 0;
|
||||
}
|
||||
SetMetaTile(SPECIAL_META_TILE_116, position, gPlayerEntity.base.collisionLayer);
|
||||
SetTile(SPECIAL_TILE_116, position, gPlayerEntity.base.collisionLayer);
|
||||
gPlayerState.pushedObject = 0xa0;
|
||||
gPlayerState.queued_action = PLAYER_PUSH;
|
||||
gPlayerState.flags |= PL_BUSY;
|
||||
|
|
@ -573,7 +573,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
gPlayerEntity.base.y.HALF.LO = 0;
|
||||
gPlayerEntity.base.direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
|
||||
return 1;
|
||||
case SPECIAL_META_TILE_125:
|
||||
case SPECIAL_TILE_125:
|
||||
animationState3 = gPlayerEntity.base.animationState;
|
||||
if ((animationState2) != 4) {
|
||||
return 0;
|
||||
|
|
@ -584,8 +584,8 @@ u32 UpdatePlayerCollision(void) {
|
|||
if ((gPlayerEntity.base.frame & 1) == 0) {
|
||||
return 0;
|
||||
}
|
||||
SetMetaTile(SPECIAL_META_TILE_116, position, gPlayerEntity.base.collisionLayer);
|
||||
SetVvvAtMetaTilePos(VVV_13, position, gPlayerEntity.base.collisionLayer);
|
||||
SetTile(SPECIAL_TILE_116, position, gPlayerEntity.base.collisionLayer);
|
||||
SetVvvAtTilePos(VVV_13, position, gPlayerEntity.base.collisionLayer);
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
|
|
@ -602,7 +602,7 @@ bool32 sub_0801A2B0(MapLayer* mapLayer, u32 position, u32 collisionType) {
|
|||
if ((((gPlayerState.field_0x35 | gPlayerState.direction) & DIR_NOT_MOVING_CHECK) == 0) &&
|
||||
((gPlayerEntity.base.frame & 1) != 0)) {
|
||||
position = (u16)(position - (-uVar1)); // necessary for match
|
||||
temp4 = GetVvvForMetaTileType(GetMetaTileType(position, gPlayerEntity.base.collisionLayer));
|
||||
temp4 = GetVvvForTileType(GetTileType(position, gPlayerEntity.base.collisionLayer));
|
||||
switch (temp4) {
|
||||
case 0x52:
|
||||
break;
|
||||
|
|
@ -643,18 +643,18 @@ bool32 sub_0801A370(MapLayer* mapLayer, u32 position) {
|
|||
topLayer = GetLayerByIndex(LAYER_TOP);
|
||||
offset = gUnk_080B4488[gPlayerEntity.base.animationState >> 1];
|
||||
pos = position + offset;
|
||||
tileType = GetMetaTileType(pos, gPlayerEntity.base.collisionLayer);
|
||||
tileType = GetTileType(pos, gPlayerEntity.base.collisionLayer);
|
||||
switch (tileType) {
|
||||
case SPECIAL_META_TILE_43:
|
||||
case SPECIAL_TILE_43:
|
||||
pos += offset;
|
||||
break;
|
||||
case SPECIAL_META_TILE_44 ... SPECIAL_META_TILE_47:
|
||||
case SPECIAL_TILE_44 ... SPECIAL_TILE_47:
|
||||
return TRUE;
|
||||
}
|
||||
if (topLayer->collisionData[pos - 0x80] == 0x46) {
|
||||
return FALSE;
|
||||
}
|
||||
switch ((u16)GetVvvForMetaTileType(GetMetaTileType(pos, gPlayerEntity.base.collisionLayer))) {
|
||||
switch ((u16)GetVvvForTileType(GetTileType(pos, gPlayerEntity.base.collisionLayer))) {
|
||||
case 0x52:
|
||||
return FALSE;
|
||||
case 0x26:
|
||||
|
|
@ -690,8 +690,8 @@ bool32 sub_0801A458(MapLayer* mapLayer, u32 position, u32 collisionType) {
|
|||
s32 offset = gUnk_080B4488[gPlayerEntity.base.animationState >> 1];
|
||||
if (sub_0801A4F8()) {
|
||||
pos = position + offset;
|
||||
tileType = GetMetaTileType(pos, gPlayerEntity.base.collisionLayer);
|
||||
switch (GetVvvForMetaTileType(tileType)) {
|
||||
tileType = GetTileType(pos, gPlayerEntity.base.collisionLayer);
|
||||
switch (GetVvvForTileType(tileType)) {
|
||||
case 0x52:
|
||||
case 0x26:
|
||||
case 0x27:
|
||||
|
|
@ -744,14 +744,14 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
u32 position;
|
||||
u32 index1;
|
||||
u32 index2;
|
||||
u16* metatileTypes;
|
||||
u16* tileTypes;
|
||||
u8* collisionData;
|
||||
|
||||
if (this == NULL) {
|
||||
return 0xffff;
|
||||
}
|
||||
layer = GetLayerByIndex(this->collisionLayer);
|
||||
metatileTypes = layer->metatileTypes;
|
||||
tileTypes = layer->tileTypes;
|
||||
index1 = 4;
|
||||
index2 = 2;
|
||||
switch (this->animationState >> 1) {
|
||||
|
|
@ -759,7 +759,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
default:
|
||||
position = COORD_TO_TILE_OFFSET(this, 0, 10);
|
||||
do {
|
||||
if (metatileTypes[layer->mapData[position]] == 0x370)
|
||||
if (tileTypes[layer->mapData[position]] == 0x370)
|
||||
break;
|
||||
position--;
|
||||
index1--;
|
||||
|
|
@ -767,7 +767,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
|
||||
position = position - 0x40;
|
||||
do {
|
||||
if (metatileTypes[layer->mapData[(position)]] != 0x374)
|
||||
if (tileTypes[layer->mapData[(position)]] != 0x374)
|
||||
break;
|
||||
index2++;
|
||||
position -= 0x40;
|
||||
|
|
@ -777,7 +777,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
return position;
|
||||
}
|
||||
|
||||
index1 = GetMetaTileType(position, this->collisionLayer);
|
||||
index1 = GetTileType(position, this->collisionLayer);
|
||||
if ((index1 - 0x369) > 1) {
|
||||
position = 0xffff;
|
||||
} else {
|
||||
|
|
@ -793,7 +793,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
case 1:
|
||||
position = COORD_TO_TILE_OFFSET(this, -10, 0);
|
||||
do {
|
||||
if (layer->metatileTypes[layer->mapData[position]] == 0x370)
|
||||
if (layer->tileTypes[layer->mapData[position]] == 0x370)
|
||||
break;
|
||||
position += 0x40;
|
||||
index1--;
|
||||
|
|
@ -801,7 +801,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
|
||||
position = position - 0x40;
|
||||
do {
|
||||
if (metatileTypes[layer->mapData[(position)]] != 0x374)
|
||||
if (tileTypes[layer->mapData[(position)]] != 0x374)
|
||||
break;
|
||||
index2++;
|
||||
position -= 0x40;
|
||||
|
|
@ -811,7 +811,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
return position;
|
||||
}
|
||||
|
||||
index1 = GetMetaTileType(position, this->collisionLayer);
|
||||
index1 = GetTileType(position, this->collisionLayer);
|
||||
if (!(index1 == 0x369) && !(index1 == 0x36d))
|
||||
position = 0xffff;
|
||||
else {
|
||||
|
|
@ -827,7 +827,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
case 2:
|
||||
position = COORD_TO_TILE_OFFSET(this, 0, -10);
|
||||
do {
|
||||
if (layer->metatileTypes[layer->mapData[position]] == 0x36f)
|
||||
if (layer->tileTypes[layer->mapData[position]] == 0x36f)
|
||||
break;
|
||||
position++;
|
||||
index1--;
|
||||
|
|
@ -835,7 +835,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
|
||||
position = position - 1;
|
||||
do {
|
||||
if (metatileTypes[layer->mapData[position]] != 0x372)
|
||||
if (tileTypes[layer->mapData[position]] != 0x372)
|
||||
break;
|
||||
index2++;
|
||||
position--;
|
||||
|
|
@ -845,7 +845,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
return position;
|
||||
}
|
||||
|
||||
index1 = GetMetaTileType(position, this->collisionLayer);
|
||||
index1 = GetTileType(position, this->collisionLayer);
|
||||
if (!(index1 == 0x369) && !(index1 == 0x36b))
|
||||
position = 0xffff;
|
||||
else {
|
||||
|
|
@ -861,7 +861,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
case 3:
|
||||
position = COORD_TO_TILE_OFFSET(this, 10, 0);
|
||||
do {
|
||||
if (layer->metatileTypes[layer->mapData[position]] == 0x36f)
|
||||
if (layer->tileTypes[layer->mapData[position]] == 0x36f)
|
||||
break;
|
||||
position -= 0x40;
|
||||
index1--;
|
||||
|
|
@ -869,7 +869,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
|
||||
position = position - 1;
|
||||
do {
|
||||
if (metatileTypes[layer->mapData[position]] != 0x372)
|
||||
if (tileTypes[layer->mapData[position]] != 0x372)
|
||||
break;
|
||||
index2++;
|
||||
position--;
|
||||
|
|
@ -879,7 +879,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
return position;
|
||||
}
|
||||
|
||||
index1 = GetMetaTileType(position, this->collisionLayer);
|
||||
index1 = GetTileType(position, this->collisionLayer);
|
||||
if (!(index1 == 0x369) && !(index1 == 0x36c))
|
||||
position = 0xffff;
|
||||
else {
|
||||
|
|
@ -900,7 +900,7 @@ u32 sub_0801A570(Entity* this, u32 param_2) {
|
|||
|
||||
u32 sub_0801A8D0(Entity* this, u32 param_2) {
|
||||
u16* mapData;
|
||||
u32 tile;
|
||||
u32 tileIndex;
|
||||
u32 position;
|
||||
|
||||
if (this == NULL)
|
||||
|
|
@ -909,20 +909,20 @@ u32 sub_0801A8D0(Entity* this, u32 param_2) {
|
|||
mapData = GetLayerByIndex(this->collisionLayer)->mapData;
|
||||
if (param_2 == 0) {
|
||||
position = COORD_TO_TILE_OFFSET(this, 0, 8);
|
||||
tile = mapData[position];
|
||||
if (tile == SPECIAL_META_TILE_85) {
|
||||
tileIndex = mapData[position];
|
||||
if (tileIndex == SPECIAL_TILE_85) {
|
||||
return position - 1;
|
||||
}
|
||||
if (tile == SPECIAL_META_TILE_86) {
|
||||
if (tileIndex == SPECIAL_TILE_86) {
|
||||
return position;
|
||||
}
|
||||
} else {
|
||||
position = COORD_TO_TILE_OFFSET(this, 8, 0);
|
||||
tile = mapData[position];
|
||||
if (tile == SPECIAL_META_TILE_87) {
|
||||
tileIndex = mapData[position];
|
||||
if (tileIndex == SPECIAL_TILE_87) {
|
||||
return position - 0x40;
|
||||
}
|
||||
if (tile == SPECIAL_META_TILE_88) {
|
||||
if (tileIndex == SPECIAL_TILE_88) {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
|
|
@ -935,9 +935,9 @@ bool32 sub_0801A980(void) {
|
|||
GetLayerByIndex(gPlayerEntity.base.collisionLayer); // TODO result unused?
|
||||
ptr = &gUnk_080B44A8[gPlayerEntity.base.animationState & 6];
|
||||
tileType =
|
||||
GetMetaTileType(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), gPlayerEntity.base.collisionLayer);
|
||||
GetTileType(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), gPlayerEntity.base.collisionLayer);
|
||||
if (tileType < 0x4000) {
|
||||
GetVvvForMetaTileType(tileType);
|
||||
GetVvvForTileType(tileType);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1006,99 +1006,99 @@ bool32 sub_0801AA58(Entity* this, u32 param_2, u32 param_3) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void RenderMapLayerToTileMap(u16* tileMap, MapLayer* mapLayer) {
|
||||
void RenderMapLayerToSubTileMap(u16* subTileMap, MapLayer* mapLayer) {
|
||||
u16* tiles;
|
||||
u16* mapData;
|
||||
u16* mapDataOriginal;
|
||||
u16 metaTileY;
|
||||
u16 metaTileX;
|
||||
u32 metaTilePositionAndLayer;
|
||||
u16 tileY;
|
||||
u16 tileX;
|
||||
u32 tilePosAndLayer;
|
||||
u32 layerIndex;
|
||||
// Index into the metatileset at MapLayer.metatiles
|
||||
u32 metaTileSetIndex;
|
||||
// Index into the tileset at MapLayer.tiles
|
||||
u32 tileSetIndex;
|
||||
|
||||
if (mapLayer == &gMapBottom) {
|
||||
layerIndex = 1;
|
||||
} else {
|
||||
layerIndex = 2;
|
||||
}
|
||||
metaTilePositionAndLayer = layerIndex << 0xc;
|
||||
tilePosAndLayer = layerIndex << 0xc;
|
||||
mapDataOriginal = mapLayer->mapDataOriginal;
|
||||
mapData = mapLayer->mapData;
|
||||
|
||||
for (metaTileY = 0; metaTileY < 0x40; metaTileY++) {
|
||||
for (metaTileX = 0; metaTileX < 0x10; metaTileX++) {
|
||||
for (tileY = 0; tileY < 0x40; tileY++) {
|
||||
for (tileX = 0; tileX < 0x10; tileX++) {
|
||||
// inner loop seems to be unrolled four times for some reason?
|
||||
|
||||
if (mapData[0] < 0x4000) {
|
||||
metaTileSetIndex = mapData[0] * 4;
|
||||
tileSetIndex = mapData[0] * 4;
|
||||
} else {
|
||||
metaTileSetIndex = GetMetaTileSetIndexForSpecialTile(metaTilePositionAndLayer, mapDataOriginal[0]);
|
||||
tileSetIndex = GetTileSetIndexForSpecialTile(tilePosAndLayer, mapDataOriginal[0]);
|
||||
}
|
||||
tiles = mapLayer->metatiles + metaTileSetIndex;
|
||||
tileMap[0] = tiles[0];
|
||||
tileMap[1] = tiles[1];
|
||||
tileMap[0x80 + 0] = tiles[2];
|
||||
tileMap[0x80 + 1] = tiles[3];
|
||||
tileMap += 2;
|
||||
tiles = mapLayer->tiles + tileSetIndex;
|
||||
subTileMap[0] = tiles[0];
|
||||
subTileMap[1] = tiles[1];
|
||||
subTileMap[0x80 + 0] = tiles[2];
|
||||
subTileMap[0x80 + 1] = tiles[3];
|
||||
subTileMap += 2;
|
||||
|
||||
if (mapData[1] < 0x4000) {
|
||||
metaTileSetIndex = mapData[1] * 4;
|
||||
tileSetIndex = mapData[1] * 4;
|
||||
} else {
|
||||
metaTileSetIndex = GetMetaTileSetIndexForSpecialTile(metaTilePositionAndLayer + 1, mapDataOriginal[1]);
|
||||
tileSetIndex = GetTileSetIndexForSpecialTile(tilePosAndLayer + 1, mapDataOriginal[1]);
|
||||
}
|
||||
tiles = mapLayer->metatiles + metaTileSetIndex;
|
||||
tileMap[0] = tiles[0];
|
||||
tileMap[1] = tiles[1];
|
||||
tileMap[0x80 + 0] = tiles[2];
|
||||
tileMap[0x80 + 1] = tiles[3];
|
||||
tileMap += 2;
|
||||
tiles = mapLayer->tiles + tileSetIndex;
|
||||
subTileMap[0] = tiles[0];
|
||||
subTileMap[1] = tiles[1];
|
||||
subTileMap[0x80 + 0] = tiles[2];
|
||||
subTileMap[0x80 + 1] = tiles[3];
|
||||
subTileMap += 2;
|
||||
|
||||
if (mapData[2] < 0x4000) {
|
||||
metaTileSetIndex = mapData[2] * 4;
|
||||
tileSetIndex = mapData[2] * 4;
|
||||
} else {
|
||||
metaTileSetIndex = GetMetaTileSetIndexForSpecialTile(metaTilePositionAndLayer + 2, mapDataOriginal[2]);
|
||||
tileSetIndex = GetTileSetIndexForSpecialTile(tilePosAndLayer + 2, mapDataOriginal[2]);
|
||||
}
|
||||
tiles = mapLayer->metatiles + metaTileSetIndex;
|
||||
tileMap[0] = tiles[0];
|
||||
tileMap[1] = tiles[1];
|
||||
tileMap[0x80 + 0] = tiles[2];
|
||||
tileMap[0x80 + 1] = tiles[3];
|
||||
tileMap += 2;
|
||||
tiles = mapLayer->tiles + tileSetIndex;
|
||||
subTileMap[0] = tiles[0];
|
||||
subTileMap[1] = tiles[1];
|
||||
subTileMap[0x80 + 0] = tiles[2];
|
||||
subTileMap[0x80 + 1] = tiles[3];
|
||||
subTileMap += 2;
|
||||
|
||||
if (mapData[3] < 0x4000) {
|
||||
metaTileSetIndex = mapData[3] * 4;
|
||||
tileSetIndex = mapData[3] * 4;
|
||||
} else {
|
||||
metaTileSetIndex = GetMetaTileSetIndexForSpecialTile(metaTilePositionAndLayer + 3, mapDataOriginal[3]);
|
||||
tileSetIndex = GetTileSetIndexForSpecialTile(tilePosAndLayer + 3, mapDataOriginal[3]);
|
||||
}
|
||||
tiles = mapLayer->metatiles + metaTileSetIndex;
|
||||
tileMap[0] = tiles[0];
|
||||
tileMap[1] = tiles[1];
|
||||
tileMap[0x80 + 0] = tiles[2];
|
||||
tileMap[0x80 + 1] = tiles[3];
|
||||
tileMap += 2;
|
||||
tiles = mapLayer->tiles + tileSetIndex;
|
||||
subTileMap[0] = tiles[0];
|
||||
subTileMap[1] = tiles[1];
|
||||
subTileMap[0x80 + 0] = tiles[2];
|
||||
subTileMap[0x80 + 1] = tiles[3];
|
||||
subTileMap += 2;
|
||||
|
||||
mapData += 4;
|
||||
mapDataOriginal += 4;
|
||||
metaTilePositionAndLayer = (u16)(metaTilePositionAndLayer + 4);
|
||||
tilePosAndLayer = (u16)(tilePosAndLayer + 4);
|
||||
}
|
||||
tileMap = tileMap + 0x80;
|
||||
subTileMap = subTileMap + 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetMetaTileSetIndexForSpecialTile(u32 metaTilePosAndLayer, u32 mapDataClone) {
|
||||
u32 GetTileSetIndexForSpecialTile(u32 tilePosAndLayer, u32 tileIndex) {
|
||||
u32 index;
|
||||
SpecialTileEntry* ptr;
|
||||
u32 count;
|
||||
|
||||
ptr = gMetaTilesForSpecialTiles;
|
||||
ptr = gTilesForSpecialTiles;
|
||||
count = gRoomVars.tileEntityCount;
|
||||
for (index = 0; index < count; ptr++, index++) {
|
||||
if (metaTilePosAndLayer == ptr->metaTilePosAndLayer) {
|
||||
return ptr->metaTileIndex * 4;
|
||||
if (tilePosAndLayer == ptr->tilePosAndLayer) {
|
||||
return ptr->tileIndex * 4;
|
||||
}
|
||||
}
|
||||
return mapDataClone * 4;
|
||||
return tileIndex * 4;
|
||||
}
|
||||
|
||||
void sub_0801AC98(void) {
|
||||
|
|
@ -1116,7 +1116,7 @@ void sub_0801AC98(void) {
|
|||
for (indexY = 0; indexY < height; indexY++) {
|
||||
for (indexX = 0; indexX < width; indexX++, position++) {
|
||||
for (ptr = gUnk_080B44C0; ptr->tileType != 0xffff; ptr++) {
|
||||
if (ptr->tileType == GetMetaTileType(position, 1)) {
|
||||
if (ptr->tileType == GetTileType(position, 1)) {
|
||||
if (gUnk_080B44B8[ptr->unk_a] != 0) {
|
||||
sub_0801AD6C(ptr, position);
|
||||
break;
|
||||
|
|
@ -1125,7 +1125,7 @@ void sub_0801AC98(void) {
|
|||
}
|
||||
|
||||
for (ptr = gUnk_080B44C2; ptr->tileType != 0xffff; ptr++) {
|
||||
if (ptr->tileType == GetMetaTileType(position, 2)) {
|
||||
if (ptr->tileType == GetTileType(position, 2)) {
|
||||
if (gUnk_080B44B8[ptr->unk_a] != 0) {
|
||||
sub_0801AD6C(ptr, position);
|
||||
break;
|
||||
|
|
@ -1137,7 +1137,7 @@ void sub_0801AC98(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0801AD6C(const Data* param_1, u32 tilePosition) {
|
||||
void sub_0801AD6C(const Data* param_1, u32 tilePos) {
|
||||
Entity* entity;
|
||||
Manager* manager;
|
||||
s32 tmpX1;
|
||||
|
|
@ -1152,9 +1152,9 @@ void sub_0801AD6C(const Data* param_1, u32 tilePosition) {
|
|||
entity->id = (u8)param_1->id;
|
||||
entity->type = (u8)param_1->type;
|
||||
entity->type2 = (u8)param_1->type2;
|
||||
tmpX1 = ((u16)tilePosition & 0x3f) * 0x10 + 8;
|
||||
tmpX1 = ((u16)tilePos & 0x3f) * 0x10 + 8;
|
||||
entity->x.HALF.HI = tmpX1 + gRoomControls.origin_x;
|
||||
tmpY1 = (s16)((tilePosition & 0xfc0) >> 2) + 8;
|
||||
tmpY1 = (s16)((tilePos & 0xfc0) >> 2) + 8;
|
||||
entity->y.HALF.HI = tmpY1 + gRoomControls.origin_y;
|
||||
entity->collisionLayer = 0;
|
||||
ResolveCollisionLayer(entity);
|
||||
|
|
@ -1168,9 +1168,9 @@ void sub_0801AD6C(const Data* param_1, u32 tilePosition) {
|
|||
manager->type = (u8)param_1->type;
|
||||
manager->type2 = (u8)param_1->type2;
|
||||
// TODO are these fields common for all managers or does this usually create managers of certain types?
|
||||
tmpX2 = ((u16)tilePosition & 0x3f) * 0x10 + 8;
|
||||
tmpX2 = ((u16)tilePos & 0x3f) * 0x10 + 8;
|
||||
*(u16*)(&manager[1].timer + 10) = tmpX2 + gRoomControls.origin_x;
|
||||
tmpY2 = (s16)((tilePosition & 0xfc0) >> 2) + 8;
|
||||
tmpY2 = (s16)((tilePos & 0xfc0) >> 2) + 8;
|
||||
*(u16*)(&manager[1].timer + 12) = tmpY2 + gRoomControls.origin_y;
|
||||
AppendEntityToList((Entity*)manager, gEntityListLUT[manager->kind]);
|
||||
}
|
||||
|
|
@ -1210,10 +1210,10 @@ void sub_0801AE44(bool32 loadGfx) {
|
|||
}
|
||||
if ((gRoomControls.scroll_flags & 1) == 0) {
|
||||
if (gMapBottom.bgSettings != NULL) {
|
||||
RenderMapLayerToTileMap(gMapDataBottomSpecial, &gMapBottom);
|
||||
RenderMapLayerToSubTileMap(gMapDataBottomSpecial, &gMapBottom);
|
||||
}
|
||||
if (gMapTop.bgSettings != NULL) {
|
||||
RenderMapLayerToTileMap(gMapDataTopSpecial, &gMapTop);
|
||||
RenderMapLayerToSubTileMap(gMapDataTopSpecial, &gMapTop);
|
||||
}
|
||||
} else {
|
||||
sub_0807C4F8();
|
||||
|
|
@ -1222,34 +1222,34 @@ void sub_0801AE44(bool32 loadGfx) {
|
|||
}
|
||||
|
||||
void SetMultipleTiles(const TileData* tileData, u32 basePosition, u32 layer) {
|
||||
while (tileData->tile != -1) {
|
||||
SetMetaTile((u16)tileData->tile, basePosition + tileData->position, layer);
|
||||
while (tileData->tileIndex != -1) {
|
||||
SetTile((u16)tileData->tileIndex, basePosition + tileData->tilePosOffset, layer);
|
||||
tileData++;
|
||||
}
|
||||
}
|
||||
|
||||
// Add a new entry at the end of gMetaTilesForSpecialTiles
|
||||
void RegisterInteractTile(u32 metaTileIndex, u32 metaTilePos, u32 layer) {
|
||||
// Add a new entry at the end of gTilesForSpecialTiles
|
||||
void RegisterInteractTile(u32 tileIndex, u32 tilePos, u32 layer) {
|
||||
u32 index;
|
||||
if ((metaTileIndex < 0x4000) && (gRoomTransition.field30 == 0)) {
|
||||
if ((tileIndex < 0x4000) && (gRoomTransition.field30 == 0)) {
|
||||
index = gRoomVars.tileEntityCount;
|
||||
if (index < 0x100) {
|
||||
gMetaTilesForSpecialTiles[index].metaTileIndex = metaTileIndex;
|
||||
gMetaTilesForSpecialTiles[index].metaTilePosAndLayer = (layer << 12) | metaTilePos;
|
||||
gTilesForSpecialTiles[index].tileIndex = tileIndex;
|
||||
gTilesForSpecialTiles[index].tilePosAndLayer = (layer << 12) | tilePos;
|
||||
gRoomVars.tileEntityCount = index + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UnregisterInteractTile(u32 metaTilePos, s32 layer) {
|
||||
void UnregisterInteractTile(u32 tilePos, s32 layer) {
|
||||
u32 count;
|
||||
SpecialTileEntry* ptr;
|
||||
u32 metaTilePosAndLayer;
|
||||
u32 tilePosAndLayer;
|
||||
u32 t;
|
||||
|
||||
layer = layer << 12;
|
||||
metaTilePosAndLayer = metaTilePos | layer;
|
||||
ptr = gMetaTilesForSpecialTiles;
|
||||
tilePosAndLayer = tilePos | layer;
|
||||
ptr = gTilesForSpecialTiles;
|
||||
count = gRoomVars.tileEntityCount;
|
||||
t = 0;
|
||||
|
||||
|
|
@ -1257,13 +1257,13 @@ void UnregisterInteractTile(u32 metaTilePos, s32 layer) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (metaTilePosAndLayer == ptr->metaTilePosAndLayer) {
|
||||
if (tilePosAndLayer == ptr->tilePosAndLayer) {
|
||||
count--;
|
||||
gRoomVars.tileEntityCount = count;
|
||||
ptr[0] = ptr[count];
|
||||
return;
|
||||
}
|
||||
while (metaTilePosAndLayer != ptr->metaTilePosAndLayer) {
|
||||
while (tilePosAndLayer != ptr->tilePosAndLayer) {
|
||||
ptr++;
|
||||
t++;
|
||||
if (t >= count) {
|
||||
|
|
@ -1272,15 +1272,15 @@ void UnregisterInteractTile(u32 metaTilePos, s32 layer) {
|
|||
}
|
||||
count--;
|
||||
gRoomVars.tileEntityCount = count;
|
||||
ptr = gMetaTilesForSpecialTiles;
|
||||
ptr = gTilesForSpecialTiles;
|
||||
ptr[t] = ptr[count];
|
||||
}
|
||||
|
||||
const struct_080B44D0 gUnk_080B44D0[] = {
|
||||
{ 0x67, SPECIAL_META_TILE_132 }, { 0x68, SPECIAL_META_TILE_133 },
|
||||
{ 0x69, SPECIAL_META_TILE_134 }, { 0x6a, SPECIAL_META_TILE_135 },
|
||||
{ 0x6b, SPECIAL_META_TILE_136 }, { 0x27, SPECIAL_META_TILE_131 },
|
||||
{ 0x23, SPECIAL_META_TILE_141 }, { 0x0, 0x0 },
|
||||
{ 0x67, SPECIAL_TILE_132 }, { 0x68, SPECIAL_TILE_133 },
|
||||
{ 0x69, SPECIAL_TILE_134 }, { 0x6a, SPECIAL_TILE_135 },
|
||||
{ 0x6b, SPECIAL_TILE_136 }, { 0x27, SPECIAL_TILE_131 },
|
||||
{ 0x23, SPECIAL_TILE_141 }, { 0x0, 0x0 },
|
||||
};
|
||||
|
||||
// used for minish houses, seems to overwrite all tiles with certain collision values on layer 1 for them?
|
||||
|
|
@ -1299,7 +1299,7 @@ void sub_0801AFE4(void) {
|
|||
for (x = 0; x < width; x++) {
|
||||
for (ptr = gUnk_080B44D0; ptr->collision != 0; ptr++) {
|
||||
if (ptr->collision == *collisionData) {
|
||||
SetMetaTile(ptr->tileIndex, y * 0x40 + x, LAYER_BOTTOM);
|
||||
SetTile(ptr->tileIndex, y * 0x40 + x, LAYER_BOTTOM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2826
src/collision.c
2826
src/collision.c
File diff suppressed because it is too large
Load Diff
|
|
@ -503,13 +503,13 @@ void ClearOAM(void) {
|
|||
|
||||
void ResetScreenRegs(void) {
|
||||
MemClear(&gScreen, sizeof(gScreen));
|
||||
gScreen.bg0.tilemap = &gBG0Buffer;
|
||||
gScreen.bg0.subTileMap = &gBG0Buffer;
|
||||
gScreen.bg0.control = 0x1F0C;
|
||||
gScreen.bg1.tilemap = &gBG1Buffer;
|
||||
gScreen.bg1.subTileMap = &gBG1Buffer;
|
||||
gScreen.bg1.control = 0x1C01;
|
||||
gScreen.bg2.tilemap = &gBG2Buffer;
|
||||
gScreen.bg2.subTileMap = &gBG2Buffer;
|
||||
gScreen.bg2.control = 0x1D02;
|
||||
gScreen.bg3.tilemap = &gBG3Buffer;
|
||||
gScreen.bg3.subTileMap = &gBG3Buffer;
|
||||
gScreen.bg3.control = 0x1E03;
|
||||
gScreen.lcd.displayControl = 0x140;
|
||||
gScreen.lcd.displayControlMask = 0xffff;
|
||||
|
|
|
|||
|
|
@ -596,10 +596,10 @@ void sub_08053D34(void) {
|
|||
if (gMenu.field_0xa != 0) {
|
||||
gMenu.field_0xa = 0;
|
||||
if (CheckLocalFlagByBank(FLAG_BANK_7, 0x3d)) {
|
||||
SetMetaTileType(META_TILE_TYPE_116, TILE_POS(4, 3), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_116, TILE_POS(4, 3), LAYER_BOTTOM);
|
||||
}
|
||||
if (CheckLocalFlagByBank(FLAG_BANK_7, 0x3e)) {
|
||||
SetMetaTileType(META_TILE_TYPE_116, TILE_POS(12, 3), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_116, TILE_POS(12, 3), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
if (gFadeControl.active == 0) {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
/*
|
||||
Tiles for the borders of the cave that are loaded during the transition.
|
||||
When the player goes inside a cave during the start of the enter transition the border metatilemap is loaded and at the
|
||||
end the metatilemap for the cave is loaded. When the player goes out of a cave during the start of the leave transition
|
||||
the border metatilemap is loaded and at the end the metatilemap for the outside is loaded.
|
||||
When the player goes inside a cave during the start of the enter transition the border tilemap is loaded and at the
|
||||
end the tilemap for the cave is loaded. When the player goes out of a cave during the start of the leave transition
|
||||
the border tilemap is loaded and at the end the tilemap for the outside is loaded.
|
||||
*/
|
||||
|
||||
const MapDataDefinition gCaveBorder_LakeWoods_enter_start[] = {
|
||||
|
|
|
|||
|
|
@ -403,18 +403,18 @@ void sub_080307D4(ArmosEntity* this) {
|
|||
}
|
||||
|
||||
void sub_080307EC(ArmosEntity* this) {
|
||||
u32 metaTilePos = COORD_TO_TILE(super);
|
||||
this->unk_78 = GetMetaTileIndex(metaTilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, (u32)super->collisionLayer);
|
||||
u32 tilePos = COORD_TO_TILE(super);
|
||||
this->unk_78 = GetTileIndex(tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, (u32)super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08030834(ArmosEntity* this) {
|
||||
SetMetaTile(this->unk_78, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(this->unk_78, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
bool32 sub_0803086C(ArmosEntity* this) {
|
||||
u32 uVar2;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
u16 centerY;
|
||||
u16 centerX;
|
||||
FORCE_REGISTER(u32 r2, r2);
|
||||
|
|
@ -424,10 +424,10 @@ bool32 sub_0803086C(ArmosEntity* this) {
|
|||
centerX = super->x.HALF_U.HI - gRoomControls.origin_x;
|
||||
centerY = super->y.HALF_U.HI - gRoomControls.origin_y;
|
||||
// TODO for some reason the 0x3f of COORD_TO_TILE(super) needs to be forced to r2 here.
|
||||
metaTilePos = ((((((super)->x.HALF.HI) - gRoomControls.origin_x) >> 4) & (r2 = 0x3f)) |
|
||||
tilePos = ((((((super)->x.HALF.HI) - gRoomControls.origin_x) >> 4) & (r2 = 0x3f)) |
|
||||
(((((super)->y.HALF.HI) - gRoomControls.origin_y) >> 4) & r2) << 6);
|
||||
|
||||
if (GetMetaTileType(metaTilePos, super->collisionLayer) == SPECIAL_META_TILE_73) {
|
||||
if (GetTileType(tilePos, super->collisionLayer) == SPECIAL_TILE_73) {
|
||||
if (CheckPlayerInRegion(centerX, centerY, 2, 0xc) != 0) {
|
||||
if (CheckPlayerInRegion(centerX, centerY - 4, 2, 4) != 0) {
|
||||
gPlayerEntity.base.spritePriority.b0 = 3;
|
||||
|
|
@ -436,11 +436,11 @@ bool32 sub_0803086C(ArmosEntity* this) {
|
|||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer);
|
||||
}
|
||||
} else {
|
||||
if (CheckPlayerInRegion(centerX, centerY + 6, 2, 5) != 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_73, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_73, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ void sub_0802AAC0(BombPeahatEntity* this) {
|
|||
super->child = NULL;
|
||||
#ifdef EU
|
||||
} else if (entity->timer == 0) {
|
||||
if (GetCollisionDataAtMetaTilePos(COORD_TO_TILE(super), 1) == 0) {
|
||||
if (GetCollisionDataAtTilePos(COORD_TO_TILE(super), 1) == 0) {
|
||||
if (EntityInRectRadius(super, &gPlayerEntity.base, 0x10, 0x10) && entity->subtimer <= 0x50) {
|
||||
this->unk_81 = 0;
|
||||
}
|
||||
|
|
@ -685,7 +685,7 @@ void sub_0802B204(BombPeahatEntity* this) {
|
|||
|
||||
bool32 sub_0802B234(BombPeahatEntity* this) {
|
||||
bool32 ret = FALSE;
|
||||
if (GetMetaTileTypeByEntity(super) - 0x1c4 > 1)
|
||||
if (GetTileTypeByEntity(super) - 0x1c4 > 1)
|
||||
ret = TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ void BusinessScrub_Action0(BusinessScrubEntity* this) {
|
|||
} else {
|
||||
super->timer = 0;
|
||||
this->unk_76 = COORD_TO_TILE(super);
|
||||
this->unk_74 = GetMetaTileIndex(this->unk_76, super->collisionLayer);
|
||||
this->unk_74 = GetTileIndex(this->unk_76, super->collisionLayer);
|
||||
super->hurtType = 0x41;
|
||||
sub_08028FFC(this);
|
||||
}
|
||||
|
|
@ -444,7 +444,7 @@ void sub_08028FFC(BusinessScrubEntity* this) {
|
|||
super->x.HALF.HI = this->unk_78;
|
||||
super->y.HALF.HI = this->unk_7a;
|
||||
InitializeAnimation(super, 0);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->unk_76, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->unk_76, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08029078(BusinessScrubEntity* this) {
|
||||
|
|
@ -458,7 +458,7 @@ void sub_08029078(BusinessScrubEntity* this) {
|
|||
super->spriteIndex = 0xd0;
|
||||
sub_08028FDC(this);
|
||||
sub_080290E0(this, 1);
|
||||
SetMetaTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ void sub_080262A8(ChuchuBossEntity* this) {
|
|||
gPlayerEntity.base.animationState = 0;
|
||||
gRoomControls.camera_target = super;
|
||||
gRoomControls.scrollSpeed = 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, TILE_POS(8, 11), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, TILE_POS(8, 11), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ void sub_080387F0(CloudPiranhaEntity* this) {
|
|||
const s8* ptr;
|
||||
|
||||
if ((super->action != 4) && (this->unk_82 == 0)) {
|
||||
collisionData = GetCollisionDataAtMetaTilePos(COORD_TO_TILE(super), super->collisionLayer);
|
||||
collisionData = GetCollisionDataAtTilePos(COORD_TO_TILE(super), super->collisionLayer);
|
||||
if ((collisionData == COLLISION_DATA_15) || (collisionData == COLLISION_DATA_42)) {
|
||||
this->unk_82 = 0x20;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void DoorMimic_OnCollision(DoorMimicEntity* this) {
|
|||
}
|
||||
|
||||
void DoorMimic_OnDeath(DoorMimicEntity* this) {
|
||||
SetMetaTile(this->unk_7c, this->unk_7e, super->collisionLayer);
|
||||
SetTile(this->unk_7c, this->unk_7e, super->collisionLayer);
|
||||
CreateFx(super, FX_POT_SHATTER, 0);
|
||||
EnemyDisableRespawn(super);
|
||||
DeleteThisEntity();
|
||||
|
|
@ -125,8 +125,8 @@ void sub_08022198(DoorMimicEntity* this) {
|
|||
void sub_080221C0(DoorMimicEntity* this) {
|
||||
u32 tilePos = COORD_TO_TILE(super) + gUnk_080B4488[super->type2];
|
||||
this->unk_7e = tilePos;
|
||||
this->unk_7c = GetMetaTileIndex(tilePos, super->collisionLayer);
|
||||
SetMetaTile(gUnk_080CB79C[super->type2], tilePos, super->collisionLayer);
|
||||
this->unk_7c = GetTileIndex(tilePos, super->collisionLayer);
|
||||
SetTile(gUnk_080CB79C[super->type2], tilePos, super->collisionLayer);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
|
@ -191,10 +191,10 @@ const PosOffset gUnk_080CB76C[][6] = {
|
|||
};
|
||||
|
||||
const u16 gUnk_080CB79C[] = {
|
||||
SPECIAL_META_TILE_35,
|
||||
SPECIAL_META_TILE_37,
|
||||
SPECIAL_META_TILE_38,
|
||||
SPECIAL_META_TILE_36,
|
||||
SPECIAL_TILE_35,
|
||||
SPECIAL_TILE_37,
|
||||
SPECIAL_TILE_38,
|
||||
SPECIAL_TILE_36,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ void Enemy64_Init(Enemy64Entity* this) {
|
|||
Entity* tail;
|
||||
|
||||
if (CheckFlags(0x7c)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 0), LAYER_TOP);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 1), LAYER_TOP);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 2), LAYER_TOP);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 3), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 0), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 1), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 2), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 3), LAYER_TOP);
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
sub_0807B7D8(0x323, TILE_POS(10, 0), LAYER_BOTTOM);
|
||||
|
|
@ -441,19 +441,19 @@ void Enemy64_Action4_SubAction7(Enemy64Entity* this) {
|
|||
DeleteThisEntity();
|
||||
} else if (super->timer == 16) {
|
||||
sub_0807B7D8(0x36, TILE_POS(10, 3), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 3), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 3), LAYER_TOP);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
} else if (super->timer == 24) {
|
||||
sub_0807B7D8(0x36, TILE_POS(10, 2), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 2), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 2), LAYER_TOP);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
} else if (super->timer == 32) {
|
||||
sub_0807B7D8(0x36, TILE_POS(10, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 1), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 1), LAYER_TOP);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
} else if (super->timer == 40) {
|
||||
sub_0807B7D8(0x36, TILE_POS(10, 0), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_129, TILE_POS(10, 0), LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_129, TILE_POS(10, 0), LAYER_TOP);
|
||||
SoundReq(SFX_HEART_GET);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ typedef struct {
|
|||
extern Entity* sub_08017A90(Entity*, Entity*);
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern const u8 gMapMetaTileTypeToCollisionData[];
|
||||
extern const u8 gMapTileTypeToCollisionData[];
|
||||
|
||||
void sub_08031344(EyegoreEntity*);
|
||||
void sub_08031344(EyegoreEntity*);
|
||||
|
|
@ -327,27 +327,27 @@ void sub_08030E80(EyegoreEntity* this) {
|
|||
}
|
||||
|
||||
void sub_08030F00(EyegoreEntity* this) {
|
||||
u32 metaTilePos = COORD_TO_TILE_OFFSET(super, 8, 20);
|
||||
u16 tileIndex = GetMetaTileIndex(metaTilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
u32 tilePos = COORD_TO_TILE_OFFSET(super, 8, 20);
|
||||
u16 tileIndex = GetTileIndex(tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
this->tileIndex1 = tileIndex;
|
||||
tileIndex = GetMetaTileIndex(metaTilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
tileIndex = GetTileIndex(tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
this->tileIndex2 = tileIndex;
|
||||
tileIndex = GetMetaTileIndex(metaTilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
tileIndex = GetTileIndex(tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
this->tileIndex3 = tileIndex;
|
||||
tileIndex = GetMetaTileIndex(metaTilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
tileIndex = GetTileIndex(tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
this->tileIndex4 = tileIndex;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08030FB4(EyegoreEntity* this) {
|
||||
u32 metaTilePos = COORD_TO_TILE_OFFSET(super, 8, 20);
|
||||
SetMetaTile(this->tileIndex1, metaTilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(this->tileIndex2, metaTilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTile(this->tileIndex3, metaTilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetMetaTile(this->tileIndex4, metaTilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
u32 tilePos = COORD_TO_TILE_OFFSET(super, 8, 20);
|
||||
SetTile(this->tileIndex1, tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(this->tileIndex2, tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTile(this->tileIndex3, tilePos + TILE_POS(0, 1), super->collisionLayer);
|
||||
SetTile(this->tileIndex4, tilePos + TILE_POS(1, 1), super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08031024(EyegoreEntity* this) {
|
||||
|
|
@ -400,12 +400,12 @@ void sub_08031024(EyegoreEntity* this) {
|
|||
}
|
||||
} else {
|
||||
tmp2 = this->unk_7b >> 1;
|
||||
uVar5 = GetMetaTileTypeByPos(super->x.HALF.HI + gUnk_080CE2C0[tmp2],
|
||||
uVar5 = GetTileTypeByPos(super->x.HALF.HI + gUnk_080CE2C0[tmp2],
|
||||
super->y.HALF.HI + gUnk_080CE2C0[tmp2 + 1], super->collisionLayer);
|
||||
uVar8 = GetMetaTileTypeByPos(super->x.HALF.HI + gUnk_080CE2C0[tmp2 + 2],
|
||||
uVar8 = GetTileTypeByPos(super->x.HALF.HI + gUnk_080CE2C0[tmp2 + 2],
|
||||
super->y.HALF.HI + gUnk_080CE2C0[tmp2 + 3], super->collisionLayer);
|
||||
if (!(((gMapMetaTileTypeToCollisionData[uVar5] == 0) &&
|
||||
(gMapMetaTileTypeToCollisionData[uVar8] == 0)) ||
|
||||
if (!(((gMapTileTypeToCollisionData[uVar5] == 0) &&
|
||||
(gMapTileTypeToCollisionData[uVar8] == 0)) ||
|
||||
((this->unk_7b | 1) & 1) == 0)) {
|
||||
if (super->direction >> 3 == super->animationState) {
|
||||
this->unk_78 |= 0x20;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ void sub_0802C4B0(FallingBoulderEntity* this) {
|
|||
u32 index;
|
||||
u32 rand;
|
||||
|
||||
switch (GetMetaTileIndex(this->unk_7e, super->collisionLayer)) {
|
||||
switch (GetTileIndex(this->unk_7e, super->collisionLayer)) {
|
||||
case 0x1ab ... 0x1af:
|
||||
offset = 8;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void FlyingPot_OnCollision(FlyingPotEntity* this) {
|
|||
super->zVelocity = Q_16_16(2.625);
|
||||
super->spritePriority.b1 = 1;
|
||||
|
||||
SetMetaTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
} else if (super->z.HALF.HI != 0) {
|
||||
sub_08037408(this);
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ void FlyingPot_SubAction2(FlyingPotEntity* this) {
|
|||
COLLISION_OFF(super);
|
||||
super->spriteOffsetX = 0;
|
||||
|
||||
SetMetaTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
}
|
||||
|
||||
if (sub_0806F520(super)) {
|
||||
|
|
@ -170,23 +170,23 @@ void FlyingPot_SubAction5(FlyingPotEntity* this) {
|
|||
}
|
||||
|
||||
void FlyingPot_Init(FlyingPotEntity* this) {
|
||||
u32 tile;
|
||||
u32 tilePos;
|
||||
|
||||
super->action = FLYING_POT_ACTION_1;
|
||||
super->gustJarFlags = 2;
|
||||
super->y.HALF.HI += 3;
|
||||
|
||||
tile = TILE(super->x.HALF.HI, super->y.HALF.HI);
|
||||
this->tileIndex = GetMetaTileIndex(tile, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_0, tile, super->collisionLayer);
|
||||
tilePos = TILE(super->x.HALF.HI, super->y.HALF.HI);
|
||||
this->tileIndex = GetTileIndex(tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_0, tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, 5);
|
||||
}
|
||||
|
||||
void FlyingPot_Action1(FlyingPotEntity* this) {
|
||||
sub_08037418(this);
|
||||
|
||||
if (GetMetaTileTypeByEntity(super) != SPECIAL_META_TILE_0) {
|
||||
SetMetaTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
if (GetTileTypeByEntity(super) != SPECIAL_TILE_0) {
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
sub_08037408(this);
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ void FlyingPot_Action2(FlyingPotEntity* this) {
|
|||
super->collisionMask = 0xF;
|
||||
super->hitbox = &gUnk_080FD34C;
|
||||
|
||||
SetMetaTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
SetTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -257,8 +257,8 @@ void sub_08037408(FlyingPotEntity* this) {
|
|||
void sub_08037418(FlyingPotEntity* this) {
|
||||
u32 tilePos = COORD_TO_TILE(super);
|
||||
|
||||
if (GetMetaTileIndex(tilePos, super->collisionLayer) == SPECIAL_META_TILE_103) {
|
||||
SetMetaTile(this->tileIndex, tilePos, super->collisionLayer);
|
||||
if (GetTileIndex(tilePos, super->collisionLayer) == SPECIAL_TILE_103) {
|
||||
SetTile(this->tileIndex, tilePos, super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0xc];
|
||||
u16 metaTileIndex;
|
||||
u16 tileIndex;
|
||||
u8 unk_0x76;
|
||||
} FlyingSkullEntity;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ void FlyingSkull_OnCollision(FlyingSkullEntity* this) {
|
|||
COLLISION_OFF(super);
|
||||
super->zVelocity = Q_16_16(2.625);
|
||||
super->spritePriority.b1 = 1;
|
||||
SetMetaTile(this->metaTileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(this->tileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
} else if (super->z.HALF.HI) {
|
||||
sub_0803A0E0(this);
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ void sub_08039CE0(FlyingSkullEntity* this) {
|
|||
super->timer = 1;
|
||||
super->z.HALF.HI = -1;
|
||||
super->spriteOffsetX = 0;
|
||||
SetMetaTile(this->metaTileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(this->tileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
if (sub_0806F520(super)) {
|
||||
|
|
@ -121,8 +121,8 @@ void sub_08039D74(FlyingSkullEntity* this) {
|
|||
super->y.HALF.HI += 3;
|
||||
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
this->metaTileIndex = GetMetaTileIndex(tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_96, tilePos, super->collisionLayer);
|
||||
this->tileIndex = GetTileIndex(tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_96, tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
||||
|
|
@ -130,8 +130,8 @@ void sub_08039DD8(FlyingSkullEntity* this) {
|
|||
sub_0803A100(this);
|
||||
|
||||
if (super->type == 0) {
|
||||
if (GetMetaTileTypeByEntity(super) == SPECIAL_META_TILE_115) {
|
||||
SetMetaTile(this->metaTileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
if (GetTileTypeByEntity(super) == SPECIAL_TILE_115) {
|
||||
SetTile(this->tileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
sub_0803A0E0(this);
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ void sub_08039DD8(FlyingSkullEntity* this) {
|
|||
if (player != NULL) {
|
||||
player->type2 = 1;
|
||||
CopyPosition(super, player);
|
||||
SetMetaTile(this->metaTileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(this->tileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
DeleteEntity(super);
|
||||
}
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ void sub_08039EE4(FlyingSkullEntity* this) {
|
|||
super->hitbox = (Hitbox*)&gUnk_080FD340;
|
||||
gPlayerEntity.base.animationState;
|
||||
this->unk_0x76 = gPlayerEntity.base.animationState;
|
||||
SetMetaTile(this->metaTileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(this->tileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_08039F4C(FlyingSkullEntity* this) {
|
||||
|
|
@ -201,7 +201,7 @@ void sub_08039FAC(FlyingSkullEntity* this) {
|
|||
super->hitType = 0xa0;
|
||||
super->collisionMask = 0xf;
|
||||
super->hitbox = (Hitbox*)&gUnk_080FD34C;
|
||||
SetMetaTile(this->metaTileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(this->tileIndex, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,8 +249,8 @@ void sub_0803A0E0(FlyingSkullEntity* this) {
|
|||
|
||||
void sub_0803A100(FlyingSkullEntity* this) {
|
||||
u32 tilePos = COORD_TO_TILE(super);
|
||||
if (GetMetaTileIndex(tilePos, super->collisionLayer) == SPECIAL_META_TILE_103) {
|
||||
SetMetaTile(this->metaTileIndex, tilePos, super->collisionLayer);
|
||||
if (GetTileIndex(tilePos, super->collisionLayer) == SPECIAL_TILE_103) {
|
||||
SetTile(this->tileIndex, tilePos, super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ void sub_08046518(void);
|
|||
void sub_080467DC(GyorgFemaleEntity*);
|
||||
|
||||
extern u8 gUpdateVisibleTiles;
|
||||
extern u8 gMapMetaTileTypeToCollisionData[];
|
||||
extern u8 gMapTileTypeToCollisionData[];
|
||||
|
||||
extern const MapDataDefinition gGyorgMapping0[];
|
||||
extern const MapDataDefinition gGyorgMapping1[];
|
||||
|
|
@ -248,7 +248,7 @@ void sub_080464C0(GyorgFemaleEntity* this) {
|
|||
#define sub_08046518_offset 0x658
|
||||
|
||||
void sub_08046518(void) {
|
||||
u16* ptr = gMapTop.metatileTypes;
|
||||
u16* ptr = gMapTop.tileTypes;
|
||||
u16* sl = &gMapTop.mapData[sub_08046518_offset];
|
||||
u16* stack1 = &gMapTop.mapDataOriginal[sub_08046518_offset];
|
||||
u8* stack2 = &gMapTop.vvv[sub_08046518_offset];
|
||||
|
|
@ -260,8 +260,8 @@ void sub_08046518(void) {
|
|||
u16 new_var;
|
||||
stack1[j] = sl[j];
|
||||
new_var = ptr[sl[j]];
|
||||
stack2[j] = gMapMetaTileTypeToVvv[new_var];
|
||||
r6[j] = gMapMetaTileTypeToCollisionData[new_var];
|
||||
stack2[j] = gMapTileTypeToVvv[new_var];
|
||||
r6[j] = gMapTileTypeToCollisionData[new_var];
|
||||
}
|
||||
sl += 0x40;
|
||||
stack1 += 0x40;
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ void sub_08029DE4(MadderpillarEntity* this) {
|
|||
}
|
||||
|
||||
void sub_08029E0C(MadderpillarEntity* this) {
|
||||
u32 tile;
|
||||
u32 tilePos;
|
||||
s32 uVar4;
|
||||
s32 iVar3;
|
||||
u32 i;
|
||||
|
|
@ -358,10 +358,10 @@ void sub_08029E0C(MadderpillarEntity* this) {
|
|||
ptr = &gUnk_080CCDC8[uVar2];
|
||||
uVar4 = (Random() & 1) * 2 - 1;
|
||||
iVar3 = ((s32)Random() & 0xf) % 3;
|
||||
tile = COORD_TO_TILE(super);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
for (i = 0; i < 3; i++) {
|
||||
dir = ptr[iVar3];
|
||||
if (GetCollisionDataAtMetaTilePos(gUnk_080B4488[dir >> 3] + tile, super->collisionLayer) == 0) {
|
||||
if (GetCollisionDataAtTilePos(gUnk_080B4488[dir >> 3] + tilePos, super->collisionLayer) == 0) {
|
||||
local_24 = dir;
|
||||
if (super->direction - this->unk_74 != dir - super->direction)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void sub_08034CC4(MazaalMacroEntity* this) {
|
|||
this->unk_78 = 0x4b0;
|
||||
sub_08034F70(this);
|
||||
InitializeAnimation(super, super->type);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(super), super->collisionLayer);
|
||||
entity = CreateEnemy(MAZAAL_MACRO, 2);
|
||||
if (entity != NULL) {
|
||||
super->child = entity;
|
||||
|
|
@ -285,11 +285,11 @@ u32 sub_08035084(MazaalMacroEntity* this) {
|
|||
}
|
||||
|
||||
void sub_08035120(MazaalMacroEntity* this) {
|
||||
s32 tile;
|
||||
s32 tilePos;
|
||||
u32 i;
|
||||
|
||||
tile = COORD_TO_TILE(super);
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
for (i = 0; i < 0x18; i++) {
|
||||
sub_0807B600(tile + gUnk_080CEED8[i]);
|
||||
sub_0807B600(tilePos + gUnk_080CEED8[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ typedef struct {
|
|||
} MoldwormEntity;
|
||||
|
||||
extern void SoundReqClipped(Entity*, u32);
|
||||
extern bool32 sub_08023A38(u32 metaTileType);
|
||||
extern bool32 sub_08023A38(u32 tileType);
|
||||
|
||||
void sub_08023990(MoldwormEntity*, u32, u32);
|
||||
void sub_08023A88(MoldwormEntity*, u32);
|
||||
|
|
@ -186,7 +186,7 @@ void sub_08023288(MoldwormEntity* this) {
|
|||
for (i = 0; i < 0x10; i++) {
|
||||
u32 x = gPlayerEntity.base.x.HALF.HI + gUnk_080CBC70[idx + 0];
|
||||
u32 y = gPlayerEntity.base.y.HALF.HI + gUnk_080CBC70[idx + 1];
|
||||
if (sub_08023A38(GetMetaTileTypeByPos(x, y, gPlayerEntity.base.collisionLayer))) {
|
||||
if (sub_08023A38(GetTileTypeByPos(x, y, gPlayerEntity.base.collisionLayer))) {
|
||||
sub_08023990(this, x, y);
|
||||
return;
|
||||
}
|
||||
|
|
@ -221,7 +221,7 @@ void sub_08023398(MoldwormEntity* this) {
|
|||
}
|
||||
|
||||
if (--this->unk_78.HWORD == 0) {
|
||||
if (sub_08023A38(GetMetaTileTypeByEntity(super))) {
|
||||
if (sub_08023A38(GetTileTypeByEntity(super))) {
|
||||
super->action = 5;
|
||||
this->unk_7f = 0;
|
||||
COLLISION_OFF(super);
|
||||
|
|
@ -513,12 +513,12 @@ void sub_080239F0(MoldwormEntity* this) {
|
|||
this->unk_87 = 0x88;
|
||||
}
|
||||
|
||||
bool32 sub_08023A38(u32 metaTileType) {
|
||||
if (metaTileType == META_TILE_TYPE_26 || metaTileType == META_TILE_TYPE_41) {
|
||||
bool32 sub_08023A38(u32 tileType) {
|
||||
if (tileType == TILE_TYPE_26 || tileType == TILE_TYPE_41) {
|
||||
return TRUE;
|
||||
} else {
|
||||
metaTileType = gMapMetaTileTypeToVvv[metaTileType];
|
||||
if (metaTileType == VVV_9 || metaTileType == VVV_11 || metaTileType == VVV_10 || metaTileType == VVV_12) {
|
||||
tileType = gMapTileTypeToVvv[tileType];
|
||||
if (tileType == VVV_9 || tileType == VVV_11 || tileType == VVV_10 || tileType == VVV_12) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ void sub_080244E8(PestoEntity* this) {
|
|||
switch (this->unk_80) {
|
||||
case 0:
|
||||
if (--super->timer == 0) {
|
||||
if (GetCollisionDataAtMetaTilePos(COORD_TO_TILE(super), 1) == 0) {
|
||||
if (GetCollisionDataAtTilePos(COORD_TO_TILE(super), 1) == 0) {
|
||||
this->unk_80++;
|
||||
this->unk_82++;
|
||||
super->subtimer = 0;
|
||||
|
|
@ -446,7 +446,7 @@ void sub_080244E8(PestoEntity* this) {
|
|||
super->timer = 12;
|
||||
this->unk_83 &= ~0x80;
|
||||
entity = super->child;
|
||||
SetMetaTile(((PestoEntity*)entity)->unk_70, COORD_TO_TILE(entity), entity->collisionLayer);
|
||||
SetTile(((PestoEntity*)entity)->unk_70, COORD_TO_TILE(entity), entity->collisionLayer);
|
||||
DeleteEntity(entity);
|
||||
super->z.HALF.HI -= 0xe;
|
||||
this->unk_78 -= 0xe;
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ typedef struct {
|
|||
/*0x82*/ u8 unk_82;
|
||||
/*0x83*/ u8 unused2[1];
|
||||
/*0x84*/ u16 unk_84;
|
||||
/*0x86*/ u16 unk_86;
|
||||
/*0x86*/ u16 tilePos;
|
||||
} PuffstoolEntity;
|
||||
|
||||
extern u8 gMapMetaTileTypeToCollisionData[];
|
||||
extern u8 gMapTileTypeToCollisionData[];
|
||||
|
||||
bool32 sub_080258C4(PuffstoolEntity*);
|
||||
void sub_08025B18(PuffstoolEntity*);
|
||||
|
|
@ -183,7 +183,7 @@ void sub_08025230(PuffstoolEntity* this) {
|
|||
if (sub_0802571C(this)) {
|
||||
super->action = 2;
|
||||
super->timer = 240;
|
||||
this->unk_86 = COORD_TO_TILE(super);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
}
|
||||
} else {
|
||||
this->unk_78--;
|
||||
|
|
@ -191,20 +191,20 @@ void sub_08025230(PuffstoolEntity* this) {
|
|||
}
|
||||
|
||||
void sub_080252E0(PuffstoolEntity* this) {
|
||||
u32 tile;
|
||||
u32 tilePos;
|
||||
|
||||
super->direction = CalculateDirectionTo(super->x.HALF.HI, super->y.HALF.HI, this->unk_7c, this->unk_7e);
|
||||
|
||||
sub_08025C44(this);
|
||||
GetNextFrame(super);
|
||||
|
||||
tile = COORD_TO_TILE(super);
|
||||
if (tile == this->unk_86) {
|
||||
tilePos = COORD_TO_TILE(super);
|
||||
if (tilePos == this->tilePos) {
|
||||
if (--super->timer == 0) {
|
||||
sub_080256B4(this);
|
||||
}
|
||||
} else {
|
||||
this->unk_86 = tile;
|
||||
this->tilePos = tilePos;
|
||||
super->timer = 240;
|
||||
}
|
||||
|
||||
|
|
@ -428,27 +428,27 @@ bool32 sub_0802571C(PuffstoolEntity* this) {
|
|||
}
|
||||
|
||||
bool32 sub_080257EC(PuffstoolEntity* this, u32 x, u32 y) {
|
||||
u16 metaTileType = sub_080B1A48(x - 0x00, y - 0x00, super->collisionLayer);
|
||||
if (metaTileType != 0x312 && gMapMetaTileTypeToVvv[metaTileType] != VVV_22 &&
|
||||
gMapMetaTileTypeToCollisionData[metaTileType] == 0) {
|
||||
u16 tileType = sub_080B1A48(x - 0x00, y - 0x00, super->collisionLayer);
|
||||
if (tileType != 0x312 && gMapTileTypeToVvv[tileType] != VVV_22 &&
|
||||
gMapTileTypeToCollisionData[tileType] == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
metaTileType = sub_080B1A48(x - 0x10, y - 0x00, super->collisionLayer);
|
||||
if (metaTileType != 0x312 && gMapMetaTileTypeToVvv[metaTileType] != VVV_22 &&
|
||||
gMapMetaTileTypeToCollisionData[metaTileType] == 0) {
|
||||
tileType = sub_080B1A48(x - 0x10, y - 0x00, super->collisionLayer);
|
||||
if (tileType != 0x312 && gMapTileTypeToVvv[tileType] != VVV_22 &&
|
||||
gMapTileTypeToCollisionData[tileType] == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
metaTileType = sub_080B1A48(x - 0x00, y - 0x10, super->collisionLayer);
|
||||
if (metaTileType != 0x312 && gMapMetaTileTypeToVvv[metaTileType] != VVV_22 &&
|
||||
gMapMetaTileTypeToCollisionData[metaTileType] == 0) {
|
||||
tileType = sub_080B1A48(x - 0x00, y - 0x10, super->collisionLayer);
|
||||
if (tileType != 0x312 && gMapTileTypeToVvv[tileType] != VVV_22 &&
|
||||
gMapTileTypeToCollisionData[tileType] == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
metaTileType = sub_080B1A48(x - 0x10, y - 0x10, super->collisionLayer);
|
||||
if (metaTileType != 0x312 && gMapMetaTileTypeToVvv[metaTileType] != VVV_22 &&
|
||||
gMapMetaTileTypeToCollisionData[metaTileType] == 0) {
|
||||
tileType = sub_080B1A48(x - 0x10, y - 0x10, super->collisionLayer);
|
||||
if (tileType != 0x312 && gMapTileTypeToVvv[tileType] != VVV_22 &&
|
||||
gMapTileTypeToCollisionData[tileType] == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -528,12 +528,12 @@ void sub_08025A54(PuffstoolEntity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
bool32 sub_08025AB8(u32 metaTilePos, u32 layer) {
|
||||
if (GetCollisionDataAtMetaTilePos(metaTilePos, layer))
|
||||
bool32 sub_08025AB8(u32 tilePos, u32 layer) {
|
||||
if (GetCollisionDataAtTilePos(tilePos, layer))
|
||||
return FALSE;
|
||||
|
||||
if (GetVvvAtMetaTilePos(metaTilePos, layer) == VVV_10) {
|
||||
sub_0807B7D8(0x61, metaTilePos, layer);
|
||||
if (GetVvvAtTilePos(tilePos, layer) == VVV_10) {
|
||||
sub_0807B7D8(0x61, tilePos, layer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ void sub_08020A7C(RollobiteEntity* this) {
|
|||
bool32 Rollobite_TryToHoleUp(RollobiteEntity* this) {
|
||||
if (Rollobite_IsRolledUp(this) && super->z.HALF.HI == 0) {
|
||||
u32 tilePos = COORD_TO_TILE(super);
|
||||
u32 tileType = GetMetaTileType(tilePos, super->collisionLayer);
|
||||
u32 tileType = GetTileType(tilePos, super->collisionLayer);
|
||||
if ((tileType * 0x10000 - 0x710000U) >> 0x10 < 2) {
|
||||
super->action = 6;
|
||||
COLLISION_OFF(super);
|
||||
|
|
@ -277,7 +277,7 @@ bool32 Rollobite_TryToHoleUp(RollobiteEntity* this) {
|
|||
super->y.HALF.HI += 13;
|
||||
super->zVelocity = Q_16_16(2.0);
|
||||
InitializeAnimation(super, super->animationState + 0x14);
|
||||
SetMetaTile(SPECIAL_META_TILE_52, tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_52, tilePos, super->collisionLayer);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0xc];
|
||||
u16 tile;
|
||||
u16 tilePos;
|
||||
u16 tileIndex;
|
||||
u8 unk_78;
|
||||
u8 unk_79;
|
||||
|
|
@ -93,9 +93,9 @@ void SpinyBeetle_Init(SpinyBeetleEntity* this) {
|
|||
this->unk_7a = 0;
|
||||
this->unk_78 = 0;
|
||||
this->unk_7b = 0;
|
||||
this->tile = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetMetaTileIndex(this->tile, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tile, super->collisionLayer);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos, super->collisionLayer);
|
||||
obj = CreateObject(OBJECT_ON_BEETLE, super->type, 0);
|
||||
|
||||
if (obj == NULL) {
|
||||
|
|
@ -117,7 +117,7 @@ void sub_08033958(SpinyBeetleEntity* this) {
|
|||
u32 direction;
|
||||
if (sub_08033DF0(this)) {
|
||||
sub_08033E1C(this);
|
||||
SetMetaTileByIndex(this->tileIndex, this->tile, super->collisionLayer);
|
||||
SetTileByIndex(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ void sub_08033958(SpinyBeetleEntity* this) {
|
|||
COLLISION_ON(super);
|
||||
|
||||
super->y.WORD = (super->y.WORD & 0xfff00000) | 0xC0000;
|
||||
SetMetaTileByIndex(this->tileIndex, this->tile, super->collisionLayer);
|
||||
SetTileByIndex(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, 2);
|
||||
}
|
||||
|
||||
|
|
@ -237,10 +237,10 @@ void sub_08033B44(SpinyBeetleEntity* this) {
|
|||
this->unk_80 = super->y.WORD;
|
||||
super->spritePriority.b1 = 0;
|
||||
this->unk_7b = 0x78;
|
||||
this->tile = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetMetaTileIndex(this->tile, super->collisionLayer);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
|
||||
if (this->tileIndex != SPECIAL_META_TILE_34) {
|
||||
if (this->tileIndex != SPECIAL_TILE_34) {
|
||||
stop++;
|
||||
} else {
|
||||
switch (DirectionRound(super->direction) >> 2) {
|
||||
|
|
@ -260,7 +260,7 @@ void sub_08033B44(SpinyBeetleEntity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tile, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
||||
|
|
@ -319,17 +319,17 @@ void sub_08033C94(SpinyBeetleEntity* this) {
|
|||
void sub_08033D78(SpinyBeetleEntity* this) {
|
||||
u32 dir = DirectionRound(super->direction) >> 2;
|
||||
const s8* ptr = gUnk_080CEC1C + dir;
|
||||
s32 tile;
|
||||
s32 tilePos;
|
||||
u32 type;
|
||||
tile = COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]);
|
||||
type = GetMetaTileType(tile, super->collisionLayer);
|
||||
tilePos = COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]);
|
||||
type = GetTileType(tilePos, super->collisionLayer);
|
||||
|
||||
switch (type) {
|
||||
case 0x1c4:
|
||||
case 0x1c5:
|
||||
break;
|
||||
default:
|
||||
if (GetCollisionDataAtMetaTilePos(tile, super->collisionLayer) - 1 > 0x3e)
|
||||
if (GetCollisionDataAtTilePos(tilePos, super->collisionLayer) - 1 > 0x3e)
|
||||
ProcessMovement0(super);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ void sub_08039AD4(StalfosEntity* this) {
|
|||
super->action = 0xb;
|
||||
super->child = projectile;
|
||||
InitAnimationForceUpdate(super, super->animationState + 0x18);
|
||||
SetMetaTile(SPECIAL_META_TILE_103, position, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_103, position, super->collisionLayer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -456,7 +456,7 @@ u32 sub_08039B28(StalfosEntity* this) {
|
|||
}
|
||||
ptr2 = &gUnk_080CF930[super->animationState * 2];
|
||||
pos = COORD_TO_TILE_OFFSET(super, -ptr2[0], -ptr2[1]);
|
||||
tileType = GetMetaTileType(pos, (u32)super->collisionLayer);
|
||||
tileType = GetTileType(pos, (u32)super->collisionLayer);
|
||||
ptr = gUnk_080CF938;
|
||||
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0xc];
|
||||
u16 metaTilePos;
|
||||
u16 tilePos;
|
||||
u16 filler2;
|
||||
u16 unk_78;
|
||||
u16 projectileTimer;
|
||||
|
|
@ -46,7 +46,7 @@ void TorchTrap_Init(TorchTrapEntity* this) {
|
|||
this->unk_84 &= 0xfff;
|
||||
sub_0804A720(super);
|
||||
super->action = 1;
|
||||
this->metaTilePos = this->unk_82 & 0xfff;
|
||||
this->tilePos = this->unk_82 & 0xfff;
|
||||
super->x.HALF.HI = ((this->unk_82 & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
super->y.HALF.HI = ((this->unk_82 & 0xfc0) >> 2) + (gRoomControls.origin_y + 8);
|
||||
super->direction = ((s16)this->unk_82 & 0xf000) >> 10;
|
||||
|
|
@ -76,7 +76,7 @@ void sub_0803CF38(TorchTrapEntity* this) {
|
|||
}
|
||||
|
||||
void sub_0803CF94(TorchTrapEntity* this) {
|
||||
if (GetMetaTileType(this->metaTilePos, super->collisionLayer) == META_TILE_TYPE_118) {
|
||||
if (GetTileType(this->tilePos, super->collisionLayer) == TILE_TYPE_118) {
|
||||
this->unk_80 = 0;
|
||||
TorchTrap_Reset(this);
|
||||
} else if (this->unk_7c && sub_0803CFD8(this)) {
|
||||
|
|
@ -141,7 +141,7 @@ void TorchTrap_CreateProjectile(TorchTrapEntity* this) {
|
|||
|
||||
void sub_0803D0B0(TorchTrapEntity* this) {
|
||||
super->action = 3;
|
||||
sub_0807B7D8(META_TILE_TYPE_117, this->metaTilePos, super->collisionLayer);
|
||||
sub_0807B7D8(TILE_TYPE_117, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
|
||||
void (*const gTorchTrapActions[])(TorchTrapEntity*) = {
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void sub_0802EFB8(VaatiEyesMacroEntity* this) {
|
|||
uVar1 = (uVar3 + 4) & 0x18;
|
||||
}
|
||||
collisionData =
|
||||
GetCollisionDataAtMetaTilePos(TILE(super->x.HALF.HI, super->y.HALF.HI) + gUnk_080B4488[((uVar1) >> 3)], 1);
|
||||
GetCollisionDataAtTilePos(TILE(super->x.HALF.HI, super->y.HALF.HI) + gUnk_080B4488[((uVar1) >> 3)], 1);
|
||||
if (collisionData != 0) {
|
||||
super->direction = DIR_NONE;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -282,8 +282,8 @@ bool32 sub_0803E4A0(VaatiProjectileEntity* this) {
|
|||
}
|
||||
|
||||
void sub_0803E4D8(VaatiProjectileEntity* this) {
|
||||
u32 metaTilePos = TILE(super->x.HALF.HI, super->y.HALF.HI + 8);
|
||||
if (GetCollisionDataAtMetaTilePos(metaTilePos, gPlayerEntity.base.collisionLayer) != COLLISION_DATA_255) {
|
||||
SetMetaTile(SPECIAL_META_TILE_116, metaTilePos, gPlayerEntity.base.collisionLayer);
|
||||
u32 tilePos = TILE(super->x.HALF.HI, super->y.HALF.HI + 8);
|
||||
if (GetCollisionDataAtTilePos(tilePos, gPlayerEntity.base.collisionLayer) != COLLISION_DATA_255) {
|
||||
SetTile(SPECIAL_TILE_116, tilePos, gPlayerEntity.base.collisionLayer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ void WizzrobeFire_OnCollision(WizzrobeEntity* this) {
|
|||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, WizzrobeFire_Functions);
|
||||
if (super->health == 0) {
|
||||
SetMetaTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) {
|
|||
super->timer = 40;
|
||||
super->subtimer = 0;
|
||||
super->flags &= ~0x80;
|
||||
SetMetaTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
EnqueueSFX(SFX_156);
|
||||
InitializeAnimation(super, super->direction >> 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ void WizzrobeIce_OnCollision(WizzrobeEntity* this) {
|
|||
}
|
||||
}
|
||||
if (super->health == 0) {
|
||||
SetMetaTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
|
|||
super->timer = 40;
|
||||
super->subtimer = 0;
|
||||
super->flags &= ~0x80;
|
||||
SetMetaTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
EnqueueSFX(SFX_156);
|
||||
InitializeAnimation(super, super->direction >> 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void WizzrobeWind_OnCollision(WizzrobeEntity* this) {
|
|||
}
|
||||
}
|
||||
if (super->health == 0) {
|
||||
SetMetaTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) {
|
|||
super->subtimer = 0;
|
||||
super->flags &= ~0x80;
|
||||
EnqueueSFX(SFX_156);
|
||||
SetMetaTile(this->tileIndex, this->tilePosition, super->collisionLayer);
|
||||
SetTile(this->tileIndex, this->tilePos, super->collisionLayer);
|
||||
InitializeAnimation(super, super->direction >> 3);
|
||||
}
|
||||
break;
|
||||
|
|
@ -208,15 +208,15 @@ void WizzrobeWind_Action3(WizzrobeEntity* this) {
|
|||
|
||||
void sub_0802F888(WizzrobeEntity* this) {
|
||||
super->direction = (sub_08049F84(super, 3) + 4) & 0x18;
|
||||
this->tilePosition = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetMetaTileIndex(this->tilePosition, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_113, this->tilePosition, super->collisionLayer);
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
this->tileIndex = GetTileIndex(this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_113, this->tilePos, super->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0802F8E4(WizzrobeEntity* this) {
|
||||
u16 uVar1;
|
||||
s32 iVar4;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
u32 uVar7;
|
||||
u32 uVar8;
|
||||
|
||||
|
|
@ -234,9 +234,9 @@ void sub_0802F8E4(WizzrobeEntity* this) {
|
|||
uVar1 = this->unk_72;
|
||||
iVar4 = ((s32)(rand)&0x7ff0) % (this->unk_6f << 3);
|
||||
uVar7 = (uVar1 + iVar4) | 8;
|
||||
metaTilePos = TILE(uVar8, uVar7);
|
||||
if ((GetCollisionDataAtMetaTilePos(metaTilePos, super->collisionLayer) == 0) &&
|
||||
(GetMetaTileIndex(metaTilePos, super->collisionLayer) != SPECIAL_META_TILE_113)) {
|
||||
tilePos = TILE(uVar8, uVar7);
|
||||
if ((GetCollisionDataAtTilePos(tilePos, super->collisionLayer) == 0) &&
|
||||
(GetTileIndex(tilePos, super->collisionLayer) != SPECIAL_TILE_113)) {
|
||||
super->x.HALF.HI = (s16)uVar8;
|
||||
super->y.HALF.HI = (s16)uVar7;
|
||||
if (sub_08049FA0(super) != 0) {
|
||||
|
|
|
|||
40
src/entity.c
40
src/entity.c
|
|
@ -47,29 +47,29 @@ const u8 gEntityListLUT[] = {
|
|||
|
||||
// TODO: wrong file, maybe an "enter.c" according to lexicographical order
|
||||
void sub_0805E248(void) {
|
||||
s32 metaTilePos;
|
||||
s32 tilePos;
|
||||
|
||||
metaTilePos = gDiggingCaveEntranceTransition.entrance->targetTilePosition;
|
||||
tilePos = gDiggingCaveEntranceTransition.entrance->targetTilePosition;
|
||||
if (gRoomControls.area == AREA_VEIL_FALLS || gRoomControls.area == AREA_VEIL_FALLS_DIG_CAVE) {
|
||||
SetMetaTileType(META_TILE_TYPE_636, metaTilePos + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_643, metaTilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_637, metaTilePos + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_644, metaTilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_638, metaTilePos + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_645, metaTilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_639, metaTilePos + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_640, metaTilePos + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_642, metaTilePos + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_636, tilePos + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_643, tilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_637, tilePos + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_644, tilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_638, tilePos + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_645, tilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_639, tilePos + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_640, tilePos + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_642, tilePos + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_620, metaTilePos + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_627, metaTilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_621, metaTilePos + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_628, metaTilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_622, metaTilePos + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_629, metaTilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_623, metaTilePos + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_624, metaTilePos + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_626, metaTilePos + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_620, tilePos + TILE_POS(-1, -1), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_627, tilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_621, tilePos + TILE_POS(0, -1), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_628, tilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_622, tilePos + TILE_POS(1, -1), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_629, tilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_623, tilePos + TILE_POS(-1, 0), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_624, tilePos + TILE_POS(0, 0), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_626, tilePos + TILE_POS(1, 0), LAYER_BOTTOM);
|
||||
}
|
||||
gUpdateVisibleTiles = 0;
|
||||
}
|
||||
|
|
|
|||
16
src/flags.c
16
src/flags.c
|
|
@ -40,20 +40,20 @@ u32 CheckRoomFlag(u32 flag) {
|
|||
return ReadBit(&gRoomVars.flags, flag);
|
||||
}
|
||||
|
||||
u32 CheckLocalFlagsByBank(u32 offset, u32 flag, u32 length) {
|
||||
return CheckBits(gSave.flags, offset + flag, length);
|
||||
u32 CheckLocalFlagsByBank(u32 offset, u32 flag, u32 count) {
|
||||
return CheckBits(gSave.flags, offset + flag, count);
|
||||
}
|
||||
|
||||
u32 CheckLocalFlags(u32 flag, u32 length) {
|
||||
return CheckLocalFlagsByBank(gArea.localFlagOffset, flag, length);
|
||||
u32 CheckLocalFlags(u32 flag, u32 count) {
|
||||
return CheckLocalFlagsByBank(gArea.localFlagOffset, flag, count);
|
||||
}
|
||||
|
||||
u32 CheckGlobalFlags(u32 flag, u32 length) {
|
||||
return CheckLocalFlagsByBank(FLAG_BANK_0, flag, length);
|
||||
u32 CheckGlobalFlags(u32 flag, u32 count) {
|
||||
return CheckLocalFlagsByBank(FLAG_BANK_0, flag, count);
|
||||
}
|
||||
|
||||
u32 CheckRoomFlags(u32 flag, u32 length) {
|
||||
return CheckBits(&gRoomVars.flags, flag, length);
|
||||
u32 CheckRoomFlags(u32 flag, u32 count) {
|
||||
return CheckBits(&gRoomVars.flags, flag, count);
|
||||
}
|
||||
|
||||
void SetLocalFlagByBank(u32 offset, u32 flag) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ void ResetTimerFlags(void);
|
|||
|
||||
extern void** gAreaTilesets[];
|
||||
extern void** gAreaRoomMaps[];
|
||||
extern void* gAreaMetatiles[];
|
||||
extern void* gAreaTiles[];
|
||||
extern void** gAreaTable[];
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -558,7 +558,7 @@ void InitRoomResInfo(RoomResInfo* info, RoomHeader* r_hdr, u32 area, u32 room) {
|
|||
info->pixel_height = r_hdr->pixel_height;
|
||||
info->tileset = *(gAreaTilesets[area] + r_hdr->tileset_id);
|
||||
info->map = *(gAreaRoomMaps[area] + room);
|
||||
info->metatiles = gAreaMetatiles[area];
|
||||
info->tiles = gAreaTiles[area];
|
||||
info->bg_anim = (void*)gUnk_080B755C[area];
|
||||
info->exits = gExitLists[area][room];
|
||||
if (gAreaTable[area] != NULL) {
|
||||
|
|
@ -662,7 +662,7 @@ void sub_08052FF4(u32 area, u32 room) {
|
|||
gArea.currentRoomInfo.pixel_height = r_hdr->pixel_height;
|
||||
gArea.currentRoomInfo.tileset = *(gAreaTilesets[area] + r_hdr->tileset_id);
|
||||
gArea.currentRoomInfo.map = *(gAreaRoomMaps[area] + room);
|
||||
gArea.currentRoomInfo.metatiles = gAreaMetatiles[area];
|
||||
gArea.currentRoomInfo.tiles = gAreaTiles[area];
|
||||
gArea.currentRoomInfo.bg_anim = (void*)gUnk_080B755C[area];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,11 +87,11 @@ void UpdateDisplayControls(void) {
|
|||
}
|
||||
|
||||
void sub_08016CA8(BgSettings* bg) {
|
||||
if (bg->updated && bg->tilemap != NULL) {
|
||||
if (bg->updated && bg->subTileMap != NULL) {
|
||||
u32 dest;
|
||||
bg->updated = 0;
|
||||
dest = bg->control;
|
||||
DmaCopy32(3, bg->tilemap, ((dest << 3) & 0xF800) + VRAM, gUnk_080B2CD8[dest >> 14]);
|
||||
DmaCopy32(3, bg->subTileMap, ((dest << 3) & 0xF800) + VRAM, gUnk_080B2CD8[dest >> 14]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,18 +177,18 @@ void sub_08077448(ItemBehavior* this, u32 index) {
|
|||
s32 sub_080774A0(void) {
|
||||
static const s8 gUnk_0811BE1E[] = { 0, -13, 13, 0, 0, 16, -13, 0, 0, 0 };
|
||||
u32 collisionData;
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
metaTilePos = COORD_TO_TILE_OFFSET((&gPlayerEntity.base), -gUnk_0811BE1E[gPlayerEntity.base.animationState & 6],
|
||||
tilePos = COORD_TO_TILE_OFFSET((&gPlayerEntity.base), -gUnk_0811BE1E[gPlayerEntity.base.animationState & 6],
|
||||
-gUnk_0811BE1E[(gPlayerEntity.base.animationState & 6) + 1]);
|
||||
|
||||
collisionData = GetCollisionDataAtMetaTilePos(metaTilePos, gPlayerEntity.base.collisionLayer);
|
||||
collisionData = GetCollisionDataAtTilePos(tilePos, gPlayerEntity.base.collisionLayer);
|
||||
|
||||
if (collisionData > 0x16)
|
||||
return 0;
|
||||
if (collisionData < 0xf)
|
||||
return 0;
|
||||
if (GetVvvAtMetaTilePos(metaTilePos, gPlayerEntity.base.collisionLayer) != VVV_86) {
|
||||
if (GetVvvAtTilePos(tilePos, gPlayerEntity.base.collisionLayer) != VVV_86) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0x56;
|
||||
|
|
|
|||
102
src/kinstone.c
102
src/kinstone.c
|
|
@ -335,7 +335,7 @@ void sub_0801876C(u32 worldEventId, bool32 isKinstoneFused) {
|
|||
if (isKinstoneFused == 0) {
|
||||
return;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_360, (ptr->x >> 4 & 0x3f) | (ptr->y >> 4 & 0x3f) << 6, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_360, (ptr->x >> 4 & 0x3f) | (ptr->y >> 4 & 0x3f) << 6, LAYER_BOTTOM);
|
||||
break;
|
||||
case WORLD_EVENT_TYPE_11:
|
||||
if (isKinstoneFused != 0) {
|
||||
|
|
@ -354,12 +354,12 @@ void sub_0801876C(u32 worldEventId, bool32 isKinstoneFused) {
|
|||
*(u16*)&ent->gustJarState = ptr->y + gRoomControls.origin_y;
|
||||
}
|
||||
if (ptr->entity_idx == 0) {
|
||||
SetMetaTileType(META_TILE_TYPE_141, (ptr->x >> 4 & 0x3f) | (ptr->y >> 4 & 0x3f) << 6, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_141, (ptr->x >> 4 & 0x3f) | (ptr->y >> 4 & 0x3f) << 6, LAYER_BOTTOM);
|
||||
} else {
|
||||
uVar5 = (ptr->x >> 4 & 0x3f) | (ptr->y >> 4 & 0x3f) << 6;
|
||||
SetMetaTileType(META_TILE_TYPE_140, uVar5 - 1, LAYER_BOTTOM);
|
||||
uVar3 = META_TILE_TYPE_142;
|
||||
SetMetaTileType(uVar3, uVar5, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_140, uVar5 - 1, LAYER_BOTTOM);
|
||||
uVar3 = TILE_TYPE_142;
|
||||
SetTileType(uVar3, uVar5, LAYER_BOTTOM);
|
||||
}
|
||||
break;
|
||||
case WORLD_EVENT_TYPE_24:
|
||||
|
|
@ -390,67 +390,67 @@ void sub_0801876C(u32 worldEventId, bool32 isKinstoneFused) {
|
|||
void sub_080189EC(u32 worldEventId) {
|
||||
u32 i;
|
||||
int iVar1;
|
||||
int metaTilePos;
|
||||
int tilePos;
|
||||
const WorldEvent* ptr;
|
||||
|
||||
ptr = &gWorldEvents[worldEventId];
|
||||
|
||||
metaTilePos = (ptr->x >> 4) & 0x3f;
|
||||
metaTilePos |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
metaTilePos -= TILE_POS(2, 1);
|
||||
tilePos = (ptr->x >> 4) & 0x3f;
|
||||
tilePos |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
tilePos -= TILE_POS(2, 1);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
SetMetaTileType(i + META_TILE_TYPE_479, metaTilePos + i, LAYER_TOP);
|
||||
SetTileType(i + TILE_TYPE_479, tilePos + i, LAYER_TOP);
|
||||
}
|
||||
|
||||
metaTilePos += TILE_POS(0, 1);
|
||||
tilePos += TILE_POS(0, 1);
|
||||
for (i = 0; i < 4; i++) {
|
||||
SetMetaTileType(i + META_TILE_TYPE_483, metaTilePos + i, LAYER_TOP);
|
||||
SetMetaTileType(i + META_TILE_TYPE_475, metaTilePos + i, LAYER_BOTTOM);
|
||||
SetTileType(i + TILE_TYPE_483, tilePos + i, LAYER_TOP);
|
||||
SetTileType(i + TILE_TYPE_475, tilePos + i, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08018A58(u32 worldEventId) {
|
||||
u32 i;
|
||||
int metaTileType;
|
||||
int tileType;
|
||||
u32 j;
|
||||
int metaTilePos;
|
||||
int tilePos;
|
||||
const WorldEvent* ptr;
|
||||
|
||||
ptr = &gWorldEvents[worldEventId];
|
||||
|
||||
metaTilePos = (ptr->x >> 4) & 0x3f;
|
||||
metaTilePos |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
metaTilePos -= TILE_POS(3, 1);
|
||||
metaTileType = META_TILE_TYPE_562;
|
||||
tilePos = (ptr->x >> 4) & 0x3f;
|
||||
tilePos |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
tilePos -= TILE_POS(3, 1);
|
||||
tileType = TILE_TYPE_562;
|
||||
|
||||
for (i = 0; i < 4; metaTilePos += TILE_POS(0, 1), i++) {
|
||||
for (i = 0; i < 4; tilePos += TILE_POS(0, 1), i++) {
|
||||
for (j = 0; j < 7; j++) {
|
||||
SetMetaTileType(metaTileType++, metaTilePos + j, LAYER_BOTTOM);
|
||||
SetTileType(tileType++, tilePos + j, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08018AB4(int metaTilePos) {
|
||||
void sub_08018AB4(int tilePos) {
|
||||
u32 i;
|
||||
int iVar2;
|
||||
u32 j;
|
||||
int iVar6;
|
||||
|
||||
iVar2 = META_TILE_TYPE_488;
|
||||
iVar6 = META_TILE_TYPE_500;
|
||||
iVar2 = TILE_TYPE_488;
|
||||
iVar6 = TILE_TYPE_500;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
j = 0;
|
||||
for (; j < 4; j++) {
|
||||
SetMetaTileType(iVar2++, metaTilePos + j, LAYER_BOTTOM);
|
||||
SetMetaTileType(iVar6++, metaTilePos + TILE_POS(0, -1) + j, LAYER_TOP);
|
||||
SetTileType(iVar2++, tilePos + j, LAYER_BOTTOM);
|
||||
SetTileType(iVar6++, tilePos + TILE_POS(0, -1) + j, LAYER_TOP);
|
||||
}
|
||||
metaTilePos += TILE_POS(0, 1);
|
||||
tilePos += TILE_POS(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08018B10(int metaTilePos) {
|
||||
void sub_08018B10(int tilePos) {
|
||||
int iVar1;
|
||||
u32 index;
|
||||
int iVar3;
|
||||
|
|
@ -459,34 +459,34 @@ void sub_08018B10(int metaTilePos) {
|
|||
iVar4 = 0x1f0;
|
||||
iVar3 = 0x1fc;
|
||||
index = 0;
|
||||
iVar1 = metaTilePos - TILE_POS(0, 1);
|
||||
iVar1 = tilePos - TILE_POS(0, 1);
|
||||
for (; index < 4; iVar1++, index++) {
|
||||
SetMetaTileType(iVar4++, metaTilePos + index, LAYER_BOTTOM);
|
||||
SetMetaTileType(iVar3++, iVar1, LAYER_TOP);
|
||||
SetTileType(iVar4++, tilePos + index, LAYER_BOTTOM);
|
||||
SetTileType(iVar3++, iVar1, LAYER_TOP);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08018B50(u32 worldEventId) {
|
||||
u32 i;
|
||||
int metaTileType;
|
||||
int tileType;
|
||||
u32 j;
|
||||
int metaTilePos;
|
||||
int tilePos;
|
||||
const WorldEvent* ptr;
|
||||
|
||||
ptr = &gWorldEvents[worldEventId];
|
||||
if ((ptr->entity_idx & 0x80) == 0) {
|
||||
metaTileType = META_TILE_TYPE_512;
|
||||
tileType = TILE_TYPE_512;
|
||||
} else {
|
||||
metaTileType = META_TILE_TYPE_537;
|
||||
tileType = TILE_TYPE_537;
|
||||
}
|
||||
|
||||
metaTilePos = (ptr->x >> 4) & 0x3f;
|
||||
metaTilePos |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
metaTilePos -= TILE_POS(2, 2);
|
||||
tilePos = (ptr->x >> 4) & 0x3f;
|
||||
tilePos |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
tilePos -= TILE_POS(2, 2);
|
||||
|
||||
for (i = 0; i < 5; metaTilePos += 0x40, i++) {
|
||||
for (i = 0; i < 5; tilePos += 0x40, i++) {
|
||||
for (j = 0; j < 5; j++) {
|
||||
SetMetaTileType(metaTileType++, metaTilePos + j, LAYER_BOTTOM);
|
||||
SetTileType(tileType++, tilePos + j, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -494,22 +494,22 @@ void sub_08018B50(u32 worldEventId) {
|
|||
// TODO world event that loads tile entity
|
||||
void sub_08018BB4(u32 worldEventId) {
|
||||
u32 layer;
|
||||
TileEntity tile;
|
||||
TileEntity tileEntity;
|
||||
const WorldEvent* ptr;
|
||||
u32 position;
|
||||
|
||||
MemCopy(gUnk_080FEAC8 + worldEventId, &tile, sizeof(TileEntity));
|
||||
MemCopy(gUnk_080FEAC8 + worldEventId, &tileEntity, sizeof(TileEntity));
|
||||
ptr = &gWorldEvents[worldEventId];
|
||||
tile.tilePos = (ptr->x >> 4 & 0x3f) | (((ptr->y) >> 4 & 0x3f) << 6);
|
||||
LoadSmallChestTile2(&tile);
|
||||
if (CheckLocalFlag(tile.localFlag) == 0) {
|
||||
position = tile.tilePos;
|
||||
if ((tile._6 & 1) == 0) {
|
||||
tileEntity.tilePos = (ptr->x >> 4 & 0x3f) | (((ptr->y) >> 4 & 0x3f) << 6);
|
||||
LoadSmallChestTile2(&tileEntity);
|
||||
if (CheckLocalFlag(tileEntity.localFlag) == 0) {
|
||||
position = tileEntity.tilePos;
|
||||
if ((tileEntity._6 & 1) == 0) {
|
||||
layer = 1;
|
||||
} else {
|
||||
layer = 2;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_115, position, layer);
|
||||
SetTileType(TILE_TYPE_115, position, layer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -519,7 +519,7 @@ void CreateMinishEntrance(u32 tilePos) {
|
|||
|
||||
for (y = 0; y <= 3; y++) {
|
||||
for (x = 0; x <= 4; x++) {
|
||||
SetMetaTileType(tileID++, tilePos + x, LAYER_BOTTOM);
|
||||
SetTileType(tileID++, tilePos + x, LAYER_BOTTOM);
|
||||
}
|
||||
tilePos += 0x40;
|
||||
}
|
||||
|
|
@ -529,7 +529,7 @@ void sub_08018C58(u32 tilePos) {
|
|||
u32 i;
|
||||
|
||||
for (i = 0; i < 6; i += 2, tilePos += 0x40) {
|
||||
SetMetaTileType(META_TILE_TYPE_608 + i, tilePos, LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_609 + i, tilePos + 1, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_608 + i, tilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_609 + i, tilePos + 1, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include "sound.h"
|
||||
#include "tiles.h"
|
||||
|
||||
u32 BombableWallManager_GetBombableType(u32 metaTilePos, u32 layer);
|
||||
u32 BombableWallManager_GetBombableType(u32 tilePos, u32 layer);
|
||||
void BombableWallManager_DestroyWall(BombableWallManager*);
|
||||
|
||||
u32 getArchwayType(void);
|
||||
|
|
@ -37,8 +37,8 @@ void BombableWallManager_Main(BombableWallManager* this) {
|
|||
|
||||
void BombableWallManager_Init(BombableWallManager* this) {
|
||||
super->action = 1;
|
||||
this->metaTilePos = (this->x >> 4 & 0x3fU) | (((this->y << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
super->type = BombableWallManager_GetBombableType(this->metaTilePos, this->layer);
|
||||
this->tilePos = (this->x >> 4 & 0x3fU) | (((this->y << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
super->type = BombableWallManager_GetBombableType(this->tilePos, this->layer);
|
||||
if (CheckLocalFlag(this->flag) != 0) {
|
||||
BombableWallManager_DestroyWall(this);
|
||||
DeleteManager(super);
|
||||
|
|
@ -46,7 +46,7 @@ void BombableWallManager_Init(BombableWallManager* this) {
|
|||
}
|
||||
|
||||
void BombableWallManager_Action1(BombableWallManager* this) {
|
||||
if (GetVvvAtMetaTilePos(this->metaTilePos, this->layer) != VVV_46) {
|
||||
if (GetVvvAtTilePos(this->tilePos, this->layer) != VVV_46) {
|
||||
super->action = 2;
|
||||
super->timer = 90;
|
||||
BombableWallManager_DestroyWall(this);
|
||||
|
|
@ -61,29 +61,29 @@ void BombableWallManager_Action2(BombableWallManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
u32 BombableWallManager_GetBombableType(u32 metaTilePos, u32 layer) {
|
||||
u32 metaTileType = GetMetaTileType(metaTilePos, layer);
|
||||
u32 BombableWallManager_GetBombableType(u32 tilePos, u32 layer) {
|
||||
u32 tileType = GetTileType(tilePos, layer);
|
||||
|
||||
switch (metaTileType) {
|
||||
case META_TILE_TYPE_236:
|
||||
switch (tileType) {
|
||||
case TILE_TYPE_236:
|
||||
return 1;
|
||||
case META_TILE_TYPE_191:
|
||||
case TILE_TYPE_191:
|
||||
return 4;
|
||||
case META_TILE_TYPE_175:
|
||||
case TILE_TYPE_175:
|
||||
return 0;
|
||||
case META_TILE_TYPE_204:
|
||||
case TILE_TYPE_204:
|
||||
return 2;
|
||||
case META_TILE_TYPE_223:
|
||||
case TILE_TYPE_223:
|
||||
return 3;
|
||||
case META_TILE_TYPE_255:
|
||||
case TILE_TYPE_255:
|
||||
return 0;
|
||||
case META_TILE_TYPE_277:
|
||||
case TILE_TYPE_277:
|
||||
return 1;
|
||||
case META_TILE_TYPE_264:
|
||||
case TILE_TYPE_264:
|
||||
return 2;
|
||||
case META_TILE_TYPE_272:
|
||||
case TILE_TYPE_272:
|
||||
return 3;
|
||||
case META_TILE_TYPE_261:
|
||||
case TILE_TYPE_261:
|
||||
return 4;
|
||||
}
|
||||
return 0xff;
|
||||
|
|
@ -95,38 +95,38 @@ void BombableWallManager_DestroyWall(BombableWallManager* this) {
|
|||
BombableWallManager_DestroyWall3, BombableWallManager_DestroyWall4,
|
||||
};
|
||||
if (super->type != 0xff) {
|
||||
gUnk_08108CE8[super->type](this->metaTilePos, this->layer);
|
||||
gUnk_08108CE8[super->type](this->tilePos, this->layer);
|
||||
}
|
||||
}
|
||||
|
||||
void BombableWallManager_DestroyWall0(u32 metaTilePos, u32 layer) {
|
||||
SetMetaTileType(META_TILE_TYPE_177, metaTilePos + TILE_POS(-1, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_178, metaTilePos + TILE_POS(0, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_179, metaTilePos + TILE_POS(1, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_180, metaTilePos + TILE_POS(-1, 0), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_183, metaTilePos + TILE_POS(1, 0), layer);
|
||||
void BombableWallManager_DestroyWall0(u32 tilePos, u32 layer) {
|
||||
SetTileType(TILE_TYPE_177, tilePos + TILE_POS(-1, -1), layer);
|
||||
SetTileType(TILE_TYPE_178, tilePos + TILE_POS(0, -1), layer);
|
||||
SetTileType(TILE_TYPE_179, tilePos + TILE_POS(1, -1), layer);
|
||||
SetTileType(TILE_TYPE_180, tilePos + TILE_POS(-1, 0), layer);
|
||||
SetTileType(TILE_TYPE_183, tilePos + TILE_POS(1, 0), layer);
|
||||
if (layer == LAYER_BOTTOM) {
|
||||
if (AreaHasEnemies()) {
|
||||
Entity* object = CreateObject(ARCHWAY, 0xe, 0);
|
||||
if (object != NULL) {
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) - 8 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) - 8 + gRoomControls.origin_y;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_181, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_181, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
if (AreaIsDungeon()) {
|
||||
SetMetaTileType(META_TILE_TYPE_181, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_181, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_182, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_182, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
SetMetaTileType(META_TILE_TYPE_184, metaTilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_185, metaTilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_186, metaTilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_184, tilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_185, tilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_186, tilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
} else {
|
||||
Entity* object;
|
||||
SetMetaTileType(META_TILE_TYPE_181, metaTilePos, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_181, tilePos, LAYER_TOP);
|
||||
if (!AreaIsDungeon()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -134,41 +134,41 @@ void BombableWallManager_DestroyWall0(u32 metaTilePos, u32 layer) {
|
|||
if (object == NULL) {
|
||||
return;
|
||||
}
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) - 0x10 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) - 0x10 + gRoomControls.origin_y;
|
||||
object->collisionLayer = LAYER_TOP;
|
||||
}
|
||||
}
|
||||
|
||||
void BombableWallManager_DestroyWall1(u32 metaTilePos, u32 layer) {
|
||||
void BombableWallManager_DestroyWall1(u32 tilePos, u32 layer) {
|
||||
Entity* object;
|
||||
|
||||
SetMetaTileType(META_TILE_TYPE_241, metaTilePos + TILE_POS(0, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_245, metaTilePos + TILE_POS(1, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_246, metaTilePos + TILE_POS(1, 0), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_244, metaTilePos + TILE_POS(0, 1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_247, metaTilePos + TILE_POS(1, 1), layer);
|
||||
SetTileType(TILE_TYPE_241, tilePos + TILE_POS(0, -1), layer);
|
||||
SetTileType(TILE_TYPE_245, tilePos + TILE_POS(1, -1), layer);
|
||||
SetTileType(TILE_TYPE_246, tilePos + TILE_POS(1, 0), layer);
|
||||
SetTileType(TILE_TYPE_244, tilePos + TILE_POS(0, 1), layer);
|
||||
SetTileType(TILE_TYPE_247, tilePos + TILE_POS(1, 1), layer);
|
||||
if (layer == LAYER_BOTTOM) {
|
||||
if (AreaHasEnemies()) {
|
||||
|
||||
object = CreateObject(ARCHWAY, 0xe, 1);
|
||||
if (object != NULL) {
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 0x18 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 0x18 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_242, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_242, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
if (AreaIsDungeon()) {
|
||||
SetMetaTileType(META_TILE_TYPE_242, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_242, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_243, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_243, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_248, metaTilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_249, metaTilePos + 1, LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_250, metaTilePos + TILE_POS(1, 1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_248, tilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_249, tilePos + 1, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_250, tilePos + TILE_POS(1, 1), LAYER_TOP);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_242, metaTilePos, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_242, tilePos, LAYER_TOP);
|
||||
if (!AreaIsDungeon()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -176,40 +176,40 @@ void BombableWallManager_DestroyWall1(u32 metaTilePos, u32 layer) {
|
|||
if (object == NULL) {
|
||||
return;
|
||||
}
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 0x20 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 0x20 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
object->collisionLayer = LAYER_TOP;
|
||||
}
|
||||
}
|
||||
|
||||
void BombableWallManager_DestroyWall2(u32 metaTilePos, u32 layer) {
|
||||
void BombableWallManager_DestroyWall2(u32 tilePos, u32 layer) {
|
||||
Entity* object;
|
||||
|
||||
SetMetaTileType(META_TILE_TYPE_209, metaTilePos + TILE_POS(-1, 0), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_212, metaTilePos + TILE_POS(1, 0), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_213, metaTilePos + TILE_POS(-1, 1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_214, metaTilePos + TILE_POS(0, 1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_215, metaTilePos + TILE_POS(1, 1), layer);
|
||||
SetTileType(TILE_TYPE_209, tilePos + TILE_POS(-1, 0), layer);
|
||||
SetTileType(TILE_TYPE_212, tilePos + TILE_POS(1, 0), layer);
|
||||
SetTileType(TILE_TYPE_213, tilePos + TILE_POS(-1, 1), layer);
|
||||
SetTileType(TILE_TYPE_214, tilePos + TILE_POS(0, 1), layer);
|
||||
SetTileType(TILE_TYPE_215, tilePos + TILE_POS(1, 1), layer);
|
||||
if (layer == LAYER_BOTTOM) {
|
||||
if (AreaHasEnemies()) {
|
||||
object = CreateObject(ARCHWAY, 0xe, 2);
|
||||
if (object != NULL) {
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + 0x20 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + 0x20 + gRoomControls.origin_y;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_210, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_210, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
if (AreaIsDungeon()) {
|
||||
SetMetaTileType(META_TILE_TYPE_210, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_210, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_211, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_211, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_216, metaTilePos + TILE_POS(-1, 1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_217, metaTilePos + TILE_POS(0, 1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_218, metaTilePos + TILE_POS(1, 1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_216, tilePos + TILE_POS(-1, 1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_217, tilePos + TILE_POS(0, 1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_218, tilePos + TILE_POS(1, 1), LAYER_TOP);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_210, metaTilePos, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_210, tilePos, LAYER_TOP);
|
||||
if (AreaIsDungeon() == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -217,40 +217,40 @@ void BombableWallManager_DestroyWall2(u32 metaTilePos, u32 layer) {
|
|||
if (object == NULL) {
|
||||
return;
|
||||
}
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + 0x20 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + 0x20 + gRoomControls.origin_y;
|
||||
object->collisionLayer = LAYER_TOP;
|
||||
}
|
||||
}
|
||||
|
||||
void BombableWallManager_DestroyWall3(u32 metaTilePos, u32 layer) {
|
||||
void BombableWallManager_DestroyWall3(u32 tilePos, u32 layer) {
|
||||
Entity* object;
|
||||
|
||||
SetMetaTileType(META_TILE_TYPE_225, metaTilePos + TILE_POS(-1, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_228, metaTilePos + TILE_POS(0, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_226, metaTilePos + TILE_POS(-1, 0), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_227, metaTilePos + TILE_POS(-1, 1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_231, metaTilePos + TILE_POS(0, 1), layer);
|
||||
SetTileType(TILE_TYPE_225, tilePos + TILE_POS(-1, -1), layer);
|
||||
SetTileType(TILE_TYPE_228, tilePos + TILE_POS(0, -1), layer);
|
||||
SetTileType(TILE_TYPE_226, tilePos + TILE_POS(-1, 0), layer);
|
||||
SetTileType(TILE_TYPE_227, tilePos + TILE_POS(-1, 1), layer);
|
||||
SetTileType(TILE_TYPE_231, tilePos + TILE_POS(0, 1), layer);
|
||||
if (layer == LAYER_BOTTOM) {
|
||||
if (AreaHasEnemies()) {
|
||||
object = CreateObject(ARCHWAY, 0xe, 3);
|
||||
if (object != NULL) {
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + -0x10 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + -0x10 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_229, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_229, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
if (AreaIsDungeon()) {
|
||||
SetMetaTileType(META_TILE_TYPE_229, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_229, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_230, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_230, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_232, metaTilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_233, metaTilePos + TILE_POS(-1, 0), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_234, metaTilePos + TILE_POS(-1, 1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_232, tilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_233, tilePos + TILE_POS(-1, 0), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_234, tilePos + TILE_POS(-1, 1), LAYER_TOP);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_229, metaTilePos, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_229, tilePos, LAYER_TOP);
|
||||
if (!AreaIsDungeon()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -259,40 +259,40 @@ void BombableWallManager_DestroyWall3(u32 metaTilePos, u32 layer) {
|
|||
if (object == NULL) {
|
||||
return;
|
||||
}
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + -0x10 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + -0x10 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + 8 + gRoomControls.origin_y;
|
||||
object->collisionLayer = LAYER_TOP;
|
||||
}
|
||||
}
|
||||
|
||||
void BombableWallManager_DestroyWall4(u32 metaTilePos, u32 layer) {
|
||||
void BombableWallManager_DestroyWall4(u32 tilePos, u32 layer) {
|
||||
Entity* object;
|
||||
|
||||
SetMetaTileType(META_TILE_TYPE_193, metaTilePos + TILE_POS(-1, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_194, metaTilePos + TILE_POS(0, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_195, metaTilePos + TILE_POS(1, -1), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_196, metaTilePos + TILE_POS(-1, 0), layer);
|
||||
SetMetaTileType(META_TILE_TYPE_199, metaTilePos + TILE_POS(1, 0), layer);
|
||||
SetTileType(TILE_TYPE_193, tilePos + TILE_POS(-1, -1), layer);
|
||||
SetTileType(TILE_TYPE_194, tilePos + TILE_POS(0, -1), layer);
|
||||
SetTileType(TILE_TYPE_195, tilePos + TILE_POS(1, -1), layer);
|
||||
SetTileType(TILE_TYPE_196, tilePos + TILE_POS(-1, 0), layer);
|
||||
SetTileType(TILE_TYPE_199, tilePos + TILE_POS(1, 0), layer);
|
||||
if (layer == LAYER_BOTTOM) {
|
||||
if (AreaHasEnemies()) {
|
||||
object = CreateObject(ARCHWAY, 0xe, 0);
|
||||
if (object != NULL) {
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + -0x10 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + -0x10 + gRoomControls.origin_y;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_197, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_197, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
if (AreaIsDungeon()) {
|
||||
SetMetaTileType(META_TILE_TYPE_197, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_197, tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_198, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_198, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_200, metaTilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_201, metaTilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_202, metaTilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_200, tilePos + TILE_POS(-1, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_201, tilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_202, tilePos + TILE_POS(1, -1), LAYER_TOP);
|
||||
} else {
|
||||
SetMetaTileType(META_TILE_TYPE_197, metaTilePos, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_197, tilePos, LAYER_TOP);
|
||||
if (!AreaIsDungeon()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -301,8 +301,8 @@ void BombableWallManager_DestroyWall4(u32 metaTilePos, u32 layer) {
|
|||
if (object == NULL) {
|
||||
return;
|
||||
}
|
||||
object->x.HALF.HI = ((metaTilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((metaTilePos & 0xfc0) >> 2) + -0x10 + gRoomControls.origin_y;
|
||||
object->x.HALF.HI = ((tilePos & 0x3f) << 4) + 8 + gRoomControls.origin_x;
|
||||
object->y.HALF.HI = ((tilePos & 0xfc0) >> 2) + -0x10 + gRoomControls.origin_y;
|
||||
object->collisionLayer = LAYER_TOP;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void DestructibleTileObserveManager_Main(DestructibleTileObserveManager* this) {
|
|||
|
||||
void sub_0805CFF0(DestructibleTileObserveManager_unk* param_1) {
|
||||
if (!CheckLocalFlag(param_1->flag)) {
|
||||
u32 tileType = GetMetaTileType(param_1->tilePos, param_1->tileLayer);
|
||||
u32 tileType = GetTileType(param_1->tilePos, param_1->tileLayer);
|
||||
if (param_1->tileType == tileType) {
|
||||
SetLocalFlag(param_1->flag);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ void DiggingCaveEntranceManager_Init(DiggingCaveEntranceManager* this) {
|
|||
const DiggingCaveEntrance* entrance;
|
||||
u8 room;
|
||||
u8 area;
|
||||
u16 tile = SPECIAL_META_TILE_128;
|
||||
u16 tileIndex = SPECIAL_TILE_128;
|
||||
UpdateIsDiggingCave();
|
||||
if (gDiggingCaveEntranceTransition.isDiggingCave) {
|
||||
if (gDiggingCaveEntranceTransition.entrance == NULL) {
|
||||
|
|
@ -51,12 +51,12 @@ void DiggingCaveEntranceManager_Init(DiggingCaveEntranceManager* this) {
|
|||
}
|
||||
room = gRoomControls.room;
|
||||
entrance = diggingCaveEntrances[gRoomControls.area];
|
||||
tile = SPECIAL_META_TILE_128;
|
||||
tileIndex = SPECIAL_TILE_128;
|
||||
for (entrance = GetDiggingCaveEntranceForRoom(entrance, room); entrance != 0;
|
||||
entrance = GetDiggingCaveEntranceForRoom(entrance, room)) {
|
||||
SetMetaTile(tile, entrance->sourceTilePosition + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(tile, entrance->sourceTilePosition + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetMetaTile(tile, entrance->sourceTilePosition + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePosition + TILE_POS(-1, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePosition + TILE_POS(0, 1), LAYER_BOTTOM);
|
||||
SetTile(tileIndex, entrance->sourceTilePosition + TILE_POS(1, 1), LAYER_BOTTOM);
|
||||
entrance++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,20 +14,20 @@
|
|||
|
||||
void FlameManager_Main(FlameManager* this) {
|
||||
if (super->action == 0) {
|
||||
this->metaTilePos = TILE(this->metaTilePos, this->field_0x3a);
|
||||
if (GetMetaTileType(this->metaTilePos, LAYER_TOP) == META_TILE_TYPE_117) {
|
||||
this->tilePos = TILE(this->tilePos, this->field_0x3a);
|
||||
if (GetTileType(this->tilePos, LAYER_TOP) == TILE_TYPE_117) {
|
||||
super->action = 1;
|
||||
SetMetaTile(SPECIAL_META_TILE_106, this->metaTilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_106, this->tilePos, LAYER_BOTTOM);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
if (GetMetaTileType(this->metaTilePos, LAYER_BOTTOM) == SPECIAL_META_TILE_107) {
|
||||
sub_0807B7D8(META_TILE_TYPE_118, this->metaTilePos, LAYER_TOP);
|
||||
if (GetTileType(this->tilePos, LAYER_BOTTOM) == SPECIAL_TILE_107) {
|
||||
sub_0807B7D8(TILE_TYPE_118, this->tilePos, LAYER_TOP);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (GetMetaTileType(this->metaTilePos, LAYER_TOP) == META_TILE_TYPE_118) {
|
||||
SetMetaTile(SPECIAL_META_TILE_107, this->metaTilePos, LAYER_BOTTOM);
|
||||
if (GetTileType(this->tilePos, LAYER_TOP) == TILE_TYPE_118) {
|
||||
SetTile(SPECIAL_TILE_107, this->tilePos, LAYER_BOTTOM);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void sub_08057F20(HorizontalMinishPathBackgroundManager* this) {
|
|||
tmp = tmp + (tmp >> 3) + ((0x400 - gRoomControls.width) / 2);
|
||||
gScreen.bg3.xOffset = tmp & 0xF;
|
||||
gScreen.bg3.yOffset = 0x30 - ((0x30 - (gRoomControls.scroll_y - gRoomControls.origin_y)) >> 2);
|
||||
gScreen.bg3.tilemap = gBG3Buffer;
|
||||
gScreen.bg3.subTileMap = gBG3Buffer;
|
||||
sub_08058004(tmp, gUnk_02006F00, gBG3Buffer);
|
||||
tmp = ((tmp >> 4) << 1);
|
||||
if (this->unk_38 != tmp) {
|
||||
|
|
@ -53,7 +53,7 @@ void sub_08057F20(HorizontalMinishPathBackgroundManager* this) {
|
|||
tmp = tmp + (tmp >> 2) + ((0x400 - gRoomControls.width) / 2);
|
||||
gScreen.bg1.xOffset = tmp & 0xF;
|
||||
gScreen.bg1.yOffset = 0x30 - ((0x30 - (gRoomControls.scroll_y - gRoomControls.origin_y)) >> 1);
|
||||
gScreen.bg1.tilemap = gBG3Buffer + 0x400;
|
||||
gScreen.bg1.subTileMap = gBG3Buffer + 0x400;
|
||||
sub_08058004(tmp, gUnk_02006F00 + 0x2000, gBG3Buffer + 0x400);
|
||||
tmp = ((tmp >> 4) << 1);
|
||||
if (this->unk_3c != tmp) {
|
||||
|
|
@ -111,7 +111,7 @@ void sub_080580B0(u32 unk1) {
|
|||
gScreen.bg3.xOffset = tmp & 0xF;
|
||||
gScreen.bg3.yOffset = 0x30 - ((0x30 - (gRoomControls.scroll_y - gRoomControls.origin_y)) >> 1); //?
|
||||
gScreen.bg3.control = 0x1D09;
|
||||
gScreen.bg3.tilemap = gBG3Buffer;
|
||||
gScreen.bg3.subTileMap = gBG3Buffer;
|
||||
gScreen.bg3.updated = 1;
|
||||
tmp = gRoomControls.scroll_x - gRoomControls.origin_x;
|
||||
tmp = tmp + (tmp >> 2) + (0x400 - gRoomControls.width) / 2;
|
||||
|
|
@ -119,7 +119,7 @@ void sub_080580B0(u32 unk1) {
|
|||
gScreen.bg1.xOffset = tmp & 0xF;
|
||||
gScreen.bg1.yOffset = 0x30 - ((0x30 - (gRoomControls.scroll_y - gRoomControls.origin_y)) >> 1); //?
|
||||
gScreen.bg1.control = 0x1E09;
|
||||
gScreen.bg1.tilemap = gBG3Buffer + 0x400;
|
||||
gScreen.bg1.subTileMap = gBG3Buffer + 0x400;
|
||||
gScreen.bg1.updated = 1;
|
||||
gScreen.controls.layerFXControl = 0x3C48;
|
||||
gScreen.controls.alphaBlend = 0x609;
|
||||
|
|
|
|||
|
|
@ -114,32 +114,32 @@ void sub_08059B18(void) {
|
|||
if (CheckGlobalFlag(TATEKAKE_HOUSE) != 0) {
|
||||
for (loopVar = 0; loopVar < 4; ++loopVar) {
|
||||
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
|
||||
SetMetaTileByIndex(loopVar * 0x10 + META_TILE_TYPE_1195 + innerLoopVar,
|
||||
SetTileByIndex(loopVar * 0x10 + TILE_TYPE_1195 + innerLoopVar,
|
||||
COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (loopVar = 0; loopVar < 3; ++loopVar) {
|
||||
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
|
||||
SetMetaTileByIndex(loopVar * 0x10 + META_TILE_TYPE_1088 + innerLoopVar,
|
||||
SetTileByIndex(loopVar * 0x10 + TILE_TYPE_1088 + innerLoopVar,
|
||||
COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 2);
|
||||
}
|
||||
}
|
||||
SetMetaTileByIndex(META_TILE_TYPE_214, TILE_POS(2, 23), LAYER_TOP);
|
||||
SetMetaTileByIndex(META_TILE_TYPE_215, TILE_POS(3, 23), LAYER_TOP);
|
||||
SetTileByIndex(TILE_TYPE_214, TILE_POS(2, 23), LAYER_TOP);
|
||||
SetTileByIndex(TILE_TYPE_215, TILE_POS(3, 23), LAYER_TOP);
|
||||
LoadResourceAsync(&gUnk_086E8460, 0x6001800, 0x800);
|
||||
} else {
|
||||
if (CheckGlobalFlag(TATEKAKE_TOCHU) != 0) {
|
||||
for (loopVar = 0; loopVar < 5; ++loopVar) {
|
||||
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
|
||||
SetMetaTileByIndex(loopVar * 0x10 + META_TILE_TYPE_1190 + innerLoopVar,
|
||||
SetTileByIndex(loopVar * 0x10 + TILE_TYPE_1190 + innerLoopVar,
|
||||
COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
|
||||
}
|
||||
}
|
||||
SetMetaTileByIndex(META_TILE_TYPE_1092, TILE_POS(2, 24), LAYER_TOP);
|
||||
SetMetaTileByIndex(META_TILE_TYPE_1093, TILE_POS(5, 24), LAYER_TOP);
|
||||
SetMetaTileByIndex(META_TILE_TYPE_1108, TILE_POS(2, 25), LAYER_TOP);
|
||||
SetMetaTileByIndex(META_TILE_TYPE_1109, TILE_POS(5, 25), LAYER_TOP);
|
||||
SetTileByIndex(TILE_TYPE_1092, TILE_POS(2, 24), LAYER_TOP);
|
||||
SetTileByIndex(TILE_TYPE_1093, TILE_POS(5, 24), LAYER_TOP);
|
||||
SetTileByIndex(TILE_TYPE_1108, TILE_POS(2, 25), LAYER_TOP);
|
||||
SetTileByIndex(TILE_TYPE_1109, TILE_POS(5, 25), LAYER_TOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ void LightLevelSetManager_Type0(LightLevelSetManager*);
|
|||
void LightLevelSetManager_Type1(LightLevelSetManager*);
|
||||
void LightLevelSetManager_Type2(LightLevelSetManager*);
|
||||
void LightLevelSetManager_Type3(LightLevelSetManager*);
|
||||
void sub_0805BE70(LightLevelSetManager* this, u32 metaTileType);
|
||||
void sub_0805BE70(LightLevelSetManager* this, u32 tileType);
|
||||
|
||||
void LightLevelSetManager_Main(Manager* this) {
|
||||
static void (*const LightLevelSetManager_Types[])(LightLevelSetManager*) = {
|
||||
|
|
@ -50,7 +50,7 @@ void LightLevelSetManager_Type1(LightLevelSetManager* this) {
|
|||
super->action = 1;
|
||||
super->subtimer = 30;
|
||||
if (CheckFlags(this->field_0x3e) != 0) {
|
||||
sub_0805BE70(this, META_TILE_TYPE_117);
|
||||
sub_0805BE70(this, TILE_TYPE_117);
|
||||
super->action = 2;
|
||||
}
|
||||
break;
|
||||
|
|
@ -58,13 +58,13 @@ void LightLevelSetManager_Type1(LightLevelSetManager* this) {
|
|||
if (CheckFlags(this->field_0x3e) != 0 && --super->subtimer == 0) {
|
||||
super->subtimer = 30;
|
||||
sub_0805BEC4(this);
|
||||
sub_0805BE70(this, META_TILE_TYPE_118);
|
||||
sub_0805BE70(this, TILE_TYPE_118);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (CheckFlags(this->field_0x3e) == 0 && --super->subtimer == 0) {
|
||||
super->subtimer = 30;
|
||||
sub_0805BE70(this, META_TILE_TYPE_117);
|
||||
sub_0805BE70(this, TILE_TYPE_117);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ void LightLevelSetManager_Type2(LightLevelSetManager* this) {
|
|||
((s16)this->field_0x38 >> 4 & 0x3fU) | ((s32)((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
super->action = 1;
|
||||
} else {
|
||||
if (GetMetaTileType(this->field_0x20, super->type2) == META_TILE_TYPE_118) {
|
||||
if (GetTileType(this->field_0x20, super->type2) == TILE_TYPE_118) {
|
||||
SetFlag(this->field_0x3e);
|
||||
ChangeLightLevel(super->timer);
|
||||
DeleteThisEntity();
|
||||
|
|
@ -103,7 +103,7 @@ void LightLevelSetManager_Type3(LightLevelSetManager* this) {
|
|||
break;
|
||||
|
||||
case 1:
|
||||
if (GetMetaTileType(this->field_0x20, super->type2) != META_TILE_TYPE_118) {
|
||||
if (GetTileType(this->field_0x20, super->type2) != TILE_TYPE_118) {
|
||||
return;
|
||||
}
|
||||
SetFlag(this->field_0x3e);
|
||||
|
|
@ -131,14 +131,14 @@ void LightLevelSetManager_Type3(LightLevelSetManager* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0805BE70(LightLevelSetManager* this, u32 metaTileType) {
|
||||
SetMetaTileType(metaTileType,
|
||||
void sub_0805BE70(LightLevelSetManager* this, u32 tileType) {
|
||||
SetTileType(tileType,
|
||||
((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
|
||||
super->type2);
|
||||
}
|
||||
|
||||
void sub_0805BE94(LightLevelSetManager* this) {
|
||||
SetMetaTileType(META_TILE_TYPE_118,
|
||||
SetTileType(TILE_TYPE_118,
|
||||
((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
|
||||
super->type2);
|
||||
ChangeLightLevel(super->timer);
|
||||
|
|
|
|||
|
|
@ -215,9 +215,9 @@ void sub_08057450(LightRayManager* this) {
|
|||
y >>= 2;
|
||||
|
||||
gScreen.bg3.yOffset = y & 0x3f;
|
||||
gScreen.bg3.tilemap = &gBG3Buffer[(y / 0x40) << 8];
|
||||
if (this->unk_34 != gScreen.bg3.tilemap) {
|
||||
this->unk_34 = gScreen.bg3.tilemap;
|
||||
gScreen.bg3.subTileMap = &gBG3Buffer[(y / 0x40) << 8];
|
||||
if (this->unk_34 != gScreen.bg3.subTileMap) {
|
||||
this->unk_34 = gScreen.bg3.subTileMap;
|
||||
gScreen.bg3.updated = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ void sub_0805CBD0(Manager29* this) {
|
|||
super->action = 1;
|
||||
this->unk_38 = (this->unk_38 >> 4 & 0x3fU) | (((this->unk_3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
this->unk_3a = (this->unk_3c >> 4 & 0x3f) | (((this->unk_36 + this->unk_37 * 0x100) >> 4 & 0x3fU) << 6);
|
||||
this->unk_3c = GetMetaTileType(this->unk_38, this->layer);
|
||||
this->unk_3c = GetTileType(this->unk_38, this->layer);
|
||||
mapLayer = GetLayerByIndex(this->layer);
|
||||
this->unk_28 = (u16*)mapLayer->metatileTypes;
|
||||
this->unk_28 = (u16*)mapLayer->tileTypes;
|
||||
this->unk_2c = &mapLayer->mapData[(s16)this->unk_3a];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ void sub_08058324(u32 unk) {
|
|||
sub_080582D0();
|
||||
sub_080582A0(sub_08058244(unk), gUnk_02006F00, gBG3Buffer);
|
||||
gScreen.bg1.control = 0x1D47;
|
||||
gScreen.bg1.tilemap = gBG3Buffer;
|
||||
gScreen.bg1.subTileMap = gBG3Buffer;
|
||||
gScreen.bg1.updated = 1;
|
||||
gScreen.lcd.displayControl |= 0x200;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,9 +121,9 @@ void MiscManager_Type0(MiscManager* this) {
|
|||
void sub_08058F44(u32 x, u32 y, u32 flag) {
|
||||
if (CheckRoomFlag(flag))
|
||||
return;
|
||||
if (sub_080B1A48(x, y, LAYER_BOTTOM) != META_TILE_TYPE_97)
|
||||
if (sub_080B1A48(x, y, LAYER_BOTTOM) != TILE_TYPE_97)
|
||||
return;
|
||||
SetMetaTileType(META_TILE_TYPE_38, ((x >> 4) & 0x3F) | (((y >> 4) & 0x3F) << 6), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_38, ((x >> 4) & 0x3F) | (((y >> 4) & 0x3F) << 6), LAYER_BOTTOM);
|
||||
sub_08058F84(x, y);
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ void MiscManager_Type5(MiscManager* this) {
|
|||
DeleteThisEntity();
|
||||
}
|
||||
super->action = 1;
|
||||
SetMetaTileType(META_TILE_TYPE_869, TILE_LOCAL(this->x, this->y), super->type2);
|
||||
SetTileType(TILE_TYPE_869, TILE_LOCAL(this->x, this->y), super->type2);
|
||||
break;
|
||||
case 1:
|
||||
if (CheckFlags(this->flags)) {
|
||||
|
|
@ -338,10 +338,10 @@ void sub_0805930C(MiscManager* this) {
|
|||
tmp->collisionLayer = 1;
|
||||
}
|
||||
|
||||
void SetDirtTile(u32 metaTilePos) {
|
||||
SetMetaTileType(META_TILE_TYPE_29, metaTilePos, LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_0, metaTilePos, LAYER_TOP);
|
||||
SetMetaTileType(META_TILE_TYPE_0, metaTilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
void SetDirtTile(u32 tilePos) {
|
||||
SetTileType(TILE_TYPE_29, tilePos, LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_0, tilePos, LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_0, tilePos + TILE_POS(0, -1), LAYER_TOP);
|
||||
}
|
||||
|
||||
void MiscManager_TypeA(MiscManager* this) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ void RailIntersectionManager_Init(RailIntersectionManager* this) {
|
|||
super->type2 = 1;
|
||||
}
|
||||
super->action = 1;
|
||||
this->metaTilePos = (this->metaTilePos >> 4 & 0x3fU) | (((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
this->tilePos = (this->tilePos >> 4 & 0x3fU) | (((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
sub_0805B778(this);
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ void RailIntersectionManager_Action1(RailIntersectionManager* this) {
|
|||
}
|
||||
|
||||
void sub_0805B778(RailIntersectionManager* this) {
|
||||
static const u16 gUnk_08108C9C[] = { META_TILE_TYPE_856, META_TILE_TYPE_857, META_TILE_TYPE_854,
|
||||
META_TILE_TYPE_858, META_TILE_TYPE_858, META_TILE_TYPE_855 };
|
||||
SetMetaTileType(gUnk_08108C9C[super->type * 2 + super->type2], this->metaTilePos, this->layer);
|
||||
static const u16 gUnk_08108C9C[] = { TILE_TYPE_856, TILE_TYPE_857, TILE_TYPE_854,
|
||||
TILE_TYPE_858, TILE_TYPE_858, TILE_TYPE_855 };
|
||||
SetTileType(gUnk_08108C9C[super->type * 2 + super->type2], this->tilePos, this->layer);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ void sub_0805A9CC(TempleOfDropletsManager* this) {
|
|||
tmp1 = gRoomControls.scroll_y - this->unk_26 + this->unk_36;
|
||||
gScreen.bg3.yOffset = tmp1 & 0x3F;
|
||||
tmp3 = (&gBG3Buffer[((tmp1 / 0x40) << 8)]);
|
||||
gScreen.bg3.tilemap = (u32*)tmp3;
|
||||
gScreen.bg3.subTileMap = (u32*)tmp3;
|
||||
gScreen.controls.window1VerticalDimensions = DISPLAY_HEIGHT;
|
||||
if (this->unk_28 == tmp3)
|
||||
return;
|
||||
|
|
@ -524,7 +524,7 @@ void sub_0805AAF0(u32 unk0) {
|
|||
gScreen.controls.layerFXControl = 0x3E48;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(8, 16);
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(1);
|
||||
gScreen.bg3.tilemap = &gBG3Buffer;
|
||||
gScreen.bg3.subTileMap = &gBG3Buffer;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.yOffset = 0;
|
||||
gScreen.bg3.updated = 1;
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ void TileChangeObserveManager_Main(TileChangeObserveManager* this) {
|
|||
}
|
||||
|
||||
void TileChangeObserveManager_Init(TileChangeObserveManager* this) {
|
||||
u16* tile;
|
||||
u16* tileIndex;
|
||||
if (CheckFlags(this->flag) != 0) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
super->action = 1;
|
||||
tile = &GetLayerByIndex(this->field_0x3a)->mapData[this->tilePosition];
|
||||
this->observedTile = tile;
|
||||
this->initialTile = tile[0];
|
||||
tileIndex = &GetLayerByIndex(this->field_0x3a)->mapData[this->tilePos];
|
||||
this->observedTile = tileIndex;
|
||||
this->initialTile = tileIndex[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,16 +31,16 @@ void TilePuzzleManager_Main(TilePuzzleManager* this) {
|
|||
this->player_current_tile = COORD_TO_TILE((&gPlayerEntity.base));
|
||||
if (this->player_current_tile != this->player_previous_tile) {
|
||||
this->player_previous_tile = this->player_current_tile;
|
||||
switch (GetMetaTileType(this->player_current_tile, super->type2)) {
|
||||
case META_TILE_TYPE_791:
|
||||
switch (GetTileType(this->player_current_tile, super->type2)) {
|
||||
case TILE_TYPE_791:
|
||||
// stepped on a red tile again
|
||||
super->action = FAILED;
|
||||
SoundReq(SFX_MENU_ERROR);
|
||||
break;
|
||||
case META_TILE_TYPE_792:
|
||||
case TILE_TYPE_792:
|
||||
// stepped on a blue tile
|
||||
// turn the tile into a red tile
|
||||
sub_0807B7D8(META_TILE_TYPE_791, this->player_current_tile, super->type2);
|
||||
sub_0807B7D8(TILE_TYPE_791, this->player_current_tile, super->type2);
|
||||
SoundReq(SFX_6B);
|
||||
// decrease the number of remaining tiles and check if we're done
|
||||
if (--super->timer == 0) {
|
||||
|
|
|
|||
|
|
@ -30,17 +30,17 @@ void sub_0805754C(VerticalMinishPathBackgroundManager* this) {
|
|||
bgOffset = (gRoomControls.scroll_y - gRoomControls.origin_y);
|
||||
bgOffset += bgOffset >> 3;
|
||||
gScreen.bg3.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg3.tilemap = gMapDataTopSpecial + (bgOffset / 0x40) * 0x200;
|
||||
if (this->field_0x38 != gScreen.bg3.tilemap) {
|
||||
this->field_0x38 = gScreen.bg3.tilemap;
|
||||
gScreen.bg3.subTileMap = gMapDataTopSpecial + (bgOffset / 0x40) * 0x200;
|
||||
if (this->field_0x38 != gScreen.bg3.subTileMap) {
|
||||
this->field_0x38 = gScreen.bg3.subTileMap;
|
||||
gScreen.bg3.updated = 1;
|
||||
}
|
||||
bgOffset = (gRoomControls.scroll_y - gRoomControls.origin_y);
|
||||
bgOffset += bgOffset >> 2;
|
||||
gScreen.bg1.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg1.tilemap = gMapDataTopSpecial + 0x2000 + (bgOffset / 0x40) * 0x200;
|
||||
if (this->field_0x3c != gScreen.bg1.tilemap) {
|
||||
this->field_0x3c = gScreen.bg1.tilemap;
|
||||
gScreen.bg1.subTileMap = gMapDataTopSpecial + 0x2000 + (bgOffset / 0x40) * 0x200;
|
||||
if (this->field_0x3c != gScreen.bg1.subTileMap) {
|
||||
this->field_0x3c = gScreen.bg1.subTileMap;
|
||||
gScreen.bg1.updated = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ void sub_080575C8(u32 param) {
|
|||
bgOffset += bgOffset >> 3;
|
||||
gScreen.bg3.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg3.xOffset = 0;
|
||||
gScreen.bg3.tilemap = &gMapDataTopSpecial[(bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg3.subTileMap = &gMapDataTopSpecial[(bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg3.control = BGCNT_SCREENBASE(29) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg3.updated = 1;
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ void sub_080575C8(u32 param) {
|
|||
bgOffset += bgOffset >> 2;
|
||||
gScreen.bg1.yOffset = bgOffset & 0x3f;
|
||||
gScreen.bg1.xOffset = 0;
|
||||
gScreen.bg1.tilemap = &gMapDataTopSpecial[0x2000 + (bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg1.subTileMap = &gMapDataTopSpecial[0x2000 + (bgOffset / 0x40) * 0x200];
|
||||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
gScreen.bg1.updated = 1;
|
||||
gScreen.controls.layerFXControl =
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "tiles.h"
|
||||
|
||||
void WaterfallBottomManager_Main(WaterfallBottomManager* this) {
|
||||
SetMetaTile(SPECIAL_META_TILE_20, TILE_POS(3, 23), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_20, TILE_POS(3, 23), LAYER_BOTTOM);
|
||||
if ((gRoomControls.origin_y + 200 < gPlayerEntity.base.y.HALF.HI) &&
|
||||
((u32)(gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x) - 0x30 < 0x11)) {
|
||||
gPlayerEntity.base.collisionLayer = 3;
|
||||
|
|
|
|||
|
|
@ -2162,7 +2162,7 @@ bool32 ProcessMovement3(Entity* this) {
|
|||
}
|
||||
|
||||
bool32 sub_080AF0C8(Entity* this) {
|
||||
u32 tileType = GetMetaTileTypeByEntity(this);
|
||||
u32 tileType = GetTileTypeByEntity(this);
|
||||
switch (tileType) {
|
||||
case 0x87:
|
||||
if (((this->direction + 7) & (0x3 | DIR_DIAGONAL | DirectionNorth | DirectionEast | DirectionSouth |
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ void sub_0806D0B0(Entity* this) {
|
|||
sub_0806D164(this);
|
||||
}
|
||||
gScreen.bg1.control = 0x1d47;
|
||||
gScreen.bg1.tilemap = &gMapDataTopSpecial;
|
||||
gScreen.bg1.subTileMap = &gMapDataTopSpecial;
|
||||
gScreen.bg1.updated = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,20 +80,20 @@ void sub_08067418(CastorWildsStatueEntity* this) {
|
|||
this->tilePos = COORD_TO_TILE(super);
|
||||
if (super->type == 0) {
|
||||
super->hitbox = (Hitbox*)&gUnk_08110E94;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePos - 1, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePos, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePos + 0x3f, super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, this->tilePos + 0x40, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos - 1, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + 0x3f, super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, this->tilePos + 0x40, super->collisionLayer);
|
||||
} else {
|
||||
super->collisionLayer = 3;
|
||||
super->spriteOrientation.flipY = 1;
|
||||
super->spriteRendering.b3 = 1;
|
||||
super->spritePriority.b0 = 2;
|
||||
if (CheckLocalFlag(HIKYOU_00_SEKIZOU) == 0) {
|
||||
SetMetaTile(SPECIAL_META_TILE_34, TILE_POS(1, 58), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, TILE_POS(2, 58), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, TILE_POS(3, 58), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, TILE_POS(3, 59), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, TILE_POS(1, 58), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, TILE_POS(2, 58), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, TILE_POS(3, 58), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_34, TILE_POS(3, 59), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
InitScriptForNPC(super);
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ void sub_0806DD90(Entity* this) {
|
|||
InitializeAnimation(this, animIndex);
|
||||
x = this->x.HALF.HI;
|
||||
y = this->y.HALF.HI;
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(x - 24, y - 16), this->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(x - 24, y), this->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(x - 24, y + 16), this->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(x + 24, y - 16), this->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(x + 24, y), this->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(x + 24, y + 16), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(x - 24, y - 16), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(x - 24, y), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(x - 24, y + 16), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(x + 24, y - 16), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(x + 24, y), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(x + 24, y + 16), this->collisionLayer);
|
||||
}
|
||||
|
||||
void sub_0806DEC8(Entity* this) {
|
||||
|
|
|
|||
|
|
@ -106,10 +106,10 @@ void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
|
|||
}
|
||||
|
||||
void sub_0806BEFC(void) {
|
||||
SetMetaTileType(META_TILE_TYPE_382, TILE_POS(14, 22), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_383, TILE_POS(15, 22), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_384, TILE_POS(14, 23), LAYER_BOTTOM);
|
||||
SetMetaTileType(META_TILE_TYPE_385, TILE_POS(15, 23), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_382, TILE_POS(14, 22), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_383, TILE_POS(15, 22), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_384, TILE_POS(14, 23), LAYER_BOTTOM);
|
||||
SetTileType(TILE_TYPE_385, TILE_POS(15, 23), LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void sub_0806BF44(Entity* this, ScriptExecutionContext* context) {
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ void sub_08069B44(DogEntity* this) {
|
|||
super->action = 4;
|
||||
}
|
||||
if ((super->type == 2) && (CheckLocalFlag(MACHI_02_DOG) == 0)) {
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE(super->x.HALF.HI, super->y.HALF.HI - 8), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_114, TILE(super->x.HALF.HI, super->y.HALF.HI - 8), super->collisionLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -541,12 +541,12 @@ void sub_080626E0(Entity* this, ScriptExecutionContext* context) {
|
|||
}
|
||||
|
||||
void sub_08062788(Entity* this, ScriptExecutionContext* context) {
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE_POS(11, 24), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE_POS(12, 24), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE_POS(13, 24), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE_POS(11, 25), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE_POS(12, 25), LAYER_BOTTOM);
|
||||
SetMetaTile(SPECIAL_META_TILE_114, TILE_POS(13, 25), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_114, TILE_POS(11, 24), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_114, TILE_POS(12, 24), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_114, TILE_POS(13, 24), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_114, TILE_POS(11, 25), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_114, TILE_POS(12, 25), LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_114, TILE_POS(13, 25), LAYER_BOTTOM);
|
||||
}
|
||||
|
||||
void sub_080627E8(Entity* this, ScriptExecutionContext* context) {
|
||||
|
|
|
|||
|
|
@ -198,18 +198,18 @@ void NPC4E_RestoreEquippedItems(NPC4EEntity* this) {
|
|||
void sub_0806DC7C(void) {
|
||||
const u16* tiles = gUnk_081141F4;
|
||||
while (*tiles != 0) {
|
||||
u32 metaTilePos = *tiles;
|
||||
u32 tilePos = *tiles;
|
||||
tiles = tiles + 1;
|
||||
SetMetaTileType(SPECIAL_META_TILE_114, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_114, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806DCA0(void) {
|
||||
const u16* tiles = gUnk_081141F4;
|
||||
while (*tiles != 0) {
|
||||
u32 metaTilePos = *tiles;
|
||||
u32 tilePos = *tiles;
|
||||
tiles = tiles + 1;
|
||||
RestorePrevTileEntity(metaTilePos, LAYER_BOTTOM);
|
||||
RestorePrevTileEntity(tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ void sub_0806C224(void) {
|
|||
|
||||
void Simon_CreateChest(Entity* this) {
|
||||
CreateObjectWithParent(this, SPECIAL_FX, FX_BIG_EXPLOSION2, 0);
|
||||
SetMetaTileType(META_TILE_TYPE_115, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SetTileType(TILE_TYPE_115, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SoundReq(SFX_SECRET_BIG);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ void sub_0806B0E0(Entity* this, ScriptExecutionContext* context) {
|
|||
static const u16 gUnk_08112C5C[2] = { TEXT_INDEX(TEXT_TOWN_MINISH2, 0x25), TEXT_INDEX(TEXT_TOWN_MINISH2, 0x26) };
|
||||
int idx = 0;
|
||||
|
||||
// Checks if the dust is gone at these four meta tiles.
|
||||
// Checks if the dust is gone at these four tiles.
|
||||
if (GetVvvAtRoomCoords(56, 184, 1) == VVV_87 && GetVvvAtRoomCoords(72, 184, 1) == VVV_87 &&
|
||||
GetVvvAtRoomCoords(56, 200, 1) == VVV_87 && GetVvvAtRoomCoords(72, 200, 1) == VVV_87) {
|
||||
idx = 1;
|
||||
|
|
|
|||
|
|
@ -172,14 +172,14 @@ static const u16 gUnk_08110BE0[] = {
|
|||
};
|
||||
|
||||
void sub_08066F94(void) {
|
||||
u16 metaTilePos;
|
||||
u16 tilePos;
|
||||
const u16* puVar2;
|
||||
|
||||
puVar2 = gUnk_08110BE0;
|
||||
while (*puVar2 != 0) {
|
||||
metaTilePos = *puVar2;
|
||||
tilePos = *puVar2;
|
||||
puVar2++;
|
||||
SetMetaTileType(SPECIAL_META_TILE_114, metaTilePos, LAYER_BOTTOM);
|
||||
SetTileType(SPECIAL_TILE_114, tilePos, LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ void AngryStatue(Entity* this) {
|
|||
void AngryStatue_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->hitbox = (Hitbox*)&gUnk_080FD178;
|
||||
SetMetaTile(SPECIAL_META_TILE_34, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, COORD_TO_TILE(this), this->collisionLayer);
|
||||
InitializeAnimation(this, this->type);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,18 +102,18 @@ void BakerOven_Action2(BakerOvenEntity* this) {
|
|||
}
|
||||
|
||||
void sub_0809CDF0(BakerOvenEntity* this) {
|
||||
u32 metaTilePos;
|
||||
u32 tilePos;
|
||||
|
||||
this->unk_80 = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3f) |
|
||||
(((super->y.HALF.HI - gRoomControls.origin_y) >> 4 & 0x3f) << 6);
|
||||
|
||||
metaTilePos = this->unk_80;
|
||||
SetMetaTile(SPECIAL_META_TILE_46, metaTilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_34, metaTilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_36, metaTilePos + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(-1, -2), super->collisionLayer);
|
||||
SetMetaTile(SPECIAL_META_TILE_38, metaTilePos + TILE_POS(0, -2), super->collisionLayer);
|
||||
tilePos = this->unk_80;
|
||||
SetTile(SPECIAL_TILE_46, tilePos + TILE_POS(-1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + TILE_POS(0, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_34, tilePos + TILE_POS(1, 0), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(-1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(0, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_36, tilePos + TILE_POS(1, -1), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(-1, -2), super->collisionLayer);
|
||||
SetTile(SPECIAL_TILE_38, tilePos + TILE_POS(0, -2), super->collisionLayer);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,8 +258,8 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
|
|||
this->tilePos = TILE(super->x.HALF.HI, this->unk_6c);
|
||||
while (TRUE) {
|
||||
this->tilePos = TILE(super->x.HALF.HI, this->unk_6c);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, LAYER_TOP);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, LAYER_TOP);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
this->unk_6c += 0x10;
|
||||
if (this->unk_6c >= gRoomControls.origin_y + gRoomControls.height)
|
||||
break;
|
||||
|
|
@ -308,7 +308,7 @@ void Beanstalk_Action1Type8SubAction0(BeanstalkEntity* this) {
|
|||
|
||||
super->spriteOrientation.flipY = 2;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
SetMetaTile(SPECIAL_META_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
SetTile(SPECIAL_TILE_23, this->tilePos, LAYER_BOTTOM);
|
||||
super->subAction = 1;
|
||||
obj = CreateObjectWithParent(super, CHUCHU_BOSS_PARTICLE, 0, 0);
|
||||
if (obj != NULL) {
|
||||
|
|
@ -339,13 +339,13 @@ void Beanstalk_Action1Type9(BeanstalkEntity* this) {
|
|||
super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
|
||||
if (gPlayerState.floor_type == SURFACE_LADDER) {
|
||||
super->spritePriority.b0 = 0;
|
||||
if (sub_080B1A0C(super, 0, -24) != SPECIAL_META_TILE_20) {
|
||||
SetMetaTile(SPECIAL_META_TILE_20, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
if (sub_080B1A0C(super, 0, -24) != SPECIAL_TILE_20) {
|
||||
SetTile(SPECIAL_TILE_20, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
}
|
||||
} else {
|
||||
super->spritePriority.b0 = 5;
|
||||
if (this->unk_72 != sub_080B1A0C(super, 0, -24)) {
|
||||
SetMetaTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
SetTile(this->unk_72, COORD_TO_TILE_OFFSET(super, 0, 24), LAYER_BOTTOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ void BigBarrel_Type4(BigBarrelEntity* this) {
|
|||
flame->collisionLayer = 2;
|
||||
flame->spritePriority.b0 = 2;
|
||||
}
|
||||
SetMetaTileType(META_TILE_TYPE_118, COORD_TO_TILE(super), LAYER_TOP);
|
||||
SetTileType(TILE_TYPE_118, COORD_TO_TILE(super), LAYER_TOP);
|
||||
break;
|
||||
case 2:
|
||||
if (--super->timer) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue