mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-27 19:24:58 -05:00
more decomp
This commit is contained in:
@@ -5,432 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80498A8
|
||||
sub_80498A8:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x28
|
||||
mov r10, r0
|
||||
mov r9, r1
|
||||
cmp r0, 0
|
||||
bge _080498BE
|
||||
b _08049B72
|
||||
_080498BE:
|
||||
cmp r1, 0
|
||||
bge _080498C4
|
||||
b _08049B72
|
||||
_080498C4:
|
||||
cmp r0, 0x37
|
||||
ble _080498CA
|
||||
b _08049B72
|
||||
_080498CA:
|
||||
cmp r1, 0x1F
|
||||
ble _080498D0
|
||||
b _08049B72
|
||||
_080498D0:
|
||||
movs r7, 0
|
||||
bl GetTile
|
||||
ldrh r0, [r0]
|
||||
movs r1, 0x3
|
||||
mov r8, r1
|
||||
mov r6, r8
|
||||
ands r6, r0
|
||||
str r6, [sp, 0x20]
|
||||
ldr r4, _08049914
|
||||
ldr r0, [r4]
|
||||
ldr r3, _08049918
|
||||
adds r0, r3
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0x3F
|
||||
ble _08049928
|
||||
mov r3, r10
|
||||
cmp r3, 0x17
|
||||
bgt _0804991C
|
||||
mov r0, r9
|
||||
cmp r0, 0x17
|
||||
bgt _0804991C
|
||||
mov r0, r10
|
||||
mov r1, r9
|
||||
bl GetTileSafe
|
||||
ldr r2, [r4]
|
||||
mov r3, r9
|
||||
lsls r1, r3, 1
|
||||
add r1, r9
|
||||
lsls r1, 3
|
||||
add r1, r10
|
||||
b _08049B68
|
||||
.align 2, 0
|
||||
_08049914: .4byte gDungeon
|
||||
_08049918: .4byte 0x00003a0e
|
||||
_0804991C:
|
||||
mov r0, r10
|
||||
mov r1, r9
|
||||
bl GetTileSafe
|
||||
movs r1, 0
|
||||
b _08049B70
|
||||
_08049928:
|
||||
mov r0, r9
|
||||
adds r0, 0x1
|
||||
str r0, [sp, 0x24]
|
||||
mov r0, r10
|
||||
ldr r1, [sp, 0x24]
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp]
|
||||
mov r4, r10
|
||||
adds r4, 0x1
|
||||
adds r0, r4, 0
|
||||
ldr r1, [sp, 0x24]
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r4, 0
|
||||
mov r1, r9
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp, 0x8]
|
||||
mov r5, r9
|
||||
subs r5, 0x1
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp, 0xC]
|
||||
mov r0, r10
|
||||
adds r1, r5, 0
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp, 0x10]
|
||||
subs r4, 0x2
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp, 0x14]
|
||||
adds r0, r4, 0
|
||||
mov r1, r9
|
||||
bl GetTile
|
||||
ldrh r1, [r0]
|
||||
mov r0, r8
|
||||
ands r0, r1
|
||||
str r0, [sp, 0x18]
|
||||
adds r0, r4, 0
|
||||
ldr r1, [sp, 0x24]
|
||||
bl GetTile
|
||||
ldrh r0, [r0]
|
||||
mov r1, r8
|
||||
ands r1, r0
|
||||
str r1, [sp, 0x1C]
|
||||
cmp r6, 0x1
|
||||
bne _08049A1E
|
||||
movs r7, 0xFF
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0
|
||||
bne _080499C6
|
||||
movs r7, 0xFE
|
||||
_080499C6:
|
||||
ldr r0, [sp, 0x4]
|
||||
cmp r0, 0
|
||||
bne _080499D2
|
||||
movs r0, 0x3
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_080499D2:
|
||||
ldr r0, [sp, 0x8]
|
||||
cmp r0, 0
|
||||
bne _080499DE
|
||||
movs r0, 0x5
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_080499DE:
|
||||
ldr r0, [sp, 0xC]
|
||||
cmp r0, 0
|
||||
bne _080499EA
|
||||
movs r0, 0x9
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_080499EA:
|
||||
ldr r0, [sp, 0x10]
|
||||
cmp r0, 0
|
||||
bne _080499F6
|
||||
movs r0, 0x11
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_080499F6:
|
||||
ldr r0, [sp, 0x14]
|
||||
cmp r0, 0
|
||||
bne _08049A02
|
||||
movs r0, 0x21
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A02:
|
||||
ldr r0, [sp, 0x18]
|
||||
cmp r0, 0
|
||||
bne _08049A0E
|
||||
movs r0, 0x41
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A0E:
|
||||
cmp r1, 0
|
||||
bne _08049A18
|
||||
movs r0, 0x81
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A18:
|
||||
movs r0, 0x80
|
||||
lsls r0, 2
|
||||
b _08049B3A
|
||||
_08049A1E:
|
||||
cmp r6, 0x2
|
||||
bne _08049A84
|
||||
movs r7, 0xFF
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x2
|
||||
beq _08049A2C
|
||||
movs r7, 0xFE
|
||||
_08049A2C:
|
||||
ldr r0, [sp, 0x4]
|
||||
cmp r0, 0x2
|
||||
beq _08049A38
|
||||
movs r0, 0x3
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A38:
|
||||
ldr r0, [sp, 0x8]
|
||||
cmp r0, 0x2
|
||||
beq _08049A44
|
||||
movs r0, 0x5
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A44:
|
||||
ldr r0, [sp, 0xC]
|
||||
cmp r0, 0x2
|
||||
beq _08049A50
|
||||
movs r0, 0x9
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A50:
|
||||
ldr r0, [sp, 0x10]
|
||||
cmp r0, 0x2
|
||||
beq _08049A5C
|
||||
movs r0, 0x11
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A5C:
|
||||
ldr r0, [sp, 0x14]
|
||||
cmp r0, 0x2
|
||||
beq _08049A68
|
||||
movs r0, 0x21
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A68:
|
||||
ldr r0, [sp, 0x18]
|
||||
cmp r0, 0x2
|
||||
beq _08049A74
|
||||
movs r0, 0x41
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A74:
|
||||
cmp r1, 0x2
|
||||
beq _08049A7E
|
||||
movs r0, 0x81
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049A7E:
|
||||
movs r0, 0x80
|
||||
lsls r0, 1
|
||||
b _08049B3A
|
||||
_08049A84:
|
||||
ldr r1, [sp, 0x20]
|
||||
cmp r1, 0x3
|
||||
bne _08049AEE
|
||||
movs r7, 0xFF
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x3
|
||||
beq _08049A94
|
||||
movs r7, 0xFE
|
||||
_08049A94:
|
||||
ldr r0, [sp, 0x4]
|
||||
cmp r0, 0x3
|
||||
beq _08049AA0
|
||||
movs r0, 0x3
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049AA0:
|
||||
ldr r0, [sp, 0x8]
|
||||
cmp r0, 0x3
|
||||
beq _08049AAC
|
||||
movs r0, 0x5
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049AAC:
|
||||
ldr r0, [sp, 0xC]
|
||||
cmp r0, 0x3
|
||||
beq _08049AB8
|
||||
movs r0, 0x9
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049AB8:
|
||||
ldr r0, [sp, 0x10]
|
||||
cmp r0, 0x3
|
||||
beq _08049AC4
|
||||
movs r0, 0x11
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049AC4:
|
||||
ldr r0, [sp, 0x14]
|
||||
cmp r0, 0x3
|
||||
beq _08049AD0
|
||||
movs r0, 0x21
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049AD0:
|
||||
ldr r0, [sp, 0x18]
|
||||
cmp r0, 0x3
|
||||
beq _08049ADC
|
||||
movs r0, 0x41
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049ADC:
|
||||
ldr r0, [sp, 0x1C]
|
||||
cmp r0, 0x3
|
||||
beq _08049AE8
|
||||
movs r0, 0x81
|
||||
negs r0, r0
|
||||
ands r7, r0
|
||||
_08049AE8:
|
||||
movs r0, 0x80
|
||||
lsls r0, 1
|
||||
b _08049B3A
|
||||
_08049AEE:
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0
|
||||
bne _08049AF6
|
||||
movs r7, 0x1
|
||||
_08049AF6:
|
||||
ldr r0, [sp, 0x4]
|
||||
cmp r0, 0
|
||||
bne _08049B00
|
||||
movs r0, 0x2
|
||||
orrs r7, r0
|
||||
_08049B00:
|
||||
ldr r0, [sp, 0x8]
|
||||
cmp r0, 0
|
||||
bne _08049B0A
|
||||
movs r0, 0x4
|
||||
orrs r7, r0
|
||||
_08049B0A:
|
||||
ldr r0, [sp, 0xC]
|
||||
cmp r0, 0
|
||||
bne _08049B14
|
||||
movs r0, 0x8
|
||||
orrs r7, r0
|
||||
_08049B14:
|
||||
ldr r0, [sp, 0x10]
|
||||
cmp r0, 0
|
||||
bne _08049B1E
|
||||
movs r0, 0x10
|
||||
orrs r7, r0
|
||||
_08049B1E:
|
||||
ldr r0, [sp, 0x14]
|
||||
cmp r0, 0
|
||||
bne _08049B28
|
||||
movs r0, 0x20
|
||||
orrs r7, r0
|
||||
_08049B28:
|
||||
ldr r0, [sp, 0x18]
|
||||
cmp r0, 0
|
||||
bne _08049B32
|
||||
movs r0, 0x40
|
||||
orrs r7, r0
|
||||
_08049B32:
|
||||
ldr r0, [sp, 0x1C]
|
||||
cmp r0, 0
|
||||
bne _08049B3C
|
||||
movs r0, 0x80
|
||||
_08049B3A:
|
||||
orrs r7, r0
|
||||
_08049B3C:
|
||||
movs r0, 0x4
|
||||
bl RandInt
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0x3
|
||||
bne _08049B4A
|
||||
movs r4, 0
|
||||
_08049B4A:
|
||||
bl IsBossFight
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08049B56
|
||||
movs r4, 0
|
||||
_08049B56:
|
||||
mov r0, r10
|
||||
mov r1, r9
|
||||
bl GetTileSafe
|
||||
ldr r1, _08049B84
|
||||
ldr r2, [r1]
|
||||
lsls r1, r7, 1
|
||||
adds r1, r7
|
||||
adds r1, r4, r1
|
||||
_08049B68:
|
||||
ldr r3, _08049B88
|
||||
adds r2, r3
|
||||
adds r2, r1
|
||||
ldrb r1, [r2]
|
||||
_08049B70:
|
||||
strb r1, [r0, 0x8]
|
||||
_08049B72:
|
||||
add sp, 0x28
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08049B84: .4byte gDungeon
|
||||
_08049B88: .4byte 0x00012c24
|
||||
thumb_func_end sub_80498A8
|
||||
|
||||
thumb_func_start sub_8049B8C
|
||||
sub_8049B8C:
|
||||
push {r4-r6,lr}
|
||||
movs r5, 0
|
||||
_08049B90:
|
||||
movs r4, 0
|
||||
adds r6, r5, 0x1
|
||||
_08049B94:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_8049BB0
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x37
|
||||
ble _08049B94
|
||||
adds r5, r6, 0
|
||||
cmp r5, 0x1F
|
||||
ble _08049B90
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8049B8C
|
||||
|
||||
thumb_func_start sub_8049BB0
|
||||
sub_8049BB0:
|
||||
push {r4-r7,lr}
|
||||
|
||||
@@ -57,107 +57,4 @@ _0807039A:
|
||||
bx r1
|
||||
thumb_func_end sub_807034C
|
||||
|
||||
thumb_func_start sub_80703A0
|
||||
sub_80703A0:
|
||||
push {r4-r7,lr}
|
||||
adds r6, r0, 0
|
||||
adds r4, r1, 0
|
||||
ldr r7, [r6, 0x70]
|
||||
movs r1, 0
|
||||
ldrsh r0, [r4, r1]
|
||||
movs r2, 0x2
|
||||
ldrsh r1, [r4, r2]
|
||||
bl GetTile
|
||||
adds r5, r0, 0
|
||||
movs r1, 0
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
blt _08070456
|
||||
movs r2, 0x2
|
||||
ldrsh r1, [r4, r2]
|
||||
cmp r1, 0
|
||||
blt _08070456
|
||||
cmp r0, 0x37
|
||||
bgt _08070456
|
||||
cmp r1, 0x1F
|
||||
bgt _08070456
|
||||
ldr r0, [r5, 0x10]
|
||||
cmp r0, 0
|
||||
bne _08070456
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _08070456
|
||||
bl IsCurrentFixedRoomBossFight
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08070400
|
||||
adds r0, r7, 0
|
||||
adds r0, 0xE4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x3
|
||||
beq _0807044E
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x9
|
||||
bl HasHeldItem
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0807044E
|
||||
_08070400:
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r7, r1]
|
||||
bl GetCrossableTerrain
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldrh r0, [r5]
|
||||
movs r5, 0x3
|
||||
ands r5, r0
|
||||
adds r0, r6, 0
|
||||
movs r1, 0xC
|
||||
bl IQSkillIsEnabled
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08070422
|
||||
movs r4, 0x2
|
||||
_08070422:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0xD
|
||||
bl IQSkillIsEnabled
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08070432
|
||||
movs r4, 0x3
|
||||
_08070432:
|
||||
cmp r4, 0x1
|
||||
beq _08070446
|
||||
cmp r4, 0x1
|
||||
bgt _08070440
|
||||
cmp r4, 0
|
||||
beq _0807044A
|
||||
b _0807044E
|
||||
_08070440:
|
||||
cmp r4, 0x2
|
||||
beq _08070452
|
||||
b _0807044E
|
||||
_08070446:
|
||||
cmp r5, 0x2
|
||||
beq _0807044E
|
||||
_0807044A:
|
||||
cmp r5, 0x1
|
||||
bne _08070456
|
||||
_0807044E:
|
||||
movs r0, 0
|
||||
b _08070458
|
||||
_08070452:
|
||||
cmp r5, 0
|
||||
bne _0807044E
|
||||
_08070456:
|
||||
movs r0, 0x1
|
||||
_08070458:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80703A0
|
||||
|
||||
.align 2, 0
|
||||
.align 2, 0
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
|
||||
#include "dungeon_entity.h"
|
||||
|
||||
u8 sub_80703A0(struct Entity *pokemon, struct Position *pos);
|
||||
bool8 CanCrossWalls(struct Entity *pokemon);
|
||||
bool8 sub_807049C(struct Entity *pokemon, struct Position *pos);
|
||||
bool8 sub_8070564(struct Entity *pokemon, struct Position *pos);
|
||||
bool8 sub_80705F0(struct Entity *pokemon, struct Position *pos);
|
||||
bool8 sub_80706A4(struct Entity *pokemon, struct Position *pos);
|
||||
s32 CalcSpeedStage(struct Entity *pokemon);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_movement_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "item.h"
|
||||
@@ -96,7 +97,6 @@ extern void sub_80943A0(void*, s32);
|
||||
s32 RoundUpFixedPoint(s32 fixedPointNumber);
|
||||
extern s16 sub_8057600(struct Move*, u32);
|
||||
extern void sub_806CDD4(struct Entity *, u32, u32);
|
||||
extern bool8 sub_80705F0(struct Entity *pokemon, struct Position *pos);
|
||||
extern u8 sub_8044B28(void);
|
||||
extern u8 sub_803F428(struct Position *pos);
|
||||
extern void IncreaseEntityPixelPos(struct Entity *, u32, u32);
|
||||
@@ -109,7 +109,6 @@ extern void sub_804535C(struct Entity *, u32);
|
||||
extern void sub_804AC20(struct Position *);
|
||||
extern void sub_806A5B8(struct Entity *entity);
|
||||
extern void sub_80694C0(struct Entity *, s32, s32, u32);
|
||||
bool8 sub_80706A4(struct Entity *pokemon, struct Position *pos);
|
||||
extern void sub_807D148(struct Entity *pokemon, struct Entity *target, u32 r2, struct Position *r3);
|
||||
extern void SetMessageArgument(u8 *buffer, struct Entity *r1, u32);
|
||||
extern void SetMessageArgument_2(u8 *buffer, struct EntityInfo *r1, u32);
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "dungeon_global_data.h"
|
||||
#include "file_system.h"
|
||||
#include "tile_types.h"
|
||||
#include "random.h"
|
||||
#include "dungeon_engine.h"
|
||||
|
||||
extern struct unkStruct_202F190 gUnknown_202F190;
|
||||
extern struct unkStruct_202F190 *gUnknown_203B430;
|
||||
@@ -29,6 +31,8 @@ extern u8 sub_8043CE4(u32);
|
||||
|
||||
extern void sub_8004AA4(u8 *, struct OpenedFile *, u32);
|
||||
extern int sprintf(char *, const char *, ...);
|
||||
void sub_8049BB0(s32, s32);
|
||||
void sub_80498A8(s32, s32);
|
||||
|
||||
struct Tile* GetTile(s32 x, s32 y)
|
||||
{
|
||||
@@ -134,7 +138,6 @@ void sub_8049840(void)
|
||||
}
|
||||
}
|
||||
|
||||
extern void sub_80498A8(s32, s32);
|
||||
|
||||
void sub_8049884(void)
|
||||
{
|
||||
@@ -148,3 +151,187 @@ void sub_8049884(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80498A8(int x,int y)
|
||||
{
|
||||
volatile u32 sp_0x0;
|
||||
volatile u32 sp_0x4;
|
||||
volatile u32 sp_0x8;
|
||||
volatile u32 sp_0xC;
|
||||
volatile u32 sp_0x10;
|
||||
volatile u32 sp_0x14;
|
||||
volatile u32 sp_0x18;
|
||||
volatile u32 sp_0x1C;
|
||||
u32 r1;
|
||||
u16 sp_0x20; // sp 0x20
|
||||
int r4;
|
||||
s32 r7; // r7
|
||||
|
||||
if (x < 0) {
|
||||
return;
|
||||
}
|
||||
if (y < 0) {
|
||||
return;
|
||||
}
|
||||
if (DUNGEON_MAX_SIZE_X <= x) {
|
||||
return;
|
||||
}
|
||||
if (DUNGEON_MAX_SIZE_Y <= y) {
|
||||
return;
|
||||
}
|
||||
r7 = 0;
|
||||
sp_0x20 = GetTile(x, y)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (gDungeon->tileset >= 0x40) {
|
||||
if ((0x17 >= x) && (0x17 >= y)) {
|
||||
GetTileSafe(x,y)->unk8 = gDungeon->unk12C24[y * 0x18 + x];
|
||||
}
|
||||
else {
|
||||
GetTileSafe(x,y)->unk8 = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sp_0x0 = GetTile(x,y + 1)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0x4 = GetTile(x + 1,y + 1)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0x8 = GetTile(x + 1,y)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0xC = GetTile(x + 1,y -1)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0x10 = GetTile(x, y -1)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0x14 = GetTile(x - 1,y -1)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0x18 = GetTile(x - 1, y)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
r1 = GetTile(x - 1,y + 1)->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
sp_0x1C = r1;
|
||||
if (sp_0x20 == 1) {
|
||||
r7 = 0xFF;
|
||||
if (sp_0x0 == 0) {
|
||||
r7 = 0xfe;
|
||||
}
|
||||
if (sp_0x4 == 0) {
|
||||
r7 &= -3;
|
||||
}
|
||||
if (sp_0x8 == 0) {
|
||||
r7 &= -5;
|
||||
}
|
||||
if (sp_0xC == 0) {
|
||||
r7 &= -9;
|
||||
}
|
||||
if (sp_0x10 == 0) {
|
||||
r7 &= -17;
|
||||
}
|
||||
if (sp_0x14 == 0) {
|
||||
r7 &= 0xffffffdf;
|
||||
}
|
||||
if (sp_0x18 == 0) {
|
||||
r7 &= 0xffffffbf;
|
||||
}
|
||||
if (r1 == 0) {
|
||||
r7 &= 0xffffff7f;
|
||||
}
|
||||
r7 |= 0x200;
|
||||
}
|
||||
else if (sp_0x20 == 2) {
|
||||
r7 = 0xff;
|
||||
if (sp_0x0 != 2) {
|
||||
r7 = 0xfe;
|
||||
}
|
||||
if (sp_0x4 != 2) {
|
||||
r7 &= 0xfffffffd;
|
||||
}
|
||||
if (sp_0x8 != 2) {
|
||||
r7 &= 0xfffffffb;
|
||||
}
|
||||
if (sp_0xC != 2) {
|
||||
r7 &= 0xfffffff7;
|
||||
}
|
||||
if (sp_0x10 != 2) {
|
||||
r7 &= 0xffffffef;
|
||||
}
|
||||
if (sp_0x14 != 2) {
|
||||
r7 &= 0xffffffdf;
|
||||
}
|
||||
if (sp_0x18 != 2) {
|
||||
r7 &= 0xffffffbf;
|
||||
}
|
||||
if (r1 != 2) {
|
||||
r7 &= 0xffffff7f;
|
||||
}
|
||||
r7 |= 0x100;
|
||||
}
|
||||
else if (sp_0x20 == 3) {
|
||||
r7 = 0xff;
|
||||
if (sp_0x0 != 3) {
|
||||
r7 = 0xfe;
|
||||
}
|
||||
if (sp_0x4 != 3) {
|
||||
r7 &= 0xfffffffd;
|
||||
}
|
||||
if (sp_0x8 != 3) {
|
||||
r7 &= 0xfffffffb;
|
||||
}
|
||||
if (sp_0xC != 3) {
|
||||
r7 &= 0xfffffff7;
|
||||
}
|
||||
if (sp_0x10 != 3) {
|
||||
r7 &= 0xffffffef;
|
||||
}
|
||||
if (sp_0x14 != 3) {
|
||||
r7 &= 0xffffffdf;
|
||||
}
|
||||
if (sp_0x18 != 3) {
|
||||
r7 &= 0xffffffbf;
|
||||
}
|
||||
if (sp_0x1C != 3) {
|
||||
r7 &= 0xffffff7f;
|
||||
}
|
||||
r7 |= 0x100;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sp_0x0 == 0) {
|
||||
r7 = 1;
|
||||
}
|
||||
if (sp_0x4 == 0) {
|
||||
r7 |= 2;
|
||||
}
|
||||
if (sp_0x8 == 0) {
|
||||
r7 |= 4;
|
||||
}
|
||||
if (sp_0xC == 0) {
|
||||
r7 |= 8;
|
||||
}
|
||||
if (sp_0x10 == 0) {
|
||||
r7 |= 0x10;
|
||||
}
|
||||
if (sp_0x14 == 0) {
|
||||
r7 |= 0x20;
|
||||
}
|
||||
if (sp_0x18 == 0) {
|
||||
r7 |= 0x40;
|
||||
}
|
||||
if (sp_0x1C == 0) {
|
||||
r7 |= 0x80;
|
||||
}
|
||||
}
|
||||
r4 = RandInt(4);
|
||||
if (r4 == 3) {
|
||||
r4 = 0;
|
||||
}
|
||||
if (IsBossFight()) {
|
||||
r4 = 0;
|
||||
}
|
||||
GetTileSafe(x,y)->unk8 = gDungeon->unk12C24[r4 + r7 * 3];
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8049B8C(void)
|
||||
{
|
||||
s32 XCoord;
|
||||
s32 YCoord;
|
||||
|
||||
for(YCoord = 0; YCoord < DUNGEON_MAX_SIZE_Y; YCoord++)
|
||||
{
|
||||
for(XCoord = 0; XCoord < DUNGEON_MAX_SIZE_X; XCoord++) {
|
||||
sub_8049BB0(XCoord,YCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,45 @@
|
||||
#include "pokemon.h"
|
||||
#include "weather.h"
|
||||
|
||||
|
||||
u8 sub_80703A0(struct Entity *pokemon, struct Position *pos)
|
||||
{
|
||||
u8 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x,pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y) && (tile->monster == NULL) && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) {
|
||||
if ((IsCurrentFixedRoomBossFight()) || ((entityInfo->transformStatus != STATUS_MOBILE && (!HasHeldItem(pokemon, ITEM_MOBILE_SCARF))))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
if(tileFlags == TERRAIN_TYPE_SECONDARY) return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
if(tileFlags == TERRAIN_TYPE_NORMAL) return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
}
|
||||
} else return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 CanCrossWalls(struct Entity *pokemon)
|
||||
{
|
||||
struct EntityInfo *pokemonInfo = pokemon->info;
|
||||
@@ -38,63 +77,63 @@ bool8 CanCrossWalls(struct Entity *pokemon)
|
||||
|
||||
bool8 sub_807049C(struct Entity *pokemon, struct Position *pos)
|
||||
{
|
||||
s32 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
(tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
if(tileFlags == TERRAIN_TYPE_SECONDARY) return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
if(tileFlags == TERRAIN_TYPE_NORMAL) return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
s32 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
(tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
if(tileFlags == TERRAIN_TYPE_SECONDARY) return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
if(tileFlags == TERRAIN_TYPE_NORMAL) return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
}
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8070564(struct Entity *pokemon, struct Position *pos)
|
||||
{
|
||||
u8 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
u8 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
#ifndef NONMATCHING
|
||||
register s32 tileFlags_0 asm("r0");
|
||||
register s32 crossableTerrain2 asm("r3");
|
||||
register s32 tileFlags_0 asm("r0");
|
||||
register s32 crossableTerrain2 asm("r3");
|
||||
#else
|
||||
s32 tileFlags_0;
|
||||
s32 crossableTerrain2;
|
||||
s32 tileFlags_0;
|
||||
s32 crossableTerrain2;
|
||||
#endif
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
(tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
(tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||
crossableTerrain2 = crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags_0 = tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
switch(crossableTerrain)
|
||||
@@ -108,94 +147,94 @@ bool8 sub_8070564(struct Entity *pokemon, struct Position *pos)
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_REGULAR: // 0
|
||||
if(tileFlags == TERRAIN_TYPE_NORMAL)
|
||||
default:
|
||||
default:
|
||||
return FALSE;
|
||||
break;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_LIQUID: // 1
|
||||
if(tileFlags == TERRAIN_TYPE_SECONDARY) return FALSE;
|
||||
if (tileFlags_0 == TERRAIN_TYPE_NORMAL) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_80705F0(struct Entity *pokemon, struct Position *pos)
|
||||
{
|
||||
s32 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER)))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
s32 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER)))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
}
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_80706A4(struct Entity *pokemon, struct Position *pos)
|
||||
{
|
||||
s32 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER) && (tile->monster->info == entityInfo)))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
if(tileFlags == TERRAIN_TYPE_SECONDARY) return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
if(tileFlags == TERRAIN_TYPE_NORMAL) return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
s32 crossableTerrain;
|
||||
struct Tile *tile;
|
||||
u16 tileFlags;
|
||||
struct EntityInfo *entityInfo;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
tile = GetTile(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER) && (tile->monster->info == entityInfo)))) {
|
||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (IQSkillIsEnabled(pokemon, IQ_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
if(tileFlags == TERRAIN_TYPE_SECONDARY) return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
if(tileFlags == TERRAIN_TYPE_NORMAL) return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
}
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
s32 CalcSpeedStage(struct Entity *pokemon)
|
||||
|
||||
Reference in New Issue
Block a user