mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 05:00:12 +00:00
commit
5a8b4017a9
@ -154,7 +154,7 @@ QuickSave:
|
||||
adds r1, r2, 0
|
||||
strh r1, [r0]
|
||||
bl sub_8099648
|
||||
bl sub_8094C14
|
||||
bl SetWindowBGColor
|
||||
movs r0, 0
|
||||
bl sub_8099690
|
||||
bl sub_8099744
|
||||
@ -335,7 +335,7 @@ sub_80008C0:
|
||||
adds r0, r2, 0
|
||||
strh r0, [r1]
|
||||
bl sub_8099648
|
||||
bl sub_8094C14
|
||||
bl SetWindowBGColor
|
||||
movs r0, 0
|
||||
bl sub_8099690
|
||||
bl sub_8099744
|
||||
@ -1121,7 +1121,7 @@ _08000F5E:
|
||||
.align 2, 0
|
||||
_08000F64: .4byte 0x000f1209
|
||||
_08000F68:
|
||||
bl sub_809674C
|
||||
bl GeneratePelipperJobs
|
||||
bl sub_80961B4
|
||||
bl sub_808ED00
|
||||
adds r7, r4, 0
|
||||
@ -1132,7 +1132,7 @@ _08000F78:
|
||||
adds r0, r4, 0
|
||||
bl xxx_dungeon_8001340
|
||||
bl sub_8099648
|
||||
bl sub_8094C14
|
||||
bl SetWindowBGColor
|
||||
movs r0, 0
|
||||
bl sub_8099690
|
||||
b _08000F96
|
||||
|
7814
asm/code_800D090.s
7814
asm/code_800D090.s
File diff suppressed because it is too large
Load Diff
7515
asm/code_800DAC0.s
Normal file
7515
asm/code_800DAC0.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -3271,7 +3271,7 @@ _08014408:
|
||||
ands r0, r4
|
||||
cmp r0, 0
|
||||
beq _08014418
|
||||
bl sub_8094C14
|
||||
bl SetWindowBGColor
|
||||
_08014418:
|
||||
ldr r0, _08014460
|
||||
movs r1, 0x1
|
||||
|
2768
asm/code_801EE10.s
2768
asm/code_801EE10.s
File diff suppressed because it is too large
Load Diff
1737
asm/code_801EE10_1.s
Normal file
1737
asm/code_801EE10_1.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -2131,7 +2131,7 @@ _0803E138: .4byte 0x0000017d
|
||||
thumb_func_start sub_803E13C
|
||||
sub_803E13C:
|
||||
push {r4,r5,lr}
|
||||
bl sub_8094C14
|
||||
bl SetWindowBGColor
|
||||
ldr r0, _0803E170
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0xB]
|
||||
@ -2156,7 +2156,7 @@ _0803E156:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0803E170: .4byte gUnknown_203B46C
|
||||
_0803E170: .4byte gGameOptionsRef
|
||||
_0803E174: .4byte gUnknown_202D038
|
||||
thumb_func_end sub_803E13C
|
||||
|
||||
@ -2713,7 +2713,7 @@ _0803E630: .4byte 0x000181f0
|
||||
_0803E634: .4byte 0x000181f2
|
||||
_0803E638: .4byte 0x000181fc
|
||||
_0803E63C: .4byte gUnknown_202EDD0
|
||||
_0803E640: .4byte gUnknown_203B46C
|
||||
_0803E640: .4byte gGameOptionsRef
|
||||
_0803E644: .4byte 0x00018215
|
||||
_0803E648: .4byte 0x0001c06c
|
||||
_0803E64C: .4byte gUnknown_203B40D
|
||||
@ -2778,7 +2778,7 @@ sub_803E668:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0803E6F0: .4byte gUnknown_202EDD4
|
||||
_0803E6F4: .4byte gUnknown_203B46C
|
||||
_0803E6F4: .4byte gGameOptionsRef
|
||||
_0803E6F8: .4byte gUnknown_202EDCC
|
||||
_0803E6FC: .4byte gPlayTimeRef
|
||||
_0803E700: .4byte gDungeonGlobalData
|
||||
@ -4467,7 +4467,7 @@ _0803F410: .4byte gDungeonGlobalData
|
||||
_0803F414: .4byte 0x000181e8
|
||||
_0803F418: .4byte 0x0000ffff
|
||||
_0803F41C: .4byte 0x00018228
|
||||
_0803F420: .4byte gUnknown_203B46C
|
||||
_0803F420: .4byte gGameOptionsRef
|
||||
_0803F424: .4byte gUnknown_202D06C
|
||||
thumb_func_end sub_803F38C
|
||||
|
||||
@ -5610,7 +5610,7 @@ _0803FCB0:
|
||||
movs r0, 0
|
||||
b _0803FD00
|
||||
.align 2, 0
|
||||
_0803FCE4: .4byte gUnknown_203B46C
|
||||
_0803FCE4: .4byte gGameOptionsRef
|
||||
_0803FCE8: .4byte gUnknown_202D068
|
||||
_0803FCEC: .4byte gUnknown_202B038
|
||||
_0803FCF0: .4byte gDungeonGlobalData
|
||||
|
@ -635,9 +635,9 @@ _08040606:
|
||||
adds r0, 0x80
|
||||
b _0804062C
|
||||
.align 2, 0
|
||||
_08040618: .4byte gUnknown_203B46C
|
||||
_08040618: .4byte gGameOptionsRef
|
||||
_0804061C:
|
||||
bl sub_8094C68
|
||||
bl DoesNotHaveShadedMap
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
@ -1146,7 +1146,7 @@ _08040A24: .4byte 0x00000215
|
||||
_08040A28: .4byte 0x00000fff
|
||||
_08040A2C: .4byte 0x0000fffe
|
||||
_08040A30: .4byte 0x0000fffd
|
||||
_08040A34: .4byte gUnknown_203B46C
|
||||
_08040A34: .4byte gGameOptionsRef
|
||||
_08040A38: .4byte 0x000001ff
|
||||
_08040A3C:
|
||||
movs r1, 0
|
||||
@ -1237,7 +1237,7 @@ sub_8040ABC:
|
||||
movs r0, 0
|
||||
b _08040AEC
|
||||
.align 2, 0
|
||||
_08040AD8: .4byte gUnknown_203B46C
|
||||
_08040AD8: .4byte gGameOptionsRef
|
||||
_08040ADC:
|
||||
cmp r1, 0
|
||||
beq _08040AE8
|
||||
@ -2873,446 +2873,4 @@ _08041758:
|
||||
bx r1
|
||||
thumb_func_end sub_80416E0
|
||||
|
||||
thumb_func_start sub_8041764
|
||||
sub_8041764:
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
lsls r4, r1, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, [r5]
|
||||
bl sub_800EE5C
|
||||
bl sub_800EF64
|
||||
cmp r4, 0
|
||||
beq _08041780
|
||||
movs r0, 0x42
|
||||
bl sub_803E46C
|
||||
_08041780:
|
||||
adds r0, r5, 0
|
||||
bl sub_800E890
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8041764
|
||||
|
||||
thumb_func_start sub_804178C
|
||||
sub_804178C:
|
||||
push {r4-r7,lr}
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
movs r4, 0
|
||||
ldr r0, _080417B0
|
||||
ldr r0, [r0]
|
||||
ldr r1, _080417B4
|
||||
adds r0, r1
|
||||
str r4, [r0]
|
||||
adds r0, r5, 0
|
||||
bl sub_800E9FC
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080417E0
|
||||
ldr r6, _080417B8
|
||||
b _080417C4
|
||||
.align 2, 0
|
||||
_080417B0: .4byte gDungeonGlobalData
|
||||
_080417B4: .4byte 0x00018204
|
||||
_080417B8: .4byte 0x000003e7
|
||||
_080417BC:
|
||||
movs r0, 0x4A
|
||||
bl sub_803E46C
|
||||
adds r4, 0x1
|
||||
_080417C4:
|
||||
cmp r4, r6
|
||||
bgt _080417D4
|
||||
adds r0, r5, 0
|
||||
bl sub_800E9FC
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080417BC
|
||||
_080417D4:
|
||||
movs r0, 0x4A
|
||||
bl sub_803E46C
|
||||
movs r0, 0x4A
|
||||
bl sub_803E46C
|
||||
_080417E0:
|
||||
movs r0, 0xFA
|
||||
lsls r0, 2
|
||||
cmp r4, r0
|
||||
beq _080417EC
|
||||
cmp r5, 0
|
||||
beq _080417F0
|
||||
_080417EC:
|
||||
bl sub_800DBBC
|
||||
_080417F0:
|
||||
ldr r2, _08041824
|
||||
ldr r0, [r2]
|
||||
cmp r0, 0x1E
|
||||
bgt _08041860
|
||||
ldr r1, _08041828
|
||||
ldrb r7, [r1]
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
movs r4, 0
|
||||
adds r5, r2, 0
|
||||
ldr r6, _0804182C
|
||||
_08041806:
|
||||
ldr r0, [r5]
|
||||
cmp r0, 0x1E
|
||||
bgt _08041838
|
||||
adds r0, 0x4
|
||||
str r0, [r5]
|
||||
ldr r1, _08041830
|
||||
ldrh r2, [r1]
|
||||
movs r3, 0
|
||||
ldrsh r0, [r1, r3]
|
||||
cmp r0, r6
|
||||
beq _0804183C
|
||||
ldr r3, _08041834
|
||||
adds r0, r2, r3
|
||||
strh r0, [r1]
|
||||
b _0804183C
|
||||
.align 2, 0
|
||||
_08041824: .4byte gUnknown_202EDC8
|
||||
_08041828: .4byte gUnknown_203B40D
|
||||
_0804182C: .4byte 0x00000808
|
||||
_08041830: .4byte gUnknown_2026E4E
|
||||
_08041834: .4byte 0xfffffeff
|
||||
_08041838:
|
||||
movs r0, 0x1F
|
||||
str r0, [r5]
|
||||
_0804183C:
|
||||
bl sub_803EA10
|
||||
movs r0, 0x4A
|
||||
bl sub_803E46C
|
||||
ldr r0, [r5]
|
||||
cmp r0, 0x1F
|
||||
beq _08041854
|
||||
adds r4, 0x1
|
||||
ldr r0, _0804186C
|
||||
cmp r4, r0
|
||||
ble _08041806
|
||||
_08041854:
|
||||
ldr r0, _08041870
|
||||
ldr r2, _08041874
|
||||
adds r1, r2, 0
|
||||
strh r1, [r0]
|
||||
ldr r0, _08041878
|
||||
strb r7, [r0]
|
||||
_08041860:
|
||||
bl sub_8042E98
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0804186C: .4byte 0x000003e7
|
||||
_08041870: .4byte gUnknown_2026E4E
|
||||
_08041874: .4byte 0x00000808
|
||||
_08041878: .4byte gUnknown_203B40D
|
||||
thumb_func_end sub_804178C
|
||||
|
||||
thumb_func_start EntityGetStatusSprites
|
||||
@ int EntityGetStatusSprites(struct DungeonEntity *entity)
|
||||
EntityGetStatusSprites:
|
||||
ldr r0, [r0, 0x70]
|
||||
movs r1, 0x80
|
||||
lsls r1, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
bx lr
|
||||
thumb_func_end EntityGetStatusSprites
|
||||
|
||||
thumb_func_start sub_8041888
|
||||
sub_8041888:
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
movs r5, 0
|
||||
_08041890:
|
||||
ldr r0, _080418CC
|
||||
ldr r0, [r0]
|
||||
lsls r1, r5, 2
|
||||
ldr r2, _080418D0
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldr r4, [r0]
|
||||
adds r0, r4, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080418C0
|
||||
ldr r1, [r4, 0x70]
|
||||
cmp r6, 0
|
||||
beq _080418BA
|
||||
movs r0, 0xA6
|
||||
lsls r0, 1
|
||||
adds r1, r0
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
_080418BA:
|
||||
adds r0, r4, 0
|
||||
bl DungeonEntityUpdateStatusSprites
|
||||
_080418C0:
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x13
|
||||
ble _08041890
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080418CC: .4byte gDungeonGlobalData
|
||||
_080418D0: .4byte 0x000135cc
|
||||
thumb_func_end sub_8041888
|
||||
|
||||
thumb_func_start DungeonEntityUpdateStatusSprites
|
||||
DungeonEntityUpdateStatusSprites:
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080418E4
|
||||
b _08041A8C
|
||||
_080418E4:
|
||||
ldr r2, [r4, 0x70]
|
||||
movs r3, 0
|
||||
movs r1, 0x1
|
||||
movs r4, 0x2
|
||||
ldrsh r0, [r2, r4]
|
||||
cmp r0, 0xB9
|
||||
bne _08041902
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xA9
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x7F
|
||||
eors r0, r1
|
||||
negs r1, r0
|
||||
orrs r1, r0
|
||||
lsrs r1, 31
|
||||
_08041902:
|
||||
cmp r1, 0
|
||||
beq _08041914
|
||||
ldr r1, _08041A94
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xA8
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r3, [r0]
|
||||
_08041914:
|
||||
ldr r1, _08041A98
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xAC
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041A9C
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xB0
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AA0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xBC
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AA4
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xC0
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AA8
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xC4
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AAC
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xC8
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AB0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xD0
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AB4
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xDC
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AB8
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xE0
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041ABC
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xE4
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AC0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xE8
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
ldr r1, _08041AC4
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xEC
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
orrs r3, r0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xF4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080419E4
|
||||
movs r0, 0x80
|
||||
lsls r0, 17
|
||||
orrs r3, r0
|
||||
_080419E4:
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xF5
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080419F4
|
||||
movs r0, 0x80
|
||||
lsls r0, 18
|
||||
orrs r3, r0
|
||||
_080419F4:
|
||||
ldrb r0, [r2, 0x6]
|
||||
cmp r0, 0
|
||||
bne _08041A14
|
||||
movs r0, 0x10
|
||||
ldrsh r1, [r2, r0]
|
||||
cmp r1, 0
|
||||
bge _08041A04
|
||||
adds r1, 0x3
|
||||
_08041A04:
|
||||
asrs r1, 2
|
||||
movs r4, 0xE
|
||||
ldrsh r0, [r2, r4]
|
||||
cmp r1, r0
|
||||
ble _08041A14
|
||||
movs r0, 0x80
|
||||
lsls r0, 6
|
||||
orrs r3, r0
|
||||
_08041A14:
|
||||
ldr r0, _08041AC8
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08041ACC
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08041A36
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x60
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _08041A36
|
||||
movs r0, 0x80
|
||||
lsls r0, 6
|
||||
orrs r3, r0
|
||||
_08041A36:
|
||||
ldr r0, [r2, 0x2C]
|
||||
cmp r0, 0xFF
|
||||
ble _08041A7E
|
||||
ldr r0, [r2, 0x30]
|
||||
cmp r0, 0xFF
|
||||
ble _08041A7E
|
||||
ldr r0, [r2, 0x34]
|
||||
cmp r0, 0xFF
|
||||
ble _08041A7E
|
||||
ldr r0, [r2, 0x38]
|
||||
cmp r0, 0xFF
|
||||
ble _08041A7E
|
||||
movs r4, 0x1C
|
||||
ldrsh r0, [r2, r4]
|
||||
cmp r0, 0x9
|
||||
ble _08041A7E
|
||||
movs r1, 0x1E
|
||||
ldrsh r0, [r2, r1]
|
||||
cmp r0, 0x9
|
||||
ble _08041A7E
|
||||
movs r4, 0x20
|
||||
ldrsh r0, [r2, r4]
|
||||
cmp r0, 0x9
|
||||
ble _08041A7E
|
||||
movs r1, 0x22
|
||||
ldrsh r0, [r2, r1]
|
||||
cmp r0, 0x9
|
||||
ble _08041A7E
|
||||
movs r4, 0x24
|
||||
ldrsh r0, [r2, r4]
|
||||
cmp r0, 0x9
|
||||
ble _08041A7E
|
||||
movs r1, 0x26
|
||||
ldrsh r0, [r2, r1]
|
||||
cmp r0, 0x9
|
||||
bgt _08041A84
|
||||
_08041A7E:
|
||||
movs r0, 0x80
|
||||
lsls r0, 20
|
||||
orrs r3, r0
|
||||
_08041A84:
|
||||
movs r4, 0x80
|
||||
lsls r4, 2
|
||||
adds r0, r2, r4
|
||||
str r3, [r0]
|
||||
_08041A8C:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08041A94: .4byte gStatusSpriteMasks_SleepStatus
|
||||
_08041A98: .4byte gStatusSpriteMasks_NonVolatileStatus
|
||||
_08041A9C: .4byte gStatusSpriteMasks_ImmobilizeStatus
|
||||
_08041AA0: .4byte gStatusSpriteMasks_VolatileStatus
|
||||
_08041AA4: .4byte gStatusSpriteMasks_ChargingStatus
|
||||
_08041AA8: .4byte gStatusSpriteMasks_ProtectionStatus
|
||||
_08041AAC: .4byte gStatusSpriteMasks_WaitingStatus
|
||||
_08041AB0: .4byte gStatusSpriteMasks_LinkedStatus
|
||||
_08041AB4: .4byte gStatusSpriteMasks_MoveStatus
|
||||
_08041AB8: .4byte gStatusSpriteMasks_ItemStatus
|
||||
_08041ABC: .4byte gStatusSpriteMasks_TransformStatus
|
||||
_08041AC0: .4byte gStatusSpriteMasks_EyesightStatus
|
||||
_08041AC4: .4byte gStatusSpriteMasks_MuzzledStatus
|
||||
_08041AC8: .4byte gDungeonGlobalData
|
||||
_08041ACC: .4byte 0x00000676
|
||||
thumb_func_end DungeonEntityUpdateStatusSprites
|
||||
|
||||
.align 2,0
|
||||
|
@ -2146,7 +2146,7 @@ _0804A8AC:
|
||||
adds r0, r3, r1
|
||||
b _0804A8DC
|
||||
.align 2, 0
|
||||
_0804A8C0: .4byte gUnknown_203B46C
|
||||
_0804A8C0: .4byte gGameOptionsRef
|
||||
_0804A8C4: .4byte 0x00012b80
|
||||
_0804A8C8:
|
||||
ldr r4, _0804A8D4
|
||||
@ -2299,7 +2299,7 @@ _0804A9D6:
|
||||
adds r0, r3, r1
|
||||
b _0804AA08
|
||||
.align 2, 0
|
||||
_0804A9EC: .4byte gUnknown_203B46C
|
||||
_0804A9EC: .4byte gGameOptionsRef
|
||||
_0804A9F0: .4byte 0x00012b80
|
||||
_0804A9F4:
|
||||
ldr r4, _0804AA00
|
||||
|
@ -4301,7 +4301,7 @@ _080549C8:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_8057954
|
||||
bl RageMoveAction
|
||||
bl _080554BA
|
||||
_080549D8:
|
||||
adds r0, r7, 0
|
||||
@ -4716,7 +4716,7 @@ _08054D64:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805867C
|
||||
bl FocusPunchMoveAction
|
||||
b _080554BA
|
||||
_08054D72:
|
||||
adds r0, r7, 0
|
||||
@ -5180,7 +5180,7 @@ _08055104:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_8059060
|
||||
bl ChargeMoveAction
|
||||
b _080554BA
|
||||
_08055112:
|
||||
adds r0, r7, 0
|
||||
|
@ -498,7 +498,7 @@ _080596EC:
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x2
|
||||
adds r3, r6, 0
|
||||
bl sub_8079618
|
||||
bl SetChargeStatusTarget
|
||||
movs r4, 0x1
|
||||
_08059700:
|
||||
adds r0, r4, 0
|
||||
@ -611,7 +611,7 @@ _080597CC:
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x7
|
||||
adds r3, r4, 0
|
||||
bl sub_8079618
|
||||
bl SetChargeStatusTarget
|
||||
movs r4, 0x1
|
||||
_080597E0:
|
||||
adds r0, r4, 0
|
||||
@ -717,7 +717,7 @@ _080598A4:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x9
|
||||
adds r3, r5, 0
|
||||
bl sub_8079618
|
||||
bl SetChargeStatusTarget
|
||||
movs r6, 0x1
|
||||
_080598B8:
|
||||
adds r0, r6, 0
|
||||
@ -1657,7 +1657,7 @@ _08059FA0:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x8
|
||||
adds r3, r5, 0
|
||||
bl sub_8079618
|
||||
bl SetChargeStatusTarget
|
||||
movs r0, 0x1
|
||||
mov r8, r0
|
||||
_08059FB6:
|
||||
|
@ -633,7 +633,7 @@ _0805DDC2:
|
||||
.align 2, 0
|
||||
_0805DDC8: .4byte gRealInputs
|
||||
_0805DDCC: .4byte 0x00000707
|
||||
_0805DDD0: .4byte gUnknown_203B46C
|
||||
_0805DDD0: .4byte gGameOptionsRef
|
||||
_0805DDD4: .4byte gUnknown_202F22D
|
||||
_0805DDD8: .4byte gUnknown_202F22C
|
||||
_0805DDDC: .4byte gUnknown_202F22E
|
||||
@ -782,7 +782,7 @@ _0805DEDC:
|
||||
b _0805DF3A
|
||||
.align 2, 0
|
||||
_0805DEF8: .4byte gUnknown_202F22C
|
||||
_0805DEFC: .4byte gUnknown_203B46C
|
||||
_0805DEFC: .4byte gGameOptionsRef
|
||||
_0805DF00: .4byte gRealInputs
|
||||
_0805DF04: .4byte gUnknown_202F22D
|
||||
_0805DF08: .4byte 0x01000200
|
||||
@ -859,7 +859,7 @@ _0805DFA0: .4byte gUnknown_202EE00
|
||||
_0805DFA4: .4byte gRealInputs
|
||||
_0805DFA8: .4byte gDungeonGlobalData
|
||||
_0805DFAC: .4byte 0x00018214
|
||||
_0805DFB0: .4byte gUnknown_203B46C
|
||||
_0805DFB0: .4byte gGameOptionsRef
|
||||
_0805DFB4: .4byte 0x0000066d
|
||||
_0805DFB8: .4byte gUnknown_202F22C
|
||||
_0805DFBC:
|
||||
@ -14595,7 +14595,7 @@ _08064DFE:
|
||||
b _08064E40
|
||||
.align 2, 0
|
||||
_08064E2C: .4byte gUnknown_202EE10
|
||||
_08064E30: .4byte gUnknown_203B46C
|
||||
_08064E30: .4byte gGameOptionsRef
|
||||
_08064E34: .4byte gUnknown_202F2E8
|
||||
_08064E38:
|
||||
cmp r0, 0x1
|
||||
@ -14896,7 +14896,7 @@ _08065088:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08065090: .4byte gUnknown_80FEBF8
|
||||
_08065094: .4byte gUnknown_203B46C
|
||||
_08065094: .4byte gGameOptionsRef
|
||||
_08065098: .4byte gUnknown_202F2E8
|
||||
thumb_func_end sub_8065040
|
||||
|
||||
@ -16681,7 +16681,7 @@ _08065F16:
|
||||
movs r6, 0
|
||||
b _08065F64
|
||||
.align 2, 0
|
||||
_08065F28: .4byte gUnknown_203B46C
|
||||
_08065F28: .4byte gGameOptionsRef
|
||||
_08065F2C: .4byte gUnknown_202EE10
|
||||
_08065F30: .4byte gUnknown_2027370
|
||||
_08065F34: .4byte gUnknown_80FF774
|
||||
|
@ -772,7 +772,7 @@ _0806D62A:
|
||||
cmp r0, 0x7F
|
||||
bne _0806D63A
|
||||
adds r0, r7, 0
|
||||
bl sub_807A9B0
|
||||
bl WakeUpPokemon
|
||||
_0806D63A:
|
||||
adds r0, r7, 0
|
||||
movs r1, 0x23
|
||||
@ -1076,7 +1076,7 @@ _0806D858:
|
||||
lsrs r4, r1, 31
|
||||
b _0806D8B6
|
||||
.align 2, 0
|
||||
_0806D8B0: .4byte gUnknown_203B46C
|
||||
_0806D8B0: .4byte gGameOptionsRef
|
||||
_0806D8B4:
|
||||
movs r4, 0
|
||||
_0806D8B6:
|
||||
|
@ -5,288 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_806E8B0
|
||||
sub_806E8B0:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0xC
|
||||
adds r6, r0, 0
|
||||
mov r9, r1
|
||||
adds r0, r2, 0
|
||||
str r3, [sp]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r7, 0x1
|
||||
movs r1, 0x1
|
||||
mov r8, r1
|
||||
movs r2, 0x1
|
||||
str r2, [sp, 0x4]
|
||||
str r1, [sp, 0x8]
|
||||
bl sub_8092354
|
||||
movs r2, 0
|
||||
mov r10, r2
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0806E8E6
|
||||
movs r0, 0x1
|
||||
mov r10, r0
|
||||
_0806E8E6:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x11
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806E92C
|
||||
ldr r5, [r6, 0x70]
|
||||
adds r0, r6, 0
|
||||
bl HasNegativeStatus
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
adds r2, r4, 0
|
||||
bl SetVisualFlags
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r4, 0
|
||||
beq _0806E916
|
||||
movs r7, 0x2
|
||||
_0806E916:
|
||||
cmp r0, 0
|
||||
beq _0806E92C
|
||||
adds r0, r6, 0
|
||||
bl sub_80428B0
|
||||
ldr r0, _0806EADC
|
||||
ldr r2, [r0]
|
||||
adds r0, r6, 0
|
||||
mov r1, r9
|
||||
bl sub_80522F4
|
||||
_0806E92C:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x22
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0806E948
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x4B
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806E98E
|
||||
_0806E948:
|
||||
ldr r2, [r6, 0x70]
|
||||
movs r4, 0
|
||||
ldr r0, [sp, 0x30]
|
||||
cmp r0, 0x20
|
||||
bgt _0806E95A
|
||||
mov r1, r10
|
||||
cmp r1, 0
|
||||
bne _0806E95A
|
||||
movs r4, 0x1
|
||||
_0806E95A:
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
adds r0, r2, 0
|
||||
adds r2, r4, 0
|
||||
bl SetVisualFlags
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r4, 0
|
||||
beq _0806E978
|
||||
lsls r0, r7, 1
|
||||
adds r7, r0, r7
|
||||
mov r2, r8
|
||||
lsls r2, 1
|
||||
mov r8, r2
|
||||
_0806E978:
|
||||
cmp r1, 0
|
||||
beq _0806E98E
|
||||
adds r0, r6, 0
|
||||
bl sub_80428C4
|
||||
ldr r0, _0806EAE0
|
||||
ldr r2, [r0]
|
||||
adds r0, r6, 0
|
||||
mov r1, r9
|
||||
bl sub_80522F4
|
||||
_0806E98E:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x30
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806E9AC
|
||||
mov r0, r10
|
||||
cmp r0, 0
|
||||
bne _0806E9AC
|
||||
lsls r0, r7, 1
|
||||
adds r7, r0, r7
|
||||
mov r1, r8
|
||||
lsls r1, 1
|
||||
mov r8, r1
|
||||
_0806E9AC:
|
||||
ldr r0, [r6, 0x70]
|
||||
ldrb r0, [r0, 0x6]
|
||||
movs r4, 0x1
|
||||
cmp r0, 0
|
||||
beq _0806E9B8
|
||||
movs r4, 0
|
||||
_0806E9B8:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x38
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806E9EA
|
||||
mov r2, r10
|
||||
cmp r2, 0x1
|
||||
bne _0806E9EA
|
||||
ldr r0, _0806EAE4
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0806EAE8
|
||||
adds r0, r1
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0806E9EA
|
||||
lsls r0, r7, 4
|
||||
subs r7, r0, r7
|
||||
mov r2, r8
|
||||
lsls r0, r2, 2
|
||||
add r0, r8
|
||||
lsls r0, 1
|
||||
mov r8, r0
|
||||
_0806E9EA:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x3F
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806EA1C
|
||||
mov r0, r10
|
||||
cmp r0, 0x1
|
||||
bne _0806EA1C
|
||||
ldr r0, _0806EAE4
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0806EAEC
|
||||
adds r0, r1
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0806EA1C
|
||||
lsls r0, r7, 4
|
||||
subs r7, r0, r7
|
||||
mov r2, r8
|
||||
lsls r0, r2, 2
|
||||
add r0, r8
|
||||
lsls r0, 1
|
||||
mov r8, r0
|
||||
_0806EA1C:
|
||||
mov r0, r9
|
||||
movs r1, 0x6
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806EA38
|
||||
mov r0, r10
|
||||
cmp r0, 0
|
||||
bne _0806EA38
|
||||
lsls r7, 2
|
||||
mov r1, r8
|
||||
lsls r0, r1, 2
|
||||
add r8, r0
|
||||
_0806EA38:
|
||||
mov r0, r9
|
||||
movs r1, 0x34
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806EA90
|
||||
mov r2, r10
|
||||
cmp r2, 0
|
||||
bne _0806EA90
|
||||
mov r0, r9
|
||||
ldr r5, [r0, 0x70]
|
||||
bl HasNegativeStatus
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x8
|
||||
adds r2, r4, 0
|
||||
bl SetVisualFlags
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r4, 0
|
||||
beq _0806EA7A
|
||||
ldr r2, [sp, 0x4]
|
||||
lsls r0, r2, 1
|
||||
adds r2, r0, r2
|
||||
str r2, [sp, 0x4]
|
||||
ldr r0, [sp, 0x8]
|
||||
lsls r0, 1
|
||||
str r0, [sp, 0x8]
|
||||
_0806EA7A:
|
||||
cmp r1, 0
|
||||
beq _0806EA90
|
||||
mov r0, r9
|
||||
bl sub_8042940
|
||||
ldr r0, _0806EAF0
|
||||
ldr r2, [r0]
|
||||
adds r0, r6, 0
|
||||
mov r1, r9
|
||||
bl sub_80522F4
|
||||
_0806EA90:
|
||||
ldr r1, [sp]
|
||||
ldr r0, [r1]
|
||||
muls r0, r7
|
||||
str r0, [r1]
|
||||
ldr r2, [sp, 0x2C]
|
||||
ldr r0, [r2]
|
||||
ldr r1, [sp, 0x4]
|
||||
muls r0, r1
|
||||
str r0, [r2]
|
||||
mov r2, r8
|
||||
cmp r2, 0x1
|
||||
beq _0806EAB6
|
||||
ldr r1, [sp]
|
||||
ldr r0, [r1]
|
||||
mov r1, r8
|
||||
bl __divsi3
|
||||
ldr r2, [sp]
|
||||
str r0, [r2]
|
||||
_0806EAB6:
|
||||
ldr r0, [sp, 0x8]
|
||||
cmp r0, 0x1
|
||||
beq _0806EACA
|
||||
ldr r1, [sp, 0x2C]
|
||||
ldr r0, [r1]
|
||||
ldr r1, [sp, 0x8]
|
||||
bl __divsi3
|
||||
ldr r2, [sp, 0x2C]
|
||||
str r0, [r2]
|
||||
_0806EACA:
|
||||
add sp, 0xC
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0806EADC: .4byte gUnknown_80FEE04
|
||||
_0806EAE0: .4byte gUnknown_80FEE2C
|
||||
_0806EAE4: .4byte gDungeonGlobalData
|
||||
_0806EAE8: .4byte 0x000037fa
|
||||
_0806EAEC: .4byte 0x000037f8
|
||||
_0806EAF0: .4byte gUnknown_80FEE54
|
||||
thumb_func_end sub_806E8B0
|
||||
|
||||
thumb_func_start sub_806EAF4
|
||||
sub_806EAF4:
|
||||
push {r4-r7,lr}
|
||||
|
@ -1,214 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80701A4
|
||||
sub_80701A4:
|
||||
push {r4-r7,lr}
|
||||
adds r7, r0, 0
|
||||
ldr r6, [r7, 0x70]
|
||||
movs r4, 0
|
||||
ldr r0, _080701D4
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
adds r0, r6, 0
|
||||
adds r0, 0x44
|
||||
movs r1, 0x1
|
||||
bl SetAction
|
||||
adds r0, r6, 0
|
||||
adds r0, 0xA8
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x3
|
||||
beq _080701DC
|
||||
cmp r0, 0x3
|
||||
bgt _080701D8
|
||||
cmp r0, 0x1
|
||||
beq _080701DC
|
||||
b _080701E4
|
||||
.align 2, 0
|
||||
_080701D4: .4byte gAvailablePokemonNames
|
||||
_080701D8:
|
||||
cmp r0, 0x5
|
||||
bne _080701E4
|
||||
_080701DC:
|
||||
ldr r0, _080701E0
|
||||
b _08070278
|
||||
.align 2, 0
|
||||
_080701E0: .4byte gUnknown_80F95EC
|
||||
_080701E4:
|
||||
adds r0, r6, 0
|
||||
adds r0, 0xB0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x3
|
||||
beq _0807020C
|
||||
cmp r0, 0x3
|
||||
bgt _080701F8
|
||||
cmp r0, 0x1
|
||||
beq _08070202
|
||||
b _0807021C
|
||||
_080701F8:
|
||||
cmp r0, 0x4
|
||||
beq _08070214
|
||||
cmp r0, 0x6
|
||||
beq _08070280
|
||||
b _0807021C
|
||||
_08070202:
|
||||
ldr r0, _08070208
|
||||
b _08070278
|
||||
.align 2, 0
|
||||
_08070208: .4byte gPtrFrozenMessage
|
||||
_0807020C:
|
||||
ldr r0, _08070210
|
||||
b _08070278
|
||||
.align 2, 0
|
||||
_08070210: .4byte gPtrWrappedAroundMessage
|
||||
_08070214:
|
||||
ldr r0, _08070218
|
||||
b _08070278
|
||||
.align 2, 0
|
||||
_08070218: .4byte gPtrWrappedByMessage
|
||||
_0807021C:
|
||||
adds r0, r6, 0
|
||||
adds r0, 0xBC
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x8
|
||||
bhi _0807026C
|
||||
lsls r0, 2
|
||||
ldr r1, _08070230
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08070230: .4byte _08070234
|
||||
.align 2, 0
|
||||
_08070234:
|
||||
.4byte _0807026C
|
||||
.4byte _0807026C
|
||||
.4byte _08070258
|
||||
.4byte _0807025C
|
||||
.4byte _0807026C
|
||||
.4byte _0807026C
|
||||
.4byte _0807026C
|
||||
.4byte _08070264
|
||||
.4byte _0807026C
|
||||
_08070258:
|
||||
movs r4, 0x1
|
||||
b _0807026C
|
||||
_0807025C:
|
||||
ldr r0, _08070260
|
||||
b _08070278
|
||||
.align 2, 0
|
||||
_08070260: .4byte gPtrPausedMessage
|
||||
_08070264:
|
||||
ldr r0, _08070268
|
||||
b _08070278
|
||||
.align 2, 0
|
||||
_08070268: .4byte gPtrInfatuatedMessage
|
||||
_0807026C:
|
||||
adds r0, r6, 0
|
||||
adds r0, 0xC0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _08070288
|
||||
ldr r0, _08070284
|
||||
_08070278:
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl SendMessage
|
||||
_08070280:
|
||||
movs r0, 0x1
|
||||
b _08070322
|
||||
.align 2, 0
|
||||
_08070284: .4byte gPtrBideMessage
|
||||
_08070288:
|
||||
cmp r0, 0
|
||||
beq _08070320
|
||||
cmp r0, 0xB
|
||||
beq _08070320
|
||||
cmp r0, 0xC
|
||||
beq _08070320
|
||||
cmp r4, 0
|
||||
beq _080702A8
|
||||
ldr r0, _080702A4
|
||||
ldr r1, [r0]
|
||||
adds r0, r7, 0
|
||||
bl SendMessage
|
||||
b _0807031A
|
||||
.align 2, 0
|
||||
_080702A4: .4byte gPtrMoveInterruptedMessage
|
||||
_080702A8:
|
||||
movs r5, 0
|
||||
movs r0, 0x8C
|
||||
lsls r0, 1
|
||||
adds r4, r6, r0
|
||||
_080702B0:
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _08070312
|
||||
adds r0, r7, 0
|
||||
adds r1, r4, 0
|
||||
bl MoveMatchesChargingStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08070312
|
||||
adds r0, r6, 0
|
||||
adds r0, 0xC2
|
||||
ldrb r0, [r0]
|
||||
cmp r0, r5
|
||||
bne _08070312
|
||||
adds r0, r6, 0
|
||||
adds r0, 0x44
|
||||
movs r1, 0x14
|
||||
bl SetAction
|
||||
adds r3, r5, 0
|
||||
adds r7, r6, 0
|
||||
adds r7, 0x50
|
||||
cmp r5, 0
|
||||
ble _0807030E
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0x2
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0807030E
|
||||
movs r4, 0x2
|
||||
lsls r0, r5, 3
|
||||
movs r1, 0x8C
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
adds r2, r0, r6
|
||||
_080702FC:
|
||||
subs r2, 0x8
|
||||
subs r3, 0x1
|
||||
cmp r3, 0
|
||||
ble _0807030E
|
||||
ldrb r1, [r2]
|
||||
adds r0, r4, 0
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _080702FC
|
||||
_0807030E:
|
||||
strb r3, [r7]
|
||||
b _08070280
|
||||
_08070312:
|
||||
adds r4, 0x8
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x3
|
||||
ble _080702B0
|
||||
_0807031A:
|
||||
adds r0, r7, 0
|
||||
bl sub_8079764
|
||||
_08070320:
|
||||
movs r0, 0
|
||||
_08070322:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80701A4
|
||||
|
||||
.align 2, 0
|
@ -3,83 +3,4 @@
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8070564
|
||||
sub_8070564:
|
||||
push {r4-r6,lr}
|
||||
adds r4, r1, 0
|
||||
ldr r6, [r0, 0x70]
|
||||
movs r1, 0
|
||||
ldrsh r0, [r4, r1]
|
||||
movs r2, 0x2
|
||||
ldrsh r1, [r4, r2]
|
||||
bl GetMapTile_1
|
||||
adds r5, r0, 0
|
||||
movs r1, 0
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
blt _080705E6
|
||||
movs r2, 0x2
|
||||
ldrsh r1, [r4, r2]
|
||||
cmp r1, 0
|
||||
blt _080705E6
|
||||
cmp r0, 0x37
|
||||
bgt _080705E6
|
||||
cmp r1, 0x1F
|
||||
bgt _080705E6
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _080705E6
|
||||
ldr r0, [r5, 0x10]
|
||||
cmp r0, 0
|
||||
beq _080705A8
|
||||
bl GetEntityType
|
||||
cmp r0, 0x1
|
||||
bne _080705E6
|
||||
_080705A8:
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r6, r1]
|
||||
bl GetCrossableTerrain
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
adds r3, r2, 0
|
||||
ldrh r0, [r5]
|
||||
movs r1, 0x3
|
||||
ands r1, r0
|
||||
adds r0, r1, 0
|
||||
cmp r2, 0x1
|
||||
beq _080705DE
|
||||
cmp r2, 0x1
|
||||
bgt _080705CC
|
||||
cmp r2, 0
|
||||
beq _080705D8
|
||||
b _080705D4
|
||||
_080705CC:
|
||||
cmp r3, 0x3
|
||||
bgt _080705D4
|
||||
cmp r1, 0
|
||||
beq _080705E6
|
||||
_080705D4:
|
||||
movs r0, 0
|
||||
b _080705E8
|
||||
_080705D8:
|
||||
cmp r1, 0x1
|
||||
bne _080705E6
|
||||
b _080705D4
|
||||
_080705DE:
|
||||
cmp r1, 0x2
|
||||
beq _080705D4
|
||||
cmp r0, 0x1
|
||||
beq _080705D4
|
||||
_080705E6:
|
||||
movs r0, 0x1
|
||||
_080705E8:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8070564
|
||||
|
||||
.align 2, 0
|
||||
|
@ -2308,7 +2308,7 @@ _08074FD0:
|
||||
movs r0, 0x2
|
||||
b _08074FEC
|
||||
.align 2, 0
|
||||
_08074FE0: .4byte gUnknown_203B46C
|
||||
_08074FE0: .4byte gGameOptionsRef
|
||||
_08074FE4: .4byte gUnknown_202F378
|
||||
_08074FE8:
|
||||
ldr r1, _08075048
|
||||
@ -2383,7 +2383,7 @@ sub_8075050:
|
||||
movs r0, 0x2
|
||||
b _0807507C
|
||||
.align 2, 0
|
||||
_08075070: .4byte gUnknown_203B46C
|
||||
_08075070: .4byte gGameOptionsRef
|
||||
_08075074: .4byte gUnknown_202F378
|
||||
_08075078:
|
||||
ldr r1, _080750D0
|
||||
@ -2611,7 +2611,7 @@ UseAttack:
|
||||
b _08075248
|
||||
.align 2, 0
|
||||
_08075238: .4byte gUnknown_202F32D
|
||||
_0807523C: .4byte gUnknown_203B46C
|
||||
_0807523C: .4byte gGameOptionsRef
|
||||
_08075240: .4byte gUnknown_202F378
|
||||
_08075244:
|
||||
ldr r1, _080752D0
|
||||
|
@ -65,14 +65,14 @@ sub_80841EC:
|
||||
ldr r0, _08084274
|
||||
cmp r1, r0
|
||||
ble _08084278
|
||||
bl sub_8083DE0
|
||||
bl PlayDungeonCompleteBGM
|
||||
b _0808427C
|
||||
.align 2, 0
|
||||
_0808426C: .4byte gDungeonGlobalData
|
||||
_08084270: .4byte 0x0001ceac
|
||||
_08084274: .4byte 0x00000225
|
||||
_08084278:
|
||||
bl sub_8083D98
|
||||
bl PlayDungeonFailBGM
|
||||
_0808427C:
|
||||
ldr r0, _080842B8
|
||||
ldr r1, [r0]
|
||||
|
@ -9,7 +9,7 @@
|
||||
sub_80951BC:
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_8095190
|
||||
bl FindOpenMailSlot
|
||||
adds r2, r0, 0
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
@ -42,414 +42,4 @@ _080951F6:
|
||||
bx r1
|
||||
thumb_func_end sub_80951BC
|
||||
|
||||
thumb_func_start sub_80951FC
|
||||
sub_80951FC:
|
||||
push {r4,r5,lr}
|
||||
ldr r1, _08095224
|
||||
ldr r1, [r1]
|
||||
adds r1, 0x30
|
||||
ldrb r2, [r1]
|
||||
negs r3, r2
|
||||
orrs r3, r2
|
||||
lsrs r3, 31
|
||||
ldm r0!, {r2,r4,r5}
|
||||
stm r1!, {r2,r4,r5}
|
||||
ldm r0!, {r2,r4,r5}
|
||||
stm r1!, {r2,r4,r5}
|
||||
ldm r0!, {r2,r4,r5}
|
||||
stm r1!, {r2,r4,r5}
|
||||
ldm r0!, {r2,r4,r5}
|
||||
stm r1!, {r2,r4,r5}
|
||||
adds r0, r3, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08095224: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_80951FC
|
||||
|
||||
thumb_func_start sub_8095228
|
||||
sub_8095228:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, _0809523C
|
||||
lsls r1, r0, 1
|
||||
adds r1, r0
|
||||
lsls r1, 4
|
||||
ldr r0, [r2]
|
||||
adds r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0809523C: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8095228
|
||||
|
||||
thumb_func_start sub_8095240
|
||||
sub_8095240:
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, _08095270
|
||||
lsls r4, r0, 1
|
||||
adds r4, r0
|
||||
lsls r4, 4
|
||||
ldr r0, [r5]
|
||||
adds r0, r4
|
||||
movs r1, 0
|
||||
movs r2, 0x30
|
||||
bl MemoryFill8
|
||||
ldr r0, [r5]
|
||||
adds r0, r4
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
ldr r0, [r5]
|
||||
adds r0, r4
|
||||
adds r0, 0x22
|
||||
strb r1, [r0]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08095270: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8095240
|
||||
|
||||
thumb_func_start sub_8095274
|
||||
sub_8095274:
|
||||
push {lr}
|
||||
ldr r1, _08095294
|
||||
ldr r3, [r1]
|
||||
adds r2, r3, 0
|
||||
ldm r2!, {r1}
|
||||
lsls r1, 2
|
||||
adds r2, r1
|
||||
str r0, [r2]
|
||||
ldr r0, [r3]
|
||||
movs r1, 0
|
||||
cmp r0, 0x1E
|
||||
bgt _0809528E
|
||||
adds r1, r0, 0x1
|
||||
_0809528E:
|
||||
str r1, [r3]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08095294: .4byte gUnknown_203B48C
|
||||
thumb_func_end sub_8095274
|
||||
|
||||
thumb_func_start sub_8095298
|
||||
sub_8095298:
|
||||
push {lr}
|
||||
adds r3, r0, 0
|
||||
movs r2, 0
|
||||
ldr r0, _080952B0
|
||||
ldr r0, [r0]
|
||||
adds r1, r0, 0x4
|
||||
_080952A4:
|
||||
ldr r0, [r1]
|
||||
cmp r0, r3
|
||||
bne _080952B4
|
||||
movs r0, 0x1
|
||||
b _080952BE
|
||||
.align 2, 0
|
||||
_080952B0: .4byte gUnknown_203B48C
|
||||
_080952B4:
|
||||
adds r1, 0x4
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x1F
|
||||
ble _080952A4
|
||||
movs r0, 0
|
||||
_080952BE:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8095298
|
||||
|
||||
thumb_func_start sub_80952C4
|
||||
sub_80952C4:
|
||||
push {r4,lr}
|
||||
ldr r2, _080952EC
|
||||
ldr r1, [r2]
|
||||
movs r0, 0
|
||||
str r0, [r1]
|
||||
movs r3, 0
|
||||
adds r4, r2, 0
|
||||
movs r2, 0x1
|
||||
negs r2, r2
|
||||
_080952D6:
|
||||
ldr r0, [r4]
|
||||
lsls r1, r3, 2
|
||||
adds r0, 0x4
|
||||
adds r0, r1
|
||||
str r2, [r0]
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x1F
|
||||
ble _080952D6
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080952EC: .4byte gUnknown_203B48C
|
||||
thumb_func_end sub_80952C4
|
||||
|
||||
thumb_func_start sub_80952F0
|
||||
sub_80952F0:
|
||||
push {r4,lr}
|
||||
adds r4, r1, 0
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
movs r3, 0
|
||||
ldr r0, _08095310
|
||||
ldr r2, [r0]
|
||||
_080952FE:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, r1
|
||||
bne _08095314
|
||||
ldr r0, [r2, 0x10]
|
||||
cmp r0, r4
|
||||
bne _08095314
|
||||
movs r0, 0x1
|
||||
b _0809531E
|
||||
.align 2, 0
|
||||
_08095310: .4byte gUnknown_203B480
|
||||
_08095314:
|
||||
adds r2, 0x30
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x1F
|
||||
ble _080952FE
|
||||
movs r0, 0
|
||||
_0809531E:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80952F0
|
||||
|
||||
thumb_func_start sub_8095324
|
||||
sub_8095324:
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
movs r3, 0
|
||||
ldr r0, _0809534C
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x1F
|
||||
_08095332:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, r4
|
||||
bne _0809533A
|
||||
adds r3, 0x1
|
||||
_0809533A:
|
||||
adds r1, 0x30
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _08095332
|
||||
adds r0, r3, 0
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0809534C: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8095324
|
||||
|
||||
thumb_func_start sub_8095350
|
||||
sub_8095350:
|
||||
push {lr}
|
||||
movs r3, 0
|
||||
ldr r0, _08095370
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x1F
|
||||
_0809535A:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _08095362
|
||||
adds r3, 0x1
|
||||
_08095362:
|
||||
adds r1, 0x30
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _0809535A
|
||||
adds r0, r3, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08095370: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8095350
|
||||
|
||||
thumb_func_start sub_8095374
|
||||
sub_8095374:
|
||||
push {lr}
|
||||
movs r3, 0x1
|
||||
negs r3, r3
|
||||
movs r2, 0
|
||||
ldr r0, _08095398
|
||||
ldr r1, [r0]
|
||||
_08095380:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x1
|
||||
bne _08095388
|
||||
adds r3, r2, 0
|
||||
_08095388:
|
||||
adds r1, 0x30
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x1F
|
||||
ble _08095380
|
||||
adds r0, r3, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08095398: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8095374
|
||||
|
||||
thumb_func_start sub_809539C
|
||||
sub_809539C:
|
||||
push {r4,lr}
|
||||
adds r4, r1, 0
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
movs r3, 0
|
||||
ldr r0, _080953BC
|
||||
ldr r2, [r0]
|
||||
_080953AA:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, r1
|
||||
bne _080953C0
|
||||
ldr r0, [r2, 0x10]
|
||||
cmp r0, r4
|
||||
bne _080953C0
|
||||
adds r0, r3, 0
|
||||
b _080953CC
|
||||
.align 2, 0
|
||||
_080953BC: .4byte gUnknown_203B480
|
||||
_080953C0:
|
||||
adds r2, 0x30
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x1F
|
||||
ble _080953AA
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
_080953CC:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_809539C
|
||||
|
||||
thumb_func_start sub_80953D4
|
||||
sub_80953D4:
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
movs r2, 0
|
||||
ldr r0, _080953EC
|
||||
ldr r1, [r0]
|
||||
_080953E0:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, r3
|
||||
bne _080953F0
|
||||
adds r0, r2, 0
|
||||
b _080953FC
|
||||
.align 2, 0
|
||||
_080953EC: .4byte gUnknown_203B480
|
||||
_080953F0:
|
||||
adds r1, 0x30
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x1F
|
||||
ble _080953E0
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
_080953FC:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80953D4
|
||||
|
||||
thumb_func_start sub_8095400
|
||||
sub_8095400:
|
||||
push {lr}
|
||||
adds r3, r0, 0
|
||||
movs r2, 0
|
||||
ldr r0, _08095418
|
||||
ldr r0, [r0]
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x10
|
||||
_0809540E:
|
||||
ldr r0, [r1]
|
||||
cmp r0, r3
|
||||
bne _0809541C
|
||||
adds r0, r2, 0
|
||||
b _08095428
|
||||
.align 2, 0
|
||||
_08095418: .4byte gUnknown_203B480
|
||||
_0809541C:
|
||||
adds r1, 0x30
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x1F
|
||||
ble _0809540E
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
_08095428:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8095400
|
||||
|
||||
thumb_func_start sub_809542C
|
||||
sub_809542C:
|
||||
push {r4,lr}
|
||||
sub sp, 0x14
|
||||
ldr r4, _08095490
|
||||
ldr r2, [r4]
|
||||
movs r1, 0x1
|
||||
strb r1, [r2]
|
||||
ldr r2, [r4]
|
||||
ldr r1, [r0, 0x4]
|
||||
ldr r0, [r0]
|
||||
str r0, [r2, 0x4]
|
||||
str r1, [r2, 0x8]
|
||||
bl Random
|
||||
bl sub_8094D28
|
||||
bl sub_8094E4C
|
||||
ldr r1, [r4]
|
||||
str r0, [r1, 0x10]
|
||||
bl GetPlayerPokemonStruct
|
||||
ldr r1, [r4]
|
||||
ldrh r0, [r0, 0x8]
|
||||
strh r0, [r1, 0xC]
|
||||
bl GetPlayerPokemonStruct
|
||||
adds r1, r0, 0
|
||||
mov r0, sp
|
||||
bl PrintPokeNameToBuffer
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x14
|
||||
mov r1, sp
|
||||
bl CopyStringtoBuffer
|
||||
bl sub_8011C34
|
||||
ldr r1, [r4]
|
||||
str r0, [r1, 0x24]
|
||||
ldrb r0, [r1, 0x4]
|
||||
bl GetUnk3
|
||||
ldr r1, [r4]
|
||||
adds r1, 0x2C
|
||||
strb r0, [r1]
|
||||
add sp, 0x14
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08095490: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_809542C
|
||||
|
||||
thumb_func_start sub_8095494
|
||||
sub_8095494:
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r2, _080954B0
|
||||
ldr r3, [r2]
|
||||
lsls r2, r1, 1
|
||||
adds r2, r1
|
||||
lsls r2, 4
|
||||
adds r3, r2
|
||||
ldr r1, [r3, 0x4]
|
||||
ldr r2, [r3, 0x8]
|
||||
str r1, [r0]
|
||||
str r2, [r0, 0x4]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080954B0: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8095494
|
||||
|
||||
.align 2,0
|
||||
|
2221
asm/code_80958E8.s
2221
asm/code_80958E8.s
File diff suppressed because it is too large
Load Diff
844
asm/code_80958E8_1.s
Normal file
844
asm/code_80958E8_1.s
Normal file
@ -0,0 +1,844 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8096078
|
||||
sub_8096078:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
ldr r0, _08096090
|
||||
mov r12, r0
|
||||
mov r8, r3
|
||||
movs r4, 0
|
||||
mov r9, r4
|
||||
b _080960B6
|
||||
.align 2, 0
|
||||
_08096090: .4byte gUnknown_203B490
|
||||
_08096094:
|
||||
cmp r2, r3
|
||||
ble _080960AA
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
mov r5, r8
|
||||
adds r1, r0, r5
|
||||
adds r0, r4
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r6,r7}
|
||||
stm r1!, {r6,r7}
|
||||
_080960AA:
|
||||
adds r4, 0x14
|
||||
movs r0, 0x14
|
||||
add r9, r0
|
||||
adds r2, 0x1
|
||||
add r8, r0
|
||||
adds r3, 0x1
|
||||
_080960B6:
|
||||
cmp r2, 0x3
|
||||
bgt _080960E2
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080960E2
|
||||
ldr r6, _08096110
|
||||
mov r1, r9
|
||||
_080960CA:
|
||||
adds r1, 0x14
|
||||
adds r4, 0x14
|
||||
movs r5, 0x14
|
||||
add r9, r5
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x3
|
||||
bgt _080960E2
|
||||
ldr r0, [r6]
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080960CA
|
||||
_080960E2:
|
||||
cmp r2, 0x4
|
||||
bne _08096094
|
||||
cmp r3, 0x3
|
||||
bgt _08096102
|
||||
ldr r4, _08096110
|
||||
movs r2, 0
|
||||
lsls r0, r3, 2
|
||||
adds r0, r3
|
||||
lsls r1, r0, 2
|
||||
_080960F4:
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
strb r2, [r0]
|
||||
adds r1, 0x14
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x3
|
||||
ble _080960F4
|
||||
_08096102:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096110: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096078
|
||||
|
||||
thumb_func_start sub_8096114
|
||||
sub_8096114:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x14
|
||||
movs r1, 0
|
||||
_08096122:
|
||||
adds r0, r1, 0x1
|
||||
mov r10, r0
|
||||
mov r8, r10
|
||||
cmp r0, 0x3
|
||||
bgt _08096198
|
||||
ldr r2, _080961B0
|
||||
mov r9, r2
|
||||
lsls r0, r1, 2
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
mov r12, r0
|
||||
mov r3, r10
|
||||
lsls r0, r3, 2
|
||||
add r0, r10
|
||||
lsls r4, r0, 2
|
||||
_08096140:
|
||||
mov r5, r9
|
||||
ldr r1, [r5]
|
||||
adds r3, r1, r4
|
||||
ldrb r0, [r3]
|
||||
cmp r0, 0
|
||||
beq _0809618C
|
||||
mov r6, r12
|
||||
adds r2, r1, r6
|
||||
ldrb r1, [r2, 0x4]
|
||||
ldrb r0, [r3, 0x4]
|
||||
cmp r1, r0
|
||||
bhi _08096164
|
||||
cmp r1, r0
|
||||
bne _0809618C
|
||||
ldrb r0, [r2, 0x5]
|
||||
ldrb r7, [r3, 0x5]
|
||||
cmp r0, r7
|
||||
bls _0809618C
|
||||
_08096164:
|
||||
mov r1, sp
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r5,r6}
|
||||
stm r1!, {r5,r6}
|
||||
adds r1, r2, 0
|
||||
adds r0, r3, 0
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldm r0!, {r5,r6}
|
||||
stm r1!, {r5,r6}
|
||||
mov r7, r9
|
||||
ldr r1, [r7]
|
||||
adds r1, r4
|
||||
mov r0, sp
|
||||
ldm r0!, {r2,r3,r5}
|
||||
stm r1!, {r2,r3,r5}
|
||||
ldm r0!, {r6,r7}
|
||||
stm r1!, {r6,r7}
|
||||
_0809618C:
|
||||
adds r4, 0x14
|
||||
movs r0, 0x1
|
||||
add r8, r0
|
||||
mov r1, r8
|
||||
cmp r1, 0x3
|
||||
ble _08096140
|
||||
_08096198:
|
||||
mov r1, r10
|
||||
cmp r1, 0x2
|
||||
ble _08096122
|
||||
add sp, 0x14
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080961B0: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096114
|
||||
|
||||
thumb_func_start sub_80961B4
|
||||
sub_80961B4:
|
||||
push {lr}
|
||||
bl sub_8096E2C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080961CE
|
||||
ldr r0, _080961D4
|
||||
ldr r0, [r0]
|
||||
movs r1, 0xCA
|
||||
lsls r1, 2
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
_080961CE:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080961D4: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_80961B4
|
||||
|
||||
thumb_func_start sub_80961D8
|
||||
sub_80961D8:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
movs r7, 0
|
||||
bl CountFilledMailboxSlots
|
||||
adds r6, r0, 0
|
||||
movs r1, 0x4
|
||||
bl RandomRange
|
||||
mov r8, r0
|
||||
cmp r6, 0x3
|
||||
bgt _08096202
|
||||
ldr r4, _08096208
|
||||
ldr r0, [r4]
|
||||
movs r2, 0xCA
|
||||
lsls r2, 2
|
||||
adds r1, r0, r2
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
bne _0809620C
|
||||
_08096202:
|
||||
movs r0, 0
|
||||
b _080963A8
|
||||
.align 2, 0
|
||||
_08096208: .4byte gUnknown_203B490
|
||||
_0809620C:
|
||||
strb r7, [r1]
|
||||
movs r5, 0x38
|
||||
movs r0, 0xA
|
||||
movs r1, 0x31
|
||||
movs r2, 0x1
|
||||
bl sub_8001D08
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0809623A
|
||||
ldr r0, [r4]
|
||||
ldr r1, _08096328
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _0809623A
|
||||
movs r0, 0x35
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809623A
|
||||
movs r5, 0x35
|
||||
_0809623A:
|
||||
movs r0, 0xF
|
||||
bl sub_80023E4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0809629C
|
||||
ldr r0, _0809632C
|
||||
ldr r0, [r0]
|
||||
movs r2, 0xC9
|
||||
lsls r2, 2
|
||||
adds r0, r2
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08096264
|
||||
movs r0, 0x34
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08096264
|
||||
movs r5, 0x34
|
||||
_08096264:
|
||||
ldr r0, _0809632C
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08096330
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08096280
|
||||
movs r0, 0x33
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08096280
|
||||
movs r5, 0x33
|
||||
_08096280:
|
||||
ldr r0, _0809632C
|
||||
ldr r0, [r0]
|
||||
ldr r2, _08096334
|
||||
adds r0, r2
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _0809629C
|
||||
movs r0, 0x32
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809629C
|
||||
movs r5, 0x32
|
||||
_0809629C:
|
||||
bl GetRescueTeamRank
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x6
|
||||
bne _080962C4
|
||||
ldr r0, _0809632C
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08096338
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080962C4
|
||||
movs r0, 0x36
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080962C4
|
||||
movs r5, 0x36
|
||||
_080962C4:
|
||||
movs r0, 0x6
|
||||
bl sub_80023E4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080962EC
|
||||
ldr r0, _0809632C
|
||||
ldr r0, [r0]
|
||||
ldr r2, _0809633C
|
||||
adds r0, r2
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080962EC
|
||||
movs r0, 0x37
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080962EC
|
||||
movs r5, 0x37
|
||||
_080962EC:
|
||||
cmp r5, 0x38
|
||||
bne _08096310
|
||||
cmp r6, r8
|
||||
bgt _08096392
|
||||
bl sub_8096E2C
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
movs r0, 0xE
|
||||
bl sub_80023E4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809630C
|
||||
cmp r5, 0x2
|
||||
bhi _0809638E
|
||||
_0809630C:
|
||||
cmp r5, 0x31
|
||||
bhi _0809638E
|
||||
_08096310:
|
||||
lsls r0, r6, 24
|
||||
lsrs r0, 24
|
||||
bl GetMailboxSlotInfo
|
||||
adds r4, r0, 0
|
||||
movs r0, 0x1
|
||||
strb r0, [r4]
|
||||
movs r0, 0x62
|
||||
strb r0, [r4, 0x4]
|
||||
strb r5, [r4, 0x5]
|
||||
b _0809638A
|
||||
.align 2, 0
|
||||
_08096328: .4byte 0x00000325
|
||||
_0809632C: .4byte gUnknown_203B490
|
||||
_08096330: .4byte 0x00000323
|
||||
_08096334: .4byte 0x00000322
|
||||
_08096338: .4byte 0x00000326
|
||||
_0809633C: .4byte 0x00000327
|
||||
_08096340:
|
||||
lsls r0, r6, 24
|
||||
lsrs r0, 24
|
||||
bl GetMailboxSlotInfo
|
||||
adds r4, r0, 0
|
||||
bl sub_8095B28
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08096392
|
||||
bl sub_8095E78
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
adds r0, r4, 0x4
|
||||
ldrb r1, [r4, 0x1]
|
||||
bl sub_803C1D0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809636C
|
||||
movs r5, 0
|
||||
_0809636C:
|
||||
movs r0, 0x5
|
||||
movs r1, 0xA
|
||||
bl RandomRange
|
||||
strb r0, [r4, 0x11]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x9
|
||||
bne _0809638A
|
||||
cmp r5, 0
|
||||
bne _08096388
|
||||
movs r0, 0x5
|
||||
strb r0, [r4, 0x11]
|
||||
b _0809638A
|
||||
_08096388:
|
||||
strb r5, [r4, 0x13]
|
||||
_0809638A:
|
||||
movs r7, 0x1
|
||||
adds r6, 0x1
|
||||
_0809638E:
|
||||
cmp r6, r8
|
||||
ble _08096340
|
||||
_08096392:
|
||||
bl sub_80963B4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0809639E
|
||||
movs r7, 0x1
|
||||
_0809639E:
|
||||
bl sub_8096078
|
||||
bl sub_8096114
|
||||
adds r0, r7, 0
|
||||
_080963A8:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80961D8
|
||||
|
||||
thumb_func_start sub_80963B4
|
||||
sub_80963B4:
|
||||
push {r4-r6,lr}
|
||||
movs r6, 0
|
||||
bl sub_8096E2C
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
bl CountFilledMailboxSlots
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0x3
|
||||
ble _080963CE
|
||||
movs r0, 0
|
||||
b _080963F4
|
||||
_080963CE:
|
||||
movs r0, 0xE
|
||||
bl sub_80023E4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080963F2
|
||||
cmp r5, 0x31
|
||||
bhi _080963F2
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl GetMailboxSlotInfo
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
movs r1, 0x62
|
||||
strb r1, [r0, 0x4]
|
||||
strb r5, [r0, 0x5]
|
||||
movs r6, 0x1
|
||||
_080963F2:
|
||||
adds r0, r6, 0
|
||||
_080963F4:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80963B4
|
||||
|
||||
thumb_func_start sub_80963FC
|
||||
sub_80963FC:
|
||||
push {r4-r6,lr}
|
||||
movs r6, 0
|
||||
_08096400:
|
||||
lsls r0, r6, 24
|
||||
lsrs r4, r0, 24
|
||||
adds r0, r4, 0
|
||||
bl GetMailboxSlotInfo
|
||||
adds r5, r0, 0
|
||||
ldrb r0, [r5]
|
||||
cmp r0, 0x1
|
||||
beq _08096418
|
||||
adds r0, r4, 0
|
||||
bl ResetMailboxSlot
|
||||
_08096418:
|
||||
adds r6, 0x1
|
||||
cmp r6, 0x3
|
||||
ble _08096400
|
||||
bl sub_8096078
|
||||
bl CountFilledMailboxSlots
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl GetMailboxSlotInfo
|
||||
adds r5, r0, 0
|
||||
movs r0, 0
|
||||
movs r4, 0x5
|
||||
strb r4, [r5]
|
||||
strb r0, [r5, 0x1]
|
||||
strb r0, [r5, 0x2]
|
||||
movs r0, 0x2
|
||||
strb r0, [r5, 0x4]
|
||||
movs r0, 0x3
|
||||
strb r0, [r5, 0x5]
|
||||
bl Random
|
||||
ldr r1, _08096484
|
||||
ands r1, r0
|
||||
str r1, [r5, 0x8]
|
||||
movs r0, 0x10
|
||||
strh r0, [r5, 0xC]
|
||||
strh r0, [r5, 0xE]
|
||||
ldrb r0, [r5, 0x4]
|
||||
bl sub_8095F28
|
||||
strb r0, [r5, 0x10]
|
||||
strb r4, [r5, 0x11]
|
||||
_0809645C:
|
||||
ldrb r1, [r5, 0x1]
|
||||
adds r0, r5, 0x4
|
||||
adds r2, r5, 0
|
||||
adds r2, 0x12
|
||||
bl sub_803C37C
|
||||
ldrb r0, [r5, 0x10]
|
||||
ldrb r1, [r5, 0x12]
|
||||
cmp r0, r1
|
||||
beq _0809645C
|
||||
movs r0, 0
|
||||
strb r0, [r5, 0x13]
|
||||
bl sub_8096078
|
||||
bl sub_8096114
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096484: .4byte 0x00ffffff
|
||||
thumb_func_end sub_80963FC
|
||||
|
||||
thumb_func_start sub_8096488
|
||||
sub_8096488:
|
||||
push {r4,lr}
|
||||
movs r4, 0
|
||||
_0809648C:
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl ResetMailboxSlot
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x3
|
||||
ble _0809648C
|
||||
movs r0, 0
|
||||
bl GetMailboxSlotInfo
|
||||
movs r2, 0
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
movs r1, 0x62
|
||||
strb r1, [r0, 0x4]
|
||||
strb r2, [r0, 0x5]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8096488
|
||||
|
||||
thumb_func_start sub_80964B4
|
||||
sub_80964B4:
|
||||
push {lr}
|
||||
ldr r0, _080964D4
|
||||
ldr r0, [r0]
|
||||
ldr r1, _080964D8
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080964DC
|
||||
movs r0, 0x35
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080964DC
|
||||
movs r0, 0
|
||||
b _080964DE
|
||||
.align 2, 0
|
||||
_080964D4: .4byte gUnknown_203B490
|
||||
_080964D8: .4byte 0x00000325
|
||||
_080964DC:
|
||||
movs r0, 0x1
|
||||
_080964DE:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80964B4
|
||||
|
||||
thumb_func_start sub_80964E4
|
||||
sub_80964E4:
|
||||
push {lr}
|
||||
ldr r0, _08096504
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08096508
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _0809650C
|
||||
movs r0, 0x36
|
||||
bl sub_8096E80
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809650C
|
||||
movs r0, 0
|
||||
b _0809650E
|
||||
.align 2, 0
|
||||
_08096504: .4byte gUnknown_203B490
|
||||
_08096508: .4byte 0x00000326
|
||||
_0809650C:
|
||||
movs r0, 0x1
|
||||
_0809650E:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80964E4
|
||||
|
||||
thumb_func_start CountFilledPelipperBoardSlots
|
||||
CountFilledPelipperBoardSlots:
|
||||
push {r4,r5,lr}
|
||||
movs r5, 0
|
||||
movs r4, 0
|
||||
_0809651A:
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl IsPelipperBoardSlotEmpty
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809652A
|
||||
adds r5, 0x1
|
||||
_0809652A:
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x7
|
||||
ble _0809651A
|
||||
adds r0, r5, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end CountFilledPelipperBoardSlots
|
||||
|
||||
thumb_func_start sub_8096538
|
||||
sub_8096538:
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
movs r3, 0
|
||||
ldr r5, _08096560
|
||||
movs r2, 0
|
||||
_08096542:
|
||||
ldr r0, [r5]
|
||||
adds r0, r2
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x50
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
bne _08096564
|
||||
adds r0, r4, 0
|
||||
ldm r0!, {r2-r4}
|
||||
stm r1!, {r2-r4}
|
||||
ldm r0!, {r2,r3}
|
||||
stm r1!, {r2,r3}
|
||||
movs r0, 0
|
||||
b _0809656E
|
||||
.align 2, 0
|
||||
_08096560: .4byte gUnknown_203B490
|
||||
_08096564:
|
||||
adds r2, 0x14
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x7
|
||||
ble _08096542
|
||||
movs r0, 0x1
|
||||
_0809656E:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8096538
|
||||
|
||||
thumb_func_start GetPelipperBoardSlotInfo
|
||||
GetPelipperBoardSlotInfo:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, _08096588
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r1, 0x50
|
||||
ldr r0, [r2]
|
||||
adds r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08096588: .4byte gUnknown_203B490
|
||||
thumb_func_end GetPelipperBoardSlotInfo
|
||||
|
||||
thumb_func_start IsPelipperBoardSlotEmpty
|
||||
IsPelipperBoardSlotEmpty:
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, _080965AC
|
||||
ldr r2, [r1]
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r2, r1
|
||||
adds r2, 0x50
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0
|
||||
beq _080965B0
|
||||
movs r0, 0
|
||||
b _080965B2
|
||||
.align 2, 0
|
||||
_080965AC: .4byte gUnknown_203B490
|
||||
_080965B0:
|
||||
movs r0, 0x1
|
||||
_080965B2:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end IsPelipperBoardSlotEmpty
|
||||
|
||||
thumb_func_start ResetPelipperBoardSlot
|
||||
ResetPelipperBoardSlot:
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r4, _080965F0
|
||||
ldr r1, [r4]
|
||||
lsls r2, r0, 2
|
||||
adds r2, r0
|
||||
lsls r2, 2
|
||||
adds r1, r2
|
||||
adds r1, 0x50
|
||||
movs r3, 0
|
||||
strb r3, [r1]
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
adds r0, 0x54
|
||||
movs r1, 0x63
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
adds r0, 0x55
|
||||
strb r3, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
adds r0, 0x61
|
||||
strb r3, [r0]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080965F0: .4byte gUnknown_203B490
|
||||
thumb_func_end ResetPelipperBoardSlot
|
||||
|
||||
thumb_func_start sub_80965F4
|
||||
sub_80965F4:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
ldr r0, _0809660C
|
||||
mov r12, r0
|
||||
mov r8, r3
|
||||
movs r4, 0
|
||||
mov r9, r4
|
||||
b _08096636
|
||||
.align 2, 0
|
||||
_0809660C: .4byte gUnknown_203B490
|
||||
_08096610:
|
||||
cmp r2, r3
|
||||
ble _0809662A
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
mov r5, r8
|
||||
adds r1, r0, r5
|
||||
adds r0, r4
|
||||
adds r1, 0x50
|
||||
adds r0, 0x50
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r6,r7}
|
||||
stm r1!, {r6,r7}
|
||||
_0809662A:
|
||||
adds r4, 0x14
|
||||
movs r0, 0x14
|
||||
add r9, r0
|
||||
adds r2, 0x1
|
||||
add r8, r0
|
||||
adds r3, 0x1
|
||||
_08096636:
|
||||
cmp r2, 0x7
|
||||
bgt _08096666
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
adds r0, r4
|
||||
adds r0, 0x50
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08096666
|
||||
ldr r6, _08096694
|
||||
mov r1, r9
|
||||
_0809664C:
|
||||
adds r1, 0x14
|
||||
adds r4, 0x14
|
||||
movs r5, 0x14
|
||||
add r9, r5
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x7
|
||||
bgt _08096666
|
||||
ldr r0, [r6]
|
||||
adds r0, r1
|
||||
adds r0, 0x50
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0809664C
|
||||
_08096666:
|
||||
cmp r2, 0x8
|
||||
bne _08096610
|
||||
cmp r3, 0x7
|
||||
bgt _08096688
|
||||
ldr r4, _08096694
|
||||
movs r2, 0
|
||||
lsls r0, r3, 2
|
||||
adds r0, r3
|
||||
lsls r1, r0, 2
|
||||
_08096678:
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
adds r0, 0x50
|
||||
strb r2, [r0]
|
||||
adds r1, 0x14
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x7
|
||||
ble _08096678
|
||||
_08096688:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096694: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_80965F4
|
||||
|
||||
.align 2,0
|
425
asm/code_8096AF8.s
Normal file
425
asm/code_8096AF8.s
Normal file
@ -0,0 +1,425 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8096C80
|
||||
sub_8096C80:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
ldr r0, _08096C98
|
||||
mov r12, r0
|
||||
mov r8, r3
|
||||
movs r4, 0
|
||||
mov r9, r4
|
||||
b _08096CC2
|
||||
.align 2, 0
|
||||
_08096C98: .4byte gUnknown_203B490
|
||||
_08096C9C:
|
||||
cmp r2, r3
|
||||
ble _08096CB6
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
mov r5, r8
|
||||
adds r1, r0, r5
|
||||
adds r0, r4
|
||||
adds r1, 0xF0
|
||||
adds r0, 0xF0
|
||||
ldm r0!, {r5-r7}
|
||||
stm r1!, {r5-r7}
|
||||
ldm r0!, {r6,r7}
|
||||
stm r1!, {r6,r7}
|
||||
_08096CB6:
|
||||
adds r4, 0x14
|
||||
movs r0, 0x14
|
||||
add r9, r0
|
||||
adds r2, 0x1
|
||||
add r8, r0
|
||||
adds r3, 0x1
|
||||
_08096CC2:
|
||||
cmp r2, 0x7
|
||||
bgt _08096CF2
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
adds r0, r4
|
||||
adds r0, 0xF0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08096CF2
|
||||
ldr r6, _08096D20
|
||||
mov r1, r9
|
||||
_08096CD8:
|
||||
adds r1, 0x14
|
||||
adds r4, 0x14
|
||||
movs r5, 0x14
|
||||
add r9, r5
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x7
|
||||
bgt _08096CF2
|
||||
ldr r0, [r6]
|
||||
adds r0, r1
|
||||
adds r0, 0xF0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08096CD8
|
||||
_08096CF2:
|
||||
cmp r2, 0x8
|
||||
bne _08096C9C
|
||||
cmp r3, 0x7
|
||||
bgt _08096D14
|
||||
ldr r4, _08096D20
|
||||
movs r2, 0
|
||||
lsls r0, r3, 2
|
||||
adds r0, r3
|
||||
lsls r1, r0, 2
|
||||
_08096D04:
|
||||
ldr r0, [r4]
|
||||
adds r0, r1
|
||||
adds r0, 0xF0
|
||||
strb r2, [r0]
|
||||
adds r1, 0x14
|
||||
adds r3, 0x1
|
||||
cmp r3, 0x7
|
||||
ble _08096D04
|
||||
_08096D14:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096D20: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096C80
|
||||
|
||||
thumb_func_start sub_8096D24
|
||||
sub_8096D24:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x18
|
||||
movs r1, 0
|
||||
_08096D32:
|
||||
adds r6, r1, 0x1
|
||||
mov r10, r6
|
||||
cmp r6, 0x7
|
||||
bgt _08096DBC
|
||||
ldr r0, _08096DD4
|
||||
mov r8, r0
|
||||
lsls r0, r1, 2
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
mov r9, r0
|
||||
lsls r0, r6, 2
|
||||
adds r0, r6
|
||||
lsls r4, r0, 2
|
||||
_08096D4C:
|
||||
mov r1, r8
|
||||
ldr r2, [r1]
|
||||
adds r3, r2, r4
|
||||
adds r5, r3, 0
|
||||
adds r5, 0xF0
|
||||
str r5, [sp, 0x14]
|
||||
ldrb r0, [r5]
|
||||
cmp r0, 0
|
||||
beq _08096DB0
|
||||
add r2, r9
|
||||
mov r12, r2
|
||||
mov r0, r12
|
||||
adds r0, 0xF4
|
||||
adds r1, r3, 0
|
||||
adds r1, 0xF4
|
||||
ldrb r2, [r0]
|
||||
ldrb r0, [r1]
|
||||
cmp r2, r0
|
||||
bhi _08096D84
|
||||
cmp r2, r0
|
||||
bne _08096DB0
|
||||
mov r0, r12
|
||||
adds r0, 0xF5
|
||||
adds r1, 0x1
|
||||
ldrb r0, [r0]
|
||||
ldrb r1, [r1]
|
||||
cmp r0, r1
|
||||
bls _08096DB0
|
||||
_08096D84:
|
||||
mov r2, r12
|
||||
adds r2, 0xF0
|
||||
mov r1, sp
|
||||
adds r0, r2, 0
|
||||
ldm r0!, {r3,r5,r7}
|
||||
stm r1!, {r3,r5,r7}
|
||||
ldm r0!, {r3,r7}
|
||||
stm r1!, {r3,r7}
|
||||
ldr r0, [sp, 0x14]
|
||||
ldm r0!, {r1,r5,r7}
|
||||
stm r2!, {r1,r5,r7}
|
||||
ldm r0!, {r3,r5}
|
||||
stm r2!, {r3,r5}
|
||||
mov r7, r8
|
||||
ldr r1, [r7]
|
||||
adds r1, r4
|
||||
adds r1, 0xF0
|
||||
mov r0, sp
|
||||
ldm r0!, {r2,r3,r5}
|
||||
stm r1!, {r2,r3,r5}
|
||||
ldm r0!, {r2,r7}
|
||||
stm r1!, {r2,r7}
|
||||
_08096DB0:
|
||||
adds r4, 0x14
|
||||
movs r3, 0x1
|
||||
add r10, r3
|
||||
mov r5, r10
|
||||
cmp r5, 0x7
|
||||
ble _08096D4C
|
||||
_08096DBC:
|
||||
adds r1, r6, 0
|
||||
cmp r1, 0x6
|
||||
ble _08096D32
|
||||
add sp, 0x18
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096DD4: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096D24
|
||||
|
||||
thumb_func_start sub_8096DD8
|
||||
sub_8096DD8:
|
||||
ldr r0, _08096DE4
|
||||
ldr r0, [r0]
|
||||
movs r1, 0xC8
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08096DE4: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096DD8
|
||||
|
||||
thumb_func_start sub_8096DE8
|
||||
sub_8096DE8:
|
||||
ldr r0, _08096DF4
|
||||
ldr r0, [r0]
|
||||
movs r1, 0xDC
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08096DF4: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096DE8
|
||||
|
||||
thumb_func_start ReceivePKMNNews
|
||||
ReceivePKMNNews:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, _08096E10
|
||||
ldr r1, [r1]
|
||||
movs r2, 0xBC
|
||||
lsls r2, 2
|
||||
adds r1, r2
|
||||
adds r1, r0
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08096E10: .4byte gUnknown_203B490
|
||||
thumb_func_end ReceivePKMNNews
|
||||
|
||||
thumb_func_start CheckPKMNNewsSlot
|
||||
CheckPKMNNewsSlot:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, _08096E28
|
||||
ldr r1, [r1]
|
||||
movs r2, 0xBC
|
||||
lsls r2, 2
|
||||
adds r1, r2
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08096E28: .4byte gUnknown_203B490
|
||||
thumb_func_end CheckPKMNNewsSlot
|
||||
|
||||
thumb_func_start sub_8096E2C
|
||||
sub_8096E2C:
|
||||
push {lr}
|
||||
movs r3, 0
|
||||
ldr r0, _08096E70
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x3
|
||||
_08096E36:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x1
|
||||
bne _08096E48
|
||||
ldrb r0, [r1, 0x5]
|
||||
cmp r3, r0
|
||||
bgt _08096E48
|
||||
cmp r0, 0x31
|
||||
bhi _08096E48
|
||||
adds r3, r0, 0x1
|
||||
_08096E48:
|
||||
adds r1, 0x14
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _08096E36
|
||||
adds r2, r3, 0
|
||||
cmp r2, 0x31
|
||||
bgt _08096E7A
|
||||
ldr r0, _08096E70
|
||||
ldr r0, [r0]
|
||||
movs r3, 0xBC
|
||||
lsls r3, 2
|
||||
adds r1, r0, r3
|
||||
_08096E60:
|
||||
adds r0, r1, r2
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08096E74
|
||||
lsls r0, r2, 24
|
||||
lsrs r0, 24
|
||||
b _08096E7C
|
||||
.align 2, 0
|
||||
_08096E70: .4byte gUnknown_203B490
|
||||
_08096E74:
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x31
|
||||
ble _08096E60
|
||||
_08096E7A:
|
||||
movs r0, 0x38
|
||||
_08096E7C:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8096E2C
|
||||
|
||||
thumb_func_start sub_8096E80
|
||||
sub_8096E80:
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
movs r2, 0
|
||||
ldr r0, _08096E9C
|
||||
ldr r1, [r0]
|
||||
_08096E8C:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x1
|
||||
bne _08096EA0
|
||||
ldrb r0, [r1, 0x5]
|
||||
cmp r3, r0
|
||||
bne _08096EA0
|
||||
movs r0, 0x1
|
||||
b _08096EAA
|
||||
.align 2, 0
|
||||
_08096E9C: .4byte gUnknown_203B490
|
||||
_08096EA0:
|
||||
adds r1, 0x14
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x3
|
||||
ble _08096E8C
|
||||
movs r0, 0
|
||||
_08096EAA:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8096E80
|
||||
|
||||
thumb_func_start sub_8096EB0
|
||||
sub_8096EB0:
|
||||
ldrb r1, [r0, 0x2]
|
||||
ldrb r2, [r0, 0x1]
|
||||
adds r1, r2
|
||||
ldrb r3, [r0, 0x4]
|
||||
adds r2, r1, r3
|
||||
ldrb r1, [r0, 0x5]
|
||||
adds r2, r1
|
||||
ldr r1, [r0, 0x8]
|
||||
lsls r1, 8
|
||||
adds r2, r1
|
||||
movs r3, 0xC
|
||||
ldrsh r1, [r0, r3]
|
||||
lsls r1, 12
|
||||
adds r2, r1
|
||||
movs r3, 0xE
|
||||
ldrsh r1, [r0, r3]
|
||||
lsls r1, 16
|
||||
adds r2, r1
|
||||
ldrb r1, [r0, 0x10]
|
||||
lsls r1, 24
|
||||
adds r1, r2, r1
|
||||
ldrb r3, [r0, 0x11]
|
||||
adds r2, r1, r3
|
||||
ldrb r1, [r0, 0x12]
|
||||
adds r1, r2, r1
|
||||
ldrb r0, [r0, 0x13]
|
||||
adds r2, r1, r0
|
||||
adds r0, r2, 0
|
||||
bx lr
|
||||
thumb_func_end sub_8096EB0
|
||||
|
||||
thumb_func_start sub_8096EEC
|
||||
sub_8096EEC:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
mov r12, r0
|
||||
movs r3, 0xF
|
||||
ldr r5, _08096F4C
|
||||
mov r8, r5
|
||||
movs r4, 0x8C
|
||||
lsls r4, 2
|
||||
_08096EFE:
|
||||
mov r0, r8
|
||||
ldr r2, [r0]
|
||||
lsls r1, r3, 1
|
||||
adds r1, r3
|
||||
lsls r1, 2
|
||||
adds r1, r2, r1
|
||||
subs r3, 0x1
|
||||
lsls r0, r3, 1
|
||||
adds r0, r3
|
||||
lsls r0, 2
|
||||
adds r2, r0
|
||||
adds r1, r4
|
||||
adds r2, r4
|
||||
ldm r2!, {r0,r6,r7}
|
||||
stm r1!, {r0,r6,r7}
|
||||
cmp r3, 0
|
||||
bgt _08096EFE
|
||||
ldr r2, [r5]
|
||||
movs r3, 0x8C
|
||||
lsls r3, 2
|
||||
adds r2, r3
|
||||
mov r6, r12
|
||||
ldr r0, [r6, 0x4]
|
||||
ldr r1, [r6, 0x8]
|
||||
str r0, [r2]
|
||||
str r1, [r2, 0x4]
|
||||
mov r0, r12
|
||||
bl sub_8096EB0
|
||||
ldr r1, [r5]
|
||||
movs r7, 0x8E
|
||||
lsls r7, 2
|
||||
adds r1, r7
|
||||
str r0, [r1]
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08096F4C: .4byte gUnknown_203B490
|
||||
thumb_func_end sub_8096EEC
|
||||
|
||||
|
||||
.align 2,0
|
@ -658,7 +658,7 @@ _08099604:
|
||||
bne _080995AE
|
||||
b _08099454
|
||||
.align 2, 0
|
||||
_08099620: .4byte gUnknown_203B46C
|
||||
_08099620: .4byte gGameOptionsRef
|
||||
_08099624:
|
||||
movs r0, 0x10
|
||||
bl FadeOutAllMusic
|
||||
@ -738,7 +738,7 @@ sub_8099690:
|
||||
.align 2, 0
|
||||
_080996BC: .4byte gUnknown_8116028
|
||||
_080996C0: .4byte gSystemFileArchive
|
||||
_080996C4: .4byte gUnknown_203B46C
|
||||
_080996C4: .4byte gGameOptionsRef
|
||||
_080996C8: .4byte gUnknown_202D078
|
||||
_080996CC:
|
||||
ldr r4, _080996D0
|
||||
@ -5733,7 +5733,7 @@ _0809BD84:
|
||||
bl sub_8001658
|
||||
cmp r0, 0
|
||||
bne _0809BDB2
|
||||
bl sub_80247B4
|
||||
bl HasEvolutionCompleted
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0809BDB2
|
||||
@ -6907,7 +6907,7 @@ sub_809C6EC:
|
||||
bl sub_809C6CC
|
||||
b _0809C71E
|
||||
.align 2, 0
|
||||
_0809C70C: .4byte gUnknown_203B46C
|
||||
_0809C70C: .4byte gGameOptionsRef
|
||||
_0809C710:
|
||||
movs r0, 0x3
|
||||
bl sub_809C6CC
|
||||
@ -7962,7 +7962,7 @@ _0809CECC:
|
||||
bl sub_809C6CC
|
||||
b _0809CEF6
|
||||
.align 2, 0
|
||||
_0809CEEC: .4byte gUnknown_203B46C
|
||||
_0809CEEC: .4byte gGameOptionsRef
|
||||
_0809CEF0:
|
||||
movs r0, 0x3
|
||||
bl sub_809C6CC
|
||||
|
@ -155,11 +155,11 @@ _08032850:
|
||||
.4byte _0803378C
|
||||
_08032A48:
|
||||
movs r0, 0x1
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
cmp r0, 0
|
||||
bne _08032A9C
|
||||
movs r0, 0x5
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0
|
||||
bne _08032A9C
|
||||
@ -214,11 +214,11 @@ _08032AC8: .4byte gUnknown_80E25F4
|
||||
_08032ACC: .4byte gUnknown_80E20E0
|
||||
_08032AD0:
|
||||
movs r0, 0x1
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
cmp r0, 0
|
||||
bne _08032B24
|
||||
movs r0, 0x5
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0
|
||||
bne _08032B24
|
||||
@ -292,7 +292,7 @@ _08032B78: .4byte gUnknown_80E25F4
|
||||
_08032B7C: .4byte gUnknown_80E2068
|
||||
_08032B80:
|
||||
movs r0, 0x4
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
adds r2, r0, 0
|
||||
cmp r2, 0
|
||||
beq _08032B9C
|
||||
@ -323,12 +323,12 @@ _08032BBC: .4byte gUnknown_80E25F4
|
||||
_08032BC0: .4byte gUnknown_80E2190
|
||||
_08032BC4:
|
||||
movs r0, 0x1
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0
|
||||
bne _08032C0C
|
||||
movs r0, 0x5
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
cmp r0, 0
|
||||
bne _08032BF4
|
||||
ldr r0, _08032BEC
|
||||
@ -356,7 +356,7 @@ _08032C04: .4byte gUnknown_80E25F4
|
||||
_08032C08: .4byte gUnknown_80E2218
|
||||
_08032C0C:
|
||||
movs r0, 0x5
|
||||
bl sub_8095324
|
||||
bl CountMailType
|
||||
adds r2, r0, 0
|
||||
cmp r2, 0
|
||||
bne _08032C28
|
||||
|
@ -964,7 +964,7 @@ _080AD2A0:
|
||||
beq _080AD2B6
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x38
|
||||
bl sub_809D92C
|
||||
bl GroundScript_Cancel
|
||||
orrs r5, r0
|
||||
lsls r0, r5, 24
|
||||
lsrs r5, r0, 24
|
||||
|
@ -2590,7 +2590,7 @@ _080A8B84:
|
||||
beq _080A8B9A
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x38
|
||||
bl sub_809D92C
|
||||
bl GroundScript_Cancel
|
||||
orrs r5, r0
|
||||
lsls r0, r5, 24
|
||||
lsrs r5, r0, 24
|
||||
|
@ -1104,7 +1104,7 @@ _080AC388:
|
||||
beq _080AC39E
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x38
|
||||
bl sub_809D92C
|
||||
bl GroundScript_Cancel
|
||||
orrs r5, r0
|
||||
lsls r0, r5, 24
|
||||
lsrs r5, r0, 24
|
||||
|
@ -6868,7 +6868,7 @@ _080A167A:
|
||||
bl sub_80961D8
|
||||
b _080A1804
|
||||
_080A1680:
|
||||
bl sub_8096028
|
||||
bl ResetMailbox
|
||||
bl _080A236A
|
||||
_080A1688:
|
||||
bl sub_80963FC
|
||||
|
@ -467,7 +467,7 @@ _08019288: .4byte gUnknown_203B210
|
||||
_0801928C: .4byte gUnknown_202DE30
|
||||
_08019290: .4byte gKecleonShopDialogue
|
||||
_08019294:
|
||||
bl sub_8019D8C
|
||||
bl CountKecleonItems
|
||||
cmp r0, 0
|
||||
bne _080192C0
|
||||
ldr r0, _080192AC
|
||||
|
@ -146,7 +146,7 @@ CreateMailActionMenu:
|
||||
ldr r4, _0802E3F0
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0x8]
|
||||
bl sub_8095FE8
|
||||
bl GetMailboxSlotInfo
|
||||
adds r7, r0, 0
|
||||
ldrb r0, [r7]
|
||||
cmp r0, 0x1
|
||||
@ -182,7 +182,7 @@ _0802E3FC:
|
||||
movs r0, 0x5
|
||||
str r0, [r1]
|
||||
adds r0, r7, 0
|
||||
bl sub_80968B0
|
||||
bl IsMailinJobSlot
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0802E422
|
||||
|
@ -42,7 +42,7 @@ _0802FFAC:
|
||||
.4byte _08030180
|
||||
.4byte _080301A0
|
||||
_0802FFE4:
|
||||
bl sub_80301B0
|
||||
bl DrawMakuhitaMainMenu
|
||||
ldr r2, _0802FFF8
|
||||
ldr r0, _0802FFFC
|
||||
ldr r5, [r0]
|
||||
@ -265,465 +265,4 @@ _080301A8: .4byte gMakuhitaDialogue
|
||||
_080301AC: .4byte 0x0000010d
|
||||
thumb_func_end UpdateMakuhitaDialogue
|
||||
|
||||
thumb_func_start sub_80301B0
|
||||
sub_80301B0:
|
||||
push {r4,lr}
|
||||
ldr r4, _080301F8
|
||||
ldr r1, [r4]
|
||||
movs r2, 0x2
|
||||
str r2, [r1, 0x14]
|
||||
ldr r0, _080301FC
|
||||
str r0, [r1, 0x18]
|
||||
str r2, [r1, 0x1C]
|
||||
bl sub_80306A4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080301D6
|
||||
ldr r0, [r4]
|
||||
movs r1, 0x1
|
||||
negs r1, r1
|
||||
str r1, [r0, 0x1C]
|
||||
movs r1, 0x1
|
||||
str r1, [r0, 0x14]
|
||||
_080301D6:
|
||||
ldr r1, [r4]
|
||||
movs r2, 0x1
|
||||
ldr r0, _08030200
|
||||
ldr r0, [r0]
|
||||
str r0, [r1, 0x20]
|
||||
movs r0, 0x3
|
||||
str r0, [r1, 0x24]
|
||||
ldr r0, _08030204
|
||||
ldr r0, [r0]
|
||||
str r0, [r1, 0x28]
|
||||
str r2, [r1, 0x2C]
|
||||
movs r0, 0
|
||||
str r0, [r1, 0x30]
|
||||
str r2, [r1, 0x34]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080301F8: .4byte gUnknown_203B318
|
||||
_080301FC: .4byte gMakuhitaDojoGoTrain
|
||||
_08030200: .4byte gUnknown_80D4970
|
||||
_08030204: .4byte gUnknown_80D4934
|
||||
thumb_func_end sub_80301B0
|
||||
|
||||
thumb_func_start sub_8030208
|
||||
sub_8030208:
|
||||
push {lr}
|
||||
sub sp, 0x4
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _08030250
|
||||
ldr r0, _08030230
|
||||
ldr r1, [r0]
|
||||
ldr r0, [sp]
|
||||
str r0, [r1, 0x14]
|
||||
ldr r0, [sp]
|
||||
cmp r0, 0x2
|
||||
beq _0803023A
|
||||
cmp r0, 0x2
|
||||
bgt _08030234
|
||||
cmp r0, 0x1
|
||||
beq _0803024A
|
||||
b _08030250
|
||||
.align 2, 0
|
||||
_08030230: .4byte gUnknown_203B318
|
||||
_08030234:
|
||||
cmp r0, 0x3
|
||||
beq _08030242
|
||||
b _08030250
|
||||
_0803023A:
|
||||
movs r0, 0x3
|
||||
bl UpdateMakuhitaState
|
||||
b _08030250
|
||||
_08030242:
|
||||
movs r0, 0xC
|
||||
bl UpdateMakuhitaState
|
||||
b _08030250
|
||||
_0803024A:
|
||||
movs r0, 0x2
|
||||
bl UpdateMakuhitaState
|
||||
_08030250:
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8030208
|
||||
|
||||
thumb_func_start sub_8030258
|
||||
sub_8030258:
|
||||
push {lr}
|
||||
movs r0, 0x1
|
||||
bl sub_80303AC
|
||||
cmp r0, 0x2
|
||||
beq _08030288
|
||||
cmp r0, 0x2
|
||||
bcc _0803029A
|
||||
cmp r0, 0x3
|
||||
bne _0803029A
|
||||
bl sub_8030418
|
||||
ldr r1, _08030284
|
||||
ldr r1, [r1]
|
||||
strh r0, [r1, 0x10]
|
||||
bl sub_8030480
|
||||
movs r0, 0x5
|
||||
bl UpdateMakuhitaState
|
||||
b _0803029A
|
||||
.align 2, 0
|
||||
_08030284: .4byte gUnknown_203B318
|
||||
_08030288:
|
||||
bl sub_8030480
|
||||
ldr r0, _080302A0
|
||||
ldr r1, [r0]
|
||||
ldr r0, _080302A4
|
||||
strh r0, [r1, 0x10]
|
||||
movs r0, 0x1
|
||||
bl UpdateMakuhitaState
|
||||
_0803029A:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080302A0: .4byte gUnknown_203B318
|
||||
_080302A4: .4byte 0x0000ffff
|
||||
thumb_func_end sub_8030258
|
||||
|
||||
thumb_func_start sub_80302A8
|
||||
sub_80302A8:
|
||||
push {lr}
|
||||
bl sub_801B6AC
|
||||
cmp r0, 0x1
|
||||
bls _080302C0
|
||||
cmp r0, 0x3
|
||||
bhi _080302C0
|
||||
bl sub_801B72C
|
||||
movs r0, 0xA
|
||||
bl UpdateMakuhitaState
|
||||
_080302C0:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80302A8
|
||||
|
||||
thumb_func_start sub_80302C4
|
||||
sub_80302C4:
|
||||
push {lr}
|
||||
sub sp, 0x4
|
||||
mov r0, sp
|
||||
bl sub_80144A4
|
||||
cmp r0, 0
|
||||
bne _080302DC
|
||||
ldr r0, _080302E4
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0xC]
|
||||
bl UpdateMakuhitaState
|
||||
_080302DC:
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080302E4: .4byte gUnknown_203B318
|
||||
thumb_func_end sub_80302C4
|
||||
|
||||
thumb_func_start sub_80302E8
|
||||
sub_80302E8:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
mov r8, r2
|
||||
bl sub_80306A4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08030302
|
||||
movs r0, 0
|
||||
b _0803039A
|
||||
_08030302:
|
||||
ldr r4, _080303A4
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
bne _08030314
|
||||
movs r0, 0xD0
|
||||
movs r1, 0x8
|
||||
bl MemoryAlloc
|
||||
str r0, [r4]
|
||||
_08030314:
|
||||
ldr r0, [r4]
|
||||
str r5, [r0, 0x64]
|
||||
lsls r1, r5, 1
|
||||
adds r1, r5
|
||||
lsls r1, 3
|
||||
adds r1, 0x6C
|
||||
adds r1, r0, r1
|
||||
str r1, [r0, 0x68]
|
||||
adds r0, 0x6C
|
||||
bl sub_8006518
|
||||
ldr r1, [r4]
|
||||
ldr r2, [r1, 0x64]
|
||||
lsls r0, r2, 1
|
||||
adds r0, r2
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
adds r1, 0x6C
|
||||
ldr r0, _080303A8
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldr r2, [r4]
|
||||
ldr r1, [r2, 0x68]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xCC
|
||||
str r0, [r1, 0x14]
|
||||
cmp r6, 0
|
||||
beq _08030362
|
||||
ldr r1, [r2, 0x64]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r1, r2, 0
|
||||
adds r1, 0x74
|
||||
adds r1, r0
|
||||
ldr r0, [r6]
|
||||
str r0, [r1]
|
||||
_08030362:
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x68]
|
||||
mov r1, r8
|
||||
bl sub_8012D08
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x6C
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
ldr r4, [r4]
|
||||
adds r4, 0x30
|
||||
bl sub_8030668
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
mov r2, r8
|
||||
adds r3, r5, 0
|
||||
bl sub_8013818
|
||||
bl sub_80304C8
|
||||
bl DrawDojoCourseList
|
||||
movs r0, 0x1
|
||||
_0803039A:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_080303A4: .4byte gUnknown_203B31C
|
||||
_080303A8: .4byte gUnknown_80E0804
|
||||
thumb_func_end sub_80302E8
|
||||
|
||||
thumb_func_start sub_80303AC
|
||||
sub_80303AC:
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080303C8
|
||||
ldr r0, _080303C4
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x30
|
||||
bl sub_8013660
|
||||
movs r0, 0
|
||||
b _08030410
|
||||
.align 2, 0
|
||||
_080303C4: .4byte gUnknown_203B31C
|
||||
_080303C8:
|
||||
ldr r4, _080303E4
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x30
|
||||
bl GetKeyPress
|
||||
cmp r0, 0x1
|
||||
beq _080303E8
|
||||
cmp r0, 0x2
|
||||
bne _080303F2
|
||||
movs r0, 0x1
|
||||
bl PlayMenuSoundEffect
|
||||
movs r0, 0x2
|
||||
b _08030410
|
||||
.align 2, 0
|
||||
_080303E4: .4byte gUnknown_203B31C
|
||||
_080303E8:
|
||||
movs r0, 0
|
||||
bl PlayMenuSoundEffect
|
||||
movs r0, 0x3
|
||||
b _08030410
|
||||
_080303F2:
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x30
|
||||
movs r1, 0x1
|
||||
bl sub_80138B8
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08030406
|
||||
movs r0, 0
|
||||
b _08030410
|
||||
_08030406:
|
||||
bl sub_80304C8
|
||||
bl DrawDojoCourseList
|
||||
movs r0, 0x1
|
||||
_08030410:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80303AC
|
||||
|
||||
thumb_func_start sub_8030418
|
||||
sub_8030418:
|
||||
ldr r0, _08030440
|
||||
ldr r2, [r0]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x4E
|
||||
movs r3, 0
|
||||
ldrsh r1, [r0, r3]
|
||||
subs r0, 0x2
|
||||
movs r3, 0
|
||||
ldrsh r0, [r0, r3]
|
||||
muls r0, r1
|
||||
adds r1, r2, 0
|
||||
adds r1, 0x48
|
||||
movs r3, 0
|
||||
ldrsh r1, [r1, r3]
|
||||
adds r0, r1
|
||||
lsls r0, 1
|
||||
adds r0, r2, r0
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08030440: .4byte gUnknown_203B31C
|
||||
thumb_func_end sub_8030418
|
||||
|
||||
thumb_func_start sub_8030444
|
||||
sub_8030444:
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
bl sub_8030668
|
||||
adds r1, r0, 0
|
||||
ldr r5, _0803047C
|
||||
ldr r0, [r5]
|
||||
adds r2, r0, 0
|
||||
adds r2, 0x52
|
||||
strh r1, [r2]
|
||||
adds r0, 0x30
|
||||
bl sub_8013984
|
||||
bl sub_80304C8
|
||||
bl DrawDojoCourseList
|
||||
cmp r4, 0
|
||||
beq _08030476
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x30
|
||||
bl AddMenuCursorSprite
|
||||
_08030476:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0803047C: .4byte gUnknown_203B31C
|
||||
thumb_func_end sub_8030444
|
||||
|
||||
thumb_func_start sub_8030480
|
||||
sub_8030480:
|
||||
push {r4,r5,lr}
|
||||
ldr r4, _080304C0
|
||||
ldr r2, [r4]
|
||||
cmp r2, 0
|
||||
beq _080304BA
|
||||
ldr r0, [r2, 0x64]
|
||||
lsls r1, r0, 1
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, r2, r1
|
||||
adds r1, 0x6C
|
||||
ldr r0, _080304C4
|
||||
ldm r0!, {r2,r3,r5}
|
||||
stm r1!, {r2,r3,r5}
|
||||
ldm r0!, {r2,r3,r5}
|
||||
stm r1!, {r2,r3,r5}
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x6C
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
_080304BA:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080304C0: .4byte gUnknown_203B31C
|
||||
_080304C4: .4byte gUnknown_80E07EC
|
||||
thumb_func_end sub_8030480
|
||||
|
||||
thumb_func_start sub_80304C8
|
||||
sub_80304C8:
|
||||
push {r4,lr}
|
||||
ldr r4, _08030538
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xCC
|
||||
movs r2, 0
|
||||
movs r1, 0x1
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xCD
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xCE
|
||||
movs r1, 0x8
|
||||
strb r1, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xCF
|
||||
strb r2, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4A
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
movs r1, 0xC
|
||||
bl sub_80095E4
|
||||
adds r0, 0x2
|
||||
lsls r0, 16
|
||||
ldr r2, [r4]
|
||||
ldr r3, [r2, 0x64]
|
||||
lsls r1, r3, 1
|
||||
adds r1, r3
|
||||
lsls r1, 3
|
||||
adds r1, r2, r1
|
||||
adds r1, 0x7A
|
||||
asrs r3, r0, 16
|
||||
lsrs r0, 16
|
||||
strh r0, [r1]
|
||||
ldr r1, [r2, 0x64]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r2, r0
|
||||
adds r3, 0x2
|
||||
adds r2, 0x7C
|
||||
strh r3, [r2]
|
||||
bl ResetUnusedInputStruct
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x6C
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_800641C
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08030538: .4byte gUnknown_203B31C
|
||||
thumb_func_end sub_80304C8
|
||||
|
||||
.align 2,0
|
||||
|
@ -1653,7 +1653,7 @@ _08038110:
|
||||
movs r0, 0x7
|
||||
b _08038126
|
||||
_08038114:
|
||||
bl sub_8095190
|
||||
bl FindOpenMailSlot
|
||||
movs r1, 0x1
|
||||
negs r1, r1
|
||||
cmp r0, r1
|
||||
|
@ -135,8 +135,8 @@ sub_802EC10:
|
||||
movs r0, 0x4
|
||||
str r0, [r1]
|
||||
ldrb r0, [r2, 0x8]
|
||||
bl sub_8096574
|
||||
bl sub_80968B0
|
||||
bl GetPelipperBoardSlotInfo
|
||||
bl IsMailinJobSlot
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0802EC40
|
||||
|
@ -1,388 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8030A74
|
||||
sub_8030A74:
|
||||
push {r4,r5,lr}
|
||||
movs r2, 0
|
||||
ldr r0, _08030A90
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x20]
|
||||
cmp r0, 0x7
|
||||
bls _08030A84
|
||||
b _08030C0E
|
||||
_08030A84:
|
||||
lsls r0, 2
|
||||
ldr r1, _08030A94
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08030A90: .4byte gUnknown_203B320
|
||||
_08030A94: .4byte _08030A98
|
||||
.align 2, 0
|
||||
_08030A98:
|
||||
.4byte _08030AB8
|
||||
.4byte _08030B10
|
||||
.4byte _08030B3C
|
||||
.4byte _08030B94
|
||||
.4byte _08030B68
|
||||
.4byte _08030BC0
|
||||
.4byte _08030AE4
|
||||
.4byte _08030BEC
|
||||
_08030AB8:
|
||||
movs r1, 0
|
||||
ldr r5, _08030ADC
|
||||
ldr r4, _08030AE0
|
||||
movs r3, 0
|
||||
_08030AC0:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08030AD2
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030AD2:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030AC0
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030ADC: .4byte gUnknown_203B480
|
||||
_08030AE0: .4byte gUnknown_203B320
|
||||
_08030AE4:
|
||||
movs r1, 0
|
||||
ldr r5, _08030B08
|
||||
ldr r4, _08030B0C
|
||||
movs r3, 0
|
||||
_08030AEC:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x6
|
||||
bne _08030AFE
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030AFE:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030AEC
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030B08: .4byte gUnknown_203B480
|
||||
_08030B0C: .4byte gUnknown_203B320
|
||||
_08030B10:
|
||||
movs r1, 0
|
||||
ldr r5, _08030B34
|
||||
ldr r4, _08030B38
|
||||
movs r3, 0
|
||||
_08030B18:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _08030B2A
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030B2A:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030B18
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030B34: .4byte gUnknown_203B480
|
||||
_08030B38: .4byte gUnknown_203B320
|
||||
_08030B3C:
|
||||
movs r1, 0
|
||||
ldr r5, _08030B60
|
||||
ldr r4, _08030B64
|
||||
movs r3, 0
|
||||
_08030B44:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x2
|
||||
bne _08030B56
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030B56:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030B44
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030B60: .4byte gUnknown_203B480
|
||||
_08030B64: .4byte gUnknown_203B320
|
||||
_08030B68:
|
||||
movs r1, 0
|
||||
ldr r5, _08030B8C
|
||||
ldr r4, _08030B90
|
||||
movs r3, 0
|
||||
_08030B70:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x4
|
||||
bne _08030B82
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030B82:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030B70
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030B8C: .4byte gUnknown_203B480
|
||||
_08030B90: .4byte gUnknown_203B320
|
||||
_08030B94:
|
||||
movs r1, 0
|
||||
ldr r5, _08030BB8
|
||||
ldr r4, _08030BBC
|
||||
movs r3, 0
|
||||
_08030B9C:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x3
|
||||
bne _08030BAE
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030BAE:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030B9C
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030BB8: .4byte gUnknown_203B480
|
||||
_08030BBC: .4byte gUnknown_203B320
|
||||
_08030BC0:
|
||||
movs r1, 0
|
||||
ldr r5, _08030BE4
|
||||
ldr r4, _08030BE8
|
||||
movs r3, 0
|
||||
_08030BC8:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x5
|
||||
bne _08030BDA
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030BDA:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030BC8
|
||||
b _08030C0E
|
||||
.align 2, 0
|
||||
_08030BE4: .4byte gUnknown_203B480
|
||||
_08030BE8: .4byte gUnknown_203B320
|
||||
_08030BEC:
|
||||
movs r1, 0
|
||||
ldr r5, _08030C18
|
||||
ldr r4, _08030C1C
|
||||
movs r3, 0
|
||||
_08030BF4:
|
||||
ldr r0, [r5]
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x7
|
||||
bne _08030C06
|
||||
ldr r0, [r4]
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
adds r2, 0x1
|
||||
_08030C06:
|
||||
adds r3, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030BF4
|
||||
_08030C0E:
|
||||
adds r0, r2, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08030C18: .4byte gUnknown_203B480
|
||||
_08030C1C: .4byte gUnknown_203B320
|
||||
thumb_func_end sub_8030A74
|
||||
|
||||
thumb_func_start sub_8030C20
|
||||
sub_8030C20:
|
||||
push {lr}
|
||||
cmp r0, 0x7
|
||||
bls _08030C28
|
||||
b _08030D34
|
||||
_08030C28:
|
||||
lsls r0, 2
|
||||
ldr r1, _08030C34
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08030C34: .4byte _08030C38
|
||||
.align 2, 0
|
||||
_08030C38:
|
||||
.4byte _08030C58
|
||||
.4byte _08030C90
|
||||
.4byte _08030CAC
|
||||
.4byte _08030CE4
|
||||
.4byte _08030CC8
|
||||
.4byte _08030D00
|
||||
.4byte _08030C74
|
||||
.4byte _08030D20
|
||||
_08030C58:
|
||||
movs r1, 0
|
||||
ldr r0, _08030C70
|
||||
ldr r2, [r0]
|
||||
_08030C5E:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0
|
||||
bne _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030C5E
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030C70: .4byte gUnknown_203B480
|
||||
_08030C74:
|
||||
movs r1, 0
|
||||
ldr r0, _08030C8C
|
||||
ldr r2, [r0]
|
||||
_08030C7A:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x6
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030C7A
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030C8C: .4byte gUnknown_203B480
|
||||
_08030C90:
|
||||
movs r1, 0
|
||||
ldr r0, _08030CA8
|
||||
ldr r2, [r0]
|
||||
_08030C96:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x1
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030C96
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030CA8: .4byte gUnknown_203B480
|
||||
_08030CAC:
|
||||
movs r1, 0
|
||||
ldr r0, _08030CC4
|
||||
ldr r2, [r0]
|
||||
_08030CB2:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x2
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030CB2
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030CC4: .4byte gUnknown_203B480
|
||||
_08030CC8:
|
||||
movs r1, 0
|
||||
ldr r0, _08030CE0
|
||||
ldr r2, [r0]
|
||||
_08030CCE:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x4
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030CCE
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030CE0: .4byte gUnknown_203B480
|
||||
_08030CE4:
|
||||
movs r1, 0
|
||||
ldr r0, _08030CFC
|
||||
ldr r2, [r0]
|
||||
_08030CEA:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x3
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030CEA
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030CFC: .4byte gUnknown_203B480
|
||||
_08030D00:
|
||||
movs r1, 0
|
||||
ldr r0, _08030D18
|
||||
ldr r2, [r0]
|
||||
_08030D06:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x5
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030D06
|
||||
b _08030D34
|
||||
.align 2, 0
|
||||
_08030D18: .4byte gUnknown_203B480
|
||||
_08030D1C:
|
||||
movs r0, 0
|
||||
b _08030D36
|
||||
_08030D20:
|
||||
movs r1, 0
|
||||
ldr r0, _08030D3C
|
||||
ldr r2, [r0]
|
||||
_08030D26:
|
||||
ldrb r0, [r2]
|
||||
cmp r0, 0x7
|
||||
beq _08030D1C
|
||||
adds r2, 0x30
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
ble _08030D26
|
||||
_08030D34:
|
||||
movs r0, 0x1
|
||||
_08030D36:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08030D3C: .4byte gUnknown_203B480
|
||||
thumb_func_end sub_8030C20
|
||||
|
||||
.align 2,0
|
@ -371,7 +371,7 @@ _0802CD80:
|
||||
_0802CD88:
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0xC]
|
||||
bl sub_8096C3C
|
||||
bl ResetJobSlot
|
||||
bl sub_8096C80
|
||||
bl HasNoAcceptedJobs
|
||||
lsls r0, 24
|
||||
|
@ -4672,80 +4672,3 @@ gUnknown_80DD74C: @ 80DD74C
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD764
|
||||
gUnknown_80DD764: @ 80DD764
|
||||
.string "You have chosen to say farewell\n"
|
||||
.string "to this Pokémon.{EXTRA_MSG}"
|
||||
.string "The Pokémon will leave its Friend Area.\n"
|
||||
.string "It will no longer be available for\n"
|
||||
.string "adventures. Is that OK?\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD7FC
|
||||
gUnknown_80DD7FC: @ 80DD7FC
|
||||
.string "If you say farewell to this\n"
|
||||
.string "Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
|
||||
.string "You will never be able to get another one\n"
|
||||
.string "like it to join your team.\n"
|
||||
.string "Will you release it anyway?\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD8A0
|
||||
gUnknown_80DD8A0: @ 80DD8A0
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}returned to the Toolbox.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD8D0
|
||||
gUnknown_80DD8D0: @ 80DD8D0
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n{CENTER_ALIGN}sent to storage.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionStandby
|
||||
gFriendActionStandby: @ 80DD8F8
|
||||
.string "Stand By\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionMakeLeader
|
||||
gFriendActionMakeLeader: @ 80DD904
|
||||
.string "Make Leader\0"
|
||||
|
||||
.global gFriendActionJoinTeam
|
||||
gFriendActionJoinTeam: @ 80DD910
|
||||
.string "Join Team\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionSayFarewell
|
||||
gFriendActionSayFarewell: @ 80DD91C
|
||||
.string "Say Farewell\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionGive
|
||||
gFriendActionGive: @ 80DD92C
|
||||
.string "Give\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionTake
|
||||
gFriendActionTake: @ 80DD934
|
||||
.string "Take\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionSummary
|
||||
gFriendActionSummary: @ 80DD93C
|
||||
.string "Summary\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionMoves
|
||||
gFriendActionMoves: @ 80DD944
|
||||
.string "Moves\0"
|
||||
.align 2,0
|
||||
|
||||
.global gFriendActionCheckIQ
|
||||
gFriendActionCheckIQ: @ 80DD94C
|
||||
.string "Check IQ\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD958
|
||||
gUnknown_80DD958: @ 80DD958
|
||||
.string "Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} \0"
|
||||
.string "pksdir0\0"
|
||||
|
@ -1,206 +1,5 @@
|
||||
.section .rodata
|
||||
|
||||
@ Start of Trade Items Data
|
||||
|
||||
.global gUnknown_80E60A0
|
||||
gUnknown_80E60A0: @ 80E60A0
|
||||
.4byte SendItem_80E60C8
|
||||
.4byte 1
|
||||
.4byte ReceiveItem_80E60B8
|
||||
.4byte 2
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global ReceiveItem_80E60B8
|
||||
ReceiveItem_80E60B8:
|
||||
.asciz "Receive item"
|
||||
.align 2,0
|
||||
|
||||
.global SendItem_80E60C8
|
||||
SendItem_80E60C8:
|
||||
.asciz "Send item"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E60D4
|
||||
gUnknown_80E60D4: @ 80E60D4
|
||||
.4byte SendItem_80E60C8
|
||||
.4byte -1
|
||||
.4byte ReceiveItem_80E60B8
|
||||
.4byte 2
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global gUnknown_80E60EC
|
||||
gUnknown_80E60EC: @ 80E60EC
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x15, 0x00, 0x04, 0x00
|
||||
.byte 0x06, 0x00, 0x05, 0x00
|
||||
.byte 0x05, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80E6104
|
||||
gUnknown_80E6104: @ 80E6104
|
||||
.4byte Confirm_80E6134
|
||||
.4byte 3
|
||||
.4byte Info_80E612C
|
||||
.4byte 4
|
||||
.4byte Cancel_80E6124
|
||||
.4byte 7
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global Cancel_80E6124
|
||||
Cancel_80E6124:
|
||||
.asciz "Cancel"
|
||||
.align 2,0
|
||||
|
||||
|
||||
.global Info_80E612C
|
||||
Info_80E612C:
|
||||
.asciz "Info"
|
||||
.align 2,0
|
||||
|
||||
.global Confirm_80E6134
|
||||
Confirm_80E6134:
|
||||
.asciz "Confirm"
|
||||
.align 2,0
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x16, 0x00, 0x09, 0x00
|
||||
.byte 0x05, 0x00, 0x03, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80E6154
|
||||
gUnknown_80E6154: @ 80E6154
|
||||
.4byte Yes_80E6170
|
||||
.4byte 5
|
||||
.4byte No_80E616C
|
||||
.4byte 6
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global No_80E616C
|
||||
No_80E616C:
|
||||
.asciz "No"
|
||||
.align 2,0
|
||||
|
||||
.global Yes_80E6170
|
||||
Yes_80E6170:
|
||||
.asciz "Yes"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E6174
|
||||
gUnknown_80E6174: @ 80E6174
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x15, 0x00, 0x0D, 0x00
|
||||
.byte 0x06, 0x00, 0x04, 0x00
|
||||
.byte 0x04, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80E618C
|
||||
gUnknown_80E618C: @ 80E618C
|
||||
.4byte Yes_80E6170
|
||||
.4byte 5
|
||||
.4byte Cancel_80E6124
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global gUnknown_80E61A4
|
||||
gUnknown_80E61A4: @ 80E61A4
|
||||
.asciz "What would you like to do? "
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E61C0
|
||||
gUnknown_80E61C0: @ 80E61C0
|
||||
.asciz "Please choose the item to be sent."
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E61E4
|
||||
gUnknown_80E61E4: @ 80E61E4
|
||||
.string "{COLOR_1 LIGHT_BLUE_2}$d0{END_COLOR_TEXT_1} {COLOR_1 GREEN_2}{ARG_MOVE_ITEM_0}(s){END_COLOR_TEXT_1}\n"
|
||||
.string "will be sent.\n"
|
||||
.string "Is that OK?\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E6214
|
||||
gUnknown_80E6214: @ 80E6214
|
||||
.string "Your friend will send you an item.\n"
|
||||
.string "When you are both ready{COMMA} you\n"
|
||||
.string "may communicate.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E6268
|
||||
gUnknown_80E6268: @ 80E6268
|
||||
.string "Preparing to send an item to your\n"
|
||||
.string "friend. When you are both ready{COMMA}\n"
|
||||
.string "you may communicate.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E62C4
|
||||
gUnknown_80E62C4: @ 80E62C4
|
||||
.string "{CENTER_ALIGN}In communication...\n"
|
||||
.string "{CENTER_ALIGN}Please wait with the power on.\n"
|
||||
.string "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E6314
|
||||
gUnknown_80E6314: @ 80E6314
|
||||
.string "You received\n"
|
||||
.string "{COLOR_1 LIGHT_BLUE_2}$d0{END_COLOR_TEXT_1} {COLOR_1 GREEN_2}{ARG_MOVE_ITEM_0}(s){END_COLOR_TEXT_1}.\n"
|
||||
.string "Your adventure will be saved.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E6358
|
||||
gUnknown_80E6358: @ 80E6358
|
||||
.string "You sent {COLOR_1 LIGHT_BLUE_2}$d0{END_COLOR_TEXT_1} {COLOR_1 GREEN_2}{ARG_MOVE_ITEM_0}(s){END_COLOR_TEXT_1}.\0"
|
||||
.align 2,0
|
||||
|
||||
@ Trade Items Link Errors
|
||||
.global gTradeItemsCommunicationError
|
||||
gTradeItemsCommunicationError: @ 80E6378
|
||||
.asciz "There was a communication error."
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E639C
|
||||
gUnknown_80E639C: @ 80E639C
|
||||
.string "An incorrect number of GBA systems are\n"
|
||||
.string "connected.\n"
|
||||
.string "Please redo this process from the start.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E63F8
|
||||
gUnknown_80E63F8: @ 80E63F8
|
||||
.string "There is no response from your friend.\n"
|
||||
.string "Please redo this process from the start.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E6448
|
||||
gUnknown_80E6448: @ 80E6448
|
||||
.string "The sender and receiver appear to be\n"
|
||||
.string "in different modes.\n"
|
||||
.string "Please redo the process from the start.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80E64AC
|
||||
gUnknown_80E64AC: @ 80E64AC
|
||||
.string "There is no response from your friend.\n"
|
||||
.string "Please make sure the sender and receiver\n"
|
||||
.string "are ready{COMMA} then redo this from the start.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gTradeItemsHowManyText
|
||||
gTradeItemsHowManyText: @ 80E6528
|
||||
.asciz "How many?"
|
||||
.align 2,0
|
||||
.asciz "pksdir0"
|
||||
|
||||
@ End of Trade Menu Data
|
||||
|
||||
.global gUnknown_80E653C
|
||||
gUnknown_80E653C: @ 80E653C
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
@ -15,8 +15,9 @@ gWarpScarfActivationChances: @ 80F5594
|
||||
|
||||
.global gUnknown_80F55BC
|
||||
gUnknown_80F55BC: @ 80F55BC
|
||||
.incbin "baserom.gba", 0xF55BC, 0x30
|
||||
.2byte 50, 5, 100, 10, 200, 15, 300, 20, 400, 25, 500, 30, 600, 35, 700, 40, 800, 45, 1000, 45, 10000, 9999, -1, 1
|
||||
|
||||
.global gUnknown_80F55EC
|
||||
gUnknown_80F55EC: @ 80F55EC
|
||||
.incbin "baserom.gba", 0xF55EC, 0x30
|
||||
.2byte 0, 9999, 50, 45, 100, 40, 200, 35, 300, 30, 400, 25, 500, 20, 600, 15, 700, 10, 1000, 5, 10000, 1, -1, 1
|
||||
|
||||
|
@ -491,8 +491,8 @@ gUnknown_8109930: @ 8109930
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8109954
|
||||
gUnknown_8109954: @ 8109954
|
||||
.global gWindowBGColors
|
||||
gWindowBGColors: @ 8109954
|
||||
.byte 0x20, 0x48, 0x68, 0x00
|
||||
.byte 0x80, 0x38, 0x20, 0x00
|
||||
.byte 0x28, 0x80, 0x48, 0x00
|
||||
|
3419
data/data_8115EB8.s
3419
data/data_8115EB8.s
File diff suppressed because it is too large
Load Diff
3403
data/data_8115F5C.s
Normal file
3403
data/data_8115F5C.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -86,7 +86,7 @@ gUnknown_8270000: @ 8270000
|
||||
.4byte MemoryCard_Text
|
||||
.4byte Performance_Text
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.4byte PokeDungeon_Text
|
||||
.4byte sGameInternalVersion
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
@ -16,7 +16,7 @@ void sub_8079490(struct DungeonEntity * pokemon,struct DungeonEntity * target, s
|
||||
void sub_8079500(struct DungeonEntity * pokemon,struct DungeonEntity * target, s32 param_3);
|
||||
void LongTossStatusTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target);
|
||||
void PierceStatusTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target);
|
||||
void sub_8079618(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message);
|
||||
void SetChargeStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message);
|
||||
void sub_8079764(struct DungeonEntity * pokemon);
|
||||
void sub_80797A0(struct DungeonEntity * pokemon, struct DungeonEntity * target, u8 newStatus);
|
||||
void SafeguardStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
@ -31,7 +31,6 @@ void EndureStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * t
|
||||
void MirrorMoveStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void Conversion2StatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void VitalThrowStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_8079618(struct DungeonEntity * pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message);
|
||||
void sub_8079F20(struct DungeonEntity * pokemon, struct DungeonEntity * target, u8 param_3, u8 param_4);
|
||||
void sub_807A0CC(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void SendSleepEndMessage(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 param_3, bool8 param_4);
|
||||
@ -46,7 +45,7 @@ void SendTransformEndMessage(struct DungeonEntity * pokemon, struct DungeonEntit
|
||||
void SendEyesightEndMessage(struct DungeonEntity * pokemon,struct DungeonEntity * target);
|
||||
void SendMuzzledEndMessage(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_807A96C(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void sub_807A9B0(struct DungeonEntity * pokemon);
|
||||
void WakeUpPokemon(struct DungeonEntity * pokemon);
|
||||
void SendThawedMessage(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void sub_807AA30(void);
|
||||
|
||||
|
@ -1,23 +1,24 @@
|
||||
#ifndef GUARD_CODE_8094F88_H
|
||||
#define GUARD_CODE_8094F88_H
|
||||
#define GUARD_CODE_8094F88_H
|
||||
|
||||
#include "item.h"
|
||||
|
||||
struct unkStruct_203B480
|
||||
{
|
||||
u8 unk0;
|
||||
struct DungeonLocation unk4;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
u8 unk20;
|
||||
u8 unk21;
|
||||
u8 unk22;
|
||||
/* 0x0 */ u8 mailType;
|
||||
/* 0x1 */ u8 missionType;
|
||||
/* 0x4 */ struct DungeonLocation dungeon;
|
||||
/* 0x8 */ u32 unk8;
|
||||
/* 0xC */ s16 clientSpecies;
|
||||
/* 0xE */ s16 targetSpecies;
|
||||
/* 0x10 */ u32 unk10;
|
||||
/* 0x14 */ u8 playerName[0x20 - 0x14];;
|
||||
struct ItemSlot unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u8 unk2C;
|
||||
s8 unk2C;
|
||||
u8 unk2D;
|
||||
u8 padding4[0x30 - 0x2E];
|
||||
};
|
||||
|
||||
struct unkStruct_203B484
|
||||
@ -32,4 +33,18 @@ struct unkStruct_203B48C
|
||||
s32 unk4[0x20];
|
||||
};
|
||||
|
||||
bool8 sub_80951FC(struct unkStruct_203B480 *param_1);
|
||||
struct unkStruct_203B480 * sub_8095228(u8 index);
|
||||
void sub_8095240(u8 index);
|
||||
void sub_8095274(u32 param_1);
|
||||
bool8 sub_8095298(s32 param_1);
|
||||
void sub_80952C4(void);
|
||||
bool8 sub_80952F0(u8 mailType, u32 param_2);
|
||||
s32 CountMailType(u8 mailType);
|
||||
u32 sub_8095350(void);
|
||||
s32 sub_8095374(void);
|
||||
s32 sub_809539C(u8 mailType, u32 param_2);
|
||||
s32 sub_80953D4(u8 mailType);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "wonder_mail.h"
|
||||
|
||||
struct subStruct_203B490
|
||||
{
|
||||
// size: 0xC
|
||||
u8 dungeon;
|
||||
u8 unk1;
|
||||
struct DungeonLocation dungeon;
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
};
|
||||
@ -11,14 +12,14 @@ struct subStruct_203B490
|
||||
struct unkStruct_203B490
|
||||
{
|
||||
// size: 0x330?
|
||||
struct WonderMail unk0[4];
|
||||
struct WonderMail unk50[8];
|
||||
struct WonderMail unkF0[8];
|
||||
/* 0x0 */ struct WonderMail mailboxSlots[4];
|
||||
/* 0x50 */ struct WonderMail pelipperBoardJobs[8];
|
||||
/* 0xF0 */ struct WonderMail jobSlots[8];
|
||||
u8 unk190[0x28];
|
||||
u8 unk1B8[0x78];
|
||||
struct subStruct_203B490 unk230[16];
|
||||
u8 unk2F0[0x38];
|
||||
u8 unk328;
|
||||
u8 PKMNNewsReceived[56];
|
||||
bool8 unk328;
|
||||
};
|
||||
|
||||
extern struct unkStruct_203B490 *gUnknown_203B490;
|
||||
|
16
include/constants/communication_error_codes.h
Normal file
16
include/constants/communication_error_codes.h
Normal file
@ -0,0 +1,16 @@
|
||||
// NOTE: all communications use the same error codes so we define them here
|
||||
|
||||
#define COMMS_GOOD 0
|
||||
#define COMMS_NO_RESPONSE 2
|
||||
#define COMMS_INCORRECT_NUM_SYSTEMS 3
|
||||
#define COMMS_DIFFERENT_MODES 4
|
||||
#define COMMS_NO_ROOM_STORAGE 6
|
||||
#define COMMS_DUPLICATE_MAIL 7
|
||||
#define COMMS_MAIL_SENT_ALREADY 8
|
||||
#define COMMS_NOT_ELIGIBLE_1 9
|
||||
#define COMMS_FRIEND_NOT_ELIGIBLE 10
|
||||
#define COMMS_NOT_ELIGIBLE_2 11
|
||||
#define COMMS_FRIEND_NOT_ELIGIBLE_2 12
|
||||
#define COMMS_NO_ROOM_MAIL 13
|
||||
#define COMMS_NOT_READY 15
|
||||
|
@ -16,6 +16,38 @@ enum RewardType
|
||||
END_REWARDS
|
||||
};
|
||||
|
||||
enum WonderMailMode {
|
||||
WONDER_MAIL_MODE_SEND = 1,
|
||||
WONDER_MAIL_MODE_RECEIVE = 2,
|
||||
};
|
||||
|
||||
enum WonderMailMethod {
|
||||
WONDER_MAIL_GAME_LINK = 3,
|
||||
WONDER_MAIL_PASSWORD = 5,
|
||||
};
|
||||
|
||||
enum WonderMailTypes {
|
||||
WONDER_MAIL_TYPE_NONE = 0,
|
||||
WONDER_MAIL_TYPE_SOS = 1,
|
||||
//WONDER_MAIL_TYPE_SOS = 2, // SOS MAIL is 1 and 2?
|
||||
WONDER_MAIL_TYPE_AOK = 4,
|
||||
WONDER_MAIL_TYPE_THANK_YOU = 5,
|
||||
WONDER_MAIL_TYPE_WONDER = 5,
|
||||
WONDER_MAIL_TYPE_COMPLETED = 6,
|
||||
WONDER_MAIL_TYPE_OKD = 7,
|
||||
};
|
||||
|
||||
enum WonderMailMissionTypes
|
||||
{
|
||||
WONDER_MAIL_MISSION_TYPE_RESCUE_CLIENT = 0,
|
||||
WONDER_MAIL_MISSION_TYPE_RESCUE_TARGET = 1,
|
||||
WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT = 2,
|
||||
WONDER_MAIL_MISSION_TYPE_FIND_ITEM = 3,
|
||||
WONDER_MAIL_MISSION_TYPE_DELIVER_ITEM = 4,
|
||||
WONDER_MAIL_MISSION_TYPE_UNK6 = 6,
|
||||
};
|
||||
|
||||
|
||||
#define NUM_POKEMON_NEWS 56 // 50 normal + 6 special issues
|
||||
#define PASSWORD_BUFFER_SIZE 54
|
||||
#define MAX_ITEM_REWARDS 3
|
||||
|
@ -31,6 +31,7 @@ const u8 *GetDungeonName1(u8 dungeon);
|
||||
u32 sub_80908D8(struct DungeonLocation *dungeon);
|
||||
u8 sub_8090910(struct DungeonLocation *dungeon, u32 param_2);
|
||||
bool8 sub_809095C(u8 dungeon);
|
||||
s8 GetUnk3(u8 dungeon);
|
||||
u8 GetUnk9(u8 dungeon);
|
||||
|
||||
#endif //GUARD_DUNGEON_H
|
||||
|
@ -199,7 +199,9 @@ struct DungeonEntityData
|
||||
/* 0x148 */ bool8 attacking;
|
||||
/* 0x149 */ u8 unk149;
|
||||
/* 0x14A */ u8 unk14A;
|
||||
u8 fill14B[0x14E - 0x14B];
|
||||
/* 0x14B */ u8 unk14B;
|
||||
/* 0x14C */ u8 unk14C;
|
||||
/* 0x14D */ u8 unk14D;
|
||||
/* 0x14E */ u16 visualFlags;
|
||||
/* 0x150 */ u16 previousVisualFlags;
|
||||
/* 0x152 */ u8 unk152;
|
||||
|
@ -1,21 +1,25 @@
|
||||
#ifndef GUARD_FRIEND_RESCUE_H
|
||||
#define GUARD_FRIEND_RESCUE_H
|
||||
|
||||
#include "code_8094F88.h"
|
||||
#include "item.h"
|
||||
#include "pokemon.h"
|
||||
#include "wonder_mail.h"
|
||||
|
||||
struct WonderMailStruct_203B33C
|
||||
{
|
||||
// size: 0x568
|
||||
u32 state;
|
||||
u32 unk4;
|
||||
u32 fallbackState;
|
||||
u8 passwordBuffer[0x36];
|
||||
u32 unk40;
|
||||
u32 status;
|
||||
u16 unk48[(0xE0 - 0x48) / 2];
|
||||
s16 unkE0;
|
||||
u8 unkE2[0x168 - 0xE2];
|
||||
s16 unk168;
|
||||
u8 unk16A[0x218 - 0x16A];
|
||||
struct unkStruct_203B480 unk48;
|
||||
struct unkStruct_203B480 unk78;
|
||||
struct WonderMailStruct_203B2C0_sub unkA8;
|
||||
struct WonderMailStruct_203B2C0_sub unk130;
|
||||
struct unkStruct_203B480 unk1B8;
|
||||
struct unkStruct_203B480 unk1E8;
|
||||
u8 unk218;
|
||||
u8 padding7[3];
|
||||
u32 unk21C;
|
||||
@ -24,12 +28,11 @@ struct WonderMailStruct_203B33C
|
||||
u8 padding6[0x6C];
|
||||
u32 unk30C;
|
||||
u8 padding8[0x4C];
|
||||
u32 unk35C;
|
||||
u8 padding5[0x5C];
|
||||
struct UnkTextStruct2 unk35C[4];
|
||||
struct UnkTextStruct2 unk3BC[4];
|
||||
struct ItemSlot unk41C;
|
||||
u32 unk420; // Is this supposed to be a File like 203B2C4?
|
||||
u8 fill424[0x524 - 0x424];
|
||||
u8 unk424[0x100];
|
||||
s32 unk524;
|
||||
u32 unk528;
|
||||
u8 unk52C;
|
||||
@ -37,11 +40,8 @@ struct WonderMailStruct_203B33C
|
||||
u8 fill52E;
|
||||
u32 unk530;
|
||||
u32 unk534;
|
||||
s16 unk538; // A7 << 3
|
||||
u32 unk53C;
|
||||
u32 unk540; // A8 << 4
|
||||
s16 unk544;
|
||||
u8 filler546[0x564 - 0x546];
|
||||
s16 speciesNum; // A7 << 3
|
||||
struct unkStruct_802F204 unk53C;
|
||||
s32 unk564;
|
||||
};
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
#ifndef GUARD_GUNKNOWN_203B46C_H
|
||||
#define GUARD_GUNKNOWN_203B46C_H
|
||||
|
||||
struct UnkSaveStruct1
|
||||
{
|
||||
/* 0x0 */ u8 unk0;
|
||||
/* 0x1 */ u8 unk1;
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ u8 unk3;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
/* 0x6 */ u8 unk6;
|
||||
/* 0x7 */ u8 unk7;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ u8 unk9;
|
||||
/* 0xA */ u8 unkA;
|
||||
/* 0xB */ u8 playerGender;
|
||||
/* 0xC */ u8 unkC;
|
||||
};
|
||||
|
||||
#endif
|
69
include/game_options.h
Normal file
69
include/game_options.h
Normal file
@ -0,0 +1,69 @@
|
||||
#ifndef GUARD_GAME_OPTIONS_H
|
||||
#define GUARD_GAME_OPTIONS_H
|
||||
|
||||
struct GameOptions
|
||||
{
|
||||
// TODO: find where Controls/Touch Screen are in this structure in PMD Blue
|
||||
|
||||
/* 0x0 */ u8 dungeonSpeed;
|
||||
/* 0x1 */ u8 FarOffPals;
|
||||
/* 0x2 */ bool8 damageTurn;
|
||||
/* 0x3 */ bool8 gridEnable;
|
||||
/* 0x4 */ u8 mapOption;
|
||||
/* 0x5 */ u8 fill5[3];
|
||||
/* 0x8 */ u8 windowColor;
|
||||
/* 0x9 */ u8 unk9; // maybe Controls?
|
||||
/* 0xA */ u8 unkA; // maybe Touch Screen?
|
||||
/* 0xB */ u8 playerGender;
|
||||
/* 0xC */ u8 unkC;
|
||||
};
|
||||
|
||||
enum DungeonSpeed
|
||||
{
|
||||
DUNGEON_SPEED_SLOW,
|
||||
DUNGEON_SPEED_FAST,
|
||||
};
|
||||
|
||||
enum FarOffPals
|
||||
{
|
||||
FAROFFPALS_SELF,
|
||||
FAROFFPALS_LOCK,
|
||||
};
|
||||
|
||||
|
||||
// GBA has 3 options while DS has 7
|
||||
enum MapOption
|
||||
{
|
||||
MAP_OPTION_OFF = 0,
|
||||
MAP_OPTION_CLEAR,
|
||||
MAP_OPTION_SHADE,
|
||||
NUM_GBA_MAP_OPTIONS,
|
||||
};
|
||||
|
||||
enum DSMapOption
|
||||
{
|
||||
TOP_TEAM_DATA_NO_BOTTOM = 0,
|
||||
TOP_TEAM_DATA_CLEAR_MAP_BOTTOM,
|
||||
TOP_TEAM_DATA_SHADED_MAP_BOTTOM,
|
||||
TOP_MESSAGE_LOG_NO_BOTTOM,
|
||||
TOP_MESSAGE_LOG_CLEAR_MAP_BOTTOM,
|
||||
TOP_MESSAGE_LOG_SHADED_MAP_BOTTOM,
|
||||
TOP_MAP_AND_TEAM_NO_BOTTOM,
|
||||
NUM_DS_MAP_OPTIONS,
|
||||
};
|
||||
|
||||
enum windowColor
|
||||
{
|
||||
WINDOW_COLOR_BLUE = 0,
|
||||
WINDOW_COLOR_RED,
|
||||
WINDOW_COLOR_GREEN,
|
||||
NUM_WINDOW_COLORS,
|
||||
};
|
||||
|
||||
void LoadGameOptions(void);
|
||||
struct GameOptions * GetGameOptions(void);
|
||||
void InitializeGameOptions(bool8 initializeGender);
|
||||
bool8 GameOptionsNotChange(struct GameOptions *r0);
|
||||
|
||||
|
||||
#endif
|
@ -38,7 +38,7 @@ struct HeldItem {
|
||||
|
||||
struct unkStruct_80915F4
|
||||
{
|
||||
u16 unk0;
|
||||
s16 unk0;
|
||||
u16 unk2;
|
||||
};
|
||||
|
||||
@ -101,18 +101,24 @@ u32 GetMoneyValue(struct ItemSlot* slot);
|
||||
u16 GetItemMove(u8 index);
|
||||
bool8 CanSellItem(u32 id);
|
||||
bool8 IsGummiItem(u8);
|
||||
void xxx_init_unk230_substruct(u8);
|
||||
bool8 AddGreenKecleonShopItem(u8);
|
||||
struct HeldItem *xxx_get_inv_unk230_at_809185C(u8);
|
||||
void xxx_fill_unk230_gaps();
|
||||
struct HeldItem* xxx_get_unk250_at_8091A90(u8);
|
||||
s32 xxx_count_inv_unk230();
|
||||
u32 xxx_count_non_empty_inv_unk250_8091A48();
|
||||
void ChoosePurpleKecleonShopInventory(u8);
|
||||
void sub_8090F58(void*, u8 *, struct ItemSlot *, struct unkStruct_8090F58*);
|
||||
void ShiftItemsDownFrom(s32 start);
|
||||
void ClearItemSlotAt(u32 index);
|
||||
void MoveToStorage(struct ItemSlot* slot);
|
||||
s32 CountKecleonShopItems(void);
|
||||
void InitKecleonShopItem(u8 index);
|
||||
struct HeldItem *GetKecleonShopItem(u8 index);
|
||||
void FillKecleonShopGaps(void);
|
||||
void SortKecleonShopInventory(void);
|
||||
void ChooseKecleonShopInventory(u8 index);
|
||||
bool8 AddKecleonShopItem(u8 itemIndex);
|
||||
u32 CountKecleonWareItems(void);
|
||||
void InitKecleonWareItem(u8 index);
|
||||
struct HeldItem* GetKecleonWareItem(u8 index);
|
||||
void FillKecleonWareGaps(void);
|
||||
void SortKecleonWareInventory(void);
|
||||
void ChooseKecleonWareInventory(u8 index);
|
||||
bool8 AddKecleonWareItem(u8 itemIndex);
|
||||
void FillInventoryGaps();
|
||||
bool8 AddHeldItemToInventory(struct HeldItem* slot);
|
||||
bool8 IsNotMoneyOrUsedTMItem(u8 id);
|
||||
|
@ -9,18 +9,16 @@ struct unkStruct_203B210
|
||||
{
|
||||
// size: 0x148
|
||||
u32 unk0;
|
||||
bool8 unk4;
|
||||
bool8 isKecleonItemShop; // FALSE indicates it is Kecleon TM Shop
|
||||
u8 fill5[3];
|
||||
u32 currState;
|
||||
u32 unkC;
|
||||
u32 fallbackState;
|
||||
s32 itemSellPrice;
|
||||
u32 unk14;
|
||||
s32 unk18;
|
||||
u32 numInventoryItemToSell;
|
||||
s32 inventoryItemSellPrice;
|
||||
struct ItemSlot unk1C;
|
||||
u8 unk20;
|
||||
u8 unk21;
|
||||
u8 unk22;
|
||||
u8 unk23;
|
||||
u8 itemShopItemIndex;
|
||||
u8 wareShopItemIndex;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
@ -10,7 +10,7 @@ struct unkStruct_203B304
|
||||
// size: 0xB6 << 1
|
||||
u32 state;
|
||||
u32 fallbackState;
|
||||
u8 unk8;
|
||||
u8 mailboxIndex;
|
||||
u8 mailIndex;
|
||||
u8 fillA[0xC - 0xA];
|
||||
u32 unkC;
|
||||
|
@ -33,6 +33,16 @@ enum MainMenuScreens
|
||||
MENU_NO_SCREEN_CHANGE = 0xffdc
|
||||
};
|
||||
|
||||
struct unkStruct_8035D94
|
||||
{
|
||||
|
||||
union {
|
||||
u8 itemIndex_u8;
|
||||
u32 itemIndex_u32;
|
||||
} itemIndex;
|
||||
u32 numItems;
|
||||
};
|
||||
|
||||
struct MainMenuSub
|
||||
{
|
||||
u8 unk2C;
|
||||
@ -47,8 +57,7 @@ struct MainMenu
|
||||
/* 0x8 */ s32 lastMenu;
|
||||
u8 padding[0x20];
|
||||
/* 0x2C */ struct MainMenuSub sub;
|
||||
u8 unk30;
|
||||
u32 unk34;
|
||||
/* 0x30 */ struct unkStruct_8035D94 unk30;
|
||||
s16 unk38;
|
||||
u8 unk3A;
|
||||
u8 unk3B;
|
||||
@ -63,5 +72,7 @@ void SetUpMenu(void);
|
||||
s32 UpdateMenu(void);
|
||||
void CleanUpMenu(void);
|
||||
bool8 sub_80363E0(void);
|
||||
struct unkStruct_8035D94 *sub_8035D94(void);
|
||||
void sub_8035DA0(void);
|
||||
|
||||
#endif // GUARD_MAIN_MENU_H
|
||||
|
23
include/makuhita_dojo.h
Normal file
23
include/makuhita_dojo.h
Normal file
@ -0,0 +1,23 @@
|
||||
struct unkStruct_203B318
|
||||
{
|
||||
// size: 0xcc
|
||||
u32 unk0;
|
||||
u32 unk4;
|
||||
s32 state;
|
||||
s32 fallbackState;
|
||||
s16 unk10;
|
||||
s32 unk14;
|
||||
struct MenuItem unk18[4];
|
||||
u8 fill[0x58 - 0x38];
|
||||
struct OpenedFile *faceFile;
|
||||
u8 *faceData;
|
||||
u16 unk60;
|
||||
u16 unk62;
|
||||
u8 unk64;
|
||||
u8 unk65;
|
||||
u8 unk66;
|
||||
u8 unk67;
|
||||
struct OpenedFile** unk68;
|
||||
struct UnkTextStruct2 unk6C[4];
|
||||
};
|
||||
|
@ -29,11 +29,14 @@ struct RescuePasswordMenu
|
||||
#define PASSWORD_ENTRY_DUPLICATE_AOK_MAIL 0x9
|
||||
#define PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL 0xB
|
||||
|
||||
#define PASSWORD_ENTRY_NO_SPACE 0xD
|
||||
|
||||
#define PASSWORD_ENTRY_INCORRECT_PASSWORD 0x11
|
||||
|
||||
#define PASSWORD_ENTRY_NOT_SOS_MAIL 0x12
|
||||
#define PASSWORD_ENTRY_NOT_AOK_MAIL 0x13
|
||||
#define PASSWORD_ENTRY_NOT_THANK_YOU_MAIL 0x14
|
||||
#define PASSWORD_ENTRY_NOT_WONDER_MAIL 0x15
|
||||
|
||||
#define PASSWORD_ENTRY_SOS_MAIL_SUCCESS 0x16
|
||||
#define PASSWORD_ENTRY_AOK_MAIL_SUCCESS 0x17
|
||||
|
@ -1,11 +1,13 @@
|
||||
#ifndef GUARD_SAVE_H
|
||||
#define GUARD_SAVE_H
|
||||
|
||||
#include "game_options.h"
|
||||
#include "play_time.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "rescue_team_info.h"
|
||||
#include "pokemon.h"
|
||||
#include "item.h"
|
||||
#include "code_80958E8.h"
|
||||
|
||||
enum
|
||||
{
|
||||
@ -26,20 +28,20 @@ struct UnkStruct_sub_8011DAC {
|
||||
// size: 0x57D4
|
||||
u8 fill000[0x4];
|
||||
u8 unk004[0x400];
|
||||
u8 unk404[0x10]; // has "POKE_DUNGEON__05"
|
||||
u32 unk414;
|
||||
u8 gameInternalName[0x10]; // has "POKE_DUNGEON__05"
|
||||
u32 checksum;
|
||||
u32 unk418;
|
||||
u32 unk41C;
|
||||
u32 RngState;
|
||||
u32 savedRecruitedPokemon;
|
||||
u32 unk428;
|
||||
u8 fill42C[0x4];
|
||||
u32 unk430;
|
||||
u32 savedTeamInventory;
|
||||
u32 savedRescueTeamInfo;
|
||||
u32 savedFriendAreas;
|
||||
u32 unk43C;
|
||||
u32 unk440;
|
||||
u32 unk444;
|
||||
u32 savedMailInfo;
|
||||
u8 unk448[0x538C];
|
||||
};
|
||||
|
||||
@ -51,12 +53,12 @@ struct UnkStruct_203B184 {
|
||||
/* 0xC */ u8 *unkC;
|
||||
/* 0x10 */ u32 *unk10;
|
||||
/* 0x14 */ u32 *unk14;
|
||||
/* 0x18 */ u32 unk18;
|
||||
/* 0x18 */ struct unkStruct_203B490 *mailInfo;
|
||||
/* 0x1C */ struct RescueTeamData *RescueTeamInfo;
|
||||
/* 0x20 */ u32 unk20;
|
||||
/* 0x24 */ struct ExclusivePokemonData *ExclusivePokemon;
|
||||
/* 0x28 */ bool8 *BoughtFriendAreas;
|
||||
/* 0x2C */ u32 gameOptions;
|
||||
/* 0x2C */ struct GameOptions *gameOptions;
|
||||
/* 0x30 */ struct PlayTimeStruct *playTime;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
@ -74,7 +76,7 @@ u32 sub_8011C1C(void);
|
||||
void sub_8011C28(u32 in);
|
||||
s32 sub_8011C34(void);
|
||||
void sub_8011C40(s32 in);
|
||||
char *sub_8011C4C(void);
|
||||
char *GetGameInternalName(void);
|
||||
void sub_8011CA8(u32 *out, s32 size);
|
||||
u32 ReadSaveFromPak(u32 *a);
|
||||
u32 WriteSavetoPak(s32 *param_1, u32 param_2);
|
||||
|
@ -1,25 +0,0 @@
|
||||
#ifndef GUARD_SUB_8095228_H
|
||||
#define GUARD_SUB_8095228_H
|
||||
|
||||
struct unkStruct_8095228
|
||||
{
|
||||
/* 0x0 */ u8 mailType; // mail type
|
||||
/* 0x1 */ u8 missionType; // mission type
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ u8 unk3;
|
||||
/* 0x4 */ struct DungeonLocation dungeon; // dungeon
|
||||
/* 0x8 */ u32 unk8;
|
||||
/* 0xC */ s16 clientSpecies; // client pokemon
|
||||
/* 0xE */ s16 targetSpecies; // target
|
||||
u32 unk10; // TODO: verify that this is just a union of the 4 bytes in Wonder Mail
|
||||
u8 padding2[0x20 - 0x14];
|
||||
struct ItemSlot unk20;
|
||||
u8 padding3[0x28 - 0x24];
|
||||
u32 unk28;
|
||||
s8 unk2C;
|
||||
u8 padding4[0x30 - 0x2D];
|
||||
};
|
||||
|
||||
extern struct unkStruct_8095228 *sub_8095228(u8);
|
||||
|
||||
#endif // GUARD_SUB_8095228_H
|
@ -1,13 +1,15 @@
|
||||
#ifndef GUARD_TEAM_INVENTORY_H
|
||||
#define GUARD_TEAM_INVENTORY_H
|
||||
|
||||
#define MAX_KECLEON_ITEM_SHOP_ITEMS 8
|
||||
#define MAX_KECLEON_WARE_SHOP_ITEMS 4
|
||||
|
||||
struct TeamInventory
|
||||
{
|
||||
struct ItemSlot teamItems[INVENTORY_SIZE];
|
||||
u16 teamStorage[NUMBER_OF_ITEM_IDS];
|
||||
// same type (initialized by same function):
|
||||
struct HeldItem unk230[8];
|
||||
struct HeldItem unk250[4];
|
||||
struct HeldItem kecleonShopItems[MAX_KECLEON_ITEM_SHOP_ITEMS];
|
||||
struct HeldItem kecleonWareItems[MAX_KECLEON_WARE_SHOP_ITEMS];
|
||||
/* 0x260 */ s32 teamMoney;
|
||||
/* 0x264 */ u32 teamSavings;
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ struct TradeItemsMenu
|
||||
{
|
||||
// size: 0x3A0
|
||||
u32 currMenu;
|
||||
u32 unk4;
|
||||
u32 fallbackState;
|
||||
u32 itemMode;
|
||||
u32 linkStatus;
|
||||
u32 unk10;
|
||||
@ -51,7 +51,6 @@ struct TradeItemsMenu
|
||||
u8 fill25F[0x3A0 - 0x260];
|
||||
};
|
||||
|
||||
|
||||
s32 UpdateTradeItemsMenu(void);
|
||||
s32 CreateTradeItemsMenu(void);
|
||||
void CleanTradeItemsMenu(void);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "text.h"
|
||||
#include "item.h"
|
||||
#include "pokemon.h"
|
||||
#include "sub_8095228.h"
|
||||
#include "code_8094F88.h"
|
||||
|
||||
#include "constants/wonder_mail.h"
|
||||
|
||||
@ -40,6 +40,12 @@ struct WonderMail
|
||||
};
|
||||
|
||||
|
||||
struct WonderMailStruct_203B2C0_sub
|
||||
{
|
||||
struct unkStruct_203B480 mail;
|
||||
struct PokemonStruct pokemon;
|
||||
};
|
||||
|
||||
struct WonderMailStruct_203B2C0
|
||||
{
|
||||
// size: 0x548
|
||||
@ -49,15 +55,12 @@ struct WonderMailStruct_203B2C0
|
||||
u8 unk3E;
|
||||
u32 unk40;
|
||||
u32 linkError;
|
||||
u8 unk48[0x30];
|
||||
u8 unk78[0x30];
|
||||
struct unkStruct_8095228 unkA8;
|
||||
struct PokemonStruct unkD8;
|
||||
u8 unk130;
|
||||
u8 fill131[0x168 - 0x131];
|
||||
u16 unk168;
|
||||
u8 fill16A[0x218 - 0x16A];
|
||||
u8 unk218;
|
||||
struct unkStruct_203B480 unk48;
|
||||
struct unkStruct_203B480 unk78;
|
||||
struct WonderMailStruct_203B2C0_sub unkA8;
|
||||
struct WonderMailStruct_203B2C0_sub unk130;
|
||||
u8 fill16A[0x218 - 0x1B8];
|
||||
u8 mailIndex;
|
||||
u32 unk21C;
|
||||
u8 padding[0x7C];
|
||||
u32 unk29C;
|
||||
@ -79,7 +82,7 @@ struct WonderMailStruct_203B2C0
|
||||
s32 unk538; // A7 << 3
|
||||
u32 unk53C;
|
||||
u32 unk540; // A8 << 4
|
||||
s16 unk544;
|
||||
s16 speciesNum;
|
||||
|
||||
};
|
||||
|
||||
@ -93,9 +96,9 @@ struct WonderMailStruct_203B2C4
|
||||
u32 unk40;
|
||||
/* 0x44 */ u32 linkError; // another link status
|
||||
u8 filler48[0x1B8 - 0x48];
|
||||
struct unkStruct_8095228 unk1B8;
|
||||
struct unkStruct_8095228 unk1E8;
|
||||
s8 unk218;
|
||||
struct unkStruct_203B480 unk1B8;
|
||||
struct unkStruct_203B480 unk1E8;
|
||||
s8 mailIndex;
|
||||
u32 unk21C;
|
||||
u8 filler220[0x30C - 0x220];
|
||||
u32 unk30C;
|
||||
@ -119,47 +122,4 @@ struct WonderMailStruct_203B2C4
|
||||
|
||||
void sub_8028B04(u32 r0);
|
||||
|
||||
enum WonderMailMode {
|
||||
WONDER_MAIL_MODE_SEND = 1,
|
||||
WONDER_MAIL_MODE_RECEIVE = 2,
|
||||
};
|
||||
|
||||
enum WonderMailMethod {
|
||||
WONDER_MAIL_GAME_LINK = 3,
|
||||
WONDER_MAIL_PASSWORD = 5,
|
||||
};
|
||||
|
||||
enum WonderMailTypes {
|
||||
WONDER_MAIL_TYPE_SOS = 1,
|
||||
WONDER_MAIL_TYPE_AOK = 4,
|
||||
WONDER_MAIL_TYPE_THANK_YOU = 5,
|
||||
WONDER_MAIL_TYPE_WONDER = 5,
|
||||
// TODO: document 7
|
||||
};
|
||||
|
||||
enum WonderMailMissionTypes
|
||||
{
|
||||
WONDER_MAIL_MISSION_TYPE_RESCUE_CLIENT = 0,
|
||||
WONDER_MAIL_MISSION_TYPE_RESCUE_TARGET = 1,
|
||||
WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT = 2,
|
||||
WONDER_MAIL_MISSION_TYPE_FIND_ITEM = 3,
|
||||
WONDER_MAIL_MISSION_TYPE_DELIVER_ITEM = 4,
|
||||
};
|
||||
|
||||
enum WonderMailErrorMode {
|
||||
WONDER_MAIL_GOOD = 0,
|
||||
// TODO: document 1
|
||||
WONDER_MAIL_NO_RESPONSE = 2,
|
||||
WONDER_MAIL_INCORRECT_NUM_SYSTEMS = 3,
|
||||
WONDER_MAIL_DIFFERENT_MODES = 4,
|
||||
// TODO: document 5
|
||||
WONDER_MAIL_NO_ROOM_STORAGE = 6,
|
||||
WONDER_MAIL_DUPLICATE_MAIL = 7,
|
||||
WONDER_MAIL_NOT_ELIGIBLE_1 = 9,
|
||||
WONDER_MAIL_NOT_ELIGIBLE_2 = 11,
|
||||
WONDER_MAIL_NO_ROOM_MAIL = 13,
|
||||
// TODO: document 14
|
||||
WONDER_MAIL_NOT_READY = 15,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -16,7 +16,7 @@ struct unkStruct_802C39C
|
||||
{
|
||||
/* 0x0 */ u32 unk0[2];
|
||||
/* 0x8 */ struct DungeonLocation *unk8;
|
||||
/* 0xC */ u8 *unkC;
|
||||
/* 0xC */ u8 *playerName;
|
||||
/* 0x10 */ s16 unk10;
|
||||
/* 0x12 */ s16 unk12;
|
||||
/* 0x14 */ u8 unk14;
|
||||
@ -32,7 +32,7 @@ struct unkStruct_802C39C
|
||||
struct unkStruct_803B344
|
||||
{
|
||||
// size: 0xB4
|
||||
struct WonderMail unk0;
|
||||
struct WonderMail mail;
|
||||
u8* unk14;
|
||||
u8* unk18;
|
||||
u8 fill1C[0x3C - 0x1C];
|
||||
@ -51,12 +51,12 @@ struct unkStruct_203B2F8
|
||||
// size: 0x208
|
||||
s32 state; // state
|
||||
s32 fallbackState;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
u8 unkA;
|
||||
u8 wonderMailAccepted;
|
||||
bool8 unk9;
|
||||
u8 dungeonIndex;
|
||||
u8 unkB;
|
||||
struct unkSubStruct_203B2F8 *unkC;
|
||||
u8 unk10;
|
||||
u8 jobSlotIndex;
|
||||
u8 fill11[0x14 - 0x11];
|
||||
u32 unk14;
|
||||
u8 fill18[0x58 - 0x18];
|
||||
|
@ -82,6 +82,8 @@ SECTIONS {
|
||||
src/flash.o(.text);
|
||||
src/code_800D090.o(.text);
|
||||
asm/code_800D090.o(.text);
|
||||
src/code_800DAC0.o(.text);
|
||||
asm/code_800DAC0.o(.text);
|
||||
src/code_80118A4.o(.text);
|
||||
src/debug.o(.text);
|
||||
src/save.o(.text);
|
||||
@ -116,6 +118,8 @@ SECTIONS {
|
||||
asm/gulpin_shop.o(.text);
|
||||
src/gulpin_shop_1.o(.text);
|
||||
asm/code_801EE10.o(.text);
|
||||
src/code_8023144.o(.text);
|
||||
asm/code_801EE10_1.o(.text);
|
||||
src/code_801EE10.o(.text);
|
||||
src/luminous_cave.o(.text);
|
||||
src/friend_list_menu_1.o(.text);
|
||||
@ -146,7 +150,6 @@ SECTIONS {
|
||||
asm/makuhita_dojo.o(.text);
|
||||
src/makuhita_dojo_1.o(.text);
|
||||
src/wonder_mail_4.o(.text);
|
||||
asm/wonder_mail_4.o(.text);
|
||||
src/wonder_mail_5.o(.text);
|
||||
asm/wonder_mail_5.o(.text);
|
||||
src/wonder_mail_6.o(.text);
|
||||
@ -229,13 +232,12 @@ SECTIONS {
|
||||
src/code_806CD90.o(.text);
|
||||
asm/code_806CD90.o(.text);
|
||||
src/type_effectiveness.o(.text);
|
||||
src/code_806E8B0.o(.text);
|
||||
asm/code_806E8B0.o(.text);
|
||||
src/status_checks.o(.text);
|
||||
asm/code_80701A4.o(.text);
|
||||
src/dungeon_movement.o(.text);
|
||||
asm/code_807034C.o(.text);
|
||||
src/dungeon_movement_1.o(.text);
|
||||
asm/code_807049C.o(.text);
|
||||
src/status_checks_1.o(.text);
|
||||
src/dungeon_capabilities.o(.text);
|
||||
asm/code_8070BC0.o(.text);
|
||||
@ -318,6 +320,10 @@ SECTIONS {
|
||||
src/code_8095824.o(.text);
|
||||
src/code_80958E8.o(.text);
|
||||
asm/code_80958E8.o(.text);
|
||||
src/mailbox_8095F8C.o(.text);
|
||||
asm/code_80958E8_1.o(.text);
|
||||
src/code_80958E8_1.o(.text);
|
||||
asm/code_8096AF8.o(.text);
|
||||
src/code_80972F4.o(.text);
|
||||
asm/code_8097318.o(.text);
|
||||
src/code_809747C.o(.text);
|
||||
@ -424,6 +430,8 @@ SECTIONS {
|
||||
src/debug.o(.rodata);
|
||||
src/save.o(.rodata);
|
||||
data/data_80D47B8.o(.rodata);
|
||||
src/friend_area_action_menu.o(.rodata);
|
||||
src/friend_area_action_menu_1.o(.rodata);
|
||||
src/wonder_mail.o(.rodata);
|
||||
src/thank_you_wonder_mail.o(.rodata);
|
||||
src/wonder_mail_2.o(.rodata);
|
||||
@ -441,6 +449,7 @@ SECTIONS {
|
||||
src/adventure_log.o(.rodata);
|
||||
data/data_80E2068.o(.rodata);
|
||||
src/main_menu.o(.rodata);
|
||||
src/trade_items_menu.o(.rodata);
|
||||
data/data_80E59A8.o(.rodata);
|
||||
src/load_screen.o(.rodata);
|
||||
src/wonder_mail_main_menu.o(.rodata);
|
||||
@ -480,6 +489,8 @@ SECTIONS {
|
||||
data/data_810AE24.o(.rodata);
|
||||
src/position_util.o(.rodata);
|
||||
data/data_8115EB8.o(.rodata);
|
||||
src/ground_main.o(.rodata);
|
||||
data/data_8115F5C.o(.rodata);
|
||||
data/friend_area_dialogue.o(.rodata);
|
||||
data/cutscenes.o(.rodata);
|
||||
data/cutscenes_1.o(.rodata);
|
||||
|
@ -40,7 +40,7 @@ const struct UnkTextStruct2 gUnknown_80E2008 = {
|
||||
|
||||
// Adventure Log Text
|
||||
const u8 gAdventureLogHeaderText[] = "Adventure Log";
|
||||
const u8 gUnknown_80E2030[] = "~95~95~95~95~95~95~95~95~95~95~95~95~95~95~95 "; // string of ???????
|
||||
const u8 gAdventureLogTextPlaceholder[] = "~95~95~95~95~95~95~95~95~95~95~95~95~95~95~95 "; // string of ???????
|
||||
const u8 fill_adven[] = "pksdir0";
|
||||
|
||||
void sub_8032084();
|
||||
@ -267,7 +267,7 @@ void DisplayAdventureLog(void)
|
||||
else
|
||||
{
|
||||
// Draw the ?????????? across the row
|
||||
xxx_call_draw_string(8, sub_8013800(gAdventureLog, counter), gUnknown_80E2030, gAdventureLog->unk34, 0);
|
||||
xxx_call_draw_string(8, sub_8013800(gAdventureLog, counter), gAdventureLogTextPlaceholder, gAdventureLog->unk34, 0);
|
||||
}
|
||||
}
|
||||
sub_80073E0(gAdventureLog->unk34);
|
||||
|
19
src/code_2.c
19
src/code_2.c
@ -11,7 +11,7 @@
|
||||
#include "music.h"
|
||||
#include "play_time.h"
|
||||
#include "save.h"
|
||||
#include "gUnknown_203B46C.h"
|
||||
#include "game_options.h"
|
||||
#include "text.h"
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "pokemon.h"
|
||||
@ -22,12 +22,11 @@ extern void NDS_LoadOverlay_GroundMain(void);
|
||||
extern void sub_8014144(void);
|
||||
extern void sub_8097670(void);
|
||||
extern void LoadGameOptions(void);
|
||||
extern void sub_8094C14(void);
|
||||
extern void SetWindowBGColor(void);
|
||||
extern void LoadItemParameters(void);
|
||||
extern void sub_80950BC(void);
|
||||
extern void sub_80958E8(void);
|
||||
extern void LoadMailInfo(void);
|
||||
extern void sub_800CD64(u32, u32);
|
||||
extern void InitializeGameOptions(u32);
|
||||
extern void SetWindowTitle(char *);
|
||||
extern void sub_800DAAC(void);
|
||||
extern void SetSavingIconCoords(u32);
|
||||
@ -42,7 +41,7 @@ extern void sub_800CDA8(u32);
|
||||
extern void LoadTitleScreen(void);
|
||||
extern void SetBGPaletteBufferColorRGB(s32, u8 *, s32, u8 *);
|
||||
extern void sub_80095CC(u32, u32);
|
||||
extern s32 sub_80953D4(u32);
|
||||
extern s32 sub_80953D4(u8);
|
||||
extern void sub_8095240(u8);
|
||||
extern void nullsub_33(void);
|
||||
extern u32 sub_80009D0(u32);
|
||||
@ -65,7 +64,7 @@ extern u32 gUnknown_203B03C;
|
||||
extern u16 gUnknown_2026E4E;
|
||||
extern s32 gUnknown_2000A80;
|
||||
extern struct OpenedFile *gTitlePaletteFile;
|
||||
extern struct UnkSaveStruct1 *gUnknown_203B46C;
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
|
||||
extern char gPMDBuildVersion[];
|
||||
|
||||
@ -87,17 +86,17 @@ void GameLoop(void)
|
||||
sub_8097670();
|
||||
InitializePlayTime();
|
||||
LoadGameOptions();
|
||||
sub_8094C14();
|
||||
SetWindowBGColor();
|
||||
LoadExclusivePokemon();
|
||||
LoadFriendAreas();
|
||||
LoadItemParameters();
|
||||
LoadRescueTeamInfo();
|
||||
LoadWazaParameters();
|
||||
sub_80950BC();
|
||||
sub_80958E8();
|
||||
LoadMailInfo();
|
||||
sub_800CD64(0x8000, 0);
|
||||
sub_8012284();
|
||||
InitializeGameOptions(1);
|
||||
InitializeGameOptions(TRUE);
|
||||
SetWindowTitle(gPMDBuildVersion);
|
||||
sub_800DAAC();
|
||||
SetSavingIconCoords(0);
|
||||
@ -201,7 +200,7 @@ void xxx_update_stuff(u32 r0)
|
||||
{
|
||||
xxx_draw_string_80144C4();
|
||||
sub_8005838(0, 0);
|
||||
nullsub_8(gUnknown_203B46C->unkA);
|
||||
nullsub_8(gGameOptionsRef->unkA);
|
||||
sub_8005180();
|
||||
sub_80060EC();
|
||||
sub_8011860();
|
||||
|
218
src/code_800DAC0.c
Normal file
218
src/code_800DAC0.c
Normal file
@ -0,0 +1,218 @@
|
||||
#include "global.h"
|
||||
#include "file_system.h"
|
||||
#include "memory.h"
|
||||
|
||||
struct unkStruct_203B0CC_sub
|
||||
{
|
||||
// size: 0xD0
|
||||
u32 unk0;
|
||||
s32 unk4;
|
||||
u8 fill8[0x34 - 8];
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u8 fill3C[0x4C - 0x3C];
|
||||
u32 unk4C;
|
||||
s32 unk50;
|
||||
u8 unk54;
|
||||
u8 fill55[0xB8 - 0x55];
|
||||
u32 unkB8;
|
||||
u8 fillBC[0xD0 - 0xBC];
|
||||
};
|
||||
|
||||
struct unkStruct_203B0CC
|
||||
{
|
||||
// size: 0x1A18
|
||||
struct unkStruct_203B0CC_sub unk0[0x20];
|
||||
u32 unk1A00;
|
||||
/* 0x1A04 */ u32 fileSelection;
|
||||
u32 unk1A08;
|
||||
u32 unk1A0C;
|
||||
u32 unk1A10;
|
||||
u8 fill1A14[0x1A18 - 0x1A14];
|
||||
};
|
||||
|
||||
struct unkStruct_203B0CC *gUnknown_203B0CC;
|
||||
|
||||
struct unkStruct_800F18C
|
||||
{
|
||||
u32 unk0;
|
||||
u32 unk4;
|
||||
};
|
||||
|
||||
extern s32 sub_800E2C0(void);
|
||||
extern s32 sub_8000728(void);
|
||||
extern u32 sub_800E900(void);
|
||||
extern void sub_8009BE4(void);
|
||||
extern void sub_8040238(void);
|
||||
extern void sub_800F204(void);
|
||||
extern void sub_803EAF0(u32, u32);
|
||||
extern void sub_800CD64(u32, u32);
|
||||
extern struct unkStruct_800F18C *sub_800F18C(s32);
|
||||
extern void sub_800DCA8(struct unkStruct_203B0CC_sub *);
|
||||
extern void PlaySound(u16);
|
||||
|
||||
extern u8 gefob000_string[];
|
||||
extern u8 gefob001_string[];
|
||||
extern struct FileArchive gEffectFileArchive;
|
||||
|
||||
extern void sub_8005610(struct OpenedFile *, u32, u32,u32);
|
||||
extern void sub_800DB7C(void);
|
||||
extern void sub_800F034(void);
|
||||
extern void sub_800ED38(u32);
|
||||
extern void sub_800DC14(void);
|
||||
extern void sub_800F078();
|
||||
extern void sub_800ED64();
|
||||
extern void sub_800ED80();
|
||||
extern void sub_800F094();
|
||||
|
||||
void sub_800DAC0(u32 fileSelection)
|
||||
{
|
||||
s32 index;
|
||||
struct OpenedFile *filePtr;
|
||||
struct unkStruct_203B0CC_sub *preload;
|
||||
|
||||
if (gUnknown_203B0CC != NULL) {
|
||||
sub_800DB7C();
|
||||
}
|
||||
gUnknown_203B0CC = MemoryAlloc(sizeof(struct unkStruct_203B0CC), 0xb);
|
||||
MemoryClear8((u8 *)gUnknown_203B0CC, sizeof(struct unkStruct_203B0CC));
|
||||
gUnknown_203B0CC->fileSelection = fileSelection;
|
||||
for(index = 0, preload = &gUnknown_203B0CC->unk0[index]; index < 0x20; index++, preload++)
|
||||
{
|
||||
preload->unk4 = -1;
|
||||
}
|
||||
sub_800ED38(fileSelection);
|
||||
sub_800F034();
|
||||
|
||||
switch(gUnknown_203B0CC->fileSelection)
|
||||
{
|
||||
case 1:
|
||||
filePtr = Call_OpenFileAndGetFileDataPtr(gefob001_string, &gEffectFileArchive);
|
||||
if (filePtr != NULL) {
|
||||
sub_8005610(filePtr,0x248,0x1f,0);
|
||||
CloseFile(filePtr);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
filePtr = Call_OpenFileAndGetFileDataPtr(gefob000_string, &gEffectFileArchive);
|
||||
if (filePtr != NULL) {
|
||||
sub_8005610(filePtr,0x248,0x1f,0);
|
||||
CloseFile(filePtr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800DB7C(void)
|
||||
{
|
||||
s32 index;
|
||||
struct unkStruct_203B0CC_sub *preload;
|
||||
|
||||
for(index = 0, preload = &gUnknown_203B0CC->unk0[index]; index < 0x20; index++, preload++)
|
||||
{
|
||||
if(preload->unk4 != -1)
|
||||
sub_800DC14();
|
||||
}
|
||||
|
||||
|
||||
sub_800F078();
|
||||
sub_800ED64();
|
||||
if(gUnknown_203B0CC != NULL)
|
||||
{
|
||||
MemoryFree(gUnknown_203B0CC);
|
||||
gUnknown_203B0CC = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800DBBC(void)
|
||||
{
|
||||
s32 index1;
|
||||
s32 index2;
|
||||
struct unkStruct_203B0CC_sub *preload;
|
||||
struct unkStruct_203B0CC_sub *preload2;
|
||||
|
||||
for(index1 = 0, preload = &gUnknown_203B0CC->unk0[index1]; index1 < 0x20; index1++, preload++)
|
||||
{
|
||||
if(preload->unk4 != -1)
|
||||
sub_800DC14();
|
||||
}
|
||||
|
||||
|
||||
for(index2 = 0, preload2 = &gUnknown_203B0CC->unk0[index2]; index2 < 0x20; index2++, preload2++)
|
||||
{
|
||||
preload2->unk4 = -1;
|
||||
}
|
||||
sub_800ED80();
|
||||
sub_800F094();
|
||||
}
|
||||
|
||||
bool8 sub_800DCC0(void)
|
||||
{
|
||||
return gUnknown_203B0CC != NULL;
|
||||
}
|
||||
|
||||
void sub_800DC14(void)
|
||||
{
|
||||
s32 index1;
|
||||
s32 index2;
|
||||
struct unkStruct_800F18C *piVar3;
|
||||
struct unkStruct_800F18C *puVar4;
|
||||
struct unkStruct_203B0CC_sub *preload;
|
||||
|
||||
index1 = sub_800E2C0();
|
||||
if (index1 != -1) {
|
||||
preload = &gUnknown_203B0CC->unk0[index1];
|
||||
if (preload->unk34 == 4) {
|
||||
sub_8009BE4();
|
||||
if (sub_8000728() == 1) {
|
||||
sub_8040238();
|
||||
sub_803EAF0(0,0);
|
||||
sub_800CD64(0x8000,0);
|
||||
}
|
||||
}
|
||||
if (preload->unk34 == 3) {
|
||||
for (index2 = 0; index2 < 2; index2 = index2 + 1) {
|
||||
piVar3 = sub_800F18C(index2);
|
||||
if (piVar3->unk0 == preload->unk38) {
|
||||
piVar3->unk4--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
puVar4 = sub_800F18C(1);
|
||||
puVar4->unk4 = 0;
|
||||
puVar4->unk0 = 0xffffffff;
|
||||
}
|
||||
sub_800DCA8(preload);
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_800DC9C(void) {
|
||||
return sub_800E900();
|
||||
}
|
||||
|
||||
void sub_800DCA8(struct unkStruct_203B0CC_sub *param_1)
|
||||
{
|
||||
param_1->unk4 = -1;
|
||||
param_1->unk54 = 0;
|
||||
if(param_1->unkB8 != 0)
|
||||
{
|
||||
sub_800F204();
|
||||
param_1->unkB8 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800DCD0(struct unkStruct_203B0CC_sub *param_1)
|
||||
{
|
||||
if ((param_1->unk4C != -1) && (param_1->unk50 == 0)) {
|
||||
if (sub_8000728() != 2) {
|
||||
PlaySound(param_1->unk4C);
|
||||
}
|
||||
param_1->unk4C = -1;
|
||||
param_1->unk50 = -1;
|
||||
}
|
||||
if (param_1->unk50 > 0) {
|
||||
param_1->unk50--;
|
||||
}
|
||||
}
|
@ -7,21 +7,14 @@
|
||||
#include "bg.h"
|
||||
#include "input.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "game_options.h"
|
||||
|
||||
void xxx_call_stop_bgm(void);
|
||||
|
||||
extern bool8 sub_80023E4(u8);
|
||||
extern void xxx_call_stop_fanfare_se(u16 r0);
|
||||
|
||||
struct UnkSaveStruct1
|
||||
{
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ u32 unk4;
|
||||
/* 0x8 */ u16 unk8;
|
||||
/* 0xA */ u8 unkA;
|
||||
};
|
||||
extern struct UnkSaveStruct1 *gUnknown_203B46C;
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
|
||||
struct UnkBgStruct
|
||||
{
|
||||
@ -69,7 +62,7 @@ void sub_801169C(void)
|
||||
return_var = sub_80111C4();
|
||||
sub_8004AF0(return_var, &(gUnknown_203B0E4->unk4c4c), 0xB0, 0x10, (gUnknown_203B0E4->unk4dcc), 0);
|
||||
sub_8005838(0, 0);
|
||||
nullsub_8(gUnknown_203B46C->unkA);
|
||||
nullsub_8(gGameOptionsRef->unkA);
|
||||
sub_8005180();
|
||||
sub_80060EC();
|
||||
IncrementPlayTime(gPlayTimeRef);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "code_800558C.h"
|
||||
#include "input.h"
|
||||
#include "gUnknown_203B46C.h"
|
||||
#include "game_options.h"
|
||||
|
||||
extern void sub_8011860();
|
||||
extern void xxx_draw_string_80144C4();
|
||||
@ -16,14 +16,14 @@ extern void sub_8009908();
|
||||
extern void xxx_call_update_bg_sound_input();
|
||||
extern void ResetSprites(u8 r0);
|
||||
|
||||
extern struct UnkSaveStruct1 *gUnknown_203B46C;
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
|
||||
|
||||
void sub_8012A18()
|
||||
{
|
||||
sub_8011860();
|
||||
xxx_draw_string_80144C4();
|
||||
nullsub_8(gUnknown_203B46C->unkA);
|
||||
nullsub_8(gGameOptionsRef->unkA);
|
||||
sub_8005180();
|
||||
sub_80060EC();
|
||||
sub_800CB20();
|
||||
|
@ -19,7 +19,7 @@ struct unkStruct_203B230
|
||||
{
|
||||
// size: 0x94
|
||||
s32 state;
|
||||
struct ItemSlot unk4;
|
||||
struct ItemSlot item;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
struct subStruct_203B240 *unk10[2];
|
||||
@ -121,11 +121,11 @@ void sub_801B590();
|
||||
void sub_801B480();
|
||||
|
||||
|
||||
u32 sub_801B3C0(struct ItemSlot *param_1)
|
||||
u32 sub_801B3C0(struct ItemSlot *item)
|
||||
{
|
||||
ResetSprites(1);
|
||||
gUnknown_203B230 = MemoryAlloc(sizeof(struct unkStruct_203B230),8);
|
||||
gUnknown_203B230->unk4 = *param_1;
|
||||
gUnknown_203B230->item = *item;
|
||||
sub_801317C(&gUnknown_203B230->unk88);
|
||||
gUnknown_203B230->unk24 = 0;
|
||||
sub_80140B4(gUnknown_203B230->unk28);
|
||||
@ -176,7 +176,7 @@ void sub_801B480(void)
|
||||
{
|
||||
case 0:
|
||||
sub_8008C54(gUnknown_203B230->unk24);
|
||||
gUnknown_203B230->unkC = sub_80913E0(&gUnknown_203B230->unk4, gUnknown_203B230->unk24, gUnknown_203B230->unk10);
|
||||
gUnknown_203B230->unkC = sub_80913E0(&gUnknown_203B230->item, gUnknown_203B230->unk24, gUnknown_203B230->unk10);
|
||||
gUnknown_203B230->unk20 = 0;
|
||||
break;
|
||||
case 1:
|
||||
@ -253,7 +253,7 @@ void sub_801B590(void)
|
||||
|
||||
u32 sub_801B60C(u32 r0, u8 itemIndex, u8 numItems)
|
||||
{
|
||||
gUnknown_203B234 = MemoryAlloc(0x154, 8);
|
||||
gUnknown_203B234 = MemoryAlloc(sizeof(struct unkStruct_203B234), 8);
|
||||
gUnknown_203B234->unkC8 = 0;
|
||||
gUnknown_203B234->unk0 = r0;
|
||||
gUnknown_203B234->unk10.itemIndex = itemIndex;
|
||||
|
@ -417,16 +417,13 @@ s16 sub_801DAC0(void)
|
||||
return (gUnknown_203B258->unk1E * gUnknown_203B258->unk1C) + gUnknown_203B258->unk18;
|
||||
}
|
||||
|
||||
void sub_801DADC(u32 r0)
|
||||
void sub_801DADC(u8 r0)
|
||||
{
|
||||
u8 r0_u8;
|
||||
r0_u8 = r0;
|
||||
|
||||
gUnknown_203B258->unk22 = 0xE5;
|
||||
sub_8013984(gUnknown_203B258);
|
||||
sub_801DB54();
|
||||
sub_801DBD4();
|
||||
if(r0_u8)
|
||||
if(r0)
|
||||
AddMenuCursorSprite(gUnknown_203B258);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "memory.h"
|
||||
#include "menu.h"
|
||||
#include "gUnknown_203B46C.h"
|
||||
#include "game_options.h"
|
||||
#include "text.h"
|
||||
|
||||
struct unkStruct_203B25C
|
||||
@ -9,7 +9,7 @@ struct unkStruct_203B25C
|
||||
// size: 0x11C
|
||||
u32 state;
|
||||
u32 chosenHintIndex;
|
||||
struct UnkSaveStruct1 unk8;
|
||||
struct GameOptions newOptions;
|
||||
u32 unk18;
|
||||
const char *unk1C;
|
||||
u8 fill20[0x6C - 0x20];
|
||||
@ -29,7 +29,7 @@ extern void HandleChangeSettingsMenu();
|
||||
extern void sub_801DD84();
|
||||
extern void sub_801DED0();
|
||||
extern void sub_8012D60(const char **, struct MenuItem *, u32, u16 *, u32, u32);
|
||||
extern u32 sub_801E198(struct UnkSaveStruct1 *);
|
||||
extern u32 sub_801E198(struct GameOptions *);
|
||||
extern void sub_8014248(const char *, u32, u32, struct MenuItem *, u32, u32, u32, u32, u32);
|
||||
extern void CreateHintDisplayScreen(u32);
|
||||
extern void sub_801E3F0(u32);
|
||||
@ -43,14 +43,13 @@ extern void sub_801E54C(void);
|
||||
extern u32 HandleHintDisplayScreenInput(void);
|
||||
extern void DestroyHintDisplayScreen(void);
|
||||
extern u32 sub_801E218(void);
|
||||
extern bool8 GameOptionsNotChange(struct UnkSaveStruct1 *);
|
||||
extern void sub_801E2C4(void);
|
||||
extern s32 sub_80144A4(s32 *);
|
||||
extern void sub_8094C14(void);
|
||||
extern void SetWindowBGColor(void);
|
||||
extern void sub_8099690(u32);
|
||||
extern void sub_8012CAC(struct UnkTextStruct2 *, struct MenuItem *);
|
||||
|
||||
extern struct UnkSaveStruct1 *gUnknown_203B46C;
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
extern struct unkStruct_203B25C *gUnknown_203B25C;
|
||||
extern const struct UnkTextStruct2 gUnknown_80DBFCC;
|
||||
extern const struct UnkTextStruct2 gUnknown_80DBFB0;
|
||||
@ -365,8 +364,8 @@ void sub_801DED0(void)
|
||||
break;
|
||||
case 6:
|
||||
// Load our current options?
|
||||
gUnknown_203B25C->unk8 = *gUnknown_203B46C;
|
||||
sub_801E198(&gUnknown_203B25C->unk8);
|
||||
gUnknown_203B25C->newOptions = *gGameOptionsRef;
|
||||
sub_801E198(&gUnknown_203B25C->newOptions);
|
||||
break;
|
||||
case 7:
|
||||
CreateChangeSettingsConfirmMenu();
|
||||
@ -485,7 +484,7 @@ void sub_801E0FC(void)
|
||||
case 3:
|
||||
sub_801E2C4();
|
||||
// Check to see if the options changed?
|
||||
if (GameOptionsNotChange(&gUnknown_203B25C->unk8)) {
|
||||
if (GameOptionsNotChange(&gUnknown_203B25C->newOptions)) {
|
||||
sub_801DD6C(1);
|
||||
}
|
||||
else {
|
||||
@ -508,8 +507,8 @@ void HandleChangeSettingsMenu(void)
|
||||
{
|
||||
case MENU_OPTION_YES:
|
||||
// Save our option changes??
|
||||
*gUnknown_203B46C = gUnknown_203B25C->unk8;
|
||||
sub_8094C14();
|
||||
*gGameOptionsRef = gUnknown_203B25C->newOptions;
|
||||
SetWindowBGColor();
|
||||
sub_8099690(0);
|
||||
sub_801DD6C(1);
|
||||
break;
|
||||
|
@ -13,7 +13,7 @@ struct unkStruct_203B2AC
|
||||
u8 unk22[0x34 - 0x22];
|
||||
u32 unk34[3];
|
||||
u8 unk40[0x48 - 0x40];
|
||||
s16 unk48;
|
||||
s16 speciesNum;
|
||||
u32 unk4C;
|
||||
u8 unk50[0xB0 - 0x50];
|
||||
u32 unkB0;
|
||||
@ -27,7 +27,13 @@ extern struct unkStruct_203B2AC *gUnknown_203B2AC;
|
||||
|
||||
struct unkStruct_3001B60
|
||||
{
|
||||
u8 fill0[0x1A];
|
||||
u32 unk0;
|
||||
u32 sortMethod;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u8 fill14[0x18 - 0x14];
|
||||
s16 unk18;
|
||||
s16 unk1A[2];
|
||||
u8 fill1C[0x370 - 0x1E];
|
||||
s16 unk370;
|
||||
@ -51,6 +57,7 @@ extern void sub_802452C(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_8013984(void *);
|
||||
void sub_80922B4(u8 *buffer, u8 *string, s32 size);
|
||||
bool8 ComparePokemonNames(s16 a1, s16 a2);
|
||||
|
||||
void sub_8024588(void);
|
||||
void sub_80245D0(void);
|
||||
@ -58,6 +65,153 @@ void sub_8024604(void);
|
||||
|
||||
extern u8 gUnknown_80DC9A4[];
|
||||
|
||||
void SortbyInternalNo(s32 param_1, s32 param_2);
|
||||
void SortbyAlphabetNo(s32 param_1,s32 param_2);
|
||||
void SortbyName(s32 param_1,s32 param_2);
|
||||
|
||||
bool8 sub_8024184(struct PokemonStruct *pokemon, u8 area)
|
||||
{
|
||||
if(area == GetFriendArea(pokemon->speciesNum))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_80241A8(void)
|
||||
{
|
||||
switch(gUnknown_3001B60->sortMethod)
|
||||
{
|
||||
case 2:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10) {
|
||||
SortbyAlphabetNo(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
}
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8) {
|
||||
SortbyAlphabetNo(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10) {
|
||||
SortbyName(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
}
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8) {
|
||||
SortbyName(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10) {
|
||||
SortbyInternalNo(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
}
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8) {
|
||||
SortbyInternalNo(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SortbyInternalNo(s32 param_1, s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
if (GetInternalNo(gRecruitedPokemonRef->pokemon[r5 = r4 - 1, *r5].speciesNum) > GetInternalNo(gRecruitedPokemonRef->pokemon[*r4].speciesNum)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
void SortbyAlphabetNo(s32 param_1,s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
if (GetAlphabetParentNo(gRecruitedPokemonRef->pokemon[r5 = r4 - 1, *r5].speciesNum, 0) > GetAlphabetParentNo(gRecruitedPokemonRef->pokemon[*r4].speciesNum, 0)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
void SortbyName(s32 param_1,s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
r5 = r4 - 1;
|
||||
if (ComparePokemonNames(*r5, *r4)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
struct PokemonStruct *sub_80243E8(void)
|
||||
{
|
||||
u8 buffer [40];
|
||||
@ -69,11 +223,11 @@ struct PokemonStruct *sub_80243E8(void)
|
||||
return pokeStruct;
|
||||
}
|
||||
|
||||
bool8 sub_8024458(s16 param_1, s32 param_2)
|
||||
bool8 sub_8024458(s16 speciesNum, s32 param_2)
|
||||
{
|
||||
s32 param_1_s32 = param_1;
|
||||
s32 speciesNum_s32 = speciesNum;
|
||||
gUnknown_203B2AC = MemoryAlloc(sizeof(struct unkStruct_203B2AC), 8);
|
||||
gUnknown_203B2AC->unk48 = param_1_s32;
|
||||
gUnknown_203B2AC->speciesNum = speciesNum_s32;
|
||||
gUnknown_203B2AC->unkE0 = param_2;
|
||||
gUnknown_203B2AC->unkE4 = &gUnknown_203B2AC->unkE8[param_2];
|
||||
sub_8006518(gUnknown_203B2AC->unkE8);
|
||||
@ -152,6 +306,6 @@ void sub_8024604(void)
|
||||
gUnknown_203B2AC->unk34[2] = 5;
|
||||
sub_8013818(gUnknown_203B2AC,3,1,gUnknown_203B2AC->unkE0);
|
||||
iVar3 = &gUnknown_203B2AC->unk4C;
|
||||
pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_203B2AC->unk48];
|
||||
pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_203B2AC->speciesNum];
|
||||
sub_808FF20(iVar3,pokeStruct, sub_80023E4(7));
|
||||
}
|
||||
|
357
src/code_8023144.c
Normal file
357
src/code_8023144.c
Normal file
@ -0,0 +1,357 @@
|
||||
#include "global.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "memory.h"
|
||||
#include "pokemon.h"
|
||||
#include "team_inventory.h"
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
#include "item.h"
|
||||
|
||||
struct unkStruct_3001B5C
|
||||
{
|
||||
// size: 0x3fC
|
||||
u8 unk0;
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
s16 unkC[2];
|
||||
u32 unk10;
|
||||
u8 fill14[0x354 - 0x14];
|
||||
u8 unk354;
|
||||
u8 fill355[0x35C - 0x355];
|
||||
u8 unk35C;
|
||||
u8 fill35D[0x374 - 0x35D];
|
||||
s16 unk374;
|
||||
s16 unk376;
|
||||
s16 unk378;
|
||||
s16 unk37A;
|
||||
u8 fill37C[0x390 - 0x37C];
|
||||
u32 unk390;
|
||||
struct UnkTextStruct2 *unk394;
|
||||
struct UnkTextStruct2 unk398[4];
|
||||
u8 unk3F8[4];
|
||||
};
|
||||
|
||||
extern struct unkStruct_3001B5C *gUnknown_3001B5C;
|
||||
|
||||
extern u32 gUnknown_203B298;
|
||||
extern u16 gUnknown_203B29C;
|
||||
extern u16 gUnknown_203B29E;
|
||||
extern struct UnkTextStruct2 gUnknown_80DC91C;
|
||||
extern struct UnkTextStruct2 gUnknown_80DC904;
|
||||
|
||||
extern u8 sub_8023704();
|
||||
extern void sub_8012D08(void *, u32);
|
||||
extern void sub_8013818(void *, u32, u32, u32);
|
||||
extern void sub_8013984(u8 *);
|
||||
extern void sub_8023420(void);
|
||||
extern void sub_80234BC(void);
|
||||
extern u32 sub_80236A4(void);
|
||||
extern u8 sub_80138B8(void *, u32);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern s32 GetKeyPress(void *);
|
||||
extern void sub_8013660(void *);
|
||||
extern void AddMenuCursorSprite(void *);
|
||||
|
||||
struct unkStruct_203B294
|
||||
{
|
||||
// size: 0x1A8
|
||||
/* 0x0 */ u32 state;
|
||||
/* 0x4 */ u32 fallbackState;
|
||||
u8 unk8[NUM_IQ_SKILLS];
|
||||
u8 unk20[NUM_IQ_SKILLS];
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
u32 unk40;
|
||||
struct unkStruct_80915F4 unk44;
|
||||
/* 0x48 */ struct PokemonStruct *pokeStruct;
|
||||
u32 unk4C;
|
||||
struct ItemSlot unk50;
|
||||
u32 unk54;
|
||||
u8 fill58[0xA4 - 0x58];
|
||||
u32 unkA4;
|
||||
u8 fillA8[0xF4 - 0xA8];
|
||||
u32 unkF4;
|
||||
u32 unkF8;
|
||||
u16 unkFC;
|
||||
};
|
||||
|
||||
struct unkStruct_203B294 *gUnknown_203B294;
|
||||
|
||||
extern u8 gUnknown_80DC5EC[];
|
||||
extern u8 gUnknown_202DE58[];
|
||||
extern void sub_8022924(s32);
|
||||
extern s32 sub_80144A4(s32 *);
|
||||
extern u32 sub_801B00C(void);
|
||||
extern void sub_801B048(void);
|
||||
extern u32 sub_801B410(void);
|
||||
extern void sub_801B450(void);
|
||||
|
||||
extern u8 sub_8012FD8(u32 *);
|
||||
extern void sub_8013114(u32 *, s32 *);
|
||||
extern u32 sub_801A6E8(u32);
|
||||
extern void sub_8099690(u32);
|
||||
extern void sub_801A928(void);
|
||||
s32 GetNumAvailableIQSkills(u8 *iqSkillBuffer, s32 pokeIQ);
|
||||
void GetGummiItemStatBoost(struct PokemonStruct* pokemon, u8 itemIndex, u8 a3, struct unkStruct_80915F4* a4);
|
||||
extern u32 sub_801A8AC(void);
|
||||
|
||||
void sub_8022E78(void)
|
||||
{
|
||||
switch(sub_801A6E8(1))
|
||||
{
|
||||
case 3:
|
||||
gUnknown_203B294->unk4C = sub_801A8AC();
|
||||
gUnknown_203B294->unk50 = gTeamInventory_203B460->teamItems[gUnknown_203B294->unk4C];
|
||||
sub_8022924(2);
|
||||
break;
|
||||
case 4:
|
||||
gUnknown_203B294->unk4C = sub_801A8AC();
|
||||
gUnknown_203B294->unk50 = gTeamInventory_203B460->teamItems[gUnknown_203B294->unk4C];
|
||||
sub_8099690(0);
|
||||
sub_8022924(4);
|
||||
break;
|
||||
case 2:
|
||||
sub_8022924(0x16);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8022EF4(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
s32 r5;
|
||||
|
||||
menuAction = 0;
|
||||
sub_801A6E8(0);
|
||||
if (sub_8012FD8(&gUnknown_203B294->unk54) == 0) {
|
||||
sub_8013114(&gUnknown_203B294->unk54,&menuAction);
|
||||
if(menuAction != 1) gUnknown_203B294->unkF4 = menuAction;
|
||||
}
|
||||
|
||||
switch(menuAction)
|
||||
{
|
||||
case 1:
|
||||
sub_8022924(1);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
break;
|
||||
case 5:
|
||||
gUnknown_203B294->unk38 = GetNumAvailableIQSkills(gUnknown_203B294->unk8, gUnknown_203B294->pokeStruct->IQ);
|
||||
GetGummiItemStatBoost(gUnknown_203B294->pokeStruct, gUnknown_203B294->unk50.itemIndex, 0, &gUnknown_203B294->unk44);
|
||||
gUnknown_203B294->unk3C = GetNumAvailableIQSkills(gUnknown_203B294->unk20, gUnknown_203B294->pokeStruct->IQ);
|
||||
gUnknown_203B294->unk40 = 1;
|
||||
r5 = gUnknown_203B294->unk44.unk0;
|
||||
|
||||
sub_8090E14(gUnknown_202DE58, &gTeamInventory_203B460->teamItems[gUnknown_203B294->unk4C], NULL);
|
||||
|
||||
if(r5 != -1)
|
||||
ShiftItemsDownFrom(gUnknown_203B294->unk4C);
|
||||
|
||||
sub_8099690(0);
|
||||
gUnknown_203B294->fallbackState = 0xA;
|
||||
|
||||
switch(r5 + 1)
|
||||
{
|
||||
case 1:
|
||||
sub_8022924(6);
|
||||
break;
|
||||
case 2:
|
||||
sub_8022924(7);
|
||||
break;
|
||||
case 3:
|
||||
sub_8022924(8);
|
||||
break;
|
||||
case 4:
|
||||
sub_8022924(9);
|
||||
break;
|
||||
default:
|
||||
case 0:
|
||||
gUnknown_203B294->fallbackState = 0x16;
|
||||
sub_8022924(5);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
sub_8022924(0x15);
|
||||
break;
|
||||
case 4:
|
||||
sub_8022924(3);
|
||||
break;
|
||||
case 7:
|
||||
sub_8099690(0);
|
||||
sub_8022924(4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8023068(void)
|
||||
{
|
||||
s32 menuAction;
|
||||
|
||||
menuAction = 0;
|
||||
sub_801A6E8(0);
|
||||
sub_8012FD8(&gUnknown_203B294->unk54);
|
||||
if (sub_8012FD8(&gUnknown_203B294->unkA4) == 0) {
|
||||
sub_8013114(&gUnknown_203B294->unkA4,&menuAction);
|
||||
}
|
||||
|
||||
switch(menuAction)
|
||||
{
|
||||
case 1:
|
||||
case 3:
|
||||
sub_8022924(1);
|
||||
break;
|
||||
case 2:
|
||||
ShiftItemsDownFrom(gUnknown_203B294->unk4C);
|
||||
if (GetNumberOfFilledInventorySlots() == 0) {
|
||||
sub_8099690(0);
|
||||
sub_801A928();
|
||||
sub_8022924(0x14);
|
||||
}
|
||||
else {
|
||||
sub_8022924(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80230E8(void)
|
||||
{
|
||||
switch(sub_801B410())
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
sub_801B450();
|
||||
sub_8022924(1);
|
||||
case 1:
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8023104(void)
|
||||
{
|
||||
switch(sub_801B00C())
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
sub_801B048();
|
||||
sub_8022924(1);
|
||||
case 1:
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8023120(void)
|
||||
{
|
||||
s32 temp;
|
||||
if(sub_80144A4(&temp) == 0)
|
||||
{
|
||||
sub_8022924(gUnknown_203B294->fallbackState);
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8023144(s32 param_1, s32 index, struct UnkTextStruct2_sub *sub, u32 param_4)
|
||||
{
|
||||
u8 param_1_u8 = param_1;
|
||||
|
||||
if (sub_8023704(param_1_u8)) {
|
||||
return 0;
|
||||
}
|
||||
if (gUnknown_3001B5C == NULL) {
|
||||
gUnknown_3001B5C = MemoryAlloc(sizeof(struct unkStruct_3001B5C), 8);
|
||||
}
|
||||
gUnknown_3001B5C->unk0 = param_1_u8;
|
||||
gUnknown_3001B5C->unk4 = gUnknown_203B298;
|
||||
|
||||
gUnknown_3001B5C->unk390 = index;
|
||||
gUnknown_3001B5C->unk394 = &gUnknown_3001B5C->unk398[index];
|
||||
sub_8006518(gUnknown_3001B5C->unk398);
|
||||
gUnknown_3001B5C->unk398[gUnknown_3001B5C->unk390] = gUnknown_80DC91C;
|
||||
|
||||
gUnknown_3001B5C->unk394->unk14 = gUnknown_3001B5C->unk3F8;
|
||||
if (sub != NULL) {
|
||||
gUnknown_3001B5C->unk398[gUnknown_3001B5C->unk390].unk08 = *sub;
|
||||
}
|
||||
sub_8012D08(gUnknown_3001B5C->unk394,param_4);
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_3001B5C->unk398,1,1);
|
||||
sub_8013818(&gUnknown_3001B5C->unk35C,sub_80236A4(),param_4,index);
|
||||
gUnknown_3001B5C->unk374 = gUnknown_203B29C;
|
||||
gUnknown_3001B5C->unk37A = gUnknown_203B29E;
|
||||
sub_8013984(&gUnknown_3001B5C->unk35C);
|
||||
sub_8023420();
|
||||
sub_80234BC();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
u8 sub_8023278(u8 param_1)
|
||||
{
|
||||
s32 iVar3;
|
||||
u32 temp;
|
||||
|
||||
if (param_1 == 0) {
|
||||
sub_8013660(&gUnknown_3001B5C->unk35C);
|
||||
return 0;
|
||||
}
|
||||
switch(GetKeyPress(&gUnknown_3001B5C->unk35C))
|
||||
{
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
return 3;
|
||||
case 3:
|
||||
PlayMenuSoundEffect(5);
|
||||
if (temp = gUnknown_3001B5C->unk4, iVar3 = 1, temp < 2) {
|
||||
iVar3 = temp + 1;
|
||||
}
|
||||
gUnknown_3001B5C->unk4 = iVar3;
|
||||
sub_80236A4();
|
||||
break;
|
||||
default:
|
||||
if (sub_80138B8(&gUnknown_3001B5C->unk35C, 1) == 0) {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
sub_8023420();
|
||||
sub_80234BC();
|
||||
return 1;
|
||||
}
|
||||
|
||||
s16 sub_802331C(void)
|
||||
{
|
||||
return gUnknown_3001B5C->unkC[gUnknown_3001B5C->unk37A * gUnknown_3001B5C->unk378 + gUnknown_3001B5C->unk374];
|
||||
}
|
||||
|
||||
void sub_8023354(u8 param_1)
|
||||
{
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_3001B5C->unk398,0,0);
|
||||
sub_8013984(&gUnknown_3001B5C->unk35C);
|
||||
sub_8023420();
|
||||
sub_80234BC();
|
||||
if (param_1 != 0) {
|
||||
AddMenuCursorSprite(&gUnknown_3001B5C->unk35C);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sub_80233A0(void)
|
||||
{
|
||||
if (gUnknown_3001B5C != NULL) {
|
||||
gUnknown_203B298 = gUnknown_3001B5C->unk4;
|
||||
gUnknown_203B29C = gUnknown_3001B5C->unk374;
|
||||
gUnknown_203B29E = gUnknown_3001B5C->unk37A;
|
||||
gUnknown_3001B5C->unk398[gUnknown_3001B5C->unk390] = gUnknown_80DC904;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_3001B5C->unk398,1,1);
|
||||
MemoryFree(gUnknown_3001B5C);
|
||||
gUnknown_3001B5C = NULL;
|
||||
}
|
||||
}
|
@ -1,9 +1,12 @@
|
||||
#include "global.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/type.h"
|
||||
#include "dungeon_entity.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "item.h"
|
||||
|
||||
struct unkStruct_80420E8
|
||||
{
|
||||
@ -12,6 +15,20 @@ struct unkStruct_80420E8
|
||||
u32 unk8;
|
||||
};
|
||||
|
||||
extern u32 gStatusSpriteMasks_SleepStatus[];
|
||||
extern u32 gStatusSpriteMasks_NonVolatileStatus[];
|
||||
extern u32 gStatusSpriteMasks_ImmobilizeStatus[];
|
||||
extern u32 gStatusSpriteMasks_VolatileStatus[];
|
||||
extern u32 gStatusSpriteMasks_ChargingStatus[];
|
||||
extern u32 gStatusSpriteMasks_ProtectionStatus[];
|
||||
extern u32 gStatusSpriteMasks_WaitingStatus[];
|
||||
extern u32 gStatusSpriteMasks_LinkedStatus[];
|
||||
extern u32 gStatusSpriteMasks_MoveStatus[];
|
||||
extern u32 gStatusSpriteMasks_ItemStatus[];
|
||||
extern u32 gStatusSpriteMasks_TransformStatus[];
|
||||
extern u32 gStatusSpriteMasks_EyesightStatus[];
|
||||
extern u32 gStatusSpriteMasks_MuzzledStatus[];
|
||||
|
||||
|
||||
extern void sub_803ED30(u8, struct DungeonEntity *pokemon, u8, u8);
|
||||
extern void sub_804151C(struct DungeonEntity *pokemon, u32 r1, u8 r2);
|
||||
@ -25,8 +42,170 @@ extern void sub_8041550(struct DungeonEntity *pokemon, u32, u32, u32, u32, u32);
|
||||
|
||||
|
||||
void sub_80421C0(struct DungeonEntity *pokemon, u16 r1);
|
||||
void DungeonEntityUpdateStatusSprites(struct DungeonEntity *entity);
|
||||
|
||||
|
||||
extern s32 gUnknown_202EDC8;
|
||||
extern u8 gUnknown_203B40D;
|
||||
extern s16 gUnknown_2026E4E;
|
||||
|
||||
extern u8 sub_800E9FC(u8);
|
||||
extern void sub_800DBBC(void);
|
||||
extern void sub_803EA10(void);
|
||||
extern void sub_8042E98(void);
|
||||
extern void sub_803E46C(u32);
|
||||
extern void sub_800EE5C(u32);
|
||||
extern u32 sub_800E890(u32 *);
|
||||
extern void sub_800EF64(void);
|
||||
|
||||
u32 sub_8041764(u32 *param_1, u8 param_2)
|
||||
{
|
||||
sub_800EE5C(*param_1);
|
||||
sub_800EF64();
|
||||
if(param_2)
|
||||
sub_803E46C(0x42);
|
||||
return sub_800E890(param_1);
|
||||
}
|
||||
|
||||
void sub_804178C(u8 param_1)
|
||||
{
|
||||
u32 temp;
|
||||
s32 counter;
|
||||
|
||||
counter = 0;
|
||||
gDungeonGlobalData->unk18204 = 0;
|
||||
if (sub_800E9FC(param_1) != 0) {
|
||||
while ((counter < 1000 && (sub_800E9FC(param_1) != 0))) {
|
||||
sub_803E46C(0x4a);
|
||||
counter++;
|
||||
}
|
||||
sub_803E46C(0x4a);
|
||||
sub_803E46C(0x4a);
|
||||
}
|
||||
if ((counter == 1000) || (param_1 != 0)) {
|
||||
sub_800DBBC();
|
||||
}
|
||||
if (gUnknown_202EDC8 < 0x1f) {
|
||||
temp = gUnknown_203B40D;
|
||||
gUnknown_203B40D = 1;
|
||||
for(counter = 0; counter < 1000; counter++)
|
||||
{
|
||||
if (gUnknown_202EDC8 < 0x1f) {
|
||||
gUnknown_202EDC8 += 4;
|
||||
if (gUnknown_2026E4E != 0x808) {
|
||||
gUnknown_2026E4E -= 0x101;
|
||||
}
|
||||
}
|
||||
else {
|
||||
gUnknown_202EDC8 = 0x1f;
|
||||
}
|
||||
sub_803EA10();
|
||||
sub_803E46C(0x4a);
|
||||
if(gUnknown_202EDC8 == 0x1f) break;
|
||||
};
|
||||
gUnknown_2026E4E = 0x808;
|
||||
gUnknown_203B40D = temp;
|
||||
}
|
||||
sub_8042E98();
|
||||
}
|
||||
|
||||
u32 EntityGetStatusSprites(struct DungeonEntity *entity)
|
||||
{
|
||||
return entity->entityData->statusSprites;
|
||||
}
|
||||
|
||||
void sub_8041888(u8 param_1)
|
||||
{
|
||||
s32 index;
|
||||
struct DungeonEntity *entity;
|
||||
struct DungeonEntityData *entityData;
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeonGlobalData->allPokemon[index];
|
||||
if(EntityExists(entity))
|
||||
{
|
||||
entityData = entity->entityData;
|
||||
if(param_1)
|
||||
{
|
||||
entityData->unk14C = 1;
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DungeonEntityUpdateStatusSprites(struct DungeonEntity *entity)
|
||||
{
|
||||
bool32 flag;
|
||||
s32 HP;
|
||||
struct DungeonEntityData *entityData;
|
||||
u32 spriteStatus;
|
||||
u8 temp;
|
||||
|
||||
if (EntityExists(entity)) {
|
||||
entityData = entity->entityData;
|
||||
spriteStatus = 0;
|
||||
flag = TRUE;
|
||||
|
||||
if (entityData->entityID == 0xb9) {
|
||||
// NOTE: clean this up sometime
|
||||
temp = entityData->sleepStatusTurnsLeft;
|
||||
flag = 0x7f;
|
||||
temp ^= flag;
|
||||
flag = (temp) != 0;
|
||||
}
|
||||
if (flag) {
|
||||
spriteStatus = gStatusSpriteMasks_SleepStatus[entityData->sleepStatus];
|
||||
}
|
||||
spriteStatus = spriteStatus |
|
||||
gStatusSpriteMasks_NonVolatileStatus[entityData->nonVolatileStatus] |
|
||||
gStatusSpriteMasks_ImmobilizeStatus[entityData->immobilizeStatus] |
|
||||
gStatusSpriteMasks_VolatileStatus[entityData->volatileStatus] |
|
||||
gStatusSpriteMasks_ChargingStatus[entityData->chargingStatus] |
|
||||
gStatusSpriteMasks_ProtectionStatus[entityData->protectionStatus] |
|
||||
gStatusSpriteMasks_WaitingStatus[entityData->waitingStatus] |
|
||||
gStatusSpriteMasks_LinkedStatus[entityData->linkedStatus] |
|
||||
gStatusSpriteMasks_MoveStatus[entityData->moveStatus] |
|
||||
gStatusSpriteMasks_ItemStatus[entityData->itemStatus] |
|
||||
gStatusSpriteMasks_TransformStatus[entityData->transformStatus] |
|
||||
gStatusSpriteMasks_EyesightStatus[entityData->eyesightStatus] |
|
||||
gStatusSpriteMasks_MuzzledStatus[entityData->muzzledStatus];
|
||||
|
||||
if (entityData->grudgeStatus) {
|
||||
spriteStatus = spriteStatus | STATUS_SPRITE_GRUDGE;
|
||||
}
|
||||
if (entityData->exposedStatus) {
|
||||
spriteStatus = spriteStatus | STATUS_SPRITE_EXPOSED;
|
||||
}
|
||||
if (!entityData->isEnemy) {
|
||||
HP = entityData->maxHP;
|
||||
if (HP < 0) {
|
||||
HP += 3;
|
||||
}
|
||||
HP >>= 2;
|
||||
if (HP > entityData->HP) {
|
||||
spriteStatus = spriteStatus | STATUS_SPRITE_LOWHP;
|
||||
}
|
||||
}
|
||||
if ((gDungeonGlobalData->itemHoldersIdentified) && (entityData->heldItem.itemFlags & ITEM_FLAG_EXISTS)) {
|
||||
spriteStatus = spriteStatus | STATUS_SPRITE_LOWHP;
|
||||
}
|
||||
if ( (entityData->attackMultipliers[0] < DEFAULT_STAT_MULTIPLIER) ||
|
||||
(entityData->attackMultipliers[1] < DEFAULT_STAT_MULTIPLIER) ||
|
||||
(entityData->defenseMultipliers[0] < DEFAULT_STAT_MULTIPLIER) ||
|
||||
(entityData->defenseMultipliers[1] < DEFAULT_STAT_MULTIPLIER) ||
|
||||
(entityData->attackStages[0] < DEFAULT_STAT_STAGE) ||
|
||||
(entityData->attackStages[1] < DEFAULT_STAT_STAGE) ||
|
||||
(entityData->defenseStages[0] < DEFAULT_STAT_STAGE) ||
|
||||
(entityData->defenseStages[1] < DEFAULT_STAT_STAGE) ||
|
||||
(entityData->accuracyStages[0]) < DEFAULT_STAT_STAGE ||
|
||||
(entityData->accuracyStages[1] < DEFAULT_STAT_STAGE)) {
|
||||
spriteStatus = spriteStatus | STATUS_SPRITE_STAT_DOWN;
|
||||
}
|
||||
entityData->statusSprites = spriteStatus;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8041AD0(struct DungeonEntity *pokemon)
|
||||
{
|
||||
sub_804151C(pokemon, 0xA2 << 1, 1);
|
||||
|
@ -270,7 +270,7 @@ bool8 DigMoveAction(struct DungeonEntity * pokemon, struct DungeonEntity * targe
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
else {
|
||||
sub_8079618(pokemon,pokemon,10,move,*gUnknown_80FAD4C); // $m0 burrowed underground!
|
||||
SetChargeStatusTarget(pokemon,pokemon,CHARGING_STATUS_DIG,move,*gUnknown_80FAD4C); // $m0 burrowed underground!
|
||||
}
|
||||
flag = TRUE;
|
||||
}
|
||||
@ -335,10 +335,10 @@ bool32 sub_8057948(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_8057954(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move)
|
||||
bool32 RageMoveAction(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move)
|
||||
{
|
||||
// {ARG_POKEMON_0} is enraged
|
||||
sub_8079618(pokemon,target,0xc,move,gUnknown_80FAC88);
|
||||
SetChargeStatusTarget(pokemon,target,CHARGING_STATUS_RAGE,move,gUnknown_80FAC88);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -861,7 +861,7 @@ bool8 RazorWindMoveAction(struct DungeonEntity * pokemon, struct DungeonEntity *
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
else {
|
||||
sub_8079618(pokemon,pokemon,CHARGING_STATUS_RAZOR_WIND,move,*gUnknown_80FAC54);
|
||||
SetChargeStatusTarget(pokemon,pokemon,CHARGING_STATUS_RAZOR_WIND,move,*gUnknown_80FAC54);
|
||||
flag = TRUE;
|
||||
}
|
||||
return flag;
|
||||
@ -869,7 +869,7 @@ bool8 RazorWindMoveAction(struct DungeonEntity * pokemon, struct DungeonEntity *
|
||||
|
||||
bool8 BideMoveAction(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move, u32 param_4)
|
||||
{
|
||||
sub_8079618(pokemon, target, CHARGING_STATUS_BIDE, move, *gUnknown_80FAC74);
|
||||
SetChargeStatusTarget(pokemon, target, CHARGING_STATUS_BIDE, move, *gUnknown_80FAC74);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1012,7 +1012,7 @@ bool8 sub_8058638(struct DungeonEntity *pokemon, struct DungeonEntity *target, s
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_805867C(struct DungeonEntity * pokemon, struct DungeonEntity * target, struct PokemonMove * move, u32 param_4)
|
||||
bool8 FocusPunchMoveAction(struct DungeonEntity * pokemon, struct DungeonEntity * target, struct PokemonMove * move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
@ -1021,7 +1021,7 @@ bool8 sub_805867C(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
else {
|
||||
sub_8079618(pokemon,pokemon,CHARGING_STATUS_FOCUS_PUNCH,move,*gUnknown_80FACA4);
|
||||
SetChargeStatusTarget(pokemon,pokemon,CHARGING_STATUS_FOCUS_PUNCH,move,*gUnknown_80FACA4);
|
||||
flag = TRUE;
|
||||
}
|
||||
return flag;
|
||||
@ -1244,7 +1244,7 @@ bool8 SkyAttackMoveAction(struct DungeonEntity *pokemon, struct DungeonEntity *t
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
else {
|
||||
sub_8079618(pokemon, pokemon, CHARGING_STATUS_SKY_ATTACK, move, *gUnknown_80FACC4);
|
||||
SetChargeStatusTarget(pokemon, pokemon, CHARGING_STATUS_SKY_ATTACK, move, *gUnknown_80FACC4);
|
||||
flag = TRUE;
|
||||
}
|
||||
return flag;
|
||||
@ -1532,9 +1532,9 @@ bool8 sub_8059050(struct DungeonEntity *pokemon, struct DungeonEntity *target, s
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059060(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move, u32 param_4)
|
||||
bool8 ChargeMoveAction(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move, u32 param_4)
|
||||
{
|
||||
sub_8079618(pokemon, target, CHARGING_STATUS_CHARGE, move, *gUnknown_80FAD6C);
|
||||
SetChargeStatusTarget(pokemon, target, CHARGING_STATUS_CHARGE, move, *gUnknown_80FAD6C);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,10 @@
|
||||
#include "dungeon_util.h"
|
||||
#include "pokemon.h"
|
||||
#include "weather.h"
|
||||
#include "gUnknown_203B46C.h"
|
||||
#include "game_options.h"
|
||||
#include "text_util.h"
|
||||
|
||||
extern struct UnkSaveStruct1 *gUnknown_203B46C;
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
|
||||
struct unkStruct_80F520C
|
||||
{
|
||||
@ -121,7 +121,11 @@ void sub_8069F9C(struct DungeonEntity *pokemon,struct DungeonEntity * target,str
|
||||
u8 type;
|
||||
u8 ability;
|
||||
const char *__src;
|
||||
#ifndef NONMATCHING
|
||||
register s32 abilityCounter asm("r1"); // r1
|
||||
#else
|
||||
s32 abilityCounter;
|
||||
#endif
|
||||
int randomIndex;
|
||||
int abilityIndex;
|
||||
struct DungeonEntityData *iVar6; // r7
|
||||
@ -240,7 +244,7 @@ void sub_806A1E8(struct DungeonEntity *pokemon)
|
||||
entityData = pokemon->entityData;
|
||||
bVar3 = (!entityData->isEnemy);
|
||||
}
|
||||
if (gUnknown_203B46C->unk1 == '\0') {
|
||||
if (gGameOptionsRef->FarOffPals == '\0') {
|
||||
bVar3 = FALSE;
|
||||
}
|
||||
if (bVar3 && (sub_8045888(pokemon) == '\0')) {
|
||||
|
123
src/code_806E8B0.c
Normal file
123
src/code_806E8B0.c
Normal file
@ -0,0 +1,123 @@
|
||||
#include "global.h"
|
||||
#include "constants/ability.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "status_checks_1.h"
|
||||
#include "text_util.h"
|
||||
|
||||
extern u8 *gUnknown_80FEE04[];
|
||||
extern u8 *gUnknown_80FEE2C[];
|
||||
extern u8 *gUnknown_80FEE54[];
|
||||
|
||||
void sub_8042940(struct DungeonEntity *r0);
|
||||
void sub_80428B0(struct DungeonEntity *r0);
|
||||
void sub_80428C4(struct DungeonEntity *r0);
|
||||
void sub_80522F4(struct DungeonEntity *r0, struct DungeonEntity *r1, const char r2[]);
|
||||
|
||||
void sub_806E8B0(struct DungeonEntity * pokemon, struct DungeonEntity * target, u8 param_3, s32 *param_4, s32 *param_5, s32 param_6)
|
||||
{
|
||||
bool8 hasNegStatus_pokemon;
|
||||
bool8 visFlags_pokemon_1;
|
||||
bool8 visFlags_pokemon_2;
|
||||
bool8 hasNegStatus_target;
|
||||
bool8 visFlags_target;
|
||||
s32 iVar3;
|
||||
bool32 isNotEnemy;
|
||||
struct DungeonEntityData * entityData;
|
||||
struct DungeonEntityData * entityData_1;
|
||||
s32 r7;
|
||||
s32 r8;
|
||||
s32 r10;
|
||||
s32 sp_0x4;
|
||||
s32 sp_0x8;
|
||||
|
||||
r7 = 1;
|
||||
r8 = 1;
|
||||
sp_0x4 = 1;
|
||||
sp_0x8 = 1;
|
||||
r10 = sub_8092354(param_3) == 0;
|
||||
|
||||
|
||||
if (HasAbility(pokemon, ABILITY_GUTS)) {
|
||||
entityData = pokemon->entityData;
|
||||
hasNegStatus_pokemon = HasNegativeStatus(pokemon);
|
||||
visFlags_pokemon_1 = SetVisualFlags(entityData,1,hasNegStatus_pokemon);
|
||||
if (hasNegStatus_pokemon) {
|
||||
r7 = 2;
|
||||
}
|
||||
if (visFlags_pokemon_1) {
|
||||
sub_80428B0(pokemon);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FEE04); // Guts boosted its power
|
||||
}
|
||||
}
|
||||
|
||||
if ((HasAbility(pokemon, ABILITY_HUGE_POWER)) || (HasAbility(pokemon, ABILITY_PURE_POWER))) {
|
||||
entityData_1 = pokemon->entityData;
|
||||
iVar3 = 0;
|
||||
if ((param_6 < 0x21) && (!r10)) {
|
||||
iVar3 = 1;
|
||||
}
|
||||
visFlags_pokemon_2 = SetVisualFlags(entityData_1,0x100,iVar3);
|
||||
if (iVar3 != 0) {
|
||||
r7 *= 3;
|
||||
r8 <<= 1;
|
||||
}
|
||||
if (visFlags_pokemon_2) {
|
||||
sub_80428C4(pokemon);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FEE2C); // It's special ability boosted Attack
|
||||
}
|
||||
}
|
||||
|
||||
if ((HasAbility(pokemon, ABILITY_HUSTLE)) && (!r10)) {
|
||||
r7 *= 3;
|
||||
r8 <<= 1;
|
||||
}
|
||||
|
||||
if(pokemon->entityData->isEnemy)
|
||||
{
|
||||
isNotEnemy = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
isNotEnemy = TRUE;
|
||||
}
|
||||
|
||||
if ((HasAbility(pokemon, ABILITY_PLUS)) && (r10 == 1) && gDungeonGlobalData->hasMinus[isNotEnemy]) {
|
||||
r7 *= 15;
|
||||
r8 *= 10;
|
||||
}
|
||||
|
||||
// ABILITY_MINUS
|
||||
if ((HasAbility(pokemon, ABILITY_MINUS)) && (r10 == 1) && gDungeonGlobalData->hasPlus[isNotEnemy]) {
|
||||
r7 *= 15;
|
||||
r8 *= 10;
|
||||
}
|
||||
|
||||
if (HasAbility(target, ABILITY_INTIMIDATE) && (!r10)) {
|
||||
r7 <<= 2;
|
||||
r8 *= 5;
|
||||
}
|
||||
|
||||
if ((HasAbility(target, ABILITY_MARVEL_SCALE)) && (!r10)) {
|
||||
entityData = target->entityData;
|
||||
hasNegStatus_target = HasNegativeStatus(target);
|
||||
visFlags_target = SetVisualFlags(entityData, 8, hasNegStatus_target);
|
||||
if (hasNegStatus_target) {
|
||||
sp_0x4 *= 3;
|
||||
sp_0x8 <<= 1;
|
||||
}
|
||||
if (visFlags_target) {
|
||||
sub_8042940(target);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FEE54); // Its special ability quickened attacks!
|
||||
}
|
||||
}
|
||||
|
||||
*param_4 *= r7;
|
||||
*param_5 *= sp_0x4;
|
||||
if (r8 != 1) {
|
||||
*param_4 = *param_4 / r8;
|
||||
}
|
||||
if (sp_0x8 != 1) {
|
||||
*param_5 = *param_5 / sp_0x8;
|
||||
}
|
||||
}
|
@ -670,7 +670,7 @@ void PierceStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * t
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void sub_8079618(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message)
|
||||
void SetChargeStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target, u8 newStatus, struct PokemonMove *move, u8 *message)
|
||||
{
|
||||
bool8 bVar2;
|
||||
struct PokemonMove *movePtr;
|
||||
@ -1634,7 +1634,7 @@ void sub_807A96C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
"_0807A9AC: .4byte 0x00007f01");
|
||||
}
|
||||
|
||||
void sub_807A9B0(struct DungeonEntity * pokemon)
|
||||
void WakeUpPokemon(struct DungeonEntity * pokemon)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
@ -1715,7 +1715,7 @@ void sub_807AA30(void)
|
||||
|
||||
if (forceWakeup) {
|
||||
_WakeUp:
|
||||
sub_807A9B0(wildEntity);
|
||||
WakeUpPokemon(wildEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "constants/wonder_mail.h"
|
||||
#include "pokemon.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "memory.h"
|
||||
@ -44,19 +45,21 @@ struct unkStruct_203B48C *sub_8095110(void)
|
||||
}
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_8095118(void)
|
||||
{
|
||||
int iVar1;
|
||||
s32 iVar1;
|
||||
struct unkStruct_203B480 *unused;
|
||||
|
||||
MemoryFill8((u8*)gUnknown_203B480,0,0x600);
|
||||
MemoryFill8(gUnknown_203B484,0,0x5c);
|
||||
MemoryFill8((u8*)gUnknown_203B484,0,0x5c);
|
||||
for(iVar1 = 0; iVar1 < 0x20; iVar1++){
|
||||
// NOTE: when it adds the index regs flip
|
||||
// Instead of add r0, r0, r1 -> add r0, r1, r0
|
||||
// Everything else matches...
|
||||
gUnknown_203B480[iVar1].unk0 = 0;
|
||||
gUnknown_203B480[iVar1].unk22 = 0;
|
||||
|
||||
// NOTE: we use a temp variable here to force the match
|
||||
unused = &gUnknown_203B480[iVar1];
|
||||
gUnknown_203B480[iVar1].mailType = WONDER_MAIL_TYPE_NONE;
|
||||
unused = &gUnknown_203B480[iVar1];
|
||||
gUnknown_203B480[iVar1].unk20.itemIndex = ITEM_ID_NOTHING;
|
||||
unused = &gUnknown_203B480[iVar1];
|
||||
gUnknown_203B480[iVar1].unk2D = 0;
|
||||
}
|
||||
gUnknown_203B48C->unk0 = 0;
|
||||
@ -64,66 +67,6 @@ void sub_8095118(void)
|
||||
gUnknown_203B48C->unk4[iVar1] = -1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_8095118(void)
|
||||
{
|
||||
asm_unified("\tpush {r4,lr}\n"
|
||||
"\tldr r4, _0809517C\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tmovs r2, 0xC0\n"
|
||||
"\tlsls r2, 3\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tbl MemoryFill8\n"
|
||||
"\tldr r0, _08095180\n"
|
||||
"\tldr r0, [r0]\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r2, 0x5C\n"
|
||||
"\tbl MemoryFill8\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r3, 0x1F\n"
|
||||
"_0809513A:\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tadds r0, 0x22\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tadds r0, 0x2D\n"
|
||||
"\tstrb r2, [r0]\n"
|
||||
"\tadds r1, 0x30\n"
|
||||
"\tsubs r3, 0x1\n"
|
||||
"\tcmp r3, 0\n"
|
||||
"\tbge _0809513A\n"
|
||||
"\tldr r2, _08095184\n"
|
||||
"\tldr r1, [r2]\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tstr r0, [r1]\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tmovs r4, 0x1\n"
|
||||
"\tnegs r4, r4\n"
|
||||
"_08095166:\n"
|
||||
"\tldr r0, [r2]\n"
|
||||
"\tlsls r1, r3, 2\n"
|
||||
"\tadds r0, 0x4\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tstr r4, [r0]\n"
|
||||
"\tadds r3, 0x1\n"
|
||||
"\tcmp r3, 0x1F\n"
|
||||
"\tble _08095166\n"
|
||||
"\tpop {r4}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0809517C: .4byte gUnknown_203B480\n"
|
||||
"_08095180: .4byte gUnknown_203B484\n"
|
||||
"_08095184: .4byte gUnknown_203B48C");
|
||||
}
|
||||
#endif
|
||||
|
||||
void nullsub_206(void)
|
||||
{
|
||||
@ -133,12 +76,12 @@ void nullsub_207(void)
|
||||
{
|
||||
}
|
||||
|
||||
s32 sub_8095190(void)
|
||||
s32 FindOpenMailSlot(void)
|
||||
{
|
||||
int index;
|
||||
s32 index;
|
||||
|
||||
for(index = 2; index < 0x20; index++){
|
||||
if(gUnknown_203B480[index].unk0 == 0)
|
||||
if(gUnknown_203B480[index].mailType == WONDER_MAIL_TYPE_NONE)
|
||||
return index;
|
||||
}
|
||||
return -1;
|
||||
|
@ -1,5 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "dungeon.h"
|
||||
#include "memory.h"
|
||||
#include "pokemon.h"
|
||||
#include "random.h"
|
||||
#include "save.h"
|
||||
#include "text_util.h"
|
||||
#include "code_8094F88.h"
|
||||
|
||||
extern struct unkStruct_203B484 *gUnknown_203B484;
|
||||
@ -15,11 +20,212 @@ extern void RestorePokemonMoves(struct unkStruct_8094924 *r0, struct PokemonMove
|
||||
|
||||
void sub_8095824(struct unkStruct_8094924 * a, struct unkStruct_203B480 *b);
|
||||
void sub_8095774(struct unkStruct_8094924 * a, struct unkStruct_203B480 *b);
|
||||
extern u32 sub_8095324(u32);
|
||||
s32 CountMailType(u8);
|
||||
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern s32 sub_8094E4C(void);
|
||||
extern void PrintPokeNameToBuffer(u8 *buffer, struct PokemonStruct *pokemon);
|
||||
extern void sub_8094D28(s32);
|
||||
|
||||
struct unkStruct_809542C
|
||||
{
|
||||
struct DungeonLocation unk0;
|
||||
u32 unk4;
|
||||
};
|
||||
|
||||
bool8 sub_80951FC(struct unkStruct_203B480 *param_1)
|
||||
{
|
||||
bool8 bVar1 = gUnknown_203B480[1].mailType != 0;
|
||||
gUnknown_203B480[1] = *param_1;
|
||||
return bVar1;
|
||||
}
|
||||
|
||||
struct unkStruct_203B480 * sub_8095228(u8 index)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
|
||||
ptr = &gUnknown_203B480[index];
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void sub_8095240(u8 index)
|
||||
{
|
||||
struct unkStruct_203B480 *unused;
|
||||
|
||||
MemoryFill8((u8*)&gUnknown_203B480[index],0,sizeof(struct unkStruct_203B480));
|
||||
unused = &gUnknown_203B480[index];
|
||||
gUnknown_203B480[index].mailType = 0;
|
||||
unused = &gUnknown_203B480[index];
|
||||
gUnknown_203B480[index].unk20.itemIndex = 0;
|
||||
}
|
||||
|
||||
void sub_8095274(u32 param_1)
|
||||
{
|
||||
s32 iVar2;
|
||||
s32 iVar3;
|
||||
|
||||
gUnknown_203B48C->unk4[gUnknown_203B48C->unk0] = param_1;
|
||||
iVar2 = gUnknown_203B48C->unk0;
|
||||
iVar3 = 0;
|
||||
if (iVar2 < 0x1f) {
|
||||
iVar3 = iVar2 + 1;
|
||||
}
|
||||
gUnknown_203B48C->unk0 = iVar3;
|
||||
}
|
||||
|
||||
bool8 sub_8095298(s32 param_1)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
for(index = 0; index < 0x20; index++)
|
||||
{
|
||||
if(gUnknown_203B48C->unk4[index] == param_1) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_80952C4(void)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
gUnknown_203B48C->unk0 = 0;
|
||||
for(index = 0; index < 0x20; index++)
|
||||
{
|
||||
gUnknown_203B48C->unk4[index] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_80952F0(u8 mailType, u32 param_2)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0]; index < 0x20; ptr++, index++)
|
||||
{
|
||||
if ((ptr->mailType == mailType) && (ptr->unk10 == param_2)) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 CountMailType(u8 mailType)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
s32 total = 0;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0]; index < 0x20; ptr++, index++)
|
||||
{
|
||||
if (ptr->mailType == mailType) total++;
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
u32 sub_8095350(void)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
u32 total = 0;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0]; index < 0x20; ptr++, index++)
|
||||
{
|
||||
if (ptr->mailType != 0) total++;
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
s32 sub_8095374(void)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
s32 retvar = -1;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0]; index < 0x20; ptr++, index++)
|
||||
{
|
||||
if (ptr->mailType == 1) retvar = index;
|
||||
}
|
||||
return retvar;
|
||||
}
|
||||
|
||||
s32 sub_809539C(u8 mailType, u32 param_2)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0]; index < 0x20; ptr++, index++)
|
||||
{
|
||||
if ((ptr->mailType == mailType) && (ptr->unk10 == param_2)) return index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 sub_80953D4(u8 mailType)
|
||||
{
|
||||
struct unkStruct_203B480 *ptr;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0]; index < 0x20; ptr++, index++)
|
||||
{
|
||||
if (ptr->mailType == mailType) return index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 sub_8095400(u32 param_1)
|
||||
{
|
||||
u32 *ptr;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, ptr = &gUnknown_203B480[0].unk10; index < 0x20; ptr += 0xC, index++)
|
||||
{
|
||||
if (*ptr == param_1) return index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void sub_809542C(struct unkStruct_809542C *param_1)
|
||||
{
|
||||
u32 uVar4;
|
||||
|
||||
#ifndef NONMATCHING
|
||||
register struct unkStruct_203B480 *preload asm("r2");
|
||||
#else
|
||||
struct unkStruct_203B480 *preload;
|
||||
#endif
|
||||
|
||||
u8 buffer [20];
|
||||
|
||||
gUnknown_203B480->mailType = 1;
|
||||
preload = gUnknown_203B480;
|
||||
uVar4 = param_1->unk4;
|
||||
preload->dungeon = param_1->unk0;
|
||||
preload->unk8 = uVar4;
|
||||
sub_8094D28(Random());
|
||||
gUnknown_203B480->unk10 = sub_8094E4C();
|
||||
gUnknown_203B480->clientSpecies = GetPlayerPokemonStruct()->speciesNum;
|
||||
PrintPokeNameToBuffer(buffer, GetPlayerPokemonStruct());
|
||||
CopyStringtoBuffer(gUnknown_203B480->playerName, buffer);
|
||||
gUnknown_203B480->unk24 = sub_8011C34();
|
||||
gUnknown_203B480->unk2C = GetUnk3(gUnknown_203B480->dungeon.dungeonIndex);
|
||||
}
|
||||
|
||||
void sub_8095494(struct unkStruct_809542C *param_1, u8 index)
|
||||
{
|
||||
u32 uVar1;
|
||||
struct DungeonLocation temp;
|
||||
struct unkStruct_203B480 *mail;
|
||||
|
||||
mail = gUnknown_203B480;
|
||||
mail += index;
|
||||
|
||||
temp = mail->dungeon;
|
||||
uVar1 = mail->unk8;
|
||||
param_1->unk0 = temp;
|
||||
param_1->unk4 = uVar1;
|
||||
}
|
||||
|
||||
u32 sub_80954B4(void)
|
||||
{
|
||||
if(sub_8095324(3) != 0)
|
||||
if(CountMailType(3) != 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
@ -114,15 +320,15 @@ void sub_8095774(struct unkStruct_8094924 * a, struct unkStruct_203B480 *b)
|
||||
{
|
||||
u8 temp;
|
||||
|
||||
RestoreIntegerBits(a, &b->unk0, 4);
|
||||
RestoreDungeonLocation(a, &b->unk4);
|
||||
RestoreIntegerBits(a, &b->mailType, 4);
|
||||
RestoreDungeonLocation(a, &b->dungeon);
|
||||
RestoreIntegerBits(a, &b->unk8, 0x18);
|
||||
RestoreIntegerBits(a, &b->unkC, 0x9);
|
||||
RestoreIntegerBits(a, &b->clientSpecies, 0x9);
|
||||
RestoreIntegerBits(a, &b->unk10, 0x20);
|
||||
RestoreIntegerBits(a, &b->unk14, 0x50);
|
||||
RestoreIntegerBits(a, &b->unk20, 0x8);
|
||||
RestoreIntegerBits(a, &b->unk21, 0x8);
|
||||
RestoreIntegerBits(a, &b->unk22, 0x8);
|
||||
RestoreIntegerBits(a, &b->playerName, 0x50);
|
||||
RestoreIntegerBits(a, &b->unk20.itemFlags, 0x8);
|
||||
RestoreIntegerBits(a, &b->unk20.numItems, 0x8);
|
||||
RestoreIntegerBits(a, &b->unk20.itemIndex, 0x8);
|
||||
RestoreIntegerBits(a, &b->unk24, 0x20);
|
||||
RestoreIntegerBits(a, &b->unk28, 0x20);
|
||||
RestoreIntegerBits(a, &b->unk2C, 0x8);
|
||||
@ -139,15 +345,15 @@ void sub_8095824(struct unkStruct_8094924 * a, struct unkStruct_203B480 *b)
|
||||
neg1 = -1;
|
||||
zero = 0;
|
||||
|
||||
SaveIntegerBits(a, &b->unk0, 4);
|
||||
SaveDungeonLocation(a, &b->unk4);
|
||||
SaveIntegerBits(a, &b->mailType, 4);
|
||||
SaveDungeonLocation(a, &b->dungeon);
|
||||
SaveIntegerBits(a, &b->unk8, 0x18);
|
||||
SaveIntegerBits(a, &b->unkC, 0x9);
|
||||
SaveIntegerBits(a, &b->clientSpecies, 0x9);
|
||||
SaveIntegerBits(a, &b->unk10, 0x20);
|
||||
SaveIntegerBits(a, &b->unk14, 0x50);
|
||||
SaveIntegerBits(a, &b->unk20, 0x8);
|
||||
SaveIntegerBits(a, &b->unk21, 0x8);
|
||||
SaveIntegerBits(a, &b->unk22, 0x8);
|
||||
SaveIntegerBits(a, &b->playerName, 0x50);
|
||||
SaveIntegerBits(a, &b->unk20.itemFlags, 0x8);
|
||||
SaveIntegerBits(a, &b->unk20.numItems, 0x8);
|
||||
SaveIntegerBits(a, &b->unk20.itemIndex, 0x8);
|
||||
SaveIntegerBits(a, &b->unk24, 0x20);
|
||||
SaveIntegerBits(a, &b->unk28, 0x20);
|
||||
SaveIntegerBits(a, &b->unk2C, 0x8);
|
||||
|
@ -3,12 +3,12 @@
|
||||
#include "item.h"
|
||||
#include "friend_area.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "sub_8095228.h"
|
||||
#include "wonder_mail.h"
|
||||
#include "constants/wonder_mail.h"
|
||||
#include "dungeon.h"
|
||||
#include "code_80958E8.h"
|
||||
|
||||
#include "pokemon.h"
|
||||
#include "code_8094F88.h"
|
||||
|
||||
extern s32 GetDungeonFloorCount(u8);
|
||||
extern bool8 sub_809017C(struct DungeonLocation *);
|
||||
@ -19,52 +19,52 @@ extern bool8 IsNotMoneyOrUsedTMItem(u8);
|
||||
extern u8 xxx_bit_lut_lookup_8091E50(u8 ,u8 );
|
||||
extern u32 GetMaxItemCount(u8);
|
||||
extern bool8 sub_803C0DC(s16);
|
||||
extern void sub_8096040(u8);
|
||||
extern void sub_80965B8(u8);
|
||||
extern void sub_8096C3C(u8);
|
||||
extern void ResetMailboxSlot(u8);
|
||||
extern void ResetPelipperBoardSlot(u8);
|
||||
extern void ResetJobSlot(u8);
|
||||
extern bool8 ValidateWonderMail(struct WonderMail *);
|
||||
|
||||
extern struct unkStruct_203B490 *gUnknown_203B490;
|
||||
extern struct unkStruct_203B490 gUnknown_2039448;
|
||||
|
||||
void sub_80958E8()
|
||||
void LoadMailInfo(void)
|
||||
{
|
||||
gUnknown_203B490 = &gUnknown_2039448;
|
||||
}
|
||||
|
||||
struct unkStruct_203B490 *sub_80958F8(void)
|
||||
struct unkStruct_203B490 *GetMailInfo(void)
|
||||
{
|
||||
return &gUnknown_2039448;
|
||||
}
|
||||
|
||||
void sub_8095900(void)
|
||||
void InitializeMailJobsNews(void)
|
||||
{
|
||||
s32 iVar2;
|
||||
for(iVar2 = 0; iVar2 < 4; iVar2++)
|
||||
s32 index;
|
||||
for(index = 0; index < 4; index++)
|
||||
{
|
||||
sub_8096040(iVar2);
|
||||
ResetMailboxSlot(index);
|
||||
}
|
||||
for(iVar2 = 0; iVar2 < 8; iVar2++)
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
sub_80965B8(iVar2);
|
||||
ResetPelipperBoardSlot(index);
|
||||
}
|
||||
for(iVar2 = 0; iVar2 < 8; iVar2++)
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
sub_8096C3C(iVar2);
|
||||
ResetJobSlot(index);
|
||||
}
|
||||
for(iVar2 = 0; iVar2 < 0x38; iVar2++)
|
||||
for(index = 0; index < 56; index++)
|
||||
{
|
||||
gUnknown_203B490->unk2F0[iVar2] = 0;
|
||||
gUnknown_203B490->PKMNNewsReceived[index] = FALSE;
|
||||
}
|
||||
gUnknown_203B490->unk328 = 0;
|
||||
gUnknown_203B490->unk328 = FALSE;
|
||||
MemoryClear8(gUnknown_203B490->unk190, sizeof(gUnknown_203B490->unk190));
|
||||
MemoryClear8(gUnknown_203B490->unk1B8, sizeof(gUnknown_203B490->unk1B8));
|
||||
for(iVar2 = 0; iVar2 < 16; iVar2++)
|
||||
for(index = 0; index < 16; index++)
|
||||
{
|
||||
gUnknown_203B490->unk230[iVar2].dungeon = 99;
|
||||
gUnknown_203B490->unk230[iVar2].unk1 = 1;
|
||||
gUnknown_203B490->unk230[iVar2].unk4 = 0;
|
||||
gUnknown_203B490->unk230[iVar2].unk8 = 0;
|
||||
gUnknown_203B490->unk230[index].dungeon.dungeonIndex = 99;
|
||||
gUnknown_203B490->unk230[index].dungeon.dungeonFloor = 1;
|
||||
gUnknown_203B490->unk230[index].unk4 = 0;
|
||||
gUnknown_203B490->unk230[index].unk8 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
373
src/code_80958E8_1.c
Normal file
373
src/code_80958E8_1.c
Normal file
@ -0,0 +1,373 @@
|
||||
#include "global.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/wonder_mail.h"
|
||||
#include "item.h"
|
||||
#include "code_80958E8.h"
|
||||
#include "team_inventory.h"
|
||||
#include "random.h"
|
||||
|
||||
struct unkStruct_8096AF8
|
||||
{
|
||||
bool8 unk0;
|
||||
u16 clientSpecies;
|
||||
u16 targetSpecies;
|
||||
};
|
||||
|
||||
extern u8 IsJobSlotEmpty(u8);
|
||||
extern struct WonderMail * GetJobSlotInfo(u8);
|
||||
extern bool8 IsValidWonderMail(struct WonderMail *WonderMailData);
|
||||
extern u8 sub_8095E38(struct WonderMail *, u8, u8, bool8);
|
||||
extern void sub_808CFD0(s32, s16, u8, u8, u32 *, u32);
|
||||
extern void ResetJobSlot(u8);
|
||||
extern void sub_8096C80(void);
|
||||
extern void sub_8096D24(void);
|
||||
extern void sub_80965F4();
|
||||
extern void SortPelipperJobs();
|
||||
extern struct WonderMail *GetPelipperBoardSlotInfo(u8);
|
||||
u8 sub_8097318(s16 param_1);
|
||||
extern u8 sub_8095B28(struct WonderMail *);
|
||||
|
||||
void SortPelipperJobs(void)
|
||||
{
|
||||
s32 index1;
|
||||
s32 index2;
|
||||
|
||||
struct WonderMail mail;
|
||||
|
||||
for(index1 = 0; index1 < 7; index1++)
|
||||
{
|
||||
for(index2 = index1 + 1; index2 < 8; index2++)
|
||||
{
|
||||
if(gUnknown_203B490->pelipperBoardJobs[index2].mailType != WONDER_MAIL_TYPE_NONE)
|
||||
{
|
||||
if((gUnknown_203B490->pelipperBoardJobs[index1].dungeon.dungeonIndex > gUnknown_203B490->pelipperBoardJobs[index2].dungeon.dungeonIndex) ||
|
||||
((gUnknown_203B490->pelipperBoardJobs[index1].dungeon.dungeonIndex == gUnknown_203B490->pelipperBoardJobs[index2].dungeon.dungeonIndex) && (gUnknown_203B490->pelipperBoardJobs[index1].dungeon.dungeonFloor > gUnknown_203B490->pelipperBoardJobs[index2].dungeon.dungeonFloor)))
|
||||
{
|
||||
mail = gUnknown_203B490->pelipperBoardJobs[index1];
|
||||
gUnknown_203B490->pelipperBoardJobs[index1] = gUnknown_203B490->pelipperBoardJobs[index2];
|
||||
gUnknown_203B490->pelipperBoardJobs[index2] = mail;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GeneratePelipperJobs(void)
|
||||
{
|
||||
s32 range;
|
||||
struct WonderMail *mail;
|
||||
s32 index;
|
||||
|
||||
range = RandomRange(4,8);
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
gUnknown_203B490->pelipperBoardJobs[index].mailType = WONDER_MAIL_TYPE_NONE;
|
||||
}
|
||||
|
||||
index = 0;
|
||||
if (sub_8097318(0xe) != 0) {
|
||||
mail = GetPelipperBoardSlotInfo(0);
|
||||
mail->mailType = 2;
|
||||
mail->missionType = WONDER_MAIL_MISSION_TYPE_UNK6;
|
||||
mail->unk2 = 1;
|
||||
mail->dungeon.dungeonIndex = DUNGEON_UPROAR_FOREST;
|
||||
mail->dungeon.dungeonFloor = 10;
|
||||
mail->unk8 = Random() & 0xffffff;
|
||||
mail->clientSpecies = SPECIES_WYNAUT;
|
||||
mail->targetSpecies = SPECIES_MANKEY;
|
||||
mail->targetItem = 0;
|
||||
mail->rewardType = ITEM;
|
||||
mail->itemReward = ITEM_ID_REVIVER_SEED;
|
||||
mail->friendAreaReward = 0;
|
||||
index = 1;
|
||||
}
|
||||
|
||||
|
||||
if (sub_8097318(0xf) != 0) {
|
||||
mail = GetPelipperBoardSlotInfo(index);
|
||||
mail->mailType = 3;
|
||||
mail->missionType = WONDER_MAIL_MISSION_TYPE_UNK6;
|
||||
mail->unk2 = 2;
|
||||
mail->dungeon.dungeonIndex = DUNGEON_HOWLING_FOREST;
|
||||
mail->dungeon.dungeonFloor = 15;
|
||||
mail->unk8 = Random() & 0xffffff;
|
||||
mail->clientSpecies = SPECIES_SMEARGLE;
|
||||
mail->targetSpecies = SPECIES_SMEARGLE;
|
||||
mail->targetItem = 0;
|
||||
mail->rewardType = ITEM;
|
||||
mail->itemReward = ITEM_ID_REVIVER_SEED;
|
||||
mail->friendAreaReward = 0;
|
||||
index++;
|
||||
}
|
||||
|
||||
if (sub_8097318(0x1c) != 0) {
|
||||
mail = GetPelipperBoardSlotInfo(index);
|
||||
mail->mailType = 4;
|
||||
mail->missionType = WONDER_MAIL_MISSION_TYPE_UNK6;
|
||||
mail->unk2 = 3;
|
||||
mail->dungeon.dungeonIndex = DUNGEON_WISH_CAVE;
|
||||
mail->dungeon.dungeonFloor = 20;
|
||||
mail->unk8 = Random() & 0xffffff;
|
||||
mail->clientSpecies = SPECIES_MEDICHAM;
|
||||
mail->targetSpecies = SPECIES_MEDICHAM;
|
||||
mail->targetItem = 0;
|
||||
mail->rewardType = ITEM;
|
||||
mail->itemReward = ITEM_ID_REVIVER_SEED;
|
||||
mail->friendAreaReward = 0;
|
||||
index++;
|
||||
}
|
||||
for (; index <= range; index++) {
|
||||
if (sub_8095B28(&gUnknown_203B490->pelipperBoardJobs[index]) == 0) break;
|
||||
gUnknown_203B490->pelipperBoardJobs[index].rewardType = RandomRange(MONEY, BLANK_4);
|
||||
}
|
||||
sub_80965F4();
|
||||
SortPelipperJobs();
|
||||
}
|
||||
|
||||
bool8 IsMailinJobSlot(struct WonderMail *mail)
|
||||
{
|
||||
struct WonderMail *jobSlot;
|
||||
s32 index;
|
||||
|
||||
for(index = 0, jobSlot = &gUnknown_203B490->jobSlots[0]; index < 8; jobSlot++, index++)
|
||||
{
|
||||
if(jobSlot->mailType != WONDER_MAIL_TYPE_NONE)
|
||||
if(mail->missionType == jobSlot->missionType)
|
||||
if(mail->unk2 == jobSlot->unk2)
|
||||
if(mail->dungeon.dungeonIndex == jobSlot->dungeon.dungeonIndex)
|
||||
if(mail->dungeon.dungeonFloor == jobSlot->dungeon.dungeonFloor)
|
||||
if(mail->unk8 == jobSlot->unk8)
|
||||
if(mail->clientSpecies == jobSlot->clientSpecies)
|
||||
if(mail->targetSpecies == jobSlot->targetSpecies)
|
||||
if(mail->targetItem == jobSlot->targetItem)
|
||||
if(mail->rewardType == jobSlot->rewardType)
|
||||
if(mail->itemReward == jobSlot->itemReward)
|
||||
if(mail->friendAreaReward == jobSlot->friendAreaReward)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_809693C(struct WonderMail *mail)
|
||||
{
|
||||
u8 dungeonIndex;
|
||||
u8 floor;
|
||||
bool8 escortMission;
|
||||
s32 index;
|
||||
|
||||
dungeonIndex = mail->dungeon.dungeonIndex;
|
||||
floor = mail->dungeon.dungeonFloor;
|
||||
escortMission = FALSE;
|
||||
if (!IsValidWonderMail(mail)) {
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mail->missionType == WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT)
|
||||
escortMission = TRUE;
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
if ((gUnknown_203B490->jobSlots[index].mailType == 6) &&
|
||||
(sub_8095E38(&gUnknown_203B490->jobSlots[index],dungeonIndex,floor,escortMission) != 0))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 GetNumAcceptedJobs(void)
|
||||
{
|
||||
s32 index;
|
||||
s32 count;
|
||||
|
||||
count = 0;
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
if (!IsJobSlotEmpty(index)) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
s32 CountJobsinDungeon(u8 dungeon)
|
||||
{
|
||||
struct WonderMail *mail;
|
||||
s32 index;
|
||||
s32 count;
|
||||
|
||||
count = 0;
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
mail = GetJobSlotInfo(index);
|
||||
if ((mail->dungeon.dungeonIndex == dungeon) &&
|
||||
(((mail->mailType == 6 || (mail->mailType == 8)) || (mail->mailType == 9)))) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
bool8 sub_8096A08(u8 dungeon, s32 param_2)
|
||||
{
|
||||
struct WonderMail *mail;
|
||||
s32 index;
|
||||
u32 local_14;
|
||||
s32 temp;
|
||||
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
mail = GetJobSlotInfo(index);
|
||||
if(mail->dungeon.dungeonIndex == dungeon)
|
||||
if(mail->mailType == 6)
|
||||
if(mail->missionType == WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT)
|
||||
{
|
||||
temp = 0xffffff00;
|
||||
local_14 &= temp;
|
||||
temp = 0x4A;
|
||||
local_14 |= temp;
|
||||
|
||||
temp = 0xffff00ff;
|
||||
local_14 &= temp;
|
||||
temp = 0x100;
|
||||
local_14 |= temp;
|
||||
|
||||
sub_808CFD0(param_2,mail->clientSpecies,0,0,&local_14,0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_8096A78(struct WonderMail *mail)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
if(gUnknown_203B490->jobSlots[index].mailType == WONDER_MAIL_TYPE_NONE)
|
||||
{
|
||||
gUnknown_203B490->jobSlots[index] = *mail;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
struct WonderMail *GetJobSlotInfo(u8 index)
|
||||
{
|
||||
return &gUnknown_203B490->jobSlots[index];
|
||||
}
|
||||
|
||||
bool8 IsJobSlotEmpty(u8 index)
|
||||
{
|
||||
if(gUnknown_203B490->jobSlots[index].mailType == WONDER_MAIL_TYPE_NONE)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_8096AF8(struct unkStruct_8096AF8 *param_1, u8 slotIndex,u8 dungeon)
|
||||
{
|
||||
struct WonderMail *jobSlot;
|
||||
struct ItemSlot *item;
|
||||
s32 index;
|
||||
|
||||
jobSlot = GetJobSlotInfo(slotIndex);
|
||||
param_1->unk0 = FALSE;
|
||||
param_1->clientSpecies = jobSlot->clientSpecies;
|
||||
param_1->targetSpecies = SPECIES_NONE;
|
||||
if (jobSlot->dungeon.dungeonIndex == dungeon) {
|
||||
switch(jobSlot->missionType) {
|
||||
case WONDER_MAIL_MISSION_TYPE_FIND_ITEM:
|
||||
if (jobSlot->mailType == 6) {
|
||||
for(index = 0; index < INVENTORY_SIZE; index++)
|
||||
{
|
||||
item = &gTeamInventory_203B460->teamItems[index];
|
||||
if (((item->itemFlags & ITEM_FLAG_EXISTS)) && (item->itemIndex == jobSlot->targetItem)) {
|
||||
param_1->unk0 = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WONDER_MAIL_MISSION_TYPE_RESCUE_CLIENT:
|
||||
case WONDER_MAIL_MISSION_TYPE_DELIVER_ITEM:
|
||||
if (jobSlot->mailType == 9) {
|
||||
param_1->unk0 = TRUE;
|
||||
}
|
||||
break;
|
||||
case WONDER_MAIL_MISSION_TYPE_RESCUE_TARGET:
|
||||
case WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT:
|
||||
if (jobSlot->mailType == 9) {
|
||||
param_1->unk0 = TRUE;
|
||||
param_1->targetSpecies = jobSlot->targetSpecies;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
s16 sub_8096B98(u8 dungeon)
|
||||
{
|
||||
struct WonderMail *mail;
|
||||
s32 index;
|
||||
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
mail = GetJobSlotInfo(index);
|
||||
if(mail->mailType == 6)
|
||||
if(mail->missionType == WONDER_MAIL_MISSION_TYPE_ESCORT_CLIENT)
|
||||
if(mail->dungeon.dungeonIndex == dungeon)
|
||||
return mail->targetSpecies;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_8096BD0(void)
|
||||
{
|
||||
s32 index;
|
||||
struct WonderMail *mail;
|
||||
|
||||
for(mail = &gUnknown_203B490->jobSlots[0], index = 0; index < 8; mail++, index++)
|
||||
{
|
||||
switch(mail->mailType)
|
||||
{
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
ResetJobSlot(index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
sub_8096C80();
|
||||
sub_8096D24();
|
||||
}
|
||||
|
||||
bool8 sub_8096C08(u8 *param_1)
|
||||
{
|
||||
s32 index;
|
||||
struct WonderMail *mail;
|
||||
|
||||
for(mail = &gUnknown_203B490->jobSlots[0], index = 0; index < 8; mail++, index++)
|
||||
{
|
||||
if(mail->mailType > 4 && mail->unk2 == 4)
|
||||
{
|
||||
|
||||
param_1[0] = index;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void ResetJobSlot(u8 index)
|
||||
{
|
||||
gUnknown_203B490->jobSlots[index].mailType = WONDER_MAIL_TYPE_NONE;
|
||||
gUnknown_203B490->jobSlots[index].dungeon.dungeonIndex = 99;
|
||||
gUnknown_203B490->jobSlots[index].dungeon.dungeonFloor = 0;
|
||||
gUnknown_203B490->jobSlots[index].rewardType = MONEY1;
|
||||
}
|
@ -1,62 +1,40 @@
|
||||
#include "global.h"
|
||||
#include "pokemon.h"
|
||||
#include "wonder_mail.h"
|
||||
|
||||
struct subStruct_203B490
|
||||
{
|
||||
// size: 0xC
|
||||
struct DungeonLocation dungeon;
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
};
|
||||
|
||||
struct unkStruct_203B490
|
||||
{
|
||||
// size: 0x330?
|
||||
|
||||
struct WonderMail unk0[4];
|
||||
struct WonderMail unk50[8];
|
||||
struct WonderMail unkF0[8];
|
||||
u8 unk190[0x28];
|
||||
u8 unk1B8[0x78];
|
||||
struct subStruct_203B490 unk230[16];
|
||||
u8 unk2F0[0x38];
|
||||
u8 unk328;
|
||||
};
|
||||
extern struct unkStruct_203B490 *gUnknown_203B490;
|
||||
#include "code_80958E8.h"
|
||||
|
||||
void SaveWonderMail(struct unkStruct_8094924 *a, struct WonderMail *b);
|
||||
void RestoreWonderMail(struct unkStruct_8094924 *a, struct WonderMail *b);
|
||||
extern s32 sub_8096EB0(void);
|
||||
extern s32 sub_8096EB0(struct WonderMail *);
|
||||
extern void SaveDungeonLocation(struct unkStruct_8094924*, struct DungeonLocation*);
|
||||
extern void RestoreDungeonLocation(struct unkStruct_8094924*, struct DungeonLocation*);
|
||||
extern void sub_80015C0(u32, u32);
|
||||
extern u32 sub_8001784(u32, u32, u16);
|
||||
extern void sub_809674C();
|
||||
extern void GeneratePelipperJobs(void);
|
||||
extern void sub_800199C(u32, s32, u32, s32);
|
||||
|
||||
bool8 sub_8096F50(struct WonderMail *r0)
|
||||
bool8 sub_8096F50(struct WonderMail *mail)
|
||||
{
|
||||
s32 index;
|
||||
s32 temp2;
|
||||
struct subStruct_203B490 *temp;
|
||||
|
||||
temp2 = sub_8096EB0();
|
||||
temp2 = sub_8096EB0(mail);
|
||||
|
||||
|
||||
for(index = 0; index < 0x10; index++)
|
||||
{
|
||||
temp = &gUnknown_203B490->unk230[index];
|
||||
if(temp->dungeon.dungeonIndex == r0->dungeon.dungeonIndex)
|
||||
if(temp->dungeon.dungeonFloor == r0->dungeon.dungeonFloor)
|
||||
if(temp->unk4 == r0->unk8)
|
||||
if(temp->dungeon.dungeonIndex == mail->dungeon.dungeonIndex)
|
||||
if(temp->dungeon.dungeonFloor == mail->dungeon.dungeonFloor)
|
||||
if(temp->unk4 == mail->unk8)
|
||||
if(temp->unk8 == temp2)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u32 sub_8096FA0(u8 *r0, u32 size)
|
||||
u32 RestoreMailInfo(u8 *r0, u32 size)
|
||||
{
|
||||
s32 index;
|
||||
struct unkStruct_8094924 backup;
|
||||
@ -65,29 +43,29 @@ u32 sub_8096FA0(u8 *r0, u32 size)
|
||||
xxx_init_struct_8094924_restore_809485C(&backup, r0, size);
|
||||
for(index = 0; index < 4; index++)
|
||||
{
|
||||
RestoreWonderMail(&backup, &gUnknown_203B490->unk0[index]);
|
||||
RestoreWonderMail(&backup, &gUnknown_203B490->mailboxSlots[index]);
|
||||
}
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
RestoreWonderMail(&backup, &gUnknown_203B490->unk50[index]);
|
||||
RestoreWonderMail(&backup, &gUnknown_203B490->pelipperBoardJobs[index]);
|
||||
}
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
RestoreWonderMail(&backup, &gUnknown_203B490->unkF0[index]);
|
||||
RestoreWonderMail(&backup, &gUnknown_203B490->jobSlots[index]);
|
||||
}
|
||||
for(index = 0; index < 0x38; index++)
|
||||
{
|
||||
RestoreIntegerBits(&backup, &temp, 1);
|
||||
if(temp & 1)
|
||||
gUnknown_203B490->unk2F0[index] = 1;
|
||||
gUnknown_203B490->PKMNNewsReceived[index] = TRUE;
|
||||
else
|
||||
gUnknown_203B490->unk2F0[index] = 0;
|
||||
gUnknown_203B490->PKMNNewsReceived[index] = FALSE;
|
||||
}
|
||||
RestoreIntegerBits(&backup, &temp, 1);
|
||||
if(temp & 1)
|
||||
gUnknown_203B490->unk328 = 1;
|
||||
gUnknown_203B490->unk328 = TRUE;
|
||||
else
|
||||
gUnknown_203B490->unk328 = 0;
|
||||
gUnknown_203B490->unk328 = FALSE;
|
||||
|
||||
RestoreIntegerBits(&backup, gUnknown_203B490->unk190, 0x140);
|
||||
RestoreIntegerBits(&backup, gUnknown_203B490->unk1B8, 0x3C0);
|
||||
@ -101,7 +79,7 @@ u32 sub_8096FA0(u8 *r0, u32 size)
|
||||
return backup.unk8;
|
||||
}
|
||||
|
||||
u32 sub_80970D8(u8 *r0, u32 size)
|
||||
u32 SaveMailInfo(u8 *r0, u32 size)
|
||||
{
|
||||
s32 index;
|
||||
struct unkStruct_8094924 backup;
|
||||
@ -110,25 +88,25 @@ u32 sub_80970D8(u8 *r0, u32 size)
|
||||
xxx_init_struct_8094924_save_809486C(&backup, r0, size);
|
||||
for(index = 0; index < 4; index++)
|
||||
{
|
||||
SaveWonderMail(&backup, &gUnknown_203B490->unk0[index]);
|
||||
SaveWonderMail(&backup, &gUnknown_203B490->mailboxSlots[index]);
|
||||
}
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
SaveWonderMail(&backup, &gUnknown_203B490->unk50[index]);
|
||||
SaveWonderMail(&backup, &gUnknown_203B490->pelipperBoardJobs[index]);
|
||||
}
|
||||
for(index = 0; index < 8; index++)
|
||||
{
|
||||
SaveWonderMail(&backup, &gUnknown_203B490->unkF0[index]);
|
||||
SaveWonderMail(&backup, &gUnknown_203B490->jobSlots[index]);
|
||||
}
|
||||
for(index = 0; index < 0x38; index++)
|
||||
{
|
||||
if(gUnknown_203B490->unk2F0[index] != 0)
|
||||
if(gUnknown_203B490->PKMNNewsReceived[index] != 0)
|
||||
temp = -1;
|
||||
else
|
||||
temp = 0;
|
||||
SaveIntegerBits(&backup, &temp, 1);
|
||||
}
|
||||
if(gUnknown_203B490->unk328 != 0)
|
||||
if(gUnknown_203B490->unk328)
|
||||
temp = -1;
|
||||
else
|
||||
temp = 0;
|
||||
@ -221,7 +199,7 @@ void sub_809733C(short param_1,u32 param_2)
|
||||
case 0xE:
|
||||
case 0xF:
|
||||
case 0x1C:
|
||||
sub_809674C();
|
||||
GeneratePelipperJobs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ struct DungeonLocation *GetDungeonLocationInfo(void)
|
||||
|
||||
void sub_80976A8(void)
|
||||
{
|
||||
s32 iVar2;
|
||||
s32 index;
|
||||
|
||||
gUnknown_203B494->unk0 = 0;
|
||||
gUnknown_203B494->unk14 = 0;
|
||||
@ -56,14 +56,14 @@ void sub_80976A8(void)
|
||||
gUnknown_203B494->unk8 = 0;
|
||||
gUnknown_203B494->unkC = 0;
|
||||
|
||||
for(iVar2 = 0; iVar2 < 0xE; iVar2++)
|
||||
for(index = 0; index < 0xE; index++)
|
||||
{
|
||||
gUnknown_203B494->unk1C[iVar2] = 0;
|
||||
gUnknown_203B494->unk1C[index] = 0;
|
||||
}
|
||||
|
||||
for(iVar2 = 0; iVar2 < 0xD; iVar2++)
|
||||
for(index = 0; index < 0xD; index++)
|
||||
{
|
||||
gUnknown_203B494->unk8C[iVar2] = 0;
|
||||
gUnknown_203B494->unk8C[index] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
43
src/data/trade_items.h
Normal file
43
src/data/trade_items.h
Normal file
@ -0,0 +1,43 @@
|
||||
const u8 gUnknown_80E61A4[] = "What would you like to do? ";
|
||||
const u8 gUnknown_80E61C0[] = "Please choose the item to be sent.";
|
||||
ALIGNED(4) const u8 gUnknown_80E61E4[] = _("{COLOR_1 LIGHT_BLUE_2}$d0{END_COLOR_TEXT_1} {COLOR_1 GREEN_2}{ARG_MOVE_ITEM_0}(s){END_COLOR_TEXT_1}\n"
|
||||
"will be sent.\n"
|
||||
"Is that OK?");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80E6214[] = _("Your friend will send you an item.\n"
|
||||
"When you are both ready{COMMA} you\n"
|
||||
"may communicate.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80E6268[] = _("Preparing to send an item to your\n"
|
||||
"friend. When you are both ready{COMMA}\n"
|
||||
"you may communicate.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80E62C4[] = _("{CENTER_ALIGN}In communication...\n"
|
||||
"{CENTER_ALIGN}Please wait with the power on.\n"
|
||||
"{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80E6314[] = _("You received\n"
|
||||
"{COLOR_1 LIGHT_BLUE_2}$d0{END_COLOR_TEXT_1} {COLOR_1 GREEN_2}{ARG_MOVE_ITEM_0}(s){END_COLOR_TEXT_1}.\n"
|
||||
"Your adventure will be saved.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80E6358[] = _("You sent {COLOR_1 LIGHT_BLUE_2}$d0{END_COLOR_TEXT_1} {COLOR_1 GREEN_2}{ARG_MOVE_ITEM_0}(s){END_COLOR_TEXT_1}.");
|
||||
|
||||
// Trade Items Menu Link Error Messages
|
||||
const u8 gTradeItemsCommunicationError[] = "There was a communication error.";
|
||||
const u8 gUnknown_80E639C[] = "An incorrect number of GBA systems are\n"
|
||||
"connected.\n"
|
||||
"Please redo this process from the start.";
|
||||
|
||||
const u8 gUnknown_80E63F8[] = "There is no response from your friend.\n"
|
||||
"Please redo this process from the start.";
|
||||
|
||||
const u8 gUnknown_80E6448[] = "The sender and receiver appear to be\n"
|
||||
"in different modes.\n"
|
||||
"Please redo the process from the start.";
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80E64AC[] = _("There is no response from your friend.\n"
|
||||
"Please make sure the sender and receiver\n"
|
||||
"are ready{COMMA} then redo this from the start.");
|
||||
|
||||
const u8 gTradeItemsHowManyText[] = "How many?";
|
||||
static const u8 aligner[] = "pksdir0";
|
@ -4,6 +4,8 @@
|
||||
#include "constants/item.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/type.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_engine.h"
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_global_data.h"
|
||||
@ -12,6 +14,8 @@
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "map.h"
|
||||
#include "pokemon.h"
|
||||
#include "weather.h"
|
||||
|
||||
bool8 CanCrossWalls(struct DungeonEntity *pokemon)
|
||||
{
|
||||
@ -71,3 +75,169 @@ bool8 sub_807049C(struct DungeonEntity *pokemon, struct Position *pos)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8070564(struct DungeonEntity *pokemon, struct Position *pos)
|
||||
{
|
||||
u8 crossableTerrain;
|
||||
struct MapTile *tile;
|
||||
u16 tileFlags;
|
||||
struct DungeonEntityData *entityData;
|
||||
#ifndef NONMATCHING
|
||||
register s32 tileFlags_0 asm("r0");
|
||||
register s32 crossableTerrain2 asm("r3");
|
||||
#else
|
||||
s32 tileFlags_0;
|
||||
s32 crossableTerrain2;
|
||||
#endif
|
||||
|
||||
entityData = pokemon->entityData;
|
||||
tile = GetMapTile_1(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->tileType & TILE_TYPE_MAP_EDGE) == 0)) &&
|
||||
(tile->pokemon == NULL || (GetEntityType(tile->pokemon) == ENTITY_POKEMON))) {
|
||||
crossableTerrain2 = crossableTerrain = GetCrossableTerrain(entityData->entityID);
|
||||
tileFlags_0 = tileFlags = tile->tileType & (TILE_TYPE_FLOOR | TILE_TYPE_LIQUID);
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_WALL: // 3
|
||||
case CROSSABLE_TERRAIN_CREVICE: // 2
|
||||
case 4 ... INT_MAX:
|
||||
if (crossableTerrain2 > CROSSABLE_TERRAIN_WALL) return FALSE;
|
||||
if(tileFlags != 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_REGULAR: // 0
|
||||
if(tileFlags == TILE_TYPE_FLOOR)
|
||||
default:
|
||||
return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_LIQUID: // 1
|
||||
if(tileFlags == TILE_TYPE_LIQUID) return FALSE;
|
||||
if (tileFlags_0 == TILE_TYPE_FLOOR) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_80705F0(struct DungeonEntity *pokemon, struct Position *pos)
|
||||
{
|
||||
s32 crossableTerrain;
|
||||
struct MapTile *tile;
|
||||
u16 tileFlags;
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
entityData = pokemon->entityData;
|
||||
tile = GetMapTile_1(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->tileType & TILE_TYPE_MAP_EDGE) == 0)) &&
|
||||
((tile->pokemon == NULL) || ((GetEntityType(tile->pokemon) == ENTITY_POKEMON)))) {
|
||||
if (IsFixedDungeon() || (entityData->transformStatus != TRANSFORM_STATUS_MOBILE && !HasItem(pokemon, ITEM_ID_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityData->entityID);
|
||||
tileFlags = tile->tileType & (TILE_TYPE_FLOOR | TILE_TYPE_LIQUID);
|
||||
if (HasIQSkill(pokemon, IQ_SKILL_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (HasIQSkill(pokemon, IQ_SKILL_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
}
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_80706A4(struct DungeonEntity *pokemon, struct Position *pos)
|
||||
{
|
||||
s32 crossableTerrain;
|
||||
struct MapTile *tile;
|
||||
u16 tileFlags;
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
entityData = pokemon->entityData;
|
||||
tile = GetMapTile_1(pos->x, pos->y);
|
||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->tileType & TILE_TYPE_MAP_EDGE) == 0)) &&
|
||||
((tile->pokemon == NULL) || ((GetEntityType(tile->pokemon) == ENTITY_POKEMON) && (tile->pokemon->entityData == entityData)))) {
|
||||
if (IsFixedDungeon() || (entityData->transformStatus != TRANSFORM_STATUS_MOBILE && !HasItem(pokemon, ITEM_ID_MOBILE_SCARF))) {
|
||||
crossableTerrain = GetCrossableTerrain(entityData->entityID);
|
||||
tileFlags = tile->tileType & (TILE_TYPE_FLOOR | TILE_TYPE_LIQUID);
|
||||
if (HasIQSkill(pokemon, IQ_SKILL_ALL_TERRAIN_HIKER)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||
}
|
||||
if (HasIQSkill(pokemon, IQ_SKILL_SUPER_MOBILE)) {
|
||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||
}
|
||||
switch(crossableTerrain)
|
||||
{
|
||||
case CROSSABLE_TERRAIN_LIQUID:
|
||||
if(tileFlags == TILE_TYPE_LIQUID) return FALSE;
|
||||
case CROSSABLE_TERRAIN_REGULAR:
|
||||
if(tileFlags == TILE_TYPE_FLOOR) return FALSE;
|
||||
break;
|
||||
case CROSSABLE_TERRAIN_WALL:
|
||||
default:
|
||||
return FALSE;
|
||||
case CROSSABLE_TERRAIN_CREVICE:
|
||||
if(tileFlags != 0) return FALSE;
|
||||
}
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
s32 GetMovementSpeed(struct DungeonEntity *pokemon)
|
||||
{
|
||||
s32 index;
|
||||
s32 speed;
|
||||
struct DungeonEntityData * entityData;
|
||||
|
||||
entityData = pokemon->entityData;
|
||||
speed = 0;
|
||||
|
||||
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
|
||||
{
|
||||
if (entityData->speedUpTurnsLeft[index + NUM_SPEED_TURN_COUNTERS] != 0) {
|
||||
speed--;
|
||||
}
|
||||
if (entityData->speedUpTurnsLeft[index] != 0) {
|
||||
speed++;
|
||||
}
|
||||
}
|
||||
|
||||
if (entityData->nonVolatileStatus == NON_VOLATILE_STATUS_PARALYZED) {
|
||||
speed--;
|
||||
}
|
||||
|
||||
speed += GetMoveSpeed(entityData->entityID);
|
||||
if ((HasType(pokemon, TYPE_ICE)) && (GetWeather(pokemon) == WEATHER_SNOW)) {
|
||||
speed++;
|
||||
}
|
||||
if (entityData->transformSpecies == SPECIES_DEOXYS_SPEED) {
|
||||
speed++;
|
||||
}
|
||||
if ((entityData->entityID == SPECIES_KECLEON) && entityData->isEnemy &&
|
||||
gDungeonGlobalData->unk66E) {
|
||||
speed++;
|
||||
}
|
||||
if (speed < 0) {
|
||||
speed = 0;
|
||||
}
|
||||
if (MAX_MOVEMENT_SPEED < speed) {
|
||||
speed = MAX_MOVEMENT_SPEED;
|
||||
}
|
||||
entityData->movementSpeed = speed;
|
||||
return speed;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ extern void sub_80709C8(u8 *buffer, struct DungeonEntityData *entityData);
|
||||
void FadeOutAllMusic(u16);
|
||||
void xxx_call_stop_bgm(void);
|
||||
|
||||
void sub_8083AB0(s16 param_0, struct DungeonEntity * target, struct DungeonEntity * enity)
|
||||
void sub_8083AB0(s16 param_0, struct DungeonEntity * target, struct DungeonEntity * entity)
|
||||
{
|
||||
u8 *defPtr;
|
||||
u8 *attackPtr;
|
||||
@ -46,7 +46,7 @@ void sub_8083AB0(s16 param_0, struct DungeonEntity * target, struct DungeonEntit
|
||||
if ((EntityExists(target)) && (GetEntityType(target) == ENTITY_POKEMON)) {
|
||||
targetEntityData = target->entityData;
|
||||
}
|
||||
entityData = enity->entityData;
|
||||
entityData = entity->entityData;
|
||||
if (targetEntityData != NULL) {
|
||||
sub_80709C8(buffer, targetEntityData);
|
||||
CopyStringtoBuffer(temp->buffer1, buffer);
|
||||
@ -188,7 +188,7 @@ void sub_8083D88(void)
|
||||
PlayFanfareSE(0xCC, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D98(void)
|
||||
void PlayDungeonFailBGM(void)
|
||||
{
|
||||
DungeonStartNewBGM(MUS_DUNGEON_FAIL);
|
||||
gDungeonGlobalData->unk66F = 0;
|
||||
@ -197,7 +197,7 @@ void sub_8083D98(void)
|
||||
gDungeonGlobalData->unk66A = 999;
|
||||
}
|
||||
|
||||
void sub_8083DE0(void)
|
||||
void PlayDungeonCompleteBGM(void)
|
||||
{
|
||||
DungeonStartNewBGM(MUS_DUNGEON_COMPLETE);
|
||||
gDungeonGlobalData->unk66F = 0;
|
||||
|
@ -13,10 +13,6 @@ extern struct UnkTextStruct2 gUnknown_80DD74C;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD704;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD6EC;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD71C;
|
||||
extern const char gUnknown_80DD764[];
|
||||
extern const char gUnknown_80DD7FC[];
|
||||
extern const char gUnknown_80DD8A0[];
|
||||
extern const char gUnknown_80DD8D0[];
|
||||
|
||||
extern void sub_80141B4(const char *r0, u32, u32 *r1, u32);
|
||||
extern void sub_8014248(const char *r0, u32, u32, struct MenuItem *r4, u32, u32, u32, u32 *r5, u32);
|
||||
@ -58,6 +54,27 @@ extern void sub_8027D00();
|
||||
extern void CreateFriendActionMenu();
|
||||
extern void sub_80276A8();
|
||||
|
||||
ALIGNED(4) const u8 gFriendAreaActionSayFarewellPrompt[] = _(
|
||||
"You have chosen to say farewell\n"
|
||||
"to this Pokémon.{EXTRA_MSG}"
|
||||
"The Pokémon will leave its Friend Area.\n"
|
||||
"It will no longer be available for\n"
|
||||
"adventures. Is that OK?");
|
||||
|
||||
ALIGNED(4) const u8 gFriendAreaActionSayFarewellConfirm[] = _(
|
||||
"If you say farewell to this\n"
|
||||
"Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
|
||||
"You will never be able to get another one\n"
|
||||
"like it to join your team.\n"
|
||||
"Will you release it anyway?");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80DD8A0[] = _(
|
||||
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
"{CENTER_ALIGN}returned to the Toolbox.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80DD8D0[] = _(
|
||||
"{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n{CENTER_ALIGN}sent to storage.");
|
||||
|
||||
|
||||
u32 sub_8027074(void)
|
||||
{
|
||||
@ -139,7 +156,7 @@ void SetFriendAreaActionMenuState(u32 newState)
|
||||
|
||||
void sub_802719C(void)
|
||||
{
|
||||
s32 iVar3;
|
||||
s32 index;
|
||||
|
||||
sub_8006518(gUnknown_203B2BC->unk180);
|
||||
switch(gUnknown_203B2BC->state)
|
||||
@ -156,9 +173,9 @@ void sub_802719C(void)
|
||||
sub_8012CAC(&gUnknown_203B2BC->unk180[2], gUnknown_203B2BC->menuItems);
|
||||
break;
|
||||
default:
|
||||
for(iVar3 = 0; iVar3 < 4; iVar3++)
|
||||
for(index = 0; index < 4; index++)
|
||||
{
|
||||
gUnknown_203B2BC->unk180[iVar3] = gUnknown_80DD6EC;
|
||||
gUnknown_203B2BC->unk180[index] = gUnknown_80DD6EC;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -214,19 +231,11 @@ void sub_8027274(void)
|
||||
break;
|
||||
case 8:
|
||||
sub_8027794();
|
||||
// You have chosen to say farewell to this Pokemon.
|
||||
// The pokemon will leave its friend area.
|
||||
// It will no longer be available for adventures.
|
||||
// Is that OK?
|
||||
sub_8014248(gUnknown_80DD764,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
|
||||
sub_8014248(gFriendAreaActionSayFarewellPrompt,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
|
||||
break;
|
||||
case 9:
|
||||
sub_8027794();
|
||||
// If you say farewell to this Pokemon, it will be gone forever.
|
||||
// You will never be able to get another one
|
||||
// like it to join your team.
|
||||
// Will you release it anyway?
|
||||
sub_8014248(gUnknown_80DD7FC,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
|
||||
sub_8014248(gFriendAreaActionSayFarewellConfirm,0,3,gUnknown_203B2BC->menuItems,0,4,0,0,0x101);
|
||||
break;
|
||||
case 0x10:
|
||||
sub_8093560(gUnknown_203B2BC->unk20,gUnknown_203B2BC->unk28,&gUnknown_203B2BC->unk68);
|
||||
|
@ -33,8 +33,7 @@ extern struct PokemonStruct *sub_808D3F8(void);
|
||||
extern struct PokemonStruct *sub_808D3BC(void);
|
||||
extern u32 sub_801F890(void);
|
||||
extern void sub_801F8D0(void);
|
||||
extern u8 gUnknown_80DD958[];
|
||||
extern void xxx_format_and_draw(u32, u32, u8 *, ...);
|
||||
extern void xxx_format_and_draw(u32, u32, const u8 *, ...);
|
||||
extern void sub_8008C54(u32);
|
||||
extern void sub_80073B8(u32);
|
||||
extern void sub_80073E0(u32);
|
||||
@ -56,6 +55,20 @@ extern void sub_808ED00();
|
||||
extern s16 sub_8023B44(void);
|
||||
extern void sub_8023C60(void);
|
||||
|
||||
ALIGNED(4) const u8 gFriendActionStandby[] = "Stand By";
|
||||
ALIGNED(4) const u8 gFriendActionMakeLeader[] = "Make Leader";
|
||||
ALIGNED(4) const u8 gFriendActionJoinTeam[] = "Join Team";
|
||||
ALIGNED(4) const u8 gFriendActionSayFarewell[] = "Say Farewell";
|
||||
ALIGNED(4) const u8 gFriendActionGive[] = "Give";
|
||||
ALIGNED(4) const u8 gFriendActionTake[] = "Take";
|
||||
ALIGNED(4) const u8 gFriendActionSummary[] = "Summary";
|
||||
ALIGNED(4) const u8 gFriendActionMoves[] = "Moves";
|
||||
ALIGNED(4) const u8 gFriendActionCheckIQ[] = "Check IQ";
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_80DD958[] = _("Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} ");
|
||||
static const u8 filler[] = "pksdir0";
|
||||
|
||||
|
||||
void sub_80277FC(void)
|
||||
{
|
||||
struct PokemonStruct *pokeStruct;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "item.h"
|
||||
#include "pokemon.h"
|
||||
#include "text.h"
|
||||
@ -40,7 +41,7 @@ extern struct UnkTextStruct2 gUnknown_80DD370;
|
||||
extern u32 sub_8026F04(struct PokemonStruct *);
|
||||
extern void sub_8026074(u32);
|
||||
extern void PlaySound(u32);
|
||||
bool8 sub_8026F38(struct PokemonStruct *r0);
|
||||
bool8 CanTakePokemonHeldItem(struct PokemonStruct *r0);
|
||||
extern bool8 sub_80023E4(u8);
|
||||
extern struct PokemonStruct *sub_808D3F8(void);
|
||||
extern struct PokemonStruct *sub_808D3BC(void);
|
||||
@ -99,7 +100,7 @@ void sub_80268CC(void)
|
||||
if (sub_808D750(gUnknown_203B2B8->pokeSpecies)) {
|
||||
|
||||
#ifdef NONMATCHING
|
||||
puVar3 = &gUnknown_203B2B8->pokeSpecies[gRecruitedPokemonRef->pokemon];
|
||||
pokeStruct = &gUnknown_203B2B8->pokeSpecies[gRecruitedPokemonRef->pokemon];
|
||||
#else
|
||||
register size_t offset asm("r1") = offsetof(struct unkStruct_203B45C, pokemon[gUnknown_203B2B8->pokeSpecies]);
|
||||
struct PokemonStruct* p = gRecruitedPokemonRef->pokemon;
|
||||
@ -428,28 +429,28 @@ void sub_8026E08(u32 r0)
|
||||
|
||||
u32 sub_8026E88(struct PokemonStruct *r0)
|
||||
{
|
||||
u8 iVar3;
|
||||
if(r0->isLeader == 0)
|
||||
bool8 flag;
|
||||
if(!r0->isLeader)
|
||||
{
|
||||
iVar3 = (r0->dungeonLocation.dungeonIndex == 0x41);
|
||||
if(iVar3 != 0)
|
||||
flag = (r0->dungeonLocation.dungeonIndex == DUNGEON_JOIN_LOCATION_PARTNER);
|
||||
if(flag)
|
||||
if(!sub_80023E4(0x8))
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
return 1;
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_8026EB8(struct PokemonStruct *r0)
|
||||
bool8 sub_8026EB8(struct PokemonStruct *r0)
|
||||
{
|
||||
u8 iVar3;
|
||||
bool8 flag;
|
||||
if(sub_808D3BC() != r0)
|
||||
if(sub_808D3F8() != r0)
|
||||
if(!r0->isLeader)
|
||||
{
|
||||
iVar3 = (r0->dungeonLocation.dungeonIndex == 0x41);
|
||||
if(iVar3 != 0)
|
||||
flag = (r0->dungeonLocation.dungeonIndex == DUNGEON_JOIN_LOCATION_PARTNER);
|
||||
if(flag)
|
||||
{
|
||||
if(sub_80023E4(0x8))
|
||||
goto check;
|
||||
@ -457,9 +458,9 @@ u32 sub_8026EB8(struct PokemonStruct *r0)
|
||||
else
|
||||
check:
|
||||
if(sub_8026F04(r0) != 3)
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -469,13 +470,13 @@ u32 sub_8026F04(struct PokemonStruct *r0)
|
||||
return 0;
|
||||
else if(GetNumberOfFilledInventorySlots() < INVENTORY_SIZE)
|
||||
return 1;
|
||||
else if(sub_8026F38(r0))
|
||||
else if(CanTakePokemonHeldItem(r0))
|
||||
return 2;
|
||||
else
|
||||
return 3;
|
||||
}
|
||||
|
||||
bool8 sub_8026F38(struct PokemonStruct *r0)
|
||||
bool8 CanTakePokemonHeldItem(struct PokemonStruct *r0)
|
||||
{
|
||||
if(IsNotMoneyOrUsedTMItem(r0->heldItem.itemIndex))
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ extern void sub_801BEEC(s16);
|
||||
extern void sub_8023B7C(u32);
|
||||
extern void sub_8023DA4(void);
|
||||
|
||||
extern void sub_809401C(struct PokemonMove *, struct PokemonMove *); // TODO convert arg 0 to PokemonMove struct *
|
||||
extern void sub_809401C(struct PokemonMove *, struct PokemonMove *);
|
||||
extern void sub_801EE10(u32, s16, struct PokemonMove *, u32, u32, u32);
|
||||
extern void sub_8093560(u32, struct PokemonMove *, u32 *);
|
||||
extern void sub_801F808(u32 *);
|
||||
|
@ -2,15 +2,13 @@
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
#include "item.h"
|
||||
#include "team_inventory.h"
|
||||
#include "friend_rescue.h"
|
||||
#include "pokemon.h"
|
||||
#include "friend_rescue.h"
|
||||
#include "memory.h"
|
||||
|
||||
extern void SetFriendRescueMenuState(u32);
|
||||
extern s32 sub_80144A4(s32 *);
|
||||
extern void sub_802F2C0();
|
||||
extern u8 sub_809539C(u32, u32);
|
||||
extern void sub_8095240(u8);
|
||||
extern u32 sub_802F298();
|
||||
|
||||
@ -124,14 +122,14 @@ u32 CreateFriendRescueMenu(void)
|
||||
MemoryFill8((u8 *) gUnknown_203B33C, 0, sizeof(struct WonderMailStruct_203B33C));
|
||||
gUnknown_203B33C->unk530 = 0;
|
||||
gUnknown_203B33C->unk218 = -1;
|
||||
gUnknown_203B33C->unk538 = -1;
|
||||
gUnknown_203B33C->speciesNum = -1;
|
||||
CopyYellowSpeciesNametoBuffer(gUnknown_202E5D8, SPECIES_PELIPPER);
|
||||
monName = GetMonSpecies(SPECIES_PELIPPER);
|
||||
strcpy(gAvailablePokemonNames,monName);
|
||||
for(counter = 0; counter < 0x36; counter++){
|
||||
gUnknown_203B33C->passwordBuffer[counter] = 0;
|
||||
}
|
||||
gUnknown_203B33C->unk4 = 0x7E;
|
||||
gUnknown_203B33C->fallbackState = 0x7E;
|
||||
gUnknown_203B33C->unk52C = sub_8039880();
|
||||
gUnknown_203B33C->unk52D = gUnknown_203B33C->unk52C;
|
||||
SetFriendRescueMenuState(0);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
||||
#include "global.h"
|
||||
#include "gUnknown_203B46C.h"
|
||||
#include "game_options.h"
|
||||
#include "code_8092334.h"
|
||||
|
||||
struct unkStruct_8109954
|
||||
struct WindowBG
|
||||
{
|
||||
// size: 0x10
|
||||
u32 unk0[4];
|
||||
u32 hexBG[4];
|
||||
};
|
||||
|
||||
struct unkStruct_8094CB0
|
||||
@ -14,54 +14,54 @@ struct unkStruct_8094CB0
|
||||
s16 unk2;
|
||||
};
|
||||
|
||||
extern struct unkStruct_8109954 gUnknown_8109954;
|
||||
extern struct WindowBG gWindowBGColors;
|
||||
|
||||
extern struct UnkSaveStruct1 *gUnknown_203B46C;
|
||||
extern struct UnkSaveStruct1 gUnknown_2038C70;
|
||||
extern void sub_8094C14(void);
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
extern struct GameOptions gGameOptions;
|
||||
extern void SetWindowBGColor(void);
|
||||
extern void sub_80099F0(u32);
|
||||
|
||||
void LoadGameOptions(void)
|
||||
{
|
||||
gUnknown_203B46C = &gUnknown_2038C70;
|
||||
gGameOptionsRef = &gGameOptions;
|
||||
}
|
||||
|
||||
struct UnkSaveStruct1 * GetGameOptions(void)
|
||||
struct GameOptions * GetGameOptions(void)
|
||||
{
|
||||
return &gUnknown_2038C70;
|
||||
return &gGameOptions;
|
||||
}
|
||||
|
||||
void InitializeGameOptions(u8 r0)
|
||||
void InitializeGameOptions(bool8 initializeGender)
|
||||
{
|
||||
gUnknown_203B46C->unk8 = 0;
|
||||
if(r0 != 0)
|
||||
gGameOptionsRef->windowColor = WINDOW_COLOR_BLUE;
|
||||
if(initializeGender)
|
||||
{
|
||||
gUnknown_203B46C->playerGender = 0;
|
||||
gGameOptionsRef->playerGender = MALE;
|
||||
}
|
||||
gUnknown_203B46C->unk9 = 0;
|
||||
gUnknown_203B46C->unkA = 0;
|
||||
gUnknown_203B46C->unk0 = 0;
|
||||
gUnknown_203B46C->unk1 = 1;
|
||||
gUnknown_203B46C->unk2 = 1;
|
||||
gUnknown_203B46C->unk3 = 1;
|
||||
gUnknown_203B46C->unk4 = 1;
|
||||
gUnknown_203B46C->unkC = 0;
|
||||
sub_8094C14();
|
||||
gGameOptionsRef->unk9 = 0;
|
||||
gGameOptionsRef->unkA = 0;
|
||||
gGameOptionsRef->dungeonSpeed = DUNGEON_SPEED_SLOW;
|
||||
gGameOptionsRef->FarOffPals = FAROFFPALS_LOCK;
|
||||
gGameOptionsRef->damageTurn = TRUE;
|
||||
gGameOptionsRef->gridEnable = TRUE;
|
||||
gGameOptionsRef->mapOption = MAP_OPTION_CLEAR;
|
||||
gGameOptionsRef->unkC = 0;
|
||||
SetWindowBGColor();
|
||||
}
|
||||
|
||||
bool32 GameOptionsNotChange(struct UnkSaveStruct1 *r0)
|
||||
bool8 GameOptionsNotChange(struct GameOptions *r0)
|
||||
{
|
||||
// NOTE: had to nest to match
|
||||
if(gUnknown_203B46C->unk8 == r0->unk8)
|
||||
if(gUnknown_203B46C->unk9 == r0->unk9)
|
||||
if(gUnknown_203B46C->unkA == r0->unkA)
|
||||
if(gUnknown_203B46C->playerGender == r0->playerGender)
|
||||
if(gUnknown_203B46C->unk0 == r0->unk0)
|
||||
if(gUnknown_203B46C->unk1 == r0->unk1)
|
||||
if(gUnknown_203B46C->unk2 == r0->unk2)
|
||||
if(gUnknown_203B46C->unk3 == r0->unk3)
|
||||
if(gUnknown_203B46C->unk4 == r0->unk4)
|
||||
if(gUnknown_203B46C->unkC == r0->unkC)
|
||||
if(gGameOptionsRef->windowColor == r0->windowColor)
|
||||
if(gGameOptionsRef->unk9 == r0->unk9)
|
||||
if(gGameOptionsRef->unkA == r0->unkA)
|
||||
if(gGameOptionsRef->playerGender == r0->playerGender)
|
||||
if(gGameOptionsRef->dungeonSpeed == r0->dungeonSpeed)
|
||||
if(gGameOptionsRef->FarOffPals == r0->FarOffPals)
|
||||
if(gGameOptionsRef->damageTurn == r0->damageTurn)
|
||||
if(gGameOptionsRef->gridEnable == r0->gridEnable)
|
||||
if(gGameOptionsRef->mapOption == r0->mapOption)
|
||||
if(gGameOptionsRef->unkC == r0->unkC)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
@ -76,9 +76,9 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
neg_1 = -1;
|
||||
zero = 0;
|
||||
|
||||
SaveIntegerBits(param_1, &gUnknown_203B46C->unk8, 2);
|
||||
SaveIntegerBits(param_1, &gGameOptionsRef->windowColor, 2);
|
||||
|
||||
if(gUnknown_203B46C->unk9 != 0)
|
||||
if(gGameOptionsRef->unk9 != 0)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -88,7 +88,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
if(gUnknown_203B46C->unkA != 0)
|
||||
if(gGameOptionsRef->unkA != 0)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -98,7 +98,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
if(gUnknown_203B46C->playerGender != 0)
|
||||
if(gGameOptionsRef->playerGender != MALE)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -108,7 +108,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
if(gUnknown_203B46C->unk0 != 0)
|
||||
if(gGameOptionsRef->dungeonSpeed != DUNGEON_SPEED_SLOW)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -118,7 +118,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
if(gUnknown_203B46C->unk1 != 0)
|
||||
if(gGameOptionsRef->FarOffPals != FAROFFPALS_SELF)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -128,7 +128,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
if(gUnknown_203B46C->unk2 != 0)
|
||||
if(gGameOptionsRef->damageTurn)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -138,7 +138,7 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
if(gUnknown_203B46C->unk3 != 0)
|
||||
if(gGameOptionsRef->gridEnable)
|
||||
{
|
||||
puVar2 = &neg_1;
|
||||
}
|
||||
@ -148,89 +148,89 @@ void WriteGameOptions(struct unkStruct_8094924 *param_1)
|
||||
}
|
||||
SaveIntegerBits(param_1, puVar2, 1);
|
||||
|
||||
SaveIntegerBits(param_1, &gUnknown_203B46C->unk4, 3);
|
||||
SaveIntegerBits(param_1, &gUnknown_203B46C->unkC, 2);
|
||||
SaveIntegerBits(param_1, &gGameOptionsRef->mapOption, NUM_GBA_MAP_OPTIONS);
|
||||
SaveIntegerBits(param_1, &gGameOptionsRef->unkC, 2);
|
||||
}
|
||||
|
||||
void ReadGameOptions(struct unkStruct_8094924 *param_1)
|
||||
{
|
||||
u8 byteArray[4];
|
||||
RestoreIntegerBits(param_1, byteArray, 2);
|
||||
gUnknown_203B46C->unk8 = byteArray[0] & 3;
|
||||
gGameOptionsRef->windowColor = byteArray[0] & NUM_WINDOW_COLORS;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->unk9 = byteArray[0] & 1;
|
||||
gGameOptionsRef->unk9 = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->unkA = byteArray[0] & 1;
|
||||
gGameOptionsRef->unkA = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->playerGender = byteArray[0] & 1;
|
||||
gGameOptionsRef->playerGender = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->unk0 = byteArray[0] & 1;
|
||||
gGameOptionsRef->dungeonSpeed = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->unk1 = byteArray[0] & 1;
|
||||
gGameOptionsRef->FarOffPals = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->unk2 = byteArray[0] & 1;
|
||||
gGameOptionsRef->damageTurn = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 1);
|
||||
gUnknown_203B46C->unk3 = byteArray[0] & 1;
|
||||
gGameOptionsRef->gridEnable = byteArray[0] & 1;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 3);
|
||||
gUnknown_203B46C->unk4 = byteArray[0] & 7;
|
||||
gGameOptionsRef->mapOption = byteArray[0] & NUM_DS_MAP_OPTIONS;
|
||||
|
||||
RestoreIntegerBits(param_1, byteArray, 2);
|
||||
gUnknown_203B46C->unkC = byteArray[0] & 3;
|
||||
gGameOptionsRef->unkC = byteArray[0] & 3;
|
||||
|
||||
sub_8094C14();
|
||||
SetWindowBGColor();
|
||||
}
|
||||
|
||||
void sub_8094C14(void)
|
||||
void SetWindowBGColor(void)
|
||||
{
|
||||
struct unkStruct_8109954 temp;
|
||||
struct WindowBG temp;
|
||||
|
||||
temp = gUnknown_8109954;
|
||||
temp = gWindowBGColors;
|
||||
|
||||
sub_80099F0(temp.unk0[gUnknown_203B46C->unk8 & 3]);
|
||||
sub_80099F0(temp.hexBG[gGameOptionsRef->windowColor & NUM_WINDOW_COLORS]);
|
||||
}
|
||||
|
||||
u32 sub_8094C48(void)
|
||||
bool8 sub_8094C48(void)
|
||||
{
|
||||
switch(gUnknown_203B46C->unk4)
|
||||
switch(gGameOptionsRef->mapOption)
|
||||
{
|
||||
default:
|
||||
return 1;
|
||||
case 0:
|
||||
case 3:
|
||||
return 0;
|
||||
return TRUE;
|
||||
case TOP_TEAM_DATA_NO_BOTTOM:
|
||||
case TOP_MESSAGE_LOG_NO_BOTTOM:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_8094C68(void)
|
||||
bool8 DoesNotHaveShadedMap(void)
|
||||
{
|
||||
switch(gUnknown_203B46C->unk4)
|
||||
switch(gGameOptionsRef->mapOption)
|
||||
{
|
||||
default:
|
||||
return 1;
|
||||
case 2:
|
||||
case 5:
|
||||
return 0;
|
||||
return TRUE;
|
||||
case TOP_TEAM_DATA_SHADED_MAP_BOTTOM:
|
||||
case TOP_MESSAGE_LOG_SHADED_MAP_BOTTOM:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8094C88(void)
|
||||
{
|
||||
if(gUnknown_203B46C->unk4 < 3)
|
||||
gUnknown_203B46C->unk4 = 1;
|
||||
if(gGameOptionsRef->mapOption < 3)
|
||||
gGameOptionsRef->mapOption = 1;
|
||||
else
|
||||
{
|
||||
if((u8)(gUnknown_203B46C->unk4 - 3) > 2)
|
||||
if((u8)(gGameOptionsRef->mapOption - 3) > 2)
|
||||
return;
|
||||
else
|
||||
gUnknown_203B46C->unk4 = 4;
|
||||
gGameOptionsRef->mapOption = 4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -275,7 +275,7 @@ u32 sub_8094D10(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sub_8094D14(void)
|
||||
u8 sub_8094D14(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -16,11 +16,13 @@ extern u16 gUnknown_20398BE;
|
||||
extern u8 gUnknown_203B49D;
|
||||
extern u8 gUnknown_203B49C;
|
||||
|
||||
extern const char gUnknown_8115F5C;
|
||||
extern const char gUnknown_8115F80;
|
||||
extern const char gUnknown_8115FA4;
|
||||
extern const char gUnknown_8115FC8;
|
||||
extern const char gUnknown_8115FE8;
|
||||
const char gUnknown_8115F5C[] = "GroundMain ground request %3d %3d";
|
||||
const char gUnknown_8115F80[] = "GroundMain recue request %3d %3d";
|
||||
const char gUnknown_8115FA4[] = "GroundMain user rescue request %3d";
|
||||
const char gUnknown_8115FC8[] = "GroundMain game end request %3d";
|
||||
const char gUnknown_8115FE8[] = "GroundMain game cancel request %3d";
|
||||
static const char unused_text[] = "pksdir0";
|
||||
static const char unused_text1[] = "pksdir0";
|
||||
|
||||
struct unkStruct_811BAF4
|
||||
{
|
||||
@ -67,7 +69,7 @@ extern void sub_80015C0(u8, u8);
|
||||
extern void sub_80018D8(u8, u8, u32);
|
||||
extern void sub_800199C(u8, u8, u8, s32);
|
||||
extern void sub_8098CC8();
|
||||
extern void sub_809674C();
|
||||
extern void GeneratePelipperJobs();
|
||||
extern void sub_80961B4();
|
||||
extern void ClearAllItems_8091FB4();
|
||||
extern const char *sub_80A2B18(s16);
|
||||
@ -178,7 +180,7 @@ void sub_8098CC8(void)
|
||||
temp = 3;
|
||||
}
|
||||
ChooseKecleonShopInventory(temp);
|
||||
sub_809674C();
|
||||
GeneratePelipperJobs();
|
||||
sub_80961B4();
|
||||
ClearAllItems_8091FB4();
|
||||
}
|
||||
@ -189,7 +191,7 @@ bool8 GroundMainGroundRequest(s16 r0, u32 r1, u32 r2)
|
||||
temp = r0; // force a asr shift
|
||||
if(gUnknown_20398A8 == 0)
|
||||
{
|
||||
Log(0, &gUnknown_8115F5C, temp, r2);
|
||||
Log(0, gUnknown_8115F5C, temp, r2);
|
||||
gUnknown_20398A8 = 1;
|
||||
gUnknown_20398AC = 1;
|
||||
gUnknown_20398B0 = r2;
|
||||
@ -240,7 +242,7 @@ bool8 GroundMainRescueRequest(s16 r0, u32 r1)
|
||||
s32 r2 = r0, r5 = r2;
|
||||
if(gUnknown_20398A8 == 0)
|
||||
{
|
||||
Log(0, &gUnknown_8115F80, r2, r1);
|
||||
Log(0, gUnknown_8115F80, r2, r1);
|
||||
if(gUnknown_203B49D != 0)
|
||||
{
|
||||
gUnknown_20398A8 = 7;
|
||||
@ -273,7 +275,7 @@ u32 GroundMainUserRescueRequest(u32 r0)
|
||||
{
|
||||
if(gUnknown_203B49D != 0)
|
||||
{
|
||||
Log(0, &gUnknown_8115FA4, r0);
|
||||
Log(0, gUnknown_8115FA4, r0);
|
||||
gUnknown_20398A8 = 7;
|
||||
gUnknown_20398AC = 1;
|
||||
gUnknown_20398B0 = r0;
|
||||
@ -288,7 +290,7 @@ u32 GroundMainGameEndRequest(u32 r0)
|
||||
{
|
||||
if(gUnknown_20398A8 == 0)
|
||||
{
|
||||
Log(0, &gUnknown_8115FC8, r0);
|
||||
Log(0, gUnknown_8115FC8, r0);
|
||||
gUnknown_20398A8 = 9;
|
||||
gUnknown_20398AC = 1;
|
||||
gUnknown_20398B0 = r0;
|
||||
@ -302,7 +304,7 @@ u32 GroundMainGameCancelRequest(u32 r0)
|
||||
{
|
||||
if(gUnknown_20398A8 == 0)
|
||||
{
|
||||
Log(0, &gUnknown_8115FE8, r0);
|
||||
Log(0, gUnknown_8115FE8, r0);
|
||||
gUnknown_20398A8 = 10;
|
||||
gUnknown_20398AC = 1;
|
||||
gUnknown_20398B0 = r0;
|
||||
|
@ -27,7 +27,7 @@ extern void GroundMap_GetStationScript(struct GroundScript_ExecutePP_3 *, s16, u
|
||||
bool8 GroundScript_ExecutePP(struct GroundScript_ExecutePP_1 *param_1, s32 *param_2, struct GroundScript_ExecutePP_3 *param_3, struct DebugLocation *unused);
|
||||
extern u8 sub_809D678(void *);
|
||||
extern void sub_809D710(u8 *, struct GroundScript_ExecutePP_3 *, s32);
|
||||
extern u8 sub_809D968(void *, s32);
|
||||
extern bool8 sub_809D968(void *, s32);
|
||||
|
||||
void sub_80A4BE8(struct GroundScript_ExecutePP_3 *script, s16 r1)
|
||||
{
|
||||
@ -92,7 +92,7 @@ u8 sub_80A4D14(void)
|
||||
return sub_809D678(gUnknown_3001B6C);
|
||||
}
|
||||
|
||||
u8 sub_80A4D2C(s16 param_1)
|
||||
bool8 sub_80A4D2C(s16 param_1)
|
||||
{
|
||||
s32 iVar1 = param_1;
|
||||
return sub_809D968(gUnknown_3001B6C,iVar1);
|
||||
|
@ -37,11 +37,10 @@ struct FunctionScript
|
||||
extern struct FunctionScript gFunctionScriptTable[];
|
||||
|
||||
|
||||
// NOTE: shift of index and load of gFunctionScriptTable is flipped
|
||||
#ifdef NONMATCHING
|
||||
void sub_809D710(struct GroundScript_ExecutePP_1 *param_1, struct GroundScript_ExecutePP_3 *script, s16 index)
|
||||
{
|
||||
script->scriptPointer = gFunctionScriptTable[index].script;
|
||||
s32 index_s32 = index;
|
||||
script->scriptPointer = gFunctionScriptTable[index_s32].script;
|
||||
script->scriptType = 2;
|
||||
if (param_1 != NULL) {
|
||||
script->unk6 = param_1->unk10;
|
||||
@ -52,46 +51,6 @@ void sub_809D710(struct GroundScript_ExecutePP_1 *param_1, struct GroundScript_E
|
||||
script->unk8 = -1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED void sub_809D710(struct GroundScript_ExecutePP_1 *param_1, struct GroundScript_ExecutePP_3 *script, s16 index)
|
||||
{
|
||||
asm_unified(
|
||||
"\tpush {r4,lr}\n"
|
||||
"\tadds r4, r0, 0\n"
|
||||
"\tadds r3, r1, 0\n"
|
||||
"\tlsls r2, 16\n"
|
||||
"\tasrs r2, 16\n"
|
||||
"\tldr r1, _0809D73C\n"
|
||||
"\tlsls r0, r2, 1\n"
|
||||
"\tadds r0, r2\n"
|
||||
"\tlsls r0, 2\n"
|
||||
"\tadds r1, 0x8\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldr r0, [r0]\n"
|
||||
"\tstr r0, [r3]\n"
|
||||
"\tmovs r0, 0x2\n"
|
||||
"\tstrh r0, [r3, 0x4]\n"
|
||||
"\tcmp r4, 0\n"
|
||||
"\tbeq _0809D740\n"
|
||||
"\tldrh r0, [r4, 0x10]\n"
|
||||
"\tstrh r0, [r3, 0x6]\n"
|
||||
"\tldrb r0, [r4, 0x12]\n"
|
||||
"\tb _0809D746\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0809D73C: .4byte gFunctionScriptTable\n"
|
||||
"_0809D740:\n"
|
||||
"\tldr r0, _0809D750\n"
|
||||
"\tstrh r0, [r3, 0x6]\n"
|
||||
"\tmovs r0, 0xFF\n"
|
||||
"_0809D746:\n"
|
||||
"\tstrb r0, [r3, 0x8]\n"
|
||||
"\tpop {r4}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0809D750: .4byte 0x0000ffff");
|
||||
}
|
||||
#endif
|
||||
|
||||
bool8 sub_809D754(struct GroundScript_ExecutePP_1 *param_1, struct DebugLocation *unused)
|
||||
{
|
||||
@ -102,7 +61,6 @@ bool8 sub_809D754(struct GroundScript_ExecutePP_1 *param_1, struct DebugLocation
|
||||
|
||||
bool8 sub_809D770(struct GroundScript_ExecutePP_1 *param_1, struct DebugLocation *unused)
|
||||
{
|
||||
|
||||
sub_809D568(¶m_1->unk24);
|
||||
sub_809D568(¶m_1->unk84);
|
||||
param_1->unk24.unk2 = 4;
|
||||
@ -197,7 +155,7 @@ u8 sub_809D8EC(struct GroundScript_ExecutePP_1 *param_1, s16 param_2)
|
||||
}
|
||||
|
||||
|
||||
u8 sub_809D92C(struct GroundScript_ExecutePP_1 *r0)
|
||||
u8 GroundScript_Cancel(struct GroundScript_ExecutePP_1 *r0)
|
||||
{
|
||||
return sub_809D770(r0, &gUnknown_81165C8);
|
||||
}
|
||||
|
@ -125,17 +125,14 @@ s32 GetChosenHintIndex(void)
|
||||
return (gUnknown_203B264->unk1E * gUnknown_203B264->unk1C) + gUnknown_203B264->unk18;
|
||||
}
|
||||
|
||||
void CreateHintSelectionScreen(u32 r0)
|
||||
void CreateHintSelectionScreen(u8 r0)
|
||||
{
|
||||
u8 bool8_r0;
|
||||
bool8_r0 = r0;
|
||||
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B264->unk3C, 0, 0);
|
||||
sub_8013984(gUnknown_203B264);
|
||||
sub_801E594();
|
||||
DrawHintSelectionMenu();
|
||||
if(bool8_r0)
|
||||
if(r0)
|
||||
AddMenuCursorSprite(gUnknown_203B264);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user