Merge remote-tracking branch 'refs/remotes/pret/master'

This commit is contained in:
Diegoisawesome 2017-03-04 23:32:12 -06:00
commit d12fd5c5ce
213 changed files with 57369 additions and 61524 deletions

4
.gitignore vendored
View File

@ -16,4 +16,8 @@ src/*.s
tools/*
*.map
*.ld
*.bat
*.dump
*.sa*
Thumbs.db
.DS_Store

View File

@ -93,7 +93,11 @@ $(C_OBJS): %.o : %.c
@echo -e ".text\n\t.align\t2, 0\n" >> $*.s
$(AS) $(ASFLAGS) -o $@ $*.s
%.o : dep = $(shell $(SCANINC) $*.s)
ifeq ($(NODEP),)
%.o: dep = $(shell $(SCANINC) $*.s)
else
%.o: dep :=
endif
$(ASM_OBJS): %.o: %.s $$(dep)
$(AS) $(ASFLAGS) -o $@ $<

130
asm/bard_music.s Normal file
View File

@ -0,0 +1,130 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_817C7DC
sub_817C7DC: @ 817C7DC
ldr r2, =gUnknown_0860A320
lsls r0, 2
adds r0, r2
ldr r0, [r0]
lsls r1, 1
adds r1, r0
movs r2, 0
ldrsh r0, [r1, r2]
bx lr
.pool
thumb_func_end sub_817C7DC
thumb_func_start sub_817C7F4
sub_817C7F4: @ 817C7F4
push {r4,r5,lr}
lsls r4, r0, 16
lsrs r5, r4, 16
adds r0, r5, 0
bl sub_811EB10
lsls r0, 24
cmp r0, 0
beq _0817C810
ldr r0, =gUnknown_0860A3AC
b _0817C84E
.pool
_0817C810:
lsrs r0, r4, 25
ldr r2, =0x000001ff
ands r2, r5
cmp r0, 0x13
bhi _0817C828
cmp r0, 0x12
bcs _0817C834
cmp r0, 0
beq _0817C82C
b _0817C83C
.pool
_0817C828:
cmp r0, 0x15
bne _0817C83C
_0817C82C:
ldr r1, =gUnknown_085F5494
b _0817C844
.pool
_0817C834:
ldr r1, =gUnknown_085FA1D8
b _0817C844
.pool
_0817C83C:
ldr r1, =gUnknown_0860A168
lsls r0, 2
adds r0, r1
ldr r1, [r0]
_0817C844:
lsls r0, r2, 1
adds r0, r2
lsls r0, 4
adds r1, r0
adds r0, r1, 0
_0817C84E:
pop {r4,r5}
pop {r1}
bx r1
.pool
thumb_func_end sub_817C7F4
thumb_func_start sub_817C858
sub_817C858: @ 817C858
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r5, r0, 0
lsls r1, 16
lsrs r7, r1, 16
movs r0, 0
strh r0, [r5, 0x4]
movs r6, 0
ldr r0, =gUnknown_0860A3DC
mov r8, r0
adds r4, r5, 0
adds r4, 0x18
_0817C872:
lsls r0, r6, 3
ldr r1, [r5, 0x30]
adds r2, r1, r0
ldrb r0, [r2]
cmp r0, 0xFF
beq _0817C8A0
movs r1, 0x1
ldrsb r1, [r2, r1]
lsls r0, 2
add r0, r8
ldr r0, [r0]
adds r1, r0
strh r1, [r4]
adds r0, r7, 0
adds r0, 0x1E
adds r1, r6, 0
bl sub_817C7DC
strh r0, [r4, 0x2]
ldrh r0, [r4]
ldrh r1, [r5, 0x4]
adds r0, r1
strh r0, [r5, 0x4]
_0817C8A0:
adds r4, 0x4
adds r6, 0x1
cmp r6, 0x5
ble _0817C872
movs r0, 0
strb r0, [r5, 0x1]
strh r0, [r5, 0xA]
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_817C858
.align 2, 0 @ Don't pad with nop.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4205
asm/battle_anim.s Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5832
asm/battle_anim_8170478.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -114,7 +114,7 @@ _0814E1B4:
.4byte _0814E4F8
.4byte _0814E55C
_0814E1CC:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r2, [r0]
movs r0, 0x8
ands r0, r2
@ -219,7 +219,7 @@ _0814E2AC:
lsls r0, 24
cmp r0, 0
bne _0814E310
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x1
ands r0, r1
@ -258,7 +258,7 @@ _0814E308:
b _0814E6D8
.pool
_0814E310:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x1
ands r0, r1
@ -333,7 +333,7 @@ _0814E394:
_0814E3BC:
cmp r2, 0x1
beq _0814E3CC
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x1
ands r0, r1
@ -357,7 +357,7 @@ _0814E3EC:
ldrh r1, [r0]
movs r0, 0x80
lsls r0, 4
ldr r2, =gUnknown_02022FEC
ldr r2, =gBattleTypeFlags
cmp r1, r0
beq _0814E406
ldr r0, [r2]
@ -395,7 +395,7 @@ _0814E430:
ldrb r2, [r0]
cmp r2, 0
beq _0814E456
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x1
ands r0, r1
@ -421,7 +421,7 @@ _0814E47C:
b _0814E6D8
.pool
_0814E488:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x02000002
ands r0, r1
@ -491,7 +491,7 @@ _0814E4F8:
adds r1, r2
ldr r2, =gUnknown_085CCBBC
adds r1, r2
bl CopyString
bl StringCopy
b _0814E544
.pool
_0814E534:
@ -501,7 +501,7 @@ _0814E534:
muls r1, r2
ldr r2, =gMoveNames
adds r1, r2
bl CopyString
bl StringCopy
_0814E544:
ldr r0, =gUnknown_02022F68
bl sub_814F950
@ -543,7 +543,7 @@ _0814E58A:
b _0814E6D8
.pool
_0814E5A4:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
@ -570,7 +570,7 @@ _0814E5C4:
eors r0, r1
strb r0, [r4]
_0814E5E0:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x40
ands r0, r1
@ -774,7 +774,7 @@ get_battle_strings: @ 814E764
mov r8, r1
movs r6, 0
movs r4, 0
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x80
lsls r1, 18
@ -872,7 +872,7 @@ _0814E8A0:
ldrb r0, [r5]
cmp r0, 0xFD
bne _0814E8B8
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
adds r0, r5, 0
b _0814E8F0
.pool
@ -891,7 +891,7 @@ _0814E8CE:
ldrb r0, [r1]
cmp r0, 0xFD
bne _0814E904
ldr r4, =gUnknown_02021DC4
ldr r4, =gStringVar2
b _0814E8EE
.pool
_0814E8E4:
@ -899,7 +899,7 @@ _0814E8E4:
ldrb r0, [r1]
cmp r0, 0xFD
bne _0814E904
ldr r4, =gUnknown_02021EC4
ldr r4, =gStringVar3
_0814E8EE:
adds r0, r1, 0
_0814E8F0:
@ -911,15 +911,15 @@ _0814E904:
adds r4, r1, 0
bl _0814F5C0
_0814E90A:
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
bl _0814F5C0
.pool
_0814E914:
ldr r4, =gUnknown_02021DC4
ldr r4, =gStringVar2
bl _0814F5C0
.pool
_0814E920:
ldr r4, =gUnknown_02021EC4
ldr r4, =gStringVar3
bl _0814F5C0
.pool
_0814E92C:
@ -932,13 +932,13 @@ _0814E92C:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814E960:
@ -951,13 +951,13 @@ _0814E960:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814E994:
@ -970,13 +970,13 @@ _0814E994:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814E9C8:
@ -989,13 +989,13 @@ _0814E9C8:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814E9FC:
@ -1011,13 +1011,13 @@ _0814E9FC:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EA38:
@ -1035,13 +1035,13 @@ _0814EA38:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EA78:
@ -1059,13 +1059,13 @@ _0814EA78:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EAB8:
@ -1083,13 +1083,13 @@ _0814EAB8:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EAF8:
@ -1100,7 +1100,7 @@ _0814EAF8:
adds r2, r4, 0
cmp r0, 0
beq _0814EB74
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -1134,11 +1134,11 @@ _0814EB36:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814EB9E
.pool
_0814EB74:
@ -1155,14 +1155,14 @@ _0814EB74:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814EB9E:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EBB0:
@ -1186,11 +1186,11 @@ _0814EBB0:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814EC24
.pool
_0814EBF8:
@ -1208,14 +1208,14 @@ _0814EBF8:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814EC24:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EC38:
@ -1225,7 +1225,7 @@ _0814EC38:
lsls r0, 24
cmp r0, 0
beq _0814ECA8
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -1237,7 +1237,7 @@ _0814EC56:
ldrb r1, [r4]
adds r0, r1, 0
ldr r3, =gUnknown_0202406E
ldr r2, =gUnknown_02024744
ldr r2, =gEnemyParty
mov r12, r2
adds r2, r5, 0
cmp r0, 0xFF
@ -1262,7 +1262,7 @@ _0814EC78:
add r0, r12
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814ECC2
.pool
_0814ECA8:
@ -1273,24 +1273,24 @@ _0814ECA8:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814ECC2:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814ECD4:
ldr r5, =gUnknown_0202420C
ldr r5, =gEnemyMonIndex
ldrb r0, [r5]
bl battle_side_get_owner
lsls r0, 24
cmp r0, 0
beq _0814ED44
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -1302,7 +1302,7 @@ _0814ECF2:
ldrb r1, [r4]
adds r0, r1, 0
ldr r3, =gUnknown_0202406E
ldr r2, =gUnknown_02024744
ldr r2, =gEnemyParty
mov r12, r2
adds r2, r5, 0
cmp r0, 0xFF
@ -1327,7 +1327,7 @@ _0814ED14:
add r0, r12
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814ED5E
.pool
_0814ED44:
@ -1338,14 +1338,14 @@ _0814ED44:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814ED5E:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814ED70:
@ -1355,7 +1355,7 @@ _0814ED70:
lsls r0, 24
cmp r0, 0
beq _0814EDE0
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -1367,7 +1367,7 @@ _0814ED8E:
ldrb r1, [r4]
adds r0, r1, 0
ldr r3, =gUnknown_0202406E
ldr r2, =gUnknown_02024744
ldr r2, =gEnemyParty
mov r12, r2
adds r2, r5, 0
cmp r0, 0xFF
@ -1392,7 +1392,7 @@ _0814EDB0:
add r0, r12
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814EDFA
.pool
_0814EDE0:
@ -1403,14 +1403,14 @@ _0814EDE0:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814EDFA:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
bl _0814F5BE
.pool
_0814EE0C:
@ -1420,7 +1420,7 @@ _0814EE0C:
lsls r0, 24
cmp r0, 0
beq _0814EE7C
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -1432,7 +1432,7 @@ _0814EE2A:
ldrb r1, [r4]
adds r0, r1, 0
ldr r3, =gUnknown_0202406E
ldr r2, =gUnknown_02024744
ldr r2, =gEnemyParty
mov r12, r2
adds r2, r5, 0
cmp r0, 0xFF
@ -1457,7 +1457,7 @@ _0814EE4C:
add r0, r12
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814EE96
.pool
_0814EE7C:
@ -1468,14 +1468,14 @@ _0814EE7C:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814EE96:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
b _0814F5BE
.pool
_0814EEA8:
@ -1485,7 +1485,7 @@ _0814EEA8:
lsls r0, 24
cmp r0, 0
beq _0814EF18
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -1497,7 +1497,7 @@ _0814EEC6:
ldrb r1, [r4]
adds r0, r1, 0
ldr r3, =gUnknown_0202406E
ldr r2, =gUnknown_02024744
ldr r2, =gEnemyParty
mov r12, r2
adds r2, r5, 0
cmp r0, 0xFF
@ -1522,7 +1522,7 @@ _0814EEE8:
add r0, r12
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814EF32
.pool
_0814EF18:
@ -1533,14 +1533,14 @@ _0814EF18:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814EF32:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
b _0814F5BE
.pool
_0814EF44:
@ -1583,7 +1583,7 @@ _0814EF8A:
b _0814F5C0
.pool
_0814EF98:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x02000002
ands r0, r1
@ -1625,10 +1625,10 @@ _0814EFEC:
ldr r0, =gUnknown_02024404
adds r1, r0
mov r0, sp
bl CopyString
bl StringCopy
ldr r1, =gUnknown_085CC0AD
mov r0, sp
bl AppendString
bl StringAppend
b _0814F5BE
.pool
_0814F014:
@ -1651,10 +1651,10 @@ _0814F014:
ldr r0, =gUnknown_02024404
adds r1, r0
mov r0, sp
bl CopyString
bl StringCopy
ldr r1, =gUnknown_085CC0AD
mov r0, sp
bl AppendString
bl StringAppend
b _0814F5BE
.pool
_0814F05C:
@ -1684,7 +1684,7 @@ _0814F088:
.pool
_0814F098:
ldr r1, =gUnknown_0203ABA4
ldr r0, =gUnknown_0202420C
ldr r0, =gEnemyMonIndex
b _0814F0BC
.pool
_0814F0A8:
@ -1709,7 +1709,7 @@ _0814F0C0:
b _0814F5C0
.pool
_0814F0D8:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x80
lsls r0, 20
@ -1775,7 +1775,7 @@ _0814F14E:
b _0814F5A2
.pool
_0814F164:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x80
lsls r0, 20
@ -1804,7 +1804,7 @@ _0814F178:
ldr r0, [r0]
ldrb r1, [r0, 0xD]
mov r0, sp
bl StopMusicWhileStringIsPrinted
bl ConvertInternationalString
b _0814F5BE
.pool
_0814F1AC:
@ -1922,7 +1922,7 @@ _0814F284:
b _0814F5C0
.pool
_0814F298:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x80
lsls r1, 17
@ -1933,12 +1933,12 @@ _0814F298:
b _0814F5C0
.pool
_0814F2B4:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r4, [r0]
b _0814F5C0
.pool
_0814F2C0:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x003f0100
ands r0, r1
@ -1965,7 +1965,7 @@ _0814F2F8:
adds r4, r0, 0
b _0814F5C0
_0814F300:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x003f0100
ands r0, r1
@ -1992,7 +1992,7 @@ _0814F330:
lsls r0, 24
cmp r0, 0
beq _0814F39C
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
movs r0, 0x8
ands r1, r0
@ -2003,7 +2003,7 @@ _0814F330:
_0814F34E:
ldrb r1, [r4]
adds r0, r1, 0
ldr r5, =gUnknown_02024744
ldr r5, =gEnemyParty
mov r12, r5
ldr r2, =gUnknown_0202449C
cmp r0, 0xFF
@ -2027,7 +2027,7 @@ _0814F36E:
add r0, r12
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814F3B4
.pool
_0814F39C:
@ -2037,14 +2037,14 @@ _0814F39C:
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814F3B4:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
b _0814F5BE
.pool
_0814F3C4:
@ -2064,7 +2064,7 @@ _0814F3E4:
b _0814F3EE
.pool
_0814F3EC:
ldr r0, =gUnknown_0202420C
ldr r0, =gEnemyMonIndex
_0814F3EE:
ldrb r0, [r0]
bl battle_side_get_owner
@ -2082,7 +2082,7 @@ _0814F410:
b _0814F41A
.pool
_0814F418:
ldr r0, =gUnknown_0202420C
ldr r0, =gEnemyMonIndex
_0814F41A:
ldrb r0, [r0]
bl battle_side_get_owner
@ -2100,7 +2100,7 @@ _0814F43C:
b _0814F446
.pool
_0814F444:
ldr r0, =gUnknown_0202420C
ldr r0, =gEnemyMonIndex
_0814F446:
ldrb r0, [r0]
bl battle_side_get_owner
@ -2114,7 +2114,7 @@ _0814F456:
b _0814F5C0
.pool
_0814F468:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x003f0100
ands r0, r1
@ -2147,7 +2147,7 @@ _0814F49C:
b _0814F5A2
.pool
_0814F4B8:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x003f0100
ands r0, r1
@ -2179,7 +2179,7 @@ _0814F4F0:
b _0814F5C0
.pool
_0814F508:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x003f0100
ands r0, r1
@ -2206,7 +2206,7 @@ _0814F540:
adds r4, r0, 0
b _0814F5C0
_0814F548:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r0, =0x003f0100
ands r0, r1
@ -2218,7 +2218,7 @@ _0814F556:
movs r0, 0x1
_0814F55A:
bl sub_81A36D0
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
b _0814F5C0
.pool
_0814F574:
@ -2233,7 +2233,7 @@ _0814F580:
movs r0, 0x3
_0814F584:
bl sub_81D572C
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
b _0814F5C0
.pool
_0814F594:
@ -2437,7 +2437,7 @@ _0814F706:
adds r0, r6, 0
mov r1, r8
movs r2, 0
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r5, 0x3
ldrb r4, [r4, 0x1]
adds r5, r0, r4
@ -2471,15 +2471,15 @@ _0814F744:
ldrb r1, [r4, 0x2]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
b _0814F7A4
.pool
_0814F768:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
@ -2487,29 +2487,29 @@ _0814F768:
beq _0814F788
ldr r1, =gUnknown_085CBD8B
adds r0, r6, 0
bl AppendString
bl StringAppend
b _0814F790
.pool
_0814F788:
ldr r1, =gUnknown_085CBD85
adds r0, r6, 0
bl AppendString
bl StringAppend
_0814F790:
adds r0, r5, r7
ldrb r1, [r0, 0x2]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
_0814F7A4:
mov r0, sp
bl GetStringEnd_Limit7
bl StringGetEnd10
adds r0, r6, 0
mov r1, sp
bl AppendString
bl StringAppend
b _0814F8DE
.pool
_0814F7BC:
@ -2540,25 +2540,25 @@ _0814F7E2:
ldrb r1, [r4, 0x2]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x2
adds r2, r6, 0
bl pokemon_getattr
bl GetMonData
b _0814F81A
.pool
_0814F808:
ldrb r1, [r4, 0x2]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0x2
adds r2, r6, 0
bl pokemon_getattr
bl GetMonData
_0814F81A:
adds r0, r6, 0
bl GetStringEnd_Limit7
bl StringGetEnd10
b _0814F8DE
.pool
_0814F828:
@ -2580,7 +2580,7 @@ _0814F846:
adds r1, r0
_0814F848:
adds r0, r6, 0
bl AppendString
bl StringAppend
adds r5, 0x2
b _0814F8E0
.pool
@ -2590,7 +2590,7 @@ _0814F858:
ldrb r0, [r0, 0x2]
lsls r0, 8
orrs r2, r0
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
ldr r1, =0x02000002
ands r0, r1
@ -2617,7 +2617,7 @@ _0814F858:
ldr r0, =gUnknown_02024404
adds r1, r0
adds r0, r6, 0
bl CopyString
bl StringCopy
ldr r1, =gUnknown_085CC0AD
b _0814F8BE
.pool
@ -2625,7 +2625,7 @@ _0814F8BC:
ldr r1, =gUnknown_085CC0A0
_0814F8BE:
adds r0, r6, 0
bl AppendString
bl StringAppend
b _0814F8DE
.pool
_0814F8CC:
@ -2681,7 +2681,7 @@ _0814F918:
bgt _0814F938
ldr r1, =gUnknown_085CCBB5
adds r0, r4, 0
bl CopyString
bl StringCopy
b _0814F944
.pool
_0814F938:
@ -2689,7 +2689,7 @@ _0814F938:
bgt _0814F944
ldr r1, =gUnknown_085CCBB9
adds r0, r4, 0
bl CopyString
bl StringCopy
_0814F944:
pop {r4,r5}
pop {r0}
@ -2759,13 +2759,13 @@ _0814F9C8:
ldr r1, =gUnknown_085CBDBD
_0814F9CA:
adds r0, r3, 0
bl CopyString
bl StringCopy
b _0814F9E0
.pool
_0814F9D8:
ldr r1, =gUnknown_085CBDBF
adds r0, r3, 0
bl CopyString
bl StringCopy
_0814F9E0:
pop {r4,r5}
pop {r0}
@ -2898,7 +2898,7 @@ _0814FAE0:
_0814FAE8:
strb r1, [r0]
adds r3, r0, 0
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r1, [r0]
ldr r2, =0x01000002
ands r1, r2

View File

@ -80,7 +80,7 @@ _0813C014:
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0x7
bl CompareString_LimitN
bl StringCompareN
cmp r0, 0
bne _0813C02C
ldrh r0, [r4, 0x8]
@ -307,7 +307,7 @@ sub_813C170: @ 813C170
adds r0, r4, 0
mov r1, r8
movs r2, 0x7
bl CopyString_LimitN
bl StringCopyN
strh r7, [r4, 0x8]
adds r2, r6, 0
adds r2, 0x54
@ -339,7 +339,7 @@ _0813C1D4:
thumb_func_start sub_813C1F8
sub_813C1F8: @ 813C1F8
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003150
adds r0, r1
@ -433,7 +433,7 @@ sub_813C2A0: @ 813C2A0
beq _0813C2DA
adds r0, r4, 0
bl sub_813C264
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003150
adds r0, r1
@ -463,34 +463,34 @@ _0813C2DA:
sub_813C2F4: @ 813C2F4
push {r4,lr}
sub sp, 0xC
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
movs r0, 0x17
bl sub_80847F8
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
movs r3, 0x4
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar2
movs r0, 0x18
bl sub_80847F8
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
movs r3, 0x4
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021EC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar3
movs r0, 0x19
bl sub_80847F8
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
movs r3, 0x4
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EF6A1
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
adds r1, r4, 0
movs r2, 0xD0
@ -576,17 +576,17 @@ sub_813C384: @ 813C384
b _0813C4A8
.pool
_0813C40C:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r1, 0x8
bl RepeatStringTerminator
ldr r0, =gUnknown_02021CC4
bl StringFillWithTerminator
ldr r0, =gStringVar1
adds r1, r6, 0
movs r2, 0x7
bl CopyString_LimitN
bl StringCopyN
lsls r1, r5, 24
lsrs r1, 24
ldr r0, =gUnknown_02021CC4
bl StopMusicWhileStringIsPrinted
ldr r0, =gStringVar1
bl ConvertInternationalString
ldr r0, =gUnknown_0203AB74
mov r8, r0
ldrb r0, [r0]
@ -599,49 +599,49 @@ _0813C40C:
str r5, [sp, 0x4]
str r5, [sp, 0x8]
movs r1, 0x1
ldr r2, =gUnknown_02021CC4
ldr r2, =gStringVar1
movs r3, 0x8
bl Print
ldrh r1, [r6, 0xA]
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r2, 0x1
movs r3, 0x4
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
mov r1, r8
ldrb r0, [r1]
str r4, [sp]
str r5, [sp, 0x4]
str r5, [sp, 0x8]
movs r1, 0x1
ldr r2, =gUnknown_02021CC4
ldr r2, =gStringVar1
movs r3, 0x50
bl Print
ldrh r1, [r6, 0xC]
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r2, 0x1
movs r3, 0x4
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
mov r1, r8
ldrb r0, [r1]
str r4, [sp]
str r5, [sp, 0x4]
str r5, [sp, 0x8]
movs r1, 0x1
ldr r2, =gUnknown_02021CC4
ldr r2, =gStringVar1
movs r3, 0x80
bl Print
ldrh r1, [r6, 0xE]
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r2, 0x1
movs r3, 0x4
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
mov r1, r8
ldrb r0, [r1]
str r4, [sp]
str r5, [sp, 0x4]
str r5, [sp, 0x8]
movs r1, 0x1
ldr r2, =gUnknown_02021CC4
ldr r2, =gStringVar1
movs r3, 0xB0
bl Print
_0813C4A8:
@ -671,10 +671,10 @@ sub_813C4BC: @ 813C4BC
ldrb r0, [r6]
movs r1, 0x11
bl FillWindowPixelBuffer
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
ldr r1, =gUnknown_085EF68D
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
adds r1, r5, 0
movs r2, 0xD0
@ -690,7 +690,7 @@ sub_813C4BC: @ 813C4BC
str r4, [sp, 0x8]
adds r2, r5, 0
bl Print
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r8, r0
ldr r0, [r0]
ldr r1, =0x00003150
@ -699,7 +699,7 @@ sub_813C4BC: @ 813C4BC
bl sub_813C2F4
ldr r1, =gUnknown_085EF6BD
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldrb r0, [r6]
movs r1, 0x29
str r1, [sp]

View File

@ -111,10 +111,10 @@ sub_80B06BC: @ 80B06BC
bl script_env_2_enable
bl player_bitmagic
bl sub_808BCF4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0AF8
str r0, [r1, 0x8]
ldr r4, =gUnknown_02022FEC
ldr r4, =gBattleTypeFlags
movs r0, 0
str r0, [r4]
bl InBattlePyramid
@ -153,10 +153,10 @@ sub_80B072C: @ 80B072C
bl script_env_2_enable
bl player_bitmagic
bl sub_808BCF4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0AF8
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x80
lsls r0, 3
str r0, [r1]
@ -182,10 +182,10 @@ sub_80B077C: @ 80B077C
bl script_env_2_enable
bl player_bitmagic
bl sub_808BCF4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80FC190
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x80
str r0, [r1]
bl sub_80B0EC8
@ -204,10 +204,10 @@ sub_80B07B4: @ 80B07B4
bl script_env_2_enable
bl player_bitmagic
bl sub_808BCF4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0AF8
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x80
lsls r0, 13
str r0, [r1]
@ -278,16 +278,16 @@ _080B0856:
thumb_func_start sub_80B086C
sub_80B086C: @ 80B086C
push {lr}
ldr r0, =gUnknown_02024744
ldr r0, =gEnemyParty
movs r1, 0xC4
lsls r1, 1
movs r2, 0x5
bl sub_8067FF8
bl script_env_2_enable
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =c2_exit_to_overworld_1_continue_scripts_restart_music
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x80
lsls r0, 2
str r0, [r1]
@ -303,10 +303,10 @@ sub_80B086C: @ 80B086C
sub_80B08A8: @ 80B08A8
push {lr}
bl script_env_2_enable
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0B6C
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0
str r0, [r1]
bl sub_80B0EC8
@ -329,10 +329,10 @@ sub_80B08A8: @ 80B08A8
sub_80B08EC: @ 80B08EC
push {lr}
bl script_env_2_enable
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0B6C
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x80
lsls r0, 6
str r0, [r1]
@ -356,17 +356,17 @@ sub_80B08EC: @ 80B08EC
sub_80B0934: @ 80B0934
push {r4,lr}
bl script_env_2_enable
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0B6C
str r0, [r1, 0x8]
ldr r4, =gUnknown_02022FEC
ldr r4, =gBattleTypeFlags
movs r0, 0x80
lsls r0, 6
str r0, [r4]
ldr r0, =gUnknown_02024744
ldr r0, =gEnemyParty
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
movs r0, 0xCA
lsls r0, 1
@ -396,7 +396,7 @@ _080B0988:
cmp r1, r0
beq _080B09E4
_080B099A:
ldr r2, =gUnknown_02022FEC
ldr r2, =gBattleTypeFlags
ldr r0, [r2]
movs r1, 0x80
lsls r1, 21
@ -458,14 +458,14 @@ _080B09FE:
sub_80B0A18: @ 80B0A18
push {lr}
bl script_env_2_enable
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0B6C
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0xC0
lsls r0, 6
str r0, [r1]
ldr r0, =gUnknown_82E9530
ldr r0, =gGameVersion
ldrb r0, [r0]
cmp r0, 0x2
bne _080B0A50
@ -495,16 +495,16 @@ _080B0A5A:
sub_80B0A74: @ 80B0A74
push {lr}
bl script_env_2_enable
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B0B6C
str r0, [r1, 0x8]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0xC0
lsls r0, 7
str r0, [r1]
ldr r0, =gUnknown_02024744
ldr r0, =gEnemyParty
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r1, r0, 16
adds r2, r1, 0
@ -775,7 +775,7 @@ _080B0CF2:
movs r0, 0x4
b _080B0D1A
_080B0CF6:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrh r1, [r0, 0x4]
movs r0, 0xE0
@ -862,11 +862,11 @@ _080B0D92:
movs r0, 0x64
adds r1, r6, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0x41
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
movs r0, 0xCE
lsls r0, 1
@ -876,12 +876,12 @@ _080B0D92:
beq _080B0DD6
adds r0, r4, 0
movs r1, 0x39
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _080B0DD6
adds r0, r4, 0
movs r1, 0x38
bl pokemon_getattr
bl GetMonData
adds r0, r7, r0
lsls r0, 24
lsrs r7, r0, 24
@ -1034,9 +1034,9 @@ sub_80B0EC8: @ 80B0EC8
lsls r0, 24
lsrs r5, r0, 24
adds r6, r5, 0
ldr r0, =gUnknown_02024744
ldr r0, =gEnemyParty
movs r1, 0x38
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
@ -1195,9 +1195,9 @@ _080B1000:
sub_80B100C: @ 80B100C
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, =gUnknown_02024744
ldr r0, =gEnemyParty
movs r1, 0x38
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
@ -1222,7 +1222,7 @@ _080B1040:
b _080B1120
_080B1048:
ldr r4, =gUnknown_0854FEA4
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x3
@ -1230,7 +1230,7 @@ _080B1048:
.pool
_080B105C:
ldr r4, =gUnknown_0854FEA7
bl GenerateRandomNumber
bl Random
ands r5, r0
lsls r0, r5, 16
b _080B111A
@ -1243,7 +1243,7 @@ _080B106C:
cmp r0, 0x3
beq _080B10EC
ldr r4, =gUnknown_0854FE98
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
b _080B1112
@ -1263,7 +1263,7 @@ _080B109E:
b _080B1120
_080B10A6:
ldr r4, =gUnknown_0854FEA4
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x3
@ -1271,7 +1271,7 @@ _080B10A6:
.pool
_080B10B8:
ldr r4, =gUnknown_0854FEA7
bl GenerateRandomNumber
bl Random
ands r5, r0
lsls r0, r5, 16
b _080B111A
@ -1284,13 +1284,13 @@ _080B10C8:
cmp r0, 0x3
beq _080B10EC
ldr r4, =gUnknown_0854FE98
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
b _080B1112
.pool
_080B10EC:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldr r2, =0x00000cb2
adds r0, r1, r2
@ -1330,7 +1330,7 @@ sub_80B1138: @ 80B1138
push {lr}
ldr r0, =set_256color_bg_bg0
bl SetMainCallback2
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B1158
str r0, [r1, 0x8]
pop {r0}
@ -1380,10 +1380,10 @@ sub_80B11A8: @ 80B11A8
lsrs r0, 24
cmp r0, 0x1
bne _080B11F0
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x10
str r0, [r1]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B1204
str r0, [r1, 0x8]
bl FreeAllWindowBuffers
@ -1673,7 +1673,7 @@ battle_80801F0: @ 80B13F8
strh r1, [r0]
lsls r0, r1, 24
lsrs r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
ldrb r1, [r2, 0x5]
ldrb r2, [r2, 0x4]
@ -2104,12 +2104,12 @@ sub_80B17E0: @ 80B17E0
ldrb r0, [r0]
cmp r0, 0x2
bne _080B17FC
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
ldr r0, =0x00008009
b _080B1800
.pool
_080B17FC:
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x8
_080B1800:
str r0, [r1]
@ -2120,7 +2120,7 @@ _080B1800:
ldr r0, =0x0000400e
movs r1, 0
bl VarSet
ldr r2, =gUnknown_02022FEC
ldr r2, =gBattleTypeFlags
ldr r0, [r2]
movs r1, 0x80
lsls r1, 14
@ -2166,7 +2166,7 @@ _080B1884:
lsls r0, 24
cmp r0, 0
beq _080B18B8
ldr r2, =gUnknown_02022FEC
ldr r2, =gBattleTypeFlags
ldr r0, [r2]
movs r1, 0x80
lsls r1, 19
@ -2195,7 +2195,7 @@ _080B18B8:
ldr r1, =gUnknown_03006080
movs r0, 0
strh r0, [r1]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B1918
str r0, [r1, 0x8]
bl InBattlePyramid
@ -2308,10 +2308,10 @@ _080B19E2:
thumb_func_start sub_80B19EC
sub_80B19EC: @ 80B19EC
push {lr}
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x8
str r0, [r1]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B1994
str r0, [r1, 0x8]
bl task_add_01_battle_start_with_music_and_stats
@ -2633,11 +2633,11 @@ _080B1CBC:
ldr r0, =gUnknown_02038BDC
ldr r0, [r0]
_080B1CC0:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
bl ReturnEmptyStringIfNull
adds r1, r0, 0
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
adds r0, r4, 0
pop {r4}
pop {r1}
@ -2648,13 +2648,13 @@ _080B1CC0:
thumb_func_start sub_80B1CE0
sub_80B1CE0: @ 80B1CE0
push {r4,lr}
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r0, =gUnknown_02038BE0
ldr r0, [r0]
bl ReturnEmptyStringIfNull
adds r1, r0, 0
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
adds r0, r4, 0
pop {r4}
pop {r1}
@ -2801,7 +2801,7 @@ _080B1DCE:
cmp r0, 0
bne _080B1DCA
_080B1DE2:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000009ca
adds r0, r1
@ -2841,7 +2841,7 @@ _080B1E1A:
bl sub_80B1D94
cmp r0, 0
bne _080B1E74
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000009ca
adds r0, r1
@ -2858,7 +2858,7 @@ _080B1E1A:
lsls r0, 24
cmp r0, 0
beq _080B1E74
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x64
@ -2920,7 +2920,7 @@ sub_80B1EC0: @ 80B1EC0
movs r1, 0
adds r3, r0, 0
adds r3, 0xA
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
_080B1ED2:
ldrh r0, [r3]
cmp r0, r4
@ -2994,7 +2994,7 @@ sub_80B1F38: @ 80B1F38
beq _080B1F6C
cmp r1, 0x63
bgt _080B1F6C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x000009ca
adds r0, r2
@ -3025,7 +3025,7 @@ sub_80B1F74: @ 80B1F74
beq _080B1FA8
cmp r1, 0x63
bgt _080B1FA8
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x000009ca
adds r0, r2
@ -3153,7 +3153,7 @@ sub_80B205C: @ 80B205C
negs r0, r0
cmp r1, r0
beq _080B207E
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x000009ca
adds r0, r2
@ -3284,7 +3284,7 @@ sub_80B215C: @ 80B215C
bl sub_80B2128
cmp r0, 0
beq _080B2184
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x000009c8
adds r1, r0, r2
@ -3309,7 +3309,7 @@ sub_80B2188: @ 80B2188
bl sub_80B2128
cmp r0, 0
beq _080B21AC
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000009c8
adds r0, r1
@ -3342,7 +3342,7 @@ sub_80B21B4: @ 80B21B4
bl sub_80B1DFC
cmp r0, 0x1
bne _080B21E0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000009c8
adds r0, r1

View File

@ -10,7 +10,7 @@ sub_8145EF4: @ 8145EF4
push {lr}
lsls r0, 24
lsrs r0, 24
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldr r1, =sub_8085E50
str r1, [r2, 0x4]
bl sub_8145F6C
@ -665,7 +665,7 @@ sub_8146420: @ 8146420
_08146448:
lsrs r0, r4, 8
asrs r1, r7, 16
bl sine
bl Sin
ldr r1, =gUnknown_02038C28
lsls r2, r5, 1
adds r2, r1
@ -2094,7 +2094,7 @@ sub_8147018: @ 8147018
adds r0, r4, 0
movs r2, 0xA
bl memcpy
bl GenerateRandomNumber
bl Random
movs r5, 0x1
ands r5, r0
movs r1, 0
@ -3042,7 +3042,7 @@ _081477E4:
_081477E8:
lsrs r0, r4, 8
asrs r1, r7, 16
bl sine
bl Sin
ldr r1, =gUnknown_02038C28
lsls r2, r5, 1
adds r2, r1
@ -3250,7 +3250,7 @@ sub_814797C: @ 814797C
_081479A4:
adds r0, r5, 0
movs r1, 0x28
bl sine
bl Sin
ldrh r1, [r4, 0xA]
adds r0, r1
lsls r0, 16
@ -3575,7 +3575,7 @@ sub_8147C24: @ 8147C24
movs r2, 0x20
bl LoadPalette
ldr r1, =gUnknown_085C8FF0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
lsls r0, 2
@ -3652,7 +3652,7 @@ sub_8147CE4: @ 8147CE4
_08147CFE:
adds r0, r5, 0
movs r1, 0x10
bl sine
bl Sin
ldrh r1, [r4, 0xC]
adds r0, r1
lsls r0, 16
@ -3683,7 +3683,7 @@ _08147D1E:
_08147D38:
adds r0, r5, 0
movs r1, 0x10
bl sine
bl Sin
ldrh r1, [r4, 0xE]
subs r1, r0
lsls r1, 16
@ -4293,7 +4293,7 @@ sub_8148218: @ 8148218
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x22]
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
bl sub_806F000
@ -5733,7 +5733,7 @@ _08148E08:
lsls r1, 16
asrs r1, 16
adds r0, r2, 0
bl sine
bl Sin
ldrh r2, [r4, 0xA]
adds r0, r2
strh r0, [r4, 0xA]
@ -7938,7 +7938,7 @@ _08149FD0:
ands r0, r4
mov r2, r8
asrs r1, r2, 16
bl sine
bl Sin
lsls r1, r6, 1
add r1, r10
add r0, r9
@ -8000,13 +8000,13 @@ _0814A04C:
asrs r0, r5, 16
mov r10, r0
ldr r1, [sp, 0x4]
bl sine
bl Sin
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
mov r0, r10
ldr r1, [sp, 0x4]
bl cosine
bl Cos
ldr r2, [sp]
lsls r1, r2, 16
asrs r1, 16
@ -8071,7 +8071,7 @@ _0814A0B8:
lsls r0, 16
asrs r0, 16
ldr r1, [sp, 0x4]
bl cosine
bl Cos
lsls r0, 16
asrs r0, 16
ldr r2, [sp, 0x8]
@ -8717,7 +8717,7 @@ _0814A5E0:
_0814A5E4:
lsrs r0, r6, 8
asrs r1, r7, 16
bl sine
bl Sin
ldr r1, =gUnknown_02038C28
lsls r2, r5, 1
adds r2, r1
@ -9526,7 +9526,7 @@ sub_814AC38: @ 814AC38
bl CreateTask
lsls r0, 24
lsrs r5, r0, 24
bl GenerateRandomNumber
bl Random
lsls r0, 16
movs r1, 0xC0
lsls r1, 10

View File

@ -12,7 +12,7 @@ sub_80E15B8: @ 80E15B8
mov r1, sp
movs r0, 0
strh r0, [r1]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x000031f8
adds r1, r0
@ -29,7 +29,7 @@ sub_80E15B8: @ 80E15B8
sub_80E15E4: @ 80E15E4
push {r4,lr}
adds r4, r0, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000031f8
adds r3, r0, r1
@ -69,7 +69,7 @@ _080E1618:
thumb_func_start sub_80E162C
sub_80E162C: @ 80E162C
push {r4,lr}
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r1, [r4]
ldr r2, =0x0000320c
adds r0, r1, r2
@ -112,7 +112,7 @@ GetBerryInfo: @ 80E167C
bl sub_80E162C
cmp r0, 0
beq _080E16A0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000031f8
b _080E16B4
@ -141,7 +141,7 @@ _080E16B4:
@ struct BerryTreeInfo *GetBerryTreeInfo(u8 berryTreeId)
GetBerryTreeInfo: @ 80E16C0
lsls r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
lsrs r0, 21
ldr r2, =0x0000169c
adds r0, r2
@ -261,7 +261,7 @@ _080E178E:
RemoveAllBerryTrees: @ 80E1794
push {r4-r6,lr}
movs r2, 0
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
ldr r5, =0x0000169c
ldr r0, =gUnknown_0858ABD0
ldr r3, [r0]
@ -378,7 +378,7 @@ BerryTreeTimeUpdate: @ 80E1870
adds r6, r0, 0
movs r2, 0
_080E1876:
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
lsls r0, r2, 3
ldr r3, =0x0000169c
adds r0, r3
@ -518,7 +518,7 @@ _080E197A:
@ void RemoveBerryTree(u8 berryTreeId)
RemoveBerryTree: @ 80E1984
lsls r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
lsrs r0, 21
adds r2, r0
@ -537,7 +537,7 @@ RemoveBerryTree: @ 80E1984
@ u8 GetBerryTypeByBerryTreeId(u8 berryTreeId)
GetBerryTypeByBerryTreeId: @ 80E19AC
lsls r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
lsrs r0, 21
adds r1, r0
@ -552,7 +552,7 @@ GetBerryTypeByBerryTreeId: @ 80E19AC
@ u8 GetStageByBerryTreeId(u8 berryTreeId)
GetStageByBerryTreeId: @ 80E19C8
lsls r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
lsrs r0, 21
adds r1, r0
@ -738,7 +738,7 @@ _080E1AFA:
muls r5, r0
adds r4, r1, 0
muls r4, r2
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
subs r4, r5
@ -793,7 +793,7 @@ CalcBerryYield: @ 80E1B38
@ u8 GetBerryCountByBerryTreeId(u8 berryTreeId)
GetBerryCountByBerryTreeId: @ 80E1B64
lsls r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
lsrs r0, 21
adds r1, r0
@ -838,7 +838,7 @@ FieldObjectInteractionGetBerryTreeData: @ 80E1B94
bl ResetBerryTreeSparkleFlag
ldr r0, =gUnknown_020375F2
ldrb r0, [r0]
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
ldrb r1, [r2, 0x5]
ldrb r2, [r2, 0x4]
@ -871,7 +871,7 @@ _080E1BEE:
lsls r0, 24
lsrs r0, 24
strh r0, [r4]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
ldrh r2, [r4]
adds r0, r6, 0
bl GetBerryCountStringByBerryType
@ -893,7 +893,7 @@ FieldObjectInteractionGetBerryName: @ 80E1C2C
bl GetBerryTypeByBerryTreeId
lsls r0, 24
lsrs r0, 24
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl GetBerryNameByBerryType
pop {r0}
bx r0
@ -920,7 +920,7 @@ FieldObjectInteractionGetBerryCountString: @ 80E1C54
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
adds r0, r5, 0
bl GetBerryCountStringByBerryType
pop {r4,r5}
@ -1013,7 +1013,7 @@ FieldObjectInteractionRemoveBerryTree: @ 80E1D28
bl RemoveBerryTree
ldr r0, =gUnknown_020375F2
ldrb r0, [r0]
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
ldrb r1, [r2, 0x5]
ldrb r2, [r2, 0x4]

View File

@ -516,7 +516,7 @@ _0807FBBE:
ldrb r0, [r0]
cmp r0, 0
beq _0807FC14
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _0807FC14
@ -771,7 +771,7 @@ sub_807FE14: @ 807FE14
strh r5, [r6]
adds r0, r6, 0x2
adds r1, r4, 0
bl CopyString
bl StringCopy
ldrb r0, [r4, 0x15]
strb r0, [r6, 0x9]
ldrb r0, [r4, 0x16]
@ -821,10 +821,10 @@ _0807FE7C:
movs r1, 0x2
strb r1, [r0]
ldr r4, =gUnknown_020229F0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r0, r4, 0
bl CopyString
bl StringCopy
movs r0, 0xD0
lsls r0, 2
bl FlagGet
@ -835,7 +835,7 @@ _0807FE7C:
adds r0, 0x1C
ldr r1, =gUnknown_083397D0
ldr r1, [r1, 0xC]
bl CopyString
bl StringCopy
b _0807FED4
.pool
_0807FEC8:
@ -843,7 +843,7 @@ _0807FEC8:
adds r0, 0x1C
ldr r1, =gUnknown_083397D0
ldr r1, [r1]
bl CopyString
bl StringCopy
_0807FED4:
ldr r1, =gUnknown_020229E8
movs r0, 0x2
@ -860,19 +860,19 @@ _0807FEE8:
movs r1, 0x3
strb r1, [r0]
ldr r6, =gUnknown_020229F0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r0, r6, 0
bl CopyString
bl StringCopy
adds r0, r6, 0
adds r0, 0x1C
ldr r4, =gUnknown_083397D0
ldr r1, [r4, 0x10]
bl CopyString
bl StringCopy
adds r0, r6, 0
adds r0, 0x38
ldr r1, [r4, 0x8]
bl CopyString
bl StringCopy
adds r0, r6, 0
subs r0, 0x8
strh r5, [r0, 0x1A]
@ -890,23 +890,23 @@ _0807FF3C:
movs r1, 0x4
strb r1, [r0]
ldr r5, =gUnknown_020229F0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r0, r5, 0
bl CopyString
bl StringCopy
adds r0, r5, 0
adds r0, 0x1C
ldr r4, =gUnknown_083397D0
ldr r1, [r4, 0x14]
bl CopyString
bl StringCopy
adds r0, r5, 0
adds r0, 0x38
ldr r1, [r4, 0x4]
bl CopyString
bl StringCopy
adds r0, r5, 0
adds r0, 0x54
ldr r1, [r4, 0x8]
bl CopyString
bl StringCopy
adds r0, r5, 0
subs r0, 0x8
movs r1, 0x2
@ -1122,7 +1122,7 @@ _08080126:
bne _0808016A
b _080804F8
_0808016A:
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
bne _08080174
@ -1938,7 +1938,7 @@ _080807E4:
ldr r0, =gUnknown_020229F0
adds r1, r0
add r0, sp, 0x8
bl CopyString
bl StringCopy
movs r0, 0x1
add r1, sp, 0x8
movs r2, 0x38
@ -2687,7 +2687,7 @@ _08080ED8:
ldrb r0, [r0]
cmp r0, 0
bne _08080F9A
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
ldr r1, =0x0000028f
@ -2830,7 +2830,7 @@ sub_8080FD0: @ 8080FD0
ldrb r0, [r0]
cmp r0, 0
bne _080810CC
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
ldr r1, =0x0000028f
@ -2956,7 +2956,7 @@ sub_80810F8: @ 80810F8
ldrb r0, [r0]
cmp r0, 0
bne _080811F8
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
ldr r1, =0x0000028f
@ -3334,7 +3334,7 @@ sub_80814B0: @ 80814B0
ldrb r0, [r0]
cmp r0, 0
beq _080814E4
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080814E4
@ -3652,12 +3652,12 @@ _0808175A:
ldrb r0, [r1]
cmp r0, 0
bne _0808182C
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x2
bne _080817A8
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x1
ands r0, r1
@ -3672,7 +3672,7 @@ _0808175A:
b _080817BA
.pool
_080817A8:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -3758,7 +3758,7 @@ _0808185A:
ldrb r0, [r0]
cmp r0, 0
beq _0808187E
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x80
lsls r0, 2
@ -3883,7 +3883,7 @@ help_system_is_not_first_time: @ 8081964
bne _080819A2
adds r0, r4, 0x2
adds r1, r5, 0x2
bl CompareString
bl StringCompare
cmp r0, 0
bne _080819B0
ldr r0, [r4, 0x8]
@ -4432,7 +4432,7 @@ _08081D4C:
ldrb r0, [r5]
cmp r0, 0xC
bne _08081DA6
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -4706,7 +4706,7 @@ sub_8081F94: @ 8081F94
ldrb r0, [r0]
cmp r0, 0
beq _08081FB8
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _08081FB8
@ -4852,7 +4852,7 @@ _080820EC:
ldrb r0, [r0]
cmp r0, 0
beq _0808218C
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _0808218C
@ -4968,7 +4968,7 @@ _080821D4:
ldrb r0, [r0]
cmp r0, 0
beq _08082254
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _08082254
@ -5367,7 +5367,7 @@ _08082558:
ldr r0, [r1]
adds r0, 0x1
str r0, [r1]
ldr r1, =gUnknown_03002700
ldr r1, =gSoftResetDisabled
movs r0, 0x1
strb r0, [r1]
b _0808263C
@ -5456,7 +5456,7 @@ _0808261A:
str r0, [r1]
cmp r0, 0x5
ble _0808263C
ldr r1, =gUnknown_03002700
ldr r1, =gSoftResetDisabled
movs r0, 0
strb r0, [r1]
movs r0, 0x1
@ -5544,7 +5544,7 @@ _080826EC:
adds r0, 0x63
movs r1, 0x3
strb r1, [r0]
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r0, [r6]
adds r0, 0x6E
ldrh r0, [r0]
@ -5554,7 +5554,7 @@ _080826EC:
ldr r0, =gUnknown_020229F0
adds r1, r0
adds r0, r4, 0
bl CopyString
bl StringCopy
ldr r1, =gUnknown_083398DD
b _08082740
.pool
@ -5564,7 +5564,7 @@ _0808271C:
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r0, [r6]
adds r0, 0x6E
ldrh r0, [r0]
@ -5574,18 +5574,18 @@ _0808271C:
ldr r0, =gUnknown_020229F0
adds r1, r0
adds r0, r4, 0
bl CopyString
bl StringCopy
ldr r1, =gUnknown_083398B0
_08082740:
adds r0, r4, 0
bl AppendString
bl StringAppend
b _080828DC
.pool
_08082754:
ldr r4, [r6]
ldr r0, =0x000011b8
adds r4, r0
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
bl sav2_get_text_speed
adds r2, r0, 0
lsls r2, 24
@ -5855,9 +5855,9 @@ _080829AA:
ldr r1, =0x000011b8
adds r0, r1
strh r2, [r0]
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08339896
bl CopyString
bl StringCopy
b _08082A92
.pool
_080829D4:
@ -5871,16 +5871,16 @@ _080829D4:
ldr r1, =0x000011b8
adds r0, r1
strh r2, [r0]
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08339858
bl CopyString
bl StringCopy
b _08082A92
.pool
_08082A00:
ldr r4, [r6]
ldr r2, =0x000011b8
adds r4, r2
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
bl sav2_get_text_speed
adds r2, r0, 0
lsls r2, 24
@ -6250,7 +6250,7 @@ sub_8082D28: @ 8082D28
lsls r0, 24
lsrs r1, r0, 24
_08082D3C:
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _08082DCC
@ -6415,7 +6415,7 @@ sub_8082E84: @ 8082E84
mov r6, r9
mov r5, r8
push {r5-r7}
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r1, r0, 16
movs r0, 0x1
@ -6432,7 +6432,7 @@ sub_8082E84: @ 8082E84
mov r8, r3
movs r7, 0x10
_08082EB0:
bl GenerateRandomNumber
bl Random
ldr r1, =gUnknown_020322A4
ldr r4, [r1]
adds r4, 0x4A
@ -6475,7 +6475,7 @@ _08082EF4:
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
bl GenerateRandomNumber
bl Random
lsls r5, r4, 4
adds r5, r4
lsls r5, 2
@ -6487,7 +6487,7 @@ _08082EF4:
ands r0, r1
subs r0, r7, r0
strh r0, [r4, 0x2E]
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
mov r2, r8
@ -6968,7 +6968,7 @@ sub_80832BC: @ 80832BC
ldrsh r0, [r6, r1]
cmp r0, 0
bne _080832E0
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r5, 0
@ -7042,7 +7042,7 @@ _08083344:
ldrsh r1, [r4, r2]
cmp r1, 0
bne _08083362
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r5, 0
@ -7155,7 +7155,7 @@ sub_80833F8: @ 80833F8
@ void UpdateBerryBlenderRecord()
UpdateBerryBlenderRecord: @ 8083418
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldr r0, =gUnknown_020322A4
ldr r1, [r0]
@ -7326,15 +7326,15 @@ _08083564:
mov r1, r8
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, [r7]
adds r0, 0x9F
ldr r1, =gUnknown_08339941
bl AppendString
bl StringAppend
ldr r0, [r7]
adds r0, 0x9F
ldr r1, =gUnknown_085E8D5E
bl AppendString
bl StringAppend
ldr r0, [r7]
adds r0, 0x9F
lsls r4, r5, 3
@ -7342,7 +7342,7 @@ _08083564:
lsls r4, 2
ldr r3, =gUnknown_020229F0
adds r1, r4, r3
bl AppendString
bl StringAppend
ldr r1, [r7]
adds r1, 0x9F
mov r0, r9
@ -7365,17 +7365,17 @@ _08083564:
lsls r1, 1
adds r5, r1
adds r1, r5, 0
bl CopyString
bl StringCopy
ldr r0, [r7]
adds r0, 0x9F
ldr r2, =gUnknown_020229E8
adds r4, r2
ldrb r1, [r4, 0x1A]
bl StopMusicWhileStringIsPrinted
bl ConvertInternationalString
ldr r0, [r7]
adds r0, 0x9F
ldr r1, =gUnknown_08339914
bl AppendString
bl StringAppend
ldr r1, [r7]
adds r1, 0x9F
movs r3, 0xFF
@ -7422,11 +7422,11 @@ _0808361A:
adds r0, r4, 0
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, [r6]
adds r0, 0x9F
ldr r1, =gUnknown_08339941
bl AppendString
bl StringAppend
ldr r0, [r6]
adds r0, 0x4E
ldrh r0, [r0]
@ -7438,15 +7438,15 @@ _0808361A:
ldr r0, [sp, 0x48]
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, [r6]
adds r0, 0x9F
ldr r1, [sp, 0x48]
bl AppendString
bl StringAppend
ldr r0, [r6]
adds r0, 0x9F
ldr r1, =gUnknown_0833993C
bl AppendString
bl StringAppend
ldr r1, [r6]
adds r1, 0x9F
movs r0, 0x1
@ -7496,19 +7496,19 @@ _0808361A:
adds r0, r5, 0
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, [r6]
adds r0, 0x9F
ldr r1, =gUnknown_08339921
bl AppendString
bl StringAppend
adds r1, r4, 0
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, [r6]
adds r0, 0x9F
ldr r1, =gUnknown_08339928
bl AppendString
bl StringAppend
ldr r1, [r6]
adds r1, 0x9F
movs r0, 0x1
@ -7540,7 +7540,7 @@ _0808361A:
b _08083898
.pool
_08083790:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -7681,13 +7681,13 @@ sub_80838AC: @ 80838AC
adds r0, r1
ldr r1, [r0]
adds r0, r6, 0
bl CopyString
bl StringCopy
ldr r1, =gUnknown_0833979D
adds r0, r6, 0
bl AppendString
bl StringAppend
ldr r1, =gUnknown_08339943
adds r0, r6, 0
bl AppendString
bl StringAppend
adds r0, r5, 0
bl sub_8136EA4
adds r4, r0, 0
@ -7700,32 +7700,32 @@ sub_80838AC: @ 80838AC
lsrs r5, 24
ldr r1, =gUnknown_0833994F
adds r0, r6, 0
bl AppendString
bl StringAppend
mov r0, sp
adds r1, r4, 0
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r6, 0
mov r1, sp
bl AppendString
bl StringAppend
ldr r1, =gUnknown_0833995D
adds r0, r6, 0
bl AppendString
bl StringAppend
mov r0, sp
adds r1, r5, 0
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r6, 0
mov r1, sp
bl AppendString
bl StringAppend
ldr r1, =gUnknown_08339970
adds r0, r6, 0
bl AppendString
bl StringAppend
ldr r1, =gUnknown_0833979B
adds r0, r6, 0
bl AppendString
bl StringAppend
add sp, 0xC
pop {r4-r6}
pop {r0}
@ -8158,15 +8158,15 @@ _08083C84:
mov r1, r8
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, [r7]
adds r0, 0x9F
ldr r1, =gUnknown_08339941
bl AppendString
bl StringAppend
ldr r0, [r7]
adds r0, 0x9F
ldr r1, =gUnknown_085E8D5E
bl AppendString
bl StringAppend
ldr r0, [r7]
adds r0, 0x9F
lsls r1, r5, 3
@ -8174,7 +8174,7 @@ _08083C84:
lsls r1, 2
ldr r2, =gUnknown_020229F0
adds r1, r2
bl AppendString
bl StringAppend
ldr r1, [r7]
adds r1, 0x9F
ldr r0, [sp, 0x8]
@ -8201,7 +8201,7 @@ _08083C84:
ldrh r1, [r1]
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r1, [r7]
adds r1, 0x9F
mov r3, r10
@ -8222,7 +8222,7 @@ _08083C84:
ldrh r1, [r1]
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r1, [r7]
adds r1, 0x9F
mov r3, r10
@ -8243,7 +8243,7 @@ _08083C84:
ldrh r1, [r1]
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r1, [r7]
adds r1, 0x9F
mov r3, r10
@ -8296,7 +8296,7 @@ _08083DC8:
strb r0, [r2]
b _08083E12
_08083DE2:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -8379,7 +8379,7 @@ ShowBerryBlenderRecordWindow: @ 8083E24
movs r7, 0xA4
lsls r7, 22
_08083E8A:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
lsls r1, r6, 1
ldr r2, =0x000009bc
@ -8393,10 +8393,10 @@ _08083E8A:
add r0, sp, 0xC
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r5, r0, 0
ldr r1, =gUnknown_08339941
bl AppendString
bl StringAppend
adds r5, r0, 0
adds r0, r4, 0
movs r1, 0x64
@ -8405,10 +8405,10 @@ _08083E8A:
adds r0, r5, 0
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r5, r0, 0
ldr r1, =gUnknown_0833993C
bl AppendString
bl StringAppend
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0x8C
@ -8545,7 +8545,7 @@ sub_8083F94: @ 8083F94
ldr r5, =gUnknown_020229F0
adds r1, r5
adds r0, r7, 0
bl CopyString
bl StringCopy
adds r0, r6, 0
bl sub_81370B4
strb r0, [r7, 0xB]
@ -8599,7 +8599,7 @@ _08084058:
ldr r5, =gUnknown_020229F0
adds r1, r5
adds r0, r7, 0
bl CopyString
bl StringCopy
adds r0, r6, 0
bl sub_81370B4
strb r0, [r7, 0xB]

View File

@ -80,7 +80,7 @@ _08177CAA:
sub_8177CB0: @ 8177CB0
push {lr}
sub sp, 0x4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -202,7 +202,7 @@ _08177DC2:
_08177DDA:
strb r0, [r2, 0x8]
_08177DDC:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -343,7 +343,7 @@ _08177F1C:
b _08177FD6
.pool
_08177F3C:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -562,20 +562,20 @@ sub_8178110: @ 8178110
ldrb r0, [r0]
bl GetBerryInfo
adds r6, r0, 0
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, [r5]
adds r1, r4
ldrh r1, [r1]
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
ldr r0, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r0, =gStringVar2
adds r1, r6, 0
bl CopyString
ldr r4, =gUnknown_02021FC4
bl StringCopy
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E9263
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0
str r0, [sp]
str r0, [sp, 0x4]
@ -641,20 +641,20 @@ _081781C8:
movs r1, 0x64
bl __udivsi3
adds r5, r0, 0
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
adds r1, r5, 0
movs r2, 0
movs r3, 0x2
bl ConvertIntToDecimalString
ldr r0, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r0, =gStringVar2
adds r1, r4, 0
movs r2, 0
movs r3, 0x2
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E9233
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
str r7, [sp]
str r6, [sp, 0x4]
str r6, [sp, 0x8]
@ -1164,7 +1164,7 @@ sub_8178654: @ 8178654
ands r0, r1
cmp r0, 0
bne _081786A6
ldr r3, =gUnknown_030022C0
ldr r3, =gMain
ldrh r0, [r3, 0x30]
movs r1, 0xF0
ands r1, r0

View File

@ -15,45 +15,45 @@ sub_80F97C8: @ 80F97C8
sub sp, 0x8
adds r5, r0, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 16
str r0, [sp, 0x4]
lsrs r0, 16
str r0, [sp]
adds r0, r5, 0
movs r1, 0x27
bl pokemon_getattr
bl GetMonData
adds r7, r0, 0
movs r6, 0xF
ands r7, r6
adds r0, r5, 0
movs r1, 0x28
bl pokemon_getattr
bl GetMonData
mov r8, r0
mov r1, r8
ands r1, r6
mov r8, r1
adds r0, r5, 0
movs r1, 0x29
bl pokemon_getattr
bl GetMonData
mov r9, r0
mov r3, r9
ands r3, r6
mov r9, r3
adds r0, r5, 0
movs r1, 0x2A
bl pokemon_getattr
bl GetMonData
mov r10, r0
ands r0, r6
mov r10, r0
adds r0, r5, 0
movs r1, 0x2B
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
ands r4, r6
adds r0, r5, 0
movs r1, 0x2C
bl pokemon_getattr
bl GetMonData
adds r2, r0, 0
ands r2, r6
mov r1, r8
@ -194,10 +194,10 @@ _080F992C:
adds r0, r5, 0
movs r2, 0
movs r3, 0x8
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r5, r0, 0
ldr r1, _080F9980
bl AppendString
bl StringAppend
adds r5, r0, 0
adds r0, r4, 0
movs r1, 0xA
@ -206,7 +206,7 @@ _080F992C:
adds r0, r5, 0
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
pop {r4,r5}
pop {r0}
bx r0
@ -236,16 +236,16 @@ _080F99A0:
ldrh r1, [r1]
movs r0, 0x64
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r5, r1, r0
adds r0, r5, 0
movs r1, 0x2D
bl pokemon_getattr
bl GetMonData
cmp r0, 0x1
beq _080F99C2
adds r0, r5, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
cmp r0, r6
beq _080F99CC
_080F99C2:
@ -266,7 +266,7 @@ _080F99CC:
adds r0, r6, 0
bl sub_80F989C
adds r4, r0, 0
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
adds r1, r5, 0
bl sub_80F9910
cmp r5, r4
@ -297,29 +297,29 @@ sub_80F9A14: @ 80F9A14
adds r0, r4, 0
bl sub_80F989C
adds r1, r0, 0
ldr r0, =gUnknown_02021EC4
ldr r0, =gStringVar3
bl sub_80F9910
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r1, 0xB
muls r1, r4
ldr r2, =gSpeciesNames
adds r1, r2
bl CopyString
bl StringCopy
ldrh r1, [r5]
movs r0, 0x80
lsls r0, 8
cmp r1, r0
bne _080F9A64
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
ldr r1, =gUnknown_085ECF6B
bl CopyString
bl StringCopy
b _080F9A6E
.pool
_080F9A64:
ldr r0, =gUnknown_02021DC4
ldr r1, =gUnknown_03005D90
ldr r0, =gStringVar2
ldr r1, =gSaveBlock2Ptr
ldr r1, [r1]
bl CopyString
bl StringCopy
_080F9A6E:
pop {r4,r5}
pop {r0}
@ -438,7 +438,7 @@ sub_80F9B30: @ 80F9B30
bhi _080F9BAC
cmp r5, 0x40
bhi _080F9BAC
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x000031a8
adds r0, r1
@ -449,16 +449,16 @@ _080F9B6A:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _080F9B9C
adds r0, r4, 0
movs r1, 0x6
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _080F9B9C
mov r1, sp

627
asm/braille_puzzles.s Normal file
View File

@ -0,0 +1,627 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_81795E8
sub_81795E8: @ 81795E8
push {lr}
ldr r0, =0x000008af
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179634
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldrh r1, [r2, 0x4]
ldr r0, =0x00004718
cmp r1, r0
bne _08179634
ldr r1, [r2]
ldr r0, =0x0003000a
cmp r1, r0
beq _08179616
ldr r0, =0x00030009
cmp r1, r0
beq _08179616
ldr r0, =0x0003000b
cmp r1, r0
bne _08179634
_08179616:
movs r0, 0x1
b _08179636
.pool
_08179634:
movs r0, 0
_08179636:
pop {r1}
bx r1
thumb_func_end sub_81795E8
thumb_func_start sub_817963C
sub_817963C: @ 817963C
push {lr}
ldr r2, =0x0000022a
movs r0, 0x10
movs r1, 0x8
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0x11
movs r1, 0x8
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x12
movs r1, 0x8
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0x10
movs r1, 0x9
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0x11
movs r1, 0x9
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x12
movs r1, 0x9
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl audio_play
ldr r0, =0x000008af
bl FlagSet
bl script_env_2_disable
pop {r0}
bx r0
.pool
thumb_func_end sub_817963C
thumb_func_start sub_81796AC
sub_81796AC: @ 81796AC
push {r4,lr}
ldr r4, =gPlayerParty
adds r0, r4, 0
movs r1, 0x41
movs r2, 0
bl GetMonData
movs r1, 0x9D
lsls r1, 1
cmp r0, r1
bne _081796F4
bl calc_player_party_count
ldr r0, =gUnknown_020244E9
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
adds r1, r4, 0
subs r1, 0x64
adds r0, r1
movs r1, 0x41
movs r2, 0
bl GetMonData
ldr r1, =0x0000017d
cmp r0, r1
bne _081796F4
movs r0, 0x1
b _081796F6
.pool
_081796F4:
movs r0, 0
_081796F6:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_81796AC
thumb_func_start nullsub_84
nullsub_84: @ 81796FC
bx lr
thumb_func_end nullsub_84
thumb_func_start sub_8179700
sub_8179700: @ 8179700
push {lr}
ldr r0, =sub_8179778
movs r1, 0x9
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
movs r0, 0x2
strh r0, [r1, 0x10]
movs r0, 0x5
strh r0, [r1, 0x12]
movs r0, 0x32
strh r0, [r1, 0x14]
movs r0, 0
bl SetCameraPanningCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_8179700
thumb_func_start sub_817973C
sub_817973C: @ 817973C
push {lr}
ldr r0, =sub_8179778
movs r1, 0x9
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
movs r0, 0x3
strh r0, [r1, 0x10]
movs r0, 0x5
strh r0, [r1, 0x12]
movs r0, 0x2
strh r0, [r1, 0x14]
movs r0, 0
bl SetCameraPanningCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_817973C
thumb_func_start sub_8179778
sub_8179778: @ 8179778
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
movs r1, 0xA
ldrsh r0, [r4, r1]
movs r2, 0x12
ldrsh r1, [r4, r2]
bl __modsi3
cmp r0, 0
bne _081797D0
strh r0, [r4, 0xA]
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
ldrh r0, [r4, 0x10]
negs r0, r0
strh r0, [r4, 0x10]
movs r0, 0x10
ldrsh r1, [r4, r0]
movs r0, 0
bl SetCameraPanning
movs r2, 0xC
ldrsh r1, [r4, r2]
movs r2, 0x14
ldrsh r0, [r4, r2]
cmp r1, r0
bne _081797D0
adds r0, r5, 0
bl DestroyTask
bl script_env_2_enable_and_set_ctx_running
bl InstallCameraPanAheadCallback
_081797D0:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8179778
thumb_func_start sub_81797DC
sub_81797DC: @ 81797DC
push {lr}
movs r0, 0x8B
lsls r0, 4
bl FlagGet
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _0817982C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
ldrh r1, [r3, 0x4]
movs r0, 0xC3
lsls r0, 3
cmp r1, r0
bne _0817982C
ldr r1, [r3]
ldr r0, =0x00170006
cmp r1, r0
beq _08179810
ldr r0, =0x00170005
cmp r1, r0
beq _08179810
ldr r0, =0x00170007
cmp r1, r0
bne _0817982C
_08179810:
ldr r0, =gUnknown_0203BD14
strb r2, [r0]
movs r0, 0x1
b _0817982E
.pool
_0817982C:
movs r0, 0
_0817982E:
pop {r1}
bx r1
thumb_func_end sub_81797DC
thumb_func_start sub_8179834
sub_8179834: @ 8179834
push {lr}
bl brm_get_pokemon_selection
ldr r1, =gUnknown_02038C08
lsls r0, 24
lsrs r0, 24
str r0, [r1]
movs r0, 0x3C
bl FieldEffectStart
pop {r0}
bx r0
.pool
thumb_func_end sub_8179834
thumb_func_start sub_8179850
sub_8179850: @ 8179850
push {lr}
movs r0, 0x3C
bl FieldEffectActiveListRemove
bl sub_8179860
pop {r0}
bx r0
thumb_func_end sub_8179850
thumb_func_start sub_8179860
sub_8179860: @ 8179860
push {lr}
ldr r2, =0x0000022a
movs r0, 0xE
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0xF
movs r1, 0x1A
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x10
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0xE
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0xF
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x10
movs r1, 0x1B
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl audio_play
movs r0, 0x8B
lsls r0, 4
bl FlagSet
bl script_env_2_disable
pop {r0}
bx r0
.pool
thumb_func_end sub_8179860
thumb_func_start sub_81798D0
sub_81798D0: @ 81798D0
push {lr}
ldr r0, =0x000008b2
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179910
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldrh r1, [r2, 0x4]
ldr r0, =0x00004418
cmp r1, r0
bne _08179910
ldr r1, [r2]
ldr r0, =0x00190008
cmp r1, r0
bne _08179910
ldr r1, =gUnknown_0203BD14
movs r0, 0x1
strb r0, [r1]
movs r0, 0x1
b _08179912
.pool
_08179910:
movs r0, 0
_08179912:
pop {r1}
bx r1
thumb_func_end sub_81798D0
thumb_func_start sub_8179918
sub_8179918: @ 8179918
push {lr}
bl brm_get_pokemon_selection
ldr r1, =gUnknown_02038C08
lsls r0, 24
lsrs r0, 24
str r0, [r1]
movs r0, 0x3C
bl FieldEffectStart
pop {r0}
bx r0
.pool
thumb_func_end sub_8179918
thumb_func_start sub_8179934
sub_8179934: @ 8179934
push {lr}
movs r0, 0x3C
bl FieldEffectActiveListRemove
bl sub_8179944
pop {r0}
bx r0
thumb_func_end sub_8179934
thumb_func_start sub_8179944
sub_8179944: @ 8179944
push {lr}
ldr r2, =0x0000022a
movs r0, 0xE
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0xF
movs r1, 0x1A
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x10
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0xE
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0xF
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x10
movs r1, 0x1B
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl audio_play
ldr r0, =0x000008b2
bl FlagSet
bl script_env_2_disable
pop {r0}
bx r0
.pool
thumb_func_end sub_8179944
thumb_func_start nullsub_64
nullsub_64: @ 81799B4
bx lr
thumb_func_end nullsub_64
thumb_func_start sub_81799B8
sub_81799B8: @ 81799B8
push {lr}
bl oei_task_add
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_0203BD14
ldrb r0, [r0]
cmp r0, 0x1
bne _081799E4
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
ldr r2, =sub_8179934
b _081799F0
.pool
_081799E4:
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
ldr r2, =sub_8179850
_081799F0:
lsrs r1, r2, 16
strh r1, [r0, 0x18]
strh r2, [r0, 0x1A]
movs r0, 0
pop {r1}
bx r1
.pool
thumb_func_end sub_81799B8
thumb_func_start sub_8179A04
sub_8179A04: @ 8179A04
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldrh r1, [r0, 0x4]
ldr r0, =0x00004318
cmp r1, r0
beq _08179A1A
b _08179B5A
_08179A1A:
ldr r0, =0x000008b1
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _08179A28
b _08179B5A
_08179A28:
movs r0, 0x2
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179A36
b _08179B5A
_08179A36:
movs r0, 0x3
bl FlagGet
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08179A58
b _08179B5A
.pool
_08179A54:
movs r0, 0x1
b _08179B5C
_08179A58:
movs r5, 0
mov r8, r4
ldr r4, =gUnknown_085EFE74
adds r0, r4, 0x1
mov r12, r0
ldr r6, =0x0000403b
ldr r1, =0x0000403c
mov r9, r1
_08179A68:
lsls r0, r5, 1
adds r1, r0, r4
add r0, r12
ldrb r3, [r0]
mov r7, r8
ldr r2, [r7]
movs r7, 0
ldrsh r0, [r2, r7]
ldrb r1, [r1]
cmp r0, r1
bne _08179B44
movs r1, 0x2
ldrsh r0, [r2, r1]
cmp r0, r3
bne _08179B44
cmp r5, 0xF
bhi _08179AB0
adds r0, r6, 0
bl VarGet
lsls r0, 16
movs r1, 0x80
lsls r1, 9
lsls r1, r5
orrs r1, r0
lsrs r1, 16
adds r0, r6, 0
bl VarSet
b _08179AF0
.pool
_08179AB0:
cmp r5, 0x1F
bhi _08179AD2
mov r0, r9
bl VarGet
lsls r0, 16
adds r2, r5, 0
subs r2, 0x10
movs r1, 0x80
lsls r1, 9
lsls r1, r2
orrs r1, r0
lsrs r1, 16
mov r0, r9
bl VarSet
b _08179AF0
_08179AD2:
ldr r4, =0x0000403d
adds r0, r4, 0
bl VarGet
lsls r0, 16
adds r2, r5, 0
subs r2, 0x20
movs r1, 0x80
lsls r1, 9
lsls r1, r2
orrs r1, r0
lsrs r1, 16
adds r0, r4, 0
bl VarSet
_08179AF0:
ldr r0, =0x0000403b
bl VarGet
lsls r0, 16
lsrs r4, r0, 16
ldr r0, =0x0000ffff
cmp r4, r0
bne _08179B5A
ldr r0, =0x0000403c
bl VarGet
lsls r0, 16
lsrs r0, 16
cmp r0, r4
bne _08179B5A
ldr r0, =0x0000403d
bl VarGet
lsls r0, 16
lsrs r0, 16
cmp r0, 0xF
bne _08179B5A
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, [r0]
ldr r0, =0x00150008
cmp r1, r0
beq _08179A54
b _08179B5A
.pool
_08179B44:
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0x23
bls _08179A68
movs r0, 0x3
bl FlagSet
movs r0, 0x2
bl FlagReset
_08179B5A:
movs r0, 0
_08179B5C:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8179A04
.align 2, 0 @ Don't pad with nop.

View File

@ -57,7 +57,7 @@ sub_814FCC8: @ 814FCC8
sub sp, 0x18
movs r4, 0
str r4, [sp, 0x14]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -156,7 +156,7 @@ _0814FD4E:
ldr r0, =0x00004110
bl AllocZeroed
str r0, [r4]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -186,7 +186,7 @@ _0814FDFC:
lsrs r4, r0, 24
cmp r4, 0x13
bls _0814FDFC
bl sound_sources_off
bl InitMapMusic
bl map_music_set_to_zero
movs r0, 0
bl ResetBgsAndClearDma3BusyFlags
@ -219,7 +219,7 @@ _0814FDFC:
movs r0, 0
strh r0, [r1]
strh r0, [r2]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -282,7 +282,7 @@ _0814FE96:
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -301,7 +301,7 @@ _0814FF5C:
movs r1, 0
movs r2, 0x80
bl LoadPalette
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -312,7 +312,7 @@ _0814FF5C:
_0814FF7C:
bl sub_8150D28
bl RunTasks
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -426,7 +426,7 @@ _0814FFF8:
movs r2, 0
movs r3, 0x2
bl CopyToBgTilemapBufferRect_ChangePalette
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -539,7 +539,7 @@ _08150090:
movs r2, 0x18
movs r3, 0x17
bl CopyToBgTilemapBufferRect_ChangePalette
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -561,7 +561,7 @@ _08150190:
bl sub_80A3194
movs r0, 0x1
bl sub_8150B6C
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -621,7 +621,7 @@ mainloop: @ 815023C
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl UpdatePaletteFade
bl sound_something
bl MapMusicMain
pop {r0}
bx r0
thumb_func_end mainloop
@ -1912,7 +1912,7 @@ sub_8150D28: @ 8150D28
add r0, sp, 0xC
movs r2, 0x2
bl memcpy
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
mov r9, r0
@ -1945,7 +1945,7 @@ sub_8150D28: @ 8150D28
cmp r0, 0x1
beq _08150E68
_08150D86:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
add r0, sp
@ -2051,7 +2051,7 @@ _08150E68:
movs r2, 0x18
movs r3, 0x1A
bl CopyToBgTilemapBufferRect_ChangePalette
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
add r0, sp

View File

@ -45,19 +45,19 @@ sub_80B23B0: @ 80B23B0
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
lsls r4, 24
lsrs r4, 24
adds r0, r4, 0
movs r1, 0
bl SetStandardWindowBorderStyle
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
ldr r1, =gUnknown_085EE667
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
adds r1, r5, 0
movs r2, 0x58
@ -177,7 +177,7 @@ _080B24C8:
movs r0, 0x9
b _080B24F2
_080B24CC:
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
bl sub_800ABAC
adds r1, r0, 0
lsls r1, 24
@ -185,7 +185,7 @@ _080B24CC:
adds r0, r4, 0
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r0, 0x4
b _080B24F2
.pool
@ -233,7 +233,7 @@ sub_80B252C: @ 80B252C
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -276,7 +276,7 @@ sub_80B2578: @ 80B2578
movs r0, 0x1
bl sub_800B330
_080B258E:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -525,7 +525,7 @@ sub_80B275C: @ 80B275C
adds r0, r4, 0
adds r1, r6, 0
bl sub_80B243C
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -539,11 +539,11 @@ sub_80B275C: @ 80B275C
bl sub_800AA04
ldrh r0, [r7, 0xA]
bl sub_80B241C
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
adds r1, r5, 0
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, =gUnknown_082780F2
bl box_related_two__3
mov r0, r9
@ -590,7 +590,7 @@ sub_80B2804: @ 80B2804
lsls r0, 24
cmp r4, r0
bne _080B2852
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2C]
movs r0, 0x2
ands r0, r1
@ -755,7 +755,7 @@ _080B2994:
adds r0, r5
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r4, 0
adds r1, 0x54
strh r0, [r1]
@ -765,7 +765,7 @@ _080B2994:
adds r0, r5
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r4, 0x56
strh r0, [r4]
ldr r0, =sub_80B2C30
@ -845,7 +845,7 @@ _080B2A6C:
adds r0, r5
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r4, 0
adds r1, 0x54
strh r0, [r1]
@ -855,7 +855,7 @@ _080B2A6C:
adds r0, r5
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r4, 0x56
strh r0, [r4]
ldr r1, =gTasks
@ -888,10 +888,10 @@ sub_80B2AF4: @ 80B2AF4
str r1, [sp, 0x4]
movs r2, 0
movs r7, 0
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
movs r0, 0xFF
strb r0, [r1]
ldr r1, =gUnknown_02021DC4
ldr r1, =gStringVar2
movs r0, 0x1
negs r0, r0
strb r0, [r1]
@ -918,8 +918,8 @@ _080B2B2E:
mov r1, r10
muls r1, r0
add r1, r9
ldr r0, =gUnknown_02021CC4
bl CopyString
ldr r0, =gStringVar1
bl StringCopy
movs r2, 0x1
_080B2B48:
cmp r7, 0x1
@ -928,8 +928,8 @@ _080B2B48:
mov r1, r10
muls r1, r0
add r1, r9
ldr r0, =gUnknown_02021DC4
bl CopyString
ldr r0, =gStringVar2
bl StringCopy
movs r2, 0x1
_080B2B5C:
adds r7, 0x1
@ -1234,7 +1234,7 @@ _080B2DEC:
.pool
_080B2E00:
movs r3, 0x2
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0x00000ca9
adds r0, r1
@ -1270,7 +1270,7 @@ sub_80B2E4C: @ 80B2E4C
ldr r2, =0x00001133
adds r0, r2, 0
strh r0, [r1]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0
str r0, [r1]
movs r0, 0x2
@ -1291,7 +1291,7 @@ sub_80B2E74: @ 80B2E74
ldr r2, =0x00003311
adds r0, r2, 0
strh r0, [r1]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0
str r0, [r1]
movs r0, 0x2
@ -1458,7 +1458,7 @@ sub_80B2FD8: @ 80B2FD8
ldr r2, =0x00004411
adds r0, r2, 0
strh r0, [r1]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0
str r0, [r1]
movs r0, 0x2
@ -1476,7 +1476,7 @@ sub_80B3000: @ 80B3000
ldr r2, =0x00006601
adds r0, r2, 0
strh r0, [r1]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0
str r0, [r1]
movs r0, 0x4
@ -1494,7 +1494,7 @@ sub_80B3028: @ 80B3028
ldr r2, =0x00006602
adds r0, r2, 0
strh r0, [r1]
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0
str r0, [r1]
movs r0, 0x2
@ -1555,7 +1555,7 @@ _080B30C8:
b _080B3124
.pool
_080B30D8:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0x00000ca9
adds r0, r1
@ -1751,23 +1751,23 @@ _080B3270:
beq _080B32A0
b _080B32A6
_080B327A:
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0xA
b _080B32A4
.pool
_080B3284:
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0xB
b _080B32A4
.pool
_080B3290:
bl sub_80F94E8
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
movs r0, 0x4B
b _080B32A4
.pool
_080B32A0:
ldr r1, =gUnknown_02022FEC
ldr r1, =gBattleTypeFlags
ldr r0, =0x0000014b
_080B32A4:
str r0, [r1]
@ -1874,7 +1874,7 @@ _080B3378:
strh r0, [r1]
ldr r0, =sub_8036760
bl SetMainCallback2
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B360C
str r0, [r1, 0x8]
adds r0, r5, 0
@ -2047,7 +2047,7 @@ _080B3504:
strh r0, [r1]
ldr r0, =sub_8036760
bl SetMainCallback2
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B360C
str r0, [r1, 0x8]
adds r0, r4, 0
@ -2062,7 +2062,7 @@ _080B3532:
thumb_func_start sub_80B3554
sub_80B3554: @ 80B3554
push {r4,lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -2109,7 +2109,7 @@ _080B35AC:
cmp r4, 0
beq _080B35C8
_080B35B0:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -2119,7 +2119,7 @@ _080B35B0:
.pool
_080B35C8:
bl sub_800AC34
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -2150,7 +2150,7 @@ _080B35FE:
thumb_func_start sub_80B360C
sub_80B360C: @ 80B360C
push {r4,r5,lr}
ldr r2, =gUnknown_02022FEC
ldr r2, =gBattleTypeFlags
ldr r0, [r2]
movs r1, 0x21
negs r1, r1
@ -2172,7 +2172,7 @@ sub_80B360C: @ 80B360C
movs r5, 0x1
eors r0, r5
bl sub_813C2A0
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080B36B2
@ -2218,12 +2218,12 @@ _080B36B2:
bl InUnionRoom
cmp r0, 0x1
bne _080B36CC
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =sub_80B3554
b _080B36D0
.pool
_080B36CC:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =c2_8056854
_080B36D0:
str r0, [r1, 0x8]
@ -2512,7 +2512,7 @@ _080B391C:
thumb_func_start sub_80B3924
sub_80B3924: @ 80B3924
push {lr}
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080B3940
@ -2552,7 +2552,7 @@ sub_80B3968: @ 80B3968
ldr r2, =0x00002211
adds r0, r2, 0
strh r0, [r1]
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080B3994
@ -2601,26 +2601,26 @@ sub_80B39D4: @ 80B39D4
lsrs r4, 24
ldr r0, =gUnknown_020375E4
strh r4, [r0]
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
lsls r1, r4, 3
subs r1, r4
lsls r1, 2
ldr r2, =gUnknown_020229F0
adds r1, r2
bl CopyString
bl StringCopy
adds r0, r4, 0
bl sub_80C4904
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
beq _080B3A28
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
ldr r2, =gUnknown_0855059C
subs r1, 0x1
lsls r1, 2
adds r1, r2
ldr r1, [r1]
bl CopyString
bl StringCopy
movs r0, 0x1
b _080B3A2A
.pool
@ -2661,7 +2661,7 @@ _080B3A62:
ldrb r0, [r0]
cmp r0, 0
beq _080B3AA6
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
bne _080B3AA0
@ -2752,7 +2752,7 @@ _080B3B20:
beq _080B3B9E
b _080B3BB8
_080B3B2A:
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080B3B40
@ -2825,7 +2825,7 @@ _080B3BB8:
thumb_func_start sub_80B3BC4
sub_80B3BC4: @ 80B3BC4
push {lr}
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
bne _080B3BD6

View File

@ -261,7 +261,7 @@ _08069790:
mov r0, r9
cmp r0, 0x22
bne _080697C6
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
ldr r1, =0x003f0100
ands r0, r1
@ -288,7 +288,7 @@ _080697C6:
ldr r0, [sp, 0x20]
cmp r0, 0x22
bne _080697FC
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
ldr r1, =0x003f0100
ands r0, r1
@ -621,7 +621,7 @@ _08069A58:
bls _08069A60
b _08069BC2
_08069A60:
ldr r0, =gUnknown_02024211
ldr r0, =gCritMultiplier
ldrb r1, [r0]
adds r4, r0, 0
cmp r1, 0x2
@ -728,7 +728,7 @@ _08069B48:
ldrb r1, [r4]
cmp r1, 0x1
bne _08069B8A
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
ands r0, r1
cmp r0, 0
@ -750,7 +750,7 @@ _08069B84:
adds r0, r5, r0
asrs r5, r0, 1
_08069B8A:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x1
ands r0, r1
@ -789,7 +789,7 @@ _08069BCA:
bhi _08069BD2
b _08069DD4
_08069BD2:
ldr r0, =gUnknown_02024211
ldr r0, =gCritMultiplier
ldrb r1, [r0]
adds r4, r0, 0
cmp r1, 0x2
@ -880,7 +880,7 @@ _08069C76:
ldrb r1, [r4]
cmp r1, 0x1
bne _08069CCA
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
ands r0, r1
cmp r0, 0
@ -902,7 +902,7 @@ _08069CC4:
adds r0, r5, r0
asrs r5, r0, 1
_08069CCA:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x1
ands r0, r1
@ -947,7 +947,7 @@ _08069CFC:
lsls r0, 24
cmp r0, 0
bne _08069DAC
ldr r2, =gUnknown_020243CC
ldr r2, =gBattleWeather
ldrh r1, [r2]
movs r0, 0x1
ands r0, r1

View File

@ -158,7 +158,7 @@ sub_817ADF4: @ 817ADF4
sub_817AE00: @ 817AE00
push {r4,lr}
sub sp, 0xC
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -301,7 +301,7 @@ _0817AEEC:
bl EnableInterrupts
ldr r0, =sub_817ADF4
bl SetVBlankCallback
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -335,7 +335,7 @@ _0817AFCA:
sub_817AFD4: @ 817AFD4
push {r4,lr}
sub sp, 0x4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r4, r0, r1
@ -364,7 +364,7 @@ _0817B008:
cmp r0, 0
bne _0817B020
bl FreeAllWindowBuffers
bl Reset
bl DoSoftReset
_0817B020:
add sp, 0x4
pop {r4}

175
asm/clock.s Normal file
View File

@ -0,0 +1,175 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_809E778
sub_809E778: @ 809E778
push {lr}
ldr r0, =0x00000895
bl FlagSet
bl GameFreakRTC_CalcLocalDateTime
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
adds r2, 0xA0
ldr r3, =gUnknown_03005CF8
ldr r0, [r3]
ldr r1, [r3, 0x4]
str r0, [r2]
str r1, [r2, 0x4]
ldr r0, =0x00004040
ldrh r1, [r3]
bl VarSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809E778
thumb_func_start sub_809E7B0
sub_809E7B0: @ 809E7B0
push {r4,lr}
ldr r0, =0x00000895
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _0809E7DA
bl sub_813B9C0
lsls r0, 24
cmp r0, 0
bne _0809E7DA
bl GameFreakRTC_CalcLocalDateTime
ldr r4, =gUnknown_03005CF8
adds r0, r4, 0
bl sub_809E7E8
adds r0, r4, 0
bl sub_809E858
_0809E7DA:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_809E7B0
thumb_func_start sub_809E7E8
sub_809E7E8: @ 809E7E8
push {r4-r6,lr}
adds r5, r0, 0
ldr r0, =0x00004040
bl GetVarPointer
adds r6, r0, 0
ldrh r0, [r6]
movs r2, 0
ldrsh r1, [r5, r2]
cmp r0, r1
beq _0809E84E
cmp r0, r1
bgt _0809E84E
ldrh r4, [r5]
subs r4, r0
lsls r4, 16
lsrs r4, 16
bl sub_809D3A0
adds r0, r4, 0
bl sub_8122580
adds r0, r4, 0
bl sub_80ED888
adds r0, r4, 0
bl sub_80AEFBC
adds r0, r4, 0
bl sub_806DE44
adds r0, r4, 0
bl sub_8137904
adds r0, r4, 0
bl sub_8137A20
adds r0, r4, 0
bl sub_8139EF4
adds r0, r4, 0
bl sub_813A7F4
adds r0, r4, 0
bl sub_813945C
adds r0, r4, 0
bl sub_8177584
ldrh r0, [r5]
strh r0, [r6]
_0809E84E:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_809E7E8
thumb_func_start sub_809E858
sub_809E858: @ 809E858
push {r4-r6,lr}
sub sp, 0x8
adds r5, r0, 0
mov r4, sp
ldr r6, =gSaveBlock2Ptr
ldr r1, [r6]
adds r1, 0xA0
mov r0, sp
adds r2, r5, 0
bl GameFreakRTC_GetDelta
mov r0, sp
movs r2, 0
ldrsh r1, [r0, r2]
lsls r0, r1, 1
adds r0, r1
lsls r1, r0, 4
subs r1, r0
lsls r1, 5
movs r2, 0x2
ldrsb r2, [r4, r2]
lsls r0, r2, 4
subs r0, r2
lsls r0, 2
adds r1, r0
movs r0, 0x3
ldrsb r0, [r4, r0]
adds r0, r1, r0
cmp r0, 0
beq _0809E8A8
cmp r0, 0
blt _0809E8A8
bl BerryTreeTimeUpdate
ldr r2, [r6]
adds r2, 0xA0
ldr r0, [r5]
ldr r1, [r5, 0x4]
str r0, [r2]
str r1, [r2, 0x4]
_0809E8A8:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_809E858
thumb_func_start sub_809E8B4
sub_809E8B4: @ 809E8B4
push {lr}
bl sub_809E778
ldr r0, =c2_exit_to_overworld_1_continue_scripts_restart_music
bl SetMainCallback2
pop {r0}
bx r0
.pool
thumb_func_end sub_809E8B4
thumb_func_start Special_StartWallClock
Special_StartWallClock: @ 809E8C8
push {lr}
ldr r0, =Cb2_StartWallClock
bl SetMainCallback2
ldr r1, =gMain
ldr r0, =sub_809E8B4
str r0, [r1, 0x8]
pop {r0}
bx r0
.pool
thumb_func_end Special_StartWallClock
.align 2, 0 @ Don't pad with nop.

View File

@ -11,14 +11,14 @@ PrintCoinsString: @ 8145B54
push {r4,lr}
sub sp, 0xC
adds r1, r0, 0
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r2, 0x1
movs r3, 0x4
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E8DAB
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
adds r1, r4, 0
movs r2, 0x40
@ -110,11 +110,11 @@ HideCoinsWindow: @ 8145C14
thumb_func_start GetCoins
@ u16 GetCoins()
GetCoins: @ 8145C30
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00000494
adds r1, r0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
adds r0, 0xAC
ldr r0, [r0]
@ -131,9 +131,9 @@ GetCoins: @ 8145C30
SetCoins: @ 8145C58
lsls r0, 16
lsrs r0, 16
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r1, [r1]
adds r1, 0xAC
ldr r1, [r1]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -394,7 +394,7 @@ _080E56C6:
thumb_func_start ContestEffectFunc_080E56E0
ContestEffectFunc_080E56E0: @ 80E56E0
push {lr}
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -450,7 +450,7 @@ _080E5736:
ldr r1, [r0, 0x8]
movs r0, 0xFF
strb r0, [r1, 0x9]
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -1071,7 +1071,7 @@ _080E5BD2:
beq _080E5CA0
mov r4, sp
_080E5C16:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x64
@ -1636,7 +1636,7 @@ _080E6060:
thumb_func_start ContestEffectFunc_080E6068
ContestEffectFunc_080E6068: @ 80E6068
push {r4,lr}
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -2467,7 +2467,7 @@ _080E6680:
movs r6, 0
adds r7, r5, 0
_080E66AA:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
lsls r2, r6, 24

View File

@ -285,12 +285,12 @@ sub_80F5A74: @ 80F5A74
bne _080F5A96
ldr r1, =gUnknown_085ED21E
adds r0, r6, 0
bl CopyString
bl StringCopy
adds r6, r0, 0
_080F5A96:
adds r1, r7, 0x2
adds r0, r6, 0
bl CopyString
bl StringCopy
ldr r4, =gUnknown_02022E2C
adds r0, r5, 0
adds r1, r4, 0
@ -298,11 +298,11 @@ _080F5A96:
bl sub_80F7ED0
ldr r1, =gUnknown_085E8D3E
adds r0, r6, 0
bl CopyString
bl StringCopy
adds r1, r7, 0
adds r1, 0xD
adds r0, r6, 0
bl AppendString
bl StringAppend
adds r0, r5, 0
adds r1, r4, 0
movs r2, 0x32
@ -1238,7 +1238,7 @@ _080F6334:
movs r4, 0
ldr r1, =gUnknown_02039F20
ldrb r0, [r1]
ldr r7, =gUnknown_02021CC4
ldr r7, =gStringVar1
ldr r2, =gUnknown_02039E0D
mov r8, r2
cmp r0, 0
@ -1256,18 +1256,18 @@ _080F636E:
mov r0, r8
adds r1, r4, r0
adds r0, r7, 0
bl CopyString
bl StringCopy
adds r0, r7, 0
bl sub_81DB5AC
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
mov r1, r8
subs r1, 0xB
adds r4, r1
adds r1, r4, 0
bl CopyString
bl StringCopy
ldr r1, =gUnknown_085ED1FA
mov r0, sp
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r0, =gUnknown_0203A034
ldr r0, [r0]
ldr r0, [r0]
@ -1616,7 +1616,7 @@ sub_80F66B4: @ 80F66B4
push {r4-r7,lr}
lsls r0, 24
lsrs r7, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r2, 0x1
adds r0, r2, 0
@ -3565,7 +3565,7 @@ sub_80F7670: @ 80F7670
cmp r0, 0x27
bhi _080F7732
ldr r4, =gUnknown_0858D860
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xF0
@ -3581,7 +3581,7 @@ sub_80F7670: @ 80F7670
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
bl GenerateRandomNumber
bl Random
ldr r1, =gUnknown_02020630
lsls r5, r4, 4
adds r5, r4
@ -3590,21 +3590,21 @@ sub_80F7670: @ 80F7670
lsls r0, 23
lsrs r0, 23
strh r0, [r5, 0x2E]
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x18
bl __umodsi3
adds r0, 0x10
strh r0, [r5, 0x30]
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xFF
ands r0, r1
adds r0, 0x30
strh r0, [r5, 0x32]
bl GenerateRandomNumber
bl Random
ldrh r6, [r5, 0x4]
lsls r4, r6, 22
lsrs r4, 22
@ -3656,7 +3656,7 @@ sub_80F7768: @ 80F7768
asrs r0, 24
movs r2, 0x30
ldrsh r1, [r4, r2]
bl sine
bl Sin
strh r0, [r4, 0x24]
ldrh r1, [r4, 0x32]
ldrh r0, [r4, 0x36]
@ -4632,7 +4632,7 @@ sub_80F7F30: @ 80F7F30
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
bl sub_80DAE0C
lsls r0, 24
@ -4664,7 +4664,7 @@ sub_80F7F7C: @ 80F7F7C
ldrb r1, [r0]
movs r0, 0x64
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r2, r1, r0
ldr r0, =gUnknown_02039F2C
ldrh r0, [r0]
@ -4703,7 +4703,7 @@ _080F7FDC:
adds r0, r2, 0
movs r1, 0x36
_080F7FE0:
bl pokemon_getattr
bl GetMonData
ldr r1, =gUnknown_02039F2E
ldrh r1, [r1]
cmp r0, r1
@ -4754,10 +4754,10 @@ _080F8048:
ldrb r0, [r6]
movs r5, 0x64
muls r0, r5
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
adds r0, r4
movs r1, 0x32
bl pokemon_getattr
bl GetMonData
lsls r0, 24
lsrs r1, r0, 24
mov r0, sp
@ -4805,10 +4805,10 @@ _080F80B8:
ldrb r0, [r7]
movs r6, 0x64
muls r0, r6
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
adds r0, r5
movs r1, 0x33
bl pokemon_getattr
bl GetMonData
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
@ -4854,10 +4854,10 @@ _080F8124:
ldrb r0, [r7]
movs r6, 0x64
muls r0, r6
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
adds r0, r5
movs r1, 0x34
bl pokemon_getattr
bl GetMonData
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
@ -4901,10 +4901,10 @@ _080F8190:
ldrb r0, [r7]
movs r6, 0x64
muls r0, r6
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
adds r0, r5
movs r1, 0x35
bl pokemon_getattr
bl GetMonData
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
@ -4944,10 +4944,10 @@ _080F81F8:
ldrb r0, [r7]
movs r6, 0x64
muls r0, r6
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
adds r0, r5
movs r1, 0x36
bl pokemon_getattr
bl GetMonData
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
@ -4990,14 +4990,14 @@ _080F8250:
thumb_func_start sub_80F8264
sub_80F8264: @ 80F8264
push {r4,lr}
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
ldr r0, =gUnknown_020375E4
ldrh r1, [r0]
lsls r1, 6
ldr r0, =gUnknown_02039E0D
adds r1, r0
adds r0, r4, 0
bl CopyString
bl StringCopy
adds r0, r4, 0
bl sub_81DB5AC
pop {r4}
@ -5009,13 +5009,13 @@ sub_80F8264: @ 80F8264
thumb_func_start sub_80F8290
sub_80F8290: @ 80F8290
push {lr}
ldr r0, =gUnknown_02021EC4
ldr r0, =gStringVar3
ldr r1, =gUnknown_020375E4
ldrh r1, [r1]
lsls r1, 6
ldr r2, =gUnknown_02039E02
adds r1, r2
bl CopyString
bl StringCopy
pop {r0}
bx r0
.pool
@ -5103,7 +5103,7 @@ sub_80F834C: @ 80F834C
movs r1, 0
ldr r2, =gUnknown_02039F20
ldrb r0, [r2]
ldr r4, =gUnknown_02021EC4
ldr r4, =gStringVar3
ldr r3, =gUnknown_02039E0D
cmp r0, 0
beq _080F836E
@ -5121,7 +5121,7 @@ _080F836E:
lsls r1, 6
adds r1, r3
adds r0, r4, 0
bl CopyString
bl StringCopy
adds r0, r4, 0
bl sub_81DB5AC
pop {r4}
@ -5136,7 +5136,7 @@ sub_80F8390: @ 80F8390
movs r1, 0
ldr r2, =gUnknown_02039F20
ldrb r0, [r2]
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
ldr r3, =gUnknown_02039E02
cmp r0, 0
beq _080F83B2
@ -5154,7 +5154,7 @@ _080F83B2:
lsls r1, 6
adds r1, r3
adds r0, r4, 0
bl CopyString
bl StringCopy
pop {r4}
pop {r0}
bx r0
@ -5582,14 +5582,14 @@ _080F8748:
movs r4, 0x3
_080F874C:
adds r0, r5, 0
bl GetStringEnd_Limit7
bl StringGetEnd10
adds r5, 0x40
subs r4, 0x1
cmp r4, 0
bge _080F874C
adds r0, r6, 0
bl DestroyTask
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x4
ldrsb r1, [r0, r1]

View File

@ -147,7 +147,7 @@ sub_80FC5DC: @ 80FC5DC
ldr r1, =gUnknown_02039F2A
movs r0, 0x1
strb r0, [r1]
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0x1
bne _080FC60C
@ -416,7 +416,7 @@ _080FC830:
lsls r0, 24
cmp r0, 0
beq _080FC880
ldr r0, =gUnknown_03005D80
ldr r0, =gRngValue
movs r1, 0x4
bl sub_80FC4F4
cmp r0, 0x1
@ -429,7 +429,7 @@ _080FC858:
lsls r0, 24
cmp r0, 0
beq _080FC880
ldr r0, =gUnknown_03005D80
ldr r0, =gRngValue
ldr r4, =gUnknown_020223C4
adds r1, r4, 0
movs r2, 0x4

View File

@ -10,7 +10,7 @@ sub_812FDA8: @ 812FDA8
push {r4-r7,lr}
ldr r3, =gUnknown_02039F5D
ldr r4, =gUnknown_02039F5C
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
subs r0, 0x1
lsls r1, r0, 5
@ -54,7 +54,7 @@ sub_812FDF8: @ 812FDF8
thumb_func_start sub_812FE0C
sub_812FE0C: @ 812FE0C
push {r4,r5,lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r0, [r0, 0x8]
bl SetMainCallback2
ldr r4, =gUnknown_030061C4
@ -83,7 +83,7 @@ sub_812FE0C: @ 812FE0C
sub_812FE58: @ 812FE58
push {r4-r7,lr}
sub sp, 0x4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -117,7 +117,7 @@ _0812FE94:
movs r0, 0x1
bl sub_8130238
bl sub_81301EC
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -161,7 +161,7 @@ _0812FEE2:
_0812FF14:
ldrh r0, [r4, 0x20]
bl SeedRng
bl InitKeypadData
bl InitKeys
bl sub_8130098
movs r0, 0x87
lsls r0, 3
@ -174,7 +174,7 @@ _0812FF2A:
ldrb r1, [r1]
bl sub_8130884
_0812FF36:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -265,7 +265,7 @@ _0812FFFA:
b _08130080
.pool
_0813001C:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r2, [r0, 0x2E]
ands r1, r2
cmp r1, 0
@ -379,13 +379,13 @@ sub_813010C: @ 813010C
ldrb r5, [r1, 0xA]
cmp r0, 0x7
bhi _08130190
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
adds r0, r4, 0
adds r1, r5, 0
bl sub_818E868
ldr r1, =gUnknown_085E8D5E
adds r0, r4, 0
bl AppendString
bl StringAppend
ldr r1, =gUnknown_085B07D4
ldr r0, [r6]
ldrb r0, [r0, 0x1E]
@ -393,35 +393,35 @@ sub_813010C: @ 813010C
adds r0, r1
ldr r1, [r0]
adds r0, r4, 0
bl AppendString
ldr r4, =gUnknown_02021DC4
bl StringAppend
ldr r4, =gStringVar2
ldr r1, [r6]
adds r1, 0x16
adds r0, r4, 0
bl CopyString
bl StringCopy
adds r0, r4, 0
bl sub_81DB5AC
ldr r0, =gUnknown_02021EC4
ldr r0, =gStringVar3
ldr r1, [r6]
adds r1, 0xB
bl CopyString
ldr r0, =gUnknown_02021FC4
bl StringCopy
ldr r0, =gStringVar4
ldr r1, =gUnknown_0827EA0C
bl ExpandStringRefs
bl StringExpandPlaceholders
b _081301A6
.pool
_08130190:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
adds r1, 0xB
bl CopyString
ldr r0, =gUnknown_02021FC4
bl StringCopy
ldr r0, =gStringVar4
ldr r2, =gUnknown_085B07F4
lsls r1, r5, 2
adds r1, r2
ldr r1, [r1]
bl ExpandStringRefs
bl StringExpandPlaceholders
_081301A6:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
movs r0, 0x1
adds r1, r4, 0
movs r2, 0xD0
@ -961,7 +961,7 @@ sub_8130688: @ 8130688
push {lr}
lsls r0, 24
lsrs r0, 24
ldr r3, =gUnknown_030022C0
ldr r3, =gMain
ldr r1, =gUnknown_085B0830
ldr r2, [r1, 0x4]
ldr r1, [r1]

156
asm/coord_event_weather.s Normal file
View File

@ -0,0 +1,156 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_809D7BC
sub_809D7BC: @ 809D7BC
push {lr}
movs r0, 0x1
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7BC
thumb_func_start sub_809D7C8
sub_809D7C8: @ 809D7C8
push {lr}
movs r0, 0x2
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7C8
thumb_func_start sub_809D7D4
sub_809D7D4: @ 809D7D4
push {lr}
movs r0, 0x3
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7D4
thumb_func_start sub_809D7E0
sub_809D7E0: @ 809D7E0
push {lr}
movs r0, 0x4
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7E0
thumb_func_start sub_809D7EC
sub_809D7EC: @ 809D7EC
push {lr}
movs r0, 0x5
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7EC
thumb_func_start sub_809D7F8
sub_809D7F8: @ 809D7F8
push {lr}
movs r0, 0x6
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7F8
thumb_func_start sub_809D804
sub_809D804: @ 809D804
push {lr}
movs r0, 0x9
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D804
thumb_func_start sub_809D810
sub_809D810: @ 809D810
push {lr}
movs r0, 0x7
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D810
thumb_func_start sub_809D81C
sub_809D81C: @ 809D81C
push {lr}
movs r0, 0x8
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D81C
thumb_func_start sub_809D828
sub_809D828: @ 809D828
push {lr}
movs r0, 0xB
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D828
thumb_func_start sub_809D834
sub_809D834: @ 809D834
push {lr}
movs r0, 0xC
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D834
thumb_func_start sub_809D840
sub_809D840: @ 809D840
push {lr}
movs r0, 0x14
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D840
thumb_func_start sub_809D84C
sub_809D84C: @ 809D84C
push {lr}
movs r0, 0x15
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D84C
thumb_func_start trigger_activate_weather
trigger_activate_weather: @ 809D858
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
movs r2, 0
ldr r3, =gUnknown_085102E0
_0809D862:
lsls r1, r2, 3
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, r4
bne _0809D87C
adds r0, r3, 0x4
adds r0, r1, r0
ldr r0, [r0]
bl _call_via_r0
b _0809D886
.pool
_0809D87C:
adds r0, r2, 0x1
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0xC
bls _0809D862
_0809D886:
pop {r4}
pop {r0}
bx r0
thumb_func_end trigger_activate_weather
.align 2, 0 @ Don't pad with nop.

3903
asm/credits.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -41,9 +41,9 @@ Init: @ 8000204
msr cpsr_cf, r0
ldr sp, sp_sys
ldr r1, =INTR_VECTOR
adr r0, InterruptMain
adr r0, IntrMain
str r0, [r1]
ldr r1, =Main + 1
ldr r1, =AgbMain + 1
mov lr, pc
bx r1
b Init
@ -56,8 +56,8 @@ sp_irq: .word IWRAM_END - 0x60
.arm
.align 2, 0
.global InterruptMain
InterruptMain: @ 8000248
.global IntrMain
IntrMain: @ 8000248
mov r3, REG_BASE
add r3, r3, 0x200
ldr r2, [r3, OFFSET_REG_IE - 0x200]
@ -69,51 +69,50 @@ InterruptMain: @ 8000248
and r1, r2, r2, lsr 16
mov r12, 0
ands r0, r1, INTR_FLAG_VCOUNT
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
mov r0, 0x1
strh r0, [r3, OFFSET_REG_IME - 0x200]
ands r0, r1, INTR_FLAG_SERIAL
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_TIMER3
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_HBLANK
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_VBLANK
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_TIMER0
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_TIMER1
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_TIMER2
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_DMA0
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_DMA1
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_DMA2
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_DMA3
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_KEYPAD
bne InterruptMain_FoundIntr
bne IntrMain_FoundIntr
add r12, r12, 0x4
ands r0, r1, INTR_FLAG_GAMEPAK
strbne r0, [r3, OFFSET_REG_SOUNDCNT_X - 0x200]
InterruptMain_Loop:
bne InterruptMain_Loop
InterruptMain_FoundIntr:
bne . @ spin
IntrMain_FoundIntr:
strh r0, [r3, OFFSET_REG_IF - 0x200]
bic r2, r2, r0
ldr r0, =gUnknown_03007868
@ -129,13 +128,13 @@ InterruptMain_FoundIntr:
bic r3, r3, PSR_I_BIT | PSR_F_BIT | PSR_MODE_MASK
orr r3, r3, PSR_SYS_MODE
msr cpsr_cf, r3
ldr r1, =gUnknown_03002710
ldr r1, =gIntrTable
add r1, r1, r12
ldr r0, [r1]
stmdb sp!, {lr}
adr lr, InterruptMain_RetAddr
adr lr, IntrMain_RetAddr
bx r0
InterruptMain_RetAddr:
IntrMain_RetAddr:
ldmia sp!, {lr}
mrs r3, cpsr
bic r3, r3, PSR_I_BIT | PSR_F_BIT | PSR_MODE_MASK

View File

@ -12,10 +12,10 @@ pokemon_get_nick: @ 806FA2C
adds r4, r1, 0
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
adds r0, r4, 0
mov r1, sp
bl CopyString_Limit10
bl StringCopy10
add sp, 0x14
pop {r4}
pop {r1}
@ -32,7 +32,7 @@ pokemon_get_nick_: @ 806FA4C
bl pokemon_getattr_encrypted
adds r0, r4, 0
mov r1, sp
bl CopyString_Limit10
bl StringCopy10
add sp, 0x14
pop {r4}
pop {r1}
@ -170,16 +170,16 @@ sub_806FB38: @ 806FB38
beq _0806FBBC
adds r0, r5, 0
adds r0, 0x74
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r1, [r1]
bl CopyString
bl StringCopy
adds r4, r5, 0
adds r4, 0x7C
adds r0, r6, 0
adds r1, r4, 0
bl pokemon_get_nick
adds r0, r4, 0
bl StripExtendedControlCodes
bl StripExtCtrlCodes
adds r4, 0xB
ldrb r1, [r4]
movs r0, 0x10
@ -190,7 +190,7 @@ sub_806FB38: @ 806FB38
strb r0, [r4]
adds r0, r6, 0
movs r1, 0x3
bl pokemon_getattr
bl GetMonData
lsls r0, 4
ldrb r2, [r4]
movs r1, 0xF
@ -199,10 +199,10 @@ sub_806FB38: @ 806FB38
strb r1, [r4]
adds r0, r6, 0
movs r1, 0x40
bl pokemon_getattr
bl GetMonData
lsls r0, 24
lsrs r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
lsls r2, r0, 3
adds r2, r0
@ -270,9 +270,9 @@ daycare_send_selected_pokemon: @ 806FC18
lsrs r0, 24
movs r1, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
ldr r2, =0x00003030
adds r1, r2
@ -375,7 +375,7 @@ sub_806FCF8: @ 806FCF8
push {r4-r7,lr}
sub sp, 0x68
adds r5, r0, 0
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl pokemon_get_nick_
adds r0, r5, 0
movs r1, 0xB
@ -387,12 +387,12 @@ sub_806FCF8: @ 806FCF8
bl sub_8069004
mov r0, sp
movs r1, 0x38
bl pokemon_getattr
bl GetMonData
cmp r0, 0x64
beq _0806FD46
mov r0, sp
movs r1, 0x19
bl pokemon_getattr
bl GetMonData
adds r1, r5, 0
adds r1, 0x88
ldr r1, [r1]
@ -405,7 +405,7 @@ sub_806FCF8: @ 806FCF8
mov r0, sp
bl sub_806FCA4
_0806FD46:
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
movs r1, 0xFA
lsls r1, 1
adds r6, r0, r1
@ -466,7 +466,7 @@ sub_806FD9C: @ 806FD9C
thumb_func_start sub_806FDC4
sub_806FDC4: @ 806FDC4
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -540,12 +540,12 @@ sub_806FE54: @ 806FE54
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
adds r1, r4, 0
movs r2, 0
movs r3, 0x2
bl ConvertIntToDecimalString
ldr r1, =gUnknown_02021CC4
bl ConvertIntToDecimalStringN
ldr r1, =gStringVar1
adds r0, r5, 0
bl pokemon_get_nick_
adds r0, r4, 0
@ -563,17 +563,17 @@ sub_806FE88: @ 806FE88
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
adds r0, r5, 0
bl pokemon_get_nick_
movs r0, 0x64
muls r4, r0
adds r4, 0x64
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
adds r1, r4, 0
movs r2, 0
movs r3, 0x5
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r4, 0
pop {r4,r5}
pop {r1}
@ -599,7 +599,7 @@ sub_806FEC0: @ 806FEC0
thumb_func_start sub_806FED8
sub_806FED8: @ 806FED8
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -617,7 +617,7 @@ sub_806FED8: @ 806FED8
sub_806FF04: @ 806FF04
lsls r0, 16
lsrs r0, 16
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
ldr r1, =0x000030b8
adds r3, r2, r1
@ -636,7 +636,7 @@ sub_806FF04: @ 806FF04
thumb_func_start sub_806FF30
sub_806FF30: @ 806FF30
push {r4-r6,lr}
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
ldr r5, =gUnknown_020375E0
ldrh r0, [r5]
movs r4, 0x8C
@ -860,7 +860,7 @@ _080700C8:
ble _080700AE
cmp r5, 0x2
bne _080700E2
bl GenerateRandomNumber
bl Random
lsls r0, 16
ldr r1, =0x7ffe0000
movs r7, 0x1
@ -875,7 +875,7 @@ _080700E2:
bl pokemon_getattr_encrypted
cmp r0, 0xC3
bne _080700FE
bl GenerateRandomNumber
bl Random
lsls r0, 16
ldr r1, =0x7ffe0000
cmp r0, r1
@ -899,7 +899,7 @@ sub_8070114: @ 8070114
push {r4-r7,lr}
adds r5, r0, 0
movs r6, 0
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r0, [r0, 0x24]
bl SeedRng2
adds r0, r5, 0
@ -907,9 +907,9 @@ sub_8070114: @ 8070114
adds r1, r0, 0
cmp r1, 0
bge _08070160
bl GenerateRandomNumber2
bl Random2
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
movs r1, 0x8C
lsls r1, 1
adds r5, r1
@ -936,9 +936,9 @@ _08070160:
lsls r0, 24
lsrs r7, r0, 24
_08070176:
bl GenerateRandomNumber2
bl Random2
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsls r0, 16
lsrs r0, 16
@ -974,7 +974,7 @@ _080701AC:
sub_80701B8: @ 80701B8
push {r4,lr}
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
movs r1, 0x8C
lsls r1, 1
adds r4, r1
@ -995,7 +995,7 @@ sub_80701B8: @ 80701B8
thumb_func_start sub_80701E0
sub_80701E0: @ 80701E0
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -1008,7 +1008,7 @@ sub_80701E0: @ 80701E0
thumb_func_start sub_80701FC
sub_80701FC: @ 80701FC
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -1084,7 +1084,7 @@ _08070276:
movs r5, 0
adds r6, r1, 0
_08070288:
bl GenerateRandomNumber
bl Random
mov r1, sp
adds r4, r1, r5
lsls r0, 16
@ -1106,7 +1106,7 @@ _08070288:
movs r5, 0
movs r4, 0x1
_080702B8:
bl GenerateRandomNumber
bl Random
adds r1, r7, r5
lsls r0, 16
lsrs r0, 16
@ -1245,7 +1245,7 @@ pokemon_get_eggmoves: @ 80703C8
movs r6, 0
movs r4, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r3, r0, 16
movs r2, 0
@ -1376,7 +1376,7 @@ _080704C4:
bls _080704C4
adds r0, r7, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r0, 16
ldr r1, =gUnknown_020249C4
@ -1662,7 +1662,7 @@ sub_8070710: @ 8070710
thumb_func_start sub_8070728
sub_8070728: @ 8070728
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -1920,7 +1920,7 @@ _08070918:
mov r0, sp
movs r1, 0x2D
bl pokemon_setattr
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
movs r1, 0xFA
lsls r1, 1
adds r0, r1
@ -2099,7 +2099,7 @@ sub_8070A0C: @ 8070A0C
thumb_func_start sp0B8_daycare
sp0B8_daycare: @ 8070AA8
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -2154,7 +2154,7 @@ _08070AEE:
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x64
@ -2183,21 +2183,21 @@ _08070B34:
ldrb r0, [r0]
cmp r5, r0
bcs _08070BC0
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
_08070B5C:
adds r0, r4, 0
movs r1, 0x2D
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _08070BB4
adds r0, r4, 0
movs r1, 0x4
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _08070BB4
adds r0, r4, 0
movs r1, 0x20
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
str r1, [sp]
cmp r0, 0
@ -2242,7 +2242,7 @@ _08070BC2:
thumb_func_start sub_8070BD0
sub_8070BD0: @ 8070BD0
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -2278,16 +2278,16 @@ sub_8070C04: @ 8070C04
bl pokemon_getattr_encrypted
cmp r0, 0
beq _08070C2E
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
adds r0, r4, 0
bl pokemon_get_nick_
adds r0, r4, 0
movs r1, 0x7
mov r2, sp
bl pokemon_getattr_encrypted
ldr r0, =gUnknown_02021EC4
ldr r0, =gStringVar3
mov r1, sp
bl CopyString
bl StringCopy
_08070C2E:
adds r4, 0x8C
adds r0, r4, 0
@ -2295,7 +2295,7 @@ _08070C2E:
bl pokemon_getattr_encrypted
cmp r0, 0
beq _08070C44
ldr r1, =gUnknown_02021DC4
ldr r1, =gStringVar2
adds r0, r4, 0
bl pokemon_get_nick_
_08070C44:
@ -2314,9 +2314,9 @@ sub_8070C58: @ 8070C58
lsrs r0, 24
movs r5, 0x64
muls r0, r5
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
adds r0, r4
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl pokemon_get_nick_
bl brm_get_pokemon_selection
lsls r0, 24
@ -2336,7 +2336,7 @@ sub_8070C58: @ 8070C58
thumb_func_start sp0B5_daycare
sp0B5_daycare: @ 8070C94
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -2349,7 +2349,7 @@ sp0B5_daycare: @ 8070C94
thumb_func_start sp0B6_daycare
sp0B6_daycare: @ 8070CB0
push {r4,lr}
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldr r1, =0x00003030
adds r0, r1
@ -2385,7 +2385,7 @@ _08070CF2:
thumb_func_start sub_8070CF8
sub_8070CF8: @ 8070CF8
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -2587,7 +2587,7 @@ _08070E5C:
thumb_func_start daycare_relationship_score_from_savegame
daycare_relationship_score_from_savegame: @ 8070E6C
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -2623,12 +2623,12 @@ _08070EAC:
bne _08070EB2
movs r1, 0
_08070EB2:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r2, =gUnknown_0832B6F8
lsls r1, 2
adds r1, r2
ldr r1, [r1]
bl CopyString
bl StringCopy
pop {r0}
bx r0
.pool
@ -2739,7 +2739,7 @@ _08070F84:
ldr r1, =gUnknown_0832DACB
_08070F86:
adds r0, r4, 0
bl AppendString
bl StringAppend
pop {r4}
pop {r1}
bx r1
@ -2799,20 +2799,20 @@ _08070FCC:
bls _08070FCC
adds r0, r7, 0
mov r1, sp
bl CopyString
bl StringCopy
ldr r4, =gUnknown_085EF881
adds r0, r7, 0
adds r1, r4, 0
bl AppendString
bl StringAppend
adds r0, r7, 0
mov r1, r9
bl AppendString
bl StringAppend
adds r0, r7, 0
adds r1, r4, 0
bl AppendString
bl StringAppend
ldr r1, =gUnknown_085EF883
adds r0, r7, 0
bl AppendString
bl StringAppend
add sp, 0x28
pop {r3,r4}
mov r8, r3
@ -2835,7 +2835,7 @@ sub_8071038: @ 8071038
_08071046:
adds r0, r4, 0
ldr r1, =gUnknown_085EF888
bl AppendString
bl StringAppend
movs r0, 0x8C
adds r2, r5, 0
muls r2, r0
@ -2851,13 +2851,13 @@ _08071046:
mov r0, sp
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r4, 0
mov r1, sp
bl AppendString
bl StringAppend
adds r0, r4, 0
ldr r1, =gUnknown_085EF881
bl AppendString
bl StringAppend
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
@ -2973,7 +2973,7 @@ sub_8071148: @ 8071148
lsrs r5, 24
ldr r1, =gUnknown_085EF888
mov r0, sp
bl CopyString
bl StringCopy
movs r0, 0x8C
adds r1, r6, 0
muls r1, r0
@ -2989,10 +2989,10 @@ sub_8071148: @ 8071148
adds r0, r4, 0
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
mov r0, sp
adds r1, r4, 0
bl AppendString
bl StringAppend
movs r0, 0x1
mov r1, sp
movs r2, 0x70
@ -3023,7 +3023,7 @@ sub_80711B8: @ 80711B8
lsrs r5, r2, 24
cmp r6, 0x1
bhi _080711F0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r8, r0
ldr r0, [r0]
ldr r4, =0x00003030
@ -3062,7 +3062,7 @@ c3_080469FC: @ 8071204
ldrb r0, [r4, 0x8]
bl ListMenuHandleInput
adds r1, r0, 0
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r2, [r0, 0x2E]
movs r0, 0x1
ands r0, r2
@ -3182,7 +3182,7 @@ sub_80712C0: @ 80712C0
sub_8071330: @ 8071330
push {lr}
bl sub_81B9328
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldr r0, =c2_exit_to_overworld_2_switch
str r0, [r1, 0x8]
pop {r0}

View File

@ -23,7 +23,7 @@ _0812697E:
ldrb r0, [r2, 0x9]
cmp r0, 0
bne _08126996
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x00001aae
adds r1, r0, r3
@ -35,7 +35,7 @@ _08126996:
ldrb r0, [r2, 0x9]
cmp r0, 0x1
bne _081269AC
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x0000271c
adds r1, r0, r3
@ -177,7 +177,7 @@ sub_8126AD8: @ 8126AD8
lsrs r4, 24
bl sub_8126ABC
ldr r2, =gUnknown_0203A17C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x00001aae
adds r1, r0, r3
@ -210,7 +210,7 @@ sub_8126B2C: @ 8126B2C
lsrs r4, 24
bl sub_8126ABC
ldr r2, =gUnknown_0203A17C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x0000271c
adds r1, r0, r3
@ -335,10 +335,10 @@ sub_8126C48: @ 8126C48
lsls r0, 24
cmp r0, 0
bne _08126C7C
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA83D
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8126DA4
adds r0, r5, 0
adds r1, r4, 0
@ -375,10 +375,10 @@ sub_8126CA4: @ 8126CA4
lsls r0, 24
cmp r0, 0
bne _08126CD8
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EAAEC
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8126DA4
adds r0, r5, 0
adds r1, r4, 0
@ -419,10 +419,10 @@ sub_8126D10: @ 8126D10
lsls r0, 24
cmp r0, 0
bne _08126D44
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA83D
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8126DA4
adds r0, r5, 0
adds r1, r4, 0
@ -717,11 +717,11 @@ _08126FA2:
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
adds r0, r4, 0
bl sub_8127058
adds r0, r4, 0
bl GetStringLength
bl StringLength
lsls r0, 16
lsrs r0, 16
adds r6, r0, r4
@ -731,7 +731,7 @@ _08126FA2:
adds r0, r1
ldr r1, [r0]
adds r0, r6, 0
bl CopyString
bl StringCopy
str r5, [sp]
mov r0, r9
str r0, [sp, 0x4]
@ -751,7 +751,7 @@ _08126FA2:
adds r0, r6, 0
movs r2, 0x1
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r6, r0, 0
movs r0, 0xBA
strb r0, [r6]
@ -764,7 +764,7 @@ _08126FA2:
adds r0, r6, 0
movs r2, 0x1
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r0, 0x1
adds r1, r4, 0
ldr r2, [sp, 0x14]
@ -799,7 +799,7 @@ sub_8127058: @ 8127058
lsls r4, r1, 24
lsrs r4, 24
ldr r1, =gUnknown_085EA7C8
bl CopyString
bl StringCopy
cmp r4, 0x1
bne _08127078
movs r0, 0x4
@ -908,10 +908,10 @@ sub_81270E8: @ 81270E8
_08127154:
movs r0, 0x1
bl sub_8126A58
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA83D
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8127180
adds r0, r5, 0
adds r1, r4, 0
@ -1030,7 +1030,7 @@ sub_8127250: @ 8127250
lsrs r1, 22
adds r1, r2
ldr r1, [r1]
bl CopyString
bl StringCopy
pop {r0}
bx r0
.pool
@ -1153,13 +1153,13 @@ sub_8127330: @ 8127330
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08127378
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r1, 0x1
bl sub_8127058
b _08127380
.pool
_08127378:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r1, 0
bl sub_8127058
_08127380:
@ -1217,7 +1217,7 @@ _081273D6:
ldr r0, [r5]
adds r0, r4
ldr r1, =gUnknown_085E8CF0
bl CopyString
bl StringCopy
ldr r0, [r5]
lsls r2, r6, 3
adds r1, r0, r2
@ -1261,14 +1261,14 @@ sub_8127454: @ 8127454
adds r5, r0, 0
lsls r4, r1, 16
lsrs r4, 16
ldr r1, =gUnknown_02021CC4
bl CopyString
ldr r1, =gStringVar1
bl StringCopy
lsls r4, 5
ldr r0, =gUnknown_085A5C09
adds r4, r0
adds r0, r5, 0
adds r1, r4, 0
bl AppendString
bl StringAppend
pop {r4,r5}
pop {r0}
bx r0
@ -1722,7 +1722,7 @@ sub_8127814: @ 8127814
movs r2, 0xC
bl memset
movs r6, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r10, r0
ldr r1, =0x00001aae
mov r9, r1
@ -1810,7 +1810,7 @@ _081278E2:
ldr r3, =gUnknown_0203BC40
mov r8, r3
_081278F4:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x0000271c
adds r0, r1
@ -1826,7 +1826,7 @@ _08127918:
ldr r0, =gUnknown_0203A14C
ldr r1, [r0]
adds r1, r2
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x0000271c
adds r0, r3
@ -1991,7 +1991,7 @@ sub_8127A5C: @ 8127A5C
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
@ -2049,7 +2049,7 @@ sub_8127ACC: @ 8127ACC
adds r2, r0
lsls r2, 3
adds r4, r2, r3
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldrh r0, [r1]
strh r0, [r4, 0xE]
@ -2074,7 +2074,7 @@ sub_8127B04: @ 8127B04
lsls r5, 24
lsrs r5, 24
bl DrawWholeMapView
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r0, 0x4
ldrsb r0, [r1, r0]
@ -2477,7 +2477,7 @@ sub_8127E18: @ 8127E18
mov r8, r0
ldr r1, =gUnknown_020375E4
mov r10, r1
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
mov r9, r2
_08127E34:
adds r5, r6, 0
@ -2636,10 +2636,10 @@ sub_8127F68: @ 8127F68
beq _08127FAC
cmp r0, 0x7
beq _08127FAC
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA9AE
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8127A5C
adds r0, r5, 0
adds r1, r4, 0
@ -2672,36 +2672,36 @@ _08127FAC:
b _0812804C
.pool
_08127FE8:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r4, =gUnknown_0203A17C
ldrb r1, [r4, 0x8]
movs r2, 0x1
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldrb r0, [r4, 0x9]
cmp r0, 0
bne _08128018
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085EA8EA
bl ExpandStringRefs
bl StringExpandPlaceholders
b _08128020
.pool
_08128018:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085EA931
bl ExpandStringRefs
bl StringExpandPlaceholders
_08128020:
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
ldr r2, =sub_8127A5C
adds r0, r5, 0
bl DisplayItemMessageOnField
b _0812804C
.pool
_08128038:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA8D2
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8127A5C
adds r0, r5, 0
adds r1, r4, 0
@ -2898,7 +2898,7 @@ _081281E2:
lsls r0, 24
lsrs r2, r0, 24
_081281EA:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -3168,10 +3168,10 @@ sub_8128414: @ 8128414
adds r0, r3
strh r2, [r0, 0x3C]
bl sub_8128DE0
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
ldr r1, =gUnknown_085EA8BF
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8128B80
adds r0, r4, 0
adds r1, r5, 0
@ -3834,10 +3834,10 @@ sub_8128950: @ 8128950
lsrs r0, 24
cmp r0, 0x1
bne _081289A4
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA897
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_81289D0
adds r0, r5, 0
adds r1, r4, 0
@ -3847,10 +3847,10 @@ sub_8128950: @ 8128950
_081289A4:
movs r0, 0x20
bl audio_play
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA8A6
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8129020
adds r0, r5, 0
adds r1, r4, 0
@ -4339,7 +4339,7 @@ _08128DAE:
thumb_func_start sub_8128DB4
sub_8128DB4: @ 8128DB4
push {lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r0, [r0, 0x2C]
movs r1, 0xF0
ands r1, r0
@ -4440,7 +4440,7 @@ _08128E76:
b _08128FBA
.pool
_08128E88:
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2C]
movs r7, 0xF0
adds r0, r7, 0
@ -4582,7 +4582,7 @@ _08128F94:
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08128FBA
ldr r3, =gUnknown_030022C0
ldr r3, =gMain
ldrh r1, [r3, 0x2E]
movs r2, 0x1
adds r0, r2, 0
@ -4644,7 +4644,7 @@ sub_8129020: @ 8129020
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -5809,10 +5809,10 @@ _08129968:
lsrs r0, 24
cmp r0, 0x1
bne _08129994
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EAAC5
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8129D64
adds r0, r5, 0
adds r1, r4, 0
@ -5885,7 +5885,7 @@ SetUpPuttingAwayDecorationPlayerAvatar: @ 81299DC
lsls r0, 24
lsrs r0, 24
str r0, [r4, 0x4]
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -6136,10 +6136,10 @@ sub_8129BF8: @ 8129BF8
adds r0, r3
ldr r1, =DummyObjectCallback
str r1, [r0]
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
ldr r1, =gUnknown_085EAA62
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_812A1F0
adds r0, r4, 0
adds r1, r5, 0
@ -6161,10 +6161,10 @@ sub_8129C74: @ 8129C74
ldrb r0, [r0]
cmp r0, 0
beq _08129CA8
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EAAA3
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_812A1A0
b _08129D14
.pool
@ -6215,10 +6215,10 @@ _08129CDE:
adds r0, r3
ldr r1, =DummyObjectCallback
str r1, [r0]
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EAA62
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_812A1F0
_08129D14:
adds r0, r5, 0
@ -6227,10 +6227,10 @@ _08129D14:
b _08129D50
.pool
_08129D3C:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EAA81
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8129D64
adds r0, r5, 0
adds r1, r4, 0
@ -6247,7 +6247,7 @@ sub_8129D64: @ 8129D64
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -6501,7 +6501,7 @@ sub_8129F20: @ 8129F20
movs r6, 0xF
ands r6, r0
movs r4, 0
ldr r7, =gUnknown_03005D8C
ldr r7, =gSaveBlock1Ptr
mov r9, r3
_08129F4A:
ldr r1, [r7]
@ -7038,7 +7038,7 @@ _0812A398:
thumb_func_start sub_812A39C
sub_812A39C: @ 812A39C
push {lr}
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -7075,7 +7075,7 @@ sub_812A3D4: @ 812A3D4
lsrs r0, 24
cmp r0, 0x1
bne _0812A430
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, =gUnknown_0203A172
ldrb r2, [r1]
ldr r1, =gUnknown_0203A14C
@ -7085,11 +7085,11 @@ sub_812A3D4: @ 812A3D4
lsls r1, 5
ldr r2, =gUnknown_085A5C09
adds r1, r2
bl CopyString
ldr r4, =gUnknown_02021FC4
bl StringCopy
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EAA14
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_812A458
adds r0, r5, 0
adds r1, r4, 0
@ -7097,10 +7097,10 @@ sub_812A3D4: @ 812A3D4
b _0812A444
.pool
_0812A430:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EA9E0
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8127A5C
adds r0, r5, 0
adds r1, r4, 0
@ -7150,10 +7150,10 @@ sub_812A478: @ 812A478
bl sub_8161A38
adds r0, r4, 0
bl sub_8127814
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
ldr r1, =gUnknown_085EAA3D
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_8127A5C
adds r0, r4, 0
adds r1, r5, 0

View File

@ -9,7 +9,7 @@
sub_81224D4: @ 81224D4
push {r4-r7,lr}
movs r6, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
_081224DA:
movs r0, 0xA
bl sub_811EE38
@ -19,7 +19,7 @@ _081224DA:
ldr r2, =0x00002e6c
adds r1, r2
strh r0, [r1]
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
cmp r1, 0
@ -41,7 +41,7 @@ _08122514:
adds r1, r2
_08122522:
strh r0, [r1]
bl GenerateRandomNumber
bl Random
ldr r3, [r5]
adds r3, r4
movs r2, 0x1
@ -66,7 +66,7 @@ _08122522:
lsrs r6, r0, 16
cmp r6, 0x4
bls _081224DA
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e68
adds r0, r1
@ -109,7 +109,7 @@ _081225AA:
lsls r0, r3, 3
ldr r4, =0x00002e68
adds r0, r4
ldr r3, =gUnknown_03005D8C
ldr r3, =gSaveBlock1Ptr
ldr r1, [r3]
adds r5, r1, r0
ldrb r6, [r5, 0x1]
@ -236,7 +236,7 @@ _0812269E:
bhi _081226AE
b _081225AA
_081226AE:
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldr r1, =0x00002e68
adds r0, r1
@ -286,7 +286,7 @@ _081226F8:
lsls r0, 24
cmp r0, 0
bne _08122744
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
mov r0, r8
ldrh r2, [r0]
@ -317,7 +317,7 @@ _08122744:
bl sub_8122B28
movs r5, 0
_08122762:
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
lsls r4, r5, 3
ldr r1, =0x00002e68
adds r0, r4, r1
@ -576,7 +576,7 @@ _08122946:
movs r2, 0x2
bl sub_8122804
adds r4, r7, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e68
adds r1, r0
@ -613,13 +613,13 @@ _08122980:
thumb_func_start sub_8122998
sub_8122998: @ 8122998
push {lr}
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E0
ldrh r1, [r0]
lsls r1, 3
ldr r0, [r2]
adds r1, r0
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r2, =0x00002e6c
adds r1, r2
movs r2, 0x2
@ -634,7 +634,7 @@ sub_8122998: @ 8122998
sub_81229C8: @ 81229C8
push {r4,lr}
movs r4, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
ldr r1, =0x00002e68
adds r0, r3, r1
@ -678,7 +678,7 @@ _08122A0C:
thumb_func_start sub_8122A30
sub_8122A30: @ 8122A30
ldr r2, =gUnknown_020375F0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x00002e6c
adds r1, r0, r3
@ -801,7 +801,7 @@ _08122B16:
movs r0, 0x1
b _08122B22
_08122B1A:
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r0, r1
_08122B22:
@ -814,7 +814,7 @@ _08122B22:
sub_8122B28: @ 8122B28
push {r4,r5,lr}
adds r5, r0, 0
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x62
@ -823,7 +823,7 @@ sub_8122B28: @ 8122B28
lsrs r4, r0, 16
cmp r4, 0x32
bls _08122B6A
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x62
@ -832,7 +832,7 @@ sub_8122B28: @ 8122B28
lsrs r4, r0, 16
cmp r4, 0x50
bls _08122B6A
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x62
@ -850,7 +850,7 @@ _08122B6A:
ands r0, r2
orrs r0, r1
strh r0, [r5]
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r4, 0x1
@ -864,7 +864,7 @@ _08122B6A:
ands r1, r2
orrs r1, r0
strb r1, [r5]
bl GenerateRandomNumber
bl Random
strh r0, [r5, 0x2]
pop {r4,r5}
pop {r0}
@ -877,7 +877,7 @@ sub_8122BB0: @ 8122BB0
push {r4-r6,lr}
adds r5, r0, 0
movs r4, 0
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
_08122BB8:
lsls r1, r4, 3
ldr r0, [r6]

View File

@ -196,7 +196,7 @@ sub_8177A50: @ 8177A50
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
@ -261,23 +261,23 @@ pokedex_diploma_something: @ 8177AD4
lsls r1, 1
movs r0, 0x14
bl SetGpuReg
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, =gUnknown_085EE855
bl CopyString
bl StringCopy
b _08177B0C
.pool
_08177AFC:
movs r0, 0x14
movs r1, 0
bl SetGpuReg
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, =gUnknown_085EE84F
bl CopyString
bl StringCopy
_08177B0C:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EE85E
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
adds r0, r4, 0
movs r1, 0
movs r2, 0x1

View File

@ -1,555 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start ClearDma3Requests
@ void ClearDma3Requests()
ClearDma3Requests: @ 8000BB8
push {lr}
ldr r2, =gDma3ManagerLocked
movs r0, 0x1
strb r0, [r2]
ldr r1, =gDma3RequestCursor
movs r0, 0
strb r0, [r1]
movs r3, 0
ldr r0, =gDma3Requests
movs r1, 0x7F
_8000BCC:
strh r3, [r0, 0x8]
str r3, [r0]
str r3, [r0, 0x4]
adds r0, 0x10
subs r1, 0x1
cmp r1, 0
bge _8000BCC
movs r0, 0
strb r0, [r2]
pop {r0}
bx r0
.pool
thumb_func_end ClearDma3Requests
thumb_func_start ProcessDma3Requests
@ void ProcessDma3Requests()
ProcessDma3Requests: @ 8000BF0
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0xC
ldr r0, =gDma3ManagerLocked
ldrb r0, [r0]
cmp r0, 0
beq _08000C06
b _08000E46
_08000C06:
movs r0, 0
str r0, [sp, 0x8]
ldr r1, =gDma3Requests
ldr r2, =gDma3RequestCursor
ldrb r0, [r2]
lsls r0, 4
adds r0, r1
ldrh r0, [r0, 0x8]
mov r12, r2
cmp r0, 0
bne _08000C1E
b _08000E46
_08000C1E:
mov r8, r1
adds r1, 0x4
mov r10, r1
movs r6, 0x80
lsls r6, 5
ldr r7, =REG_DMA3
movs r2, 0
mov r9, r2
_08000C2E:
mov r3, r12
ldrb r0, [r3]
lsls r5, r0, 4
mov r0, r8
adds r1, r5, r0
ldrh r0, [r1, 0x8]
ldr r2, [sp, 0x8]
adds r0, r2, r0
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0x8]
movs r0, 0xA0
lsls r0, 8
ldr r3, [sp, 0x8]
cmp r3, r0
bls _08000C50
b _08000E46
_08000C50:
ldr r0, =REG_VCOUNT
ldrb r0, [r0]
cmp r0, 0xE0
bls _08000C5A
b _08000E46
_08000C5A:
ldrh r0, [r1, 0xA]
cmp r0, 0x2
beq _08000CD0
cmp r0, 0x2
bgt _08000C80
cmp r0, 0x1
beq _08000C8C
b _08000DF0
.pool
_08000C80:
cmp r0, 0x3
beq _08000D3C
cmp r0, 0x4
bne _08000C8A
b _08000D88
_08000C8A:
b _08000DF0
_08000C8C:
ldr r3, [r1]
mov r2, r10
adds r0, r5, r2
ldr r2, [r0]
ldrh r1, [r1, 0x8]
cmp r1, r6
bhi _08000CA6
str r3, [r7]
str r2, [r7, 0x4]
lsrs r0, r1, 2
movs r1, 0x84
lsls r1, 24
b _08000DAA
_08000CA6:
ldr r4, =REG_DMA3
str r3, [r4]
str r2, [r4, 0x4]
ldr r0, =0x84000400
str r0, [r4, 0x8]
ldr r0, [r4, 0x8]
adds r3, r6
adds r2, r6
subs r1, r6
cmp r1, r6
bhi _08000CA6
str r3, [r4]
str r2, [r4, 0x4]
lsrs r0, r1, 2
movs r1, 0x84
lsls r1, 24
b _08000D76
.pool
_08000CD0:
mov r3, r10
adds r0, r5, r3
ldr r4, [r0]
ldrh r1, [r1, 0x8]
cmp r1, r6
bhi _08000CF4
mov r0, r8
adds r0, 0xC
adds r0, r5, r0
ldr r0, [r0]
str r0, [sp]
mov r5, sp
str r5, [r7]
str r4, [r7, 0x4]
lsrs r0, r1, 2
movs r1, 0x85
lsls r1, 24
b _08000DAA
_08000CF4:
mov r2, r12
ldrb r0, [r2]
lsls r0, 4
mov r5, r8
adds r5, 0xC
adds r0, r5
ldr r0, [r0]
str r0, [sp]
ldr r3, =REG_DMA3
mov r0, sp
str r0, [r3]
str r4, [r3, 0x4]
ldr r0, =0x85000400
str r0, [r3, 0x8]
ldr r0, [r3, 0x8]
adds r4, r6
subs r1, r6
cmp r1, r6
bhi _08000CF4
ldrb r0, [r2]
lsls r0, 4
adds r0, r5
ldr r0, [r0]
str r0, [sp]
mov r2, sp
str r2, [r3]
str r4, [r3, 0x4]
lsrs r0, r1, 2
movs r1, 0x85
lsls r1, 24
b _08000DEA
.pool
_08000D3C:
ldr r3, [r1]
mov r2, r10
adds r0, r5, r2
ldr r2, [r0]
ldrh r1, [r1, 0x8]
cmp r1, r6
bhi _08000D56
str r3, [r7]
str r2, [r7, 0x4]
lsrs r0, r1, 1
movs r1, 0x80
lsls r1, 24
b _08000DAA
_08000D56:
ldr r4, =REG_DMA3
str r3, [r4]
str r2, [r4, 0x4]
ldr r0, =0x80000800
str r0, [r4, 0x8]
ldr r0, [r4, 0x8]
adds r3, r6
adds r2, r6
subs r1, r6
cmp r1, r6
bhi _08000D56
str r3, [r4]
str r2, [r4, 0x4]
lsrs r0, r1, 1
movs r1, 0x80
lsls r1, 24
_08000D76:
orrs r0, r1
str r0, [r4, 0x8]
ldr r0, [r4, 0x8]
b _08000DF0
.pool
_08000D88:
mov r3, r10
adds r0, r5, r3
ldr r2, [r0]
ldrh r4, [r1, 0x8]
add r1, sp, 0x4
cmp r4, r6
bhi _08000DB2
mov r0, r8
adds r0, 0xC
adds r0, r5, r0
ldr r0, [r0]
strh r0, [r1]
str r1, [r7]
str r2, [r7, 0x4]
lsrs r0, r4, 1
movs r1, 0x81
lsls r1, 24
_08000DAA:
orrs r0, r1
str r0, [r7, 0x8]
ldr r0, [r7, 0x8]
b _08000DF0
_08000DB2:
mov r5, r12
ldrb r0, [r5]
lsls r0, 4
ldr r3, =gUnknown_0300001C
adds r0, r3
ldr r0, [r0]
strh r0, [r1]
ldr r3, =REG_DMA3
str r1, [r3]
str r2, [r3, 0x4]
ldr r0, =0x81000800
str r0, [r3, 0x8]
ldr r0, [r3, 0x8]
adds r2, r6
subs r4, r6
cmp r4, r6
bhi _08000DB2
ldrb r0, [r5]
lsls r0, 4
ldr r5, =gUnknown_0300001C
adds r0, r5
ldr r0, [r0]
strh r0, [r1]
str r1, [r3]
str r2, [r3, 0x4]
lsrs r0, r4, 1
movs r1, 0x81
lsls r1, 24
_08000DEA:
orrs r0, r1
str r0, [r3, 0x8]
ldr r0, [r3, 0x8]
_08000DF0:
ldr r1, =gDma3Requests
mov r3, r12
ldrb r0, [r3]
lsls r0, 4
adds r0, r1
mov r2, r9
str r2, [r0]
ldrb r0, [r3]
lsls r0, 4
add r0, r10
str r2, [r0]
ldrb r0, [r3]
lsls r0, 4
adds r0, r1
movs r4, 0
strh r2, [r0, 0x8]
ldrb r0, [r3]
lsls r0, 4
adds r0, r1
mov r5, r9
strh r5, [r0, 0xA]
ldrb r0, [r3]
lsls r0, 4
adds r1, 0xC
adds r0, r1
mov r1, r9
str r1, [r0]
ldrb r0, [r3]
adds r0, 0x1
strb r0, [r3]
lsls r0, 24
cmp r0, 0
bge _08000E34
strb r4, [r3]
_08000E34:
mov r2, r12
ldrb r0, [r2]
lsls r0, 4
ldr r3, =gDma3Requests
adds r0, r3
ldrh r0, [r0, 0x8]
cmp r0, 0
beq _08000E46
b _08000C2E
_08000E46:
add sp, 0xC
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end ProcessDma3Requests
thumb_func_start RequestDma3Copy
@ int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode)
RequestDma3Copy: @ 8000E68
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
mov r12, r0
mov r8, r1
lsls r2, 16
lsrs r7, r2, 16
lsls r3, 24
lsrs r4, r3, 24
movs r5, 0
ldr r1, =gDma3ManagerLocked
movs r0, 0x1
strb r0, [r1]
ldr r0, =gDma3RequestCursor
ldrb r2, [r0]
mov r10, r1
ldr r6, =gDma3Requests
mov r9, r6
lsls r0, r2, 4
adds r1, r0, r6
_08000E94:
lsls r3, r2, 4
ldrh r0, [r1, 0x8]
cmp r0, 0
bne _08000ED4
mov r0, r12
str r0, [r1]
mov r0, r9
adds r0, 0x4
adds r0, r3, r0
mov r3, r8
str r3, [r0]
strh r7, [r1, 0x8]
cmp r4, 0x1
bne _08000EC0
strh r4, [r1, 0xA]
b _08000EC4
.pool
_08000EC0:
movs r0, 0x3
strh r0, [r1, 0xA]
_08000EC4:
movs r0, 0
ldr r1, =gDma3ManagerLocked
strb r0, [r1]
lsls r0, r2, 16
asrs r0, 16
b _08000EF0
.pool
_08000ED4:
adds r1, 0x10
adds r2, 0x1
cmp r2, 0x7F
ble _08000EE0
adds r1, r6, 0
movs r2, 0
_08000EE0:
adds r5, 0x1
cmp r5, 0x7F
ble _08000E94
movs r0, 0
mov r3, r10
strb r0, [r3]
movs r0, 0x1
negs r0, r0
_08000EF0:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end RequestDma3Copy
thumb_func_start RequestDma3Fill
@ int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode)
RequestDma3Fill: @ 8000F00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
mov r9, r0
mov r8, r1
lsls r2, 16
lsrs r7, r2, 16
lsls r3, 24
lsrs r5, r3, 24
movs r6, 0
ldr r0, =gDma3RequestCursor
ldrb r2, [r0]
ldr r1, =gDma3ManagerLocked
movs r0, 0x1
strb r0, [r1]
mov r10, r1
ldr r0, =gDma3Requests
mov r12, r0
mov r4, r12
lsls r0, r2, 4
adds r0, 0x8
adds r1, r0, r4
_8000F30:
lsls r3, r2, 4
ldrh r0, [r1]
cmp r0, 0
bne _08000F78
adds r0, r4, 0x4
adds r0, r3, r0
mov r6, r8
str r6, [r0]
strh r7, [r1]
strh r5, [r1, 0x2]
adds r0, r4, 0
adds r0, 0xC
adds r0, r3, r0
mov r3, r9
str r3, [r0]
cmp r5, 0x1
bne _08000F64
movs r0, 0x2
b _08000F66
.pool
_08000F64:
movs r0, 0x4
_08000F66:
strh r0, [r1, 0x2]
movs r0, 0
ldr r6, =gDma3ManagerLocked
strb r0, [r6]
lsls r0, r2, 16
asrs r0, 16
b _08000F96
.pool
_08000F78:
adds r1, 0x10
adds r2, 0x1
cmp r2, 0x7F
ble _08000F86
mov r1, r12
adds r1, 0x8
movs r2, 0
_08000F86:
adds r6, 0x1
cmp r6, 0x7F
ble _8000F30
movs r0, 0
mov r1, r10
strb r0, [r1]
movs r0, 0x1
negs r0, r0
_08000F96:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end RequestDma3Fill
thumb_func_start CheckForSpaceForDma3Request
@ int CheckForSpaceForDma3Request(s16 index)
CheckForSpaceForDma3Request: @ 8000FA4
push {lr}
movs r2, 0
lsls r0, 16
asrs r1, r0, 16
movs r3, 0x1
negs r3, r3
cmp r1, r3
bne _08000FCC
ldr r1, =gDma3Requests
_08000FB6:
ldrh r0, [r1, 0x8]
cmp r0, 0
bne _08000FD8
adds r1, 0x10
adds r2, 0x1
cmp r2, 0x7F
ble _08000FB6
_08000FC4:
movs r0, 0
b _08000FDC
.pool
_08000FCC:
ldr r0, =gDma3Requests
lsls r1, 4
adds r1, r0
ldrh r0, [r1, 0x8]
cmp r0, 0
beq _08000FC4
_08000FD8:
movs r0, 0x1
negs r0, r0
_08000FDC:
pop {r1}
bx r1
.pool
thumb_func_end CheckForSpaceForDma3Request
.align 2, 0 @ Don't pad with nop.

View File

@ -396,35 +396,35 @@ _0811A510:
.4byte _0811A7AC
.4byte _0811A7BC
_0811A564:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002bb0
adds r4, r0, r1
b _0811A7C2
.pool
_0811A578:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002bbc
adds r4, r0, r2
b _0811A7C2
.pool
_0811A58C:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x00002bc8
adds r4, r0, r3
b _0811A7C2
.pool
_0811A5A0:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002bd4
adds r4, r0, r1
b _0811A7C2
.pool
_0811A5B4:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -437,7 +437,7 @@ _0811A5B4:
b _0811A7C2
.pool
_0811A5D8:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e36
adds r1, r0, r2
@ -455,7 +455,7 @@ _0811A5E6:
b _0811A7C2
.pool
_0811A604:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -470,7 +470,7 @@ _0811A604:
b _0811A7C2
.pool
_0811A630:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -489,7 +489,7 @@ _0811A630:
b _0811A7C2
.pool
_0811A664:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -503,8 +503,8 @@ _0811A664:
b _0811A7C2
.pool
_0811A688:
ldr r4, =gUnknown_02021EC4
ldr r1, =gUnknown_03005D8C
ldr r4, =gStringVar3
ldr r1, =gSaveBlock1Ptr
ldr r0, [r1]
ldr r2, =0x00002e6c
adds r0, r2
@ -518,7 +518,7 @@ _0811A688:
b _0811A7C2
.pool
_0811A6B4:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002baa
adds r4, r0, r1
@ -529,7 +529,7 @@ _0811A6B4:
b _0811A7C2
.pool
_0811A6D4:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -548,7 +548,7 @@ _0811A6D4:
b _0811A7C2
.pool
_0811A708:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -562,14 +562,14 @@ _0811A708:
b _0811A7C2
.pool
_0811A72C:
ldr r4, =gUnknown_02021EC4
ldr r4, =gStringVar3
adds r0, r4, 0
movs r1, 0x2
bl sub_811F88C
b _0811A7C2
.pool
_0811A73C:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, =gUnknown_020375E2
ldrh r1, [r0]
lsls r0, r1, 3
@ -588,28 +588,28 @@ _0811A73C:
b _0811A7C2
.pool
_0811A770:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x00003b6e
adds r4, r0, r3
b _0811A7C2
.pool
_0811A784:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003b5a
adds r4, r0, r1
b _0811A7C2
.pool
_0811A798:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00003b6c
adds r4, r0, r2
b _0811A7C2
.pool
_0811A7AC:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
movs r3, 0x82
lsls r3, 1
@ -638,7 +638,7 @@ _0811A7D4:
sub_811A7E4: @ 811A7E4
push {lr}
bl UpdatePaletteFade
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -661,7 +661,7 @@ _0811A80E:
ands r0, r1
cmp r0, 0
bne _0811A84E
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003b58
adds r0, r1
@ -672,7 +672,7 @@ _0811A80E:
b _0811A84E
.pool
_0811A840:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -756,7 +756,7 @@ sub_811A8A4: @ 811A8A4
thumb_func_start sub_811A8CC
sub_811A8CC: @ 811A8CC
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00003b6e
adds r1, r0
@ -772,7 +772,7 @@ sub_811A8CC: @ 811A8CC
thumb_func_start sub_811A8F0
sub_811A8F0: @ 811A8F0
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00003b5a
adds r1, r0
@ -788,7 +788,7 @@ sub_811A8F0: @ 811A8F0
thumb_func_start sub_811A914
sub_811A914: @ 811A914
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00003b6c
adds r1, r0
@ -804,7 +804,7 @@ sub_811A914: @ 811A914
thumb_func_start sub_811A938
sub_811A938: @ 811A938
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00003b5a
adds r1, r0
@ -1084,7 +1084,7 @@ _0811AB64:
thumb_func_start sub_811AB68
sub_811AB68: @ 811AB68
push {r4-r7,lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -1274,7 +1274,7 @@ _0811ACCC:
thumb_func_start sub_811ACDC
sub_811ACDC: @ 811ACDC
push {r4-r6,lr}
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x1
ands r0, r1
@ -1456,7 +1456,7 @@ _0811AE32:
thumb_func_start sub_811AE44
sub_811AE44: @ 811AE44
push {lr}
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldrh r2, [r1, 0x2E]
movs r0, 0x2
ands r0, r2
@ -1557,7 +1557,7 @@ _0811AEFA:
thumb_func_start sub_811AF00
sub_811AF00: @ 811AF00
push {lr}
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x2
ands r0, r1
@ -1769,7 +1769,7 @@ _0811B086:
thumb_func_start sub_811B08C
sub_811B08C: @ 811B08C
push {lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -1797,7 +1797,7 @@ _0811B0B8:
thumb_func_start sub_811B0BC
sub_811B0BC: @ 811B0BC
push {lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
@ -3632,7 +3632,7 @@ _0811BD7C:
movs r0, 0
b _0811BD9C
_0811BD80:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r2, 0
ldr r3, =0x0000ffff
@ -3666,7 +3666,7 @@ sub_811BDB0: @ 811BDB0
b _0811BDDE
.pool
_0811BDC8:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003b58
adds r0, r1
@ -3689,13 +3689,13 @@ sub_811BDF0: @ 811BDF0
push {r4-r6,lr}
sub sp, 0x20
adds r6, r0, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r4, [r0]
bl sub_81AFBF0
ldr r0, =0x00003b70
adds r5, r4, r0
adds r0, r5, 0
bl GetStringLength
bl StringLength
lsls r0, 16
cmp r0, 0
beq _0811BE34
@ -3732,7 +3732,7 @@ sub_811BE54: @ 811BE54
ldr r0, [r0]
adds r4, r0, 0
adds r4, 0x3C
ldr r2, =gUnknown_02021DC4
ldr r2, =gStringVar2
movs r5, 0
b _0811BE86
.pool
@ -6261,7 +6261,7 @@ _0811D32C:
strb r0, [r1, 0xB]
adds r0, r2, 0
add r1, sp, 0xC
bl AppendString
bl StringAppend
adds r2, r0, 0
movs r5, 0
lsls r0, r7, 4
@ -6316,7 +6316,7 @@ _0811D3A8:
_0811D3AE:
adds r0, r2, 0
add r1, sp, 0xC
bl AppendString
bl StringAppend
adds r2, r0, 0
cmp r6, 0x2
beq _0811D3C4
@ -9006,7 +9006,7 @@ _0811E852:
movs r1, 0x2
bl StartObjectImageAnim
_0811E892:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
movs r1, 0x69
@ -9456,7 +9456,7 @@ _0811EBD8:
adds r1, r0, 0
_0811EBEA:
adds r0, r5, 0
bl CopyString
bl StringCopy
b _0811EC02
.pool
_0811EBFC:
@ -9695,7 +9695,7 @@ _0811ED94:
_0811EDB0:
ldr r0, =gUnknown_085EEA42
_0811EDB2:
bl GetStringLength
bl StringLength
lsls r0, 16
lsrs r0, 16
_0811EDBA:
@ -9777,7 +9777,7 @@ sub_811EE38: @ 811EE38
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
bl GenerateRandomNumber
bl Random
ldr r2, =gEasyChatGroups
lsls r1, r4, 3
adds r1, r2
@ -9868,7 +9868,7 @@ _0811EEE4:
beq _0811EF3C
b _0811EF58
_0811EEEE:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002bb0
adds r5, r0, r1
@ -9876,7 +9876,7 @@ _0811EEEE:
b _0811EF46
.pool
_0811EF04:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002bbc
adds r5, r0, r1
@ -9893,13 +9893,13 @@ _0811EF04:
b _0811EF48
.pool
_0811EF2C:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002bc8
b _0811EF42
.pool
_0811EF3C:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002bd4
_0811EF42:
@ -9909,7 +9909,7 @@ _0811EF44:
_0811EF46:
movs r3, 0x2
_0811EF48:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
adds r0, r4, 0
adds r1, r5, 0
bl ConvertEasyChatWordsToString
@ -9925,7 +9925,7 @@ _0811EF58:
thumb_func_start sub_811EF6C
sub_811EF6C: @ 811EF6C
push {lr}
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
movs r0, 0xC
@ -9937,7 +9937,7 @@ _0811EF7E:
adds r1, r0, 0
lsls r1, 16
lsrs r1, 16
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
bl CopyEasyChatWord
pop {r0}
bx r0
@ -9952,7 +9952,7 @@ sub_811EF98: @ 811EF98
lsls r1, 19
ands r1, r0
lsrs r1, 24
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x00002e20
adds r0, r3
@ -9975,7 +9975,7 @@ sub_811EFC0: @ 811EFC0
lsrs r3, r0, 27
movs r2, 0x7
ands r2, r1
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00002e20
adds r1, r0
@ -10039,7 +10039,7 @@ _0811F02C:
b _0811F084
.pool
_0811F048:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x21
@ -10096,7 +10096,7 @@ _0811F0A0:
b _0811F0EC
.pool
_0811F0B4:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r5, 0
@ -10158,7 +10158,7 @@ _0811F11A:
b _0811F174
.pool
_0811F128:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r4, 0
@ -10206,7 +10206,7 @@ _0811F174:
sub_811F184: @ 811F184
push {r4-r7,lr}
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r4, =0x00002bb0
ldr r3, =gUnknown_0859E62C
_0811F18E:
@ -10223,7 +10223,7 @@ _0811F18E:
cmp r2, 0x3
bls _0811F18E
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r4, =0x00002bbc
ldr r3, =gUnknown_0859E634
_0811F1AE:
@ -10240,7 +10240,7 @@ _0811F1AE:
cmp r2, 0x5
bls _0811F1AE
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r4, =0x00002bc8
ldr r3, =gUnknown_0859E640
_0811F1CE:
@ -10257,7 +10257,7 @@ _0811F1CE:
cmp r2, 0x5
bls _0811F1CE
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r4, =0x00002bd4
ldr r3, =gUnknown_0859E64C
_0811F1EE:
@ -10274,7 +10274,7 @@ _0811F1EE:
cmp r2, 0x5
bls _0811F1EE
movs r2, 0
ldr r7, =gUnknown_03005D8C
ldr r7, =gSaveBlock1Ptr
ldr r6, =0x00002be0
ldr r0, =0x0000ffff
adds r5, r0, 0
@ -10303,7 +10303,7 @@ _0811F218:
cmp r2, 0xF
bls _0811F210
movs r2, 0
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r3, =0x00002e20
movs r1, 0
_0811F244:
@ -10512,7 +10512,7 @@ sub_811F3E0: @ 811F3E0
adds r1, r0
ldr r1, [r1]
adds r0, r4, 0
bl CopyString
bl StringCopy
adds r1, r0, 0
subs r4, r1, r4
lsls r4, 16

View File

@ -16,7 +16,7 @@ sub_8071348: @ 8071348
adds r5, r0, 0
adds r6, r1, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0x3C]
@ -41,7 +41,7 @@ _08071386:
adds r1, r4, 0
adds r1, 0xD
adds r0, r5, 0
bl pokemon_getattr
bl GetMonData
lsls r1, r4, 1
add r1, sp
adds r1, 0x10
@ -53,14 +53,14 @@ _08071386:
bls _08071386
adds r0, r5, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
mov r9, r0
movs r4, 0
_080713AE:
adds r1, r4, 0
adds r1, 0x27
adds r0, r5, 0
bl pokemon_getattr
bl GetMonData
lsls r1, r4, 2
adds r1, r7, r1
str r0, [r1]
@ -71,26 +71,26 @@ _080713AE:
bls _080713AE
adds r0, r5, 0
movs r1, 0x3
bl pokemon_getattr
bl GetMonData
mov r1, r8
strb r0, [r1]
adds r0, r5, 0
movs r1, 0x25
bl pokemon_getattr
bl GetMonData
mov r1, r10
strb r0, [r1]
adds r0, r5, 0
movs r1, 0x8
bl pokemon_getattr
bl GetMonData
ldr r1, [sp, 0x40]
strb r0, [r1]
adds r0, r5, 0
movs r1, 0x22
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x38]
adds r0, r5, 0
movs r1, 0x50
bl pokemon_getattr
bl GetMonData
ldr r1, [sp, 0x48]
strb r0, [r1]
movs r0, 0x1
@ -189,9 +189,9 @@ sub_80714B8: @ 80714B8
movs r1, 0x64
adds r5, r0, 0
muls r5, r1
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r5, r0
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r5, 0
bl sub_8071348
adds r0, r5, 0
@ -200,7 +200,7 @@ sub_80714B8: @ 80714B8
bl pokemon_setattr
adds r0, r5, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
@ -222,7 +222,7 @@ sub_80714B8: @ 80714B8
adds r0, r4, 0
movs r1, 0x3
bl pokedex_flag_operation
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
adds r0, r5, 0
bl pokemon_get_nick
mov r2, sp
@ -288,29 +288,29 @@ sub_807158C: @ 807158C
adds r6, 0x7C
mov r0, sp
adds r1, r6, 0
bl CompareStringWithoutExtendedControlCodes
bl StringCompareWithoutExtCtrlCodes
adds r5, r4, 0
adds r5, 0x74
cmp r0, 0
bne _080715CE
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
adds r1, r5, 0
bl CompareStringWithoutExtendedControlCodes
bl StringCompareWithoutExtCtrlCodes
cmp r0, 0
beq _08071608
_080715CE:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
mov r1, sp
bl CopyString
ldr r0, =gUnknown_02021DC4
bl StringCopy
ldr r0, =gStringVar2
adds r4, 0x87
ldrb r2, [r4]
lsls r2, 28
lsrs r2, 28
adds r1, r5, 0
bl sub_81DB5E8
ldr r0, =gUnknown_02021EC4
ldr r0, =gStringVar3
ldrb r2, [r4]
lsrs r2, 4
adds r1, r6, 0
@ -330,7 +330,7 @@ _0807160A:
thumb_func_start sub_8071614
sub_8071614: @ 8071614
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003030
adds r0, r1
@ -366,7 +366,7 @@ sub_807163C: @ 807163C
bne _0807166A
movs r0, 0x64
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r5, r1, r0
movs r4, 0x1
_0807166A:
@ -375,7 +375,7 @@ _0807166A:
movs r0, 0x64
adds r1, r2, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r5, r1, r0
movs r4, 0x3
_0807167A:
@ -388,13 +388,13 @@ _0807167A:
_08071688:
adds r0, r5, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
adds r0, r5, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
adds r3, r0, 0
lsls r0, r4, 3
ldr r1, =gMonFrontPicTable
@ -510,7 +510,7 @@ _08071788:
c1_hatching_egg: @ 80717A0
push {r4,lr}
sub sp, 0x4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -696,7 +696,7 @@ _08071970:
movs r0, 0x1
bl CopyBgTilemapBufferToVram
_080719A6:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -732,9 +732,9 @@ sub_80719FC: @ 80719FC
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r2, =gUnknown_02021EC4
ldr r2, =gStringVar3
movs r1, 0x2
bl pokemon_setattr
bl sub_805F094
@ -922,10 +922,10 @@ _08071BBC:
ldrb r1, [r2, 0x4]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r7, r0, 16
ldr r0, [r5]
@ -966,14 +966,14 @@ _08071C24:
ldrb r1, [r0, 0x4]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl pokemon_get_nick
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085ED5A5
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r0, [r5]
ldrb r0, [r0, 0x8]
movs r1, 0xFF
@ -1018,14 +1018,14 @@ _08071CA4:
ldrb r1, [r0, 0x4]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl pokemon_get_nick
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085ED5BE
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r0, [r5]
ldrb r0, [r0, 0x8]
movs r1, 0x1
@ -1085,9 +1085,9 @@ _08071D3C:
ldrb r0, [r0, 0x4]
movs r6, 0x64
muls r0, r6
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
adds r0, r5
ldr r1, =gUnknown_02021EC4
ldr r1, =gStringVar3
mov r9, r1
bl pokemon_get_nick
mov r1, r8
@ -1096,7 +1096,7 @@ _08071D3C:
muls r0, r6
adds r0, r5
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r7, r0, 16
mov r1, r8
@ -1115,7 +1115,7 @@ _08071D3C:
adds r0, r5
movs r1, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp]
ldr r0, =sub_80719FC
str r0, [sp, 0x4]
@ -1205,7 +1205,7 @@ _08071E54:
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r1, 0x1
bl sine
bl Sin
strh r0, [r4, 0x24]
movs r1, 0x2E
ldrsh r0, [r4, r1]
@ -1257,7 +1257,7 @@ _08071EBC:
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r1, 0x2
bl sine
bl Sin
strh r0, [r4, 0x24]
movs r1, 0x2E
ldrsh r0, [r4, r1]
@ -1301,10 +1301,10 @@ sub_8071EF0: @ 8071EF0
ldrb r1, [r0, 0x4]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
ldr r3, =gUnknown_02020630
ldr r2, [r4]
ldrb r1, [r2, 0x1]
@ -1330,7 +1330,7 @@ _08071F5C:
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r1, 0x2
bl sine
bl Sin
strh r0, [r4, 0x24]
movs r1, 0x2E
ldrsh r0, [r4, r1]
@ -1584,7 +1584,7 @@ sub_8072140: @ 8072140
ldrh r4, [r0]
adds r3, 0x1
strb r3, [r6, 0x7]
bl GenerateRandomNumber
bl Random
lsls r0, 16
movs r1, 0xC0
lsls r1, 10
@ -1745,11 +1745,11 @@ _0807229C:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0x6
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _080722CC
adds r0, r4, 0

565
asm/event_data.s Normal file
View File

@ -0,0 +1,565 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_809D300
sub_809D300: @ 809D300
push {r4,lr}
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldr r1, =0x00001270
adds r0, r1
movs r2, 0x96
lsls r2, 1
movs r1, 0
bl memset
ldr r0, [r4]
ldr r1, =0x0000139c
adds r0, r1
movs r2, 0x80
lsls r2, 2
movs r1, 0
bl memset
ldr r0, =gUnknown_020375FC
movs r1, 0
movs r2, 0x10
bl memset
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_809D300
thumb_func_start sub_809D344
sub_809D344: @ 809D344
push {lr}
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00001270
adds r2, r0, r1
movs r1, 0
str r1, [r2]
ldr r1, =0x0000139c
adds r0, r1
movs r1, 0
movs r2, 0x20
bl memset
ldr r0, =0x000008ad
bl FlagReset
ldr r0, =0x000008ae
bl FlagReset
ldr r0, =0x00000889
bl FlagReset
ldr r0, =0x000008c1
bl FlagReset
movs r0, 0x88
lsls r0, 4
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D344
thumb_func_start sub_809D3A0
sub_809D3A0: @ 809D3A0
push {lr}
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00001394
adds r0, r1
movs r1, 0
movs r2, 0x8
bl memset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D3A0
thumb_func_start sub_809D3C0
sub_809D3C0: @ 809D3C0
push {lr}
ldr r0, =0x00004046
bl GetVarPointer
ldr r1, =gSaveBlock2Ptr
ldr r2, [r1]
movs r1, 0
strb r1, [r2, 0x1A]
strh r1, [r0]
ldr r0, =0x00000896
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D3C0
thumb_func_start sub_809D3E8
sub_809D3E8: @ 809D3E8
push {r4,r5,lr}
ldr r0, =0x00004046
bl GetVarPointer
ldr r4, =gSaveBlock2Ptr
ldr r2, [r4]
movs r5, 0
movs r1, 0xDA
strb r1, [r2, 0x1A]
ldr r2, =0x00000302
adds r1, r2, 0
strh r1, [r0]
ldr r0, =0x00000896
bl FlagSet
ldr r1, [r4]
movs r0, 0x1
strb r0, [r1, 0x19]
ldr r0, [r4]
strb r5, [r0, 0x18]
bl sub_80BB358
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_809D3E8
thumb_func_start sub_809D42C
sub_809D42C: @ 809D42C
push {lr}
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x1A]
cmp r0, 0xDA
bne _0809D468
ldr r0, =0x00004046
bl VarGet
lsls r0, 16
ldr r1, =0x03020000
cmp r0, r1
bne _0809D468
ldr r0, =0x00000896
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _0809D468
movs r0, 0x1
b _0809D46A
.pool
_0809D468:
movs r0, 0
_0809D46A:
pop {r1}
bx r1
thumb_func_end sub_809D42C
thumb_func_start sub_809D470
sub_809D470: @ 809D470
push {lr}
ldr r0, =0x000008ac
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D470
thumb_func_start sub_809D480
sub_809D480: @ 809D480
push {lr}
ldr r0, =0x000008ac
bl FlagSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D480
thumb_func_start sub_809D490
sub_809D490: @ 809D490
push {lr}
ldr r0, =0x000008ac
bl FlagGet
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
.pool
thumb_func_end sub_809D490
thumb_func_start sub_809D4A4
sub_809D4A4: @ 809D4A4
push {lr}
ldr r0, =0x000008db
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D4A4
thumb_func_start sub_809D4B4
sub_809D4B4: @ 809D4B4
push {lr}
ldr r0, =0x000008db
bl FlagSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D4B4
thumb_func_start sub_809D4C4
sub_809D4C4: @ 809D4C4
push {lr}
ldr r0, =0x000008db
bl FlagGet
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
.pool
thumb_func_end sub_809D4C4
thumb_func_start sub_809D4D8
sub_809D4D8: @ 809D4D8
push {lr}
movs r0, 0xF2
lsls r0, 1
bl FlagReset
ldr r0, =0x000001e5
bl FlagReset
movs r0, 0xF3
lsls r0, 1
bl FlagReset
ldr r0, =0x000001e7
bl FlagReset
movs r0, 0xF4
lsls r0, 1
bl FlagReset
ldr r0, =0x000001e9
bl FlagReset
movs r0, 0xF5
lsls r0, 1
bl FlagReset
ldr r0, =0x000001eb
bl FlagReset
movs r0, 0xF6
lsls r0, 1
bl FlagReset
ldr r0, =0x000001ed
bl FlagReset
movs r0, 0xF7
lsls r0, 1
bl FlagReset
ldr r0, =0x000001ef
bl FlagReset
movs r0, 0xF8
lsls r0, 1
bl FlagReset
ldr r0, =0x000001f1
bl FlagReset
movs r0, 0xF9
lsls r0, 1
bl FlagReset
ldr r0, =0x000001f3
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D4D8
thumb_func_start sub_809D570
sub_809D570: @ 809D570
push {lr}
ldr r0, =0x000040dd
movs r1, 0
bl VarSet
ldr r0, =0x000040de
movs r1, 0
bl VarSet
ldr r0, =0x000040df
movs r1, 0
bl VarSet
ldr r0, =0x000040e0
movs r1, 0
bl VarSet
ldr r0, =0x000040e1
movs r1, 0
bl VarSet
ldr r0, =0x000040e2
movs r1, 0
bl VarSet
ldr r0, =0x000040e3
movs r1, 0
bl VarSet
ldr r0, =0x000040e4
movs r1, 0
bl VarSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D570
thumb_func_start sub_809D5D8
sub_809D5D8: @ 809D5D8
push {lr}
ldr r0, =0x0000402c
movs r1, 0
bl VarSet
ldr r0, =0x000008c2
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D5D8
thumb_func_start sub_809D5F4
sub_809D5F4: @ 809D5F4
push {lr}
ldr r0, =0x0000402c
movs r1, 0x92
lsls r1, 4
bl VarSet
ldr r0, =0x000008c2
bl FlagSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D5F4
thumb_func_start sub_809D614
sub_809D614: @ 809D614
push {lr}
ldr r0, =0x000008c2
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _0809D640
ldr r0, =0x0000402c
bl VarGet
lsls r0, 16
movs r1, 0x92
lsls r1, 20
cmp r0, r1
bne _0809D640
movs r0, 0x1
b _0809D642
.pool
_0809D640:
movs r0, 0
_0809D642:
pop {r1}
bx r1
thumb_func_end sub_809D614
thumb_func_start GetVarPointer
@ u16 *GetVarPointer(u16 varId)
GetVarPointer: @ 809D648
push {lr}
lsls r0, 16
lsrs r1, r0, 16
adds r2, r1, 0
ldr r0, =0x00003fff
cmp r1, r0
bhi _0809D660
movs r0, 0
b _0809D688
.pool
_0809D660:
lsls r0, r1, 16
cmp r0, 0
bge _0809D67C
ldr r0, =gUnknown_081DBA0C
ldr r2, =0xffff8000
adds r1, r2
lsls r1, 2
adds r1, r0
ldr r0, [r1]
b _0809D688
.pool
_0809D67C:
ldr r0, =gSaveBlock1Ptr
lsls r1, r2, 1
ldr r2, =0xffff939c
adds r1, r2
ldr r0, [r0]
adds r0, r1
_0809D688:
pop {r1}
bx r1
.pool
thumb_func_end GetVarPointer
thumb_func_start VarGet
@ u16 VarGet(u16 varId)
VarGet: @ 809D694
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetVarPointer
cmp r0, 0
beq _0809D6A8
ldrh r0, [r0]
b _0809D6AA
_0809D6A8:
adds r0, r4, 0
_0809D6AA:
pop {r4}
pop {r1}
bx r1
thumb_func_end VarGet
thumb_func_start VarSet
@ bool8 VarSet(u16 varId, u16 value)
VarSet: @ 809D6B0
push {r4,lr}
lsls r0, 16
lsrs r0, 16
lsls r1, 16
lsrs r4, r1, 16
bl GetVarPointer
cmp r0, 0
beq _0809D6C8
strh r4, [r0]
movs r0, 0x1
b _0809D6CA
_0809D6C8:
movs r0, 0
_0809D6CA:
pop {r4}
pop {r1}
bx r1
thumb_func_end VarSet
thumb_func_start VarGetFieldObjectGraphicsId
@ u8 VarGetFieldObjectGraphicsId(u8 index)
VarGetFieldObjectGraphicsId: @ 809D6D0
push {lr}
lsls r0, 24
lsrs r0, 8
ldr r1, =0x40100000
adds r0, r1
lsrs r0, 16
bl VarGet
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
.pool
thumb_func_end VarGetFieldObjectGraphicsId
thumb_func_start GetFlagPointer
@ u8 *GetFlagPointer(u16 flagId)
GetFlagPointer: @ 809D6EC
push {lr}
lsls r1, r0, 16
lsrs r2, r1, 16
adds r3, r2, 0
cmp r2, 0
bne _0809D6FC
movs r0, 0
b _0809D72E
_0809D6FC:
ldr r0, =0x00003fff
cmp r2, r0
bhi _0809D71C
ldr r0, =gSaveBlock1Ptr
lsrs r1, 19
ldr r2, =0x00001270
adds r1, r2
ldr r0, [r0]
b _0809D72C
.pool
_0809D71C:
ldr r1, =0xffffc000
adds r0, r3, r1
cmp r0, 0
bge _0809D728
ldr r2, =0xffffc007
adds r0, r3, r2
_0809D728:
asrs r0, 3
ldr r1, =gUnknown_020375FC
_0809D72C:
adds r0, r1
_0809D72E:
pop {r1}
bx r1
.pool
thumb_func_end GetFlagPointer
thumb_func_start FlagSet
@ bool8 FlagSet(u16 flagId)
FlagSet: @ 809D740
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetFlagPointer
adds r2, r0, 0
cmp r2, 0
beq _0809D760
movs r0, 0x7
ands r0, r4
movs r1, 0x1
lsls r1, r0
ldrb r0, [r2]
orrs r1, r0
strb r1, [r2]
_0809D760:
movs r0, 0
pop {r4}
pop {r1}
bx r1
thumb_func_end FlagSet
thumb_func_start FlagReset
@ bool8 FlagReset(u16 flagId)
FlagReset: @ 809D768
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetFlagPointer
adds r2, r0, 0
cmp r2, 0
beq _0809D788
movs r0, 0x7
ands r0, r4
movs r1, 0x1
lsls r1, r0
ldrb r0, [r2]
bics r0, r1
strb r0, [r2]
_0809D788:
movs r0, 0
pop {r4}
pop {r1}
bx r1
thumb_func_end FlagReset
thumb_func_start FlagGet
@ bool8 FlagGet(u16 flagId)
FlagGet: @ 809D790
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetFlagPointer
cmp r0, 0
beq _0809D7B4
ldrb r0, [r0]
movs r1, 0x7
ands r1, r4
asrs r0, r1
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _0809D7B4
movs r0, 0x1
b _0809D7B6
_0809D7B4:
movs r0, 0
_0809D7B6:
pop {r4}
pop {r1}
bx r1
thumb_func_end FlagGet
.align 2, 0 @ Don't pad with nop.

1751
asm/evolution_graphics.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,7 @@ _0813DA00:
ldrsh r1, [r6, r0]
movs r0, 0x64
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r7, r1, r0
ldrh r4, [r6, 0xC]
ldrb r5, [r6, 0xE]
@ -206,31 +206,31 @@ evolution_cutscene: @ 813DA8C
adds r0, r4, 0
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
ldr r0, =gUnknown_02021CC4
bl GetMonData
ldr r0, =gStringVar1
mov r1, sp
bl CopyString_Limit10
ldr r0, =gUnknown_02021DC4
bl StringCopy10
ldr r0, =gStringVar2
movs r1, 0xB
mov r2, r10
muls r2, r1
adds r1, r2, 0
ldr r2, =gSpeciesNames
adds r1, r2
bl CopyString
bl StringCopy
adds r0, r4, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
adds r5, r0, 0
lsls r5, 16
lsrs r5, 16
adds r0, r4, 0
movs r1, 0x1
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x20]
adds r0, r4, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
mov r9, r0
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
@ -416,16 +416,16 @@ sub_813DD7C: @ 813DD7C
movs r1, 0x64
adds r4, r2, 0
muls r4, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r4, r1
ldrh r5, [r0, 0xC]
adds r0, r4, 0
movs r1, 0x1
bl pokemon_getattr
bl GetMonData
mov r9, r0
adds r0, r4, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
adds r6, r0, 0
movs r0, 0
bl SetHBlankCallback
@ -588,10 +588,10 @@ sub_813DF70: @ 813DF70
ldrsh r2, [r0, r1]
movs r1, 0x64
muls r2, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r4, r2, r1
ldrh r6, [r0, 0xC]
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r3, 0x87
lsls r3, 3
adds r0, r3
@ -657,7 +657,7 @@ _0813E050:
bl SetHBlankCallback
ldr r0, =sub_813FD64
bl SetVBlankCallback
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -679,7 +679,7 @@ _0813E07E:
bl FillBgTilemapBufferRect
movs r0, 0x1
bl CopyBgTilemapBufferToVram
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -688,11 +688,11 @@ _0813E07E:
_0813E0A8:
adds r0, r4, 0
movs r1, 0x1
bl pokemon_getattr
bl GetMonData
adds r5, r0, 0
adds r0, r4, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r0, r6, 3
ldr r1, =gMonFrontPicTable
@ -745,7 +745,7 @@ _0813E0F0:
movs r2, 0x20
orrs r0, r2
strb r0, [r1, 0x5]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -756,7 +756,7 @@ _0813E0F0:
b _0813E1C8
.pool
_0813E160:
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _0813E174
@ -771,7 +771,7 @@ _0813E174:
movs r2, 0
bl BlendPalettes
_0813E180:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -828,33 +828,33 @@ sub_813E1D4: @ 813E1D4
str r3, [sp, 0x14]
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
ldr r0, =gUnknown_02021CC4
bl GetMonData
ldr r0, =gStringVar1
mov r1, sp
bl CopyString_Limit10
ldr r0, =gUnknown_02021DC4
bl StringCopy10
ldr r0, =gStringVar2
movs r1, 0xB
muls r1, r5
ldr r2, =gSpeciesNames
adds r1, r2
bl CopyString
bl StringCopy
ldr r1, =gUnknown_02021CC0
movs r0, 0x1
strb r0, [r1]
adds r0, r4, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
mov r8, r0
lsls r0, 16
lsrs r0, 16
mov r8, r0
adds r0, r4, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
adds r7, r0, 0
adds r0, r4, 0
movs r1, 0x1
bl pokemon_getattr
bl GetMonData
mov r10, r0
ldr r1, =gUnknown_0203AB80
mov r9, r1
@ -1039,7 +1039,7 @@ _0813E40C:
_0813E416:
movs r5, 0x64
muls r0, r5
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
adds r0, r4
mov r9, r0
ldr r1, [sp, 0x4]
@ -1090,7 +1090,7 @@ _0813E484:
ldrb r1, [r5]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
adds r1, r4, 0
mov r2, sp
@ -1104,7 +1104,7 @@ _0813E4A0:
ldrb r0, [r7]
movs r6, 0x64
muls r0, r6
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
adds r0, r5
adds r1, r4, 0
mov r2, sp
@ -1151,18 +1151,18 @@ _0813E4A0:
bl pokedex_flag_operation
mov r0, r9
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
ldr r1, =0x0000012f
cmp r0, r1
bne _0813E546
mov r0, r9
movs r1, 0x3
bl pokemon_getattr
bl GetMonData
cmp r0, 0x1
bne _0813E546
ldr r0, [sp, 0x4]
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
movs r1, 0x97
lsls r1, 1
cmp r0, r1
@ -1201,10 +1201,10 @@ evovle_mon_maybe: @ 813E570
ldrsh r1, [r3, r0]
movs r0, 0x64
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r1, r0
mov r9, r1
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2C]
adds r5, r2, 0
adds r6, r0, 0
@ -1332,10 +1332,10 @@ _0813E6D4:
beq _0813E6E4
bl _0813F1A4
_0813E6E4:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085CC990
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
adds r0, r4, 0
movs r1, 0
bl battle_show_message_maybe
@ -1620,10 +1620,10 @@ _0813E990:
bne _0813E99E
bl _0813F1A4
_0813E99E:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085CC9A6
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
adds r0, r4, 0
movs r1, 0
bl battle_show_message_maybe
@ -1705,10 +1705,10 @@ _0813EA5E:
mov r0, r9
movs r1, 0x2
add r2, sp, 0x4
bl pokemon_getattr
bl GetMonData
ldr r0, =gUnknown_02022F58
add r1, sp, 0x4
bl CopyString_Limit10
bl StringCopy10
ldr r0, =0x0000ffff
cmp r6, r0
bne _0813EA94
@ -1856,17 +1856,17 @@ _0813EBB8:
ldrsh r0, [r1, r3]
cmp r0, 0
beq _0813EBE4
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085CC9EE
bl ExpandStringRefs
bl StringExpandPlaceholders
b _0813EBEC
.pool
_0813EBE4:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085CC9D3
bl ExpandStringRefs
bl StringExpandPlaceholders
_0813EBEC:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
movs r1, 0
bl battle_show_message_maybe
ldr r1, =gTasks
@ -2104,7 +2104,7 @@ _0813EDEA:
b _0813F1A4
.pool
_0813EE34:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x40
ands r0, r1
@ -2122,7 +2122,7 @@ _0813EE34:
strb r0, [r4, 0x1]
bl sub_8056B74
_0813EE5C:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x80
ands r0, r1
@ -2140,7 +2140,7 @@ _0813EE5C:
strb r0, [r4, 0x1]
bl sub_8056B74
_0813EE84:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r2, 0x1
adds r0, r2, 0
@ -2188,7 +2188,7 @@ _0813EECC:
movs r3, 0x10
bl BeginNormalPaletteFade
_0813EEF2:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -2224,7 +2224,7 @@ _0813EF30:
b _0813F1A4
_0813EF3E:
bl FreeAllWindowBuffers
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
ldr r1, =gTasks
mov r3, r8
adds r5, r3, r7
@ -2278,7 +2278,7 @@ _0813EFC8:
adds r1, r6, 0
adds r1, 0xD
mov r0, r9
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
@ -2492,7 +2492,7 @@ sub_813F1B8: @ 813F1B8
ldrsh r2, [r0, r1]
movs r1, 0x64
muls r2, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r2, r1
mov r9, r2
movs r2, 0x8
@ -2532,10 +2532,10 @@ _0813F204:
.4byte _0813F7A4
.4byte _0813F7E4
_0813F258:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085CC990
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
@ -2803,10 +2803,10 @@ _0813F4E4:
bne _0813F4F2
bl _0813FCC4
_0813F4F2:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085CC9A6
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
@ -2889,10 +2889,10 @@ _0813F58C:
mov r0, r9
movs r1, 0x2
add r2, sp, 0x4
bl pokemon_getattr
bl GetMonData
ldr r0, =gUnknown_02022F58
add r1, sp, 0x4
bl CopyString_Limit10
bl StringCopy10
ldr r0, =0x0000ffff
cmp r6, r0
bne _0813F5E8
@ -3028,10 +3028,10 @@ _0813F704:
bne _0813F714
b _0813FCC4
_0813F714:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085CC9EE
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
@ -3359,7 +3359,7 @@ _0813FA24:
beq _0813FA32
b _0813FCC4
_0813FA32:
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _0813FA3E
@ -3375,7 +3375,7 @@ _0813FA3E:
bl GetBgTilemapBuffer
bl Free
bl FreeAllWindowBuffers
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
ldr r1, =gTasks
mov r2, r8
adds r5, r2, r7
@ -3406,7 +3406,7 @@ _0813FAA8:
beq _0813FAB6
b _0813FCC4
_0813FAB6:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r1, [r0, 0x4]
ldr r0, =sub_813E3C0
cmp r1, r0
@ -3430,7 +3430,7 @@ _0813FAEC:
adds r1, r6, 0
adds r1, 0xD
mov r0, r9
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
@ -3888,27 +3888,27 @@ _0813FF2C:
movs r1, 0x8
ldrsh r0, [r4, r1]
movs r1, 0x4
bl cosine
bl Cos
adds r0, 0x8
mov r2, r8
strh r0, [r2]
movs r1, 0x8
ldrsh r0, [r4, r1]
movs r1, 0x4
bl sine
bl Sin
adds r0, 0x10
mov r2, r9
strh r0, [r2]
movs r1, 0xA
ldrsh r0, [r4, r1]
movs r1, 0x4
bl cosine
bl Cos
adds r0, 0x8
strh r0, [r7]
movs r2, 0xA
ldrsh r0, [r4, r2]
movs r1, 0x4
bl sine
bl Sin
adds r0, 0x10
strh r0, [r6]
ldr r0, =sub_813FDEC

View File

@ -129,7 +129,7 @@ sub_8089C08: @ 8089C08
@ void DrawWholeMapView()
DrawWholeMapView: @ 8089C34
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r2, 0
ldrsh r0, [r1, r2]
@ -291,7 +291,7 @@ _08089D5E:
adds r1, r6, r0
lsls r1, 16
lsrs r1, 16
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
movs r0, 0
ldrsh r2, [r3, r0]
@ -334,7 +334,7 @@ _08089D9C:
lsrs r0, 24
_08089DAE:
adds r1, r6, r0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
movs r0, 0
ldrsh r2, [r3, r0]
@ -380,7 +380,7 @@ _08089DFC:
adds r1, r6
lsls r1, 16
lsrs r1, 16
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r3, 0
ldrsh r2, [r0, r3]
@ -438,7 +438,7 @@ _08089E66:
adds r1, r5
lsls r1, 16
lsrs r1, 16
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r3, 0
ldrsh r2, [r0, r3]
@ -724,7 +724,7 @@ _0808A082:
MapPosToBgTilemapOffset: @ 808A0AC
push {r4,r5,lr}
adds r4, r0, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
movs r5, 0
ldrsh r0, [r3, r5]

View File

@ -1514,7 +1514,7 @@ happiness_algorithm_step: @ 809CB44
strh r1, [r0]
cmp r1, 0
bne _0809CB72
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
movs r4, 0x5
_0809CB62:
adds r0, r5, 0
@ -2019,7 +2019,7 @@ _0809CF20:
lsls r0, r3, 3
adds r0, r1
ldrb r0, [r0, 0x5]
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
movs r1, 0x4
ldrsb r1, [r2, r1]
@ -2509,346 +2509,4 @@ sub_809D2BC: @ 809D2BC
.pool
thumb_func_end sub_809D2BC
thumb_func_start sub_809D300
sub_809D300: @ 809D300
push {r4,lr}
ldr r4, =gUnknown_03005D8C
ldr r0, [r4]
ldr r1, =0x00001270
adds r0, r1
movs r2, 0x96
lsls r2, 1
movs r1, 0
bl memset
ldr r0, [r4]
ldr r1, =0x0000139c
adds r0, r1
movs r2, 0x80
lsls r2, 2
movs r1, 0
bl memset
ldr r0, =gUnknown_020375FC
movs r1, 0
movs r2, 0x10
bl memset
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_809D300
thumb_func_start sub_809D344
sub_809D344: @ 809D344
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, [r0]
ldr r1, =0x00001270
adds r2, r0, r1
movs r1, 0
str r1, [r2]
ldr r1, =0x0000139c
adds r0, r1
movs r1, 0
movs r2, 0x20
bl memset
ldr r0, =0x000008ad
bl FlagReset
ldr r0, =0x000008ae
bl FlagReset
ldr r0, =0x00000889
bl FlagReset
ldr r0, =0x000008c1
bl FlagReset
movs r0, 0x88
lsls r0, 4
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D344
thumb_func_start sub_809D3A0
sub_809D3A0: @ 809D3A0
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, [r0]
ldr r1, =0x00001394
adds r0, r1
movs r1, 0
movs r2, 0x8
bl memset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D3A0
thumb_func_start sub_809D3C0
sub_809D3C0: @ 809D3C0
push {lr}
ldr r0, =0x00004046
bl GetVarPointer
ldr r1, =gUnknown_03005D90
ldr r2, [r1]
movs r1, 0
strb r1, [r2, 0x1A]
strh r1, [r0]
ldr r0, =0x00000896
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D3C0
thumb_func_start sub_809D3E8
sub_809D3E8: @ 809D3E8
push {r4,r5,lr}
ldr r0, =0x00004046
bl GetVarPointer
ldr r4, =gUnknown_03005D90
ldr r2, [r4]
movs r5, 0
movs r1, 0xDA
strb r1, [r2, 0x1A]
ldr r2, =0x00000302
adds r1, r2, 0
strh r1, [r0]
ldr r0, =0x00000896
bl FlagSet
ldr r1, [r4]
movs r0, 0x1
strb r0, [r1, 0x19]
ldr r0, [r4]
strb r5, [r0, 0x18]
bl sub_80BB358
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_809D3E8
thumb_func_start sub_809D42C
sub_809D42C: @ 809D42C
push {lr}
ldr r0, =gUnknown_03005D90
ldr r0, [r0]
ldrb r0, [r0, 0x1A]
cmp r0, 0xDA
bne _0809D468
ldr r0, =0x00004046
bl VarGet
lsls r0, 16
ldr r1, =0x03020000
cmp r0, r1
bne _0809D468
ldr r0, =0x00000896
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _0809D468
movs r0, 0x1
b _0809D46A
.pool
_0809D468:
movs r0, 0
_0809D46A:
pop {r1}
bx r1
thumb_func_end sub_809D42C
thumb_func_start sub_809D470
sub_809D470: @ 809D470
push {lr}
ldr r0, =0x000008ac
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D470
thumb_func_start sub_809D480
sub_809D480: @ 809D480
push {lr}
ldr r0, =0x000008ac
bl FlagSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D480
thumb_func_start sub_809D490
sub_809D490: @ 809D490
push {lr}
ldr r0, =0x000008ac
bl FlagGet
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
.pool
thumb_func_end sub_809D490
thumb_func_start sub_809D4A4
sub_809D4A4: @ 809D4A4
push {lr}
ldr r0, =0x000008db
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D4A4
thumb_func_start sub_809D4B4
sub_809D4B4: @ 809D4B4
push {lr}
ldr r0, =0x000008db
bl FlagSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D4B4
thumb_func_start sub_809D4C4
sub_809D4C4: @ 809D4C4
push {lr}
ldr r0, =0x000008db
bl FlagGet
lsls r0, 24
lsrs r0, 24
pop {r1}
bx r1
.pool
thumb_func_end sub_809D4C4
thumb_func_start sub_809D4D8
sub_809D4D8: @ 809D4D8
push {lr}
movs r0, 0xF2
lsls r0, 1
bl FlagReset
ldr r0, =0x000001e5
bl FlagReset
movs r0, 0xF3
lsls r0, 1
bl FlagReset
ldr r0, =0x000001e7
bl FlagReset
movs r0, 0xF4
lsls r0, 1
bl FlagReset
ldr r0, =0x000001e9
bl FlagReset
movs r0, 0xF5
lsls r0, 1
bl FlagReset
ldr r0, =0x000001eb
bl FlagReset
movs r0, 0xF6
lsls r0, 1
bl FlagReset
ldr r0, =0x000001ed
bl FlagReset
movs r0, 0xF7
lsls r0, 1
bl FlagReset
ldr r0, =0x000001ef
bl FlagReset
movs r0, 0xF8
lsls r0, 1
bl FlagReset
ldr r0, =0x000001f1
bl FlagReset
movs r0, 0xF9
lsls r0, 1
bl FlagReset
ldr r0, =0x000001f3
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D4D8
thumb_func_start sub_809D570
sub_809D570: @ 809D570
push {lr}
ldr r0, =0x000040dd
movs r1, 0
bl VarSet
ldr r0, =0x000040de
movs r1, 0
bl VarSet
ldr r0, =0x000040df
movs r1, 0
bl VarSet
ldr r0, =0x000040e0
movs r1, 0
bl VarSet
ldr r0, =0x000040e1
movs r1, 0
bl VarSet
ldr r0, =0x000040e2
movs r1, 0
bl VarSet
ldr r0, =0x000040e3
movs r1, 0
bl VarSet
ldr r0, =0x000040e4
movs r1, 0
bl VarSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D570
thumb_func_start sub_809D5D8
sub_809D5D8: @ 809D5D8
push {lr}
ldr r0, =0x0000402c
movs r1, 0
bl VarSet
ldr r0, =0x000008c2
bl FlagReset
pop {r0}
bx r0
.pool
thumb_func_end sub_809D5D8
thumb_func_start sub_809D5F4
sub_809D5F4: @ 809D5F4
push {lr}
ldr r0, =0x0000402c
movs r1, 0x92
lsls r1, 4
bl VarSet
ldr r0, =0x000008c2
bl FlagSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809D5F4
thumb_func_start sub_809D614
sub_809D614: @ 809D614
push {lr}
ldr r0, =0x000008c2
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _0809D640
ldr r0, =0x0000402c
bl VarGet
lsls r0, 16
movs r1, 0x92
lsls r1, 20
cmp r0, r1
bne _0809D640
movs r0, 0x1
b _0809D642
.pool
_0809D640:
movs r0, 0
_0809D642:
pop {r1}
bx r1
thumb_func_end sub_809D614
.align 2, 0 @ Don't pad with nop.

View File

@ -735,7 +735,7 @@ sub_808A964: @ 808A964
lsls r0, 24
cmp r0, 0
beq _0808A990
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrh r1, [r0, 0x4]
ldr r0, =0x0000101a

File diff suppressed because it is too large Load Diff

View File

@ -833,7 +833,7 @@ unc_grass_normal: @ 8154550
ands r0, r1
cmp r0, 0
beq _0815459C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
movs r0, 0x5
ldrsb r0, [r2, r0]
@ -1172,7 +1172,7 @@ unc_grass_tall: @ 8154800
ands r0, r1
cmp r0, 0
beq _0815484C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
movs r0, 0x5
ldrsb r0, [r2, r0]

View File

@ -1185,7 +1185,7 @@ GroundEffect_SpawnOnTallGrass: @ 8096E90
str r1, [r3, 0x10]
ldrb r0, [r0, 0xA]
str r0, [r3, 0x14]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldrb r0, [r1, 0x5]
lsls r0, 8
@ -1224,7 +1224,7 @@ GroundEffect_StepOnTallGrass: @ 8096EDC
str r1, [r3, 0x10]
ldrb r0, [r0, 0xA]
str r0, [r3, 0x14]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldrb r0, [r1, 0x5]
lsls r0, 8
@ -1263,7 +1263,7 @@ GroundEffect_SpawnOnLongGrass: @ 8096F28
str r1, [r3, 0x10]
ldrb r0, [r0, 0xA]
str r0, [r3, 0x14]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldrb r0, [r1, 0x5]
lsls r0, 8
@ -1302,7 +1302,7 @@ GroundEffect_StepOnLongGrass: @ 8096F74
str r1, [r3, 0x10]
ldrb r0, [r0, 0xA]
str r0, [r3, 0x14]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldrb r0, [r1, 0x5]
lsls r0, 8

View File

@ -535,7 +535,7 @@ _0808D7CA:
movs r5, 0
cmp r5, r6
bcs _0808D7FE
ldr r7, =gUnknown_03005D8C
ldr r7, =gSaveBlock1Ptr
_0808D7D2:
lsls r0, r5, 1
adds r0, r5
@ -1099,7 +1099,7 @@ SpawnSpecialFieldObject: @ 808DC08
add r0, sp, 0x4
adds r1, r4, 0
bl GetFieldObjectMovingCameraOffset
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrb r1, [r0, 0x5]
ldrb r2, [r0, 0x4]
@ -1557,7 +1557,7 @@ SpawnFieldObjectsInView: @ 808DF80
ldr r0, [r5, 0x4]
cmp r0, 0
beq _0808E078
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldrh r1, [r2]
subs r0, r1, 0x2
@ -1610,7 +1610,7 @@ _0808E004:
movs r2, 0xC7
lsls r2, 4
adds r0, r2
ldr r3, =gUnknown_03005D8C
ldr r3, =gSaveBlock1Ptr
ldr r1, [r3]
adds r4, r1, r0
ldrh r0, [r4, 0x4]
@ -1642,7 +1642,7 @@ _0808E004:
lsls r0, 24
cmp r0, 0
bne _0808E06E
ldr r3, =gUnknown_03005D8C
ldr r3, =gSaveBlock1Ptr
ldr r0, [r3]
ldrb r1, [r0, 0x5]
ldrb r2, [r0, 0x4]
@ -1729,7 +1729,7 @@ _0808E0D2:
RemoveFieldObjectIfOutsideView: @ 808E0EC
push {r4-r7,lr}
adds r3, r0, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldrh r0, [r2]
subs r1, r0, 0x2
@ -3952,7 +3952,7 @@ GetFieldObjectTemplateByLocalIdAndMap: @ 808F128
lsrs r3, r1, 24
lsls r2, 24
lsrs r2, 24
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r0, 0x5
ldrsb r0, [r1, r0]
@ -4026,7 +4026,7 @@ sub_808F1B4: @ 808F1B4
push {r4,r5,lr}
adds r3, r0, 0
ldrb r0, [r3, 0x9]
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
movs r1, 0x5
ldrsb r1, [r2, r1]
@ -4414,7 +4414,7 @@ sub_808F48C: @ 808F48C
cmp r0, 0
beq _0808F4C0
ldr r5, =gUnknown_0850D6DC
bl GenerateRandomNumber
bl Random
movs r4, 0x3
adds r1, r4, 0
ands r1, r0
@ -4467,7 +4467,7 @@ sub_808F4E8: @ 808F4E8
mov r0, sp
movs r2, 0x4
bl memcpy
bl GenerateRandomNumber
bl Random
movs r1, 0x3
ands r1, r0
mov r2, sp
@ -5158,7 +5158,7 @@ sub_808F9C8: @ 808F9C8
cmp r0, 0
beq _0808F9FE
ldr r4, =gUnknown_0850D6DC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -5229,7 +5229,7 @@ sub_808FA3C: @ 808FA3C
lsrs r1, r0, 24
cmp r1, 0
bne _0808FA6C
bl GenerateRandomNumber
bl Random
movs r1, 0x3
ands r1, r0
mov r2, sp
@ -5328,7 +5328,7 @@ sub_808FB08: @ 808FB08
cmp r0, 0
beq _0808FB3C
ldr r5, =gUnknown_0850D6DC
bl GenerateRandomNumber
bl Random
movs r4, 0x3
adds r1, r4, 0
ands r1, r0
@ -5383,7 +5383,7 @@ sub_808FB64: @ 808FB64
mov r0, sp
movs r2, 0x2
bl memcpy
bl GenerateRandomNumber
bl Random
movs r7, 0x1
adds r1, r7, 0
ands r1, r0
@ -5540,7 +5540,7 @@ sub_808FC8C: @ 808FC8C
cmp r0, 0
beq _0808FCC0
ldr r5, =gUnknown_0850D6DC
bl GenerateRandomNumber
bl Random
movs r4, 0x3
adds r1, r4, 0
ands r1, r0
@ -5593,7 +5593,7 @@ sub_808FCE8: @ 808FCE8
mov r0, sp
movs r2, 0x2
bl memcpy
bl GenerateRandomNumber
bl Random
movs r7, 0x1
adds r1, r7, 0
ands r1, r0
@ -6143,7 +6143,7 @@ sub_80900D4: @ 80900D4
cmp r0, 0
beq _0809010A
ldr r4, =gUnknown_0850D6DC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -6212,7 +6212,7 @@ sub_8090148: @ 8090148
lsrs r1, r0, 24
cmp r1, 0
bne _08090178
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
mov r2, sp
@ -6311,7 +6311,7 @@ sub_8090214: @ 8090214
cmp r0, 0
beq _0809024A
ldr r4, =gUnknown_0850D6DC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -6380,7 +6380,7 @@ sub_8090288: @ 8090288
lsrs r1, r0, 24
cmp r1, 0
bne _080902B8
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
mov r2, sp
@ -6479,7 +6479,7 @@ sub_8090354: @ 8090354
cmp r0, 0
beq _0809038A
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -6548,7 +6548,7 @@ sub_80903C8: @ 80903C8
lsrs r1, r0, 24
cmp r1, 0
bne _080903F8
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
mov r2, sp
@ -6647,7 +6647,7 @@ sub_8090494: @ 8090494
cmp r0, 0
beq _080904CA
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -6716,7 +6716,7 @@ sub_8090508: @ 8090508
lsrs r1, r0, 24
cmp r1, 0
bne _08090538
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
mov r2, sp
@ -6815,7 +6815,7 @@ sub_80905D4: @ 80905D4
cmp r0, 0
beq _0809060A
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -6884,7 +6884,7 @@ sub_8090648: @ 8090648
lsrs r1, r0, 24
cmp r1, 0
bne _08090678
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
mov r2, sp
@ -6983,7 +6983,7 @@ sub_8090714: @ 8090714
cmp r0, 0
beq _0809074A
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -7052,7 +7052,7 @@ sub_8090788: @ 8090788
lsrs r1, r0, 24
cmp r1, 0
bne _080907B8
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
mov r2, sp
@ -7151,7 +7151,7 @@ sub_8090854: @ 8090854
cmp r0, 0
beq _0809088A
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -7220,7 +7220,7 @@ sub_80908C8: @ 80908C8
lsrs r1, r0, 24
cmp r1, 0
bne _080908F8
bl GenerateRandomNumber
bl Random
movs r1, 0x3
ands r1, r0
mov r2, sp
@ -7319,7 +7319,7 @@ sub_8090994: @ 8090994
cmp r0, 0
beq _080909CA
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -7388,7 +7388,7 @@ sub_8090A08: @ 8090A08
lsrs r1, r0, 24
cmp r1, 0
bne _08090A38
bl GenerateRandomNumber
bl Random
movs r1, 0x3
ands r1, r0
mov r2, sp
@ -7487,7 +7487,7 @@ sub_8090AD4: @ 8090AD4
cmp r0, 0
beq _08090B0A
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -7556,7 +7556,7 @@ sub_8090B48: @ 8090B48
lsrs r1, r0, 24
cmp r1, 0
bne _08090B78
bl GenerateRandomNumber
bl Random
movs r1, 0x3
ands r1, r0
mov r2, sp
@ -7655,7 +7655,7 @@ sub_8090C14: @ 8090C14
cmp r0, 0
beq _08090C4A
ldr r4, =gUnknown_0850D6EC
bl GenerateRandomNumber
bl Random
movs r5, 0x3
adds r1, r5, 0
ands r1, r0
@ -7724,7 +7724,7 @@ sub_8090C88: @ 8090C88
lsrs r1, r0, 24
cmp r1, 0
bne _08090CB8
bl GenerateRandomNumber
bl Random
movs r1, 0x3
ands r1, r0
mov r2, sp
@ -12477,7 +12477,7 @@ _08092FE4:
thumb_func_start sub_8092FF0
sub_8092FF0: @ 8092FF0
push {r4,r5,lr}
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r4, [r5]
ldrh r4, [r4]
lsls r0, 16
@ -12562,7 +12562,7 @@ _0809308C:
adds r0, r1
lsrs r4, r0, 16
_08093098:
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r0, [r2]
ldrh r1, [r0]
lsls r0, r5, 16

View File

@ -160,9 +160,9 @@ sub_8098238: @ 8098238
ldrb r0, [r5]
cmp r0, 0
bne _08098270
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
adds r1, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r0, =sub_8098214
movs r1, 0
bl CreateTask
@ -243,9 +243,9 @@ textbox_fdecode_auto_and_task_add: @ 80982DC
push {r4,lr}
adds r2, r0, 0
adds r4, r1, 0
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
adds r1, r2, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
lsls r4, 24
lsrs r4, 24
adds r0, r4, 0

View File

@ -2760,11 +2760,11 @@ _0808BE2A:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0808BE12
_0808BE44:
@ -4112,7 +4112,7 @@ fish1: @ 808C918
bl memcpy
movs r0, 0
strh r0, [r5, 0x20]
bl GenerateRandomNumber
bl Random
movs r2, 0x26
ldrsh r1, [r5, r2]
lsls r1, 1
@ -4197,7 +4197,7 @@ fish3: @ 808C9D4
strh r0, [r4, 0x8]
strh r1, [r4, 0xA]
strh r1, [r4, 0xC]
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -4238,7 +4238,7 @@ fish4: @ 808CA20
ldrh r0, [r4, 0xA]
adds r1, r0, 0x1
strh r1, [r4, 0xA]
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r0, [r0, 0x2E]
movs r5, 0x1
adds r2, r5, 0
@ -4324,10 +4324,10 @@ fish5: @ 808CABC
strh r0, [r5, 0x8]
b _0808CB5C
_0808CADC:
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
adds r0, r4, 0
movs r1, 0x6
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0808CB14
adds r0, r4, 0
@ -4339,7 +4339,7 @@ _0808CADC:
cmp r0, 0x3C
bne _0808CB14
_0808CAFC:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x64
@ -4352,7 +4352,7 @@ _0808CAFC:
_0808CB14:
cmp r6, 0
bne _0808CB32
bl GenerateRandomNumber
bl Random
movs r1, 0x1
ands r1, r0
cmp r1, 0
@ -4445,7 +4445,7 @@ fish7: @ 808CBA4
b _0808CBEC
.pool
_0808CBDC:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -4485,7 +4485,7 @@ fish8: @ 808CBFC
blt _0808CC52
cmp r1, 0x1
bgt _0808CC56
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x64

View File

@ -9,7 +9,7 @@
sub_80F9568: @ 80F9568
push {lr}
movs r1, 0x41
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r1, r0, 16
cmp r1, 0
@ -31,7 +31,7 @@ _080F9586:
thumb_func_start sub_80F958C
sub_80F958C: @ 80F958C
push {r4,r5,lr}
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
movs r5, 0
_080F9592:
adds r0, r4, 0
@ -40,7 +40,7 @@ _080F9592:
beq _080F95B0
adds r0, r4, 0
movs r1, 0x39
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _080F95B0
movs r0, 0
@ -67,7 +67,7 @@ sub_80F95C0: @ 80F95C0
movs r1, 0x64
adds r4, r0, 0
muls r4, r1
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r0
movs r0, 0
str r0, [sp]
@ -78,13 +78,13 @@ sub_80F95C0: @ 80F95C0
movs r1, 0x37
mov r2, sp
bl pokemon_setattr
ldr r5, =gUnknown_02021CC4
ldr r5, =gStringVar1
adds r0, r4, 0
movs r1, 0x2
adds r2, r5, 0
bl pokemon_getattr
bl GetMonData
adds r0, r5, 0
bl GetStringEnd_Limit7
bl StringGetEnd10
add sp, 0x4
pop {r4,r5}
pop {r0}
@ -99,7 +99,7 @@ sub_80F960C: @ 80F960C
lsrs r0, 24
movs r1, 0x64
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
bl sub_80F9568
@ -107,12 +107,12 @@ sub_80F960C: @ 80F960C
beq _080F964C
adds r0, r4, 0
movs r1, 0x39
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _080F964C
adds r0, r4, 0
movs r1, 0x37
bl pokemon_getattr
bl GetMonData
bl pokemon_ailments_get_primary
lsls r0, 24
lsrs r0, 24
@ -253,19 +253,19 @@ sub_80F972C: @ 80F972C
overworld_poison: @ 80F9744
push {r4-r7,lr}
sub sp, 0x4
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
movs r7, 0
movs r6, 0
movs r5, 0x5
_080F9750:
adds r0, r4, 0
movs r1, 0x5
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _080F9794
adds r0, r4, 0
movs r1, 0x37
bl pokemon_getattr
bl GetMonData
bl pokemon_ailments_get_primary
lsls r0, 24
lsrs r0, 24
@ -273,7 +273,7 @@ _080F9750:
bne _080F9794
adds r0, r4, 0
movs r1, 0x39
bl pokemon_getattr
bl GetMonData
str r0, [sp]
cmp r0, 0
beq _080F9786

325
asm/field_region_map.s Normal file
View File

@ -0,0 +1,325 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_817018C
sub_817018C: @ 817018C
push {r4,r5,lr}
adds r5, r0, 0
movs r0, 0
bl SetVBlankCallback
ldr r4, =gUnknown_0203BCD0
movs r0, 0x89
lsls r0, 4
bl Alloc
str r0, [r4]
ldr r1, =0x0000088c
adds r2, r0, r1
movs r1, 0
strh r1, [r2]
str r5, [r0]
ldr r0, =sub_81701C4
bl SetMainCallback2
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_817018C
thumb_func_start sub_81701C4
sub_81701C4: @ 81701C4
push {lr}
movs r0, 0
movs r1, 0
bl SetGpuReg
movs r0, 0x10
movs r1, 0
bl SetGpuReg
movs r0, 0x12
movs r1, 0
bl SetGpuReg
movs r0, 0x14
movs r1, 0
bl SetGpuReg
movs r0, 0x16
movs r1, 0
bl SetGpuReg
movs r0, 0x18
movs r1, 0
bl SetGpuReg
movs r0, 0x1A
movs r1, 0
bl SetGpuReg
movs r0, 0x1C
movs r1, 0
bl SetGpuReg
movs r0, 0x1E
movs r1, 0
bl SetGpuReg
bl ResetAllObjectData
bl ResetObjectPaletteAllocator
movs r0, 0
bl ResetBgsAndClearDma3BusyFlags
ldr r1, =gUnknown_085E5068
movs r0, 0x1
movs r2, 0x2
bl InitBgsFromTemplates
ldr r0, =gUnknown_085E5070
bl InitWindows
bl DeactivateAllTextPrinters
movs r0, 0
movs r1, 0x27
movs r2, 0xD0
bl sub_809882C
bl clear_scheduled_bg_copies_to_vram
ldr r0, =sub_8170274
bl SetMainCallback2
ldr r0, =sub_8170260
bl SetVBlankCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_81701C4
thumb_func_start sub_8170260
sub_8170260: @ 8170260
push {lr}
bl LoadOamFromSprites
bl ProcessObjectCopyRequests
bl copy_pal_bg_faded_to_pal_ram
pop {r0}
bx r0
thumb_func_end sub_8170260
thumb_func_start sub_8170274
sub_8170274: @ 8170274
push {lr}
bl sub_8170290
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl fade_and_return_progress_probably
bl do_scheduled_bg_tilemap_copies_to_vram
pop {r0}
bx r0
thumb_func_end sub_8170274
thumb_func_start sub_8170290
sub_8170290: @ 8170290
push {r4,r5,lr}
sub sp, 0xC
ldr r1, =gUnknown_0203BCD0
ldr r0, [r1]
ldr r2, =0x0000088c
adds r0, r2
ldrh r0, [r0]
adds r4, r1, 0
cmp r0, 0x6
bls _081702A6
b _08170416
_081702A6:
lsls r0, 2
ldr r1, =_081702BC
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_081702BC:
.4byte _081702D8
.4byte _08170300
.4byte _08170358
.4byte _08170380
.4byte _08170394
.4byte _081703C0
.4byte _081703E8
_081702D8:
ldr r0, [r4]
adds r0, 0x8
movs r1, 0
bl sub_8122CDC
movs r0, 0
movs r1, 0
bl sub_8124288
movs r0, 0x1
movs r1, 0x1
bl sub_81240D4
ldr r1, [r4]
ldr r0, =0x0000088c
adds r1, r0
b _081703D8
.pool
_08170300:
movs r0, 0x1
movs r1, 0
movs r2, 0x27
movs r3, 0xD
bl SetWindowBorderStyle
ldr r5, =gUnknown_085EE8F1
movs r0, 0x1
adds r1, r5, 0
movs r2, 0x38
bl GetStringCenterAlignXOffset
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
movs r0, 0x1
str r0, [sp]
movs r4, 0
str r4, [sp, 0x4]
str r4, [sp, 0x8]
movs r1, 0x1
adds r2, r5, 0
bl Print
movs r0, 0
bl schedule_bg_copy_tilemap_to_vram
movs r0, 0
movs r1, 0
movs r2, 0x27
movs r3, 0xD
bl SetWindowBorderStyle
bl sub_8170428
movs r0, 0x1
negs r0, r0
str r4, [sp]
movs r1, 0
movs r2, 0x10
movs r3, 0
b _081703CC
.pool
_08170358:
movs r1, 0x82
lsls r1, 5
movs r0, 0
bl SetGpuRegBits
movs r0, 0
bl ShowBg
movs r0, 0x2
bl ShowBg
ldr r0, =gUnknown_0203BCD0
ldr r1, [r0]
ldr r0, =0x0000088c
adds r1, r0
b _081703D8
.pool
_08170380:
ldr r0, =gUnknown_02037FD4
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
bne _08170416
ldr r1, [r4]
b _081703D4
.pool
_08170394:
bl sub_81230AC
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
bne _081703A6
bl sub_8170428
b _08170416
_081703A6:
cmp r0, 0x3
blt _08170416
cmp r0, 0x5
bgt _08170416
ldr r0, =gUnknown_0203BCD0
ldr r1, [r0]
ldr r0, =0x0000088c
adds r1, r0
b _081703D8
.pool
_081703C0:
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0
movs r3, 0x10
_081703CC:
bl pal_fade_maybe
ldr r0, =gUnknown_0203BCD0
ldr r1, [r0]
_081703D4:
ldr r2, =0x0000088c
adds r1, r2
_081703D8:
ldrh r0, [r1]
adds r0, 0x1
strh r0, [r1]
b _08170416
.pool
_081703E8:
ldr r0, =gUnknown_02037FD4
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08170416
bl sub_812305C
ldr r4, =gUnknown_0203BCD0
ldr r0, [r4]
ldr r0, [r0]
bl SetMainCallback2
ldr r0, [r4]
cmp r0, 0
beq _08170412
bl Free
str r5, [r4]
_08170412:
bl FreeAllWindowBuffers
_08170416:
add sp, 0xC
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8170290
thumb_func_start sub_8170428
sub_8170428: @ 8170428
push {r4,lr}
sub sp, 0xC
ldr r4, =gUnknown_0203BCD0
ldr r0, [r4]
ldrb r0, [r0, 0xA]
cmp r0, 0
beq _08170460
movs r0, 0
movs r1, 0x11
bl FillWindowPixelBuffer
ldr r2, [r4]
adds r2, 0xC
movs r0, 0x1
str r0, [sp]
movs r0, 0
str r0, [sp, 0x4]
str r0, [sp, 0x8]
movs r1, 0x1
movs r3, 0
bl Print
movs r0, 0
bl schedule_bg_copy_tilemap_to_vram
b _08170470
.pool
_08170460:
movs r0, 0
movs r1, 0x11
bl FillWindowPixelBuffer
movs r0, 0
movs r1, 0x3
bl CopyWindowToVram
_08170470:
add sp, 0xC
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8170428
.align 2, 0 @ Don't pad with nop.

View File

@ -5,154 +5,6 @@
.text
thumb_func_start sub_809D7BC
sub_809D7BC: @ 809D7BC
push {lr}
movs r0, 0x1
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7BC
thumb_func_start sub_809D7C8
sub_809D7C8: @ 809D7C8
push {lr}
movs r0, 0x2
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7C8
thumb_func_start sub_809D7D4
sub_809D7D4: @ 809D7D4
push {lr}
movs r0, 0x3
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7D4
thumb_func_start sub_809D7E0
sub_809D7E0: @ 809D7E0
push {lr}
movs r0, 0x4
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7E0
thumb_func_start sub_809D7EC
sub_809D7EC: @ 809D7EC
push {lr}
movs r0, 0x5
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7EC
thumb_func_start sub_809D7F8
sub_809D7F8: @ 809D7F8
push {lr}
movs r0, 0x6
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D7F8
thumb_func_start sub_809D804
sub_809D804: @ 809D804
push {lr}
movs r0, 0x9
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D804
thumb_func_start sub_809D810
sub_809D810: @ 809D810
push {lr}
movs r0, 0x7
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D810
thumb_func_start sub_809D81C
sub_809D81C: @ 809D81C
push {lr}
movs r0, 0x8
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D81C
thumb_func_start sub_809D828
sub_809D828: @ 809D828
push {lr}
movs r0, 0xB
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D828
thumb_func_start sub_809D834
sub_809D834: @ 809D834
push {lr}
movs r0, 0xC
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D834
thumb_func_start sub_809D840
sub_809D840: @ 809D840
push {lr}
movs r0, 0x14
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D840
thumb_func_start sub_809D84C
sub_809D84C: @ 809D84C
push {lr}
movs r0, 0x15
bl sub_80AEDF0
pop {r0}
bx r0
thumb_func_end sub_809D84C
thumb_func_start trigger_activate_weather
trigger_activate_weather: @ 809D858
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
movs r2, 0
ldr r3, =gUnknown_085102E0
_0809D862:
lsls r1, r2, 3
adds r0, r1, r3
ldrb r0, [r0]
cmp r0, r4
bne _0809D87C
adds r0, r3, 0x4
adds r0, r1, r0
ldr r0, [r0]
bl _call_via_r0
b _0809D886
.pool
_0809D87C:
adds r0, r2, 0x1
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0xC
bls _0809D862
_0809D886:
pop {r4}
pop {r0}
bx r0
thumb_func_end trigger_activate_weather
thumb_func_start task_per_step_callback_manager
task_per_step_callback_manager: @ 809D88C
push {lr}
@ -187,7 +39,7 @@ sub_809D8B8: @ 809D8B8
beq _0809D8E8
b _0809D8FC
_0809D8CA:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r0, [r0, 0x20]
movs r1, 0x80
lsls r1, 5
@ -200,7 +52,7 @@ _0809D8CA:
b _0809D8FA
.pool
_0809D8E8:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r0, [r0, 0x20]
movs r1, 0x80
lsls r1, 5
@ -1918,7 +1770,7 @@ sub_809E638: @ 809E638
mov r0, sp
adds r1, r5, 0
bl PlayerGetDestCoords
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x4
ldrsb r1, [r0, r1]
@ -2066,171 +1918,4 @@ _0809E762:
bx r0
thumb_func_end sub_809E638
thumb_func_start sub_809E778
sub_809E778: @ 809E778
push {lr}
ldr r0, =0x00000895
bl FlagSet
bl GameFreakRTC_CalcLocalDateTime
ldr r0, =gUnknown_03005D90
ldr r2, [r0]
adds r2, 0xA0
ldr r3, =gUnknown_03005CF8
ldr r0, [r3]
ldr r1, [r3, 0x4]
str r0, [r2]
str r1, [r2, 0x4]
ldr r0, =0x00004040
ldrh r1, [r3]
bl VarSet
pop {r0}
bx r0
.pool
thumb_func_end sub_809E778
thumb_func_start sub_809E7B0
sub_809E7B0: @ 809E7B0
push {r4,lr}
ldr r0, =0x00000895
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _0809E7DA
bl sub_813B9C0
lsls r0, 24
cmp r0, 0
bne _0809E7DA
bl GameFreakRTC_CalcLocalDateTime
ldr r4, =gUnknown_03005CF8
adds r0, r4, 0
bl sub_809E7E8
adds r0, r4, 0
bl sub_809E858
_0809E7DA:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_809E7B0
thumb_func_start sub_809E7E8
sub_809E7E8: @ 809E7E8
push {r4-r6,lr}
adds r5, r0, 0
ldr r0, =0x00004040
bl GetVarPointer
adds r6, r0, 0
ldrh r0, [r6]
movs r2, 0
ldrsh r1, [r5, r2]
cmp r0, r1
beq _0809E84E
cmp r0, r1
bgt _0809E84E
ldrh r4, [r5]
subs r4, r0
lsls r4, 16
lsrs r4, 16
bl sub_809D3A0
adds r0, r4, 0
bl sub_8122580
adds r0, r4, 0
bl sub_80ED888
adds r0, r4, 0
bl sub_80AEFBC
adds r0, r4, 0
bl sub_806DE44
adds r0, r4, 0
bl sub_8137904
adds r0, r4, 0
bl sub_8137A20
adds r0, r4, 0
bl sub_8139EF4
adds r0, r4, 0
bl sub_813A7F4
adds r0, r4, 0
bl sub_813945C
adds r0, r4, 0
bl sub_8177584
ldrh r0, [r5]
strh r0, [r6]
_0809E84E:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_809E7E8
thumb_func_start sub_809E858
sub_809E858: @ 809E858
push {r4-r6,lr}
sub sp, 0x8
adds r5, r0, 0
mov r4, sp
ldr r6, =gUnknown_03005D90
ldr r1, [r6]
adds r1, 0xA0
mov r0, sp
adds r2, r5, 0
bl GameFreakRTC_GetDelta
mov r0, sp
movs r2, 0
ldrsh r1, [r0, r2]
lsls r0, r1, 1
adds r0, r1
lsls r1, r0, 4
subs r1, r0
lsls r1, 5
movs r2, 0x2
ldrsb r2, [r4, r2]
lsls r0, r2, 4
subs r0, r2
lsls r0, 2
adds r1, r0
movs r0, 0x3
ldrsb r0, [r4, r0]
adds r0, r1, r0
cmp r0, 0
beq _0809E8A8
cmp r0, 0
blt _0809E8A8
bl BerryTreeTimeUpdate
ldr r2, [r6]
adds r2, 0xA0
ldr r0, [r5]
ldr r1, [r5, 0x4]
str r0, [r2]
str r1, [r2, 0x4]
_0809E8A8:
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_809E858
thumb_func_start sub_809E8B4
sub_809E8B4: @ 809E8B4
push {lr}
bl sub_809E778
ldr r0, =c2_exit_to_overworld_1_continue_scripts_restart_music
bl SetMainCallback2
pop {r0}
bx r0
.pool
thumb_func_end sub_809E8B4
thumb_func_start Special_StartWallClock
Special_StartWallClock: @ 809E8C8
push {lr}
ldr r0, =Cb2_StartWallClock
bl SetMainCallback2
ldr r1, =gUnknown_030022C0
ldr r0, =sub_809E8B4
str r0, [r1, 0x8]
pop {r0}
bx r0
.pool
thumb_func_end Special_StartWallClock
.align 2, 0 @ Don't pad with nop.

View File

@ -876,7 +876,7 @@ save_serialize_map: @ 80883C4
mov r7, r9
mov r6, r8
push {r6,r7}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
adds r4, r1, 0
adds r4, 0x34
@ -936,7 +936,7 @@ sub_8088438: @ 8088438
push {r4,lr}
movs r2, 0
movs r1, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
adds r3, r0, 0
adds r3, 0x34
@ -971,7 +971,7 @@ sav2_mapdata_clear: @ 8088474
mov r1, sp
movs r0, 0
strh r0, [r1]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
adds r1, 0x34
ldr r2, =0x01000100
@ -991,7 +991,7 @@ mapdata_from_sav2: @ 808849C
mov r5, r8
push {r5-r7}
sub sp, 0x10
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
adds r7, r0, 0
adds r7, 0x34
@ -1147,7 +1147,7 @@ sub_80885C4: @ 80885C4
lsls r0, 24
lsrs r3, r0, 24
adds r2, r3, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
adds r0, r1, 0
adds r0, 0x34
@ -1373,7 +1373,7 @@ _08088782:
GetPostCameraMoveMapBorderId: @ 8088788
push {r4,lr}
adds r3, r1, 0
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
movs r4, 0
ldrsh r2, [r1, r4]
@ -1395,7 +1395,7 @@ GetPostCameraMoveMapBorderId: @ 8088788
@ bool32 CanCameraMoveInDirection(u8 direction)
CanCameraMoveInDirection: @ 80887B0
push {r4,r5,lr}
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r4, [r1]
movs r1, 0
ldrsh r3, [r4, r1]
@ -1450,7 +1450,7 @@ _08088816:
beq _08088834
cmp r4, 0x4
bne _08088872
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
negs r0, r6
strh r0, [r1]
@ -1460,7 +1460,7 @@ _08088816:
b _08088870
.pool
_08088834:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, [r3]
ldr r0, [r0]
@ -1471,7 +1471,7 @@ _08088834:
b _08088870
.pool
_0808884C:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r2, [r5, 0x4]
ldrh r0, [r1]
@ -1481,7 +1481,7 @@ _0808884C:
b _08088870
.pool
_08088860:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r2, [r5, 0x4]
ldrh r0, [r1]
@ -1522,7 +1522,7 @@ CameraMove: @ 808887C
adds r0, r7, 0x1
cmp r0, 0x1
bhi _080888C4
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldrh r0, [r1]
add r0, r10
@ -1535,7 +1535,7 @@ CameraMove: @ 808887C
_080888C4:
bl save_serialize_map
bl sub_81BE72C
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r0, [r1]
movs r2, 0
ldrsh r5, [r0, r2]
@ -1562,7 +1562,7 @@ _080888C4:
orrs r0, r1
ldr r2, =gUnknown_02037334
strb r0, [r2]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r2, 0
ldrsh r0, [r1, r2]
@ -1884,7 +1884,7 @@ sub_8088B3C: @ 8088B3C
lsrs r0, 16
lsls r1, 16
lsrs r1, 16
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r2, [r2]
subs r0, 0x7
strh r0, [r2]
@ -1896,7 +1896,7 @@ sub_8088B3C: @ 8088B3C
thumb_func_start sav1_camera_get_focus_coords
sav1_camera_get_focus_coords: @ 8088B58
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r3, [r2]
ldrh r2, [r3]
adds r2, 0x7
@ -1911,7 +1911,7 @@ sav1_camera_get_focus_coords: @ 8088B58
thumb_func_start SetCameraCoords
@ void SetCameraCoords(u16 x, u16 y)
SetCameraCoords: @ 8088B70
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r2, [r2]
strh r0, [r2]
strh r1, [r2, 0x2]
@ -1922,7 +1922,7 @@ SetCameraCoords: @ 8088B70
thumb_func_start GetCameraCoords
@ void GetCameraCoords(u16 *x, u16 *y)
GetCameraCoords: @ 8088B80
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r3, [r2]
ldrh r2, [r3]
strh r2, [r0]

View File

@ -1,126 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start GetFlagPointer
@ u8 *GetFlagPointer(u16 flagId)
GetFlagPointer: @ 809D6EC
push {lr}
lsls r1, r0, 16
lsrs r2, r1, 16
adds r3, r2, 0
cmp r2, 0
bne _0809D6FC
movs r0, 0
b _0809D72E
_0809D6FC:
ldr r0, =0x00003fff
cmp r2, r0
bhi _0809D71C
ldr r0, =gUnknown_03005D8C
lsrs r1, 19
ldr r2, =0x00001270
adds r1, r2
ldr r0, [r0]
b _0809D72C
.pool
_0809D71C:
ldr r1, =0xffffc000
adds r0, r3, r1
cmp r0, 0
bge _0809D728
ldr r2, =0xffffc007
adds r0, r3, r2
_0809D728:
asrs r0, 3
ldr r1, =gUnknown_020375FC
_0809D72C:
adds r0, r1
_0809D72E:
pop {r1}
bx r1
.pool
thumb_func_end GetFlagPointer
thumb_func_start FlagSet
@ bool8 FlagSet(u16 flagId)
FlagSet: @ 809D740
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetFlagPointer
adds r2, r0, 0
cmp r2, 0
beq _0809D760
movs r0, 0x7
ands r0, r4
movs r1, 0x1
lsls r1, r0
ldrb r0, [r2]
orrs r1, r0
strb r1, [r2]
_0809D760:
movs r0, 0
pop {r4}
pop {r1}
bx r1
thumb_func_end FlagSet
thumb_func_start FlagReset
@ bool8 FlagReset(u16 flagId)
FlagReset: @ 809D768
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetFlagPointer
adds r2, r0, 0
cmp r2, 0
beq _0809D788
movs r0, 0x7
ands r0, r4
movs r1, 0x1
lsls r1, r0
ldrb r0, [r2]
bics r0, r1
strb r0, [r2]
_0809D788:
movs r0, 0
pop {r4}
pop {r1}
bx r1
thumb_func_end FlagReset
thumb_func_start FlagGet
@ bool8 FlagGet(u16 flagId)
FlagGet: @ 809D790
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
adds r0, r4, 0
bl GetFlagPointer
cmp r0, 0
beq _0809D7B4
ldrb r0, [r0]
movs r1, 0x7
ands r1, r4
asrs r0, r1
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _0809D7B4
movs r0, 0x1
b _0809D7B6
_0809D7B4:
movs r0, 0
_0809D7B6:
pop {r4}
pop {r1}
bx r1
thumb_func_end FlagGet
.align 2, 0 @ Don't pad with nop.

View File

@ -2055,14 +2055,14 @@ _080FACB4:
beq _080FACC2
b _080FADCE
_080FACC2:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r1, 0x64
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
ldr r0, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r0, =gStringVar2
ldr r1, =gUnknown_085EA88B
bl CopyString
bl StringCopy
ldr r1, =gUnknown_020375F0
movs r0, 0
strh r0, [r1]
@ -2079,14 +2079,14 @@ _080FACC2:
b _080FAD8A
.pool
_080FAD14:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
movs r1, 0x32
movs r2, 0
movs r3, 0x2
bl ConvertIntToDecimalString
ldr r0, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r0, =gStringVar2
ldr r1, =gUnknown_085EA890
bl CopyString
bl StringCopy
ldr r1, =gUnknown_020375F0
movs r0, 0
strh r0, [r1]

View File

@ -287,7 +287,7 @@ sub_80B4808: @ 80B4808
strb r0, [r3]
movs r0, 0xFE
strb r0, [r3, 0x1]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrb r1, [r0, 0x5]
ldrb r2, [r0, 0x4]
@ -311,7 +311,7 @@ _080B4870:
strb r0, [r3]
movs r0, 0xFE
strb r0, [r3, 0x1]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrb r1, [r0, 0x5]
ldrb r2, [r0, 0x4]

View File

@ -70,9 +70,9 @@ sub_8145E2C: @ 8145E2C
ldr r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl GetMonNickname
movs r0, 0
pop {r1}

84
asm/fldeff_teleport.s Normal file
View File

@ -0,0 +1,84 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start SetUpFieldMove_Teleport
SetUpFieldMove_Teleport: @ 817C8BC
push {lr}
ldr r0, =gUnknown_02037318
ldrb r0, [r0, 0x17]
bl is_light_level_1_2_3_or_6
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _0817C8D8
movs r0, 0
b _0817C8E6
.pool
_0817C8D8:
ldr r1, =gUnknown_03005DB0
ldr r0, =hm_add_c3_launch_phase_2
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm_teleport_run_dp02scr
str r0, [r1]
movs r0, 0x1
_0817C8E6:
pop {r1}
bx r1
.pool
thumb_func_end SetUpFieldMove_Teleport
thumb_func_start hm_teleport_run_dp02scr
hm_teleport_run_dp02scr: @ 817C8FC
push {lr}
bl sub_808469C
movs r0, 0x3F
bl FieldEffectStart
bl brm_get_pokemon_selection
ldr r1, =gUnknown_02038C08
lsls r0, 24
lsrs r0, 24
str r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end hm_teleport_run_dp02scr
thumb_func_start sub_817C91C
sub_817C91C: @ 817C91C
push {lr}
bl oei_task_add
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
ldr r2, =sub_817C94C
lsrs r0, r2, 16
strh r0, [r1, 0x18]
strh r2, [r1, 0x1A]
movs r0, 0x1
bl SetPlayerAvatarTransitionFlags
movs r0, 0
pop {r1}
bx r1
.pool
thumb_func_end sub_817C91C
thumb_func_start sub_817C94C
sub_817C94C: @ 817C94C
push {lr}
movs r0, 0x3F
bl FieldEffectActiveListRemove
bl sub_80B7FC8
pop {r0}
bx r0
thumb_func_end sub_817C94C
.align 2, 0 @ Don't pad with nop.

File diff suppressed because it is too large Load Diff

3603
asm/hall_of_fame.s Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1077
asm/intro_credits_graphics.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
thumb_func_start decrypt_bag_item_quantity
decrypt_bag_item_quantity: @ 80D6554
adds r1, r0, 0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
adds r0, 0xAC
ldr r0, [r0]
@ -24,7 +24,7 @@ decrypt_bag_item_quantity: @ 80D6554
encrypt_bag_item_quantity: @ 80D656C
lsls r1, 16
lsrs r1, 16
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r2, [r2]
adds r2, 0xAC
ldr r2, [r2]
@ -108,7 +108,7 @@ call_encrypt_decrypt_all_item_quantities: @ 80D65E4
init_bag_pockets: @ 80D65F0
push {r4,lr}
ldr r1, =gUnknown_02039DD8
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
movs r3, 0xAC
lsls r3, 3
@ -156,7 +156,7 @@ itemid_get_name: @ 80D6644
bl itemid_get_item
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
bl StringCopy
pop {r4}
pop {r0}
bx r0
@ -181,7 +181,7 @@ _080D667C:
ldr r1, =gUnknown_085EFCD4
_080D667E:
adds r0, r4, 0
bl CopyString
bl StringCopy
b _080D66BE
.pool
_080D668C:
@ -205,7 +205,7 @@ _080D66B0:
bl itemid_get_item
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
bl StringCopy
_080D66BE:
pop {r4}
pop {r0}
@ -221,12 +221,12 @@ GetBerryCountString: @ 80D66C4
bhi _080D66CE
ldr r4, =gUnknown_085EFCDF
_080D66CE:
bl CopyString
bl StringCopy
movs r1, 0
strb r1, [r0]
adds r0, 0x1
adds r1, r4, 0
bl CopyString
bl StringCopy
pop {r4}
pop {r0}
bx r0
@ -992,7 +992,7 @@ _080D6CA6:
sub_80D6CAC: @ 80D6CAC
push {lr}
movs r1, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
movs r3, 0x93
lsls r3, 3
@ -1027,7 +1027,7 @@ sub_80D6CE4: @ 80D6CE4
push {r4,lr}
movs r2, 0
movs r1, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
movs r4, 0x93
lsls r4, 3
@ -1063,7 +1063,7 @@ sub_80D6D1C: @ 80D6D1C
lsrs r5, r1, 16
movs r4, 0
_080D6D28:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
lsls r1, r4, 2
adds r0, r2, r1
@ -1110,7 +1110,7 @@ sub_80D6D70: @ 80D6D70
movs r0, 0xC8
bl AllocZeroed
adds r7, r0, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r0, 0x93
lsls r0, 3
@ -1179,7 +1179,7 @@ _080D6E10:
adds r1, r5, 0
bl sub_80D6588
_080D6E20:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x93
lsls r1, 3
@ -1205,7 +1205,7 @@ sub_80D6E48: @ 80D6E48
lsls r0, 24
lsls r1, 16
lsrs r1, 16
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r2, [r2]
lsrs r0, 22
adds r3, r2, r0
@ -1240,7 +1240,7 @@ _080D6E88:
adds r6, r1, 0
cmp r4, 0x31
bhi _080D6ECA
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r12, r0
lsls r5, r2, 2
movs r7, 0x93
@ -1283,7 +1283,7 @@ _080D6ECA:
thumb_func_start sub_80D6EDC
sub_80D6EDC: @ 80D6EDC
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00000496
adds r1, r0, r2
@ -1604,7 +1604,7 @@ sub_80D710C: @ 80D710C
lsrs r5, r0, 16
lsls r1, 16
lsrs r4, r1, 16
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r3, [r0]
ldr r1, =0x00000ca9
adds r0, r3, r1
@ -1664,7 +1664,7 @@ sub_80D7184: @ 80D7184
lsrs r5, r0, 16
lsls r1, 16
lsrs r4, r1, 16
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r3, [r0]
ldr r1, =0x00000ca9
adds r0, r3, r1
@ -1731,7 +1731,7 @@ sub_80D7204: @ 80D7204
lsrs r7, r0, 16
lsls r1, 16
lsrs r4, r1, 16
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r3, [r0]
ldr r1, =0x00000ca9
adds r0, r3, r1
@ -1879,7 +1879,7 @@ sub_80D7334: @ 80D7334
mov r9, r0
lsls r1, 16
lsrs r4, r1, 16
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r3, [r0]
ldr r1, =0x00000ca9
adds r0, r3, r1

View File

@ -140,9 +140,9 @@ DisplayCannotUseItemMessage: @ 80FD164
lsrs r5, r0, 24
lsls r4, 24
lsrs r4, 24
ldr r6, =gUnknown_02021FC4
ldr r6, =gStringVar4
adds r0, r6, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
cmp r4, 0
bne _080FD1B4
bl InBattlePyramid
@ -1532,7 +1532,7 @@ ItemUseOutOfBattle_CoinCase: @ 80FDC34
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
bl GetCoins
adds r1, r0, 0
lsls r1, 16
@ -1540,11 +1540,11 @@ ItemUseOutOfBattle_CoinCase: @ 80FDC34
adds r0, r4, 0
movs r2, 0
movs r3, 0x4
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E9026
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
@ -1578,17 +1578,17 @@ ItemUseOutOfBattle_PowderJar: @ 80FDCA4
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
bl sub_80247BC
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
movs r3, 0x5
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E9138
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
@ -1938,13 +1938,13 @@ task08_0809AD8C: @ 80FDFBC
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _080FE000
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
ldr r0, =gUnknown_0203CE7C
ldrh r0, [r0]
bl ItemIdToBattleMoveId
@ -1955,11 +1955,11 @@ task08_0809AD8C: @ 80FDFBC
ldr r0, =gMoveNames
adds r1, r0
adds r0, r4, 0
bl CopyString
ldr r4, =gUnknown_02021FC4
bl StringCopy
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E9058
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r3, =sub_80FE024
adds r0, r5, 0
movs r1, 0x1
@ -2007,11 +2007,11 @@ sub_80FE058: @ 80FE058
movs r1, 0x1
bl remove_item
ldrh r0, [r4]
ldr r1, =gUnknown_02021DC4
ldr r1, =gStringVar2
bl itemid_get_name
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E9080
bl ExpandStringRefs
bl StringExpandPlaceholders
bl InBattlePyramid
lsls r0, 24
cmp r0, 0
@ -2138,7 +2138,7 @@ sub_80FE164: @ 80FE164
lsls r0, 24
cmp r0, 0
bne _080FE1B8
ldr r2, =gUnknown_02021FC4
ldr r2, =gStringVar4
ldr r3, =bag_menu_inits_lists_menu
adds r0, r5, 0
movs r1, 0x1
@ -2146,7 +2146,7 @@ sub_80FE164: @ 80FE164
b _080FE1C2
.pool
_080FE1B8:
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
ldr r2, =sub_81C6714
adds r0, r6, 0
bl DisplayItemMessageInBattlePyramid
@ -2181,7 +2181,7 @@ sub_80FE1D0: @ 80FE1D0
lsls r0, 24
cmp r0, 0
bne _080FE21C
ldr r2, =gUnknown_02021FC4
ldr r2, =gStringVar4
ldr r3, =bag_menu_inits_lists_menu
adds r0, r4, 0
movs r1, 0x1
@ -2189,7 +2189,7 @@ sub_80FE1D0: @ 80FE1D0
b _080FE226
.pool
_080FE21C:
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
ldr r2, =sub_81C6714
adds r0, r5, 0
bl DisplayItemMessageInBattlePyramid
@ -2207,7 +2207,7 @@ ItemUseOutOfBattle_BlackWhiteFlute: @ 80FE234
lsrs r5, r0, 24
ldr r4, =gUnknown_0203CE7C
ldrh r0, [r4]
ldr r1, =gUnknown_02021DC4
ldr r1, =gStringVar2
bl itemid_get_name
ldrh r0, [r4]
cmp r0, 0x2B
@ -2216,9 +2216,9 @@ ItemUseOutOfBattle_BlackWhiteFlute: @ 80FE234
bl FlagSet
ldr r0, =0x000008ae
bl FlagReset
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E90C6
bl ExpandStringRefs
bl StringExpandPlaceholders
b _080FE28C
.pool
_080FE278:
@ -2226,9 +2226,9 @@ _080FE278:
bl FlagSet
ldr r0, =0x000008ad
bl FlagReset
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E90F4
bl ExpandStringRefs
bl StringExpandPlaceholders
_080FE28C:
ldr r1, =gTasks
lsls r0, r5, 2
@ -2275,7 +2275,7 @@ re_escape_rope: @ 80FE2D8
adds r0, r1
movs r1, 0
strh r1, [r0, 0x8]
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
ldr r2, =task08_080A1C44
adds r0, r4, 0
bl DisplayItemMessageOnField
@ -2407,7 +2407,7 @@ sub_80FE408: @ 80FE408
lsls r0, 24
lsrs r4, r0, 24
adds r5, r4, 0
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
@ -2494,7 +2494,7 @@ ItemUseInBattle_StatIncrease: @ 80FE4B8
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r1, =gUnknown_0203CE7C
ldrh r1, [r1]
@ -2618,7 +2618,7 @@ ItemUseInBattle_Escape: @ 80FE5E4
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x8
ands r0, r1
@ -2629,7 +2629,7 @@ ItemUseInBattle_Escape: @ 80FE5E4
lsls r0, 24
cmp r0, 0
bne _080FE620
ldr r2, =gUnknown_02021FC4
ldr r2, =gStringVar4
ldr r3, =unknown_ItemMenu_Confirm
adds r0, r4, 0
movs r1, 0x1
@ -2637,7 +2637,7 @@ ItemUseInBattle_Escape: @ 80FE5E4
b _080FE646
.pool
_080FE620:
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
ldr r2, =sub_81C5B14
adds r0, r4, 0
bl DisplayItemMessageInBattlePyramid

View File

@ -1,3 +1,4 @@
.include "constants/gba_constants.inc"
.include "asm/macros.inc"
.syntax unified
@ -87,10 +88,10 @@ RegisterRamReset: @ 82E70A8
thumb_func_start SoftReset
@ void SoftReset()
SoftReset: @ 82E70AC
ldr r3, =0x04000208
ldr r3, =REG_IME
movs r2, 0
strb r2, [r3]
ldr r1, =gUnknown_03007F00
ldr r1, =0x3007F00
mov sp, r1
swi 0x1
swi 0

File diff suppressed because it is too large Load Diff

1158
asm/link.s

File diff suppressed because it is too large Load Diff

View File

@ -13,14 +13,14 @@ CheckForFlashMemory: @ 8076B68
lsls r0, 16
cmp r0, 0
bne _08076B84
ldr r1, =gUnknown_03005D88
ldr r1, =gFlashMemoryPresent
movs r0, 0x1
str r0, [r1]
bl StartFlashMemoryTimer
b _08076B8A
.pool
_08076B84:
ldr r1, =gUnknown_03005D88
ldr r1, =gFlashMemoryPresent
movs r0, 0
str r0, [r1]
_08076B8A:
@ -70,12 +70,12 @@ InitSaveBlockPointersWithRandomOffset: @ 8076BDC
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldr r5, =gUnknown_03005D8C
bl GenerateRandomNumber
ldr r5, =gSaveBlock1Ptr
bl Random
adds r4, r0
movs r0, 0x7C
ands r4, r0
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r0, =gUnknown_02024A54
adds r0, r4, r0
str r0, [r1]
@ -102,7 +102,7 @@ saveblock_randomize_and_relocate: @ 8076C2C
mov r5, r8
push {r5-r7}
sub sp, 0x8
ldr r5, =gUnknown_030022C0
ldr r5, =gMain
ldr r0, [r5, 0xC]
str r0, [sp]
ldr r1, [r5, 0x10]
@ -113,13 +113,13 @@ saveblock_randomize_and_relocate: @ 8076C2C
ldr r1, =gUnknown_0203CF5C
str r0, [r1]
ldr r4, =0x02000000
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldr r6, =0x00000f2c
adds r0, r4, 0
adds r2, r6, 0
bl memcpy
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
mov r10, r1
ldr r1, [r1]
ldr r7, =0x00003d88
@ -142,7 +142,7 @@ saveblock_randomize_and_relocate: @ 8076C2C
ldrb r0, [r4, 0xD]
adds r0, r1
bl InitSaveBlockPointersWithRandomOffset
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r0, [r1]
adds r1, r4, 0
adds r2, r6, 0
@ -165,16 +165,16 @@ saveblock_randomize_and_relocate: @ 8076C2C
str r0, [r5, 0x10]
ldr r1, [sp]
str r1, [r5, 0xC]
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsls r0, 16
lsrs r0, 16
adds r4, r0
adds r0, r4, 0
bl saveblock_apply_crypto
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r0, [r1]
adds r0, 0xAC
str r4, [r0]
@ -191,7 +191,7 @@ saveblock_randomize_and_relocate: @ 8076C2C
thumb_func_start sav2_x1_query_bit1
sav2_x1_query_bit1: @ 8076D24
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r1, [r0, 0x9]
movs r0, 0x1
@ -202,7 +202,7 @@ sav2_x1_query_bit1: @ 8076D24
thumb_func_start sav2_x9_clear_bit1
sav2_x9_clear_bit1: @ 8076D34
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r1, [r2, 0x9]
movs r0, 0xFE
@ -214,7 +214,7 @@ sav2_x9_clear_bit1: @ 8076D34
thumb_func_start sub_8076D48
sub_8076D48: @ 8076D48
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r1, [r2, 0x9]
movs r0, 0x1
@ -229,7 +229,7 @@ sub_8076D5C: @ 8076D5C
push {lr}
movs r0, 0
bl sub_8084FAC
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r1, [r2, 0x9]
movs r0, 0x1
@ -242,7 +242,7 @@ sub_8076D5C: @ 8076D5C
thumb_func_start sav2_gender2_inplace_and_xFE
sav2_gender2_inplace_and_xFE: @ 8076D78
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r1, [r2, 0x9]
movs r0, 0xFE
@ -256,7 +256,7 @@ sav2_gender2_inplace_and_xFE: @ 8076D78
@ void copy_player_party_to_sav1()
copy_player_party_to_sav1: @ 8076D8C
push {r4,lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =gUnknown_020244E9
ldrb r1, [r1]
@ -266,7 +266,7 @@ copy_player_party_to_sav1: @ 8076D8C
strb r1, [r0]
movs r4, 0
_08076DA0:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x64
muls r1, r4
@ -274,7 +274,7 @@ _08076DA0:
movs r2, 0x8E
lsls r2, 2
adds r0, r2
ldr r2, =gUnknown_020244EC
ldr r2, =gPlayerParty
adds r1, r2
movs r2, 0x64
bl memcpy
@ -291,7 +291,7 @@ _08076DA0:
copy_player_party_from_sav1: @ 8076DD4
push {r4,r5,lr}
ldr r1, =gUnknown_020244E9
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r2, 0x8D
lsls r2, 2
@ -299,13 +299,13 @@ copy_player_party_from_sav1: @ 8076DD4
ldrb r0, [r0]
strb r0, [r1]
movs r4, 0
ldr r5, =gUnknown_020244EC
ldr r5, =gPlayerParty
_08076DEA:
movs r0, 0x64
adds r2, r4, 0
muls r2, r0
adds r0, r2, r5
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
adds r1, r2
movs r2, 0x8E
@ -327,7 +327,7 @@ save_serialize_npcs: @ 8076E1C
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r12, r0
movs r5, 0xA3
lsls r5, 4
@ -365,7 +365,7 @@ save_deserialize_npcs: @ 8076E64
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r12, r0
movs r5, 0xA3
lsls r5, 4
@ -426,9 +426,9 @@ copy_bags_and_unk_data_from_save_blocks: @ 8076ECC
movs r2, 0
ldr r0, =gUnknown_02032180
mov r12, r0
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
mov r10, r1
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r3, 0xAC
lsls r3, 3
ldr r4, =gUnknown_02031C58
@ -444,7 +444,7 @@ _08076EE8:
ble _08076EE8
movs r2, 0
ldr r0, =gUnknown_02031C58
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r3, 0xBB
lsls r3, 3
adds r4, r0, 0
@ -461,7 +461,7 @@ _08076F08:
ble _08076F08
movs r2, 0
ldr r0, =gUnknown_02031C58
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r3, 0xCA
lsls r3, 3
adds r4, r0, 0
@ -478,7 +478,7 @@ _08076F28:
ble _08076F28
movs r2, 0
ldr r0, =gUnknown_02031C58
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r6, 0x98
lsls r6, 1
adds r4, r0, r6
@ -496,7 +496,7 @@ _08076F4A:
ble _08076F4A
movs r2, 0
ldr r0, =gUnknown_02031C58
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r7, 0x8C
lsls r7, 2
adds r4, r0, r7
@ -513,7 +513,7 @@ _08076F6C:
cmp r2, 0x2D
ble _08076F6C
ldr r0, =gUnknown_02031C58
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
mov r8, r1
movs r5, 0xBA
lsls r5, 2
@ -563,11 +563,11 @@ copy_bags_and_unk_data_to_save_blocks: @ 8076FE0
mov r5, r8
push {r5-r7}
movs r2, 0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
mov r8, r0
ldr r1, =gUnknown_02032180
mov r12, r1
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r3, 0xAC
lsls r3, 3
ldr r4, =gUnknown_02031C58
@ -582,7 +582,7 @@ _08076FFC:
cmp r2, 0x1D
ble _08076FFC
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r4, 0xBB
lsls r4, 3
ldr r0, =gUnknown_02031C58
@ -599,7 +599,7 @@ _0807701C:
cmp r2, 0x1D
ble _0807701C
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r4, 0xCA
lsls r4, 3
ldr r0, =gUnknown_02031C58
@ -616,7 +616,7 @@ _0807703C:
cmp r2, 0xF
ble _0807703C
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r4, 0xD2
lsls r4, 3
ldr r0, =gUnknown_02031C58
@ -634,7 +634,7 @@ _0807705E:
cmp r2, 0x3F
ble _0807705E
movs r2, 0
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
movs r4, 0xF2
lsls r4, 3
ldr r0, =gUnknown_02031C58
@ -651,7 +651,7 @@ _08077080:
adds r2, 0x1
cmp r2, 0x2D
ble _08077080
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r9, r0
ldr r1, =0x00002be0
mov r10, r1
@ -701,7 +701,7 @@ _080770A0:
thumb_func_start apply_u16_xor_crypto
apply_u16_xor_crypto: @ 8077100
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r2, [r2]
adds r2, 0xAC
ldr r2, [r2]
@ -715,7 +715,7 @@ apply_u16_xor_crypto: @ 8077100
thumb_func_start apply_u32_xor_crypto
apply_u32_xor_crypto: @ 8077118
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r3, [r2]
adds r3, 0xAC
ldr r2, [r0]
@ -736,7 +736,7 @@ saveblock_apply_crypto: @ 8077130
bl call_encrypt_decrypt_all_item_quantities
adds r0, r4, 0
bl sub_8024690
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r0, [r5]
movs r1, 0x92
lsls r1, 3

View File

@ -8,11 +8,11 @@
thumb_func_start sub_8177558
sub_8177558: @ 8177558
push {r4,lr}
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
bl GenerateRandomNumber
bl Random
lsls r0, 16
orrs r0, r4
bl sub_8177814
@ -30,7 +30,7 @@ sub_8177584: @ 8177584
push {r4,r5,lr}
lsls r0, 16
lsrs r4, r0, 16
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r1, r0, 16
subs r0, r4, 0x1
@ -91,21 +91,21 @@ _081775FC:
movs r0, 0x64
adds r1, r7, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0xB
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _08177658
adds r0, r4, 0
movs r1, 0x2D
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0817764E
adds r0, r4, 0
movs r1, 0x1
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
ldr r0, =gUnknown_020375F0
ldrh r0, [r0]
@ -222,11 +222,11 @@ _081776D2:
movs r0, 0x64
ldr r1, [sp, 0x4]
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
ldr r2, =gUnknown_02021CC4
ldr r2, =gStringVar1
movs r1, 0x2
bl pokemon_getattr
bl GetMonData
b _08177768
.pool
_0817773C:
@ -248,12 +248,12 @@ _0817773C:
adds r1, r2
lsls r1, 4
adds r0, r1
ldr r2, =gUnknown_02021CC4
ldr r2, =gStringVar1
movs r1, 0x2
bl pokemon_getattr_encrypted
_08177768:
ldr r0, =gUnknown_02021CC4
bl GetStringEnd_Limit7
ldr r0, =gStringVar1
bl StringGetEnd10
_0817776E:
add sp, 0x8
pop {r3-r5}

View File

@ -302,7 +302,7 @@ _081DD044:
ldrb r0, [r4, o_SoundChannel_type]
tst r0, 0x30
beq _081DD068
bl sub_81DD264
bl sub_82DF49C
b _081DD228
_081DD068:
mov r10, r10, lsl 16
@ -465,8 +465,8 @@ _081DD25E:
.pool
thumb_func_end SoundMainRAM
arm_func_start sub_81DD264
sub_81DD264:
arm_func_start sub_82DF49C
sub_82DF49C:
ldr r6, [r4, o_SoundChannel_wav]
ldrb r0, [r4, o_SoundChannel_status]
tst r0, 0x20
@ -505,10 +505,10 @@ _081DD2B4:
ldrb r0, [r4, o_SoundChannel_type]
tst r0, 0x10
bne _081DD3C0
bl sub_81DD520
bl sub_82DF758
mov r0, r1
add r3, r3, 0x1
bl sub_81DD520
bl sub_82DF758
sub r1, r1, r0
_081DD308:
ldr r6, [r5]
@ -534,11 +534,11 @@ _081DD310:
b _081DD364
_081DD358:
add r3, r3, lr
bl sub_81DD520
bl sub_82DF758
mov r0, r1
_081DD364:
add r3, r3, 0x1
bl sub_81DD520
bl sub_82DF758
sub r1, r1, r0
_081DD370:
adds r5, r5, 0x40000000
@ -565,10 +565,10 @@ _081DD3B0:
b _081DD3B0
_081DD3C0:
sub r3, r3, 0x1
bl sub_81DD520
bl sub_82DF758
mov r0, r1
sub r3, r3, 0x1
bl sub_81DD520
bl sub_82DF758
sub r1, r1, r0
_081DD3D8:
ldr r6, [r5]
@ -594,11 +594,11 @@ _081DD3E0:
b _081DD434
_081DD428:
sub r3, r3, lr
bl sub_81DD520
bl sub_82DF758
mov r0, r1
_081DD434:
sub r3, r3, 0x1
bl sub_81DD520
bl sub_82DF758
sub r1, r1, r0
_081DD440:
adds r5, r5, 0x40000000
@ -663,10 +663,10 @@ _081DD4F4:
str r7, [r5, 0x630]
str r6, [r5], 0x4
pop {r8,r12,pc}
arm_func_end sub_81DD264
arm_func_end sub_82DF49C
arm_func_start sub_81DD520
sub_81DD520:
arm_func_start sub_82DF758
sub_82DF758:
push {r0,r2,r5-r7,lr}
mov r0, r3, lsr 6
ldr r1, [r4, o_SoundChannel_xpi]
@ -704,7 +704,7 @@ _081DD594:
ldrsb r1, [r5, r0]
pop {r0,r2,r5-r7,pc}
.pool
arm_func_end sub_81DD520
arm_func_end sub_82DF758
thumb_func_start SoundMainBTM
SoundMainBTM:

View File

@ -167,7 +167,7 @@ _081215BA:
sub_81215EC: @ 81215EC
push {r4-r6,lr}
sub sp, 0xC
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -420,7 +420,7 @@ _081217EC:
movs r2, 0x20
bl LoadPalette
ldr r1, =gUnknown_0859F2B0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r0, [r2, 0x8]
lsls r0, 2
@ -574,7 +574,7 @@ _08121980:
b _081219E4
.pool
_081219D4:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -683,7 +683,7 @@ _08121A8A:
adds r1, r3
ldr r1, [r1]
adds r1, 0x12
bl CopyString
bl StringCopy
adds r2, r0, 0
ldr r1, [r4]
ldr r3, =0x0000021e
@ -693,12 +693,12 @@ _08121A8A:
bne _08121AF0
ldr r1, =gUnknown_085EEA78
adds r0, r2, 0
bl CopyString
bl StringCopy
ldr r0, [r4]
movs r1, 0x80
lsls r1, 2
adds r0, r1
bl GetStringLength
bl StringLength
ldr r2, [r4]
movs r3, 0x8A
lsls r3, 2
@ -827,13 +827,13 @@ _08121BB8:
_08121BCC:
ldr r1, =gUnknown_085EEA78
add r0, sp, 0xC
bl CopyString
bl StringCopy
ldr r4, =gUnknown_0203A134
ldr r1, [r4]
movs r2, 0x80
lsls r2, 2
adds r1, r2
bl CopyString
bl StringCopy
ldr r0, [r4]
ldr r1, =0x00000219
adds r0, r1
@ -939,7 +939,7 @@ _08121CB2:
sub_8121CC0: @ 8121CC0
push {lr}
sub sp, 0x4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1

View File

@ -1,722 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Main
Main: @ 80003A4
push {r4-r7,lr}
mov r7, r8
push {r7}
movs r0, 0xFF
bl RegisterRamReset
movs r1, 0xA0
lsls r1, 19
ldr r2, =0x00007fff
adds r0, r2, 0
strh r0, [r1]
bl InitGpuRegManager
ldr r1, =0x04000204
ldr r3, =0x00004014
adds r0, r3, 0
strh r0, [r1]
bl InitKeypadData
bl InitIntrHandlers
bl m4aSoundInit
bl EnableVCountIntrAtLine150
bl sub_800E6D0
bl GameFreakRTC_Init
bl CheckForFlashMemory
bl InitVariablesAndSetCopyrightScreenCallback
bl sound_sources_off
bl ClearDma3Requests
bl ResetBgs
bl SetDefaultFontsPointer
ldr r0, =0x02000000
movs r1, 0xE0
lsls r1, 9
bl InitHeap
ldr r0, =gUnknown_03002700
movs r4, 0
strb r4, [r0]
ldr r0, =gUnknown_03005D88
ldr r0, [r0]
cmp r0, 0x1
beq _08000414
movs r0, 0
bl SetMainCallback2
_08000414:
ldr r2, =gUnknown_030022B4
strb r4, [r2]
ldr r1, =gUnknown_03000000
movs r3, 0xFC
lsls r3, 4
adds r0, r3, 0
strh r0, [r1]
ldr r7, =gUnknown_030022C0
movs r0, 0
mov r8, r0
adds r6, r2, 0
_0800042A:
bl ReadKeypad
ldr r0, =gUnknown_03002700
ldrb r0, [r0]
cmp r0, 0
bne _08000454
ldrh r1, [r7, 0x28]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08000454
movs r0, 0xE
ands r0, r1
cmp r0, 0xE
bne _08000454
bl rfu_REQ_stopMode
bl rfu_waitREQComplete
bl Reset
_08000454:
bl sub_8087634
cmp r0, 0x1
bne _0800048C
strb r0, [r6]
bl HandleLinkConnectionAndCallMainCallbacks
movs r0, 0
strb r0, [r6]
b _080004B2
.pool
_0800048C:
ldr r5, =gUnknown_030022B4
movs r0, 0
strb r0, [r5]
bl HandleLinkConnectionAndCallMainCallbacks
bl sub_80875C8
adds r4, r0, 0
cmp r4, 0x1
bne _080004B2
movs r0, 0
strh r0, [r7, 0x2E]
bl ClearObjectCopyRequests
strb r4, [r5]
bl HandleLinkConnectionAndCallMainCallbacks
mov r2, r8
strb r2, [r5]
_080004B2:
bl gametime_increment
bl sound_something
bl WaitForVBlankIntr
b _0800042A
.pool
thumb_func_end Main
thumb_func_start HandleLinkConnectionAndCallMainCallbacks
@ void HandleLinkConnectionAndCallMainCallbacks()
HandleLinkConnectionAndCallMainCallbacks: @ 80004C4
push {lr}
bl HandleLinkConnection
lsls r0, 24
cmp r0, 0
bne _080004D4
bl CallMainCallbacks
_080004D4:
pop {r0}
bx r0
thumb_func_end HandleLinkConnectionAndCallMainCallbacks
thumb_func_start InitVariablesAndSetCopyrightScreenCallback
@ void InitVariablesAndSetCopyrightScreenCallback()
InitVariablesAndSetCopyrightScreenCallback: @ 80004D8
push {lr}
ldr r2, =gUnknown_030022C0
movs r0, 0
str r0, [r2, 0x20]
ldr r1, =gUnknown_0203CF5C
str r0, [r1]
str r0, [r2, 0x24]
str r0, [r2]
ldr r0, =c2_copyright_1
bl SetMainCallback2
ldr r1, =gUnknown_03005D90
ldr r0, =gUnknown_02024A54
str r0, [r1]
ldr r1, =gUnknown_03005D94
ldr r0, =gUnknown_02029808
str r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end InitVariablesAndSetCopyrightScreenCallback
thumb_func_start CallMainCallbacks
@ void CallMainCallbacks()
CallMainCallbacks: @ 800051C
push {r4,lr}
ldr r4, =gUnknown_030022C0
ldr r0, [r4]
cmp r0, 0
beq _0800052A
bl _call_via_r0
_0800052A:
ldr r0, [r4, 0x4]
cmp r0, 0
beq _08000534
bl _call_via_r0
_08000534:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end CallMainCallbacks
thumb_func_start SetMainCallback2
@ void SetMainCallback2(void ( *func)())
SetMainCallback2: @ 8000540
ldr r1, =gUnknown_030022C0
str r0, [r1, 0x4]
movs r0, 0x87
lsls r0, 3
adds r1, r0
movs r0, 0
strb r0, [r1]
bx lr
.pool
thumb_func_end SetMainCallback2
thumb_func_start StartTimer1
@ void StartTimer1()
StartTimer1: @ 8000554
ldr r1, =0x04000106
movs r0, 0x80
strh r0, [r1]
bx lr
.pool
thumb_func_end StartTimer1
thumb_func_start SeedRngAndSetTrainerId
@ void SeedRngAndSetTrainerId()
SeedRngAndSetTrainerId: @ 8000560
push {r4,lr}
ldr r0, =0x04000104
ldrh r4, [r0]
adds r0, r4, 0
bl SeedRng
ldr r1, =0x04000106
movs r0, 0
strh r0, [r1]
ldr r0, =gUnknown_02020000
strh r4, [r0]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end SeedRngAndSetTrainerId
thumb_func_start GetTrainerId
@ u16 GetTrainerId()
GetTrainerId: @ 8000588
ldr r0, =gUnknown_02020000
ldrh r0, [r0]
bx lr
.pool
thumb_func_end GetTrainerId
thumb_func_start EnableVCountIntrAtLine150
@ void EnableVCountIntrAtLine150()
EnableVCountIntrAtLine150: @ 8000594
push {lr}
movs r0, 0x4
bl GetGpuReg
movs r1, 0xFF
ands r1, r0
movs r2, 0x96
lsls r2, 8
adds r0, r2, 0
orrs r1, r0
movs r0, 0x20
orrs r1, r0
movs r0, 0x4
bl SetGpuReg
movs r0, 0x4
bl EnableInterrupts
pop {r0}
bx r0
thumb_func_end EnableVCountIntrAtLine150
thumb_func_start InitKeypadData
@ void InitKeypadData()
InitKeypadData: @ 80005BC
ldr r1, =gUnknown_030026FC
movs r0, 0x5
strh r0, [r1]
ldr r1, =gUnknown_030022B0
movs r0, 0x28
strh r0, [r1]
ldr r1, =gUnknown_030022C0
movs r0, 0
strh r0, [r1, 0x2C]
strh r0, [r1, 0x2E]
strh r0, [r1, 0x30]
strh r0, [r1, 0x28]
strh r0, [r1, 0x2A]
bx lr
.pool
thumb_func_end InitKeypadData
thumb_func_start ReadKeypad
@ void ReadKeypad()
ReadKeypad: @ 80005E4
push {lr}
ldr r0, =0x04000130
ldrh r1, [r0]
ldr r2, =0x000003ff
adds r0, r2, 0
adds r3, r0, 0
eors r3, r1
ldr r1, =gUnknown_030022C0
ldrh r2, [r1, 0x28]
adds r0, r3, 0
bics r0, r2
strh r0, [r1, 0x2A]
strh r0, [r1, 0x2E]
strh r0, [r1, 0x30]
adds r2, r1, 0
cmp r3, 0
beq _08000630
ldrh r0, [r2, 0x2C]
cmp r0, r3
bne _08000630
ldrh r0, [r2, 0x32]
subs r0, 0x1
strh r0, [r2, 0x32]
lsls r0, 16
cmp r0, 0
bne _08000636
strh r3, [r2, 0x30]
ldr r0, =gUnknown_030026FC
b _08000632
.pool
_08000630:
ldr r0, =gUnknown_030022B0
_08000632:
ldrh r0, [r0]
strh r0, [r2, 0x32]
_08000636:
strh r3, [r2, 0x28]
strh r3, [r2, 0x2C]
ldr r0, =gUnknown_03005D90
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x2
bne _08000668
ldrh r1, [r2, 0x2E]
movs r3, 0x80
lsls r3, 2
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _08000658
movs r0, 0x1
orrs r0, r1
strh r0, [r2, 0x2E]
_08000658:
ldrh r1, [r2, 0x2C]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _08000668
movs r0, 0x1
orrs r0, r1
strh r0, [r2, 0x2C]
_08000668:
ldrh r1, [r2, 0x2E]
ldrh r0, [r2, 0x36]
ands r0, r1
cmp r0, 0
beq _08000676
movs r0, 0x1
strh r0, [r2, 0x34]
_08000676:
pop {r0}
bx r0
.pool
thumb_func_end ReadKeypad
thumb_func_start InitIntrHandlers
@ void InitIntrHandlers()
InitIntrHandlers: @ 8000684
push {r4,r5,lr}
ldr r5, =InterruptMain
ldr r4, =gUnknown_03002750
ldr r3, =gRomInterruptTable
ldr r2, =gUnknown_03002710
movs r1, 0xD
_08000690:
ldm r3!, {r0}
stm r2!, {r0}
subs r1, 0x1
cmp r1, 0
bge _08000690
ldr r0, =0x040000d4
str r5, [r0]
str r4, [r0, 0x4]
ldr r1, =0x84000200
str r1, [r0, 0x8]
ldr r0, [r0, 0x8]
ldr r0, =gUnknown_03007FFC
str r4, [r0]
movs r0, 0
bl SetVBlankCallback
movs r0, 0
bl SetHBlankCallback
movs r0, 0
bl SetSerialCallback
ldr r1, =0x04000208
movs r0, 0x1
strh r0, [r1]
movs r0, 0x1
bl EnableInterrupts
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end InitIntrHandlers
thumb_func_start SetVBlankCallback
@ void SetVBlankCallback(void ( *func)())
SetVBlankCallback: @ 80006F0
ldr r1, =gUnknown_030022C0
str r0, [r1, 0xC]
bx lr
.pool
thumb_func_end SetVBlankCallback
thumb_func_start SetHBlankCallback
@ void SetHBlankCallback(void ( *func)())
SetHBlankCallback: @ 80006FC
ldr r1, =gUnknown_030022C0
str r0, [r1, 0x10]
bx lr
.pool
thumb_func_end SetHBlankCallback
thumb_func_start SetVCountCallback
@ void SetVCountCallback(void ( *func)())
SetVCountCallback: @ 8000708
ldr r1, =gUnknown_030022C0
str r0, [r1, 0x14]
bx lr
.pool
thumb_func_end SetVCountCallback
thumb_func_start RestoreSerialTimer3IntrHandlers
@ void RestoreSerialTimer3IntrHandlers()
RestoreSerialTimer3IntrHandlers: @ 8000714
ldr r0, =gUnknown_03002710
ldr r1, =SerialIntr
str r1, [r0, 0x4]
ldr r1, =Timer3Intr
str r1, [r0, 0x8]
bx lr
.pool
thumb_func_end RestoreSerialTimer3IntrHandlers
thumb_func_start SetSerialCallback
@ void SetSerialCallback(void ( *func)())
SetSerialCallback: @ 800072C
ldr r1, =gUnknown_030022C0
str r0, [r1, 0x18]
bx lr
.pool
thumb_func_end SetSerialCallback
thumb_func_start VBlankIntr
@ void VBlankIntr()
VBlankIntr: @ 8000738
push {r4,lr}
ldr r0, =gUnknown_030030FC
ldrb r0, [r0]
cmp r0, 0
beq _0800074C
bl rfu_syncVBlank__
b _08000758
.pool
_0800074C:
ldr r0, =gUnknown_03002748
ldrb r0, [r0]
cmp r0, 0
bne _08000758
bl sub_800B9B8
_08000758:
ldr r0, =gUnknown_030022C0
ldr r1, [r0, 0x20]
adds r1, 0x1
str r1, [r0, 0x20]
ldr r1, =gUnknown_0203CF5C
ldr r1, [r1]
adds r4, r0, 0
cmp r1, 0
beq _08000778
ldr r2, [r1]
movs r0, 0x2
negs r0, r0
cmp r2, r0
bhi _08000778
adds r0, r2, 0x1
str r0, [r1]
_08000778:
ldr r0, [r4, 0xC]
cmp r0, 0
beq _08000782
bl _call_via_r0
_08000782:
ldr r0, [r4, 0x24]
adds r0, 0x1
str r0, [r4, 0x24]
bl CopyBufferedValuesToGpuRegs
bl ProcessDma3Requests
ldr r1, =gUnknown_03002F50
ldr r0, =gSoundInfo
ldrb r0, [r0, 0x4]
strb r0, [r1]
bl m4aSoundMain
bl sub_8033648
ldr r1, =0x00000439
adds r0, r4, r1
ldrb r1, [r0]
movs r0, 0x2
ands r0, r1
cmp r0, 0
beq _080007BA
ldr r0, =gUnknown_02022FEC
ldr r0, [r0]
ldr r1, =0x013f0102
ands r0, r1
cmp r0, 0
bne _080007BE
_080007BA:
bl GenerateRandomNumber
_080007BE:
bl sub_800E174
ldr r2, =gUnknown_03007FF8
ldrh r0, [r2]
movs r1, 0x1
orrs r0, r1
strh r0, [r2]
ldr r0, =gUnknown_030022C0
ldrh r2, [r0, 0x1C]
ldrh r3, [r0, 0x1C]
orrs r1, r2
strh r1, [r0, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end VBlankIntr
thumb_func_start StartFlashMemoryTimer
@ void StartFlashMemoryTimer()
StartFlashMemoryTimer: @ 8000800
push {lr}
ldr r1, =gUnknown_0300272C
movs r0, 0x2
bl SetFlashTimerIntr
pop {r0}
bx r0
.pool
thumb_func_end StartFlashMemoryTimer
thumb_func_start HBlankIntr
@ void HBlankIntr()
HBlankIntr: @ 8000814
push {r4,lr}
ldr r4, =gUnknown_030022C0
ldr r0, [r4, 0x10]
cmp r0, 0
beq _08000822
bl _call_via_r0
_08000822:
ldr r2, =gUnknown_03007FF8
ldrh r0, [r2]
movs r1, 0x2
orrs r0, r1
strh r0, [r2]
ldrh r0, [r4, 0x1C]
ldrh r2, [r4, 0x1C]
orrs r1, r0
strh r1, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end HBlankIntr
thumb_func_start VCountIntr
@ void VCountIntr()
VCountIntr: @ 8000844
push {r4,lr}
ldr r4, =gUnknown_030022C0
ldr r0, [r4, 0x14]
cmp r0, 0
beq _08000852
bl _call_via_r0
_08000852:
bl m4aSoundVSync
ldr r2, =gUnknown_03007FF8
ldrh r0, [r2]
movs r1, 0x4
orrs r0, r1
strh r0, [r2]
ldrh r0, [r4, 0x1C]
ldrh r2, [r4, 0x1C]
orrs r1, r0
strh r1, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end VCountIntr
thumb_func_start SerialIntr
@ void SerialIntr()
SerialIntr: @ 8000878
push {r4,lr}
ldr r4, =gUnknown_030022C0
ldr r0, [r4, 0x18]
cmp r0, 0
beq _08000886
bl _call_via_r0
_08000886:
ldr r2, =gUnknown_03007FF8
ldrh r0, [r2]
movs r1, 0x80
orrs r0, r1
strh r0, [r2]
ldrh r0, [r4, 0x1C]
ldrh r2, [r4, 0x1C]
orrs r1, r0
strh r1, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end SerialIntr
thumb_func_start DummyIntrHandler
@ void DummyIntrHandler()
DummyIntrHandler: @ 80008A8
bx lr
thumb_func_end DummyIntrHandler
thumb_func_start WaitForVBlankIntr
@ void WaitForVBlankIntr()
WaitForVBlankIntr: @ 80008AC
push {lr}
ldr r2, =gUnknown_030022C0
ldrh r1, [r2, 0x1C]
ldr r0, =0x0000fffe
ands r0, r1
ldrh r1, [r2, 0x1C]
strh r0, [r2, 0x1C]
ldrh r1, [r2, 0x1C]
movs r0, 0x1
ands r0, r1
cmp r0, 0
bne _080008D0
movs r3, 0x1
_080008C6:
ldrh r1, [r2, 0x1C]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _080008C6
_080008D0:
pop {r0}
bx r0
.pool
thumb_func_end WaitForVBlankIntr
thumb_func_start sub_80008DC
sub_80008DC: @ 80008DC
ldr r1, =gUnknown_0203CF5C
str r0, [r1]
bx lr
.pool
thumb_func_end sub_80008DC
thumb_func_start sub_80008E8
sub_80008E8: @ 80008E8
ldr r1, =gUnknown_0203CF5C
movs r0, 0
str r0, [r1]
bx lr
.pool
thumb_func_end sub_80008E8
thumb_func_start Reset
@ void Reset()
Reset: @ 80008F4
push {r4,lr}
ldr r1, =0x04000208
movs r0, 0
strh r0, [r1]
bl m4aSoundVSyncOff
bl remove_some_task
ldr r1, =0x040000bc
ldrh r2, [r1, 0xA]
ldr r3, =0x0000c5ff
adds r0, r3, 0
ands r0, r2
strh r0, [r1, 0xA]
ldrh r4, [r1, 0xA]
ldr r2, =0x00007fff
adds r0, r2, 0
ands r0, r4
strh r0, [r1, 0xA]
ldrh r0, [r1, 0xA]
adds r1, 0xC
ldrh r4, [r1, 0xA]
adds r0, r3, 0
ands r0, r4
strh r0, [r1, 0xA]
ldrh r4, [r1, 0xA]
adds r0, r2, 0
ands r0, r4
strh r0, [r1, 0xA]
ldrh r0, [r1, 0xA]
ldr r0, =0x040000d4
ldrh r1, [r0, 0xA]
ands r3, r1
strh r3, [r0, 0xA]
ldrh r1, [r0, 0xA]
ands r2, r1
strh r2, [r0, 0xA]
ldrh r0, [r0, 0xA]
bl RTC_SetReadOnly
movs r0, 0xFF
bl SoftReset
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end Reset
thumb_func_start sub_8000964
sub_8000964: @ 8000964
push {lr}
sub sp, 0x4
mov r1, sp
movs r0, 0
strh r0, [r1]
ldr r1, =gPokemonCrySongs
ldr r2, =0x01000034
mov r0, sp
bl CpuSet
add sp, 0x4
pop {r0}
bx r0
.pool
thumb_func_end sub_8000964
.align 2, 0 @ Don't pad with nop.

View File

@ -421,7 +421,7 @@ Task_WaitForSaveFileErrorWindow: @ 802FA5C
lsls r0, 16
cmp r0, 0
bne _0802FA98
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -523,7 +523,7 @@ Task_WaitForBatteryDryErrorWindow: @ 802FB50
lsls r0, 16
cmp r0, 0
bne _0802FB8C
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -622,7 +622,7 @@ _0802FBCE:
movs r1, 0xFC
movs r2, 0x2
bl LoadPalette
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -1078,7 +1078,7 @@ HandleMainMenuInput: @ 80300E0
lsls r4, r1, 3
ldr r7, =gTasks + 0x8
adds r5, r4, r7
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldrh r2, [r1, 0x2E]
movs r0, 0x1
ands r0, r2
@ -1484,7 +1484,7 @@ _08030444:
b _0803048A
.pool
_08030460:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r1, =CB2_ReinitMainMenu
str r1, [r0, 0x8]
ldr r0, =CB2_OptionsMenu
@ -1714,7 +1714,7 @@ _08030658:
strh r0, [r4, 0xA]
b _08030688
_08030664:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r0, [r0, 0x2E]
ands r1, r0
cmp r1, 0
@ -2086,9 +2086,9 @@ _08030970:
bl CopyWindowToVram
movs r0, 0
bl sub_8032318
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C897B
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r0, =task_new_game_prof_birch_speech_4
@ -2122,9 +2122,9 @@ task_new_game_prof_birch_speech_4: @ 80309CC
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_5
str r1, [r0]
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E8692
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r1, =sub_80323A0
movs r0, 0x1
bl AddTextPrinterWithCallbackForMessage
@ -2146,9 +2146,9 @@ task_new_game_prof_birch_speech_5: @ 8030A2C
lsls r0, 16
cmp r0, 0
bne _08030A58
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8A1F
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r1, =gTasks
@ -2341,9 +2341,9 @@ task_new_game_prof_birch_speech_6: @ 8030BCC
bne _08030BFE
ldr r0, =gUnknown_02022D04
strb r1, [r0]
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8BD0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r1, =gTasks
@ -2580,9 +2580,9 @@ task_new_game_prof_birch_speech_11: @ 8030DC8
lsrs r4, 24
movs r0, 0
bl sub_8032318
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8BDD
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r1, =gTasks
@ -2639,7 +2639,7 @@ task_new_game_prof_birch_speech_13: @ 8030E38
_08030E52:
movs r0, 0x5
bl audio_play
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
strb r4, [r0, 0x8]
movs r0, 0x1
@ -2831,9 +2831,9 @@ task_new_game_prof_birch_speech_14: @ 8030FD4
lsrs r4, 24
movs r0, 0
bl sub_8032318
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8BFF
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r1, =gTasks
@ -2878,7 +2878,7 @@ task_new_game_prof_birch_speech_16: @ 8031040
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -2933,7 +2933,7 @@ task_new_game_prof_birch_speech_17: @ 8031090
adds r0, r1
ldrh r0, [r0, 0x1A]
bl sub_818D820
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0x14
@ -2943,7 +2943,7 @@ task_new_game_prof_birch_speech_17: @ 8031090
bl set_default_player_name
adds r0, r4, 0
bl DestroyTask
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldrb r2, [r1, 0x8]
str r5, [sp]
@ -2968,9 +2968,9 @@ task_new_game_prof_birch_speech_part2_2: @ 8031104
lsrs r4, 24
movs r0, 0
bl sub_8032318
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8C1C
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r1, =gTasks
@ -3211,9 +3211,9 @@ task_new_game_prof_birch_speech_part2_6: @ 8031258
bl sub_8031D34
movs r0, 0
bl sub_8032318
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8C2A
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r0, =task_new_game_prof_birch_speech_part2_7
@ -3353,7 +3353,7 @@ task_new_game_prof_birch_speech_part2_8: @ 80313E4
b _080314B0
.pool
_08031444:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -3396,9 +3396,9 @@ _0803145A:
adds r0, r6, 0
movs r1, 0x1
bl sub_8031D34
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_082C8C7A
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
bl AddTextPrinterForMessage
ldr r0, =task_new_game_prof_birch_speech_part2_9
@ -3714,7 +3714,7 @@ new_game_prof_birch_speech_part2_start: @ 8031678
bl dp13_810BB8C
adds r0, r5, 0
bl AddBirchSpeechObjects
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -4453,7 +4453,7 @@ set_default_player_name: @ 8031DC4
push {r4,r5,lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r0, [r1]
ldrb r0, [r0, 0x8]
adds r5, r1, 0
@ -4469,7 +4469,7 @@ _08031DE6:
adds r0, r1
ldr r3, [r0]
movs r2, 0
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
_08031DF0:
ldr r1, [r4]
adds r1, r2
@ -4546,10 +4546,10 @@ fmt_savegame: @ 8031E7C
fmt_time: @ 8031E94
push {r4-r6,lr}
sub sp, 0xC
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EDCC3
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
@ -4561,7 +4561,7 @@ fmt_time: @ 8031E94
movs r2, 0
movs r3, 0x11
bl box_print
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r1, [r4]
movs r0, 0x1
movs r2, 0x64
@ -4588,10 +4588,10 @@ fmt_time: @ 8031E94
fmt_player: @ 8031EF8
push {r4-r6,lr}
sub sp, 0x2C
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EDCCA
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
@ -4603,13 +4603,13 @@ fmt_player: @ 8031EF8
movs r2, 0x6C
movs r3, 0x11
bl box_print
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
ldrh r1, [r0, 0xE]
add r0, sp, 0xC
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r1, 0xF0
strb r1, [r0]
adds r0, 0x1
@ -4617,7 +4617,7 @@ fmt_player: @ 8031EF8
ldrb r1, [r1, 0x10]
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0xD0
@ -4663,10 +4663,10 @@ _08031FA4:
_08031FAA:
lsls r0, 16
lsrs r7, r0, 16
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EDCCF
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
@ -4682,7 +4682,7 @@ _08031FAA:
adds r1, r7, 0
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0x64
@ -4727,10 +4727,10 @@ _08032030:
ldr r0, =0x0000086e
cmp r4, r0
bls _0803201C
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_085EDCD7
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
@ -4746,7 +4746,7 @@ _08032030:
adds r1, r7, 0
movs r2, 0x2
movs r3, 0x1
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0xD0
@ -4779,7 +4779,7 @@ LoadMainMenuWindowFrameTiles: @ 80320A4
lsrs r4, 24
lsls r5, 16
lsrs r5, 16
ldr r6, =gUnknown_03005D90
ldr r6, =gSaveBlock2Ptr
ldr r0, [r6]
ldrb r0, [r0, 0x14]
lsrs r0, 3

View File

@ -1665,7 +1665,7 @@ sub_8097FA4: @ 8097FA4
adds r0, r4, 0
adds r0, 0x8
adds r1, r6, 0
bl sub_806F67C
bl StoreWordInTwoHalfwords
strb r5, [r6, 0x1B]
ldr r0, =0x0000ffff
strh r0, [r4, 0xE]
@ -1689,7 +1689,7 @@ sub_8097FE4: @ 8097FE4
adds r0, r4, 0
adds r0, 0x8
mov r1, sp
bl sub_806F684
bl LoadWordFromTwoHalfwords
ldr r0, [sp]
ldrb r1, [r0, 0x4]
lsls r0, r1, 4
@ -1739,7 +1739,7 @@ sub_8098044: @ 8098044
adds r0, r1
adds r0, 0x8
mov r1, sp
bl sub_806F684
bl LoadWordFromTwoHalfwords
adds r0, r4, 0
bl DestroyTask
add sp, 0x4

View File

@ -8,7 +8,7 @@
thumb_func_start sub_81200A0
sub_81200A0: @ 81200A0
push {r4,lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldr r1, =0x00002e28
adds r0, r2, r1
@ -17,7 +17,7 @@ sub_81200A0: @ 81200A0
ldr r3, =0x00002e51
adds r0, r2, r3
strb r1, [r0]
ldr r0, =gUnknown_82E9531
ldr r0, =gGameLanguage
ldrb r1, [r0]
adds r3, 0x1
adds r0, r2, r3
@ -45,7 +45,7 @@ _081200C6:
thumb_func_start sub_81200F8
sub_81200F8: @ 81200F8
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00002e28
adds r1, r0
@ -53,7 +53,7 @@ sub_81200F8: @ 81200F8
movs r0, 0x1
strb r0, [r1]
strb r2, [r1, 0x1]
ldr r0, =gUnknown_82E9531
ldr r0, =gGameLanguage
ldrb r0, [r0]
strb r0, [r1, 0x2]
bx lr
@ -70,7 +70,7 @@ sub_812011C: @ 812011C
thumb_func_start sub_8120128
sub_8120128: @ 8120128
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00002e28
adds r2, r1, r0
@ -78,7 +78,7 @@ sub_8120128: @ 8120128
movs r0, 0x4
strb r0, [r2]
strb r3, [r2, 0x1]
ldr r0, =gUnknown_82E9531
ldr r0, =gGameLanguage
ldrb r0, [r0]
ldr r2, =0x00002e48
adds r1, r2
@ -98,7 +98,7 @@ sub_8120154: @ 8120154
thumb_func_start sub_8120160
sub_8120160: @ 8120160
push {lr}
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r1, [r0, 0xB]
lsls r1, 8
@ -145,7 +145,7 @@ _081201C0:
thumb_func_start sub_81201C8
sub_81201C8: @ 81201C8
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e28
adds r0, r1
@ -171,7 +171,7 @@ sub_81201DC: @ 81201DC
thumb_func_start sub_81201F4
sub_81201F4: @ 81201F4
ldr r1, =gUnknown_020375F0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e51
adds r0, r2
@ -184,15 +184,15 @@ sub_81201F4: @ 81201F4
thumb_func_start sub_8120210
sub_8120210: @ 8120210
push {r4-r6,lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r4, [r0]
ldr r0, =0x00002e28
adds r6, r4, r0
ldr r1, =0x00002e42
adds r0, r4, r1
ldr r5, =gUnknown_03005D90
ldr r5, =gSaveBlock2Ptr
ldr r1, [r5]
bl CopyString
bl StringCopy
movs r2, 0
ldr r0, =0x00002e4d
adds r4, r0
@ -236,7 +236,7 @@ _0812024E:
thumb_func_start sub_8120280
sub_8120280: @ 8120280
push {r4-r7,lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =gUnknown_020375E0
ldrh r0, [r0]
@ -247,7 +247,7 @@ sub_8120280: @ 8120280
ldr r0, =0x00002e2a
adds r5, r1, r0
_08120296:
ldr r2, =gUnknown_02021FC4
ldr r2, =gStringVar4
adds r4, r2, 0
movs r6, 0
_0812029C:
@ -348,7 +348,7 @@ sub_8120340: @ 8120340
thumb_func_start sub_8120358
sub_8120358: @ 8120358
ldr r1, =gUnknown_020375F0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e28
adds r0, r2
@ -360,7 +360,7 @@ sub_8120358: @ 8120358
thumb_func_start sub_8120374
sub_8120374: @ 8120374
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e28
adds r0, r1
@ -384,7 +384,7 @@ sub_812038C: @ 812038C
b _081203B6
.pool
_081203AC:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
bl CopyEasyChatWord
ldr r1, =gUnknown_020375F0
movs r0, 0x1
@ -398,7 +398,7 @@ _081203B6:
thumb_func_start sub_81203C4
sub_81203C4: @ 81203C4
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e28
adds r2, r0, r1
@ -424,7 +424,7 @@ _081203F2:
thumb_func_start sub_81203FC
sub_81203FC: @ 81203FC
push {r4-r6,lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r4, [r0]
ldr r0, =0x00002e28
adds r5, r4, r0
@ -442,13 +442,13 @@ _08120410:
ldr r0, =0x0000ffff
cmp r1, r0
beq _08120480
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
movs r0, 0x7
ands r4, r0
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldrb r1, [r5, 0x1]
lsls r1, 1
adds r1, r6, r1
@ -456,21 +456,21 @@ _08120410:
bl CopyEasyChatWord
adds r2, r0, 0
ldr r1, =gUnknown_082942FD
bl CopyString
bl StringCopy
adds r2, r0, 0
ldr r0, =gUnknown_0859EFF0
lsls r4, 2
adds r4, r0
ldr r1, [r4]
adds r0, r2, 0
bl CopyString
bl StringCopy
adds r2, r0, 0
ldr r1, =gUnknown_08294301
bl CopyString
bl StringCopy
b _081204A2
.pool
_08120480:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r3, =gUnknown_0859F010
ldrb r2, [r5, 0x2]
adds r1, r2, 0x1
@ -485,9 +485,9 @@ _08120480:
lsls r1, 2
adds r1, r3
ldr r1, [r1]
bl CopyString
bl StringCopy
_081204A2:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -520,7 +520,7 @@ sub_81204DC: @ 81204DC
mov r5, r8
push {r5-r7}
sub sp, 0x1C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r4, [r0]
ldr r0, =0x00002e28
adds r0, r4, r0
@ -551,7 +551,7 @@ _0812050C:
mov r9, r3
adds r6, r1, 0
_08120524:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r4, r5, 0x1
@ -595,7 +595,7 @@ _08120552:
movs r7, 0
movs r5, 0
_0812057E:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
movs r1, 0xA
@ -617,7 +617,7 @@ _0812057E:
b _0812060E
.pool
_081205BC:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
mov r1, r10
@ -676,7 +676,7 @@ _0812060E:
thumb_func_start sub_8120628
sub_8120628: @ 8120628
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e51
adds r0, r1
@ -688,7 +688,7 @@ sub_8120628: @ 8120628
thumb_func_start sub_8120640
sub_8120640: @ 8120640
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e28
adds r0, r1
@ -848,7 +848,7 @@ _08120764:
.4byte _081207F8
.4byte _08120938
_0812077C:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldr r0, =gUnknown_020375E0
ldrh r0, [r0]
@ -1106,7 +1106,7 @@ _0812097C:
.4byte _08120A6E
_08120994:
bl sub_8120280
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
bl sub_8120708
movs r0, 0
strh r0, [r5, 0xA]
@ -1128,13 +1128,13 @@ _081209C4:
movs r0, 0x2
b _08120B4E
_081209C8:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e28
adds r4, r0, r2
movs r0, 0xE
ldrsh r1, [r5, r0]
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
adds r1, r0
movs r3, 0
ldrb r0, [r1]
@ -1219,7 +1219,7 @@ _08120A6E:
strh r0, [r5, 0xC]
b _08120B50
_08120A7E:
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
movs r2, 0xE
ldrsh r0, [r5, r2]
adds r0, r1
@ -1367,7 +1367,7 @@ _08120B84:
adds r0, 0x5
adds r0, r5, r0
movs r1, 0x1
bl StopMusicWhileStringIsPrinted
bl ConvertInternationalString
_08120B9E:
adds r4, 0x1
cmp r4, 0x3
@ -1401,7 +1401,7 @@ _08120BB0:
bl memset
mov r0, sp
ldr r1, =gUnknown_085EDFB0
bl CopyString
bl StringCopy
adds r0, r5, 0
mov r1, sp
movs r2, 0x7
@ -1639,7 +1639,7 @@ _08120D78:
cmp r0, 0x15
bne _08120D98
adds r0, r1, 0
bl StripExtendedControlCodes
bl StripExtCtrlCodes
movs r0, 0x1
strb r0, [r4]
b _08120D9A
@ -1664,7 +1664,7 @@ _08120DAA:
muls r0, r5
adds r0, 0x5
adds r0, r7, r0
bl StripExtendedControlCodes
bl StripExtCtrlCodes
_08120DBE:
adds r5, 0x1
cmp r5, 0x3
@ -1717,7 +1717,7 @@ _08120E02:
sub_8120E08: @ 8120E08
push {r4,r5,lr}
ldr r2, =gUnknown_0203A12C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e28
adds r0, r1
@ -1752,7 +1752,7 @@ _08120E24:
thumb_func_start sub_8120E50
sub_8120E50: @ 8120E50
ldr r3, =gUnknown_0203A12C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00002e28
adds r0, r1
@ -1987,7 +1987,7 @@ sub_8120FDC: @ 8120FDC
adds r0, 0x4
add r0, r8
strb r6, [r0]
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
mov r0, r8
bl sub_8120FAC
@ -1998,25 +1998,25 @@ sub_8120FDC: @ 8120FDC
adds r1, r0, 0
mov r0, r8
bl sub_8120F2C
ldr r5, =gUnknown_02021CC4
ldr r5, =gStringVar1
adds r0, r4, 0
bl sub_8120E74
adds r1, r0, 0
adds r0, r5, 0
movs r2, 0
movs r3, 0xA
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar2
adds r0, r6, 0
bl sub_8120ECC
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
bl StringCopy
mov r1, r9
ldr r0, [r1]
adds r0, 0x34
add r0, r8
ldr r1, =gUnknown_82E9531
ldr r1, =gGameLanguage
ldrb r1, [r1]
strb r1, [r0]
pop {r3,r4}
@ -2047,13 +2047,13 @@ _0812107A:
ble _081210B0
adds r5, r6, 0
_08121080:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r6, 0
bl __modsi3
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
adds r1, r6, 0
@ -2179,21 +2179,21 @@ sub_8121178: @ 8121178
adds r0, r5
ldrb r0, [r0]
mov r8, r0
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
adds r0, r5, 0
bl sub_8120F08
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
movs r3, 0xA
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021DC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar2
mov r0, r8
bl sub_8120ECC
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
ldr r4, =gUnknown_02021EC4
bl StringCopy
ldr r4, =gStringVar3
adds r0, r5, 0
adds r1, r4, 0
bl sub_8120F7C
@ -2202,7 +2202,7 @@ sub_8121178: @ 8121178
adds r0, r5
ldrb r1, [r0]
adds r0, r4, 0
bl StopMusicWhileStringIsPrinted
bl ConvertInternationalString
mov r0, r8
bl sub_8120EC0
bl box_related_two__2
@ -2432,7 +2432,7 @@ sub_812139C: @ 812139C
sub_81213B0: @ 81213B0
push {lr}
ldr r1, =gUnknown_0203A12C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e28
adds r0, r2
@ -2449,7 +2449,7 @@ sub_81213B0: @ 81213B0
sub_81213D8: @ 81213D8
push {r4,r5,lr}
ldr r2, =gUnknown_0203A12C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r3, =0x00002e28
adds r0, r1, r3
@ -2481,7 +2481,7 @@ _0812141E:
sub_8121424: @ 8121424
push {lr}
ldr r1, =gUnknown_0203A12C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e28
adds r0, r2
@ -2503,7 +2503,7 @@ _0812144A:
sub_8121450: @ 8121450
push {lr}
ldr r1, =gUnknown_0203A12C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r2, =0x00002e28
adds r0, r2

View File

@ -131,13 +131,13 @@ DisplayMessageAndContinueTask: @ 8121E7C
adds r0, r6, 0
movs r1, 0x1
bl sub_8197B1C
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r0, [sp, 0x30]
cmp r0, r4
beq _08121EC0
adds r0, r4, 0
ldr r1, [sp, 0x30]
bl ExpandStringRefs
bl StringExpandPlaceholders
_08121EC0:
ldr r2, =gUnknown_03003014
ldrb r0, [r2]
@ -326,7 +326,7 @@ AdjustQuantityAccordingToDPadInput: @ 8122034
adds r5, r1, 0
ldrh r4, [r2]
adds r6, r4, 0
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r0, [r0, 0x30]
movs r3, 0xF0
ands r3, r0
@ -409,12 +409,12 @@ _081220C8:
thumb_func_start GetLRKeysState
GetLRKeysState: @ 81220D0
push {lr}
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
bne _08122106
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x80
lsls r0, 2
@ -442,12 +442,12 @@ _08122108:
thumb_func_start sub_812210C
sub_812210C: @ 812210C
push {lr}
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
bne _08122142
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x30]
movs r0, 0x80
lsls r0, 2
@ -479,7 +479,7 @@ sub_8122148: @ 8122148
lsrs r0, 16
cmp r0, 0xAF
bne _08122174
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrh r1, [r0, 0x4]
ldr r0, =0x00001919

View File

@ -17,7 +17,7 @@ sub_811F90C: @ 811F90C
sub_811F918: @ 811F918
push {lr}
sub sp, 0x4
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x14]
lsrs r0, 3
@ -337,7 +337,7 @@ _0811FB9A:
thumb_func_start sub_811FBA4
sub_811FBA4: @ 811FBA4
push {r4,r5,lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x40
ands r0, r1

View File

@ -8,7 +8,7 @@
thumb_func_start DecryptMoney
@ int DecryptMoney(u32 *moneyPointer)
DecryptMoney: @ 80E5114
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r1, [r1]
adds r1, 0xAC
ldr r0, [r0]
@ -21,7 +21,7 @@ DecryptMoney: @ 80E5114
thumb_func_start EncryptMoney
@ void EncryptMoney(u32 *moneyPointer, u32 moneyAmount)
EncryptMoney: @ 80E5128
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r2, [r2]
adds r2, 0xAC
ldr r2, [r2]
@ -103,7 +103,7 @@ _080E51A2:
thumb_func_start sub_80E51B0
sub_80E51B0: @ 80E51B0
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x92
lsls r1, 3
@ -121,7 +121,7 @@ sub_80E51B0: @ 80E51B0
thumb_func_start sub_80E51D4
sub_80E51D4: @ 80E51D4
push {lr}
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x92
lsls r1, 3
@ -170,19 +170,19 @@ PrintMoneyAmount: @ 80E5214
lsrs r6, r2, 24
lsls r4, 24
lsrs r5, r4, 24
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
adds r0, r4, 0
adds r1, r3, 0
movs r2, 0
movs r3, 0x6
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r4, 0
bl GetStringLength
bl StringLength
lsls r0, 16
lsrs r0, 16
movs r1, 0x6
subs r1, r0
ldr r2, =gUnknown_02021FC4
ldr r2, =gStringVar4
adds r0, r1, 0
subs r1, 0x1
cmp r0, 0
@ -198,8 +198,8 @@ _080E5258:
_080E5264:
ldr r1, =gUnknown_085E969C
adds r0, r2, 0
bl ExpandStringRefs
ldr r2, =gUnknown_02021FC4
bl StringExpandPlaceholders
ldr r2, =gStringVar4
str r6, [sp]
str r5, [sp, 0x4]
movs r0, 0

View File

@ -1,906 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start MultiBootInit
@ void MultiBootInit(MultiBootParam *mp)
MultiBootInit: @ 81BA6D0
adds r2, r0, 0
movs r1, 0
strb r1, [r2, 0x1E]
strb r1, [r2, 0x18]
strb r1, [r2, 0x1D]
adds r3, r2, 0
adds r3, 0x4A
movs r0, 0xF
strb r0, [r3]
adds r0, r2, 0
adds r0, 0x48
strb r1, [r0]
strh r1, [r2, 0x16]
ldr r0, =0x04000134
strh r1, [r0]
ldr r2, =0x04000128
ldr r3, =0x00002003
adds r0, r3, 0
strh r0, [r2]
ldr r0, =0x0400012a
strh r1, [r0]
bx lr
.pool
thumb_func_end MultiBootInit
thumb_func_start MultiBootMain
@ int MultiBootMain(MultiBootParam *mp)
MultiBootMain: @ 81BA70C
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
adds r7, r0, 0
bl MultiBootCheckComplete
cmp r0, 0
beq _081BA722
b _081BAAEA
_081BA722:
adds r0, r7, 0
adds r0, 0x4A
ldrb r1, [r0]
mov r10, r0
cmp r1, 0xF
bls _081BA736
subs r0, r1, 0x1
mov r1, r10
strb r0, [r1]
b _081BAAEA
_081BA736:
adds r1, r7, 0
adds r1, 0x48
ldrb r0, [r1]
cmp r0, 0
beq _081BA760
movs r0, 0
strb r0, [r1]
ldr r0, =0x04000128
ldrh r0, [r0]
movs r5, 0xFC
ands r5, r0
cmp r5, 0x8
beq _081BA760
adds r0, r7, 0
bl MultiBootInit
movs r0, 0x8
eors r0, r5
b _081BAAEC
.pool
_081BA760:
ldrb r0, [r7, 0x18]
cmp r0, 0xDF
bls _081BA7B2
adds r0, r7, 0
bl MultiBootHandShake
adds r5, r0, 0
cmp r5, 0
beq _081BA774
b _081BAAEC
_081BA774:
adds r0, r7, 0
adds r0, 0x4B
ldrb r0, [r0]
cmp r0, 0x1
bne _081BA790
ldrb r0, [r7, 0x18]
cmp r0, 0xE1
bls _081BA790
adds r0, r7, 0
bl MultiBootCheckComplete
cmp r0, 0
bne _081BA790
b _081BAADA
_081BA790:
adds r0, r7, 0
bl MultiBootCheckComplete
cmp r0, 0
beq _081BA79C
b _081BAAEA
_081BA79C:
ldrh r0, [r7, 0x16]
cmp r0, 0
bne _081BA7AC
adds r0, r7, 0
bl MultiBootInit
movs r0, 0x71
b _081BAAEC
_081BA7AC:
subs r0, 0x1
strh r0, [r7, 0x16]
b _081BAAEA
_081BA7B2:
ldrb r0, [r7, 0x18]
cmp r0, 0x2
bne _081BA7BA
b _081BA8F0
_081BA7BA:
cmp r0, 0x2
bgt _081BA7C8
cmp r0, 0
beq _081BA7D6
cmp r0, 0x1
beq _081BA892
b _081BAA28
_081BA7C8:
cmp r0, 0xD0
bne _081BA7CE
b _081BA93C
_081BA7CE:
cmp r0, 0xD1
bne _081BA7D4
b _081BA9D6
_081BA7D4:
b _081BAA28
_081BA7D6:
movs r3, 0xE
movs r5, 0x3
ldr r0, =0x04000120
ldrh r0, [r0, 0x6]
adds r1, r0, 0
ldr r0, =0x0000ffff
ldrb r2, [r7, 0x1E]
adds r6, r2, 0
cmp r1, r0
bne _081BA7FE
adds r4, r1, 0
ldr r1, =0x04000126
_081BA7EE:
asrs r3, 1
subs r1, 0x2
subs r5, 0x1
cmp r5, 0
beq _081BA7FE
ldrh r0, [r1]
cmp r0, r4
beq _081BA7EE
_081BA7FE:
movs r0, 0xE
ands r3, r0
strb r3, [r7, 0x1D]
movs r5, 0x3
ldr r0, =0x04000120
ldrh r0, [r0, 0x6]
adds r4, r0, 0
asrs r0, r2, 3
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _081BA82C
ldr r0, =0x00007208
b _081BA852
.pool
_081BA82C:
subs r5, 0x1
cmp r5, 0
beq _081BA858
lsls r0, r5, 1
ldr r1, =0x04000120
adds r0, r1
ldrh r0, [r0]
adds r4, r0, 0
adds r0, r2, 0
asrs r0, r5
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _081BA82C
adds r0, r1, 0
lsls r0, r5
movs r1, 0xE4
lsls r1, 7
orrs r0, r1
_081BA852:
cmp r4, r0
beq _081BA82C
movs r3, 0
_081BA858:
adds r0, r3, 0
ands r0, r6
strb r0, [r7, 0x1E]
cmp r3, 0
bne _081BA868
movs r0, 0xF
mov r2, r10
strb r0, [r2]
_081BA868:
mov r1, r10
ldrb r0, [r1]
cmp r0, 0
bne _081BA884
ldrb r0, [r7, 0x1D]
ldrb r2, [r7, 0x1E]
cmp r0, r2
beq _081BA88A
adds r0, r7, 0
bl MultiBootStartProbe
b _081BA892
.pool
_081BA884:
subs r0, 0x1
mov r1, r10
strb r0, [r1]
_081BA88A:
ldrb r1, [r7, 0x1E]
movs r2, 0xC4
lsls r2, 7
b _081BA992
_081BA892:
adds r1, r7, 0
adds r1, 0x49
movs r0, 0
strb r0, [r1]
movs r5, 0x3
mov r12, r1
ldr r3, =gUnknown_0300129C
_081BA8A0:
lsls r0, r5, 1
ldr r2, =0x04000120
adds r0, r2
ldrh r0, [r0]
adds r4, r0, 0
asrs r0, r4, 8
subs r2, r5, 0x1
cmp r0, 0x72
bne _081BA8CA
lsls r0, r2, 1
adds r0, r3
strh r4, [r0]
movs r0, 0xFF
ands r4, r0
movs r0, 0x1
lsls r0, r5
cmp r4, r0
bne _081BA8CA
ldrb r0, [r1]
orrs r4, r0
strb r4, [r1]
_081BA8CA:
adds r5, r2, 0
cmp r5, 0
bne _081BA8A0
ldrb r0, [r7, 0x1D]
mov r1, r12
ldrb r1, [r1]
cmp r0, r1
bne _081BA88A
movs r0, 0x2
strb r0, [r7, 0x18]
mov r2, r12
ldrb r1, [r2]
movs r2, 0xC2
lsls r2, 7
b _081BA992
.pool
_081BA8F0:
movs r5, 0x3
movs r0, 0x49
adds r0, r7
mov r12, r0
mov r4, r12
movs r6, 0x1
ldr r1, =gUnknown_0300129C
mov r9, r1
ldr r2, =0x04000120
mov r8, r2
_081BA904:
ldrb r3, [r4]
adds r0, r3, 0
asrs r0, r5
ands r0, r6
subs r2, r5, 0x1
cmp r0, 0
beq _081BA92A
lsls r0, r5, 1
add r0, r8
ldrh r1, [r0]
lsls r0, r2, 1
add r0, r9
ldrh r0, [r0]
cmp r1, r0
beq _081BA92A
adds r0, r6, 0
lsls r0, r5
eors r3, r0
strb r3, [r4]
_081BA92A:
adds r5, r2, 0
cmp r5, 0
bne _081BA904
b _081BAA90
.pool
_081BA93C:
movs r3, 0x1
movs r5, 0x3
movs r0, 0x49
adds r0, r7
mov r12, r0
adds r6, r7, 0
adds r6, 0x19
ldr r1, =gUnknown_0300129C
mov r8, r1
_081BA94E:
lsls r0, r5, 1
ldr r2, =0x04000120
adds r0, r2
ldrh r0, [r0]
adds r4, r0, 0
subs r2, r5, 0x1
adds r0, r6, r2
strb r4, [r0]
mov r0, r12
ldrb r1, [r0]
asrs r1, r5
movs r0, 0x1
ands r1, r0
cmp r1, 0
beq _081BA982
asrs r0, r4, 8
subs r0, 0x72
cmp r0, 0x1
bls _081BA976
b _081BAAE0
_081BA976:
lsls r0, r2, 1
add r0, r8
ldrh r0, [r0]
cmp r4, r0
bne _081BA982
movs r3, 0
_081BA982:
adds r5, r2, 0
cmp r5, 0
bne _081BA94E
cmp r3, 0
bne _081BA9A8
ldrb r1, [r7, 0x1C]
movs r2, 0xC6
lsls r2, 7
_081BA992:
adds r0, r2, 0
orrs r1, r0
adds r0, r7, 0
bl MultiBootSend
b _081BAAEC
.pool
_081BA9A8:
movs r0, 0xD1
strb r0, [r7, 0x18]
movs r3, 0x11
movs r5, 0x3
adds r1, r6, 0x2
_081BA9B2:
ldrb r0, [r1]
adds r3, r0
subs r1, 0x1
subs r5, 0x1
cmp r5, 0
bne _081BA9B2
strb r3, [r7, 0x14]
movs r0, 0xFF
ands r3, r0
movs r1, 0xC8
lsls r1, 7
adds r0, r1, 0
orrs r3, r0
adds r0, r7, 0
adds r1, r3, 0
bl MultiBootSend
b _081BAAEC
_081BA9D6:
movs r5, 0x3
movs r2, 0x49
ldrb r1, [r2, r7]
ldr r2, =0x04000126
movs r3, 0x1
_081BA9E0:
ldrh r0, [r2]
adds r4, r0, 0
adds r0, r1, 0
asrs r0, r5
ands r0, r3
cmp r0, 0
beq _081BA9F4
asrs r0, r4, 8
cmp r0, 0x73
bne _081BAAE0
_081BA9F4:
subs r2, 0x2
subs r5, 0x1
cmp r5, 0
bne _081BA9E0
adds r0, r7, 0
bl MultiBoot
adds r5, r0, 0
cmp r5, 0
bne _081BAA18
movs r0, 0xE0
strb r0, [r7, 0x18]
adds r0, 0xB0
strh r0, [r7, 0x16]
b _081BAAEA
.pool
_081BAA18:
adds r0, r7, 0
bl MultiBootInit
movs r0, 0x1E
mov r1, r10
strb r0, [r1]
movs r0, 0x70
b _081BAAEC
_081BAA28:
movs r5, 0x3
movs r2, 0x49
adds r2, r7
mov r12, r2
mov r8, r12
movs r0, 0x1
mov r9, r0
_081BAA36:
mov r1, r8
ldrb r6, [r1]
adds r0, r6, 0
asrs r0, r5
mov r2, r9
ands r0, r2
cmp r0, 0
beq _081BAA70
lsls r0, r5, 1
ldr r1, =0x04000120
adds r0, r1
ldrh r0, [r0]
adds r4, r0, 0
asrs r2, r4, 8
ldrb r0, [r7, 0x18]
lsrs r0, 1
movs r1, 0x62
subs r1, r0
mov r3, r9
lsls r3, r5
cmp r2, r1
bne _081BAA6A
movs r0, 0xFF
ands r4, r0
cmp r4, r3
beq _081BAA70
_081BAA6A:
eors r6, r3
mov r2, r8
strb r6, [r2]
_081BAA70:
subs r5, 0x1
cmp r5, 0
bne _081BAA36
ldrb r0, [r7, 0x18]
cmp r0, 0xC4
bne _081BAA90
mov r0, r12
ldrb r1, [r0]
movs r0, 0xE
ands r0, r1
strb r0, [r7, 0x1E]
strb r5, [r7, 0x18]
b _081BA88A
.pool
_081BAA90:
mov r1, r12
ldrb r0, [r1]
cmp r0, 0
bne _081BAAA2
adds r0, r7, 0
bl MultiBootInit
movs r0, 0x50
b _081BAAEC
_081BAAA2:
ldrb r0, [r7, 0x18]
adds r0, 0x2
strb r0, [r7, 0x18]
lsls r0, 24
lsrs r0, 24
cmp r0, 0xC4
bne _081BAAB2
b _081BA88A
_081BAAB2:
ldrb r0, [r7, 0x18]
ldr r1, [r7, 0x28]
adds r0, r1
subs r1, r0, 0x3
ldrb r2, [r1]
lsls r2, 8
subs r0, 0x4
ldrb r1, [r0]
orrs r1, r2
adds r0, r7, 0
bl MultiBootSend
adds r5, r0, 0
cmp r5, 0
bne _081BAAEC
adds r0, r7, 0
adds r0, 0x4B
ldrb r0, [r0]
cmp r0, 0x1
bne _081BAAEA
_081BAADA:
bl MultiBootWaitSendDone
b _081BA736
_081BAAE0:
adds r0, r7, 0
bl MultiBootInit
movs r0, 0x60
b _081BAAEC
_081BAAEA:
movs r0, 0
_081BAAEC:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end MultiBootMain
thumb_func_start MultiBootSend
@ int MultiBootSend(MultiBootParam *mp, u16 data)
MultiBootSend: @ 81BAAFC
push {r4,lr}
adds r2, r0, 0
lsls r1, 16
lsrs r1, 16
ldr r3, =0x04000128
ldrh r0, [r3]
movs r4, 0x8C
ands r4, r0
cmp r4, 0x8
bne _081BAB34
ldr r0, =0x0400012a
strh r1, [r0]
ldr r1, =0x00002083
adds r0, r1, 0
strh r0, [r3]
adds r1, r2, 0
adds r1, 0x48
movs r0, 0x1
strb r0, [r1]
movs r0, 0
b _081BAB40
.pool
_081BAB34:
adds r0, r2, 0
bl MultiBootInit
movs r0, 0x8
eors r4, r0
adds r0, r4, 0
_081BAB40:
pop {r4}
pop {r1}
bx r1
thumb_func_end MultiBootSend
thumb_func_start MultiBootStartProbe
@ void MultiBootStartProbe(MultiBootParam *mp)
MultiBootStartProbe: @ 81BAB48
push {lr}
adds r1, r0, 0
ldrb r0, [r1, 0x18]
cmp r0, 0
beq _081BAB5A
adds r0, r1, 0
bl MultiBootInit
b _081BAB66
_081BAB5A:
adds r2, r1, 0
adds r2, 0x4A
strb r0, [r2]
strb r0, [r1, 0x1E]
movs r0, 0x1
strb r0, [r1, 0x18]
_081BAB66:
pop {r0}
bx r0
thumb_func_end MultiBootStartProbe
thumb_func_start MultiBootStartMaster
@ void MultiBootStartMaster(MultiBootParam *mp, u8 *srcp, int length, u8 palette_color, s8 palette_speed)
MultiBootStartMaster: @ 81BAB6C
push {r4-r7,lr}
adds r4, r0, 0
adds r6, r1, 0
ldr r0, [sp, 0x14]
lsls r3, 24
lsrs r5, r3, 24
lsls r0, 24
lsrs r7, r0, 24
movs r3, 0
ldrb r0, [r4, 0x18]
cmp r0, 0
bne _081BABA8
ldrb r0, [r4, 0x1E]
cmp r0, 0
beq _081BABA8
adds r0, r4, 0
adds r0, 0x4A
ldrb r0, [r0]
cmp r0, 0
bne _081BABA8
str r6, [r4, 0x20]
adds r2, 0xF
movs r0, 0x10
negs r0, r0
ands r2, r0
subs r0, 0xF0
adds r1, r2, r0
ldr r0, =0x0003ff00
cmp r1, r0
bls _081BABB4
_081BABA8:
adds r0, r4, 0
bl MultiBootInit
b _081BAC28
.pool
_081BABB4:
adds r0, r6, r2
str r0, [r4, 0x24]
lsls r1, r7, 24
movs r2, 0x80
lsls r2, 19
adds r0, r1, r2
asrs r0, 24
adds r2, r1, 0
cmp r0, 0x8
bhi _081BAC14
lsls r0, 2
ldr r1, =_081BABD8
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_081BABD8:
.4byte _081BABFC
.4byte _081BABFC
.4byte _081BABFC
.4byte _081BABFC
.4byte _081BAC06
.4byte _081BAC0C
.4byte _081BAC0C
.4byte _081BAC0C
.4byte _081BAC0C
_081BABFC:
lsls r3, r5, 3
asrs r1, r2, 24
movs r0, 0x3
subs r0, r1
b _081BAC12
_081BAC06:
movs r0, 0x38
adds r3, r5, 0
b _081BAC12
_081BAC0C:
lsls r3, r5, 3
asrs r0, r2, 24
subs r0, 0x1
_081BAC12:
orrs r3, r0
_081BAC14:
movs r0, 0x3F
ands r3, r0
lsls r0, r3, 1
movs r2, 0x7F
negs r2, r2
adds r1, r2, 0
orrs r0, r1
strb r0, [r4, 0x1C]
movs r0, 0xD0
strb r0, [r4, 0x18]
_081BAC28:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end MultiBootStartMaster
thumb_func_start MultiBootCheckComplete
@ s32 MultiBootCheckComplete(MultiBootParam *mp)
MultiBootCheckComplete: @ 81BAC30
push {lr}
ldrb r0, [r0, 0x18]
cmp r0, 0xE9
beq _081BAC3C
movs r0, 0
b _081BAC3E
_081BAC3C:
movs r0, 0x1
_081BAC3E:
pop {r1}
bx r1
thumb_func_end MultiBootCheckComplete
thumb_func_start MultiBootHandShake
@ int MultiBootHandShake(MultiBootParam *mp)
MultiBootHandShake: @ 81BAC44
push {r4-r6,lr}
adds r3, r0, 0
ldrb r0, [r3, 0x18]
cmp r0, 0xE0
beq _081BAC60
cmp r0, 0xE0
blt _081BAC70
cmp r0, 0xE8
bgt _081BAC70
cmp r0, 0xE7
blt _081BAC70
movs r4, 0x3
ldrb r5, [r3, 0x1E]
b _081BACD0
_081BAC60:
movs r1, 0
movs r0, 0xE1
strb r0, [r3, 0x18]
str r1, [r3, 0x4]
movs r0, 0x80
lsls r0, 13
str r0, [r3]
b _081BACC2
_081BAC70:
movs r4, 0x3
ldrb r5, [r3, 0x1E]
movs r6, 0x1
ldr r1, =0x04000126
_081BAC78:
ldrh r0, [r1]
adds r2, r0, 0
adds r0, r5, 0
asrs r0, r4
ands r0, r6
cmp r0, 0
beq _081BAC8C
ldr r0, [r3, 0x4]
cmp r2, r0
bne _081BAC60
_081BAC8C:
subs r1, 0x2
subs r4, 0x1
cmp r4, 0
bne _081BAC78
ldrb r0, [r3, 0x18]
adds r0, 0x1
strb r0, [r3, 0x18]
ldr r1, [r3]
ldrh r0, [r3]
str r0, [r3, 0x4]
cmp r1, 0
bne _081BACBA
ldr r0, [r3, 0x28]
adds r1, r0, 0
adds r1, 0xAC
ldrb r1, [r1]
adds r0, 0xAD
ldrb r0, [r0]
lsls r0, 8
orrs r1, r0
str r1, [r3, 0x4]
lsls r1, 5
str r1, [r3]
_081BACBA:
ldr r0, [r3]
lsrs r0, 5
str r0, [r3]
_081BACC0:
ldrh r1, [r3]
_081BACC2:
adds r0, r3, 0
bl MultiBootSend
b _081BAD28
.pool
_081BACD0:
lsls r0, r4, 1
ldr r1, =0x04000120
adds r0, r1
ldrh r0, [r0]
adds r2, r0, 0
adds r0, r5, 0
asrs r0, r4
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _081BACEC
ldr r0, [r3, 0x4]
cmp r2, r0
bne _081BAD1C
_081BACEC:
subs r4, 0x1
cmp r4, 0
bne _081BACD0
ldrb r0, [r3, 0x18]
adds r0, 0x1
strb r0, [r3, 0x18]
lsls r0, 24
lsrs r0, 24
cmp r0, 0xE9
beq _081BAD26
ldr r0, [r3, 0x28]
adds r1, r0, 0
adds r1, 0xAE
ldrb r1, [r1]
adds r0, 0xAF
ldrb r0, [r0]
lsls r0, 8
orrs r1, r0
str r1, [r3]
str r1, [r3, 0x4]
b _081BACC0
.pool
_081BAD1C:
adds r0, r3, 0
bl MultiBootInit
movs r0, 0x71
b _081BAD28
_081BAD26:
movs r0, 0
_081BAD28:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end MultiBootHandShake
thumb_func_start MultiBootWaitCycles
@ void MultiBootWaitCycles(u32 cycles)
MultiBootWaitCycles: @ 81BAD30
mov r2, pc
lsrs r2, 24
movs r1, 0xC
cmp r2, 0x2
beq _081BAD42
movs r1, 0xD
cmp r2, 0x8
beq _081BAD42
movs r1, 0x4
_081BAD42:
subs r0, r1
bgt _081BAD42
bx lr
thumb_func_end MultiBootWaitCycles
thumb_func_start MultiBootWaitSendDone
@ void MultiBootWaitSendDone(void)
MultiBootWaitSendDone: @ 81BAD48
push {r4,r5,lr}
movs r2, 0
ldr r3, =0x04000128
ldrh r1, [r3]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _081BAD6C
ldr r5, =0x0000795c
movs r4, 0x80
_081BAD5C:
adds r2, 0x1
cmp r2, r5
bgt _081BAD6C
ldrh r1, [r3]
adds r0, r4, 0
ands r0, r1
cmp r0, 0
bne _081BAD5C
_081BAD6C:
movs r0, 0x96
lsls r0, 2
bl MultiBootWaitCycles
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end MultiBootWaitSendDone
.align 2, 0 @ Don't pad with nop.

View File

@ -116,7 +116,7 @@ sub_8178A40: @ 8178A40
cmp r4, 0
bne _08178A54
ldr r1, =gUnknown_085EE80A
bl CopyString
bl StringCopy
movs r5, 0
_08178A54:
cmp r4, 0x2
@ -127,7 +127,7 @@ _08178A5A:
bne _08178A66
ldr r1, =gUnknown_085EE827
adds r0, r6, 0
bl CopyString
bl StringCopy
_08178A66:
adds r0, r5, 0
pop {r4-r6}
@ -140,7 +140,7 @@ _08178A66:
sub_8178A78: @ 8178A78
push {r4-r6,lr}
sub sp, 0x8
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -211,7 +211,7 @@ _08178B20:
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -225,7 +225,7 @@ _08178B48:
beq _08178B56
b _08178E58
_08178B56:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -263,7 +263,7 @@ _08178B98:
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -287,7 +287,7 @@ _08178BDC:
lsrs r2, r0, 24
cmp r2, 0x2
bne _08178CD0
ldr r4, =gUnknown_030022C0
ldr r4, =gMain
ldrh r1, [r4, 0x2E]
movs r0, 0x1
ands r0, r1
@ -351,7 +351,7 @@ _08178C68:
cmp r0, 0x3
bne _08178CAC
bl sub_800AC34
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1
bl sub_8178A40
@ -362,7 +362,7 @@ _08178C68:
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r2
@ -385,7 +385,7 @@ _08178CAC:
_08178CCC:
bl sub_80097E8
_08178CD0:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1
bl sub_8178A40
@ -396,7 +396,7 @@ _08178CD0:
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -406,7 +406,7 @@ _08178CF2:
b _08178E58
.pool
_08178D00:
ldr r4, =gUnknown_030022C0
ldr r4, =gMain
ldrh r1, [r4, 0x2E]
movs r0, 0x2
ands r0, r1
@ -442,7 +442,7 @@ _08178D38:
b _08178E58
_08178D44:
bl sub_800A5B4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -455,7 +455,7 @@ _08178D58:
b _08178E3C
_08178D60:
bl sub_800AC34
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -477,7 +477,7 @@ _08178D74:
add r0, sp, 0x4
adds r1, r5, 0
bl CpuSet
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
adds r1, r4, 0
bl sub_8178A40
lsls r0, 24
@ -488,14 +488,14 @@ _08178D74:
b _08178E34
.pool
_08178DBC:
ldr r1, =gUnknown_02021FC4
ldr r1, =gStringVar4
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -508,7 +508,7 @@ _08178DE0:
lsrs r2, r0, 16
cmp r2, 0
bne _08178E58
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -541,7 +541,7 @@ _08178E24:
_08178E30:
bl BeginNormalPaletteFade
_08178E34:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -558,7 +558,7 @@ _08178E48:
ands r0, r1
cmp r0, 0
bne _08178E58
bl Reset
bl DoSoftReset
_08178E58:
ldr r0, =gUnknown_030030E0
ldr r0, [r0]
@ -571,7 +571,7 @@ _08178E58:
cmp r0, 0
bne _08178E98
bl sub_80097E8
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1
bl sub_8178A40
@ -582,7 +582,7 @@ _08178E58:
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1

View File

@ -42,9 +42,9 @@ _081537FE:
thumb_func_start sub_8153804
sub_8153804: @ 8153804
push {lr}
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674C86
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x3
bl sub_81538C4
pop {r0}
@ -152,7 +152,7 @@ sub_81538C4: @ 81538C4
sub_81538D0: @ 81538D0
push {lr}
movs r2, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r1, =0x00003b18
adds r3, r0, r1
@ -173,7 +173,7 @@ _081538DE:
thumb_func_start sub_81538F8
sub_81538F8: @ 81538F8
push {r4,r5,lr}
ldr r5, =gUnknown_03005D8C
ldr r5, =gSaveBlock1Ptr
ldr r0, [r5]
ldr r1, =0x00003b18
adds r4, r0, r1
@ -215,7 +215,7 @@ sub_8153944: @ 8153944
mov r1, sp
movs r0, 0
strh r0, [r1]
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, =0x00003b14
adds r1, r0
@ -250,7 +250,7 @@ _08153990:
bl sub_8153944
b _081539BC
_08153996:
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
ldr r1, =0x00003b18
adds r0, r1
@ -278,7 +278,7 @@ _081539BC:
thumb_func_start sub_81539D4
sub_81539D4: @ 81539D4
push {r4-r6,lr}
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
ldr r0, [r6]
ldr r1, =0x00003b18
adds r4, r0, r1
@ -399,8 +399,8 @@ sub_8153A94: @ 8153A94
cmp r5, r0
bne _08153ABE
_08153AB8:
ldr r0, =gUnknown_02021FC4
bl ExpandStringRefs
ldr r0, =gStringVar4
bl StringExpandPlaceholders
_08153ABE:
movs r0, 0
pop {r4,r5}
@ -441,44 +441,44 @@ sub_8153AE8: @ 8153AE8
subs r4, r0
ldr r0, [r7, 0x64]
adds r4, r0
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
mov r9, r0
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
ldr r1, [r6]
ldr r5, =0x000031f8
adds r1, r5
movs r2, 0x7
bl CopyString_LimitN
bl StringCopyN
adds r0, r4, 0
bl sub_80E15E4
ldr r4, =gUnknown_02021DC4
ldr r4, =gStringVar2
ldr r1, [r6]
adds r1, r5
adds r0, r4, 0
movs r2, 0x7
bl CopyString_LimitN
bl StringCopyN
mov r0, r8
cmp r0, 0
bne _08153B54
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674AE4
b _08153B74
.pool
_08153B54:
mov r0, r9
adds r1, r4, 0
bl CompareString
bl StringCompare
cmp r0, 0
beq _08153B70
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674B16
b _08153B74
.pool
_08153B70:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674B42
_08153B74:
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r7, 0x6C]
bl sub_80E162C
@ -514,9 +514,9 @@ sub_8153BB0: @ 8153BB0
adds r2, 0x1
str r2, [r4, 0x8]
bl sub_80F9B30
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674B6A
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
@ -583,9 +583,9 @@ sub_8153C4C: @ 8153C4C
push {r4,lr}
adds r4, r0, 0
bl sub_809D3E8
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674B9E
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
@ -604,9 +604,9 @@ sub_8153C70: @ 8153C70
adds r1, 0x1
str r1, [r4, 0x8]
bl sub_811EFC0
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674BD4
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
@ -661,32 +661,32 @@ sub_8153CC8: @ 8153CC8
bl memcpy
adds r0, r4, 0
movs r1, 0x41
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r4, r0, 16
movs r0, 0xCE
lsls r0, 1
cmp r4, r0
bne _08153D18
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, =gUnknown_085E8264
movs r2, 0xB
bl CopyString_LimitN
bl StringCopyN
b _08153D22
.pool
_08153D18:
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, =gUnknown_085E8268
movs r2, 0xB
bl CopyString_LimitN
bl StringCopyN
_08153D22:
ldr r0, =gUnknown_020244E9
ldrb r0, [r0]
cmp r0, 0x6
bne _08153D4C
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674C02
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x3
b _08153DB6
.pool
@ -718,7 +718,7 @@ _08153D4C:
_08153D86:
adds r0, r7, 0
movs r1, 0xC
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r0, 16
bl itemid_is_mail
@ -731,9 +731,9 @@ _08153D86:
_08153DA4:
bl party_compaction
bl calc_player_party_count
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674BF0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
_08153DB6:
str r0, [r6, 0x6C]
@ -757,16 +757,16 @@ sub_8153DD4: @ 8153DD4
subs r1, r0
ldr r0, [r4, 0x64]
adds r1, r0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r2, =0x00000bec
adds r0, r2
movs r2, 0xBC
bl memcpy
bl sub_81652B4
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_08674C31
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
@ -781,9 +781,9 @@ sub_8153E1C: @ 8153E1C
push {r4,lr}
adds r4, r0, 0
bl sub_809D5F4
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085ECAD8
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r4, 0x6C]
movs r0, 0
@ -815,7 +815,7 @@ sub_8153E40: @ 8153E40
adds r1, r0
subs r1, r4
adds r0, r4, 0
bl sub_806F96C
bl CalcByteArraySum
cmp r5, r0
beq _08153E7E
movs r0, 0
@ -851,7 +851,7 @@ sub_8153E88: @ 8153E88
adds r1, r0
subs r1, r4
adds r0, r4, 0
bl sub_806F8D0
bl CalcCRC16
lsls r0, 16
lsrs r0, 16
cmp r5, r0

View File

@ -70,7 +70,7 @@ _080E2DE2:
thumb_func_start c2_choose_name_or_words_screen
c2_choose_name_or_words_screen: @ 80E2E04
push {lr}
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -121,7 +121,7 @@ _080E2E7A:
bl UpdatePaletteFade
bl sub_80E501C
_080E2E86:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -209,7 +209,7 @@ choose_name_or_words_screen_setup: @ 80E2EA8
strh r0, [r1]
_080E2F2C:
ldr r0, [r5]
ldr r4, =gUnknown_030022B0
ldr r4, =gKeyRepeatStartDelay
ldrh r1, [r4]
ldr r2, =0x00001e25
adds r0, r2
@ -233,7 +233,7 @@ _080E2F2C:
ldr r2, =0x00001e30
adds r1, r2
ldr r1, [r1]
bl CopyString
bl StringCopy
_080E2F64:
movs r0, 0x10
strh r0, [r4]
@ -835,7 +835,7 @@ pokemon_transfer_to_pc_with_message: @ 80E34E4
lsls r0, 24
cmp r0, 0
bne _080E3534
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
ldr r0, =0x00004036
bl VarGet
lsls r0, 24
@ -843,18 +843,18 @@ pokemon_transfer_to_pc_with_message: @ 80E34E4
bl sav3_get_box_name
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
ldr r0, =gUnknown_02021DC4
bl StringCopy
ldr r0, =gStringVar2
ldr r1, =gUnknown_02039F94
ldr r1, [r1]
ldr r2, =0x00001e30
adds r1, r2
ldr r1, [r1]
bl CopyString
bl StringCopy
b _080E3574
.pool
_080E3534:
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
ldr r0, =0x00004036
bl VarGet
lsls r0, 24
@ -862,22 +862,22 @@ _080E3534:
bl sav3_get_box_name
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
ldr r0, =gUnknown_02021DC4
bl StringCopy
ldr r0, =gStringVar2
ldr r1, =gUnknown_02039F94
ldr r1, [r1]
ldr r2, =0x00001e30
adds r1, r2
ldr r1, [r1]
bl CopyString
ldr r4, =gUnknown_02021EC4
bl StringCopy
ldr r4, =gStringVar3
bl get_unknown_box_id
lsls r0, 24
lsrs r0, 24
bl sav3_get_box_name
adds r1, r0, 0
adds r0, r4, 0
bl CopyString
bl StringCopy
movs r5, 0x2
_080E3574:
ldr r0, =0x000008ab
@ -889,13 +889,13 @@ _080E3574:
lsls r0, 24
lsrs r5, r0, 24
_080E3586:
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
ldr r1, =gUnknown_0858BDB8
lsls r0, r5, 2
adds r0, r1
ldr r1, [r0]
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0
movs r1, 0
bl sub_81973C4
@ -939,7 +939,7 @@ sub_80E3604: @ 80E3604
lsls r0, 16
cmp r0, 0
bne _080E362E
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -1173,7 +1173,7 @@ sub_80E37DC: @ 80E37DC
movs r2, 0xA
ldrsh r0, [r4, r2]
movs r1, 0x28
bl sine
bl Sin
ldr r1, [r5]
movs r2, 0xF1
lsls r2, 5
@ -1188,7 +1188,7 @@ sub_80E37DC: @ 80E37DC
movs r1, 0xFF
ands r0, r1
movs r1, 0x28
bl sine
bl Sin
ldr r1, [r5]
ldr r2, =0x00001e21
adds r1, r2
@ -1241,7 +1241,7 @@ sub_80E3870: @ 80E3870
movs r1, 0xA
ldrsh r0, [r4, r1]
movs r1, 0x28
bl sine
bl Sin
ldr r1, [r5]
movs r2, 0xF1
lsls r2, 5
@ -1256,7 +1256,7 @@ sub_80E3870: @ 80E3870
movs r1, 0xFF
ands r0, r1
movs r1, 0x28
bl sine
bl Sin
ldr r1, [r5]
ldr r3, =0x00001e21
adds r1, r3
@ -2992,7 +2992,7 @@ sub_80E4692: @ 80E4692
adds r2, r0, 0
movs r0, 0
strh r0, [r2, 0xA]
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -3079,7 +3079,7 @@ sub_80E46F0: @ 80E46F0
adds r0, r4, 0
adds r1, r5, 0
bl sub_80E3DFC
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r2, [r0, 0x30]
movs r0, 0x40
ands r0, r2
@ -3302,7 +3302,7 @@ sub_80E48E8: @ 80E48E8
ldr r0, =gSpeciesNames
adds r1, r0
add r0, sp, 0xC
bl CopyString
bl StringCopy
ldr r0, [r5]
ldr r1, =0x00001e28
adds r0, r1
@ -3310,7 +3310,7 @@ sub_80E48E8: @ 80E48E8
ldr r1, [r0, 0x8]
add r0, sp, 0xC
movs r2, 0xF
bl AppendString_LimitN
bl StringAppendN
ldr r0, [r5]
ldr r4, =0x00001e14
adds r0, r4
@ -3389,7 +3389,7 @@ sub_80E49BC: @ 80E49BC
movs r4, 0
ldr r1, =gUnknown_085E8D49
add r0, sp, 0xC
bl CopyString
bl StringCopy
ldr r5, =gUnknown_02039F94
ldr r0, [r5]
ldr r1, =0x00001e36
@ -3401,7 +3401,7 @@ sub_80E49BC: @ 80E49BC
bne _080E49E6
ldr r1, =gUnknown_085E8D4B
add r0, sp, 0xC
bl CopyString
bl StringCopy
movs r4, 0x1
_080E49E6:
ldr r0, [r5]
@ -3686,7 +3686,7 @@ _080E4C00:
lsls r2, 24
lsrs r2, 24
adds r1, r3, 0
bl CopyString_LimitN
bl StringCopyN
b _080E4C4A
.pool
_080E4C34:
@ -3826,7 +3826,7 @@ sub_80E4D10: @ 80E4D10
bcs _080E4DA6
add r5, sp, 0xC
mov r10, r4
ldr r0, =gUnknown_085E8218
ldr r0, =gExpandedPlaceholder_Empty
ldrb r0, [r0]
mov r8, r0
_080E4D52:
@ -4188,7 +4188,7 @@ _080E5066:
sub_80E5074: @ 80E5074
push {lr}
sub sp, 0x8
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldrb r2, [r1, 0x8]
movs r0, 0
@ -4208,7 +4208,7 @@ sub_80E5074: @ 80E5074
sub_80E509C: @ 80E509C
push {lr}
sub sp, 0x8
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldrb r2, [r1, 0x8]
movs r0, 0
@ -4228,7 +4228,7 @@ sub_80E509C: @ 80E509C
sub_80E50C4: @ 80E50C4
push {lr}
sub sp, 0x8
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldrb r2, [r1, 0x8]
movs r0, 0
@ -4248,7 +4248,7 @@ sub_80E50C4: @ 80E50C4
sub_80E50EC: @ 80E50EC
push {lr}
sub sp, 0x8
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldrb r2, [r1, 0x8]
movs r0, 0

View File

@ -56,14 +56,14 @@ _080842FC:
thumb_func_start set_player_trainer_id
set_player_trainer_id: @ 8084310
push {r4,lr}
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GetTrainerId
lsls r4, 16
lsls r0, 16
lsrs r0, 16
orrs r4, r0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r1, 0xA
adds r0, r4, 0
@ -76,7 +76,7 @@ set_player_trainer_id: @ 8084310
thumb_func_start init_options
init_options: @ 808433C
ldr r3, =gUnknown_03005D90
ldr r3, =gSaveBlock2Ptr
ldr r2, [r3]
ldrb r1, [r2, 0x14]
movs r0, 0x8
@ -124,7 +124,7 @@ sub_8084390: @ 8084390
ldr r1, =gUnknown_030060B0
movs r0, 0
strb r0, [r1]
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
adds r0, 0x28
movs r1, 0
@ -146,7 +146,7 @@ sub_80843C0: @ 80843C0
push {r4-r7,lr}
bl sub_80DF040
movs r2, 0x8
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r12, r0
ldr r4, =0x00002e90
ldr r3, =gUnknown_08339D1C
@ -178,7 +178,7 @@ sub_8084400: @ 8084400
sub sp, 0x4
movs r0, 0
str r0, [sp]
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r1, [r4]
ldr r0, =0x0000064c
adds r1, r0
@ -261,7 +261,7 @@ _080844B2:
ldr r1, =gUnknown_020322D4
movs r0, 0x1
strb r0, [r1]
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
adds r0, 0xAC
movs r5, 0
@ -285,7 +285,7 @@ _080844B2:
bl GabbyAndTyNewGameInitData
bl sub_80E8B28
bl RemoveAllBerryTrees
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
movs r1, 0x92
lsls r1, 3
@ -345,7 +345,7 @@ sub_80845CC: @ 80845CC
mov r0, sp
movs r5, 0
strh r5, [r0]
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r1, [r4]
movs r0, 0xF6
lsls r0, 1

View File

@ -32,7 +32,7 @@ CB2_OptionsMenu: @ 80BA4DC
mov r7, r8
push {r7}
sub sp, 0xC
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -63,7 +63,7 @@ _080BA508:
_080BA538:
movs r0, 0
bl SetVBlankCallback
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -213,14 +213,14 @@ _080BA69C:
bl remove_some_task
bl ResetTasks
bl ResetAllObjectData
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
b _080BA7F4
.pool
_080BA6BC:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x14]
lsrs r0, 3
@ -239,7 +239,7 @@ _080BA6E0:
movs r1, 0
movs r2, 0x2
bl LoadPalette
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x14]
lsrs r0, 3
@ -248,7 +248,7 @@ _080BA6E0:
movs r1, 0x70
movs r2, 0x20
bl LoadPalette
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -265,7 +265,7 @@ _080BA728:
movs r0, 0
bl PutWindowTilemap
bl sub_80BB0D0
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -280,7 +280,7 @@ _080BA748:
movs r0, 0x1
bl PutWindowTilemap
bl sub_80BB104
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -289,7 +289,7 @@ _080BA748:
strb r0, [r1]
_080BA760:
bl sub_80BB154
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -308,7 +308,7 @@ _080BA774:
adds r4, r1
movs r0, 0
strh r0, [r4, 0x8]
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r0, [r2, 0x14]
lsls r0, 29
@ -348,7 +348,7 @@ _080BA774:
movs r1, 0x3
bl CopyWindowToVram
_080BA7EC:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -409,7 +409,7 @@ sub_80BA86C: @ 80BA86C
push {r4-r7,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -654,7 +654,7 @@ sub_80BAA64: @ 80BAA64
sub sp, 0x4
lsls r0, 24
lsrs r0, 24
ldr r6, =gUnknown_03005D90
ldr r6, =gSaveBlock2Ptr
ldr r3, [r6]
ldr r1, =gTasks
lsls r4, r0, 2
@ -742,7 +742,7 @@ sub_80BAB08: @ 80BAB08
adds r0, r2, 0
bl DestroyTask
bl FreeAllWindowBuffers
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r0, [r0, 0x8]
bl SetMainCallback2
_080BAB2C:
@ -845,7 +845,7 @@ sub_80BABDC: @ 80BABDC
push {lr}
lsls r0, 24
lsrs r3, r0, 24
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x10
ands r0, r1
@ -970,7 +970,7 @@ sub_80BACE0: @ 80BACE0
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x30
ands r0, r1
@ -1031,7 +1031,7 @@ sub_80BAD5C: @ 80BAD5C
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x30
ands r0, r1
@ -1092,7 +1092,7 @@ sub_80BADD8: @ 80BADD8
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x30
ands r0, r1
@ -1156,7 +1156,7 @@ sub_80BAE5C: @ 80BAE5C
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x10
ands r0, r1
@ -1191,7 +1191,7 @@ _080BAE82:
movs r0, 0x1
strb r0, [r1]
_080BAEAE:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x20
ands r0, r1
@ -1333,7 +1333,7 @@ sub_80BAFCC: @ 80BAFCC
push {lr}
lsls r0, 24
lsrs r3, r0, 24
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x10
ands r0, r1

View File

@ -10,7 +10,7 @@ reset_playtime: @ 80841E4
ldr r1, =gUnknown_03000E08
movs r0, 0
strb r0, [r1]
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r3, [r2]
movs r1, 0
movs r0, 0
@ -30,7 +30,7 @@ set_max_playtime_if_appropriate: @ 8084208
ldr r1, =gUnknown_03000E08
movs r0, 0x1
strb r0, [r1]
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrh r1, [r0, 0xE]
ldr r0, =0x000003e7
@ -52,14 +52,14 @@ sub_8084230: @ 8084230
.pool
thumb_func_end sub_8084230
thumb_func_start gametime_increment
gametime_increment: @ 808423C
thumb_func_start PlayTimeCounter_Update
PlayTimeCounter_Update: @ 808423C
push {lr}
ldr r0, =gUnknown_03000E08
ldrb r0, [r0]
cmp r0, 0x1
bne _08084294
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r0, [r2]
ldrb r1, [r0, 0x12]
adds r1, 0x1
@ -101,14 +101,14 @@ _08084294:
pop {r0}
bx r0
.pool
thumb_func_end gametime_increment
thumb_func_end PlayTimeCounter_Update
thumb_func_start set_max_playtime
set_max_playtime: @ 80842A4
ldr r1, =gUnknown_03000E08
movs r0, 0x2
strb r0, [r1]
ldr r2, =gUnknown_03005D90
ldr r2, =gSaveBlock2Ptr
ldr r3, [r2]
ldr r0, =0x000003e7
strh r0, [r3, 0xE]

View File

@ -9,7 +9,7 @@
sub_816ADF4: @ 816ADF4
push {r4-r6,lr}
movs r4, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x93
lsls r1, 3
@ -374,7 +374,7 @@ sub_816B148: @ 816B148
ldrb r0, [r0]
cmp r0, 0x4
bne _0816B180
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
@ -817,7 +817,7 @@ sub_816B510: @ 816B510
push {r4,lr}
movs r2, 0
movs r1, 0x6
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
movs r4, 0xB0
lsls r4, 6
@ -862,7 +862,7 @@ _0816B55A:
mov r8, r1
cmp r4, 0xF
bhi _0816B5D4
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
mov r10, r0
lsls r0, r2, 3
adds r0, r2
@ -1078,8 +1078,8 @@ sub_816B730: @ 816B730
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r5, =gUnknown_02021CC4
ldr r2, =gUnknown_03005D8C
ldr r5, =gStringVar1
ldr r2, =gSaveBlock1Ptr
ldr r1, =gUnknown_0203BCB8
ldrh r0, [r1]
adds r0, 0x6
@ -1093,14 +1093,14 @@ sub_816B730: @ 816B730
ldr r0, =0x00002bf2
adds r1, r0
adds r0, r5, 0
bl CopyString
bl StringCopy
adds r0, r5, 0
movs r1, 0
bl sub_81DB554
ldr r5, =gUnknown_02021FC4
ldr r5, =gStringVar4
ldr r1, =gUnknown_085EAC63
adds r0, r5, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
ldr r2, =sub_816B7DC
adds r0, r4, 0
adds r1, r5, 0
@ -1248,7 +1248,7 @@ sub_816B8A4: @ 816B8A4
bne _0816B8E6
bl sub_81D1EC0
bl overworld_free_bg_tilemaps
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r1, =gUnknown_0203BCB8
ldrh r0, [r1]
adds r0, 0x6
@ -1413,7 +1413,7 @@ sub_816BA18: @ 816BA18
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
ldr r2, =gUnknown_03005D8C
ldr r2, =gSaveBlock1Ptr
ldr r4, =gUnknown_0203BCB8
ldrh r1, [r4]
adds r1, 0x6
@ -1773,7 +1773,7 @@ _0816BD14:
adds r4, r0
ldr r0, [r5]
adds r0, r4
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
lsls r2, r6, 2
adds r1, r2
@ -1809,7 +1809,7 @@ _0816BD58:
ldr r0, [r5]
adds r0, r4
ldr r1, =gUnknown_085E8CF7
bl CopyString
bl StringCopy
ldr r0, [r5]
lsls r2, r6, 3
adds r1, r0, r2
@ -1878,7 +1878,7 @@ _0816BDEE:
negs r0, r0
cmp r4, r0
beq _0816BE2C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
lsls r1, r4, 2
adds r0, r1
@ -1938,8 +1938,8 @@ _0816BE84:
movs r2, 0xFF
bl sub_816BFE0
_0816BE8E:
ldr r0, =gUnknown_02021CC4
ldr r1, =gUnknown_03005D8C
ldr r0, =gStringVar1
ldr r1, =gSaveBlock1Ptr
ldr r1, [r1]
lsls r2, r4, 2
adds r1, r2
@ -1948,11 +1948,11 @@ _0816BE8E:
ldrh r1, [r1]
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E8DA0
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x7
adds r1, r4, 0
movs r2, 0x68
@ -1991,7 +1991,7 @@ sub_816BEF0: @ 816BEF0
negs r0, r0
cmp r1, r0
beq _0816BF2C
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
lsls r1, 2
adds r0, r1
@ -2242,7 +2242,7 @@ sub_816C110: @ 816C110
push {lr}
sub sp, 0x4
bl sub_80D6E84
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x93
lsls r1, 3
@ -2435,10 +2435,10 @@ sub_816C2C0: @ 816C2C0
adds r0, r5, 0
movs r1, 0x11
bl FillWindowPixelBuffer
ldr r4, =gUnknown_02021FC4
ldr r4, =gStringVar4
adds r0, r4, 0
adds r1, r6, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
str r0, [sp]
movs r0, 0
@ -2466,7 +2466,7 @@ sub_816C30C: @ 816C30C
lsls r0, 3
ldr r1, =gTasks + 0x8
adds r4, r0, r1
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x4
ands r0, r1
@ -2641,7 +2641,7 @@ sub_816C450: @ 816C450
adds r0, r5
ldrb r0, [r0]
bl sub_816C690
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r0, [r6]
adds r0, r5
@ -2652,7 +2652,7 @@ sub_816C450: @ 816C450
lsls r0, 3
adds r1, r0
ldrh r0, [r1]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl itemid_get_name
ldr r0, =0x0000fff7
bl sub_816C228
@ -2682,7 +2682,7 @@ sub_816C4FC: @ 816C4FC
lsls r0, 3
ldr r1, =gTasks + 0x8
adds r4, r0, r1
ldr r7, =gUnknown_030022C0
ldr r7, =gMain
ldrh r1, [r7, 0x2E]
movs r0, 0x4
ands r0, r1
@ -2790,7 +2790,7 @@ sub_816C5A0: @ 816C5A0
subs r0, r6, 0x1
cmp r2, r0
beq _0816C60A
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x93
lsls r1, 3
@ -2889,12 +2889,12 @@ sub_816C6BC: @ 816C6BC
lsrs r5, 24
lsls r3, 24
lsrs r3, 24
ldr r0, =gUnknown_02021CC4
bl ConvertIntToDecimalString
ldr r4, =gUnknown_02021FC4
ldr r0, =gStringVar1
bl ConvertIntToDecimalStringN
ldr r4, =gStringVar4
ldr r1, =gUnknown_085E8DA0
adds r0, r4, 0
bl ExpandStringRefs
bl StringExpandPlaceholders
movs r0, 0x1
adds r1, r4, 0
movs r2, 0x30
@ -2941,7 +2941,7 @@ sub_816C71C: @ 816C71C
ldrsh r0, [r6, r1]
cmp r0, 0
bne _0816C798
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
lsls r0, r4, 2
adds r1, r0
@ -2959,7 +2959,7 @@ _0816C774:
lsls r2, 3
adds r0, r1, r2
ldrh r0, [r0]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl itemid_get_name
ldr r0, =0x0000fffe
bl sub_816C228
@ -2967,7 +2967,7 @@ _0816C774:
b _0816C7D4
.pool
_0816C798:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
lsls r0, r4, 2
adds r1, r0
@ -2985,7 +2985,7 @@ _0816C7BC:
lsls r2, 3
adds r0, r1, r2
ldrh r0, [r0]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl itemid_get_name
ldr r0, =0x0000fffc
bl sub_816C228
@ -3039,7 +3039,7 @@ sub_816C818: @ 816C818
adds r2, r0
lsls r2, 16
adds r0, r6, 0x4
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
mov r8, r1
ldr r1, [r1]
lsrs r7, r2, 14
@ -3066,7 +3066,7 @@ sub_816C818: @ 816C818
b _0816C8EC
.pool
_0816C888:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -3136,7 +3136,7 @@ sub_816C8FC: @ 816C8FC
ldrh r0, [r0]
adds r1, r0
lsls r1, 16
ldr r7, =gUnknown_03005D8C
ldr r7, =gSaveBlock1Ptr
ldr r0, [r7]
lsrs r5, r1, 14
adds r0, r5
@ -3156,14 +3156,14 @@ sub_816C8FC: @ 816C8FC
lsls r2, 3
adds r0, r2
ldrh r0, [r0]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl itemid_get_name
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
movs r2, 0x4
ldrsh r1, [r4, r2]
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, =0x0000fffd
bl sub_816C228
bl sub_816C2C0
@ -3215,7 +3215,7 @@ sub_816C9B8: @ 816C9B8
ldrh r0, [r0]
adds r1, r0
lsls r1, 16
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
ldr r0, [r6]
lsrs r4, r1, 14
adds r0, r4
@ -3233,14 +3233,14 @@ sub_816C9B8: @ 816C9B8
lsls r2, 3
adds r0, r2
ldrh r0, [r0]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
bl itemid_get_name
ldr r0, =gUnknown_02021DC4
ldr r0, =gStringVar2
movs r2, 0x4
ldrsh r1, [r7, r2]
movs r2, 0
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
ldr r0, =0x0000fff8
bl sub_816C228
bl sub_816C2C0
@ -3310,7 +3310,7 @@ sub_816CAC8: @ 816CAC8
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldr r1, =gUnknown_0203BCB8
ldrh r0, [r1, 0x2]
@ -3342,7 +3342,7 @@ sub_816CB04: @ 816CB04
lsls r0, 3
ldr r1, =gTasks + 0x8
adds r5, r0, r1
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
@ -3384,13 +3384,13 @@ sub_816CB74: @ 816CB74
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
cmp r0, 0
beq _0816CBAC
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
ldr r1, =gUnknown_0203BCB8
ldrh r0, [r1, 0x2]

View File

@ -5,625 +5,6 @@
.text
thumb_func_start sub_81795E8
sub_81795E8: @ 81795E8
push {lr}
ldr r0, =0x000008af
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179634
ldr r0, =gUnknown_03005D8C
ldr r2, [r0]
ldrh r1, [r2, 0x4]
ldr r0, =0x00004718
cmp r1, r0
bne _08179634
ldr r1, [r2]
ldr r0, =0x0003000a
cmp r1, r0
beq _08179616
ldr r0, =0x00030009
cmp r1, r0
beq _08179616
ldr r0, =0x0003000b
cmp r1, r0
bne _08179634
_08179616:
movs r0, 0x1
b _08179636
.pool
_08179634:
movs r0, 0
_08179636:
pop {r1}
bx r1
thumb_func_end sub_81795E8
thumb_func_start sub_817963C
sub_817963C: @ 817963C
push {lr}
ldr r2, =0x0000022a
movs r0, 0x10
movs r1, 0x8
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0x11
movs r1, 0x8
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x12
movs r1, 0x8
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0x10
movs r1, 0x9
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0x11
movs r1, 0x9
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x12
movs r1, 0x9
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl audio_play
ldr r0, =0x000008af
bl FlagSet
bl script_env_2_disable
pop {r0}
bx r0
.pool
thumb_func_end sub_817963C
thumb_func_start sub_81796AC
sub_81796AC: @ 81796AC
push {r4,lr}
ldr r4, =gUnknown_020244EC
adds r0, r4, 0
movs r1, 0x41
movs r2, 0
bl pokemon_getattr
movs r1, 0x9D
lsls r1, 1
cmp r0, r1
bne _081796F4
bl calc_player_party_count
ldr r0, =gUnknown_020244E9
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
adds r1, r4, 0
subs r1, 0x64
adds r0, r1
movs r1, 0x41
movs r2, 0
bl pokemon_getattr
ldr r1, =0x0000017d
cmp r0, r1
bne _081796F4
movs r0, 0x1
b _081796F6
.pool
_081796F4:
movs r0, 0
_081796F6:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_81796AC
thumb_func_start nullsub_84
nullsub_84: @ 81796FC
bx lr
thumb_func_end nullsub_84
thumb_func_start sub_8179700
sub_8179700: @ 8179700
push {lr}
ldr r0, =sub_8179778
movs r1, 0x9
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
movs r0, 0x2
strh r0, [r1, 0x10]
movs r0, 0x5
strh r0, [r1, 0x12]
movs r0, 0x32
strh r0, [r1, 0x14]
movs r0, 0
bl SetCameraPanningCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_8179700
thumb_func_start sub_817973C
sub_817973C: @ 817973C
push {lr}
ldr r0, =sub_8179778
movs r1, 0x9
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
movs r0, 0x3
strh r0, [r1, 0x10]
movs r0, 0x5
strh r0, [r1, 0x12]
movs r0, 0x2
strh r0, [r1, 0x14]
movs r0, 0
bl SetCameraPanningCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_817973C
thumb_func_start sub_8179778
sub_8179778: @ 8179778
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
movs r1, 0xA
ldrsh r0, [r4, r1]
movs r2, 0x12
ldrsh r1, [r4, r2]
bl __modsi3
cmp r0, 0
bne _081797D0
strh r0, [r4, 0xA]
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
ldrh r0, [r4, 0x10]
negs r0, r0
strh r0, [r4, 0x10]
movs r0, 0x10
ldrsh r1, [r4, r0]
movs r0, 0
bl SetCameraPanning
movs r2, 0xC
ldrsh r1, [r4, r2]
movs r2, 0x14
ldrsh r0, [r4, r2]
cmp r1, r0
bne _081797D0
adds r0, r5, 0
bl DestroyTask
bl script_env_2_enable_and_set_ctx_running
bl InstallCameraPanAheadCallback
_081797D0:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8179778
thumb_func_start sub_81797DC
sub_81797DC: @ 81797DC
push {lr}
movs r0, 0x8B
lsls r0, 4
bl FlagGet
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0
bne _0817982C
ldr r0, =gUnknown_03005D8C
ldr r3, [r0]
ldrh r1, [r3, 0x4]
movs r0, 0xC3
lsls r0, 3
cmp r1, r0
bne _0817982C
ldr r1, [r3]
ldr r0, =0x00170006
cmp r1, r0
beq _08179810
ldr r0, =0x00170005
cmp r1, r0
beq _08179810
ldr r0, =0x00170007
cmp r1, r0
bne _0817982C
_08179810:
ldr r0, =gUnknown_0203BD14
strb r2, [r0]
movs r0, 0x1
b _0817982E
.pool
_0817982C:
movs r0, 0
_0817982E:
pop {r1}
bx r1
thumb_func_end sub_81797DC
thumb_func_start sub_8179834
sub_8179834: @ 8179834
push {lr}
bl brm_get_pokemon_selection
ldr r1, =gUnknown_02038C08
lsls r0, 24
lsrs r0, 24
str r0, [r1]
movs r0, 0x3C
bl FieldEffectStart
pop {r0}
bx r0
.pool
thumb_func_end sub_8179834
thumb_func_start sub_8179850
sub_8179850: @ 8179850
push {lr}
movs r0, 0x3C
bl FieldEffectActiveListRemove
bl sub_8179860
pop {r0}
bx r0
thumb_func_end sub_8179850
thumb_func_start sub_8179860
sub_8179860: @ 8179860
push {lr}
ldr r2, =0x0000022a
movs r0, 0xE
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0xF
movs r1, 0x1A
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x10
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0xE
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0xF
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x10
movs r1, 0x1B
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl audio_play
movs r0, 0x8B
lsls r0, 4
bl FlagSet
bl script_env_2_disable
pop {r0}
bx r0
.pool
thumb_func_end sub_8179860
thumb_func_start sub_81798D0
sub_81798D0: @ 81798D0
push {lr}
ldr r0, =0x000008b2
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179910
ldr r0, =gUnknown_03005D8C
ldr r2, [r0]
ldrh r1, [r2, 0x4]
ldr r0, =0x00004418
cmp r1, r0
bne _08179910
ldr r1, [r2]
ldr r0, =0x00190008
cmp r1, r0
bne _08179910
ldr r1, =gUnknown_0203BD14
movs r0, 0x1
strb r0, [r1]
movs r0, 0x1
b _08179912
.pool
_08179910:
movs r0, 0
_08179912:
pop {r1}
bx r1
thumb_func_end sub_81798D0
thumb_func_start sub_8179918
sub_8179918: @ 8179918
push {lr}
bl brm_get_pokemon_selection
ldr r1, =gUnknown_02038C08
lsls r0, 24
lsrs r0, 24
str r0, [r1]
movs r0, 0x3C
bl FieldEffectStart
pop {r0}
bx r0
.pool
thumb_func_end sub_8179918
thumb_func_start sub_8179934
sub_8179934: @ 8179934
push {lr}
movs r0, 0x3C
bl FieldEffectActiveListRemove
bl sub_8179944
pop {r0}
bx r0
thumb_func_end sub_8179934
thumb_func_start sub_8179944
sub_8179944: @ 8179944
push {lr}
ldr r2, =0x0000022a
movs r0, 0xE
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x0000022b
movs r0, 0xF
movs r1, 0x1A
bl MapGridSetMetatileIdAt
movs r2, 0x8B
lsls r2, 2
movs r0, 0x10
movs r1, 0x1A
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e32
movs r0, 0xE
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000233
movs r0, 0xF
movs r1, 0x1B
bl MapGridSetMetatileIdAt
ldr r2, =0x00000e34
movs r0, 0x10
movs r1, 0x1B
bl MapGridSetMetatileIdAt
bl DrawWholeMapView
movs r0, 0x14
bl audio_play
ldr r0, =0x000008b2
bl FlagSet
bl script_env_2_disable
pop {r0}
bx r0
.pool
thumb_func_end sub_8179944
thumb_func_start nullsub_64
nullsub_64: @ 81799B4
bx lr
thumb_func_end nullsub_64
thumb_func_start sub_81799B8
sub_81799B8: @ 81799B8
push {lr}
bl oei_task_add
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gUnknown_0203BD14
ldrb r0, [r0]
cmp r0, 0x1
bne _081799E4
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
ldr r2, =sub_8179934
b _081799F0
.pool
_081799E4:
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
ldr r2, =sub_8179850
_081799F0:
lsrs r1, r2, 16
strh r1, [r0, 0x18]
strh r2, [r0, 0x1A]
movs r0, 0
pop {r1}
bx r1
.pool
thumb_func_end sub_81799B8
thumb_func_start sub_8179A04
sub_8179A04: @ 8179A04
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
ldr r4, =gUnknown_03005D8C
ldr r0, [r4]
ldrh r1, [r0, 0x4]
ldr r0, =0x00004318
cmp r1, r0
beq _08179A1A
b _08179B5A
_08179A1A:
ldr r0, =0x000008b1
bl FlagGet
lsls r0, 24
cmp r0, 0
beq _08179A28
b _08179B5A
_08179A28:
movs r0, 0x2
bl FlagGet
lsls r0, 24
cmp r0, 0
bne _08179A36
b _08179B5A
_08179A36:
movs r0, 0x3
bl FlagGet
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08179A58
b _08179B5A
.pool
_08179A54:
movs r0, 0x1
b _08179B5C
_08179A58:
movs r5, 0
mov r8, r4
ldr r4, =gUnknown_085EFE74
adds r0, r4, 0x1
mov r12, r0
ldr r6, =0x0000403b
ldr r1, =0x0000403c
mov r9, r1
_08179A68:
lsls r0, r5, 1
adds r1, r0, r4
add r0, r12
ldrb r3, [r0]
mov r7, r8
ldr r2, [r7]
movs r7, 0
ldrsh r0, [r2, r7]
ldrb r1, [r1]
cmp r0, r1
bne _08179B44
movs r1, 0x2
ldrsh r0, [r2, r1]
cmp r0, r3
bne _08179B44
cmp r5, 0xF
bhi _08179AB0
adds r0, r6, 0
bl VarGet
lsls r0, 16
movs r1, 0x80
lsls r1, 9
lsls r1, r5
orrs r1, r0
lsrs r1, 16
adds r0, r6, 0
bl VarSet
b _08179AF0
.pool
_08179AB0:
cmp r5, 0x1F
bhi _08179AD2
mov r0, r9
bl VarGet
lsls r0, 16
adds r2, r5, 0
subs r2, 0x10
movs r1, 0x80
lsls r1, 9
lsls r1, r2
orrs r1, r0
lsrs r1, 16
mov r0, r9
bl VarSet
b _08179AF0
_08179AD2:
ldr r4, =0x0000403d
adds r0, r4, 0
bl VarGet
lsls r0, 16
adds r2, r5, 0
subs r2, 0x20
movs r1, 0x80
lsls r1, 9
lsls r1, r2
orrs r1, r0
lsrs r1, 16
adds r0, r4, 0
bl VarSet
_08179AF0:
ldr r0, =0x0000403b
bl VarGet
lsls r0, 16
lsrs r4, r0, 16
ldr r0, =0x0000ffff
cmp r4, r0
bne _08179B5A
ldr r0, =0x0000403c
bl VarGet
lsls r0, 16
lsrs r0, 16
cmp r0, r4
bne _08179B5A
ldr r0, =0x0000403d
bl VarGet
lsls r0, 16
lsrs r0, 16
cmp r0, 0xF
bne _08179B5A
ldr r0, =gUnknown_03005D8C
ldr r0, [r0]
ldr r1, [r0]
ldr r0, =0x00150008
cmp r1, r0
beq _08179A54
b _08179B5A
.pool
_08179B44:
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0x23
bls _08179A68
movs r0, 0x3
bl FlagSet
movs r0, 0x2
bl FlagReset
_08179B5A:
movs r0, 0
_08179B5C:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end sub_8179A04
thumb_func_start sub_8179B68
sub_8179B68: @ 8179B68
push {lr}
@ -650,7 +31,7 @@ sub_8179B84: @ 8179B84
sub_8179B98: @ 8179B98
push {r4,lr}
sub sp, 0x4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -688,7 +69,7 @@ _08179BF8:
str r0, [r4]
bl SetVBlankHBlankCallbacksToNull
bl clear_scheduled_bg_copies_to_vram
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -704,7 +85,7 @@ _08179C20:
.pool
_08179C34:
bl ResetAllObjectData
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -715,7 +96,7 @@ _08179C48:
b _08179D32
_08179C4E:
bl init_uns_table_pokemon_copy
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -726,7 +107,7 @@ _08179C60:
b _08179D32
_08179C66:
bl sub_8179FAC
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -737,7 +118,7 @@ _08179C78:
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
bl sub_8179DF4
lsls r0, 24
@ -759,7 +140,7 @@ _08179CB0:
ldrb r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
bl sub_817A358
ldr r1, =gUnknown_0203BD18
@ -775,7 +156,7 @@ _08179CDC:
movs r2, 0x1
movs r3, 0xE
bl SetWindowBorderStyle
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -790,7 +171,7 @@ _08179CFE:
movs r1, 0x10
movs r2, 0
bl BlendPalettes
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -811,7 +192,7 @@ _08179D18:
_08179D30:
strb r0, [r2, 0x8]
_08179D32:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -931,12 +312,12 @@ _08179E24:
_08179E48:
adds r0, r6, 0
movs r1, 0x41
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r5, r0, 16
adds r0, r6, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r0, r5, 3
ldr r1, =gMonFrontPicTable
@ -954,16 +335,16 @@ _08179E48:
_08179E84:
adds r0, r6, 0
movs r1, 0x41
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r5, r0, 16
adds r0, r6, 0
movs r1, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
adds r0, r6, 0
movs r1, 0x1
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
adds r0, r5, 0
adds r2, r4, 0
@ -1094,7 +475,7 @@ sub_8179FAC: @ 8179FAC
sub_8179FEC: @ 8179FEC
push {lr}
lsls r0, 24
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
lsrs r0, 21
ldr r2, =0x00000848
adds r0, r2
@ -1308,9 +689,9 @@ sub_817A1C4: @ 817A1C4
movs r0, 0x64
adds r5, r1, 0
muls r5, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r5, r0
ldr r1, =gUnknown_03005D8C
ldr r1, =gSaveBlock1Ptr
ldr r0, =gUnknown_0203CE7C
ldrh r0, [r0]
lsls r0, 3
@ -1326,33 +707,33 @@ sub_817A1C4: @ 817A1C4
bl sub_8136FE4
ldr r6, =gUnknown_0203BC9E
strh r0, [r6]
ldr r1, =gUnknown_02021CC4
ldr r1, =gStringVar1
adds r0, r5, 0
bl GetMonNickname
ldr r1, =gUnknown_02021DC4
ldr r1, =gStringVar2
adds r0, r4, 0
bl sub_8137044
movs r1, 0
ldrsh r0, [r6, r1]
cmp r0, 0
bne _0817A248
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E937F
bl ExpandStringRefs
bl StringExpandPlaceholders
b _0817A268
.pool
_0817A248:
cmp r0, 0
ble _0817A260
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E9390
bl ExpandStringRefs
bl StringExpandPlaceholders
b _0817A268
.pool
_0817A260:
ldr r0, =gUnknown_02021FC4
ldr r0, =gStringVar4
ldr r1, =gUnknown_085E93A9
bl ExpandStringRefs
bl StringExpandPlaceholders
_0817A268:
ldr r2, =gUnknown_03003014
ldrb r0, [r2]
@ -1363,7 +744,7 @@ _0817A268:
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
ldr r2, =gUnknown_02021FC4
ldr r2, =gStringVar4
movs r0, 0
str r0, [sp]
movs r0, 0x2
@ -1407,7 +788,7 @@ sub_817A2C0: @ 817A2C0
movs r2, 0x80
lsls r2, 1
bl m4aMPlayVolumeControl
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r0, [r0, 0x8]
bl SetMainCallback2
adds r0, r4, 0
@ -1460,7 +841,7 @@ sub_817A358: @ 817A358
push {r6,r7}
adds r5, r0, 0
movs r1, 0x41
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
@ -2092,7 +1473,7 @@ _0817A932:
adds r1, r5, r2
movs r2, 0
ldrsh r1, [r1, r2]
bl sine
bl Sin
ldr r2, =0x00001074
adds r1, r5, r2
strh r0, [r1]
@ -2102,7 +1483,7 @@ _0817A932:
adds r1, r5, r2
movs r2, 0
ldrsh r1, [r1, r2]
bl cosine
bl Cos
ldr r2, =0x00001076
adds r1, r5, r2
strh r0, [r1]
@ -2414,7 +1795,7 @@ _0817ABE2:
adds r1, r2, r4
lsls r1, 16
asrs r1, 16
bl sine
bl Sin
lsls r5, 1
movs r2, 0x85
lsls r2, 4
@ -2438,7 +1819,7 @@ _0817AC54:
subs r1, r2, r4
lsls r1, 16
asrs r1, 16
bl sine
bl Sin
lsls r5, 1
movs r2, 0x85
lsls r2, 4
@ -2455,7 +1836,7 @@ _0817AC54:
_0817AC80:
lsls r1, 16
asrs r1, 16
bl cosine
bl Cos
movs r3, 0xC5
lsls r3, 4
adds r1, r6, r3

View File

@ -16,7 +16,7 @@ sub_80BB2D0: @ 80BB2D0
strb r0, [r1]
ldr r0, =gUnknown_030060B0
strb r2, [r0]
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
movs r1, 0
strb r2, [r0, 0x19]
@ -33,7 +33,7 @@ sub_80BB2D0: @ 80BB2D0
bl sub_809D3C0
movs r1, 0
movs r2, 0
ldr r3, =gUnknown_03005D8C
ldr r3, =gSaveBlock1Ptr
ldr r6, =0x00000988
ldr r5, =0x00003b24
_080BB30C:
@ -288,7 +288,7 @@ sub_80BB534: @ 80BB534
mov r7, r8
push {r7}
sub sp, 0x8
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r4, r0, r1
@ -370,7 +370,7 @@ _080BB582:
orrs r3, r0
str r3, [r2, 0x8]
ldr r0, [r2, 0x8]
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r2
@ -403,7 +403,7 @@ _080BB628:
movs r1, 0
bl CreateTask
ldr r1, [r4]
ldr r5, =gUnknown_03005D90
ldr r5, =gSaveBlock2Ptr
ldr r0, [r5]
ldrb r0, [r0, 0x19]
ldr r3, =0x00000612
@ -472,7 +472,7 @@ _080BB6E4:
adds r0, r1
movs r1, 0x8
strb r1, [r0]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -584,7 +584,7 @@ sub_80BB7D4: @ 80BB7D4
b _080BBA06
.pool
_080BB810:
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x1
mov r9, r0
@ -857,7 +857,7 @@ sub_80BBA78: @ 80BBA78
b _080BBBE8
.pool
_080BBAB0:
ldr r5, =gUnknown_030022C0
ldr r5, =gMain
ldrh r1, [r5, 0x2E]
movs r0, 0x1
ands r0, r1
@ -933,7 +933,7 @@ _080BBB34:
movs r0, 0x3
bl audio_play
_080BBB58:
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0xA
ands r0, r1
@ -1219,7 +1219,7 @@ sub_80BBDE8: @ 80BBDE8
ands r0, r1
cmp r0, 0
bne _080BBE4A
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
ldr r5, =gUnknown_02039B4C
ldr r1, [r5]
@ -1317,7 +1317,7 @@ sub_80BBEB8: @ 80BBEB8
b _080BC08A
.pool
_080BBEEC:
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r7, 0x1
adds r0, r7, 0
@ -1553,7 +1553,7 @@ sub_80BC0F8: @ 80BC0F8
b _080BC2C8
.pool
_080BC130:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -1617,7 +1617,7 @@ _080BC1B2:
movs r1, 0xE
bl sub_80BD2B4
_080BC1C2:
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x8
orrs r0, r1
@ -1661,7 +1661,7 @@ _080BC214:
movs r0, 0x3
bl audio_play
_080BC238:
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0xA
ands r0, r1
@ -1977,7 +1977,7 @@ sub_80BC514: @ 80BC514
sub sp, 0x4
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -2127,7 +2127,7 @@ _080BC682:
movs r0, 0
movs r1, 0x3
bl CopyWindowToVram
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r2
@ -2203,7 +2203,7 @@ _080BC768:
bl BeginNormalPaletteFade
ldr r0, =sub_80BB370
bl SetVBlankCallback
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -2249,7 +2249,7 @@ _080BC790:
movs r0, 0x3
bl ShowBg
_080BC7F8:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -3526,7 +3526,7 @@ _080BD266:
adds r3, r6, 0
bl sub_80BCE2C
adds r0, r4, 0
bl GetStringLength
bl StringLength
lsls r0, 24
lsrs r0, 24
add sp, 0x4
@ -4018,7 +4018,7 @@ sub_80BD69C: @ 80BD69C
lsrs r4, r1, 16
movs r0, 0
mov r10, r0
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2C]
movs r0, 0x40
ands r0, r1
@ -4305,7 +4305,7 @@ sub_80BD930: @ 80BD930
ldr r1, =0x0000060e
adds r0, r1
ldrh r4, [r0]
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2E]
movs r0, 0x40
ands r0, r1
@ -6291,7 +6291,7 @@ sub_80BEA24: @ 80BEA24
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -6397,7 +6397,7 @@ _080BEAF0:
movs r0, 0x1
movs r1, 0x2
bl CopyWindowToVram
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -6420,7 +6420,7 @@ _080BEB50:
lsls r0, 31
lsrs r0, 31
bl sub_80BC844
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -6468,7 +6468,7 @@ _080BEBD0:
bl CopyBgTilemapBufferToVram
movs r0, 0x3
bl CopyBgTilemapBufferToVram
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -6505,7 +6505,7 @@ _080BEC08:
ands r0, r2
strb r0, [r1, 0x5]
_080BEC44:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -6575,7 +6575,7 @@ _080BECBC:
bl ShowBg
movs r0, 0x3
bl ShowBg
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -6626,7 +6626,7 @@ _080BED5E:
cmp r0, 0
bne _080BEDA0
_080BED68:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -6724,7 +6724,7 @@ sub_80BEDF4: @ 80BEDF4
b _080BEFBA
.pool
_080BEE34:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldrh r2, [r1, 0x2E]
movs r0, 0x2
ands r0, r2
@ -6845,7 +6845,7 @@ _080BEF28:
ands r0, r2
cmp r0, 0
beq _080BEF78
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
@ -6880,7 +6880,7 @@ _080BEF78:
ands r0, r1
cmp r0, 0
beq _080BEFBA
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
@ -7018,7 +7018,7 @@ sub_80BF0AC: @ 80BF0AC
push {r4-r7,lr}
lsls r0, 24
lsrs r6, r0, 24
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
movs r0, 0x87
lsls r0, 3
adds r7, r2, r0
@ -7192,7 +7192,7 @@ sub_80BF250: @ 80BF250
sub sp, 0x14
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -7237,7 +7237,7 @@ _080BF2B6:
movs r1, 0x6
strb r1, [r0]
ldr r1, =gUnknown_030060B4
ldr r4, =gUnknown_030022C0
ldr r4, =gMain
ldr r0, [r4, 0xC]
str r0, [r1]
movs r0, 0
@ -7279,7 +7279,7 @@ _080BF310:
bl PutWindowTilemap
movs r0, 0x2
bl PutWindowTilemap
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -7303,7 +7303,7 @@ _080BF360:
.pool
_080BF38C:
bl ResetPaletteFade
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -7321,7 +7321,7 @@ _080BF3A0:
movs r2, 0x52
movs r3, 0x31
bl sub_80C0B44
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -7394,7 +7394,7 @@ _080BF41C:
bne _080BF462
b _080BF5B2
_080BF462:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -7431,7 +7431,7 @@ _080BF498:
lsls r0, 24
cmp r0, 0
beq _080BF4D8
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r3, 0x87
lsls r3, 3
adds r1, r3
@ -7466,7 +7466,7 @@ _080BF514:
ldr r0, =gUnknown_030060B4
ldr r0, [r0]
bl SetVBlankCallback
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r4, 0x87
lsls r4, 3
adds r1, r4
@ -7495,7 +7495,7 @@ _080BF540:
movs r0, 0x3
bl ShowBg
_080BF57A:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -7550,7 +7550,7 @@ _080BF5EC:
movs r0, 0
bl sub_80BF7FC
_080BF5F2:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldrh r2, [r1, 0x2E]
movs r0, 0x1
ands r0, r2
@ -7621,7 +7621,7 @@ _080BF694:
ands r0, r2
cmp r0, 0
beq _080BF700
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
@ -7664,7 +7664,7 @@ _080BF700:
ands r0, r1
cmp r0, 0
beq _080BF772
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
@ -7794,7 +7794,7 @@ sub_80BF82C: @ 80BF82C
sub sp, 0x44
lsls r0, 24
lsrs r7, r0, 24
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -7895,11 +7895,11 @@ _080BF910:
_080BF93C:
ldr r1, =gUnknown_085E8723
add r0, sp, 0x4
bl CopyString
ldr r0, =gUnknown_03005D90
bl StringCopy
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
add r0, sp, 0x4
bl AppendString
bl StringAppend
movs r0, 0x1
add r1, sp, 0x4
movs r2, 0xF0
@ -7910,7 +7910,7 @@ _080BF93C:
add r0, sp, 0x4
movs r2, 0x79
bl sub_80BE8DC
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -7920,7 +7920,7 @@ _080BF97C:
bl ResetPaletteFade
b _080BFB4E
_080BF982:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
bl sub_806F000
@ -7986,7 +7986,7 @@ _080BF982:
lsls r0, 3
adds r0, r1
strh r6, [r0, 0x12]
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -8077,7 +8077,7 @@ _080BFAE8:
ldr r0, =gUnknown_030060B4
ldr r0, [r0]
bl SetVBlankCallback
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -8106,7 +8106,7 @@ _080BFB14:
movs r0, 0x3
bl ShowBg
_080BFB4E:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -8156,7 +8156,7 @@ sub_80BFBB0: @ 80BFBB0
lsls r0, 24
lsrs r4, r0, 24
adds r5, r4, 0
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -8198,7 +8198,7 @@ _080BFC10:
ands r0, r1
cmp r0, 0
beq _080BFC5C
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1
@ -8504,7 +8504,7 @@ _080BFE84:
b _080C0074
_080BFE92:
ldr r1, =gUnknown_030060B4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r0, [r0, 0xC]
str r0, [r1]
movs r0, 0
@ -8707,7 +8707,7 @@ sub_80C0088: @ 80C0088
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
@ -8918,11 +8918,11 @@ _080C024C:
_080C0250:
ldr r1, =gUnknown_085E8D4F
mov r0, sp
bl CopyString
bl StringCopy
adds r1, r5, 0
movs r2, 0x2
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
mov r0, sp
movs r1, 0x60
movs r2, 0x19
@ -9448,7 +9448,7 @@ _080C06A2:
_080C06A8:
b _080C07E8
_080C06AA:
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r0, [r1]
adds r0, 0x5C
adds r0, r4
@ -9459,7 +9459,7 @@ _080C06AA:
bne _080C06BE
b _080C07E8
_080C06BE:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
ldr r6, =0x00000988
adds r1, r3, r6
@ -9484,7 +9484,7 @@ _080C06E0:
b _080C076A
.pool
_080C06FC:
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
ldr r3, [r1]
adds r0, r3, 0
adds r0, 0x28
@ -9499,7 +9499,7 @@ _080C06FC:
adds r0, r4
ldrb r0, [r0]
ands r0, r5
ldr r6, =gUnknown_03005D8C
ldr r6, =gSaveBlock1Ptr
cmp r2, r0
bne _080C0754
ldr r1, [r6]
@ -9557,7 +9557,7 @@ _080C076A:
b _080C07E8
.pool
_080C079C:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r1, 0x5C
adds r1, r4
@ -9565,7 +9565,7 @@ _080C079C:
adds r0, r5, 0
orrs r0, r2
strb r0, [r1]
ldr r3, =gUnknown_03005D8C
ldr r3, =gSaveBlock1Ptr
ldr r1, [r3]
ldr r0, =0x00000988
adds r1, r0
@ -9580,7 +9580,7 @@ _080C079C:
b _080C07DE
.pool
_080C07D8:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r1, 0x28
_080C07DE:
@ -10479,13 +10479,13 @@ sub_80C0E68: @ 80C0E68
lsls r0, 1
cmp r1, r0
bne _080C0E94
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r0, [r0, 0x20]
b _080C0E96
.pool
_080C0E88:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r0, [r0, 0x1C]
b _080C0E96
@ -11062,7 +11062,7 @@ sub_80C12E0: @ 80C12E0
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
@ -11163,7 +11163,7 @@ _080C13F0:
movs r1, 0x1
movs r2, 0x7E
bl LoadPalette
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r2
@ -11219,7 +11219,7 @@ _080C1480:
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
@ -11248,7 +11248,7 @@ _080C14A0:
movs r0, 0x3
bl ShowBg
_080C14DA:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -11351,7 +11351,7 @@ sub_80C15B0: @ 80C15B0
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -11442,7 +11442,7 @@ _080C1640:
movs r0, 0x3
bl CopyBgTilemapBufferToVram
_080C167C:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x10
ands r0, r1
@ -11534,7 +11534,7 @@ _080C1740:
bne _080C174C
ldr r6, =gUnknown_0856EDD4
_080C174C:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -11591,7 +11591,7 @@ _080C178C:
adds r0, r5, 0
movs r1, 0x5
bl sub_80C2318
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r1, [r4]
strb r0, [r1, 0x19]
bl sub_809D42C
@ -11677,7 +11677,7 @@ _080C1870:
movs r0, 0x3
bl CopyBgTilemapBufferToVram
_080C18B6:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x10
ands r0, r1
@ -11711,7 +11711,7 @@ _080C18B6:
movs r0, 0x3
bl CopyBgTilemapBufferToVram
_080C1900:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x40
ands r0, r1
@ -11745,7 +11745,7 @@ _080C1900:
movs r0, 0x3
bl CopyBgTilemapBufferToVram
_080C194A:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x80
ands r0, r1
@ -11913,7 +11913,7 @@ sub_80C1AB8: @ 80C1AB8
lsls r0, 24
lsrs r4, r0, 24
adds r2, r4, 0
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -12052,7 +12052,7 @@ sub_80C1BCC: @ 80C1BCC
subs r0, 0x1
lsls r0, 16
lsrs r2, r0, 16
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
mov r12, r0
ldrh r1, [r0, 0x2E]
movs r0, 0x1

View File

@ -138,7 +138,7 @@ sub_813CB40: @ 813CB40
bls _0813CB70
strh r4, [r1]
_0813CB70:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldr r3, =0x000031dc
adds r0, r3
@ -1310,7 +1310,7 @@ _0813D4A8:
adds r0, r1
movs r1, 0
movs r2, 0x10
bl RepeatChar
bl StringFill
b _0813D584
.pool
_0813D4D4:
@ -1451,7 +1451,7 @@ _0813D5E2:
b _0813D698
.pool
_0813D5F8:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r2, [r0, 0x2E]
movs r3, 0x2
adds r0, r3, 0
@ -1473,7 +1473,7 @@ _0813D614:
ands r0, r2
cmp r0, 0
beq _0813D6A8
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x13]
cmp r0, 0x1

View File

@ -295,7 +295,7 @@ sub_8145588: @ 8145588
thumb_func_start sub_81455A8
sub_81455A8: @ 81455A8
push {r4,lr}
ldr r3, =gUnknown_03002F50
ldr r3, =gPcmDmaCounter
movs r0, 0
ldrsb r0, [r3, r0]
cmp r0, 0x1

View File

@ -83,7 +83,7 @@ zero_pokemon_struct: @ 8067A8C
@ void zero_player_party_data()
zero_player_party_data: @ 8067B0C
push {r4,r5,lr}
ldr r4, =gUnknown_020244EC
ldr r4, =gPlayerParty
movs r0, 0xFA
lsls r0, 1
adds r5, r4, r0
@ -102,7 +102,7 @@ _08067B16:
thumb_func_start zero_enemy_party_data
zero_enemy_party_data: @ 8067B2C
push {r4,r5,lr}
ldr r4, =gUnknown_02024744
ldr r4, =gEnemyParty
movs r0, 0xFA
lsls r0, 1
adds r5, r4, r0
@ -207,9 +207,9 @@ create_pokemon: @ 8067BBC
str r0, [sp, 0x14]
b _08067C0C
_08067BF8:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -230,9 +230,9 @@ _08067C0C:
mov r8, r2
ldr r6, =0x0000ffff
_08067C28:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -263,7 +263,7 @@ _08067C64:
str r0, [sp, 0x18]
b _08067C8A
_08067C70:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
ldrb r1, [r2, 0xA]
ldrb r0, [r2, 0xB]
@ -297,11 +297,11 @@ _08067C8A:
movs r1, 0x2
mov r2, sp
bl pokemon_setattr_encrypted
ldr r2, =gUnknown_82E9531
ldr r2, =gGameLanguage
adds r0, r7, 0
movs r1, 0x3
bl pokemon_setattr_encrypted
ldr r5, =gUnknown_03005D90
ldr r5, =gSaveBlock2Ptr
ldr r2, [r5]
adds r0, r7, 0
movs r1, 0x7
@ -354,7 +354,7 @@ _08067C8A:
movs r1, 0x24
add r2, sp, 0x10
bl pokemon_setattr_encrypted
ldr r2, =gUnknown_82E9530
ldr r2, =gGameVersion
adds r0, r7, 0
movs r1, 0x25
bl pokemon_setattr_encrypted
@ -405,7 +405,7 @@ _08067C8A:
b _08067E50
.pool
_08067DC8:
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0x18]
@ -438,7 +438,7 @@ _08067DC8:
movs r1, 0x29
adds r2, r4, 0
bl pokemon_setattr_encrypted
bl GenerateRandomNumber
bl Random
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0x18]
@ -517,9 +517,9 @@ pokemon_make_with_nature: @ 8067E90
lsls r0, 24
lsrs r5, r0, 24
_08067EB0:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -585,9 +585,9 @@ sub_8067EF8: @ 8067EF8
cmp r0, 0x1B
bhi _08067F9E
_08067F38:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -632,9 +632,9 @@ _08067F38:
bne _08067F38
b _08067FCE
_08067F9E:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -686,16 +686,16 @@ sub_8067FF8: @ 8067FF8
lsls r2, 24
lsrs r7, r2, 24
_0806800A:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r5, r4, 16
lsls r0, 16
orrs r5, r0
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -936,7 +936,7 @@ _080681D2:
adds r1, r6, 0
adds r1, 0x20
add r0, sp, 0x10
bl CopyString
bl StringCopy
add r0, sp, 0x10
ldrb r0, [r0]
cmp r0, 0xFC
@ -949,7 +949,7 @@ _080681D2:
mov r1, r9
strb r0, [r1]
add r0, sp, 0x10
bl StripExtendedControlCodes
bl StripExtCtrlCodes
b _08068236
_08068230:
movs r0, 0x2
@ -1081,7 +1081,7 @@ sub_8068338: @ 8068338
adds r6, r1, 0
lsls r2, 24
lsrs r2, 24
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0x00000ca9
adds r0, r1
@ -1169,7 +1169,7 @@ _080683D2:
bl pokemon_setattr
add r0, sp, 0x10
ldr r1, [sp, 0x54]
bl CopyString
bl StringCopy
add r0, sp, 0x10
ldrb r0, [r0]
cmp r0, 0xFC
@ -1182,7 +1182,7 @@ _080683D2:
mov r1, r9
strb r0, [r1]
add r0, sp, 0x10
bl StripExtendedControlCodes
bl StripExtCtrlCodes
b _08068430
_0806842A:
movs r0, 0x2
@ -1454,9 +1454,9 @@ sub_8068634: @ 8068634
mov r8, r4
movs r6, 0
_08068664:
bl GenerateRandomNumber
bl Random
adds r4, r0, 0
bl GenerateRandomNumber
bl Random
lsls r4, 16
lsrs r4, 16
lsls r0, 16
@ -1538,12 +1538,12 @@ sub_80686FC: @ 80686FC
adds r6, r1, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r6]
adds r0, r7, 0
movs r1, 0xC
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r0, 16
cmp r0, 0xAF
@ -1564,7 +1564,7 @@ _08068738:
adds r1, 0xD
adds r0, r7, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r4]
adds r4, 0x2
adds r5, 0x1
@ -1573,58 +1573,58 @@ _08068738:
adds r0, r7, 0
movs r1, 0x38
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0xC]
adds r0, r7, 0
movs r1, 0x15
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0xD]
adds r0, r7, 0
movs r1, 0x1
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [r6, 0x14]
adds r0, r7, 0
movs r1, 0x1A
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0xE]
adds r0, r7, 0
movs r1, 0x1B
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0xF]
adds r0, r7, 0
movs r1, 0x1C
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0x10]
adds r0, r7, 0
movs r1, 0x1D
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0x11]
adds r0, r7, 0
movs r1, 0x1E
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0x12]
adds r0, r7, 0
movs r1, 0x1F
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r6, 0x13]
adds r0, r7, 0
movs r1, 0x20
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r1, r8
strb r0, [r1]
adds r0, r7, 0
movs r1, 0x27
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r4, 0x1F
ands r0, r4
ldrb r2, [r6, 0x18]
@ -1636,7 +1636,7 @@ _08068738:
adds r0, r7, 0
movs r1, 0x28
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r5, 0x1F
ands r0, r5
lsls r0, 5
@ -1648,7 +1648,7 @@ _08068738:
adds r0, r7, 0
movs r1, 0x29
movs r2, 0
bl pokemon_getattr
bl GetMonData
ands r0, r4
lsls r0, 2
ldrb r2, [r6, 0x19]
@ -1660,7 +1660,7 @@ _08068738:
adds r0, r7, 0
movs r1, 0x2A
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0x1F
ands r1, r0
lsls r1, 15
@ -1672,7 +1672,7 @@ _08068738:
adds r0, r7, 0
movs r1, 0x2B
movs r2, 0
bl pokemon_getattr
bl GetMonData
ands r0, r5
lsls r0, 4
ldrh r2, [r6, 0x1A]
@ -1683,7 +1683,7 @@ _08068738:
adds r0, r7, 0
movs r1, 0x2C
movs r2, 0
bl pokemon_getattr
bl GetMonData
ands r0, r4
lsls r0, 1
ldrb r2, [r6, 0x1B]
@ -1695,7 +1695,7 @@ _08068738:
adds r0, r7, 0
movs r1, 0x2E
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 7
ldrb r2, [r6, 0x1B]
movs r1, 0x7F
@ -1705,12 +1705,12 @@ _08068738:
adds r0, r7, 0
movs r1, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [r6, 0x1C]
adds r0, r7, 0
movs r1, 0x2
mov r2, r9
bl pokemon_getattr
bl GetMonData
pop {r3,r4}
mov r8, r3
mov r9, r4
@ -1785,13 +1785,13 @@ _08068914:
.4byte _08068A00
.4byte _08068990
_0806892C:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
cmp r0, 0
beq _080689CE
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r1, =0x00000439
adds r0, r1
ldrb r1, [r0]
@ -1802,13 +1802,13 @@ _0806892C:
b _080689B6
.pool
_08068958:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
cmp r0, 0
beq _080689CE
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r1, =0x00000439
adds r0, r1
ldrb r1, [r0]
@ -1825,14 +1825,14 @@ _08068958:
b _080689CE
.pool
_08068990:
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r2, [r0]
movs r3, 0x2
adds r0, r2, 0
ands r0, r3
cmp r0, 0
beq _080689E4
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r1, =0x00000439
adds r0, r1
ldrb r1, [r0]
@ -1861,7 +1861,7 @@ _080689CE:
b _08068A02
.pool
_080689E4:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldr r1, =0x00000439
adds r0, r1
ldrb r1, [r0]
@ -1889,7 +1889,7 @@ get_pokemon_data_3: @ 8068A10
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x20
ands r0, r1
@ -1898,7 +1898,7 @@ get_pokemon_data_3: @ 8068A10
adds r0, r5, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0xCD
lsls r1, 1
cmp r0, r1
@ -1912,13 +1912,13 @@ _08068A3C:
adds r1, 0x27
adds r0, r5, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
adds r1, r6, 0
adds r1, 0x1A
adds r0, r5, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
ldr r2, =gUnknown_08329D48
lsls r1, r6, 1
adds r1, r2
@ -1967,12 +1967,12 @@ _08068AAA:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0xCD
lsls r1, 1
cmp r0, r1
@ -1980,7 +1980,7 @@ _08068AAA:
adds r0, r4, 0
movs r1, 0x3B
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp]
adds r0, r4, 0
movs r1, 0x3B
@ -1989,7 +1989,7 @@ _08068AAA:
adds r0, r4, 0
movs r1, 0x3C
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp]
adds r0, r4, 0
movs r1, 0x3C
@ -1998,7 +1998,7 @@ _08068AAA:
adds r0, r4, 0
movs r1, 0x3D
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp]
adds r0, r4, 0
movs r1, 0x3D
@ -2007,7 +2007,7 @@ _08068AAA:
adds r0, r4, 0
movs r1, 0x3E
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp]
adds r0, r4, 0
movs r1, 0x3E
@ -2016,7 +2016,7 @@ _08068AAA:
adds r0, r4, 0
movs r1, 0x3F
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp]
adds r0, r4, 0
movs r1, 0x3F
@ -2036,7 +2036,7 @@ _08068B34:
thumb_func_start sub_8068B48
sub_8068B48: @ 8068B48
push {lr}
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x80
lsls r1, 18
@ -2084,7 +2084,7 @@ _08068B78:
thumb_func_start sub_8068BB0
sub_8068BB0: @ 8068BB0
push {lr}
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x80
lsls r1, 18
@ -2140,7 +2140,7 @@ DoScriptedWildBattle: @ 8068C18
ldr r0, =gUnknown_020375E4
ldrh r6, [r0]
bl zero_enemy_party_data
ldr r7, =gUnknown_02024744
ldr r7, =gEnemyParty
lsls r4, 24
lsrs r4, 24
movs r0, 0
@ -2261,77 +2261,77 @@ pokemon_calc_effective_stats: @ 8068D0C
adds r5, r0, 0
movs r1, 0x3A
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r8, r0
adds r0, r5, 0
movs r1, 0x39
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x1C]
adds r0, r5, 0
movs r1, 0x27
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r6, r0, 0
adds r0, r5, 0
movs r1, 0x1A
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
adds r0, r5, 0
movs r1, 0x28
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r10, r0
adds r0, r5, 0
movs r1, 0x1B
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r9, r0
adds r0, r5, 0
movs r1, 0x29
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x20]
adds r0, r5, 0
movs r1, 0x1C
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x24]
adds r0, r5, 0
movs r1, 0x2A
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x28]
adds r0, r5, 0
movs r1, 0x1D
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x2C]
adds r0, r5, 0
movs r1, 0x2B
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x30]
adds r0, r5, 0
movs r1, 0x1E
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x34]
adds r0, r5, 0
movs r1, 0x2C
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x38]
adds r0, r5, 0
movs r1, 0x1F
movs r2, 0
bl pokemon_getattr
bl GetMonData
str r0, [sp, 0x3C]
adds r0, r5, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r7, r0, 16
adds r0, r5, 0
@ -2644,14 +2644,14 @@ level_by_exp: @ 8069054
adds r5, r0, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
adds r0, r5, 0
movs r1, 0x19
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r3, r0, 0
movs r2, 0x1
ldr r6, =gExperienceTables
@ -3020,14 +3020,14 @@ sub_8069318: @ 8069318
mov r0, r8
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 16
lsrs r0, 16
mov r9, r0
mov r0, r8
movs r1, 0x38
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 24
lsrs r0, 24
mov r10, r0
@ -3154,13 +3154,13 @@ _08069440:
adds r1, 0xE
adds r0, r6, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r5]
adds r1, r4, 0
adds r1, 0x12
adds r0, r6, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r7, r4
strb r0, [r1]
adds r5, 0x2
@ -3170,7 +3170,7 @@ _08069440:
adds r0, r6, 0
movs r1, 0x15
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r1, r9
strb r0, [r1]
ldrb r0, [r1]

View File

@ -28,7 +28,7 @@ _08069E0A:
ldr r0, =gUnknown_02024064
ldrb r3, [r0]
ldr r4, =gUnknown_02024210
ldr r2, =gUnknown_0832A328
ldr r2, =gBitTable
_08069E14:
cmp r5, r3
beq _08069E28
@ -63,7 +63,7 @@ _08069E42:
bne _08069E74
ldr r0, =gUnknown_02024210
ldrb r1, [r0]
ldr r2, =gUnknown_0832A328
ldr r2, =gBitTable
lsls r0, r5, 2
adds r0, r2
ldr r0, [r0]
@ -86,7 +86,7 @@ _08069E8A:
lsrs r0, 24
bl battle_side_get_owner
adds r4, r0, 0
ldr r0, =gUnknown_0202420C
ldr r0, =gEnemyMonIndex
ldrb r0, [r0]
bl battle_side_get_owner
lsls r4, 24
@ -95,7 +95,7 @@ _08069E8A:
bne _08069EBC
ldr r0, =gUnknown_02024210
ldrb r1, [r0]
ldr r2, =gUnknown_0832A328
ldr r2, =gBitTable
lsls r0, r5, 2
adds r0, r2
ldr r0, [r0]
@ -124,7 +124,7 @@ sub_8069ED8: @ 8069ED8
lsrs r5, r0, 16
lsls r1, 24
lsrs r2, r1, 24
ldr r4, =gUnknown_02022FEC
ldr r4, =gBattleTypeFlags
ldr r0, [r4]
ldr r1, =0x023f0902
ands r0, r1
@ -176,7 +176,7 @@ sub_8069F34: @ 8069F34
ands r4, r0
eors r4, r1
adds r5, r4, 0
ldr r0, =gUnknown_02022FEC
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
ands r0, r6
cmp r0, 0
@ -191,7 +191,7 @@ _08069F5C:
lsrs r0, 24
cmp r0, 0x1
bls _08069F80
bl GenerateRandomNumber
bl Random
adds r1, r6, 0
ands r1, r0
cmp r1, 0
@ -205,7 +205,7 @@ _08069F7C:
_08069F80:
ldr r0, =gUnknown_02024210
ldrb r1, [r0]
ldr r2, =gUnknown_0832A328
ldr r2, =gBitTable
lsls r0, r4, 2
adds r0, r2
ldr r0, [r0]
@ -982,9 +982,9 @@ _0806A510:
bx r1
thumb_func_end pokemon_data_permutator
thumb_func_start pokemon_getattr
@ int pokemon_getattr(pokemon *mon, enum pokemon_data_request req, void *data)
pokemon_getattr: @ 806A518
thumb_func_start GetMonData
@ int GetMonData(pokemon *mon, enum pokemon_data_request req, void *data)
GetMonData: @ 806A518
push {r4,lr}
adds r4, r0, 0
adds r3, r1, 0
@ -1137,7 +1137,7 @@ _0806A66E:
pop {r4}
pop {r1}
bx r1
thumb_func_end pokemon_getattr
thumb_func_end GetMonData
thumb_func_start pokemon_getattr_encrypted
@ int pokemon_getattr_encrypted(pokemon *mon, enum pokemon_data_request req, void *data)
@ -1340,9 +1340,9 @@ _0806A89C:
beq _0806A8BC
ldr r1, =gUnknown_085E8264
adds r0, r6, 0
bl CopyString
bl StringCopy
adds r0, r6, 0
bl GetStringLength
bl StringLength
lsls r0, 16
lsrs r4, r0, 16
b _0806AC8C
@ -1748,7 +1748,7 @@ _0806AB34:
ldrh r5, [r2]
adds r7, r1, 0
adds r2, r6, 0
ldr r1, =gUnknown_0832A328
ldr r1, =gBitTable
_0806AB3E:
ldrh r3, [r2]
cmp r5, r3
@ -2879,7 +2879,7 @@ memcpy_pokemon: @ 806B408
pokemon_catch: @ 806B414
push {r4-r6,lr}
adds r6, r0, 0
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r2, [r4]
movs r1, 0x7
bl pokemon_setattr
@ -2904,12 +2904,12 @@ _0806B446:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0806B444
adds r0, r4, 0
@ -3032,11 +3032,11 @@ _0806B554:
adds r1, r0, 0
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0806B54C
_0806B572:
@ -3069,11 +3069,11 @@ _0806B598:
adds r1, r0, 0
movs r0, 0x64
muls r0, r1
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r0, r1
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0806B590
_0806B5B6:
@ -3101,12 +3101,12 @@ _0806B5DC:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0x41
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0xCE
lsls r1, 1
cmp r0, r1
@ -3114,13 +3114,13 @@ _0806B5DC:
adds r0, r4, 0
movs r1, 0x39
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _0806B616
adds r0, r4, 0
movs r1, 0x41
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _0806B616
adds r6, 0x1
@ -3152,12 +3152,12 @@ _0806B63E:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0x41
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
movs r0, 0xCE
lsls r0, 1
@ -3168,7 +3168,7 @@ _0806B63E:
adds r0, r4, 0
movs r1, 0x39
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
beq _0806B670
adds r6, 0x1
@ -3233,14 +3233,14 @@ GetMonAbility: @ 806B6D8
adds r5, r0, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
adds r0, r5, 0
movs r1, 0x2E
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -3288,7 +3288,7 @@ _0806B730:
movs r0, 0x64
mov r6, r9
muls r6, r0
ldr r4, =gUnknown_02024744
ldr r4, =gEnemyParty
mov r8, r4
adds r5, r6, r4
ldrh r1, [r1]
@ -3342,7 +3342,7 @@ _0806B7A0:
movs r3, 0x64
mov r0, r9
muls r0, r3
ldr r1, =gUnknown_02024744
ldr r1, =gEnemyParty
adds r7, r0, r1
mov r4, r10
lsls r0, r4, 1
@ -3459,11 +3459,11 @@ sub_806B8B0: @ 806B8B0
_0806B8B4:
movs r0, 0x64
muls r0, r4
ldr r1, =gUnknown_020244EC
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
bl GetMonData
cmp r0, 0
bne _0806B8D0
movs r0, 0
@ -3604,7 +3604,7 @@ sub_806B9A8: @ 806B9A8
lsrs r4, 24
movs r1, 0x15
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 24
lsrs r0, 24
mov r1, sp
@ -3658,13 +3658,13 @@ battle_data_fill: @ 806B9FC
movs r0, 0x64
mov r5, r9
muls r5, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r5, r0
adds r0, r5, 0
movs r1, 0xB
movs r2, 0
bl pokemon_getattr
ldr r1, =gUnknown_02024084
bl GetMonData
ldr r1, =gBattleMons
mov r8, r1
movs r1, 0x58
ldr r2, [sp, 0x14]
@ -3676,7 +3676,7 @@ battle_data_fill: @ 806B9FC
adds r0, r5, 0
movs r1, 0xC
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r6, 0x2E]
movs r6, 0
mov r0, r8
@ -3687,7 +3687,7 @@ _0806BA4E:
adds r1, 0xD
adds r0, r5, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0xC
add r1, r8
mov r10, r1
@ -3697,7 +3697,7 @@ _0806BA4E:
adds r1, 0x11
adds r0, r5, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
strb r0, [r7]
adds r7, 0x1
adds r4, 0x2
@ -3707,12 +3707,12 @@ _0806BA4E:
movs r0, 0x64
mov r4, r9
muls r4, r0
ldr r0, =gUnknown_020244EC
ldr r0, =gPlayerParty
adds r4, r0
adds r0, r4, 0
movs r1, 0x15
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r2, 0xC
negs r2, r2
add r2, r10
@ -3728,14 +3728,14 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x20
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r7, 0
adds r1, 0x2B
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x19
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r1, r10
adds r1, 0x38
adds r1, r5, r1
@ -3743,7 +3743,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x27
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r6, 0x1F
ands r0, r6
ldrb r2, [r7, 0x14]
@ -3755,7 +3755,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x28
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0x1F
mov r8, r1
mov r2, r8
@ -3769,7 +3769,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x29
movs r2, 0
bl pokemon_getattr
bl GetMonData
ands r0, r6
lsls r0, 2
ldrb r2, [r7, 0x15]
@ -3781,7 +3781,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x2A
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0x1F
ands r1, r0
lsls r1, 15
@ -3793,7 +3793,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x2B
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r3, r8
ands r0, r3
lsls r0, 4
@ -3805,7 +3805,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x2C
movs r2, 0
bl pokemon_getattr
bl GetMonData
ands r0, r6
lsls r0, 1
ldrb r2, [r7, 0x17]
@ -3817,7 +3817,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r1, r10
adds r1, 0x3C
adds r1, r5, r1
@ -3825,7 +3825,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x37
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r1, r10
adds r1, 0x40
adds r1, r5, r1
@ -3833,49 +3833,49 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x38
movs r2, 0
bl pokemon_getattr
bl GetMonData
adds r1, r7, 0
adds r1, 0x2A
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x39
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0x28]
adds r0, r4, 0
movs r1, 0x3A
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0x2C]
adds r0, r4, 0
movs r1, 0x3B
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0x2]
adds r0, r4, 0
movs r1, 0x3C
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0x4]
adds r0, r4, 0
movs r1, 0x3D
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0x6]
adds r0, r4, 0
movs r1, 0x3E
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0x8]
adds r0, r4, 0
movs r1, 0x3F
movs r2, 0
bl pokemon_getattr
bl GetMonData
strh r0, [r7, 0xA]
adds r0, r4, 0
movs r1, 0x2D
movs r2, 0
bl pokemon_getattr
bl GetMonData
movs r1, 0x1
ands r0, r1
lsls r0, 6
@ -3888,7 +3888,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x2E
movs r2, 0
bl pokemon_getattr
bl GetMonData
lsls r0, 7
ldrb r2, [r7, 0x17]
movs r1, 0x7F
@ -3898,7 +3898,7 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x1
movs r2, 0
bl pokemon_getattr
bl GetMonData
mov r1, r10
adds r1, 0x48
adds r1, r5, r1
@ -3932,18 +3932,18 @@ _0806BA4E:
adds r0, r4, 0
movs r1, 0x2
mov r2, sp
bl pokemon_getattr
bl GetMonData
mov r0, r10
adds r0, 0x24
adds r0, r5, r0
mov r1, sp
bl CopyString_Limit10
bl StringCopy10
mov r2, r10
adds r2, 0x30
adds r2, r5, r2
adds r0, r4, 0
movs r1, 0x7
bl pokemon_getattr
bl GetMonData
ldr r0, [sp, 0x14]
bl battle_side_get_owner
ldr r1, =gUnknown_0202449C

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@ sub_80FB5E8: @ 80FB5E8
ldr r0, =0x000040b4
bl GetVarPointer
adds r7, r0, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
adds r6, r3, 0x4
movs r0, 0
@ -92,7 +92,7 @@ _080FB62E:
b _080FB6E2
.pool
_080FB648:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
adds r0, r2, 0
ands r0, r1
@ -262,7 +262,7 @@ sub_80FB7A4: @ 80FB7A4
movs r0, 0x80
lsls r0, 7
bl FlagSet
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
movs r1, 0x4
ldrsb r1, [r0, r1]

View File

@ -19,7 +19,7 @@ sub_80E6BE8: @ 80E6BE8
sub_80E6BF8: @ 80E6BF8
push {r4,lr}
ldr r2, =gUnknown_03001134
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
ldr r3, =0x00001a9c
adds r0, r1, r3
@ -44,7 +44,7 @@ sub_80E6BF8: @ 80E6BF8
ldr r0, =gUnknown_02039F9C
str r0, [r2]
ldr r2, =gUnknown_0300114C
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r4, =0x0000064c
adds r3, r0, r4
@ -621,7 +621,7 @@ _080E726C:
bne _080E730A
movs r0, 0x4
strh r0, [r5]
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
bne _080E7296
@ -664,7 +664,7 @@ _080E72C0:
ldr r0, [r0]
bl Free
bl sub_808729C
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080E72F8
@ -855,7 +855,7 @@ _080E7464:
bne _080E746E
b _080E7566
_080E746E:
ldr r4, =gUnknown_02021CC4
ldr r4, =gStringVar1
bl sub_80E7810
adds r1, r0, 0
lsls r1, 24
@ -863,7 +863,7 @@ _080E746E:
adds r0, r4, 0
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
movs r0, 0x5
b _080E7564
.pool
@ -1528,7 +1528,7 @@ _080E79CE:
beq _080E79F2
adds r0, r4, 0
movs r1, 0x1
bl StopMusicWhileStringIsPrinted
bl ConvertInternationalString
_080E79F2:
adds r6, 0x1
cmp r6, 0x3
@ -1731,7 +1731,7 @@ sub_80E7B60: @ 80E7B60
lsls r2, 24
lsrs r2, 24
mov r9, r2
bl GenerateRandomNumber2
bl Random2
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0x38]
@ -1828,7 +1828,7 @@ _080E7C24:
adds r4, r5, 0
adds r4, 0x24
adds r0, r4, 0
bl GetStringLength
bl StringLength
lsls r0, 16
lsrs r0, 16
cmp r0, 0x5
@ -1838,7 +1838,7 @@ _080E7C24:
.pool
_080E7C54:
adds r0, r4, 0
bl StripExtendedControlCodes
bl StripExtCtrlCodes
mov r4, r9
_080E7C5C:
ldrh r1, [r5, 0x2C]
@ -1847,7 +1847,7 @@ _080E7C5C:
bne _080E7C74
adds r0, r5, 0
adds r0, 0x2C
bl StripExtendedControlCodes
bl StripExtCtrlCodes
movs r1, 0x1
b _080E7C76
.pool
@ -2094,7 +2094,7 @@ _080E7E30:
cmp r1, 0
beq _080E7E48
_080E7E34:
bl GenerateRandomNumber2
bl Random2
mov r1, r9
adds r2, r1, r5
lsls r0, 16
@ -2215,7 +2215,7 @@ _080E7F1C:
ldr r1, [sp, 0x2C]
ldr r2, [sp, 0x44]
adds r7, r1, r2
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
movs r3, 0xC2
lsls r3, 6
@ -2279,9 +2279,9 @@ sub_80E7F68: @ 80E7F68
ldr r0, =0x00004001
ldrh r1, [r4]
bl VarSet
ldr r0, =gUnknown_02021CC4
ldr r0, =gStringVar1
ldr r1, =gUnknown_020229F0
bl CopyString
bl StringCopy
ldrh r1, [r4]
ldr r0, =0x00000113
cmp r1, r0
@ -2393,7 +2393,7 @@ _080E80C0:
lsls r0, 24
cmp r0, 0
bne _080E810A
ldr r0, =gUnknown_030030FC
ldr r0, =gLinkVSyncDisabled
ldrb r0, [r0]
cmp r0, 0
beq _080E80E8
@ -2458,7 +2458,7 @@ sub_80E8110: @ 80E8110
str r2, [sp, 0x4]
mov r8, r2
movs r7, 0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
mov r9, r0
_080E8150:
mov r1, r9
@ -2538,12 +2538,12 @@ _080E81E0:
add r1, r10
b _080E820E
_080E81EC:
bl GenerateRandomNumber2
bl Random2
lsls r0, 16
ldr r1, =0x33330000
cmp r0, r1
bls _080E8224
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
adds r0, 0xB2
ldrb r0, [r0]
@ -2562,7 +2562,7 @@ _080E820E:
b _080E824C
.pool
_080E8224:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
adds r0, 0xB2
ldrb r0, [r0]
@ -2602,7 +2602,7 @@ sub_80E8260: @ 80E8260
sub sp, 0xC
mov r8, r0
movs r6, 0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
mov r10, r0
_080E8274:
movs r7, 0
@ -2625,7 +2625,7 @@ _080E8286:
mov r0, r10
ldr r1, [r0]
adds r0, r6, 0
bl CopyString
bl StringCopy
adds r4, 0x10
adds r6, 0x10
adds r5, 0x10
@ -2635,7 +2635,7 @@ _080E8286:
mov r6, r9
cmp r6, 0x8
ble _080E8274
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
mov r10, r1
ldr r2, =0x00000ee1
str r2, [sp, 0x4]
@ -2672,13 +2672,13 @@ _080E82DA:
mov r0, r10
ldr r1, [r0]
mov r0, r9
bl CopyString
bl StringCopy
mov r2, r10
ldr r1, [r2]
ldr r0, [sp, 0x4]
adds r1, r0
adds r0, r4, 0
bl CopyString
bl StringCopy
ldr r1, [sp, 0x4]
adds r1, 0x8
str r1, [sp, 0x4]
@ -2694,7 +2694,7 @@ _080E82DA:
cmp r7, 0
bge _080E82DA
movs r6, 0
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r3, [r0]
mov r4, r8
movs r1, 0xC4
@ -2867,7 +2867,7 @@ _080E8496:
ldrb r0, [r6]
cmp r0, 0xFF
beq _080E84B4
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r1, 0xDC
adds r0, r4, 0
@ -2891,7 +2891,7 @@ _080E84B4:
b _080E8566
.pool
_080E84CC:
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
ldr r0, [r4]
adds r1, r0, 0
adds r1, 0xB2
@ -2925,7 +2925,7 @@ _080E8508:
_080E850C:
movs r0, 0x1
eors r0, r5
ldr r7, =gUnknown_03005D90
ldr r7, =gSaveBlock2Ptr
ldr r4, [r7]
adds r1, r4, 0
adds r1, 0xB2
@ -3035,7 +3035,7 @@ _080E85BE:
_080E85DC:
movs r6, 0
mov r8, r6
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
ldr r2, [sp, 0x10]
lsls r0, r2, 5
@ -3190,7 +3190,7 @@ _080E8702:
ldr r5, [sp, 0x8]
adds r5, 0x1
str r5, [sp, 0x2C]
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
movs r0, 0x54
ldr r6, [sp, 0x8]
@ -3486,7 +3486,7 @@ sub_80E8924: @ 80E8924
push {r5-r7}
mov r9, r0
movs r0, 0
ldr r1, =gUnknown_03005D90
ldr r1, =gSaveBlock2Ptr
mov r10, r1
_080E8936:
lsls r1, r0, 1
@ -3518,7 +3518,7 @@ _080E8950:
cmp r0, 0x8
ble _080E8936
movs r5, 0
ldr r4, =gUnknown_03005D90
ldr r4, =gSaveBlock2Ptr
_080E8972:
movs r0, 0x54
adds r1, r5, 0
@ -3588,7 +3588,7 @@ sub_80E89F8: @ 80E89F8
push {r4-r6,lr}
adds r6, r0, 0
ldr r5, =gUnknown_02039F9C
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r1, [r4]
movs r0, 0xC2
lsls r0, 6
@ -3655,7 +3655,7 @@ _080E8A90:
ldrb r1, [r7]
lsrs r1, 4
adds r0, r4, 0
bl StopMusicWhileStringIsPrinted
bl ConvertInternationalString
_080E8A9A:
adds r4, 0x38
movs r0, 0x38
@ -3696,7 +3696,7 @@ _080E8AC6:
beq _080E8ADC
adds r0, r1, 0
adds r0, 0x20
bl StripExtendedControlCodes
bl StripExtCtrlCodes
_080E8ADC:
adds r4, 0x1
cmp r4, 0x3

View File

@ -481,7 +481,7 @@ sub_81230C4: @ 81230C4
ldr r0, [r2]
adds r0, 0x7C
strb r4, [r0]
ldr r3, =gUnknown_030022C0
ldr r3, =gMain
ldrh r1, [r3, 0x2C]
movs r0, 0x40
ands r0, r1
@ -692,7 +692,7 @@ sub_8123254: @ 8123254
mov r5, r12
adds r5, 0x68
strh r4, [r5]
ldr r2, =gUnknown_030022C0
ldr r2, =gMain
ldrh r1, [r2, 0x2C]
movs r0, 0x40
ands r0, r1
@ -1522,7 +1522,7 @@ sub_81238AC: @ 81238AC
mov r5, r8
push {r5-r7}
sub sp, 0xC
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r2, [r0]
movs r1, 0x4
ldrsb r1, [r2, r1]
@ -1581,7 +1581,7 @@ _08123928:
ldrh r2, [r0]
ldrh r0, [r0, 0x4]
mov r9, r0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
ldrh r6, [r0]
ldrh r3, [r0, 0x2]
@ -1605,7 +1605,7 @@ _0812396C:
ands r0, r1
cmp r0, 0
beq _081239C8
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r1, [r4]
adds r0, r1, 0
adds r0, 0x24
@ -1653,7 +1653,7 @@ _081239C8:
b _08123ABE
.pool
_081239E4:
ldr r4, =gUnknown_03005D8C
ldr r4, =gSaveBlock1Ptr
ldr r1, [r4]
movs r0, 0x14
ldrsb r0, [r1, r0]
@ -1690,7 +1690,7 @@ _08123A28:
strh r1, [r0]
cmp r1, 0x57
beq _08123A64
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
adds r7, r0, 0
adds r7, 0x24
@ -1707,7 +1707,7 @@ _08123A28:
b _08123A8A
.pool
_08123A64:
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r0, [r0]
adds r7, r0, 0
adds r7, 0x14
@ -1831,7 +1831,7 @@ _08123B56:
b _08123BC6
_08123B5E:
movs r6, 0
ldr r0, =gUnknown_03005D8C
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r2, 0
ldrsh r0, [r1, r2]
@ -2822,7 +2822,7 @@ sub_8124288: @ 8124288
b _081243A4
.pool
_08124304:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0x1
@ -3161,7 +3161,7 @@ _08124584:
adds r1, r0
ldr r1, [r1]
adds r0, r5, 0
bl CopyString
bl StringCopy
adds r1, r0, 0
b _081245B2
.pool
@ -3173,7 +3173,7 @@ _081245A6:
adds r0, r5, 0
movs r1, 0
adds r2, r4, 0
bl RepeatChar
bl StringFill
b _081245D6
_081245B2:
cmp r4, 0
@ -3213,12 +3213,12 @@ sub_81245DC: @ 81245DC
cmp r1, 0x57
bne _08124604
ldr r1, =gUnknown_085EC9D2
bl CopyString
bl StringCopy
b _0812460A
.pool
_081245F8:
ldr r1, =gUnknown_085EC9D8
bl CopyString
bl StringCopy
b _0812460A
.pool
_08124604:
@ -3240,7 +3240,7 @@ sub_8124610: @ 8124610
b _08124626
_08124620:
ldr r1, =gUnknown_085EC9E4
bl CopyString
bl StringCopy
_08124626:
pop {r1}
bx r1
@ -3308,7 +3308,7 @@ _0812468C:
sub_8124690: @ 8124690
push {r4,lr}
sub sp, 0xC
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
@ -3423,7 +3423,7 @@ _0812479C:
adds r0, r1
movs r1, 0
movs r2, 0x10
bl RepeatChar
bl StringFill
ldr r1, =gUnknown_03001180
movs r0, 0x1
str r0, [r1]
@ -3498,7 +3498,7 @@ _0812486C:
ldr r0, =sub_81248D4
bl SetMainCallback2
_0812489C:
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
@ -3589,7 +3589,7 @@ _08124926:
lsls r0, 2
adds r0, r1
ldr r0, [r0]
bl GetStringLength
bl StringLength
movs r7, 0x1
movs r0, 0
movs r1, 0
@ -4207,7 +4207,7 @@ _08124E7C:
bl sub_8084CCC
b _08124EFA
_08124E84:
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldrb r0, [r0, 0x8]
movs r1, 0xD

View File

@ -404,53 +404,53 @@ sub_809EBC4: @ 809EBC4
lsls r2, 24
lsrs r2, 24
mov r8, r2
ldr r7, =gUnknown_02021FC4
ldr r4, =gUnknown_02021CC4
ldr r7, =gStringVar4
ldr r4, =gStringVar1
adds r0, r4, 0
movs r2, 0x1
movs r3, 0x4
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r7, 0
adds r1, r4, 0
bl CopyString
bl StringCopy
adds r7, r0, 0
ldr r1, =gUnknown_085EE68A
bl CopyString
bl StringCopy
adds r7, r0, 0
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0x1
movs r3, 0x3
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r7, 0
adds r1, r4, 0
bl CopyString
bl StringCopy
adds r7, r0, 0
ldr r5, =gUnknown_085EE68E
adds r1, r5, 0
bl CopyString
bl StringCopy
adds r7, r0, 0
adds r0, r4, 0
adds r1, r6, 0
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r7, 0
adds r1, r4, 0
bl CopyString
bl StringCopy
adds r7, r0, 0
adds r1, r5, 0
bl CopyString
bl StringCopy
adds r7, r0, 0
adds r0, r4, 0
mov r1, r8
movs r2, 0x2
movs r3, 0x2
bl ConvertIntToDecimalString
bl ConvertIntToDecimalStringN
adds r0, r7, 0
adds r1, r4, 0
bl CopyString
ldr r2, =gUnknown_02021FC4
bl StringCopy
ldr r2, =gStringVar4
mov r0, r9
str r0, [sp]
movs r0, 0xFF
@ -657,7 +657,7 @@ sub_809EDE8: @ 809EDE8
lsls r0, 2
ldr r1, =gUnknown_0851041C
adds r2, r0, r1
ldr r1, =gUnknown_030022C0
ldr r1, =gMain
ldrh r3, [r1, 0x2E]
movs r0, 0x2
ands r0, r3
@ -1042,7 +1042,7 @@ _0809F11C:
movs r1, 0x1
movs r3, 0
bl Print
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r1, [r0]
adds r0, r1, 0
adds r0, 0xA0
@ -1073,7 +1073,7 @@ _0809F11C:
adds r0, 0x1
strh r0, [r6]
_0809F1B2:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x2
ands r0, r1
@ -1081,7 +1081,7 @@ _0809F1B2:
beq _0809F1E4
adds r0, r7, 0
bl DestroyTask
bl Reset
bl DoSoftReset
b _0809F1F8
.pool
_0809F1E4:
@ -1196,7 +1196,7 @@ _0809F2CA:
ldr r0, =gUnknown_085ECA38
bl sub_809F0C0
ldr r2, =gUnknown_03005CF8
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
adds r0, 0xA0
ldr r1, [r0, 0x4]
@ -1250,7 +1250,7 @@ _0809F340:
movs r3, 0x4
ldrsb r3, [r4, r3]
bl GameFreakRTC_CalcRTCToLocalDelta
ldr r0, =gUnknown_03005D90
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
adds r2, 0xA0
ldr r0, [r4]
@ -1289,7 +1289,7 @@ _0809F3C4:
movs r0, 0x5
strh r0, [r5]
_0809F3C8:
ldr r0, =gUnknown_030022C0
ldr r0, =gMain
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
@ -1315,7 +1315,7 @@ _0809F3EA:
adds r0, r4, 0
bl DestroyTask
bl FreeAllWindowBuffers
bl Reset
bl DoSoftReset
_0809F404:
add sp, 0x4
pop {r4,r5}

View File

@ -1,65 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start GenerateRandomNumber
@ u16 GenerateRandomNumber()
GenerateRandomNumber: @ 806F5CC
ldr r2, =gUnknown_03005D80
ldr r1, [r2]
ldr r0, =0x41c64e6d
muls r0, r1
ldr r1, =0x00006073
adds r0, r1
str r0, [r2]
ldr r2, =gUnknown_020249C0
ldr r1, [r2]
adds r1, 0x1
str r1, [r2]
lsrs r0, 16
bx lr
.pool
thumb_func_end GenerateRandomNumber
thumb_func_start SeedRng
@ void SeedRng(u16 seed)
SeedRng: @ 806F5F8
lsls r0, 16
lsrs r0, 16
ldr r1, =gUnknown_03005D80
str r0, [r1]
ldr r1, =gUnknown_020249BC
movs r0, 0
strb r0, [r1]
bx lr
.pool
thumb_func_end SeedRng
thumb_func_start SeedRng2
SeedRng2: @ 806F610
lsls r0, 16
lsrs r0, 16
ldr r1, =gUnknown_03005D84
str r0, [r1]
bx lr
.pool
thumb_func_end SeedRng2
thumb_func_start GenerateRandomNumber2
GenerateRandomNumber2: @ 806F620
ldr r2, =gUnknown_03005D84
ldr r1, [r2]
ldr r0, =0x41c64e6d
muls r0, r1
ldr r1, =0x00006073
adds r0, r1
str r0, [r2]
lsrs r0, 16
bx lr
.pool
thumb_func_end GenerateRandomNumber2
.align 2, 0 @ Don't pad with nop.

Some files were not shown because too many files have changed in this diff Show More