Merge branch 'master' into link

This commit is contained in:
PikalaxALT 2018-02-03 09:42:19 -05:00
commit d52f52fa73
133 changed files with 14287 additions and 26107 deletions

View File

@ -30,8 +30,11 @@ LDFLAGS = -Map ../../$(MAP)
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
LIBGCC := tools/agbcc/lib/libgcc.a
LIBC := tools/agbcc/lib/libc.a
ifeq ($(OS),Windows_NT)
LIB := ../../tools/agbcc/lib/libgcc.a ../../tools/agbcc/lib/libc.a
else
LIB := -L ../../tools/agbcc/lib -lgcc -lc
endif
SHA1 := sha1sum -c
@ -163,7 +166,7 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) ../../$(LIBGCC) ../../$(LIBC)
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
$(ROM): $(ELF)
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@

View File

@ -12802,7 +12802,7 @@ _08104EDC:
lsls r0, 16
cmp r2, r0
bgt _08104F1A
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r4, r0
@ -12839,7 +12839,7 @@ _08104F1A:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldr r0, =sub_8104F54
str r0, [r5]
add sp, 0xC
@ -12919,7 +12919,7 @@ _08104FCC:
ldrsh r0, [r3, r1]
cmp r0, 0
blt _08104FF0
ldr r2, =gUnknown_02038C28
ldr r2, =gScanlineEffectRegBuffers
lsls r0, 1
adds r0, r2
ldrh r1, [r3, 0x14]
@ -12943,7 +12943,7 @@ _08104FF0:
ldrsh r1, [r3, r2]
cmp r0, r1
blt _0810500E
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
adds r0, r4, 0
@ -18518,7 +18518,7 @@ _08107D8C:
movs r3, 0
movs r2, 0x10
ldrsh r0, [r4, r2]
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
mov r12, r1
cmp r3, r0
bge _08107DCA
@ -18555,7 +18555,7 @@ _08107DCA:
ldrsh r0, [r4, r3]
cmp r1, r0
bge _08107E04
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -18584,7 +18584,7 @@ _08107E04:
asrs r0, r2, 16
cmp r0, 0x9F
bgt _08107E3A
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -18652,7 +18652,7 @@ _08107E7A:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldrh r0, [r4, 0x8]
adds r0, 0x1
strh r0, [r4, 0x8]
@ -18689,8 +18689,8 @@ _08107ED8:
ldrsh r0, [r4, r1]
cmp r3, r0
bge _08107F0C
ldr r6, =gUnknown_02038C28
ldr r5, =gUnknown_02039B28
ldr r6, =gScanlineEffectRegBuffers
ldr r5, =gScanlineEffect
_08107EE6:
lsls r1, r3, 16
asrs r1, 16
@ -18719,8 +18719,8 @@ _08107F0C:
ldrsh r0, [r4, r3]
cmp r1, r0
bge _08107F40
ldr r6, =gUnknown_02038C28
ldr r5, =gUnknown_02039B28
ldr r6, =gScanlineEffectRegBuffers
ldr r5, =gScanlineEffect
_08107F1E:
asrs r3, r2, 16
lsls r2, r3, 1
@ -18745,8 +18745,8 @@ _08107F40:
asrs r0, r1, 16
cmp r0, 0x9F
bgt _08108022
ldr r6, =gUnknown_02038C28
ldr r5, =gUnknown_02039B28
ldr r6, =gScanlineEffectRegBuffers
ldr r5, =gScanlineEffect
_08107F4E:
asrs r3, r1, 16
lsls r2, r3, 1
@ -18771,8 +18771,8 @@ _08107F78:
ldrsh r0, [r4, r1]
cmp r3, r0
bge _08107FAC
ldr r6, =gUnknown_02038C28
ldr r5, =gUnknown_02039B28
ldr r6, =gScanlineEffectRegBuffers
ldr r5, =gScanlineEffect
_08107F86:
lsls r1, r3, 16
asrs r1, 16
@ -18801,8 +18801,8 @@ _08107FAC:
ldrsh r0, [r4, r3]
cmp r1, r0
bge _08107FE0
ldr r6, =gUnknown_02038C28
ldr r5, =gUnknown_02039B28
ldr r6, =gScanlineEffectRegBuffers
ldr r5, =gScanlineEffect
_08107FBE:
asrs r3, r2, 16
lsls r2, r3, 1
@ -18827,8 +18827,8 @@ _08107FE0:
asrs r0, r1, 16
cmp r0, 0x9F
bgt _0810800C
ldr r6, =gUnknown_02038C28
ldr r5, =gUnknown_02039B28
ldr r6, =gScanlineEffectRegBuffers
ldr r5, =gScanlineEffect
_08107FEE:
asrs r3, r1, 16
lsls r2, r3, 1
@ -34618,7 +34618,7 @@ _0810FEC0:
adds r0, 0x40
cmp r1, r0
bgt _0810FEFA
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -34651,7 +34651,7 @@ _0810FEFA:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldr r0, =sub_810FF34
str r0, [r4]
add sp, 0xC
@ -34700,7 +34700,7 @@ _0810FF66:
ldr r0, =gSineTable
mov r9, r0
movs r7, 0x3
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
mov r12, r1
movs r2, 0xF0
lsls r2, 3
@ -34775,7 +34775,7 @@ _0810FFFE:
ble _08110026
b _08110014
_0811000E:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_08110014:
@ -38728,7 +38728,7 @@ _08112054:
_0811206C:
movs r2, 0x2
movs r3, 0x6
bl sub_80BA384
bl ScanlineEffect_InitWave
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x1C]
@ -38884,7 +38884,7 @@ _081121A8:
beq _081121F0
b _08112258
_081121AE:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
movs r0, 0x1
@ -41152,7 +41152,7 @@ _0811345A:
ldrsh r0, [r4, r1]
cmp r3, r0
bgt _08113488
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -41175,7 +41175,7 @@ _08113488:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldr r0, =sub_81134B8
str r0, [r4]
add sp, 0xC
@ -41264,7 +41264,7 @@ _0811354E:
bl sub_8113574
b _0811356E
_08113556:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
ldrh r0, [r2, 0x8]
@ -41292,11 +41292,11 @@ sub_8113574: @ 8113574
ldrsh r0, [r5, r1]
cmp r4, r0
bgt _081135CA
ldr r7, =gUnknown_02038C28
ldr r7, =gScanlineEffectRegBuffers
mov r12, r7
ldr r0, =gSineTable
mov r8, r0
ldr r6, =gUnknown_02039B28
ldr r6, =gScanlineEffect
_08113592:
lsls r2, r4, 1
ldrb r1, [r6, 0x14]
@ -42169,7 +42169,7 @@ _08113CB0:
movs r0, 0x3
bl sub_8114374
movs r3, 0
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r4, r0
@ -42189,7 +42189,7 @@ _08113CDC:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
movs r0, 0x3F
eors r7, r0
movs r1, 0xFC
@ -42344,7 +42344,7 @@ _08113E3E:
b _08113E5E
.pool
_08113E58:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_08113E5E:
@ -42534,7 +42534,7 @@ _08114002:
str r0, [sp, 0x10]
movs r3, 0
add r4, sp, 0x10
ldr r6, =gUnknown_02038C28
ldr r6, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r7, r6, r0
@ -42563,7 +42563,7 @@ _08114010:
strb r2, [r4, 0x9]
ldr r0, [sp, 0x10]
ldr r2, [r4, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
_08114044:
ldrh r0, [r5, 0x8]
adds r0, 0x1
@ -42772,7 +42772,7 @@ _081141DA:
bne _08114232
b _08114204
_081141FE:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_08114204:
@ -42827,9 +42827,9 @@ sub_8114244: @ 8114244
movs r4, 0
cmp r0, 0
ble _081142A4
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
mov r12, r0
ldr r7, =gUnknown_02039B28
ldr r7, =gScanlineEffect
_08114278:
lsls r2, r4, 16
asrs r2, 16
@ -42861,9 +42861,9 @@ _081142A4:
ldrsh r0, [r6, r2]
cmp r1, r0
bgt _081142EE
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
mov r12, r0
ldr r7, =gUnknown_02039B28
ldr r7, =gScanlineEffect
_081142B8:
asrs r4, r3, 16
cmp r4, 0
@ -42904,8 +42904,8 @@ _081142EE:
ldrsh r0, [r6, r3]
cmp r1, r0
bge _08114366
ldr r7, =gUnknown_02038C28
ldr r4, =gUnknown_02039B28
ldr r7, =gScanlineEffectRegBuffers
ldr r4, =gScanlineEffect
_08114306:
asrs r3, r2, 16
cmp r3, 0
@ -42935,7 +42935,7 @@ _08114338:
adds r5, r0, 0
adds r5, 0x9F
movs r4, 0
ldr r3, =gUnknown_02038C28
ldr r3, =gScanlineEffectRegBuffers
movs r2, 0xF0
lsls r2, 3
adds r6, r3, r2
@ -44235,7 +44235,7 @@ _08114E4E:
b _08114E7E
.pool
_08114E78:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_08114E7E:
@ -44510,7 +44510,7 @@ _08115094:
ldrsh r0, [r0, r1]
cmp r0, 0
bne _081150DA
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_081150C2:
@ -44561,7 +44561,7 @@ _08115114:
asrs r4, r0, 16
cmp r2, r0
bge _08115140
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -44584,7 +44584,7 @@ _08115140:
asrs r0, r1, 16
cmp r0, 0x9F
bgt _0811516E
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
lsls r0, r3, 16
asrs r0, 16
adds r3, r0, 0
@ -44616,7 +44616,7 @@ _0811516E:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
add sp, 0xC
pop {r4-r6}
pop {r0}
@ -50740,9 +50740,9 @@ _08118442:
strh r0, [r1, 0xC]
_0811845A:
movs r3, 0
ldr r5, =gUnknown_02039B28
ldr r5, =gScanlineEffect
mov r9, r5
ldr r7, =gUnknown_02038C28
ldr r7, =gScanlineEffectRegBuffers
mov r6, r9
adds r5, r1, 0
_08118466:
@ -50760,8 +50760,8 @@ _08118466:
ble _08118466
cmp r3, 0x9F
bgt _081184AA
ldr r7, =gUnknown_02038C28
ldr r6, =gUnknown_02039B28
ldr r7, =gScanlineEffectRegBuffers
ldr r6, =gScanlineEffect
ldr r1, =gTasks
mov r2, r12
adds r0, r2, r4
@ -51089,9 +51089,9 @@ _0811873C:
strh r0, [r1, 0xC]
_08118752:
movs r3, 0
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
mov r8, r0
ldr r2, =gUnknown_02038C28
ldr r2, =gScanlineEffectRegBuffers
mov r12, r2
mov r7, r8
adds r4, r1, 0
@ -51110,9 +51110,9 @@ _08118760:
ble _08118760
cmp r3, 0x9F
bgt _081187A4
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
mov r12, r0
ldr r7, =gUnknown_02039B28
ldr r7, =gScanlineEffect
ldr r1, =gTasks
adds r0, r6, r5
lsls r0, 3
@ -51378,9 +51378,9 @@ _081189BA:
strh r0, [r1, 0xC]
_081189D0:
movs r3, 0
ldr r6, =gUnknown_02039B28
ldr r6, =gScanlineEffect
mov r8, r6
ldr r7, =gUnknown_02038C28
ldr r7, =gScanlineEffectRegBuffers
adds r4, r1, 0
_081189DA:
lsls r2, r3, 1
@ -51397,8 +51397,8 @@ _081189DA:
ble _081189DA
cmp r3, 0x9F
bgt _08118A1E
ldr r7, =gUnknown_02038C28
ldr r6, =gUnknown_02039B28
ldr r7, =gScanlineEffectRegBuffers
ldr r6, =gScanlineEffect
ldr r1, =gTasks
mov r2, r12
adds r0, r2, r5
@ -51707,9 +51707,9 @@ _08118C90:
strh r0, [r1, 0xC]
_08118CA6:
movs r3, 0
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
mov r12, r0
ldr r2, =gUnknown_02038C28
ldr r2, =gScanlineEffectRegBuffers
mov r8, r2
mov r7, r12
adds r4, r1, 0
@ -51728,9 +51728,9 @@ _08118CB4:
ble _08118CB4
cmp r3, 0x9F
bgt _08118CF8
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
mov r8, r0
ldr r7, =gUnknown_02039B28
ldr r7, =gScanlineEffect
ldr r1, =gTasks
adds r0, r5, r6
lsls r0, 3
@ -52025,7 +52025,7 @@ _08118F28:
lsls r1, 7
movs r0, 0xC
bl SetGpuReg
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
ldr r1, =gTasks

View File

@ -1689,7 +1689,7 @@ _0815AE58:
ldrsh r0, [r5, r6]
cmp r1, r0
bgt _0815AE8E
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r0, r4
@ -1729,7 +1729,7 @@ _0815AEA2:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldr r0, =sub_815AED8
str r0, [r5]
add sp, 0xC
@ -1820,7 +1820,7 @@ _0815AF5C:
ldrsh r0, [r4, r2]
cmp r1, r0
bge _0815AF90
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -1848,7 +1848,7 @@ _0815AF90:
ldrsh r0, [r4, r2]
cmp r1, r0
bgt _0815AFC4
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r5, r0
@ -1877,7 +1877,7 @@ _0815AFC4:
ldrsh r0, [r4, r1]
cmp r0, 0
beq _0815AFDA
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_0815AFDA:
@ -6151,7 +6151,7 @@ _0815D316:
ldrh r3, [r0]
movs r7, 0
movs r2, 0
ldr r6, =gUnknown_02038C28
ldr r6, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r0, r6
@ -6192,7 +6192,7 @@ _0815D326:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldr r0, =sub_815D398
str r0, [r4]
add sp, 0xC
@ -6304,7 +6304,7 @@ _0815D40E:
ldrsh r0, [r6, r3]
cmp r1, r0
ble _0815D52E
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
mov r10, r0
ldr r1, [sp, 0x4]
lsls r0, r1, 16
@ -6325,7 +6325,7 @@ _0815D47E:
subs r0, r1
lsls r0, 7
adds r2, r0
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
adds r2, r0
lsls r4, 16
asrs r4, 16
@ -6343,7 +6343,7 @@ _0815D47E:
subs r0, r1
lsls r0, 7
adds r3, r0
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
adds r3, r1
lsls r1, r7, 16
asrs r1, 16
@ -6407,7 +6407,7 @@ _0815D52E:
lsls r1, r2, 17
cmp r1, 0
blt _0815D55A
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
ldr r7, [sp, 0x4]
lsls r0, r7, 16
asrs r0, 16
@ -6487,7 +6487,7 @@ _0815D5CC:
asrs r0, 16
cmp r0, 0xC
ble _0815D63C
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
movs r0, 0

View File

@ -7096,7 +7096,7 @@ _081926B0:
movs r1, 0x1
str r1, [sp, 0x8]
ldr r1, =sub_8190938
bl sub_80D2CC4
bl CreateMonIcon
ldr r1, [r6]
adds r1, r4
strb r0, [r1]
@ -8779,7 +8779,7 @@ _081934B0:
mov r1, r10
str r1, [sp, 0x8]
ldr r1, =sub_8190938
bl sub_80D2CC4
bl CreateMonIcon
ldr r1, [r6]
adds r1, r4
strb r0, [r1]
@ -8927,7 +8927,7 @@ _081935FA:
movs r1, 0x1
str r1, [sp, 0x8]
ldr r1, =sub_8190938
bl sub_80D2CC4
bl CreateMonIcon
ldr r1, [r6]
adds r1, r4
strb r0, [r1]
@ -11000,8 +11000,8 @@ _0819486C:
movs r1, 0
strh r1, [r0, 0x8]
_08194878:
bl dp12_8087EA4
ldr r0, =gUnknown_02038C28
bl ScanlineEffect_Clear
ldr r0, =gScanlineEffectRegBuffers
ldr r2, =0x00001f0a
movs r4, 0xF0
lsls r4, 3
@ -11017,7 +11017,7 @@ _08194888:
bge _08194888
movs r5, 0x5B
ldr r3, =gUnknown_0860CF44
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
ldr r2, =0x00001f09
ldr r4, =0x00000836
adds r1, r0, r4
@ -11033,7 +11033,7 @@ _081948A4:
ldr r0, [r3]
ldr r1, [r3, 0x4]
ldr r2, [r3, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
mov r0, r8
bl DestroyTask
_081948C2:
@ -11513,7 +11513,7 @@ sub_8194CE4: @ 8194CE4
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
.pool

View File

@ -486,7 +486,7 @@ sub_817804C: @ 817804C
str r6, [sp, 0xC]
str r1, [sp, 0x10]
movs r1, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x14
pop {r4-r6}
pop {r0}

View File

@ -1808,7 +1808,7 @@ _080B32E0:
_080B32F8:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r1, =gLinkType
ldr r2, =0x00002211
adds r0, r2, 0
@ -1921,7 +1921,7 @@ _080B33E8:
_080B3408:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =gLinkType
ldr r2, =0x00002211
adds r1, r2, 0
@ -2399,7 +2399,7 @@ _080B382E:
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
bl ClearLinkCallback_2
b _080B3864
_080B3840:
@ -2470,7 +2470,7 @@ _080B38C6:
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
bl Rfu_set_zero
b _080B38FC
_080B38D8:

View File

@ -563,7 +563,7 @@ _080D7B4E:
bl sub_80D779C
bl sub_80D77E4
bl sub_80D7678
bl dp12_8087EA4
bl ScanlineEffect_Clear
bl ResetPaletteFade
ldr r2, =gPaletteFade
ldrb r0, [r2, 0x8]
@ -1367,7 +1367,7 @@ vblank_cb_battle: @ 80D827C
bl TransferPlttBuffer
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
.pool

View File

@ -344,7 +344,7 @@ sub_80F5B00: @ 80F5B00
bl SetVBlankCallback
bl sub_80F7DF4
bl sub_80F57C4
bl dp12_8087EA4
bl ScanlineEffect_Clear
bl ResetPaletteFade
bl ResetSpriteData
bl ResetTasks
@ -492,7 +492,7 @@ sub_80F5C24: @ 80F5C24
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
.pool

View File

@ -1,156 +0,0 @@
.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.

View File

@ -149,7 +149,7 @@ _081755E4:
movs r0, 0
movs r1, 0x1
adds r3, r5, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r4,r5}
pop {r0}

View File

@ -652,7 +652,7 @@ sub_811A7E4: @ 811A7E4
_0811A804:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
b _0811A840
_0811A80E:
ldr r0, =gPaletteFade

View File

@ -2155,7 +2155,7 @@ trigger_activate: @ 809D04C
cmp r1, 0
bne _0809D062
ldrb r0, [r4, 0x6]
bl trigger_activate_weather
bl DoCoordEventWeather
b _0809D082
_0809D062:
ldrh r0, [r4, 0x6]

View File

@ -764,8 +764,8 @@ _080B608E:
bx r0
thumb_func_end sub_80B6070
thumb_func_start sub_80B609C
sub_80B609C: @ 80B609C
thumb_func_start MultiplyInvertedPaletteRGBComponents
MultiplyInvertedPaletteRGBComponents: @ 80B609C
push {r4-r7,lr}
mov r7, r9
mov r6, r8
@ -832,7 +832,7 @@ sub_80B609C: @ 80B609C
pop {r0}
bx r0
.pool
thumb_func_end sub_80B609C
thumb_func_end MultiplyInvertedPaletteRGBComponents
thumb_func_start sub_80B6128
sub_80B6128: @ 80B6128
@ -1469,7 +1469,7 @@ _080B65D8:
mov r9, r3
add r4, r9
ldrb r3, [r4]
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
ldrh r4, [r7, 0x32]
adds r4, 0x2
mov r0, r8
@ -1488,7 +1488,7 @@ _080B65D8:
ldrb r2, [r2]
add r4, r9
ldrb r3, [r4]
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
ldrh r4, [r7, 0x32]
adds r4, 0x1
mov r3, r8
@ -1507,7 +1507,7 @@ _080B65D8:
ldrb r2, [r2]
add r4, r9
ldrb r3, [r4]
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
ldrh r4, [r7, 0x32]
lsls r4, 24
lsrs r4, 24
@ -1527,7 +1527,7 @@ _080B65D8:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
mov r0, r10
bl IndexOfSpritePaletteTag
lsls r0, 24
@ -1538,7 +1538,7 @@ _080B65D8:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
movs r3, 0x34
ldrsh r0, [r7, r3]
cmp r0, 0x2
@ -1612,7 +1612,7 @@ _080B6718:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
mov r0, r8
bl IndexOfSpritePaletteTag
lsls r0, 24
@ -1624,7 +1624,7 @@ _080B6718:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
mov r0, r8
bl IndexOfSpritePaletteTag
lsls r0, 24
@ -1636,7 +1636,7 @@ _080B6718:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
mov r0, r8
bl IndexOfSpritePaletteTag
lsls r0, 24
@ -1647,7 +1647,7 @@ _080B6718:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
mov r0, r8
bl IndexOfSpritePaletteTag
lsls r0, 24
@ -1658,7 +1658,7 @@ _080B6718:
adds r1, r6, 0
adds r2, r5, 0
adds r3, r4, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
pop {r3}
mov r8, r3
pop {r4-r6}

View File

@ -1,337 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_8098128
sub_8098128: @ 8098128
ldr r1, =gUnknown_020375BC
movs r0, 0
strb r0, [r1]
ldr r2, =gTextFlags
ldrb r1, [r2]
movs r0, 0x2
negs r0, r0
ands r0, r1
movs r1, 0x3
negs r1, r1
ands r0, r1
subs r1, 0x2
ands r0, r1
subs r1, 0x4
ands r0, r1
strb r0, [r2]
bx lr
.pool
thumb_func_end sub_8098128
thumb_func_start sub_8098154
sub_8098154: @ 8098154
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
movs r1, 0x8
ldrsh r0, [r4, r1]
cmp r0, 0x1
beq _08098188
cmp r0, 0x1
bgt _0809817C
cmp r0, 0
beq _08098182
b _080981B0
.pool
_0809817C:
cmp r0, 0x2
beq _08098198
b _080981B0
_08098182:
bl sub_81973A4
b _08098190
_08098188:
movs r0, 0
movs r1, 0x1
bl sub_81973C4
_08098190:
ldrh r0, [r4, 0x8]
adds r0, 0x1
strh r0, [r4, 0x8]
b _080981B0
_08098198:
bl sub_8197224
lsls r0, 16
lsrs r0, 16
cmp r0, 0x1
beq _080981B0
ldr r1, =gUnknown_020375BC
movs r0, 0
strb r0, [r1]
adds r0, r5, 0
bl DestroyTask
_080981B0:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8098154
thumb_func_start task_add_textbox
task_add_textbox: @ 80981BC
push {lr}
ldr r0, =sub_8098154
movs r1, 0x50
bl CreateTask
pop {r0}
bx r0
.pool
thumb_func_end task_add_textbox
thumb_func_start task_del_textbox
task_del_textbox: @ 80981D0
push {lr}
ldr r0, =sub_8098154
bl FindTaskIdByFunc
lsls r0, 24
lsrs r0, 24
cmp r0, 0xFF
beq _080981E4
bl DestroyTask
_080981E4:
pop {r0}
bx r0
.pool
thumb_func_end task_del_textbox
thumb_func_start ShowFieldMessage
ShowFieldMessage: @ 80981EC
push {r4,lr}
adds r1, r0, 0
ldr r4, =gUnknown_020375BC
ldrb r0, [r4]
cmp r0, 0
bne _0809820C
adds r0, r1, 0
movs r1, 0x1
bl textbox_fdecode_auto_and_task_add
movs r0, 0x2
strb r0, [r4]
movs r0, 0x1
b _0809820E
.pool
_0809820C:
movs r0, 0
_0809820E:
pop {r4}
pop {r1}
bx r1
thumb_func_end ShowFieldMessage
thumb_func_start sub_8098214
sub_8098214: @ 8098214
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl sub_8196094
adds r1, r0, 0
cmp r1, 0
bne _0809822E
ldr r0, =gUnknown_020375BC
strb r1, [r0]
adds r0, r4, 0
bl DestroyTask
_0809822E:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8098214
thumb_func_start sub_8098238
sub_8098238: @ 8098238
push {r4,r5,lr}
adds r4, r0, 0
ldr r5, =gUnknown_020375BC
ldrb r0, [r5]
cmp r0, 0
bne _08098270
ldr r0, =gStringVar4
adds r1, r4, 0
bl StringExpandPlaceholders
ldr r0, =sub_8098214
movs r1, 0
bl CreateTask
adds r0, r4, 0
bl sub_8196080
movs r0, 0x2
strb r0, [r5]
movs r0, 0x1
b _08098272
.pool
_08098270:
movs r0, 0
_08098272:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8098238
thumb_func_start ShowFieldAutoScrollMessage
ShowFieldAutoScrollMessage: @ 8098278
push {lr}
adds r1, r0, 0
ldr r2, =gUnknown_020375BC
ldrb r0, [r2]
cmp r0, 0
bne _08098298
movs r0, 0x3
strb r0, [r2]
adds r0, r1, 0
movs r1, 0
bl textbox_fdecode_auto_and_task_add
movs r0, 0x1
b _0809829A
.pool
_08098298:
movs r0, 0
_0809829A:
pop {r1}
bx r1
thumb_func_end ShowFieldAutoScrollMessage
thumb_func_start sub_80982A0
sub_80982A0: @ 80982A0
push {lr}
ldr r2, =gUnknown_020375BC
movs r1, 0x3
strb r1, [r2]
movs r1, 0x1
bl textbox_fdecode_auto_and_task_add
movs r0, 0x1
pop {r1}
bx r1
.pool
thumb_func_end sub_80982A0
thumb_func_start sub_80982B8
sub_80982B8: @ 80982B8
push {lr}
ldr r1, =gUnknown_020375BC
ldrb r0, [r1]
cmp r0, 0
bne _080982D4
movs r0, 0x2
strb r0, [r1]
bl textbox_auto_and_task_add
movs r0, 0x1
b _080982D6
.pool
_080982D4:
movs r0, 0
_080982D6:
pop {r1}
bx r1
thumb_func_end sub_80982B8
thumb_func_start textbox_fdecode_auto_and_task_add
textbox_fdecode_auto_and_task_add: @ 80982DC
push {r4,lr}
adds r2, r0, 0
adds r4, r1, 0
ldr r0, =gStringVar4
adds r1, r2, 0
bl StringExpandPlaceholders
lsls r4, 24
lsrs r4, 24
adds r0, r4, 0
bl AddTextPrinterForMessage
bl task_add_textbox
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end textbox_fdecode_auto_and_task_add
thumb_func_start textbox_auto_and_task_add
textbox_auto_and_task_add: @ 8098304
push {lr}
movs r0, 0x1
bl AddTextPrinterForMessage
bl task_add_textbox
pop {r0}
bx r0
thumb_func_end textbox_auto_and_task_add
thumb_func_start HideFieldMessageBox
HideFieldMessageBox: @ 8098314
push {lr}
bl task_del_textbox
movs r0, 0
movs r1, 0x1
bl sub_8197434
ldr r1, =gUnknown_020375BC
movs r0, 0
strb r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end HideFieldMessageBox
thumb_func_start textbox_any_visible
textbox_any_visible: @ 8098330
ldr r0, =gUnknown_020375BC
ldrb r0, [r0]
bx lr
.pool
thumb_func_end textbox_any_visible
thumb_func_start IsFieldMessageBoxHidden
IsFieldMessageBoxHidden: @ 809833C
push {lr}
ldr r0, =gUnknown_020375BC
ldrb r0, [r0]
cmp r0, 0
beq _08098350
movs r0, 0
b _08098352
.pool
_08098350:
movs r0, 0x1
_08098352:
pop {r1}
bx r1
thumb_func_end IsFieldMessageBoxHidden
thumb_func_start sub_8098358
sub_8098358: @ 8098358
push {lr}
bl task_del_textbox
movs r0, 0
movs r1, 0x1
bl sub_81973FC
ldr r1, =gUnknown_020375BC
movs r0, 0
strb r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end sub_8098358
thumb_func_start sub_8098374
sub_8098374: @ 8098374
push {lr}
bl task_del_textbox
ldr r1, =gUnknown_020375BC
movs r0, 0
strb r0, [r1]
pop {r0}
bx r0
.pool
thumb_func_end sub_8098374
.align 2, 0 @ Don't pad with nop.

View File

@ -2602,8 +2602,8 @@ _0808BD2C:
.pool
thumb_func_end sub_808BCF4
thumb_func_start sub_808BD3C
sub_808BD3C: @ 808BD3C
thumb_func_start GetRivalAvatarGraphicsIdByStateIdAndGender
GetRivalAvatarGraphicsIdByStateIdAndGender: @ 808BD3C
lsls r0, 24
lsls r1, 24
lsrs r1, 24
@ -2614,7 +2614,7 @@ sub_808BD3C: @ 808BD3C
ldrb r0, [r1]
bx lr
.pool
thumb_func_end sub_808BD3C
thumb_func_end GetRivalAvatarGraphicsIdByStateIdAndGender
thumb_func_start GetPlayerAvatarGraphicsIdByStateIdAndGender
@ u8 GetPlayerAvatarGraphicsIdByStateIdAndGender(u8 stateId, u8 gender)
@ -4538,7 +4538,7 @@ fish9: @ 808CC64
movs r0, 0
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldrh r0, [r4, 0x8]
adds r0, 0x1
strh r0, [r4, 0x8]
@ -4695,7 +4695,7 @@ fishB: @ 808CD94
movs r0, 0
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
movs r0, 0xD
strh r0, [r5, 0x8]
movs r0, 0x1
@ -4743,7 +4743,7 @@ fishC: @ 808CE04
movs r0, 0
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldrh r0, [r5, 0x8]
adds r0, 0x1
strh r0, [r5, 0x8]

View File

@ -1625,8 +1625,8 @@ _080ABCBC:
.pool
thumb_func_end sub_80ABC7C
thumb_func_start fade_screen
fade_screen: @ 80ABCD0
thumb_func_start FadeScreen
FadeScreen: @ 80ABCD0
push {r4,r5,lr}
sub sp, 0x4
lsls r0, 24
@ -1762,7 +1762,7 @@ _080ABDE4:
pop {r0}
bx r0
.pool
thumb_func_end fade_screen
thumb_func_end FadeScreen
thumb_func_start sub_80ABDFC
sub_80ABDFC: @ 80ABDFC
@ -2339,43 +2339,43 @@ _080AC290:
.4byte _080AC300
_080AC2B8:
movs r0, 0x1
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2C0:
movs r0, 0x2
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2C8:
movs r0, 0x3
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2D0:
movs r0, 0x4
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2D8:
movs r0, 0x5
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2E0:
movs r0, 0x6
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2E8:
movs r0, 0x9
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2F0:
movs r0, 0x7
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC2F8:
movs r0, 0x8
bl sub_80AEDF0
bl SetWeather
b _080AC306
_080AC300:
movs r0, 0xB
bl sub_80AEDF0
bl SetWeather
_080AC306:
pop {r0}
bx r0
@ -2472,15 +2472,15 @@ _080AC3B6:
bx r0
thumb_func_end play_some_sound
thumb_func_start sub_80AC3BC
sub_80AC3BC: @ 80AC3BC
thumb_func_start IsWeatherChangeComplete
IsWeatherChangeComplete: @ 80AC3BC
ldr r0, =gUnknown_02038454
ldr r1, =0x000006d3
adds r0, r1
ldrb r0, [r0]
bx lr
.pool
thumb_func_end sub_80AC3BC
thumb_func_end IsWeatherChangeComplete
thumb_func_start sub_80AC3D0
sub_80AC3D0: @ 80AC3D0
@ -7537,8 +7537,8 @@ GetSav1Weather: @ 80AEDAC
.pool
thumb_func_end GetSav1Weather
thumb_func_start sub_80AEDBC
sub_80AEDBC: @ 80AEDBC
thumb_func_start SetSav1WeatherFromCurrMapHeader
SetSav1WeatherFromCurrMapHeader: @ 80AEDBC
push {r4,r5,lr}
ldr r4, =gSaveBlock1Ptr
ldr r0, [r4]
@ -7559,10 +7559,10 @@ sub_80AEDBC: @ 80AEDBC
pop {r0}
bx r0
.pool
thumb_func_end sub_80AEDBC
thumb_func_end SetSav1WeatherFromCurrMapHeader
thumb_func_start sub_80AEDF0
sub_80AEDF0: @ 80AEDF0
thumb_func_start SetWeather
SetWeather: @ 80AEDF0
push {lr}
bl SetSav1Weather
bl GetSav1Weather
@ -7571,7 +7571,7 @@ sub_80AEDF0: @ 80AEDF0
bl weather_set
pop {r0}
bx r0
thumb_func_end sub_80AEDF0
thumb_func_end SetWeather
thumb_func_start sub_80AEE08
sub_80AEE08: @ 80AEE08
@ -7872,13 +7872,13 @@ _080AF06A:
bl palette_bg_faded_fill_black
movs r0, 0
movs r1, 0
bl fade_screen
bl FadeScreen
b _080AF084
_080AF078:
bl palette_bg_faded_fill_white
movs r0, 0x2
movs r1, 0
bl fade_screen
bl FadeScreen
_080AF084:
pop {r4}
pop {r0}
@ -7891,7 +7891,7 @@ sub_80AF08C: @ 80AF08C
bl palette_bg_faded_fill_white
movs r0, 0x2
movs r1, 0x8
bl fade_screen
bl FadeScreen
pop {r0}
bx r0
thumb_func_end sub_80AF08C
@ -7902,7 +7902,7 @@ pal_fill_black: @ 80AF0A0
bl palette_bg_faded_fill_black
movs r0, 0
movs r1, 0
bl fade_screen
bl FadeScreen
pop {r0}
bx r0
thumb_func_end pal_fill_black
@ -7928,12 +7928,12 @@ sub_80AF0B4: @ 80AF0B4
_080AF0DA:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
b _080AF0EC
_080AF0E4:
movs r0, 0x3
movs r1, 0
bl fade_screen
bl FadeScreen
_080AF0EC:
pop {r4}
pop {r0}
@ -8761,7 +8761,7 @@ sub_80AF79C: @ 80AF79C
bl music_something
movs r0, 0x3
movs r1, 0x8
bl fade_screen
bl FadeScreen
bl play_some_sound
ldr r0, =gFieldCallback
ldr r1, =sub_80AF3B0
@ -8990,7 +8990,7 @@ _080AF99A:
bl ClearLinkCallback_2
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
bl music_something
movs r0, 0x9
bl PlaySE
@ -9572,12 +9572,12 @@ _080AFE30:
beq _080AFEBC
b _080AFEC6
_080AFE36:
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
adds r0, r1
movs r2, 0x2
ldrsh r1, [r4, r2]
@ -9591,12 +9591,12 @@ _080AFE36:
b _080AFEC6
.pool
_080AFE64:
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
adds r0, r1
movs r6, 0x2
ldrsh r1, [r4, r6]
@ -9631,7 +9631,7 @@ _080AFEB4:
bl DestroyTask
b _080AFEC6
_080AFEBC:
bl dp12_8087EA4
bl ScanlineEffect_Clear
adds r0, r5, 0
bl DestroyTask
_080AFEC6:
@ -9665,12 +9665,12 @@ _080AFEF4:
beq _080AFF80
b _080AFF8A
_080AFEFA:
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
adds r0, r1
movs r2, 0x2
ldrsh r1, [r4, r2]
@ -9684,12 +9684,12 @@ _080AFEFA:
b _080AFF8A
.pool
_080AFF28:
ldr r0, =gUnknown_02039B28
ldr r0, =gScanlineEffect
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
adds r0, r1
movs r6, 0x2
ldrsh r1, [r4, r6]
@ -9724,7 +9724,7 @@ _080AFF78:
bl DestroyTask
b _080AFF8A
_080AFF80:
bl dp12_8087EA4
bl ScanlineEffect_Clear
adds r0, r5, 0
bl DestroyTask
_080AFF8A:
@ -9914,7 +9914,7 @@ sub_80B00E8: @ 80B00E8
lsrs r0, 24
cmp r0, 0
beq _080B0116
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
ldr r1, =gUnknown_0854FE64
lsls r0, 1
adds r0, r1
@ -9940,7 +9940,7 @@ _080B0116:
thumb_func_start door_upload_tiles
door_upload_tiles: @ 80B0124
push {r4,lr}
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
ldr r0, =gSaveBlock2Ptr
ldr r0, [r0]
ldr r1, =0x00000e68
@ -10261,7 +10261,7 @@ _080B0368:
bl sub_8199C30
movs r0, 0
bl schedule_bg_copy_tilemap_to_vram
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
movs r2, 0x4
ldrsh r1, [r5, r2]
movs r0, 0x6
@ -10280,7 +10280,7 @@ _080B0368:
ldr r0, [r2]
ldr r1, [r2, 0x4]
ldr r2, [r2, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
movs r0, 0x1
strh r0, [r5]
b _080B052C

View File

@ -5639,7 +5639,7 @@ _0813AAAA:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldr r1, =gUnknown_085B312C
lsls r0, r5, 1
adds r1, r0, r1
@ -5665,7 +5665,7 @@ _0813AAE8:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldr r1, =gUnknown_085B3142
lsls r0, r5, 1
adds r1, r0, r1
@ -5712,7 +5712,7 @@ _0813AB5C:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldr r1, =gUnknown_085B314E
lsls r0, r5, 1
adds r0, r1
@ -5736,7 +5736,7 @@ _0813AB94:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldr r1, =gUnknown_085B315C
lsls r0, r5, 1
adds r0, r1

View File

@ -11,7 +11,7 @@ sub_816CBE8: @ 816CBE8
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
thumb_func_end sub_816CBE8
@ -2124,7 +2124,7 @@ task_intro_17: @ 816DEEC
movs r1, 0xA0
movs r2, 0x4
movs r3, 0x4
bl sub_80BA384
bl ScanlineEffect_InitWave
add sp, 0xC
pop {r0}
bx r0
@ -2411,7 +2411,7 @@ _0816E156:
adds r0, r1
ldr r1, =task_intro_19
str r1, [r0]
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_0816E176:
@ -2623,7 +2623,7 @@ task_intro_19: @ 816E2A0
movs r1, 0xA0
movs r2, 0x4
movs r3, 0x4
bl sub_80BA384
bl ScanlineEffect_InitWave
add sp, 0xC
pop {r4}
pop {r0}
@ -3038,7 +3038,7 @@ _0816E69C:
adds r0, r1
ldr r1, =task_intro_21
str r1, [r0]
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
_0816E6BC:

View File

@ -6043,7 +6043,7 @@ bag_menu_print: @ 81AE0BC
str r4, [sp, 0xC]
str r2, [sp, 0x10]
mov r2, r9
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x14
pop {r3,r4}
mov r8, r3

File diff suppressed because it is too large Load Diff

View File

@ -773,7 +773,7 @@ ListMenuPrint: @ 81AE9B4
str r6, [sp, 0x10]
adds r2, r7, 0
mov r3, r12
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
ldrb r1, [r5, 0x3]
movs r0, 0x7F
ands r0, r1
@ -810,7 +810,7 @@ _081AEA20:
str r6, [sp, 0x10]
adds r2, r7, 0
mov r3, r12
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
_081AEA5E:
add sp, 0x18
pop {r4-r7}

View File

@ -1495,7 +1495,7 @@ _08030478:
b _0803048A
.pool
_08030480:
ldr r0, =sub_8178974
ldr r0, =CB2_InitMysteryEventMenu
b _0803048A
.pool
_08030488:

File diff suppressed because it is too large Load Diff

View File

@ -109,7 +109,7 @@ _0809842A:
cmp r0, 0
blt _08098452
adds r0, r1, 0
bl sub_8097404
bl FreezeMapObject
movs r0, 0x1
strh r0, [r5, 0xA]
_08098452:
@ -154,7 +154,7 @@ LockSelectedMapObject: @ 80984A0
push {r4,r5,lr}
ldr r4, =gSelectedMapObject
ldrb r0, [r4]
bl sub_80974D0
bl FreezeMapObjectsExceptOne
ldr r0, =sub_8098400
movs r1, 0x50
bl CreateTask
@ -171,7 +171,7 @@ LockSelectedMapObject: @ 80984A0
cmp r0, 0
blt _080984DE
adds r0, r1, 0
bl sub_8097404
bl FreezeMapObject
ldr r0, =gTasks
lsls r1, r5, 2
adds r1, r5
@ -317,7 +317,7 @@ _080985E8:
cmp r0, 0
blt _0809860C
adds r0, r1, 0
bl sub_8097404
bl FreezeMapObject
movs r0, 0x1
strh r0, [r5, 0xA]
_0809860C:
@ -385,7 +385,7 @@ sub_8098630: @ 8098630
cmp r0, 0
blt _0809869A
adds r0, r1, 0
bl sub_8097404
bl FreezeMapObject
movs r0, 0x1
strh r0, [r6, 0xA]
_0809869A:
@ -410,14 +410,14 @@ _0809869A:
cmp r0, 0
blt _0809871A
adds r0, r1, 0
bl sub_8097404
bl FreezeMapObject
movs r0, 0x1
strh r0, [r4, 0xA]
b _0809871A
.pool
_080986E0:
adds r0, r4, 0
bl sub_80974D0
bl FreezeMapObjectsExceptOne
ldr r0, =sub_80985BC
movs r1, 0x50
bl CreateTask
@ -439,7 +439,7 @@ _080986E0:
cmp r0, 0
blt _0809871A
adds r0, r1, 0
bl sub_8097404
bl FreezeMapObject
movs r0, 0x1
strh r0, [r5, 0xA]
_0809871A:

View File

@ -35,7 +35,7 @@ AddTextPrinterWithCallbackForMessage: @ 8197A9C
str r0, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r4,r5}
pop {r0}
@ -992,7 +992,7 @@ _0819829E:
movs r1, 0x1
movs r2, 0x4
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
mov r2, r9
cmp r2, 0
beq _081982C8
@ -4736,9 +4736,9 @@ box_print: @ 8199E64
bx r0
thumb_func_end box_print
thumb_func_start AddTextPrinterParametrized2
@ void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, u8 speed, u8 *str)
AddTextPrinterParametrized2: @ 8199EEC
thumb_func_start AddTextPrinterParameterized2
@ void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, u8 speed, u8 *str)
AddTextPrinterParameterized2: @ 8199EEC
push {r4-r6,lr}
mov r6, r9
mov r5, r8
@ -4806,7 +4806,7 @@ AddTextPrinterParametrized2: @ 8199EEC
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end AddTextPrinterParametrized2
thumb_func_end AddTextPrinterParameterized2
thumb_func_start sub_8199F74
sub_8199F74: @ 8199F74

