mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
coord weather fix conflicts
This commit is contained in:
commit
9fbedcc41c
9
Makefile
9
Makefile
@ -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 $< $@
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 sub_8009FAC
|
||||
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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -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,7 +7559,7 @@ sub_80AEDBC: @ 80AEDBC
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80AEDBC
|
||||
thumb_func_end SetSav1WeatherFromCurrMapHeader
|
||||
|
||||
thumb_func_start SetWeather
|
||||
SetWeather: @ 80AEDF0
|
||||
@ -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 sub_8009FAC
|
||||
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
|
||||
|
10
asm/intro.s
10
asm/intro.s
@ -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:
|
||||
|
2863
asm/item_use.s
2863
asm/item_use.s
File diff suppressed because it is too large
Load Diff
16
asm/link.s
16
asm/link.s
@ -21684,7 +21684,7 @@ _080148CC:
|
||||
bne _080149B2
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
bl fade_screen
|
||||
bl FadeScreen
|
||||
movs r0, 0x2
|
||||
strh r0, [r7]
|
||||
b _080149B2
|
||||
@ -39837,7 +39837,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
|
||||
@ -42568,7 +42568,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}
|
||||
@ -44875,13 +44875,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
|
||||
@ -44896,12 +44896,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
|
||||
@ -44939,7 +44939,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
|
||||
|
@ -1,10 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
11782
asm/pokemon_animation.s
11782
asm/pokemon_animation.s
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
@ -888,7 +888,7 @@ _0809EFCA:
|
||||
bl ResetOamRange
|
||||
bl LoadOam
|
||||
bl ScanlineEffect_Stop
|
||||
bl dp12_8087EA4
|
||||
bl ScanlineEffect_Clear
|
||||
bl ResetSpriteData
|
||||
bl ResetTasks
|
||||
bl ResetPaletteFade
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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.
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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
|
@ -1,12 +1,6 @@
|
||||
#ifndef GUARD_BLEND_PALETTE_H
|
||||
#define GUARD_BLEND_PALETTE_H
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
|
||||
void BlendPalette(u16, u16, u8, u16);
|
||||
void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor);
|
||||
|
||||
#endif // GUARD_BLEND_PALETTE_H
|
||||
|
15
include/constants/rgb.h
Normal file
15
include/constants/rgb.h
Normal 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
|
@ -1,13 +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 SetWeather(u32);
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -70,6 +70,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);
|
||||
|
||||
void IncrementGameStat(u8);
|
||||
u32 GetGameStat(u8);
|
||||
|
@ -1,7 +1,10 @@
|
||||
#ifndef GUARD_POKEMON_ANIMATION_H
|
||||
#define GUARD_POKEMON_ANIMATION_H
|
||||
|
||||
u8 GetSpeciesBackAnimSet(u16 species);
|
||||
void LaunchAnimationTaskForFrontSprite(struct Sprite *sprite, u8 frontAnimId);
|
||||
void LaunchAnimationTaskForBackSprite(struct Sprite* sprite, u8 backAnimId);
|
||||
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
|
||||
|
47
include/scanline_effect.h
Normal file
47
include/scanline_effect.h
Normal 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
|
@ -233,6 +233,7 @@ extern s16 gSpriteCoordOffsetX;
|
||||
extern s16 gSpriteCoordOffsetY;
|
||||
|
||||
extern struct Sprite gSprites[];
|
||||
extern struct OamMatrix gOamMatrices[];
|
||||
|
||||
void ResetSpriteData(void);
|
||||
void AnimateSprites(void);
|
||||
|
8
include/time_events.h
Normal file
8
include/time_events.h
Normal 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
|
@ -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
|
@ -126,7 +126,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);
|
||||
@ -162,7 +162,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);
|
||||
@ -185,7 +185,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);
|
||||
@ -240,7 +240,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);
|
||||
@ -472,7 +472,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);
|
||||
@ -514,7 +514,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);
|
||||
|
@ -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"
|
||||
@ -46,13 +46,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;
|
||||
@ -90,8 +83,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[];
|
||||
@ -162,6 +153,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[];
|
||||
@ -180,7 +172,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?
|
||||
@ -383,24 +375,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();
|
||||
@ -1596,7 +1585,7 @@ void BattleMainCB2(void)
|
||||
static void FreeRestoreBattleData(void)
|
||||
{
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
gUnknown_02039B28[0x15] = 3;
|
||||
gScanlineEffect.state = 3;
|
||||
gMain.inBattle = 0;
|
||||
ZeroEnemyPartyMons();
|
||||
m4aSongNumStop(0x5A);
|
||||
@ -1814,7 +1803,7 @@ void VBlankCB_Battle(void)
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
sub_80BA0A8();
|
||||
ScanlineEffect_InitHBlankDmaTransfer();
|
||||
}
|
||||
|
||||
void nullsub_17(void)
|
||||
@ -1952,18 +1941,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();
|
||||
|
@ -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)
|
||||
|
@ -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, ®_BG0HOFS, 0xA2400001);
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_BG0HOFS, 0xA2400001);
|
||||
}
|
||||
|
||||
static void VBlankCB1_Phase2_BigPokeball(void)
|
||||
{
|
||||
Transition_BigPokeball_Vblank();
|
||||
DmaSet(0, gUnknown_020393A8, ®_WIN0H, 0xA2400001);
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_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], ®_WIN0H, 0xA2400001);
|
||||
REG_WIN0H = gScanlineEffectRegBuffers[1][0];
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_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], ®_WIN0H, 0xA2400001);
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_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], ®_WIN0H, 0xA2400001);
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_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], ®_BLDY, 0xA2400001);
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_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], ®_WIN0H, 0xA2400001);
|
||||
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 640);
|
||||
DmaSet(0, &gScanlineEffectRegBuffers[1][160], ®_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);
|
||||
|
||||
@ -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, ®_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], ®_WIN0H, 0xA2400001);
|
||||
DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 640);
|
||||
DmaSet(0, &gScanlineEffectRegBuffers[1][160], ®_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], ®_WIN0H, 0xA2400001);
|
||||
REG_WIN0H = gScanlineEffectRegBuffers[1][0];
|
||||
DmaSet(0, gScanlineEffectRegBuffers[1], ®_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;
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "palette.h"
|
||||
#include "main.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "task.h"
|
||||
#include "malloc.h"
|
||||
#include "decompress.h"
|
||||
|
@ -61,7 +61,7 @@ extern u8 sav1_map_get_name(void);
|
||||
extern s8 ProcessMenuInputNoWrap_(void);
|
||||
extern void TVShowConvertInternationalString(u8* str1, u8* str2, u8);
|
||||
extern void sub_806A068(u16, u8);
|
||||
extern void fade_screen(u8, u8);
|
||||
extern void FadeScreen(u8, u8);
|
||||
extern void overworld_free_bg_tilemaps(void);
|
||||
extern void sub_80AF168(void);
|
||||
extern void AllocateMonSpritesGfx(void);
|
||||
@ -465,7 +465,7 @@ void EggHatch(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_EggHatch, 10);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
}
|
||||
|
||||
static void Task_EggHatch(u8 taskID)
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "string_util.h"
|
||||
#include "battle.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "decompress.h"
|
||||
#include "m4a.h"
|
||||
#include "menu.h"
|
||||
@ -1367,7 +1367,7 @@ static void VBlankCB_EvolutionScene(void)
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
sub_80BA0A8();
|
||||
ScanlineEffect_InitHBlankDmaTransfer();
|
||||
}
|
||||
|
||||
static void VBlankCB_TradeEvolutionScene(void)
|
||||
@ -1384,7 +1384,7 @@ static void VBlankCB_TradeEvolutionScene(void)
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
sub_80BA0A8();
|
||||
ScanlineEffect_InitHBlankDmaTransfer();
|
||||
}
|
||||
|
||||
static void sub_813FDEC(u8 taskId)
|
||||
|
@ -20,11 +20,12 @@
|
||||
#include "string_util.h"
|
||||
#include "m4a.h"
|
||||
#include "international_string_util.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "trig.h"
|
||||
#include "random.h"
|
||||
#include "event_data.h"
|
||||
#include "overworld.h"
|
||||
#include "new_menu_helpers.h"
|
||||
|
||||
struct HallofFameMon
|
||||
{
|
||||
@ -53,7 +54,6 @@ static EWRAM_DATA struct HofGfx *sHofGfxPtr = NULL;
|
||||
|
||||
extern bool8 gHasHallOfFameRecords;
|
||||
extern u32 gUnknown_0203BCD4;
|
||||
extern u8 gDecompressionBuffer[];
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern MainCallback gGameContinueCallback;
|
||||
extern u32 gDamagedSaveSectors;
|
||||
@ -82,7 +82,6 @@ extern const u8 gContestConfetti_Gfx[];
|
||||
extern const u8 gContestConfetti_Pal[];
|
||||
|
||||
extern void sub_81973C4(u8, u8);
|
||||
extern u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
extern void sub_8175620(void);
|
||||
extern u8 TrySavingData(u8);
|
||||
extern u8 sub_818D3E4(u16 species, u32 trainerId, u32 personality, u8 flags, s16 x, s16 y, u8, u16);
|
||||
|
1271
src/item_use.c
Executable file
1271
src/item_use.c
Executable file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
#include "main.h"
|
||||
#include "overworld.h"
|
||||
#include "task.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "palette.h"
|
||||
#include "text.h"
|
||||
#include "menu.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "option_menu.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "palette.h"
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "decompress.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "task.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "battle.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "palette.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "list_menu.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "decompress.h"
|
||||
|
@ -74,8 +74,6 @@ extern u8 GetFrontierOpponentClass(u16 trainerId);
|
||||
extern u8 pokemon_order_func(u8 bankPartyId);
|
||||
extern void GetFrontierTrainerName(u8* dest, u16 trainerId);
|
||||
extern void sub_81C488C(u8);
|
||||
extern void sub_817F578(struct Sprite*, u8 frontAnimId);
|
||||
extern u8 GetSpeciesBackAnimId(u16 species);
|
||||
|
||||
static void sub_806E6CC(u8 taskId);
|
||||
|
||||
@ -1508,7 +1506,7 @@ static void Task_PokemonSummaryAnimateAfterDelay(u8 taskId)
|
||||
{
|
||||
if (--gTasks[taskId].data[3] == 0)
|
||||
{
|
||||
sub_817F578(READ_PTR_FROM_TASK(taskId, 0), gTasks[taskId].data[2]);
|
||||
StartMonSummaryAnimation(READ_PTR_FROM_TASK(taskId, 0), gTasks[taskId].data[2]);
|
||||
sub_81C488C(0xFF);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@ -1523,7 +1521,6 @@ void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u
|
||||
}
|
||||
|
||||
extern void SpriteCallbackDummy_2(struct Sprite*);
|
||||
extern void sub_817F60C(struct Sprite*);
|
||||
|
||||
void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3)
|
||||
{
|
||||
@ -1580,11 +1577,11 @@ void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneF
|
||||
gTasks[taskId].data[2] = gMonFrontAnimIdsTable[species - 1];
|
||||
gTasks[taskId].data[3] = gMonAnimationDelayTable[species - 1];
|
||||
sub_81C488C(taskId);
|
||||
sub_817F60C(sprite);
|
||||
SetSpriteCB_MonAnimDummy(sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_817F578(sprite, gMonFrontAnimIdsTable[species - 1]);
|
||||
StartMonSummaryAnimation(sprite, gMonFrontAnimIdsTable[species - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1603,7 +1600,7 @@ void BattleAnimateBackSprite(struct Sprite* sprite, u16 species)
|
||||
}
|
||||
else
|
||||
{
|
||||
LaunchAnimationTaskForBackSprite(sprite, GetSpeciesBackAnimId(species));
|
||||
LaunchAnimationTaskForBackSprite(sprite, GetSpeciesBackAnimSet(species));
|
||||
sprite->callback = SpriteCallbackDummy_2;
|
||||
}
|
||||
}
|
||||
|
5658
src/pokemon_animation.c
Normal file
5658
src/pokemon_animation.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
#include "battle.h"
|
||||
#include "palette.h"
|
||||
#include "main.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "text.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "bg.h"
|
||||
@ -34,7 +34,7 @@ extern struct SpriteTemplate gUnknown_0202499C;
|
||||
|
||||
extern const union AnimCmd * const * const gMonAnimationsSpriteAnimsPtrTable[];
|
||||
|
||||
extern void dp12_8087EA4(void);
|
||||
extern void ScanlineEffect_Clear(void);
|
||||
extern void sub_8035658(void);
|
||||
extern bool8 IsDoubleBattle(void);
|
||||
extern u8 GetSubstituteSpriteDefault_Y(u8 bank);
|
||||
@ -72,7 +72,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
|
||||
switch (gBattleScripting.reshowMainState)
|
||||
{
|
||||
case 0:
|
||||
dp12_8087EA4();
|
||||
ScanlineEffect_Clear();
|
||||
sub_8035658();
|
||||
SetBgAttribute(1, BG_CTRL_ATTR_VISIBLE, 0);
|
||||
SetBgAttribute(2, BG_CTRL_ATTR_VISIBLE, 0);
|
||||
|
262
src/scanline_effect.c
Normal file
262
src/scanline_effect.c
Normal file
@ -0,0 +1,262 @@
|
||||
#include "global.h"
|
||||
#include "data2.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "scanline_effect.h"
|
||||
|
||||
static void CopyValue16Bit(void);
|
||||
static void CopyValue32Bit(void);
|
||||
|
||||
extern u16 gBattle_BG0_Y;
|
||||
extern u16 gBattle_BG0_X;
|
||||
extern u16 gBattle_BG1_X;
|
||||
extern u16 gBattle_BG1_Y;
|
||||
extern u16 gBattle_BG2_X;
|
||||
extern u16 gBattle_BG2_Y;
|
||||
extern u16 gBattle_BG3_X;
|
||||
extern u16 gBattle_BG3_Y;
|
||||
|
||||
// EWRAM vars
|
||||
|
||||
// Per-scanline register values.
|
||||
// This is double buffered so that it can be safely written to at any time
|
||||
// without overwriting the buffer that the DMA is currently reading
|
||||
EWRAM_DATA u16 gScanlineEffectRegBuffers[2][0x3C0] = {0};
|
||||
|
||||
EWRAM_DATA struct ScanlineEffect gScanlineEffect = {0};
|
||||
EWRAM_DATA static bool8 sShouldStopWaveTask = FALSE;
|
||||
|
||||
void ScanlineEffect_Stop(void)
|
||||
{
|
||||
gScanlineEffect.state = 0;
|
||||
DmaStop(0);
|
||||
if (gScanlineEffect.waveTaskId != 0xFF)
|
||||
{
|
||||
DestroyTask(gScanlineEffect.waveTaskId);
|
||||
gScanlineEffect.waveTaskId = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void ScanlineEffect_Clear(void)
|
||||
{
|
||||
CpuFill16(0, gScanlineEffectRegBuffers, sizeof(gScanlineEffectRegBuffers));
|
||||
gScanlineEffect.dmaSrcBuffers[0] = NULL;
|
||||
gScanlineEffect.dmaSrcBuffers[1] = NULL;
|
||||
gScanlineEffect.dmaDest = NULL;
|
||||
gScanlineEffect.dmaControl = 0;
|
||||
gScanlineEffect.srcBuffer = 0;
|
||||
gScanlineEffect.state = 0;
|
||||
gScanlineEffect.unused16 = 0;
|
||||
gScanlineEffect.unused17 = 0;
|
||||
gScanlineEffect.waveTaskId = 0xFF;
|
||||
}
|
||||
|
||||
void ScanlineEffect_SetParams(struct ScanlineEffectParams params)
|
||||
{
|
||||
if (params.dmaControl == SCANLINE_EFFECT_DMACNT_16BIT) // 16-bit
|
||||
{
|
||||
// Set the DMA src to the value for the second scanline because the
|
||||
// first DMA transfer occurs in HBlank *after* the first scanline is drawn
|
||||
gScanlineEffect.dmaSrcBuffers[0] = (u16 *)gScanlineEffectRegBuffers[0] + 1;
|
||||
gScanlineEffect.dmaSrcBuffers[1] = (u16 *)gScanlineEffectRegBuffers[1] + 1;
|
||||
gScanlineEffect.setFirstScanlineReg = CopyValue16Bit;
|
||||
}
|
||||
else // assume 32-bit
|
||||
{
|
||||
// Set the DMA src to the value for the second scanline because the
|
||||
// first DMA transfer occurs in HBlank *after* the first scanline is drawn
|
||||
gScanlineEffect.dmaSrcBuffers[0] = (u32 *)gScanlineEffectRegBuffers[0] + 1;
|
||||
gScanlineEffect.dmaSrcBuffers[1] = (u32 *)gScanlineEffectRegBuffers[1] + 1;
|
||||
gScanlineEffect.setFirstScanlineReg = CopyValue32Bit;
|
||||
}
|
||||
|
||||
gScanlineEffect.dmaControl = params.dmaControl;
|
||||
gScanlineEffect.dmaDest = params.dmaDest;
|
||||
gScanlineEffect.state = params.initState;
|
||||
gScanlineEffect.unused16 = params.unused9;
|
||||
gScanlineEffect.unused17 = params.unused9;
|
||||
}
|
||||
|
||||
void ScanlineEffect_InitHBlankDmaTransfer(void)
|
||||
{
|
||||
if (gScanlineEffect.state == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (gScanlineEffect.state == 3)
|
||||
{
|
||||
gScanlineEffect.state = 0;
|
||||
DmaStop(0);
|
||||
sShouldStopWaveTask = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DmaStop(0);
|
||||
// Set DMA to copy to dest register on each HBlank for the next frame.
|
||||
// The HBlank DMA transfers do not occurr during VBlank, so the transfer
|
||||
// will begin on the HBlank after the first scanline
|
||||
DmaSet(0, gScanlineEffect.dmaSrcBuffers[gScanlineEffect.srcBuffer], gScanlineEffect.dmaDest, gScanlineEffect.dmaControl);
|
||||
// Manually set the reg for the first scanline
|
||||
gScanlineEffect.setFirstScanlineReg();
|
||||
// Swap current buffer
|
||||
gScanlineEffect.srcBuffer ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// These two functions are used to copy the register for the first scanline,
|
||||
// depending whether it is a 16-bit register or a 32-bit register.
|
||||
|
||||
static void CopyValue16Bit(void)
|
||||
{
|
||||
u16 *dest = (u16 *)gScanlineEffect.dmaDest;
|
||||
u16 *src = (u16 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer];
|
||||
|
||||
*dest = *src;
|
||||
}
|
||||
|
||||
static void CopyValue32Bit(void)
|
||||
{
|
||||
u32 *dest = (u32 *)gScanlineEffect.dmaDest;
|
||||
u32 *src = (u32 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer];
|
||||
|
||||
*dest = *src;
|
||||
}
|
||||
|
||||
#define tStartLine data[0]
|
||||
#define tEndLine data[1]
|
||||
#define tWaveLength data[2]
|
||||
#define tSrcBufferOffset data[3]
|
||||
#define tFramesUntilMove data[4]
|
||||
#define tDelayInterval data[5]
|
||||
#define tRegOffset data[6]
|
||||
#define tApplyBattleBgOffsets data[7]
|
||||
|
||||
static void TaskFunc_UpdateWavePerFrame(u8 taskId)
|
||||
{
|
||||
int value = 0;
|
||||
int i;
|
||||
int offset;
|
||||
|
||||
if (sShouldStopWaveTask)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
gScanlineEffect.waveTaskId = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gTasks[taskId].tApplyBattleBgOffsets)
|
||||
{
|
||||
switch (gTasks[taskId].tRegOffset)
|
||||
{
|
||||
case SCANLINE_EFFECT_REG_BG0HOFS:
|
||||
value = gBattle_BG0_X;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG0VOFS:
|
||||
value = gBattle_BG0_Y;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG1HOFS:
|
||||
value = gBattle_BG1_X;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG1VOFS:
|
||||
value = gBattle_BG1_Y;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG2HOFS:
|
||||
value = gBattle_BG2_X;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG2VOFS:
|
||||
value = gBattle_BG2_Y;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG3HOFS:
|
||||
value = gBattle_BG3_X;
|
||||
break;
|
||||
case SCANLINE_EFFECT_REG_BG3VOFS:
|
||||
value = gBattle_BG3_Y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (gTasks[taskId].tFramesUntilMove != 0)
|
||||
{
|
||||
gTasks[taskId].tFramesUntilMove--;
|
||||
offset = gTasks[taskId].tSrcBufferOffset + 320;
|
||||
for (i = gTasks[taskId].tStartLine; i < gTasks[taskId].tEndLine; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = gScanlineEffectRegBuffers[0][offset] + value;
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gTasks[taskId].tFramesUntilMove = gTasks[taskId].tDelayInterval;
|
||||
offset = gTasks[taskId].tSrcBufferOffset + 320;
|
||||
for (i = gTasks[taskId].tStartLine; i < gTasks[taskId].tEndLine; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer][i] = gScanlineEffectRegBuffers[0][offset] + value;
|
||||
offset++;
|
||||
}
|
||||
|
||||
// increment src buffer offset
|
||||
gTasks[taskId].tSrcBufferOffset++;
|
||||
if (gTasks[taskId].tSrcBufferOffset == gTasks[taskId].tWaveLength)
|
||||
gTasks[taskId].tSrcBufferOffset = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void GenerateWave(u16 *buffer, u8 frequency, u8 amplitude, u8 unused)
|
||||
{
|
||||
u16 i = 0;
|
||||
u8 theta = 0;
|
||||
|
||||
while (i < 256)
|
||||
{
|
||||
buffer[i] = (gSineTable[theta] * amplitude) / 256;
|
||||
theta += frequency;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// Initializes a background "wave" effect that affects scanlines startLine (inclusive) to endLine (exclusive).
|
||||
// 'frequency' and 'amplitude' control the frequency and amplitude of the wave.
|
||||
// 'delayInterval' controls how fast the wave travels up the screen. The wave will shift upwards one scanline every 'delayInterval'+1 frames.
|
||||
// 'regOffset' is the offset of the video register to modify.
|
||||
u8 ScanlineEffect_InitWave(u8 startLine, u8 endLine, u8 frequency, u8 amplitude, u8 delayInterval, u8 regOffset, bool8 applyBattleBgOffsets)
|
||||
{
|
||||
int i;
|
||||
int offset;
|
||||
struct ScanlineEffectParams params;
|
||||
u8 taskId;
|
||||
|
||||
ScanlineEffect_Clear();
|
||||
|
||||
params.dmaDest = (void *)(REG_ADDR_BG0HOFS + regOffset);
|
||||
params.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT;
|
||||
params.initState = 1;
|
||||
params.unused9 = 0;
|
||||
ScanlineEffect_SetParams(params);
|
||||
|
||||
taskId = CreateTask(TaskFunc_UpdateWavePerFrame, 0);
|
||||
|
||||
gTasks[taskId].tStartLine = startLine;
|
||||
gTasks[taskId].tEndLine = endLine;
|
||||
gTasks[taskId].tWaveLength = 256 / frequency;
|
||||
gTasks[taskId].tSrcBufferOffset = 0;
|
||||
gTasks[taskId].tFramesUntilMove = delayInterval;
|
||||
gTasks[taskId].tDelayInterval = delayInterval;
|
||||
gTasks[taskId].tRegOffset = regOffset;
|
||||
gTasks[taskId].tApplyBattleBgOffsets = applyBattleBgOffsets;
|
||||
|
||||
gScanlineEffect.waveTaskId = taskId;
|
||||
sShouldStopWaveTask = FALSE;
|
||||
|
||||
GenerateWave(&gScanlineEffectRegBuffers[0][320], frequency, amplitude, endLine - startLine);
|
||||
|
||||
offset = 320;
|
||||
for (i = startLine; i < endLine; i++)
|
||||
{
|
||||
gScanlineEffectRegBuffers[0][i] = gScanlineEffectRegBuffers[0][offset];
|
||||
gScanlineEffectRegBuffers[1][i] = gScanlineEffectRegBuffers[0][offset];
|
||||
offset++;
|
||||
}
|
||||
|
||||
return taskId;
|
||||
}
|
10
src/scrcmd.c
10
src/scrcmd.c
@ -638,7 +638,7 @@ static bool8 IsPaletteNotActive(void)
|
||||
|
||||
bool8 ScrCmd_fadescreen(struct ScriptContext *ctx)
|
||||
{
|
||||
fade_screen(ScriptReadByte(ctx), 0);
|
||||
FadeScreen(ScriptReadByte(ctx), 0);
|
||||
SetupNativeScript(ctx, IsPaletteNotActive);
|
||||
return TRUE;
|
||||
}
|
||||
@ -648,7 +648,7 @@ bool8 ScrCmd_fadescreenspeed(struct ScriptContext *ctx)
|
||||
u8 mode = ScriptReadByte(ctx);
|
||||
u8 speed = ScriptReadByte(ctx);
|
||||
|
||||
fade_screen(mode, speed);
|
||||
FadeScreen(mode, speed);
|
||||
SetupNativeScript(ctx, IsPaletteNotActive);
|
||||
return TRUE;
|
||||
}
|
||||
@ -662,12 +662,12 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx)
|
||||
case 1:
|
||||
default:
|
||||
CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE);
|
||||
fade_screen(mode, 0);
|
||||
FadeScreen(mode, 0);
|
||||
break;
|
||||
case 0:
|
||||
case 2:
|
||||
CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE);
|
||||
fade_screen(mode, 0);
|
||||
FadeScreen(mode, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ bool8 ScrCmd_setweather(struct ScriptContext *ctx)
|
||||
|
||||
bool8 ScrCmd_resetweather(struct ScriptContext *ctx)
|
||||
{
|
||||
sub_80AEDBC();
|
||||
SetSav1WeatherFromCurrMapHeader();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ void sub_80E8FD0(u8 taskId)
|
||||
void sub_80E9068(void)
|
||||
{
|
||||
CreateTask(sub_80E8FD0, 0);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
saved_warp2_set(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ void sub_80E916C(u8 taskId)
|
||||
void sub_80E91F8(void)
|
||||
{
|
||||
CreateTask(sub_80E916C, 0);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
}
|
||||
|
||||
bool8 CurrentMapIsSecretBase(void)
|
||||
@ -651,7 +651,7 @@ void sub_80E96A4(u8 taskId)
|
||||
void sub_80E9728(void)
|
||||
{
|
||||
CreateTask(sub_80E96A4, 0);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
}
|
||||
|
||||
void sub_80E9744(void)
|
||||
|
352
src/text.c
352
src/text.c
@ -1,6 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "main.h"
|
||||
#include "m4a.h"
|
||||
#include "palette.h"
|
||||
#include "sound.h"
|
||||
#include "string_util.h"
|
||||
#include "window.h"
|
||||
#include "text.h"
|
||||
@ -14,6 +17,7 @@ extern u16 Font6Func(struct TextPrinter *textPrinter);
|
||||
extern u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese);
|
||||
extern void PlaySE(u16 songNum);
|
||||
extern u8* UnkTextUtil_GetPtrI(u8 a1);
|
||||
extern int sub_8197964();
|
||||
|
||||
EWRAM_DATA struct TextPrinter gTempTextPrinter = {0};
|
||||
EWRAM_DATA struct TextPrinter gTextPrinters[NUM_TEXT_PRINTERS] = {0};
|
||||
@ -24,6 +28,7 @@ static u16 gLastTextFgColor;
|
||||
static u16 gLastTextShadowColor;
|
||||
|
||||
extern struct Main gMain;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
const struct FontInfo *gFonts;
|
||||
u8 gUnknown_03002F84;
|
||||
@ -2046,9 +2051,303 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef NONMATCHING
|
||||
u16 RenderText(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct TextPrinterSubStruct *r4 = &textPrinter->sub_union.sub;
|
||||
u16 currChar;
|
||||
s32 width;
|
||||
|
||||
switch (textPrinter->state) // _080057C4
|
||||
{
|
||||
case 0: // _080057F0
|
||||
if ((gMain.heldKeys & (A_BUTTON | B_BUTTON)) && r4->font_type_upper)
|
||||
textPrinter->delayCounter = 0;
|
||||
|
||||
if (textPrinter->delayCounter && textPrinter->text_speed) //_0800580A
|
||||
{
|
||||
textPrinter->delayCounter--;
|
||||
if (gTextFlags.flag_0 && (gMain.newKeys & (A_BUTTON | B_BUTTON)))
|
||||
{
|
||||
r4->font_type_upper = 1;
|
||||
textPrinter->delayCounter = 0;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED) && gTextFlags.flag_2)
|
||||
textPrinter->delayCounter = 3;
|
||||
else
|
||||
textPrinter->delayCounter = textPrinter->text_speed;
|
||||
|
||||
currChar = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
|
||||
switch (currChar) //_0800588A
|
||||
{
|
||||
case 0xF8+6: //_080058B8
|
||||
textPrinter->subPrinter.currentX = textPrinter->subPrinter.x;
|
||||
textPrinter->subPrinter.currentY += (gFonts[textPrinter->subPrinter.fontId].maxLetterHeight + textPrinter->subPrinter.lineSpacing);
|
||||
return 2;
|
||||
case 0xF8+5: //_080058DC
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 0xF8+4: //_080058E0
|
||||
currChar = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
switch (currChar) // _080058F0
|
||||
{
|
||||
case 1: // _08005960
|
||||
textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 2: // _08005982
|
||||
textPrinter->subPrinter.bgColor = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 3: // _080059A6
|
||||
textPrinter->subPrinter.shadowColor = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 4: // _080059C0
|
||||
textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
textPrinter->subPrinter.bgColor = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
textPrinter->subPrinter.shadowColor = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor);
|
||||
return 2;
|
||||
case 5: // _08005A0E
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 6: //_08005A12
|
||||
r4->font_type = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 7: // _08005A0A
|
||||
return 2;
|
||||
case 8: // _08005A2A
|
||||
textPrinter->delayCounter = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
textPrinter->state = 6;
|
||||
return 2;
|
||||
case 9: // _08005A3A
|
||||
textPrinter->state = 1;
|
||||
if (gTextFlags.flag_2)
|
||||
r4->frames_visible_counter = 0;
|
||||
return 3;
|
||||
case 10: // _08005A58
|
||||
textPrinter->state = 5;
|
||||
return 3;
|
||||
case 11: // _08005A5C
|
||||
currChar = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
currChar |= *textPrinter->subPrinter.current_text_offset << 8;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
PlayBGM(currChar);
|
||||
return 2;
|
||||
case 16: // _08005A76
|
||||
currChar = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
currChar |= (*textPrinter->subPrinter.current_text_offset << 8);
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
PlaySE(currChar);
|
||||
return 2;
|
||||
case 13: // _08005A90
|
||||
textPrinter->subPrinter.currentX = textPrinter->subPrinter.x + *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 14: // _08005A98
|
||||
textPrinter->subPrinter.currentY = textPrinter->subPrinter.y + *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 15: // _08005AA4
|
||||
FillWindowPixelBuffer(textPrinter->subPrinter.windowId, textPrinter->subPrinter.bgColor | textPrinter->subPrinter.bgColor << 4);
|
||||
textPrinter->subPrinter.currentX = textPrinter->subPrinter.x;
|
||||
textPrinter->subPrinter.currentY = textPrinter->subPrinter.y;
|
||||
return 2;
|
||||
case 23: // _08005ABE
|
||||
m4aMPlayStop(&gMPlayInfo_BGM);
|
||||
return 2;
|
||||
case 24: // _08005ACC
|
||||
m4aMPlayContinue(&gMPlayInfo_BGM);
|
||||
return 2;
|
||||
case 17: // _08005AD8
|
||||
width = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
if (width > 0)
|
||||
{
|
||||
ClearTextSpan(textPrinter, width);
|
||||
textPrinter->subPrinter.currentX += width;
|
||||
return 0;
|
||||
}
|
||||
return 2;
|
||||
case 18: // _08005AF2
|
||||
textPrinter->subPrinter.currentX = *textPrinter->subPrinter.current_text_offset + textPrinter->subPrinter.x;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 19: // _08005B02
|
||||
{
|
||||
s32 widthHelper = *textPrinter->subPrinter.current_text_offset;
|
||||
widthHelper += textPrinter->subPrinter.x;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
width = widthHelper - textPrinter->subPrinter.currentX;
|
||||
if (width > 0)
|
||||
{
|
||||
ClearTextSpan(textPrinter, width);
|
||||
textPrinter->subPrinter.currentX += width;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 2;
|
||||
case 20: // _08005B26
|
||||
textPrinter->minLetterSpacing = *textPrinter->subPrinter.current_text_offset++;
|
||||
return 2;
|
||||
case 21: // _08005B36
|
||||
textPrinter->japanese = 1;
|
||||
return 2;
|
||||
case 22: // _08005B3E
|
||||
textPrinter->japanese = 0;
|
||||
return 2;
|
||||
case 12: // _08005B5A
|
||||
currChar = *textPrinter->subPrinter.current_text_offset | 0x100;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xF8+3: // _08005B48
|
||||
textPrinter->state = 2;
|
||||
TextPrinterInitDownArrowCounters(textPrinter);
|
||||
return 3;
|
||||
case 0xF8+2: // _08005B4C
|
||||
textPrinter->state = 3;
|
||||
TextPrinterInitDownArrowCounters(textPrinter);
|
||||
return 3;
|
||||
case 0xF8+1: // _08005B5A
|
||||
currChar = *textPrinter->subPrinter.current_text_offset | 0x100;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
break;
|
||||
case 0xF8+0: // _08005B6C
|
||||
currChar = *textPrinter->subPrinter.current_text_offset;
|
||||
textPrinter->subPrinter.current_text_offset++;
|
||||
gUnknown_03002F90[0x80] = DrawKeypadIcon(textPrinter->subPrinter.windowId, currChar, textPrinter->subPrinter.currentX, textPrinter->subPrinter.currentY);
|
||||
textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80] + textPrinter->subPrinter.letterSpacing;
|
||||
return 0;
|
||||
case 0xF8+7: // _08005D6C
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (r4->font_type) // _08005B90
|
||||
{
|
||||
case 0: // _08005BCC
|
||||
DecompressGlyphFont0(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 1: // _08005BDA
|
||||
DecompressGlyphFont1(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5: // _08005BE8
|
||||
DecompressGlyphFont2(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 7: // _08005BF6
|
||||
DecompressGlyphFont7(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 8: // _08005C04
|
||||
DecompressGlyphFont8(currChar, textPrinter->japanese);
|
||||
break;
|
||||
case 6: // _08005C10
|
||||
break;
|
||||
}
|
||||
|
||||
CopyGlyphToWindow(textPrinter); // _08005C10
|
||||
|
||||
if (textPrinter->minLetterSpacing)
|
||||
{
|
||||
textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80];
|
||||
width = textPrinter->minLetterSpacing - gUnknown_03002F90[0x80];
|
||||
if (width > 0)
|
||||
{
|
||||
ClearTextSpan(textPrinter, width);
|
||||
textPrinter->subPrinter.currentX += width;
|
||||
}
|
||||
}
|
||||
else // _08005C48
|
||||
{
|
||||
if (textPrinter->japanese)
|
||||
textPrinter->subPrinter.currentX += (gUnknown_03002F90[0x80] + textPrinter->subPrinter.letterSpacing);
|
||||
else
|
||||
textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80];
|
||||
}
|
||||
|
||||
return 0;
|
||||
case 1: // _08005C78
|
||||
if (TextPrinterWait(textPrinter))
|
||||
textPrinter->state = 0;
|
||||
return 3;
|
||||
case 2: // _08005C8C
|
||||
if (TextPrinterWaitWithDownArrow(textPrinter))
|
||||
{
|
||||
FillWindowPixelBuffer(textPrinter->subPrinter.windowId, (textPrinter->subPrinter.bgColor << 4) | textPrinter->subPrinter.bgColor);
|
||||
textPrinter->subPrinter.currentX = textPrinter->subPrinter.x;
|
||||
textPrinter->subPrinter.currentY = textPrinter->subPrinter.y;
|
||||
textPrinter->state = 0;
|
||||
}
|
||||
return 3;
|
||||
case 3: // _08005CB8
|
||||
if (TextPrinterWaitWithDownArrow(textPrinter))
|
||||
{
|
||||
TextPrinterClearDownArrow(textPrinter);
|
||||
textPrinter->scrollDistance = gFonts[textPrinter->subPrinter.fontId].maxLetterHeight + textPrinter->subPrinter.lineSpacing;
|
||||
textPrinter->subPrinter.currentX = textPrinter->subPrinter.x;
|
||||
textPrinter->state = 4;
|
||||
}
|
||||
return 3;
|
||||
case 4: // _08005CF0
|
||||
if (textPrinter->scrollDistance)
|
||||
{
|
||||
int scrollSpeed = sub_8197964();
|
||||
int speed = gWindowVerticalScrollSpeeds[scrollSpeed];
|
||||
if (textPrinter->scrollDistance < speed)
|
||||
{
|
||||
ScrollWindow(textPrinter->subPrinter.windowId, 0, textPrinter->scrollDistance, textPrinter->subPrinter.bgColor << 4 | textPrinter->subPrinter.bgColor);
|
||||
textPrinter->scrollDistance = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScrollWindow(textPrinter->subPrinter.windowId, 0, speed, textPrinter->subPrinter.bgColor << 4 | textPrinter->subPrinter.bgColor);
|
||||
textPrinter->scrollDistance -= speed;
|
||||
}
|
||||
CopyWindowToVram(textPrinter->subPrinter.windowId, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
textPrinter->state = 0;
|
||||
}
|
||||
return 3;
|
||||
case 5: // _08005D48
|
||||
if (!IsSEPlaying())
|
||||
textPrinter->state = 0;
|
||||
return 3;
|
||||
case 6: // _08005D5A
|
||||
if (textPrinter->delayCounter != 0)
|
||||
textPrinter->delayCounter--;
|
||||
else
|
||||
textPrinter->state = 0;
|
||||
return 3;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
__attribute__((naked))
|
||||
u16 RenderText(struct TextPrinter *textPrinter) // 80057B4
|
||||
u16 RenderText(struct TextPrinter *textPrinter)
|
||||
{
|
||||
asm("push {r4-r6,lr}\n\
|
||||
add r6, r0, #0\n\
|
||||
@ -2205,30 +2504,30 @@ _080058F0:\n\
|
||||
.pool\n\
|
||||
.align 2, 0\n\
|
||||
_08005900:\n\
|
||||
.4byte _08005960\n\
|
||||
.4byte _08005982\n\
|
||||
.4byte _080059A6\n\
|
||||
.4byte _080059C0\n\
|
||||
.4byte _08005A0E\n\
|
||||
.4byte _08005A12\n\
|
||||
.4byte _08005A0A\n\
|
||||
.4byte _08005A2A\n\
|
||||
.4byte _08005A3A\n\
|
||||
.4byte _08005A58\n\
|
||||
.4byte _08005A5C\n\
|
||||
.4byte _08005B5A\n\
|
||||
.4byte _08005A90\n\
|
||||
.4byte _08005A98\n\
|
||||
.4byte _08005AA4\n\
|
||||
.4byte _08005A76\n\
|
||||
.4byte _08005AD8\n\
|
||||
.4byte _08005AF2\n\
|
||||
.4byte _08005B02\n\
|
||||
.4byte _08005B26\n\
|
||||
.4byte _08005B36\n\
|
||||
.4byte _08005B3E\n\
|
||||
.4byte _08005ABE\n\
|
||||
.4byte _08005ACC\n\
|
||||
.4byte _08005960 @0\n\
|
||||
.4byte _08005982 @1\n\
|
||||
.4byte _080059A6 @2\n\
|
||||
.4byte _080059C0 @3\n\
|
||||
.4byte _08005A0E @4\n\
|
||||
.4byte _08005A12 @5\n\
|
||||
.4byte _08005A0A @6\n\
|
||||
.4byte _08005A2A @7\n\
|
||||
.4byte _08005A3A @8\n\
|
||||
.4byte _08005A58 @9\n\
|
||||
.4byte _08005A5C @10\n\
|
||||
.4byte _08005B5A @11\n\
|
||||
.4byte _08005A90 @12\n\
|
||||
.4byte _08005A98 @13\n\
|
||||
.4byte _08005AA4 @14\n\
|
||||
.4byte _08005A76 @15\n\
|
||||
.4byte _08005AD8 @16\n\
|
||||
.4byte _08005AF2 @17\n\
|
||||
.4byte _08005B02 @18\n\
|
||||
.4byte _08005B26 @19\n\
|
||||
.4byte _08005B36 @20\n\
|
||||
.4byte _08005B3E @21\n\
|
||||
.4byte _08005ABE @22\n\
|
||||
.4byte _08005ACC @23\n\
|
||||
_08005960:\n\
|
||||
ldr r2, [r6]\n\
|
||||
ldrb r1, [r2]\n\
|
||||
@ -2771,8 +3070,9 @@ _08005D6C:\n\
|
||||
_08005D6E:\n\
|
||||
pop {r4-r6}\n\
|
||||
pop {r1}\n\
|
||||
bx r1");
|
||||
bx r1\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing)
|
||||
{
|
||||
|
118
src/time_events.c
Normal file
118
src/time_events.c
Normal file
@ -0,0 +1,118 @@
|
||||
#include "global.h"
|
||||
#include "time_events.h"
|
||||
#include "event_data.h"
|
||||
#include "field_weather.h"
|
||||
#include "pokemon.h"
|
||||
#include "random.h"
|
||||
#include "overworld.h"
|
||||
#include "rtc.h"
|
||||
#include "script.h"
|
||||
#include "task.h"
|
||||
|
||||
static u32 GetMirageRnd(void)
|
||||
{
|
||||
u32 hi = VarGet(VAR_MIRAGE_RND_H);
|
||||
u32 lo = VarGet(VAR_MIRAGE_RND_L);
|
||||
return (hi << 16) | lo;
|
||||
}
|
||||
|
||||
static void SetMirageRnd(u32 rnd)
|
||||
{
|
||||
VarSet(VAR_MIRAGE_RND_H, rnd >> 16);
|
||||
VarSet(VAR_MIRAGE_RND_L, rnd);
|
||||
}
|
||||
|
||||
// unused
|
||||
void InitMirageRnd(void)
|
||||
{
|
||||
SetMirageRnd((Random() << 16) | Random());
|
||||
}
|
||||
|
||||
void UpdateMirageRnd(u16 days)
|
||||
{
|
||||
s32 rnd = GetMirageRnd();
|
||||
while (days)
|
||||
{
|
||||
rnd = 1103515245 * rnd + 12345;
|
||||
days--;
|
||||
}
|
||||
SetMirageRnd(rnd);
|
||||
}
|
||||
|
||||
bool8 IsMirageIslandPresent(void)
|
||||
{
|
||||
u16 rnd = GetMirageRnd() >> 16;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && (GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY) & 0xFFFF) == rnd)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void UpdateShoalTideFlag(void)
|
||||
{
|
||||
static const u8 tide[] =
|
||||
{
|
||||
1, // 00
|
||||
1, // 01
|
||||
1, // 02
|
||||
0, // 03
|
||||
0, // 04
|
||||
0, // 05
|
||||
0, // 06
|
||||
0, // 07
|
||||
0, // 08
|
||||
1, // 09
|
||||
1, // 10
|
||||
1, // 11
|
||||
1, // 12
|
||||
1, // 13
|
||||
1, // 14
|
||||
0, // 15
|
||||
0, // 16
|
||||
0, // 17
|
||||
0, // 18
|
||||
0, // 19
|
||||
0, // 20
|
||||
1, // 21
|
||||
1, // 22
|
||||
1, // 23
|
||||
};
|
||||
|
||||
if (is_light_level_1_2_3_5_or_6(get_map_light_from_warp0()))
|
||||
{
|
||||
RtcCalcLocalTime();
|
||||
if (tide[gLocalTime.hours])
|
||||
FlagSet(FLAG_SYS_SHOAL_TIDE);
|
||||
else
|
||||
FlagClear(FLAG_SYS_SHOAL_TIDE);
|
||||
}
|
||||
}
|
||||
|
||||
static void Task_WaitWeather(u8 taskId)
|
||||
{
|
||||
if (IsWeatherChangeComplete())
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
void WaitWeather(void)
|
||||
{
|
||||
CreateTask(Task_WaitWeather, 80);
|
||||
}
|
||||
|
||||
void InitBirchState(void)
|
||||
{
|
||||
*GetVarPointer(VAR_BIRCH_STATE) = 0;
|
||||
}
|
||||
|
||||
void UpdateBirchState(u16 days)
|
||||
{
|
||||
u16 *state = GetVarPointer(VAR_BIRCH_STATE);
|
||||
*state += days;
|
||||
*state %= 7;
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
#include "malloc.h"
|
||||
#include "palette.h"
|
||||
#include "pokenav.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "text.h"
|
||||
#include "bg.h"
|
||||
#include "window.h"
|
||||
@ -131,7 +131,7 @@ void sub_8166340(void)
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
sub_81D2108(gUnknown_0203BCAC->field_7C58);
|
||||
sub_80BA0A8();
|
||||
ScanlineEffect_InitHBlankDmaTransfer();
|
||||
}
|
||||
|
||||
void sub_816636C(void (*func)(void))
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "window.h"
|
||||
#include "text_window.h"
|
||||
#include "menu.h"
|
||||
#include "unknown_task.h"
|
||||
#include "scanline_effect.h"
|
||||
#include "task.h"
|
||||
#include "strings.h"
|
||||
#include "sound.h"
|
||||
|
10
sym_bss.txt
10
sym_bss.txt
@ -74,15 +74,7 @@ gUnknown_03001204: @ 3001204
|
||||
.space 0x4
|
||||
|
||||
.include "src/battle_transition.o"
|
||||
|
||||
gUnknown_03001240: @ 3001240
|
||||
.space 0x30
|
||||
|
||||
gUnknown_03001270: @ 3001270
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03001274: @ 3001274
|
||||
.space 0x4
|
||||
.include "src/pokemon_animation.o"
|
||||
|
||||
gUnknown_03001278: @ 3001278
|
||||
.space 0x1
|
||||
|
@ -713,36 +713,7 @@ gUnknown_02038BC6: @ 2038BC6
|
||||
gFieldEffectArguments: @ 2038C08
|
||||
.space 0x20
|
||||
|
||||
gUnknown_02038C28: @ 2038C28
|
||||
.space 0x2
|
||||
|
||||
gUnknown_02038C2A: @ 2038C2A
|
||||
.space 0x2
|
||||
|
||||
gUnknown_02038C2C: @ 2038C2C
|
||||
.space 0x13C
|
||||
|
||||
gUnknown_02038D68: @ 2038D68
|
||||
.space 0x140
|
||||
|
||||
gUnknown_02038EA8: @ 2038EA8
|
||||
.space 0x280
|
||||
|
||||
gUnknown_02039128: @ 2039128
|
||||
.space 0x280
|
||||
|
||||
gUnknown_020393A8: @ 20393A8
|
||||
.space 0x140
|
||||
|
||||
gUnknown_020394E8: @ 20394E8
|
||||
.space 0x640
|
||||
|
||||
gUnknown_02039B28: @ 2039B28
|
||||
.space 0x1C
|
||||
|
||||
gUnknown_02039B44: @ 2039B44
|
||||
.space 0x4
|
||||
|
||||
.include "src/scanline_effect.o"
|
||||
.include "src/option_menu.o"
|
||||
|
||||
.align 2
|
||||
|
Loading…
Reference in New Issue
Block a user