mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-13 11:35:57 -05:00
Decomped IsWaterTileset()
This commit is contained in:
@@ -5,38 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start IsWaterTileset
|
||||
IsWaterTileset:
|
||||
push {lr}
|
||||
ldr r0, _0804AF9C
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0804AFA0
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0
|
||||
beq _0804AF96
|
||||
cmp r0, 0x31
|
||||
beq _0804AF96
|
||||
cmp r0, 0x20
|
||||
beq _0804AF96
|
||||
cmp r0, 0x21
|
||||
beq _0804AF96
|
||||
cmp r0, 0x36
|
||||
bne _0804AFA4
|
||||
_0804AF96:
|
||||
movs r0, 0x1
|
||||
b _0804AFA6
|
||||
.align 2, 0
|
||||
_0804AF9C: .4byte gDungeonGlobalData
|
||||
_0804AFA0: .4byte 0x00003a0e
|
||||
_0804AFA4:
|
||||
movs r0, 0
|
||||
_0804AFA6:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end IsWaterTileset
|
||||
|
||||
thumb_func_start sub_804AFAC
|
||||
sub_804AFAC:
|
||||
push {r4-r7,lr}
|
||||
@@ -9,5 +9,7 @@
|
||||
|
||||
// 0x4AF20
|
||||
bool8 IsTileGround(struct MapTile* tile);
|
||||
// 0x4AF74
|
||||
bool8 IsWaterTileset();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ SECTIONS {
|
||||
src/dungeon_map_access.o(.text);
|
||||
asm/code_80495E4.o(.text);
|
||||
src/tile_types.o(.text);
|
||||
asm/code_804AF74.o(.text);
|
||||
asm/code_804AFAC.o(.text);
|
||||
src/code_80521D0.o(.text);
|
||||
asm/code_80521D0.o(.text);
|
||||
src/charge_move.o(.text);
|
||||
|
||||
@@ -82,8 +82,6 @@ const u8 gDungeonWaterType[] = {
|
||||
DUNGEON_WATER_TYPE_NONE,
|
||||
};
|
||||
|
||||
extern bool8 IsWaterTileset();
|
||||
|
||||
bool8 IsTileGround(struct MapTile* tile)
|
||||
{
|
||||
bool8 isGround = FALSE;
|
||||
@@ -101,3 +99,16 @@ bool8 IsTileGround(struct MapTile* tile)
|
||||
}
|
||||
return isGround;
|
||||
}
|
||||
|
||||
bool8 IsWaterTileset()
|
||||
{
|
||||
if (gDungeonGlobalData->tileset == 0 ||
|
||||
gDungeonGlobalData->tileset == 0x31 ||
|
||||
gDungeonGlobalData->tileset == 0x20 ||
|
||||
gDungeonGlobalData->tileset == 0x21 ||
|
||||
gDungeonGlobalData->tileset == 0x36)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user