View File

@ -156,7 +156,7 @@ _08121EC0:
adds r1, r7, 0
adds r2, r4, 0
adds r3, r5, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
ldr r1, =gUnknown_0300117C
ldr r0, [sp, 0x34]
str r0, [r1]

View File

@ -1,669 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_8178944
sub_8178944: @ 8178944
push {lr}
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
bx r0
thumb_func_end sub_8178944
thumb_func_start sub_8178958
sub_8178958: @ 8178958
push {lr}
movs r2, 0
ldr r1, =gLinkPlayers
ldrh r0, [r1, 0x1A]
ldrh r1, [r1, 0x36]
cmp r0, r1
bne _08178968
movs r2, 0x1
_08178968:
adds r0, r2, 0
pop {r1}
bx r1
.pool
thumb_func_end sub_8178958
thumb_func_start sub_8178974
sub_8178974: @ 8178974
push {r4,lr}
sub sp, 0x8
bl ResetSpriteData
bl FreeAllSpritePalettes
bl ResetTasks
ldr r0, =sub_8178944
bl SetVBlankCallback
movs r0, 0
bl ResetBgsAndClearDma3BusyFlags
ldr r1, =gUnknown_085EFD64
movs r0, 0
movs r2, 0x1
bl InitBgsFromTemplates
ldr r0, =gUnknown_085EFD68
bl InitWindows
lsls r0, 16
cmp r0, 0
beq _08178A22
bl DeactivateAllTextPrinters
movs r4, 0
_081789AC:
lsls r0, r4, 24
lsrs r0, 24
movs r1, 0
bl FillWindowPixelBuffer
adds r4, 0x1
cmp r4, 0x1
ble _081789AC
movs r0, 0x1E
str r0, [sp]
movs r0, 0x14
str r0, [sp, 0x4]
movs r0, 0
movs r1, 0
movs r2, 0
movs r3, 0
bl FillBgTilemapBufferRect_Palette0
movs r0, 0
movs r1, 0x1
movs r2, 0xD0
bl sub_809882C
movs r0, 0xE0
bl sub_81978B0
movs r1, 0xA0
lsls r1, 1
movs r0, 0
bl SetGpuReg
movs r0, 0x50
movs r1, 0
bl SetGpuReg
ldr r0, =Task_DestroySelf
movs r1, 0
bl CreateTask
bl StopMapMusic
bl RunTasks
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
movs r0, 0
movs r1, 0
movs r2, 0x2
bl FillPalette
ldr r0, =sub_8178A78
bl SetMainCallback2
_08178A22:
add sp, 0x8
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8178974
thumb_func_start sub_8178A40
sub_8178A40: @ 8178A40
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r1, 0
movs r5, 0x1
cmp r4, 0
bne _08178A54
ldr r1, =gText_EventSafelyLoaded
bl StringCopy
movs r5, 0
_08178A54:
cmp r4, 0x2
bne _08178A5A
movs r5, 0
_08178A5A:
cmp r4, 0x1
bne _08178A66
ldr r1, =gText_LoadErrorEndingSession
adds r0, r6, 0
bl StringCopy
_08178A66:
adds r0, r5, 0
pop {r4-r6}
pop {r1}
bx r1
.pool
thumb_func_end sub_8178A40
thumb_func_start sub_8178A78
sub_8178A78: @ 8178A78
push {r4-r6,lr}
sub sp, 0x8
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r1, r2
ldrb r0, [r0]
adds r4, r1, 0
cmp r0, 0x10
bls _08178A8E
b _08178E58
_08178A8E:
lsls r0, 2
ldr r1, =_08178AA0
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_08178AA0:
.4byte _08178AE4
.4byte _08178B12
.4byte _08178B48
.4byte _08178B80
.4byte _08178BCC
.4byte _08178BDC
.4byte _08178C54
.4byte _08178D28
.4byte _08178D38
.4byte _08178D58
.4byte _08178D60
.4byte _08178D74
.4byte _08178DBC
.4byte _08178DE0
.4byte _08178E0C
.4byte _08178E24
.4byte _08178E48
_08178AE4:
movs r0, 0
movs r1, 0x1
movs r2, 0x1
movs r3, 0xD
bl SetWindowBorderStyle
movs r0, 0
bl PutWindowTilemap
movs r0, 0
movs r1, 0x3
bl CopyWindowToVram
movs r0, 0
bl ShowBg
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0x10
movs r3, 0
b _08178E30
_08178B12:
ldr r0, =gPaletteFade
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08178B20
b _08178E58
_08178B20:
ldr r1, =gText_LinkStandby2
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
b _08178E3C
.pool
_08178B48:
movs r0, 0
bl IsTextPrinterActive
lsls r0, 16
cmp r0, 0
beq _08178B56
b _08178E58
_08178B56:
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
ldr r1, =gLinkType
ldr r2, =0x00005501
adds r0, r2, 0
strh r0, [r1]
bl OpenLink
b _08178E58
.pool
_08178B80:
ldr r0, =gLinkStatus
ldr r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
bne _08178B8E
b _08178D00
_08178B8E:
movs r0, 0x1C
ands r1, r0
cmp r1, 0x4
bhi _08178B98
b _08178D00
_08178B98:
movs r0, 0x15
bl PlaySE
ldr r1, =gText_PressAToLoadEvent
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
b _08178D00
.pool
_08178BCC:
movs r0, 0
bl IsTextPrinterActive
lsls r0, 16
cmp r0, 0
beq _08178BDA
b _08178E58
_08178BDA:
b _08178E34
_08178BDC:
bl GetLinkPlayerCount_2
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0x2
bne _08178CD0
ldr r4, =gMain
ldrh r1, [r4, 0x2E]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08178C38
movs r0, 0x5
bl PlaySE
bl sub_800A620
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
movs r3, 0xD
bl SetWindowBorderStyle
ldr r1, =gText_LoadingEvent
movs r0, 0
str r0, [sp]
movs r0, 0x1
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
movs r0, 0x1
bl PutWindowTilemap
movs r0, 0x1
movs r1, 0x3
bl CopyWindowToVram
movs r2, 0x87
lsls r2, 3
adds r1, r4, r2
b _08178E3C
.pool
_08178C38:
adds r0, r2, 0
ands r0, r1
cmp r0, 0
bne _08178C42
b _08178E58
_08178C42:
movs r0, 0x5
bl PlaySE
bl CloseLink
movs r0, 0x87
lsls r0, 3
adds r1, r4, r0
b _08178D1E
_08178C54:
bl IsLinkConnectionEstablished
lsls r0, 24
cmp r0, 0
beq _08178D00
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r0, [r0]
cmp r0, 0
bne _08178C68
b _08178E58
_08178C68:
movs r0, 0x2
movs r1, 0x2
bl GetLinkPlayerDataExchangeStatusTimed
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
bne _08178CAC
bl sub_800AC34
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1
bl sub_8178A40
movs r0, 0x1
str r0, [sp]
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r0, =gMain
movs r2, 0x87
lsls r2, 3
adds r0, r2
b _08178CF2
.pool
_08178CAC:
bl sub_8178958
lsls r0, 24
cmp r0, 0
beq _08178CCC
ldr r1, =gText_DontRemoveCableTurnOff
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
b _08178E34
.pool
_08178CCC:
bl CloseLink
_08178CD0:
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1
bl sub_8178A40
movs r0, 0x1
str r0, [sp]
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
_08178CF2:
movs r1, 0xD
strb r1, [r0]
b _08178E58
.pool
_08178D00:
ldr r4, =gMain
ldrh r1, [r4, 0x2E]
movs r0, 0x2
ands r0, r1
cmp r0, 0
bne _08178D0E
b _08178E58
_08178D0E:
movs r0, 0x5
bl PlaySE
bl CloseLink
movs r2, 0x87
lsls r2, 3
adds r1, r4, r2
_08178D1E:
movs r0, 0xF
strb r0, [r1]
b _08178E58
.pool
_08178D28:
movs r0, 0
bl IsTextPrinterActive
lsls r0, 16
cmp r0, 0
beq _08178D36
b _08178E58
_08178D36:
b _08178E34
_08178D38:
bl GetBlockReceivedStatus
lsls r0, 24
cmp r0, 0
bne _08178D44
b _08178E58
_08178D44:
bl ResetBlockReceivedFlags
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
b _08178E3C
.pool
_08178D58:
movs r0, 0x87
lsls r0, 3
adds r1, r4, r0
b _08178E3C
_08178D60:
bl sub_800AC34
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
b _08178E3C
.pool
_08178D74:
ldr r0, =gReceivedRemoteLinkPlayers
ldrb r6, [r0]
cmp r6, 0
bne _08178E58
ldr r5, =0x0201c000
adds r0, r5, 0
bl RunMysteryEventScript
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
str r6, [sp, 0x4]
ldr r2, =0x050001f5
add r0, sp, 0x4
adds r1, r5, 0
bl CpuSet
ldr r0, =gStringVar4
adds r1, r4, 0
bl sub_8178A40
lsls r0, 24
cmp r0, 0
bne _08178E34
movs r0, 0
bl TrySavingData
b _08178E34
.pool
_08178DBC:
ldr r1, =gStringVar4
movs r0, 0x1
str r0, [sp]
movs r0, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r1, =gMain
movs r2, 0x87
lsls r2, 3
adds r1, r2
b _08178E3C
.pool
_08178DE0:
movs r0, 0
bl IsTextPrinterActive
lsls r0, 16
lsrs r2, r0, 16
cmp r2, 0
bne _08178E58
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
ldrb r1, [r0]
adds r1, 0x1
strb r1, [r0]
ldr r0, =gUnknown_0203BCF8
strb r2, [r0]
b _08178E58
.pool
_08178E0C:
ldrh r1, [r4, 0x2E]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08178E58
movs r0, 0x5
bl PlaySE
movs r2, 0x87
lsls r2, 3
adds r1, r4, r2
b _08178E3C
_08178E24:
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0
movs r3, 0x10
_08178E30:
bl BeginNormalPaletteFade
_08178E34:
ldr r1, =gMain
movs r0, 0x87
lsls r0, 3
adds r1, r0
_08178E3C:
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
b _08178E58
.pool
_08178E48:
ldr r0, =gPaletteFade
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
bne _08178E58
bl DoSoftReset
_08178E58:
ldr r0, =gLinkStatus
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
cmp r0, 0
beq _08178E98
bl IsLinkMaster
lsls r0, 24
cmp r0, 0
bne _08178E98
bl CloseLink
ldr r4, =gStringVar4
adds r0, r4, 0
movs r1, 0x1
bl sub_8178A40
movs r0, 0x1
str r0, [sp]
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
movs r3, 0x2
bl sub_8178EC4
ldr r0, =gMain
movs r1, 0x87
lsls r1, 3
adds r0, r1
movs r1, 0xD
strb r1, [r0]
_08178E98:
bl RunTasks
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
add sp, 0x8
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8178A78
thumb_func_start sub_8178EC4
sub_8178EC4: @ 8178EC4
push {r4-r6,lr}
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
sub sp, 0x1C
adds r5, r0, 0
mov r10, r1
adds r6, r2, 0
ldr r4, [sp, 0x38]
lsls r5, 24
lsrs r5, 24
lsls r6, 24
lsrs r6, 24
lsls r3, 24
lsrs r3, 24
movs r0, 0
mov r9, r0
movs r1, 0x1
mov r8, r1
add r0, sp, 0x14
mov r1, r8
strb r1, [r0]
adds r1, r0, 0
movs r0, 0x2
strb r0, [r1, 0x1]
movs r0, 0x3
strb r0, [r1, 0x2]
adds r0, r1, 0
ldrb r0, [r0]
lsls r1, r0, 4
orrs r1, r0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
str r3, [sp, 0x18]
bl FillWindowPixelBuffer
mov r0, r9
str r0, [sp]
mov r1, r8
str r1, [sp, 0x4]
add r0, sp, 0x14
str r0, [sp, 0x8]
lsls r4, 24
asrs r4, 24
str r4, [sp, 0xC]
mov r1, r10
str r1, [sp, 0x10]
adds r0, r5, 0
movs r1, 0x1
adds r2, r6, 0
ldr r3, [sp, 0x18]
bl AddTextPrinterParametrized2
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8178EC4
.align 2, 0 @ Don't pad with nop.

File diff suppressed because it is too large Load Diff

View File

@ -95,9 +95,9 @@ sub_8197224: @ 8197224
bx r1
thumb_func_end sub_8197224
thumb_func_start AddTextPrinterParametrized
@ u16 AddTextPrinterParametrized(u8 windowId, u8 fontId, u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor)
AddTextPrinterParametrized: @ 8197238
thumb_func_start AddTextPrinterParameterized
@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor)
AddTextPrinterParameterized: @ 8197238
push {r4-r7,lr}
mov r7, r8
push {r7}
@ -166,7 +166,7 @@ AddTextPrinterParametrized: @ 8197238
pop {r1}
bx r1
.pool
thumb_func_end AddTextPrinterParametrized
thumb_func_end AddTextPrinterParameterized
thumb_func_start AddTextPrinterForMessage
@ void AddTextPrinterForMessage(u8 allowSkippingDelayWithButtonPress)
@ -198,7 +198,7 @@ AddTextPrinterForMessage: @ 81972C4
str r0, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r4,r5}
pop {r0}
@ -236,7 +236,7 @@ AddTextPrinterForMessage_2: @ 8197310
str r0, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r4}
pop {r0}
@ -273,7 +273,7 @@ AddTextPrinterWithCustomSpeedForMessage: @ 819735C
str r0, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r4,r5}
pop {r0}

View File

@ -1,10 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
.align 2, 0 @ Don't pad with nop.

View File

@ -1383,7 +1383,7 @@ _080850C8:
adds r1, r5, 0
bl TryUpdateRandomTrainerRematches
bl DoTimeBasedEvents
bl sub_80AEDBC
bl SetSav1WeatherFromCurrMapHeader
bl sub_8085B2C
bl update_sav1_flash_used_on_map
bl Overworld_ClearSavedMusic
@ -1483,7 +1483,7 @@ _080851A2:
beq _080851EE
bl DoTimeBasedEvents
_080851EE:
bl sub_80AEDBC
bl SetSav1WeatherFromCurrMapHeader
bl sub_8085B2C
cmp r5, 0
beq _08085200
@ -3637,7 +3637,7 @@ VBlankCB_Field: @ 8086390
push {lr}
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
bl FieldUpdateBgTilemapScroll
bl TransferPlttBuffer
bl TransferTilesetAnimsBuffer
@ -3657,7 +3657,7 @@ sub_80863B0: @ 80863B0
ldr r0, [r2]
ldr r1, [r2, 0x4]
ldr r2, [r2, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
b _080863F0
.pool
_080863D4:
@ -3671,7 +3671,7 @@ _080863D4:
ldr r0, [r2]
ldr r1, [r2, 0x4]
ldr r2, [r2, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
_080863F0:
pop {r0}
bx r0
@ -4294,7 +4294,7 @@ sub_8086988: @ 8086988
bl ResetTasks
bl ResetSpriteData
bl ResetPaletteFade
bl dp12_8087EA4
bl ScanlineEffect_Clear
bl dp13_810BB8C
bl ResetCameraUpdateInfo
bl InstallCameraPanAheadCallback
@ -6698,7 +6698,7 @@ _08087C38:
lsls r1, 30
lsrs r1, 31
movs r0, 0
bl sub_808BD3C
bl GetRivalAvatarGraphicsIdByStateIdAndGender
_08087C44:
lsls r0, 24
lsrs r0, 24

View File

@ -4268,7 +4268,7 @@ _081B243E:
adds r0, r4, 0
movs r1, 0
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
adds r0, r4, 0
bl PutWindowTilemap
adds r0, r4, 0
@ -5946,7 +5946,7 @@ _081B328C:
str r1, [sp, 0x10]
movs r1, 0x1
mov r2, r9
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
@ -6007,7 +6007,7 @@ sub_81B3300: @ 81B3300
movs r0, 0x6
movs r1, 0x1
adds r2, r4, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r4}
pop {r0}
@ -10415,7 +10415,7 @@ party_menu_link_mon_icon_anim: @ 81B5A2C
ldr r0, [sp, 0x20]
str r0, [sp, 0x8]
adds r0, r5, 0
bl sub_80D2CC4
bl CreateMonIcon
strb r0, [r4, 0x9]
ldr r2, =gSprites
ldrb r0, [r4, 0x9]
@ -17171,7 +17171,7 @@ sub_81B9404: @ 81B9404
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =sub_81B9424
movs r1, 0xA
bl CreateTask
@ -17247,7 +17247,7 @@ sub_81B94B0: @ 81B94B0
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =sub_81B94D0
movs r1, 0xA
bl CreateTask
@ -17297,7 +17297,7 @@ sub_81B951C: @ 81B951C
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =sub_81B953C
movs r1, 0xA
bl CreateTask
@ -17418,7 +17418,7 @@ sub_81B9620: @ 81B9620
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =sub_81B9640
movs r1, 0xA
bl CreateTask

View File

@ -552,7 +552,7 @@ sub_816B2C8: @ 816B2C8
str r0, [r1]
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
pop {r0}
bx r0
.pool
@ -1221,7 +1221,7 @@ sub_816B878: @ 816B878
lsrs r4, 24
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
@ -1494,7 +1494,7 @@ sub_816BABC: @ 816BABC
_0816BAD4:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =gTasks
lsls r1, r4, 2
adds r1, r4
@ -2150,7 +2150,7 @@ _0816C030:
movs r1, 0x1
movs r2, 0
adds r3, r6, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
_0816C050:
add sp, 0x14
pop {r4-r6}

View File

@ -3035,7 +3035,7 @@ sub_80BCE2C: @ 80BCE2C
str r4, [sp, 0xC]
str r2, [sp, 0x10]
mov r2, r8
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r3}
mov r8, r3
@ -6163,7 +6163,7 @@ sub_80BE8DC: @ 80BE8DC
movs r0, 0
movs r1, 0x1
adds r2, r5, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r4,r5}
pop {r0}
@ -9974,7 +9974,7 @@ sub_80C0A88: @ 80C0A88
str r4, [sp, 0xC]
str r1, [sp, 0x10]
movs r1, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r4-r6}
pop {r0}
@ -11022,7 +11022,7 @@ sub_80C1270: @ 80C1270
movs r0, 0
movs r1, 0x1
adds r2, r5, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r4,r5}
pop {r0}

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@
.text
thumb_func_start sub_80D2CC4
@ int sub_80D2CC4(u16 speciesId, int a2, u16 a3, u16 a4, u8 a5, u32 personality, int a7)
sub_80D2CC4: @ 80D2CC4
thumb_func_start CreateMonIcon
@ int CreateMonIcon(u16 speciesId, int a2, u16 a3, u16 a4, u8 a5, u32 personality, int a7)
CreateMonIcon: @ 80D2CC4
push {r4-r7,lr}
mov r7, r9
mov r6, r8
@ -84,7 +84,7 @@ _080D2D2A:
pop {r1}
bx r1
.pool
thumb_func_end sub_80D2CC4
thumb_func_end CreateMonIcon
thumb_func_start sub_80D2D78
sub_80D2D78: @ 80D2D78

