mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-26 22:40:33 +00:00
merge with master
This commit is contained in:
commit
361d20a623
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,3 +43,4 @@ build/
|
||||
*.ss[0-9]
|
||||
*.pyc
|
||||
__pycache__/
|
||||
*.syms
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
.text
|
||||
|
||||
thumb_func_start LoadTitleScreen
|
||||
LoadTitleScreen:
|
||||
@ -1262,7 +1262,7 @@ sub_8001064:
|
||||
movs r0, 0x4
|
||||
ldrsh r1, [r5, r0]
|
||||
adds r0, r4, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
bl CopyStringtoBuffer
|
||||
@ -1293,7 +1293,7 @@ _080010AE:
|
||||
movs r0, 0x6
|
||||
ldrsh r1, [r5, r0]
|
||||
adds r0, r4, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
bl CopyStringtoBuffer
|
||||
|
@ -609,7 +609,7 @@ _0800FE3C:
|
||||
lsls r0, 8
|
||||
str r0, [sp, 0x10]
|
||||
add r0, sp, 0xC
|
||||
bl sub_800A0B0
|
||||
bl Atan2_4096
|
||||
adds r2, r0, 0
|
||||
ldr r0, [sp, 0xC]
|
||||
cmp r0, 0
|
||||
@ -1294,7 +1294,7 @@ _08010392:
|
||||
str r0, [sp, 0xC]
|
||||
str r3, [sp, 0x10]
|
||||
add r0, sp, 0xC
|
||||
bl sub_800A0B0
|
||||
bl Atan2_4096
|
||||
ldr r1, _08010474
|
||||
adds r3, r0, r1
|
||||
cmp r3, 0
|
||||
|
@ -1728,7 +1728,7 @@ _08040E6E:
|
||||
ldr r0, _08040ECC
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r1, 0xD2
|
||||
lsls r1, 1
|
||||
adds r0, r6, 0
|
||||
@ -2501,7 +2501,7 @@ _080414A0:
|
||||
_080414A4:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl MoveMatchesChargingStatus
|
||||
bl MoveMatchesBideClassStatus
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
|
@ -1,75 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8045064
|
||||
sub_8045064:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
movs r1, 0
|
||||
ldr r0, _080450D4
|
||||
mov r8, r0
|
||||
ldr r0, [r0]
|
||||
cmp r1, r0
|
||||
bge _080450C8
|
||||
mov r7, r8
|
||||
ldr r2, _080450D8
|
||||
mov r9, r2
|
||||
ldr r0, _080450DC
|
||||
mov r12, r0
|
||||
_08045082:
|
||||
adds r4, r1, 0x1
|
||||
ldr r0, [r7]
|
||||
adds r5, r4, 0
|
||||
cmp r5, r0
|
||||
bge _080450BE
|
||||
lsls r0, r1, 2
|
||||
mov r1, r12
|
||||
adds r3, r0, r1
|
||||
mov r6, r9
|
||||
lsls r0, r5, 2
|
||||
adds r2, r0, r1
|
||||
_08045098:
|
||||
ldrh r1, [r3]
|
||||
lsls r1, 3
|
||||
adds r1, r6
|
||||
ldrh r0, [r2]
|
||||
lsls r0, 3
|
||||
adds r0, r6
|
||||
ldr r1, [r1]
|
||||
ldr r0, [r0]
|
||||
cmp r1, r0
|
||||
ble _080450B4
|
||||
ldr r1, [r3]
|
||||
ldr r0, [r2]
|
||||
str r0, [r3]
|
||||
str r1, [r2]
|
||||
_080450B4:
|
||||
adds r2, 0x4
|
||||
adds r4, 0x1
|
||||
ldr r0, [r7]
|
||||
cmp r4, r0
|
||||
blt _08045098
|
||||
_080450BE:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
ldr r0, [r2]
|
||||
cmp r1, r0
|
||||
blt _08045082
|
||||
_080450C8:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080450D4: .4byte gUnknown_202EE6C
|
||||
_080450D8: .4byte gUnknown_80F7C54
|
||||
_080450DC: .4byte gUnknown_202EE44
|
||||
thumb_func_end sub_8045064
|
@ -1,785 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80453AC
|
||||
sub_80453AC:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
mov r8, r0
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
mov r9, r0
|
||||
mov r0, r8
|
||||
bl GetBodySize
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
movs r5, 0
|
||||
movs r0, 0x6
|
||||
subs r3, r0, r6
|
||||
ldr r4, _080453D8
|
||||
b _080453DE
|
||||
.align 2, 0
|
||||
_080453D8: .4byte gUnknown_202EE70
|
||||
_080453DC:
|
||||
adds r5, 0x1
|
||||
_080453DE:
|
||||
cmp r5, r3
|
||||
bgt _08045400
|
||||
movs r2, 0
|
||||
cmp r2, r6
|
||||
bge _080453FA
|
||||
adds r1, r5, r4
|
||||
b _080453F4
|
||||
_080453EC:
|
||||
adds r1, 0x1
|
||||
adds r2, 0x1
|
||||
cmp r2, r6
|
||||
bge _080453FA
|
||||
_080453F4:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _080453EC
|
||||
_080453FA:
|
||||
cmp r2, r6
|
||||
bne _080453DC
|
||||
mov r9, r5
|
||||
_08045400:
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
cmp r9, r0
|
||||
beq _080454FC
|
||||
movs r5, 0
|
||||
ldr r7, _080454DC
|
||||
_0804540C:
|
||||
ldr r1, _080454E0
|
||||
ldr r0, [r1]
|
||||
lsls r1, r5, 2
|
||||
ldr r2, _080454E4
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldr r4, [r0]
|
||||
adds r0, r4, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r10, r0
|
||||
cmp r0, 0
|
||||
bne _080454F0
|
||||
movs r0, 0x1
|
||||
str r0, [r4]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x24
|
||||
strb r5, [r0]
|
||||
ldr r1, _080454E0
|
||||
ldr r0, [r1]
|
||||
adds r0, r7
|
||||
str r0, [r4, 0x70]
|
||||
mov r2, r8
|
||||
strh r2, [r0, 0x2]
|
||||
movs r0, 0
|
||||
mov r1, r8
|
||||
bl sub_8069F54
|
||||
ldr r1, [r4, 0x70]
|
||||
strh r0, [r1, 0x4]
|
||||
ldr r0, [r4, 0x70]
|
||||
movs r5, 0
|
||||
strb r5, [r0, 0x6]
|
||||
movs r0, 0
|
||||
mov r1, r8
|
||||
bl sub_8069F54
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
bl GetSpriteData
|
||||
str r0, [r4, 0x64]
|
||||
mov r1, r9
|
||||
lsls r0, r1, 4
|
||||
adds r0, 0x40
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x68
|
||||
strh r0, [r1]
|
||||
adds r1, 0x2
|
||||
movs r0, 0x7
|
||||
strb r0, [r1]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x6C
|
||||
movs r2, 0
|
||||
strb r2, [r0]
|
||||
adds r1, 0x1
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x6D
|
||||
movs r5, 0x1
|
||||
strb r5, [r0]
|
||||
adds r0, 0x2
|
||||
strb r5, [r0]
|
||||
mov r0, r10
|
||||
str r0, [r4, 0x1C]
|
||||
bl sub_8045ACC
|
||||
ldr r0, [r4, 0x70]
|
||||
ldr r1, _080454E8
|
||||
adds r0, r1
|
||||
mov r2, r9
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4, 0x70]
|
||||
movs r5, 0xB4
|
||||
lsls r5, 1
|
||||
adds r0, r5
|
||||
strb r6, [r0]
|
||||
cmp r6, 0
|
||||
beq _080454C6
|
||||
ldr r3, _080454EC
|
||||
movs r2, 0x1
|
||||
adds r1, r6, 0
|
||||
_080454B6:
|
||||
mov r5, r9
|
||||
adds r0, r5, r3
|
||||
strb r2, [r0]
|
||||
movs r0, 0x1
|
||||
add r9, r0
|
||||
subs r1, 0x1
|
||||
cmp r1, 0
|
||||
bne _080454B6
|
||||
_080454C6:
|
||||
ldr r1, _080454E0
|
||||
ldr r0, [r1]
|
||||
movs r2, 0xCD
|
||||
lsls r2, 3
|
||||
adds r0, r2
|
||||
ldrh r2, [r0]
|
||||
adds r1, r2, 0x1
|
||||
strh r1, [r0]
|
||||
strh r2, [r4, 0x26]
|
||||
adds r0, r4, 0
|
||||
b _080454FE
|
||||
.align 2, 0
|
||||
_080454DC: .4byte 0x0000069c
|
||||
_080454E0: .4byte gDungeon
|
||||
_080454E4: .4byte 0x0001357c
|
||||
_080454E8: .4byte 0x00000167
|
||||
_080454EC: .4byte gUnknown_202EE70
|
||||
_080454F0:
|
||||
movs r0, 0x82
|
||||
lsls r0, 2
|
||||
adds r7, r0
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x3
|
||||
ble _0804540C
|
||||
_080454FC:
|
||||
movs r0, 0
|
||||
_080454FE:
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80453AC
|
||||
|
||||
thumb_func_start sub_804550C
|
||||
sub_804550C:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x8
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
mov r8, r0
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
mov r9, r0
|
||||
mov r0, r8
|
||||
bl GetBodySize
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
movs r5, 0
|
||||
movs r0, 0x10
|
||||
subs r3, r0, r7
|
||||
ldr r4, _08045538
|
||||
b _0804553E
|
||||
.align 2, 0
|
||||
_08045538: .4byte gUnknown_202EE76
|
||||
_0804553C:
|
||||
adds r5, 0x1
|
||||
_0804553E:
|
||||
cmp r5, r3
|
||||
bgt _08045560
|
||||
movs r2, 0
|
||||
cmp r2, r7
|
||||
bge _0804555A
|
||||
adds r1, r5, r4
|
||||
b _08045554
|
||||
_0804554C:
|
||||
adds r1, 0x1
|
||||
adds r2, 0x1
|
||||
cmp r2, r7
|
||||
bge _0804555A
|
||||
_08045554:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _0804554C
|
||||
_0804555A:
|
||||
cmp r2, r7
|
||||
bne _0804553C
|
||||
mov r9, r5
|
||||
_08045560:
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
cmp r9, r0
|
||||
bne _0804556A
|
||||
b _08045670
|
||||
_0804556A:
|
||||
movs r5, 0
|
||||
movs r1, 0x1
|
||||
mov r10, r1
|
||||
ldr r2, _08045650
|
||||
mov r3, r9
|
||||
lsls r0, r3, 4
|
||||
adds r0, 0xA0
|
||||
str r0, [sp]
|
||||
_0804557A:
|
||||
ldr r1, _08045654
|
||||
ldr r0, [r1]
|
||||
lsls r1, r5, 2
|
||||
ldr r3, _08045658
|
||||
adds r0, r3
|
||||
adds r0, r1
|
||||
ldr r4, [r0]
|
||||
adds r0, r4, 0
|
||||
str r2, [sp, 0x4]
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
ldr r2, [sp, 0x4]
|
||||
cmp r6, 0
|
||||
bne _08045664
|
||||
mov r0, r10
|
||||
str r0, [r4]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x24
|
||||
strb r5, [r0]
|
||||
subs r0, 0x2
|
||||
strb r6, [r0]
|
||||
ldr r1, _08045654
|
||||
ldr r0, [r1]
|
||||
adds r0, r2
|
||||
str r0, [r4, 0x70]
|
||||
mov r2, r8
|
||||
strh r2, [r0, 0x2]
|
||||
movs r0, 0
|
||||
mov r1, r8
|
||||
bl sub_8069F54
|
||||
ldr r1, [r4, 0x70]
|
||||
strh r0, [r1, 0x4]
|
||||
ldr r0, [r4, 0x70]
|
||||
mov r3, r10
|
||||
strb r3, [r0, 0x6]
|
||||
movs r0, 0
|
||||
mov r1, r8
|
||||
bl sub_8069F54
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
bl GetSpriteData
|
||||
str r0, [r4, 0x64]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x68
|
||||
mov r5, sp
|
||||
ldrh r5, [r5]
|
||||
strh r5, [r0]
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x6A
|
||||
movs r0, 0x7
|
||||
strb r0, [r1]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x6C
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x6B
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x6D
|
||||
mov r2, r10
|
||||
strb r2, [r0]
|
||||
adds r0, 0x2
|
||||
strb r2, [r0]
|
||||
str r6, [r4, 0x1C]
|
||||
ldr r0, [r4, 0x70]
|
||||
ldr r3, _0804565C
|
||||
adds r0, r3
|
||||
mov r5, r9
|
||||
strb r5, [r0]
|
||||
ldr r0, [r4, 0x70]
|
||||
movs r1, 0xB4
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
strb r7, [r0]
|
||||
cmp r7, 0
|
||||
beq _08045636
|
||||
ldr r3, _08045660
|
||||
movs r2, 0x1
|
||||
adds r1, r7, 0
|
||||
_08045626:
|
||||
mov r5, r9
|
||||
adds r0, r5, r3
|
||||
strb r2, [r0]
|
||||
movs r0, 0x1
|
||||
add r9, r0
|
||||
subs r1, 0x1
|
||||
cmp r1, 0
|
||||
bne _08045626
|
||||
_08045636:
|
||||
bl sub_8045ACC
|
||||
ldr r1, _08045654
|
||||
ldr r0, [r1]
|
||||
movs r2, 0xCD
|
||||
lsls r2, 3
|
||||
adds r0, r2
|
||||
ldrh r2, [r0]
|
||||
adds r1, r2, 0x1
|
||||
strh r1, [r0]
|
||||
strh r2, [r4, 0x26]
|
||||
adds r0, r4, 0
|
||||
b _08045672
|
||||
.align 2, 0
|
||||
_08045650: .4byte 0x00000ebc
|
||||
_08045654: .4byte gDungeon
|
||||
_08045658: .4byte 0x0001358c
|
||||
_0804565C: .4byte 0x00000167
|
||||
_08045660: .4byte gUnknown_202EE76
|
||||
_08045664:
|
||||
movs r3, 0x82
|
||||
lsls r3, 2
|
||||
adds r2, r3
|
||||
adds r5, 0x1
|
||||
cmp r5, 0xF
|
||||
ble _0804557A
|
||||
_08045670:
|
||||
movs r0, 0
|
||||
_08045672:
|
||||
add sp, 0x8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_804550C
|
||||
|
||||
thumb_func_start sub_8045684
|
||||
sub_8045684:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
mov r10, r1
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
mov r9, r2
|
||||
movs r5, 0
|
||||
ldr r7, _080456E4
|
||||
ldr r6, _080456E8
|
||||
_080456A2:
|
||||
ldr r0, [r7]
|
||||
lsls r1, r5, 2
|
||||
ldr r2, _080456EC
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldr r4, [r0]
|
||||
adds r0, r4, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0
|
||||
bne _080456F0
|
||||
movs r0, 0x2
|
||||
str r0, [r4]
|
||||
ldr r0, [r7]
|
||||
adds r0, r6
|
||||
str r0, [r4, 0x70]
|
||||
mov r2, r8
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4, 0x70]
|
||||
mov r2, r9
|
||||
strb r2, [r0, 0x1]
|
||||
str r1, [r4, 0x1C]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x22
|
||||
strb r1, [r0]
|
||||
mov r2, r10
|
||||
ldr r0, [r2]
|
||||
str r0, [r4, 0x4]
|
||||
strh r1, [r4, 0x26]
|
||||
adds r0, r4, 0
|
||||
b _080456FA
|
||||
.align 2, 0
|
||||
_080456E4: .4byte gDungeon
|
||||
_080456E8: .4byte 0x00003908
|
||||
_080456EC: .4byte 0x0001371c
|
||||
_080456F0:
|
||||
adds r6, 0x4
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x3F
|
||||
ble _080456A2
|
||||
movs r0, 0
|
||||
_080456FA:
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8045684
|
||||
|
||||
thumb_func_start sub_8045708
|
||||
sub_8045708:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
mov r8, r0
|
||||
ldr r1, _08045744
|
||||
ldr r0, _08045748
|
||||
ldr r0, [r0]
|
||||
ldr r2, _0804574C
|
||||
adds r0, r2
|
||||
movs r3, 0
|
||||
ldrsh r0, [r0, r3]
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _0804579C
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
ldrsh r0, [r1, r2]
|
||||
movs r3, 0x2
|
||||
ldrsh r1, [r1, r3]
|
||||
bl GetTileSafe
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
cmp r0, 0x2
|
||||
bne _0804579C
|
||||
b _080457C4
|
||||
.align 2, 0
|
||||
_08045744: .4byte gDungeonWaterType
|
||||
_08045748: .4byte gDungeon
|
||||
_0804574C: .4byte 0x00003a0e
|
||||
_08045750:
|
||||
movs r0, 0x3
|
||||
str r0, [r4]
|
||||
ldr r0, _08045798
|
||||
adds r1, r6, r0
|
||||
mov r2, r9
|
||||
ldr r0, [r2]
|
||||
adds r0, r1
|
||||
str r0, [r4, 0x70]
|
||||
mov r3, r8
|
||||
ldr r0, [r3]
|
||||
str r0, [r4, 0x4]
|
||||
movs r1, 0
|
||||
ldrsh r0, [r3, r1]
|
||||
lsls r1, r0, 1
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, 0x4
|
||||
lsls r1, 8
|
||||
movs r2, 0x2
|
||||
ldrsh r0, [r3, r2]
|
||||
lsls r2, r0, 1
|
||||
adds r2, r0
|
||||
lsls r2, 3
|
||||
adds r2, 0x4
|
||||
lsls r2, 8
|
||||
adds r0, r4, 0
|
||||
bl SetEntityPixelPos
|
||||
movs r0, 0
|
||||
strh r7, [r4, 0x26]
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x22
|
||||
strb r0, [r1]
|
||||
str r7, [r4, 0x1C]
|
||||
adds r0, r4, 0
|
||||
b _080457C6
|
||||
.align 2, 0
|
||||
_08045798: .4byte 0x00003804
|
||||
_0804579C:
|
||||
movs r5, 0
|
||||
ldr r3, _080457D4
|
||||
mov r9, r3
|
||||
_080457A2:
|
||||
mov r1, r9
|
||||
ldr r0, [r1]
|
||||
lsls r6, r5, 2
|
||||
ldr r2, _080457D8
|
||||
adds r0, r2
|
||||
adds r0, r6
|
||||
ldr r4, [r0]
|
||||
adds r0, r4, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
cmp r7, 0
|
||||
beq _08045750
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x3F
|
||||
ble _080457A2
|
||||
_080457C4:
|
||||
movs r0, 0
|
||||
_080457C6:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_080457D4: .4byte gDungeon
|
||||
_080457D8: .4byte 0x0001361c
|
||||
thumb_func_end sub_8045708
|
||||
|
||||
thumb_func_start sub_80457DC
|
||||
sub_80457DC:
|
||||
push {r4-r6,lr}
|
||||
adds r4, r0, 0
|
||||
movs r0, 0x5
|
||||
str r0, [r4]
|
||||
movs r6, 0
|
||||
movs r5, 0
|
||||
strh r5, [r4, 0x4]
|
||||
strh r5, [r4, 0x6]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl SetEntityPixelPos
|
||||
strh r5, [r4, 0x26]
|
||||
adds r4, 0x22
|
||||
strb r6, [r4]
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80457DC
|
||||
|
||||
thumb_func_start sub_8045804
|
||||
sub_8045804:
|
||||
push {r4-r6,lr}
|
||||
adds r4, r0, 0
|
||||
bl GetEntityType
|
||||
cmp r0, 0x1
|
||||
beq _0804581C
|
||||
cmp r0, 0x1
|
||||
bcc _08045880
|
||||
cmp r0, 0x5
|
||||
beq _08045880
|
||||
_08045818:
|
||||
movs r0, 0x1
|
||||
b _08045882
|
||||
_0804581C:
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x20
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08045880
|
||||
ldr r0, _08045874
|
||||
ldr r1, [r0]
|
||||
ldr r0, _08045878
|
||||
adds r2, r1, r0
|
||||
ldr r5, [r2, 0x10]
|
||||
ldr r3, [r4, 0x70]
|
||||
ldrb r0, [r3, 0x6]
|
||||
cmp r0, 0
|
||||
beq _08045818
|
||||
ldr r6, _0804587C
|
||||
adds r0, r1, r6
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _0804584C
|
||||
adds r0, r3, 0
|
||||
adds r0, 0xE4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
beq _08045880
|
||||
_0804584C:
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x23
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08045818
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x25
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08045818
|
||||
cmp r5, 0
|
||||
beq _08045880
|
||||
adds r1, r4, 0x4
|
||||
adds r0, r2, 0
|
||||
bl IsPositionActuallyInSight
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
b _08045882
|
||||
.align 2, 0
|
||||
_08045874: .4byte gDungeon
|
||||
_08045878: .4byte 0x000181e8
|
||||
_0804587C: .4byte 0x0001820f
|
||||
_08045880:
|
||||
movs r0, 0
|
||||
_08045882:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8045804
|
||||
|
||||
thumb_func_start sub_8045888
|
||||
sub_8045888:
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
adds r0, 0x20
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08045988
|
||||
ldr r1, [r4, 0xC]
|
||||
cmp r1, 0
|
||||
bge _0804589C
|
||||
adds r1, 0xFF
|
||||
_0804589C:
|
||||
asrs r1, 8
|
||||
ldr r0, _080458F0
|
||||
ldr r2, [r0]
|
||||
ldr r3, _080458F4
|
||||
adds r0, r2, r3
|
||||
movs r5, 0
|
||||
ldrsh r0, [r0, r5]
|
||||
subs r3, r1, r0
|
||||
ldr r0, [r4, 0x10]
|
||||
cmp r0, 0
|
||||
bge _080458B4
|
||||
adds r0, 0xFF
|
||||
_080458B4:
|
||||
asrs r0, 8
|
||||
ldr r5, _080458F8
|
||||
adds r1, r2, r5
|
||||
movs r5, 0
|
||||
ldrsh r1, [r1, r5]
|
||||
subs r1, r0, r1
|
||||
movs r0, 0x20
|
||||
negs r0, r0
|
||||
cmp r3, r0
|
||||
blt _08045988
|
||||
cmp r1, r0
|
||||
blt _08045988
|
||||
movs r0, 0x88
|
||||
lsls r0, 1
|
||||
cmp r3, r0
|
||||
bgt _08045988
|
||||
cmp r1, 0xC0
|
||||
bgt _08045988
|
||||
ldr r0, _080458FC
|
||||
adds r5, r2, r0
|
||||
adds r0, r4, 0
|
||||
bl GetEntityType
|
||||
cmp r0, 0x5
|
||||
bhi _08045984
|
||||
lsls r0, 2
|
||||
ldr r1, _08045900
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_080458F0: .4byte gDungeon
|
||||
_080458F4: .4byte 0x000181f0
|
||||
_080458F8: .4byte 0x000181f2
|
||||
_080458FC: .4byte 0x000181e8
|
||||
_08045900: .4byte _08045904
|
||||
.align 2, 0
|
||||
_08045904:
|
||||
.4byte _08045988
|
||||
.4byte _08045934
|
||||
.4byte _08045964
|
||||
.4byte _0804591C
|
||||
.4byte _08045984
|
||||
.4byte _08045988
|
||||
_0804591C:
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x26
|
||||
_08045920:
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08045984
|
||||
adds r0, r4, 0x4
|
||||
bl sub_803F428
|
||||
lsls r0, 24
|
||||
_0804592E:
|
||||
cmp r0, 0
|
||||
bne _08045984
|
||||
b _08045988
|
||||
_08045934:
|
||||
ldr r1, [r4, 0x70]
|
||||
ldrb r0, [r1, 0x6]
|
||||
cmp r0, 0
|
||||
beq _08045984
|
||||
ldr r0, _0804595C
|
||||
ldr r0, [r0]
|
||||
ldr r2, _08045960
|
||||
adds r0, r2
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08045954
|
||||
adds r0, r1, 0
|
||||
adds r0, 0xE4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
beq _08045988
|
||||
_08045954:
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x25
|
||||
b _08045920
|
||||
.align 2, 0
|
||||
_0804595C: .4byte gDungeon
|
||||
_08045960: .4byte 0x0001820f
|
||||
_08045964:
|
||||
ldr r0, _0804597C
|
||||
ldr r0, [r0]
|
||||
ldr r3, _08045980
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08045984
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x20
|
||||
ldrb r0, [r0]
|
||||
b _0804592E
|
||||
.align 2, 0
|
||||
_0804597C: .4byte gDungeon
|
||||
_08045980: .4byte 0x0001820f
|
||||
_08045984:
|
||||
movs r0, 0x1
|
||||
b _0804598A
|
||||
_08045988:
|
||||
movs r0, 0
|
||||
_0804598A:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8045888
|
||||
|
||||
.align 2, 0
|
@ -65,7 +65,7 @@ _08045E1E:
|
||||
ldr r0, _08045E38
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08045E3C
|
||||
b _08046048
|
||||
.align 2, 0
|
||||
@ -278,7 +278,7 @@ _08045FAC:
|
||||
_08045FD0:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08045FF2
|
||||
.align 2, 0
|
||||
_08045FDC: .4byte 0x00ff0008
|
||||
@ -288,7 +288,7 @@ _08045FE8:
|
||||
ldr r0, _08045FFC
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08045FF2:
|
||||
ldrb r0, [r5, 0x2]
|
||||
bl TryDisplayItemPickupTutorialMessage
|
||||
@ -331,12 +331,12 @@ _0804602E:
|
||||
ldr r0, _08046058
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0804605C
|
||||
_08046048:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080460E0
|
||||
.align 2, 0
|
||||
_08046054: .4byte gFormatBuffer_Items
|
||||
@ -374,12 +374,12 @@ _08046094:
|
||||
ldr r0, _080460B8
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _080460BC
|
||||
_080460AC:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080460DA
|
||||
.align 2, 0
|
||||
_080460B8: .4byte gFormatBuffer_Monsters
|
||||
@ -394,7 +394,7 @@ _080460C0:
|
||||
ldr r0, _080460F4
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080460DA:
|
||||
ldrb r0, [r5, 0x2]
|
||||
bl TryDisplayItemPickupTutorialMessage
|
||||
@ -442,7 +442,7 @@ _08046110:
|
||||
ldrsh r0, [r5, r1]
|
||||
movs r2, 0x2
|
||||
ldrsh r1, [r5, r2]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
str r4, [r0, 0x14]
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x20
|
||||
@ -528,7 +528,7 @@ sub_80461C8:
|
||||
ldrsh r0, [r2, r1]
|
||||
movs r3, 0x2
|
||||
ldrsh r1, [r2, r3]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r6, r0, 0
|
||||
ldr r5, [r6, 0x14]
|
||||
cmp r5, 0
|
||||
@ -996,7 +996,7 @@ sub_804652C:
|
||||
ldr r0, _080465A4
|
||||
ldr r1, [r0]
|
||||
mov r0, r10
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
mov r0, r9
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x1
|
||||
@ -1297,7 +1297,7 @@ _080467BE:
|
||||
adds r0, r7
|
||||
str r0, [r2, 0x4]
|
||||
ldr r0, [sp, 0x10]
|
||||
bl sin_abs_4096
|
||||
bl sin_4096
|
||||
lsls r1, r0, 1
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
@ -1721,7 +1721,7 @@ _08046B0A:
|
||||
ldr r4, _08046B38
|
||||
add r4, sp
|
||||
ldr r0, [r4]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08046C7C
|
||||
.align 2, 0
|
||||
_08046B2C: .4byte 0x0000052c
|
||||
@ -1734,7 +1734,7 @@ _08046B3C:
|
||||
ldr r5, _08046B50
|
||||
add r5, sp
|
||||
ldr r0, [r5]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08046C7C
|
||||
.align 2, 0
|
||||
_08046B4C: .4byte gItemLost
|
||||
@ -1748,7 +1748,7 @@ _08046B54:
|
||||
ldr r2, _08046C94
|
||||
add r2, sp
|
||||
ldr r0, [r2]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08046B68:
|
||||
movs r3, 0
|
||||
mov r9, r3
|
||||
@ -1809,7 +1809,7 @@ _08046BAA:
|
||||
adds r0, r4, 0
|
||||
bl IncreaseEntityPixelPos
|
||||
mov r0, r10
|
||||
bl sin_abs_4096
|
||||
bl sin_4096
|
||||
add r2, sp, 0x20
|
||||
adds r2, r5
|
||||
lsls r1, r0, 1
|
||||
|
@ -410,7 +410,7 @@ _08047462:
|
||||
ldr r0, _080474C4
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _080474C8
|
||||
ldr r1, [sp, 0x214]
|
||||
bl sub_8045C08
|
||||
@ -463,7 +463,7 @@ _080474E2:
|
||||
ldr r0, _0804750C
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08047510
|
||||
ldr r1, [sp, 0x214]
|
||||
bl sub_8045BF8
|
||||
@ -552,7 +552,7 @@ _08047596:
|
||||
ldr r0, _080475C0
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080475A8:
|
||||
movs r3, 0x90
|
||||
lsls r3, 2
|
||||
@ -755,7 +755,7 @@ _08047726:
|
||||
adds r0, 0xFF
|
||||
_08047732:
|
||||
asrs r0, 8
|
||||
bl sin_abs_4096
|
||||
bl sin_4096
|
||||
ldr r2, [sp, 0x30]
|
||||
adds r1, r0, 0
|
||||
muls r1, r2
|
||||
@ -913,7 +913,7 @@ _0804786E:
|
||||
ldr r0, _080478D4
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
lsls r0, r6, 24
|
||||
cmp r0, 0
|
||||
beq _080478DC
|
||||
|
9967
asm/code_804AFAC.s
Normal file
9967
asm/code_804AFAC.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,7 @@ _080516CA:
|
||||
ldr r0, [r5]
|
||||
adds r1, r4, 0
|
||||
str r2, [sp, 0xC]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
ldrh r1, [r0]
|
||||
ldr r2, [sp, 0xC]
|
||||
ands r1, r2
|
||||
@ -102,7 +102,7 @@ _0805170A:
|
||||
ldr r0, [r5, 0x8]
|
||||
adds r1, r4, 0
|
||||
str r2, [sp, 0xC]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
ldrh r1, [r0]
|
||||
ldr r2, [sp, 0xC]
|
||||
ands r1, r2
|
||||
@ -148,7 +148,7 @@ _08051762:
|
||||
ldr r1, [r5, 0x4]
|
||||
adds r0, r4, 0
|
||||
str r2, [sp, 0xC]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
ldrh r1, [r0]
|
||||
ldr r2, [sp, 0xC]
|
||||
ands r1, r2
|
||||
@ -181,7 +181,7 @@ _080517A2:
|
||||
ldr r1, [r5, 0xC]
|
||||
adds r0, r4, 0
|
||||
str r2, [sp, 0xC]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
ldrh r1, [r0]
|
||||
ldr r2, [sp, 0xC]
|
||||
ands r1, r2
|
||||
@ -221,7 +221,7 @@ _080517EC:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
str r3, [sp, 0x10]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r2, r0, 0
|
||||
ldrh r1, [r2]
|
||||
movs r0, 0x20
|
||||
@ -285,7 +285,7 @@ _08051864:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
str r3, [sp, 0x10]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r6, r0, 0
|
||||
ldrh r1, [r6]
|
||||
movs r0, 0x20
|
||||
@ -361,7 +361,7 @@ sub_80518F0:
|
||||
_080518F8:
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r4, r0, 0
|
||||
bl ResetTile
|
||||
cmp r5, 0
|
||||
@ -375,7 +375,7 @@ _0805190E:
|
||||
_08051914:
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1E
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r4, r0, 0
|
||||
bl ResetTile
|
||||
cmp r5, 0
|
||||
@ -529,7 +529,7 @@ sub_8051A24:
|
||||
mov r8, r3
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r7, r0, 0
|
||||
lsls r4, 16
|
||||
lsls r5, 16
|
||||
@ -982,7 +982,7 @@ _08051E42:
|
||||
_08051E46:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r2, r0, 0
|
||||
ldrb r0, [r2, 0xE]
|
||||
cmp r0, 0xF
|
||||
@ -1022,7 +1022,7 @@ sub_8051E7C:
|
||||
movs r3, 0x6
|
||||
ldrsh r1, [r2, r3]
|
||||
subs r1, 0x1
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
str r0, [sp, 0x8]
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x80
|
||||
@ -1033,7 +1033,7 @@ sub_8051E7C:
|
||||
ldr r0, _08051EB4
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080520F6
|
||||
.align 2, 0
|
||||
_08051EB4: .4byte gUnknown_80FDDF0
|
||||
@ -1122,7 +1122,7 @@ _08051F10:
|
||||
bge _08051FCA
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r4, r0, 0
|
||||
ldrh r0, [r4]
|
||||
movs r3, 0x80
|
||||
@ -1293,7 +1293,7 @@ _0805207A:
|
||||
ldr r0, _080520E8
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x14
|
||||
movs r1, 0x3C
|
||||
bl sub_803E708
|
||||
@ -1314,7 +1314,7 @@ _080520EC:
|
||||
ldr r0, _08052108
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080520F6:
|
||||
add sp, 0x14
|
||||
pop {r3-r5}
|
||||
|
@ -2171,7 +2171,7 @@ sub_8062B74:
|
||||
ldr r0, _08062BD0
|
||||
mov r1, r10
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08062BD4
|
||||
ldr r2, [r0]
|
||||
movs r0, 0
|
||||
@ -2322,7 +2322,7 @@ sub_8062CA8:
|
||||
ldr r0, _08062CF8
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08062CFC
|
||||
ldr r2, [r0]
|
||||
movs r0, 0
|
||||
@ -3429,7 +3429,7 @@ sub_8063578:
|
||||
ldr r0, _080635FC
|
||||
ldr r1, [sp, 0x14]
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
lsls r4, 3
|
||||
adds r4, 0xA
|
||||
ldr r0, _08063600
|
||||
@ -4122,7 +4122,7 @@ _08063AEC:
|
||||
ldr r0, _08063B2C
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08063B3A
|
||||
.align 2, 0
|
||||
_08063B1C: .4byte gDungeon
|
||||
@ -4134,7 +4134,7 @@ _08063B30:
|
||||
ldr r0, _08063B50
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08063B3A:
|
||||
movs r0, 0x78
|
||||
movs r1, 0x1F
|
||||
@ -4442,7 +4442,7 @@ _08063D70:
|
||||
ldr r0, _08063DAC
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08063DBA
|
||||
.align 2, 0
|
||||
_08063D98: .4byte gDungeon
|
||||
@ -4455,7 +4455,7 @@ _08063DB0:
|
||||
ldr r0, _08063DD0
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08063DBA:
|
||||
movs r0, 0x78
|
||||
movs r1, 0x1F
|
||||
@ -5474,7 +5474,7 @@ sub_806455C:
|
||||
ldr r1, [r4, 0x14]
|
||||
add r0, sp, 0x4
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
str r5, [sp]
|
||||
movs r0, 0x8
|
||||
movs r1, 0x12
|
||||
|
@ -1010,7 +1010,7 @@ _080690A2:
|
||||
adds r0, r2
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
b _08069484
|
||||
.align 2, 0
|
||||
_080690E4: .4byte gDungeon
|
||||
@ -1283,7 +1283,7 @@ _0806930A:
|
||||
adds r0, r2
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
b _08069352
|
||||
.align 2, 0
|
||||
_0806932C: .4byte gUnknown_202EE70
|
||||
@ -1301,7 +1301,7 @@ _08069338:
|
||||
adds r0, r3
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
_08069352:
|
||||
bl GetLeader
|
||||
cmp r0, 0
|
||||
@ -1489,7 +1489,7 @@ sub_80694C0:
|
||||
mov r9, r3
|
||||
adds r0, r7, 0
|
||||
mov r1, r8
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
mov r10, r0
|
||||
ldr r5, [r4, 0x70]
|
||||
adds r6, r5, 0
|
||||
@ -1515,7 +1515,7 @@ _080694FC:
|
||||
_0806950A:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
bl SendImmobilizeEndMessage
|
||||
bl EndFrozenClassStatus
|
||||
_08069512:
|
||||
movs r0, 0x4
|
||||
ldrsh r2, [r4, r0]
|
||||
@ -1536,7 +1536,7 @@ _08069522:
|
||||
blt _08069552
|
||||
adds r1, r0, 0
|
||||
adds r0, r2, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r1, 0x10]
|
||||
cmp r0, r4
|
||||
|
@ -135,7 +135,7 @@ _08066ECC:
|
||||
_08066F1E:
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08066F7E
|
||||
.align 2, 0
|
||||
_08066F28: .4byte 0xffffff00
|
||||
@ -167,7 +167,7 @@ _08066F46:
|
||||
ldr r0, _08066F98
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
ldr r0, _08066F9C
|
||||
ldr r0, [r0]
|
||||
ldr r2, _08066FA0
|
||||
@ -314,7 +314,7 @@ _08067040:
|
||||
_0806709E:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080670EE
|
||||
.align 2, 0
|
||||
_080670A8: .4byte gFormatBuffer_Items + 0x50
|
||||
@ -339,7 +339,7 @@ _080670CA:
|
||||
ldr r0, _08067104
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
ldr r0, _08067108
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0806710C
|
||||
@ -390,7 +390,7 @@ sub_8067110:
|
||||
bl sub_80464AC
|
||||
adds r1, r0, 0
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
ldr r0, [r6]
|
||||
str r0, [sp, 0x8]
|
||||
adds r0, r5, 0
|
||||
@ -498,7 +498,7 @@ _08067220:
|
||||
_08067230:
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x14
|
||||
movs r1, 0x4C
|
||||
bl sub_803E708
|
||||
@ -677,7 +677,7 @@ _08067384:
|
||||
ldr r0, _080673B8
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _080673C6
|
||||
.align 2, 0
|
||||
_080673B0: .4byte gFormatBuffer_Items
|
||||
@ -687,7 +687,7 @@ _080673BC:
|
||||
ldr r0, _080673F8
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_080673C6:
|
||||
add r0, sp, 0x4
|
||||
ldrb r0, [r0, 0x2]
|
||||
@ -1198,7 +1198,7 @@ _080677B4:
|
||||
ldr r0, _080677F0
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _080677F4
|
||||
ldr r5, [r0]
|
||||
ldr r0, _080677F8
|
||||
@ -1380,7 +1380,7 @@ sub_8067904:
|
||||
ldr r0, _08067944
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08067948
|
||||
b _08067962
|
||||
.align 2, 0
|
||||
@ -1396,12 +1396,12 @@ _0806794C:
|
||||
ldr r0, _0806796C
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08067970
|
||||
_08067962:
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08067A56
|
||||
.align 2, 0
|
||||
_0806796C: .4byte gFormatBuffer_Monsters
|
||||
@ -1477,7 +1477,7 @@ _080679DE:
|
||||
ldr r0, _08067A70
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08067A04:
|
||||
ldrb r0, [r6, 0x7]
|
||||
cmp r0, 0
|
||||
|
@ -102,7 +102,7 @@ _0806A488:
|
||||
movs r2, 0x6
|
||||
ldrsh r1, [r6, r2]
|
||||
adds r1, r7
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r4, r0, 0
|
||||
ldr r0, [r4, 0x10]
|
||||
cmp r0, 0
|
||||
@ -306,7 +306,7 @@ _0806A5CE:
|
||||
bne _0806A608
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
bl SendImmobilizeEndMessage
|
||||
bl EndFrozenClassStatus
|
||||
_0806A608:
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r4, r1]
|
||||
@ -346,7 +346,7 @@ _0806A650:
|
||||
bne _0806A6D2
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
b _0806A6D2
|
||||
_0806A664:
|
||||
cmp r1, 0
|
||||
@ -399,7 +399,7 @@ _0806A6C4:
|
||||
beq _0806A6D2
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0806A6D2:
|
||||
add sp, 0x4
|
||||
pop {r3}
|
||||
@ -663,7 +663,7 @@ sub_806A898:
|
||||
b _0806A8C8
|
||||
_0806A8C2:
|
||||
adds r0, r4, 0
|
||||
bl MoveIfPossible
|
||||
bl AIMovement
|
||||
_0806A8C8:
|
||||
movs r0, 0xB6
|
||||
lsls r0, 1
|
||||
@ -817,7 +817,7 @@ _0806A9E0:
|
||||
_0806A9E6:
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0806AA02
|
||||
.align 2, 0
|
||||
_0806A9F0: .4byte gPtrLinkMoveOneUseWarningMessage
|
||||
@ -827,7 +827,7 @@ _0806A9F4:
|
||||
ldr r0, _0806AA08
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0806AA02:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
@ -1072,7 +1072,7 @@ sub_806ABAC:
|
||||
bne _0806ABD4
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
_0806ABD4:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x40
|
||||
@ -1087,7 +1087,7 @@ _0806ABD4:
|
||||
bne _0806ABF4
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendVolatileEndMessage
|
||||
bl EndCringeClassStatus
|
||||
_0806ABF4:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x42
|
||||
@ -1102,7 +1102,7 @@ _0806ABF4:
|
||||
bne _0806AC14
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
_0806AC14:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x29
|
||||
@ -1117,7 +1117,7 @@ _0806AC14:
|
||||
bne _0806AC34
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendVolatileEndMessage
|
||||
bl EndCringeClassStatus
|
||||
_0806AC34:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x36
|
||||
@ -1147,7 +1147,7 @@ _0806AC66:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x1
|
||||
bl SendSleepEndMessage
|
||||
bl EndSleepClassStatus
|
||||
_0806AC72:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x41
|
||||
@ -1162,7 +1162,7 @@ _0806AC72:
|
||||
bne _0806AC92
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendImmobilizeEndMessage
|
||||
bl EndFrozenClassStatus
|
||||
_0806AC92:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x45
|
||||
@ -1180,7 +1180,7 @@ _0806AC92:
|
||||
bhi _0806ACB8
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendNonVolatileEndMessage
|
||||
bl EndBurnClassStatus
|
||||
_0806ACB8:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x25
|
||||
@ -1199,7 +1199,7 @@ _0806ACB8:
|
||||
bne _0806ACE0
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl SendProtectionEndMessage
|
||||
bl EndReflectClassStatus
|
||||
_0806ACE0:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
@ -3136,7 +3136,7 @@ sub_806BB6C:
|
||||
str r6, [sp, 0xC]
|
||||
movs r0, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8069F54
|
||||
bl GetMonsterApparentID
|
||||
lsls r0, 16
|
||||
adds r1, r7, 0
|
||||
adds r1, 0x22
|
||||
|
1160
asm/code_806E8B0.s
1160
asm/code_806E8B0.s
File diff suppressed because it is too large
Load Diff
@ -39,7 +39,7 @@ _080727A8:
|
||||
movs r4, 0xC
|
||||
ldrsh r3, [r0, r4]
|
||||
mov r0, sp
|
||||
bl sub_808E0AC
|
||||
bl GetMovesLearnedAtLevel
|
||||
adds r7, r0, 0
|
||||
add r4, sp, 0x20
|
||||
movs r1, 0x8C
|
||||
@ -359,7 +359,7 @@ _08072A0C:
|
||||
ldr r0, _08072A44
|
||||
mov r1, r9
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08072A48
|
||||
add r1, sp, 0x40
|
||||
bl strcpy
|
||||
@ -417,7 +417,7 @@ _08072A92:
|
||||
ldr r0, _08072AC0
|
||||
mov r1, r9
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08072AC4
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
|
@ -4,7 +4,7 @@
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start sub_80732F0
|
||||
sub_80732F0:
|
||||
push {r4-r7,lr}
|
||||
@ -148,11 +148,11 @@ _080733FC:
|
||||
ldr r0, _08073438
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807343C
|
||||
ldr r1, [r0]
|
||||
mov r0, r8
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x7
|
||||
mov r1, r9
|
||||
ands r1, r0
|
||||
@ -360,11 +360,11 @@ _0807359C:
|
||||
ldr r0, _08073600
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _08073604
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x7
|
||||
mov r1, r8
|
||||
ands r1, r0
|
||||
|
@ -86,7 +86,7 @@ _0807ABC6:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
str r2, [sp, 0x1A4]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r1, 0x10]
|
||||
ldr r2, [sp, 0x1A4]
|
||||
@ -176,7 +176,7 @@ _0807AC72:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
str r2, [sp, 0x1A4]
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r1, r0, 0
|
||||
ldr r0, [r1, 0x10]
|
||||
ldr r2, [sp, 0x1A4]
|
||||
|
@ -165,7 +165,7 @@ _0807D634:
|
||||
ldr r2, _0807D650
|
||||
add r2, sp
|
||||
ldr r0, [r2]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807D9F4
|
||||
.align 2, 0
|
||||
_0807D650: .4byte 0x00000d08
|
||||
@ -485,7 +485,7 @@ _0807D8B0:
|
||||
adds r0, r4, 0
|
||||
bl IncreaseEntityPixelPos
|
||||
mov r0, r10
|
||||
bl sin_abs_4096
|
||||
bl sin_4096
|
||||
add r2, sp, 0x20
|
||||
adds r2, r5
|
||||
lsls r1, r0, 1
|
||||
@ -585,7 +585,7 @@ _0807D996:
|
||||
ldr r2, _0807D9C4
|
||||
add r2, sp
|
||||
ldr r0, [r2]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807D9EE
|
||||
.align 2, 0
|
||||
_0807D9B4: .4byte gUnknown_80F4468
|
||||
@ -605,7 +605,7 @@ _0807D9E0:
|
||||
ldr r3, _0807DA0C
|
||||
add r3, sp
|
||||
ldr r0, [r3]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807D9EE:
|
||||
movs r0, 0x1
|
||||
bl sub_807EC28
|
||||
@ -647,7 +647,7 @@ sub_807DA14:
|
||||
ldr r0, _0807DA48
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807DA4C
|
||||
b _0807DA5C
|
||||
.align 2, 0
|
||||
@ -818,7 +818,7 @@ _0807DB94:
|
||||
_0807DBA0:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807DC54
|
||||
.align 2, 0
|
||||
_0807DBAC: .4byte gUnknown_80FD08C
|
||||
@ -831,7 +831,7 @@ _0807DBB6:
|
||||
_0807DBB8:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r2, r0, 0
|
||||
ldrh r1, [r2]
|
||||
movs r0, 0x3
|
||||
@ -878,7 +878,7 @@ _0807DBF4:
|
||||
ldr r0, _0807DC2C
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807DC3A
|
||||
.align 2, 0
|
||||
_0807DC24: .4byte 0x0000fffc
|
||||
@ -888,7 +888,7 @@ _0807DC30:
|
||||
ldr r0, _0807DC60
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807DC3A:
|
||||
ldr r0, _0807DC64
|
||||
ldr r0, [r0]
|
||||
@ -953,7 +953,7 @@ _0807DCAC:
|
||||
_0807DCB8:
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807DF0E
|
||||
.align 2, 0
|
||||
_0807DCC4: .4byte gUnknown_80FD3D0
|
||||
@ -971,7 +971,7 @@ _0807DCD8:
|
||||
movs r6, 0
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r2, r0, 0
|
||||
ldrh r1, [r2]
|
||||
ldr r3, _0807DD6C
|
||||
@ -1094,7 +1094,7 @@ _0807DDC8:
|
||||
_0807DDCA:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r2, r0, 0
|
||||
ldrh r1, [r2]
|
||||
movs r3, 0x80
|
||||
@ -1141,7 +1141,7 @@ _0807DE1A:
|
||||
beq _0807DE30
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
ldrh r2, [r0]
|
||||
movs r1, 0x40
|
||||
orrs r1, r2
|
||||
@ -1192,7 +1192,7 @@ _0807DE74:
|
||||
ldr r0, _0807DF30
|
||||
ldr r1, [r0]
|
||||
mov r0, r9
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r0, 0x28
|
||||
movs r1, 0x2B
|
||||
bl sub_803E708
|
||||
@ -1316,7 +1316,7 @@ _0807DF8E:
|
||||
ldr r0, _0807DFB0
|
||||
mov r1, r10
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
b _0807DFC2
|
||||
.align 2, 0
|
||||
_0807DFA8: .4byte gDungeon
|
||||
@ -1346,7 +1346,7 @@ _0807DFD4:
|
||||
ldr r0, _0807E184
|
||||
mov r1, r10
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807E188
|
||||
ldr r2, [r0]
|
||||
ldr r0, [sp, 0x8]
|
||||
@ -1402,7 +1402,7 @@ _0807E014:
|
||||
bgt _0807E112
|
||||
cmp r1, 0x1F
|
||||
bgt _0807E112
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
mov r8, r0
|
||||
ldr r0, [sp, 0x18]
|
||||
movs r2, 0
|
||||
|
@ -228,7 +228,7 @@ _0807E816:
|
||||
ldr r0, _0807E884
|
||||
ldr r1, [r0]
|
||||
adds r0, r5, 0
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807E844:
|
||||
movs r5, 0
|
||||
_0807E846:
|
||||
@ -421,7 +421,7 @@ _0807E9A4:
|
||||
movs r0, 0x2
|
||||
ldrsh r1, [r4, r0]
|
||||
adds r0, r5, 0
|
||||
bl sub_8069F54
|
||||
bl GetMonsterApparentID
|
||||
b _0807E9D8
|
||||
.align 2, 0
|
||||
_0807E9D0: .4byte 0xfffffe88
|
||||
@ -494,7 +494,7 @@ MudWaterSportEffect:
|
||||
bl GetLeader
|
||||
ldr r1, _0807EA68
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _0807EA8C
|
||||
.align 2, 0
|
||||
_0807EA5C: .4byte gUnknown_80F4EAC
|
||||
@ -514,7 +514,7 @@ _0807EA6C:
|
||||
bl GetLeader
|
||||
ldr r1, _0807EA9C
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807EA8C:
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -677,7 +677,7 @@ _0807EBA6:
|
||||
bl GetLeader
|
||||
ldr r1, _0807EC1C
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807EBD4:
|
||||
ldr r4, _0807EC14
|
||||
ldr r0, [r4]
|
||||
@ -697,7 +697,7 @@ _0807EBD4:
|
||||
bl GetLeader
|
||||
ldr r1, _0807EC24
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_0807EC00:
|
||||
ldr r0, [sp, 0x8]
|
||||
add sp, 0xC
|
||||
@ -1621,7 +1621,7 @@ sub_807F33C:
|
||||
bl GetLeader
|
||||
ldr r1, _0807F428
|
||||
ldr r1, [r1]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
movs r6, 0
|
||||
_0807F360:
|
||||
movs r5, 0
|
||||
@ -1748,7 +1748,7 @@ sub_807F43C:
|
||||
ldr r0, _0807F468
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807F46C
|
||||
b _0807F694
|
||||
.align 2, 0
|
||||
@ -1761,7 +1761,7 @@ _0807F470:
|
||||
ldr r0, _0807F488
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807F48C
|
||||
ldr r2, [r0]
|
||||
mov r0, r8
|
||||
@ -2046,7 +2046,7 @@ _0807F6A8:
|
||||
ldr r0, _0807F860
|
||||
mov r1, r8
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
ldr r0, _0807F864
|
||||
ldr r2, [r0]
|
||||
ldr r0, [sp, 0xEC]
|
||||
@ -2173,7 +2173,7 @@ _0807F794:
|
||||
cmp r0, 0
|
||||
beq _0807F7E6
|
||||
ldr r0, [sp, 0x100]
|
||||
bl sin_abs_4096
|
||||
bl sin_4096
|
||||
lsls r0, 5
|
||||
mov r3, r8
|
||||
str r0, [r3, 0x1C]
|
||||
@ -2468,7 +2468,7 @@ _0807FA1E:
|
||||
_0807FA22:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl GetTileSafe
|
||||
bl GetTileMut
|
||||
adds r4, r0, 0
|
||||
ldrh r1, [r4, 0x4]
|
||||
movs r0, 0x4
|
||||
|
@ -206,7 +206,7 @@ _08080A26:
|
||||
_08080A2E:
|
||||
ldr r1, [r0]
|
||||
ldr r0, [sp, 0x14]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
b _08080A46
|
||||
.align 2, 0
|
||||
_08080A38: .4byte gUnknown_80FDACC
|
||||
@ -214,7 +214,7 @@ _08080A3C:
|
||||
ldr r0, _08080A58
|
||||
ldr r1, [r0]
|
||||
ldr r0, [sp, 0x14]
|
||||
bl TryDisplayDungeonLoggableMessage
|
||||
bl LogMessageByIdWithPopupCheckUser
|
||||
_08080A46:
|
||||
add sp, 0x30
|
||||
pop {r3-r5}
|
||||
|
1010
asm/code_8080CF0.s
1010
asm/code_8080CF0.s
File diff suppressed because it is too large
Load Diff
@ -322,12 +322,12 @@ sub_8084448:
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r4, 0x50
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r0, r5, 0
|
||||
bl sub_8070BC0
|
||||
lsls r0, 24
|
||||
@ -516,12 +516,12 @@ sub_80845E0:
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r4, 0x50
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r0, r6, 0
|
||||
bl sub_8070BC0
|
||||
lsls r0, 24
|
||||
@ -585,7 +585,7 @@ _08084680:
|
||||
ldr r0, _0808469C
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
bl SubstitutePlaceholderStringTags
|
||||
adds r0, r7, 0
|
||||
bl sub_8070BC0
|
||||
lsls r0, 24
|
||||
|
@ -400,7 +400,7 @@ _080987C0:
|
||||
bl DeleteGroundEffects
|
||||
bl sub_809C658
|
||||
bl nullsub_16
|
||||
bl sub_8097944
|
||||
bl UpdateAdventureAchievements
|
||||
cmp r7, r4
|
||||
beq _08098848
|
||||
adds r0, r7, 0
|
||||
|
@ -3103,7 +3103,7 @@ _080A8F30:
|
||||
ldrsh r1, [r0, r2]
|
||||
_080A8F34:
|
||||
adds r0, r4, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
b _080A8F44
|
||||
_080A8F3C:
|
||||
ldr r1, _080A8F4C
|
||||
|
@ -355,7 +355,7 @@ _080A184C:
|
||||
bl sub_80A8BFC
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
bl CanMove
|
||||
bl GetCanMoveFlag
|
||||
b _080A171E
|
||||
_080A185E:
|
||||
lsls r0, r5, 16
|
||||
@ -487,7 +487,7 @@ _080A195A:
|
||||
movs r2, 0xA
|
||||
bl sub_80922B4
|
||||
_080A1968:
|
||||
bl sub_8097848
|
||||
bl IncrementAdventureNumJoined
|
||||
bl _080A236A
|
||||
.align 2, 0
|
||||
_080A1970: .4byte gUnknown_8116710
|
||||
@ -526,7 +526,7 @@ _080A1988:
|
||||
bne _080A19C2
|
||||
b _080A1EBE
|
||||
_080A19C2:
|
||||
bl sub_8097848
|
||||
bl IncrementAdventureNumJoined
|
||||
ldrh r1, [r4]
|
||||
movs r0, 0x2
|
||||
orrs r0, r1
|
||||
@ -626,7 +626,7 @@ _080A1A70:
|
||||
bl sub_808D2E8
|
||||
cmp r0, 0
|
||||
beq _080A1A9A
|
||||
bl sub_8097848
|
||||
bl IncrementAdventureNumJoined
|
||||
_080A1A9A:
|
||||
movs r0, 0x92
|
||||
movs r1, 0
|
||||
@ -641,7 +641,7 @@ _080A1A9A:
|
||||
bl sub_808D2E8
|
||||
cmp r0, 0
|
||||
beq _080A1ABC
|
||||
bl sub_8097848
|
||||
bl IncrementAdventureNumJoined
|
||||
_080A1ABC:
|
||||
movs r0, 0x90
|
||||
movs r1, 0
|
||||
@ -660,7 +660,7 @@ _080A1ACC:
|
||||
bne _080A1AE2
|
||||
bl _080A236A
|
||||
_080A1AE2:
|
||||
bl sub_8097848
|
||||
bl IncrementAdventureNumJoined
|
||||
bl _080A236A
|
||||
.align 2, 0
|
||||
_080A1AEC: .4byte gUnknown_8116788
|
||||
@ -1121,7 +1121,7 @@ _080A1EAC:
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x9
|
||||
ble _080A1EAC
|
||||
bl sub_8097848
|
||||
bl IncrementAdventureNumJoined
|
||||
_080A1EBE:
|
||||
movs r0, 0x1
|
||||
b _080A236C
|
||||
@ -1710,85 +1710,4 @@ _080A236C:
|
||||
bx r1
|
||||
thumb_func_end sub_80A14E8
|
||||
|
||||
thumb_func_start GroundScript_Unlock
|
||||
GroundScript_Unlock:
|
||||
push {r4-r7,lr}
|
||||
ldr r1, _080A241C
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _080A2414
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
movs r6, 0
|
||||
_080A2390:
|
||||
ldr r0, _080A2420
|
||||
adds r7, r6, r0
|
||||
ldrb r0, [r7]
|
||||
cmp r0, 0
|
||||
beq _080A240E
|
||||
movs r0, 0x1
|
||||
ldr r1, _080A2424
|
||||
adds r2, r6, 0
|
||||
bl Log
|
||||
lsls r5, r6, 16
|
||||
asrs r5, 16
|
||||
adds r0, r5, 0
|
||||
bl GroundMapNotifyAll
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
bl GroundLivesNotifyAll
|
||||
orrs r4, r0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
bl GroundObjectsNotifyAll
|
||||
orrs r4, r0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
bl GroundEffectsNotifyAll
|
||||
orrs r4, r0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, _080A2428
|
||||
adds r5, r6, r0
|
||||
ldrb r0, [r5]
|
||||
cmp r0, 0
|
||||
beq _080A240C
|
||||
cmp r4, 0
|
||||
beq _080A240E
|
||||
movs r0, 0x80
|
||||
adds r4, r6, 0
|
||||
orrs r4, r0
|
||||
lsls r4, 16
|
||||
asrs r4, 16
|
||||
adds r0, r4, 0
|
||||
bl GroundMapNotifyAll
|
||||
adds r0, r4, 0
|
||||
bl GroundLivesNotifyAll
|
||||
adds r0, r4, 0
|
||||
bl GroundObjectsNotifyAll
|
||||
adds r0, r4, 0
|
||||
bl GroundEffectsNotifyAll
|
||||
movs r0, 0
|
||||
strb r0, [r5]
|
||||
_080A240C:
|
||||
strb r0, [r7]
|
||||
_080A240E:
|
||||
adds r6, 0x1
|
||||
cmp r6, 0x80
|
||||
ble _080A2390
|
||||
_080A2414:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A241C: .4byte gAnyScriptLocked
|
||||
_080A2420: .4byte gScriptLocks
|
||||
_080A2424: .4byte gUnknown_8116848
|
||||
_080A2428: .4byte gScriptLockConds
|
||||
thumb_func_end GroundScript_Unlock
|
||||
|
||||
.align 2,0
|
||||
|
1145
asm/math.s
1145
asm/math.s
File diff suppressed because it is too large
Load Diff
@ -753,7 +753,7 @@ _0808FDB0:
|
||||
movs r3, 0
|
||||
ldrsh r1, [r2, r3]
|
||||
adds r0, r6, 0
|
||||
bl CopyMonsterNametoBuffer
|
||||
bl CopyMonsterNameToBuffer
|
||||
ldr r1, _0808FEF4
|
||||
mov r2, r10
|
||||
movs r3, 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -d "$DEVKITARM/bin/" ]]; then
|
||||
if [[ -n "$DEVKITARM" ]]; then
|
||||
OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"
|
||||
else
|
||||
OBJDUMP_BIN="arm-none-eabi-objdump"
|
||||
|
265
charmap.txt
265
charmap.txt
@ -115,6 +115,7 @@
|
||||
'”' = 7E 39 34
|
||||
'•' = 95
|
||||
@ 96, 97 are not hyphens, 'er', and 're' superscripts in kanji_a
|
||||
INVALID_SEQUENCE_976C = 97 6C
|
||||
'˜' = 98
|
||||
'™' = 99
|
||||
'š' = 9A
|
||||
@ -221,61 +222,259 @@
|
||||
|
||||
@ Shift JIS
|
||||
' ' = 81 40
|
||||
'、' = 81 41
|
||||
'。' = 81 42
|
||||
',' = 81 43
|
||||
'.' = 81 44
|
||||
'・' = 81 45
|
||||
':' = 81 46
|
||||
';' = 81 47
|
||||
'?' = 81 48
|
||||
'!' = 81 49
|
||||
'゛' = 81 4A
|
||||
'゜' = 81 4B
|
||||
'ー' = 81 5B
|
||||
'/' = 81 5E
|
||||
'〜' = 81 60
|
||||
'♪' = 81 F4
|
||||
'A' = 82 60
|
||||
'B' = 82 61
|
||||
'C' = 82 62
|
||||
'う' = 82 A4
|
||||
'か' = 82 A9
|
||||
'が' = 82 AA
|
||||
'し' = 82 B5
|
||||
'す' = 82 B7
|
||||
'な' = 82 C8
|
||||
'に' = 82 C9
|
||||
'も' = 82 CC
|
||||
'み' = 82 DC
|
||||
'ま' = 82 DD
|
||||
'の' = 82 E0
|
||||
'よ' = 82 E6
|
||||
'る' = 82 E9
|
||||
'を' = 82 F0
|
||||
'ん' = 82 F1
|
||||
'カ' = 83 4A
|
||||
'ナ' = 83 69
|
||||
|
||||
UNK_ICON_81_69 = 81 69
|
||||
UNK_ICON_81_6A = 81 6A
|
||||
RIGHT_ARROW = 81 A8
|
||||
LEFT_ARROW = 81 A9
|
||||
UP_ARROW = 81 AA
|
||||
'…' = 81 63
|
||||
'‥' = 81 64
|
||||
@'’' = 81 66 - same char as 92
|
||||
@'“' = 81 67 - same char as ~93
|
||||
@'”' = 81 68 - same char as ~94
|
||||
'(' = 81 69
|
||||
')' = 81 6A
|
||||
'「' = 81 75
|
||||
'」' = 81 76
|
||||
'『' = 81 77
|
||||
'』' = 81 78
|
||||
'+' = 81 7B
|
||||
'−' = 81 7C
|
||||
@'×' = 81 7E - same char as D7
|
||||
'=' = 81 81
|
||||
'<' = 81 83
|
||||
'>' = 81 84
|
||||
'∞' = 81 87
|
||||
@'♂' = 81 89 - same char as BD
|
||||
@'♀' = 81 8A - same char as BE
|
||||
'$' = 81 90
|
||||
'%' = 81 93
|
||||
'#' = 81 94
|
||||
'&' = 81 95
|
||||
'*' = 81 96
|
||||
'@' = 81 97
|
||||
'○' = 81 9B
|
||||
'→' = 81 A8
|
||||
'←' = 81 A9
|
||||
'↑' = 81 AA
|
||||
'↓' = 81 AB
|
||||
'♪' = 81 F4
|
||||
@ Inverted font block
|
||||
'0' = 82 4F
|
||||
'1' = 82 50
|
||||
'2' = 82 51
|
||||
'3' = 82 52
|
||||
'4' = 82 53
|
||||
'5' = 82 54
|
||||
'6' = 82 55
|
||||
'7' = 82 56
|
||||
'8' = 82 57
|
||||
'9' = 82 58
|
||||
|
||||
'A' = 82 60 @ Not standard shift-jis
|
||||
'B' = 82 61
|
||||
'C' = 82 62
|
||||
|
||||
'あ' = 82 A0
|
||||
'い' = 82 A2
|
||||
'う' = 82 A4
|
||||
'え' = 82 A6
|
||||
'お' = 82 A8
|
||||
'か' = 82 A9
|
||||
'が' = 82 AA
|
||||
'き' = 82 AB
|
||||
'ぎ' = 82 AC
|
||||
'く' = 82 AD
|
||||
'ぐ' = 82 AE
|
||||
'け' = 82 AF
|
||||
'げ' = 82 B0
|
||||
'こ' = 82 B1
|
||||
'ご' = 82 B2
|
||||
'さ' = 82 B3
|
||||
'ざ' = 82 B4
|
||||
'し' = 82 B5
|
||||
'じ' = 82 B6
|
||||
'す' = 82 B7
|
||||
'ず' = 82 B8
|
||||
'せ' = 82 B9
|
||||
'ぜ' = 82 BA
|
||||
'そ' = 82 BB
|
||||
'ぞ' = 82 BC
|
||||
'た' = 82 BD
|
||||
'だ' = 82 BE
|
||||
'ち' = 82 BF
|
||||
'ぢ' = 82 C0
|
||||
'つ' = 82 C2
|
||||
'づ' = 82 C3
|
||||
'て' = 82 C4
|
||||
'で' = 82 C5
|
||||
'と' = 82 C6
|
||||
'ど' = 82 C7
|
||||
'な' = 82 C8
|
||||
'に' = 82 C9
|
||||
'ぬ' = 82 CA
|
||||
'ね' = 82 CB
|
||||
'の' = 82 CC
|
||||
'は' = 82 CD
|
||||
'ば' = 82 CE
|
||||
'ぱ' = 82 CF
|
||||
'ひ' = 82 D0
|
||||
'び' = 82 D1
|
||||
'ぴ' = 82 D2
|
||||
'ふ' = 82 D3
|
||||
'ぶ' = 82 D4
|
||||
'ぷ' = 82 D5
|
||||
'へ' = 82 D6
|
||||
'べ' = 82 D7
|
||||
'ぺ' = 82 D8
|
||||
'ほ' = 82 D9
|
||||
'ぼ' = 82 DA
|
||||
'ぽ' = 82 DB
|
||||
'ま' = 82 DC
|
||||
'み' = 82 DD
|
||||
'む' = 82 DE
|
||||
'め' = 82 DF
|
||||
'も' = 82 E0
|
||||
'や' = 82 E2
|
||||
'ゆ' = 82 E4
|
||||
'よ' = 82 E6
|
||||
'ら' = 82 E7
|
||||
'り' = 82 E8
|
||||
'る' = 82 E9
|
||||
'れ' = 82 EA
|
||||
'ろ' = 82 EB
|
||||
'わ' = 82 ED
|
||||
'を' = 82 F0
|
||||
'ん' = 82 F1
|
||||
'ア' = 83 41
|
||||
'イ' = 83 43
|
||||
'ウ' = 83 45
|
||||
'エ' = 83 47
|
||||
'オ' = 83 49
|
||||
'カ' = 83 4A
|
||||
'ガ' = 83 4B
|
||||
'キ' = 83 4C
|
||||
'ギ' = 83 4D
|
||||
'ク' = 83 4E
|
||||
'グ' = 83 4F
|
||||
'ケ' = 83 50
|
||||
'ゲ' = 83 51
|
||||
'コ' = 83 52
|
||||
'ゴ' = 83 53
|
||||
'サ' = 83 54
|
||||
'ザ' = 83 55
|
||||
'シ' = 83 56
|
||||
'ジ' = 83 57
|
||||
'ス' = 83 58
|
||||
'ズ' = 83 59
|
||||
'セ' = 83 5A
|
||||
'ゼ' = 83 5B
|
||||
'ソ' = 83 5C
|
||||
'ゾ' = 83 5D
|
||||
'タ' = 83 5E
|
||||
'ダ' = 83 5F
|
||||
'チ' = 83 60
|
||||
'ヂ' = 83 61
|
||||
'ッ' = 83 62
|
||||
'ツ' = 83 63
|
||||
'ヅ' = 83 64
|
||||
'テ' = 83 65
|
||||
'デ' = 83 66
|
||||
'ト' = 83 67
|
||||
'ド' = 83 68
|
||||
'ナ' = 83 69
|
||||
'ニ' = 83 6A
|
||||
'ヌ' = 83 6B
|
||||
'ネ' = 83 6C
|
||||
'ノ' = 83 6D
|
||||
'ハ' = 83 6E
|
||||
'バ' = 83 6F
|
||||
'パ' = 83 70
|
||||
'ヒ' = 83 71
|
||||
'ビ' = 83 72
|
||||
'ピ' = 83 73
|
||||
'フ' = 83 74
|
||||
'ブ' = 83 75
|
||||
'プ' = 83 76
|
||||
'ヘ' = 83 77
|
||||
'ベ' = 83 78
|
||||
'ペ' = 83 79
|
||||
'ホ' = 83 7A
|
||||
'ボ' = 83 7B
|
||||
'ポ' = 83 7C
|
||||
'マ' = 83 7D
|
||||
'ミ' = 83 7E
|
||||
'ム' = 83 80
|
||||
'メ' = 83 81
|
||||
'モ' = 83 82
|
||||
'ヤ' = 83 84
|
||||
'ユ' = 83 86
|
||||
'ヨ' = 83 88
|
||||
'ラ' = 83 89
|
||||
'リ' = 83 8A
|
||||
'ル' = 83 8B
|
||||
'レ' = 83 8C
|
||||
'ロ' = 83 8D
|
||||
'ワ' = 83 8F
|
||||
'ヲ' = 83 92
|
||||
'ン' = 83 93
|
||||
@'Α' = 83 9F @ inverted narrow fixedwidth 0-9
|
||||
@'Β' = 83 A0
|
||||
@'Γ' = 83 A1
|
||||
@'Δ' = 83 A2
|
||||
@'Ε' = 83 A3
|
||||
@'Ζ' = 83 A4
|
||||
@'Η' = 83 A5
|
||||
@'Θ' = 83 A6
|
||||
@'Ι' = 83 A7
|
||||
@'Κ' = 83 A8
|
||||
@ Symbol block, replaces greek
|
||||
@'α' = 83 BF @ Po
|
||||
@'β' = 83 C0 @ Opened mail
|
||||
@'γ' = 83 C1 @ ?
|
||||
@'δ' = 83 C2 @ Go
|
||||
@'ε' = 83 C3 @ News
|
||||
@'ζ' = 83 C4 @ Ke
|
||||
@'η' = 83 C5 @ White dash?
|
||||
@'θ' = 83 C6 @ X button
|
||||
@'ι' = 83 C7 @ Y button
|
||||
'κ' = 83 C8 @ Kappa wasn't replaced :P
|
||||
|
||||
POKE = 83 BF 83 C4 @ This is actually two characters which can render separately; may need to be split eventually.
|
||||
UNK_ICON_83_C0 = 83 C0
|
||||
UNK_ICON_83_C1 = 83 C1
|
||||
UNK_ICON_83_C2 = 83 C2
|
||||
UNK_ICON_83_C3 = 83 C3
|
||||
ENVELOPE_OPEN = 83 C0
|
||||
THANK_YOU_MAIL = 83 C1
|
||||
ICON_GO = 83 C2
|
||||
ICON_NEWS = 83 C3
|
||||
NDS_Y_BUTTON = 83 C7
|
||||
|
||||
R_BUTTON = 84 86
|
||||
UNK_ICON_84_87 = 84 87
|
||||
ENVELOPE_CLOSED = 84 87
|
||||
|
||||
UNK_ICON_40 = 87 40
|
||||
ICON_BLANK = 87 40
|
||||
@ = 87 41 @ E
|
||||
STAR_BULLET = 87 42
|
||||
@ = 87 43 @ Star with E
|
||||
ICON_STICKY = 87 44
|
||||
SPEECH_BUBBLE = 87 45
|
||||
@ 87 46..49 - red hearts
|
||||
@ 87 4a..4d - yellow hearts - appears in team list
|
||||
TM = 87 4E
|
||||
ORB = 87 4F
|
||||
A_BUTTON = 87 50
|
||||
B_BUTTON = 87 51
|
||||
DPAD = 87 52
|
||||
START_BUTTON = 87 53 87 71
|
||||
@ 87 54 placeholder, some kanji character
|
||||
@ 87 5F ?????
|
||||
SELECT_BUTTON = 87 72 87 73
|
||||
L_BUTTON = 87 74
|
||||
|
||||
|
@ -812,5 +812,12 @@ gUnknown_80F51EC: @ 80F51EC
|
||||
.global gUnknown_80F520C
|
||||
gUnknown_80F520C: @ 80F520C
|
||||
@ replacing .incbin "baserom.gba", 0x000f520c, 0x20
|
||||
.byte 0x01, 0x00, 0x78, 0x01, 0x02, 0x00, 0x7a, 0x01, 0x01, 0x00, 0x78, 0x01, 0x01, 0x00, 0x78, 0x01, 0x03, 0x00, 0x7b, 0x01, 0x06, 0x00, 0x79, 0x01, 0x03, 0x00, 0x7b, 0x01, 0x06, 0x00, 0x79, 0x01
|
||||
.byte 0x01, 0x00, 0x78, 0x01
|
||||
.byte 0x02, 0x00, 0x7a, 0x01
|
||||
.byte 0x01, 0x00, 0x78, 0x01
|
||||
.byte 0x01, 0x00, 0x78, 0x01
|
||||
.byte 0x03, 0x00, 0x7b, 0x01
|
||||
.byte 0x06, 0x00, 0x79, 0x01
|
||||
.byte 0x03, 0x00, 0x7b, 0x01
|
||||
.byte 0x06, 0x00, 0x79, 0x01
|
||||
|
||||
|
@ -308,8 +308,8 @@ gUnknown_80F6624: @ 80F6624
|
||||
.byte 0xb9, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xba, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00
|
||||
.byte 0xbb, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00
|
||||
|
||||
.global gStatusSpriteMasks_SleepStatus
|
||||
gStatusSpriteMasks_SleepStatus: @ 80F669C
|
||||
.global gStatusSpriteMasks_SleepClassStatus
|
||||
gStatusSpriteMasks_SleepClassStatus: @ 80F669C
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_SLEEP @ STATUS_SLEEP
|
||||
.4byte STATUS_SPRITE_SLEEPLESS @ STATUS_SLEEPLESS
|
||||
@ -317,16 +317,16 @@ gStatusSpriteMasks_SleepStatus: @ 80F669C
|
||||
.4byte 0 @ STATUS_YAWNING
|
||||
.4byte STATUS_SPRITE_SLEEP @ STATUS_NAPPING
|
||||
|
||||
.global gStatusSpriteMasks_NonVolatileStatus
|
||||
gStatusSpriteMasks_NonVolatileStatus: @ 80F66B4
|
||||
.global gStatusSpriteMasks_BurnClassStatus
|
||||
gStatusSpriteMasks_BurnClassStatus: @ 80F66B4
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_BURNED @ STATUS_BURN
|
||||
.4byte STATUS_SPRITE_POISONED @ STATUS_POISONED
|
||||
.4byte STATUS_SPRITE_BADLY_POISONED @ STATUS_BADLY_POISONED
|
||||
.4byte 0 @ STATUS_PARALYSIS
|
||||
|
||||
.global gStatusSpriteMasks_ImmobilizeStatus
|
||||
gStatusSpriteMasks_ImmobilizeStatus: @ 80F66C8
|
||||
.global gStatusSpriteMasks_FrozenClassStatus
|
||||
gStatusSpriteMasks_FrozenClassStatus: @ 80F66C8
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_FROZEN @ STATUS_FROZEN
|
||||
.4byte 0 @ STATUS_SHADOW_HOLD
|
||||
@ -336,8 +336,8 @@ gStatusSpriteMasks_ImmobilizeStatus: @ 80F66C8
|
||||
.4byte 0 @ STATUS_PETRIFIED
|
||||
.4byte 0 @ STATUS_CONSTRICTION
|
||||
|
||||
.global gStatusSpriteMasks_VolatileStatus
|
||||
gStatusSpriteMasks_VolatileStatus: @ 80F66E8
|
||||
.global gStatusSpriteMasks_CringeClassStatus
|
||||
gStatusSpriteMasks_CringeClassStatus: @ 80F66E8
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_CRINGE
|
||||
.4byte STATUS_SPRITE_CONFUSED @ STATUS_CONFUSED
|
||||
@ -347,8 +347,8 @@ gStatusSpriteMasks_VolatileStatus: @ 80F66E8
|
||||
.4byte STATUS_SPRITE_ENCORE @ STATUS_ENCORE
|
||||
.4byte 0 @ STATUS_INFATUATED
|
||||
|
||||
.global gStatusSpriteMasks_ChargingStatus
|
||||
gStatusSpriteMasks_ChargingStatus: @ 80F6708
|
||||
.global gStatusSpriteMasks_BideClassStatus
|
||||
gStatusSpriteMasks_BideClassStatus: @ 80F6708
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_BIDE
|
||||
.4byte 0 @ STATUS_SOLARBEAM
|
||||
@ -363,8 +363,8 @@ gStatusSpriteMasks_ChargingStatus: @ 80F6708
|
||||
.4byte 0 @ STATUS_CHARGING
|
||||
.4byte 0 @ STATUS_ENRAGED
|
||||
|
||||
.global gStatusSpriteMasks_ProtectionStatus
|
||||
gStatusSpriteMasks_ProtectionStatus: @ 80F673C
|
||||
.global gStatusSpriteMasks_ReflectClassStatus
|
||||
gStatusSpriteMasks_ReflectClassStatus: @ 80F673C
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_SHIELD_BLUE @ STATUS_REFLECT
|
||||
.4byte STATUS_SPRITE_SHIELD_RED @ STATUS_SAFEGUARD
|
||||
@ -381,42 +381,42 @@ gStatusSpriteMasks_ProtectionStatus: @ 80F673C
|
||||
.4byte STATUS_SPRITE_SHIELD_GREEN @ STATUS_VITAL_THROW
|
||||
.4byte STATUS_SPRITE_SHIELD_BLUE @ STATUS_MIST
|
||||
|
||||
.global gStatusSpriteMasks_WaitingStatus
|
||||
gStatusSpriteMasks_WaitingStatus: @ 80F6778
|
||||
.global gStatusSpriteMasks_CurseClassStatus
|
||||
gStatusSpriteMasks_CurseClassStatus: @ 80F6778
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_CURSED @ STATUS_CURSED
|
||||
.4byte 0 @ STATUS_DECOY
|
||||
.4byte STATUS_SPRITE_SNATCH @ STATUS_SNATCH
|
||||
|
||||
.global gStatusSpriteMasks_LinkedStatus
|
||||
gStatusSpriteMasks_LinkedStatus: @ 80F6788
|
||||
.global gStatusSpriteMasks_LeechSeedClassStatus
|
||||
gStatusSpriteMasks_LeechSeedClassStatus: @ 80F6788
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_LEECH_SEED
|
||||
.4byte 0 @ STATUS_DESTINY_BOND
|
||||
|
||||
.global gStatusSpriteMasks_MoveStatus
|
||||
gStatusSpriteMasks_MoveStatus: @ 80F6794
|
||||
.global gStatusSpriteMasks_SureShotClassStatus
|
||||
gStatusSpriteMasks_SureShotClassStatus: @ 80F6794
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_SURE_SHOT @ STATUS_SURE_SHOT
|
||||
.4byte STATUS_SPRITE_WHIFFER @ STATUS_WHIFFER
|
||||
.4byte STATUS_SPRITE_SET_DAMAGE @ STATUS_SET_DAMAGE
|
||||
.4byte STATUS_SPRITE_FOCUS_ENERGY @ STATUS_FOCUS_ENERGY
|
||||
|
||||
.global gStatusSpriteMasks_ItemStatus
|
||||
gStatusSpriteMasks_ItemStatus: @ 80F67A8
|
||||
.global gStatusSpriteMasks_LongTossClassStatus
|
||||
gStatusSpriteMasks_LongTossClassStatus: @ 80F67A8
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_LONG_TOSS
|
||||
.4byte 0 @ STATUS_PIERCE
|
||||
|
||||
.global gStatusSpriteMasks_TransformStatus
|
||||
gStatusSpriteMasks_TransformStatus: @ 80F67B4
|
||||
.global gStatusSpriteMasks_InvisibleClassStatus
|
||||
gStatusSpriteMasks_InvisibleClassStatus: @ 80F67B4
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte 0 @ STATUS_INVISIBLE
|
||||
.4byte 0 @ STATUS_TRANSFORMED
|
||||
.4byte 0 @ STATUS_MOBILE
|
||||
|
||||
.global gStatusSpriteMasks_EyesightStatus
|
||||
gStatusSpriteMasks_EyesightStatus: @ 80F67C4
|
||||
.global gStatusSpriteMasks_BlinkerClassStatus
|
||||
gStatusSpriteMasks_BlinkerClassStatus: @ 80F67C4
|
||||
.4byte 0 @ STATUS_NONE
|
||||
.4byte STATUS_SPRITE_BLINKER @ STATUS_BLINKER
|
||||
.4byte STATUS_SPRITE_CROSS_EYED @ STATUS_CROSS_EYED
|
||||
@ -465,7 +465,8 @@ gUnknown_80F683C: @ 80F683C
|
||||
.global gUnknown_80F6850
|
||||
gUnknown_80F6850: @ 80F6850
|
||||
@ replacing .incbin "baserom.gba", 0xF6850, 0x10
|
||||
.byte 0x9e, 0x01, 0xa1, 0x01, 0xa2, 0x01, 0xa3, 0x01, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
|
||||
.byte 0x9e, 0x01, 0xa1, 0x01, 0xa2, 0x01, 0xa3, 0x01
|
||||
.byte 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
|
||||
|
||||
.global gSpeedTurns
|
||||
gSpeedTurns: @ 80F6860
|
||||
@ -521,14 +522,14 @@ gUnknown_80F69A8: @ 80F69A8
|
||||
.byte 0x69, 0x72, 0x30, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00, 0x70, 0x6b, 0x73, 0x64
|
||||
.byte 0x69, 0x72, 0x30, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
|
||||
|
||||
.global gUnknown_80F69D4
|
||||
gUnknown_80F69D4: @ 80F69D4
|
||||
.global gOtherOobTile
|
||||
gOtherOobTile: @ 80F69D4
|
||||
@ replacing .incbin "baserom.gba", 0xF69D4, 0x18
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80F69EC
|
||||
gUnknown_80F69EC: @ 80F69EC
|
||||
.global gWaterOobTile
|
||||
gWaterOobTile: @ 80F69EC
|
||||
@ replacing .incbin "baserom.gba", 0xF69EC, 0x18
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
1534
data/data_8107010.s
1534
data/data_8107010.s
File diff suppressed because it is too large
Load Diff
1523
data/data_8107224.s
Normal file
1523
data/data_8107224.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -275,7 +275,7 @@ MoveUseTextBide:
|
||||
|
||||
.global MoveNameBide2
|
||||
MoveNameBide2:
|
||||
.string "がみん\0"
|
||||
.string "がまん\0"
|
||||
.align 2,0
|
||||
|
||||
.global MoveDescriptionIsWatching
|
||||
@ -285,7 +285,7 @@ MoveDescriptionIsWatching:
|
||||
|
||||
.global MoveNameIsWatching
|
||||
MoveNameIsWatching:
|
||||
.string "ようすをまる\0"
|
||||
.string "ようすをみる\0"
|
||||
.align 2,0
|
||||
|
||||
.global MoveUseTextRegularAttack
|
||||
@ -3280,5 +3280,5 @@ MoveDescriptionNone:
|
||||
|
||||
.global MoveNameNone
|
||||
MoveNameNone:
|
||||
.string "なにのも?\0"
|
||||
.string "なにもの?\0"
|
||||
.align 2,0
|
||||
|
@ -29,7 +29,7 @@ $(LEARNSET_DATA): $(LEARNSET_DIR)/learnset_data.json
|
||||
$(DUNGEONJSON) learnset pmd-red $<
|
||||
|
||||
data_learnset_ptrs: ${LEARNSET_DATA};
|
||||
echo '.4byte 0' >> $(LEARNSET_PTRS)
|
||||
echo '.4byte 0' > $(LEARNSET_PTRS)
|
||||
echo '.4byte 0' >> $(LEARNSET_PTRS)
|
||||
cat $(LEARNSET_DATA) | grep .global >> $(LEARNSET_PTRS)
|
||||
ifeq ($(shell uname -s), Darwin)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move);
|
||||
bool8 MoveMatchesBideClassStatus(Entity *pokemon, Move *move);
|
||||
// checkCharge = Check for the move named Charge.
|
||||
bool8 IsChargingAnyTwoTurnMove(Entity *pokemon, bool8 checkCharge);
|
||||
|
||||
|
@ -25,7 +25,7 @@ bool8 sub_800E9A8(s32);
|
||||
void sub_800DAC0(u32);
|
||||
void sub_800DB7C(void);
|
||||
void sub_800DBBC(void);
|
||||
void sub_800E90C(Position *);
|
||||
void sub_800E8AC(s32 a0, void *a1, void *a2, s32 a3, void *a4); // a2 could be Position
|
||||
void sub_800E90C(DungeonPos *);
|
||||
void sub_800E8AC(s32 a0, void *a1, void *a2, s32 a3, void *a4); // a2 could be DungeonPos
|
||||
|
||||
#endif // GUARD_CODE_800DAC0_H
|
||||
|
8
include/code_800F958.h
Normal file
8
include/code_800F958.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_CODE_800F958_H
|
||||
#define GUARD_CODE_800F958_H
|
||||
|
||||
#include "structs/str_position.h"
|
||||
|
||||
void AddPokemonDungeonSprite(s32 id, s16 species, DungeonPos *pos, u32);
|
||||
|
||||
#endif // GUARD_CODE_800F958_H
|
8
include/code_803E724.h
Normal file
8
include/code_803E724.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_CODE_803E724_H
|
||||
#define GUARD_CODE_803E724_H
|
||||
|
||||
#include "structs/str_position.h"
|
||||
|
||||
bool8 sub_803F428(DungeonPos *pos);
|
||||
|
||||
#endif // GUARD_CODE_803E724_H
|
@ -4,6 +4,7 @@
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/str_damage.h"
|
||||
|
||||
void sub_80420E8(Entity *pokemon, struct DamageStruct *dmgStruct);
|
||||
void sub_80420E8(Entity *pokemon, DamageStruct *dmgStruct);
|
||||
void sub_80421C0(Entity *pokemon, u16);
|
||||
|
||||
#endif
|
||||
#endif // GUARD_CODE_8041AD0_H
|
@ -1,13 +1,14 @@
|
||||
#ifndef GUARD_CODE_8044CC8_H
|
||||
#define GUARD_CODE_8044CC8_H
|
||||
|
||||
struct unkStruct_202EE44
|
||||
// size: 0x4
|
||||
typedef struct unkStruct_202EE44
|
||||
{
|
||||
u16 unk0;
|
||||
u8 unk2;
|
||||
bool8 unk3;
|
||||
};
|
||||
} unkStruct_202EE44;
|
||||
|
||||
extern struct unkStruct_202EE44 gUnknown_202EE44[10];
|
||||
extern unkStruct_202EE44 gUnknown_202EE44[10];
|
||||
|
||||
#endif // GUARD_CODE_8044CC8_H
|
||||
|
10
include/code_80450F8.h
Normal file
10
include/code_80450F8.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef GUARD_CODE_80227B8_H
|
||||
#define GUARD_CODE_80227B8_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
Entity *sub_8045684(u8 trapID, DungeonPos *pos, u8 c);
|
||||
Entity *sub_8045708(DungeonPos *pos);
|
||||
void sub_80457DC(Entity* ent);
|
||||
|
||||
#endif // GUARD_CODE_80227B8_H
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void SetMessageArgument(u8 *buffer, Entity *entity, u32 param_3);
|
||||
void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 param_3);
|
||||
|
||||
#endif // GUARD_CODE_8045A00_H
|
||||
void sub_8045ACC(void);
|
||||
|
||||
#endif // GUARD_CODE_8045A00_H
|
@ -14,7 +14,7 @@ struct unkStruct_8069D4C_sub
|
||||
struct unkStruct_8069D4C
|
||||
{
|
||||
s16 id;
|
||||
Position pos;
|
||||
DungeonPos pos;
|
||||
s16 HP;
|
||||
struct unkStruct_8069D4C_sub offense;
|
||||
u16 level;
|
||||
|
@ -35,13 +35,13 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target);
|
||||
void VitalThrowStatusTarget(Entity * pokemon, Entity * target);
|
||||
void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4);
|
||||
void sub_807A0CC(Entity * pokemon, Entity * target);
|
||||
void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4);
|
||||
void SendNonVolatileEndMessage(Entity * pokemon, Entity * target);
|
||||
void SendImmobilizeEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendVolatileEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendProtectionEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus);
|
||||
void SendLinkedEndMessage(Entity * pokemon, Entity * target);
|
||||
void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 param_4);
|
||||
void EndBurnClassStatus(Entity * pokemon, Entity * target);
|
||||
void EndFrozenClassStatus(Entity * pokemon, Entity *target);
|
||||
void EndCringeClassStatus(Entity * pokemon, Entity *target);
|
||||
void EndReflectClassStatus(Entity * pokemon, Entity *target);
|
||||
void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus);
|
||||
void EndLeechSeedClassStatus(Entity * pokemon, Entity * target);
|
||||
void SendMoveEndMessage(Entity * pokemon, Entity * target);
|
||||
void SendTransformEndMessage(Entity * pokemon, Entity *target);
|
||||
void SendEyesightEndMessage(Entity * pokemon,Entity * target);
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define CODE_807CD9C_H
|
||||
|
||||
void sub_807CD9C(Entity *pokemon, Entity *target, u32 direction);
|
||||
void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, Position *pos);
|
||||
void sub_807D148(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos);
|
||||
void sub_807D3CC(Entity *param_1);
|
||||
|
||||
#endif /* ifndef CODE_807CD9C_H */
|
||||
|
@ -1,21 +1,12 @@
|
||||
#ifndef GUARD_CODE_8092334_H
|
||||
#define GUARD_CODE_8092334_H
|
||||
|
||||
// size: 0x10?
|
||||
typedef struct unkStruct_8094924
|
||||
{
|
||||
u8 *unk0; // head?
|
||||
u8 *unk4; // tail?
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
} unkStruct_8094924;
|
||||
#include "data_serializer.h"
|
||||
|
||||
void nullsub_102(unkStruct_8094924 *);
|
||||
void RestoreIntegerBits(unkStruct_8094924 *, void *, s32 size);
|
||||
void SaveIntegerBits(unkStruct_8094924 *, void *, s32 size);
|
||||
void xxx_init_struct_8094924_restore_809485C(unkStruct_8094924 *, u8 *, s32 size);
|
||||
void xxx_init_struct_8094924_save_809486C(unkStruct_8094924 *, u8 *, s32 size);
|
||||
|
||||
void sub_80948E4(unkStruct_8094924 *, u8 *, s32 size);
|
||||
void FinishBitSerializer(DataSerializer *seri);
|
||||
void InitBitReader(DataSerializer *seri, u8 *buffer, s32 bufLen);
|
||||
void InitBitWriter(DataSerializer *seri, u8 *buffer, s32 bufLen);
|
||||
void ReadBits(DataSerializer *seri, void *dst, s32 numBits);
|
||||
void WriteBits(DataSerializer *seri, void *src, s32 numBits);
|
||||
|
||||
#endif // GUARD_CODE_8092334_H
|
@ -46,7 +46,7 @@ u32 CountAllMail(void);
|
||||
s32 sub_8095374(void);
|
||||
s32 GetMailIndex(u8 mailType, u32);
|
||||
s32 GetFirstIndexofMailType(u8 mailType);
|
||||
void sub_8095824(struct unkStruct_8094924 *a, unkStruct_203B480 *b);
|
||||
void sub_8095774(struct unkStruct_8094924 *a, unkStruct_203B480 *b);
|
||||
void sub_8095824(DataSerializer *a, unkStruct_203B480 *b);
|
||||
void sub_8095774(DataSerializer *a, unkStruct_203B480 *b);
|
||||
|
||||
#endif // GUARD_CODE_8094F88_H
|
@ -68,7 +68,7 @@ u8 *sub_8096DD8(void);
|
||||
u8 *sub_8096DE8(void);
|
||||
u8 sub_8096E2C(void);
|
||||
void sub_8096EEC(WonderMail *mail);
|
||||
void SaveWonderMail(unkStruct_8094924 *a, WonderMail *b);
|
||||
void RestoreWonderMail(unkStruct_8094924 *a, WonderMail *b);
|
||||
void WriteWonderMailBits(DataSerializer *a, WonderMail *b);
|
||||
void ReadWonderMailBits(DataSerializer *a, WonderMail *b);
|
||||
|
||||
#endif // GUARD_CODE_80958E8_H
|
||||
|
@ -3,21 +3,59 @@
|
||||
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
// See gAdventureLogText
|
||||
enum AdventureAchievement
|
||||
{
|
||||
AA_HILL_OF_ANCIENTS,
|
||||
AA_FUGITIVE,
|
||||
AA_PREVENT_METEOR,
|
||||
AA_BROKE_CURSE,
|
||||
AA_TEAM_BASE_DONE,
|
||||
AA_SMEARGLE,
|
||||
AA_SPOTTED_MUNCHLAX,
|
||||
AA_NUM_MOVES_LEARNED,
|
||||
AA_NUM_FRIEND_RESCUE_SUCCESSES,
|
||||
AA_NUM_POKEMON_EVOLVED,
|
||||
AA_NUM_POKEMON_JOINED,
|
||||
AA_NUM_THIEVING_SUCCESSES,
|
||||
AA_NUM_FLOORS_EXPLORED,
|
||||
AA_ALL_FRIEND_AREAS,
|
||||
AA_ALL_POKEMON_LEADERS,
|
||||
AA_ALL_POKEMON_JOINED,
|
||||
AA_RECRUIT_MOLTRES,
|
||||
AA_RECRUIT_ZAPDOS,
|
||||
AA_RECRUIT_ARTICUNO,
|
||||
AA_RECRUIT_DEOXYS,
|
||||
AA_RECRUIT_ENTEI,
|
||||
AA_RECRUIT_RAIKOU,
|
||||
AA_RECRUIT_SUICUNE,
|
||||
AA_RECRUIT_HO_OH,
|
||||
AA_RECRUIT_KYOGRE,
|
||||
AA_RECRUIT_GROUDON,
|
||||
AA_RECRUIT_RAYQUAZA,
|
||||
AA_RECRUIT_LUGIA,
|
||||
AA_RECRUIT_CELEBI,
|
||||
AA_RECRUIT_MEW,
|
||||
AA_RECRUIT_MEWTWO,
|
||||
AA_RECRUIT_JIRACHI,
|
||||
AA_MAX
|
||||
};
|
||||
|
||||
// size: 0xC4
|
||||
struct unkStruct_203B494
|
||||
{
|
||||
u32 unk0; // 32 bit bitfield, I think
|
||||
/* 0x0 */ u32 achievements; // Adventure achievement flags
|
||||
/* 0x4 */ s32 numAdventures;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
/* 0x8 */ s32 friendRescueSuccesses;
|
||||
/* 0xC */ s32 numEvolved;
|
||||
/* 0x10 */ DungeonLocation dungeonLocation;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
s16 unk18;
|
||||
/* 0x14 */ s16 thievingSuccesses;
|
||||
/* 0x16 */ s16 numJoined;
|
||||
/* 0x18 */ s16 adventureMovesLearned;
|
||||
u32 unk1C[14];
|
||||
u32 unk54[14];
|
||||
u32 unk8C[13];
|
||||
s32 unkC0;
|
||||
/* 0x8C */ u32 learnedMoves[13]; // Get with `learnedMoves[move / 32] & 1 << move % 32` ... Set with `learnedMoves[move / 32] |= 1 << move % 32`
|
||||
/* 0xC0 */ s32 numFloorsExplored;
|
||||
};
|
||||
|
||||
extern struct unkStruct_203B494 *gUnknown_203B494;
|
||||
@ -29,20 +67,20 @@ void ResetNumAdventures(void);
|
||||
|
||||
void sub_8097670(void);
|
||||
struct unkStruct_203B494 *sub_8097680(void);
|
||||
void sub_80976A8(void);
|
||||
void sub_80976F8(u8);
|
||||
bool8 sub_8097710(u8);
|
||||
void sub_8097790(void);
|
||||
s32 sub_80977B8(void);
|
||||
void sub_80977D0(void);
|
||||
s32 sub_80977F8(void);
|
||||
s16 sub_8097838(void);
|
||||
void sub_8097848(void);
|
||||
s16 sub_8097870(void);
|
||||
s16 sub_8097880(void);
|
||||
s16 sub_80978B8(void);
|
||||
void sub_8097944(void);
|
||||
u32 sub_8097D60(u8 *r0, u32 size);
|
||||
u32 sub_8097D98(u8 *r0, u32 size);
|
||||
void ResetAdventureInfo(void);
|
||||
void SetAdventureAchievement(u8);
|
||||
bool8 GetAdventureAchievement(u8);
|
||||
void IncrementFriendRescueSuccesses(void);
|
||||
s32 GetFriendRescueSuccesses(void);
|
||||
void IncrementNumEvolved(void);
|
||||
s32 GetAdventureNumEvolved(void);
|
||||
s16 GetThievingSuccesses(void);
|
||||
void IncrementAdventureNumJoined(void);
|
||||
s16 GetAdventureNumJoined(void);
|
||||
s16 GetAdventureMovesLearned(void);
|
||||
s16 GetAdventureFloorsExplored(void);
|
||||
void UpdateAdventureAchievements(void);
|
||||
u32 SaveAdventureData(u8 *r0, u32 size);
|
||||
u32 RestoreAdventureData(u8 *r0, u32 size);
|
||||
|
||||
#endif // GUARD_CODE_8097670_H
|
||||
|
@ -33,6 +33,6 @@ extern const u8* const gCommonKecleonBros[KECLEON_BROS_MODE_COUNT][KECLEON_DLG_M
|
||||
extern const u8* const gCommonWigglytuff[WIGGLYTUFF_SHOP_MODE_COUNT][WIGGLY_DLG_MAX];
|
||||
extern const u8* const gCommonGulpin[GULPIN_SHOP_MODE_DIALOGUE_COUNT][GULPIN_DLG_MAX];
|
||||
extern const u8* const gCommonMakuhita[MAKUHITA_DOJO_MODE_COUNT][MAKUHITA_DLG_MAX];
|
||||
extern const Hints gCommonHints[NUM_HINTS];
|
||||
extern const Hints gCommonHints[HINT_MAX];
|
||||
|
||||
#endif // GUARD_COMMON_STRINGS_H
|
@ -8,6 +8,14 @@ typedef struct Hints
|
||||
const u8 *body;
|
||||
} Hints;
|
||||
|
||||
#define NUM_HINTS 5
|
||||
enum HintKind
|
||||
{
|
||||
HINT_TOWN_CONTROLS_1,
|
||||
HINT_TOWN_CONTROLS_2,
|
||||
HINT_SAVING,
|
||||
HINT_ADVENTURES_WITH_FRIENDS,
|
||||
HINT_BUILDING_A_TEAM,
|
||||
HINT_MAX
|
||||
};
|
||||
|
||||
#endif // GUARD_COMMON_STRINGS_HINTS_H
|
@ -24,9 +24,9 @@ enum KangaskhanStorageDialogue
|
||||
KANG_DLG_WITHDRAW_CONFIRMATION,
|
||||
KANG_DLG_YOU_HAVE_NOTHING,
|
||||
KANG_DLG_YOU_ARE_FULL,
|
||||
KANG_DLG_STORAGE_HAS_NOTHING,
|
||||
KANG_DLG_DEPOSIT__INVALID_ITEM,
|
||||
KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM,
|
||||
KANG_DLG_STORAGE_EMPTY,
|
||||
KANG_DLG_DEPOSIT_INVALID_ITEM,
|
||||
KANG_DLG_DEPOSIT_TOO_MANY_OF_ITEM,
|
||||
KANG_DLG_STORAGE_FULL,
|
||||
KANG_DLG_HOW_IT_WORKS,
|
||||
KANG_DLG_MAX
|
||||
|
@ -418,4 +418,6 @@
|
||||
#define MOVE_MD1_2 0x19B // Unused
|
||||
#define MOVE_PIERCE 0x19C
|
||||
|
||||
#define NUM_MOVE_IDS (MOVE_PIERCE + 1)
|
||||
|
||||
#endif
|
||||
|
@ -17,15 +17,14 @@ enum NaturePersonalities
|
||||
LONELY,
|
||||
QUIRKY,
|
||||
MISC,
|
||||
|
||||
};
|
||||
|
||||
#define NUM_PARTNERS 10
|
||||
#define NUM_QUIZ_QUESTIONS 55
|
||||
#define MAX_ASKED_QUESTIONS 8
|
||||
#define NUM_PERSONALITIES MISC
|
||||
#define NUM_PERSONALITY_TEST_EFFECTS (NUM_PERSONALITIES+3)
|
||||
#define NUM_PERSONALITY_TEST_EFFECTS (NUM_PERSONALITIES + 3)
|
||||
|
||||
#define BRAVE_2B_TRIGGER 99
|
||||
|
||||
#endif // GUARD_CONSTANTS_PERSONALITY_TEST_H
|
||||
#endif // GUARD_CONSTANTS_PERSONALITY_TEST_H
|
@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_CONSTANTS_STATUS_H
|
||||
#define GUARD_CONSTANTS_STATUS_H
|
||||
|
||||
// Sleep statuses
|
||||
// Sleep class statuses
|
||||
#define STATUS_NONE 0
|
||||
#define STATUS_SLEEP 1
|
||||
#define STATUS_SLEEPLESS 2
|
||||
@ -9,13 +9,13 @@
|
||||
#define STATUS_YAWNING 4
|
||||
#define STATUS_NAPPING 5
|
||||
|
||||
// Non-volatile statuses
|
||||
// Burn class statuses
|
||||
#define STATUS_BURN 1
|
||||
#define STATUS_POISONED 2
|
||||
#define STATUS_BADLY_POISONED 3
|
||||
#define STATUS_PARALYSIS 4
|
||||
|
||||
// Immobilize statuses
|
||||
// Frozen class statuses
|
||||
#define STATUS_FROZEN 1
|
||||
#define STATUS_SHADOW_HOLD 2
|
||||
#define STATUS_WRAP 3
|
||||
@ -24,7 +24,7 @@
|
||||
#define STATUS_PETRIFIED 6
|
||||
#define STATUS_CONSTRICTION 7
|
||||
|
||||
// Volatile statuses
|
||||
// Cringe class statuses
|
||||
#define STATUS_CRINGE 1
|
||||
#define STATUS_CONFUSED 2
|
||||
#define STATUS_PAUSED 3
|
||||
@ -33,7 +33,7 @@
|
||||
#define STATUS_ENCORE 6
|
||||
#define STATUS_INFATUATED 7
|
||||
|
||||
// Charging statuses
|
||||
// Bide class statuses
|
||||
#define STATUS_BIDE 1
|
||||
#define STATUS_SOLARBEAM 2
|
||||
#define STATUS_SKY_ATTACK 3
|
||||
@ -47,7 +47,7 @@
|
||||
#define STATUS_CHARGING 11
|
||||
#define STATUS_ENRAGED 12
|
||||
|
||||
// Protection statuses
|
||||
// ReflectClassStatus statuses
|
||||
#define STATUS_REFLECT 1
|
||||
#define STATUS_SAFEGUARD 2
|
||||
#define STATUS_LIGHT_SCREEN 3
|
||||
@ -63,31 +63,31 @@
|
||||
#define STATUS_VITAL_THROW 13
|
||||
#define STATUS_MIST 14
|
||||
|
||||
// Waiting statuses
|
||||
// Curse class statuses
|
||||
#define STATUS_CURSED 1
|
||||
#define STATUS_DECOY 2
|
||||
#define STATUS_SNATCH 3
|
||||
|
||||
// Linked statuses
|
||||
// Leech Seed class statuses
|
||||
#define STATUS_LEECH_SEED 1
|
||||
#define STATUS_DESTINY_BOND 2
|
||||
|
||||
// Move statuses
|
||||
// Sure Shot class statuses
|
||||
#define STATUS_SURE_SHOT 1
|
||||
#define STATUS_WHIFFER 2
|
||||
#define STATUS_SET_DAMAGE 3
|
||||
#define STATUS_FOCUS_ENERGY 4
|
||||
|
||||
// Item statuses
|
||||
// Long Toss class statuses
|
||||
#define STATUS_LONG_TOSS 1
|
||||
#define STATUS_PIERCE 2
|
||||
|
||||
// Transform statuses
|
||||
// Invisible class statuses
|
||||
#define STATUS_INVISIBLE 1
|
||||
#define STATUS_TRANSFORMED 2
|
||||
#define STATUS_MOBILE 3
|
||||
|
||||
// Eyesight statuses
|
||||
// Blinker class statuses
|
||||
#define STATUS_BLINKER 1
|
||||
#define STATUS_CROSS_EYED 2
|
||||
#define STATUS_EYEDROPS 3
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef GUARD_CONSTANTS_TARGETING_H
|
||||
#define GUARD_CONSTANTS_TARGETING_H
|
||||
|
||||
#define TARGETING_DECOY_NONE 0
|
||||
#define TARGETING_DECOY_TEAM 1
|
||||
#define TARGETING_DECOY_WILD 2
|
||||
#define DECOY_AI_NONE 0
|
||||
#define DECOY_AI_TEAM 1
|
||||
#define DECOY_AI_WILD 2
|
||||
|
||||
#define TREATMENT_TREAT_AS_ALLY 0
|
||||
#define TREATMENT_TREAT_AS_ENEMY 1
|
||||
|
13
include/data_serializer.h
Normal file
13
include/data_serializer.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef GUARD_DATA_SERIALIZER_H
|
||||
#define GUARD_DATA_SERIALIZER_H
|
||||
|
||||
// size: 0x10
|
||||
typedef struct DataSerializer
|
||||
{
|
||||
u8 *stream;
|
||||
u8 *end; // Exclusive end of the stream
|
||||
u32 count; // Used to count bits between ReadBits functions, or count bytes between ReadBytes functions
|
||||
u32 unkC; // Seems to be a temporary 32 bit storage
|
||||
} DataSerializer;
|
||||
|
||||
#endif // GUARD_DATA_SERIALIZER_H
|
@ -13,7 +13,7 @@ struct AIPossibleMove
|
||||
s32 weight;
|
||||
};
|
||||
|
||||
void DecideAttack(Entity *pokemon);
|
||||
void ChooseAIMove(Entity *pokemon);
|
||||
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move *move);
|
||||
bool8 IsTargetInLineRange(Entity *user, Entity *target, s32 range);
|
||||
s32 TryAddTargetToAITargetList(s32 numPotentialTargets, s32 targetingFlags, Entity *user, Entity *target, Move *move, u32 hasStatusChecker);
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
void AIDecideUseItem(Entity *pokemon);
|
||||
void GetPossibleAIThrownItemDirections(Entity *pokemon, s32 thrownAIFlag, Item *item, bool8 ignoreRollChance);
|
||||
void GetPossibleAIArcItemTargets(Entity *pokemon, Item *item, Position potentialTargets[], bool8 ignoreRollChance);
|
||||
void GetPossibleAIArcItemTargets(Entity *pokemon, Item *item, DungeonPos potentialTargets[], bool8 ignoreRollChance);
|
||||
void TargetThrownItem(Entity *pokemon, Entity *targetPokemon, Item *item, s32 targetingFlags, bool8 ignoreRollChance);
|
||||
|
||||
#endif
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
void AIMovement(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
bool8 CanTakeItem(Entity *pokemon);
|
||||
bool8 ChooseTargetPosition(Entity *pokemon);
|
||||
void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
|
@ -114,9 +114,9 @@ void sub_808AC3C(void);
|
||||
void sub_808ACC0(void);
|
||||
void sub_808AD48(void);
|
||||
void sub_808ADCC(void);
|
||||
void sub_808AE54(u8, u8, Position *pos);
|
||||
void sub_808AEC8(u8, u8, Position *pos);
|
||||
void sub_808AF3C(u8, u8, Position *pos);
|
||||
void sub_808AE54(u8, u8, DungeonPos *pos);
|
||||
void sub_808AEC8(u8, u8, DungeonPos *pos);
|
||||
void sub_808AF3C(u8, u8, DungeonPos *pos);
|
||||
void sub_808AFB0(u8);
|
||||
void sub_808B030(u8);
|
||||
void sub_808B0B0(u8);
|
||||
|
@ -3,13 +3,10 @@
|
||||
|
||||
#include "structs/map.h"
|
||||
|
||||
typedef struct unkStruct_202F190
|
||||
{
|
||||
Tile *unk0[6];
|
||||
} unkStruct_202F190;
|
||||
const Tile *GetTile(s32 x, s32 y);
|
||||
Tile *GetTileMut(s32 x, s32 y);
|
||||
|
||||
Tile *GetTile(s32 x, s32 y);
|
||||
Tile *GetTileSafe(s32 x, s32 y);
|
||||
void sub_804AC20(Position *pos);
|
||||
void sub_8049ED4(void);
|
||||
void sub_804AC20(DungeonPos *pos);
|
||||
|
||||
#endif
|
||||
#endif // GUARD_DUNGEON_MAP_ACCESS_H
|
||||
|
@ -24,11 +24,11 @@ void sub_80521D0(void);
|
||||
void sub_8052210(bool8 a0);
|
||||
|
||||
// These functions display the string if certain conditions are met. The conditions differ depending on the function. The string is then saved to the message log.
|
||||
void TryDisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str);
|
||||
void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage2(Entity *pokemon, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage5(Entity *pokemon, Position *pos, const u8 *str);
|
||||
void TryDisplayDungeonLoggableMessage5(Entity *pokemon, DungeonPos *pos, const u8 *str);
|
||||
|
||||
// As opposed to the above - these always display the string and save it in the message log. False/True stand for an unknown argument. Not sure what the practical difference is between these.
|
||||
void DisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str);
|
||||
|
@ -7,13 +7,13 @@
|
||||
extern u8 gWalkableTileToCrossableTerrain[8];
|
||||
|
||||
u8 GetCrossableTerrain(s16 species);
|
||||
u8 sub_807034C(s16 id, struct Tile *tile);
|
||||
u8 sub_80703A0(Entity *pokemon, Position *pos);
|
||||
u8 sub_807034C(s16 id, const Tile *tile);
|
||||
u8 sub_80703A0(Entity *pokemon, DungeonPos *pos);
|
||||
bool8 CanCrossWalls(Entity *pokemon);
|
||||
bool8 sub_807049C(Entity *pokemon, Position *pos);
|
||||
bool8 sub_8070564(Entity *pokemon, Position *pos);
|
||||
bool8 sub_80705F0(Entity *pokemon, Position *pos);
|
||||
bool8 sub_80706A4(Entity *pokemon, Position *pos);
|
||||
bool8 sub_807049C(Entity *pokemon, DungeonPos *pos);
|
||||
bool8 sub_8070564(Entity *pokemon, DungeonPos *pos);
|
||||
bool8 sub_80705F0(Entity *pokemon, DungeonPos *pos);
|
||||
bool8 sub_80706A4(Entity *pokemon, DungeonPos *pos);
|
||||
s32 CalcSpeedStage(Entity *pokemon);
|
||||
|
||||
#endif
|
||||
|
@ -20,8 +20,8 @@ typedef struct DungeonPokemonSprite
|
||||
/* 0xC */ u32 status;
|
||||
/* 0x10 */ u8 visible;
|
||||
/* 0x11 */ u8 unk11;
|
||||
/* 0x14 */ Position pos;
|
||||
/* 0x18 */ Position statusOffsets[2];
|
||||
/* 0x14 */ DungeonPos pos;
|
||||
/* 0x18 */ DungeonPos statusOffsets[2];
|
||||
/* 0x20 */ u32 unk20;
|
||||
/* 0x24 */ u32 unk24;
|
||||
/* 0x28 */ DungeonPokemonStatusSprite statusSprites[2];
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
#include "structs/str_position.h"
|
||||
|
||||
bool8 IsPositionActuallyInSight(Position *pos1, Position *pos2);
|
||||
bool8 IsPositionInSight(Position *pos1, Position *pos2);
|
||||
bool8 IsTargetTwoTilesAway(Position *pos1, Position *pos2);
|
||||
bool8 IsPositionActuallyInSight(DungeonPos *pos1, DungeonPos *pos2);
|
||||
bool8 IsPositionInSight(DungeonPos *pos1, DungeonPos *pos2);
|
||||
bool8 IsTargetTwoTilesAway(DungeonPos *pos1, DungeonPos *pos2);
|
||||
|
||||
#endif
|
||||
|
11
include/dungeon_serializer.h
Normal file
11
include/dungeon_serializer.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_DUNGEON_SERIALIZER_H
|
||||
#define GUARD_DUNGEON_SERIALIZER_H
|
||||
|
||||
#include "data_serializer.h"
|
||||
|
||||
void ReadDungeonState(u8 *buffer, u32 bufLen);
|
||||
void SaveDungeonState(u8 *buffer, u32 bufLen);
|
||||
|
||||
void sub_8082B40(void);
|
||||
|
||||
#endif // GUARD_DUNGEON_SERIALIZER_H
|
@ -5,19 +5,25 @@
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/str_position.h"
|
||||
#include "structs/str_traps.h"
|
||||
#include "structs/map.h"
|
||||
|
||||
extern const Position gAdjacentTileOffsets[NUM_DIRECTIONS];
|
||||
extern const DungeonPos gAdjacentTileOffsets[NUM_DIRECTIONS];
|
||||
|
||||
bool8 EntityExists(Entity *pokemon);
|
||||
u32 GetEntityType(Entity *entity);
|
||||
u8 GetEntityRoom(Entity *entity);
|
||||
Trap *GetTrapData(Entity *entity);
|
||||
Trap* GetTrapData_1(Entity *entity);
|
||||
Item *GetItemData(Entity *entity);
|
||||
struct Tile *GetTileAtEntitySafe(Entity *entity);
|
||||
Item *GetItemData_1(Entity *entity);
|
||||
void sub_804535C(Entity *entity, Position32 *pos);
|
||||
Tile *GetTileAtEntitySafe(Entity *entity);
|
||||
void sub_804535C(Entity *entity, PixelPos *pos);
|
||||
void SetEntityPixelPos(Entity *entity, s32 x, s32 y);
|
||||
void IncreaseEntityPixelPos(Entity *entity, s32 x, s32 y);
|
||||
|
||||
#endif
|
||||
static inline EntityInfo *GetEntInfo(Entity *entity)
|
||||
{
|
||||
return entity->axObj.info.monster;
|
||||
}
|
||||
Item *GetItemData(Entity *entity);
|
||||
Item *GetItemData_1(Entity *entity);
|
||||
Trap *GetTrapData(Entity *entity);
|
||||
Trap* GetTrapData_1(Entity *entity);
|
||||
|
||||
#endif // GUARD_DUNGEON_UTIL_H
|
||||
|
@ -16,17 +16,17 @@ Entity *GetPartnerEntity(void);
|
||||
void sub_80854D4(void);
|
||||
void sub_80855E4(DungeonCallback func);
|
||||
void sub_808563C(DungeonCallback func);
|
||||
Entity *GetEntityFromClientType(u8 entityType);
|
||||
Entity *GetEntityFromMonsterBehavior(u8 entityType);
|
||||
void sub_80856C8(Entity * pokemon, s32 x, s32 y);
|
||||
void sub_80856E0(Entity * pokemon, s32 direction);
|
||||
void sub_8085764(void);
|
||||
void sub_8085860(s32 x, s32 y);
|
||||
void sub_8085890(s32 x, s32 y);
|
||||
void ShiftCameraToPosition(Position32 *posStruct, s32 cameraSteps);
|
||||
void ShiftCameraToPosition(PixelPos *posStruct, s32 cameraSteps);
|
||||
void SetFacingDirection(Entity *pokemon, s32 direction);
|
||||
void sub_8085930(s32 direction);
|
||||
void sub_80859F0(s32 direction);
|
||||
bool8 IsMovingClient(Entity *entity);
|
||||
bool8 ShouldRunMonsterAI(Entity *entity);
|
||||
void sub_8085B0C(Entity *pokemon);
|
||||
void sub_8085B4C(struct_8085B80 a0[], s16 *a1[], Entity *a2[], s32 a3);
|
||||
void sub_80857B8(void);
|
||||
|
@ -6,7 +6,7 @@
|
||||
bool8 CanSeeTarget(Entity *entity, Entity *targetEntity);
|
||||
bool8 CanTargetEntity(Entity *entity, Entity *targetEntity);
|
||||
bool8 sub_8045A70(Entity *entity, Entity *targetEntity);
|
||||
bool8 sub_8045AAC(Entity *entity, Position *pos);
|
||||
bool8 CanTargetPosition(Entity *entity, Position *pos);
|
||||
bool8 sub_8045AAC(Entity *entity, DungeonPos *pos);
|
||||
bool8 CanTargetPosition(Entity *entity, DungeonPos *pos);
|
||||
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ void SetTutorialFlag(s32 param_1);
|
||||
bool32 GetTutorialFlag(s32 param_1);
|
||||
bool8 IsExclusivePokemonUnlocked(s16 pokeID);
|
||||
void UnlockExclusivePokemon(s16 pokeID);
|
||||
void WriteExclusivePokemon(struct unkStruct_8094924 *r0);
|
||||
void ReadExclusivePokemon(struct unkStruct_8094924 *r0);
|
||||
void WriteExclusivePokemon(DataSerializer *r0);
|
||||
void ReadExclusivePokemon(DataSerializer *r0);
|
||||
|
||||
#endif // GUARD_EXCLUSIVE_POKEMON_H
|
||||
|
@ -57,8 +57,8 @@ typedef struct ScriptData
|
||||
/* 0x2C */ u16 unk2C;
|
||||
// padding
|
||||
/* 0x30 */ s32 unk30;
|
||||
/* 0x34 */ Position32 pos1;
|
||||
/* 0x3C */ Position32 pos2;
|
||||
/* 0x34 */ PixelPos pos1;
|
||||
/* 0x3C */ PixelPos pos2;
|
||||
/* 0x44 */ u8 unk44[4];
|
||||
/* 0x48 */ s32 unk48;
|
||||
/* 0x4C */ u8 unk4C;
|
||||
@ -78,14 +78,14 @@ typedef struct CallbackData
|
||||
// padding
|
||||
// All callbacks take the parentObject as first parameter
|
||||
/* 0x04 */ s16 (*getIndex)(void*); // id related
|
||||
/* 0x08 */ void (*getSize)(void*, Position32 *out);
|
||||
/* 0x0C */ void (*getHitboxCenter)(void*, Position32 *out);
|
||||
/* 0x08 */ void (*getSize)(void*, PixelPos *out);
|
||||
/* 0x0C */ void (*getHitboxCenter)(void*, PixelPos *out);
|
||||
/* 0x10 */ void (*getPosHeightAndUnk)(void*, u32 *height, u32 *unk);
|
||||
/* 0x14 */ void (*getDirection)(void*, s8 *dir);
|
||||
/* 0x18 */ void (*getFlags)(void*, u32 *flags);
|
||||
/* 0x1C */ void (*setHitboxPos)(void*, Position32 *posOrNull);
|
||||
/* 0x20 */ void (*setPositionBounds)(void*, Position32 *from, Position32 *to);
|
||||
/* 0x24 */ bool8 (*moveReal)(void*, Position32*);
|
||||
/* 0x1C */ void (*setHitboxPos)(void*, PixelPos *posOrNull);
|
||||
/* 0x20 */ void (*setPositionBounds)(void*, PixelPos *from, PixelPos *to);
|
||||
/* 0x24 */ bool8 (*moveReal)(void*, PixelPos*);
|
||||
/* 0x28 */ void (*setPosHeight)(void*, u32 height);
|
||||
/* 0x2C */ void (*setDirection)(void*, s8 dir); // direction must be signed char!
|
||||
/* 0x30 */ void (*setEventIndex)(void*, u16);
|
||||
@ -94,7 +94,7 @@ typedef struct CallbackData
|
||||
/* 0x3C */ void (*setFlags)(void*, u32 bits);
|
||||
/* 0x40 */ void (*clearFlags)(void*, u32 bits);
|
||||
/* 0x44 */ void (*func44_livesOnlySpriteRelated)(void*, u32);
|
||||
/* 0x48 */ void (*moveRelative)(void*, Position32*);
|
||||
/* 0x48 */ void (*moveRelative)(void*, PixelPos*);
|
||||
/* 0x4C */ bool8 (*func4C_spriteRelatedCheck)(void*);
|
||||
/* 0x50 */ bool8 (*func50_spriteRelated)(void*);
|
||||
} CallbackData;
|
||||
@ -135,14 +135,8 @@ typedef struct ScriptRef
|
||||
|
||||
extern const ScriptRef gFunctionScriptTable[];
|
||||
|
||||
struct CompactPos {
|
||||
u8 xTiles;
|
||||
u8 yTiles;
|
||||
u8 xFlags;
|
||||
u8 yFlags;
|
||||
};
|
||||
struct GroundLink {
|
||||
struct CompactPos pos;
|
||||
CompactPos pos;
|
||||
u8 width;
|
||||
u8 height;
|
||||
u8 ret;
|
||||
@ -153,7 +147,7 @@ typedef struct GroundLivesData {
|
||||
u8 unk1;
|
||||
u8 width;
|
||||
u8 height;
|
||||
struct CompactPos pos;
|
||||
CompactPos pos;
|
||||
const ScriptCommand *scripts[4];
|
||||
} GroundLivesData;
|
||||
typedef struct GroundObjectData {
|
||||
@ -161,7 +155,7 @@ typedef struct GroundObjectData {
|
||||
u8 unk1;
|
||||
u8 width;
|
||||
u8 height;
|
||||
struct CompactPos pos;
|
||||
CompactPos pos;
|
||||
const ScriptCommand *scripts[4];
|
||||
} GroundObjectData;
|
||||
typedef struct GroundEffectData {
|
||||
@ -169,7 +163,7 @@ typedef struct GroundEffectData {
|
||||
u8 unk1;
|
||||
u8 width;
|
||||
u8 height;
|
||||
struct CompactPos pos;
|
||||
CompactPos pos;
|
||||
const ScriptCommand *script;
|
||||
} GroundEffectData;
|
||||
typedef struct GroundEventData {
|
||||
@ -177,7 +171,7 @@ typedef struct GroundEventData {
|
||||
u8 unk1;
|
||||
u8 width;
|
||||
u8 height;
|
||||
struct CompactPos pos;
|
||||
CompactPos pos;
|
||||
const ScriptRef *script;
|
||||
} GroundEventData;
|
||||
|
||||
|
@ -68,10 +68,10 @@ bool8 IsInvalidItemReward(u8 itemID);
|
||||
bool8 HasGummiItem(void);
|
||||
void GetGummiItemStatBoost(PokemonStruct1* pokemon, u8 id, bool8 checkBoostFlags, Gummi *gummi);
|
||||
|
||||
void RestoreHeldItem(unkStruct_8094924 *, BulkItem *);
|
||||
void SaveHeldItem(unkStruct_8094924 *, BulkItem *);
|
||||
void RestoreItemSlot(unkStruct_8094924 *, Item *);
|
||||
void SaveItemSlot(unkStruct_8094924 *, Item *);
|
||||
void ReadHeldItemBits(DataSerializer *, BulkItem *);
|
||||
void WriteHeldItemBits(DataSerializer *, BulkItem *);
|
||||
void ReadItemSlotBits(DataSerializer *, Item *);
|
||||
void WriteItemSlotBits(DataSerializer *, Item *);
|
||||
s32 RestoreTeamInventory(u8 *, u32 size);
|
||||
s32 SaveTeamInventory(u8 *, u32 size);
|
||||
|
||||
|
128
include/math.h
128
include/math.h
@ -2,33 +2,19 @@
|
||||
#define GUARD_MATH_H
|
||||
|
||||
#include "gba/types.h"
|
||||
#include "number_util.h"
|
||||
|
||||
/**
|
||||
* This type represents a signed 24.8 fixed-point number, where the 24 most
|
||||
* significant bits are the integer part and the 8 least significant bits are
|
||||
* the fractional part.
|
||||
*/
|
||||
typedef s32 s24_8;
|
||||
|
||||
/**
|
||||
* This type represents an unsigned 24.8 fixed-point number, where the 24 most
|
||||
* significant bits are the integer part and the 8 least significant bits are
|
||||
* the fractional part.
|
||||
*/
|
||||
typedef u32 u24_8;
|
||||
|
||||
/**
|
||||
* This function computes a value modulo 3, using a lookup table for values less
|
||||
* than 0x100.
|
||||
* This function computes the cosine of of `x` using a lookup table. The period of
|
||||
* the function is `4096`, and the range is `[-256, 256]`.
|
||||
*
|
||||
* @warning This function performs an invalid memory access if x < 0.
|
||||
* Hopefully it's never actually used.
|
||||
* @note Mathematically, `cos(abs(t)) = cos(t)`, unlike the case in `sin_4096()` above.
|
||||
*
|
||||
* @param[in] x The value to get modulo 3. Must be non-negative.
|
||||
* @param[in] x The value to get the cosine of.
|
||||
*
|
||||
* @return The value of x modulo 3.
|
||||
* @return `floor(256 * cos(pi * x / 2048))` as a signed 32-bit integer.
|
||||
*/
|
||||
u32 fast_mod_3(s32 x);
|
||||
s32 cos_4096(s32 x);
|
||||
|
||||
/**
|
||||
* This function computes the sine of the absolute value of `x` using a lookup
|
||||
@ -38,36 +24,7 @@ u32 fast_mod_3(s32 x);
|
||||
*
|
||||
* @return `floor(256 * sin(pi * abs(x) / 2048))` as a signed 32-bit integer.
|
||||
*/
|
||||
s32 sin_abs_4096(s32 x);
|
||||
|
||||
/**
|
||||
* This function computes the cosine of of `x` using a lookup table. The period of
|
||||
* the function is `4096`, and the range is `[-256, 256]`.
|
||||
*
|
||||
* @note Mathematically, `cos(abs(t)) = cos(t)`, unlike the case in `sin_abs_4096()` above.
|
||||
*
|
||||
* @param[in] x The value to get the cosine of.
|
||||
*
|
||||
* @return `floor(256 * cos(pi * x / 2048))` as a signed 32-bit integer.
|
||||
*/
|
||||
s32 cos_4096(s32 x);
|
||||
|
||||
/**
|
||||
* This function lexicographically compares two pairs of u32s.
|
||||
*
|
||||
* @note The call signature of this might change if it makes sense to pack the
|
||||
* inputs into a struct representing, say, a 64-bit unsigned integer. Doing
|
||||
* so does affect the generated assembly; the current approach is the simplest
|
||||
* match.
|
||||
*
|
||||
* @param[in] x_hi The high 32 bits of the first pair.
|
||||
* @param[in] x_lo The low 32 bits of the first pair.
|
||||
* @param[in] y_hi The high 32 bits of the second pair.
|
||||
* @param[in] y_lo The low 32 bits of the second pair.
|
||||
*
|
||||
* @return `TRUE` if `x < y`, `FALSE` otherwise.
|
||||
*/
|
||||
bool8 u32_pair_less_than(u32 x_hi, u32 x_lo, u32 y_hi, u32 y_lo);
|
||||
s32 sin_4096(s32 x);
|
||||
|
||||
/**
|
||||
* This function multiplies two signed 24.8 fixed-point numbers.
|
||||
@ -79,35 +36,50 @@ bool8 u32_pair_less_than(u32 x_hi, u32 x_lo, u32 y_hi, u32 y_lo);
|
||||
*/
|
||||
s24_8 s24_8_mul(s24_8 x, s24_8 y);
|
||||
|
||||
/**
|
||||
* This function divides two signed 24.8 fixed-point numbers.
|
||||
*
|
||||
* @param[in] x The dividend.
|
||||
* @param[in] y The divisor.
|
||||
*
|
||||
* @returns The quotient `x/y` as a signed 24.8 fixed-point number.
|
||||
*/
|
||||
s32 s24_8_div(s32 x, s32 y);
|
||||
bool8 F48_16_IsZero(s48_16 *a);
|
||||
void F48_16_SDiv(s48_16 *dst, s48_16 *a, s48_16 *b);
|
||||
void F48_16_SMul(s48_16 *dst, s48_16 *a, s48_16 *b);
|
||||
|
||||
/**
|
||||
* This function multiplies two unsigned 24.8 fixed-point numbers.
|
||||
*
|
||||
* @param[in] x The first factor.
|
||||
* @param[in] y The second factor.
|
||||
*
|
||||
* @return The product `x*y` as an unsigned 24.8 fixed-point number.
|
||||
*/
|
||||
u24_8 u24_8_mul(u24_8 x, u24_8 y);
|
||||
s24_8 FP24_8_Hypot(s24_8 x, s24_8 y);
|
||||
void FP48_16_FromS32(s48_16 *dst, s32 src);
|
||||
u32 FP48_16_ToS32(s48_16 *a);
|
||||
void FP48_16_FromF248(s48_16 *a, s24_8 b);
|
||||
bool8 FP48_16_SLessThan(s48_16 *a, s48_16 *b);
|
||||
void FP48_16_Add(s48_16 *dst, s48_16 *a, s48_16 *b);
|
||||
void FP48_16_Subtract(s48_16 *dst, s48_16 *a, s48_16 *b);
|
||||
|
||||
/**
|
||||
* This function divides two unsigned 24.8 fixed-point numbers.
|
||||
*
|
||||
* @param[in] x The first factor.
|
||||
* @param[in] y The second factor.
|
||||
*
|
||||
* @return The quotient `x/y` as an unsigned 24.8 fixed-point number.
|
||||
*/
|
||||
u24_8 u24_8_div(u24_8 x, u24_8 y);
|
||||
//static inline bool8 F248Equal(s24_8 x, s24_8 y) {
|
||||
// return x.raw == y.raw;
|
||||
//}
|
||||
|
||||
#define F248LessThanInt(x, y) (x.raw < 0x100 * y)
|
||||
#define F248LessThanFloat(x, y) (x.raw < (int)(y * 0x100))
|
||||
#define FloatLessThanF248(x, y) ((int)(x * 0x100) < y.raw)
|
||||
//static inline bool8 F248LessThanOne(s24_8 x) {
|
||||
// return x.raw < 0x100;
|
||||
//}
|
||||
#define F248LessThan(x, y) (x.raw < y.raw)
|
||||
#define F248GreaterThan(x, y) (x.raw > y.raw)
|
||||
#define F248Equal(x, y) (x.raw == y.raw)
|
||||
#define F248EqualsInt(x, y) (x.raw == 0x100 * y)
|
||||
|
||||
//static inline bool8 F248LessThan(s24_8 x, s24_8 y) {
|
||||
// return x.raw < y.raw;
|
||||
//}
|
||||
|
||||
#define F248_AddInt(x, y) ((s24_8){x.raw + 0x100 * y})
|
||||
#define F248_SubInt(x, y) ((s24_8){x.raw - 0x100 * y})
|
||||
|
||||
static inline s24_8 F248_Add(s24_8 x, s24_8 y) {
|
||||
return (s24_8){x.raw + y.raw};
|
||||
}
|
||||
|
||||
static inline s24_8 F248_Sub(s24_8 x, s24_8 y) {
|
||||
return (s24_8){x.raw - y.raw};
|
||||
}
|
||||
|
||||
static inline s24_8 F248_MulInt(s24_8 x, s32 y) {
|
||||
return (s24_8){x.raw * y};
|
||||
}
|
||||
|
||||
#endif // GUARD_MATH_H
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
u8 sub_8075BF4(Entity * pokemon, s32 sleepTurns);
|
||||
u8 sub_8075BF4(Entity * pokemon, s32 sleepClassStatusTurns);
|
||||
void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, bool8 displayMessage);
|
||||
bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMessage);
|
||||
void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns);
|
||||
|
@ -6,7 +6,7 @@
|
||||
u32 sub_8057144(Entity * pokemon);
|
||||
bool8 sub_80571F0(Entity * pokemon, Move *move);
|
||||
bool8 sub_805727C(Entity * pokemon, Entity * target, s32 chance);
|
||||
bool8 sub_8057308(Entity *pokemon, s32 chance);
|
||||
bool8 RollSecondaryEffect(Entity *pokemon, s32 chance);
|
||||
bool8 CanAIUseMove(Entity *pokemon, s32 moveIndex, bool8 hasPPChecker);
|
||||
bool8 CanMonsterUseMove(Entity *pokemon, Move *move, bool8 hasPPChecker);
|
||||
|
||||
|
@ -51,8 +51,8 @@ void LoadWazaParameters(void);
|
||||
bool8 MoveCannotHitFrozen(Move *move);
|
||||
bool8 MoveIgnoresTaunted(Move *move);
|
||||
void RemoveLinkSequenceFromMoves8(Move *moves, s32 index);
|
||||
void RestorePokemonMoves(struct unkStruct_8094924 *, Move *moveSet);
|
||||
void SavePokemonMoves(struct unkStruct_8094924 *, Move *moveSet);
|
||||
void ReadPoke1MovesBits(DataSerializer *, Move *moveSet);
|
||||
void WritePoke1MovesBits(DataSerializer *, Move *moveSet);
|
||||
bool8 ToggleMoveEnabled(s32 index, Move *moves);
|
||||
bool8 ToggleSetMove(s32 index, Move *moves);
|
||||
bool8 TryLinkMovesAfter(s32 index, Move *moves);
|
||||
@ -86,8 +86,8 @@ bool8 sub_8093318(s32, Move *moves);
|
||||
bool8 sub_809333C(s32, Move *moves);
|
||||
s32 sub_80935B8(Move *moves, s32 index);
|
||||
void sub_8094060(Move *srcMoves, Move *destMoves);
|
||||
void sub_8094184(struct unkStruct_8094924 *, struct Moves *);
|
||||
void sub_80941FC(struct unkStruct_8094924 *, struct Moves *);
|
||||
void WritePoke2MovesBits(DataSerializer *, struct Moves *);
|
||||
void ReadPoke2MovesBits(DataSerializer *, struct Moves *);
|
||||
|
||||
static inline bool8 MoveFlagExists(Move *move)
|
||||
{
|
||||
|
@ -1,17 +1,44 @@
|
||||
#ifndef GUARD_NUMBER_UTIL_H
|
||||
#define GUARD_NUMBER_UTIL_H
|
||||
|
||||
/**
|
||||
* This type represents a decimal, signed fixed-point number, where the first
|
||||
* 16-bit field is the integer part and the second 16-bit field is the fraction,
|
||||
* expressed in thousandths.
|
||||
*/
|
||||
typedef struct FixedPoint
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
} FixedPoint;
|
||||
|
||||
struct unkStruct_80943A8
|
||||
/**
|
||||
* This type represents a signed 24.8 fixed-point number, where the 24 most
|
||||
* significant bits are the integer part and the 8 least significant bits are
|
||||
* the fractional part.
|
||||
*/
|
||||
typedef struct s24_8 {
|
||||
// It's almost certainly not an actual struct, but keep it as one until we decomp all structures that include it
|
||||
s32 raw;
|
||||
} s24_8;
|
||||
|
||||
#define F248_ZERO ((s24_8){})
|
||||
#define F248_ONE ((s24_8){0x100})
|
||||
#define F248_MAX ((s24_8){0x7FFFFFFF})
|
||||
|
||||
/**
|
||||
* This type represents a signed 48.16 fixed-point number, where the 48 most
|
||||
* significant bits are the integer part and the 16 least significant bits are
|
||||
* the fractional part.
|
||||
*/
|
||||
typedef struct s48_16
|
||||
{
|
||||
s32 s0;
|
||||
s32 s4;
|
||||
} unkStruct_80943A8;
|
||||
s32 hi;
|
||||
u32 lo; // some math.c funcs require this to be a u32, but other funcs check if it's negative (aka >= INT32_MAX)
|
||||
} s48_16;
|
||||
#define F4816_ZERO ((s48_16){})
|
||||
#define F4816_ONE ((s48_16){0, 0x10000})
|
||||
#define F4816_MAX ((s48_16){0x7FFFFFFF, 0xFFFFFFFF})
|
||||
|
||||
FixedPoint FixedPoint_Add(FixedPoint a, FixedPoint b);
|
||||
FixedPoint FixedPoint_Subtract(FixedPoint a, FixedPoint b);
|
||||
@ -19,8 +46,23 @@ FixedPoint FixedPoint_Min(FixedPoint a, FixedPoint b);
|
||||
FixedPoint FixedPoint_Max(FixedPoint a, FixedPoint b);
|
||||
FixedPoint sub_8094370(FixedPoint param_1, FixedPoint param_2);
|
||||
FixedPoint IntToFixedPoint(s32 a);
|
||||
FixedPoint FixedPoint_SetFromUnk(struct unkStruct_80943A8* param_1);
|
||||
FixedPoint FixedPoint_SetFromUnk(s48_16* param_1);
|
||||
FixedPoint FixedPoint_Div(FixedPoint a, FixedPoint b);
|
||||
s32 FixedPointToInt(FixedPoint a); // Always rounded up
|
||||
|
||||
#define IntToF248_2(x) ((s24_8){x * 0x100})
|
||||
#define FloatToF248_2(x) ((s24_8){(int)(x * 0x100)})
|
||||
static inline s24_8 IntToF248(s32 x) {
|
||||
return (s24_8){x * 256};
|
||||
}
|
||||
|
||||
static inline s24_8 FloatToF248(float x) {
|
||||
return (s24_8){(int)(x * 256)};
|
||||
}
|
||||
|
||||
static inline s32 F248ToInt(s24_8 x) {
|
||||
return x.raw / 256;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -11,7 +11,9 @@
|
||||
|
||||
enum PokemonUnk0Flags
|
||||
{
|
||||
FLAG_ON_TEAM = 2,
|
||||
FLAG_NONE = 0,
|
||||
FLAG_UNK_1 = 1,
|
||||
FLAG_ON_TEAM = 2, // Mon is not on "standby"
|
||||
};
|
||||
|
||||
// size: 0x1A4
|
||||
@ -34,12 +36,12 @@ void LoadMonsterParameters(void);
|
||||
unkStruct_203B45C *GetRecruitedPokemon(void);
|
||||
void InitializeRecruitedPokemon(void);
|
||||
|
||||
// These two need to be overridden in status_actions.c
|
||||
// This needs to be overridden in status_actions.c
|
||||
// Uncomment when fixed
|
||||
//u8 GetBodySize(s16 index);
|
||||
|
||||
|
||||
void CopyMonsterNametoBuffer(u8 * buffer, s16 index);
|
||||
void CopyMonsterNameToBuffer(u8 * buffer, s16 index);
|
||||
void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index);
|
||||
void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 colorNum);
|
||||
void sub_808D930(u8 *buffer, s32 index);
|
||||
@ -56,7 +58,7 @@ char * GetMonSpecies(s16 index);
|
||||
s32 GetMovementSpeed(s16 index);
|
||||
u8 GetMovementType(s16 index);
|
||||
u8 GetRegenSpeed(s16 index);
|
||||
bool8 CanMove(s16 index);
|
||||
bool8 GetCanMoveFlag(s16 index);
|
||||
u8 GetChanceAsleep(s16 index);
|
||||
u32 GetWeight(s16 index);
|
||||
u32 GetSize(s16 index);
|
||||
@ -83,8 +85,8 @@ s32 GetUnownIndex(s16 index);
|
||||
void GenerateHiddenPower(HiddenPower *);
|
||||
s32 GetEvolutionSequence(PokemonStruct1 *pokemon, EvolveStage *);
|
||||
void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 *, PokemonStruct1 *, s32);
|
||||
void SavePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *pokemon);
|
||||
void RestorePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *);
|
||||
void WritePoke1Bits(DataSerializer *, PokemonStruct1 *pokemon);
|
||||
void ReadPoke1Bits(DataSerializer *, PokemonStruct1 *);
|
||||
s32 sub_808E218(unkStruct_808E218_arg *, PokemonStruct1 *pokemon);
|
||||
void sub_808CFD0(PokemonStruct1 *pokemon, s16 _species, u8* name, u32 _itemID, DungeonLocation *location, u16 *moveID);
|
||||
void sub_808D0D8(PokemonStruct1 *pokemon);
|
||||
@ -100,12 +102,12 @@ extern s32 sub_808D580(s32 *);
|
||||
|
||||
static inline bool8 PokemonFlag1(PokemonStruct1 *mon)
|
||||
{
|
||||
return ((mon->unk0 & 1));
|
||||
return (mon->unk0 >> (FLAG_UNK_1 - 1)) & 1;
|
||||
}
|
||||
|
||||
static inline bool8 PokemonFlag2(PokemonStruct1 *mon)
|
||||
{
|
||||
return (((mon->unk0 >> (FLAG_ON_TEAM - 1)) & 1));
|
||||
return (mon->unk0 >> (FLAG_ON_TEAM - 1)) & 1;
|
||||
}
|
||||
|
||||
static inline void SetPokemonFlag2(PokemonStruct1 *mon)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "structs/str_position.h"
|
||||
|
||||
s32 GetDirectionTowardsPosition(Position *originPos, Position *targetPos);
|
||||
s32 GetDistance(Position *pos1, Position *pos2);
|
||||
s32 GetDirectionTowardsPosition(DungeonPos *originPos, DungeonPos *targetPos);
|
||||
s32 GetDistance(DungeonPos *pos1, DungeonPos *pos2);
|
||||
|
||||
#endif
|
||||
|
@ -34,7 +34,7 @@ void BlinkSavingIcon(void);
|
||||
void CopySpritesToOam(void);
|
||||
void InitSprites(void);
|
||||
void ResetSprites(bool8);
|
||||
void SetSavingIconCoords(Position *);
|
||||
void SetSavingIconCoords(DungeonPos *);
|
||||
void sub_8004E8C(unkStruct_2039DB0 *);
|
||||
void sub_8005180(void);
|
||||
void sub_8005304(void);
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define GUARD_STATUS_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "number_util.h"
|
||||
|
||||
#define FLASH_FIRE_STATUS_NONE 0
|
||||
#define FLASH_FIRE_STATUS_MAXED 1
|
||||
@ -9,8 +10,8 @@
|
||||
|
||||
u8 GetFlashFireStatus(Entity *pokemon);
|
||||
void UpdateFlashFireBoost(Entity * pokemon, Entity *target);
|
||||
void ChangeAttackMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage, s32 param_4, bool8 displayMessage);
|
||||
void ChangeDefenseMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage, s32 param_4, bool8 displayMessage);
|
||||
void ChangeAttackMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage, s24_8 param_4, bool8 displayMessage);
|
||||
void ChangeDefenseMultiplierTarget(Entity *pokemon, Entity *target, u32 statStage, s24_8 param_4, bool8 displayMessage);
|
||||
void RaiseAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage);
|
||||
void LowerAccuracyStageTarget(Entity * pokemon, Entity * target, s32 statStage, bool8 displayMessage);
|
||||
void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage);
|
||||
|
@ -5,6 +5,6 @@
|
||||
|
||||
extern const s16 gConfusedAttackChance;
|
||||
|
||||
bool8 HasStatusAffectingActions(Entity *pokemon);
|
||||
bool8 HasStatusThatPreventsActing(Entity *pokemon);
|
||||
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@ struct MonPortraitMsg
|
||||
{
|
||||
OpenedFile *faceFile;
|
||||
struct PortraitGfx *faceData;
|
||||
Position pos;
|
||||
DungeonPos pos;
|
||||
u8 spriteId; // Which mon's sprite to use. For example Kecleon has multiple sprites depending on whether it's green or purple.
|
||||
bool8 flip; // Whether the mon's sprite is flipped.
|
||||
u8 unkE;
|
||||
|
@ -14,9 +14,9 @@ typedef struct UnkSpriteMem
|
||||
// size: 0x20
|
||||
typedef struct axdata1
|
||||
{
|
||||
/* 0x0 */ Position pos;
|
||||
/* 0x4 */ Position offset;
|
||||
/* 0x8 */ Position shadow;
|
||||
/* 0x0 */ DungeonPos pos;
|
||||
/* 0x4 */ DungeonPos offset;
|
||||
/* 0x8 */ DungeonPos shadow;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
/* 0x14 */ s16 vramTileOrMaybeAnimTimer;
|
||||
@ -43,8 +43,8 @@ typedef struct ax_anim
|
||||
/* 0x0 */ u8 frames;
|
||||
/* 0x1 */ u8 unkFlags;
|
||||
/* 0x2 */ s16 poseId;
|
||||
/* 0x4 */ Position offset;
|
||||
/* 0x8 */ Position shadow;
|
||||
/* 0x4 */ DungeonPos offset;
|
||||
/* 0x8 */ DungeonPos shadow;
|
||||
} ax_anim;
|
||||
|
||||
// size: 0x3C
|
||||
@ -84,7 +84,12 @@ struct axObject
|
||||
u8 unk45_orientation;
|
||||
u8 unk46;
|
||||
u8 unk47;
|
||||
/* 0x48 */ struct EntityInfo* info;
|
||||
/* 0x48 */ union
|
||||
{
|
||||
struct Item* item;
|
||||
struct EntityInfo* monster;
|
||||
struct Trap* trap;
|
||||
} info;
|
||||
};
|
||||
|
||||
// size: 0x80? (assuming it's the last sub-struct of GroundLives)
|
||||
|
@ -1,19 +1,20 @@
|
||||
#ifndef GUARD_DUNGEON_ENTITY_H
|
||||
#define GUARD_DUNGEON_ENTITY_H
|
||||
|
||||
#include "constants/dungeon_action.h"
|
||||
#include "constants/global.h"
|
||||
#include "structs/str_position.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/status.h"
|
||||
#include "structs/axdata.h"
|
||||
#include "structs/str_items.h"
|
||||
#include "structs/str_moves.h"
|
||||
#include "structs/axdata.h"
|
||||
|
||||
#include "structs/str_position.h"
|
||||
#include "math.h"
|
||||
#include "number_util.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define MAX_STAT_STAGE 20
|
||||
#define STAT_MULTIPLIER_THRESHOLD 63
|
||||
#define STAT_MULTIPLIER_THRESHOLD 0.249 // one tick less than 0.25
|
||||
#define DEFAULT_STAT_STAGE 10
|
||||
#define DEFAULT_STAT_MULTIPLIER 256
|
||||
#define MAX_SPEED_STAGE 4
|
||||
#define MAX_STOCKPILE_STAGE 3
|
||||
#define NUM_SPEED_COUNTERS 5
|
||||
@ -26,10 +27,13 @@
|
||||
#define STAT_STAGE_ACCURACY 0
|
||||
#define STAT_STAGE_EVASION 1
|
||||
|
||||
#define NUM_PICKED_IQ_SKILLS 3
|
||||
|
||||
// size: 0x8
|
||||
typedef struct unkStruct_8044CC8
|
||||
{
|
||||
u8 actionUseIndex;
|
||||
Position lastItemThrowPosition;
|
||||
/* 0x0 */ u8 actionUseIndex;
|
||||
/* 0x4 */ DungeonPos lastItemThrowPosition;
|
||||
} unkStruct_8044CC8;
|
||||
|
||||
// size: 0x18
|
||||
@ -37,25 +41,28 @@ typedef struct ActionContainer
|
||||
{
|
||||
/* 0x0 */ u16 action;
|
||||
/* 0x2 */ u8 direction;
|
||||
u8 fill3;
|
||||
u8 unk3;
|
||||
// Additional parameter alongside actionIndex. Used for things like indicating which move a Pokémon should use from its moveset.
|
||||
/* 0x4 */ unkStruct_8044CC8 unk4[2];
|
||||
// Position of the target that the Pokémon wants throw an item at.
|
||||
/* 0x14 */ Position itemTargetPosition;
|
||||
/* 0x14 */ DungeonPos itemTargetPosition;
|
||||
} ActionContainer;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct HiddenPower
|
||||
{
|
||||
/* 0x0 */ s16 hiddenPowerBasePower;
|
||||
/* 0x2 */ u8 hiddenPowerType;
|
||||
} HiddenPower;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct JoinedAt
|
||||
{
|
||||
/* 0x0 */ u8 joinedAt;
|
||||
/* 0x1 */ u8 unk1;
|
||||
} JoinedAt;
|
||||
|
||||
// size: 0x14
|
||||
typedef struct AITarget
|
||||
{
|
||||
/* 0x0 */ u8 aiObjective;
|
||||
@ -65,114 +72,127 @@ typedef struct AITarget
|
||||
/* 0x4 */ u16 aiTargetSpawnGenID;
|
||||
/* 0x8 */ struct Entity *aiTarget;
|
||||
/* 0xC */ u32 unkC;
|
||||
/* 0x10 */ Position aiTargetPos;
|
||||
|
||||
/* 0x10 */ DungeonPos aiTargetPos;
|
||||
} AITarget;
|
||||
|
||||
typedef struct Sleep
|
||||
// size: 0x4
|
||||
typedef struct SleepClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 sleep;
|
||||
/* 0x1 */ u8 sleepTurns;
|
||||
} Sleep;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} SleepClassStatus;
|
||||
|
||||
typedef struct NonVolatile
|
||||
// size: 0x4
|
||||
typedef struct BurnClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 nonVolatileStatus;
|
||||
/* 0x1 */ u8 nonVolatileStatusTurns;
|
||||
/* 0x2 */ u8 nonVolatileStatusDamageCountdown;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
/* 0x2 */ u8 damageCountdown;
|
||||
/* 0x3 */ u8 unk4;
|
||||
} NonVolatile;
|
||||
} BurnClassStatus;
|
||||
|
||||
typedef struct Immobilize
|
||||
// size: 0xC
|
||||
typedef struct FrozenClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 immobilizeStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x4 */ s32 unk4;
|
||||
/* 0x8 */ u8 immobilizeStatusTurns;
|
||||
/* 0x9 */ u8 immobilizeStatusDamageCountdown;
|
||||
} Immobilize;
|
||||
/* 0x8 */ u8 turns;
|
||||
/* 0x9 */ u8 damageCountdown;
|
||||
} FrozenClassStatus;
|
||||
|
||||
typedef struct Volatile
|
||||
// size: 0x4
|
||||
typedef struct CringeClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 volatileStatus;
|
||||
/* 0x1 */ u8 volatileStatusTurns;
|
||||
} Volatile;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} CringeClassStatus;
|
||||
|
||||
typedef struct Charging
|
||||
// size: 0x4
|
||||
typedef struct BideClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 chargingStatus;
|
||||
/* 0x1 */ u8 chargingStatusTurns;
|
||||
/* 0x2 */ u8 chargingStatusMoveIndex; // The position of the move in the Pokémon's moveset that triggered the status.
|
||||
} Charging;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
/* 0x2 */ u8 moveSlot; // The position of the move in the Pokémon's moveset that triggered the status.
|
||||
} BideClassStatus;
|
||||
|
||||
typedef struct Protection
|
||||
// size: 0x4
|
||||
typedef struct ReflectClassStatus
|
||||
{
|
||||
/* 0x0 */ u8 protectionStatus;
|
||||
/* 0x1 */ u8 protectionStatusTurns;
|
||||
} Protection;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} ReflectClassStatus;
|
||||
|
||||
typedef struct Waiting
|
||||
// size: 0x8
|
||||
typedef struct CurseClassStatus
|
||||
{
|
||||
/* 0xC8 */ u8 waitingStatus;
|
||||
/* 0xC9 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||
u8 unkCA;
|
||||
/* 0xCB */ u8 waitingStatusTurns;
|
||||
/* 0xCC */ u8 curseDamageCountdown;
|
||||
} Waiting;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ bool8 applierNonTeamMemberFlag; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||
/* 0x2 */ bool8 unk2;
|
||||
/* 0x3 */ u8 turns;
|
||||
/* 0x4 */ u8 damageCountdown;
|
||||
} CurseClassStatus;
|
||||
|
||||
typedef struct Linked
|
||||
// size: 0xC
|
||||
typedef struct LeechSeedClassStatus
|
||||
{
|
||||
/* 0xD0 */ u8 linkedStatus;
|
||||
/* 0xD4 */ u32 unkD4;
|
||||
/* 0xD8 */ u8 unkD8;
|
||||
/* 0xD9 */ u8 linkedStatusTurns;
|
||||
/* 0xDA */ u8 linkedStatusDamageCountdown;
|
||||
} Linked;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x4 */ u32 unk4;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ u8 turns;
|
||||
/* 0xA */ u8 damageCountdown;
|
||||
} LeechSeedClassStatus;
|
||||
|
||||
|
||||
typedef struct MoveStatus
|
||||
// size: 0x4
|
||||
typedef struct SureShotClassStatus
|
||||
{
|
||||
/* 0xDC */ u8 moveStatus;
|
||||
/* 0xDD */ u8 moveStatusTurns;
|
||||
} MoveStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} SureShotClassStatus;
|
||||
|
||||
typedef struct ItemStatus
|
||||
// size: 0x4
|
||||
typedef struct LongTossClassStatus
|
||||
{
|
||||
/* 0xE0 */ u8 itemStatus;
|
||||
} ItemStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
} LongTossClassStatus;
|
||||
|
||||
typedef struct TransformStatus
|
||||
// size: 0x4
|
||||
typedef struct InvisibleClassStatus
|
||||
{
|
||||
/* 0xE4 */ u8 transformStatus;
|
||||
/* 0xE5 */ u8 transformStatusTurns;
|
||||
} TransformStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} InvisibleClassStatus;
|
||||
|
||||
typedef struct EyesightStatus
|
||||
// size: 0x4
|
||||
typedef struct BlinkerClassStatus
|
||||
{
|
||||
/* 0xE8 */ u8 eyesightStatus;
|
||||
/* 0xE9 */ u8 eyesightStatusTurns;
|
||||
} EyesightStatus;
|
||||
/* 0x0 */ u8 status;
|
||||
/* 0x1 */ u8 turns;
|
||||
} BlinkerClassStatus;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Muzzled
|
||||
{
|
||||
/* 0xEC */ bool8 muzzled;
|
||||
/* 0xED */ u8 muzzledTurns;
|
||||
/* 0x0 */ bool8 muzzled;
|
||||
/* 0x1 */ u8 turns;
|
||||
} Muzzled;
|
||||
|
||||
// size: 0x1C
|
||||
typedef struct Unk_Entity_x184
|
||||
{
|
||||
/* 0x184 - 0x0 */ Position previousTargetMovePosition1;
|
||||
/* 0x188 - 0x4 */ Position32 previousTargetMovePosition2;
|
||||
/* 0x184 - 0x0 */ DungeonPos previousTargetMovePosition1;
|
||||
/* 0x188 - 0x4 */ PixelPos previousTargetMovePosition2;
|
||||
/* 0x190 - 0xC */ s32 lastMoveDirection; // The last direction that the Pokémon moved in.
|
||||
// Number of tiles that the Pokémon moved last, multiplied by 0x100.
|
||||
/* 0x194 - 0x10*/ Position32 lastMoveIncrement;
|
||||
/* 0x194 - 0x10*/ PixelPos lastMoveIncrement;
|
||||
/* 0x19C - 0x18 */ s16 walkAnimFramesLeft; // Set when the Pokémon starts moving, and counts down until the Pokémon's walk animation stops.
|
||||
/* 0x19e - 0x1a */ u8 unk1A;
|
||||
} Unk_Entity_x184 ;
|
||||
} Unk_Entity_x184;
|
||||
|
||||
// size: 0x24
|
||||
typedef struct Moves
|
||||
{
|
||||
/* 0x118 */ Move moves[MAX_MON_MOVES];
|
||||
/* 0x138 */ u8 struggleMoveFlags;
|
||||
/* 0x0 */ Move moves[MAX_MON_MOVES];
|
||||
/* 0x20 */ u8 struggleMoveFlags;
|
||||
} Moves;
|
||||
|
||||
// size: 0x208
|
||||
@ -196,10 +216,8 @@ typedef struct EntityInfo
|
||||
/* 0x10 */ s16 maxHPStat;
|
||||
// Bosses have higher HP than normal for their level. This is the max HP they would normally have given their level.
|
||||
/* 0x12 */ s16 originalHP;
|
||||
/* 0x14 */ u8 atk;
|
||||
/* 0x15 */ u8 spAtk;
|
||||
/* 0x16 */ u8 def;
|
||||
/* 0x17 */ u8 spDef;
|
||||
/* 0x14 */ u8 atk[2]; // Index 0 is Attack. Index 1 is Special Attack.
|
||||
/* 0x16 */ u8 def[2]; // Index 0 is Defense. Index 1 is Special Defense.
|
||||
/* 0x18 */ u32 exp;
|
||||
// Temporary stat boosts/drops from effects like Growl or Swords Dance.
|
||||
// These start at 10 and are in the range [1, 19].
|
||||
@ -213,9 +231,9 @@ typedef struct EntityInfo
|
||||
/* 0x28 */ s16 flashFireBoost;
|
||||
// These start at 0x1000, and are halved by certain moves like Screech to lower the corresponding stat.
|
||||
// Index 0 is Attack. Index 1 is Special Attack.
|
||||
/* 0x2C */ s32 offensiveMultipliers[2];
|
||||
/* 0x2C */ s24_8 offensiveMultipliers[2];
|
||||
// Index 0 is Defense. Index 1 is Special Defense.
|
||||
/* 0x34 */ s32 defensiveMultipliers[2];
|
||||
/* 0x34 */ s24_8 defensiveMultipliers[2];
|
||||
/* 0x3C */ HiddenPower hiddenPower;
|
||||
/* 0x40 */ JoinedAt joinedAt; // Uses the dungeon index in dungeon.h.
|
||||
/* 0x44 */ ActionContainer action;
|
||||
@ -223,32 +241,34 @@ typedef struct EntityInfo
|
||||
/* 0x5E */ u8 abilities[2];
|
||||
/* 0x60 */ Item heldItem;
|
||||
/* 0x64 */ u8 unk64;
|
||||
/* 0x68 */ Position prevPos[NUM_PREV_POS];
|
||||
/* 0x68 */ DungeonPos prevPos[NUM_PREV_POS];
|
||||
/* 0x78 */ AITarget aiTarget;
|
||||
// Bitwise flags corresponding to selected IQ skills.
|
||||
/* 0x8C */ u8 IQSkillMenuFlags[4]; // IQ skills selected in the IQ skills menu.
|
||||
/* 0x90 */ u8 IQSkillFlags[4];
|
||||
/* 0x8C */ u8 IQSkillMenuFlags[NUM_PICKED_IQ_SKILLS]; // IQ skills selected in the IQ skills menu.
|
||||
u8 padding8F;
|
||||
/* 0x90 */ u8 IQSkillFlags[NUM_PICKED_IQ_SKILLS];
|
||||
u8 padding93;
|
||||
/* 0x94 */ u8 tactic;
|
||||
u8 fill95[0x98 - 0x95];
|
||||
/* 0x98 */ u32 unk98;
|
||||
/* 0x9C */ u32 unk9C;
|
||||
/* 0xA0 */ s32 unkA0;
|
||||
/* 0xA4 */ u8 clientType;
|
||||
/* 0xA4 */ u8 monsterBehavior;
|
||||
u8 fillA5[0xA8 - 0xA5];
|
||||
// Statuses are split into groups based on which ones can't overlap.
|
||||
// See status.h for which statuses are in each group.
|
||||
/* 0xA8 */ Sleep sleep;
|
||||
/* 0xAC */ NonVolatile nonVolatile;
|
||||
/* 0xB0 */ Immobilize immobilize;
|
||||
/* 0xBC */ Volatile volatileStatus;
|
||||
/* 0xC0 */ Charging charging;
|
||||
/* 0xC4 */ Protection protection;
|
||||
/* 0xC8 */ Waiting waitingStruct;
|
||||
/* 0xD0 */ Linked linked;
|
||||
/* 0xDC */ MoveStatus moveStatus;
|
||||
/* 0xE0 */ ItemStatus itemStatus;
|
||||
/* 0xE4 */ TransformStatus transformStatus;
|
||||
/* 0xE8 */ EyesightStatus eyesightStatus;
|
||||
/* 0xA8 */ SleepClassStatus sleepClassStatus;
|
||||
/* 0xAC */ BurnClassStatus burnClassStatus;
|
||||
/* 0xB0 */ FrozenClassStatus frozenClassStatus;
|
||||
/* 0xBC */ CringeClassStatus cringeClassStatus;
|
||||
/* 0xC0 */ BideClassStatus bideClassStatus;
|
||||
/* 0xC4 */ ReflectClassStatus reflectClassStatus;
|
||||
/* 0xC8 */ CurseClassStatus curseClassStatus;
|
||||
/* 0xD0 */ LeechSeedClassStatus leechSeedClassStatus;
|
||||
/* 0xDC */ SureShotClassStatus sureShotClassStatus;
|
||||
/* 0xE0 */ LongTossClassStatus longTossClassStatus;
|
||||
/* 0xE4 */ InvisibleClassStatus invisibleClassStatus;
|
||||
/* 0xE8 */ BlinkerClassStatus blinkerClassStatus;
|
||||
/* 0xEC */ Muzzled muzzled;
|
||||
/* 0xF0 */ bool8 powerEars;
|
||||
/* 0xF1 */ bool8 scanning;
|
||||
@ -268,7 +288,7 @@ typedef struct EntityInfo
|
||||
/* 0xFD */ u8 perishSongTurns; // When this reaches 0, the Pokémon faints from Perish Song. Doubles as a bool for whether the Pokémon is afflicted by Perish Song.
|
||||
u8 unkFE;
|
||||
u8 unkFF;
|
||||
/* 0x100 */ u8 targetingDecoy; // If the Pokémon is targeting a decoy, this indicates whether the decoy target is a team or wild Pokémon.
|
||||
/* 0x100 */ u8 decoyAITracker; // If the Pokémon is targeting a decoy, this indicates whether the decoy target is a team or wild Pokémon.
|
||||
/* 0x104 */ s32 speedStage;
|
||||
// The turn counter for movement speed up/down is split into five timers each. Multiple timers are used if the Pokémon is affected by multiple
|
||||
// speed-up/slow effects at once, like using Agility twice.
|
||||
@ -282,7 +302,7 @@ typedef struct EntityInfo
|
||||
/* 0x118 */ Moves moves;
|
||||
/* 0x13C */ FixedPoint belly;
|
||||
/* 0x140 */ FixedPoint maxBelly;
|
||||
/* 0x144 */ bool8 aiNextToTarget; // True if an AI Pokémon is following another Pokémon and is already adjacent to them.
|
||||
/* 0x144 */ bool8 aiAllySkip; // True if an AI Pokémon is following another Pokémon and is already adjacent to them.
|
||||
/* 0x145 */ bool8 recalculateFollow; // Used by the AI to defer a movement decision until after all other Pokémon have moved.
|
||||
/* 0x146 */ u8 unk146;
|
||||
/* 0x147 */ bool8 waiting; // True if an AI Pokémon decided to do nothing this turn.
|
||||
@ -316,9 +336,9 @@ typedef struct EntityInfo
|
||||
/* 0x167 */ u8 unk167;
|
||||
/* 0x168 */ u8 unk168;
|
||||
/* 0x169 */ u8 turnsSinceWarpScarfActivation;
|
||||
/* 0x16C */ Position targetPos;
|
||||
/* 0x170 */ Position pixelPos;
|
||||
u32 unk174;
|
||||
/* 0x16C */ DungeonPos targetPos;
|
||||
/* 0x170 */ DungeonPos pixelPos;
|
||||
s24_8 unk174;
|
||||
u16 abilityEffectFlags; // See enum AbilityEffectFlags
|
||||
/* 0x17A */ u16 mimicMoveIDs[MAX_MON_MOVES]; // All moves that Mimic has copied (not sure on size...)
|
||||
// Previous value of targetPosition for movement, 1 and 2 moves ago.
|
||||
@ -336,12 +356,12 @@ typedef struct EntityInfo
|
||||
typedef struct Entity
|
||||
{
|
||||
/* 0x0 */ u32 type;
|
||||
/* 0x4 */ Position pos;
|
||||
/* 0x8 */ Position prevPos;
|
||||
/* 0x4 */ DungeonPos pos;
|
||||
/* 0x8 */ DungeonPos prevPos;
|
||||
// The center of the entity acccording to pixel-space coordinates, using the same origin as posWorld.
|
||||
// X = (posWorld * 24 + 16) * 256, while Y = (posWorld * 24 + 12) * 256.
|
||||
/* 0xC */ Position32 pixelPos;
|
||||
/* 0x14 */ Position32 prevPixelPos;
|
||||
/* 0xC */ PixelPos pixelPos;
|
||||
/* 0x14 */ PixelPos prevPixelPos;
|
||||
s32 unk1C;
|
||||
/* 0x20 */ bool8 isVisible; // Turned off when a Pokémon faints.
|
||||
u8 fill21;
|
||||
@ -409,13 +429,45 @@ enum AIObjective
|
||||
AI_TAKE_ITEM
|
||||
};
|
||||
|
||||
enum ClientType
|
||||
enum MonsterBehavior
|
||||
{
|
||||
CLIENT_TYPE_NONE,
|
||||
CLIENT_TYPE_CLIENT, // Used for mission clients that need rescuing.
|
||||
CLIENT_TYPE_PARTNER,
|
||||
// 3
|
||||
CLIENT_TYPE_DONT_MOVE = 4 // Used for Diglett in the Skarmory boss fight.
|
||||
BEHAVIOR_FIXED_ENEMY,
|
||||
BEHAVIOR_RESCUE_TARGET, // Used for mission clients that need rescuing.
|
||||
BEHAVIOR_ALLY,
|
||||
BEHAVIOR_SKARMORY,
|
||||
BEHAVIOR_DIGLETT, // Used for Diglett in the Skarmory boss fight.
|
||||
BEHAVIOR_5, // 5 and 6 are probably Gengar and Ekans, but not sure which is which.
|
||||
BEHAVIOR_6,
|
||||
BEHAVIOR_MEDICHAM,
|
||||
BEHAVIOR_ZAPDOS,
|
||||
BEHAVIOR_MOLTRES,
|
||||
BEHAVIOR_ALAKAZAM_1,
|
||||
BEHAVIOR_GROUDON_1,
|
||||
BEHAVIOR_ALAKAZAM_2,
|
||||
BEHAVIOR_ARTICUNO,
|
||||
BEHAVIOR_GROUDON_2,
|
||||
BEHAVIOR_RAYQUAZA,
|
||||
BEHAVIOR_16,
|
||||
BEHAVIOR_MEWTWO,
|
||||
BEHAVIOR_ENTEI,
|
||||
BEHAVIOR_RAIKOU,
|
||||
BEHAVIOR_SUICUNE,
|
||||
BEHAVIOR_HO_OH,
|
||||
BEHAVIOR_LATIOS,
|
||||
BEHAVIOR_REGIROCK,
|
||||
BEHAVIOR_REGICE,
|
||||
BEHAVIOR_REGISTEEL,
|
||||
BEHAVIOR_JIRACHI,
|
||||
BEHAVIOR_LUGIA,
|
||||
BEHAVIOR_KYOGRE,
|
||||
BEHAVIOR_29,
|
||||
BEHAVIOR_CELEBI,
|
||||
BEHAVIOR_SMEARGLE,
|
||||
BEHAVIOR_32,
|
||||
BEHAVIOR_33,
|
||||
BEHAVIOR_34,
|
||||
BEHAVIOR_35,
|
||||
BEHAVIOR_36,
|
||||
};
|
||||
|
||||
enum VisualFlag
|
||||
@ -450,9 +502,4 @@ static inline void SetExpMultplier(EntityInfo *info)
|
||||
SetRegularExpMultiplier(info);
|
||||
}
|
||||
|
||||
static inline EntityInfo *GetEntInfo(Entity *ent)
|
||||
{
|
||||
return ent->axObj.info;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -72,7 +72,7 @@ typedef struct RoomData
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
// All coordinates are inclusive.
|
||||
// These are not aligned properly to use the Position struct.
|
||||
// These are not aligned properly to use the DungeonPos struct.
|
||||
/* 0x2 */ s16 bottomRightCornerX;
|
||||
/* 0x4 */ s16 bottomRightCornerY;
|
||||
/* 0x6 */ s16 topLeftCornerX;
|
||||
|
@ -25,11 +25,11 @@ typedef struct MenuInputStruct
|
||||
s32 unk0;
|
||||
u16 unk4;
|
||||
s16 unk6;
|
||||
Position unk8; // Maybe Position
|
||||
s16 unkC; // Maybe Position
|
||||
DungeonPos unk8; // Maybe DungeonPos
|
||||
s16 unkC; // Maybe DungeonPos
|
||||
s16 unkE;
|
||||
u32 unk10;
|
||||
Position unk14; // Maybe Position
|
||||
DungeonPos unk14; // Maybe DungeonPos
|
||||
/* 0x18 */ s16 menuIndex;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#ifndef GUARD_STR_DAMAGE_H
|
||||
#define GUARD_STR_DAMAGE_H
|
||||
|
||||
struct DamageStruct
|
||||
// size: 0x10
|
||||
typedef struct DamageStruct
|
||||
{
|
||||
s32 dmg;
|
||||
s32 residualDmgType;
|
||||
@ -9,7 +10,7 @@ struct DamageStruct
|
||||
u8 type;
|
||||
bool8 isCrit;
|
||||
u8 unkE;
|
||||
u8 unkF;
|
||||
};
|
||||
bool8 tookNoDamage;
|
||||
} DamageStruct;
|
||||
|
||||
#endif
|
||||
#endif // GUARD_STR_DAMAGE_H
|
@ -7,6 +7,7 @@
|
||||
#include "structs/map.h"
|
||||
#include "structs/rgb.h"
|
||||
#include "structs/str_position.h"
|
||||
#include "structs/str_traps.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define DUNGEON_MAX_SIZE_X 56
|
||||
@ -24,17 +25,17 @@ typedef struct DungeonLocation
|
||||
/* 0x1 */ u8 floor;
|
||||
} DungeonLocation;
|
||||
|
||||
// size: 0x18
|
||||
typedef struct Weather
|
||||
{
|
||||
/* 0xE264 */ u8 weather; // Uses the weather constants in weather.h.
|
||||
u8 unkE265; // Uses the weather constants in weather.h
|
||||
/* 0xE266 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically.
|
||||
/* 0xE267 */ u8 unkE267[8];
|
||||
/* 0xE26F */ u8 naturalWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather.
|
||||
/* 0xE277 */ u8 mudSportTurns;
|
||||
/* 0xE278 */ u8 waterSportTurns;
|
||||
/* 0xE279 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects
|
||||
|
||||
/* 0x0 */ u8 weather; // Uses the weather constants in weather.h.
|
||||
/* 0x1 */ u8 unkE265; // Uses the weather constants in weather.h
|
||||
/* 0x2 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically.
|
||||
/* 0x3 */ u8 unkE267[8];
|
||||
/* 0xB */ u8 naturalWeather[8]; // The weather at the start of the floor. If the weather changes, then expires, revert back to the starting weather.
|
||||
/* 0x13 */ u8 mudSportTurns;
|
||||
/* 0x14 */ u8 waterSportTurns;
|
||||
/* 0x15 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects
|
||||
} Weather;
|
||||
|
||||
// size: 0x30
|
||||
@ -66,6 +67,8 @@ typedef struct DungeonMusicPlayer
|
||||
/* 0x0 */ u32 state;
|
||||
/* 0x4 */ u32 fadeOutSpeed;
|
||||
/* 0x8 */ u16 fadeInSpeed;
|
||||
|
||||
// dungeon_serializer.c refers to these 3 as s16, but they are almost always handled as u16
|
||||
/* 0xA */ u16 songIndex;
|
||||
/* 0xC */ u16 pastSongIndex;
|
||||
/* 0xE */ u16 queuedSongIndex;
|
||||
@ -74,10 +77,10 @@ typedef struct DungeonMusicPlayer
|
||||
// Size unknown?
|
||||
typedef struct UnkDungeonGlobal_unk181E8_sub
|
||||
{
|
||||
/* 0x181E8 */ Position cameraPos; // x0
|
||||
/* 0x181EC */ Position cameraPosMirror; // x4
|
||||
/* 0x181F0 */ Position cameraPixelPos; // x8
|
||||
/* 0x181F4 */ Position cameraPixelPosMirror; // xC
|
||||
/* 0x181E8 */ DungeonPos cameraPos; // x0
|
||||
/* 0x181EC */ DungeonPos cameraPosMirror; // x4
|
||||
/* 0x181F0 */ DungeonPos cameraPixelPos; // x8
|
||||
/* 0x181F4 */ DungeonPos cameraPixelPosMirror; // xC
|
||||
/* 0x181F8 */ Entity *cameraTarget; // x10
|
||||
u32 unk181FC; // x14
|
||||
u32 unk18200; // x18
|
||||
@ -85,15 +88,15 @@ typedef struct UnkDungeonGlobal_unk181E8_sub
|
||||
u8 unk18208; // x20
|
||||
/* 0x18209 */ u8 visibilityRange; // x21 Dungeon light level.
|
||||
/* 0x1820A */ bool8 blinded; // x22 Blacks out the screen when the player has the Blinker status.
|
||||
u8 unk1820B; // x23
|
||||
u8 unk1820C; // x24
|
||||
u8 unk1820D; // x25
|
||||
u8 unk1820E; // x26
|
||||
u8 unk1820F; // x27
|
||||
bool8 unk1820B; // x23
|
||||
bool8 unk1820C; // x24
|
||||
bool8 unk1820D; // x25
|
||||
bool8 unk1820E; // x26
|
||||
bool8 unk1820F; // x27
|
||||
/* 0x18210 */ bool8 hallucinating; // x28 Displays Substitute and flower sprites when the player has the Cross-Eyed status.
|
||||
u8 unk18211; // x29
|
||||
bool8 unk18211; // x29
|
||||
u8 unk18212; // x2A
|
||||
u8 unk18213; // x2B
|
||||
bool8 unk18213; // x2B
|
||||
u8 unk18214; // x2C
|
||||
u8 unk18215; // x2D
|
||||
u8 unk18216; // x2E
|
||||
@ -170,7 +173,7 @@ struct unkStruct_Dungeon134_sub
|
||||
u32 unk150;
|
||||
u32 unk154;
|
||||
u32 unk158;
|
||||
u32 unk15C;
|
||||
s24_8 unk15C;
|
||||
u8 unk160;
|
||||
u8 unk161;
|
||||
u8 unk162;
|
||||
@ -199,12 +202,13 @@ struct unkStruct_Dungeon5C4_sub
|
||||
Entity *unkC;
|
||||
};
|
||||
|
||||
struct unkStruct_Dungeon64C
|
||||
// size: 0x8
|
||||
typedef struct unkStruct_Dungeon64C
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u32 unk4;
|
||||
};
|
||||
} unkStruct_Dungeon64C;
|
||||
|
||||
#define UNK_1BBD4_STR_COUNT 10
|
||||
|
||||
@ -242,6 +246,63 @@ struct MinMaxPosition
|
||||
s32 maxY;
|
||||
};
|
||||
|
||||
// size: 0x58
|
||||
typedef struct unkDungeon644
|
||||
{
|
||||
/* 0x0 */ DungeonLocation dungeonLocation;
|
||||
/* 0x4 */ DungeonLocation dungeonLocation2;
|
||||
/* 0x8 */ unkStruct_Dungeon64C unk8;
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 fill11[3];
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x15 */ u8 unk15;
|
||||
/* 0x16 */ u8 unk16;
|
||||
/* 0x17 */ u8 unk17;
|
||||
/* 0x18 */ u8 unk18;
|
||||
/* 0x19 */ u8 unk19;
|
||||
/* 0x1A */ u8 fill1A[2];
|
||||
/* 0x1C */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds.
|
||||
/* 0x1E */ s16 unk1E;
|
||||
/* 0x20 */ s16 unk20;
|
||||
/* 0x22 */ s16 windTurns; // Turns remaining before getting swept out of the dungeon.
|
||||
/* 0x24 */ u16 unk24;
|
||||
/* 0x26 */ u16 bossSongIndex;
|
||||
/* 0x28 */ u8 unk28;
|
||||
/* 0x29 */ u8 unk29;
|
||||
/* 0x2A */ u8 unk2A;
|
||||
/* 0x2B */ u8 unk2B;
|
||||
/* 0x2C */ u8 unk2C;
|
||||
/* 0x2D */ bool8 monsterHouseTriggered;
|
||||
/* 0x2E */ bool8 monsterHouseTriggeredEvent;
|
||||
/* 0x2F */ u8 unk2F;
|
||||
/* 0x30 */ u8 unk30;
|
||||
/* 0x31 */ u8 unk31;
|
||||
/* 0x32 */ bool8 itemHoldersIdentified;
|
||||
/* 0x33 */ u8 fill33;
|
||||
/* 0x34 */ u8 unk34;
|
||||
/* 0x35 */ u8 unk35;
|
||||
/* 0x36 */ u8 unk36;
|
||||
/* 0x37 */ s8 unk37;
|
||||
/* 0x38 */ u32 unk38;
|
||||
/* 0x3C */ u32 unk3C;
|
||||
/* 0x40 */ s16 unk40;
|
||||
/* 0x42 */ s16 unk42;
|
||||
/* 0x44 */ s16 unk44;
|
||||
/* 0x46 */ u8 unk46;
|
||||
/* 0x48 */ s32 unk48;
|
||||
/* 0x4C */ s32 unk4C;
|
||||
/* 0x50 */ s32 unk50;
|
||||
/* 0x54 */ u8 unk54;
|
||||
/* 0x55 */ u8 unk55;
|
||||
} unkDungeon644;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct unkDungeonE260
|
||||
{
|
||||
/* 0x0 */ u16 unk0;
|
||||
/* 0x2 */ u16 unk2;
|
||||
} unkDungeonE260;
|
||||
|
||||
// size: 0x1CEDC
|
||||
typedef struct Dungeon
|
||||
{
|
||||
@ -276,58 +337,10 @@ typedef struct Dungeon
|
||||
/* 0x5C0 */ s32 unk5C0;
|
||||
/* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3];
|
||||
/* 0x5F4 */ u8 faintStringBuffer[80];
|
||||
/* 0x644 */ DungeonLocation dungeonLocation;
|
||||
/* 0x648 */ DungeonLocation dungeonLocation2;
|
||||
struct unkStruct_Dungeon64C unk64C;
|
||||
u8 unk654;
|
||||
u8 fill655;
|
||||
u8 fill656;
|
||||
u8 fill657;
|
||||
u8 unk658;
|
||||
u8 unk659;
|
||||
u8 unk65A;
|
||||
u8 unk65B;
|
||||
u8 unk65C;
|
||||
u8 unk65D;
|
||||
u8 fill65e[0x660 - 0x65e];
|
||||
/* 0x660 */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds.
|
||||
s16 unk662;
|
||||
s16 unk664;
|
||||
/* 0x666 */ s16 windTurns; // Turns remaining before getting swept out of the dungeon.
|
||||
/* 0x668 */ u16 unk668;
|
||||
u16 bossSongIndex;
|
||||
u8 unk66C;
|
||||
u8 unk66D;
|
||||
/* 0x66E */ u8 unk66E;
|
||||
u8 unk66F;
|
||||
u8 unk670;
|
||||
/* 0x671 */ bool8 monsterHouseTriggered;
|
||||
/* 0x672 */ bool8 monsterHouseTriggeredEvent;
|
||||
u8 unk673;
|
||||
u8 unk674;
|
||||
u8 unk675;
|
||||
/* 0x676 */ bool8 itemHoldersIdentified;
|
||||
u8 unk677;
|
||||
u8 unk678;
|
||||
u8 unk679;
|
||||
u8 unk67A;
|
||||
s8 unk67B;
|
||||
u32 unk67C;
|
||||
u32 unk680;
|
||||
s16 unk684;
|
||||
s16 unk686;
|
||||
s16 unk688;
|
||||
/* 0x68A */ u8 unk68A;
|
||||
u8 fill68B;
|
||||
s32 unk68C;
|
||||
s32 unk690;
|
||||
s32 unk694;
|
||||
u8 unk698;
|
||||
u8 unk699;
|
||||
u8 fill69A[0x69C - 0x69A];
|
||||
EntityInfo unk69C[4];
|
||||
EntityInfo unkEBC[1]; // Unsure about the size... See sub_8082A08()
|
||||
u8 fill10C4[0x343C - 0x10C4];
|
||||
unkDungeon644 unk644;
|
||||
EntityInfo unk69C[MAX_TEAM_MEMBERS];
|
||||
EntityInfo unkEBC[DUNGEON_MAX_WILD_POKEMON_BODY_SIZE];
|
||||
u8 fill2F3C[0x343C - 0x2F3C];
|
||||
/* 0x343C */ UnkDungeonGlobal_unk1CD98 unk343C[32];
|
||||
u8 fill353C[0x363c-0x353c];
|
||||
/* 0x363C */ u8 expYieldRankings[NUM_MONSTERS];
|
||||
@ -339,18 +352,19 @@ typedef struct Dungeon
|
||||
/* 0x37F4 */ s32 unk37F4;
|
||||
/* 0x37F8 */ bool8 plusIsActive[2]; // Index 0: Enemy , Index 1: Team
|
||||
/* 0x37FA */ bool8 minusIsActive[2]; // Index 0: Enemy , Index 1: Team
|
||||
/* 0x37FC */ bool8 decoyActive;
|
||||
/* 0x37FD */ u8 unk37FD;
|
||||
/* 0x37FC */ bool8 decoyIsActive;
|
||||
/* 0x37FD */ bool8 unk37FD;
|
||||
/* 0x37FE */ bool8 deoxysDefeat; // Flag set for deoxys in Meteor Cave
|
||||
/* 0x37FE */ u8 unk37FF;
|
||||
s16 unk3800;
|
||||
u8 fill3802[0x3904 - 0x3802];
|
||||
/* 0x37FE */ bool8 unk37FF;
|
||||
// dungeon_serializer.c refers to this as a u16 but elsewhere it's handled as a s16
|
||||
/* 0x3800 */ s16 deoxysForm;
|
||||
Item unk3804[DUNGEON_MAX_ITEMS];
|
||||
/* 0x3904 */ s16 numItems;
|
||||
u8 fill3906[0x3A08 - 0x3906];
|
||||
Trap unk3908[DUNGEON_MAX_TRAPS];
|
||||
/* 0x3A08 */ bool8 forceMonsterHouse; // Forces the current floor to have monster house
|
||||
/* 0x3A09 */ u8 unk3A09;
|
||||
/* 0x3A0A */ u8 unk3A0A;
|
||||
/* 0x3A0B */ u8 unk3A0B;
|
||||
/* 0x3A09 */ bool8 unk3A09;
|
||||
/* 0x3A0A */ bool8 unk3A0A;
|
||||
/* 0x3A0B */ bool8 unk3A0B;
|
||||
/* 0x3A0C */ u8 monsterHouseRoom; // room index of monster house
|
||||
/* 0x3A0D */ u8 unk3A0D;
|
||||
/* 0x3A0E */ s16 tileset;
|
||||
@ -359,12 +373,12 @@ typedef struct Dungeon
|
||||
/* 0x3A14 */ s16 fixedRoomId;
|
||||
/* 0x3A16 */ s16 unk3A16;
|
||||
/* 0x3A18 */ Tile tiles[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
|
||||
/* 0xEA18 */ Position playerSpawn;
|
||||
Position stairsSpawn; // stairs location
|
||||
Position unkE220[8];
|
||||
/* 0xEA18 */ DungeonPos playerSpawn;
|
||||
DungeonPos stairsSpawn; // stairs location
|
||||
DungeonPos unkE220[8];
|
||||
struct MinMaxPosition kecleonShopPos;
|
||||
struct MinMaxPosition unkE250;
|
||||
Position unkE260;
|
||||
unkDungeonE260 unkE260;
|
||||
/* 0xE264 */ Weather weather; // Uses the weather constants in weather.h.
|
||||
/* 0xE27C */ Tile unkE27C[8][8];
|
||||
/* 0xE87C */ u8 unkE87C[8][8];
|
||||
@ -373,7 +387,7 @@ typedef struct Dungeon
|
||||
u8 unk104C0;
|
||||
/* 0x104C4 */ RoomData roomData[MAX_ROOM_COUNT];
|
||||
/* 0x10844 */ s16 naturalJunctionListCounts[MAX_ROOM_COUNT];
|
||||
/* 0x10884 */ Position naturalJunctionList[MAX_ROOM_COUNT][MAX_ROOM_COUNT]; // Arrays of room exits for each room.
|
||||
/* 0x10884 */ DungeonPos naturalJunctionList[MAX_ROOM_COUNT][MAX_ROOM_COUNT]; // Arrays of room exits for each room.
|
||||
u16 unk11884[250][9];
|
||||
u16 unk12A18[20][9];
|
||||
u16 unk12B80[9];
|
||||
@ -388,13 +402,13 @@ typedef struct Dungeon
|
||||
u8 fill1356D[0x13570 - 0x1356D];
|
||||
/* 0x13570 */ u8 unk13570;
|
||||
u8 fill13571[0x13574 - 0x13571];
|
||||
/* 0x13574 */ Position trapPos;
|
||||
/* 0x13574 */ DungeonPos trapPos;
|
||||
/* 0x13578 */ u8 trapID;
|
||||
/* 0x13579 */ u8 unk13579;
|
||||
u8 fill1357A[0x1357C - 0x1357A];
|
||||
/* 0x1357C */ Entity *teamPokemon[MAX_TEAM_MEMBERS];
|
||||
/* 0x1358C */ Entity *wildPokemon[DUNGEON_MAX_WILD_POKEMON];
|
||||
/* 0x135CC */ Entity *allPokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon
|
||||
/* 0x135CC */ Entity *activePokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon
|
||||
/* 0x1361C */ Entity *items[DUNGEON_MAX_ITEMS];
|
||||
/* 0x1371C */ Entity *traps[DUNGEON_MAX_TRAPS];
|
||||
/* 0x1381C */ Entity teamPokemonEntities[MAX_TEAM_MEMBERS];
|
||||
|
@ -23,7 +23,7 @@ typedef struct unkPokeSubStruct_C
|
||||
// size: 0x58
|
||||
typedef struct PokemonStruct1
|
||||
{
|
||||
u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited??
|
||||
u16 unk0; // Probably a union: Sometimes ldrh and sometimes ldrb. Recruited?? "sub_80954CC" only loads 2 bits of info
|
||||
/* 0x2 */ bool8 isTeamLeader;
|
||||
/* 0x3 */ u8 level;
|
||||
/* 0x4 */ DungeonLocation dungeonLocation;
|
||||
@ -71,8 +71,8 @@ typedef struct PokemonStruct2
|
||||
/* 0x18 */ u32 currExp;
|
||||
/* 0x1C */ Moves moves;
|
||||
/* 0x40 */ Item itemSlot; // heldItem
|
||||
FixedPoint belly; // some struct
|
||||
FixedPoint maxBelly; // some struct (same type as 44)
|
||||
/* 0x44 */ FixedPoint belly;
|
||||
/* 0x48 */ FixedPoint maxBelly;
|
||||
/* 0x4C */ u32 IQSkills; // unk20
|
||||
/* 0x50 */ u8 tacticIndex;
|
||||
/* 0x54 */ HiddenPower hiddenPower;
|
||||
|
@ -2,17 +2,34 @@
|
||||
#define GUARD_STR_POSITION_H
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Position
|
||||
typedef struct DungeonPos
|
||||
{
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
} Position;
|
||||
} DungeonPos;
|
||||
|
||||
/**
|
||||
* Precise position expressed in pixel units, as s24_8 fixpoint.
|
||||
* This type has subpixel precision to 1/256th of a pixel.
|
||||
*/
|
||||
// size: 0x8
|
||||
typedef struct Position32
|
||||
typedef struct PixelPos
|
||||
{
|
||||
/* 0x0 */ s32 x;
|
||||
/* 0x0 */ s32 x; // TODO: convert to s24_8 across the codebase
|
||||
/* 0x4 */ s32 y;
|
||||
} Position32;
|
||||
} PixelPos;
|
||||
|
||||
#endif // GUARD_STR_POSITION_H
|
||||
/**
|
||||
* Currently only used in script data, for entities and GroundLink data.
|
||||
* DungeonPos expressed in terms of *graphics* tiles, 8 pixels per unit.
|
||||
* Flags allow expressing half-tile offsets and allow using a current/default coordinate.
|
||||
*/
|
||||
// size: 0x4
|
||||
typedef struct CompactPos {
|
||||
u8 xTiles;
|
||||
u8 yTiles;
|
||||
u8 xFlags;
|
||||
u8 yFlags;
|
||||
} CompactPos;
|
||||
|
||||
#endif // GUARD_STR_POSITION_H
|
||||
|
@ -3,10 +3,11 @@
|
||||
|
||||
#include "constants/trap.h"
|
||||
|
||||
typedef struct Trap
|
||||
// size: 0x4
|
||||
typedef struct Trap
|
||||
{
|
||||
/* 0x0 */ u8 id;
|
||||
/* 0x1 */ u8 unk1;
|
||||
} Trap;
|
||||
|
||||
#endif // GUARD_STR_TRAPS_H
|
||||
#endif // GUARD_STR_TRAPS_H
|
@ -64,8 +64,8 @@ typedef struct unkStruct_203B480
|
||||
u32 unk10;
|
||||
u16 unk10_u16;
|
||||
} unk10;
|
||||
/* 0x14 */ u8 playerName[0x20 - 0x14];
|
||||
Item item;
|
||||
/* 0x14 */ u8 playerName[10];
|
||||
/* 0x20 */ Item item;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
/* 0x2C */ s8 rescuesAllowed;
|
||||
|
@ -7,10 +7,10 @@
|
||||
#define DUNGEON_WATER_TYPE_LAVA 1
|
||||
#define DUNGEON_WATER_TYPE_WATER 2
|
||||
|
||||
extern const u8 gDungeonWaterType[];
|
||||
extern const u8 gDungeonWaterType[76];
|
||||
|
||||
void sub_804AE84(Position *pos);
|
||||
void sub_804AE84(DungeonPos *pos);
|
||||
bool8 IsTileGround(Tile *tile);
|
||||
bool8 IsWaterTileset();
|
||||
|
||||
#endif
|
||||
#endif // GUARD_TILE_TYPES_H
|
@ -5,17 +5,17 @@
|
||||
#include "structs/map.h"
|
||||
#include "structs/str_position.h"
|
||||
|
||||
bool8 CanLayTrap(Position *pos);
|
||||
bool8 LayTrap(Position *pos, u8 trapID, u8 param_3);
|
||||
bool8 CanLayTrap(DungeonPos *pos);
|
||||
bool8 LayTrap(DungeonPos *pos, u8 trapID, u8 param_3);
|
||||
bool8 sub_807FD84(Entity *entity);
|
||||
bool8 sub_807FE04(Position *pos, char param_2);
|
||||
bool8 sub_807FE44(Position *pos, char param_2);
|
||||
bool8 sub_807FE04(DungeonPos *pos, char param_2);
|
||||
bool8 sub_807FE44(DungeonPos *pos, char param_2);
|
||||
void GetTrapName(u8 *buffer, u8 trapIndex);
|
||||
void sub_807FE9C(Entity *pokemon, Position *pos, int param_3, char param_4);
|
||||
void sub_807FE9C(Entity *pokemon, DungeonPos *pos, int param_3, char param_4);
|
||||
void HandleMudTrap(Entity *pokemon, Entity *target);
|
||||
void HandleStickyTrap(Entity *pokemon, Entity *target);
|
||||
void HandleGrimyTrap(Entity *pokemon, Entity *target);
|
||||
void HandleSummonTrap(Entity *pokemon, Position *pos);
|
||||
void HandleSummonTrap(Entity *pokemon, DungeonPos *pos);
|
||||
void HandlePitfallTrap(Entity *pokemon,Entity *target,Tile *tile);
|
||||
void HandleWarpTrap(Entity *pokemon, Entity *target);
|
||||
void HandleSpinTrap(Entity *pokemon, Entity *target);
|
||||
@ -30,7 +30,7 @@ void HandleWonderTile(Entity *pokemon, Entity *target);
|
||||
// code_807FCD4.s
|
||||
extern void HandleSealTrap(Entity *pokemon, Entity *target);
|
||||
extern void HandleWhirlwindTrap(Entity *entity, Entity *target);
|
||||
extern void HandlePokemonTrap(Entity *pokemon, Position *pos);
|
||||
extern void HandlePokemonTrap(Entity *pokemon, DungeonPos *pos);
|
||||
|
||||
// trap_1.c
|
||||
void HandleTripTrap(Entity *pokemon, Entity *target);
|
||||
|
@ -69,7 +69,6 @@ SECTIONS {
|
||||
src/code_8009804.o(.text);
|
||||
asm/code_8009804.o(.text);
|
||||
src/math.o(.text);
|
||||
asm/math.o(.text);
|
||||
src/file_system.o(.text);
|
||||
src/decompress.o(.text);
|
||||
src/main.o(.text);
|
||||
@ -216,9 +215,8 @@ SECTIONS {
|
||||
asm/code_8044210.o(.text);
|
||||
src/dungeon_action.o(.text);
|
||||
src/code_8044CC8.o(.text);
|
||||
asm/code_8044CC8.o(.text);
|
||||
src/dungeon_util.o(.text);
|
||||
asm/code_80450F8.o(.text);
|
||||
src/code_80450F8.o(.text);
|
||||
src/dungeon_visibility.o(.text);
|
||||
src/code_8045A00.o(.text);
|
||||
asm/code_8045A00.o(.text);
|
||||
@ -248,7 +246,6 @@ SECTIONS {
|
||||
src/code_806CD90.o(.text);
|
||||
src/type_effectiveness.o(.text);
|
||||
src/code_806E8B0.o(.text);
|
||||
asm/code_806E8B0.o(.text);
|
||||
src/code_806FDF4.o(.text);
|
||||
src/status_checks.o(.text);
|
||||
src/dungeon_movement.o(.text);
|
||||
@ -280,8 +277,7 @@ SECTIONS {
|
||||
src/trap.o(.text);
|
||||
asm/code_807FCD4.o(.text);
|
||||
src/trap_1.o(.text);
|
||||
asm/code_8080CF0.o(.text);
|
||||
src/code_8083288.o(.text);
|
||||
src/dungeon_serializer.o(.text);
|
||||
src/dungeon_range.o(.text);
|
||||
src/code_808333C.o(.text);
|
||||
src/dungeon_leader.o(.text);
|
||||
@ -526,6 +522,12 @@ SECTIONS {
|
||||
src/load_screen.o(.rodata);
|
||||
src/wonder_mail_main_menu.o(.rodata);
|
||||
src/debug_menu1.o(.rodata);
|
||||
src/debug_unused1.o(.rodata);
|
||||
src/debug_unused2.o(.rodata);
|
||||
src/debug_unused3.o(.rodata);
|
||||
src/debug_unused4.o(.rodata);
|
||||
src/debug_unused5.o(.rodata);
|
||||
src/debug_unused6.o(.rodata);
|
||||
src/debug_menu2.o(.rodata);
|
||||
src/debug_menu3.o(.rodata);
|
||||
src/debug_menu4.o(.rodata);
|
||||
@ -559,6 +561,8 @@ SECTIONS {
|
||||
src/dungeon_capabilities.o(.rodata);
|
||||
src/dungeon_ai_targeting.o(.rodata);
|
||||
data/data_8107010.o(.rodata);
|
||||
src/dungeon_serializer.o(.rodata);
|
||||
data/data_8107224.o(.rodata);
|
||||
src/game_options.o(.rodata);
|
||||
data/data_8109964.o(.rodata);
|
||||
src/code_80972F4.o(.rodata);
|
||||
|
@ -87,8 +87,7 @@ static void DisplayAdventureLog(void)
|
||||
s32 i;
|
||||
s32 r4; // r4
|
||||
s32 r6; // r6
|
||||
u8 temp;
|
||||
s32 v1, v2, v3, v4, v5, v6;
|
||||
u8 aa;
|
||||
|
||||
CallPrepareTextbox_8008C54(sAdventureLog->s0.unk34);
|
||||
sub_80073B8(sAdventureLog->s0.unk34);
|
||||
@ -102,42 +101,49 @@ static void DisplayAdventureLog(void)
|
||||
sub_8012BC4(r6, 0, sAdventureLog->s0.input.unk1E + 1, 1, 7, sAdventureLog->s0.unk34);
|
||||
|
||||
for (i = 0; i < sAdventureLog->s0.input.unk1A; i++) {
|
||||
temp = (sAdventureLog->s0.input.unk1E * sAdventureLog->s0.input.unk1C) + i;
|
||||
aa = (sAdventureLog->s0.input.unk1E * sAdventureLog->s0.input.unk1C) + i;
|
||||
|
||||
if (sub_8097710(temp)) {
|
||||
switch (temp) {
|
||||
case 12:
|
||||
v1 = sub_80978B8();
|
||||
if (GetAdventureAchievement(aa)) {
|
||||
switch (aa) {
|
||||
case AA_NUM_FLOORS_EXPLORED: {
|
||||
s32 v1 = GetAdventureFloorsExplored();
|
||||
gFormatArgs[0] = (s16)v1;
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 7:
|
||||
v2 = sub_8097880();
|
||||
}
|
||||
case AA_NUM_MOVES_LEARNED: {
|
||||
s32 v2 = GetAdventureMovesLearned();
|
||||
gFormatArgs[0] = (s16)v2;
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 11:
|
||||
v3 = sub_8097838();
|
||||
}
|
||||
case AA_NUM_THIEVING_SUCCESSES: {
|
||||
s32 v3 = GetThievingSuccesses();
|
||||
gFormatArgs[0] = (s16)v3;
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 8:
|
||||
v4 = sub_80977B8();
|
||||
}
|
||||
case AA_NUM_FRIEND_RESCUE_SUCCESSES: {
|
||||
s32 v4 = GetFriendRescueSuccesses();
|
||||
gFormatArgs[0] = v4;
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 9:
|
||||
v5 = sub_80977F8();
|
||||
}
|
||||
case AA_NUM_POKEMON_EVOLVED: {
|
||||
s32 v5 = GetAdventureNumEvolved();
|
||||
gFormatArgs[0] = v5;
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 10:
|
||||
v6 = sub_8097870();
|
||||
}
|
||||
case AA_NUM_POKEMON_JOINED: {
|
||||
s32 v6 = GetAdventureNumJoined();
|
||||
gFormatArgs[0] = (s16)v6;
|
||||
// fallthrough
|
||||
default:
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
}
|
||||
default: {
|
||||
PrintFormattedStringOnWindow(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(aa), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -145,4 +151,4 @@ static void DisplayAdventureLog(void)
|
||||
}
|
||||
|
||||
sub_80073E0(sAdventureLog->s0.unk34);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user