mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-26 22:40:33 +00:00
commit
a6754cbae8
@ -5,8 +5,8 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_800558C
|
||||
sub_800558C:
|
||||
thumb_func_start DoAxFrame_800558C
|
||||
DoAxFrame_800558C:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
@ -72,7 +72,7 @@ _08005602:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0800560C: .4byte 0x0000f7ff
|
||||
thumb_func_end sub_800558C
|
||||
thumb_func_end DoAxFrame_800558C
|
||||
|
||||
thumb_func_start sub_8005610
|
||||
sub_8005610:
|
||||
|
@ -154,7 +154,7 @@ _0800DDCA:
|
||||
str r0, [sp, 0x4]
|
||||
mov r0, r8
|
||||
adds r1, r4, 0
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
_0800DE26:
|
||||
movs r0, 0x1
|
||||
_0800DE28:
|
||||
@ -6081,7 +6081,7 @@ sub_8010A88:
|
||||
add r3, sp, 0x8
|
||||
str r3, [sp, 0x4]
|
||||
movs r3, 0x3
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
_08010AF6:
|
||||
lsls r0, r5, 16
|
||||
asrs r0, 16
|
||||
@ -6118,7 +6118,7 @@ _08010B04:
|
||||
str r3, [sp, 0x4]
|
||||
adds r0, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
_08010B40:
|
||||
adds r7, 0x44
|
||||
subs r6, 0x1
|
||||
@ -6632,7 +6632,7 @@ sub_8010F28:
|
||||
str r3, [sp, 0x4]
|
||||
adds r0, r4, 0
|
||||
movs r3, 0x3
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
movs r7, 0
|
||||
mov r10, r6
|
||||
ldr r6, _0801109C
|
||||
@ -6667,7 +6667,7 @@ _08010F98:
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
_08010FD8:
|
||||
adds r6, 0x50
|
||||
adds r7, 0x1
|
||||
@ -6737,7 +6737,7 @@ _0801101E:
|
||||
add r3, sp, 0x8
|
||||
str r3, [sp, 0x4]
|
||||
movs r3, 0x2
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
_08011062:
|
||||
adds r6, 0x3C
|
||||
ldr r4, [sp, 0x14]
|
||||
|
@ -5208,7 +5208,7 @@ _0806CAD2:
|
||||
ldr r1, [sp, 0x2C]
|
||||
ldr r2, [sp, 0x30]
|
||||
mov r3, r9
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
b _0806CB16
|
||||
_0806CAF8:
|
||||
cmp r1, 0x1
|
||||
@ -5224,7 +5224,7 @@ _0806CAF8:
|
||||
ldr r1, [sp, 0x2C]
|
||||
ldr r2, [sp, 0x30]
|
||||
mov r3, r9
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
_0806CB16:
|
||||
ldr r0, [r6, 0xC]
|
||||
cmp r0, 0
|
||||
|
@ -1,266 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_807CB3C
|
||||
sub_807CB3C:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x30
|
||||
adds r6, r0, 0
|
||||
ldr r7, [r6, 0x70]
|
||||
movs r1, 0
|
||||
movs r2, 0x15
|
||||
bl sub_8044D90
|
||||
adds r2, r0, 0
|
||||
ldr r5, [r2]
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x8
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0807CB80
|
||||
ldr r0, _0807CB78
|
||||
adds r1, r2, 0
|
||||
bl sub_8045BF8
|
||||
ldr r0, _0807CB7C
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl SendMessage
|
||||
b _0807CD54
|
||||
.align 2, 0
|
||||
_0807CB78: .4byte gUnknown_202DE58
|
||||
_0807CB7C: .4byte gUnknown_80FE3E8
|
||||
_0807CB80:
|
||||
add r0, sp, 0x8
|
||||
adds r1, r7, 0
|
||||
adds r1, 0x44
|
||||
ldm r1!, {r2-r4}
|
||||
stm r0!, {r2-r4}
|
||||
ldm r1!, {r2-r4}
|
||||
stm r0!, {r2-r4}
|
||||
bl IsBossFight
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0807CBAC
|
||||
ldr r0, _0807CBA8
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl SendMessage
|
||||
movs r4, 0x1
|
||||
b _0807CCDE
|
||||
.align 2, 0
|
||||
_0807CBA8: .4byte gPtrMysteriousPowerPreventedUseMessage
|
||||
_0807CBAC:
|
||||
movs r0, 0x1
|
||||
mov r8, r0
|
||||
add r4, sp, 0x20
|
||||
lsls r5, 8
|
||||
lsrs r0, r5, 24
|
||||
bl GetItemMoveID
|
||||
adds r1, r0, 0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
adds r0, r4, 0
|
||||
bl InitPokemonMove
|
||||
ldrb r0, [r7, 0x7]
|
||||
mov r10, r4
|
||||
mov r9, r5
|
||||
cmp r0, 0
|
||||
bne _0807CC08
|
||||
ldr r1, _0807CC20
|
||||
ldr r0, [sp, 0x28]
|
||||
ands r0, r1
|
||||
mov r1, r8
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x28]
|
||||
movs r0, 0xA
|
||||
add r4, sp, 0x28
|
||||
str r0, [r4, 0x4]
|
||||
movs r3, 0x8C
|
||||
lsls r3, 1
|
||||
adds r2, r7, r3
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
bl AIConsiderMove
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _0807CC08
|
||||
ldrb r1, [r4, 0x1]
|
||||
movs r0, 0x7
|
||||
ands r0, r1
|
||||
adds r1, r7, 0
|
||||
adds r1, 0x46
|
||||
strb r0, [r1]
|
||||
adds r0, r6, 0
|
||||
bl TargetTileInFront
|
||||
_0807CC08:
|
||||
adds r0, r7, 0
|
||||
adds r0, 0xBC
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _0807CC2C
|
||||
ldr r0, _0807CC24
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
ldr r0, _0807CC28
|
||||
b _0807CC3C
|
||||
.align 2, 0
|
||||
_0807CC20: .4byte 0xffffff00
|
||||
_0807CC24: .4byte gAvailablePokemonNames
|
||||
_0807CC28: .4byte gUnknown_80FC714
|
||||
_0807CC2C:
|
||||
cmp r0, 0x7
|
||||
bne _0807CC50
|
||||
ldr r0, _0807CC48
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
ldr r0, _0807CC4C
|
||||
_0807CC3C:
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl SendMessage
|
||||
b _0807CCDC
|
||||
.align 2, 0
|
||||
_0807CC48: .4byte gAvailablePokemonNames
|
||||
_0807CC4C: .4byte gUnknown_80FC718
|
||||
_0807CC50:
|
||||
adds r0, r7, 0
|
||||
adds r0, 0xAC
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x4
|
||||
bne _0807CC72
|
||||
ldr r0, _0807CCB8
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl SetMessageArgument
|
||||
ldr r0, _0807CCBC
|
||||
ldr r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl SendMessage
|
||||
movs r4, 0
|
||||
mov r8, r4
|
||||
_0807CC72:
|
||||
mov r0, r8
|
||||
cmp r0, 0
|
||||
beq _0807CCDC
|
||||
mov r5, r9
|
||||
lsrs r0, r5, 24
|
||||
cmp r0, 0xB6
|
||||
beq _0807CC84
|
||||
cmp r0, 0xBF
|
||||
bne _0807CCC0
|
||||
_0807CC84:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0
|
||||
movs r2, 0x7A
|
||||
bl sub_8044DF0
|
||||
mov r2, r10
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x8
|
||||
movs r4, 0
|
||||
orrs r0, r1
|
||||
add r3, sp, 0x20
|
||||
movs r1, 0x4
|
||||
orrs r0, r1
|
||||
strb r0, [r3]
|
||||
movs r0, 0xA
|
||||
strb r0, [r3, 0x4]
|
||||
lsrs r2, r5, 24
|
||||
str r4, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
adds r0, r6, 0
|
||||
movs r1, 0
|
||||
movs r3, 0
|
||||
bl sub_8055FA0
|
||||
b _0807CCDE
|
||||
.align 2, 0
|
||||
_0807CCB8: .4byte gAvailablePokemonNames
|
||||
_0807CCBC: .4byte gUnknown_80FC6A8
|
||||
_0807CCC0:
|
||||
mov r3, r9
|
||||
lsrs r2, r3, 24
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
mov r4, r10
|
||||
str r4, [sp, 0x4]
|
||||
adds r0, r6, 0
|
||||
movs r1, 0
|
||||
movs r3, 0
|
||||
bl sub_8055FA0
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
b _0807CCDE
|
||||
_0807CCDC:
|
||||
movs r4, 0
|
||||
_0807CCDE:
|
||||
adds r0, r6, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0807CD38
|
||||
cmp r4, 0
|
||||
beq _0807CCF8
|
||||
adds r0, r6, 0
|
||||
movs r1, 0
|
||||
movs r2, 0x7A
|
||||
bl sub_8044DF0
|
||||
_0807CCF8:
|
||||
adds r0, r6, 0
|
||||
bl sub_8071DA4
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x8
|
||||
bl sub_806CE68
|
||||
ldrb r0, [r7, 0x7]
|
||||
cmp r0, 0
|
||||
beq _0807CD18
|
||||
adds r0, r6, 0x4
|
||||
bl sub_804AC20
|
||||
movs r0, 0
|
||||
bl sub_807EC28
|
||||
_0807CD18:
|
||||
adds r0, r6, 0
|
||||
bl sub_806A5B8
|
||||
ldr r0, _0807CD30
|
||||
ldr r0, [r0]
|
||||
ldr r1, _0807CD34
|
||||
adds r0, r1
|
||||
ldrb r1, [r0]
|
||||
adds r0, r6, 0
|
||||
bl sub_8075900
|
||||
b _0807CD44
|
||||
.align 2, 0
|
||||
_0807CD30: .4byte gDungeon
|
||||
_0807CD34: .4byte 0x00003a08
|
||||
_0807CD38:
|
||||
cmp r4, 0
|
||||
beq _0807CD44
|
||||
add r0, sp, 0x8
|
||||
movs r1, 0
|
||||
bl sub_8044D40
|
||||
_0807CD44:
|
||||
bl sub_8044B28
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0807CD54
|
||||
adds r0, r6, 0
|
||||
bl sub_806A1B0
|
||||
_0807CD54:
|
||||
add sp, 0x30
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_807CB3C
|
||||
|
||||
.align 2, 0
|
@ -5,374 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80A62F0
|
||||
sub_80A62F0:
|
||||
push {r4-r7,lr}
|
||||
ldr r4, _080A6378
|
||||
movs r0, 0x88
|
||||
lsls r0, 1
|
||||
movs r1, 0x6
|
||||
bl MemoryAlloc
|
||||
str r0, [r4]
|
||||
ldr r0, _080A637C
|
||||
ldr r1, _080A6380
|
||||
bl OpenFileAndGetFileDataPtr
|
||||
ldr r1, _080A6384
|
||||
str r0, [r1]
|
||||
movs r0, 0x1
|
||||
bl sub_800DAC0
|
||||
ldr r4, [r4]
|
||||
ldr r1, _080A6388
|
||||
movs r0, 0x16
|
||||
str r0, [r1]
|
||||
ldr r1, _080A638C
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
movs r0, 0
|
||||
movs r2, 0
|
||||
movs r1, 0x80
|
||||
lsls r1, 9
|
||||
adds r3, r1, 0
|
||||
_080A632A:
|
||||
str r2, [r4]
|
||||
lsls r0, 4
|
||||
str r0, [r4, 0x4]
|
||||
str r2, [r4, 0x8]
|
||||
adds r0, r1, 0
|
||||
adds r1, r3
|
||||
asrs r0, 16
|
||||
adds r4, 0xC
|
||||
cmp r0, 0x15
|
||||
ble _080A632A
|
||||
ldr r0, _080A6378
|
||||
ldr r0, [r0]
|
||||
movs r1, 0x84
|
||||
lsls r1, 1
|
||||
adds r4, r0, r1
|
||||
movs r6, 0
|
||||
movs r7, 0
|
||||
movs r5, 0xE8
|
||||
lsls r5, 13
|
||||
_080A6350:
|
||||
strh r7, [r4]
|
||||
strh r7, [r4, 0x2]
|
||||
lsrs r0, r5, 16
|
||||
movs r1, 0
|
||||
bl sub_80997F4
|
||||
movs r0, 0x80
|
||||
lsls r0, 9
|
||||
adds r5, r0
|
||||
adds r6, 0x1
|
||||
adds r4, 0x4
|
||||
cmp r6, 0x1
|
||||
ble _080A6350
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
bl GroundSprite_Reset
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A6378: .4byte gUnknown_3001B7C
|
||||
_080A637C: .4byte gUnknown_81177CC
|
||||
_080A6380: .4byte gDungeonFileArchive
|
||||
_080A6384: .4byte gUnknown_203B4B4
|
||||
_080A6388: .4byte gUnknown_2039DD4
|
||||
_080A638C: .4byte gUnknown_2039DD0
|
||||
thumb_func_end sub_80A62F0
|
||||
|
||||
thumb_func_start GroundSprite_Reset
|
||||
GroundSprite_Reset:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
mov r9, r0
|
||||
ldr r1, _080A641C
|
||||
movs r0, 0
|
||||
bl Log
|
||||
ldr r0, _080A6420
|
||||
movs r1, 0
|
||||
mov r8, r1
|
||||
strh r1, [r0]
|
||||
ldr r0, _080A6424
|
||||
strh r1, [r0]
|
||||
bl sub_80A6460
|
||||
mov r0, r9
|
||||
bl sub_80A4D48
|
||||
lsls r0, 24
|
||||
movs r1, 0x2
|
||||
cmp r0, 0
|
||||
beq _080A63C6
|
||||
movs r1, 0x3
|
||||
_080A63C6:
|
||||
movs r0, 0xF8
|
||||
lsls r0, 1
|
||||
bl sub_808E53C
|
||||
ldr r5, _080A6428
|
||||
adds r0, r5, 0
|
||||
bl sub_8004E8C
|
||||
ldr r4, _080A642C
|
||||
adds r0, r4, 0
|
||||
bl sub_8004E8C
|
||||
ldrh r1, [r4, 0x4]
|
||||
ldr r6, _080A6430
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
strh r0, [r4, 0x4]
|
||||
ldrh r1, [r4, 0xA]
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
movs r2, 0x80
|
||||
lsls r2, 4
|
||||
adds r7, r2, 0
|
||||
orrs r0, r7
|
||||
strh r0, [r4, 0xA]
|
||||
mov r0, r9
|
||||
bl sub_80A4D48
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A6434
|
||||
ldrh r1, [r5, 0x4]
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
strh r0, [r5, 0x4]
|
||||
ldrh r1, [r5, 0xA]
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
movs r2, 0xC0
|
||||
lsls r2, 4
|
||||
adds r1, r2, 0
|
||||
orrs r0, r1
|
||||
b _080A6444
|
||||
.align 2, 0
|
||||
_080A641C: .4byte gUnknown_81177D8
|
||||
_080A6420: .4byte gUnknown_2039DCC
|
||||
_080A6424: .4byte gUnknown_2039DCE
|
||||
_080A6428: .4byte gUnknown_2039DB0
|
||||
_080A642C: .4byte gUnknown_2039DC0
|
||||
_080A6430: .4byte 0x0000f3ff
|
||||
_080A6434:
|
||||
ldrh r1, [r5, 0x4]
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
strh r0, [r5, 0x4]
|
||||
ldrh r1, [r5, 0xA]
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
orrs r0, r7
|
||||
_080A6444:
|
||||
strh r0, [r5, 0xA]
|
||||
movs r0, 0x1
|
||||
bl ResetSprites
|
||||
movs r0, 0x1
|
||||
bl nullsub_10
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end GroundSprite_Reset
|
||||
|
||||
thumb_func_start sub_80A6460
|
||||
sub_80A6460:
|
||||
push {r4-r7,lr}
|
||||
ldr r0, _080A649C
|
||||
ldr r1, _080A64A0
|
||||
bl OpenFileAndGetFileDataPtr
|
||||
adds r7, r0, 0
|
||||
movs r5, 0x80
|
||||
lsls r5, 1
|
||||
ldr r4, [r7, 0x4]
|
||||
movs r6, 0xC
|
||||
_080A6474:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x10
|
||||
bl sub_809971C
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x10
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
adds r4, 0x40
|
||||
subs r6, 0x1
|
||||
cmp r6, 0
|
||||
bge _080A6474
|
||||
adds r0, r7, 0
|
||||
bl CloseFile
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A649C: .4byte gUnknown_81177EC
|
||||
_080A64A0: .4byte gMonsterFileArchive
|
||||
thumb_func_end sub_80A6460
|
||||
|
||||
thumb_func_start sub_80A64A4
|
||||
sub_80A64A4:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
ldr r0, _080A6508
|
||||
ldr r0, [r0]
|
||||
movs r1, 0x84
|
||||
lsls r1, 1
|
||||
adds r7, r0, r1
|
||||
bl sub_80A6460
|
||||
movs r0, 0
|
||||
mov r8, r0
|
||||
_080A64C0:
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r7, r1]
|
||||
cmp r0, 0
|
||||
ble _080A6568
|
||||
ldrh r5, [r7]
|
||||
mov r0, r8
|
||||
adds r0, 0x1D
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
mov r10, r0
|
||||
mov r1, r8
|
||||
lsls r0, r1, 20
|
||||
movs r1, 0xE8
|
||||
lsls r1, 17
|
||||
adds r0, r1
|
||||
lsrs r0, 16
|
||||
mov r9, r0
|
||||
movs r0, 0x80
|
||||
lsls r0, 2
|
||||
adds r1, r0, 0
|
||||
adds r0, r5, 0
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _080A6514
|
||||
ldr r0, _080A650C
|
||||
ldr r1, _080A6510
|
||||
bl OpenFileAndGetFileDataPtr
|
||||
adds r6, r0, 0
|
||||
movs r0, 0xFF
|
||||
ands r0, r5
|
||||
lsls r0, 6
|
||||
ldr r1, [r6, 0x4]
|
||||
adds r2, r1, r0
|
||||
b _080A652A
|
||||
.align 2, 0
|
||||
_080A6508: .4byte gUnknown_3001B7C
|
||||
_080A650C: .4byte gUnknown_81177EC
|
||||
_080A6510: .4byte gMonsterFileArchive
|
||||
_080A6514:
|
||||
movs r0, 0xFF
|
||||
ands r0, r5
|
||||
lsls r0, 2
|
||||
ldr r1, _080A6584
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
ldr r1, _080A6588
|
||||
bl OpenFileAndGetFileDataPtr
|
||||
adds r6, r0, 0
|
||||
ldr r2, [r6, 0x4]
|
||||
_080A652A:
|
||||
movs r1, 0x80
|
||||
lsls r1, 5
|
||||
adds r0, r1, 0
|
||||
adds r1, r5, 0
|
||||
ands r1, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
negs r1, r1
|
||||
lsrs r4, r1, 31
|
||||
movs r1, 0x80
|
||||
lsls r1, 6
|
||||
adds r0, r1, 0
|
||||
ands r5, r0
|
||||
cmp r5, 0
|
||||
beq _080A654C
|
||||
movs r0, 0x2
|
||||
orrs r4, r0
|
||||
_080A654C:
|
||||
mov r0, r9
|
||||
adds r1, r2, 0
|
||||
movs r2, 0x10
|
||||
bl sub_809971C
|
||||
mov r0, r10
|
||||
adds r1, r4, 0
|
||||
bl sub_80997F4
|
||||
cmp r6, 0
|
||||
beq _080A6568
|
||||
adds r0, r6, 0
|
||||
bl CloseFile
|
||||
_080A6568:
|
||||
movs r0, 0x1
|
||||
add r8, r0
|
||||
adds r7, 0x4
|
||||
mov r1, r8
|
||||
cmp r1, 0x1
|
||||
ble _080A64C0
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A6584: .4byte gUnknown_81178F4
|
||||
_080A6588: .4byte gOrnamentFileArchive
|
||||
thumb_func_end sub_80A64A4
|
||||
|
||||
thumb_func_start sub_80A658C
|
||||
sub_80A658C:
|
||||
push {r4,lr}
|
||||
bl sub_800DB7C
|
||||
movs r0, 0
|
||||
bl ResetSprites
|
||||
movs r0, 0
|
||||
bl nullsub_10
|
||||
bl sub_8005180
|
||||
bl nullsub_12
|
||||
bl CopySpritesToOam
|
||||
bl nullsub_13
|
||||
bl sub_8005304
|
||||
bl nullsub_14
|
||||
ldr r0, _080A65D0
|
||||
ldr r0, [r0]
|
||||
bl CloseFile
|
||||
ldr r4, _080A65D4
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A65D0: .4byte gUnknown_203B4B4
|
||||
_080A65D4: .4byte gUnknown_3001B7C
|
||||
thumb_func_end sub_80A658C
|
||||
|
||||
thumb_func_start sub_80A65D8
|
||||
sub_80A65D8:
|
||||
adds r0, 0x50
|
||||
ldrh r0, [r0]
|
||||
bx lr
|
||||
thumb_func_end sub_80A65D8
|
||||
|
||||
thumb_func_start sub_80A65E0
|
||||
sub_80A65E0:
|
||||
lsrs r0, 16
|
||||
ldr r2, _080A65EC
|
||||
adds r1, r2, 0
|
||||
ands r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080A65EC: .4byte 0x0000337f
|
||||
thumb_func_end sub_80A65E0
|
||||
|
||||
thumb_func_start sub_80A65F0
|
||||
sub_80A65F0:
|
||||
push {r4-r6,lr}
|
||||
@ -2049,7 +1681,7 @@ _080A71BC:
|
||||
adds r0, r7, 0
|
||||
movs r2, 0xD0
|
||||
movs r3, 0
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
adds r0, r7, 0
|
||||
adds r0, 0x70
|
||||
mov r3, r9
|
||||
@ -2081,7 +1713,7 @@ _080A7234:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
movs r0, 0
|
||||
strb r0, [r4]
|
||||
mov r2, r10
|
||||
@ -2114,7 +1746,7 @@ _080A7274:
|
||||
adds r0, r7, 0
|
||||
movs r2, 0xD0
|
||||
movs r3, 0
|
||||
bl sub_800558C
|
||||
bl DoAxFrame_800558C
|
||||
movs r0, 0
|
||||
strb r0, [r4]
|
||||
_080A72A6:
|
||||
|
585
asm/menu_input.s
585
asm/menu_input.s
@ -1,585 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start AddMenuCursorSprite_
|
||||
AddMenuCursorSprite_:
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
adds r6, r0, 0
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
str r0, [sp]
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1A
|
||||
ldrsh r0, [r6, r1]
|
||||
cmp r0, 0
|
||||
bgt _080131CC
|
||||
b _080132D6
|
||||
_080131CC:
|
||||
adds r0, r6, 0
|
||||
bl UpdateMenuCursorSpriteCoords
|
||||
ldrh r1, [r6, 0x24]
|
||||
movs r0, 0x8
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _080132D6
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
ldr r1, _080132FC
|
||||
ands r1, r0
|
||||
ldr r3, _08013300
|
||||
ldr r0, [sp]
|
||||
ands r0, r3
|
||||
orrs r0, r1
|
||||
str r0, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
adds r2, r3, 0
|
||||
ands r2, r0
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _08013304
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r4, _08013308
|
||||
adds r0, r4, 0
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0801330C
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _08013310
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _08013314
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
ands r3, r1
|
||||
orrs r3, r0
|
||||
str r3, [sp]
|
||||
mov r3, sp
|
||||
movs r2, 0xFD
|
||||
lsls r2, 2
|
||||
ldrh r1, [r3, 0x4]
|
||||
movs r0, 0xFC
|
||||
lsls r0, 8
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
ands r0, r4
|
||||
movs r5, 0xF
|
||||
movs r1, 0xF0
|
||||
lsls r1, 8
|
||||
ldr r4, _08013318
|
||||
ands r0, r4
|
||||
orrs r0, r1
|
||||
strh r0, [r3, 0x4]
|
||||
ldrh r0, [r3, 0x6]
|
||||
ldr r1, _0801331C
|
||||
ands r1, r0
|
||||
ldr r0, _08013320
|
||||
ands r1, r0
|
||||
movs r2, 0x8
|
||||
ldrsh r0, [r6, r2]
|
||||
ldr r2, _08013324
|
||||
ands r0, r2
|
||||
strh r0, [r3, 0x2]
|
||||
movs r2, 0xA
|
||||
ldrsh r0, [r6, r2]
|
||||
adds r0, 0x1
|
||||
ands r0, r4
|
||||
lsls r0, 4
|
||||
ands r1, r5
|
||||
orrs r1, r0
|
||||
strh r1, [r3, 0x6]
|
||||
mov r0, sp
|
||||
movs r1, 0xFF
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl AddSprite
|
||||
_080132D6:
|
||||
adds r0, r6, 0
|
||||
bl sub_8013470
|
||||
movs r1, 0x14
|
||||
ldrsh r0, [r6, r1]
|
||||
cmp r0, 0
|
||||
beq _080132EC
|
||||
adds r0, r6, 0
|
||||
adds r0, 0x14
|
||||
bl sub_801332C
|
||||
_080132EC:
|
||||
ldrh r0, [r6, 0x24]
|
||||
adds r0, 0x1
|
||||
strh r0, [r6, 0x24]
|
||||
add sp, 0x8
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080132FC: .4byte 0x0000feff
|
||||
_08013300: .4byte 0xffff0000
|
||||
_08013304: .4byte 0x0000fdff
|
||||
_08013308: .4byte 0x0000f3ff
|
||||
_0801330C: .4byte 0x0000efff
|
||||
_08013310: .4byte 0x0000dfff
|
||||
_08013314: .4byte 0x00003fff
|
||||
_08013318: .4byte 0x00000fff
|
||||
_0801331C: .4byte 0x0000fffe
|
||||
_08013320: .4byte 0x0000fffd
|
||||
_08013324: .4byte 0x000001ff
|
||||
thumb_func_end AddMenuCursorSprite_
|
||||
|
||||
thumb_func_start nullsub_34
|
||||
nullsub_34:
|
||||
bx lr
|
||||
thumb_func_end nullsub_34
|
||||
|
||||
thumb_func_start sub_801332C
|
||||
sub_801332C:
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
str r1, [sp]
|
||||
str r2, [sp, 0x4]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
ldr r2, _08013440
|
||||
ands r2, r1
|
||||
ldr r4, _08013444
|
||||
ldr r1, [sp]
|
||||
ands r1, r4
|
||||
orrs r1, r2
|
||||
str r1, [sp]
|
||||
mov r2, sp
|
||||
ldrh r2, [r2]
|
||||
adds r3, r4, 0
|
||||
ands r3, r1
|
||||
orrs r3, r2
|
||||
str r3, [sp]
|
||||
mov r1, sp
|
||||
ldrh r2, [r1]
|
||||
ldr r1, _08013448
|
||||
ands r1, r2
|
||||
adds r2, r4, 0
|
||||
ands r2, r3
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
adds r3, r4, 0
|
||||
ands r3, r2
|
||||
orrs r3, r1
|
||||
str r3, [sp]
|
||||
movs r5, 0x80
|
||||
lsls r5, 3
|
||||
mov r1, sp
|
||||
ldrh r2, [r1]
|
||||
ldr r6, _0801344C
|
||||
adds r1, r6, 0
|
||||
ands r1, r2
|
||||
adds r2, r4, 0
|
||||
ands r2, r3
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
orrs r5, r1
|
||||
adds r3, r4, 0
|
||||
ands r3, r2
|
||||
orrs r3, r5
|
||||
str r3, [sp]
|
||||
mov r1, sp
|
||||
ldrh r2, [r1]
|
||||
ldr r1, _08013450
|
||||
ands r1, r2
|
||||
adds r2, r4, 0
|
||||
ands r2, r3
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
adds r3, r4, 0
|
||||
ands r3, r2
|
||||
orrs r3, r1
|
||||
str r3, [sp]
|
||||
mov r1, sp
|
||||
ldrh r2, [r1]
|
||||
ldr r1, _08013454
|
||||
ands r1, r2
|
||||
adds r2, r4, 0
|
||||
ands r2, r3
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
adds r3, r4, 0
|
||||
ands r3, r2
|
||||
orrs r3, r1
|
||||
str r3, [sp]
|
||||
mov r1, sp
|
||||
ldrh r2, [r1]
|
||||
ldr r1, _08013458
|
||||
ands r1, r2
|
||||
adds r2, r4, 0
|
||||
ands r2, r3
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
ands r4, r2
|
||||
orrs r4, r1
|
||||
str r4, [sp]
|
||||
mov r4, sp
|
||||
ldr r3, _0801345C
|
||||
ldrh r2, [r4, 0x4]
|
||||
movs r1, 0xFC
|
||||
lsls r1, 8
|
||||
ands r1, r2
|
||||
orrs r1, r3
|
||||
ands r1, r6
|
||||
movs r6, 0xF
|
||||
movs r2, 0xF0
|
||||
lsls r2, 8
|
||||
ldr r5, _08013460
|
||||
ands r1, r5
|
||||
orrs r1, r2
|
||||
strh r1, [r4, 0x4]
|
||||
ldrh r1, [r4, 0x6]
|
||||
ldr r2, _08013464
|
||||
ands r2, r1
|
||||
ldr r1, _08013468
|
||||
ands r2, r1
|
||||
movs r3, 0
|
||||
ldrsh r1, [r0, r3]
|
||||
ldr r3, _0801346C
|
||||
ands r1, r3
|
||||
strh r1, [r4, 0x2]
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r0, r1]
|
||||
adds r0, 0x1
|
||||
ands r0, r5
|
||||
lsls r0, 4
|
||||
ands r2, r6
|
||||
orrs r2, r0
|
||||
strh r2, [r4, 0x6]
|
||||
mov r0, sp
|
||||
movs r1, 0xFF
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl AddSprite
|
||||
add sp, 0x8
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08013440: .4byte 0x0000feff
|
||||
_08013444: .4byte 0xffff0000
|
||||
_08013448: .4byte 0x0000fdff
|
||||
_0801344C: .4byte 0x0000f3ff
|
||||
_08013450: .4byte 0x0000efff
|
||||
_08013454: .4byte 0x0000dfff
|
||||
_08013458: .4byte 0x00003fff
|
||||
_0801345C: .4byte 0x000003f5
|
||||
_08013460: .4byte 0x00000fff
|
||||
_08013464: .4byte 0x0000fffe
|
||||
_08013468: .4byte 0x0000fffd
|
||||
_0801346C: .4byte 0x000001ff
|
||||
thumb_func_end sub_801332C
|
||||
|
||||
thumb_func_start sub_8013470
|
||||
sub_8013470:
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
adds r6, r0, 0
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
str r0, [sp]
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0xC
|
||||
ldrsh r0, [r6, r1]
|
||||
cmp r0, 0
|
||||
bne _08013488
|
||||
b _08013624
|
||||
_08013488:
|
||||
movs r2, 0x1E
|
||||
ldrsh r0, [r6, r2]
|
||||
cmp r0, 0
|
||||
beq _08013586
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
ldr r1, _0801362C
|
||||
ands r1, r0
|
||||
ldr r3, _08013630
|
||||
ldr r0, [sp]
|
||||
ands r0, r3
|
||||
orrs r0, r1
|
||||
str r0, [sp]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
adds r2, r3, 0
|
||||
ands r2, r0
|
||||
orrs r2, r1
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _08013634
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r4, _08013638
|
||||
adds r0, r4, 0
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _0801363C
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _08013640
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
adds r2, r3, 0
|
||||
ands r2, r1
|
||||
orrs r2, r0
|
||||
str r2, [sp]
|
||||
mov r0, sp
|
||||
ldrh r1, [r0]
|
||||
ldr r0, _08013644
|
||||
ands r0, r1
|
||||
adds r1, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
str r1, [sp]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
ands r3, r1
|
||||
orrs r3, r0
|
||||
str r3, [sp]
|
||||
mov r3, sp
|
||||
ldr r2, _08013648
|
||||
ldrh r1, [r3, 0x4]
|
||||
movs r0, 0xFC
|
||||
lsls r0, 8
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
ands r0, r4
|
||||
movs r5, 0xF
|
||||
movs r1, 0xF0
|
||||
lsls r1, 8
|
||||
ldr r4, _0801364C
|
||||
ands r0, r4
|
||||
orrs r0, r1
|
||||
strh r0, [r3, 0x4]
|
||||
ldrh r0, [r3, 0x6]
|
||||
ldr r1, _08013650
|
||||
ands r1, r0
|
||||
ldr r0, _08013654
|
||||
ands r1, r0
|
||||
movs r2, 0xC
|
||||
ldrsh r0, [r6, r2]
|
||||
ldr r2, _08013658
|
||||
ands r0, r2
|
||||
strh r0, [r3, 0x2]
|
||||
movs r2, 0xE
|
||||
ldrsh r0, [r6, r2]
|
||||
ands r0, r4
|
||||
lsls r0, 4
|
||||
ands r1, r5
|
||||
orrs r1, r0
|
||||
strh r1, [r3, 0x6]
|
||||
mov r0, sp
|
||||
movs r1, 0xFF
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl AddSprite
|
||||
_08013586:
|
||||
movs r1, 0x20
|
||||
ldrsh r0, [r6, r1]
|
||||
cmp r0, 0
|
||||
beq _08013624
|
||||
adds r1, r0, 0
|
||||
movs r2, 0x1E
|
||||
ldrsh r0, [r6, r2]
|
||||
adds r0, 0x1
|
||||
cmp r1, r0
|
||||
beq _08013624
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
ldr r1, _0801362C
|
||||
ands r1, r0
|
||||
mov r0, sp
|
||||
strh r1, [r0]
|
||||
strh r1, [r0]
|
||||
ldr r0, _08013634
|
||||
ands r0, r1
|
||||
mov r1, sp
|
||||
strh r0, [r1]
|
||||
strh r0, [r1]
|
||||
ldr r4, _08013638
|
||||
ands r0, r4
|
||||
strh r0, [r1]
|
||||
strh r0, [r1]
|
||||
ldr r1, _0801363C
|
||||
ands r1, r0
|
||||
mov r0, sp
|
||||
strh r1, [r0]
|
||||
strh r1, [r0]
|
||||
ldr r2, _08013640
|
||||
ands r2, r1
|
||||
strh r2, [r0]
|
||||
strh r2, [r0]
|
||||
ldr r0, _08013644
|
||||
ands r0, r2
|
||||
mov r1, sp
|
||||
strh r0, [r1]
|
||||
strh r0, [r1]
|
||||
mov r3, sp
|
||||
ldr r2, _0801365C
|
||||
ldrh r1, [r3, 0x4]
|
||||
movs r0, 0xFC
|
||||
lsls r0, 8
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
ands r0, r4
|
||||
movs r5, 0xF
|
||||
movs r1, 0xF0
|
||||
lsls r1, 8
|
||||
ldr r4, _0801364C
|
||||
ands r0, r4
|
||||
orrs r0, r1
|
||||
strh r0, [r3, 0x4]
|
||||
ldrh r0, [r3, 0x6]
|
||||
ldr r1, _08013650
|
||||
ands r1, r0
|
||||
ldr r0, _08013654
|
||||
ands r1, r0
|
||||
movs r2, 0xC
|
||||
ldrsh r0, [r6, r2]
|
||||
adds r0, 0xA
|
||||
ldr r2, _08013658
|
||||
ands r0, r2
|
||||
strh r0, [r3, 0x2]
|
||||
movs r2, 0xE
|
||||
ldrsh r0, [r6, r2]
|
||||
ands r0, r4
|
||||
lsls r0, 4
|
||||
ands r1, r5
|
||||
orrs r1, r0
|
||||
strh r1, [r3, 0x6]
|
||||
mov r0, sp
|
||||
movs r1, 0xFF
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl AddSprite
|
||||
_08013624:
|
||||
add sp, 0x8
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_0801362C: .4byte 0x0000feff
|
||||
_08013630: .4byte 0xffff0000
|
||||
_08013634: .4byte 0x0000fdff
|
||||
_08013638: .4byte 0x0000f3ff
|
||||
_0801363C: .4byte 0x0000efff
|
||||
_08013640: .4byte 0x0000dfff
|
||||
_08013644: .4byte 0x00003fff
|
||||
_08013648: .4byte 0x000003f2
|
||||
_0801364C: .4byte 0x00000fff
|
||||
_08013650: .4byte 0x0000fffe
|
||||
_08013654: .4byte 0x0000fffd
|
||||
_08013658: .4byte 0x000001ff
|
||||
_0801365C: .4byte 0x000003f3
|
||||
thumb_func_end sub_8013470
|
||||
|
||||
.align 2,0
|
1093
asm/sprite.s
1093
asm/sprite.s
File diff suppressed because it is too large
Load Diff
@ -292,7 +292,12 @@ gUnknown_81076BC: @ 81076BC
|
||||
|
||||
.global gUnknown_81076C4
|
||||
gUnknown_81076C4: @ 81076C4
|
||||
.byte 0xfc, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff
|
||||
.4byte -4
|
||||
.4byte -8
|
||||
.4byte -16
|
||||
.4byte -4
|
||||
.4byte -8
|
||||
.4byte -16
|
||||
.string "pksdir0\0"
|
||||
|
||||
.global gIQSkillGroups
|
||||
|
107
include/axdata.h
Normal file
107
include/axdata.h
Normal file
@ -0,0 +1,107 @@
|
||||
#ifndef GUARD_AXDATA_H
|
||||
#define GUARD_AXDATA_H
|
||||
|
||||
#include "file_system.h"
|
||||
|
||||
// size: 0x8
|
||||
struct UnkSpriteMem
|
||||
{
|
||||
/* 0x0 */ void *src;
|
||||
/* 0x4 */ s32 byteCount;
|
||||
};
|
||||
|
||||
// size: 0x20
|
||||
struct axdata1
|
||||
{
|
||||
/* 0x0 */ s16 xPos;
|
||||
/* 0x2 */ s16 yPos;
|
||||
/* 0x4 */ u16 xOffset;
|
||||
/* 0x6 */ u16 yOffset;
|
||||
/* 0x8 */ u16 xShadow;
|
||||
/* 0xA */ u16 yShadow;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
/* 0x14 */ s16 vramTileOrMaybeAnimTimer;
|
||||
s16 unk16;
|
||||
/* 0x18 */ s16 poseId;
|
||||
/* 0x1A */ s16 lastPoseId;
|
||||
u8 fill1C[0x1E - 0x1C];
|
||||
u8 paletteNum;
|
||||
};
|
||||
|
||||
// size: 0xA
|
||||
struct __attribute__ ((packed, aligned(2))) ax_pose
|
||||
{
|
||||
/* 0x0 */ s16 sprite;
|
||||
u16 unk2; // Always 0 in red (except for end markers which are 0xFFFF)
|
||||
/* 0x4 */ u16 flags1;
|
||||
/* 0x6 */ u16 flags2;
|
||||
/* 0x8 */ u16 flags3;
|
||||
};
|
||||
|
||||
// size: 0xC
|
||||
struct ax_anim
|
||||
{
|
||||
/* 0x0 */ u8 frames;
|
||||
/* 0x1 */ u8 unkFlags;
|
||||
/* 0x2 */ s16 poseId;
|
||||
/* 0x4 */ s16 xOffset;
|
||||
/* 0x6 */ s16 yOffset;
|
||||
/* 0x8 */ s16 xShadow;
|
||||
/* 0xA */ s16 yShadow;
|
||||
};
|
||||
|
||||
// size: 0x3C
|
||||
struct axdata
|
||||
{
|
||||
/* 0x0 */ u16 flags; // 0x8000 - animating, 0x2000 finished? 0x1000 continue
|
||||
/* 0x2 */ s16 animFrames; // frames left in the current animation frame
|
||||
/* 0x4 */ s16 animWaitFrames; // frames to not update the animation for
|
||||
/* 0x6 */ s16 totalFrames; // max 30000
|
||||
/* 0x8 */ struct axdata1 sub1;
|
||||
/* 0x28 */ struct ax_anim *nextAnimData; // next animation data (if flags&0x1000)
|
||||
/* 0x2C */ struct ax_anim *activeAnimData; // current animation data
|
||||
/* 0x30 */ void *paletteData; // ?
|
||||
/* 0x34 */ struct ax_pose *poseData;
|
||||
/* 0x38 */ struct UnkSpriteMem **spriteData;
|
||||
};
|
||||
|
||||
// size: 0x14
|
||||
struct axmain
|
||||
{
|
||||
/* 0x0 */ struct ax_pose **poses;
|
||||
/* 0x4 */ struct ax_anim ****animations;
|
||||
/* 0x8 */ u32 animCount;
|
||||
/* 0xC */ void *spriteData; // ?
|
||||
/* 0x10 */ void *palettes; // ?
|
||||
};
|
||||
|
||||
// size: ?
|
||||
struct axPokemon
|
||||
{
|
||||
/* 0x0 */ struct axdata axdata;
|
||||
/* 0x3C */ struct OpenedFile *spriteFile;
|
||||
u16 unk40_maybeAnimTimer;
|
||||
u8 unk42_animId1;
|
||||
u8 unk43_animId2;
|
||||
u8 unk44;
|
||||
u8 unk45_orientation;
|
||||
u8 unk46;
|
||||
u8 unk47;
|
||||
u8 unk48;
|
||||
u8 fill49[0x4C - 0x49];
|
||||
/* 0x4C */ struct axmain *axmain;
|
||||
u8 flags_0x50;
|
||||
u8 fill51;
|
||||
s16 unk52;
|
||||
u8 fill54[0x66 - 0x54];
|
||||
s16 unk66;
|
||||
u8 fill68[0x6C - 0x68];
|
||||
u16 unk6C;
|
||||
u16 unk6E;
|
||||
u8 unk70;
|
||||
u8 fill71[0x7C - 0x71];
|
||||
s32 unk7C;
|
||||
};
|
||||
|
||||
#endif // GUARD_AXDATA_H
|
10
include/code_800558C_1.h
Normal file
10
include/code_800558C_1.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef GUARD_CODE_800558C_1_H
|
||||
#define GUARD_CODE_800558C_1_H
|
||||
|
||||
void nullsub_7(s16 *);
|
||||
void nullsub_10(bool8);
|
||||
void nullsub_12(void);
|
||||
void nullsub_13(void);
|
||||
void nullsub_14(void);
|
||||
|
||||
#endif // GUARD_CODE_800558C_1_H
|
7
include/code_800DAC0.h
Normal file
7
include/code_800DAC0.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_CODE_800DAC0_H
|
||||
#define GUARD_CODE_800DAC0_H
|
||||
|
||||
void sub_800DAC0(u32);
|
||||
void sub_800DB7C(void);
|
||||
|
||||
#endif // GUARD_CODE_800DAC0_H
|
16
include/code_80118A4.h
Normal file
16
include/code_80118A4.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef GUARD_CODE_80118A4_H
|
||||
#define GUARD_CODE_80118A4_H
|
||||
|
||||
void FadeOutAllMusic(u16);
|
||||
void PlayMenuSoundEffect(u32);
|
||||
void PlaySound(u16);
|
||||
void sub_801180C(void);
|
||||
void sub_8011830(void);
|
||||
void sub_8011860(void);
|
||||
void xxx_call_fade_in_new_bgm(u16, u16);
|
||||
void xxx_call_fade_out_bgm(u16);
|
||||
void xxx_call_start_bg_music(void);
|
||||
void xxx_call_stop_bgm(void);
|
||||
void xxx_call_stop_fanfare_se(u16);
|
||||
|
||||
#endif // GUARD_CODE_80118A4_H
|
13
include/code_805D8C8.h
Normal file
13
include/code_805D8C8.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef GUARD_CODE_805D8C8_H
|
||||
#define GUARD_CODE_805D8C8_H
|
||||
|
||||
#include "sprite.h"
|
||||
|
||||
extern struct OpenedFile *sub_80687D0(s16);
|
||||
/*struct OpenedFile *sub_80687D0(s16 species)
|
||||
{
|
||||
s32 species32 = species;
|
||||
return gDungeon->sprites[species32];
|
||||
}*/
|
||||
|
||||
#endif // GUARD_CODE_805D8C8_H
|
@ -1,8 +1,6 @@
|
||||
#ifndef GUARD_CONSTANTS_MONSTER_H
|
||||
#define GUARD_CONSTANTS_MONSTER_H
|
||||
|
||||
#define NUM_MONSTERS 413
|
||||
|
||||
#define MONSTER_NONE 0
|
||||
#define MONSTER_BULBASAUR 1
|
||||
#define MONSTER_IVYSAUR 2
|
||||
@ -429,4 +427,7 @@
|
||||
#define MONSTER_STATUE 422
|
||||
#define MONSTER_RAYQUAZA_CUTSCENE 423
|
||||
|
||||
#endif // GUARD_CONSTANTS_MONSTER_H
|
||||
#define NUM_MONSTERS MONSTER_JIRACHI
|
||||
#define MONSTER_MAX MONSTER_RAYQUAZA_CUTSCENE
|
||||
|
||||
#endif // GUARD_CONSTANTS_MONSTER_H
|
@ -1,8 +1,12 @@
|
||||
#ifndef GUARD_CPU_H
|
||||
#define GUARD_CPU_H
|
||||
|
||||
void CpuClear(void *, s32);
|
||||
void CpuCopy(void *, void *, s32);
|
||||
void nullsub_23(bool8);
|
||||
void SetWindowTitle(char *);
|
||||
void sub_800CDA8(u32);
|
||||
u32 sub_800CDC8(void);
|
||||
void VBlank_CB(void);
|
||||
|
||||
void sub_800CDA8(u32);
|
||||
|
||||
#endif //GUARD_CPU_H
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#define RANGED_ATTACK_RANGE 10
|
||||
|
||||
// size: 0x8
|
||||
struct AIPossibleMove
|
||||
{
|
||||
bool8 canBeUsed;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "constants/move.h"
|
||||
#include "item.h"
|
||||
#include "position.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define MAX_STAT_STAGE 20
|
||||
#define STAT_MULTIPLIER_THRESHOLD 63
|
||||
@ -270,32 +271,8 @@ struct Entity
|
||||
// The global spawn index counter starts at 10. Each Pokémon that spawns increments the counter and
|
||||
// gets assigned the current counter value as its spawn index.
|
||||
/* 0x26 */ u16 spawnGenID;
|
||||
u8 fill28[0x2A - 0x28];
|
||||
// 0x2A and 0x2E seem to be related to the sprite animation, though not sure how they're related.
|
||||
/* 0x2A */ u16 spriteAnimationCounter;
|
||||
// Each animation has a few different sprites that it transitions between.
|
||||
// This is the index of the currently displayed sprite within the animation.
|
||||
// Differs from 0x34 as this index is only between the sprites used by the animation,
|
||||
// while 0x34 is a shared index among all sprites.
|
||||
/* 0x2C */ u16 spriteAnimationIndex;
|
||||
/* 0x2E */ u16 spriteAnimationCounter2;
|
||||
// The position of the sprite within the tile. The animation may change the position slightly.
|
||||
/* 0x30 */ struct Position spritePos;
|
||||
// Offset of the sprite from its position at the start of the animation. Changes alongside spritePos.
|
||||
/* 0x34 */ struct Position spritePosOffset;
|
||||
u8 fill38[0x48 - 0x38];
|
||||
// The sprite index to display, among the Pokémon's possible sprites.
|
||||
/* 0x48 */ u16 spriteIndexForEntity;
|
||||
/* 0x4A */ u16 spriteIndexForEntity2;
|
||||
u8 unk4C[0x50 - 0x4C];
|
||||
// Some kind of base sprite index depending on which way the Pokémon is facing.
|
||||
// and which animation is playing (e.g., idle, moving).
|
||||
// Compared to 0x48, 0x50 and 0x54 are much larger and could be global indexes among all sprites in the game.
|
||||
/* 0x50 */ u16 spriteBaseForDirection;
|
||||
u8 fill52[0x54 - 0x52];
|
||||
/* 0x54 */ u16 spriteGlobalIndex;
|
||||
u8 fill56[0x64 - 0x56];
|
||||
u32 unk64;
|
||||
/* 0x28*/ struct EntitySpriteInfo spriteInfo;
|
||||
struct OpenedFile *unk64;
|
||||
s16 unk68;
|
||||
u8 unk6A;
|
||||
u8 unk6B;
|
||||
|
@ -1,11 +1,13 @@
|
||||
#ifndef GUARD_DUNGEON_DATA_H
|
||||
#define GUARD_DUNGEON_DATA_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/monster.h"
|
||||
#include "dungeon_entity.h"
|
||||
#include "global.h"
|
||||
#include "file_system.h"
|
||||
#include "map.h"
|
||||
#include "position.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define DUNGEON_MAX_SIZE_X 56
|
||||
#define DUNGEON_MAX_SIZE_Y 32
|
||||
@ -197,7 +199,9 @@ struct Dungeon
|
||||
/* 0x17B34 */ u8 fillunk1734[0x17B38 - 0x17B34];
|
||||
/* 0x17B38 */ u32 unk17B38;
|
||||
/* 0x17B3C */ u32 unk17B3C;
|
||||
u8 fill17B40[0x181E8 - 0x17B40];
|
||||
u8 fill17B40[0x17B44 - 0x17B40];
|
||||
/* 0x17B44 */ struct OpenedFile *sprites[MONSTER_MAX + 1];
|
||||
u8 fill181E4[0x181E8 - 0x181E4];
|
||||
/* 0x181E8 */ struct Position cameraPos;
|
||||
/* 0x181EC */ struct Position cameraPosMirror;
|
||||
/* 0x181F0 */ struct Position cameraPixelPos;
|
||||
|
@ -1,35 +1,40 @@
|
||||
#ifndef GUARD_FILE_SYSTEM_H
|
||||
#define GUARD_FILE_SYSTEM_H
|
||||
|
||||
// size: 0x8
|
||||
struct File
|
||||
{
|
||||
char *name;
|
||||
u8 *data;
|
||||
/* 0x0 */ char *name;
|
||||
/* 0x4 */ u8 *data;
|
||||
};
|
||||
|
||||
// size: 0x8
|
||||
struct OpenedFile
|
||||
{
|
||||
struct File *file;
|
||||
u8 *data;
|
||||
/* 0x0 */ struct File *file;
|
||||
/* 0x4 */ u8 *data;
|
||||
};
|
||||
|
||||
// size: 0x10
|
||||
struct FileArchive
|
||||
{
|
||||
char magic[8];
|
||||
s32 count;
|
||||
struct File *entries;
|
||||
/* 0x0 */ char magic[8];
|
||||
/* 0x8 */ s32 count;
|
||||
/* 0xC */ struct File *entries;
|
||||
};
|
||||
|
||||
// size: 0x8
|
||||
struct SiroArchive
|
||||
{
|
||||
u32 magic;
|
||||
u8 *data;
|
||||
/* 0x0 */ u32 magic;
|
||||
/* 0x4 */ u8 *data;
|
||||
};
|
||||
|
||||
// size: 0x8
|
||||
struct UnkFileStruct1
|
||||
{
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ u32 unk4;
|
||||
u32 unk0;
|
||||
u32 unk4;
|
||||
};
|
||||
|
||||
void InitFileSystem(void);
|
||||
|
6
include/ground_map_1.h
Normal file
6
include/ground_map_1.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_GROUND_MAP_1_H
|
||||
#define GUARD_GROUND_MAP_1_H
|
||||
|
||||
bool8 sub_80A4D48(s16);
|
||||
|
||||
#endif // GUARD_GROUND_MAP_1_H
|
37
include/ground_sprite.h
Normal file
37
include/ground_sprite.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef GUARD_GROUND_SPRITE_H
|
||||
#define GUARD_GROUND_SPRITE_H
|
||||
|
||||
// size: 0xC
|
||||
struct unkStruct_2039DB0
|
||||
{
|
||||
u16 unk0;
|
||||
s16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
u16 unk8;
|
||||
u16 unkA;
|
||||
};
|
||||
|
||||
// size: 0xC
|
||||
struct unkStruct_3001B7C_sub0
|
||||
{
|
||||
u32 unk0;
|
||||
s32 unk4;
|
||||
u32 unk8;
|
||||
};
|
||||
// size: 0x4
|
||||
struct unkStruct_3001B7C_sub108
|
||||
{
|
||||
u16 unk0;
|
||||
s16 unk2;
|
||||
};
|
||||
// size: 0x110
|
||||
struct unkStruct_3001B7C
|
||||
{
|
||||
struct unkStruct_3001B7C_sub0 unk0[22];
|
||||
struct unkStruct_3001B7C_sub108 unk108[2];
|
||||
};
|
||||
|
||||
void GroundSprite_Reset(s16);
|
||||
|
||||
#endif // GUARD_GROUND_SPRITE_H
|
@ -1,5 +1,10 @@
|
||||
#ifndef GUARD_GULPIN_SHOP_H
|
||||
#define GUARD_GULPIN_SHOP_H
|
||||
#define GUARD_GULPIN_SHOP_H
|
||||
|
||||
#include "constants/move.h"
|
||||
#include "file_system.h"
|
||||
#include "menu.h"
|
||||
#include "text.h"
|
||||
|
||||
// size: 0x18C
|
||||
struct GulpinShopWork
|
||||
|
@ -68,13 +68,13 @@ struct MenuInputStruct
|
||||
s32 unk0;
|
||||
u16 unk4;
|
||||
s16 unk6;
|
||||
u16 unk8;
|
||||
u16 unkA;
|
||||
u16 unkC;
|
||||
u16 unkE;
|
||||
s16 unk8; // Maybe struct Position
|
||||
s16 unkA;
|
||||
s16 unkC; // Maybe struct Position
|
||||
s16 unkE;
|
||||
u32 unk10;
|
||||
s16 unk14;
|
||||
u16 unk16;
|
||||
s16 unk14; // Maybe struct Position
|
||||
s16 unk16;
|
||||
/* 0x18 */ s16 menuIndex;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
|
@ -40,5 +40,7 @@ bool8 sub_8013938(struct MenuInputStruct *param_1);
|
||||
void sub_8013984(struct MenuInputStruct * param_1);
|
||||
void sub_8013A54(struct MenuInputStruct *param_1);
|
||||
void sub_8013A7C(struct MenuInputStruct *param_1);
|
||||
void AddMenuCursorSprite_(struct MenuInputStruct *, u32);
|
||||
void nullsub_34(struct MenuInputStructSub *);
|
||||
|
||||
#endif // GUARD_MENU_INPUT_H
|
@ -2,14 +2,8 @@
|
||||
#define GUARD_RESCUE_PASSWORD_MENU_H
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
struct unkSprite
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
};
|
||||
#include "sprite.h"
|
||||
#include "text.h"
|
||||
|
||||
// Similar to unkStruct_203B360
|
||||
struct RescuePasswordMenu
|
||||
@ -20,7 +14,7 @@ struct RescuePasswordMenu
|
||||
struct MenuStruct unk8[4];
|
||||
struct UnkTextStruct2 unk148[4];
|
||||
struct UnkTextStruct2 unk1A8[4];
|
||||
struct unkSprite unk208;
|
||||
struct SpriteOAM unk208;
|
||||
u32 unk210;
|
||||
};
|
||||
|
||||
|
@ -1,11 +1,91 @@
|
||||
#ifndef GUARD_SPRITE_H
|
||||
#define GUARD_SPRITE_H
|
||||
|
||||
void InitSprites(void);
|
||||
#include "axdata.h"
|
||||
#include "ground_sprite.h"
|
||||
#include "position.h"
|
||||
#include "sprite_oam.h"
|
||||
|
||||
// sprite.s
|
||||
extern void BlinkSavingIcon(void);
|
||||
extern void ResetSprites(bool32);
|
||||
extern void SetSavingIconCoords(u32);
|
||||
// size: 0x8
|
||||
struct UnkSpriteLink
|
||||
{
|
||||
struct UnkSpriteLink *unk0;
|
||||
struct SpriteOAM *unk4;
|
||||
};
|
||||
|
||||
// size: 0x808
|
||||
struct SpriteList
|
||||
{
|
||||
struct UnkSpriteLink sprites[256];
|
||||
u32 unk800;
|
||||
u32 unk804;
|
||||
};
|
||||
|
||||
// size: 0xC
|
||||
struct unkStruct_20266B0
|
||||
{
|
||||
/* 0x0 */ s32 byteCount;
|
||||
/* 0x4 */ void *src;
|
||||
/* 0x8 */ void *dest;
|
||||
};
|
||||
|
||||
// size: ? 0x3C for now
|
||||
struct EntitySpriteInfo
|
||||
{
|
||||
u16 unk0;
|
||||
// 0x2 and 0x6 seem to be related to the sprite animation, though not sure how they're related.
|
||||
/* 0x2 */ u16 spriteAnimationCounter;
|
||||
// Each animation has a few different sprites that it transitions between.
|
||||
// This is the index of the currently displayed sprite within the animation.
|
||||
// Differs from 0xC as this index is only between the sprites used by the animation,
|
||||
// while 0xC is a shared index among all sprites.
|
||||
/* 0x4 */ u16 spriteAnimationIndex;
|
||||
/* 0x6 */ u16 spriteAnimationCounter2;
|
||||
// The position of the sprite within the tile. The animation may change the position slightly.
|
||||
/* 0x8 */ struct Position spritePos;
|
||||
// Offset of the sprite from its position at the start of the animation. Changes alongside spritePos.
|
||||
/* 0xC */ struct Position spritePosOffset;
|
||||
u8 fill10[0x14 - 0x10];
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u16 unk1C;
|
||||
u8 fill1E[0x20 - 0x1E];
|
||||
// The sprite index to display, among the Pokémon's possible sprites.
|
||||
/* 0x20 */ u16 spriteIndexForEntity;
|
||||
/* 0x22 */ u16 spriteIndexForEntity2;
|
||||
u8 unk24[0x28 - 0x24];
|
||||
// Some kind of base sprite index depending on which way the Pokémon is facing.
|
||||
// and which animation is playing (e.g., idle, moving).
|
||||
// Compared to 0x20, 0x28 and 0x2C are much larger and could be global indexes among all sprites in the game.
|
||||
/* 0x28 */ u32 spriteBaseForDirection;
|
||||
/* 0x2C */ u32 spriteGlobalIndex;
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
};
|
||||
|
||||
// size: ?
|
||||
struct Dungeon_ax
|
||||
{
|
||||
u32 unk0;
|
||||
u32 **unk4;
|
||||
u8 fill8[0xC - 0x8];
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
};
|
||||
|
||||
void AddSprite(struct SpriteOAM *, s32, struct UnkSpriteMem *, struct unkStruct_2039DB0 *);
|
||||
void BlinkSavingIcon(void);
|
||||
void CopySpritesToOam(void);
|
||||
void InitSprites(void);
|
||||
void ResetSprites(bool8);
|
||||
void SetSavingIconCoords(struct Position *);
|
||||
void sub_8004E8C(struct unkStruct_2039DB0 *);
|
||||
void sub_8005180(void);
|
||||
void sub_8005304(void);
|
||||
void sub_80053AC(struct EntitySpriteInfo *, struct OpenedFile *, u32, u32, u32, u32, bool8);
|
||||
void sub_80053D0(struct EntitySpriteInfo *, struct Dungeon_ax *, u32, u32, u32, u32, bool8);
|
||||
void sub_800543C(struct EntitySpriteInfo *, struct OpenedFile *, u32, u32, u32, bool8);
|
||||
void sub_80054BC(struct axPokemon *);
|
||||
|
||||
#endif // GUARD_SPRITE_H
|
93
include/sprite_oam.h
Normal file
93
include/sprite_oam.h
Normal file
@ -0,0 +1,93 @@
|
||||
#ifndef GUARD_SPRITE_OAM_H
|
||||
#define GUARD_SPRITE_OAM_H
|
||||
|
||||
// size: 0x8. Similar to struct OamData but unk6 is not copied to OAM
|
||||
struct SpriteOAM
|
||||
{
|
||||
// y:8 affineMode1:1 affineMode2:1 objMode:2 mosaic:1 bpp:1 shape:2
|
||||
/* 0x0 */ u16 attrib1;
|
||||
// x:9 matrixNum:5 size:2
|
||||
/* 0x2 */ u16 attrib2;
|
||||
// tileNum:10 priority:2 paletteNum:4
|
||||
/* 0x4 */ u16 attrib3;
|
||||
// unk6_0:1 unk6_1:1 unk6_2:2? unk6_4:12
|
||||
u16 unk6;
|
||||
};
|
||||
|
||||
// The SpriteOAM struct is handled with macros most likely.
|
||||
// Most funcs that deal with it look the same and do some weird bit manipulations one by one on the attributes.
|
||||
// It seems like there is a macro to initialize the structure to some default values...
|
||||
|
||||
// attrib1
|
||||
|
||||
#define SPRITEOAM_MAX_Y 0xFF
|
||||
#define SPRITEOAM_SHIFT_Y 0
|
||||
#define SPRITEOAM_MASK_Y (SPRITEOAM_MAX_Y << SPRITEOAM_SHIFT_Y)
|
||||
|
||||
#define SPRITEOAM_MAX_AFFINEMODE1 1
|
||||
#define SPRITEOAM_SHIFT_AFFINEMODE1 8
|
||||
#define SPRITEOAM_MASK_AFFINEMODE1 (SPRITEOAM_MAX_AFFINEMODE1 << SPRITEOAM_SHIFT_AFFINEMODE1)
|
||||
|
||||
#define SPRITEOAM_MAX_AFFINEMODE2 1
|
||||
#define SPRITEOAM_SHIFT_AFFINEMODE2 9
|
||||
#define SPRITEOAM_MASK_AFFINEMODE2 (SPRITEOAM_MAX_AFFINEMODE2 << SPRITEOAM_SHIFT_AFFINEMODE2)
|
||||
|
||||
#define SPRITEOAM_MAX_OBJMODE 3
|
||||
#define SPRITEOAM_SHIFT_OBJMODE 10
|
||||
#define SPRITEOAM_MASK_OBJMODE (SPRITEOAM_MAX_OBJMODE << SPRITEOAM_SHIFT_OBJMODE)
|
||||
|
||||
#define SPRITEOAM_MAX_MOSAIC 1
|
||||
#define SPRITEOAM_SHIFT_MOSAIC 12
|
||||
#define SPRITEOAM_MASK_MOSAIC (SPRITEOAM_MAX_MOSAIC << SPRITEOAM_SHIFT_MOSAIC)
|
||||
|
||||
#define SPRITEOAM_MAX_BPP 1
|
||||
#define SPRITEOAM_SHIFT_BPP 13
|
||||
#define SPRITEOAM_MASK_BPP (SPRITEOAM_MAX_BPP << SPRITEOAM_SHIFT_BPP)
|
||||
|
||||
#define SPRITEOAM_MAX_SHAPE 3
|
||||
#define SPRITEOAM_SHIFT_SHAPE 14
|
||||
#define SPRITEOAM_MASK_SHAPE (SPRITEOAM_MAX_SHAPE << SPRITEOAM_SHIFT_SHAPE)
|
||||
|
||||
// attrib2
|
||||
|
||||
#define SPRITEOAM_MAX_X 0x1FF
|
||||
#define SPRITEOAM_SHIFT_X 0
|
||||
#define SPRITEOAM_MASK_X (SPRITEOAM_MAX_X << SPRITEOAM_SHIFT_X)
|
||||
|
||||
#define SPRITEOAM_MAX_MATRIXNUM 31
|
||||
#define SPRITEOAM_SHIFT_MATRIXNUM 9
|
||||
#define SPRITEOAM_MASK_MATRIXNUM (SPRITEOAM_MAX_MATRIXNUM << SPRITEOAM_SHIFT_MATRIXNUM)
|
||||
|
||||
#define SPRITEOAM_MAX_SIZE 3
|
||||
#define SPRITEOAM_SHIFT_SIZE 12
|
||||
#define SPRITEOAM_MASK_SIZE (SPRITEOAM_MAX_SIZE << SPRITEOAM_SHIFT_SIZE)
|
||||
|
||||
// attrib3
|
||||
|
||||
#define SPRITEOAM_MAX_TILENUM 0x3FF
|
||||
#define SPRITEOAM_SHIFT_TILENUM 0
|
||||
#define SPRITEOAM_MASK_TILENUM (SPRITEOAM_MAX_TILENUM << SPRITEOAM_SHIFT_TILENUM)
|
||||
|
||||
#define SPRITEOAM_MAX_PRIORITY 3
|
||||
#define SPRITEOAM_SHIFT_PRIORITY 10
|
||||
#define SPRITEOAM_MASK_PRIORITY (SPRITEOAM_MAX_PRIORITY << SPRITEOAM_SHIFT_PRIORITY)
|
||||
|
||||
#define SPRITEOAM_MAX_PALETTENUM 15
|
||||
#define SPRITEOAM_SHIFT_PALETTENUM 12
|
||||
#define SPRITEOAM_MASK_PALETTENUM (SPRITEOAM_MAX_PALETTENUM << SPRITEOAM_SHIFT_PALETTENUM)
|
||||
|
||||
// unk6
|
||||
|
||||
#define SPRITEOAM_MAX_UNK6_0 1
|
||||
#define SPRITEOAM_SHIFT_UNK6_0 0
|
||||
#define SPRITEOAM_MASK_UNK6_0 (SPRITEOAM_MAX_UNK6_0 << SPRITEOAM_SHIFT_UNK6_0)
|
||||
|
||||
#define SPRITEOAM_MAX_UNK6_1 1
|
||||
#define SPRITEOAM_SHIFT_UNK6_1 1
|
||||
#define SPRITEOAM_MASK_UNK6_1 (SPRITEOAM_MAX_UNK6_1 << SPRITEOAM_SHIFT_UNK6_1)
|
||||
|
||||
#define SPRITEOAM_MAX_UNK6_4 0xFFF
|
||||
#define SPRITEOAM_SHIFT_UNK6_4 4
|
||||
#define SPRITEOAM_MASK_UNK6_4 (SPRITEOAM_MAX_UNK6_4 << SPRITEOAM_SHIFT_UNK6_4)
|
||||
|
||||
#endif // GUARD_SPRITE_OAM_H
|
@ -11,5 +11,6 @@ u8 sub_8092354(u8 index);
|
||||
u8 sub_8092364(u8 index);
|
||||
void CopyAbilityNametoBuffer(char *buffer, u8 index);
|
||||
u8 *GetAbilityDescription(u8 index);
|
||||
u32 ReturnIntFromChar2(u8);
|
||||
|
||||
#endif
|
||||
|
@ -61,7 +61,6 @@ SECTIONS {
|
||||
src/input.o(.text);
|
||||
asm/code_8004AA0.o(.text);
|
||||
src/sprite.o(.text);
|
||||
asm/sprite.o(.text);
|
||||
asm/code_800558C.o(.text);
|
||||
src/code_800558C_1.o(.text);
|
||||
asm/code_8005838.o(.text);
|
||||
@ -91,8 +90,6 @@ SECTIONS {
|
||||
src/save.o(.text);
|
||||
src/code_8012A18.o(.text);
|
||||
src/menu_input.o(.text);
|
||||
asm/menu_input.o(.text);
|
||||
src/menu_input_1.o(.text);
|
||||
asm/code_80130A8.o(.text);
|
||||
src/code_8012A18_1.o(.text);
|
||||
src/felicity_bank.o(.text);
|
||||
@ -234,7 +231,6 @@ SECTIONS {
|
||||
asm/code_8077274_1.o(.text);
|
||||
src/dungeon_ai_movement.o(.text);
|
||||
src/dungeon_ai_attack.o(.text);
|
||||
asm/code_807CABC.o(.text);
|
||||
src/targeting_flags.o(.text);
|
||||
asm/code_807CD9C.o(.text);
|
||||
src/code_807CD9C.o(.text);
|
||||
@ -315,6 +311,7 @@ SECTIONS {
|
||||
src/ground_map_1.o(.text);
|
||||
asm/ground_map_1.o(.text);
|
||||
src/ground_map_2.o(.text);
|
||||
src/ground_sprite.o(.text);
|
||||
asm/ground_sprite.o(.text);
|
||||
src/code_80A7714.o(.text);
|
||||
asm/ground_lives.o(.text);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "constants/input.h"
|
||||
#include "memory.h"
|
||||
@ -42,7 +43,6 @@ const u8 fill_adven[] = "pksdir0";
|
||||
|
||||
void sub_8032084();
|
||||
void DisplayAdventureLog();
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern bool8 sub_8097710(u8);
|
||||
|
||||
extern s16 sub_80978B8();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "bg_palette_buffer.h"
|
||||
#include "cpu.h"
|
||||
|
||||
#define BG_PALETTE_BUFFER_SIZE 512
|
||||
#define BG_PALETTE_BUFFER_CHUNK_SIZE 16
|
||||
@ -7,8 +8,6 @@
|
||||
EWRAM_DATA bool8 gBGPaletteUsed[BG_PALETTE_BUFFER_SIZE / BG_PALETTE_BUFFER_CHUNK_SIZE] = {0};
|
||||
EWRAM_DATA u16 gBGPaletteBuffer[BG_PALETTE_BUFFER_SIZE] = {0};
|
||||
|
||||
extern void CpuCopy(void* src, void* dest, u32 size);
|
||||
|
||||
#ifndef NONMATCHING
|
||||
NAKED
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@ void xxx_dungeon_8001340(u32 r0)
|
||||
NDS_LoadOverlay_GroundMain();
|
||||
}
|
||||
|
||||
void nullsub_3(void)
|
||||
void nullsub_3(s32 a0, s32 a1)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -20,8 +20,8 @@
|
||||
#include "cpu.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "sprite.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern void sub_801180C(void);
|
||||
extern void NDS_LoadOverlay_GroundMain(void);
|
||||
extern void sub_8014144(void);
|
||||
extern void sub_8097670(void);
|
||||
@ -30,7 +30,6 @@ extern void SetWindowBGColor(void);
|
||||
extern void LoadItemParameters(void);
|
||||
extern void LoadMailInfo(void);
|
||||
extern void sub_800CD64(u32, u32);
|
||||
extern void SetWindowTitle(char *);
|
||||
extern void sub_800DAAC(void);
|
||||
extern void sub_800135C(void);
|
||||
extern void xxx_script_related_8001334(u32);
|
||||
@ -48,12 +47,8 @@ extern u32 sub_80009D0(u32);
|
||||
extern void xxx_draw_string_80144C4(void);
|
||||
extern void sub_8005838(u32, u32);
|
||||
extern void nullsub_8(u32);
|
||||
extern void sub_8005180(void);
|
||||
extern void sub_80060EC(void);
|
||||
extern void sub_8011860(void);
|
||||
extern void sub_800CB20(void);
|
||||
extern void CopySpritesToOam(void);
|
||||
extern void sub_8005304(void);
|
||||
extern void TransferBGPaletteBuffer(void);
|
||||
extern void xxx_call_update_bg_vram(void);
|
||||
extern void sub_8009908(void);
|
||||
@ -98,7 +93,7 @@ void GameLoop(void)
|
||||
InitializeGameOptions(TRUE);
|
||||
SetWindowTitle(gPMDBuildVersion);
|
||||
sub_800DAAC();
|
||||
SetSavingIconCoords(0);
|
||||
SetSavingIconCoords(NULL);
|
||||
tmp = 0;
|
||||
if (ReadSaveFromPak(&tmp))
|
||||
sub_800135C();
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_800558C_1.h"
|
||||
|
||||
extern u8 gUnknown_2026E38;
|
||||
extern u32 gUnknown_2026E3C;
|
||||
@ -27,8 +28,10 @@ void sub_8005770(s32 param_1, u8 *RGBArray, s32 a1, u8 *a2)
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_7(void)
|
||||
{}
|
||||
// Maybe struct Position
|
||||
void nullsub_7(s16 *a0)
|
||||
{
|
||||
}
|
||||
|
||||
void nullsub_8(void)
|
||||
{}
|
||||
@ -36,7 +39,7 @@ void nullsub_8(void)
|
||||
void nullsub_9(void)
|
||||
{}
|
||||
|
||||
void nullsub_10(void)
|
||||
void nullsub_10(bool8 a0)
|
||||
{}
|
||||
|
||||
void nullsub_144(void)
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "cpu.h"
|
||||
#include "file_system.h"
|
||||
#include "text1.h"
|
||||
|
||||
@ -23,7 +24,6 @@ struct unkStruct_202D038
|
||||
|
||||
extern struct unkStruct_202D038 gUnknown_202D038[8];
|
||||
|
||||
extern void CpuCopy(void* dest, void *src, s32 size);
|
||||
extern void SetBGPaletteBufferColorArray(s32 index, void *colorArray);
|
||||
extern void sub_8009A1C(u32);
|
||||
u32 sub_80063B0(void);
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "code_800DAC0.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "file_system.h"
|
||||
#include "memory.h"
|
||||
|
||||
@ -49,14 +51,12 @@ 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);
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "music.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "play_time.h"
|
||||
@ -10,13 +11,11 @@
|
||||
#include "game_options.h"
|
||||
#include "sprite.h"
|
||||
|
||||
void xxx_call_stop_bgm(void);
|
||||
|
||||
extern bool8 sub_80023E4(u8);
|
||||
extern void xxx_call_stop_fanfare_se(u16 r0);
|
||||
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
|
||||
// size: 0x4DD8
|
||||
struct UnkBgStruct
|
||||
{
|
||||
u8 padding[0x4c4b];
|
||||
@ -24,8 +23,8 @@ struct UnkBgStruct
|
||||
u8 padding2[0x17A];
|
||||
u32 *unk4dcc;
|
||||
u32 unk4dd0;
|
||||
s16 xoffset;
|
||||
s16 yoffset;
|
||||
/* 0x4DD4 */ s16 xoffset;
|
||||
/* 0x4DD6 */ s16 yoffset;
|
||||
};
|
||||
extern struct UnkBgStruct *gUnknown_203B0E4;
|
||||
|
||||
@ -38,15 +37,11 @@ EWRAM_DATA s16 gUnknown_202DE24;
|
||||
|
||||
void nullsub_8(u32);
|
||||
void sub_8005838(u32, u32);
|
||||
extern void CopySpritesToOam(void);
|
||||
extern void sub_8005304(void);
|
||||
extern void TransferBGPaletteBuffer(void);
|
||||
extern void xxx_call_update_bg_vram(void);
|
||||
extern void sub_8009908(void);
|
||||
extern void xxx_call_update_bg_sound_input(void);
|
||||
extern void sub_8005180(void);
|
||||
extern void sub_80060EC(void);
|
||||
extern void sub_8011860(void);
|
||||
extern void sub_800CB20(void);
|
||||
extern void sub_8004AF0(u8, u32 *r1, u32, u32, u32 *r2, u32);
|
||||
extern u8 sub_80111C4();
|
||||
@ -80,15 +75,15 @@ void sub_801169C(void)
|
||||
|
||||
void sub_8011760(void)
|
||||
{
|
||||
if(sub_80023E4(0xD))
|
||||
if (sub_80023E4(13))
|
||||
StartNewBGM(MUS_WORLD_CALAMITY);
|
||||
else if(sub_80023E4(0xC))
|
||||
else if (sub_80023E4(12))
|
||||
StartNewBGM(MUS_POKEMON_SQUARE);
|
||||
}
|
||||
|
||||
void sub_801178C(void)
|
||||
{
|
||||
if(sub_80023E4(0xD))
|
||||
if (sub_80023E4(13))
|
||||
StartNewBGM(MUS_WORLD_CALAMITY);
|
||||
else
|
||||
StartNewBGM(MUS_POKEMON_SQUARE);
|
||||
@ -96,13 +91,13 @@ void sub_801178C(void)
|
||||
|
||||
void sub_80117AC(void)
|
||||
{
|
||||
if(!sub_80023E4(0xD))
|
||||
FadeOutBGM(0x1E);
|
||||
if (!sub_80023E4(13))
|
||||
FadeOutBGM(30);
|
||||
}
|
||||
|
||||
void sub_80117C4(void)
|
||||
{
|
||||
FadeOutBGM(0x1E);
|
||||
FadeOutBGM(30);
|
||||
}
|
||||
|
||||
// Some sound effect
|
||||
@ -146,18 +141,14 @@ void xxx_call_start_bg_music(void)
|
||||
|
||||
void sub_8011860(void)
|
||||
{
|
||||
if(gUnknown_202DE20 > 0)
|
||||
{
|
||||
if (gUnknown_202DE20 > 0)
|
||||
gUnknown_202DE20--;
|
||||
}
|
||||
if(gUnknown_202DE22 > 0)
|
||||
{
|
||||
|
||||
if (gUnknown_202DE22 > 0)
|
||||
gUnknown_202DE22--;
|
||||
}
|
||||
if(gUnknown_202DE24 > 0)
|
||||
{
|
||||
|
||||
if (gUnknown_202DE24 > 0)
|
||||
gUnknown_202DE24--;
|
||||
}
|
||||
}
|
||||
|
||||
void StopAllMusic_1(void)
|
||||
@ -199,14 +190,13 @@ void xxx_call_fade_out_bgm(u16 speed)
|
||||
FadeOutBGM(speed);
|
||||
}
|
||||
|
||||
u32 IsEqualtoBGTrack(u16 songIndex)
|
||||
bool8 IsEqualtoBGTrack(u16 songIndex)
|
||||
{
|
||||
u32 currBGSong;
|
||||
currBGSong = GetCurrentBGSong();
|
||||
|
||||
if(songIndex == STOP_BGM)
|
||||
if (songIndex == STOP_BGM)
|
||||
return currBGSong != STOP_BGM;
|
||||
|
||||
return currBGSong == songIndex;
|
||||
}
|
||||
|
||||
@ -235,23 +225,25 @@ bool8 IsFanfareSEPlaying_1(u16 songIndex)
|
||||
return IsFanfareSEPlaying(songIndex);
|
||||
}
|
||||
|
||||
void PlayMenuSoundEffect(u32 r0)
|
||||
void PlayMenuSoundEffect(u32 a0)
|
||||
{
|
||||
if(gUnknown_202DE20 > 0)
|
||||
if (gUnknown_202DE20 > 0)
|
||||
return;
|
||||
PlayFanfareSE(gUnknown_80D4144[r0], MAX_VOLUME);
|
||||
|
||||
PlayFanfareSE(gUnknown_80D4144[a0], MAX_VOLUME);
|
||||
gUnknown_202DE20 = 4;
|
||||
}
|
||||
|
||||
void sub_8011A04(void)
|
||||
{
|
||||
if(gUnknown_202DE22 > 0)
|
||||
if (gUnknown_202DE22 > 0)
|
||||
return;
|
||||
|
||||
gUnknown_202DE22 = 3;
|
||||
PlayFanfareSE(305, MAX_VOLUME);
|
||||
}
|
||||
|
||||
void sub_8011A2C(u32 r0)
|
||||
UNUSED static void sub_8011A2C(u32 a0)
|
||||
{
|
||||
gUnknown_202DE1C = r0;
|
||||
gUnknown_202DE1C = a0;
|
||||
}
|
||||
|
@ -1,16 +1,13 @@
|
||||
#include "global.h"
|
||||
#include "code_800558C.h"
|
||||
#include "input.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "game_options.h"
|
||||
#include "input.h"
|
||||
#include "sprite.h"
|
||||
|
||||
extern void sub_8011860();
|
||||
extern void xxx_draw_string_80144C4();
|
||||
extern void nullsub_8(u8);
|
||||
extern void sub_8005180();
|
||||
extern void sub_800CB20();
|
||||
extern void CopySpritesToOam();
|
||||
extern void sub_8005304();
|
||||
extern void TransferBGPaletteBuffer();
|
||||
extern void xxx_call_update_bg_vram();
|
||||
extern void sub_8009908();
|
||||
|
@ -48,9 +48,6 @@ enum
|
||||
MENU_ACTION_NO,
|
||||
};
|
||||
|
||||
extern u32 ReturnIntFromChar2(u8);
|
||||
|
||||
|
||||
s32 sub_8015FEC(u8 *buffer, s32 size)
|
||||
{
|
||||
struct unkChar *iVar2;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "gulpin_shop.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern void sub_8092C84(u8 *, u16);
|
||||
extern void sub_8099690(u32);
|
||||
@ -33,7 +34,6 @@ extern void unk_CopyMoves4To8(struct Move *, struct Move *);
|
||||
extern bool8 IsHMItem(u8);
|
||||
extern void sub_801B178(void);
|
||||
extern void sub_8094060(void *, struct Move *);
|
||||
extern void PlaySound(u32);
|
||||
extern void PrintPokeNameToBuffer(u8 *buffer, struct PokemonStruct *pokemon);
|
||||
extern u32 sub_801E8C0(void);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "constants/colors.h"
|
||||
#include "text1.h"
|
||||
@ -67,7 +68,6 @@ extern struct UnkTextStruct2 gUnknown_80DBA70;
|
||||
extern void sub_801BB5C(void);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern void sub_801B748(u32);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_8013F84(void);
|
||||
extern s32 sub_80913E0(struct Item *, u32, struct subStruct_203B240 **);
|
||||
extern void sub_80140B4(struct UnkTextStruct2 *);
|
||||
@ -83,7 +83,6 @@ extern void sub_801B760(void);
|
||||
extern void sub_801B874(void);
|
||||
extern u32 sub_8001784(u32, u32, u16);
|
||||
extern void sub_800199C(u32, u32, u32, u32);
|
||||
extern void PlaySound(u32);
|
||||
extern s32 sub_808D544(u32);
|
||||
|
||||
void sub_801B480(void);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_801C620.h"
|
||||
#include "constants/item.h"
|
||||
#include "constants/iq_skill.h"
|
||||
@ -152,7 +153,6 @@ extern void sub_801CC38(void);
|
||||
extern void sub_80140B4(struct UnkTextStruct2 *);
|
||||
extern u32 sub_8097DF0(char *, struct subStruct_203B240 **);
|
||||
extern void sub_8013F84(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern char * GetIQSkillDescription(u8 r0);
|
||||
extern s32 GetNumAvailableIQSkills(u8 *param_1, s32 pokeIQ);
|
||||
extern char * GetIQSkillName(u8 r0);
|
||||
@ -170,7 +170,6 @@ void sub_801C6E4(void);
|
||||
void sub_801C848(void);
|
||||
|
||||
u32 sub_801C308(u8);
|
||||
extern void PlaySound(u32);
|
||||
void ToggleIQSkill(u8 *param_1, u32 skillIndex);
|
||||
s32 sub_801C390(void);
|
||||
void sub_801C3F8(void);
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "code_800D090.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_8021774.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B258
|
||||
{
|
||||
@ -31,7 +32,6 @@ extern struct unkStruct_203B258 *gUnknown_203B258;
|
||||
extern struct UnkTextStruct2 gUnknown_80DBF88;
|
||||
extern struct UnkTextStruct2 gUnknown_80DBF70;
|
||||
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_801DB54();
|
||||
extern void sub_801DBD4();
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "text2.h"
|
||||
#include "text_util.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B2AC
|
||||
{
|
||||
@ -52,7 +53,6 @@ extern bool8 sub_80023E4(u32);
|
||||
extern void sub_808FF20(u32 *, struct PokemonStruct *, bool8);
|
||||
extern void CreatePokemonInfoTabScreen(u32, s16, u32 *, u32 *, u32);
|
||||
extern void sub_802452C(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
bool8 ComparePokemonNames(s16 a1, s16 a2);
|
||||
|
||||
void sub_8024588(void);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "sprite.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern struct unkStruct_203B270 *gUnknown_203B270;
|
||||
|
||||
@ -56,7 +57,6 @@ extern u8 gAvailablePokemonNames[];
|
||||
extern u8 gUnknown_80DC310[];
|
||||
extern u8 gUnknown_80DC2DC[];
|
||||
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_80140B4(struct UnkTextStruct2 *);
|
||||
extern void sub_801F918(s32);
|
||||
extern void sub_801FA58(void);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "code_800D090.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_8021774.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B28C
|
||||
{
|
||||
@ -54,7 +55,6 @@ extern void sub_8092578(u8 *buffer, u8 index, u8 r2);
|
||||
|
||||
extern void sub_8021878(void);
|
||||
extern void sub_8021894(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_8021A60(void);
|
||||
void sub_8021820(void);
|
||||
u8 sub_80023E4(u32);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_8021774_pre.h"
|
||||
#include "constants/friend_area.h"
|
||||
@ -35,7 +36,6 @@ extern struct UnkTextStruct2 gUnknown_80DC464;
|
||||
u8 sub_8021700(u32 mode);
|
||||
s32 sub_8021664(void);
|
||||
extern void sub_8021410(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
|
||||
bool8 sub_80211AC(u32 param_1, u32 param_2)
|
||||
{
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "kecleon_bros.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_3001B5C
|
||||
{
|
||||
@ -52,7 +53,6 @@ extern u8 sub_8023704(u8);
|
||||
extern void sub_8023420(void);
|
||||
extern void sub_80234BC(void);
|
||||
extern u32 sub_80236A4(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
|
||||
|
||||
extern u8 gUnknown_80DC5EC[];
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B334
|
||||
{
|
||||
@ -48,7 +49,6 @@ ALIGNED(4) const u8 gUnknown_80E1FDC[] = "Password";
|
||||
ALIGNED(4) static const u8 fill0[] = "pksdir0";
|
||||
|
||||
extern void sub_803D2C0(u8 *, struct unkStruct_203B480 *);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
|
||||
void sub_8031E00(void);
|
||||
void sub_8031E58(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80521D0.h"
|
||||
#include "dungeon_entity.h"
|
||||
#include "dungeon_global_data.h"
|
||||
@ -19,7 +19,6 @@ extern void sub_80060EC(void);
|
||||
extern void sub_800CB20(void);
|
||||
extern void LoadBufferedInputs(void);
|
||||
extern void xxx_call_update_bg_sound_input(void);
|
||||
extern void sub_8011860(void);
|
||||
|
||||
extern void sub_803F580(u32);
|
||||
extern void sub_8049ED4();
|
||||
|
@ -102,7 +102,7 @@ extern u8 sub_8044B28(void);
|
||||
extern u8 sub_803F428(struct Position *pos);
|
||||
extern void IncreaseEntityPixelPos(struct Entity *, u32, u32);
|
||||
extern void sub_803E46C(u32);
|
||||
extern void sub_807EC28(u32);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern void sub_806F370(struct Entity *r0, struct Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
void sub_8075900(struct Entity *pokemon, u8 r1);
|
||||
extern void sub_804535C(struct Entity *, u32);
|
||||
@ -1219,7 +1219,7 @@ _0805AA5E:
|
||||
}
|
||||
if (target->info->isTeamLeader) {
|
||||
sub_804AC20(r9);
|
||||
sub_807EC28(0);
|
||||
sub_807EC28(FALSE);
|
||||
}
|
||||
sub_806A5B8(target);
|
||||
sub_8075900(target,gDungeon->unk3A08);
|
||||
|
@ -1,20 +1,20 @@
|
||||
#include "global.h"
|
||||
#include "code_805D8C8.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/status.h"
|
||||
#include "dungeon_entity.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "pokemon.h"
|
||||
#include "tile_types.h"
|
||||
#include "random.h"
|
||||
#include "sprite.h"
|
||||
#include "tile_types.h"
|
||||
|
||||
extern u8 sub_806CEBC(struct Entity *);
|
||||
extern void sub_806CCB4(struct Entity *, u8);
|
||||
extern void sub_803E46C(u32);
|
||||
extern bool8 sub_808DA44(s32 a1_, u32 a2_);
|
||||
extern u32 sub_806CF98(struct Entity *);
|
||||
extern u32 sub_80687D0(s16);
|
||||
void sub_80053AC(u8 *, s32, u32, u32, u32, u32, u8);
|
||||
void sub_806CDD4(struct Entity *, u8, u32);
|
||||
|
||||
extern const u8 gUnknown_8106EEF[];
|
||||
@ -53,28 +53,29 @@ void sub_806CC70(void)
|
||||
|
||||
void sub_806CCB4(struct Entity *entity, u8 param_2)
|
||||
{
|
||||
s32 sVar1;
|
||||
bool8 flag;
|
||||
struct EntityInfo *info;
|
||||
s32 sVar1;
|
||||
bool8 flag;
|
||||
struct EntityInfo *info;
|
||||
|
||||
info = entity->info;
|
||||
flag = gDungeon->hallucinating;
|
||||
if (entity == gDungeon->cameraTarget) {
|
||||
flag = FALSE;
|
||||
}
|
||||
entity->unk6B = param_2;
|
||||
entity->unk6A = param_2;
|
||||
entity->direction2 = info->action.direction;
|
||||
entity->direction = info->action.direction;
|
||||
entity->unk6F = 0;
|
||||
sVar1 = entity->unk68;
|
||||
if ((info->waitingStatus != STATUS_DECOY) && (!flag)) {
|
||||
sub_80053AC(entity->fill28,entity->unk64,entity->unk6A,entity->direction,sVar1,Rand32Bit() & 3,0);
|
||||
}
|
||||
else {
|
||||
sub_80053AC(entity->fill28,sub_80687D0(0x1a5),entity->unk6A,entity->direction,sVar1,Rand32Bit() & 3,0);
|
||||
}
|
||||
entity->unk6E = 0;
|
||||
info = entity->info;
|
||||
flag = gDungeon->hallucinating;
|
||||
|
||||
if (entity == gDungeon->cameraTarget)
|
||||
flag = FALSE;
|
||||
|
||||
entity->unk6B = param_2;
|
||||
entity->unk6A = param_2;
|
||||
entity->direction2 = info->action.direction;
|
||||
entity->direction = info->action.direction;
|
||||
entity->unk6F = 0;
|
||||
sVar1 = entity->unk68;
|
||||
|
||||
if (info->waitingStatus != STATUS_DECOY && !flag)
|
||||
sub_80053AC(&entity->spriteInfo, entity->unk64, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
|
||||
else
|
||||
sub_80053AC(&entity->spriteInfo, sub_80687D0(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
|
||||
|
||||
entity->unk6E = 0;
|
||||
}
|
||||
|
||||
void sub_806CD90(void)
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "move_effects_target.h"
|
||||
#include "pokemon.h"
|
||||
#include "status_checks_1.h"
|
||||
#include "code_805D8C8.h"
|
||||
|
||||
extern u8 gAvailablePokemonNames[0x58];
|
||||
extern u8 gUnknown_202DFE8[0x58];
|
||||
@ -171,9 +172,8 @@ extern void SetMessageArgument(u8 *buffer, struct Entity *r1, u32);
|
||||
extern void sub_80522F4(struct Entity *pokemon, struct Entity *r1, const char[]);
|
||||
extern void EntityUpdateStatusSprites(struct Entity *);
|
||||
extern void sub_8042A74(struct Entity *r0);
|
||||
extern void sub_807EC28(u32);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern s32 sub_8069F54(struct Entity *param_1, s16 param_2);
|
||||
extern u32 sub_80687D0(s16);
|
||||
extern void sub_806A898(struct Entity *, u32, u32);
|
||||
extern void HealTargetHP(struct Entity *pokemon, struct Entity *r1, s16, s16, u32);
|
||||
extern void sub_806CE68(struct Entity *, s32);
|
||||
@ -236,62 +236,61 @@ void MuzzleTarget(struct Entity *pokemon, struct Entity *target)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: still gross but does match
|
||||
void sub_8078E18(struct Entity * pokemon, struct Entity * target)
|
||||
{
|
||||
s16 species;
|
||||
s32 iVar5;
|
||||
s32 apparentID;
|
||||
s16 apparentID_s16;
|
||||
s32 index;
|
||||
struct EntityInfo *entityInfo;
|
||||
s32 iVar9;
|
||||
struct PokemonStruct *auStack544[128];
|
||||
|
||||
s16 species;
|
||||
s32 iVar5;
|
||||
s32 apparentID;
|
||||
s16 apparentID_s16;
|
||||
s32 index;
|
||||
struct EntityInfo *entityInfo;
|
||||
struct OpenedFile *iVar9;
|
||||
struct PokemonStruct *auStack544[128];
|
||||
|
||||
if (!EntityExists(target))
|
||||
return;
|
||||
|
||||
if (EntityExists(target)) {
|
||||
entityInfo = target->info;
|
||||
if (entityInfo->transformStatus == STATUS_TRANSFORMED) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBF04);
|
||||
}
|
||||
else {
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
iVar5 = sub_803D870(auStack544,0);
|
||||
if (iVar5 == 0) {
|
||||
goto print;
|
||||
}
|
||||
else
|
||||
{
|
||||
iVar9 = 0;
|
||||
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
species = ExtractSpeciesIndex(&auStack544[DungeonRandInt(iVar5) << 1]);
|
||||
apparentID_s16 = sub_8069F54(target, species);
|
||||
apparentID = apparentID_s16;
|
||||
if (((apparentID != entityInfo->apparentID) && (sub_806AA0C(apparentID, 1))) &&
|
||||
(iVar9 = sub_80687D0(apparentID), iVar9 != 0)) break;
|
||||
if (entityInfo->transformStatus == STATUS_TRANSFORMED)
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FBF04);
|
||||
else {
|
||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||
iVar5 = sub_803D870(auStack544, 0);
|
||||
|
||||
if (iVar5 == 0)
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FBEE4);
|
||||
else {
|
||||
iVar9 = NULL;
|
||||
|
||||
for (index = 0; index < DUNGEON_MAX_POKEMON; index++) {
|
||||
species = ExtractSpeciesIndex(&auStack544[DungeonRandInt(iVar5) * 2]);
|
||||
apparentID_s16 = sub_8069F54(target, species);
|
||||
apparentID = apparentID_s16;
|
||||
|
||||
if (apparentID != entityInfo->apparentID && sub_806AA0C(apparentID, 1)) {
|
||||
iVar9 = sub_80687D0(apparentID);
|
||||
if (iVar9 != NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index == DUNGEON_MAX_POKEMON || iVar9 == NULL)
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FBEE4);
|
||||
else {
|
||||
entityInfo->apparentID = apparentID;
|
||||
target->unk64 = iVar9;
|
||||
entityInfo->transformStatus = STATUS_TRANSFORMED;
|
||||
entityInfo->transformStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EFC, TRUE) + 1;
|
||||
sub_806CF98(target);
|
||||
nullsub_87(target);
|
||||
sub_806CCB4(target, sub_806CEBC(target));
|
||||
CopyCyanMonsterNametoBuffer(gUnknown_202DFE8, entityInfo->apparentID);
|
||||
sub_80522F4(pokemon, target, *gUnknown_80FBEC0);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
if ((index == DUNGEON_MAX_POKEMON) || (iVar9 == 0)) {
|
||||
print:
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBEE4);
|
||||
}
|
||||
else
|
||||
{
|
||||
entityInfo->apparentID = apparentID;
|
||||
target->unk64 = iVar9;
|
||||
entityInfo->transformStatus = STATUS_TRANSFORMED;
|
||||
entityInfo->transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EFC,TRUE) + 1;
|
||||
sub_806CF98(target);
|
||||
nullsub_87(target);
|
||||
sub_806CCB4(target, sub_806CEBC(target));
|
||||
CopyCyanMonsterNametoBuffer(gUnknown_202DFE8, entityInfo->apparentID);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBEC0);
|
||||
EntityUpdateStatusSprites(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MobileStatusTarget(struct Entity * pokemon, struct Entity * target)
|
||||
@ -1516,7 +1515,7 @@ void SendTransformEndMessage(struct Entity * pokemon, struct Entity *target)
|
||||
entityInfo->transformStatus = STATUS_NONE;
|
||||
EntityUpdateStatusSprites(target);
|
||||
if (isInvisible) {
|
||||
sub_807EC28(1);
|
||||
sub_807EC28(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ extern void sub_806F370(struct Entity *r0, struct Entity *r1, u32, u32, u8 *, u8
|
||||
extern void sub_80694C0(struct Entity *, s32, s32, u32);
|
||||
extern void sub_804535C(struct Entity *, u32);
|
||||
extern void sub_804AC20(struct Position *);
|
||||
extern void sub_807EC28(u32);
|
||||
extern void sub_807EC28(bool8);
|
||||
extern void sub_806A5B8(struct Entity *);
|
||||
|
||||
extern u32 gUnknown_80F5FAC[];
|
||||
@ -101,7 +101,7 @@ void sub_807E254(struct Entity *pokemon,struct Entity *target)
|
||||
if (EntityExists(pokemon)) {
|
||||
if (pokemon->info->isTeamLeader) {
|
||||
sub_804AC20(&pokemon->pos);
|
||||
sub_807EC28(0);
|
||||
sub_807EC28(FALSE);
|
||||
}
|
||||
sub_806A5B8(pokemon);
|
||||
sub_8075900(pokemon,gDungeon->unk3A08);
|
||||
@ -110,7 +110,7 @@ void sub_807E254(struct Entity *pokemon,struct Entity *target)
|
||||
if (EntityExists(target)) {
|
||||
if (target->info->isTeamLeader) {
|
||||
sub_804AC20(&target->pos);
|
||||
sub_807EC28(0);
|
||||
sub_807EC28(FALSE);
|
||||
}
|
||||
sub_806A5B8(target);
|
||||
sub_8075900(target,gDungeon->unk3A08);
|
||||
|
@ -100,14 +100,14 @@ bool8 ValidateWonderMail(struct WonderMail *data)
|
||||
|
||||
if(data->clientSpecies == MONSTER_NONE)
|
||||
return FALSE;
|
||||
if(data->clientSpecies > MONSTER_RAYQUAZA_CUTSCENE)
|
||||
if(data->clientSpecies > MONSTER_MAX)
|
||||
return FALSE;
|
||||
if(data->clientSpecies != GetBaseSpecies(data->clientSpecies))
|
||||
return FALSE;
|
||||
if(!sub_803C0DC(data->clientSpecies))
|
||||
return FALSE;
|
||||
|
||||
if(data->targetSpecies > MONSTER_RAYQUAZA_CUTSCENE)
|
||||
if(data->targetSpecies > MONSTER_MAX)
|
||||
return FALSE;
|
||||
if(data->targetSpecies != GetBaseSpecies(data->targetSpecies))
|
||||
return FALSE;
|
||||
|
@ -1,23 +1,24 @@
|
||||
#include "global.h"
|
||||
#include "axdata.h"
|
||||
|
||||
extern void sub_80A68A0(void);
|
||||
extern void sub_80A7094(u32 r0, u32 r1, u32 r2, u32 r3);
|
||||
extern void sub_80A7310(u32 r0, u32 r1, u32 r2, u32 r3);
|
||||
extern void sub_80A68A0(u32);
|
||||
extern void sub_80A7094(struct axPokemon *, u32, u32, u32);
|
||||
extern void sub_80A7310(struct axPokemon *, u32, u32, u32);
|
||||
extern void sub_80A7784();
|
||||
extern s16 gUnknown_2039DE0;
|
||||
|
||||
extern u32 gUnknown_8117EFC;
|
||||
extern u32 *gMapScriptTable[];
|
||||
|
||||
void sub_80A7714(void)
|
||||
void sub_80A7714(u32 a0)
|
||||
{
|
||||
sub_80A68A0();
|
||||
sub_80A68A0(a0);
|
||||
}
|
||||
|
||||
void sub_80A7720(u32 r0, u32 r1, u32 r2)
|
||||
void sub_80A7720(struct axPokemon *a0, u32 a1, u32 a2)
|
||||
{
|
||||
sub_80A7094(r0, 0, r1, r2);
|
||||
sub_80A7310(r0, r1, 0, r2);
|
||||
sub_80A7094(a0, 0, a1, a2);
|
||||
sub_80A7310(a0, a1, 0, a2);
|
||||
}
|
||||
|
||||
void sub_80A7744(void)
|
||||
@ -30,55 +31,43 @@ void sub_80A7754(void)
|
||||
gUnknown_2039DE0 = -1;
|
||||
}
|
||||
|
||||
void sub_80A7764(s16 r0)
|
||||
void sub_80A7764(s16 a0)
|
||||
{
|
||||
s32 temp = r0;
|
||||
s32 temp = a0;
|
||||
|
||||
sub_80A7784();
|
||||
if(temp != -1)
|
||||
{
|
||||
|
||||
if (temp != -1)
|
||||
gUnknown_2039DE0 = temp;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A7784(void)
|
||||
{
|
||||
if(gUnknown_2039DE0 != -1)
|
||||
{
|
||||
if (gUnknown_2039DE0 != -1)
|
||||
gUnknown_2039DE0 = -1;
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80A77A0(s16 r0)
|
||||
bool8 sub_80A77A0(s16 a0)
|
||||
{
|
||||
s32 temp;
|
||||
s32 temp2;
|
||||
temp = r0;
|
||||
temp = a0;
|
||||
temp2 = temp;
|
||||
if(gUnknown_2039DE0 != temp)
|
||||
{
|
||||
if(temp < 0)
|
||||
{
|
||||
if (gUnknown_2039DE0 != temp) {
|
||||
if (temp < 0)
|
||||
sub_80A7784();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80A7764(temp2);
|
||||
}
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// TODO review this later
|
||||
u32 *sub_80A77D0(s16 r0)
|
||||
u32 *sub_80A77D0(s16 a0)
|
||||
{
|
||||
if(r0 != -1)
|
||||
{
|
||||
return gMapScriptTable[r0];
|
||||
}
|
||||
if (a0 != -1)
|
||||
return gMapScriptTable[a0];
|
||||
else
|
||||
{
|
||||
return &gUnknown_8117EFC;
|
||||
}
|
||||
}
|
||||
|
30
src/cpu.c
30
src/cpu.c
@ -20,30 +20,32 @@ void SetWindowTitle(char *title)
|
||||
{
|
||||
}
|
||||
|
||||
void nullsub_23(void)
|
||||
void nullsub_23(bool8 a0)
|
||||
{
|
||||
}
|
||||
|
||||
// Unused
|
||||
void nullsub_182(void)
|
||||
{
|
||||
}
|
||||
|
||||
u32 sub_800CDE0(void)
|
||||
// Unused
|
||||
bool8 sub_800CDE0(void)
|
||||
{
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CpuCopy(void* dest, void *src, s32 size)
|
||||
void CpuCopy(void *dest, void *src, s32 size)
|
||||
{
|
||||
CpuCopy32(src, dest, size);
|
||||
}
|
||||
|
||||
void CpuClear(void* dest, s32 size)
|
||||
void CpuClear(void *dest, s32 size)
|
||||
{
|
||||
CpuFill32(NULL, dest, size);
|
||||
}
|
||||
|
||||
void CpuFill(void* dest, void *value, s32 size)
|
||||
void CpuFill(void *dest, void *value, s32 size)
|
||||
{
|
||||
CpuFill32(value, dest, size);
|
||||
}
|
||||
@ -52,12 +54,12 @@ void CpuFill(void* dest, void *value, s32 size)
|
||||
void VBlank_CB(void)
|
||||
{
|
||||
// TODO this is so gross.. looks like a macro or something else but I don't want to deal with this rn
|
||||
REG_DMA0CNT_H = (REG_DMA0CNT_H | DMA_ENABLE) & 0xcdff;
|
||||
REG_DMA0CNT_H = (REG_DMA0CNT_H | DMA_ENABLE) & 0xCDFF;
|
||||
asm("mov \tr8, r8");
|
||||
asm("mov \tr8, r8");
|
||||
asm("mov \tr8, r8");
|
||||
asm("mov \tr8, r8");
|
||||
REG_DMA0CNT_H &= 0x7fff;
|
||||
REG_DMA0CNT_H &= 0x7FFF;
|
||||
|
||||
// Everything below matches
|
||||
|
||||
@ -65,16 +67,14 @@ void VBlank_CB(void)
|
||||
REG_WINOUT = WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR | WINOUT_WIN01_BG3 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG0;
|
||||
REG_BLDCNT = gBldCnt;
|
||||
REG_BLDALPHA = gBldAlpha;
|
||||
if(gUnknown_2026E38 != 0)
|
||||
{
|
||||
DmaSet(0, &gUnknown_2026E3C[2], REG_ADDR_WIN0H, 0xa2600002);
|
||||
if (gUnknown_2026E38 != 0) {
|
||||
DmaSet(0, &gUnknown_2026E3C[2], REG_ADDR_WIN0H, 0xA2600002);
|
||||
REG_WIN0H = gUnknown_2026E3C[0];
|
||||
REG_WIN1H = gUnknown_2026E3C[1];
|
||||
REG_WIN0V = 160;
|
||||
REG_WIN1V = 160;
|
||||
REG_WIN0V = DISPLAY_HEIGHT;
|
||||
REG_WIN1V = DISPLAY_HEIGHT;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
REG_WIN0H = 0;
|
||||
REG_WIN1H = 0;
|
||||
REG_WIN0V = 0;
|
||||
|
@ -45,7 +45,8 @@ extern void sub_806A9B4(struct Entity *, u8);
|
||||
extern bool8 sub_8044B28(void);
|
||||
extern void sub_8057588(struct Entity *, u32);
|
||||
extern void sub_806A1B0(struct Entity *);
|
||||
|
||||
extern struct Item *sub_8044D90(struct Entity *, s32, u32);
|
||||
extern bool8 sub_8044D40(struct ActionContainer *, u32);
|
||||
|
||||
void DecideAttack(struct Entity *pokemon)
|
||||
{
|
||||
@ -932,23 +933,387 @@ bool8 IsTargetInRange(struct Entity *pokemon, struct Entity *targetPokemon, s32
|
||||
|
||||
void sub_807CABC(struct Entity *target)
|
||||
{
|
||||
struct EntityInfo *entityInfo;
|
||||
s32 counter;
|
||||
struct EntityInfo *entityInfo;
|
||||
s32 counter;
|
||||
|
||||
counter = 0;
|
||||
while (1) {
|
||||
if(counter >= sub_8070828(target, TRUE)) break;
|
||||
counter = 0;
|
||||
while (TRUE) {
|
||||
if (counter >= sub_8070828(target, TRUE))
|
||||
break;
|
||||
entityInfo = target->info;
|
||||
sub_8055A00(target,(entityInfo->action).actionUseIndex,1,0,0);
|
||||
if(!EntityExists(target)) break;
|
||||
if(sub_8044B28()) break;
|
||||
if(entityInfo->unk159) break;
|
||||
sub_8055A00(target, entityInfo->action.actionUseIndex, 1, 0, 0);
|
||||
if (!EntityExists(target))
|
||||
break;
|
||||
if (sub_8044B28())
|
||||
break;
|
||||
if (entityInfo->unk159)
|
||||
break;
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
sub_8057588(target,1);
|
||||
if (EntityExists(target)) {
|
||||
sub_806A9B4(target,(target->info->action).actionUseIndex);
|
||||
}
|
||||
sub_806A1B0(target);
|
||||
sub_8057588(target, 1);
|
||||
if (EntityExists(target))
|
||||
sub_806A9B4(target, target->info->action.actionUseIndex);
|
||||
|
||||
sub_806A1B0(target);
|
||||
}
|
||||
|
||||
#if NONMATCHING // 99.09% https://decomp.me/scratch/rpwXh
|
||||
void sub_807CB3C(struct Entity *pokemon)
|
||||
{
|
||||
bool8 r4;
|
||||
struct Item *item;
|
||||
struct Item IVar5;
|
||||
struct EntityInfo *entityInfo; // r7
|
||||
struct ActionContainer act;
|
||||
struct Move move;
|
||||
struct AIPossibleMove sp28;
|
||||
bool8 r8;
|
||||
|
||||
entityInfo = pokemon->info;
|
||||
item = sub_8044D90(pokemon, 0, 21);
|
||||
IVar5 = *item;
|
||||
|
||||
if (item->flags & ITEM_FLAG_STICKY) {
|
||||
sub_8045BF8(gUnknown_202DE58, item);
|
||||
SendMessage(pokemon, *gUnknown_80FE3E8);
|
||||
return;
|
||||
}
|
||||
|
||||
act = entityInfo->action;
|
||||
|
||||
if (IsBossFight()) {
|
||||
SendMessage(pokemon, *gPtrMysteriousPowerPreventedUseMessage);
|
||||
r4 = TRUE;
|
||||
}
|
||||
else {
|
||||
r8 = TRUE;
|
||||
InitPokemonMove(&move, GetItemMoveID(IVar5.id));
|
||||
|
||||
if (!entityInfo->isTeamLeader) {
|
||||
sp28.canBeUsed = r8;
|
||||
sp28.weight = 10;
|
||||
AIConsiderMove(&sp28, pokemon, entityInfo->moves);
|
||||
|
||||
if (sp28.canBeUsed) {
|
||||
entityInfo->action.direction = sp28.direction & 7;
|
||||
TargetTileInFront(pokemon);
|
||||
}
|
||||
}
|
||||
|
||||
if (entityInfo->volatileStatus == 1) {
|
||||
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
||||
SendMessage(pokemon, *gUnknown_80FC714);
|
||||
r4 = FALSE;
|
||||
}
|
||||
else if (entityInfo->volatileStatus == 7) {
|
||||
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
||||
SendMessage(pokemon, *gUnknown_80FC718);
|
||||
r4 = FALSE;
|
||||
}
|
||||
else {
|
||||
if (entityInfo->nonVolatileStatus == 4) {
|
||||
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
||||
SendMessage(pokemon, *gUnknown_80FC6A8);
|
||||
r4 = FALSE;
|
||||
r8 = FALSE;
|
||||
}
|
||||
if (r8) {
|
||||
if ((IVar5.id == ITEM_SWITCHER_ORB) || (IVar5.id == ITEM_POUNCE_ORB)) {
|
||||
sub_8044DF0(pokemon, 0, 122);
|
||||
move.moveFlags |= MOVE_FLAG_SET;
|
||||
move.moveFlags |= MOVE_FLAG_ENABLED_FOR_AI;
|
||||
move.PP = 10;
|
||||
sub_8055FA0(pokemon, 0, IVar5.id, 0, 0, &move);
|
||||
r4 = FALSE;
|
||||
}
|
||||
else
|
||||
r4 = sub_8055FA0(pokemon, 0, IVar5.id, 0, 0, &move);
|
||||
}
|
||||
else
|
||||
r4 = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (EntityExists(pokemon)) {
|
||||
if (r4)
|
||||
sub_8044DF0(pokemon, 0, 122);
|
||||
|
||||
sub_8071DA4(pokemon);
|
||||
sub_806CE68(pokemon, 8);
|
||||
|
||||
if (entityInfo->isTeamLeader) {
|
||||
sub_804AC20(&pokemon->pos);
|
||||
sub_807EC28(FALSE);
|
||||
}
|
||||
|
||||
sub_806A5B8(pokemon);
|
||||
sub_8075900(pokemon, gDungeon->unk3A08);
|
||||
}
|
||||
else if (r4)
|
||||
sub_8044D40(&act, 0);
|
||||
|
||||
if (!sub_8044B28())
|
||||
sub_806A1B0(pokemon);
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_807CB3C(struct Entity *pokemon)
|
||||
{
|
||||
asm_unified(
|
||||
"push {r4-r7,lr}\n"
|
||||
"\tmov r7, r10\n"
|
||||
"\tmov r6, r9\n"
|
||||
"\tmov r5, r8\n"
|
||||
"\tpush {r5-r7}\n"
|
||||
"\tsub sp, 0x30\n"
|
||||
"\tadds r6, r0, 0\n"
|
||||
"\tldr r7, [r6, 0x70]\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r2, 0x15\n"
|
||||
"\tbl sub_8044D90\n"
|
||||
"\tadds r2, r0, 0\n"
|
||||
"\tldr r5, [r2]\n"
|
||||
"\tldrb r1, [r2]\n"
|
||||
"\tmovs r0, 0x8\n"
|
||||
"\tands r0, r1\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0807CB80\n"
|
||||
"\tldr r0, _0807CB78\n"
|
||||
"\tadds r1, r2, 0\n"
|
||||
"\tbl sub_8045BF8\n"
|
||||
"\tldr r0, _0807CB7C\n"
|
||||
"\tldr r1, [r0]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl SendMessage\n"
|
||||
"\tb _0807CD54\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0807CB78: .4byte gUnknown_202DE58\n"
|
||||
"_0807CB7C: .4byte gUnknown_80FE3E8\n"
|
||||
"_0807CB80:\n"
|
||||
"\tadd r0, sp, 0x8\n"
|
||||
"\tadds r1, r7, 0\n"
|
||||
"\tadds r1, 0x44\n"
|
||||
"\tldm r1!, {r2-r4}\n"
|
||||
"\tstm r0!, {r2-r4}\n"
|
||||
"\tldm r1!, {r2-r4}\n"
|
||||
"\tstm r0!, {r2-r4}\n"
|
||||
"\tbl IsBossFight\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0807CBAC\n"
|
||||
"\tldr r0, _0807CBA8\n"
|
||||
"\tldr r1, [r0]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl SendMessage\n"
|
||||
"\tmovs r4, 0x1\n"
|
||||
"\tb _0807CCDE\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0807CBA8: .4byte gPtrMysteriousPowerPreventedUseMessage\n"
|
||||
"_0807CBAC:\n"
|
||||
"\tmovs r0, 0x1\n"
|
||||
"\tmov r8, r0\n"
|
||||
"\tadd r4, sp, 0x20\n"
|
||||
"\tlsls r5, 8\n"
|
||||
"\tlsrs r0, r5, 24\n"
|
||||
"\tbl GetItemMoveID\n"
|
||||
"\tadds r1, r0, 0\n"
|
||||
"\tlsls r1, 16\n"
|
||||
"\tlsrs r1, 16\n"
|
||||
"\tadds r0, r4, 0\n"
|
||||
"\tbl InitPokemonMove\n"
|
||||
"\tldrb r0, [r7, 0x7]\n"
|
||||
"\tmov r10, r4\n"
|
||||
"\tmov r9, r5\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _0807CC08\n"
|
||||
"\tldr r1, _0807CC20\n"
|
||||
"\tldr r0, [sp, 0x28]\n"
|
||||
"\tands r0, r1\n"
|
||||
"\tmov r1, r8\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tstr r0, [sp, 0x28]\n"
|
||||
"\tmovs r0, 0xA\n"
|
||||
"\tadd r4, sp, 0x28\n"
|
||||
"\tstr r0, [r4, 0x4]\n"
|
||||
"\tmovs r3, 0x8C\n"
|
||||
"\tlsls r3, 1\n"
|
||||
"\tadds r2, r7, r3\n"
|
||||
"\tadds r0, r4, 0\n"
|
||||
"\tadds r1, r6, 0\n"
|
||||
"\tbl AIConsiderMove\n"
|
||||
"\tldrb r0, [r4]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0807CC08\n"
|
||||
"\tldrb r1, [r4, 0x1]\n"
|
||||
"\tmovs r0, 0x7\n"
|
||||
"\tands r0, r1\n"
|
||||
"\tadds r1, r7, 0\n"
|
||||
"\tadds r1, 0x46\n"
|
||||
"\tstrb r0, [r1]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl TargetTileInFront\n"
|
||||
"_0807CC08:\n"
|
||||
"\tadds r0, r7, 0\n"
|
||||
"\tadds r0, 0xBC\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tcmp r0, 0x1\n"
|
||||
"\tbne _0807CC2C\n"
|
||||
"\tldr r0, _0807CC24\n"
|
||||
"\tadds r1, r6, 0\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tbl SetMessageArgument\n"
|
||||
"\tldr r0, _0807CC28\n"
|
||||
"\tb _0807CC3C\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0807CC20: .4byte 0xffffff00\n"
|
||||
"_0807CC24: .4byte gAvailablePokemonNames\n"
|
||||
"_0807CC28: .4byte gUnknown_80FC714\n"
|
||||
"_0807CC2C:\n"
|
||||
"\tcmp r0, 0x7\n"
|
||||
"\tbne _0807CC50\n"
|
||||
"\tldr r0, _0807CC48\n"
|
||||
"\tadds r1, r6, 0\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tbl SetMessageArgument\n"
|
||||
"\tldr r0, _0807CC4C\n"
|
||||
"_0807CC3C:\n"
|
||||
"\tldr r1, [r0]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl SendMessage\n"
|
||||
"\tb _0807CCDC\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0807CC48: .4byte gAvailablePokemonNames\n"
|
||||
"_0807CC4C: .4byte gUnknown_80FC718\n"
|
||||
"_0807CC50:\n"
|
||||
"\tadds r0, r7, 0\n"
|
||||
"\tadds r0, 0xAC\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tcmp r0, 0x4\n"
|
||||
"\tbne _0807CC72\n"
|
||||
"\tldr r0, _0807CCB8\n"
|
||||
"\tadds r1, r6, 0\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tbl SetMessageArgument\n"
|
||||
"\tldr r0, _0807CCBC\n"
|
||||
"\tldr r1, [r0]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl SendMessage\n"
|
||||
"\tmovs r4, 0\n"
|
||||
"\tmov r8, r4\n"
|
||||
"_0807CC72:\n"
|
||||
"\tmov r0, r8\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0807CCDC\n"
|
||||
"\tmov r5, r9\n"
|
||||
"\tlsrs r0, r5, 24\n"
|
||||
"\tcmp r0, 0xB6\n"
|
||||
"\tbeq _0807CC84\n"
|
||||
"\tcmp r0, 0xBF\n"
|
||||
"\tbne _0807CCC0\n"
|
||||
"_0807CC84:\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r2, 0x7A\n"
|
||||
"\tbl sub_8044DF0\n"
|
||||
"\tmov r2, r10\n"
|
||||
"\tldrb r1, [r2]\n"
|
||||
"\tmovs r0, 0x8\n"
|
||||
"\tmovs r4, 0\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tadd r3, sp, 0x20\n"
|
||||
"\tmovs r1, 0x4\n"
|
||||
"\torrs r0, r1\n"
|
||||
"\tstrb r0, [r3]\n"
|
||||
"\tmovs r0, 0xA\n"
|
||||
"\tstrb r0, [r3, 0x4]\n"
|
||||
"\tlsrs r2, r5, 24\n"
|
||||
"\tstr r4, [sp]\n"
|
||||
"\tstr r3, [sp, 0x4]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tbl sub_8055FA0\n"
|
||||
"\tb _0807CCDE\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0807CCB8: .4byte gAvailablePokemonNames\n"
|
||||
"_0807CCBC: .4byte gUnknown_80FC6A8\n"
|
||||
"_0807CCC0:\n"
|
||||
"\tmov r3, r9\n"
|
||||
"\tlsrs r2, r3, 24\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tstr r0, [sp]\n"
|
||||
"\tmov r4, r10\n"
|
||||
"\tstr r4, [sp, 0x4]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tbl sub_8055FA0\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tlsrs r4, r0, 24\n"
|
||||
"\tb _0807CCDE\n"
|
||||
"_0807CCDC:\n"
|
||||
"\tmovs r4, 0\n"
|
||||
"_0807CCDE:\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl EntityExists\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0807CD38\n"
|
||||
"\tcmp r4, 0\n"
|
||||
"\tbeq _0807CCF8\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tmovs r2, 0x7A\n"
|
||||
"\tbl sub_8044DF0\n"
|
||||
"_0807CCF8:\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl sub_8071DA4\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tmovs r1, 0x8\n"
|
||||
"\tbl sub_806CE68\n"
|
||||
"\tldrb r0, [r7, 0x7]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbeq _0807CD18\n"
|
||||
"\tadds r0, r6, 0x4\n"
|
||||
"\tbl sub_804AC20\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tbl sub_807EC28\n"
|
||||
"_0807CD18:\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl sub_806A5B8\n"
|
||||
"\tldr r0, _0807CD30\n"
|
||||
"\tldr r0, [r0]\n"
|
||||
"\tldr r1, _0807CD34\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldrb r1, [r0]\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl sub_8075900\n"
|
||||
"\tb _0807CD44\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_0807CD30: .4byte gDungeon\n"
|
||||
"_0807CD34: .4byte 0x00003a08\n"
|
||||
"_0807CD38:\n"
|
||||
"\tcmp r4, 0\n"
|
||||
"\tbeq _0807CD44\n"
|
||||
"\tadd r0, sp, 0x8\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tbl sub_8044D40\n"
|
||||
"_0807CD44:\n"
|
||||
"\tbl sub_8044B28\n"
|
||||
"\tlsls r0, 24\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _0807CD54\n"
|
||||
"\tadds r0, r6, 0\n"
|
||||
"\tbl sub_806A1B0\n"
|
||||
"_0807CD54:\n"
|
||||
"\tadd sp, 0x30\n"
|
||||
"\tpop {r3-r5}\n"
|
||||
"\tmov r8, r3\n"
|
||||
"\tmov r9, r4\n"
|
||||
"\tmov r10, r5\n"
|
||||
"\tpop {r4-r7}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0");
|
||||
}
|
||||
#endif // NONMATCHING
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "dungeon.h"
|
||||
#include "music.h"
|
||||
@ -26,8 +27,6 @@ extern u8 gUnknown_810AC64; // 0x8
|
||||
extern u8 gUnknown_810AC66; // 0x8
|
||||
|
||||
extern void sub_80709C8(u8 *buffer, struct EntityInfo *entityInfo);
|
||||
void FadeOutAllMusic(u16);
|
||||
void xxx_call_stop_bgm(void);
|
||||
|
||||
// Dungeon Music Player adds in this flag to tell
|
||||
// the system to fade in rather than immediately playing
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "felicity_bank.h"
|
||||
#include "memory.h"
|
||||
@ -28,7 +29,6 @@ extern u8 gFelicitySavings[];
|
||||
extern u8 gFelicityMoney[];
|
||||
extern u8 gUnknown_80DB738;
|
||||
|
||||
extern void PlaySound(u32);
|
||||
extern void sub_801645C();
|
||||
extern void sub_80169BC();
|
||||
extern void sub_8016B00();
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern struct unkStruct_203B2BC *gUnknown_203B2BC;
|
||||
extern struct TeamInventory *gTeamInventoryRef;
|
||||
@ -19,7 +20,6 @@ extern u32 sub_801EF38(u8 r0);
|
||||
extern void sub_801F214();
|
||||
|
||||
extern void SetFriendAreaActionMenuState(u32);
|
||||
extern void PlaySound(u32);
|
||||
extern void nullsub_104();
|
||||
extern void sub_8099690(u32);
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_8012A18_1.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
// there might be more overlap with unkStruct_203B2BC
|
||||
// I was working on the moves and put the data that seemed to correspond to that
|
||||
@ -119,7 +120,6 @@ extern s16 sub_80A5728(void);
|
||||
extern u8 sub_8002658(s16);
|
||||
extern bool8 sub_8024108(u32);
|
||||
extern void sub_801F1B0(u32, u32);
|
||||
extern void PlaySound(u32);
|
||||
extern void sub_8024458(s16, u32);
|
||||
extern void sub_801BEEC(s16);
|
||||
extern void nullsub_104(void);
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801C620.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "cpu.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern void SetFriendRescueMenuState(u32);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
@ -280,7 +282,6 @@ extern void sub_802F2C0(void);
|
||||
extern void sub_8030DE4(void);
|
||||
extern void sub_802453C(void);
|
||||
extern u8 sub_800D588(void);
|
||||
extern void sub_8011830(void);
|
||||
extern void sub_80151C0(u32, u8 *);
|
||||
extern u32 sub_801D008(void);
|
||||
extern u32 sub_8023CE8(void);
|
||||
@ -300,11 +301,8 @@ extern s32 GetMailIndex(u8 mailType, u32 param_2);
|
||||
extern char * GetMonSpecies(s16 index);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern void MemoryFill8(u8 *dest, u8 value, s32 size);
|
||||
extern void nullsub_23(u32);
|
||||
extern void ResetUnusedInputStruct(void);
|
||||
extern void sprintfStatic(char *buffer, const char *text, ...);
|
||||
extern void xxx_call_start_bg_music(void);
|
||||
|
||||
|
||||
u32 CreateFriendRescueMenu(void)
|
||||
{
|
||||
@ -1175,7 +1173,7 @@ void sub_8032828(void)
|
||||
break;
|
||||
case 0xD:
|
||||
case 0x62:
|
||||
nullsub_23(0);
|
||||
nullsub_23(FALSE);
|
||||
sub_80141B4(&gUnknown_80E2DD0[0], 0, NULL, 0);
|
||||
break;
|
||||
case 0x64:
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "debug.h"
|
||||
#include "code_80A26CC.h"
|
||||
#include "event_flag.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
EWRAM_DATA u32 gUnknown_20398A8 = {0};
|
||||
EWRAM_DATA u32 gUnknown_20398AC = {0};
|
||||
@ -49,7 +50,6 @@ extern void sub_809CA20();
|
||||
extern void sub_80A6E80();
|
||||
extern void sub_8099BE4();
|
||||
extern void sub_8099744();
|
||||
extern void sub_8011860();
|
||||
extern void sub_800CB20();
|
||||
extern void nullsub_120();
|
||||
extern void sub_80A5E70();
|
||||
@ -78,7 +78,6 @@ extern void sub_80961B4();
|
||||
extern void ClearAllItems_8091FB4();
|
||||
extern const char *sub_80A2B18(s16);
|
||||
extern void ChooseKecleonShopInventory(u32);
|
||||
extern void FadeOutAllMusic(u16);
|
||||
extern u8 sub_809C730();
|
||||
extern s16 sub_80A2750(s16);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "debug.h"
|
||||
#include "ground_map_1.h"
|
||||
#include "ground_script.h"
|
||||
|
||||
extern struct GroundScript_ExecutePP_1 *gUnknown_3001B6C;
|
||||
|
208
src/ground_sprite.c
Normal file
208
src/ground_sprite.c
Normal file
@ -0,0 +1,208 @@
|
||||
#include "global.h"
|
||||
#include "code_800558C_1.h"
|
||||
#include "code_800DAC0.h"
|
||||
#include "debug.h"
|
||||
#include "file_system.h"
|
||||
#include "ground_map_1.h"
|
||||
#include "ground_sprite.h"
|
||||
#include "memory.h"
|
||||
#include "sprite.h"
|
||||
|
||||
extern struct unkStruct_2039DB0 gUnknown_2039DB0;
|
||||
extern struct unkStruct_2039DB0 gUnknown_2039DC0;
|
||||
extern u16 gUnknown_2039DCC;
|
||||
extern u16 gUnknown_2039DCE;
|
||||
extern u8 gUnknown_2039DD0;
|
||||
extern u32 gUnknown_2039DD4;
|
||||
extern struct OpenedFile *gUnknown_203B4B4;
|
||||
extern struct unkStruct_3001B7C *gUnknown_3001B7C;
|
||||
|
||||
// dungeon_sbin.s
|
||||
extern const struct FileArchive gDungeonFileArchive;
|
||||
// monster_sbin.s
|
||||
extern const struct FileArchive gMonsterFileArchive;
|
||||
// ornament_sbin.s
|
||||
extern const struct FileArchive gOrnamentFileArchive;
|
||||
// data_8115F5C.s
|
||||
extern const u8 gUnknown_81177CC[];
|
||||
extern const u8 gUnknown_81177D8[];
|
||||
extern const u8 gUnknown_81177EC[];
|
||||
extern const u8 *gUnknown_81178F4[];
|
||||
|
||||
// code_8098BDC.s
|
||||
extern void sub_809971C(u16, u8 *, s16);
|
||||
extern void sub_80997F4(u16, u16);
|
||||
// pokemon_2.s
|
||||
extern void sub_808E53C(u32, u32);
|
||||
|
||||
// ground_sprite.s
|
||||
extern void sub_80A6460(void);
|
||||
|
||||
void sub_80A62F0(void)
|
||||
{
|
||||
s32 r0;
|
||||
struct unkStruct_3001B7C_sub0 *sub0;
|
||||
struct unkStruct_3001B7C_sub108 *sub108;
|
||||
s32 r6;
|
||||
|
||||
gUnknown_3001B7C = MemoryAlloc(sizeof(struct unkStruct_3001B7C), 6);
|
||||
gUnknown_203B4B4 = OpenFileAndGetFileDataPtr(gUnknown_81177CC, &gDungeonFileArchive);
|
||||
|
||||
sub_800DAC0(1);
|
||||
|
||||
sub0 = gUnknown_3001B7C->unk0;
|
||||
gUnknown_2039DD4 = 22;
|
||||
gUnknown_2039DD0 = 1;
|
||||
|
||||
for (r0 = 0; r0 < 22; r0 = (s16)(r0 + 1), sub0++) {
|
||||
sub0->unk0 = 0;
|
||||
sub0->unk4 = r0 * 16;
|
||||
sub0->unk8 = 0;
|
||||
}
|
||||
|
||||
sub108 = gUnknown_3001B7C->unk108;
|
||||
|
||||
for (r6 = 0; r6 < 2; r6++, sub108++) {
|
||||
sub108->unk0 = 0;
|
||||
sub108->unk2 = 0;
|
||||
sub_80997F4(r6 + 29, 0);
|
||||
}
|
||||
|
||||
GroundSprite_Reset(-1);
|
||||
}
|
||||
|
||||
void GroundSprite_Reset(s16 a0)
|
||||
{
|
||||
s32 uVar2;
|
||||
struct unkStruct_2039DB0 *bee;
|
||||
struct unkStruct_2039DB0 *see;
|
||||
|
||||
uVar2 = a0;
|
||||
|
||||
Log(0, gUnknown_81177D8);
|
||||
gUnknown_2039DCC = 0;
|
||||
gUnknown_2039DCE = 0;
|
||||
sub_80A6460();
|
||||
|
||||
sub_808E53C(496, sub_80A4D48(uVar2) ? 3 : 2);
|
||||
|
||||
bee = &gUnknown_2039DB0;
|
||||
sub_8004E8C(bee);
|
||||
see = &gUnknown_2039DC0;
|
||||
sub_8004E8C(see);
|
||||
|
||||
see->unk4 &= ~(0x400 | 0x800);
|
||||
see->unkA &= ~(0x400 | 0x800);
|
||||
see->unkA |= 0x800;
|
||||
|
||||
if (sub_80A4D48(a0)) {
|
||||
bee->unk4 &= ~(0x400 | 0x800);
|
||||
bee->unkA &= ~(0x400 | 0x800);
|
||||
bee->unkA |= (0x400 | 0x800);
|
||||
}
|
||||
else {
|
||||
bee->unk4 &= ~(0x400 | 0x800);
|
||||
bee->unkA &= ~(0x400 | 0x800);
|
||||
bee->unkA |= 0x800;
|
||||
}
|
||||
|
||||
ResetSprites(TRUE);
|
||||
nullsub_10(TRUE);
|
||||
}
|
||||
|
||||
void sub_80A6460(void)
|
||||
{
|
||||
struct OpenedFile *file;
|
||||
s32 i;
|
||||
u8 *data;
|
||||
u16 something;
|
||||
|
||||
file = OpenFileAndGetFileDataPtr(gUnknown_81177EC, &gMonsterFileArchive);
|
||||
|
||||
something = 0x100;
|
||||
data = file->data;
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
sub_809971C(something, data, 0x10);
|
||||
something += 0x10;
|
||||
data += 0x40;
|
||||
}
|
||||
|
||||
CloseFile(file);
|
||||
}
|
||||
|
||||
void sub_80A64A4(void)
|
||||
{
|
||||
u8 *r2;
|
||||
u16 r4;
|
||||
u32 r5;
|
||||
struct OpenedFile *file;
|
||||
struct unkStruct_3001B7C_sub108 *r7;
|
||||
s32 i;
|
||||
s16 r9;
|
||||
u16 sl;
|
||||
u16 flag;
|
||||
u16 flag2;
|
||||
|
||||
r7 = gUnknown_3001B7C->unk108;
|
||||
sub_80A6460();
|
||||
|
||||
for (i = 0; i < 2; i++, r7++)
|
||||
{
|
||||
if (r7->unk2 > 0) {
|
||||
r5 = r7->unk0;
|
||||
sl = i + 29;
|
||||
r9 = 0x1D0 + i * 16;
|
||||
|
||||
flag = r5 & 0x200;
|
||||
if (flag) {
|
||||
file = OpenFileAndGetFileDataPtr(gUnknown_81177EC, &gMonsterFileArchive);
|
||||
r2 = file->data + (r5 & 0xFF) * 0x40;
|
||||
}
|
||||
else {
|
||||
file = OpenFileAndGetFileDataPtr((r5 & 0xFF)[gUnknown_81178F4], &gOrnamentFileArchive);
|
||||
r2 = file->data;
|
||||
}
|
||||
|
||||
flag2 = r5 & 0x1000;
|
||||
r4 = flag2 != 0;
|
||||
|
||||
flag = r5 & 0x2000;
|
||||
if (flag)
|
||||
r4 |= 2;
|
||||
|
||||
sub_809971C(r9, r2, 16);
|
||||
sub_80997F4(sl, r4);
|
||||
|
||||
if (file != NULL)
|
||||
CloseFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A658C(void)
|
||||
{
|
||||
sub_800DB7C();
|
||||
ResetSprites(FALSE);
|
||||
nullsub_10(0);
|
||||
sub_8005180();
|
||||
nullsub_12();
|
||||
CopySpritesToOam();
|
||||
nullsub_13();
|
||||
sub_8005304();
|
||||
nullsub_14();
|
||||
CloseFile(gUnknown_203B4B4);
|
||||
MemoryFree(gUnknown_3001B7C);
|
||||
gUnknown_3001B7C = NULL;
|
||||
}
|
||||
|
||||
// Unused
|
||||
u16 sub_80A65D8(u16 *a0)
|
||||
{
|
||||
return a0[40];
|
||||
}
|
||||
|
||||
u16 sub_80A65E0(u32 a0)
|
||||
{
|
||||
return (a0 >> 16) & 0x337F;
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "gulpin_shop.h"
|
||||
#include "pokemon.h"
|
||||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "moves.h"
|
||||
#include "text1.h"
|
||||
#include "text2.h"
|
||||
#include "gulpin_shop.h"
|
||||
#include "menu_input.h"
|
||||
|
||||
extern struct GulpinShopWork *gGulpinShopWork;
|
||||
extern const struct UnkTextStruct2 gUnknown_80DC11C;
|
||||
@ -38,7 +39,6 @@ extern void sub_801F280(u32);
|
||||
extern void sub_801F808(u16 *);
|
||||
extern u32 sub_801F890(void);
|
||||
extern void sub_801F8D0(void);
|
||||
extern void PlaySound(u32);
|
||||
void SetGulpinShopState(u32);
|
||||
|
||||
u32 CreateGulpinShop(s32 isAsleep, s16 pokeSpecies, struct Move *moves)
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "felicity_bank.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
// size: 0x1E0
|
||||
struct unkStruct_203B27C
|
||||
@ -84,8 +85,6 @@ extern u8 gUnknown_80DC438[];
|
||||
extern u8 gUnknown_80DC448[];
|
||||
extern u8 gUnknown_202E128[];
|
||||
|
||||
void PlayMenuSoundEffect(u32);
|
||||
void PlaySound(u32);
|
||||
bool8 sub_8021178(void);
|
||||
void CreateGulpinShopMenu(void);
|
||||
void sub_8020950(void);
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "text1.h"
|
||||
#include "text2.h"
|
||||
#include "input.h"
|
||||
#include "menu_input.h"
|
||||
|
||||
#define MAX_HINTS 5
|
||||
|
||||
@ -44,7 +45,6 @@ extern struct Hints gGameHints[MAX_HINTS];
|
||||
extern u8 gUnknown_80DC0D4[MAX_HINTS];
|
||||
|
||||
extern void sub_801E714(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_801E714(void);
|
||||
extern void sub_801E76C(void);
|
||||
extern void DisplayChosenHint(void);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "constants/input.h"
|
||||
@ -58,10 +59,6 @@ extern const u8 gTeamToolboxB[];
|
||||
// code_8098BDC.s
|
||||
extern void sub_8099690(u32);
|
||||
|
||||
// code_80118A4.c
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void PlaySound(u16 songIndex);
|
||||
|
||||
void sub_8018D30(void);
|
||||
void sub_80194F8(void);
|
||||
void sub_80195C0(void);
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "code_80130A8.h"
|
||||
#include "code_8012A18_1.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B2B0
|
||||
{
|
||||
@ -186,11 +187,7 @@ extern void LuminousCave_AdvancetoFallbackState(void);
|
||||
extern void sub_8024804(void);
|
||||
extern void UpdateLuminousCaveDialogue(void);
|
||||
|
||||
void xxx_call_fade_out_bgm(u16 speed);
|
||||
void xxx_call_stop_fanfare_se(u16 songIndex);
|
||||
void xxx_call_fade_in_new_bgm(u16 songIndex, u16 speed);
|
||||
void sub_80977D0(void);
|
||||
void PlaySound(u32);
|
||||
void sub_8024CFC(void);
|
||||
void sub_8025254(void);
|
||||
void sub_8024D48(void);
|
||||
@ -200,7 +197,6 @@ void sub_8024E30(void);
|
||||
void sub_801AEE4(u32, u32);
|
||||
void sub_808F734(struct PokemonStruct *, s16);
|
||||
extern void sub_8099690(u32);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_808F468(struct PokemonStruct *, u8 *, u32);
|
||||
|
||||
bool8 LuminousCave_HasOnly1Member(void);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "mailbox.h"
|
||||
#include "wonder_mail.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
EWRAM_DATA_2 struct unkStruct_203B304 *gUnknown_203B304 = {0};
|
||||
|
||||
@ -105,8 +106,6 @@ extern void sub_8096D24(void);
|
||||
extern void ResetMailboxSlot(u8);
|
||||
extern void ReceivePKMNNews(u8);
|
||||
extern void sub_8096078(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void PlaySound(u32);
|
||||
extern void sub_802BEDC(void);
|
||||
extern u8 sub_802BE74(void);
|
||||
extern u8 HasNoAcceptedJobs(void);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "constants/colors.h"
|
||||
#include "constants/input.h"
|
||||
@ -79,8 +80,6 @@ extern u8 sub_80A2740(s32 r0);
|
||||
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern bool8 IsMazeCompleted(s32);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void PlaySound(u16);
|
||||
extern void PrintColoredPokeNameToBuffer(u8 *, struct PokemonStruct *, s32);
|
||||
extern void PrintYellowDungeonNametoBuffer(u8 *, struct DungeonLocation *);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "cpu.h"
|
||||
#include "memory.h"
|
||||
|
||||
extern struct HeapFreeListElement gMainHeapFreeList[32];
|
||||
@ -8,8 +9,6 @@ extern struct HeapDescriptor gMainHeapDescriptor;
|
||||
EWRAM_DATA struct HeapDescriptor *gHeapDescriptorList[8] = {0};
|
||||
EWRAM_DATA u32 gHeapCount = {0};
|
||||
|
||||
extern void CpuClear(u32 *dest, s32 size);
|
||||
|
||||
void InitHeapInternal(void);
|
||||
|
||||
void InitHeap(void)
|
||||
|
1417
src/menu_input.c
1417
src/menu_input.c
File diff suppressed because it is too large
Load Diff
@ -1,340 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "constants/input.h"
|
||||
#include "input.h"
|
||||
#include "text1.h"
|
||||
#include "menu_input.h"
|
||||
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
void sub_801332C(u16 *);
|
||||
|
||||
void sub_8013660(struct MenuInputStruct *param_1)
|
||||
{
|
||||
if (0 < param_1->unk1A)
|
||||
{
|
||||
UpdateMenuCursorSpriteCoords(param_1);
|
||||
sub_801332C(¶m_1->unk8);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateMenuCursorSpriteCoords(struct MenuInputStruct *param_1)
|
||||
{
|
||||
s32 index;
|
||||
struct UnkTextStruct1 *temp;
|
||||
|
||||
index = param_1->unk0;
|
||||
temp = &gUnknown_2027370[index];
|
||||
param_1->unk8 = temp->unk0 * 8 + param_1->unk4;
|
||||
param_1->unkA = temp->unk2 * 8 + sub_8013800(param_1, param_1->menuIndex);
|
||||
}
|
||||
|
||||
void MoveMenuCursorDown(struct MenuInputStruct *param_1)
|
||||
{
|
||||
param_1->unk24 = 0;
|
||||
if (param_1->unk1A < 1) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
else {
|
||||
param_1->menuIndex++;
|
||||
if (param_1->menuIndex >= param_1->unk1A) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80136E0(struct MenuInputStruct *param_1, u8 param_2)
|
||||
{
|
||||
param_1->unk24 = 0;
|
||||
if (param_1->unk1A < 1) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
else {
|
||||
param_1->menuIndex++;
|
||||
if (param_1->menuIndex >= param_1->unk1A) {
|
||||
if (param_2 != 0) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
param_1->menuIndex = param_1->unk1A - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MoveMenuCursorUp(struct MenuInputStruct *param_1)
|
||||
{
|
||||
param_1->unk24 = 0;
|
||||
if (param_1->unk1A < 1) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
else {
|
||||
param_1->menuIndex--;
|
||||
if (param_1->menuIndex < 0) {
|
||||
param_1->menuIndex = param_1->unk1A + -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8013744(struct MenuInputStruct *param_1, u8 param_2)
|
||||
{
|
||||
param_1->unk24 = 0;
|
||||
if (param_1->unk1A < 1) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
else {
|
||||
param_1->menuIndex--;
|
||||
if (param_1->menuIndex < 0) {
|
||||
if (param_2 != 0) {
|
||||
param_1->menuIndex = param_1->unk1A + -1;
|
||||
}
|
||||
else {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8013780(struct MenuInputStruct *param_1, s32 param_2)
|
||||
{
|
||||
if (param_2 < 0) {
|
||||
param_1->menuIndex = 0;
|
||||
}
|
||||
else if (param_2 >= param_1->unk1A) {
|
||||
param_1->menuIndex = param_1->unk1A - 1;
|
||||
}
|
||||
else {
|
||||
param_1->menuIndex = param_2;
|
||||
}
|
||||
param_1->unk24 = 0;
|
||||
}
|
||||
|
||||
s32 sub_80137A8(struct MenuInputStruct *param_1)
|
||||
{
|
||||
return param_1->menuIndex;
|
||||
}
|
||||
|
||||
void sub_80137B0(struct MenuInputStruct *param_1, s32 param_2)
|
||||
{
|
||||
s32 iVar1;
|
||||
#ifndef NONMATCHING
|
||||
register s32 iVar2 asm("r0");
|
||||
#else
|
||||
s32 iVar2;
|
||||
#endif
|
||||
|
||||
if (param_2 >= 1) {
|
||||
iVar2 = param_2 << 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gUnknown_2027370[param_1->unk0].unkC == 6)
|
||||
{
|
||||
iVar1 = 0x10;
|
||||
}
|
||||
else
|
||||
{
|
||||
iVar1 = 0;
|
||||
}
|
||||
iVar2 = (gUnknown_2027370[param_1->unk0].unk6 * 8 - iVar1);
|
||||
iVar2 <<= 8;
|
||||
}
|
||||
param_1->unk10 = iVar2 / param_1->unk1C;
|
||||
}
|
||||
|
||||
void sub_80137F8(struct MenuInputStruct *param_1, u32 param_2)
|
||||
{
|
||||
param_1->unk10 = param_2 << 8;
|
||||
}
|
||||
|
||||
s32 sub_8013800(struct MenuInputStruct *param_1, s32 param_2)
|
||||
{
|
||||
s32 iVar1;
|
||||
s32 iVar2;
|
||||
|
||||
iVar2 = param_1->unk6;
|
||||
iVar1 = param_2 * param_1->unk10;
|
||||
if (iVar1 < 0) {
|
||||
iVar1 = iVar1 + 0xff;
|
||||
}
|
||||
return (iVar2 + (iVar1 >> 8));
|
||||
}
|
||||
|
||||
void sub_8013818(struct MenuInputStruct *param_1, s32 param_2, u32 param_3, s32 param_4)
|
||||
{
|
||||
param_1->unk0 = param_4;
|
||||
param_1->unk22 = param_2;
|
||||
param_1->unk1C = param_3;
|
||||
param_1->unk14 = 0;
|
||||
param_1->unk24 = 0;
|
||||
param_1->menuIndex = 0;
|
||||
param_1->unk1E = 0;
|
||||
sub_801317C(¶m_1->unk28);
|
||||
sub_8013984(param_1);
|
||||
sub_80137F8(param_1,0xC);
|
||||
}
|
||||
|
||||
|
||||
void sub_8013848(struct MenuInputStruct *param_1, s32 param_2, u32 param_3, s32 param_4)
|
||||
{
|
||||
param_1->unk0 = param_4;
|
||||
param_1->unk22 = param_2;
|
||||
param_1->unk1C = param_3;
|
||||
param_1->unk14 = 0;
|
||||
param_1->unk24 = 0;
|
||||
param_1->menuIndex = 0;
|
||||
param_1->unk1E = 0;
|
||||
sub_801317C(¶m_1->unk28);
|
||||
sub_8013984(param_1);
|
||||
sub_80137F8(param_1,0x18);
|
||||
}
|
||||
|
||||
void sub_8013878(struct MenuInputStruct *param_1, s32 param_2)
|
||||
{
|
||||
if (param_2 < 0) {
|
||||
param_2 = 0;
|
||||
}
|
||||
else if (param_2 >= param_1->unk22) {
|
||||
param_2 = param_1->unk22 + -1;
|
||||
}
|
||||
param_1->unk1E = param_2 / param_1->unk1C;
|
||||
param_1->menuIndex = param_2 % param_1->unk1C;
|
||||
param_1->unk24 = 0;
|
||||
sub_8013984(param_1);
|
||||
}
|
||||
|
||||
bool8 sub_80138B8(struct MenuInputStruct *param_1, bool8 param_2)
|
||||
{
|
||||
s32 sVar1;
|
||||
s32 oldIndex;
|
||||
|
||||
sVar1 = param_1->unk1E;
|
||||
oldIndex = param_1->menuIndex;
|
||||
AddMenuCursorSprite(param_1);
|
||||
if(param_2)
|
||||
{
|
||||
switch(GetKeyPress(param_1))
|
||||
{
|
||||
case INPUT_DPAD_UP:
|
||||
MoveMenuCursorUp(param_1);
|
||||
if(oldIndex != param_1->menuIndex)
|
||||
PlayMenuSoundEffect(3);
|
||||
break;
|
||||
case INPUT_DPAD_DOWN:
|
||||
MoveMenuCursorDown(param_1);
|
||||
if(oldIndex != param_1->menuIndex)
|
||||
PlayMenuSoundEffect(3);
|
||||
break;
|
||||
case INPUT_DPAD_LEFT:
|
||||
sub_8013A7C(param_1);
|
||||
break;
|
||||
case INPUT_DPAD_RIGHT:
|
||||
sub_8013A54(param_1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sVar1 != param_1->unk1E) {
|
||||
PlayMenuSoundEffect(4);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8013938(struct MenuInputStruct *param_1)
|
||||
{
|
||||
s32 sVar1;
|
||||
|
||||
sVar1 = param_1->unk1E;
|
||||
param_1->unk1A = 0;
|
||||
param_1->unk14 = 0;
|
||||
AddMenuCursorSprite(param_1);
|
||||
switch(GetKeyPress(param_1))
|
||||
{
|
||||
case INPUT_DPAD_LEFT:
|
||||
sub_8013A7C(param_1);
|
||||
break;
|
||||
case INPUT_DPAD_RIGHT:
|
||||
sub_8013A54(param_1);
|
||||
break;
|
||||
}
|
||||
if (sVar1 != param_1->unk1E) {
|
||||
PlayMenuSoundEffect(4);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8013984(struct MenuInputStruct * param_1)
|
||||
{
|
||||
s32 iVar2;
|
||||
s32 iVar4;
|
||||
struct UnkTextStruct1 *ptr;
|
||||
|
||||
iVar4 = param_1->unk0;
|
||||
ptr = &gUnknown_2027370[iVar4];
|
||||
if (param_1->unk1C == 0) {
|
||||
param_1->unk1C++;
|
||||
}
|
||||
param_1->unk20 = param_1->unk22 / param_1->unk1C;
|
||||
iVar2 = (param_1->unk22 % param_1->unk1C);
|
||||
if (iVar2 != 0) {
|
||||
param_1->unk20++;
|
||||
}
|
||||
if (param_1->unk1E > param_1->unk20 - 1) {
|
||||
param_1->unk1E = param_1->unk20 - 1;
|
||||
}
|
||||
if ((param_1->unk1E != param_1->unk20 - 1) || (param_1->unk22 % param_1->unk1C == 0))
|
||||
{
|
||||
param_1->unk1A = param_1->unk1C;
|
||||
}
|
||||
else
|
||||
{
|
||||
param_1->unk1A = param_1->unk22 % param_1->unk1C;
|
||||
}
|
||||
if (param_1->menuIndex > param_1->unk1A - 1) {
|
||||
param_1->menuIndex = param_1->unk1A - 1;
|
||||
}
|
||||
param_1->unk4 = 0;
|
||||
if (ptr->unkC == 6) {
|
||||
param_1->unk6 = 0x10;
|
||||
}
|
||||
else {
|
||||
param_1->unk6 = 0;
|
||||
}
|
||||
if (param_1->unk20 < 2) {
|
||||
param_1->unkC = 0;
|
||||
}
|
||||
else {
|
||||
param_1->unkC = (ptr->unk0 + ptr->unk4 + -2) * 8;
|
||||
}
|
||||
param_1->unkE = ((ptr->unk2) + 1) * 8 + -2;
|
||||
}
|
||||
|
||||
void sub_8013A54(struct MenuInputStruct *param_1)
|
||||
{
|
||||
if (param_1->unk1E < param_1->unk20 - 1) {
|
||||
param_1->unk1E++;
|
||||
}
|
||||
else
|
||||
{
|
||||
param_1->unk1E = 0;
|
||||
}
|
||||
sub_8013984(param_1);
|
||||
}
|
||||
|
||||
void sub_8013A7C(struct MenuInputStruct *param_1)
|
||||
{
|
||||
if (param_1->unk1E < 1) {
|
||||
param_1->unk1E = param_1->unk20 - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
param_1->unk1E--;
|
||||
}
|
||||
sub_8013984(param_1);
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "constants/colors.h"
|
||||
#include "constants/input.h"
|
||||
@ -54,7 +55,6 @@ extern const char *gUnknown_80D4928[];
|
||||
|
||||
extern s32 sub_8008ED0(u8 *);
|
||||
extern void CreateOthersMenu(void);
|
||||
void PlayMenuSoundEffect(u32);
|
||||
void CreateOptionsMenu(void);
|
||||
void nullsub_38(void);
|
||||
extern void SetOptionsMenuState(u32);
|
||||
|
@ -12,15 +12,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "sprite.h"
|
||||
|
||||
struct unkSprite
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
};
|
||||
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B35C
|
||||
{
|
||||
@ -28,7 +20,7 @@ struct unkStruct_203B35C
|
||||
u32 unk0;
|
||||
u32 linkStatus;
|
||||
u32 state;
|
||||
struct unkSprite unkC;
|
||||
struct SpriteOAM unkC;
|
||||
u32 unk14;
|
||||
u8 fill18[0x1C - 0x18];
|
||||
struct MenuStruct unk1C[4];
|
||||
@ -453,7 +445,6 @@ extern u32 sub_8037C10(u32);
|
||||
extern void sub_8037748(void);
|
||||
extern void sub_80371B8(void);
|
||||
extern void sub_8037900(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern u32 sub_8037798(void);
|
||||
extern void sub_8005838(u32, u32);
|
||||
extern void sub_80060EC();
|
||||
@ -465,13 +456,10 @@ extern void xxx_call_update_bg_sound_input();
|
||||
extern s32 sub_8037D64(u32 mode, void *, void *);
|
||||
extern s32 sub_80381F4(u32 mode, void *, void *);
|
||||
extern void sub_8037810(void);
|
||||
extern void sub_8011830(void);
|
||||
extern s32 sub_8037B28(u32);
|
||||
s32 sub_8035D3C(void);
|
||||
extern s32 sub_8035D74(void);
|
||||
extern void xxx_call_start_bg_music(void);
|
||||
extern void xxx_draw_string_80144C4(void);
|
||||
extern void AddSprite(struct unkSprite *, u32, u32, u32);
|
||||
|
||||
void sub_8036FDC(s32 param_1)
|
||||
{
|
||||
@ -792,57 +780,67 @@ void sub_80376CC(void)
|
||||
#endif
|
||||
u32 r1;
|
||||
u32 r4;
|
||||
|
||||
|
||||
r1 = gUnknown_203B35C->unkC.unk0;
|
||||
r0 = 0xfeff;
|
||||
r1 = gUnknown_203B35C->unkC.attrib1;
|
||||
r0 = (u16)~SPRITEOAM_MASK_AFFINEMODE1;
|
||||
r0 &= r1;
|
||||
r0 &= 0xfdff;
|
||||
r0 &= 0xf3ff;
|
||||
r0 &= 0xefff;
|
||||
r0 &= 0xdfff;
|
||||
r2 = 0x4000;
|
||||
r0 &= 0x3fff;
|
||||
r0 |= r2;
|
||||
gUnknown_203B35C->unkC.unk0 = r0;
|
||||
|
||||
r2 = 0x3F0;
|
||||
r1 = gUnknown_203B35C->unkC.unk4;
|
||||
r0 = 0xFC00;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_AFFINEMODE2;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_OBJMODE;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_MOSAIC;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_BPP;
|
||||
|
||||
r2 = 1 << SPRITEOAM_SHIFT_SHAPE;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_SHAPE;
|
||||
r0 |= r2;
|
||||
|
||||
gUnknown_203B35C->unkC.attrib1 = r0;
|
||||
|
||||
r2 = 0x3F0 << SPRITEOAM_SHIFT_TILENUM;
|
||||
r1 = gUnknown_203B35C->unkC.attrib3;
|
||||
r0 = (u16)~SPRITEOAM_MASK_TILENUM;
|
||||
r0 &= r1;
|
||||
r0 |= r2;
|
||||
r0 &= 0xf3ff;
|
||||
r2 = 0xF;
|
||||
r4 = 0xF000;
|
||||
r0 &= 0xfff;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_PRIORITY;
|
||||
|
||||
r2 = (u16)~SPRITEOAM_MASK_UNK6_4;
|
||||
|
||||
r4 = 15 << SPRITEOAM_SHIFT_PALETTENUM;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_PALETTENUM;
|
||||
r0 |= r4;
|
||||
|
||||
gUnknown_203B35C->unkC.unk4 = r0;
|
||||
r0 = 0;
|
||||
gUnknown_203B35C->unkC.unk2 = r0;
|
||||
gUnknown_203B35C->unkC.attrib3 = r0;
|
||||
|
||||
r1 = 0xC00;
|
||||
r0 = 0; // Set x/matrixNum/size to 0
|
||||
gUnknown_203B35C->unkC.attrib2 = r0;
|
||||
|
||||
r1 = 192 << SPRITEOAM_SHIFT_UNK6_4;
|
||||
r0 = gUnknown_203B35C->unkC.unk6;
|
||||
r2 &= r0;
|
||||
r2 |= r1;
|
||||
gUnknown_203B35C->unkC.unk6 = r2;
|
||||
|
||||
}
|
||||
|
||||
void sub_8037748(void)
|
||||
{
|
||||
u32 temp2;
|
||||
u16 temp2;
|
||||
|
||||
gUnknown_203B35C->unkC.unk2 = (gUnknown_203B35C->unkC.unk2 & 0xfe00) | 0x70;
|
||||
gUnknown_203B35C->unkC.attrib2 &= ~SPRITEOAM_MASK_X; // Clear x
|
||||
gUnknown_203B35C->unkC.attrib2 |= 112; // Set x to 112
|
||||
|
||||
temp2 = 0x680;
|
||||
gUnknown_203B35C->unkC.unk6 = (gUnknown_203B35C->unkC.unk6 & 0xf) | temp2;
|
||||
temp2 = 104 << SPRITEOAM_SHIFT_UNK6_4;
|
||||
gUnknown_203B35C->unkC.unk6 &= ~SPRITEOAM_MASK_UNK6_4;
|
||||
gUnknown_203B35C->unkC.unk6 |= temp2;
|
||||
|
||||
if ((gUnknown_203B35C->unk14 & 8) != 0) {
|
||||
AddSprite(&gUnknown_203B35C->unkC,0x100,0,0x0);
|
||||
}
|
||||
xxx_draw_string_80144C4();
|
||||
gUnknown_203B35C->unk14++;
|
||||
if ((gUnknown_203B35C->unk14 & 8) != 0)
|
||||
AddSprite(&gUnknown_203B35C->unkC, 0x100, NULL, NULL);
|
||||
|
||||
xxx_draw_string_80144C4();
|
||||
gUnknown_203B35C->unk14++;
|
||||
}
|
||||
|
||||
u32 sub_8037798(void)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "kecleon_bros.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B2B8
|
||||
{
|
||||
@ -163,7 +164,6 @@ ALIGNED(4) static const u8 fill0[] = "pksdir0";
|
||||
|
||||
extern u32 sub_8026F04(struct PokemonStruct *);
|
||||
extern void sub_8026074(s32);
|
||||
extern void PlaySound(u32);
|
||||
bool8 CanTakePokemonHeldItem(struct PokemonStruct *r0);
|
||||
extern bool8 sub_80023E4(u8);
|
||||
extern struct PokemonStruct *sub_808D3F8(void);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "menu_input.h"
|
||||
#include "team_inventory.h"
|
||||
#include "pelipper_board.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
EWRAM_DATA_2 struct unkStruct_203B308 *gPelipperBoard = {0};
|
||||
|
||||
@ -92,7 +93,6 @@ extern void ResetPelipperBoardSlot(u8);
|
||||
extern void sub_80965F4(void);
|
||||
extern void sub_802C2D4(void);
|
||||
extern u32 sub_802C1E4(u32);
|
||||
extern void PlaySound(u32);
|
||||
extern u8 sub_802C26C(void);
|
||||
extern u8 HasNoAcceptedJobs(void);
|
||||
extern bool8 IsMailinJobSlot(struct WonderMail *mail);
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "menu_input.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_8012A18_1.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
enum
|
||||
{
|
||||
@ -50,8 +51,6 @@ extern void SetBGPaletteBufferColorArray(s32 index, u8 *colorArray);
|
||||
|
||||
extern void RedrawPartnerSelectionMenu(void);
|
||||
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
|
||||
extern u32 sub_80095E4(s16, u32);
|
||||
|
||||
extern struct GameOptions *gGameOptionsRef;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "random.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "constants/tactic.h"
|
||||
#include "sprite.h"
|
||||
|
||||
extern u8 *gIQSkillNames[];
|
||||
extern u32 gIQSkillDescriptions[];
|
||||
@ -27,17 +28,9 @@ struct unkStruct_808E9EC
|
||||
u8 unk12;
|
||||
u8 unk13;
|
||||
};
|
||||
extern u32 gUnknown_81076C4[];
|
||||
extern s32 gUnknown_81076C4[6]; // x-coord positioning for shadow sprites
|
||||
|
||||
struct unkStruct_202F3E8
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
};
|
||||
|
||||
extern struct unkStruct_202F3E8 gUnknown_202F3E8[];
|
||||
extern struct SpriteOAM gUnknown_202F3E8[3]; // Shadow sprites of some kind
|
||||
extern s16 gUnknown_810AC60; // 0xC
|
||||
extern s16 gUnknown_810AC62; // 0xC
|
||||
extern s16 gUnknown_810AC68; // 0x8
|
||||
@ -47,8 +40,6 @@ extern s16 gUnknown_810AC66; // 0x8
|
||||
// 2, 4, 6, 7, 8, 9, 0xA, 0xD, 0xF, 0x11
|
||||
extern s32 gUnknown_810AC90[10];
|
||||
|
||||
extern void AddSprite(u16 *, u32, u32, u32);
|
||||
|
||||
extern void SaveDungeonLocation(struct unkStruct_8094924*, struct DungeonLocation*);
|
||||
extern void xxx_save_poke_sub_c_808F41C(struct unkStruct_8094924*, struct unkPokeSubStruct_C*);
|
||||
extern void SavePokemonMoves(struct unkStruct_8094924*, struct Move*);
|
||||
@ -64,29 +55,30 @@ extern void sub_809447C(struct unkStruct_8094924*, void*);
|
||||
extern void sub_808F428(struct unkStruct_8094924*, struct unkStruct_808E6F4*);
|
||||
|
||||
|
||||
bool8 sub_808E668(s16 a1, s16* a2, s16* a3)
|
||||
bool8 sub_808E668(s16 species, s16* a2, s16* a3)
|
||||
{
|
||||
u32 shifted = a1 << 16;
|
||||
if (species != MONSTER_DIGLETT && species != MONSTER_DUGTRIO) {
|
||||
u8 shadowSize = GetShadowSize(species);
|
||||
u32 x, unk6;
|
||||
struct SpriteOAM* spr;
|
||||
|
||||
if (((shifted - 0x320000) >> 16) > 1) {
|
||||
u8 shadowSize = GetShadowSize(a1);
|
||||
u32 unk2, unk6;
|
||||
struct unkStruct_202F3E8* arg0;
|
||||
|
||||
unk2 = a2[0] + a3[8];
|
||||
x = a2[0] + a3[8];
|
||||
unk6 = a2[1] + a3[9];
|
||||
unk2 += gUnknown_81076C4[shadowSize];
|
||||
x += gUnknown_81076C4[shadowSize];
|
||||
unk6 -= 4;
|
||||
unk2 &= 0x1ff;
|
||||
x &= SPRITEOAM_MAX_X;
|
||||
|
||||
arg0 = &gUnknown_202F3E8[shadowSize];
|
||||
arg0->unk2 = (arg0->unk2 & 0xfe00) | unk2;
|
||||
unk6 &= 0xfff;
|
||||
unk6 <<= 4;
|
||||
arg0->unk6 = (arg0->unk6 & 0xf) | unk6;
|
||||
AddSprite((u16*)arg0, 0, 0, 0);
|
||||
spr = &gUnknown_202F3E8[shadowSize];
|
||||
spr->attrib2 &= ~SPRITEOAM_MASK_X;
|
||||
spr->attrib2 |= x;
|
||||
unk6 &= SPRITEOAM_MAX_UNK6_4;
|
||||
unk6 <<= SPRITEOAM_SHIFT_UNK6_4;
|
||||
spr->unk6 &= ~SPRITEOAM_MASK_UNK6_4;
|
||||
spr->unk6 |= unk6;
|
||||
AddSprite(spr, 0, NULL, NULL);
|
||||
}
|
||||
return 1;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -880,7 +880,7 @@ s32 sub_808E400(s32 _species, s16* _a2, s32 _a3, s32 _a4)
|
||||
register s16* a2 asm("r6");
|
||||
i = 1;
|
||||
a2 = _a2;
|
||||
for (i = 1; i <= MONSTER_RAYQUAZA_CUTSCENE; i++) {
|
||||
for (i = 1; i <= MONSTER_MAX; i++) {
|
||||
register s32 current asm("r8") = (s16)i;
|
||||
if (species != GetPokemonEvolveFrom(i)) {
|
||||
continue;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "save.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B2CC
|
||||
{
|
||||
@ -153,7 +154,6 @@ extern u16 gUnknown_203B2DC;
|
||||
extern s32 GetNumPKMNNews(void);
|
||||
extern void sub_802B880(void);
|
||||
extern void CreatePKMNNewsMenu(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_802BCC4(void);
|
||||
extern void sub_802BB14(u32);
|
||||
extern u8 HasNoMailinMailbox(void);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "code_8094F88.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct PostOfficeHelper
|
||||
{
|
||||
@ -177,7 +178,6 @@ extern u8 gUnknown_202DE58[];
|
||||
extern u8 gUnknown_202E5D8[];
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_8031A84();
|
||||
extern void DisplayMissionObjectives();
|
||||
extern u8 *GetCurrentMissionText(s16 r0);
|
||||
|
@ -250,7 +250,6 @@ extern void sub_8031E10(void);
|
||||
extern u32 sub_80154F0(void);
|
||||
extern u32 sub_8031DCC(void);
|
||||
extern void sub_8031E00(void);
|
||||
extern void AddSprite(struct unkSprite *, u32, u32, u32);
|
||||
extern void xxx_draw_string_80144C4(void);
|
||||
|
||||
void DisplayRescuePasswordError(u32 error);
|
||||
@ -637,7 +636,7 @@ u32 sub_8039068(u32 mailMode, u8 *passwordBuffer, struct unkStruct_203B480 *para
|
||||
{
|
||||
if ( (!sub_803D204(passwordBuffer, param_3)) || (WONDER_MAIL_TYPE_OKD < param_3->mailType) ||
|
||||
(param_3->dungeon.floor >= GetDungeonFloorCount(param_3->dungeon.id)) ||
|
||||
(param_3->clientSpecies == MONSTER_NONE) || (MONSTER_RAYQUAZA_CUTSCENE < param_3->clientSpecies) ||
|
||||
(param_3->clientSpecies == MONSTER_NONE) || (MONSTER_MAX < param_3->clientSpecies) ||
|
||||
(IsInvalidItemReward(param_3->item.id))) {
|
||||
return PASSWORD_ENTRY_INCORRECT_PASSWORD;
|
||||
}
|
||||
@ -693,39 +692,43 @@ void sub_8039174(void)
|
||||
#else
|
||||
u32 r2; // r4 but should be r2
|
||||
#endif //NONMATCHING
|
||||
struct unkSprite* spr; // r2 but should be r3
|
||||
struct SpriteOAM* spr; // r2 but should be r3
|
||||
u16 r4; // r3 but should be r4
|
||||
|
||||
|
||||
spr = &gRescuePasswordMenu->unk208;
|
||||
|
||||
spr->unk0 &= ~0x100;
|
||||
spr->unk0 &= ~0x200;
|
||||
r4 = ~(0x800 | 0x400);
|
||||
spr->unk0 &= r4;
|
||||
spr->unk0 &= ~0x1000;
|
||||
spr->unk0 &= ~0x2000;
|
||||
r2 = 0x4000;
|
||||
temp = 0x8000;
|
||||
temp = ~(temp | 0x4000);
|
||||
spr->unk0 &= temp;
|
||||
spr->unk0 |= r2;
|
||||
spr->attrib1 &= ~SPRITEOAM_MASK_AFFINEMODE1;
|
||||
|
||||
r2 = 0x200 | 0x100 | 0x80 | 0x40 | 0x20 | 0x10;
|
||||
spr->unk4 &= ~(0x200 | 0x100 | 0x80 | 0x40 | 0x20 | 0x10 | 0x8 | 0x4 | 0x2 | 0x1);
|
||||
spr->unk4 |= r2;
|
||||
spr->unk4 &= r4;
|
||||
r2 = 0x1 | 0x2 | 0x4 | 0x8;
|
||||
r4 = 0x1000 | 0x2000 | 0x4000 | 0x8000;
|
||||
temp = ~r4;
|
||||
spr->unk4 &= temp;
|
||||
spr->unk4 |= r4;
|
||||
spr->attrib1 &= ~SPRITEOAM_MASK_AFFINEMODE2;
|
||||
|
||||
spr->attrib1 &= ~SPRITEOAM_MASK_OBJMODE;
|
||||
|
||||
spr->attrib1 &= ~SPRITEOAM_MASK_MOSAIC;
|
||||
|
||||
spr->attrib1 &= ~SPRITEOAM_MASK_BPP;
|
||||
|
||||
r2 = 1 << SPRITEOAM_SHIFT_SHAPE;
|
||||
spr->attrib1 &= ~SPRITEOAM_MASK_SHAPE;
|
||||
spr->attrib1 |= r2;
|
||||
|
||||
r2 = 0x3F0 << SPRITEOAM_SHIFT_TILENUM;
|
||||
spr->attrib3 &= ~SPRITEOAM_MASK_TILENUM;
|
||||
spr->attrib3 |= r2;
|
||||
|
||||
spr->attrib3 &= ~SPRITEOAM_MASK_PRIORITY;
|
||||
|
||||
r2 = (u16)~SPRITEOAM_MASK_UNK6_4;
|
||||
|
||||
r4 = 15 << SPRITEOAM_SHIFT_PALETTENUM;
|
||||
spr->attrib3 &= ~SPRITEOAM_MASK_PALETTENUM;
|
||||
spr->attrib3 |= r4;
|
||||
|
||||
#ifndef NONMATCHING
|
||||
while (0) ;
|
||||
#endif //NONMATCHING
|
||||
spr->unk2 = 0; // Without the while(0), this 0 is loaded super early and also into r3
|
||||
spr->attrib2 = 0; // Without the while(0), this 0 is loaded super early and also into r3
|
||||
|
||||
temp = 0x800 | 0x400;
|
||||
temp = 192 << SPRITEOAM_SHIFT_UNK6_4;
|
||||
r2 &= spr->unk6;
|
||||
r2 |= temp;
|
||||
spr->unk6 = r2;
|
||||
@ -733,22 +736,21 @@ void sub_8039174(void)
|
||||
|
||||
void sub_80391F8(void)
|
||||
{
|
||||
struct unkSprite *iVar2;
|
||||
u32 temp;
|
||||
u32 temp2;
|
||||
struct SpriteOAM *spr;
|
||||
u32 val;
|
||||
|
||||
iVar2 = &gRescuePasswordMenu->unk208;
|
||||
|
||||
temp = (iVar2->unk2 & 0xfe00);
|
||||
iVar2->unk2 = temp | 0x70;
|
||||
spr = &gRescuePasswordMenu->unk208;
|
||||
|
||||
temp2 = 0x700;
|
||||
temp = (iVar2->unk6 & 0xf);
|
||||
iVar2->unk6 = temp | temp2;
|
||||
spr->attrib2 &= ~SPRITEOAM_MASK_X;
|
||||
spr->attrib2 |= 112;
|
||||
|
||||
if ((gRescuePasswordMenu->unk210 & 8) != 0) {
|
||||
AddSprite(iVar2,0x100,0,0);
|
||||
}
|
||||
xxx_draw_string_80144C4();
|
||||
gRescuePasswordMenu->unk210 += 1;
|
||||
val = 112 << SPRITEOAM_SHIFT_UNK6_4;
|
||||
spr->unk6 &= ~SPRITEOAM_MASK_UNK6_4;
|
||||
spr->unk6 |= val;
|
||||
|
||||
if (gRescuePasswordMenu->unk210 & 8)
|
||||
AddSprite(spr, 0x100, NULL, NULL);
|
||||
|
||||
xxx_draw_string_80144C4();
|
||||
gRescuePasswordMenu->unk210++;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "exclusive_pokemon.h"
|
||||
#include "game_options.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
EWRAM_DATA_2 u32 gUnknown_203B17C = {0};
|
||||
EWRAM_DATA_2 char *gUnknown_203B180 = {0};
|
||||
@ -141,7 +142,6 @@ ALIGNED(4) static const char fill_save7[] = _("pksdir0");
|
||||
extern bool8 sub_800DAB0(u16, u8*, s32);
|
||||
extern bool8 sub_800DAB4(u16, u8*, s32);
|
||||
extern bool8 sub_800DAB8(void);
|
||||
extern void sub_8011830(void);
|
||||
extern void sub_80140DC();
|
||||
extern void sub_8014114();
|
||||
extern u32 SaveRecruitedPokemon(u8 *, u32);
|
||||
@ -168,9 +168,6 @@ extern void sub_80974E8(void);
|
||||
extern void ResetNumAdventures(void);
|
||||
extern void sub_80993D8(void);
|
||||
|
||||
extern void xxx_call_start_bg_music(void);
|
||||
|
||||
|
||||
u32 sub_8011C1C(void)
|
||||
{
|
||||
return gUnknown_203B17C;
|
||||
|
@ -7,14 +7,6 @@
|
||||
#include "sprite.h"
|
||||
#include "code_80130A8.h"
|
||||
|
||||
struct unkSprite
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
};
|
||||
|
||||
struct unkStruct_203B360
|
||||
{
|
||||
// size: 0x1b4
|
||||
@ -22,7 +14,7 @@ struct unkStruct_203B360
|
||||
u32 unk4;
|
||||
struct MenuStruct unk8[4];
|
||||
struct UnkTextStruct2 unk148[4];
|
||||
struct unkSprite unk1A8;
|
||||
struct SpriteOAM unk1A8;
|
||||
u32 unk1B0; // Sprite count?
|
||||
};
|
||||
|
||||
@ -138,7 +130,6 @@ extern void sub_8038830();
|
||||
extern void sub_80388C4(void);
|
||||
extern void sub_8014114();
|
||||
extern void sub_80140F8(void);
|
||||
extern void AddSprite(struct unkSprite *, u32, u32, u32);
|
||||
|
||||
void CreateSaveMenu(s32 currMenu)
|
||||
{
|
||||
@ -295,50 +286,58 @@ void sub_8038830(void)
|
||||
u32 r1;
|
||||
u32 r4;
|
||||
u32 r5;
|
||||
struct unkSprite *sprite;
|
||||
|
||||
struct SpriteOAM *sprite;
|
||||
|
||||
r5 = 0;
|
||||
sprite = &gUnknown_203B364->unk1A8;
|
||||
|
||||
r1 = sprite->unk0;
|
||||
r0 = 0xfeff;
|
||||
r1 = sprite->attrib1;
|
||||
r0 = (u16)~SPRITEOAM_MASK_AFFINEMODE1;
|
||||
r0 &= r1;
|
||||
r0 &= 0xfdff;
|
||||
r0 &= 0xf3ff;
|
||||
r0 &= 0xefff;
|
||||
r0 &= 0xdfff;
|
||||
r2 = 0x4000;
|
||||
r0 &= 0x3fff;
|
||||
r0 |= r2;
|
||||
sprite->unk0 = r0;
|
||||
|
||||
r2 = 0x3F0;
|
||||
r1 = sprite->unk4;
|
||||
r0 = 0xFC00;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_AFFINEMODE2;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_OBJMODE;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_MOSAIC;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_BPP;
|
||||
|
||||
r2 = 1 << SPRITEOAM_SHIFT_SHAPE;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_SHAPE;
|
||||
r0 |= r2;
|
||||
sprite->attrib1 = r0;
|
||||
|
||||
r2 = 0x3F0 << SPRITEOAM_SHIFT_TILENUM;
|
||||
r1 = sprite->attrib3;
|
||||
r0 = (u16)~SPRITEOAM_MASK_TILENUM;
|
||||
r0 &= r1;
|
||||
r0 |= r2;
|
||||
r0 &= 0xf3ff;
|
||||
r2 = 0xF;
|
||||
r4 = 0xF000;
|
||||
r0 &= 0xfff;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_PRIORITY;
|
||||
|
||||
r2 = (u16)~SPRITEOAM_MASK_UNK6_4;
|
||||
|
||||
r4 = 15 << SPRITEOAM_SHIFT_PALETTENUM;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_PALETTENUM;
|
||||
r0 |= r4;
|
||||
sprite->attrib3 = r0;
|
||||
|
||||
sprite->unk4 = r0;
|
||||
|
||||
sprite->unk2 = 0x70;
|
||||
sprite->attrib2 = 112; // Set x to 112. Set matrixNum/size to 0
|
||||
|
||||
r1 = 0x680;
|
||||
r1 = 104 << SPRITEOAM_SHIFT_UNK6_4;
|
||||
r2 &= sprite->unk6;
|
||||
r2 |= r1;
|
||||
sprite->unk6 = r2;
|
||||
|
||||
|
||||
gUnknown_203B364->unk1B0 = r5;
|
||||
ResetSprites(FALSE);
|
||||
}
|
||||
|
||||
void sub_80388C4(void) {
|
||||
if ((gUnknown_203B364->unk1B0 & 8) != 0) {
|
||||
AddSprite(&gUnknown_203B364->unk1A8, 0x100, 0, 0);
|
||||
}
|
||||
gUnknown_203B364->unk1B0++;
|
||||
void sub_80388C4(void)
|
||||
{
|
||||
if (gUnknown_203B364->unk1B0 & 8)
|
||||
AddSprite(&gUnknown_203B364->unk1A8, 0x100, NULL, NULL);
|
||||
|
||||
gUnknown_203B364->unk1B0++;
|
||||
}
|
||||
|
1109
src/sprite.c
1109
src/sprite.c
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "text_util.h"
|
||||
|
||||
#define NUM_POKEMON_TYPES 18
|
||||
|
||||
@ -107,8 +108,7 @@ u32 ReturnIntFromChar2(u8 r0)
|
||||
return r0;
|
||||
}
|
||||
|
||||
// Unused
|
||||
void sub_8092290(u8 *buffer, u8 *string)
|
||||
UNUSED static void sub_8092290(u8 *buffer, u8 *string)
|
||||
{
|
||||
while( *string != '\0' ) {
|
||||
*buffer++ = ReturnIntFromChar2(*string++);
|
||||
@ -116,7 +116,7 @@ void sub_8092290(u8 *buffer, u8 *string)
|
||||
*buffer = 0; // append a 0
|
||||
}
|
||||
|
||||
void sub_80922B4(u8 *buffer, u8 *string, s32 size)
|
||||
void sub_80922B4(u8 *buffer, const u8 *string, s32 size)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include "main_menu.h"
|
||||
#include "code_801C620.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "cpu.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern struct WonderMailStruct_203B2C4 *gUnknown_203B2C4;
|
||||
|
||||
@ -215,10 +217,7 @@ extern void SetThankYouMailMenuState(u32);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern void sub_802F204(struct unkStruct_802F204 *, u32);
|
||||
extern void sub_80151C0(u32, u8 *);
|
||||
extern void xxx_call_start_bg_music(void);
|
||||
extern void sub_803092C(void);
|
||||
extern void sub_8011830(void);
|
||||
extern void nullsub_23(u32);
|
||||
extern s32 sub_8037B28(u32);
|
||||
extern u32 sub_8030894(void);
|
||||
extern u32 sub_801D008(void);
|
||||
@ -1405,7 +1404,7 @@ void UpdateThankYouMailText(void)
|
||||
break;
|
||||
case COMMUNICATING_THANK_YOU_MAIL:
|
||||
// Communicating..
|
||||
nullsub_23(0);
|
||||
nullsub_23(FALSE);
|
||||
sub_80141B4(gUnknown_80DF544,0,0,0);
|
||||
break;
|
||||
case 0x17:
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include "menu_input.h"
|
||||
#include "text1.h"
|
||||
#include "text2.h"
|
||||
#include "cpu.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
EWRAM_DATA_2 struct TradeItemsMenu *gTradeItemsMenu = {0};
|
||||
|
||||
@ -87,9 +89,6 @@ extern void sub_8035C1C();
|
||||
|
||||
extern u32 sub_801D008();
|
||||
extern s32 sub_8037B28(u32);
|
||||
extern void sub_8011830(void);
|
||||
extern void nullsub_23(u32);
|
||||
extern void xxx_call_start_bg_music(void);
|
||||
extern s32 sub_80381F4(u32, void *, void *);
|
||||
extern s32 sub_8037D64(u32, void *, void *);
|
||||
|
||||
@ -633,7 +632,7 @@ void sub_8036B28(void)
|
||||
sub_8014248(gUnknown_80E6268,0,5,gUnknown_80E618C,0,4,0,0,0x101);
|
||||
break;
|
||||
case TRADE_ITEMS_IN_COMMUNICATION:
|
||||
nullsub_23(0);
|
||||
nullsub_23(FALSE);
|
||||
sub_80141B4(gUnknown_80E62C4,0,0,0);
|
||||
break;
|
||||
case 10:
|
||||
|
@ -5,14 +5,7 @@
|
||||
#include "menu.h"
|
||||
#include "text1.h"
|
||||
#include "menu_input.h"
|
||||
|
||||
struct unkSprite
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
};
|
||||
#include "sprite.h"
|
||||
|
||||
// Similar to RescuePasswordMenu
|
||||
struct unkStruct_203B360
|
||||
@ -22,7 +15,7 @@ struct unkStruct_203B360
|
||||
u32 unk4; // state
|
||||
struct MenuStruct unk8[4];
|
||||
struct UnkTextStruct2 unk148[4];
|
||||
struct unkSprite unk1A8;
|
||||
struct SpriteOAM unk1A8;
|
||||
u32 unk1B0; // sprite count?
|
||||
};
|
||||
|
||||
@ -61,8 +54,6 @@ ALIGNED(4) const u8 StorageEmpty_80E6EE4[] = _("{CENTER_ALIGN}The storage space
|
||||
ALIGNED(4) const u8 Caution_80E6F04[] = _("{CENTER_ALIGN}{COLOR_1 RED}Caution!{END_COLOR_TEXT_1} ");
|
||||
static const u8 fill0[] = "pksdir0";
|
||||
|
||||
|
||||
extern void AddSprite(struct unkSprite *, u32, u32, u32);
|
||||
extern void sub_8038440();
|
||||
extern void sub_80384D0();
|
||||
|
||||
@ -144,43 +135,52 @@ void sub_8038440(void)
|
||||
u32 r1;
|
||||
u32 r4;
|
||||
u32 r5;
|
||||
struct unkSprite *sprite;
|
||||
|
||||
struct SpriteOAM *sprite;
|
||||
|
||||
r5 = 0;
|
||||
sprite = &gUnknown_203B360->unk1A8;
|
||||
|
||||
r1 = sprite->unk0;
|
||||
r0 = 0xfeff;
|
||||
r1 = sprite->attrib1;
|
||||
r0 = (u16)~SPRITEOAM_MASK_AFFINEMODE1;
|
||||
r0 &= r1;
|
||||
r0 &= 0xfdff;
|
||||
r0 &= 0xf3ff;
|
||||
r0 &= 0xefff;
|
||||
r0 &= 0xdfff;
|
||||
r2 = 0x4000;
|
||||
r0 &= 0x3fff;
|
||||
r0 |= r2;
|
||||
sprite->unk0 = r0;
|
||||
|
||||
r2 = 0x3F0;
|
||||
r1 = sprite->unk4;
|
||||
r0 = 0xFC00;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_AFFINEMODE2;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_OBJMODE;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_MOSAIC;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_BPP;
|
||||
|
||||
r2 = 1 << SPRITEOAM_SHIFT_SHAPE;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_SHAPE;
|
||||
r0 |= r2;
|
||||
|
||||
sprite->attrib1 = r0;
|
||||
|
||||
r2 = 0x3F0 << SPRITEOAM_SHIFT_TILENUM;
|
||||
r1 = sprite->attrib3;
|
||||
r0 = (u16)~SPRITEOAM_MASK_TILENUM;
|
||||
r0 &= r1;
|
||||
r0 |= r2;
|
||||
r0 &= 0xf3ff;
|
||||
r2 = 0xF;
|
||||
r4 = 0xF000;
|
||||
r0 &= 0xfff;
|
||||
|
||||
r0 &= (u16)~SPRITEOAM_MASK_PRIORITY;
|
||||
|
||||
r2 = (u16)~SPRITEOAM_MASK_UNK6_4;
|
||||
|
||||
r4 = 15 << SPRITEOAM_SHIFT_PALETTENUM;
|
||||
r0 &= (u16)~SPRITEOAM_MASK_PALETTENUM;
|
||||
r0 |= r4;
|
||||
|
||||
sprite->unk4 = r0;
|
||||
|
||||
sprite->unk2 = 0x70;
|
||||
|
||||
r1 = 0x700;
|
||||
sprite->attrib3 = r0;
|
||||
|
||||
sprite->attrib2 = 112; // Set x to 112. Set matrixNum/size to 0
|
||||
|
||||
r1 = 112 << SPRITEOAM_SHIFT_UNK6_4;
|
||||
r2 &= sprite->unk6;
|
||||
r2 |= r1;
|
||||
sprite->unk6 = r2;
|
||||
|
||||
|
||||
gUnknown_203B360->unk1B0 = r5;
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ void sub_8038440(void)
|
||||
void sub_80384D0(void)
|
||||
{
|
||||
if ((gUnknown_203B360->unk1B0 & 8) != 0) {
|
||||
AddSprite(&gUnknown_203B360->unk1A8, 0x100, 0, 0);
|
||||
AddSprite(&gUnknown_203B360->unk1A8, 0x100, NULL, NULL);
|
||||
}
|
||||
gUnknown_203B360->unk1B0++;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "code_8021774_pre.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_8021774.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80DC534;
|
||||
extern struct UnkTextStruct2 gUnknown_80DC564;
|
||||
@ -38,7 +39,6 @@ extern const u8 *gUnknown_80D4978[];
|
||||
u8 sub_8021700(u32);
|
||||
void sub_8092578(u8 *buffer, u8 index, u8 r2);
|
||||
extern void sub_8022380(void);
|
||||
extern void PlaySound(u32);
|
||||
bool8 sub_8023144(s32 param_1, s32 index, struct UnkTextStruct2_sub *sub, u32 param_4);
|
||||
void sub_8023354(u8 param_1);
|
||||
extern bool8 sub_80023E4(u32);
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include "code_80130A8.h"
|
||||
#include "main_menu.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "cpu.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern struct WonderMailStruct_203B2C0 *gUnknown_203B2C0;
|
||||
|
||||
@ -56,15 +58,12 @@ extern void sub_8099690(u32);
|
||||
extern void sub_8031E10(void);
|
||||
extern void sub_803084C(void);
|
||||
extern void sub_8030DE4();
|
||||
extern void nullsub_23(u32);
|
||||
extern s32 sub_8037D64(u32, void *, void *);
|
||||
extern s32 sub_80381F4(u32, void *, void *);
|
||||
extern void sub_80306A8(u32, u32, u32, u32);
|
||||
extern s32 sub_8037B28(u32);
|
||||
extern void sub_8011830(void);
|
||||
extern void sub_8031D70(u8, u32);
|
||||
extern void sub_80151C0(u32, u8 *);
|
||||
extern void xxx_call_start_bg_music(void);
|
||||
extern u32 sub_8023CE8(void);
|
||||
extern u32 sub_8030894(void);
|
||||
extern void sub_8030F58(u32);
|
||||
@ -589,7 +588,7 @@ void sub_8028348(void)
|
||||
sub_8014248(gUnknown_80DDFB8, 0, 8, gUnknown_80DDA48, 0, 4, 0, &gUnknown_203B2C0->faceFile,0xC);
|
||||
break;
|
||||
case FRIEND_RESCUE_COMMUNICATING_PRE:
|
||||
nullsub_23(0);
|
||||
nullsub_23(FALSE);
|
||||
sub_80141B4(gUnknown_80DE01C, 0 , 0, 0);
|
||||
break;
|
||||
case FRIEND_RESCUE_COMMUNICATING:
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "code_802C39C.h"
|
||||
#include "menu_input.h"
|
||||
#include "wonder_mail_2_1.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
extern struct unkStruct_203B2F0 *gUnknown_203B2F0;
|
||||
extern struct unkStruct_203B2E8* gUnknown_203B2E8;
|
||||
@ -103,7 +104,6 @@ extern void CreateRescueTitle(struct unkStruct_802C39C *);
|
||||
|
||||
extern void sub_802C6DC(void);
|
||||
extern void DrawJobListMenu(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern bool8 IsPelipperBoardSlotEmpty(u8);
|
||||
extern void SetJobListState(u32);
|
||||
extern void sub_802CC00(void);
|
||||
|
@ -9,13 +9,13 @@
|
||||
#include "pokemon_mail.h"
|
||||
#include "wonder_mail.h"
|
||||
#include "code_802C39C.h"
|
||||
#include "menu_input.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
bool8 IsMailSlotEmpty(u8);
|
||||
extern s32 CountPelipperBoardSlots(void);
|
||||
extern void sub_802C328(void);
|
||||
extern void DrawPelipperBoardJobMenu(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern u8 HasNoPelipperBoardJobs(void);
|
||||
|
||||
extern struct WonderMail *GetPelipperBoardSlotInfo(u32);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "code_80958E8.h"
|
||||
#include "wonder_mail_2_1.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
const struct UnkTextStruct2 gUnknown_80DFDD4 =
|
||||
{
|
||||
@ -150,7 +151,6 @@ extern void CreateRescueTitle(struct unkStruct_802C39C *);
|
||||
extern u8 gUnknown_80DFDBC[];
|
||||
extern void sub_802CF5C(void);
|
||||
extern void sub_802CFD0(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
|
||||
extern void sub_802DF24(void);
|
||||
extern void SetJobListState(u32);
|
||||
@ -159,7 +159,6 @@ extern void ResetJobSlot(u8);
|
||||
extern u8 HasNoAcceptedJobs(void);
|
||||
u32 sub_802C598(u8 param_1);
|
||||
extern void sub_802C688(void);
|
||||
extern void PlaySound(u32);
|
||||
extern u8 GetPelipperBoardSlotIndex(void);
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80DFD8C;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "menu_input.h"
|
||||
#include "code_802C39C.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_803B344
|
||||
{
|
||||
@ -121,9 +122,7 @@ extern void PrintPokeNameToBuffer(u8 *buffer, struct PokemonStruct *pokemon);
|
||||
extern struct PokemonStruct *GetPlayerPokemonStruct(void);
|
||||
extern void sub_802F6FC(void);
|
||||
extern void ProceedToNextRewardSceneState(void);
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void sub_802F300(void);
|
||||
extern void PlaySound(u32);
|
||||
extern s32 sub_808D544(u32);
|
||||
extern u32 sub_801B60C(u32, u8, u8);
|
||||
extern void sub_8092578(u8 *buffer, u8 index, u8 r2);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "constants/wonder_mail.h"
|
||||
#include "code_802C39C.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80118A4.h"
|
||||
|
||||
struct unkStruct_203B320
|
||||
{
|
||||
@ -80,7 +81,6 @@ extern s32 sub_8030A74(void);
|
||||
extern void sub_80308A0(void);
|
||||
extern void sub_803092C(void);
|
||||
|
||||
extern void PlayMenuSoundEffect(u32);
|
||||
extern void CreateRescueTitle(struct unkStruct_802C39C *);
|
||||
|
||||
u32 sub_80306A8(u32 wonderMailType, u32 r1, struct UnkTextStruct2_sub *r2, u32 r3)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user