View File

@ -233,7 +233,7 @@ _080C72AC:
movs r0, 0
movs r1, 0x1
movs r3, 0xFF
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
movs r0, 0
movs r1, 0x3
bl CopyWindowToVram
@ -339,7 +339,7 @@ _080C7392:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
b _080C756A
.pool
_080C73D0:
@ -406,7 +406,7 @@ _080C7428:
_080C745C:
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
movs r0, 0x4
strh r0, [r5, 0x8]
b _080C756A
@ -509,7 +509,7 @@ _080C7532:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
strh r4, [r5, 0x8]
b _080C756A
.pool

View File

@ -2049,7 +2049,7 @@ sub_81C4F24: @ 81C4F24
bl ScriptContext2_Enable
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
ldr r0, =sub_81C4F44
movs r1, 0xA
bl CreateTask
@ -5362,7 +5362,7 @@ sub_81C6C3C: @ 81C6C3C
str r4, [sp, 0xC]
str r1, [sp, 0x10]
movs r1, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x14
pop {r3}
mov r8, r3
@ -5408,7 +5408,7 @@ sub_81C6C94: @ 81C6C94
str r4, [sp, 0xC]
str r1, [sp, 0x10]
movs r1, 0x7
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x14
pop {r3}
mov r8, r3

View File

@ -44,7 +44,7 @@ sub_81C72A4: @ 81C72A4
bl SetMainCallback2
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
pop {r0}
bx r0
.pool
@ -7068,7 +7068,7 @@ sub_81CA914: @ 81CA914
bl TransferPlttBuffer
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
thumb_func_end sub_81CA914
@ -7101,7 +7101,7 @@ titlescreen_0: @ 81CA92C
ldr r0, [r2]
ldr r1, [r2, 0x4]
ldr r2, [r2, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldr r0, =sub_81CA914
bl c3args_set_0toR1_1to0
ldr r0, =sub_81CA9EC
@ -7220,7 +7220,7 @@ sub_81CAA3C: @ 81CAA3C
mov r0, sp
movs r6, 0
strh r6, [r0]
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
ldr r0, =0x010000a0
mov r8, r0
mov r0, sp
@ -15647,7 +15647,7 @@ sub_81CEE44: @ 81CEE44
bl TransferPlttBuffer
adds r0, r4, 0
bl sub_81D2108
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r4}
pop {r0}
bx r0
@ -21900,7 +21900,7 @@ _081D1D8C:
movs r1, 0x1
movs r2, 0x8
adds r3, r5, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
_081D1DAC:
add sp, 0x34
pop {r4,r5}
@ -22318,7 +22318,7 @@ sub_81D20BC: @ 81D20BC
b _081D20FA
.pool
_081D20D4:
bl dp12_8087EA4
bl ScanlineEffect_Clear
ldrb r0, [r4]
adds r0, 0x1
strb r0, [r4]
@ -22332,7 +22332,7 @@ _081D20E2:
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
ldrb r0, [r4]
adds r0, 0x1
strb r0, [r4]
@ -22366,7 +22366,7 @@ sub_81D2108: @ 81D2108
adds r0, r6, 0
bl sub_81D2634
movs r7, 0
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
mov r12, r5
movs r0, 0xF0
lsls r0, 3
@ -23765,7 +23765,7 @@ sub_81D2BF4: @ 81D2BF4
str r0, [sp, 0xC]
movs r1, 0x1
adds r2, r4, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r4}
pop {r0}

View File

@ -1058,7 +1058,7 @@ _081D6FC8:
sub_81D6FD0: @ 81D6FD0
push {lr}
bl sub_81D67EC
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
thumb_func_end sub_81D6FD0
@ -1183,12 +1183,12 @@ sub_81D7134: @ 81D7134
lsls r6, r1, 3
ldr r7, =gTasks + 0x8
adds r5, r6, r7
bl dp12_8087EA4
bl ScanlineEffect_Clear
bl sub_81D6FE0
bl sub_81D706C
movs r4, 0
str r4, [sp, 0x4]
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
ldr r2, =0x010003c0
add r0, sp, 0x4
bl CpuFastSet
@ -1196,7 +1196,7 @@ sub_81D7134: @ 81D7134
ldr r0, [r2]
ldr r1, [r2, 0x4]
ldr r2, [r2, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
strh r4, [r5]
ldr r0, =sub_81D7228
movs r1, 0
@ -1278,7 +1278,7 @@ sub_81D7228: @ 81D7228
adds r3, r1, r0
movs r1, 0x18
ldr r7, =gUnknown_0203CF60
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r5, r4, r0

View File

@ -888,7 +888,7 @@ _0809EFCA:
bl ResetOamRange
bl LoadOam
bl ScanlineEffect_Stop
bl dp12_8087EA4
bl ScanlineEffect_Clear
bl ResetSpriteData
bl ResetTasks
bl ResetPaletteFade

View File

@ -3923,7 +3923,7 @@ _080148CC:
bne _080149B2
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
movs r0, 0x2
strh r0, [r7]
b _080149B2
@ -11150,7 +11150,7 @@ _08018720:
movs r1, 0x1
movs r2, 0x4
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
movs r0, 0
adds r1, r7, 0
movs r2, 0xDE
@ -11166,7 +11166,7 @@ _08018720:
movs r0, 0
movs r1, 0
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
movs r0, 0
movs r1, 0x2
bl CopyWindowToVram
@ -11338,7 +11338,7 @@ sub_8018884: @ 8018884
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
movs r0, 0x1
movs r1, 0x1
movs r2, 0xF
@ -11691,7 +11691,7 @@ _08018B4A:
str r1, [sp, 0x10]
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
ldrb r0, [r4]
movs r1, 0x1
movs r2, 0xF
@ -11837,7 +11837,7 @@ _08018C8C:
str r1, [sp, 0x10]
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
ldrb r0, [r5]
movs r1, 0x1
movs r2, 0xF
@ -13672,7 +13672,7 @@ _08019B84:
b _08019B9C
_08019B96:
adds r0, r4, 0
bl sub_8097404
bl FreezeMapObject
_08019B9C:
movs r0, 0x1
_08019B9E:
@ -15389,7 +15389,7 @@ _0801A93A:
adds r0, r7, 0
adds r1, r6, 0
adds r2, r5, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r4-r7}
pop {r0}
@ -15710,7 +15710,7 @@ sub_801AB68: @ 801AB68
movs r1, 0x1
adds r2, r6, 0
ldr r3, [sp, 0x14]
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x18
pop {r3-r5}
mov r8, r3
@ -22076,7 +22076,7 @@ sub_801DF20: @ 801DF20
bl TransferPlttBuffer
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
pop {r0}
bx r0
thumb_func_end sub_801DF20
@ -24807,7 +24807,7 @@ sub_801F544: @ 801F544
str r0, [r4]
_0801F55A:
bl FreeAllWindowBuffers
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
pop {r4}
@ -27114,13 +27114,13 @@ sub_8020770: @ 8020770
strh r1, [r0, 0x20]
str r1, [sp, 0xC]
add r0, sp, 0xC
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
ldr r2, =0x010003c0
bl CpuFastSet
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
bl ScanlineEffect_SetParams
add sp, 0x10
pop {r0}
bx r0
@ -27135,12 +27135,12 @@ sub_80207C0: @ 80207C0
lsrs r0, 16
mov r1, sp
strh r0, [r1]
ldr r5, =gUnknown_02039B28
ldr r5, =gScanlineEffect
ldrb r0, [r5, 0x14]
lsls r1, r0, 4
subs r1, r0
lsls r1, 7
ldr r4, =gUnknown_02038C28
ldr r4, =gScanlineEffectRegBuffers
adds r1, r4
ldr r2, =0x01000090
mov r0, sp
@ -27178,7 +27178,7 @@ sub_8020818: @ 8020818
lsrs r4, 16
mov r0, sp
strh r4, [r0]
ldr r5, =gUnknown_02038C28
ldr r5, =gScanlineEffectRegBuffers
ldr r0, =0x01000090
mov r9, r0
mov r0, sp
@ -30787,7 +30787,7 @@ _08022616:
str r4, [sp, 0x10]
movs r1, 0x2
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
b _0802269C
.pool
_08022668:
@ -30814,7 +30814,7 @@ _08022668:
str r4, [sp, 0x10]
movs r1, 0x2
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
_0802269C:
ldr r1, =0x000001bb
adds r0, r6, r1
@ -31690,7 +31690,7 @@ _08022D42:
movs r0, 0
movs r1, 0x1
adds r2, r4, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
b _08022DB2
.pool
_08022D90:
@ -31709,7 +31709,7 @@ _08022D90:
str r0, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
_08022DB2:
movs r0, 0
movs r1, 0x3
@ -34273,7 +34273,7 @@ _080241A6:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
movs r0, 0
movs r1, 0x3
bl CopyWindowToVram
@ -34632,7 +34632,7 @@ _08024460:
str r1, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
b _080244AC
.pool
_08024490:
@ -34648,7 +34648,7 @@ _08024490:
str r0, [sp, 0xC]
movs r0, 0
movs r1, 0x1
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
_080244AC:
movs r0, 0
movs r1, 0x3
@ -46362,7 +46362,7 @@ _0802A3AE:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
b _0802A410
.pool
_0802A3D8:

View File

@ -877,7 +877,7 @@ ScriptMenu_DisplayPCStartupPrompt: @ 80E2514
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
add sp, 0x10
pop {r0}
bx r0
@ -1606,7 +1606,7 @@ _080E2B12:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
b _080E2B70
.pool
_080E2B40:
@ -1630,7 +1630,7 @@ _080E2B40:
movs r0, 0
movs r1, 0x1
movs r3, 0
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
_080E2B70:
add sp, 0x10
pop {r4}

View File

@ -553,7 +553,7 @@ _080D36DC:
adds r1, r6, 0
bl sub_80D355C
adds r0, r4, 0
bl sub_8097404
bl FreezeMapObject
b _080D370E
.pool
_080D36F8:

View File

@ -188,7 +188,7 @@ HandleShopMenuBuy: @ 80DFBD0
str r0, [r1]
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
pop {r4}
pop {r0}
bx r0
@ -216,7 +216,7 @@ HandleShopMenuSell: @ 80DFC0C
str r0, [r1]
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
pop {r4}
pop {r0}
bx r0
@ -839,7 +839,7 @@ _080E0176:
adds r0, r6, 0
movs r1, 0x7
adds r3, r7, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
_080E01AC:
add sp, 0x14
pop {r4-r7}
@ -1201,7 +1201,7 @@ BuyMenuPrint: @ 80E04A4
str r6, [sp, 0xC]
str r1, [sp, 0x10]
movs r1, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
add sp, 0x14
pop {r4-r6}
pop {r0}

View File

@ -8934,7 +8934,7 @@ sub_812EB48: @ 812EB48
ldrb r3, [r1]
adds r1, r3, 0
adds r2, r3, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
ldrh r0, [r4, 0x38]
adds r0, 0x1
movs r1, 0x1
@ -8979,7 +8979,7 @@ sub_812EBCC: @ 812EBCC
movs r1, 0
movs r2, 0
movs r3, 0
bl sub_80B609C
bl MultiplyInvertedPaletteRGBComponents
movs r4, 0
_0812EBEA:
ldr r0, =gUnknown_0203AB34

View File

@ -449,7 +449,7 @@ _0809FB34:
beq _0809FBA0
movs r0, 0x1
movs r1, 0
bl fade_screen
bl FadeScreen
b _0809FBA0
.pool
_0809FB98:
@ -1561,7 +1561,7 @@ _080A0490:
bl ResetSpriteData
bl ResetTasks
bl ResetPaletteFade
bl dp12_8087EA4
bl ScanlineEffect_Clear
b _080A04FC
_080A04A2:
movs r0, 0
@ -1695,7 +1695,7 @@ _080A05AC:
movs r0, 0
movs r1, 0x1
movs r3, 0xFF
bl AddTextPrinterParametrized
bl AddTextPrinterParameterized
movs r0, 0
movs r1, 0x8
movs r2, 0xE

View File

@ -1,225 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start GetMirageRnd
GetMirageRnd: @ 8137890
push {r4,lr}
ldr r0, =0x00004024
bl VarGet
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldr r0, =0x00004025
bl VarGet
lsls r0, 16
lsrs r0, 16
lsls r4, 16
orrs r4, r0
adds r0, r4, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetMirageRnd
thumb_func_start SetMirageRnd
SetMirageRnd: @ 81378BC
push {r4,lr}
adds r4, r0, 0
ldr r0, =0x00004024
lsrs r1, r4, 16
bl VarSet
ldr r0, =0x00004025
lsls r4, 16
lsrs r4, 16
adds r1, r4, 0
bl VarSet
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end SetMirageRnd
thumb_func_start InitMirageRnd
InitMirageRnd: @ 81378E4
push {r4,lr}
bl Random
adds r4, r0, 0
bl Random
lsls r4, 16
lsls r0, 16
lsrs r0, 16
orrs r4, r0
adds r0, r4, 0
bl SetMirageRnd
pop {r4}
pop {r0}
bx r0
thumb_func_end InitMirageRnd
thumb_func_start UpdateMirageRnd
UpdateMirageRnd: @ 8137904
push {r4,lr}
lsls r0, 16
lsrs r4, r0, 16
bl GetMirageRnd
adds r1, r0, 0
cmp r4, 0
beq _08137928
ldr r3, =0x41c64e6d
ldr r2, =0x00003039
_08137918:
adds r0, r1, 0
muls r0, r3
adds r1, r0, r2
subs r0, r4, 0x1
lsls r0, 16
lsrs r4, r0, 16
cmp r4, 0
bne _08137918
_08137928:
adds r0, r1, 0
bl SetMirageRnd
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end UpdateMirageRnd
thumb_func_start IsMirageIslandPresent
IsMirageIslandPresent: @ 813793C
push {r4-r6,lr}
bl GetMirageRnd
lsrs r6, r0, 16
movs r5, 0
_08137946:
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0xB
bl GetMonData
cmp r0, 0
beq _08137978
adds r0, r4, 0
movs r1, 0
bl GetMonData
ldr r1, =0x0000ffff
ands r1, r0
cmp r1, r6
bne _08137978
movs r0, 0x1
b _08137980
.pool
_08137978:
adds r5, 0x1
cmp r5, 0x5
ble _08137946
movs r0, 0
_08137980:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end IsMirageIslandPresent
thumb_func_start UpdateShoalTideFlag
UpdateShoalTideFlag: @ 8137988
push {lr}
bl get_map_light_from_warp0
lsls r0, 24
lsrs r0, 24
bl is_light_level_1_2_3_5_or_6
lsls r0, 24
cmp r0, 0
beq _081379CE
bl RtcCalcLocalTime
ldr r1, =gUnknown_085B2B44
ldr r0, =gLocalTime
ldrb r0, [r0, 0x2]
lsls r0, 24
asrs r0, 24
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _081379C8
ldr r0, =0x0000089a
bl FlagSet
b _081379CE
.pool
_081379C8:
ldr r0, =0x0000089a
bl FlagClear
_081379CE:
pop {r0}
bx r0
.pool
thumb_func_end UpdateShoalTideFlag
thumb_func_start Task_WaitWeather
Task_WaitWeather: @ 81379D8
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl sub_80AC3BC
lsls r0, 24
cmp r0, 0
beq _081379F2
bl EnableBothScriptContexts
adds r0, r4, 0
bl DestroyTask
_081379F2:
pop {r4}
pop {r0}
bx r0
thumb_func_end Task_WaitWeather
thumb_func_start WaitWeather
WaitWeather: @ 81379F8
push {lr}
ldr r0, =Task_WaitWeather
movs r1, 0x50
bl CreateTask
pop {r0}
bx r0
.pool
thumb_func_end WaitWeather
thumb_func_start InitBirchState
InitBirchState: @ 8137A0C
push {lr}
ldr r0, =0x00004049
bl GetVarPointer
movs r1, 0
strh r1, [r0]
pop {r0}
bx r0
.pool
thumb_func_end InitBirchState
thumb_func_start UpdateBirchState
UpdateBirchState: @ 8137A20
push {r4,r5,lr}
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldr r0, =0x00004049
bl GetVarPointer
adds r5, r0, 0
ldrh r0, [r5]
adds r4, r0
strh r4, [r5]
ldrh r0, [r5]
movs r1, 0x7
bl __umodsi3
strh r0, [r5]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end UpdateBirchState

View File

@ -464,7 +464,7 @@ _080AA766:
@ void title_screen_vblank_callback()
title_screen_vblank_callback: @ 80AA780
push {lr}
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
@ -779,7 +779,7 @@ _080AAAF0:
movs r1, 0xA0
movs r2, 0x4
movs r3, 0x4
bl sub_80BA384
bl ScanlineEffect_InitWave
ldr r0, =c2_title_screen_2
bl SetMainCallback2
_080AAB1E:

View File

@ -646,7 +646,7 @@ _080776E2:
str r1, [sp, 0x8]
adds r0, r5, 0
ldr r1, =sub_80D3014
bl sub_80D2CC4
bl CreateMonIcon
mov r2, r8
ldr r1, [r2]
adds r1, 0x28
@ -705,7 +705,7 @@ _08077756:
str r0, [sp, 0x8]
adds r0, r5, 0
ldr r1, =sub_80D3014
bl sub_80D2CC4
bl CreateMonIcon
mov r2, r8
ldr r1, [r2]
adds r1, 0x2E
@ -1264,7 +1264,7 @@ _08077CA8:
str r1, [sp, 0x8]
adds r0, r5, 0
ldr r1, =sub_80D3014
bl sub_80D2CC4
bl CreateMonIcon
mov r2, r8
ldr r1, [r2]
adds r1, 0x28
@ -1323,7 +1323,7 @@ _08077D1E:
str r0, [sp, 0x8]
adds r0, r5, 0
ldr r1, =sub_80D3014
bl sub_80D2CC4
bl CreateMonIcon
mov r2, r8
ldr r1, [r2]
adds r1, 0x2E
@ -4609,7 +4609,7 @@ _080798BC:
movs r1, 0x1
movs r2, 0
movs r3, 0
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
adds r0, r5, 0
bl PutWindowTilemap
adds r0, r5, 0
@ -14296,7 +14296,7 @@ sub_807F1A8: @ 807F1A8
movs r1, 0x1
movs r2, 0
movs r3, 0x2
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
adds r0, r5, 0
movs r1, 0x3
bl CopyWindowToVram

View File

@ -18,7 +18,7 @@ sub_80C2690: @ 80C2690
cmp r0, 0
beq _080C26C0
ldr r1, =0x040000d4
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
str r0, [r1]
movs r2, 0xF0
lsls r2, 3
@ -40,7 +40,7 @@ sub_80C26D4: @ 80C26D4
ldrh r3, [r4]
movs r0, 0
strh r0, [r4]
ldr r1, =gUnknown_02038C28
ldr r1, =gScanlineEffectRegBuffers
ldr r0, =0x04000006
ldrh r2, [r0]
movs r0, 0xFF
@ -3977,9 +3977,9 @@ sub_80C4998: @ 80C4998
movs r0, 0x3
bl HideBg
bl ScanlineEffect_Stop
bl dp12_8087EA4
bl ScanlineEffect_Clear
movs r1, 0
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
movs r2, 0
movs r3, 0xF0
lsls r3, 3
@ -4066,7 +4066,7 @@ _080C4A0E:
movs r2, 0
cmp r2, r7
bcs _080C4A78
ldr r3, =gUnknown_02038C28
ldr r3, =gScanlineEffectRegBuffers
_080C4A60:
lsls r0, r2, 16
asrs r0, 16
@ -4091,7 +4091,7 @@ _080C4A78:
lsrs r7, r4, 16
cmp r1, r0
bge _080C4AB0
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
mov r12, r0
adds r4, r3, 0
_080C4A92:
@ -4116,7 +4116,7 @@ _080C4AB0:
asrs r0, r1, 16
cmp r0, 0x9F
bgt _080C4ACE
ldr r2, =gUnknown_02038C28
ldr r2, =gScanlineEffectRegBuffers
_080C4ABC:
asrs r0, r1, 16
lsls r1, r0, 1
@ -4392,7 +4392,7 @@ _080C4CB6:
movs r2, 0
cmp r2, r7
bcs _080C4D20
ldr r3, =gUnknown_02038C28
ldr r3, =gScanlineEffectRegBuffers
_080C4D08:
lsls r0, r2, 16
asrs r0, 16
@ -4417,7 +4417,7 @@ _080C4D20:
lsrs r7, r4, 16
cmp r1, r0
bge _080C4D56
ldr r0, =gUnknown_02038C28
ldr r0, =gScanlineEffectRegBuffers
mov r12, r0
adds r4, r3, 0
_080C4D3A:
@ -4441,7 +4441,7 @@ _080C4D56:
asrs r0, r1, 16
cmp r0, 0x9F
bgt _080C4D74
ldr r2, =gUnknown_02038C28
ldr r2, =gScanlineEffectRegBuffers
_080C4D62:
asrs r0, r1, 16
lsls r1, r0, 1
@ -8258,7 +8258,7 @@ _080C6E08:
str r1, [sp, 0x10]
movs r1, 0x1
movs r3, 0x1
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
ldr r0, [sp, 0x4C]
mov r10, r4
cmp r0, 0x6
@ -8410,7 +8410,7 @@ sub_80C6EAC: @ 80C6EAC
movs r1, 0x1
movs r2, 0
movs r3, 0x2
bl AddTextPrinterParametrized2
bl AddTextPrinterParameterized2
lsrs r5, 1
adds r0, r7, 0
ldr r1, [sp, 0x24]

View File

@ -1,593 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start ScanlineEffect_Stop
ScanlineEffect_Stop: @ 80B9FB8
push {r4,lr}
ldr r4, =gUnknown_02039B28
movs r0, 0
strb r0, [r4, 0x15]
ldr r1, =0x040000b0
ldrh r2, [r1, 0xA]
ldr r0, =0x0000c5ff
ands r0, r2
strh r0, [r1, 0xA]
ldrh r2, [r1, 0xA]
ldr r0, =0x00007fff
ands r0, r2
strh r0, [r1, 0xA]
ldrh r0, [r1, 0xA]
ldrb r0, [r4, 0x18]
cmp r0, 0xFF
beq _080B9FE2
bl DestroyTask
movs r0, 0xFF
strb r0, [r4, 0x18]
_080B9FE2:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end ScanlineEffect_Stop
thumb_func_start dp12_8087EA4
dp12_8087EA4: @ 80B9FF8
push {r4,lr}
sub sp, 0x4
mov r0, sp
movs r4, 0
strh r4, [r0]
ldr r1, =gUnknown_02038C28
ldr r2, =0x01000780
bl CpuSet
ldr r0, =gUnknown_02039B28
movs r1, 0
str r1, [r0]
str r1, [r0, 0x4]
str r1, [r0, 0x8]
str r1, [r0, 0xC]
strb r4, [r0, 0x14]
strb r4, [r0, 0x15]
strb r4, [r0, 0x16]
strb r4, [r0, 0x17]
movs r1, 0xFF
strb r1, [r0, 0x18]
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end dp12_8087EA4
thumb_func_start sub_80BA038
sub_80BA038: @ 80BA038
push {lr}
sub sp, 0xC
str r0, [sp]
str r1, [sp, 0x4]
str r2, [sp, 0x8]
ldr r0, =0xa2600001
cmp r1, r0
bne _080BA06C
ldr r0, =gUnknown_02039B28
ldr r1, =gUnknown_02038C2A
str r1, [r0]
movs r2, 0xF0
lsls r2, 3
adds r1, r2
str r1, [r0, 0x4]
ldr r1, =sub_80BA134
b _080BA07C
.pool
_080BA06C:
ldr r0, =gUnknown_02039B28
ldr r1, =gUnknown_02038C2C
str r1, [r0]
movs r2, 0xF0
lsls r2, 3
adds r1, r2
str r1, [r0, 0x4]
ldr r1, =sub_80BA154
_080BA07C:
str r1, [r0, 0x10]
adds r1, r0, 0
ldr r0, [sp, 0x4]
str r0, [r1, 0xC]
ldr r0, [sp]
str r0, [r1, 0x8]
mov r0, sp
ldrb r0, [r0, 0x8]
strb r0, [r1, 0x15]
mov r0, sp
ldrb r0, [r0, 0x9]
strb r0, [r1, 0x16]
strb r0, [r1, 0x17]
add sp, 0xC
pop {r0}
bx r0
.pool
thumb_func_end sub_80BA038
thumb_func_start sub_80BA0A8
sub_80BA0A8: @ 80BA0A8
push {r4,lr}
ldr r4, =gUnknown_02039B28
ldrb r0, [r4, 0x15]
cmp r0, 0
beq _080BA122
cmp r0, 0x3
bne _080BA0EC
movs r0, 0
strb r0, [r4, 0x15]
ldr r1, =0x040000b0
ldrh r2, [r1, 0xA]
ldr r0, =0x0000c5ff
ands r0, r2
strh r0, [r1, 0xA]
ldrh r2, [r1, 0xA]
ldr r0, =0x00007fff
ands r0, r2
strh r0, [r1, 0xA]
ldrh r0, [r1, 0xA]
ldr r1, =gUnknown_02039B44
movs r0, 0x1
strb r0, [r1]
b _080BA122
.pool
_080BA0EC:
ldr r1, =0x040000b0
ldrh r2, [r1, 0xA]
ldr r0, =0x0000c5ff
ands r0, r2
strh r0, [r1, 0xA]
ldrh r2, [r1, 0xA]
ldr r0, =0x00007fff
ands r0, r2
strh r0, [r1, 0xA]
ldrh r0, [r1, 0xA]
ldrb r0, [r4, 0x14]
lsls r0, 2
adds r0, r4
ldr r0, [r0]
str r0, [r1]
ldr r0, [r4, 0x8]
str r0, [r1, 0x4]
ldr r0, [r4, 0xC]
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
ldr r0, [r4, 0x10]
bl _call_via_r0
ldrb r0, [r4, 0x14]
movs r1, 0x1
eors r0, r1
strb r0, [r4, 0x14]
_080BA122:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_80BA0A8
thumb_func_start sub_80BA134
sub_80BA134: @ 80BA134
ldr r0, =gUnknown_02039B28
ldr r2, [r0, 0x8]
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
ldr r1, =gUnknown_02038C28
adds r0, r1
ldrh r0, [r0]
strh r0, [r2]
bx lr
.pool
thumb_func_end sub_80BA134
thumb_func_start sub_80BA154
sub_80BA154: @ 80BA154
ldr r0, =gUnknown_02039B28
ldr r2, [r0, 0x8]
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
ldr r1, =gUnknown_02038C28
adds r0, r1
ldr r0, [r0]
str r0, [r2]
bx lr
.pool
thumb_func_end sub_80BA154
thumb_func_start task00_for_dp12
task00_for_dp12: @ 80BA174
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
lsls r0, 24
lsrs r0, 24
mov r12, r0
movs r6, 0
ldr r0, =gUnknown_02039B44
ldrb r0, [r0]
cmp r0, 0
beq _080BA1A4
mov r0, r12
bl DestroyTask
ldr r1, =gUnknown_02039B28
movs r0, 0xFF
strb r0, [r1, 0x18]
b _080BA324
.pool
_080BA1A4:
ldr r1, =gTasks
mov r0, r12
lsls r2, r0, 2
adds r0, r2, r0
lsls r0, 3
adds r3, r0, r1
movs r4, 0x16
ldrsh r0, [r3, r4]
mov r10, r1
mov r9, r2
cmp r0, 0
beq _080BA250
movs r1, 0x14
ldrsh r0, [r3, r1]
cmp r0, 0xE
bhi _080BA250
lsls r0, 2
ldr r1, =_080BA1D8
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_080BA1D8:
.4byte _080BA214
.4byte _080BA250
.4byte _080BA21C
.4byte _080BA250
.4byte _080BA224
.4byte _080BA250
.4byte _080BA22C
.4byte _080BA250
.4byte _080BA234
.4byte _080BA250
.4byte _080BA23C
.4byte _080BA250
.4byte _080BA244
.4byte _080BA250
.4byte _080BA24C
_080BA214:
ldr r0, =gBattle_BG0_X
b _080BA24E
.pool
_080BA21C:
ldr r0, =gBattle_BG0_Y
b _080BA24E
.pool
_080BA224:
ldr r0, =gBattle_BG1_X
b _080BA24E
.pool
_080BA22C:
ldr r0, =gBattle_BG1_Y
b _080BA24E
.pool
_080BA234:
ldr r0, =gBattle_BG2_X
b _080BA24E
.pool
_080BA23C:
ldr r0, =gBattle_BG2_Y
b _080BA24E
.pool
_080BA244:
ldr r0, =gBattle_BG3_X
b _080BA24E
.pool
_080BA24C:
ldr r0, =gBattle_BG3_Y
_080BA24E:
ldrh r6, [r0]
_080BA250:
mov r0, r9
add r0, r12
lsls r0, 3
mov r2, r10
adds r1, r0, r2
ldrh r2, [r1, 0x10]
movs r3, 0x10
ldrsh r0, [r1, r3]
cmp r0, 0
beq _080BA2BC
subs r0, r2, 0x1
strh r0, [r1, 0x10]
movs r4, 0xE
ldrsh r0, [r1, r4]
movs r3, 0xA0
lsls r3, 1
adds r2, r0, r3
movs r4, 0x8
ldrsh r3, [r1, r4]
movs r4, 0xA
ldrsh r0, [r1, r4]
cmp r3, r0
bge _080BA324
ldr r5, =gUnknown_02038C28
ldr r0, =gUnknown_02039B28
mov r8, r0
adds r7, r1, 0
lsls r0, r2, 1
adds r4, r0, r5
_080BA28A:
lsls r2, r3, 1
mov r0, r8
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
adds r2, r0
adds r2, r5
ldrh r0, [r4]
adds r0, r6
strh r0, [r2]
adds r4, 0x2
adds r3, 0x1
movs r1, 0xA
ldrsh r0, [r7, r1]
cmp r3, r0
blt _080BA28A
b _080BA324
.pool
_080BA2BC:
ldrh r0, [r1, 0x12]
strh r0, [r1, 0x10]
movs r2, 0xE
ldrsh r0, [r1, r2]
movs r3, 0xA0
lsls r3, 1
adds r2, r0, r3
movs r4, 0x8
ldrsh r3, [r1, r4]
movs r4, 0xA
ldrsh r0, [r1, r4]
cmp r3, r0
bge _080BA304
ldr r5, =gUnknown_02038C28
adds r7, r1, 0
lsls r0, r2, 1
adds r4, r0, r5
ldr r0, =gUnknown_02039B28
mov r8, r0
_080BA2E2:
lsls r2, r3, 1
mov r0, r8
ldrb r1, [r0, 0x14]
lsls r0, r1, 4
subs r0, r1
lsls r0, 7
adds r2, r0
adds r2, r5
ldrh r0, [r4]
adds r0, r6
strh r0, [r2]
adds r4, 0x2
adds r3, 0x1
movs r1, 0xA
ldrsh r0, [r7, r1]
cmp r3, r0
blt _080BA2E2
_080BA304:
mov r0, r9
add r0, r12
lsls r0, 3
mov r3, r10
adds r2, r0, r3
ldrh r0, [r2, 0xE]
adds r0, 0x1
strh r0, [r2, 0xE]
lsls r0, 16
asrs r0, 16
movs r4, 0xC
ldrsh r1, [r2, r4]
cmp r0, r1
bne _080BA324
movs r0, 0
strh r0, [r2, 0xE]
_080BA324:
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end task00_for_dp12
thumb_func_start sub_80BA33C
sub_80BA33C: @ 80BA33C
push {r4-r7,lr}
adds r6, r0, 0
lsls r1, 24
lsrs r5, r1, 24
lsls r2, 24
lsrs r4, r2, 24
movs r1, 0
movs r2, 0
ldr r0, =gSineTable
mov r12, r0
_080BA350:
lsls r0, r1, 1
adds r3, r0, r6
lsls r0, r2, 1
add r0, r12
movs r7, 0
ldrsh r0, [r0, r7]
muls r0, r4
cmp r0, 0
bge _080BA364
adds r0, 0xFF
_080BA364:
asrs r0, 8
strh r0, [r3]
adds r0, r2, r5
lsls r0, 24
lsrs r2, r0, 24
adds r0, r1, 0x1
lsls r0, 16
lsrs r1, r0, 16
cmp r1, 0xFF
bls _080BA350
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_80BA33C
thumb_func_start sub_80BA384
sub_80BA384: @ 80BA384
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x20
adds r5, r0, 0
str r1, [sp, 0x10]
ldr r0, [sp, 0x40]
mov r8, r0
ldr r1, [sp, 0x44]
mov r9, r1
ldr r0, [sp, 0x48]
mov r10, r0
lsls r5, 24
lsrs r5, 24
ldr r1, [sp, 0x10]
lsls r1, 24
str r1, [sp, 0x14]
lsrs r0, r1, 24
str r0, [sp, 0xC]
lsls r1, r2, 24
lsrs r1, 24
str r1, [sp, 0x18]
lsls r2, r3, 24
lsrs r2, 24
str r2, [sp, 0x1C]
mov r1, r8
lsls r1, 24
lsrs r1, 24
mov r8, r1
mov r3, r9
lsls r3, 24
lsrs r3, 24
mov r9, r3
mov r0, r10
lsls r0, 24
lsrs r0, 24
mov r10, r0
bl dp12_8087EA4
ldr r0, =0x04000010
add r0, r9
str r0, [sp]
ldr r0, =0xa2600001
str r0, [sp, 0x4]
mov r1, sp
movs r0, 0x1
strb r0, [r1, 0x8]
mov r0, sp
movs r1, 0
strb r1, [r0, 0x9]
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl sub_80BA038
ldr r0, =task00_for_dp12
movs r1, 0
bl CreateTask
lsls r0, 24
lsrs r7, r0, 24
ldr r0, =gTasks
lsls r4, r7, 2
adds r4, r7
lsls r4, 3
adds r4, r0
strh r5, [r4, 0x8]
mov r3, sp
ldrh r3, [r3, 0xC]
strh r3, [r4, 0xA]
movs r0, 0x80
lsls r0, 1
ldr r1, [sp, 0x18]
bl __divsi3
strh r0, [r4, 0xC]
movs r0, 0
strh r0, [r4, 0xE]
mov r1, r8
strh r1, [r4, 0x10]
strh r1, [r4, 0x12]
mov r3, r9
strh r3, [r4, 0x14]
mov r0, r10
strh r0, [r4, 0x16]
ldr r0, =gUnknown_02039B28
strb r7, [r0, 0x18]
ldr r0, =gUnknown_02039B44
movs r1, 0
strb r1, [r0]
ldr r4, =gUnknown_02038EA8
ldr r3, [sp, 0xC]
subs r6, r3, r5
lsls r3, r6, 24
lsrs r3, 24
adds r0, r4, 0
ldr r1, [sp, 0x18]
ldr r2, [sp, 0x1C]
bl sub_80BA33C
ldr r0, [sp, 0xC]
cmp r5, r0
bge _080BA47E
ldr r1, =0xfffffd80
adds r2, r4, r1
lsls r1, r5, 1
movs r3, 0xF0
lsls r3, 3
adds r0, r1, r3
adds r3, r0, r2
adds r1, r2
adds r2, r4, 0
adds r5, r6, 0
_080BA46A:
ldrh r0, [r2]
strh r0, [r1]
ldrh r0, [r2]
strh r0, [r3]
adds r2, 0x2
adds r3, 0x2
adds r1, 0x2
subs r5, 0x1
cmp r5, 0
bne _080BA46A
_080BA47E:
adds r0, r7, 0
add sp, 0x20
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.pool
thumb_func_end sub_80BA384
.align 2, 0 @ Don't pad with nop.

View File

@ -732,10 +732,10 @@ _08166C28:
b _08166D18
.pool
_08166C40:
ldr r1, =gUnknown_02039B28
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
bl sub_80BA0A8
bl ScanlineEffect_InitHBlankDmaTransfer
_08166C4A:
ldr r1, [r4]
adds r1, 0x50

View File

@ -1,6 +1,7 @@
#include "constants/rgb.h"
#include "constants/songs.h"
.include "asm/macros/battle_anim_script.inc"
.include "include/constants/battle_anim.h"
.include "include/constants/songs.h"
.section script_data, "aw", %progbits
@ -684,7 +685,7 @@ Move_FLAME_WHEEL:
createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 6
delay 0x4
createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 8, 1
createvisualtask sub_80A7B98, 0x3, 1, 31, 12, 1, 1
createvisualtask sub_80A7B98, 0x3, 1, RGB_RED, 12, 1, 1
playsewithpan SE_W172B, +63
call AnimScript_82D2D18
delay 0x7
@ -789,7 +790,7 @@ Move_DOUBLE_EDGE:
waitplaysewithpan SE_W207, -64, 0x8
createvisualtask sub_80D5830, 0x2, 0, 18, 6, 2, 4
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 0, 16, 16, 0x7FFF
createsprite gUnknown_08597274, 0x2, 1, 0, 16, 16, RGB_WHITE
createsprite gUnknown_0857FE70, 0x2, 0, 20, 0, 0, 4
delay 0x3
waitforvisualfinish
@ -801,7 +802,7 @@ Move_DOUBLE_EDGE:
createvisualtask sub_80D6134, 0x2, 8, -256, 1, 0
createvisualtask sub_80D5484, 0x2, 0, 4, 0, 12, 1
createvisualtask sub_80D5484, 0x2, 1, 4, 0, 12, 1
createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0x7FFF
createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, RGB_WHITE
waitforvisualfinish
createvisualtask sub_80D6134, 0x2, 8, -256, 0, 1
createvisualtask sub_80D6134, 0x2, 8, -256, 1, 1
@ -942,7 +943,7 @@ Move_MEGA_PUNCH:
loadspritegfx 0x279F
monbg ANIM_TARGET
delay 0x2
createsprite gUnknown_08597274, 0x2, 1, 0, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 1, 0, 0, 16, RGB_BLACK
setalpha 0x80C
playsewithpan SE_W025, +63
createsprite gUnknown_08595F48, 0x3, 0, 0, 0, 50
@ -990,7 +991,7 @@ Move_MEGA_KICK:
loadspritegfx 0x279F
monbg ANIM_TARGET
delay 0x2
createsprite gUnknown_08597274, 0x2, 1, 0, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 1, 0, 0, 16, RGB_BLACK
setalpha 0x80C
playsewithpan SE_W025, +63
createsprite gUnknown_08595F48, 0x3, 0, 0, 1, 50
@ -1232,7 +1233,7 @@ Move_HIDDEN_POWER:
createvisualtask sub_80D6064, 0x5, -7, -7, 11, 0, 0
waitforvisualfinish
delay 0x1E
createvisualtask sub_80A7B98, 0x5, 0, 20479, 12, 5, 1
createvisualtask sub_80A7B98, 0x5, 0, RGB(31, 31, 19), 12, 5, 1
delay 0x4
createvisualtask sub_80D6064, 0x5, -7, -7, 11, 0, 0
playsewithpan SE_W179, -64
@ -1705,7 +1706,7 @@ Move_PROTECT:
Move_DETECT:
loadspritegfx 0x2757
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 9, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 9, RGB_BLACK
waitforvisualfinish
createvisualtask sub_8116620, 0xA, 2, 1, 0, 9, 0x7FFF
delay 0x12
@ -1713,7 +1714,7 @@ Move_DETECT:
createsprite gUnknown_0853EE84, 0xD, 20, -20
waitforvisualfinish
delay 0xA
createsprite gUnknown_08597274, 0x2, 1, 2, 9, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 9, 0, RGB_BLACK
createvisualtask sub_8116620, 0xA, 2, 2, 9, 0, 0x7FFF
waitforvisualfinish
end
@ -2118,12 +2119,12 @@ Move_MEAN_LOOK:
loadspritegfx 0x27CB
monbg ANIM_DEF_PARTNER
playsewithpan SE_W060, -64
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 16, RGB_BLACK
loopsewithpan SE_W109, +63, 0xF, 0x4
waitplaysewithpan SE_W043, +63, 0x55
createsprite gUnknown_085CE104, 0x2
delay 0x78
createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, RGB_BLACK
delay 0x1E
clearmonbg ANIM_DEF_PARTNER
waitforvisualfinish
@ -2792,7 +2793,7 @@ Move_RAGE:
loadspritegfx 0x2767
monbg ANIM_TARGET
setalpha 0x80C
createvisualtask sub_80A7B98, 0x3, 0, 31, 10, 0, 2
createvisualtask sub_80A7B98, 0x3, 0, RGB_RED, 10, 0, 2
createsprite gUnknown_0859368C, 0x2, 0, -20, -28
playsewithpan SE_W207B, -64
delay 0x14
@ -3068,7 +3069,7 @@ Move_SUPER_FANG:
playsewithpan SE_W082, -64
waitforvisualfinish
createvisualtask sub_80D5484, 0x2, 0, 3, 0, 48, 1
createvisualtask sub_80A7B98, 0x2, 0, 1247, 12, 4, 1
createvisualtask sub_80A7B98, 0x2, 0, RGB(31, 6, 1), 12, 4, 1
waitforvisualfinish
delay 0x14
createsprite gUnknown_0857FE28, 0x2, 4, 4
@ -3137,7 +3138,7 @@ Move_NIGHTMARE:
end
AnimScript_82CD4CF:
createvisualtask sub_80A7B98, 0x2, 0, 0x7FFF, 10, 2, 1
createvisualtask sub_80A7B98, 0x2, 0, RGB_WHITE, 10, 2, 1
createvisualtask sub_80D51AC, 0x2, 0, 3, 0, 32, 1
playsewithpan SE_W171, +63
waitforvisualfinish
@ -3220,7 +3221,7 @@ Move_FORESIGHT:
delay 0x18
playsewithpan SE_W166, +63
delay 0xA
createvisualtask sub_80A7B98, 0x5, 1, 0x7FFF, 12, 2, 1
createvisualtask sub_80A7B98, 0x5, 1, RGB_WHITE, 12, 2, 1
playsewithpan SE_W197, +63
waitforvisualfinish
blendoff
@ -3418,7 +3419,7 @@ Move_MOONLIGHT:
loadspritegfx 0x27D3
loadspritegfx 0x272F
setalpha 0x1000
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 16, RGB_BLACK
waitforvisualfinish
createsprite gUnknown_08592EBC, 0x2, 120, 56
createvisualtask sub_80A7A74, 0x3, 0, 16, 16, 0, 1
@ -3517,7 +3518,7 @@ Move_UPROAR:
Move_HEAT_WAVE:
loadspritegfx 0x2815
createvisualtask sub_8116848, 0x5, 10261, 0, 6, 6, 31
createvisualtask sub_8116848, 0x5, 10261, 0, 6, 6, RGB_RED
createvisualtask sub_8110BCC, 0x5, 1
createvisualtask sub_810A060, 0x6, 6, 31
panse_1B SE_W257, -64, +63, +2, 0x0
@ -3555,7 +3556,7 @@ Move_TORMENT:
loadspritegfx 0x27E1
createvisualtask sub_815AFF0, 0x2
waitforvisualfinish
createvisualtask sub_80A7B98, 0x2, 1, 31, 10, 1, 1
createvisualtask sub_80A7B98, 0x2, 1, RGB_RED, 10, 1, 1
createsprite gUnknown_0859368C, 0x82, 1, -20, -28
playsewithpan SE_W207B, +63
delay 0x14
@ -3625,7 +3626,7 @@ Move_CHARGE:
loadspritegfx 0x27E5
monbg ANIM_ATTACKER
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, RGB_BLACK
waitforvisualfinish
createvisualtask sub_810AAFC, 0x2, 0, 60, 2, 12
playsewithpan SE_W268, -64
@ -3649,7 +3650,7 @@ Move_CHARGE:
createsprite gUnknown_0859598C, 0x2, 0, -16, -16
playsewithpan SE_W085B, -64
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, RGB_BLACK
clearmonbg ANIM_ATTACKER
blendoff
end
@ -3688,7 +3689,7 @@ Move_HELPING_HAND:
delay 0x14
playsewithpan SE_W227, 0
createvisualtask sub_80D52D0, 0x2, 2, 3, 0, 10, 1
createvisualtask sub_80A7B98, 0x2, 2, 1023, 12, 1, 1
createvisualtask sub_80A7B98, 0x2, 2, RGB_YELLOW, 12, 1, 1
end
Move_ASSIST:
@ -3750,7 +3751,7 @@ Move_RECYCLE:
createsprite gUnknown_085CE9B0, 0x2
loopsewithpan SE_W036, -64, 0x18, 0x3
waitforvisualfinish
createvisualtask sub_80A7B98, 0x5, 0, 0x7FFF, 12, 2, 1
createvisualtask sub_80A7B98, 0x5, 0, RGB_WHITE, 12, 2, 1
playsewithpan SE_W036, -64
waitforvisualfinish
blendoff
@ -3780,13 +3781,13 @@ AnimScript_82CE0A7:
playsewithpan SE_W233, +63
delay 0x14
createvisualtask sub_80D5C50, 0x2, 0, -24, 0, 24, 10, 24, 3
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 6, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 6, RGB_BLACK
delay 0x25
createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
createsprite gUnknown_08595E98, 0x4, 0, 0, 10, 1, 0
playsewithpan SE_W233B, +63
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 2, 6, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 6, 0, RGB_BLACK
waitforvisualfinish
clearmonbg ANIM_TARGET
end
@ -3807,7 +3808,7 @@ AnimScript_82CE154:
playsewithpan SE_W233, +63
delay 0x14
createvisualtask sub_80D5C50, 0x2, 0, -24, 0, 24, 10, 24, 3
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 6, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 6, RGB_BLACK
delay 0x25
createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
createsprite gUnknown_08595E98, 0x4, 0, 0, 10, 1, 0
@ -3819,7 +3820,7 @@ AnimScript_82CE154:
createsprite gUnknown_08595FA8, 0x2, 1, 3, 8, 12
playsewithpan SE_W280, +63
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 2, 6, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 6, 0, RGB_BLACK
waitforvisualfinish
clearmonbg ANIM_TARGET
end
@ -3845,7 +3846,7 @@ Move_ENDEAVOR:
loadspritegfx 0x2797
createvisualtask sub_815DCA4, 0x2, 0, 2
loopsewithpan SE_W039, -64, 0x18, 0x2
createvisualtask sub_80A7B98, 0x5, 0, 703, 12, 1, 2
createvisualtask sub_80A7B98, 0x5, 0, RGB(31, 21, 0), 12, 1, 2
delay 0x6
createvisualtask sub_80D6388, 0x5, 0, 1, 8, 1, 0
createsprite gUnknown_08597358, 0x82, 12, -12, 1, 2
@ -3858,7 +3859,7 @@ Move_ENDEAVOR:
Move_ERUPTION:
loadspritegfx 0x27D9
createsprite gUnknown_08597274, 0x2, 31, 2, 0, 4, 31
createsprite gUnknown_08597274, 0x2, 31, 2, 0, 4, RGB_RED
waitforvisualfinish
createvisualtask sub_8109460, 0x2
waitplaysewithpan SE_W153, -64, 0x3C
@ -3878,18 +3879,18 @@ Move_ERUPTION:
createvisualtask sub_81152DC, 0x5, 4, 8, 60
loopsewithpan SE_W088, +63, 0x10, 0xC
delay 0x50
createsprite gUnknown_08597274, 0x28, 31, 4, 4, 0, 31
createsprite gUnknown_08597274, 0x28, 31, 4, 4, 0, RGB_RED
end
Move_SKILL_SWAP:
loadspritegfx 0x280B
call AnimScript_82D7CD1
createvisualtask sub_810FBF0, 0x3, 1
createvisualtask sub_80A7B98, 0x5, 1, 0x7FFF, 12, 3, 1
createvisualtask sub_80A7B98, 0x5, 1, RGB_WHITE, 12, 3, 1
loopsewithpan SE_W179, -64, 0x18, 0x3
delay 0x10
createvisualtask sub_810FBF0, 0x3, 0
createvisualtask sub_80A7B98, 0x5, 0, 0x7FFF, 12, 3, 1
createvisualtask sub_80A7B98, 0x5, 0, RGB_WHITE, 12, 3, 1
waitforvisualfinish
call AnimScript_82D7CDD
end
@ -3951,13 +3952,13 @@ Move_TAIL_GLOW:
loadspritegfx 0x27E4
monbg ANIM_ATTACKER
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, RGB_BLACK
waitforvisualfinish
createsprite gUnknown_08596AC8, 0x42, 0
delay 0x12
loopsewithpan SE_W234, -64, 0x10, 0x6
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, RGB_BLACK
clearmonbg ANIM_ATTACKER
blendoff
delay 0x1
@ -4193,7 +4194,7 @@ Move_AROMATHERAPY:
loadspritegfx 0x27AF
loadspritegfx 0x27DB
loadspritegfx 0x2741
createsprite gUnknown_08597274, 0x0, 1, 0, 0, 7, 13293
createsprite gUnknown_08597274, 0x0, 1, 0, 0, 7, RGB(13, 31, 12)
delay 0x1
monbg ANIM_ATTACKER
delay 0x1
@ -4211,7 +4212,7 @@ Move_AROMATHERAPY:
waitforvisualfinish
clearmonbg ANIM_ATTACKER
delay 0x1
createsprite gUnknown_08597274, 0x0, 1, 0, 7, 0, 13293
createsprite gUnknown_08597274, 0x0, 1, 0, 7, 0, RGB(13, 31, 12)
delay 0x1
playsewithpan SE_W287, -64
createvisualtask sub_815DFCC, 0x2, 1
@ -4222,7 +4223,7 @@ Move_AROMATHERAPY:
createsprite gUnknown_08592B94, 0x10, 12, -5, 0, 0, 32, 60, 1
waitforvisualfinish
playsewithpan SE_REAPOKE, -64
createsprite gUnknown_08597274, 0x0, 43, 3, 10, 0, 13293
createsprite gUnknown_08597274, 0x0, 43, 3, 10, 0, RGB(13, 31, 12)
createsprite gUnknown_08593868, 0x10, 0, 0, 0, 1
waitforvisualfinish
end
@ -4231,7 +4232,7 @@ Move_FAKE_TEARS:
loadspritegfx 0x27AB
loadspritegfx 0x27E1
loadspritegfx 0x2758
createvisualtask sub_8116848, 0x5, 10155, 0, 4, 4, 32108
createvisualtask sub_8116848, 0x5, 10155, 0, 4, 4, RGB(12, 11, 31)
waitforvisualfinish
createvisualtask sub_815C478, 0x5, 0, 2, 1
loopsewithpan SE_W039, -64, 0xC, 0x4
@ -4289,7 +4290,7 @@ Move_ODOR_SLEUTH:
Move_GRASS_WHISTLE:
loadspritegfx 0x2758
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 13298
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, RGB(18, 31, 12)
waitforvisualfinish
createvisualtask sub_8102BE8, 0x2
waitforvisualfinish
@ -4320,19 +4321,19 @@ Move_GRASS_WHISTLE:
delay 0x4
waitforvisualfinish
createvisualtask sub_8102CA0, 0x2
createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, 13298
createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, RGB(18, 31, 12)
waitforvisualfinish
end
Move_TICKLE:
loadspritegfx 0x27EA
createsprite gUnknown_08597274, 0x2, 2, 0, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 2, 0, 0, 16, RGB_BLACK
waitforvisualfinish
createsprite gUnknown_08593A84, 0x0, -16, -8
createsprite gUnknown_08593A84, 0x0, 16, -8
playsewithpan SE_W197, -64
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 2, 0, 16, 0, 0
createsprite gUnknown_08597274, 0x2, 2, 0, 16, 0, RGB_BLACK
waitforvisualfinish
delay 0x14
createvisualtask sub_80D5EB8, 0x3, 0, 6, 1280, 3, 0
@ -4384,11 +4385,11 @@ Move_EXTRASENSORY:
call AnimScript_82D7CD1
monbg ANIM_DEF_PARTNER
setalpha 0x80C
createvisualtask sub_80A7B98, 0x5, 0, 891, 12, 1, 1
createvisualtask sub_80A7B98, 0x5, 0, RGB(27, 27, 0), 12, 1, 1
createvisualtask sub_810FE14, 0x5, 0
playsewithpan SE_W020, +63
waitforvisualfinish
createvisualtask sub_80A7B98, 0x5, 0, 891, 12, 1, 1
createvisualtask sub_80A7B98, 0x5, 0, RGB(27, 27, 0), 12, 1, 1
createvisualtask sub_810FE14, 0x5, 1
playsewithpan SE_W020, +63
waitforvisualfinish
@ -4607,7 +4608,7 @@ Move_SHOCK_WAVE:
loadspritegfx 0x2735
monbg ANIM_ATTACKER
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, RGB_BLACK
waitforvisualfinish
createvisualtask sub_810AAFC, 0x2, 0, 20, 0, 2
playsewithpan SE_W268, -64
@ -4725,7 +4726,7 @@ Move_ICE_PUNCH:
loadspritegfx 0x279D
loadspritegfx 0x2797
loadspritegfx 0x279F
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, 0
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, RGB_BLACK
createvisualtask sub_8116620, 0xA, 4, 2, 0, 9, 32588
delay 0x14
playsewithpan SE_W081, +63
@ -4750,7 +4751,7 @@ Move_ICE_PUNCH:
delay 0x5
createvisualtask sub_8116620, 0xA, 4, 2, 9, 0, 32588
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 0, 7, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 0, 7, 0, RGB_BLACK
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
blendoff
@ -4829,7 +4830,7 @@ Move_THUNDER:
waitbgfadeout
createvisualtask sub_8117660, 0x5, -256, 0, 1, -1
waitbgfadein
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, RGB_BLACK
delay 0x10
createvisualtask sub_8115F10, 0x2, 257, 257, 257
playsewithpan SE_W086, +63
@ -4873,7 +4874,7 @@ Move_THUNDER:
delay 0x2
createvisualtask sub_8115F10, 0x2, 257, 257, 257
delay 0x1
createsprite gUnknown_08597274, 0x82, 1, 2, 16, 0, 0
createsprite gUnknown_08597274, 0x82, 1, 2, 16, 0, RGB_BLACK
waitforvisualfinish
restorebg
waitbgfadeout
@ -4887,7 +4888,7 @@ Move_THUNDER_PUNCH:
loadspritegfx 0x2735
monbg ANIM_TARGET
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, RGB_BLACK
waitforvisualfinish
playsewithpan SE_W004, +63
createsprite gUnknown_08595E98, 0x84, 0, 0, 8, 1, 0
@ -4907,7 +4908,7 @@ Move_THUNDER_PUNCH:
createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 15, 1
createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
delay 0x1
createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, RGB_BLACK
delay 0x14
waitforvisualfinish
clearmonbg ANIM_TARGET
@ -5413,7 +5414,7 @@ Move_ICE_BEAM:
monbgprio_28 ANIM_TARGET
setalpha 0x80C
loadspritegfx 0x279D
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, 0
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, RGB_BLACK
waitforvisualfinish
createsoundtask sub_8158C58, 183, -64, 63, 4, 4, 0, 10
createsprite gUnknown_08595B2C, 0x2, 20, 12, 0, 12, 20
@ -5422,7 +5423,7 @@ Move_ICE_BEAM:
call AnimScript_82D07C1
call AnimScript_82D07C1
call AnimScript_82D07C1
createsprite gUnknown_08597274, 0x2, 4, -31, 0, 7, 32384
createsprite gUnknown_08597274, 0x2, 4, -31, 0, 7, RGB(0, 20, 31)
createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 25, 1
call AnimScript_82D07C1
call AnimScript_82D07C1
@ -5438,9 +5439,9 @@ Move_ICE_BEAM:
waitforvisualfinish
delay 0x14
call AnimScript_82D7720
createsprite gUnknown_08597274, 0x2, 4, 5, 7, 0, 32384
createsprite gUnknown_08597274, 0x2, 4, 5, 7, 0, RGB(0, 20, 31)
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 0, 7, 0, 0
createsprite gUnknown_08597274, 0x2, 1, 0, 7, 0, RGB_BLACK
waitforvisualfinish
clearmonbg ANIM_TARGET
blendoff
@ -5648,7 +5649,7 @@ AnimScript_82D0CB2:
Move_POWDER_SNOW:
loadspritegfx 0x279D
monbg ANIM_DEF_PARTNER
createsprite gUnknown_08597274, 0x2, 31, 1, 0, 3, 0
createsprite gUnknown_08597274, 0x2, 31, 1, 0, 3, RGB_BLACK
waitforvisualfinish
panse_1B SE_W016, -64, +63, +2, 0x0
call AnimScript_82D0D03
@ -5660,7 +5661,7 @@ Move_POWDER_SNOW:
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
delay 0x14
createsprite gUnknown_08597274, 0x2, 31, 1, 3, 0, 0
createsprite gUnknown_08597274, 0x2, 31, 1, 3, 0, RGB_BLACK
end
AnimScript_82D0D03:
@ -5778,7 +5779,7 @@ Move_ABSORB:
monbg ANIM_DEF_PARTNER
monbgprio_2A ANIM_TARGET
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, RGB(13, 31, 12)
waitforvisualfinish
playsewithpan SE_W071, +63
createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
@ -5791,7 +5792,7 @@ Move_ABSORB:
delay 0xF
call AnimScript_82D79DF
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, RGB(13, 31, 12)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
blendoff
@ -5831,7 +5832,7 @@ Move_MEGA_DRAIN:
monbg ANIM_DEF_PARTNER
monbgprio_2A ANIM_TARGET
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 8, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 8, RGB(13, 31, 12)
waitforvisualfinish
playsewithpan SE_W071, +63
createsprite gUnknown_08597358, 0x2, 0, 0, 1, 1
@ -5844,7 +5845,7 @@ Move_MEGA_DRAIN:
delay 0xF
call AnimScript_82D79DF
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 1, 8, 0, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 8, 0, RGB(13, 31, 12)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
blendoff
@ -5892,7 +5893,7 @@ Move_GIGA_DRAIN:
monbg ANIM_DEF_PARTNER
monbgprio_2A ANIM_TARGET
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 12, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 12, RGB(13, 31, 12)
waitforvisualfinish
playsewithpan SE_W071, +63
createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
@ -5905,7 +5906,7 @@ Move_GIGA_DRAIN:
delay 0xF
call AnimScript_82D79DF
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 1, 12, 0, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 12, 0, RGB(13, 31, 12)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
blendoff
@ -6446,14 +6447,14 @@ Move_WHIRLPOOL:
monbgprio_28 ANIM_TARGET
setalpha 0x80C
delay 0x0
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 23968
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, RGB(0, 13, 23)
playsewithpan SE_W250, +63
createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 50, 1
call AnimScript_82D1F5B
call AnimScript_82D1F5B
call AnimScript_82D1F5B
delay 0xC
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 23968
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, RGB(0, 13, 23)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
end
@ -7354,7 +7355,7 @@ Move_POISON_TAIL:
loadspritegfx 0x2797
loadspritegfx 0x27A6
loopsewithpan SE_W231, -64, 0x1C, 0x2
createvisualtask sub_81144F8, 0x5, 1, 1, 23768
createvisualtask sub_81144F8, 0x5, 1, 1, RGB(24, 6, 23)
waitforvisualfinish
monbg ANIM_TARGET
setalpha 0x80C
@ -7783,7 +7784,7 @@ Move_SOFT_BOILED:
delay 0x78
delay 0x7
playsewithpan SE_W030, -64
createsprite gUnknown_08597274, 0x2, 31, 3, 10, 0, 31500
createsprite gUnknown_08597274, 0x2, 31, 3, 10, 0, RGB(12, 24, 30)
createsprite gUnknown_0859381C, 0x3, 31, 16, 0, 1
delay 0x8
createsprite gUnknown_0859381C, 0x3, 31, 16, 0, 1
@ -7855,7 +7856,7 @@ Move_FAKE_OUT:
createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 5, 1
createvisualtask sub_8106020, 0x3
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, 0x7FFF
createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, RGB_WHITE
end
Move_SCARY_FACE:
@ -8270,7 +8271,7 @@ Move_STOCKPILE:
call AnimScript_82D4972
call AnimScript_82D4972
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 2, 0, 12, 0, 0x7FFF
createsprite gUnknown_08597274, 0x2, 2, 0, 12, 0, RGB_WHITE
end
AnimScript_82D4972:
@ -8585,7 +8586,7 @@ Move_REFRESH:
call AnimScript_82D79B4
waitforvisualfinish
playsewithpan SE_REAPOKE, -64
createsprite gUnknown_08597274, 0x2, 31, 3, 10, 0, 31500
createsprite gUnknown_08597274, 0x2, 31, 3, 10, 0, RGB(12, 24, 30)
createsprite gUnknown_0859381C, 0x3, 0, 0, 0, 0
end
@ -8622,7 +8623,7 @@ Move_HYPER_VOICE:
end
AnimScript_82D50FA:
createsprite gUnknown_08597274, 0x2, 31, 3, 8, 0, 1023
createsprite gUnknown_08597274, 0x2, 31, 3, 8, 0, RGB_YELLOW
createvisualtask sub_80D6064, 0x5, -5, -5, 5, 0, 0
createsprite gUnknown_08593880, 0x0, 45, 0, 0, 0, 0, 0, 1
createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 6, 1
@ -8633,14 +8634,14 @@ AnimScript_82D50FA:
Move_SAND_TOMB:
loadspritegfx 0x275A
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 563
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, RGB(19, 17, 0)
createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 43, 1
playsewithpan SE_W328, +63
call AnimScript_82D51B7
call AnimScript_82D51B7
call AnimScript_82D51B7
delay 0x16
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 563
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, RGB(19, 17, 0)
waitforvisualfinish
end
@ -9422,7 +9423,7 @@ Move_OVERHEAT:
loadspritegfx 0x2797
monbg ANIM_DEF_PARTNER
setalpha 0x120C
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 5, 28
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 5, RGB(28, 0, 0)
waitforvisualfinish
createvisualtask sub_8117C44, 0x5
waitforvisualfinish
@ -9433,7 +9434,7 @@ Move_OVERHEAT:
playsewithpan SE_W082, -64
createvisualtask sub_8117CA0, 0x5, 1, 0
delay 0x1
createsprite gUnknown_08597274, 0x2, 2, 1, 0, 13, 28
createsprite gUnknown_08597274, 0x2, 2, 1, 0, 13, RGB(28, 0, 0)
createvisualtask sub_80D51AC, 0x5, 0, 2, 0, 15, 1
waitforvisualfinish
playsewithpan SE_W172B, -64
@ -9479,12 +9480,12 @@ Move_OVERHEAT:
playsewithpan SE_W007, +63
createvisualtask sub_8117DD8, 0x5, 1
delay 0x1
createsprite gUnknown_08597274, 0x2, 2, -1, 0, 13, 19026
createsprite gUnknown_08597274, 0x2, 2, -1, 0, 13, RGB(18, 18, 18)
createvisualtask sub_80D51AC, 0x5, 0, 3, 0, 15, 1
waitforvisualfinish
createvisualtask sub_8117D3C, 0x5, 0, 1
delay 0x1
createsprite gUnknown_08597274, 0x2, 1, 1, 5, 0, 28
createsprite gUnknown_08597274, 0x2, 1, 1, 5, 0, RGB(28, 0, 0)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
blendoff
@ -9492,7 +9493,7 @@ Move_OVERHEAT:
delay 0xF
createvisualtask sub_8117D3C, 0x5, 1, 0
delay 0x1
createsprite gUnknown_08597274, 0x2, 2, 0, 13, 0, 19026
createsprite gUnknown_08597274, 0x2, 2, 0, 13, 0, RGB(18, 18, 18)
waitforvisualfinish
createvisualtask sub_8117C70, 0x5
waitforvisualfinish
@ -9643,7 +9644,7 @@ Move_WATER_PULSE:
monbg ANIM_TARGET
monbgprio_28 ANIM_TARGET
playsewithpan SE_W145C, -64
createsprite gUnknown_08597274, 0x2, 1, 0, 0, 7, 29472
createsprite gUnknown_08597274, 0x2, 1, 0, 0, 7, RGB(0, 25, 28)
delay 0xA
createsprite gUnknown_085952F8, 0x42, 100, 100, 8, 1, 20, 40, 0
createsprite gUnknown_085952F8, 0x42, 20, 100, 16, 2, 10, 35, 1
@ -9663,7 +9664,7 @@ Move_WATER_PULSE:
delay 0xD
createvisualtask sub_80D51AC, 0x2, 1, 0, 8, 18, 1
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 1, 7, 0, 29472
createsprite gUnknown_08597274, 0x2, 1, 1, 7, 0, RGB(0, 25, 28)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
end
@ -10560,13 +10561,13 @@ AnimScript_82D800E:
monbgprio_28 ANIM_TARGET
setalpha 0x80C
delay 0x0
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 23968
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, RGB(0, 13, 23)
playsewithpan SE_W250, +63
createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 30, 1
call AnimScript_82D1F5B
call AnimScript_82D1F5B
delay 0xC
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 23968
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, RGB(0, 13, 23)
waitforvisualfinish
stopsound
clearmonbg ANIM_DEF_PARTNER
@ -10591,13 +10592,13 @@ AnimScript_82D8062:
AnimScript_82D80BF:
loadspritegfx 0x275A
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 563
createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, RGB(19, 17, 0)
createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 30, 1
playsewithpan SE_W328, +63
call AnimScript_82D51B7
call AnimScript_82D51B7
delay 0x16
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 563
createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, RGB(19, 17, 0)
waitforvisualfinish
stopsound
end
@ -10619,7 +10620,7 @@ Anim_ItemEffect:
call AnimScript_82D79B4
waitforvisualfinish
playsewithpan SE_REAPOKE, -64
createsprite gUnknown_08597274, 0x2, 2, 3, 7, 0, 26609
createsprite gUnknown_08597274, 0x2, 2, 3, 7, 0, RGB(17, 31, 25)
createsprite gUnknown_0859381C, 0x3, 0, 0, 0, 0
waitforvisualfinish
end
@ -10663,11 +10664,11 @@ Anim_SmokeBallEscape:
end
Anim_HangedOn:
createsprite gUnknown_08597274, 0x0, 2, 7, 0, 9, 31
createsprite gUnknown_08597274, 0x0, 2, 7, 0, 9, RGB_RED
playsewithpan SE_W082, -64
createvisualtask sub_815DB90, 0x5, 30, 128, 0, 1, 2, 0, 1
waitforvisualfinish
createsprite gUnknown_08597274, 0x0, 2, 4, 9, 0, 31
createsprite gUnknown_08597274, 0x0, 2, 4, 9, 0, RGB_RED
waitforvisualfinish
delay 0x6
createsprite gUnknown_0857FE58, 0x0, 0, 0, 15
@ -10769,7 +10770,7 @@ Anim_FutureSightHit:
Anim_DoomDesireHit:
createvisualtask sub_8117F10, 0x2
loadspritegfx 0x27D6
createsprite gUnknown_08597274, 0x2, 1, 3, 0, 16, 0x7FFF
createsprite gUnknown_08597274, 0x2, 1, 3, 0, 16, RGB_WHITE
waitforvisualfinish
delay 0xA
createvisualtask sub_815C0A4, 0x5
@ -10796,7 +10797,7 @@ Anim_DoomDesireHit:
playsewithpan SE_W120, +63
createsprite gUnknown_0859371C, 0x3, 16, 16, 1, 1
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, 0x7FFF
createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, RGB_WHITE
waitforvisualfinish
end
@ -10818,7 +10819,7 @@ Status_Ingrain:
loadspritegfx 0x272F
monbg ANIM_DEF_PARTNER
setalpha 0x80C
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, RGB(13, 31, 12)
waitforvisualfinish
delay 0x3
call AnimScript_82D1009
@ -10826,7 +10827,7 @@ Status_Ingrain:
delay 0xF
call AnimScript_82D79DF
waitforvisualfinish
createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, 13293
createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, RGB(13, 31, 12)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
blendoff

View File

@ -1,21 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2, 0
gUnknown_085102E0:: @ 85102E0
.4byte 0x00000001, sub_809D7BC
.4byte 0x00000002, sub_809D7C8
.4byte 0x00000003, sub_809D7D4
.4byte 0x00000004, sub_809D7E0
.4byte 0x00000005, sub_809D7EC
.4byte 0x00000006, sub_809D7F8
.4byte 0x00000007, sub_809D804
.4byte 0x00000008, sub_809D810
.4byte 0x00000009, sub_809D81C
.4byte 0x0000000a, sub_809D828
.4byte 0x0000000b, sub_809D834
.4byte 0x00000014, sub_809D840
.4byte 0x00000015, sub_809D84C

View File

@ -6,7 +6,7 @@
gUnknown_0857C608:: @ 857C608
.byte 0xfe, 0xfe, 0x01, 0x00, 0xff, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x01, 0xfe, 0x03, 0x00, 0x02, 0xfe, 0x03, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x02, 0xff, 0x03, 0x00, 0xfe, 0x00, 0x04, 0x00, 0x02, 0x00
.byte 0x06, 0x00, 0xfe, 0x01, 0x07, 0x00, 0x02, 0x01, 0x09, 0x00, 0xfe, 0x02, 0x07, 0x00, 0xff, 0x02, 0x07, 0x00, 0x00, 0x02, 0x08, 0x00, 0x01, 0x02, 0x09, 0x00, 0x02, 0x02, 0x09,
.byte 0x06, 0x00, 0xfe, 0x01, 0x07, 0x00, 0x02, 0x01, 0x09, 0x00, 0xfe, 0x02, 0x07, 0x00, 0xff, 0x02, 0x07, 0x00, 0x00, 0x02, 0x08, 0x00, 0x01, 0x02, 0x09, 0x00, 0x02, 0x02, 0x09, 0x00
gUnknown_0857C648:: @ 857C648
.2byte 0

View File

@ -1,12 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnknown_085EFD64:: @ 85EFD64
.4byte 0x1F8
gUnknown_085EFD68:: @ 85EFD68
window_template 0, 4, 15, 22, 4, 14, 20
window_template 0, 7, 6, 16, 4, 14, 0x6C
null_window_template

View File

@ -1,346 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnknown_0858BBF8:: @ 858BBF8
.incbin "graphics/naming_screen/pc_icon/0.4bpp"
.align 2
gUnknown_0858BCB8:: @ 858BCB8
.incbin "graphics/naming_screen/pc_icon/1.4bpp"
.align 2
gUnknown_0858BD78:: @ 858BD78
.incbin "graphics/naming_screen/0.gbapal"
.incbin "graphics/naming_screen/1.gbapal"
.align 2
gUnknown_0858BDB8:: @ 858BDB8
.4byte gText_PkmnTransferredSomeonesPC
.4byte gText_PkmnTransferredLanettesPC
.4byte gText_PkmnBoxSomeonesPCFull
.4byte gText_PkmnBoxLanettesPCFull
gUnknown_0858BDC8:: @ 858BDC8
.string "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!$"
.align 2
gUnknown_0858BE00:: @ 858BE00
.4byte 0x000001e0, 0x000011d9, 0x000021ca, 0x000031ff
.align 2
gUnknown_0858BE10:: @ 858BE10
window_template 0x01, 0x03, 0x0a, 0x13, 0x08, 0x0a, 0x0030
window_template 0x02, 0x03, 0x0a, 0x13, 0x08, 0x0a, 0x00c8
window_template 0x03, 0x08, 0x06, 0x11, 0x02, 0x0a, 0x0030
window_template 0x03, 0x08, 0x04, 0x11, 0x02, 0x0a, 0x0052
window_template 0x00, 0x00, 0x00, 0x1e, 0x02, 0x0b, 0x0074
null_window_template
gUnknown_0858BE40:: @ 858BE40
.string "abcdef .ghijkl ,mnopqrs tuvwxyz ABCDEF .GHIJKL ,MNOPQRS TUVWXYZ 01234 56789 !?/- "
gUnknown_0858BEA0:: @ 858BEA0
.byte 0x08, 0x08, 0x06
gUnknown_0858BEA3:: @ 858BEA3
.byte 0x00, 0x0c, 0x18, 0x38, 0x44, 0x50, 0x5c, 0x7b, 0x00, 0x0c, 0x18, 0x38, 0x44, 0x50, 0x5c, 0x7b, 0x00, 0x16, 0x2c, 0x42, 0x58, 0x6e, 0x00, 0x00
gUnknown_0858BEBB:: @ 858BEBB
.byte 0x00, 0x02, 0x01
gUnknown_0858BEBE:: @ 858BEBE
.byte 0x01, 0x00, 0x02
gUnknown_0858BEC1:: @ 858BEC1
.byte 0x02, 0x01, 0x00
gUnknown_0858BEC4:: @ 858BEC4
.4byte sub_80E37B4
.4byte sub_80E37DC
.4byte sub_80E3870
.4byte sub_80E3904
gUnknown_0858BED4:: @ 858BED4
.2byte 0x0000, 0xfffc, 0xfffe, 0xffff
gUnknown_0858BEDC:: @ 858BEDC
.2byte 0x0002, 0x0003, 0x0002, 0x0001
gUnknown_0858BEE4:: @ 858BEE4
.byte 0x01, 0x02, 0x03, 0x00
gUnknown_0858BEE8:: @ 858BEE8
.4byte sub_80E40AC
.4byte sub_80E4100
.4byte sub_80E4104
.4byte sub_80E4178
gUnknown_0858BEF8:: @ 858BEF8
.2byte 0x0001, 0x0003, 0x0002
gUnknown_0858BEFE:: @ 858BEFE
.2byte 0x0004, 0x0006, 0x0005
gUnknown_0858BF04:: @ 858BF04
.4byte TaskDummy2
.4byte sub_80E4384
.4byte sub_80E43E0
.4byte sub_80E4420
.4byte sub_80E447C
gUnknown_0858BF18:: @ 858BF18
.4byte sub_80E450C
.4byte sub_80E4558
.4byte sub_80E4580
.4byte sub_80E45A4
gUnknown_0858BF28:: @ 858BF28
.4byte sub_80E468C
.4byte sub_80E4692
.4byte sub_80E46E8
gUnknown_0858BF34:: @ 858BF34
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00
gUnknown_0858BF3E:: @ 858BF3E
.byte 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
gUnknown_0858BF48:: @ 858BF48
.byte 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00
gUnknown_0858BF50:: @ 858BF50
.byte 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00
.align 2
gUnknown_0858BF58:: @ 858BF58
.4byte sub_80E4894
.4byte sub_80E4894
.4byte sub_80E48E8
.4byte sub_80E48E8
.4byte sub_80E4894
.align 2
gUnknown_0858BF6C:: @ 858BF6C
.4byte TaskDummy3
.4byte sub_80E49BC
.align 2
gUnknown_0858BF74:: @ 858BF74
window_template 0x00, 0x09, 0x08, 0x00, 0x05, 0x04, 0x0000
gUnknown_0858BF7C:: @ 858BF7C
.4byte 0x0002010D
gUnknown_0858BF80:: @ 858BF80
.4byte 0x0002010E
gUnknown_0858BF84:: @ 858BF84
.4byte 0x0002010F
gUnknown_0858BF88:: @ 858BF88
.byte 0xee, 0xdd, 0xff, 0x00
gUnknown_0858BF8C:: @ 858BF8C
.4byte gUnknown_0858BF80
.4byte gUnknown_0858BF7C
.4byte gUnknown_0858BF84
gUnknown_0858BF98:: @ 858BF98
.4byte gUnknown_08DD4620
.4byte gUnknown_08DD46E0
.4byte gUnknown_08DD47A0
gUnknown_0858BFA4:: @ 858BFA4
.byte 0x0f, 0x01, 0x02
.align 2
gUnknown_0858BFA8:: @ 858BFA8
.byte 0x00, 0x07, 0x01, 0x00, 0x01, 0x23, 0x00, 0x00
.4byte gText_YourName
.align 2
gUnknown_0858BFB4:: @ 858BFB4
.byte 0x00, 0x08, 0x02, 0x00, 0x01, 0x13, 0x00, 0x00
.4byte gText_BoxName
.align 2
gUnknown_0858BFC0:: @ 858BFC0
.byte 0x00, 0x0a, 0x03, 0x01, 0x01, 0x23, 0x00, 0x00
.4byte gText_PkmnsNickname
.align 2
gUnknown_0858BFCC:: @ 858BFCC
.byte 0x01, 0x0f, 0x04, 0x00, 0x01, 0x0b, 0x00, 0x00
.4byte gText_TellHimTheWords
.align 2
gUnknown_0858BFD8:: @ 858BFD8
.4byte gUnknown_0858BFA8
.4byte gUnknown_0858BFB4
.4byte gUnknown_0858BFC0
.4byte gUnknown_0858BFC0
.4byte gUnknown_0858BFCC
.align 2
gOamData_858BFEC:: @ 858BFEC
.2byte 0x0000, 0x0000, 0x0000, 0x0000
.align 2
gOamData_858BFF4:: @ 858BFF4
.2byte 0x0000, 0x4000, 0x0000, 0x0000
.align 2
gOamData_858BFFC:: @ 858BFFC
.2byte 0x4000, 0x8000, 0x0000, 0x0000
.align 2
gUnknown_0858C004:: @ 858C004
.byte 0xec, 0xf0, 0x05, 0x40, 0x0c, 0xf0, 0x40, 0x40, 0xec, 0xf8, 0x55, 0x40, 0x0c, 0xf8, 0x90, 0x40, 0xec, 0x00, 0xa5, 0x40, 0x0c, 0x00, 0xe0, 0x40, 0xec, 0x08, 0xf5, 0x40, 0x0c, 0x08, 0x30, 0x41
.align 2
gUnknown_0858C024:: @ 858C024
.byte 0xf4, 0xfc, 0x01, 0x40, 0x04, 0xfc, 0x20, 0x40
.align 2
gUnknown_0858C02C:: @ 858C02C
.byte 0xec, 0xf4, 0x05, 0x40, 0x0c, 0xf4, 0x40, 0x40, 0xec, 0xfc, 0x55, 0x40, 0x0c, 0xfc, 0x90, 0x40, 0xec, 0x04, 0xa5, 0x40, 0x0c, 0x04, 0xe0, 0x40
.align 2
gUnknown_0858C044:: @ 858C044
.byte 0xf8, 0xf4, 0x01, 0xc0, 0xf8, 0xfc, 0x21, 0xc0, 0xf8, 0x04, 0x41, 0xc0
.align 2
gUnknown_0858C050:: @ 858C050
.byte 0x08, 0x00, 0x00, 0x00
.4byte gUnknown_0858C004
.align 2
gUnknown_0858C058:: @ 858C058
.4byte 0x02
.4byte gUnknown_0858C024
.4byte 0x02
.4byte gUnknown_0858C024
.4byte 0x02
.4byte gUnknown_0858C024
.align 2
gUnknown_0858C070:: @ 858C070
.4byte 0x06
.4byte gUnknown_0858C02C
.align 2
gUnknown_0858C078:: @ 858C078
.4byte 0x03
.4byte gUnknown_0858C044
.align 2
gUnknown_0858C080:: @ 858C080
obj_frame_tiles gUnknown_0858BBF8, 0x00c0
obj_frame_tiles gUnknown_0858BCB8, 0x00c0
.align 2
gSpriteAnim_858C090:: @ 858C090
.2byte 0x0000, 0x0001, 0xfffe, 0x0000
.align 2
gSpriteAnim_858C098:: @ 858C098
.2byte 0x0004, 0x0008, 0x0008, 0x0008, 0xffff, 0x0000
.align 2
gSpriteAnim_858C0A4:: @ 858C0A4
.2byte 0x0000, 0x0002, 0x0001, 0x0002, 0xfffe, 0x0000
.align 2
gSpriteAnimTable_858C0B0:: @ 858C0B0
.4byte gSpriteAnim_858C090
.align 2
gSpriteAnimTable_858C0B4:: @ 858C0B4
.4byte gSpriteAnim_858C090
.4byte gSpriteAnim_858C098
.align 2
gSpriteAnimTable_858C0BC:: @ 858C0BC
.4byte gSpriteAnim_858C0A4
.align 2
gUnknown_0858C0C0:: @ 858C0C0
spr_template 0x0002, 0x0004, gOamData_858BFEC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, sub_80E4084
.align 2
gUnknown_0858C0D8:: @ 858C0D8
spr_template 0x0003, 0x0001, gOamData_858BFFC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.align 2
gUnknown_0858C0F0:: @ 858C0F0
spr_template 0x0004, 0x0004, gOamData_858BFEC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.align 2
gUnknown_0858C108:: @ 858C108
spr_template 0x0000, 0x0006, gOamData_858BFEC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.align 2
gUnknown_0858C120:: @ 858C120
spr_template 0x0001, 0x0007, gOamData_858BFEC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.align 2
gUnknown_0858C138:: @ 858C138
spr_template 0x0007, 0x0005, gOamData_858BFF4, gSpriteAnimTable_858C0B4, NULL, gDummySpriteAffineAnimTable, sub_80E3B30
.align 2
gUnknown_0858C150:: @ 858C150
spr_template 0x000a, 0x0003, gOamData_858BFEC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, sub_80E3C20
.align 2
gUnknown_0858C168:: @ 858C168
spr_template 0x000b, 0x0003, gOamData_858BFEC, gSpriteAnimTable_858C0B0, NULL, gDummySpriteAffineAnimTable, sub_80E3C6C
.align 2
gUnknown_0858C180:: @ 858C180
spr_template 0xffff, 0x0000, gOamData_858BFEC, gSpriteAnimTable_858C0BC, gUnknown_0858C080, gDummySpriteAffineAnimTable, SpriteCallbackDummy
.align 2
gUnknown_0858C198:: @ 858C198
.4byte gUnknown_0862B88D
.4byte gUnknown_0862B8AE
.4byte gUnknown_0862B8CF
.4byte gUnknown_0862B8F0
.4byte gUnknown_0862B911
.4byte gUnknown_0862B932
.4byte gUnknown_0862B953
.4byte gUnknown_0862B974
.4byte gUnknown_0862B995
.4byte gUnknown_0862B9AE
.4byte gUnknown_0862B9C7
.4byte gUnknown_0862B9E0
.align 2
gUnknown_0858C1C8:: @ 858C1C8
obj_tiles gNamingScreenRWindow_Gfx+0x280, 0x01e0, 0x0000
obj_tiles gNamingScreenRWindow_Gfx+0x460, 0x01e0, 0x0001
obj_tiles gNamingScreenRWindow_Gfx, 0x0280, 0x0002
obj_tiles gNamingScreenKeyboardButton_Gfx+0x20, 0x0100, 0x0003
obj_tiles gNamingScreenROptions_Gfx, 0x0060, 0x0004
obj_tiles gNamingScreenROptions_Gfx+0xA0, 0x0060, 0x0005
obj_tiles gNamingScreenROptions_Gfx+0x140, 0x0060, 0x0006
obj_tiles gNamingScreenCursor_Gfx, 0x0080, 0x0007
obj_tiles gNamingScreenCursor_Gfx+0xA0, 0x0080, 0x0008
obj_tiles gNamingScreenCursor_Gfx+0x140, 0x0080, 0x0009
obj_tiles gNamingScreenRightPointingTriangleTiles, 0x0020, 0x000a
obj_tiles gNamingScreenUnderscoreTiles, 0x0020, 0x000b
null_obj_tiles
.align 2
gUnknown_0858C230:: @ 858C230
obj_pal gNamingScreenMenu_Pal, 0x0000
obj_pal gNamingScreenMenu_Pal+0x20, 0x0001
obj_pal gNamingScreenMenu_Pal+0x40, 0x0002
obj_pal gNamingScreenMenu_Pal+0x60, 0x0003
obj_pal gNamingScreenMenu_Pal+0x80, 0x0004
obj_pal gNamingScreenMenu_Pal+0xA0, 0x0005
obj_pal gNamingScreenMenu_Pal+0x80, 0x0006
obj_pal gNamingScreenMenu_Pal+0x80, 0x0007
null_obj_pal

View File

@ -1,240 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnknown_0860A8C8:: @ 860A8C8
.byte 0x00, 0x13, 0x02, 0x08, 0x12, 0x15, 0x17, 0x12, 0x12, 0x19, 0x02, 0x13, 0x11, 0x02, 0x13, 0x01, 0x0f, 0x15, 0x0f, 0x0a, 0x0a, 0x0f, 0x15, 0x0f, 0x09, 0x16, 0x16, 0x12, 0x10, 0x12, 0x15, 0x09
.byte 0x12, 0x15, 0x09, 0x13, 0x13, 0x10, 0x01, 0x13, 0x06, 0x11, 0x09, 0x02, 0x02, 0x14, 0x02, 0x08, 0x0a, 0x11, 0x09, 0x09, 0x10, 0x0f, 0x02, 0x14, 0x10, 0x10, 0x15, 0x15, 0x12, 0x09, 0x0e, 0x14
.byte 0x14, 0x0d, 0x15, 0x09, 0x09, 0x0b, 0x0b, 0x0b, 0x02, 0x02, 0x0e, 0x08, 0x08, 0x17, 0x15, 0x02, 0x13, 0x0f, 0x0f, 0x02, 0x0f, 0x15, 0x13, 0x02, 0x0b, 0x0c, 0x13, 0x0f, 0x01, 0x01, 0x14, 0x09
.byte 0x13, 0x14, 0x0a, 0x09, 0x15, 0x15, 0x02, 0x10, 0x15, 0x10, 0x02, 0x0f, 0x02, 0x06, 0x06, 0x0e, 0x0e, 0x12, 0x0b, 0x12, 0x13, 0x11, 0x11, 0x11, 0x13, 0x19, 0x14, 0x0f, 0x13, 0x16, 0x17, 0x0e
.byte 0x0e, 0x10, 0x09, 0x19, 0x05, 0x12, 0x19, 0x16, 0x17, 0x01, 0x13, 0x13, 0x13, 0x15, 0x15, 0x13, 0x19, 0x16, 0x17, 0x02, 0x0f, 0x09, 0x0d, 0x12, 0x12, 0x02, 0x09, 0x12, 0x15, 0x17, 0x15, 0x15
.byte 0x09, 0x12, 0x10, 0x11, 0x0f, 0x0a, 0x11, 0x0a, 0x02, 0x0f, 0x0b, 0x16, 0x12, 0x13, 0x13, 0x13, 0x11, 0x12, 0x14, 0x12, 0x13, 0x16, 0x11, 0x12, 0x13, 0x02, 0x10, 0x11, 0x11, 0x11, 0x10, 0x13
.byte 0x02, 0x11, 0x0b, 0x02, 0x14, 0x14, 0x12, 0x13, 0x01, 0x14, 0x0b, 0x14, 0x08, 0x09, 0x0f, 0x05, 0x09, 0x15, 0x09, 0x0d, 0x15, 0x13, 0x15, 0x0f, 0x13, 0x09, 0x17, 0x17, 0x0a, 0x08, 0x02, 0x02
.byte 0x05, 0x0f, 0x02, 0x15, 0x09, 0x09, 0x19, 0x15, 0x0e, 0x01, 0x13, 0x02, 0x0f, 0x07, 0x02, 0x08, 0x17, 0x02, 0x13, 0x16, 0x17, 0x19, 0x0e, 0x09, 0x0e, 0x19, 0x17, 0x18, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x15, 0x09, 0x12, 0x10, 0x17, 0x02, 0x12, 0x19, 0x12, 0x08
.byte 0x0f, 0x15, 0x0b, 0x08, 0x11, 0x08, 0x0f, 0x02, 0x10, 0x10, 0x13, 0x09, 0x14, 0x0a, 0x01, 0x14, 0x12, 0x15, 0x13, 0x15, 0x07, 0x11, 0x11, 0x03, 0x11, 0x19, 0x19, 0x13, 0x12, 0x01, 0x13, 0x14
.byte 0x0e, 0x17, 0x01, 0x0b, 0x09, 0x04, 0x0f, 0x15, 0x03, 0x19, 0x04, 0x15, 0x13, 0x01, 0x0f, 0x0e, 0x0e, 0x15, 0x09, 0x0e, 0x17, 0x13, 0x09, 0x09, 0x0a, 0x08, 0x0f, 0x0f, 0x13, 0x13, 0x10, 0x10
.byte 0x14, 0x12, 0x12, 0x09, 0x14, 0x14, 0x11, 0x11, 0x12, 0x01, 0x01, 0x18, 0x02, 0x10, 0x08, 0x0b, 0x0b, 0x0e, 0x13, 0x09, 0x0d, 0x13, 0x11, 0x11, 0x14, 0x01, 0x01, 0x0b, 0x15, 0x02, 0x15, 0x09
.byte 0x0e, 0x11, 0x11, 0x11, 0x0c, 0x0b, 0x0f, 0x09, 0x14, 0x14, 0x14, 0x09, 0x09, 0x08, 0x0f, 0x15, 0x09, 0x09, 0x09, 0x09, 0x19, 0x17, 0x0d, 0x01, 0x01, 0x11, 0x14, 0x11
gUnknown_0860AA64:: @ 860AA64
.byte 0x00, 0x05, 0x01, 0x01, 0x00, 0x0f, 0x01, 0x04, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x00, 0xff
gUnknown_0860AA80:: @ 860AA80
.byte 0x06, 0x1e, 0xfe, 0x0f, 0x06, 0x1e, 0xff, 0x00
.align 2
gUnknown_0860AA88:: @ 860AA88
.4byte pokemonanimfunc_00
.4byte pokemonanimfunc_01
.4byte pokemonanimfunc_02
.4byte pokemonanimfunc_03
.4byte pokemonanimfunc_04
.4byte pokemonanimfunc_05
.4byte pokemonanimfunc_06
.4byte pokemonanimfunc_07
.4byte pokemonanimfunc_08
.4byte pokemonanimfunc_09
.4byte pokemonanimfunc_0A
.4byte pokemonanimfunc_0B
.4byte pokemonanimfunc_0C
.4byte pokemonanimfunc_0D
.4byte pokemonanimfunc_0E
.4byte pokemonanimfunc_0F
.4byte pokemonanimfunc_10
.4byte pokemonanimfunc_11
.4byte pokemonanimfunc_12
.4byte pokemonanimfunc_13
.4byte pokemonanimfunc_14
.4byte pokemonanimfunc_15
.4byte pokemonanimfunc_16
.4byte pokemonanimfunc_17
.4byte pokemonanimfunc_18
.4byte pokemonanimfunc_19
.4byte pokemonanimfunc_1A
.4byte pokemonanimfunc_1B
.4byte pokemonanimfunc_1C
.4byte pokemonanimfunc_1D
.4byte pokemonanimfunc_1E
.4byte pokemonanimfunc_1F
.4byte pokemonanimfunc_20
.4byte pokemonanimfunc_21
.4byte pokemonanimfunc_22
.4byte pokemonanimfunc_23
.4byte pokemonanimfunc_24
.4byte pokemonanimfunc_25
.4byte pokemonanimfunc_26
.4byte pokemonanimfunc_27
.4byte pokemonanimfunc_28
.4byte pokemonanimfunc_29
.4byte pokemonanimfunc_2A
.4byte pokemonanimfunc_2B
.4byte pokemonanimfunc_2C
.4byte pokemonanimfunc_2D
.4byte pokemonanimfunc_2E
.4byte pokemonanimfunc_2F
.4byte pokemonanimfunc_30
.4byte pokemonanimfunc_31
.4byte pokemonanimfunc_32
.4byte pokemonanimfunc_33
.4byte pokemonanimfunc_34
.4byte pokemonanimfunc_35
.4byte pokemonanimfunc_36
.4byte pokemonanimfunc_37
.4byte pokemonanimfunc_38
.4byte pokemonanimfunc_39
.4byte pokemonanimfunc_3A
.4byte pokemonanimfunc_3B
.4byte pokemonanimfunc_3C
.4byte pokemonanimfunc_3D
.4byte pokemonanimfunc_3E
.4byte pokemonanimfunc_3F
.4byte pokemonanimfunc_40
.4byte pokemonanimfunc_41
.4byte pokemonanimfunc_42
.4byte pokemonanimfunc_43
.4byte pokemonanimfunc_44
.4byte pokemonanimfunc_45
.4byte pokemonanimfunc_46
.4byte pokemonanimfunc_47
.4byte pokemonanimfunc_48
.4byte pokemonanimfunc_49
.4byte pokemonanimfunc_4A
.4byte pokemonanimfunc_4B
.4byte pokemonanimfunc_4C
.4byte pokemonanimfunc_4D
.4byte pokemonanimfunc_4E
.4byte pokemonanimfunc_4F
.4byte pokemonanimfunc_50
.4byte pokemonanimfunc_51
.4byte pokemonanimfunc_52
.4byte pokemonanimfunc_53
.4byte pokemonanimfunc_54
.4byte pokemonanimfunc_55
.4byte pokemonanimfunc_56
.4byte pokemonanimfunc_57
.4byte pokemonanimfunc_58
.4byte pokemonanimfunc_59
.4byte pokemonanimfunc_5A
.4byte pokemonanimfunc_5B
.4byte pokemonanimfunc_5C
.4byte pokemonanimfunc_5D
.4byte pokemonanimfunc_5E
.4byte pokemonanimfunc_5F
.4byte pokemonanimfunc_60
.4byte pokemonanimfunc_61
.4byte pokemonanimfunc_62
.4byte pokemonanimfunc_63
.4byte pokemonanimfunc_64
.4byte pokemonanimfunc_65
.4byte pokemonanimfunc_66
.4byte pokemonanimfunc_67
.4byte pokemonanimfunc_68
.4byte pokemonanimfunc_69
.4byte pokemonanimfunc_6A
.4byte pokemonanimfunc_6B
.4byte pokemonanimfunc_6C
.4byte pokemonanimfunc_6D
.4byte pokemonanimfunc_6E
.4byte pokemonanimfunc_6F
.4byte pokemonanimfunc_70
.4byte pokemonanimfunc_71
.4byte pokemonanimfunc_72
.4byte pokemonanimfunc_73
.4byte pokemonanimfunc_74
.4byte pokemonanimfunc_75
.4byte pokemonanimfunc_76
.4byte pokemonanimfunc_77
.4byte pokemonanimfunc_78
.4byte pokemonanimfunc_79
.4byte pokemonanimfunc_7A
.4byte pokemonanimfunc_7B
.4byte pokemonanimfunc_7C
.4byte pokemonanimfunc_7D
.4byte pokemonanimfunc_7E
.4byte pokemonanimfunc_7F
.4byte pokemonanimfunc_80
.4byte pokemonanimfunc_81
.4byte pokemonanimfunc_82
.4byte pokemonanimfunc_83
.4byte pokemonanimfunc_84
.4byte pokemonanimfunc_85
.4byte pokemonanimfunc_86
.4byte pokemonanimfunc_87
.4byte pokemonanimfunc_88
.4byte pokemonanimfunc_89
.4byte pokemonanimfunc_8A
.4byte pokemonanimfunc_8B
.4byte pokemonanimfunc_8C
.4byte pokemonanimfunc_8D
.4byte pokemonanimfunc_8E
.4byte pokemonanimfunc_8F
.4byte pokemonanimfunc_90
.4byte pokemonanimfunc_91
.4byte pokemonanimfunc_92
.4byte pokemonanimfunc_93
.4byte pokemonanimfunc_94
.4byte pokemonanimfunc_95
.4byte pokemonanimfunc_96
gUnknown_0860ACE4:: @ 860ACE4
.byte 0x60, 0x5f, 0x02, 0x5e, 0x03, 0x46, 0x6d, 0x3e, 0x6e, 0x6f, 0x70, 0x3f, 0x71, 0x13, 0x72, 0x6c, 0x6b, 0x3a, 0x64, 0x14, 0x4f, 0x5d, 0x0f, 0x4c, 0x61, 0x57, 0x58, 0x67, 0x66, 0x59, 0x74, 0x73
.byte 0x5a, 0x75, 0x76, 0x5b, 0x77, 0x78, 0x65, 0x63, 0x5c, 0x62, 0x6a, 0x69, 0x68, 0x7b, 0x7a, 0x79, 0x7e, 0x7d, 0x7c, 0x81, 0x80, 0x7f, 0x84, 0x82, 0x83, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b
.byte 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96
gUnknown_0860AD2F:: @ 860AD2F
.byte 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02, 0x01
.align 2
gSpriteAffineAnim_860AD48:: @ 860AD48
obj_rot_scal_anim_frame 0x100, 0x100, 0, 0
obj_rot_scal_anim_end
.align 2
gSpriteAffineAnim_860AD58:: @ 860AD58
obj_rot_scal_anim_frame -0x100, 0x100, 0, 0
obj_rot_scal_anim_end
.align 2
gSpriteAffineAnimTable_860AD68:: @ 860AD68
.4byte gSpriteAffineAnim_860AD48
.4byte gSpriteAffineAnim_860AD58
gUnknown_0860AD70:: @ 860AD70
.byte 0xff, 0xff, 0x06, 0x02, 0x00, 0x06, 0xfe, 0x02, 0x06, 0x02, 0x00, 0x06, 0xfe, 0xfe, 0x06, 0x02, 0x00, 0x06, 0xfe, 0x02, 0x06, 0x02, 0x00, 0x06, 0xff, 0xff, 0x06, 0x00, 0x00, 0x00
gUnknown_0860AD8E:: @ 860AD8E
.byte 0x00, 0x08, 0x08, 0x08, 0xf8, 0x0c, 0xf8, 0x08, 0x0c, 0x08, 0xf8, 0x0c, 0xf8, 0x08, 0x0c, 0x08, 0xf8, 0x0c, 0xf8, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x08, 0xf8, 0x18, 0xf8, 0x08
.byte 0x18, 0x08, 0xf8, 0x18, 0xf8, 0x08, 0x18, 0x08, 0xf8, 0x18, 0xf8, 0x00, 0x18, 0x00, 0x00, 0x00
gUnknown_0860ADBE:: @ 860ADBE
.byte 0x01, 0x01, 0x0c, 0xfe, 0x00, 0x0c, 0x01, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00
gUnknown_0860ADCC:: @ 860ADCC
.byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x00, 0x0f, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00
gUnknown_0860AE1C:: @ 860AE1C
.byte 0x00, 0x05, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00
.byte 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00
.byte 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00
.byte 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00
gUnknown_0860AE54:: @ 860AE54
.byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x00, 0x14, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00
.align 2
gUnknown_0860AE7C:: @ 860AE7C
.4byte gUnknown_0860ADCC
.4byte gUnknown_0860AE1C
.4byte gUnknown_0860AE54
.align 1
gUnknown_0860AE88:: @ 860AE88
.2byte 0x001f, 0x03e0, 0x7c00, 0x0000

View File

@ -1,20 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gSaveSectionOffsets:: @ 85CDC00
.2byte 0, 0xF2C
.2byte 0, 0xF80
.2byte 0xF80, 0xF80
.2byte 0x1F00, 0xF80
.2byte 0x2E80, 0xF08
.2byte 0, 0xF80
.2byte 0xF80, 0xF80
.2byte 0x1F00, 0xF80
.2byte 0x2E80, 0xF80
.2byte 0x3E00, 0xF80
.2byte 0x4D80, 0xF80
.2byte 0x5D00, 0xF80
.2byte 0x6C80, 0xF80
.2byte 0x7C00, 0x7D0

View File

@ -3,55 +3,55 @@
.section .rodata
.align 2
.align 2
gUnknown_862B810:: @ 862B810
.string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 26}others$"
.string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 26}others$"
gUnknown_862B832:: @ 862B832
.string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L$"
.string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L$"
gUnknown_862B84B:: @ 862B84B
.string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $"
.string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $"
gUnknown_862B86C:: @ 862B86C
.string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $"
.string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $"
gUnknown_0862B88D:: @ 862B88D
.string "{CLEAR 11}a{CLEAR 6}b{CLEAR 6}c{CLEAR 26}d{CLEAR 6}e{CLEAR 6}f{CLEAR 6} {CLEAR 30}.$"
.string "{CLEAR 11}a{CLEAR 6}b{CLEAR 6}c{CLEAR 26}d{CLEAR 6}e{CLEAR 6}f{CLEAR 6} {CLEAR 30}.$"
gUnknown_0862B8AE:: @ 862B8AE
.string "{CLEAR 11}g{CLEAR 6}h{CLEAR 7}i{CLEAR 27}j{CLEAR 7}k{CLEAR 7}l{CLEAR 7} {CLEAR 30},$"
.string "{CLEAR 11}g{CLEAR 6}h{CLEAR 7}i{CLEAR 27}j{CLEAR 7}k{CLEAR 7}l{CLEAR 7} {CLEAR 30},$"
gUnknown_0862B8CF:: @ 862B8CF
.string "{CLEAR 11}m{CLEAR 6}n{CLEAR 6}o{CLEAR 26}p{CLEAR 6}q{CLEAR 7}r{CLEAR 6}s{CLEAR 27} $"
.string "{CLEAR 11}m{CLEAR 6}n{CLEAR 6}o{CLEAR 26}p{CLEAR 6}q{CLEAR 7}r{CLEAR 6}s{CLEAR 27} $"
gUnknown_0862B8F0:: @ 862B8F0
.string "{CLEAR 11}t{CLEAR 6}u{CLEAR 6}v{CLEAR 26}w{CLEAR 6}x{CLEAR 6}y{CLEAR 6}z{CLEAR 26} $"
.string "{CLEAR 11}t{CLEAR 6}u{CLEAR 6}v{CLEAR 26}w{CLEAR 6}x{CLEAR 6}y{CLEAR 6}z{CLEAR 26} $"
gUnknown_0862B911:: @ 862B911
.string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 6} {CLEAR 30}.$"
.string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 6} {CLEAR 30}.$"
gUnknown_0862B932:: @ 862B932
.string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L{CLEAR 6} {CLEAR 30},$"
.string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L{CLEAR 6} {CLEAR 30},$"
gUnknown_0862B953:: @ 862B953
.string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $"
.string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $"
gUnknown_0862B974:: @ 862B974
.string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $"
.string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $"
gUnknown_0862B995:: @ 862B995
.string "{CLEAR 11}0{CLEAR 16}1{CLEAR 16}2{CLEAR 16}3{CLEAR 16}4{CLEAR 16} $"
.string "{CLEAR 11}0{CLEAR 16}1{CLEAR 16}2{CLEAR 16}3{CLEAR 16}4{CLEAR 16} $"
gUnknown_0862B9AE:: @ 862B9AE
.string "{CLEAR 11}5{CLEAR 16}6{CLEAR 16}7{CLEAR 16}8{CLEAR 16}9{CLEAR 16} $"
.string "{CLEAR 11}5{CLEAR 16}6{CLEAR 16}7{CLEAR 16}8{CLEAR 16}9{CLEAR 16} $"
gUnknown_0862B9C7:: @ 862B9C7
.string "{CLEAR 12}!{CLEAR 17}?{CLEAR 16}{CLEAR 16}{CLEAR 16}/{CLEAR 17}-$"
.string "{CLEAR 12}!{CLEAR 17}?{CLEAR 16}{CLEAR 16}{CLEAR 16}/{CLEAR 17}-$"
gUnknown_0862B9E0:: @ 862B9E0
.string "{CLEAR 11}{CLEAR 16}{CLEAR 16}{CLEAR 18}{CLEAR 19}{CLEAR 18} $"
.string "{CLEAR 11}{CLEAR 16}{CLEAR 16}{CLEAR 18}{CLEAR 19}{CLEAR 18} $"
gUnknown_0862B9F9:: @ 862B9F9
.string "ABCDE$"

View File

@ -1,7 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnknown_085B2B44:: @ 85B2B44
.byte 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 530 B

View File

@ -300,9 +300,6 @@ $(FONTGFXDIR)/keypad_icons.4bpp: %.4bpp: %.png
graphics/title_screen/pokemon_logo.gbapal: %.gbapal: %.pal
$(GFX) $< $@ -num_colors 224
graphics/intro/copyright.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 39
graphics/link_games/pkmnjump_bg.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 63

View File

@ -1,12 +1,6 @@
#ifndef GUARD_BLEND_PALETTE_H
#define GUARD_BLEND_PALETTE_H
// Exported type declarations
void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor);
// Exported RAM declarations
// Exported ROM declarations
void BlendPalette(u16, u16, u8, u16);
#endif //GUARD_BLEND_PALETTE_H
#endif // GUARD_BLEND_PALETTE_H

15
include/constants/rgb.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef GUARD_RGB_H
#define GUARD_RGB_H
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
#define RGB_BLACK RGB(0, 0, 0)
#define RGB_WHITE RGB(31, 31, 31)
#define RGB_RED RGB(31, 0, 0)
#define RGB_GREEN RGB(0, 31, 0)
#define RGB_BLUE RGB(0, 0, 31)
#define RGB_YELLOW RGB(31, 31, 0)
#define RGB_MAGENTA RGB(31, 0, 31)
#define RGB_CYAN RGB(0, 31, 31)
#endif // GUARD_RGB_H

View File

@ -0,0 +1,39 @@
#ifndef GUARD_CONSTANTS_WEATHER_H
#define GUARD_CONSTANTS_WEATHER_H
#define WEATHER_NONE 0
#define WEATHER_CLOUDS 1
#define WEATHER_SUNNY 2
#define WEATHER_RAIN_LIGHT 3
#define WEATHER_SNOW 4
#define WEATHER_RAIN_MED 5
#define WEATHER_FOG_1 6
#define WEATHER_ASH 7
#define WEATHER_SANDSTORM 8
#define WEATHER_FOG_2 9
#define WEATHER_FOG_3 10
#define WEATHER_SHADE 11
#define WEATHER_DROUGHT 12
#define WEATHER_RAIN_HEAVY 13
#define WEATHER_BUBBLES 14
#define WEATHER_ROUTE119_CYCLE 20
#define WEATHER_ROUTE123_CYCLE 21
// These are used in maps' coord_weather_event entries.
// They are not a one-to-one mapping with the engine's
// internal weather constants above.
#define COORD_EVENT_WEATHER_CLOUDS 1
#define COORD_EVENT_WEATHER_SUNNY 2
#define COORD_EVENT_WEATHER_RAIN_LIGHT 3
#define COORD_EVENT_WEATHER_SNOW 4
#define COORD_EVENT_WEATHER_RAIN_MED 5
#define COORD_EVENT_WEATHER_FOG_1 6
#define COORD_EVENT_WEATHER_FOG_2 7
#define COORD_EVENT_WEATHER_ASH 8
#define COORD_EVENT_WEATHER_SANDSTORM 9
#define COORD_EVENT_WEATHER_SHADE 10
#define COORD_EVENT_WEATHER_DROUGHT 11
#define COORD_EVENT_WEATHER_ROUTE119_CYCLE 20
#define COORD_EVENT_WEATHER_ROUTE123_CYCLE 21
#endif // GUARD_CONSTANTS_WEATHER_H

View File

@ -0,0 +1,6 @@
#ifndef GUARD_COORD_EVENT_WEATHER_H
#define GUARD_COORD_EVENT_WEATHER_H
void DoCoordEventWeather(u8);
#endif // GUARD_COORD_EVENT_WEATHER_H

View File

@ -78,5 +78,6 @@ void FieldEffectStop(struct Sprite *sprite, u8 id);
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
void sub_80B7FC8(void);
void FieldEffectActiveListRemove(u8 id);
void MultiplyInvertedPaletteRGBComponents(u16, u8, u8, u8);
#endif //GUARD_FIELD_EFFECTS_H

View File

@ -1,7 +1,31 @@
#ifndef GUARD_FIELDMAPOBJHELP_H
#define GUARD_FIELDMAPOBJHELP_H
#ifndef GUARD_FIELD_MAP_OBJ_HELPERS_H
#define GUARD_FIELD_MAP_OBJ_HELPERS_H
// Exported type declarations
// Exported RAM declarations
extern u8 *gUnknown_020375B8;
// Exported ROM declarations
void sub_8097AC8(struct Sprite *);
void npc_sync_anim_pause_bits(struct MapObject *);
void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
u8 sub_8097F78(struct MapObject *);
bool8 obj_npc_ministep(struct Sprite *sprite);
bool8 sub_80976EC(struct Sprite *sprite);
void sub_80976DC(struct Sprite *, u8);
void sub_809783C(struct Sprite *, u8, u8, u8);
void DoShadowFieldEffect(struct MapObject *);
u8 sub_809785C(struct Sprite *);
u8 sub_80978E4(struct Sprite *);
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
bool8 sub_80979BC(struct Sprite *);
void sub_8097750(struct Sprite *);
bool8 sub_8097758(struct Sprite *);
void sub_8097FA4(struct MapObject *);
void sub_8098044(u8);
void UnfreezeMapObjects(void);
void FreezeMapObjectsExceptOne(u8 mapObjectId);
void sub_8097B78(u8, u8);
#endif
#endif //GUARD_FIELD_MAP_OBJ_HELPERS_H

View File

@ -34,5 +34,6 @@ void sub_808BCE8(void);
void sub_808D074(u8);
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8);
#endif //GUARD_FIELD_PLAYER_AVATAR_H

View File

@ -2,5 +2,7 @@
#define GUARD_FIELD_SPECIALS_H
u8 GetLeadMonIndex(void);
u8 sub_813B260(void);
u16 get_unknown_box_id(void);
#endif // GUARD_FIELD_SPECIALS_H

View File

@ -1,12 +1,177 @@
#ifndef GUARD_WEATHER_H
#define GUARD_WEATHER_H
void fade_screen(u8, s8);
#include "sprite.h"
// Controls how the weather should be changing the screen palettes.
enum {
WEATHER_PAL_STATE_CHANGING_WEATHER,
WEATHER_PAL_STATE_SCREEN_FADING_IN,
WEATHER_PAL_STATE_SCREEN_FADING_OUT,
WEATHER_PAL_STATE_IDLE,
};
struct Weather
{
union
{
struct
{
struct Sprite *rainSprites[24];
struct Sprite *snowflakeSprites[101];
struct Sprite *cloudSprites[3];
} s1;
struct
{
u8 filler0[0xA0];
struct Sprite *fog1Sprites[20];
struct Sprite *ashSprites[20];
struct Sprite *fog2Sprites[20];
struct Sprite *sandstormSprites1[20];
struct Sprite *sandstormSprites2[5];
} s2;
} sprites;
u8 gammaShifts[19][32];
u8 altGammaShifts[19][32];
s8 gammaIndex;
s8 gammaTargetIndex;
u8 gammaStepDelay;
u8 gammaStepFrameCounter;
u16 fadeDestColor;
u8 palProcessingState;
u8 fadeScreenCounter;
bool8 readyForInit;
u8 taskId;
u8 unknown_6CA;
u8 unknown_6CB;
u16 initStep;
u16 finishStep;
u8 currWeather;
u8 nextWeather;
u8 weatherGfxLoaded;
bool8 weatherChangeComplete;
u8 weatherPicSpritePalIndex;
u8 altGammaSpritePalIndex;
u16 unknown_6D6;
u8 unknown_6D8;
u8 unknown_6D9;
u8 rainSpriteCount;
u8 unknown_6DB;
u8 unknown_6DC;
u8 rainStrength;
/*0x6DE*/ u8 cloudSpritesCreated;
u8 filler_6DF[1];
u16 unknown_6E0;
u16 unknown_6E2;
u8 snowflakeSpriteCount;
u8 unknown_6E5;
u16 unknown_6E6;
u16 thunderCounter;
u8 unknown_6EA;
u8 unknown_6EB;
u8 unknown_6EC;
u8 unknown_6ED;
u16 fog1ScrollPosX;
u16 unknown_6F0;
u16 unknown_6F2;
u8 lightenedFogSpritePals[6];
u8 lightenedFogSpritePalsCount;
u8 fog1SpritesCreated;
u16 unknown_6FC;
u16 unknown_6FE;
u8 ashSpritesCreated;
u8 filler_701[3];
u32 unknown_704;
u32 unknown_708;
u8 filler_70C[2];
u16 unknown_70E;
u16 unknown_710;
u16 unknown_712;
u16 unknown_714;
u8 sandstormSprites1Created;
u8 sandstormSprites2Created;
u16 unknown_718;
u16 unknown_71A;
u16 unknown_71C;
u16 unknown_71E;
u16 unknown_720;
u16 unknown_722;
u8 fog2SpritesCreated;
u8 filler_725[1];
u16 unknown_726;
u16 unknown_728;
u16 unknown_72A;
u16 unknown_72C;
u8 unknown_72E;
u8 filler_72F;
u16 currBlendEVA;
u16 currBlendEVB;
u16 targetBlendEVA;
u16 targetBlendEVB;
u8 blendUpdateCounter;
u8 blendFrameCounter;
u8 blendDelay;
u8 filler_73B[0x3C-0x3B];
s16 unknown_73C;
s16 unknown_73E;
s16 unknown_740;
s16 unknown_742;
u8 filler_744[0xD-4];
s8 loadDroughtPalsIndex;
u8 loadDroughtPalsOffset;
};
void StartWeather(void);
void ChangeWeather(u8 weather);
void sub_807C988(u8 effect);
void sub_807C9B4(u8 effect);
void Task_WeatherInit(u8);
void Task_WeatherMain(u8);
void sub_807CAE8(void);
void nullsub_38(void);
void SetWeatherScreenFadeOut(void);
enum
{
FADE_FROM_BLACK,
FADE_TO_BLACK,
FADE_FROM_WHITE,
FADE_TO_WHITE,
};
void FadeScreen(u8, s8);
// ...
void UpdateSpritePaletteWithWeather(u8 tag);
void ApplyWeatherGammaShiftToPal(u8);
// ...
void Weather_SetBlendCoeffs(u8, u8);
// ...
void PlayRainSoundEffect(void);
// ...
void SetSav1Weather(u32);
u8 GetSav1Weather(void);
void sub_80AEDBC(void);
void SetSav1WeatherFromCurrMapHeader(void);
// ...
void DoCurrentWeather(void);
void sub_8080750();
bool8 IsWeatherNotFadingIn(void);
bool8 IsWeatherChangeComplete(void);
void SetWeather(u32);
void UpdateWeatherPerDay(u16);
void PreservePaletteInWeather(u8 index);
void ResetPreservedPalettesInWeather(void);
extern void ResetDroughtWeatherPaletteLoading(void);
void ResetDroughtWeatherPaletteLoading(void);
bool8 LoadDroughtWeatherPalettes(void);
u8 GetCurrentWeather(void);
void LoadCustomWeatherSpritePalette(const u16 *palette);
extern struct Weather gWeather;
extern struct Weather *const gWeatherPtr;
#endif // GUARD_WEATHER_H

View File

@ -60,11 +60,6 @@
#define TOTAL_OBJ_TILE_COUNT 1024
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
#define RGB_BLACK RGB(0, 0, 0)
#define RGB_WHITE RGB(31, 31, 31)
#define WIN_RANGE(a, b) (((a) << 8) | (b))
#endif // GUARD_GBA_DEFINES

View File

@ -122,6 +122,27 @@
#define DmaFillLarge32(dmaNum, value, dest, size, block) DmaFillLarge(dmaNum, value, dest, size, block, 32)
#define DmaClearLarge(dmaNum, dest, size, block, bit) \
{ \
void *_dest = dest; \
u32 _size = size; \
while (1) \
{ \
DmaFill##bit(dmaNum, 0, _dest, (block)); \
_dest += (block); \
_size -= (block); \
if (_size <= (block)) \
{ \
DmaFill##bit(dmaNum, 0, _dest, _size); \
break; \
} \
} \
}
#define DmaClearLarge16(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 16)
#define DmaClearLarge32(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 32)
#define DmaCopyDefvars(dmaNum, src, dest, size, bit) \
{ \
const void *_src = src; \

View File

@ -38,6 +38,9 @@
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
#define HEAP_SIZE 0x1C000
extern u8 gStringVar1[];

View File

@ -195,8 +195,10 @@ extern struct LinkPlayer gLinkPlayers[5];
extern u16 word_3002910[];
extern bool8 gReceivedRemoteLinkPlayers;
extern u32 gUnknown_020223C0;
extern bool8 gLinkVSyncDisabled;
extern u32 gLinkStatus;
void Task_DestroySelf(u8);
void Task_DestroySelf(u8 taskId);
void OpenLink(void);
void CloseLink(void);
u16 LinkMain2(const u16 *);

View File

@ -66,5 +66,7 @@ void InitFlashTimer(void);
void DoSoftReset(void);
void ClearPokemonCrySongs(void);
void RestoreSerialTimer3IntrHandlers(void);
void StartTimer1(void);
void SeedRngAndSetTrainerId(void);
#endif // GUARD_MAIN_H

View File

@ -1,34 +0,0 @@
//
// Created by scott on 9/7/2017.
//
#ifndef GUARD_MAP_OBJ_8097404_H
#define GUARD_MAP_OBJ_8097404_H
// Exported type declarations
// Exported RAM declarations
extern void *gUnknown_020375B8;
// Exported ROM declarations
void sub_8097AC8(struct Sprite *);
void npc_sync_anim_pause_bits(struct MapObject *);
void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
u8 sub_8097F78(struct MapObject *);
bool8 obj_npc_ministep(struct Sprite *sprite);
bool8 sub_80976EC(struct Sprite *sprite);
void sub_80976DC(struct Sprite *, u8);
void sub_809783C(struct Sprite *, u8, u8, u8);
void DoShadowFieldEffect(struct MapObject *);
u8 sub_809785C(struct Sprite *);
u8 sub_80978E4(struct Sprite *);
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
bool8 sub_80979BC(struct Sprite *);
void sub_8097750(struct Sprite *);
bool8 sub_8097758(struct Sprite *);
void sub_8097FA4(struct MapObject *);
void sub_8098044(u8);
void UnfreezeMapObjects(void);
void sub_80974D0(u8 mapObjectId);
#endif //GUARD_MAP_OBJ_8097404_H

View File

@ -36,7 +36,7 @@ void copy_decompressed_tile_data_to_vram_autofree(u8 arg0, const void *arg1, boo
s8 ProcessMenuInputNoWrap_(void);
void do_scheduled_bg_tilemap_copies_to_vram(void);
void clear_scheduled_bg_copies_to_vram(void);
void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3);
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
void sub_8197DF8(u8 windowId, bool8 copyToVram);

View File

@ -0,0 +1,6 @@
#ifndef GUARD_MYSTERY_EVENT_MENU_H
#define GUARD_MYSTERY_EVENT_MENU_H
void CB2_InitMysteryEventMenu(void);
#endif // GUARD_MYSTERY_EVENT_MENU_H

View File

@ -1,12 +1,89 @@
#ifndef GUARD_NAMING_SCREEN_H
#define GUARD_NAMING_SCREEN_H
#define NAMING_SCREEN_PLAYER 0
#define NAMING_SCREEN_BOX 1
#define NAMING_SCREEN_CAUGHT_MON 2
#define NAMING_SCREEN_3 3
#define NAMING_SCREEN_WALDA 4
#include "main.h"
void DoNamingScreen(u8 caseId, u8* dst, u16 monSpecies, u8 monGender, u32 monPersonality, void (*callback)(void));
#define KBEVENT_NONE 0
#define KBEVENT_PRESSED_A 5
#define KBEVENT_PRESSED_B 6
#define KBEVENT_PRESSED_SELECT 8
#define KBEVENT_PRESSED_START 9
enum
{
NAMING_SCREEN_PLAYER,
NAMING_SCREEN_BOX,
NAMING_SCREEN_CAUGHT_MON,
NAMING_SCREEN_3,
NAMING_SCREEN_WALDA,
};
struct NamingScreenTemplate
{
u8 copyExistingString;
u8 maxChars;
u8 iconFunction;
u8 addGenderIcon;
u8 initialPage;
u8 unused;
const u8 *title;
};
struct NamingScreenData {
/*0x0*/ u8 tilemapBuffer1[0x800];
/*0x800*/ u8 tilemapBuffer2[0x800];
/*0x800*/ u8 tilemapBuffer3[0x800];
/*0x1800*/ u8 textBuffer[0x10];
/*0x1810*/ u8 tileBuffer[0x600];
/*0x1E10*/ u8 state;
/*0x1E11*/ u8 windows[5];
/*0x1E16*/ u16 inputCharBaseXPos;
/*0x1E18*/ u16 bg1vOffset;
/*0x1E1A*/ u16 bg2vOffset;
/*0x1E1C*/ u16 bg1Priority;
/*0x1E1E*/ u16 bg2Priority;
/*0x1E20*/ u8 bgToReveal;
/*0x1E21*/ u8 bgToHide;
/*0x1E22*/ u8 currentPage;
/*0x1E23*/ u8 cursorSpriteId;
/*0x1E24*/ u8 selectBtnFrameSpriteId;
/*0x1E25*/ u8 keyRepeatStartDelayCopy;
/*0x1E28*/ const struct NamingScreenTemplate *template;
/*0x1E2C*/ u8 templateNum;
/*0x1E30*/ u8 *destBuffer;
/*0x1E34*/ u16 monSpecies;
/*0x1E36*/ u16 monGender;
/*0x1E38*/ u32 monPersonality;
/*0x1E3C*/ MainCallback returnCallback;
};
enum
{
PAGE_UPPER,
PAGE_LOWER,
PAGE_OTHERS,
};
enum
{
MAIN_STATE_BEGIN_FADE_IN,
MAIN_STATE_WAIT_FADE_IN,
MAIN_STATE_HANDLE_INPUT,
MAIN_STATE_MOVE_TO_OK_BUTTON,
MAIN_STATE_START_PAGE_SWAP,
MAIN_STATE_WAIT_PAGE_SWAP,
MAIN_STATE_6,
MAIN_STATE_UPDATE_SENT_TO_PC_MESSAGE,
MAIN_STATE_BEGIN_FADE_OUT,
};
enum
{
INPUT_STATE_DISABLED,
INPUT_STATE_ENABLED,
INPUT_STATE_2,
};
void DoNamingScreen(u8 templateNum, u8 *destBuffer, u16 monSpecies, u16 monGender, u32 monPersonality, MainCallback returnCallback);
#endif // GUARD_NAMING_SCREEN_H

View File

@ -6,16 +6,22 @@
extern const u16 gUnknown_0860F074[];
void sub_81971D0(void);
void sub_8197200(void);
void sub_81973A4(void);
void sub_81973C4(u8, u8);
void sub_819746C(u8 windowId, bool8 copyToVram);
void sub_81973FC(u8, u8);
u16 AddTextPrinterParametrized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor);
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor);
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
void sub_8197434(u8 a0, u8 a1);
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
void sub_8197930(void);
u8 GetPlayerTextSpeed(void);
void sub_81978B0(u16 arg0);
u16 sub_8197224(void);
int sub_8196094(void);
void sub_8196080(u8*);
void AddTextPrinterForMessage(u8);
#endif // GUARD_NEW_MENU_HELPERS_H

View File

@ -69,6 +69,8 @@ void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpNum);
void c2_load_new_map(void);
void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
void mapldr_default(void);
u8 get_map_light_from_warp0(void);
bool8 is_light_level_1_2_3_5_or_6(u8 a1);
bool32 sub_80875C8(void);
bool32 sub_8087634(void);

View File

@ -1,7 +1,10 @@
#ifndef GUARD_POKEMON_ANIMATION_H
#define GUARD_POKEMON_ANIMATION_H
void LaunchAnimationTaskForFrontSprite(struct Sprite* sprite, u8 frontAnimId);
void LaunchAnimationTaskForBackSprite(struct Sprite* sprite, u8 backAnimId);
u8 GetSpeciesBackAnimSet(u16 species);
void LaunchAnimationTaskForFrontSprite(struct Sprite *sprite, u8 frontAnimId);
void StartMonSummaryAnimation(struct Sprite *sprite, u8 frontAnimId);
void LaunchAnimationTaskForBackSprite(struct Sprite *sprite, u8 backAnimSet);
void SetSpriteCB_MonAnimDummy(struct Sprite *sprite);
#endif // GUARD_POKEMON_ANIMATION_H

View File

@ -5,9 +5,11 @@ const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo);
const u16 *GetValidMonIconPalettePtr(u16 speciesId);
u16 GetUnownLetterByPersonality(u32 personality);
u16 sub_80D2E84(u16 speciesId);
void sub_80D2F04(void);
void sub_80D2F68(u16 iconId);
u8 sub_80D2D78(u16 iconId, void callback(struct Sprite *), u16 x, u16 y, u16 a4, u8 a5);
void sub_80D2FF0(u16 iconId);
void sub_80D2EF8(struct Sprite *sprite);
u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, int a7);
#endif // GUARD_POKEMON_ICON_H

47
include/scanline_effect.h Normal file
View File

@ -0,0 +1,47 @@
#ifndef GUARD_SCANLINE_EFFECT_H
#define GUARD_SCANLINE_EFFECT_H
// DMA control value to ransfer a single 16-bit value at HBlank
#define SCANLINE_EFFECT_DMACNT_16BIT (((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_INC | DMA_16BIT | DMA_DEST_RELOAD) << 16) | 1)
#define SCANLINE_EFFECT_REG_BG0HOFS (REG_ADDR_BG0HOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG0VOFS (REG_ADDR_BG0VOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG1HOFS (REG_ADDR_BG1HOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG1VOFS (REG_ADDR_BG1VOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG2HOFS (REG_ADDR_BG2HOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG2VOFS (REG_ADDR_BG2VOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG3HOFS (REG_ADDR_BG3HOFS - REG_ADDR_BG0HOFS)
#define SCANLINE_EFFECT_REG_BG3VOFS (REG_ADDR_BG3VOFS - REG_ADDR_BG0HOFS)
struct ScanlineEffectParams
{
volatile void *dmaDest;
u32 dmaControl;
u8 initState;
u8 unused9;
};
struct ScanlineEffect
{
void *dmaSrcBuffers[2];
volatile void *dmaDest;
u32 dmaControl;
void (*setFirstScanlineReg)(void);
u8 srcBuffer;
u8 state;
u8 unused16;
u8 unused17;
u8 waveTaskId;
};
extern struct ScanlineEffect gScanlineEffect;
extern u16 gScanlineEffectRegBuffers[][0x3C0];
void ScanlineEffect_Stop(void);
void ScanlineEffect_Clear(void);
void ScanlineEffect_SetParams(struct ScanlineEffectParams);
void ScanlineEffect_InitHBlankDmaTransfer(void);
u8 ScanlineEffect_InitWave(u8 startLine, u8 endLine, u8 frequency, u8 amplitude, u8 delayInterval, u8 regOffset, bool8 a7);
#endif // GUARD_SCANLINE_EFFECT_H

View File

@ -233,6 +233,7 @@ extern s16 gSpriteCoordOffsetX;
extern s16 gSpriteCoordOffsetY;
extern struct Sprite gSprites[];
extern struct OamMatrix gOamMatrices[];
void ResetSpriteData(void);
void AnimateSprites(void);

View File

@ -204,4 +204,15 @@ extern const u8 gText_Frame[];
extern const u8 gText_OptionMenuCancel[];
extern const u8 gText_ButtonMode[];
extern const u8 gText_MaleSymbol[];
extern const u8 gText_FemaleSymbol[];
// mystery event menu text
extern const u8 gText_EventSafelyLoaded[];
extern const u8 gText_LoadErrorEndingSession[];
extern const u8 gText_PressAToLoadEvent[];
extern const u8 gText_LoadingEvent[];
extern const u8 gText_DontRemoveCableTurnOff[];
extern const u8 gText_LinkStandby2[];
#endif //GUARD_STRINGS_H

View File

@ -185,6 +185,13 @@ struct __attribute__((packed)) TextColor
u8 shadowColor;
};
struct AlignedTextColor // because sometimes it's necessary
{
u8 fgColor;
u8 bgColor;
u8 shadowColor;
};
extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];

8
include/time_events.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef GUARD_TIME_EVENTS_H
#define GUARD_TIME_EVENTS_H
void UpdateMirageRnd(u16);
u8 IsMirageIslandPresent(void);
void UpdateBirchState(u16);
#endif // GUARD_TIME_EVENTS_H

View File

@ -1,22 +0,0 @@
#ifndef GUARD_unknown_task_H
#define GUARD_unknown_task_H
// Exported type declarations
struct UnknownTaskStruct
{
volatile void *dest;
u32 control;
u8 unk8;
u8 unk9;
};
extern struct UnknownTaskStruct gUnknown_0831AC70;
// Exported RAM declarations
// Exported ROM declarations
void ScanlineEffect_Stop(void);
void sub_80BA038(struct UnknownTaskStruct arg0);
void sub_80BA0A8(void);
#endif // GUARD_unknown_task_H

View File

@ -100,15 +100,15 @@ SECTIONS {
asm/field_player_avatar.o(.text);
src/field_map_obj.o(.text);
asm/field_ground_effect.o(.text);
asm/map_obj_8097404.o(.text);
asm/field_message_box.o(.text);
src/field_map_obj_helpers.o(.text);
src/field_message_box.o(.text);
asm/map_obj_lock.o(.text);
src/text_window.o(.text);
src/script.o(.text);
src/scrcmd.o(.text);
asm/field_control_avatar.o(.text);
src/event_data.o(.text);
asm/coord_event_weather.o(.text);
src/coord_event_weather.o(.text);
asm/field_tasks.o(.text);
src/clock.o(.text);
asm/reset_rtc_screen.o(.text);
@ -129,7 +129,7 @@ SECTIONS {
src/trainer_see.o(.text);
src/wild_encounter.o(.text);
asm/field_effect.o(.text);
asm/unknown_task.o(.text);
src/scanline_effect.o(.text);
src/option_menu.o(.text);
src/pokedex.o(.text);
asm/pokedex.o(.text);
@ -150,7 +150,7 @@ SECTIONS {
asm/shop.o(.text);
src/berry.o(.text);
asm/script_menu.o(.text);
asm/naming_screen.o(.text);
src/naming_screen.o(.text);
src/money.o(.text);
asm/contest_effect.o(.text);
asm/record_mixing.o(.text);
@ -165,7 +165,7 @@ SECTIONS {
asm/rotating_gate.o(.text);
src/safari_zone.o(.text);
asm/contest_link_80FC4F4.o(.text);
asm/item_use.o(.text);
src/item_use.o(.text);
asm/battle_anim_80FE840.o(.text);
src/bike.o(.text);
asm/easy_chat.o(.text);
@ -188,7 +188,7 @@ SECTIONS {
src/pokeblock.o(.text);
asm/fldeff_flash.o(.text);
asm/post_battle_event_funcs.o(.text);
asm/time_events.o(.text);
src/time_events.o(.text);
asm/birch_pc.o(.text);
src/hof_pc.o(.text);
asm/field_specials.o(.text);
@ -233,7 +233,7 @@ SECTIONS {
src/lottery_corner.o(.text);
src/diploma.o(.text);
asm/berry_tag_screen.o(.text);
asm/mystery_event_menu.o(.text);
src/mystery_event_menu.o(.text);
src/save_failed_screen.o(.text);
src/braille_puzzles.o(.text);
src/pokeblock_feed.o(.text);
@ -243,7 +243,7 @@ SECTIONS {
src/bard_music.o(.text);
src/fldeff_teleport.o(.text);
asm/battle_link_817C95C.o(.text);
asm/pokemon_animation.o(.text);
src/pokemon_animation.o(.text);
src/recorded_battle.o(.text);
src/battle_controller_recorded_opponent.o(.text);
src/battle_controller_recorded_player.o(.text);
@ -412,7 +412,7 @@ SECTIONS {
data/map_obj_8097404.o(.rodata);
src/text_window.o(.rodata);
src/scrcmd.o(.rodata);
data/coord_event_weather.o(.rodata);
src/coord_event_weather.o(.rodata);
data/field_tasks.o(.rodata);
data/reset_rtc_screen.o(.rodata);
src/start_menu.o(.rodata);
@ -445,7 +445,7 @@ SECTIONS {
data/shop.o(.rodata);
src/berry.o(.rodata);
data/script_menu.o(.rodata);
data/naming_screen.o(.rodata);
src/naming_screen.o(.rodata);
src/money.o(.rodata);
data/contest_effect.o(.rodata);
data/record_mixing.o(.rodata);
@ -477,7 +477,7 @@ SECTIONS {
src/wallclock.o(.rodata);
src/pokeblock.o(.rodata);
data/fldeff_flash.o(.rodata);
data/time_events.o(.rodata);
src/time_events.o(.rodata);
data/field_specials.o(.rodata);
data/battle_records.o(.rodata);
data/pokedex_area_screen.o(.rodata);
@ -489,7 +489,7 @@ SECTIONS {
src/battle_controller_link_partner.o(.rodata);
src/battle_message.o(.rodata);
data/cable_car.o(.rodata);
data/save.o(.rodata);
src/save.o(.rodata);
data/field_effect_helpers.o(.rodata);
data/contest_ai.o(.rodata);
src/battle_controller_safari.o(.rodata);
@ -510,7 +510,7 @@ SECTIONS {
src/diploma.o(.rodata);
data/strings.o(.rodata);
data/berry_tag_screen.o(.rodata);
data/mystery_event_menu.o(.rodata);
src/mystery_event_menu.o(.rodata);
src/save_failed_screen.o(.rodata);
data/braille_puzzles.o(.rodata);
src/pokeblock_feed.o(.rodata);
@ -519,7 +519,7 @@ SECTIONS {
src/evolution_graphics.o(.rodata);
src/bard_music.o(.rodata);
data/battle_link_817C95C.o(.rodata);
data/pokemon_animation.o(.rodata);
src/pokemon_animation.o(.rodata);
src/battle_controller_recorded_opponent.o(.rodata);
src/battle_controller_recorded_player.o(.rodata);
src/battle_dome_cards.o(.rodata);
@ -545,7 +545,7 @@ SECTIONS {
data/trainer_rematch.o(.rodata);
data/unk_transition.o(.rodata);
src/unk_transition.o(.rodata);
data/link_strings.o(.rodata);
data/text_input_strings.o(.rodata);
data/fonts.o(.rodata);
src/mystery_event_msg.o(.rodata);
data/mystery_event_msg.o(.rodata);

View File

@ -4,7 +4,7 @@
#include "main.h"
#include "load_save.h"
#include "gpu_regs.h"
#include "unknown_task.h"
#include "scanline_effect.h"
#include "battle_setup.h"
#include "battle_scripts.h"
#include "pokemon.h"
@ -47,13 +47,6 @@
#include "battle_string_ids.h"
#include "data2.h"
struct UnknownStruct6
{
u16 unk0[0xA0];
u8 fillerA0[0x640];
u16 unk780[0xA0];
};
struct UnknownPokemonStruct2
{
/*0x00*/ u16 species;
@ -91,8 +84,6 @@ extern void (*gBattleMainFunc)(void);
extern void (*gCB2_AfterEvolution)(void);
extern struct UnknownPokemonStruct2 gUnknown_02022FF8[3]; // what is it used for?
extern struct UnknownPokemonStruct2* gUnknown_02023058; // what is it used for?
extern u8 gUnknown_02039B28[]; // possibly a struct?
extern struct UnknownStruct6 gUnknown_02038C28; // todo: identify & document
extern struct MusicPlayerInfo gMPlayInfo_SE1;
extern struct MusicPlayerInfo gMPlayInfo_SE2;
extern u8 gDecompressionBuffer[];
@ -163,6 +154,7 @@ extern const u8 * const gBattlescriptsForBallThrow[];
extern const u8 * const gBattlescriptsForRunningByItem[];
extern const u8 * const gBattlescriptsForUsingItem[];
extern const u8 * const gBattlescriptsForSafariActions[];
extern const struct ScanlineEffectParams gUnknown_0831AC70;
// strings
extern const u8 gText_LinkStandby3[];
@ -181,7 +173,7 @@ extern const u8 gText_Confusion[];
extern const u8 gText_Love[];
// functions
extern void dp12_8087EA4(void);
extern void ScanlineEffect_Clear(void);
extern void sub_80356D0(void);
extern void GetFrontierTrainerName(u8* dst, u16 trainerId); // battle tower
extern void sub_8166188(void); // battle tower, sets link battle mons level but why?
@ -384,24 +376,21 @@ static void CB2_InitBattleInternal(void)
else
{
gBattle_WIN0V = 0x5051;
dp12_8087EA4();
ScanlineEffect_Clear();
for (i = 0; i < 80; i++)
{
gUnknown_02038C28.unk0[i] = 0xF0;
gUnknown_02038C28.unk780[i] = 0xF0;
gScanlineEffectRegBuffers[0][i] = 0xF0;
gScanlineEffectRegBuffers[1][i] = 0xF0;
}
for (i = 80; i < 160; i++)
{
#ifndef NONMATCHING
asm(""::"r"(i)); // needed to match
#endif // NONMATCHING
gUnknown_02038C28.unk0[i] = 0xFF10;
gUnknown_02038C28.unk780[i] = 0xFF10;
asm(""::"r"(i));
gScanlineEffectRegBuffers[0][i] = 0xFF10;
gScanlineEffectRegBuffers[1][i] = 0xFF10;
}
sub_80BA038(gUnknown_0831AC70);
ScanlineEffect_SetParams(gUnknown_0831AC70);
}
ResetPaletteFade();
@ -1597,7 +1586,7 @@ void BattleMainCB2(void)
static void FreeRestoreBattleData(void)
{
gMain.callback1 = gPreBattleCallback1;
gUnknown_02039B28[0x15] = 3;
gScanlineEffect.state = 3;
gMain.inBattle = 0;
ZeroEnemyPartyMons();
m4aSongNumStop(0x5A);
@ -1815,7 +1804,7 @@ void VBlankCB_Battle(void)
LoadOam();
ProcessSpriteCopyRequests();
TransferPlttBuffer();
sub_80BA0A8();
ScanlineEffect_InitHBlankDmaTransfer();
}
void nullsub_17(void)
@ -1953,18 +1942,18 @@ void sub_8038D64(void)
SetGpuReg(REG_OFFSET_WINOUT, 0);
gBattle_WIN0H = 0xF0;
gBattle_WIN0V = 0x5051;
dp12_8087EA4();
ScanlineEffect_Clear();
for (i = 0; i < 80; i++)
{
gUnknown_02038C28.unk0[i] = 0xF0;
gUnknown_02038C28.unk780[i] = 0xF0;
gScanlineEffectRegBuffers[0][i] = 0xF0;
gScanlineEffectRegBuffers[1][i] = 0xF0;
}
for (i = 80; i < 160; i++)
{
asm(""::"r"(i)); // Needed to stop the compiler from optimizing out the loop counter
gUnknown_02038C28.unk0[i] = 0xFF10;
gUnknown_02038C28.unk780[i] = 0xFF10;
gScanlineEffectRegBuffers[0][i] = 0xFF10;
gScanlineEffectRegBuffers[1][i] = 0xFF10;
}
ResetPaletteFade();

View File

@ -20,6 +20,7 @@
#include "international_string_util.h"
#include "safari_zone.h"
#include "battle_anim.h"
#include "constants/rgb.h"
struct TestingBar
{
@ -555,13 +556,13 @@ enum
PAL_STATUS_BRN
};
static const u16 sStatusIconPalettes[] =
static const u16 sStatusIconColors[] =
{
0x6198, // PAL_STATUS_PSN
0xEF7, // PAL_STATUS_PAR
0x4694, // PAL_STATUS_SLP
0x72D1, // PAL_STATUS_FRZ
0x29DC // PAL_STATUS_BRN
RGB(24, 12, 24), // PAL_STATUS_PSN
RGB(23, 23, 3), // PAL_STATUS_PAR
RGB(20, 20, 17), // PAL_STATUS_SLP
RGB(17, 22, 28), // PAL_STATUS_FRZ
RGB(28, 14, 10) // PAL_STATUS_BRN
};
static const struct WindowTemplate sHealthboxWindowTemplate = {0, 0, 0, 8, 2, 0, 0}; // width = 8, height = 2
@ -2071,7 +2072,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
pltAdder = gSprites[healthboxSpriteId].oam.paletteNum * 16;
pltAdder += bank + 12;
FillPalette(sStatusIconPalettes[statusPalId], pltAdder + 0x100, 2);
FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2);
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void*)(OBJ_PLTT + pltAdder * 2), 2);
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * 32), 96);
if (IsDoubleBattle() == TRUE || GetBankSide(bank) == SIDE_OPPONENT)
@ -2575,7 +2576,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
color.bgColor = 1;
color.shadowColor = 3;
AddTextPrinterParametrized2(winId, 0, x, y, 0, 0, &color, -1, str);
AddTextPrinterParameterized2(winId, 0, x, y, 0, 0, &color, -1, str);
*windowId = winId;
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));

View File

@ -14,7 +14,7 @@
#include "constants/songs.h"
#include "constants/trainers.h"
#include "field_camera.h"
#include "unknown_task.h"
#include "scanline_effect.h"
#include "malloc.h"
#include "gpu_regs.h"
#include "decompress.h"
@ -56,8 +56,6 @@ struct StructRectangularSpiral
typedef bool8 (*TransitionStateFunc)(struct Task *task);
typedef bool8 (*TransitionSpriteCallback)(struct Sprite *sprite);
extern u16 gUnknown_020393A8[];
extern u16 gUnknown_02038C28[][0x3C0];
extern u16 gBattle_BG0_X;
extern u16 gBattle_BG0_Y;
@ -65,7 +63,7 @@ extern const struct OamData gFieldObjectBaseOam_32x32;
extern void c2_exit_to_overworld_2_switch(void);
extern void sub_80AC3D0(void);
extern void dp12_8087EA4(void);
extern void ScanlineEffect_Clear(void);
// this file's functions
static void LaunchBattleTransitionTask(u8 transitionId);
@ -1110,9 +1108,9 @@ static void Phase2Task_Swirl(u8 taskId)
static bool8 Phase2_Swirl_Func1(struct Task *task)
{
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
BeginNormalPaletteFade(-1, 4, 0, 0x10, 0);
sub_8149F98(gUnknown_020393A8, sTransitionStructPtr->field_14, 0, 2, 0, 160);
sub_8149F98(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_14, 0, 2, 0, 160);
SetVBlankCallback(VBlankCB_Phase2_Swirl);
SetHBlankCallback(HBlankCB_Phase2_Swirl);
@ -1129,7 +1127,7 @@ static bool8 Phase2_Swirl_Func2(struct Task *task)
task->tData1 += 4;
task->tData2 += 8;
sub_8149F98(gUnknown_02038C28[0], sTransitionStructPtr->field_14, task->tData1, 2, task->tData2, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], sTransitionStructPtr->field_14, task->tData1, 2, task->tData2, 160);
if (!gPaletteFade.active)
{
@ -1145,12 +1143,12 @@ static void VBlankCB_Phase2_Swirl(void)
{
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
}
static void HBlankCB_Phase2_Swirl(void)
{
u16 var = gUnknown_02038C28[1][REG_VCOUNT];
u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT];
REG_BG1HOFS = var;
REG_BG2HOFS = var;
REG_BG3HOFS = var;
@ -1164,10 +1162,10 @@ static void Phase2Task_Shuffle(u8 taskId)
static bool8 Phase2_Shuffle_Func1(struct Task *task)
{
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
BeginNormalPaletteFade(-1, 4, 0, 0x10, 0);
memset(gUnknown_020393A8, sTransitionStructPtr->field_16, 0x140);
memset(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_16, 0x140);
SetVBlankCallback(VBlankCB_Phase2_Shuffle);
SetHBlankCallback(HBlankCB_Phase2_Shuffle);
@ -1192,7 +1190,7 @@ static bool8 Phase2_Shuffle_Func2(struct Task *task)
for (i = 0; i < 160; i++, r4 += 4224)
{
u16 var = r4 / 256;
gUnknown_02038C28[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3);
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3);
}
if (!gPaletteFade.active)
@ -1206,12 +1204,12 @@ static void VBlankCB_Phase2_Shuffle(void)
{
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
}
static void HBlankCB_Phase2_Shuffle(void)
{
u16 var = gUnknown_02038C28[1][REG_VCOUNT];
u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT];
REG_BG1VOFS = var;
REG_BG2VOFS = var;
REG_BG3VOFS = var;
@ -1257,7 +1255,7 @@ static void sub_814669C(struct Task *task)
s32 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
task->tData1 = 16;
task->tData2 = 0;
@ -1272,7 +1270,7 @@ static void sub_814669C(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = 240;
gScanlineEffectRegBuffers[1][i] = 240;
}
SetVBlankCallback(VBlankCB0_Phase2_BigPokeball);
@ -1351,7 +1349,7 @@ static bool8 Phase2_BigPokeball_Func2(struct Task *task)
dst1[i * 32 + j] = *BigPokeballMap | 0xF000;
}
}
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160);
task->tState++;
return TRUE;
@ -1363,7 +1361,7 @@ static bool8 Phase2_Aqua_Func2(struct Task *task)
sub_8149F58(&dst1, &dst2);
LZ77UnCompVram(sTeamAqua_Tilemap, dst1);
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160);
task->tState++;
return FALSE;
@ -1375,7 +1373,7 @@ static bool8 Phase2_Magma_Func2(struct Task *task)
sub_8149F58(&dst1, &dst2);
LZ77UnCompVram(sTeamMagma_Tilemap, dst1);
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160);
task->tState++;
return FALSE;
@ -1388,7 +1386,7 @@ static bool8 Phase2_Regice_Func2(struct Task *task)
sub_8149F58(&dst1, &dst2);
LoadPalette(gUnknown_085BC2B4, 0xF0, 0x20);
CpuCopy16(gUnknown_085BC314, dst1, 0x500);
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160);
task->tState++;
return FALSE;
@ -1401,7 +1399,7 @@ static bool8 Phase2_Registeel_Func2(struct Task *task)
sub_8149F58(&dst1, &dst2);
LoadPalette(gUnknown_085BC2D4, 0xF0, 0x20);
CpuCopy16(gUnknown_085BCB14, dst1, 0x500);
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160);
task->tState++;
return FALSE;
@ -1414,7 +1412,7 @@ static bool8 Phase2_Regirock_Func2(struct Task *task)
sub_8149F58(&dst1, &dst2);
LoadPalette(gUnknown_085BC2F4, 0xF0, 0x20);
CpuCopy16(gUnknown_085BD314, dst1, 0x500);
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160);
task->tState++;
return FALSE;
@ -1499,7 +1497,7 @@ static bool8 Phase2_BigPokeball_Func3(struct Task *task)
task->tData4 += 8;
task->tData5 -= 256;
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5 >> 8, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5 >> 8, 160);
sTransitionStructPtr->VBlank_DMA++;
return FALSE;
@ -1519,7 +1517,7 @@ static bool8 Phase2_BigPokeball_Func4(struct Task *task)
task->tData4 += 8;
task->tData5 -= 256;
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5 >> 8, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5 >> 8, 160);
sTransitionStructPtr->VBlank_DMA++;
return FALSE;
@ -1531,7 +1529,7 @@ static bool8 Phase2_BigPokeball_Func5(struct Task *task)
task->tData4 += 8;
task->tData5 -= 256;
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 132, task->tData5 >> 8, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5 >> 8, 160);
if (task->tData5 <= 0)
{
@ -1577,7 +1575,7 @@ static bool8 Phase2_BigPokeball_Func6(struct Task *task)
if (task->tData1 < 0)
task->tData1 = 0;
}
sub_814A014(gUnknown_02038C28[0], 120, 80, task->tData1);
sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->tData1);
if (task->tData1 == 0)
{
SetVBlankCallback(NULL);
@ -1604,7 +1602,7 @@ static void Transition_BigPokeball_Vblank(void)
DmaStop(0);
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
REG_WININ = sTransitionStructPtr->WININ;
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
@ -1615,13 +1613,13 @@ static void Transition_BigPokeball_Vblank(void)
static void VBlankCB0_Phase2_BigPokeball(void)
{
Transition_BigPokeball_Vblank();
DmaSet(0, gUnknown_020393A8, &REG_BG0HOFS, 0xA2400001);
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_BG0HOFS, 0xA2400001);
}
static void VBlankCB1_Phase2_BigPokeball(void)
{
Transition_BigPokeball_Vblank();
DmaSet(0, gUnknown_020393A8, &REG_WIN0H, 0xA2400001);
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_WIN0H, 0xA2400001);
}
static void Phase2Task_PokeballsTrail(u8 taskId)
@ -1741,7 +1739,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func1(struct Task *task)
u16 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
sTransitionStructPtr->WININ = 0;
sTransitionStructPtr->WINOUT = 63;
@ -1750,7 +1748,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func1(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_020393A8[i] = 0xF3F4;
gScanlineEffectRegBuffers[1][i] = 0xF3F4;
}
SetVBlankCallback(VBlankCB_Phase2_Clockwise_BlackFade);
@ -1767,7 +1765,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func2(struct Task *task)
sub_814A1AC(sTransitionStructPtr->data, 120, 80, sTransitionStructPtr->data[4], -1, 1, 1);
do
{
gUnknown_02038C28[0][sTransitionStructPtr->data[3]] = (sTransitionStructPtr->data[2] + 1) | 0x7800;
gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (sTransitionStructPtr->data[2] + 1) | 0x7800;
} while (!sub_814A228(sTransitionStructPtr->data, 1, 1));
sTransitionStructPtr->data[4] += 16;
@ -1795,7 +1793,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func3(struct Task *task)
r1 = 120, r3 = sTransitionStructPtr->data[2] + 1;
if (sTransitionStructPtr->data[5] >= 80)
r1 = sTransitionStructPtr->data[2], r3 = 240;
gUnknown_02038C28[0][sTransitionStructPtr->data[3]] = (r3) | (r1 << 8);
gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (r3) | (r1 << 8);
if (var != 0)
break;
var = sub_814A228(sTransitionStructPtr->data, 1, 1);
@ -1811,7 +1809,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func3(struct Task *task)
{
while (sTransitionStructPtr->data[3] < sTransitionStructPtr->data[5])
{
gUnknown_02038C28[0][++sTransitionStructPtr->data[3]] = (r3) | (r1 << 8);
gScanlineEffectRegBuffers[0][++sTransitionStructPtr->data[3]] = (r3) | (r1 << 8);
}
}
@ -1826,7 +1824,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func4(struct Task *task)
sub_814A1AC(sTransitionStructPtr->data, 120, 80, sTransitionStructPtr->data[4], 160, 1, 1);
do
{
gUnknown_02038C28[0][sTransitionStructPtr->data[3]] = (sTransitionStructPtr->data[2] << 8) | 0xF0;
gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (sTransitionStructPtr->data[2] << 8) | 0xF0;
} while (!sub_814A228(sTransitionStructPtr->data, 1, 1));
sTransitionStructPtr->data[4] -= 16;
@ -1851,12 +1849,12 @@ static bool8 Phase2_Clockwise_BlackFade_Func5(struct Task *task)
while (1)
{
r1 = (gUnknown_02038C28[0][sTransitionStructPtr->data[3]]) & 0xFF;
r1 = (gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]]) & 0xFF;
r2 = sTransitionStructPtr->data[2];
if (sTransitionStructPtr->data[5] <= 80)
r2 = 120, r1 = sTransitionStructPtr->data[2];
var4 = (r1) | (r2 << 8);
gUnknown_02038C28[0][sTransitionStructPtr->data[3]] = var4;
gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = var4;
if (var != 0)
break;
var = sub_814A228(sTransitionStructPtr->data, 1, 1);
@ -1872,7 +1870,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func5(struct Task *task)
{
while (sTransitionStructPtr->data[3] > sTransitionStructPtr->data[5])
{
gUnknown_02038C28[0][--sTransitionStructPtr->data[3]] = (r1) | (r2 << 8);
gScanlineEffectRegBuffers[0][--sTransitionStructPtr->data[3]] = (r1) | (r2 << 8);
}
}
@ -1892,7 +1890,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func6(struct Task *task)
r2 = 120, r3 = sTransitionStructPtr->data[2];
if (sTransitionStructPtr->data[2] >= 120)
r2 = 0, r3 = 240;
gUnknown_02038C28[0][sTransitionStructPtr->data[3]] = (r3) | (r2 << 8);
gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (r3) | (r2 << 8);
} while (!sub_814A228(sTransitionStructPtr->data, 1, 1));
@ -1917,12 +1915,12 @@ static void VBlankCB_Phase2_Clockwise_BlackFade(void)
DmaStop(0);
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA != 0)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
REG_WININ = sTransitionStructPtr->WININ;
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
REG_WIN0H = gUnknown_02038C28[1][0];
DmaSet(0, gUnknown_02038C28[1], &REG_WIN0H, 0xA2400001);
REG_WIN0H = gScanlineEffectRegBuffers[1][0];
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_WIN0H, 0xA2400001);
}
static void Phase2Task_Ripple(u8 taskId)
@ -1935,11 +1933,11 @@ static bool8 Phase2_Ripple_Func1(struct Task *task)
u8 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
for (i = 0; i < 160; i++)
{
gUnknown_020393A8[i] = sTransitionStructPtr->field_16;
gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_16;
}
SetVBlankCallback(VBlankCB_Phase2_Ripple);
@ -1971,7 +1969,7 @@ static bool8 Phase2_Ripple_Func2(struct Task *task)
// todo: fix the asm
s16 var = r4 >> 8;
asm("");
gUnknown_02038C28[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3);
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3);
}
if (++task->tData3 == 81)
@ -1991,12 +1989,12 @@ static void VBlankCB_Phase2_Ripple(void)
{
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
}
static void HBlankCB_Phase2_Ripple(void)
{
u16 var = gUnknown_02038C28[1][REG_VCOUNT];
u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT];
REG_BG1VOFS = var;
REG_BG2VOFS = var;
REG_BG3VOFS = var;
@ -2012,7 +2010,7 @@ static bool8 Phase2_Wave_Func1(struct Task *task)
u8 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
sTransitionStructPtr->WININ = 63;
sTransitionStructPtr->WINOUT = 0;
@ -2021,7 +2019,7 @@ static bool8 Phase2_Wave_Func1(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = 242;
gScanlineEffectRegBuffers[1][i] = 242;
}
SetVBlankCallback(VBlankCB_Phase2_Wave);
@ -2037,7 +2035,7 @@ static bool8 Phase2_Wave_Func2(struct Task *task)
bool8 nextFunc;
sTransitionStructPtr->VBlank_DMA = FALSE;
toStore = gUnknown_02038C28[0];
toStore = gScanlineEffectRegBuffers[0];
r5 = task->tData2;
task->tData2 += 16;
task->tData1 += 8;
@ -2073,11 +2071,11 @@ static void VBlankCB_Phase2_Wave(void)
DmaStop(0);
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA != 0)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
REG_WININ = sTransitionStructPtr->WININ;
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
DmaSet(0, gUnknown_02038C28[1], &REG_WIN0H, 0xA2400001);
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_WIN0H, 0xA2400001);
}
static void Phase2Task_Sydney(u8 taskId)
@ -2120,7 +2118,7 @@ static bool8 Phase2_Mugshot_Func1(struct Task *task)
u8 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
Mugshots_CreateOpponentPlayerSprites(task);
task->tData1 = 0;
@ -2132,7 +2130,7 @@ static bool8 Phase2_Mugshot_Func1(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = 0xF0F1;
gScanlineEffectRegBuffers[1][i] = 0xF0F1;
}
SetVBlankCallback(VBlankCB0_Phase2_Mugshots);
@ -2177,7 +2175,7 @@ static bool8 Phase2_Mugshot_Func3(struct Task *task)
sTransitionStructPtr->VBlank_DMA = FALSE;
toStore = gUnknown_02038C28[0];
toStore = gScanlineEffectRegBuffers[0];
r5 = task->tData1;
task->tData1 += 0x10;
@ -2223,7 +2221,7 @@ static bool8 Phase2_Mugshot_Func4(struct Task *task)
sTransitionStructPtr->VBlank_DMA = FALSE;
for (i = 0, toStore = gUnknown_02038C28[0]; i < 160; i++, toStore++)
for (i = 0, toStore = gScanlineEffectRegBuffers[0]; i < 160; i++, toStore++)
{
*toStore = 0xF0;
}
@ -2266,8 +2264,8 @@ static bool8 Phase2_Mugshot_Func6(struct Task *task)
sTransitionStructPtr->VBlank_DMA = FALSE;
SetVBlankCallback(NULL);
DmaStop(0);
memset(gUnknown_02038C28[0], 0, 0x140);
memset(gUnknown_02038C28[1], 0, 0x140);
memset(gScanlineEffectRegBuffers[0], 0, 0x140);
memset(gScanlineEffectRegBuffers[1], 0, 0x140);
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
SetGpuReg(REG_OFFSET_BLDY, 0);
task->tState++;
@ -2300,15 +2298,15 @@ static bool8 Phase2_Mugshot_Func7(struct Task *task)
{
s16 index1 = 0x50 - i;
s16 index2 = 0x50 + i;
if (gUnknown_02038C28[0][index1] <= 15)
if (gScanlineEffectRegBuffers[0][index1] <= 15)
{
r6 = TRUE;
gUnknown_02038C28[0][index1]++;
gScanlineEffectRegBuffers[0][index1]++;
}
if (gUnknown_02038C28[0][index2] <= 15)
if (gScanlineEffectRegBuffers[0][index2] <= 15)
{
r6 = TRUE;
gUnknown_02038C28[0][index2]++;
gScanlineEffectRegBuffers[0][index2]++;
}
}
}
@ -2336,7 +2334,7 @@ static bool8 Phase2_Mugshot_Func9(struct Task *task)
sTransitionStructPtr->VBlank_DMA = FALSE;
task->tData3++;
memset(gUnknown_02038C28[0], task->tData3, 0x140);
memset(gScanlineEffectRegBuffers[0], task->tData3, 0x140);
if (task->tData3 > 15)
task->tState++;
@ -2357,12 +2355,12 @@ static void VBlankCB0_Phase2_Mugshots(void)
DmaStop(0);
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA != 0)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
REG_BG0VOFS = sTransitionStructPtr->BG0VOFS;
REG_WININ = sTransitionStructPtr->WININ;
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
DmaSet(0, gUnknown_02038C28[1], &REG_WIN0H, 0xA2400001);
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_WIN0H, 0xA2400001);
}
static void VBlankCB1_Phase2_Mugshots(void)
@ -2370,9 +2368,9 @@ static void VBlankCB1_Phase2_Mugshots(void)
DmaStop(0);
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA != 0)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
REG_BLDCNT = sTransitionStructPtr->BLDCNT;
DmaSet(0, gUnknown_02038C28[1], &REG_BLDY, 0xA2400001);
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_BLDY, 0xA2400001);
}
static void HBlankCB_Phase2_Mugshots(void)
@ -2500,7 +2498,7 @@ static bool8 Phase2_Slice_Func1(struct Task *task)
u16 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
task->tData2 = 256;
task->tData3 = 1;
@ -2511,8 +2509,8 @@ static bool8 Phase2_Slice_Func1(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = sTransitionStructPtr->field_14;
gUnknown_02038C28[1][160 + i] = 0xF0;
gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_14;
gScanlineEffectRegBuffers[1][160 + i] = 0xF0;
}
EnableInterrupts(INTR_FLAG_HBLANK);
@ -2541,8 +2539,8 @@ static bool8 Phase2_Slice_Func2(struct Task *task)
for (i = 0; i < 160; i++)
{
u16 *storeLoc1 = &gUnknown_02038C28[0][i];
u16 *storeLoc2 = &gUnknown_02038C28[0][i + 160];
u16 *storeLoc1 = &gScanlineEffectRegBuffers[0][i];
u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + 160];
if (i & 1)
{
*storeLoc1 = sTransitionStructPtr->field_14 + task->tData1;
@ -2578,15 +2576,15 @@ static void VBlankCB_Phase2_Slice(void)
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 640);
DmaSet(0, &gUnknown_02038C28[1][160], &REG_WIN0H, 0xA2400001);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 640);
DmaSet(0, &gScanlineEffectRegBuffers[1][160], &REG_WIN0H, 0xA2400001);
}
static void HBlankCB_Phase2_Slice(void)
{
if (REG_VCOUNT < 160)
{
u16 var = gUnknown_02038C28[1][REG_VCOUNT];
u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT];
REG_BG1HOFS = var;
REG_BG2HOFS = var;
REG_BG3HOFS = var;
@ -2603,7 +2601,7 @@ static bool8 Phase2_ShredSplit_Func1(struct Task *task)
u16 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
sTransitionStructPtr->WININ = 63;
sTransitionStructPtr->WINOUT = 0;
@ -2611,13 +2609,13 @@ static bool8 Phase2_ShredSplit_Func1(struct Task *task)
for (i = 0; i < 0xA0; i++)
{
gUnknown_02038C28[1][i] = sTransitionStructPtr->field_14;
gUnknown_02038C28[1][0xA0 + i] = 0xF0;
gUnknown_02038C28[0][i] = sTransitionStructPtr->field_14;
gUnknown_02038C28[0][0xA0 + i] = 0xF0;
gUnknown_02038C28[0][0x140 + i] = 0;
gUnknown_02038C28[0][0x1E0 + i] = 0x100;
gUnknown_02038C28[0][0x280 + i] = 1;
gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_14;
gScanlineEffectRegBuffers[1][0xA0 + i] = 0xF0;
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_14;
gScanlineEffectRegBuffers[0][0xA0 + i] = 0xF0;
gScanlineEffectRegBuffers[0][0x140 + i] = 0;
gScanlineEffectRegBuffers[0][0x1E0 + i] = 0x100;
gScanlineEffectRegBuffers[0][0x280 + i] = 1;
}
task->tData4 = 0;
@ -2657,9 +2655,9 @@ static bool8 Phase2_ShredSplit_Func2(struct Task *task)
unkVar = (arr1[j]) + (arr2[k] * -(i) * 2);
if (unkVar >= 0 && (unkVar != 79 || j != 1))
{
ptr4 = &gUnknown_02038C28[0][unkVar + 320];
ptr3 = &gUnknown_02038C28[0][unkVar + 480];
ptr1 = &gUnknown_02038C28[0][unkVar + 640];
ptr4 = &gScanlineEffectRegBuffers[0][unkVar + 320];
ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 480];
ptr1 = &gScanlineEffectRegBuffers[0][unkVar + 640];
if (*ptr4 > 0xEF)
{
*ptr4 = 0xF0;
@ -2673,8 +2671,8 @@ static bool8 Phase2_ShredSplit_Func2(struct Task *task)
if (*ptr3 <= 0xFFF)
*ptr3 += *ptr1;
}
ptr2 = &gUnknown_02038C28[0][unkVar];
ptr3 = &gUnknown_02038C28[0][unkVar + 160];
ptr2 = &gScanlineEffectRegBuffers[0][unkVar];
ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 160];
*ptr2 = sTransitionStructPtr->field_14 + *ptr4;
*ptr3 = 0xF0 - *ptr4;
@ -2691,9 +2689,9 @@ static bool8 Phase2_ShredSplit_Func2(struct Task *task)
unkVar = (arr1[j] + 1) + (arr2[k] * -(i) * 2);
if (unkVar <= 160 && (unkVar != 80 || j != 1))
{
ptr4 = &gUnknown_02038C28[0][unkVar + 320];
ptr3 = &gUnknown_02038C28[0][unkVar + 480];
ptr1 = &gUnknown_02038C28[0][unkVar + 640];
ptr4 = &gScanlineEffectRegBuffers[0][unkVar + 320];
ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 480];
ptr1 = &gScanlineEffectRegBuffers[0][unkVar + 640];
if (*ptr4 > 0xEF)
{
*ptr4 = 0xF0;
@ -2707,8 +2705,8 @@ static bool8 Phase2_ShredSplit_Func2(struct Task *task)
if (*ptr3 <= 0xFFF)
*ptr3 += *ptr1;
}
ptr2 = &gUnknown_02038C28[0][unkVar];
ptr3 = &gUnknown_02038C28[0][unkVar + 160];
ptr2 = &gScanlineEffectRegBuffers[0][unkVar];
ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 160];
*ptr2 = sTransitionStructPtr->field_14 - *ptr4;
*ptr3 = (*ptr4 << 8) | (0xF1);
@ -2732,7 +2730,7 @@ static bool8 Phase2_ShredSplit_Func2(struct Task *task)
// This function never increments the state counter, because the loop condition
// is always false, resulting in the game being stuck in an infinite loop.
// It's possible this transition is only partially
// It's possible this transition is only partially
// done and the second part was left out.
static bool8 Phase2_ShredSplit_Func3(struct Task *task)
{
@ -2742,7 +2740,7 @@ static bool8 Phase2_ShredSplit_Func3(struct Task *task)
for (i = 0; i < 0xA0; i++)
{
if (gUnknown_02038C28[1][i] != 0xF0 && gUnknown_02038C28[1][i] != checkVar2)
if (gScanlineEffectRegBuffers[1][i] != 0xF0 && gScanlineEffectRegBuffers[1][i] != checkVar2)
done = FALSE; // a break statement should be put here
}
@ -2775,7 +2773,7 @@ static bool8 Phase2_Blackhole_Func1(struct Task *task)
s32 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
sTransitionStructPtr->WININ = 0;
sTransitionStructPtr->WINOUT = 63;
@ -2784,7 +2782,7 @@ static bool8 Phase2_Blackhole_Func1(struct Task *task)
for (i = 0; i < 0xA0; i++)
{
gUnknown_02038C28[1][i] = 0;
gScanlineEffectRegBuffers[1][i] = 0;
}
SetVBlankCallback(VBlankCB1_Phase2_BigPokeball);
@ -2814,7 +2812,7 @@ static bool8 Phase2_Blackhole1_Func3(struct Task *task)
task->tData1 += (task->tData2 >> 8);
if (task->tData1 > 0xA0)
task->tData1 = 0xA0;
sub_814A014(gUnknown_02038C28[0], 0x78, 0x50, task->tData1);
sub_814A014(gScanlineEffectRegBuffers[0], 0x78, 0x50, task->tData1);
if (task->tData1 == 0xA0)
{
task->tFuncState = 1;
@ -2840,7 +2838,7 @@ static bool8 Phase2_Blackhole1_Func2(struct Task *task)
}
task->tData1 += gUnknown_085C8C80[task->tData6];
task->tData6 = (task->tData6 + 1) % 2;
sub_814A014(gUnknown_02038C28[0], 0x78, 0x50, task->tData1);
sub_814A014(gScanlineEffectRegBuffers[0], 0x78, 0x50, task->tData1);
if (task->tData1 < 9)
{
task->tState++;
@ -2866,7 +2864,7 @@ static bool8 Phase2_Blackhole2_Func2(struct Task *task)
if (task->tData1 > 0xA0)
task->tData1 = 0xA0;
sub_814A014(gUnknown_02038C28[0], 0x78, 0x50, task->tData1);
sub_814A014(gScanlineEffectRegBuffers[0], 0x78, 0x50, task->tData1);
if (task->tData1 == 0xA0)
{
DmaStop(0);
@ -3113,7 +3111,7 @@ static bool8 Phase2_Rayquaza_Func3(struct Task *task)
u16 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
SetGpuReg(REG_OFFSET_BG0CNT, 0x9A08);
sub_8149F58(&dst1, &dst2);
@ -3126,8 +3124,8 @@ static bool8 Phase2_Rayquaza_Func3(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[0][i] = 0;
gUnknown_02038C28[1][i] = 0x100;
gScanlineEffectRegBuffers[0][i] = 0;
gScanlineEffectRegBuffers[1][i] = 0x100;
}
SetVBlankCallback(VBlankCB_Phase2_Rayquaza);
@ -3212,7 +3210,7 @@ static bool8 Phase2_Rayquaza_Func9(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = 0;
gScanlineEffectRegBuffers[1][i] = 0;
}
SetVBlankCallback(VBlankCB1_Phase2_BigPokeball);
@ -3233,11 +3231,11 @@ static void VBlankCB_Phase2_Rayquaza(void)
VBlankCB_BattleTransition();
if (sTransitionStructPtr->field_20 == 0)
dmaSrc = gUnknown_02038C28[0];
dmaSrc = gScanlineEffectRegBuffers[0];
else if (sTransitionStructPtr->field_20 == 1)
dmaSrc = gUnknown_02038C28[1];
dmaSrc = gScanlineEffectRegBuffers[1];
else
dmaSrc = gUnknown_02038C28[0];
dmaSrc = gScanlineEffectRegBuffers[0];
DmaSet(0, dmaSrc, &REG_BG0VOFS, 0xA2400001);
}
@ -3252,7 +3250,7 @@ static bool8 Phase2_WhiteFade_Func1(struct Task *task)
u16 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
sTransitionStructPtr->BLDCNT = 0xBF;
sTransitionStructPtr->BLDY = 0;
@ -3262,8 +3260,8 @@ static bool8 Phase2_WhiteFade_Func1(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = 0;
gUnknown_02038C28[1][i + 160] = 0xF0;
gScanlineEffectRegBuffers[1][i] = 0;
gScanlineEffectRegBuffers[1][i + 160] = 0xF0;
}
EnableInterrupts(INTR_FLAG_HBLANK);
@ -3343,8 +3341,8 @@ static void VBlankCB0_Phase2_WhiteFade(void)
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 640);
DmaSet(0, &gUnknown_02038C28[1][160], &REG_WIN0H, 0xA2400001);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 640);
DmaSet(0, &gScanlineEffectRegBuffers[1][160], &REG_WIN0H, 0xA2400001);
}
static void VBlankCB1_Phase2_WhiteFade(void)
@ -3360,7 +3358,7 @@ static void VBlankCB1_Phase2_WhiteFade(void)
static void HBlankCB_Phase2_WhiteFade(void)
{
REG_BLDY = gUnknown_02038C28[1][REG_VCOUNT];
REG_BLDY = gScanlineEffectRegBuffers[1][REG_VCOUNT];
}
static void sub_8149864(struct Sprite *sprite)
@ -3374,8 +3372,8 @@ static void sub_8149864(struct Sprite *sprite)
else
{
u16 i;
u16* ptr1 = &gUnknown_02038C28[0][sprite->pos1.y];
u16* ptr2 = &gUnknown_02038C28[0][sprite->pos1.y + 160];
u16* ptr1 = &gScanlineEffectRegBuffers[0][sprite->pos1.y];
u16* ptr2 = &gScanlineEffectRegBuffers[0][sprite->pos1.y + 160];
for (i = 0; i < 20; i++)
{
ptr1[i] = sprite->data[0] >> 8;
@ -3465,7 +3463,7 @@ static bool8 Phase2_Shards_Func1(struct Task *task)
u16 i;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
sTransitionStructPtr->WININ = 0x3F;
sTransitionStructPtr->WINOUT = 0;
@ -3473,10 +3471,10 @@ static bool8 Phase2_Shards_Func1(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[0][i] = 0xF0;
gScanlineEffectRegBuffers[0][i] = 0xF0;
}
CpuSet(gUnknown_02038C28[0], gUnknown_02038C28[1], 0xA0);
CpuSet(gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 0xA0);
SetVBlankCallback(VBlankCB_Phase2_Shards);
task->tState++;
@ -3505,8 +3503,8 @@ static bool8 Phase2_Shards_Func3(struct Task *task)
for (i = 0, nextFunc = FALSE; i < 16; i++)
{
s16 r3 = gUnknown_02038C28[0][sTransitionStructPtr->data[3]] >> 8;
s16 r4 = gUnknown_02038C28[0][sTransitionStructPtr->data[3]] & 0xFF;
s16 r3 = gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] >> 8;
s16 r4 = gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] & 0xFF;
if (task->tData2 == 0)
{
if (r3 < sTransitionStructPtr->data[2])
@ -3521,7 +3519,7 @@ static bool8 Phase2_Shards_Func3(struct Task *task)
if (r4 <= r3)
r4 = r3;
}
gUnknown_02038C28[0][sTransitionStructPtr->data[3]] = (r4) | (r3 << 8);
gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (r4) | (r3 << 8);
if (nextFunc)
{
task->tState++;
@ -3568,12 +3566,12 @@ static void VBlankCB_Phase2_Shards(void)
DmaStop(0);
VBlankCB_BattleTransition();
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
REG_WININ = sTransitionStructPtr->WININ;
REG_WINOUT = sTransitionStructPtr->WINOUT;
REG_WIN0V = sTransitionStructPtr->WIN0V;
REG_WIN0H = gUnknown_02038C28[1][0];
DmaSet(0, gUnknown_02038C28[1], &REG_WIN0H, 0xA2400001);
REG_WIN0H = gScanlineEffectRegBuffers[1][0];
DmaSet(0, gScanlineEffectRegBuffers[1], &REG_WIN0H, 0xA2400001);
}
// sub-task for phase2
@ -3875,7 +3873,7 @@ static bool8 Phase2_29_Func2(struct Task *task)
sub_8149F58(&dst1, &dst2);
LZ77UnCompVram(gUnknown_085C828C, dst1);
sub_8149F98(gUnknown_02038C28[0], 0, task->tData4, 0x84, task->tData5, 160);
sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 0x84, task->tData5, 160);
task->tState++;
return TRUE;
@ -3896,7 +3894,7 @@ static bool8 Phase2_30_Func1(struct Task *task)
u16 *dst1, *dst2;
sub_8149F08();
dp12_8087EA4();
ScanlineEffect_Clear();
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON);
task->tData2 = 0x2000;
task->tData1 = 0x7FFF;
@ -3934,7 +3932,7 @@ static bool8 Phase2_30_Func3(struct Task *task)
for (i = 0; i < 160; i++)
{
gUnknown_02038C28[1][i] = sTransitionStructPtr->field_16;
gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_16;
}
SetVBlankCallback(VBlankCB_Phase2_30);
@ -3980,7 +3978,7 @@ static bool8 Phase2_30_Func4(struct Task *task)
{
s16 index = var6 / 256;
asm("");
gUnknown_02038C28[0][i] = sTransitionStructPtr->field_16 + Sin(index, amplitude);
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(index, amplitude);
}
if (++task->tData3 == 101)
@ -4004,12 +4002,12 @@ static void VBlankCB_Phase2_30(void)
REG_BLDALPHA = sTransitionStructPtr->BLDALPHA;
if (sTransitionStructPtr->VBlank_DMA)
DmaCopy16(3, gUnknown_02038C28[0], gUnknown_02038C28[1], 320);
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320);
}
static void HBlankCB_Phase2_30(void)
{
u16 var = gUnknown_02038C28[1][REG_VCOUNT];
u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT];
REG_BG0VOFS = var;
}

View File

@ -3602,7 +3602,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3
FillWindowPixelBuffer(windowId, txtColor.fgColor | (txtColor.fgColor << 4));
}
AddTextPrinterParametrized2(windowId, 1, x, y, letterSpacing, 1, &txtColor, speed, string);
AddTextPrinterParameterized2(windowId, 1, x, y, letterSpacing, 1, &txtColor, speed, string);
}
static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed)

View File

@ -6,7 +6,7 @@
#include "main.h"
#include "sprite.h"
#include "task.h"
#include "unknown_task.h"
#include "scanline_effect.h"
#include "window.h"
#include "text.h"
#include "menu.h"

119
src/coord_event_weather.c Normal file
View File

@ -0,0 +1,119 @@
#include "global.h"
#include "constants/weather.h"
#include "coord_event_weather.h"
#include "field_weather.h"
struct CoordEventWeather
{
u8 coordEventWeather;
void (*func)(void);
};
static void CoordEventWeather_Clouds(void);
static void CoordEventWeather_Sunny(void);
static void CoordEventWeather_LightRain(void);
static void CoordEventWeather_Snow(void);
static void CoordEventWeather_Thunderstorm(void);
static void CoordEventWeather_Fog(void);
static void CoordEventWeather_DiagonalFog(void);
static void CoordEventWeather_Ash(void);
static void CoordEventWeather_Sandstorm(void);
static void CoordEventWeather_Dark(void);
static void CoordEventWeather_Drought(void);
static void CoordEventWeather_Route119Cycle(void);
static void CoordEventWeather_Route123Cycle(void);
static const struct CoordEventWeather sCoordEventWeatherFuncs[] =
{
{ COORD_EVENT_WEATHER_CLOUDS, CoordEventWeather_Clouds },
{ COORD_EVENT_WEATHER_SUNNY, CoordEventWeather_Sunny },
{ COORD_EVENT_WEATHER_RAIN_LIGHT, CoordEventWeather_LightRain },
{ COORD_EVENT_WEATHER_SNOW, CoordEventWeather_Snow },
{ COORD_EVENT_WEATHER_RAIN_MED, CoordEventWeather_Thunderstorm },
{ COORD_EVENT_WEATHER_FOG_1, CoordEventWeather_Fog },
{ COORD_EVENT_WEATHER_FOG_2, CoordEventWeather_DiagonalFog },
{ COORD_EVENT_WEATHER_ASH, CoordEventWeather_Ash },
{ COORD_EVENT_WEATHER_SANDSTORM, CoordEventWeather_Sandstorm },
{ COORD_EVENT_WEATHER_SHADE, CoordEventWeather_Dark },
{ COORD_EVENT_WEATHER_DROUGHT, CoordEventWeather_Drought },
{ COORD_EVENT_WEATHER_ROUTE119_CYCLE, CoordEventWeather_Route119Cycle },
{ COORD_EVENT_WEATHER_ROUTE123_CYCLE, CoordEventWeather_Route123Cycle },
};
static void CoordEventWeather_Clouds(void)
{
SetWeather(WEATHER_CLOUDS);
}
static void CoordEventWeather_Sunny(void)
{
SetWeather(WEATHER_SUNNY);
}
static void CoordEventWeather_LightRain(void)
{
SetWeather(WEATHER_RAIN_LIGHT);
}
static void CoordEventWeather_Snow(void)
{
SetWeather(WEATHER_SNOW);
}
static void CoordEventWeather_Thunderstorm(void)
{
SetWeather(WEATHER_RAIN_MED);
}
static void CoordEventWeather_Fog(void)
{
SetWeather(WEATHER_FOG_1);
}
static void CoordEventWeather_DiagonalFog(void)
{
SetWeather(WEATHER_FOG_2);
}
static void CoordEventWeather_Ash(void)
{
SetWeather(WEATHER_ASH);
}
static void CoordEventWeather_Sandstorm(void)
{
SetWeather(WEATHER_SANDSTORM);
}
static void CoordEventWeather_Dark(void)
{
SetWeather(WEATHER_SHADE);
}
static void CoordEventWeather_Drought(void)
{
SetWeather(WEATHER_DROUGHT);
}
static void CoordEventWeather_Route119Cycle(void)
{
SetWeather(WEATHER_ROUTE119_CYCLE);
}
static void CoordEventWeather_Route123Cycle(void)
{
SetWeather(WEATHER_ROUTE123_CYCLE);
}
void DoCoordEventWeather(u8 coordEventWeather)
{
u8 i;
for (i = 0; i < ARRAY_COUNT(sCoordEventWeatherFuncs); i++)
{
if (sCoordEventWeatherFuncs[i].coordEventWeather == coordEventWeather)
{
sCoordEventWeatherFuncs[i].func();
return;
}
}
}

View File

@ -500,7 +500,7 @@ void sub_8126B80(u8 taskId)
void sub_8126C08(void)
{
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParametrized(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
AddTextPrinterParameterized(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
}
void SecretBasePC_Decorate(u8 taskId)
@ -529,7 +529,7 @@ void SecretBasePC_PutAway(u8 taskId)
{
sub_8126A58(0);
sub_8197434(0, 0);
fade_screen(1, 0);
FadeScreen(1, 0);
gTasks[taskId].data[2] = 0;
gTasks[taskId].func = sub_8129ABC;
}
@ -1247,7 +1247,7 @@ void sub_8127F68(u8 taskId)
{
if (sub_8127F38() == TRUE)
{
fade_screen(1, 0);
FadeScreen(1, 0);
gTasks[taskId].data[2] = 0;
gTasks[taskId].func = sub_8128060;
}
@ -1661,7 +1661,7 @@ void sub_8128BA0(u8 taskId)
void sub_8128BBC(u8 taskId)
{
fade_screen(1, 0);
FadeScreen(1, 0);
gTasks[taskId].data[2] = 0;
gTasks[taskId].func = c1_overworld_prev_quest;
}
@ -2635,7 +2635,7 @@ void sub_812A1A0(u8 taskId)
void sub_812A1C0(u8 taskId)
{
fade_screen(1, 0);
FadeScreen(1, 0);
gTasks[taskId].data[2] = 0;
gTasks[taskId].func = sub_81298EC;
}
@ -2654,7 +2654,7 @@ void sub_812A210(u8 taskId)
void sub_812A22C(u8 taskId)
{
fade_screen(1, 0);
FadeScreen(1, 0);
gTasks[taskId].data[2] = 0;
gTasks[taskId].func = sub_812A25C;
}

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