mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
Various var- and procedure names, plus some game_6 procs. (#112)
* sprite.h: Background.unk14/.unk16 -> .xTiles/.yTiles * Background.unk2A -> .paletteOffset * Background.unk26/.unk28 ->targetTilesX/Y * Remove seemingly unused Background.unk2D * Background.unk10 -> .layout * Background.tilesVram -> .layoutVram * Some value documentation in camera.c * gUnknown_080D5864 -> gStageCameraBgTemplates * Various variable and function names * Various var and func renames * Document stage goal bonus points vars and a proc * Match sub_80213C0 and sub_8021490 * Document a few game_6 procedures and vars * (Basically) match InitializePlayer * Progress on sub_802195C. Remove 'move' var in sub_80213C0 * Match sub_802195C using sub_8029BB8 as base * Match sub_8021A34 and sub_8021B08 * Match sub_8021BE0 * Progress on sub_8021C4C * Match sub_8021C4C * Some cleanup * Match sub_8021DB8 * Match sub_8021EE4 and sub_802203C * Match sub_8022190 * Match sub_8022218, sub_8022284 and sub_8022318 * Match sub_80223BC, sub_80224DC, sub_80225E8, sub_8022710, sub_8022838 * Rename game_6_2 -> game_6_3 * Split game_6.s * Start sub_80228C0 * Progress on sub_80228C0 * Match sub_80228C0, sub_80229EC, sub_8022B18 and sub_8022C44 * Almost match sub_8022D6C * Add player_unknown_0.h * More progress on sub_8022D6C * Progress on sub_8022D6C * Move sub_8022D6C into non-matching * Cleanup by Ollie Co-authored-by: Oliver Bell <freshollie@gmail.com> * Document some gWater names * Make ifs more readable --------- Co-authored-by: Oliver Bell <freshollie@gmail.com>
This commit is contained in:
1 parent
a70691d3a3
commit
f62f1941bc
74 files changed
+7256
-7960
No files matched your search
+1
-1
@@ -335,7 +335,7 @@ _0804A8C0:
|
||||
ldr r6, [sp, #0x20]
|
||||
strb r5, [r6]
|
||||
strh r4, [r0, #0x2e]
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
ldr r6, [sp, #0x48]
|
||||
strh r4, [r6, #0x16]
|
||||
strh r4, [r6, #0x18]
|
||||
|
||||
+1
-1
@@ -1502,7 +1502,7 @@ _0804D878:
|
||||
strb r1, [r2]
|
||||
movs r1, #1
|
||||
strh r1, [r0, #0x2e]
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
ldr r1, _0804D8D8 @ =gBgCntRegs
|
||||
ldr r0, _0804D8DC @ =0x00001C02
|
||||
strh r0, [r1, #2]
|
||||
|
||||
+19
-15
@@ -4371,7 +4371,11 @@ sub_800DF38: @ 0x0800DF38
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
|
||||
|
||||
@ The current value in gNewInputCounters[gNewInputCountersIndex]
|
||||
@ gets increased until either it reaches 0xFF or a new button was pressed.
|
||||
@ Letting go of a button does not trigger the index increase.
|
||||
@ (This might be used for timing in multiplayer?)
|
||||
@ In:
|
||||
@ r0: Player*
|
||||
thumb_func_start sub_800DF8C
|
||||
@@ -4434,7 +4438,7 @@ _0800DFB4:
|
||||
beq _0800E0AE
|
||||
str r2, [sp, #8]
|
||||
_0800E002:
|
||||
ldr r0, _0800E054 @ =gUnknown_030055D4
|
||||
ldr r0, _0800E054 @ =gNewInputCountersIndex
|
||||
ldrb r4, [r0]
|
||||
cmp r6, #0
|
||||
beq _0800E07A
|
||||
@@ -4457,7 +4461,7 @@ _0800E012:
|
||||
ands r1, r2
|
||||
_0800E02A:
|
||||
lsls r0, r4, #2
|
||||
ldr r2, _0800E058 @ =gUnknown_030055E0
|
||||
ldr r2, _0800E058 @ =gNewInputCounters
|
||||
adds r0, r0, r2
|
||||
ldrb r3, [r0]
|
||||
ands r3, r7
|
||||
@@ -4476,8 +4480,8 @@ _0800E02A:
|
||||
b _0800E072
|
||||
.align 2, 0
|
||||
_0800E050: .4byte gUnknown_08C871D4
|
||||
_0800E054: .4byte gUnknown_030055D4
|
||||
_0800E058: .4byte gUnknown_030055E0
|
||||
_0800E054: .4byte gNewInputCountersIndex
|
||||
_0800E058: .4byte gNewInputCounters
|
||||
_0800E05C:
|
||||
subs r4, #1
|
||||
mov r1, sb
|
||||
@@ -4581,8 +4585,8 @@ sub_800E0C0: @ 0x0800E0C0
|
||||
ands r5, r0
|
||||
lsls r0, r5, #0x18
|
||||
lsrs r5, r0, #0x18
|
||||
ldr r1, _0800E140 @ =gUnknown_030055E0
|
||||
ldr r2, _0800E144 @ =gUnknown_030055D4
|
||||
ldr r1, _0800E140 @ =gNewInputCounters
|
||||
ldr r2, _0800E144 @ =gNewInputCountersIndex
|
||||
ldrb r0, [r2]
|
||||
lsls r0, r0, #2
|
||||
adds r3, r0, r1
|
||||
@@ -4600,8 +4604,8 @@ sub_800E0C0: @ 0x0800E0C0
|
||||
.align 2, 0
|
||||
_0800E138: .4byte gUnknown_030055D8
|
||||
_0800E13C: .4byte gUnknown_030055D0
|
||||
_0800E140: .4byte gUnknown_030055E0
|
||||
_0800E144: .4byte gUnknown_030055D4
|
||||
_0800E140: .4byte gNewInputCounters
|
||||
_0800E144: .4byte gNewInputCountersIndex
|
||||
_0800E148:
|
||||
ldrb r0, [r2]
|
||||
adds r0, #1
|
||||
@@ -4623,10 +4627,10 @@ _0800E164:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
|
||||
thumb_func_start sub_800E16C
|
||||
sub_800E16C: @ 0x0800E16C
|
||||
thumb_func_start InitNewInputCounters
|
||||
InitNewInputCounters: @ 0x0800E16C
|
||||
sub sp, #4
|
||||
ldr r1, _0800E18C @ =gUnknown_030055D4
|
||||
ldr r1, _0800E18C @ =gNewInputCountersIndex
|
||||
movs r0, #0
|
||||
strb r0, [r1]
|
||||
movs r0, #0
|
||||
@@ -4634,7 +4638,7 @@ sub_800E16C: @ 0x0800E16C
|
||||
ldr r1, _0800E190 @ =0x040000D4
|
||||
mov r0, sp
|
||||
str r0, [r1]
|
||||
ldr r0, _0800E194 @ =gUnknown_030055E0
|
||||
ldr r0, _0800E194 @ =gNewInputCounters
|
||||
str r0, [r1, #4]
|
||||
ldr r0, _0800E198 @ =0x8500001F
|
||||
str r0, [r1, #8]
|
||||
@@ -4642,7 +4646,7 @@ sub_800E16C: @ 0x0800E16C
|
||||
add sp, #4
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0800E18C: .4byte gUnknown_030055D4
|
||||
_0800E18C: .4byte gNewInputCountersIndex
|
||||
_0800E190: .4byte 0x040000D4
|
||||
_0800E194: .4byte gUnknown_030055E0
|
||||
_0800E194: .4byte gNewInputCounters
|
||||
_0800E198: .4byte 0x8500001F
|
||||
-6176
File diff suppressed because it is too large.
Load diff
+1253
File diff suppressed because it is too large.
Load diff
+1198
-1017
File diff suppressed because it is too large.
Load diff
+1061
File diff suppressed because it is too large.
Load diff
@@ -253,7 +253,7 @@ _08031602:
|
||||
movs r0, #1
|
||||
strh r0, [r1, #0x2e]
|
||||
adds r0, r1, #0
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
mov r1, sl
|
||||
adds r1, #0xc
|
||||
movs r0, #0xc0
|
||||
@@ -278,7 +278,7 @@ _08031602:
|
||||
strb r7, [r0]
|
||||
strh r4, [r1, #0x2e]
|
||||
adds r0, r1, #0
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
mov r1, sl
|
||||
adds r1, #0x4c
|
||||
ldr r0, _080319D8 @ =0x06004000
|
||||
@@ -303,7 +303,7 @@ _08031602:
|
||||
mov r2, r8
|
||||
strh r2, [r1, #0x2e]
|
||||
adds r0, r1, #0
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
movs r5, #0
|
||||
movs r0, #0xb9
|
||||
lsls r0, r0, #2
|
||||
|
||||
@@ -0,0 +1,295 @@
|
||||
|
||||
.syntax unified
|
||||
.text
|
||||
push {r4, r5, r6, lr}
|
||||
adds r5, r0, #0
|
||||
ldr r0, _080216B4 @ =gGameMode
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #5
|
||||
bne _080216B8
|
||||
ldr r0, [r5, #8]
|
||||
ldr r1, [r5, #0xc]
|
||||
ands r0, r1
|
||||
adds r0, #1
|
||||
cmp r0, #0
|
||||
beq _080216B8
|
||||
movs r0, #0xe6
|
||||
lsls r0, r0, #9
|
||||
b _080216C2
|
||||
.align 2, 0
|
||||
_080216B4: .4byte gGameMode
|
||||
_080216B8:
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x74
|
||||
movs r1, #0
|
||||
ldrsh r0, [r0, r1]
|
||||
lsls r0, r0, #8
|
||||
_080216C2:
|
||||
str r0, [r5, #8]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x76
|
||||
movs r1, #0
|
||||
ldrsh r0, [r0, r1]
|
||||
lsls r0, r0, #8
|
||||
str r0, [r5, #0xc]
|
||||
ldr r0, _0802181C @ =PlayerCB_8025318
|
||||
str r0, [r5]
|
||||
ldr r0, _08021820 @ =gPlayerControls
|
||||
ldrh r2, [r0]
|
||||
ldrh r1, [r0, #2]
|
||||
orrs r2, r1
|
||||
ldrh r0, [r0, #4]
|
||||
orrs r2, r0
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x5c
|
||||
movs r3, #0
|
||||
movs r4, #0
|
||||
strh r2, [r0]
|
||||
adds r0, #2
|
||||
strh r2, [r0]
|
||||
strh r4, [r5, #0x10]
|
||||
strh r4, [r5, #0x12]
|
||||
strh r4, [r5, #0x14]
|
||||
movs r0, #0x80
|
||||
lsls r0, r0, #0xe
|
||||
str r0, [r5, #0x20]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x24
|
||||
strb r3, [r0]
|
||||
movs r0, #6
|
||||
strb r0, [r5, #0x16]
|
||||
movs r0, #0xe
|
||||
strb r0, [r5, #0x17]
|
||||
adds r1, r5, #0
|
||||
adds r1, #0x25
|
||||
movs r0, #0x78
|
||||
strb r0, [r1]
|
||||
strh r4, [r5, #0x26]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x29
|
||||
strb r3, [r0]
|
||||
subs r0, #1
|
||||
strb r3, [r0]
|
||||
adds r1, #0x13
|
||||
movs r0, #1
|
||||
strb r0, [r1]
|
||||
movs r0, #0x90
|
||||
lsls r0, r0, #4
|
||||
str r0, [r5, #0x40]
|
||||
movs r0, #0xc0
|
||||
lsls r0, r0, #3
|
||||
str r0, [r5, #0x44]
|
||||
movs r0, #8
|
||||
str r0, [r5, #0x48]
|
||||
movs r0, #0x40
|
||||
str r0, [r5, #0x4c]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x64
|
||||
strh r4, [r0]
|
||||
adds r1, #0x2e
|
||||
ldr r0, _08021824 @ =0x0000FFFF
|
||||
strh r0, [r1]
|
||||
adds r1, #2
|
||||
movs r0, #1
|
||||
rsbs r0, r0, #0
|
||||
strh r0, [r1]
|
||||
adds r1, #2
|
||||
strh r0, [r1]
|
||||
strh r4, [r5, #0x2c]
|
||||
strh r4, [r5, #0x2e]
|
||||
strh r4, [r5, #0x30]
|
||||
strh r4, [r5, #0x32]
|
||||
str r4, [r5, #0x3c]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x37
|
||||
strb r3, [r0]
|
||||
strh r4, [r5, #0x2a]
|
||||
adds r1, #8
|
||||
movs r0, #0xb4
|
||||
lsls r0, r0, #1
|
||||
strh r0, [r1]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x7e
|
||||
strh r4, [r0]
|
||||
subs r0, #2
|
||||
strh r4, [r0]
|
||||
adds r0, #6
|
||||
movs r1, #0x80
|
||||
lsls r1, r1, #1
|
||||
strh r1, [r0]
|
||||
subs r0, #2
|
||||
strh r1, [r0]
|
||||
adds r0, #4 @ p->defeatScoreIndex 0x84
|
||||
strb r3, [r0]
|
||||
subs r0, #0x23
|
||||
strb r3, [r0]
|
||||
adds r0, #1
|
||||
strb r3, [r0]
|
||||
adds r0, #1
|
||||
strb r3, [r0]
|
||||
adds r1, r5, #0
|
||||
adds r1, #0x86
|
||||
movs r0, #0x1e
|
||||
strb r0, [r1]
|
||||
adds r1, #1
|
||||
movs r0, #0x3c
|
||||
strb r0, [r1]
|
||||
adds r1, #1
|
||||
movs r0, #0xa
|
||||
strb r0, [r1]
|
||||
adds r0, r5, #0
|
||||
adds r0, #0x6d
|
||||
strb r3, [r0]
|
||||
adds r0, #1
|
||||
strb r3, [r0]
|
||||
adds r0, #1
|
||||
strb r3, [r0]
|
||||
subs r0, #0x15
|
||||
strb r3, [r0]
|
||||
subs r0, #2
|
||||
strh r4, [r0]
|
||||
adds r0, #0x14
|
||||
strb r3, [r0]
|
||||
adds r0, #5
|
||||
strb r3, [r0]
|
||||
subs r0, #1
|
||||
strb r3, [r0]
|
||||
subs r0, #0x3a
|
||||
strb r3, [r0]
|
||||
bl sub_8015750
|
||||
bl sub_801561C
|
||||
adds r0, r5, #0
|
||||
bl sub_802989C
|
||||
adds r1, r5, #0
|
||||
adds r1, #0x99
|
||||
movs r2, #3
|
||||
adds r6, r1, #0
|
||||
adds r4, r5, #0
|
||||
adds r4, #0x60
|
||||
movs r0, #0x85
|
||||
adds r0, r0, r5
|
||||
mov ip, r0
|
||||
movs r3, #0
|
||||
_080217EA:
|
||||
stm r1!, {r3}
|
||||
adds r0, r2, #0
|
||||
subs r2, #1
|
||||
cmp r0, #0
|
||||
bne _080217EA
|
||||
movs r0, #0x7f
|
||||
strb r0, [r6]
|
||||
movs r2, #0
|
||||
ldrsb r2, [r4, r2]
|
||||
cmp r2, #0
|
||||
bne _08021840
|
||||
ldr r0, _08021828 @ =gGameMode
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #2
|
||||
bhi _08021840
|
||||
ldr r3, _0802182C @ =gCourseTime
|
||||
ldr r1, [r3]
|
||||
ldr r0, _08021830 @ =0x00008C9F
|
||||
cmp r1, r0
|
||||
bls _08021838
|
||||
ldr r0, _08021834 @ =gCheckpointTime
|
||||
str r2, [r0]
|
||||
str r2, [r3]
|
||||
str r2, [r5, #0x78]
|
||||
b _08021840
|
||||
.align 2, 0
|
||||
_0802181C: .4byte PlayerCB_8025318
|
||||
_08021820: .4byte gPlayerControls
|
||||
_08021824: .4byte 0x0000FFFF
|
||||
_08021828: .4byte gGameMode
|
||||
_0802182C: .4byte gCourseTime
|
||||
_08021830: .4byte 0x00008C9F
|
||||
_08021834: .4byte gCheckpointTime
|
||||
_08021838:
|
||||
ldr r1, _08021854 @ =gCheckpointTime
|
||||
ldr r0, [r5, #0x78]
|
||||
str r0, [r1]
|
||||
str r0, [r3]
|
||||
_08021840:
|
||||
mov r1, ip
|
||||
movs r0, #0
|
||||
ldrsb r0, [r1, r0]
|
||||
cmp r0, #4
|
||||
bhi _080218C2
|
||||
lsls r0, r0, #2
|
||||
ldr r1, _08021858 @ =_0802185C
|
||||
adds r0, r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08021854: .4byte gCheckpointTime
|
||||
_08021858: .4byte _0802185C
|
||||
_0802185C: @ jump table
|
||||
.4byte _08021870 @ case 0
|
||||
.4byte _08021882 @ case 1
|
||||
.4byte _08021896 @ case 2
|
||||
.4byte _080218A8 @ case 3
|
||||
.4byte _080218BA @ case 4
|
||||
_08021870:
|
||||
adds r0, r5, #0
|
||||
adds r0, #0xac
|
||||
movs r1, #0
|
||||
strb r1, [r0]
|
||||
adds r0, #2
|
||||
strh r1, [r0]
|
||||
adds r0, #2
|
||||
strh r1, [r0]
|
||||
b _080218C2
|
||||
_08021882:
|
||||
adds r0, r5, #0
|
||||
adds r0, #0xae
|
||||
movs r2, #0
|
||||
movs r1, #0
|
||||
strh r1, [r0]
|
||||
subs r0, #2
|
||||
strh r1, [r0]
|
||||
adds r0, #4
|
||||
strb r2, [r0]
|
||||
b _080218C2
|
||||
_08021896:
|
||||
adds r0, r5, #0
|
||||
adds r0, #0xac
|
||||
movs r1, #0
|
||||
strb r1, [r0]
|
||||
adds r0, #4
|
||||
str r1, [r0]
|
||||
subs r0, #3
|
||||
strb r1, [r0]
|
||||
b _080218C2
|
||||
_080218A8:
|
||||
adds r0, r5, #0
|
||||
adds r0, #0xac
|
||||
movs r1, #0
|
||||
strb r1, [r0]
|
||||
adds r0, #1
|
||||
strb r1, [r0]
|
||||
adds r0, #1
|
||||
strb r1, [r0]
|
||||
b _080218C2
|
||||
_080218BA:
|
||||
adds r1, r5, #0
|
||||
adds r1, #0xac
|
||||
movs r0, #0
|
||||
strb r0, [r1]
|
||||
_080218C2:
|
||||
ldr r1, _080218D8 @ =gUnknown_03005B7C
|
||||
movs r0, #0
|
||||
strb r0, [r1]
|
||||
ldr r0, _080218DC @ =gUnknown_03005840
|
||||
movs r1, #0
|
||||
str r1, [r0]
|
||||
ldr r0, _080218E0 @ =gUnknown_0300583C
|
||||
strb r1, [r0]
|
||||
pop {r4, r5, r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080218D8: .4byte gUnknown_03005B7C
|
||||
_080218DC: .4byte gUnknown_03005840
|
||||
_080218E0: .4byte gUnknown_0300583C
|
||||
|
||||
.syntax divided
|
||||
@@ -0,0 +1,254 @@
|
||||
|
||||
.syntax unified
|
||||
.text
|
||||
push {r4, r5, r6, r7, lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r4, r0, #0
|
||||
movs r1, #0
|
||||
ldr r3, [r4, #0x20]
|
||||
movs r0, #8
|
||||
ands r0, r3
|
||||
cmp r0, #0
|
||||
beq _08022D8C
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x29
|
||||
strb r1, [r0]
|
||||
subs r0, #1
|
||||
strb r1, [r0]
|
||||
b sub_8022D6C_return
|
||||
_08022D8C:
|
||||
ldr r0, _08022E40 @ =gCurrentLevel
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
adds r7, r4, #0
|
||||
adds r7, #0x24
|
||||
cmp r0, #0
|
||||
bne _08022E90
|
||||
ldr r0, _08022E44 @ =gWater
|
||||
mov ip, r0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #1
|
||||
bne _08022E90
|
||||
ldr r0, [r4, #0xc]
|
||||
lsls r0, r0, #8
|
||||
asrs r5, r0, #0x10
|
||||
movs r2, #4
|
||||
rsbs r2, r2, #0
|
||||
movs r1, #0x17
|
||||
ldrsb r1, [r4, r1]
|
||||
mov r8, r1
|
||||
mov r6, ip
|
||||
movs r1, #4
|
||||
ldrsh r0, [r6, r1]
|
||||
mov r6, r8
|
||||
subs r0, r0, r6
|
||||
ands r0, r2
|
||||
lsls r0, r0, #0x10
|
||||
ands r5, r2
|
||||
__08022DC6:
|
||||
lsrs r6, r0, #0x10
|
||||
asrs r0, r0, #0x10
|
||||
cmp r5, r0
|
||||
bne _08022E78
|
||||
movs r1, #0x12
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, #0
|
||||
blt _08022E78
|
||||
ldrb r0, [r7]
|
||||
adds r0, #0x18
|
||||
lsls r0, r0, #0x18
|
||||
lsrs r0, r0, #0x18
|
||||
cmp r0, #0x30
|
||||
bhi _08022E78
|
||||
movs r0, #2
|
||||
ands r3, r0
|
||||
cmp r3, #0
|
||||
bne _08022E78
|
||||
movs r0, #0x14
|
||||
ldrsh r1, [r4, r0]
|
||||
cmp r1, #0
|
||||
bge _08022DF4
|
||||
rsbs r1, r1, #0
|
||||
_08022DF4:
|
||||
ldr r0, _08022E48 @ =0x000005FF
|
||||
cmp r1, r0
|
||||
ble _08022E78
|
||||
adds r0, r4, #0
|
||||
bl sub_80228C0
|
||||
lsls r1, r5, #8
|
||||
ldr r0, [r4, #0xc]
|
||||
cmp r0, r1
|
||||
blt _08022E54
|
||||
ldr r1, [r4, #0x20]
|
||||
movs r2, #0x80
|
||||
lsls r2, r2, #0xa
|
||||
adds r0, r1, #0
|
||||
ands r0, r2
|
||||
cmp r0, #0
|
||||
bne _08022E26
|
||||
orrs r1, r2
|
||||
str r1, [r4, #0x20]
|
||||
ldr r0, _08022E4C @ =gGameMode
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #2
|
||||
bhi _08022E26
|
||||
bl sub_80117F0
|
||||
_08022E26:
|
||||
ldr r0, _08022E50 @ =0x00000119
|
||||
bl m4aSongNumStartOrContinue
|
||||
lsls r0, r6, #0x10
|
||||
asrs r0, r0, #8
|
||||
str r0, [r4, #0xc]
|
||||
movs r0, #0
|
||||
strb r0, [r7]
|
||||
ldr r0, [r4, #0x20]
|
||||
movs r1, #3
|
||||
rsbs r1, r1, #0
|
||||
b _08022E6A
|
||||
.align 2, 0
|
||||
_08022E40: .4byte gCurrentLevel
|
||||
_08022E44: .4byte gWater
|
||||
_08022E48: .4byte 0x000005FF
|
||||
_08022E4C: .4byte gGameMode
|
||||
_08022E50: .4byte 0x00000119
|
||||
_08022E54:
|
||||
ldr r0, [r4, #0x20]
|
||||
movs r1, #0x80
|
||||
lsls r1, r1, #0xa
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08022E66
|
||||
ldr r0, _08022E70 @ =0x00000119
|
||||
bl m4aSongNumStop
|
||||
_08022E66:
|
||||
ldr r0, [r4, #0x20]
|
||||
ldr r1, _08022E74 @ =0xFFFDFFFF
|
||||
_08022E6A:
|
||||
ands r0, r1
|
||||
str r0, [r4, #0x20]
|
||||
b sub_8022D6C_return
|
||||
.align 2, 0
|
||||
_08022E70: .4byte 0x00000119
|
||||
_08022E74: .4byte 0xFFFDFFFF
|
||||
_08022E78:
|
||||
ldr r1, [r4, #0x20]
|
||||
movs r0, #0x80
|
||||
lsls r0, r0, #0xa
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08022E90
|
||||
ldr r0, _08022EC0 @ =0xFFFDFFFF
|
||||
ands r1, r0
|
||||
str r1, [r4, #0x20]
|
||||
ldr r0, _08022EC4 @ =0x00000119
|
||||
bl m4aSongNumStop
|
||||
_08022E90:
|
||||
ldr r0, _08022EC8 @ =gUnknown_03005424
|
||||
ldrh r1, [r0]
|
||||
movs r0, #0x80
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08022EF4
|
||||
movs r0, #0
|
||||
ldrsb r0, [r7, r0]
|
||||
adds r0, #0x40
|
||||
lsls r0, r0, #0x18
|
||||
rsbs r0, r0, #0
|
||||
asrs r0, r0, #0x18
|
||||
subs r0, #0x40
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
adds r1, r0, #0
|
||||
adds r1, #0x20
|
||||
cmp r1, #0
|
||||
ble _08022ECC
|
||||
cmp r0, #0
|
||||
bgt _08022ED4
|
||||
lsls r0, r1, #0x18
|
||||
b _08022ED8
|
||||
.align 2, 0
|
||||
_08022EC0: .4byte 0xFFFDFFFF
|
||||
_08022EC4: .4byte 0x00000119
|
||||
_08022EC8: .4byte gUnknown_03005424
|
||||
_08022ECC:
|
||||
cmp r0, #0
|
||||
ble _08022ED4
|
||||
lsls r0, r1, #0x18
|
||||
b _08022ED8
|
||||
_08022ED4:
|
||||
adds r0, #0x1f
|
||||
lsls r0, r0, #0x18
|
||||
_08022ED8:
|
||||
lsrs r1, r0, #0x18
|
||||
lsrs r0, r1, #6
|
||||
cmp r0, #1
|
||||
beq _08022F40
|
||||
cmp r0, #1
|
||||
ble _08022F20
|
||||
cmp r0, #2
|
||||
beq _08022F38
|
||||
cmp r0, #3
|
||||
bne sub_8022D6C_return
|
||||
adds r0, r4, #0
|
||||
bl sub_8022C44
|
||||
b sub_8022D6C_return
|
||||
_08022EF4:
|
||||
movs r0, #0
|
||||
ldrsb r0, [r7, r0]
|
||||
adds r1, r0, #0
|
||||
adds r1, #0x20
|
||||
cmp r1, #0
|
||||
ble _08022F08
|
||||
cmp r0, #0
|
||||
bgt _08022F10
|
||||
lsls r0, r1, #0x18
|
||||
b _08022F14
|
||||
_08022F08:
|
||||
cmp r0, #0
|
||||
ble _08022F10
|
||||
lsls r0, r1, #0x18
|
||||
b _08022F14
|
||||
_08022F10:
|
||||
adds r0, #0x1f
|
||||
lsls r0, r0, #0x18
|
||||
_08022F14:
|
||||
lsrs r1, r0, #0x18
|
||||
lsrs r0, r1, #6
|
||||
cmp r0, #1
|
||||
beq _08022F40
|
||||
cmp r0, #1
|
||||
bgt _08022F26
|
||||
_08022F20:
|
||||
cmp r0, #0
|
||||
beq _08022F30
|
||||
b sub_8022D6C_return
|
||||
_08022F26:
|
||||
cmp r0, #2
|
||||
beq _08022F38
|
||||
cmp r0, #3
|
||||
beq _08022F48
|
||||
b sub_8022D6C_return
|
||||
_08022F30:
|
||||
adds r0, r4, #0
|
||||
bl sub_80228C0
|
||||
b sub_8022D6C_return
|
||||
_08022F38:
|
||||
adds r0, r4, #0
|
||||
bl sub_80229EC
|
||||
b sub_8022D6C_return
|
||||
_08022F40:
|
||||
adds r0, r4, #0
|
||||
bl sub_8022B18
|
||||
b sub_8022D6C_return
|
||||
_08022F48:
|
||||
adds r0, r4, #0
|
||||
bl sub_8022C44
|
||||
sub_8022D6C_return:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4, r5, r6, r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.syntax divided
|
||||
@@ -1623,7 +1623,7 @@ _08016CE2:
|
||||
adds r0, r6, #0
|
||||
bl DisplaySprite
|
||||
_08016CE8:
|
||||
ldr r4, _08016D18 @ =IWRAM_START + 0x5B7C
|
||||
ldr r4, _08016D18 @ =gUnknown_03005B7C
|
||||
ldrb r0, [r4]
|
||||
cmp r0, #0
|
||||
beq _08016CF8
|
||||
@@ -1648,7 +1648,7 @@ _08016D08:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08016D18: .4byte IWRAM_START + 0x5B7C
|
||||
_08016D18: .4byte gUnknown_03005B7C
|
||||
_08016D1C: .4byte gUnknown_0300583C
|
||||
|
||||
thumb_func_start sub_8016D20
|
||||
|
||||
@@ -406,7 +406,7 @@ _08018BF8:
|
||||
b _08018DEA
|
||||
_08018C04:
|
||||
adds r0, r5, #0
|
||||
bl sub_8021694
|
||||
bl InitializePlayer
|
||||
adds r0, r6, #0
|
||||
adds r0, #0x50
|
||||
movs r1, #0
|
||||
@@ -592,7 +592,7 @@ _08018D5C:
|
||||
cmp r1, r3
|
||||
beq _08018DEA
|
||||
_08018D8E:
|
||||
ldr r1, _08018DA8 @ =IWRAM_START + 0x5B7C
|
||||
ldr r1, _08018DA8 @ =gUnknown_03005B7C
|
||||
movs r0, #1
|
||||
strb r0, [r1]
|
||||
movs r0, #0xdb
|
||||
@@ -602,7 +602,7 @@ _08018D8E:
|
||||
_08018D9C: .4byte gGameMode
|
||||
_08018DA0: .4byte gMultiplayerConnections
|
||||
_08018DA4: .4byte 0x04000128
|
||||
_08018DA8: .4byte IWRAM_START + 0x5B7C
|
||||
_08018DA8: .4byte gUnknown_03005B7C
|
||||
_08018DAC:
|
||||
ldr r0, _08018DF0 @ =gGameMode
|
||||
ldrb r0, [r0]
|
||||
|
||||
+26
-23
@@ -16,7 +16,6 @@ gUnknown_080D550C:
|
||||
.syntax unified
|
||||
.arm
|
||||
|
||||
@; wtf does this even do
|
||||
thumb_func_start sub_8011328
|
||||
sub_8011328: @ 0x08011328
|
||||
push {r4, r5, r6, r7, lr}
|
||||
@@ -24,7 +23,7 @@ sub_8011328: @ 0x08011328
|
||||
mov r6, sb
|
||||
mov r5, r8
|
||||
push {r5, r6, r7}
|
||||
ldr r0, _080113E0 @ =gUnknown_03005660
|
||||
ldr r0, _080113E0 @ =gWater
|
||||
mov sl, r0
|
||||
ldr r0, [r0, #0x10]
|
||||
ldrh r6, [r0, #6]
|
||||
@@ -116,7 +115,7 @@ _080113AE:
|
||||
blo _08011382
|
||||
b _080114B0
|
||||
.align 2, 0
|
||||
_080113E0: .4byte gUnknown_03005660
|
||||
_080113E0: .4byte gWater
|
||||
_080113E4: .4byte gGameMode
|
||||
_080113E8: .4byte gAnimations
|
||||
_080113EC: .4byte gSpritePalettes
|
||||
@@ -354,11 +353,15 @@ _080115C4: .4byte gBgPalette
|
||||
_080115C8: .4byte 0x7BDE7BDE
|
||||
_080115CC: .4byte 0x739C739C
|
||||
|
||||
@ Input:
|
||||
@; R0 = u32 Water-Level
|
||||
@; R1 = u32 unk
|
||||
@; R2 = u32 some mask
|
||||
thumb_func_start sub_80115D0
|
||||
sub_80115D0: @ 0x080115D0
|
||||
push {r4, r5, r6, r7, lr}
|
||||
sub sp, #4
|
||||
ldr r4, _08011648 @ =gUnknown_03005660
|
||||
ldr r4, _08011648 @ =gWater
|
||||
movs r7, #0
|
||||
movs r5, #0
|
||||
strh r0, [r4, #4]
|
||||
@@ -401,11 +404,11 @@ sub_80115D0: @ 0x080115D0
|
||||
strb r7, [r1]
|
||||
str r5, [r0, #0x10]
|
||||
bl UpdateSpriteAnimation
|
||||
ldr r0, _08011654 @ =sub_8011660
|
||||
ldr r0, _08011654 @ =Task_8011660
|
||||
movs r1, #0x80
|
||||
lsls r1, r1, #3
|
||||
ldr r2, _08011658 @ =0x0000FFFE
|
||||
ldr r3, _0801165C @ =sub_8011A20
|
||||
ldr r3, _0801165C @ =TaskDestructor_8011A20
|
||||
str r3, [sp]
|
||||
movs r3, #0
|
||||
bl TaskCreate
|
||||
@@ -416,17 +419,17 @@ _08011640:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08011648: .4byte gUnknown_03005660
|
||||
_08011648: .4byte gWater
|
||||
_0801164C: .4byte 0x06012980
|
||||
_08011650: .4byte 0x00000216
|
||||
_08011654: .4byte sub_8011660
|
||||
_08011654: .4byte Task_8011660
|
||||
_08011658: .4byte 0x0000FFFE
|
||||
_0801165C: .4byte sub_8011A20
|
||||
_0801165C: .4byte TaskDestructor_8011A20
|
||||
|
||||
thumb_func_start sub_8011660
|
||||
sub_8011660: @ 0x08011660
|
||||
thumb_func_start Task_8011660
|
||||
Task_8011660: @ 0x08011660
|
||||
push {r4, r5, r6, r7, lr}
|
||||
ldr r6, _08011688 @ =gUnknown_03005660
|
||||
ldr r6, _08011688 @ =gWater
|
||||
ldr r7, _0801168C @ =gCamera
|
||||
ldr r0, _08011690 @ =gCurrentLevel
|
||||
ldrb r0, [r0]
|
||||
@@ -446,7 +449,7 @@ sub_8011660: @ 0x08011660
|
||||
movs r0, #1
|
||||
b _080116A2
|
||||
.align 2, 0
|
||||
_08011688: .4byte gUnknown_03005660
|
||||
_08011688: .4byte gWater
|
||||
_0801168C: .4byte gCamera
|
||||
_08011690: .4byte gCurrentLevel
|
||||
_08011694: .4byte gPlayer
|
||||
@@ -711,7 +714,7 @@ _080118A4:
|
||||
ldr r1, [r5, #8]
|
||||
asrs r1, r1, #8
|
||||
str r1, [r3]
|
||||
ldr r0, _080118D4 @ =gUnknown_03005660
|
||||
ldr r0, _080118D4 @ =gWater
|
||||
movs r2, #4
|
||||
ldrsh r0, [r0, r2]
|
||||
str r0, [r3, #4]
|
||||
@@ -733,7 +736,7 @@ _080118A4:
|
||||
ands r0, r1
|
||||
b _080118E8
|
||||
.align 2, 0
|
||||
_080118D4: .4byte gUnknown_03005660
|
||||
_080118D4: .4byte gWater
|
||||
_080118D8: .4byte gCamera
|
||||
_080118DC: .4byte 0xFFFFFBFF
|
||||
_080118E0:
|
||||
@@ -898,9 +901,9 @@ _08011A12:
|
||||
_08011A18: .4byte 0x7BDE7BDE
|
||||
_08011A1C: .4byte 0x739C739C
|
||||
|
||||
thumb_func_start sub_8011A20
|
||||
sub_8011A20: @ 0x08011A20
|
||||
ldr r3, _08011A3C @ =gUnknown_03005660
|
||||
thumb_func_start TaskDestructor_8011A20
|
||||
TaskDestructor_8011A20: @ 0x08011A20
|
||||
ldr r3, _08011A3C @ =gWater
|
||||
ldr r2, _08011A40 @ =gFlags
|
||||
ldr r0, [r2]
|
||||
movs r1, #0x41
|
||||
@@ -915,7 +918,7 @@ sub_8011A20: @ 0x08011A20
|
||||
str r0, [r3, #0x10]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08011A3C: .4byte gUnknown_03005660
|
||||
_08011A3C: .4byte gWater
|
||||
_08011A40: .4byte gFlags
|
||||
_08011A44: .4byte gIntrTable
|
||||
_08011A48: .4byte gIntrTableTemplate
|
||||
@@ -923,7 +926,7 @@ _08011A48: .4byte gIntrTableTemplate
|
||||
thumb_func_start sub_8011A4C
|
||||
sub_8011A4C: @ 0x08011A4C
|
||||
push {r4, r5, lr}
|
||||
ldr r3, _08011AAC @ =gUnknown_03005660
|
||||
ldr r3, _08011AAC @ =gWater
|
||||
ldr r0, [r3, #0x10]
|
||||
ldrh r4, [r0, #6]
|
||||
movs r0, #0xc0
|
||||
@@ -971,7 +974,7 @@ _08011AA4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08011AAC: .4byte gUnknown_03005660
|
||||
_08011AAC: .4byte gWater
|
||||
_08011AB0: .4byte 0x040000D4
|
||||
_08011AB4: .4byte IWRAM_START + 0x200
|
||||
_08011AB8: .4byte 0x84000074
|
||||
@@ -982,7 +985,7 @@ _08011AC8: .4byte gFlags
|
||||
|
||||
thumb_func_start sub_8011ACC
|
||||
sub_8011ACC: @ 0x08011ACC
|
||||
ldr r0, _08011B18 @ =gUnknown_03005660
|
||||
ldr r0, _08011B18 @ =gWater
|
||||
ldr r0, [r0, #0x10]
|
||||
ldrh r1, [r0, #6]
|
||||
movs r2, #0xc0
|
||||
@@ -1020,7 +1023,7 @@ sub_8011ACC: @ 0x08011ACC
|
||||
strh r0, [r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08011B18: .4byte gUnknown_03005660
|
||||
_08011B18: .4byte gWater
|
||||
_08011B1C: .4byte 0x040000D4
|
||||
_08011B20: .4byte IWRAM_START + 0x200
|
||||
_08011B24: .4byte 0x84000074
|
||||
|
||||
@@ -392,7 +392,7 @@ StageBgUpdate_Zone6Acts12: @ 0x0801D534
|
||||
mov r6, sb
|
||||
mov r5, r8
|
||||
push {r5, r6, r7}
|
||||
ldr r4, _0801D568 @ =gUnknown_03005850
|
||||
ldr r4, _0801D568 @ =gStageBackgroundsRam
|
||||
ldr r1, _0801D56C @ =gBgScrollRegs
|
||||
asrs r0, r0, #4
|
||||
strh r0, [r1, #0xc]
|
||||
@@ -412,7 +412,7 @@ StageBgUpdate_Zone6Acts12: @ 0x0801D534
|
||||
movs r5, #7
|
||||
b _0801D598
|
||||
.align 2, 0
|
||||
_0801D568: .4byte gUnknown_03005850
|
||||
_0801D568: .4byte gStageBackgroundsRam
|
||||
_0801D56C: .4byte gBgScrollRegs
|
||||
_0801D570: .4byte gStageTime
|
||||
_0801D574: .4byte gUnknown_080D5BF0
|
||||
@@ -476,7 +476,7 @@ _0801D5D8: @ jump table
|
||||
_0801D5F8:
|
||||
cmp r6, #1
|
||||
bne _0801D630
|
||||
ldr r1, _0801D624 @ =gUnknown_080D5864
|
||||
ldr r1, _0801D624 @ =gStageCameraBgTemplates
|
||||
adds r1, #0xc0
|
||||
adds r0, r4, #0
|
||||
movs r2, #0x40
|
||||
@@ -491,10 +491,10 @@ _0801D5F8:
|
||||
strh r0, [r4, #0x26]
|
||||
strh r0, [r4, #0x28]
|
||||
adds r0, r4, #0
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
b _0801D942
|
||||
.align 2, 0
|
||||
_0801D624: .4byte gUnknown_080D5864
|
||||
_0801D624: .4byte gStageCameraBgTemplates
|
||||
_0801D628: .4byte 0x0600C000
|
||||
_0801D62C: .4byte 0x0600D000
|
||||
_0801D630:
|
||||
@@ -618,7 +618,7 @@ _0801D718:
|
||||
ldr r0, _0801D744 @ =0x00000381
|
||||
cmp r6, r0
|
||||
bne _0801D754
|
||||
ldr r1, _0801D748 @ =gUnknown_080D5864
|
||||
ldr r1, _0801D748 @ =gStageCameraBgTemplates
|
||||
adds r1, #0xc0
|
||||
adds r0, r4, #0
|
||||
movs r2, #0x40
|
||||
@@ -633,11 +633,11 @@ _0801D718:
|
||||
strh r0, [r4, #0x26]
|
||||
strh r0, [r4, #0x28]
|
||||
adds r0, r4, #0
|
||||
bl sub_8002A3C
|
||||
bl InitBackground
|
||||
b _0801D76C
|
||||
.align 2, 0
|
||||
_0801D744: .4byte 0x00000381
|
||||
_0801D748: .4byte gUnknown_080D5864
|
||||
_0801D748: .4byte gStageCameraBgTemplates
|
||||
_0801D74C: .4byte 0x0600C000
|
||||
_0801D750: .4byte 0x0600D000
|
||||
_0801D754:
|
||||
|
||||
+2
-2
@@ -2979,8 +2979,8 @@ _0802F098:
|
||||
_0802F0A0: .4byte gCurTask
|
||||
_0802F0A4: .4byte Task_802ED98
|
||||
|
||||
thumb_func_start SetupStageLoadingScreen
|
||||
SetupStageLoadingScreen: @ 0x0802F0A8
|
||||
thumb_func_start SetupStageIntro
|
||||
SetupStageIntro: @ 0x0802F0A8
|
||||
push {r4, r5, r6, r7, lr}
|
||||
mov r7, sl
|
||||
mov r6, sb
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef GUARD_BRAKE_DUST_CLOUD_H
|
||||
#define GUARD_BRAKE_DUST_CLOUD_H
|
||||
|
||||
struct Task *CreateBrakingDustEffect(s32, s32);
|
||||
extern struct Task *CreateBrakingDustEffect(s32, s32);
|
||||
extern void sub_801F754(void);
|
||||
|
||||
#endif // GUARD_BRAKE_DUST_CLOUD_H
|
||||
+66
-33
@@ -92,6 +92,10 @@ extern u32 gCourseTime;
|
||||
// Collected Special Rings in current stage?
|
||||
extern u8 gUnknown_030054F4;
|
||||
|
||||
// TODO: Types not checked yet!
|
||||
extern s32 gUnknown_030054E0;
|
||||
extern s32 gUnknown_030054FC;
|
||||
|
||||
extern u16 gUnknown_03005440;
|
||||
extern u16 gUnknown_030054BC;
|
||||
extern u8 gRandomItemBox;
|
||||
@@ -107,7 +111,7 @@ typedef struct {
|
||||
extern MultiPlayerBgCtrlRegs *gUnknown_03005840;
|
||||
|
||||
typedef struct {
|
||||
u8 filler0[0xC];
|
||||
u16 unk0[6]; // might be [5]
|
||||
Sprite s;
|
||||
Hitbox reserved;
|
||||
} UNK_3005A70; /* 0x30 */
|
||||
@@ -168,8 +172,6 @@ extern u32 gUnknown_030054A0;
|
||||
|
||||
extern u32 gCheckpointTime; // Checkpoint timer?
|
||||
|
||||
extern u8 gUnknown_0300540C;
|
||||
|
||||
extern u8 gUnknown_03005438;
|
||||
extern u8 gUnknown_030055BC;
|
||||
|
||||
@@ -205,13 +207,39 @@ typedef void (*PlayerCallback)(struct Player_ *);
|
||||
|
||||
// TODO: Better name.
|
||||
// This is used for an apparent around the value Cream uses for flying duration
|
||||
typedef struct {
|
||||
/* 0xAC */ u8 flags;
|
||||
/* 0xAD */ s8 unkAD;
|
||||
/* 0xAE */ u16 unkAE;
|
||||
/* 0xB0 */ u16 unkB0;
|
||||
} SonicFlags;
|
||||
|
||||
typedef struct {
|
||||
/* 0xAC */ s16 flyingDuration;
|
||||
/* 0xAE */ u16 unkAE;
|
||||
/* 0xB0 */ s8 unkB0;
|
||||
} CreamFlags;
|
||||
|
||||
typedef struct {
|
||||
/* 0xAC */ u8 flags;
|
||||
/* 0xAD */ s8 shift;
|
||||
/* 0xAE */ s8 unkAE;
|
||||
/* 0xAF */ s8 unkAF;
|
||||
|
||||
// NOTE: For some reason this is a 4-byte value, while Cream's is a 2-byte
|
||||
/* 0xB0 */ s32 flyingDuration;
|
||||
} TailsFlags;
|
||||
|
||||
typedef struct {
|
||||
/* 0xAC */ u8 unkAC;
|
||||
/* 0xAD */ u8 unkAD;
|
||||
/* 0xAE */ u8 unkAE;
|
||||
} KnucklesFlags;
|
||||
|
||||
typedef struct {
|
||||
/* 0xAC */ u8 unkAC;
|
||||
} AmyFlags;
|
||||
|
||||
#define PLAYER_ITEM_EFFECT__NONE 0x00
|
||||
#define PLAYER_ITEM_EFFECT__SHIELD_NORMAL 0x01
|
||||
#define PLAYER_ITEM_EFFECT__INVINCIBILITY 0x02
|
||||
@@ -223,6 +251,7 @@ typedef struct {
|
||||
#define PLAYER_ITEM_EFFECT__80 0x80
|
||||
#define FLAG_PLAYER_x38__LAYER_FOREGROUND 0x00
|
||||
#define FLAG_PLAYER_x38__LAYER_BACKGROUND 0x01
|
||||
#define FLAG_PLAYER_x38__80 0x80
|
||||
// Not sure what these are yet
|
||||
typedef struct Player_ {
|
||||
/* 0x00 */ PlayerCallback callback;
|
||||
@@ -247,20 +276,21 @@ typedef struct Player_ {
|
||||
/* 0x20 */ u32 moveState;
|
||||
|
||||
/* 0x24 */ u8 rotation;
|
||||
/* 0x25 */ u8 filler25[1];
|
||||
/* 0x25 */ u8 unk25;
|
||||
/* 0x26 */ s16 spindashAccel;
|
||||
/* 0x28 */ u8 filler28[2];
|
||||
/* 0x28 */ u8 unk28;
|
||||
/* 0x28 */ u8 unk29;
|
||||
/* 0x2A */ s16 unk2A;
|
||||
/* 0x2C */ s16 unk2C;
|
||||
/* 0x2E */ u16 timerInvincibility;
|
||||
/* 0x30 */ u16 timerSpeedup;
|
||||
/* 0x32 */ u16 unk32;
|
||||
/* 0x32 */ u8 filler34[2];
|
||||
/* 0x34 */ u8 filler34[2];
|
||||
/* 0x36 */ s8 unk36;
|
||||
/* 0x37 */ u8 itemEffect; // bitfield
|
||||
/* 0x38 */ u8 unk38; // bitfield(?), 0x1 determines layer
|
||||
/* 0x39 */ u8 unk39;
|
||||
/* 0x3A */ u8 filler3A[2];
|
||||
/* 0x3A */ u16 unk3A;
|
||||
/* 0x3C */ void *unk3C; // the object player collides with this frame?
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ s32 unk44;
|
||||
@@ -299,11 +329,13 @@ typedef struct Player_ {
|
||||
// unk72 appears to be a duration timer for side-forward trick animations (in
|
||||
// frames?)
|
||||
/* 0x72 */ s16 unk72;
|
||||
/* 0x74 */ u16 checkPointX;
|
||||
/* 0x76 */ u16 checkPointY;
|
||||
/* 0x74 */ s16 checkPointX;
|
||||
/* 0x76 */ s16 checkPointY;
|
||||
/* 0x78 */ u32 checkpointTime;
|
||||
/* 0x7C */ u16 unk7C;
|
||||
/* 0x7E */ u8 filler7E[6];
|
||||
/* 0x7E */ u16 unk7E;
|
||||
/* 0x80 */ u16 unk80;
|
||||
/* 0x82 */ u16 unk82;
|
||||
|
||||
// Denotes how many points the player should get after defeating an enemy.
|
||||
// (see stage/enemy_defeat_score.c and stage/entity_manager.c for usage)
|
||||
@@ -312,7 +344,8 @@ typedef struct Player_ {
|
||||
/* 0x85 */ s8 character;
|
||||
/* 0x86 */ u8 unk86;
|
||||
/* 0x87 */ u8 unk87;
|
||||
/* 0x88 */ u8 filler88[4];
|
||||
/* 0x88 */ u8 unk88;
|
||||
/* 0x88 */ u8 filler88[3];
|
||||
/* 0x8C */ struct Task *spriteTask;
|
||||
/* 0x90 */ UNK_3005A70 *unk90;
|
||||
|
||||
@@ -320,8 +353,7 @@ typedef struct Player_ {
|
||||
// Alternatively, some of the following data might be a union
|
||||
/* 0x94 */ UNK_3005A70 *unk94;
|
||||
/* 0x98 */ u8 unk98; // Multiplayer var. TODO: check sign!
|
||||
/* 0x99 */ s8 unk99;
|
||||
/* 0x9A */ u8 filler9A[0xE];
|
||||
/* 0x99 */ s8 unk99[15];
|
||||
/* 0xA8 */ u8 unkA8;
|
||||
/* 0x9A */ u8 fillerA9[0x3];
|
||||
|
||||
@@ -331,13 +363,12 @@ typedef struct Player_ {
|
||||
// when jumping.
|
||||
/* 0xAC */
|
||||
union {
|
||||
s16 flyingDurationCream;
|
||||
SonicFlags sf;
|
||||
CreamFlags cf;
|
||||
TailsFlags tf;
|
||||
KnucklesFlags kf;
|
||||
AmyFlags af;
|
||||
} w;
|
||||
|
||||
// Tails's framecounter for flying
|
||||
// NOTE: For some reason this is a 4-byte value, while Cream's is a 2-byte
|
||||
/* 0xB0 */ s32 flyingDurationTails;
|
||||
} Player;
|
||||
|
||||
extern Player gPlayer;
|
||||
@@ -447,18 +478,19 @@ typedef struct {
|
||||
} SomeStruct_3005498; /* size: unknown (but >= 0x8) */
|
||||
extern SomeStruct_3005498 gUnknown_03005498;
|
||||
|
||||
// Seems to be belonging to the pause menu?
|
||||
// Or maybe this is generally used to init common palettes for the GUI?
|
||||
struct SomeStruct_5660 {
|
||||
/* 0x00 */ u8 unk0; // Might be bool for checking whether the task was just started?
|
||||
// Seems to be belonging to water effect
|
||||
typedef struct {
|
||||
/* 0x00 */ bool8 isActive;
|
||||
/* 0x01 */ u8 filler1[3];
|
||||
/* 0x04 */ s16 unk4;
|
||||
/* 0x06 */ u8 filler6[0xA];
|
||||
/* 0x10 */ struct Task
|
||||
*t; // -> u16 palette[16*16] (additional "palette memory" for GUI stuff?)
|
||||
};
|
||||
/* 0x04 */ s16 currentWaterLevel;
|
||||
/* 0x06 */ s16 targetWaterLevel;
|
||||
/* 0x08 */ u8 filler8[0x8];
|
||||
|
||||
extern struct SomeStruct_5660 gUnknown_03005660;
|
||||
// t -> u16 palette[16*16] (additional "palette memory" for GUI stuff?)
|
||||
/* 0x10 */ struct Task *t;
|
||||
} Water;
|
||||
|
||||
extern Water gWater;
|
||||
|
||||
extern u8 gMultiplayerUnlockedCharacters;
|
||||
extern u8 gMultiplayerUnlockedLevels;
|
||||
@@ -481,7 +513,8 @@ extern u8 gMultiplayerConnections;
|
||||
|
||||
extern struct ButtonConfig gPlayerControls;
|
||||
|
||||
extern s32 gUnknown_030054D0;
|
||||
// Only set after the player passed it, used to determine extra score
|
||||
extern s32 gStageGoalX;
|
||||
|
||||
// TODO: find out what task is parent to IA
|
||||
typedef struct {
|
||||
@@ -535,7 +568,7 @@ struct Backgrounds {
|
||||
Background unkC0;
|
||||
};
|
||||
|
||||
extern struct Backgrounds gUnknown_03005850;
|
||||
extern struct Backgrounds gStageBackgroundsRam;
|
||||
extern const u32 *gUnknown_030059C8;
|
||||
|
||||
// rodata
|
||||
@@ -581,7 +614,7 @@ void sub_802E044(u16, u16);
|
||||
void sub_80304DC(u32, u16, u8);
|
||||
|
||||
void sub_8019F08(void);
|
||||
struct Task *sub_801F3A4(s32, s32, u16);
|
||||
struct Task *CreateStageGoalBonusPointsAnim(s32, s32, u16);
|
||||
void sub_801F550(struct Task *);
|
||||
|
||||
void sub_80218E4(Player *);
|
||||
@@ -649,8 +682,8 @@ extern void sub_802C668(s32 *x, s32 *y);
|
||||
|
||||
extern void sub_8021350(void);
|
||||
|
||||
// NOTE: Proc type should be the same as sub_80299F0!
|
||||
extern void sub_8021604(u32 character, u32 level, u32 p2, Player *player);
|
||||
// NOTE: Proc type should be the same as SetStageSpawnPosInternal!
|
||||
extern void SetStageSpawnPos(u32 character, u32 level, u32 p2, Player *player);
|
||||
|
||||
#define INCREMENT_SCORE(incVal) \
|
||||
{ \
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_GAME_6_H
|
||||
#define GUARD_GAME_6_H
|
||||
|
||||
extern s32 sub_802195C(Player *p, u8 *p1, s32 *out);
|
||||
extern s32 sub_8021A34(Player *p, u8 *p1, s32 *out);
|
||||
extern s32 sub_8021B08(Player *p, u8 *p1, s32 *out);
|
||||
|
||||
#endif // GUARD_GAME_6_H
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_MULTIPLAYER_UNKNOWN_TASK_H
|
||||
#define GUARD_MULTIPLAYER_UNKNOWN_TASK_H
|
||||
|
||||
u8 gUnknown_0300583C;
|
||||
|
||||
#endif // GUARD_MULTIPLAYER_UNKNOWN_TASK_H
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_PLAYER_ACTIONS_H
|
||||
#define GUARD_PLAYER_ACTIONS_H
|
||||
|
||||
void sub_801561C(void);
|
||||
void sub_8015750(void);
|
||||
|
||||
#endif // GUARD_PLAYER_ACTIONS_H
|
||||
@@ -43,6 +43,7 @@ extern void sub_80283C4(Player *p);
|
||||
extern void PlayerCB_8028D74(Player *p);
|
||||
extern void PlayerCB_TouchNormalSpring(Player *p);
|
||||
extern void PlayerCB_8029158(Player *p);
|
||||
extern void sub_802989C(Player *p);
|
||||
extern void sub_8029C84(Player *p);
|
||||
extern void sub_8029FA4(Player *p);
|
||||
extern void PlayerCB_802A258(Player *p);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_PLAYER_UNKNOWN_1
|
||||
#define GUARD_PLAYER_UNKNOWN_1
|
||||
|
||||
extern void sub_80117F0(void);
|
||||
|
||||
#endif // GUARD_PLAYER_UNKNOWN_1
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_GAME_STAGE_CAMERA_H
|
||||
#define GUARD_GAME_STAGE_CAMERA_H
|
||||
|
||||
extern const Background gUnknown_080D5864[4];
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
void UpdateCamera(void);
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "gba/types.h"
|
||||
|
||||
extern u8 gActiveCollectRingEffectCount;
|
||||
|
||||
void CreateCollectRingEffect(s16 x, s16 y);
|
||||
|
||||
#endif // GUARD_COLLECT_RING_EFFECT_H
|
||||
@@ -10,10 +10,9 @@
|
||||
#define RECORDER_PLAYBACK 2
|
||||
|
||||
struct InputRecorder {
|
||||
s32 playbackHead;
|
||||
s32 recordHead;
|
||||
|
||||
u8 mode;
|
||||
/* 0x00 */ s32 playbackHead;
|
||||
/* 0x04 */ s32 recordHead;
|
||||
/* 0x08 */ u8 mode;
|
||||
};
|
||||
|
||||
void InputRecorderResetRecordHead(void);
|
||||
|
||||
+22
-12
@@ -46,13 +46,18 @@ typedef struct {
|
||||
// T = Tile-Index
|
||||
//
|
||||
// NOTE: It does NOT point to the tileset!
|
||||
// NOTE/TODO (Jace): Should this also be const?
|
||||
// It's in VRAM, so it doesn't make much sense?
|
||||
/* 0x0C */ u16 *tilesVram;
|
||||
/* 0x10 */ const u16 *unk10;
|
||||
/* 0x0C */ u16 *layoutVram;
|
||||
|
||||
// Stage-Map: Metatiles
|
||||
// Common Tilemaps: Tilemap-Tiles
|
||||
/* 0x10 */ const u16 *layout;
|
||||
|
||||
// Tile-count on each axis
|
||||
// - Stage maps: should be 12 (# per metatile)
|
||||
// - Common Tilemaps: should be .targetTilesX/Y
|
||||
/* 0x14 */ u16 xTiles;
|
||||
/* 0x16 */ u16 yTiles;
|
||||
|
||||
/* 0x14 */ u16 unk14;
|
||||
/* 0x16 */ u16 unk16;
|
||||
/* 0x18 */ u16 unk18;
|
||||
/* 0x1A */ u16 unk1A;
|
||||
/* 0x1C */ u16 tilemapId;
|
||||
@@ -61,14 +66,17 @@ typedef struct {
|
||||
/* 0x20 */ u16 unk20;
|
||||
/* 0x22 */ u16 unk22;
|
||||
/* 0x24 */ u16 unk24;
|
||||
/* 0x26 */ u16 unk26; // tile-width?
|
||||
/* 0x28 */ u16 unk28; // tile-height?
|
||||
/* 0x2A */ u8 unk2A; // palette offset
|
||||
|
||||
/* Tile-Dimensions for the rendering target */
|
||||
/* - Stage maps: DISPLAY_WIDTH/_HEIGHT + 1*TILE_WIDTH */
|
||||
/* - Common Tilemaps: full image dimensions */
|
||||
/* 0x26 */ u16 targetTilesX;
|
||||
/* 0x28 */ u16 targetTilesY;
|
||||
|
||||
/* 0x2A */ u8 paletteOffset;
|
||||
/* 0x2B */ u8 animFrameCounter;
|
||||
/* 0x2C */ u8 animDelayCounter;
|
||||
|
||||
u8 unk2D;
|
||||
|
||||
/* 0x2E */ u16 flags;
|
||||
|
||||
// apparently NOT signed?
|
||||
@@ -76,6 +84,8 @@ typedef struct {
|
||||
/* 0x32 */ u16 scrollY;
|
||||
/* 0x34 */ u16 prevScrollX;
|
||||
/* 0x36 */ u16 prevScrollY;
|
||||
|
||||
/* Only used by stage maps (they are encoded as Tilemaps) */
|
||||
/* 0x38 */ const u16 *metatileMap;
|
||||
/* 0x3C */ u16 mapWidth;
|
||||
/* 0x3E */ u16 mapHeight;
|
||||
@@ -184,7 +194,7 @@ extern const u8 gOamShapesSizes[12][2];
|
||||
s32 UpdateSpriteAnimation(Sprite *);
|
||||
|
||||
void DisplaySprite(Sprite *);
|
||||
void sub_8002A3C(Background *);
|
||||
void InitBackground(Background *);
|
||||
u32 sub_8004010(void);
|
||||
u32 sub_80039E4(void);
|
||||
bool32 sub_8002B20(void);
|
||||
|
||||
+5
-3
@@ -120,9 +120,11 @@ SECTIONS
|
||||
build/sa2/src/game/dust_effect_spindash.o(.text);
|
||||
build/sa2/src/game/spark_effect.o(.text);
|
||||
build/sa2/asm/game_5_2.o(.text);
|
||||
build/sa2/asm/game_6.o(.text);
|
||||
build/sa2/src/game/game_6_2.o(.text);
|
||||
build/sa2/src/game/game_6_0.o(.text);
|
||||
build/sa2/asm/game_6_1.o(.text);
|
||||
build/sa2/asm/game_6_2.o(.text);
|
||||
build/sa2/src/game/game_6_3.o(.text);
|
||||
build/sa2/asm/game_6_3.o(.text);
|
||||
build/sa2/src/game/player_callbacks_1.o(.text);
|
||||
build/sa2/src/game/item_tasks.o(.text);
|
||||
build/sa2/src/game/underwater_effects.o(.text);
|
||||
@@ -349,7 +351,7 @@ SECTIONS
|
||||
build/sa2/src/game/stage/stage.o(.rodata);
|
||||
build/sa2/asm/player_super_sonic_data.o(.rodata);
|
||||
build/sa2/asm/game_5_2.o(.rodata);
|
||||
build/sa2/asm/game_6.o(.rodata);
|
||||
build/sa2/src/game/game_6_3.o(.rodata);
|
||||
build/sa2/src/game/player_callbacks_1.o(.rodata);
|
||||
build/sa2/asm/player_super_sonic.o(.rodata);
|
||||
build/sa2/src/game/stage/ui.o(.rodata);
|
||||
|
||||
@@ -398,10 +398,10 @@ END_NONMATCH
|
||||
void sub_8003EE4(u16 p0, s16 p1, s16 p2, s16 p3, s16 p4, s16 p5, s16 p6,
|
||||
BgAffineReg *affine)
|
||||
{
|
||||
affine->pa = ((COS(p0) >> 6) * (s16)Div(0x10000, p1)) >> 8;
|
||||
affine->pb = ((SIN(p0) >> 6) * (s16)Div(0x10000, p1)) >> 8;
|
||||
affine->pa = (COS_24_8(p0) * (s16)Div(0x10000, p1)) >> 8;
|
||||
affine->pb = (SIN_24_8(p0) * (s16)Div(0x10000, p1)) >> 8;
|
||||
affine->pc = ((-SIN(p0) >> 6) * (s16)Div(0x10000, p2)) >> 8;
|
||||
affine->pd = ((COS(p0) >> 6) * (s16)Div(0x10000, p2)) >> 8;
|
||||
affine->pd = (COS_24_8(p0) * (s16)Div(0x10000, p2)) >> 8;
|
||||
|
||||
p5 *= -1;
|
||||
p6 *= -1;
|
||||
@@ -409,15 +409,15 @@ void sub_8003EE4(u16 p0, s16 p1, s16 p2, s16 p3, s16 p4, s16 p5, s16 p6,
|
||||
// __sub_8003FA8
|
||||
s32 r1 = (s16)affine->pa * p5;
|
||||
s32 r3 = (s16)affine->pb * p6;
|
||||
r1 += r3;
|
||||
affine->x = r1 + p3 * 256;
|
||||
|
||||
affine->x = (r1 + r3) + p3 * 256;
|
||||
}
|
||||
{
|
||||
// __sub_8003FBE
|
||||
s32 r1 = (s16)affine->pc * p5;
|
||||
s32 r3 = (s16)affine->pd * p6;
|
||||
r1 += r3;
|
||||
affine->y = r1 + p4 * 256;
|
||||
|
||||
affine->y = (r1 + r3) + p4 * 256;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+82
-81
@@ -5,15 +5,15 @@
|
||||
|
||||
#define CastPointer(ptr, index) (void *)&(((u8 *)(ptr))[(index)])
|
||||
|
||||
void sub_8002A3C(Background *background)
|
||||
void InitBackground(Background *background)
|
||||
{
|
||||
struct MapHeader *mapHeader = gUnknown_03002260[background->tilemapId];
|
||||
const u16 *pal;
|
||||
u32 palSize;
|
||||
u16 gfxSize;
|
||||
|
||||
background->unk14 = mapHeader->h.xTiles;
|
||||
background->unk16 = mapHeader->h.yTiles;
|
||||
background->xTiles = mapHeader->h.xTiles;
|
||||
background->yTiles = mapHeader->h.yTiles;
|
||||
background->graphics.src = mapHeader->h.tiles;
|
||||
gfxSize = mapHeader->h.tilesSize;
|
||||
background->graphics.size = gfxSize;
|
||||
@@ -26,15 +26,16 @@ void sub_8002A3C(Background *background)
|
||||
|
||||
pal = mapHeader->h.palette;
|
||||
palSize = mapHeader->h.palLength;
|
||||
background->unk2A = mapHeader->h.palOffset;
|
||||
background->paletteOffset = mapHeader->h.palOffset;
|
||||
|
||||
if (!(background->flags & BACKGROUND_UPDATE_PALETTE)) {
|
||||
DmaCopy16(3, pal, gBgPalette + background->unk2A, palSize * sizeof(*pal));
|
||||
DmaCopy16(3, pal, gBgPalette + background->paletteOffset,
|
||||
palSize * sizeof(*pal));
|
||||
gFlags |= FLAGS_UPDATE_BACKGROUND_PALETTES;
|
||||
background->flags ^= BACKGROUND_UPDATE_PALETTE;
|
||||
}
|
||||
|
||||
background->unk10 = mapHeader->h.map;
|
||||
background->layout = mapHeader->h.map;
|
||||
|
||||
if (background->flags & BACKGROUND_FLAG_IS_LEVEL_MAP) {
|
||||
background->metatileMap = mapHeader->metatileMap;
|
||||
@@ -80,7 +81,7 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
continue;
|
||||
}
|
||||
// NOTE: register r4 = sp00
|
||||
sp00 = bg->unk14;
|
||||
sp00 = bg->xTiles;
|
||||
|
||||
bgId = (bg->flags & BACKGROUND_FLAGS_MASK_BG_ID);
|
||||
if (bgId > 1 && ((gDispCnt & 0x3) > 0)) {
|
||||
@@ -103,29 +104,29 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
if (!(bg->flags & BACKGROUND_FLAG_20)) {
|
||||
if (!(bg->flags & BACKGROUND_FLAG_IS_LEVEL_MAP)) {
|
||||
// _08002C20
|
||||
u8 *r1 = CastPointer(bg->tilesVram, bg->unk24 * sp0C);
|
||||
u8 *r1 = CastPointer(bg->layoutVram, bg->unk24 * sp0C);
|
||||
u16 *r7 = CastPointer(r1, bg->unk22 * sp08);
|
||||
u16 r5 = bg->unk28;
|
||||
u16 r5 = bg->targetTilesY;
|
||||
|
||||
// r2 <- bg->flags
|
||||
// r3 <- affine
|
||||
// r4 <- sp00
|
||||
// r5 <- bg->unk28
|
||||
// r5 <- bg->targetTilesY
|
||||
// sb = 0x20
|
||||
if (bg->flags & BACKGROUND_FLAG_100) {
|
||||
// _08002C46
|
||||
if (bg->flags & BACKGROUND_FLAG_80) {
|
||||
u32 r0Index = (((bg->unk20 + r5) - 1) * sp00) * sp08;
|
||||
void *r2Ptr = CastPointer(bg->unk10, r0Index);
|
||||
u16 *r4Ptr
|
||||
= CastPointer(r2Ptr, ((bg->unk1E + bg->unk26) - 1) * sp08);
|
||||
void *r2Ptr = CastPointer(bg->layout, r0Index);
|
||||
u16 *r4Ptr = CastPointer(
|
||||
r2Ptr, ((bg->unk1E + bg->targetTilesX) - 1) * sp08);
|
||||
|
||||
// _08002C7C
|
||||
while (r5-- != 0) {
|
||||
u16 i;
|
||||
|
||||
// _08002C9A
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
r7[i] = (*(r4Ptr - i) ^ TileMask_FlipXY);
|
||||
}
|
||||
|
||||
@@ -135,15 +136,15 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
} else {
|
||||
// _08002CD4
|
||||
u32 someIndex = (bg->unk20 * sp00);
|
||||
void *r2Ptr = CastPointer(bg->unk10, someIndex * sp08);
|
||||
u32 index2 = ((bg->unk1E + bg->unk26) - 1);
|
||||
void *r2Ptr = CastPointer(bg->layout, someIndex * sp08);
|
||||
u32 index2 = ((bg->unk1E + bg->targetTilesX) - 1);
|
||||
u16 *r4Ptr = CastPointer(r2Ptr, index2 * sp08);
|
||||
|
||||
// _08002D08
|
||||
while (r5-- != 0) {
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
r7[i] = (*(r4Ptr - i) ^ TileMask_FlipX);
|
||||
}
|
||||
|
||||
@@ -156,12 +157,12 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
// r2 <- bg->flags
|
||||
// r3 <- affine
|
||||
// r4 <- sp00
|
||||
// r5 <- r5 = bg->unk28
|
||||
// r5 <- r5 = bg->targetTilesY
|
||||
// sb = 0x20
|
||||
// _08002D50
|
||||
if (bg->flags & BACKGROUND_FLAG_80) {
|
||||
u32 r0Index = (((bg->unk20 + r5) - 1) * sp00);
|
||||
void *r1Ptr = CastPointer(bg->unk10, r0Index * sp08);
|
||||
void *r1Ptr = CastPointer(bg->layout, r0Index * sp08);
|
||||
r4Ptr = CastPointer(r1Ptr, bg->unk1E * sp08);
|
||||
|
||||
while (r5-- != 0) {
|
||||
@@ -169,7 +170,7 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
void *r2;
|
||||
sb = sp00 * sp08;
|
||||
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
r7[i] = r4Ptr[i] ^ 0x800;
|
||||
}
|
||||
|
||||
@@ -180,12 +181,12 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
} else {
|
||||
// _08002DD4
|
||||
if ((affine & 1) && (sp08 == 2) && ((0x20 - bg->unk22) > 0)
|
||||
&& ((bg->unk26 + bg->unk22 - 0x20) > 0)) {
|
||||
&& ((bg->targetTilesX + bg->unk22 - 0x20) > 0)) {
|
||||
s32 vR2;
|
||||
// __08002DF8
|
||||
r4Ptr = (u16 *)(&bg->unk10[bg->unk20 * sp00] + bg->unk1E);
|
||||
r4Ptr = (u16 *)(&bg->layout[bg->unk20 * sp00] + bg->unk1E);
|
||||
sb = (0x20 - bg->unk22) * 2;
|
||||
vR2 = (bg->unk26 + bg->unk22 - 0x20) * 2;
|
||||
vR2 = (bg->targetTilesX + bg->unk22 - 0x20) * 2;
|
||||
|
||||
while (r5-- != 0) {
|
||||
// _08002E1C
|
||||
@@ -202,7 +203,7 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
// __08002E74
|
||||
u32 r0Index = bg->unk20 * sp00 * sp08;
|
||||
void *r1Ptr
|
||||
= CastPointer(bg->unk10, bg->unk20 * sp00 * sp08);
|
||||
= CastPointer(bg->layout, bg->unk20 * sp00 * sp08);
|
||||
void *r4Ptr = CastPointer(r1Ptr, bg->unk1E * sp08);
|
||||
|
||||
// r0 = r0Index
|
||||
@@ -213,7 +214,7 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
// r7 =
|
||||
while (r5-- != 0) {
|
||||
// _08002EA4
|
||||
DmaCopy16(3, r4Ptr, r7, (s32)(bg->unk26 * sp08));
|
||||
DmaCopy16(3, r4Ptr, r7, (s32)(bg->targetTilesX * sp08));
|
||||
r7 = CastPointer(r7, sp0C);
|
||||
r4Ptr = CastPointer(r4Ptr, sp00 * sp08);
|
||||
}
|
||||
@@ -234,30 +235,30 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
sp14 = bg->unk20;
|
||||
|
||||
// _08002EE8
|
||||
for (i = 0; i < bg->unk26;) {
|
||||
for (i = 0; i < bg->targetTilesX;) {
|
||||
s32 r1;
|
||||
s32 r5Res;
|
||||
s32 r8;
|
||||
s32 sp10_i = sp10 + i;
|
||||
s32 temp;
|
||||
|
||||
sp18 = Div(sp10_i, bg->unk14);
|
||||
r1 = bg->unk14;
|
||||
sp18 = Div(sp10_i, bg->xTiles);
|
||||
r1 = bg->xTiles;
|
||||
r5Res = sp18;
|
||||
|
||||
sp1C = sp10_i - r5Res * bg->unk14;
|
||||
sp1C = sp10_i - r5Res * bg->xTiles;
|
||||
|
||||
r8 = bg->unk28;
|
||||
temp = (bg->unk26 - i);
|
||||
r8 = bg->targetTilesY;
|
||||
temp = (bg->targetTilesX - i);
|
||||
r1 -= sp1C;
|
||||
if (r1 > temp)
|
||||
r1 = (bg->unk26 - i);
|
||||
r1 = (bg->targetTilesX - i);
|
||||
|
||||
sp20 = r1 * sp08;
|
||||
|
||||
// _08002F28
|
||||
// sb = j
|
||||
for (j = 0; j < bg->unk28;) {
|
||||
for (j = 0; j < bg->targetTilesY;) {
|
||||
void *dmaSrc, *dmaDest;
|
||||
s32 r5;
|
||||
register const u16 *r1Ptr asm("r1");
|
||||
@@ -266,9 +267,9 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
s32 temp2;
|
||||
u32 v;
|
||||
s32 r4 = sp14 + j;
|
||||
s32 result = Div(r4, bg->unk16);
|
||||
r4 -= result * bg->unk16;
|
||||
r5 = bg->unk16 - r4;
|
||||
s32 result = Div(r4, bg->yTiles);
|
||||
r4 -= result * bg->yTiles;
|
||||
r5 = bg->yTiles - r4;
|
||||
|
||||
result *= bg->mapWidth;
|
||||
r2Ptr = (void *)bg->metatileMap;
|
||||
@@ -277,15 +278,15 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
r1Ptr = CastPointer(r0Ptr, temp2);
|
||||
|
||||
// r1 = v
|
||||
v = *((u16 *)r1Ptr) * bg->unk14 * bg->unk16;
|
||||
v += r4 * bg->unk14 + sp1C;
|
||||
v = *((u16 *)r1Ptr) * bg->xTiles * bg->yTiles;
|
||||
v += r4 * bg->xTiles + sp1C;
|
||||
v *= sp08;
|
||||
|
||||
dmaSrc = ((u8 *)bg->unk10) + v;
|
||||
dmaSrc = ((u8 *)bg->layout) + v;
|
||||
|
||||
{
|
||||
void *r0;
|
||||
r0 = CastPointer(bg->tilesVram, bg->unk24);
|
||||
r0 = CastPointer(bg->layoutVram, bg->unk24);
|
||||
r0 = CastPointer(r0, sp0C * j);
|
||||
r0 = CastPointer(r0, bg->unk22);
|
||||
dmaDest = CastPointer(r0, i * sp08);
|
||||
@@ -313,16 +314,16 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
} else {
|
||||
// r2 <- bg->flags
|
||||
// r3 <- bg->unk30
|
||||
// r4 <- sp00 == bg->unk14
|
||||
// r4 <- sp00 == bg->xTiles
|
||||
// r5 <- bgId
|
||||
// _08002FE8
|
||||
if (!(bg->flags & BACKGROUND_FLAG_IS_LEVEL_MAP)) {
|
||||
u32 vR2 = bg->unk14;
|
||||
u32 vR2 = bg->xTiles;
|
||||
while (bg->scrollX >= sp00 * 8)
|
||||
bg->scrollX -= sp00 * 8;
|
||||
|
||||
while (bg->scrollY >= bg->unk16 * 8) {
|
||||
bg->scrollY -= bg->unk16 * 8;
|
||||
while (bg->scrollY >= bg->yTiles * 8) {
|
||||
bg->scrollY -= bg->yTiles * 8;
|
||||
}
|
||||
}
|
||||
//_08003034
|
||||
@@ -344,29 +345,29 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
sp14 = (u16)((bg->scrollY >> 3) + bg->unk20);
|
||||
|
||||
notherIndex = (bg->unk24 * sp0C);
|
||||
r7Ptr = CastPointer(bg->tilesVram, notherIndex);
|
||||
r7Ptr = CastPointer(bg->layoutVram, notherIndex);
|
||||
r7Ptr = CastPointer(r7Ptr, bg->unk22 * sp08);
|
||||
|
||||
if (((bg->unk26 + sp10) + 1) > bg->unk14) {
|
||||
r2 -= (bg->unk14 - 1);
|
||||
if (((bg->targetTilesX + sp10) + 1) > bg->xTiles) {
|
||||
r2 -= (bg->xTiles - 1);
|
||||
} else {
|
||||
r2 = 0;
|
||||
}
|
||||
|
||||
r5 = bg->unk28 + 1;
|
||||
r5 = bg->targetTilesY + 1;
|
||||
if (bg->flags & BACKGROUND_FLAG_100) {
|
||||
// _080030D4
|
||||
if (bg->flags & BACKGROUND_FLAG_80) {
|
||||
// _080030DC
|
||||
u32 index = ((bg->unk20 + r5) - 1);
|
||||
u16 *r1Ptr = (u16 *)&((u8 *)bg->unk10)[r4 * index * sp08];
|
||||
u32 index2 = ((bg->unk1E + bg->unk26) - 1);
|
||||
u16 *r1Ptr = (u16 *)&((u8 *)bg->layout)[r4 * index * sp08];
|
||||
u32 index2 = ((bg->unk1E + bg->targetTilesX) - 1);
|
||||
u16 *r4Ptr = &r1Ptr[index2 * sp08];
|
||||
|
||||
while (r5-- != 0) {
|
||||
// _08003108
|
||||
u16 i; // <- r3
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
u32 mask = TileMask_FlipXY;
|
||||
// _08003126
|
||||
sp3C = &r7Ptr[i];
|
||||
@@ -382,14 +383,14 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
index = bg->unk20;
|
||||
index *= r4;
|
||||
index *= sp08;
|
||||
r1Ptr = (u16 *)&((u8 *)bg->unk10)[index];
|
||||
index2 = bg->unk1E + bg->unk26 - 1;
|
||||
r1Ptr = (u16 *)&((u8 *)bg->layout)[index];
|
||||
index2 = bg->unk1E + bg->targetTilesX - 1;
|
||||
r4Ptr = CastPointer(r1Ptr, index2 * sp08);
|
||||
|
||||
while (r5-- != 0) {
|
||||
// _08003180
|
||||
u16 i;
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
// _0800319E
|
||||
sp3C = &r7Ptr[i];
|
||||
*sp3C = (r4Ptr[0 - i] ^ TileMask_FlipX);
|
||||
@@ -401,14 +402,14 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
if (bg->flags & BACKGROUND_FLAG_80) {
|
||||
// _080031D8
|
||||
u32 index = ((sp14 + r5) - 1);
|
||||
u16 *r0Ptr = (u16 *)&((u8 *)bg->unk10)[r4 * index * sp08];
|
||||
u16 *r0Ptr = (u16 *)&((u8 *)bg->layout)[r4 * index * sp08];
|
||||
u32 index2 = sp10;
|
||||
u16 *r4Ptr = &r0Ptr[index2 * sp08];
|
||||
|
||||
while (r5-- != 0) {
|
||||
u16 i = 0;
|
||||
|
||||
for (; i < bg->unk26; i++) {
|
||||
for (; i < bg->targetTilesX; i++) {
|
||||
sp3C = &r7Ptr[i];
|
||||
*sp3C = r4Ptr[i] ^ TileMask_FlipY;
|
||||
}
|
||||
@@ -418,13 +419,13 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
} else {
|
||||
// _08003254
|
||||
u32 index = sp14;
|
||||
u16 *r0Ptr = (u16 *)&((u8 *)bg->unk10)[r4 * index * sp08];
|
||||
u16 *r0Ptr = (u16 *)&((u8 *)bg->layout)[r4 * index * sp08];
|
||||
u32 index2 = sp10;
|
||||
u16 *r4Ptr = &r0Ptr[index2 * sp08];
|
||||
|
||||
// _08003298
|
||||
while (r5-- != 0) {
|
||||
dmaSize = bg->unk26 - (r2 - 1);
|
||||
dmaSize = bg->targetTilesX - (r2 - 1);
|
||||
dmaSize *= sp08;
|
||||
dmaSize += (dmaSize >> 31);
|
||||
DmaCopy16(3, r4Ptr, r7Ptr, dmaSize);
|
||||
@@ -437,21 +438,21 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
// _080032C4
|
||||
if (r2 != 0) {
|
||||
// _080032CE
|
||||
u8 *r1 = CastPointer(bg->tilesVram, bg->unk24 * sp0C); // <- r1
|
||||
u32 displayTile = bg->unk22 + bg->unk14 - sp10; // <- r0
|
||||
u8 *r1 = CastPointer(bg->layoutVram, bg->unk24 * sp0C); // <- r1
|
||||
u32 displayTile = bg->unk22 + bg->xTiles - sp10; // <- r0
|
||||
u16 *r7Ptr = CastPointer(r1, displayTile * sp08);
|
||||
u16 r5 = (bg->unk28 + 1);
|
||||
u16 r5 = (bg->targetTilesY + 1);
|
||||
|
||||
if (bg->flags & BACKGROUND_FLAG_100) {
|
||||
if (bg->flags & BACKGROUND_FLAG_80) {
|
||||
// _08003306
|
||||
u32 index = ((sp14 + r5) - 1) * r4;
|
||||
u16 *r1Ptr = (u16 *)&(((u8 *)bg->unk10)[index * sp08]);
|
||||
u16 *r1Ptr = (u16 *)&(((u8 *)bg->layout)[index * sp08]);
|
||||
u16 *r4Ptr = (u16 *)((u8 *)&r1Ptr[(r2 - 1) * sp08]);
|
||||
|
||||
while (--r5 != (u16)-1) {
|
||||
u16 i;
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
r7Ptr[i] = *(r4Ptr - i) ^ TileMask_FlipXY;
|
||||
}
|
||||
r7Ptr = CastPointer(r7Ptr, sp0C);
|
||||
@@ -465,12 +466,12 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
index = sp14;
|
||||
index *= r4;
|
||||
index *= sp08;
|
||||
r1Ptr = &((u8 *)bg->unk10)[index];
|
||||
r1Ptr = &((u8 *)bg->layout)[index];
|
||||
r4Ptr = (u16 *)&r1Ptr[(r2 - 1) * sp08];
|
||||
|
||||
while (--r5 != (u16)-1) {
|
||||
u16 i;
|
||||
for (i = 0; i < bg->unk26; i++) {
|
||||
for (i = 0; i < bg->targetTilesX; i++) {
|
||||
r7Ptr[i] = *(r4Ptr - i) ^ TileMask_FlipX;
|
||||
}
|
||||
((u8 *)r7Ptr) += sp0C;
|
||||
@@ -482,7 +483,7 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
if (bg->flags & BACKGROUND_FLAG_80) {
|
||||
// _080033FC
|
||||
u32 index = ((sp14 + r5) - 1) * r4;
|
||||
u16 *r4Ptr = (u16 *)&((u8 *)bg->unk10)[index * sp08];
|
||||
u16 *r4Ptr = (u16 *)&((u8 *)bg->layout)[index * sp08];
|
||||
|
||||
u32 sp30 = r2;
|
||||
while (--r5 != (u16)-1) {
|
||||
@@ -497,7 +498,7 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
} else {
|
||||
// _08003474
|
||||
u32 index = (sp14 * r4);
|
||||
u16 *r4Ptr = (u16 *)&((u8 *)bg->unk10)[index * sp08];
|
||||
u16 *r4Ptr = (u16 *)&((u8 *)bg->layout)[index * sp08];
|
||||
|
||||
while (r5-- != 0) {
|
||||
dmaSize = sp08 * r2;
|
||||
@@ -517,16 +518,16 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
sp10 = (bg->scrollX >> 3) + bg->unk1E;
|
||||
sp14 = (bg->scrollY >> 3) + bg->unk20;
|
||||
|
||||
for (i = 0; i < bg->unk26;) {
|
||||
for (i = 0; i < bg->targetTilesX;) {
|
||||
// _08003500
|
||||
s32 r4 = sp10 + i;
|
||||
s32 sp24 = Div(r4, bg->unk14);
|
||||
s32 r1 = bg->unk14;
|
||||
s32 sp24 = Div(r4, bg->xTiles);
|
||||
s32 r1 = bg->xTiles;
|
||||
s32 sp28 = r4 - (sp24 * r1);
|
||||
s32 sp2C;
|
||||
s32 sp34;
|
||||
s32 r8 = bg->unk28;
|
||||
s32 r0 = bg->unk26 - i;
|
||||
s32 r8 = bg->targetTilesY;
|
||||
s32 r0 = bg->targetTilesX - i;
|
||||
r1 = r1 - sp28;
|
||||
|
||||
if (r1 > r0)
|
||||
@@ -535,21 +536,21 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
// _0800352E
|
||||
sp2C = r1 * sp08;
|
||||
|
||||
for (j = 0; j < bg->unk28;) {
|
||||
for (j = 0; j < bg->targetTilesY;) {
|
||||
// _08003542
|
||||
s32 divident = sp14 + j;
|
||||
s32 yPos = Div(divident, bg->unk16);
|
||||
s32 new_r4 = divident - (yPos * bg->unk16);
|
||||
s32 r5 = bg->unk16 - new_r4;
|
||||
s32 yPos = Div(divident, bg->yTiles);
|
||||
s32 new_r4 = divident - (yPos * bg->yTiles);
|
||||
s32 r5 = bg->yTiles - new_r4;
|
||||
yPos *= bg->mapWidth;
|
||||
|
||||
{ // _0800355C
|
||||
s32 metatileIndex = *(&bg->metatileMap[yPos] + sp24);
|
||||
s32 otherVal;
|
||||
metatileIndex *= bg->unk14;
|
||||
metatileIndex *= bg->unk16;
|
||||
metatileIndex *= bg->xTiles;
|
||||
metatileIndex *= bg->yTiles;
|
||||
|
||||
otherVal = new_r4 * bg->unk14;
|
||||
otherVal = new_r4 * bg->xTiles;
|
||||
otherVal += sp28;
|
||||
otherVal += metatileIndex;
|
||||
|
||||
@@ -559,8 +560,8 @@ NONMATCH("asm/non_matching/engine/sub_8002B20.inc", bool32 sub_8002B20(void))
|
||||
u8 *dmaDest;
|
||||
u8 *destPtr;
|
||||
u32 destIndex;
|
||||
dmaSrc = CastPointer(bg->unk10, otherVal * sp08);
|
||||
destPtr = CastPointer(bg->tilesVram, bg->unk24);
|
||||
dmaSrc = CastPointer(bg->layout, otherVal * sp08);
|
||||
destPtr = CastPointer(bg->layoutVram, bg->unk24);
|
||||
destPtr += sp0C * j;
|
||||
destPtr += +bg->unk22;
|
||||
dmaDest = CastPointer(destPtr, i * sp08);
|
||||
|
||||
@@ -122,12 +122,12 @@ void sub_803796C(void);
|
||||
void sub_80378BC(void);
|
||||
void sub_8037818(void);
|
||||
void sub_8037744(void);
|
||||
void sub_80370C0(void);
|
||||
void sub_8036FE4(void);
|
||||
void sub_8036EF8(void);
|
||||
void sub_8037254(void);
|
||||
void sub_80373CC(void);
|
||||
void Task_ActorSonicSlowToStop(void);
|
||||
void Task_OrbitingEmeraldsContractAndFadeScreenWhite(void);
|
||||
void Task_OrbitingEmeraldsRotate(void);
|
||||
void Task_OrbitingEmeraldsMoveOutwards(void);
|
||||
void Task_DisplaySonicSonicArtworkAndDestroyTask(void);
|
||||
void Task_SuperSonicSpark(void);
|
||||
void Task_ActorSonicSlowDownTilStop(void);
|
||||
|
||||
void Task_ActorSonicRunIn(void);
|
||||
void sub_80380B0(void);
|
||||
@@ -362,15 +362,15 @@ void CreateOrbitingEmeraldsSequence(void)
|
||||
Background *background;
|
||||
Sprite *emerald;
|
||||
|
||||
struct Task *t
|
||||
= TaskCreate(sub_8036EF8, sizeof(OrbitingEmeraldsSequence), 0x7000, 0, NULL);
|
||||
struct Task *t = TaskCreate(Task_OrbitingEmeraldsMoveOutwards,
|
||||
sizeof(OrbitingEmeraldsSequence), 0x7000, 0, NULL);
|
||||
OrbitingEmeraldsSequence *sequence = TaskGetStructPtr(t);
|
||||
sequence->animFrame = 32;
|
||||
|
||||
background = &sequence->background;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CUTSCENE_VANILLA_KIDNAPPED_SUPER_SONIC_ART;
|
||||
@@ -378,9 +378,9 @@ void CreateOrbitingEmeraldsSequence(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 9;
|
||||
background->unk24 = 1;
|
||||
background->unk26 = 0xD;
|
||||
background->unk28 = 0x12;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0xD;
|
||||
background->targetTilesY = 0x12;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(2);
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
@@ -412,7 +412,7 @@ void CreateOrbitingEmeraldsSequence(void)
|
||||
s->y = pos[1] + ORBIT_BASE_Y; \
|
||||
})
|
||||
|
||||
void sub_8036EF8(void)
|
||||
void Task_OrbitingEmeraldsMoveOutwards(void)
|
||||
{
|
||||
u8 i;
|
||||
s32 pos[2];
|
||||
@@ -439,11 +439,11 @@ void sub_8036EF8(void)
|
||||
|
||||
if (--sequence->animFrame == 0) {
|
||||
sequence->animFrame = 360;
|
||||
gCurTask->main = sub_8036FE4;
|
||||
gCurTask->main = Task_OrbitingEmeraldsRotate;
|
||||
};
|
||||
}
|
||||
|
||||
void sub_8036FE4(void)
|
||||
void Task_OrbitingEmeraldsRotate(void)
|
||||
{
|
||||
u8 i;
|
||||
s32 pos[2];
|
||||
@@ -474,11 +474,11 @@ void sub_8036FE4(void)
|
||||
|
||||
if (--sequence->animFrame == 0) {
|
||||
sequence->animFrame = 32;
|
||||
gCurTask->main = sub_80370C0;
|
||||
gCurTask->main = Task_OrbitingEmeraldsContractAndFadeScreenWhite;
|
||||
};
|
||||
}
|
||||
|
||||
void sub_80370C0(void)
|
||||
void Task_OrbitingEmeraldsContractAndFadeScreenWhite(void)
|
||||
{
|
||||
u8 i;
|
||||
s32 pos[2];
|
||||
@@ -504,8 +504,8 @@ void sub_80370C0(void)
|
||||
gUnknown_03002280[2][2] = 0xff;
|
||||
gUnknown_03002280[2][3] = 0x14;
|
||||
|
||||
sub_8002A3C(&sequence->background);
|
||||
gCurTask->main = sub_8037254;
|
||||
InitBackground(&sequence->background);
|
||||
gCurTask->main = Task_DisplaySonicSonicArtworkAndDestroyTask;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ void sub_80370C0(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8037254(void)
|
||||
void Task_DisplaySonicSonicArtworkAndDestroyTask(void)
|
||||
{
|
||||
OrbitingEmeraldsSequence *sequence = TaskGetStructPtr(gCurTask);
|
||||
|
||||
@@ -561,7 +561,8 @@ void sub_8037254(void)
|
||||
void CreateSuperSonicSpark(s32 x, s32 y)
|
||||
{
|
||||
Sprite *s;
|
||||
struct Task *t = TaskCreate(sub_80373CC, sizeof(SuperSonicSpark), 0x7000, 0, NULL);
|
||||
struct Task *t
|
||||
= TaskCreate(Task_SuperSonicSpark, sizeof(SuperSonicSpark), 0x7000, 0, NULL);
|
||||
u32 type = PseudoRandBetween(2, 3);
|
||||
SuperSonicSpark *spark = TaskGetStructPtr(t);
|
||||
spark->animFrame = 40;
|
||||
@@ -587,7 +588,7 @@ void CreateSuperSonicSpark(s32 x, s32 y)
|
||||
s->unk10 = 0x1000;
|
||||
}
|
||||
|
||||
void sub_80373CC(void)
|
||||
void Task_SuperSonicSpark(void)
|
||||
{
|
||||
s32 unk4, unkC;
|
||||
Sprite *s;
|
||||
@@ -676,13 +677,13 @@ void Task_ActorSonicRunIn(void)
|
||||
if (--actor->animFrame == 0) {
|
||||
NEXT_SEQUENCE_ANIM(actor, s);
|
||||
s->animSpeed = 0x10;
|
||||
gCurTask->main = Task_ActorSonicSlowToStop;
|
||||
gCurTask->main = Task_ActorSonicSlowDownTilStop;
|
||||
}
|
||||
|
||||
OBJ_RENDER_SPRITE(actor, s);
|
||||
}
|
||||
|
||||
void Task_ActorSonicSlowToStop(void)
|
||||
void Task_ActorSonicSlowDownTilStop(void)
|
||||
{
|
||||
Sprite *s;
|
||||
IntroActor *actor = TaskGetStructPtr(gCurTask);
|
||||
@@ -1564,7 +1565,7 @@ void CreateBackgrounds(void)
|
||||
background = &worldBgs->bg1;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(31);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(31);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CUTSCENE_VANILLA_KIDNAPPED_FULL_MAP;
|
||||
@@ -1572,16 +1573,16 @@ void CreateBackgrounds(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &worldBgs->bg2;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CUTSCENE_VANILLA_KIDNAPPED_FULL_MAP_COPY;
|
||||
@@ -1589,11 +1590,11 @@ void CreateBackgrounds(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
void sub_803997C(void)
|
||||
@@ -1654,8 +1655,8 @@ void sub_8039AD4(void)
|
||||
|
||||
m4aMPlayAllStop();
|
||||
gGameMode = GAME_MODE_SINGLE_PLAYER;
|
||||
gSelectedCharacter = 0;
|
||||
gCurrentLevel = 0x1D;
|
||||
gSelectedCharacter = CHARACTER_SONIC;
|
||||
gCurrentLevel = LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53);
|
||||
ApplyGameStageSettings();
|
||||
GameStageStart();
|
||||
TaskDestroy(gCurTask);
|
||||
|
||||
+15
-15
@@ -290,7 +290,7 @@ NONMATCH("asm/non_matching/game/CreateCharacterSelectionScreen.inc",
|
||||
background = &characterScreen->unk8C;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CHARACTER_SELECT_WHEEL;
|
||||
@@ -298,16 +298,16 @@ NONMATCH("asm/non_matching/game/CreateCharacterSelectionScreen.inc",
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &characterScreen->unkC;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CHARACTER_SELECT_BACKGROUND_0;
|
||||
@@ -315,16 +315,16 @@ NONMATCH("asm/non_matching/game/CreateCharacterSelectionScreen.inc",
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &characterScreen->unk4C;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(21);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(21);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CHARACTER_SELECT_BACKGROUND_1;
|
||||
@@ -332,11 +332,11 @@ NONMATCH("asm/non_matching/game/CreateCharacterSelectionScreen.inc",
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(2);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
for (i = 0; i < NUM_CHARACTERS; i++) {
|
||||
s = &characterScreen->carouselBlobs[i];
|
||||
|
||||
+10
-10
@@ -352,7 +352,7 @@ void CreateCourseSelectionScreen(u8 currentLevel, u8 maxLevel, u8 cutScenes)
|
||||
background = &coursesScreen->header;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
|
||||
@@ -366,16 +366,16 @@ void CreateCourseSelectionScreen(u8 currentLevel, u8 maxLevel, u8 cutScenes)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &coursesScreen->zoneMap;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(16);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(16);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_STAGE_SELECT_MAP;
|
||||
@@ -383,11 +383,11 @@ void CreateCourseSelectionScreen(u8 currentLevel, u8 maxLevel, u8 cutScenes)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x3C;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x3C;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
s = &coursesScreen->playerAvatar;
|
||||
s->x = 0;
|
||||
|
||||
@@ -106,7 +106,7 @@ void CreateCreditsCutScene(u8 creditsVariant, u8 b, u8 c)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = gUnknown_080E1244[scene->unk50 + scene->unk4E];
|
||||
@@ -114,11 +114,11 @@ void CreateCreditsCutScene(u8 creditsVariant, u8 b, u8 c)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
static void sub_808EBC4(void)
|
||||
|
||||
@@ -154,7 +154,7 @@ void CreateCreditsEndCutScene(u8 creditsVariant)
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsEndSlides[2];
|
||||
@@ -162,11 +162,11 @@ void CreateCreditsEndCutScene(u8 creditsVariant)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -238,7 +238,7 @@ void CreateCreditsEndCutScene(u8 creditsVariant)
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsEndSlides[scene->sonicAnimFrame + 2];
|
||||
@@ -246,11 +246,11 @@ void CreateCreditsEndCutScene(u8 creditsVariant)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
UpdateBgAnimationTiles(background);
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ void CreateCreditsEndCutScene(u8 creditsVariant)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsEndSlides[scene->unk160];
|
||||
@@ -271,11 +271,11 @@ void CreateCreditsEndCutScene(u8 creditsVariant)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAG_4 | BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ static void Task_CreateCopyrightScreen(void)
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsEndSlides[13];
|
||||
@@ -328,11 +328,11 @@ static void Task_CreateCopyrightScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -343,7 +343,7 @@ static void Task_CreateCopyrightScreen(void)
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(21);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(21);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsEndSlides[14];
|
||||
@@ -351,11 +351,11 @@ static void Task_CreateCopyrightScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 3;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 3;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(2);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
scene->sequence = SEQUENCE_COPYRIGHT_SCREEN;
|
||||
scene->sonicAnimFrame++;
|
||||
@@ -384,10 +384,10 @@ static void Task_SequenceMain(void)
|
||||
|
||||
background->tilemapId
|
||||
= sTilemapsCreditsEndSlides[scene->sonicAnimFrame + 2];
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
scene->sonicAnimFrame++;
|
||||
|
||||
scene->unk15E = gUnknown_080E12F0[scene->sonicAnimFrame];
|
||||
|
||||
@@ -96,7 +96,7 @@ void CreateCreditsSlidesCutScene(u8 creditsVariant, u8 b, u8 c)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsSlides[scene->unk50];
|
||||
@@ -104,11 +104,11 @@ void CreateCreditsSlidesCutScene(u8 creditsVariant, u8 b, u8 c)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ void sub_808EF38(void)
|
||||
Background *background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCreditsSlides[scene->unk50];
|
||||
@@ -137,11 +137,11 @@ void sub_808EF38(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
gCurTask->main = sub_808F004;
|
||||
} else {
|
||||
|
||||
@@ -325,7 +325,7 @@ void CreateExtraEndingFallCutScene(void)
|
||||
Sprite *s;
|
||||
s = &scene->unkD0[i];
|
||||
s->graphics.dest = (void *)scene->unk398;
|
||||
scene->unk398 += gUnknown_080E12FC[i + 0xD].numTiles * 0x20;
|
||||
scene->unk398 += gUnknown_080E12FC[i + 0xD].numTiles * TILE_SIZE_4BPP;
|
||||
s->graphics.anim = gUnknown_080E12FC[i + 0xD].anim;
|
||||
s->variant = gUnknown_080E12FC[i + 0xD].variant;
|
||||
s->prevVariant = -1;
|
||||
@@ -346,7 +346,7 @@ void CreateExtraEndingFallCutScene(void)
|
||||
Sprite *s;
|
||||
s = &scene->unk1F0;
|
||||
s->graphics.dest = (void *)scene->unk398;
|
||||
scene->unk398 += gUnknown_080E12FC[19].numTiles << 5;
|
||||
scene->unk398 += gUnknown_080E12FC[19].numTiles * TILE_SIZE_4BPP;
|
||||
s->graphics.anim = gUnknown_080E12FC[19].anim;
|
||||
s->variant = gUnknown_080E12FC[19].variant;
|
||||
s->prevVariant = -1;
|
||||
@@ -367,7 +367,7 @@ void CreateExtraEndingFallCutScene(void)
|
||||
Sprite *s;
|
||||
s = &scene->unk220;
|
||||
s->graphics.dest = (void *)scene->unk398;
|
||||
scene->unk398 += gUnknown_080E12FC[20].numTiles << 5;
|
||||
scene->unk398 += gUnknown_080E12FC[20].numTiles * TILE_SIZE_4BPP;
|
||||
s->graphics.anim = gUnknown_080E12FC[20].anim;
|
||||
s->variant = gUnknown_080E12FC[20].variant;
|
||||
s->prevVariant = -1;
|
||||
@@ -388,7 +388,7 @@ void CreateExtraEndingFallCutScene(void)
|
||||
Sprite *s;
|
||||
s = &scene->unk340;
|
||||
s->graphics.dest = (void *)scene->unk398;
|
||||
scene->unk398 += gUnknown_080E12FC[9].numTiles << 6;
|
||||
scene->unk398 += gUnknown_080E12FC[9].numTiles * TILE_SIZE_8BPP;
|
||||
s->graphics.anim = gUnknown_080E12FC[9].anim;
|
||||
s->variant = gUnknown_080E12FC[9].variant;
|
||||
s->prevVariant = -1;
|
||||
@@ -409,7 +409,7 @@ void CreateExtraEndingFallCutScene(void)
|
||||
Sprite *s;
|
||||
s = &scene->unk250;
|
||||
s->graphics.dest = (void *)scene->unk398;
|
||||
scene->unk398 += gUnknown_080E12FC[8].numTiles << 5;
|
||||
scene->unk398 += gUnknown_080E12FC[8].numTiles * TILE_SIZE_4BPP;
|
||||
s->graphics.anim = gUnknown_080E12FC[8].anim;
|
||||
s->variant = gUnknown_080E12FC[8].variant;
|
||||
s->prevVariant = -1;
|
||||
@@ -431,7 +431,7 @@ void CreateExtraEndingFallCutScene(void)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_CUTSCENE_POST_EXTRA_BOSS_BG;
|
||||
@@ -439,11 +439,11 @@ void CreateExtraEndingFallCutScene(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x40;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 32;
|
||||
background->targetTilesY = 64;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void CreateExtraEndingSlidesCutScene(void)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_STORYFRAME_SONIC_CATCHES_VANILLA;
|
||||
@@ -62,11 +62,11 @@ void CreateExtraEndingSlidesCutScene(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
void sub_8091608(void);
|
||||
|
||||
@@ -363,7 +363,7 @@ void CreateFinalEndingFallCutScene(void)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = gUnknown_080E1648[1];
|
||||
@@ -371,16 +371,16 @@ void CreateFinalEndingFallCutScene(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &scene->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(24);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(24);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = gUnknown_080E1648[0];
|
||||
@@ -388,11 +388,11 @@ void CreateFinalEndingFallCutScene(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
void sub_8091F68(struct FinalEndingFallCutScene *);
|
||||
@@ -871,11 +871,11 @@ u32 sub_80928C8(struct FinalEndingFallCutScene *scene)
|
||||
background = &scene->unk0;
|
||||
background->tilemapId = gUnknown_080E1648[3];
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &scene->unk40;
|
||||
background->tilemapId = gUnknown_080E1648[2];
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
return 0;
|
||||
}
|
||||
@@ -484,7 +484,7 @@ void CreateFinalEndingLandingCutScene(void)
|
||||
background = &scene->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = gUnknown_080E179C[value + 1];
|
||||
@@ -492,11 +492,11 @@ void CreateFinalEndingLandingCutScene(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
if (value == 2) {
|
||||
@@ -508,7 +508,7 @@ void CreateFinalEndingLandingCutScene(void)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(24);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(24);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = gUnknown_080E179C[value];
|
||||
@@ -516,11 +516,11 @@ void CreateFinalEndingLandingCutScene(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
if (!(gLoadedSaveGame->chaosEmeralds[gSelectedCharacter]
|
||||
|
||||
@@ -471,7 +471,7 @@ void sub_808E35C(struct CharacterUnlockCutScene *scene)
|
||||
background = &scene->unk80;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(29);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(29);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCharacterDialogue[scene->unk10E + (lang * 15)];
|
||||
@@ -479,16 +479,16 @@ void sub_808E35C(struct CharacterUnlockCutScene *scene)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1e;
|
||||
background->unk28 = 5;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 30;
|
||||
background->targetTilesY = 5;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sTilemapsCharacterSlides[scene->unk10C];
|
||||
@@ -496,11 +496,11 @@ void sub_808E35C(struct CharacterUnlockCutScene *scene)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1e;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 30;
|
||||
background->targetTilesY = 20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(2);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
void sub_808E4C8(void);
|
||||
@@ -543,7 +543,7 @@ void sub_808E4C8(void)
|
||||
scene = TaskGetStructPtr(gCurTask);
|
||||
sub_8003EE4(0, 0x100, 0x100, 0, 0, 0, 0, gBgAffineRegs);
|
||||
|
||||
if (scene->unk110++ > 0x154) {
|
||||
if (scene->unk110++ > 340) {
|
||||
scene->unk110 = 0;
|
||||
|
||||
if ((scene->unk10C & 3) == 3) {
|
||||
@@ -553,7 +553,7 @@ void sub_808E4C8(void)
|
||||
background = &scene->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId
|
||||
@@ -562,12 +562,12 @@ void sub_808E4C8(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1e;
|
||||
background->unk28 = 5;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 30;
|
||||
background->targetTilesY = 5;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_UPDATE_PALETTE | BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
gDispCnt |= 0x100;
|
||||
InitBackground(background);
|
||||
gDispCnt |= DISPCNT_BG0_ON;
|
||||
m4aSongNumStart(MUS_GOT_ALL_CHAOS_EMERALDS);
|
||||
gCurTask->main = sub_808E63C;
|
||||
} else {
|
||||
@@ -579,7 +579,7 @@ void sub_808E4C8(void)
|
||||
}
|
||||
|
||||
if (gPressedKeys & START_BUTTON && scene->unk110 > 8) {
|
||||
scene->unk110 = 0x154;
|
||||
scene->unk110 = 340;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ void sub_808E890(struct Task *t)
|
||||
struct ResultsCutScene *scene = TaskGetStructPtr(t);
|
||||
VramFree(scene->unk4.graphics.dest);
|
||||
|
||||
if (scene->unk34.graphics.dest != 0) {
|
||||
if (scene->unk34.graphics.dest != NULL) {
|
||||
VramFree(scene->unk34.graphics.dest);
|
||||
}
|
||||
}
|
||||
@@ -168,16 +168,16 @@ void CreateMissingChaosEmaraldsCutScene(void)
|
||||
background = &scene->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->unk1E = 0;
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
}
|
||||
{
|
||||
@@ -185,20 +185,20 @@ void CreateMissingChaosEmaraldsCutScene(void)
|
||||
background = &scene->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->unk1E = 0;
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->targetTilesX = 0x1E;
|
||||
if (scene->unkBD != 0) {
|
||||
background->unk28 = 7;
|
||||
background->targetTilesY = 7;
|
||||
} else {
|
||||
background->unk28 = 6;
|
||||
background->targetTilesY = 6;
|
||||
}
|
||||
background->unk2A = 0;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void Task_8094360(void)
|
||||
gBgScrollRegs[1][1] = 400;
|
||||
background = &scene->unk40;
|
||||
background->tilemapId = sTilemapsPlayerNotifs[scene->unkBF - 1];
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
// "Collect all Chaos Emeralds!" message
|
||||
@@ -226,7 +226,7 @@ void Task_8094360(void)
|
||||
gBgScrollRegs[0][1] = 0;
|
||||
background = &scene->unk0;
|
||||
background->tilemapId = sTilemapsPlayerNotifs[0];
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
} else {
|
||||
s32 base;
|
||||
u16 index;
|
||||
@@ -237,7 +237,7 @@ void Task_8094360(void)
|
||||
// "Unlocked Tiny Chao Garden" message
|
||||
background = &scene->unk0;
|
||||
background->tilemapId = sTilemapsPlayerNotifs[7];
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
if (scene->unkBD > 1 || scene->unkBF > 1) {
|
||||
gDispCnt |= 0x200;
|
||||
@@ -248,7 +248,7 @@ void Task_8094360(void)
|
||||
base = scene->unkBF;
|
||||
index = (base + 6 + ((scene->unkBD - 1) * 7));
|
||||
background->tilemapId = sTilemapsPlayerNotifs[index];
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -12,6 +12,7 @@
|
||||
#include "game/race_progress.h"
|
||||
#include "game/save.h"
|
||||
#include "game/screen_shake.h"
|
||||
#include "game/stage/collect_ring_effect.h"
|
||||
#include "game/stage/entities_manager.h"
|
||||
#include "game/stage/music_manager.h"
|
||||
#include "game/stage/palette_loader.h"
|
||||
@@ -22,7 +23,7 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/tilemaps.h"
|
||||
|
||||
void sub_80299F0(u32, u32, u32, Player *);
|
||||
void CallSetStageSpawnPos(u32, u32, u32, Player *);
|
||||
void CreateGameStage(void);
|
||||
|
||||
void sub_801AB3C(void);
|
||||
@@ -36,7 +37,7 @@ void sub_802B708(void);
|
||||
void InitCamera(u32);
|
||||
void sub_801BF90(void);
|
||||
|
||||
void SetupStageLoadingScreen(void);
|
||||
void SetupStageIntro(void);
|
||||
|
||||
void sub_80115D0(u32, u32, u32);
|
||||
|
||||
@@ -129,7 +130,7 @@ void GameStageStart(void)
|
||||
gUnknown_030054F8 = 1;
|
||||
|
||||
if (gCurrentLevel != LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
|
||||
sub_80299F0(gSelectedCharacter, gCurrentLevel, 0, &gPlayer);
|
||||
CallSetStageSpawnPos(gSelectedCharacter, gCurrentLevel, 0, &gPlayer);
|
||||
gUnknown_030056A4 = NULL;
|
||||
}
|
||||
|
||||
@@ -155,7 +156,7 @@ void CreateGameStage(void)
|
||||
{
|
||||
u8 i;
|
||||
gGameStageTask = TaskCreate(sub_801AB3C, 0, 0xff00, 0, sub_801B7A8);
|
||||
gUnknown_0300540C = 0;
|
||||
gActiveCollectRingEffectCount = 0;
|
||||
gUnknown_030054F4 = 0;
|
||||
gUnknown_030054B0 = 0;
|
||||
|
||||
@@ -193,7 +194,7 @@ void CreateGameStage(void)
|
||||
|
||||
if (gGameMode != GAME_MODE_MULTI_PLAYER_COLLECT_RINGS) {
|
||||
CreateStageMusicManager();
|
||||
SetupStageLoadingScreen();
|
||||
SetupStageIntro();
|
||||
InitCamera(gCurrentLevel);
|
||||
gUnknown_080D57DC[gCurrentLevel]();
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -45,7 +45,7 @@ void Task_801F214(void)
|
||||
} break;
|
||||
|
||||
case 0x10: {
|
||||
ts->y = gUnknown_03005660.unk4;
|
||||
ts->y = gWater.currentWaterLevel;
|
||||
} break;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void Task_801F214(void)
|
||||
}
|
||||
}
|
||||
|
||||
struct Task *sub_801F3A4(s32 x, s32 y, u16 score)
|
||||
struct Task *CreateStageGoalBonusPointsAnim(s32 x, s32 y, u16 score)
|
||||
{
|
||||
if ((score != 100) && (score != 200) && (score != 300) && (score != 500)
|
||||
&& (score != 800)) {
|
||||
|
||||
+1884
File diff suppressed because it is too large.
Load diff
@@ -8,7 +8,468 @@
|
||||
#include "constants/move_states.h"
|
||||
#include "constants/player_transitions.h"
|
||||
|
||||
extern u16 gUnknown_080D6736[115][2];
|
||||
const u16 gUnknown_080D6736[115][2] = {
|
||||
{
|
||||
0,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
2,
|
||||
0,
|
||||
},
|
||||
{
|
||||
3,
|
||||
0,
|
||||
},
|
||||
{
|
||||
4,
|
||||
0,
|
||||
},
|
||||
{
|
||||
5,
|
||||
0,
|
||||
},
|
||||
{
|
||||
6,
|
||||
0,
|
||||
},
|
||||
{
|
||||
7,
|
||||
0,
|
||||
},
|
||||
{
|
||||
8,
|
||||
0,
|
||||
},
|
||||
{
|
||||
9,
|
||||
0,
|
||||
},
|
||||
{
|
||||
10,
|
||||
0,
|
||||
},
|
||||
{
|
||||
11,
|
||||
0,
|
||||
},
|
||||
{
|
||||
12,
|
||||
0,
|
||||
},
|
||||
{
|
||||
13,
|
||||
0,
|
||||
},
|
||||
{
|
||||
13,
|
||||
0,
|
||||
},
|
||||
{
|
||||
14,
|
||||
0,
|
||||
},
|
||||
{
|
||||
15,
|
||||
0,
|
||||
},
|
||||
{
|
||||
16,
|
||||
0,
|
||||
},
|
||||
{
|
||||
17,
|
||||
0,
|
||||
},
|
||||
{
|
||||
18,
|
||||
0,
|
||||
},
|
||||
{
|
||||
28,
|
||||
0,
|
||||
},
|
||||
{
|
||||
28,
|
||||
1,
|
||||
},
|
||||
{
|
||||
29,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
31,
|
||||
0,
|
||||
},
|
||||
{
|
||||
31,
|
||||
1,
|
||||
},
|
||||
{
|
||||
31,
|
||||
2,
|
||||
},
|
||||
{
|
||||
32,
|
||||
0,
|
||||
},
|
||||
{
|
||||
33,
|
||||
0,
|
||||
},
|
||||
{
|
||||
34,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
35,
|
||||
0,
|
||||
},
|
||||
{
|
||||
48,
|
||||
0,
|
||||
},
|
||||
{
|
||||
49,
|
||||
0,
|
||||
},
|
||||
{
|
||||
50,
|
||||
0,
|
||||
},
|
||||
{
|
||||
51,
|
||||
0,
|
||||
},
|
||||
{
|
||||
65,
|
||||
0,
|
||||
},
|
||||
{
|
||||
52,
|
||||
0,
|
||||
},
|
||||
{
|
||||
53,
|
||||
0,
|
||||
},
|
||||
{
|
||||
54,
|
||||
0,
|
||||
},
|
||||
{
|
||||
55,
|
||||
0,
|
||||
},
|
||||
{
|
||||
56,
|
||||
0,
|
||||
},
|
||||
{
|
||||
57,
|
||||
0,
|
||||
},
|
||||
{
|
||||
58,
|
||||
0,
|
||||
},
|
||||
{
|
||||
59,
|
||||
0,
|
||||
},
|
||||
{
|
||||
60,
|
||||
0,
|
||||
},
|
||||
{
|
||||
68,
|
||||
0,
|
||||
},
|
||||
{
|
||||
69,
|
||||
0,
|
||||
},
|
||||
{
|
||||
69,
|
||||
1,
|
||||
},
|
||||
{
|
||||
70,
|
||||
0,
|
||||
},
|
||||
{
|
||||
62,
|
||||
0,
|
||||
},
|
||||
{
|
||||
62,
|
||||
1,
|
||||
},
|
||||
{
|
||||
63,
|
||||
0,
|
||||
},
|
||||
{
|
||||
63,
|
||||
1,
|
||||
},
|
||||
{
|
||||
61,
|
||||
0,
|
||||
},
|
||||
{
|
||||
64,
|
||||
0,
|
||||
},
|
||||
{
|
||||
66,
|
||||
0,
|
||||
},
|
||||
{
|
||||
67,
|
||||
0,
|
||||
},
|
||||
{
|
||||
73,
|
||||
0,
|
||||
},
|
||||
{
|
||||
73,
|
||||
1,
|
||||
},
|
||||
{
|
||||
73,
|
||||
2,
|
||||
},
|
||||
{
|
||||
75,
|
||||
0,
|
||||
},
|
||||
{
|
||||
9,
|
||||
2,
|
||||
},
|
||||
{
|
||||
71,
|
||||
0,
|
||||
},
|
||||
{
|
||||
71,
|
||||
1,
|
||||
},
|
||||
{
|
||||
72,
|
||||
0,
|
||||
},
|
||||
{
|
||||
36,
|
||||
0,
|
||||
},
|
||||
{
|
||||
36,
|
||||
1,
|
||||
},
|
||||
{
|
||||
36,
|
||||
2,
|
||||
},
|
||||
{
|
||||
36,
|
||||
3,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
19,
|
||||
0,
|
||||
},
|
||||
{
|
||||
37,
|
||||
0,
|
||||
},
|
||||
{
|
||||
37,
|
||||
1,
|
||||
},
|
||||
{
|
||||
110,
|
||||
0,
|
||||
},
|
||||
{
|
||||
110,
|
||||
1,
|
||||
},
|
||||
{
|
||||
112,
|
||||
0,
|
||||
},
|
||||
{
|
||||
111,
|
||||
0,
|
||||
},
|
||||
{
|
||||
113,
|
||||
0,
|
||||
},
|
||||
{
|
||||
202,
|
||||
0,
|
||||
},
|
||||
{
|
||||
203,
|
||||
0,
|
||||
},
|
||||
{
|
||||
204,
|
||||
0,
|
||||
},
|
||||
{
|
||||
201,
|
||||
0,
|
||||
},
|
||||
{
|
||||
292,
|
||||
0,
|
||||
},
|
||||
{
|
||||
295,
|
||||
0,
|
||||
},
|
||||
{
|
||||
295,
|
||||
1,
|
||||
},
|
||||
{
|
||||
294,
|
||||
0,
|
||||
},
|
||||
{
|
||||
293,
|
||||
0,
|
||||
},
|
||||
{
|
||||
293,
|
||||
1,
|
||||
},
|
||||
{
|
||||
293,
|
||||
2,
|
||||
},
|
||||
{
|
||||
293,
|
||||
3,
|
||||
},
|
||||
{
|
||||
296,
|
||||
0,
|
||||
},
|
||||
{
|
||||
297,
|
||||
2,
|
||||
},
|
||||
{
|
||||
297,
|
||||
0,
|
||||
},
|
||||
{
|
||||
297,
|
||||
1,
|
||||
},
|
||||
{
|
||||
297,
|
||||
3,
|
||||
},
|
||||
{
|
||||
297,
|
||||
4,
|
||||
},
|
||||
{
|
||||
324,
|
||||
0,
|
||||
},
|
||||
{
|
||||
324,
|
||||
1,
|
||||
},
|
||||
{
|
||||
324,
|
||||
2,
|
||||
},
|
||||
{
|
||||
416,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
378,
|
||||
0,
|
||||
},
|
||||
{
|
||||
383,
|
||||
0,
|
||||
},
|
||||
{
|
||||
1,
|
||||
0,
|
||||
},
|
||||
{
|
||||
382,
|
||||
0,
|
||||
},
|
||||
};
|
||||
|
||||
void CallPlayerTransition(Player *p)
|
||||
{
|
||||
@@ -118,7 +579,7 @@ void CallPlayerTransition(Player *p)
|
||||
case PLTRANS_PT22 - 1: {
|
||||
PLAYERFN_SET(PlayerCB_8029158);
|
||||
} break;
|
||||
case 24 - 1: {
|
||||
case PLTRANS_PT24 - 1: {
|
||||
PLAYERFN_SET(PlayerCB_802A300);
|
||||
} break;
|
||||
case PLTRANS_PT11 - 1: {
|
||||
+1
-1
@@ -32,7 +32,7 @@ void GameStart(void)
|
||||
gCamera.movementTask = NULL;
|
||||
|
||||
gUnknown_030059D0.t = NULL;
|
||||
gUnknown_03005660.t = NULL;
|
||||
gWater.t = NULL;
|
||||
|
||||
gUnknown_0300543C = 0;
|
||||
gGameMode = GAME_MODE_SINGLE_PLAYER;
|
||||
|
||||
@@ -131,33 +131,34 @@ static void Task_StageGoalToggleMain(void)
|
||||
if (x <= Q_24_8_TO_INT(gPlayer.x)
|
||||
&& !(gPlayer.moveState & (MOVESTATE_8000000 | MOVESTATE_8))) {
|
||||
gPlayer.transition = PLTRANS_PT10;
|
||||
gUnknown_030054D0 = x;
|
||||
gStageGoalX = x;
|
||||
StageGoalToggle_HandleMultiplayerFinish();
|
||||
}
|
||||
} else if (x <= Q_24_8_TO_INT(gPlayer.x)
|
||||
&& !(gPlayer.moveState & MOVESTATE_8000000)) {
|
||||
gPlayer.transition = PLTRANS_PT10;
|
||||
gUnknown_03005424 |= 0x21;
|
||||
gUnknown_030054D0 = x;
|
||||
gStageGoalX = x;
|
||||
|
||||
if (gGameMode == GAME_MODE_SINGLE_PLAYER
|
||||
&& !(gPlayer.moveState & MOVESTATE_IN_AIR) && gPlayer.speedGroundX > 0x280) {
|
||||
u32 temp;
|
||||
if (gPlayer.speedGroundX < 0x401) {
|
||||
temp = 200;
|
||||
} else if (gPlayer.speedGroundX < 0x901) {
|
||||
temp = 300;
|
||||
} else if (gPlayer.speedGroundX < 0xA01) {
|
||||
temp = 500;
|
||||
&& !(gPlayer.moveState & MOVESTATE_IN_AIR)
|
||||
&& gPlayer.speedGroundX > Q_24_8(2.5)) {
|
||||
u32 extraScore;
|
||||
if (gPlayer.speedGroundX <= Q_24_8(4.0)) {
|
||||
extraScore = 200;
|
||||
} else if (gPlayer.speedGroundX <= Q_24_8(9.0)) {
|
||||
extraScore = 300;
|
||||
} else if (gPlayer.speedGroundX <= Q_24_8(10.0)) {
|
||||
extraScore = 500;
|
||||
} else {
|
||||
temp = 800;
|
||||
extraScore = 800;
|
||||
}
|
||||
|
||||
// Redundant check :/
|
||||
if (temp != 0) {
|
||||
if (extraScore != 0) {
|
||||
u32 temp2, temp3;
|
||||
u32 prev = gLevelScore;
|
||||
gLevelScore += temp;
|
||||
gLevelScore += extraScore;
|
||||
temp2 = Div(gLevelScore, 50000);
|
||||
temp3 = Div(prev, 50000);
|
||||
if (temp2 != temp3 && gGameMode == GAME_MODE_SINGLE_PLAYER) {
|
||||
@@ -171,7 +172,8 @@ static void Task_StageGoalToggleMain(void)
|
||||
gNumLives = numLives;
|
||||
gUnknown_030054A8.unk3 = 0x10;
|
||||
}
|
||||
sub_801F3A4(Q_24_8_TO_INT(gPlayer.x), Q_24_8_TO_INT(gPlayer.y), temp);
|
||||
CreateStageGoalBonusPointsAnim(Q_24_8_TO_INT(gPlayer.x),
|
||||
Q_24_8_TO_INT(gPlayer.y), extraScore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void sub_8082038(struct MultiplayerSinglePakResultsScreen *screen)
|
||||
Background *background = &screen->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_LEVEL_BG(LEVEL_INDEX(ZONE_1, ACT_2));
|
||||
@@ -128,11 +128,11 @@ void sub_8082038(struct MultiplayerSinglePakResultsScreen *screen)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1e;
|
||||
background->unk28 = 0x19;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1e;
|
||||
background->targetTilesY = 0x19;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
extern void sub_80078D4(u8, u8, u8, u16, u16);
|
||||
@@ -284,7 +284,7 @@ void sub_80823FC(void)
|
||||
gBgScrollRegs[2][1] = 0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(28);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_LEVEL_METATILES_0(LEVEL_INDEX(ZONE_1, ACT_BOSS));
|
||||
@@ -305,11 +305,11 @@ void sub_80823FC(void)
|
||||
}
|
||||
background->unk22 = 6;
|
||||
background->unk24 = 8;
|
||||
background->unk26 = 0x12;
|
||||
background->unk28 = 4;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x12;
|
||||
background->targetTilesY = 4;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(2);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
gDispCnt |= 0x400;
|
||||
|
||||
@@ -229,7 +229,7 @@ void StartSinglePakConnect(void)
|
||||
background = &connectScreen->unk9C;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MP_WAIT_CONNECTION;
|
||||
@@ -237,11 +237,11 @@ void StartSinglePakConnect(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
m4aSongNumStart(MUS_CONNECTION_PENDING);
|
||||
|
||||
if (!SomeSioCheck()) {
|
||||
@@ -468,7 +468,7 @@ void sub_8081AD4(struct SinglePakConnectScreen *connectScreen)
|
||||
background = &connectScreen->unk9C;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = gUnknown_080E0218[connectScreen->unkFA];
|
||||
@@ -476,11 +476,11 @@ void sub_8081AD4(struct SinglePakConnectScreen *connectScreen)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
CpuFill16(0, &gBgPalette[17], 30);
|
||||
|
||||
|
||||
@@ -160,19 +160,19 @@ void CreateMultipackOutcomeScreen(u8 outcome)
|
||||
background = &outcomeScreen->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(8);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(8);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->unk1E = 0;
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
background->tilemapId = TM_MP_MESSAGE_BOX_UNKNOWN;
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
m4aMPlayAllStop();
|
||||
if (outcome != OUTCOME_CONNECTION_SUCCESS) {
|
||||
m4aSongNumStart(MUS_VS_MISS);
|
||||
|
||||
@@ -190,7 +190,7 @@ void CreateMultiplayerModeSelectScreen(void)
|
||||
background = &modeScreen->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_TA_AND_MP_WHITE_BG;
|
||||
@@ -198,16 +198,16 @@ void CreateMultiplayerModeSelectScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &modeScreen->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk18 = 0;
|
||||
background->unk18 = 0;
|
||||
@@ -217,11 +217,11 @@ void CreateMultiplayerModeSelectScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
m4aSongNumStart(MUS_VS_SELECT_PAK_MODE);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ void StartMultiPakConnect(void)
|
||||
background = &connectScreen->unk9C;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MP_WAIT_CONNECTION;
|
||||
@@ -164,11 +164,11 @@ void StartMultiPakConnect(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
if (gMultiSioStatusFlags & MULTI_SIO_PARENT) {
|
||||
MultiSioStart();
|
||||
|
||||
@@ -180,7 +180,7 @@ void CreateMultiplayerResultsScreen(u8 mode)
|
||||
background = &resultsScreen->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = sResultsScreenBgSelectedCharacters[lang];
|
||||
@@ -188,11 +188,11 @@ void CreateMultiplayerResultsScreen(u8 mode)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
for (; count < 4; count++) {
|
||||
if (gUnknown_030054B4[count] == -1) {
|
||||
|
||||
@@ -205,7 +205,7 @@ void CreateMultiplayerTeamPlayScreen(void)
|
||||
background = &teamPlayScreen->unk210;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(6);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(6);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MP_UNKNOWN_GREEN;
|
||||
@@ -213,16 +213,16 @@ void CreateMultiplayerTeamPlayScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &teamPlayScreen->unk250;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(14);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(14);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MP_UNKNOWN_ORANGE_ZIGZAG;
|
||||
@@ -230,16 +230,16 @@ void CreateMultiplayerTeamPlayScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 0x28;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 0x28;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &teamPlayScreen->unk290;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_UNKNOWN_MESSAGE_BOX_WHITE;
|
||||
@@ -247,16 +247,16 @@ void CreateMultiplayerTeamPlayScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 10;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 10;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &teamPlayScreen->unk2D0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MP_VS_BACKGROUND_TEXT;
|
||||
@@ -264,11 +264,11 @@ void CreateMultiplayerTeamPlayScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
static void sub_805CB34(void)
|
||||
@@ -363,7 +363,7 @@ static void sub_805CC34(void)
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_UNKNOWN_MESSAGE_BOX_WHITE_SMALL;
|
||||
@@ -371,11 +371,11 @@ static void sub_805CC34(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 7;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 7;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
gMultiSioSend.pat0.unk0 = 0x4035;
|
||||
teamPlayScreen->unk317 = 0;
|
||||
@@ -408,7 +408,7 @@ static void sub_805CC34(void)
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_UNKNOWN_MESSAGE_BOX_WHITE_SMALL;
|
||||
@@ -416,11 +416,11 @@ static void sub_805CC34(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1E;
|
||||
background->unk28 = 7;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1E;
|
||||
background->targetTilesY = 7;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
gMultiSioSend.pat0.unk0 = 0x4035;
|
||||
teamPlayScreen->unk317 = 0;
|
||||
|
||||
@@ -163,7 +163,7 @@ static void CreateUI(struct MultiplayerLobbyScreen *lobbyScreen)
|
||||
background = &lobbyScreen->background;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(30);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MP_MESSAGE_BOX_UNKNOWN;
|
||||
@@ -171,11 +171,11 @@ static void CreateUI(struct MultiplayerLobbyScreen *lobbyScreen)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x14;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x14;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
s = &lobbyScreen->chao;
|
||||
s->graphics.dest = VramMalloc(0x38);
|
||||
|
||||
@@ -6399,7 +6399,7 @@ void OptionsInitBackground(Background *background, u32 a, u32 b, u8 tilemapId, u
|
||||
{
|
||||
background->graphics.dest = (void *)BG_CHAR_ADDR(a);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(b);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(b);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = tilemapId;
|
||||
@@ -6407,15 +6407,15 @@ void OptionsInitBackground(Background *background, u32 a, u32 b, u8 tilemapId, u
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = d;
|
||||
background->unk28 = e;
|
||||
background->unk2A = f;
|
||||
background->targetTilesX = d;
|
||||
background->targetTilesY = e;
|
||||
background->paletteOffset = f;
|
||||
background->animFrameCounter = 0;
|
||||
background->animDelayCounter = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(bg_id);
|
||||
background->scrollX = scrollX;
|
||||
background->scrollY = scrollY;
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
// Finds the max unk4 of the item text array
|
||||
|
||||
@@ -589,7 +589,7 @@ void sub_8012548(Player *p)
|
||||
|
||||
void sub_80125BC(Player *p)
|
||||
{
|
||||
if (p->w.flyingDurationCream == 0) {
|
||||
if (p->w.cf.flyingDuration == 0) {
|
||||
if (p->unk64 == 85)
|
||||
m4aSongNumStop(SE_CREAM_FLYING);
|
||||
|
||||
@@ -620,7 +620,7 @@ void sub_8012644(Player *p)
|
||||
PLAYERFN_CHANGE_SHIFT_OFFSETS(p, 6, 14);
|
||||
}
|
||||
|
||||
p->w.flyingDurationCream = CREAM_FLYING_DURATION;
|
||||
p->w.cf.flyingDuration = CREAM_FLYING_DURATION;
|
||||
p->unk61 = 1;
|
||||
p->unk5A = 0;
|
||||
p->unk58 = 0;
|
||||
@@ -630,8 +630,8 @@ void sub_8012644(Player *p)
|
||||
|
||||
void PlayerCB_80126B0(Player *p)
|
||||
{
|
||||
if (p->w.flyingDurationCream != 0) {
|
||||
p->w.flyingDurationCream--;
|
||||
if (p->w.cf.flyingDuration != 0) {
|
||||
p->w.cf.flyingDuration--;
|
||||
|
||||
if (p->unk5C & gPlayerControls.attack) {
|
||||
p->unk64 = 86;
|
||||
@@ -654,7 +654,7 @@ void PlayerCB_80126B0(Player *p)
|
||||
}
|
||||
} else {
|
||||
if ((p->unk5E & gPlayerControls.jump) && (p->speedAirY >= -Q_24_8(0.75))
|
||||
&& (p->w.flyingDurationCream != 0)) {
|
||||
&& (p->w.cf.flyingDuration != 0)) {
|
||||
p->unk61 = 2;
|
||||
}
|
||||
|
||||
@@ -852,7 +852,7 @@ void sub_8012AD0(Player *p)
|
||||
|
||||
void sub_8012B44(Player *p)
|
||||
{
|
||||
if (p->flyingDurationTails == 0) {
|
||||
if (p->w.tf.flyingDuration == 0) {
|
||||
p->unk64 = 90;
|
||||
m4aSongNumStop(SE_TAILS_PROPELLER_FLYING);
|
||||
} else {
|
||||
@@ -880,7 +880,7 @@ void sub_8012BC0(Player *p)
|
||||
PLAYERFN_CHANGE_SHIFT_OFFSETS(p, 6, 14);
|
||||
}
|
||||
|
||||
p->flyingDurationTails = TAILS_FLYING_DURATION;
|
||||
p->w.tf.flyingDuration = TAILS_FLYING_DURATION;
|
||||
p->unk61 = 1;
|
||||
p->unk5A = 0;
|
||||
p->unk58 = 0;
|
||||
@@ -893,8 +893,8 @@ void PlayerCB_8012C2C(Player *p)
|
||||
{
|
||||
// Only decrease Tails' counter every 2nd frame, giving him 8 seconds of flight.
|
||||
// ...why didn't they just set his timer to a bigger value?
|
||||
if ((gStageTime & 0x1) && (p->flyingDurationTails != 0)) {
|
||||
p->flyingDurationTails--;
|
||||
if ((gStageTime & 0x1) && (p->w.tf.flyingDuration != 0)) {
|
||||
p->w.tf.flyingDuration--;
|
||||
}
|
||||
|
||||
if (p->unk61 != 1) {
|
||||
@@ -909,7 +909,7 @@ void PlayerCB_8012C2C(Player *p)
|
||||
}
|
||||
} else {
|
||||
if ((p->unk5E & gPlayerControls.jump) && (p->speedAirY >= -Q_24_8(0.75))
|
||||
&& (p->flyingDurationTails != 0)) {
|
||||
&& (p->w.tf.flyingDuration != 0)) {
|
||||
p->unk61 = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "game/heart_particles_effect.h"
|
||||
#include "game/stage/music_manager.h"
|
||||
|
||||
#include "game/game_6.h"
|
||||
#include "game/boost_effect.h" // incl. CreateBoostModeParticles
|
||||
#include "game/dust_effect_braking.h" // CreateSpindashDustEffect
|
||||
#include "game/dust_effect_spindash.h" // CreateSpindashDustEffect
|
||||
@@ -46,10 +47,6 @@ extern void sub_8015BD4(u16);
|
||||
extern void Task_801F214(void);
|
||||
extern void sub_801F488(void);
|
||||
|
||||
extern s32 sub_802195C(Player *p, u8 *p1, s32 *out);
|
||||
extern s32 sub_8021A34(Player *p, u8 *p1, s32 *out);
|
||||
extern s32 sub_8021B08(Player *p, u8 *p1, s32 *out);
|
||||
|
||||
extern s32 sub_8022F58(u8, Player *);
|
||||
extern void sub_8022190(Player *);
|
||||
extern void sub_8022218(Player *);
|
||||
@@ -435,7 +432,7 @@ void PlayerCB_8025A0C(Player *p)
|
||||
PLAYERFN_CHANGE_SHIFT_OFFSETS(p, 6, 9);
|
||||
|
||||
p->moveState |= MOVESTATE_4;
|
||||
p->unk99 = 0;
|
||||
p->unk99[0] = 0;
|
||||
PLAYERFN_SET_AND_CALL(PlayerCB_8025AB8, p);
|
||||
}
|
||||
}
|
||||
@@ -449,8 +446,8 @@ void PlayerCB_8025AB8(Player *p)
|
||||
== MOVESTATE_800) {
|
||||
sub_802A360(p);
|
||||
} else {
|
||||
if (p->unk99 != 0) {
|
||||
p->unk99--;
|
||||
if (p->unk99[0] != 0) {
|
||||
p->unk99[0]--;
|
||||
} else if (!sub_8029E6C(p)) {
|
||||
if (p->unk2A == 0) {
|
||||
u16 dpadSideways = (p->unk5C & (DPAD_LEFT | DPAD_RIGHT));
|
||||
@@ -1229,7 +1226,7 @@ void PlayerCB_8026F10(Player *p)
|
||||
|
||||
p->moveState |= MOVESTATE_4;
|
||||
|
||||
p->unk99 = 30;
|
||||
p->unk99[0] = 30;
|
||||
|
||||
PLAYERFN_SET_AND_CALL(PlayerCB_8025AB8, p);
|
||||
}
|
||||
@@ -1425,7 +1422,7 @@ void PlayerCB_GoalSlowdown(Player *p)
|
||||
u32 playerX = Q_24_8_TO_INT(p->x);
|
||||
u16 playerX2;
|
||||
|
||||
playerX2 = playerX - gUnknown_030054D0;
|
||||
playerX2 = playerX - gStageGoalX;
|
||||
|
||||
if (((p->speedGroundX >= Q_24_8(2.0)) && (p->unk5E & DPAD_LEFT))
|
||||
|| (playerX2 > 0x579)) {
|
||||
@@ -1483,8 +1480,8 @@ void PlayerCB_GoalBrake(Player *p)
|
||||
p->speedGroundX = 0;
|
||||
m4aSongNumStop(SE_LONG_BRAKE);
|
||||
|
||||
if (gUnknown_030054D0 != 0) {
|
||||
u16 playerX = Q_24_8_TO_INT(p->x) - gUnknown_030054D0;
|
||||
if (gStageGoalX != 0) {
|
||||
u16 playerX = Q_24_8_TO_INT(p->x) - gStageGoalX;
|
||||
s32 r8 = 0;
|
||||
|
||||
if (playerX <= 730)
|
||||
@@ -1497,7 +1494,8 @@ void PlayerCB_GoalBrake(Player *p)
|
||||
if (r8 != 0) {
|
||||
INCREMENT_SCORE(r8);
|
||||
|
||||
sub_801F3A4(Q_24_8_TO_INT(p->x), Q_24_8_TO_INT(p->y), r8);
|
||||
CreateStageGoalBonusPointsAnim(Q_24_8_TO_INT(p->x),
|
||||
Q_24_8_TO_INT(p->y), r8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1668,7 +1666,7 @@ void PlayerCB_8027D3C(Player *p)
|
||||
s8 *someSio = gUnknown_030054B4;
|
||||
s32 sioDat = ((REG_SIOCNT_32 << 26) >> 30);
|
||||
u16 r8 = someSio[sioDat];
|
||||
u32 *pCmpX = &gUnknown_030054D0;
|
||||
u32 *pCmpX = &gStageGoalX;
|
||||
u32 cmpX;
|
||||
s32 index = (0x40 + (r8 * 32));
|
||||
|
||||
@@ -2596,10 +2594,9 @@ void sub_8029990(Player *p)
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: Proc type should be the same as sub_8021604!
|
||||
void sub_80299F0(u32 character, u32 level, u32 p2, Player *p)
|
||||
void CallSetStageSpawnPos(u32 character, u32 level, u32 p2, Player *p)
|
||||
{
|
||||
sub_8021604(character, level, p2, p);
|
||||
SetStageSpawnPos(character, level, p2, p);
|
||||
}
|
||||
|
||||
void sub_80299FC(Player *p)
|
||||
@@ -2746,8 +2743,6 @@ s32 sub_8029B58(Player *p, u8 *p1, int *out)
|
||||
{
|
||||
s32 result;
|
||||
|
||||
u8 dummy;
|
||||
|
||||
if (GRAVITY_IS_INVERTED) {
|
||||
result = sub_8029B0C(p, p1, out);
|
||||
} else {
|
||||
@@ -2761,8 +2756,6 @@ s32 sub_8029B88(Player *p, u8 *p1, int *out)
|
||||
{
|
||||
s32 result;
|
||||
|
||||
u8 dummy;
|
||||
|
||||
if (GRAVITY_IS_INVERTED) {
|
||||
result = sub_8029AC0(p, p1, out);
|
||||
} else {
|
||||
@@ -2772,6 +2765,7 @@ s32 sub_8029B88(Player *p, u8 *p1, int *out)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Very similar to sub_802195C
|
||||
s32 sub_8029BB8(Player *p, u8 *p1, s32 *out)
|
||||
{
|
||||
u8 dummy;
|
||||
|
||||
@@ -183,12 +183,12 @@ void InitSpecialStageScreenVram(void)
|
||||
gUnknown_03005B58 = NULL;
|
||||
}
|
||||
|
||||
void sub_806CEC4(Background *background, u32 a, u32 b, u8 assetId, u16 d, u16 e, u16 f,
|
||||
u8 bg_id, u16 scrollX, u16 scrollY)
|
||||
void sub_806CEC4(Background *background, u32 a, u32 b, u8 assetId, u16 d, u16 e,
|
||||
u16 palOffset, u8 bg_id, u16 scrollX, u16 scrollY)
|
||||
{
|
||||
background->graphics.dest = (void *)BG_CHAR_ADDR(a);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(b);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(b);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = assetId;
|
||||
@@ -196,15 +196,15 @@ void sub_806CEC4(Background *background, u32 a, u32 b, u8 assetId, u16 d, u16 e,
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = d;
|
||||
background->unk28 = e;
|
||||
background->unk2A = f;
|
||||
background->targetTilesX = d;
|
||||
background->targetTilesY = e;
|
||||
background->paletteOffset = palOffset;
|
||||
background->animFrameCounter = 0;
|
||||
background->animDelayCounter = 0;
|
||||
background->flags = (bg_id);
|
||||
background->scrollX = scrollX;
|
||||
background->scrollY = scrollY;
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
|
||||
s16 MaxSpriteSize(const struct UNK_80DF670 *spriteConfig)
|
||||
|
||||
@@ -8,38 +8,38 @@
|
||||
#include "constants/tilemaps.h"
|
||||
#include "constants/zones.h"
|
||||
|
||||
extern struct Backgrounds gUnknown_03005850;
|
||||
extern const Background gUnknown_080D5864[4];
|
||||
extern struct Backgrounds gStageBackgroundsRam;
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
void CreateStageBg_Zone1(void)
|
||||
{
|
||||
Background *background = &gUnknown_03005850.unk0;
|
||||
Background *background = &gStageBackgroundsRam.unk0;
|
||||
gDispCnt |= 0x100;
|
||||
gBgCntRegs[0] = 0x1B0F;
|
||||
|
||||
if (gGameMode != GAME_MODE_MULTI_PLAYER_COLLECT_RINGS) {
|
||||
const Background *templates = gUnknown_080D5864;
|
||||
const Background *templates = gStageCameraBgTemplates;
|
||||
memcpy(background, &templates[3], 0x40);
|
||||
|
||||
background->tilemapId = TM_STAGE_1_BG_0_COPY;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(27);
|
||||
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
} else {
|
||||
const Background *templates = gUnknown_080D5864;
|
||||
const Background *templates = gStageCameraBgTemplates;
|
||||
memcpy(background, &templates[3], 0x40);
|
||||
background->tilemapId = TM_LEVEL_BG(LEVEL_INDEX(ZONE_1, ACT_1));
|
||||
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(27);
|
||||
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x1E;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x1E;
|
||||
}
|
||||
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
gBgScrollRegs[0][0] = 0;
|
||||
gBgScrollRegs[0][1] = 0;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "game/game.h"
|
||||
#include "game/stage/background/callbacks.h"
|
||||
|
||||
extern const Background gUnknown_080D5864[4];
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
// TODO: make this static!
|
||||
extern const u8 gUnknown_080D5B20[16][3];
|
||||
@@ -95,18 +95,18 @@ const u8 gUnknown_080D5B50[DISPLAY_HEIGHT] = {
|
||||
|
||||
void CreateStageBg_Zone3(void)
|
||||
{
|
||||
Background *background = &gUnknown_03005850.unk0;
|
||||
Background *background = &gStageBackgroundsRam.unk0;
|
||||
gDispCnt |= 0x100;
|
||||
gBgCntRegs[0] = 0x1B0F;
|
||||
|
||||
*background = gUnknown_080D5864[3];
|
||||
*background = gStageCameraBgTemplates[3];
|
||||
|
||||
background->tilemapId = 0x171;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
sub_8002A3C(background);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
InitBackground(background);
|
||||
|
||||
gBgScrollRegs[0][0] = 0;
|
||||
gBgScrollRegs[0][1] = 0;
|
||||
|
||||
@@ -7,23 +7,23 @@
|
||||
|
||||
#include "constants/tilemaps.h"
|
||||
|
||||
extern const Background gUnknown_080D5864[4];
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
void CreateStageBg_Zone4(void)
|
||||
{
|
||||
Background *background = &gUnknown_03005850.unk0;
|
||||
Background *background = &gStageBackgroundsRam.unk0;
|
||||
const Background *templates;
|
||||
gBgCntRegs[0] = 0x1B0F;
|
||||
|
||||
*background = gUnknown_080D5864[3];
|
||||
*background = gStageCameraBgTemplates[3];
|
||||
|
||||
background->tilemapId = TM_SPOTLIGHT_SNOW;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->flags = BACKGROUND_UPDATE_PALETTE | BACKGROUND_FLAGS_BG_ID(3);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
gBgScrollRegs[0][0] = 0;
|
||||
gBgScrollRegs[0][1] = 0;
|
||||
@@ -68,8 +68,8 @@ void StageBgUpdate_Zone4Acts12(s32 a, s32 b)
|
||||
gBldRegs.bldAlpha = 0xc0c;
|
||||
}
|
||||
|
||||
sub_8002A3C(&gUnknown_03005850.unk0);
|
||||
UpdateBgAnimationTiles(&gUnknown_03005850.unk0);
|
||||
InitBackground(&gStageBackgroundsRam.unk0);
|
||||
UpdateBgAnimationTiles(&gStageBackgroundsRam.unk0);
|
||||
|
||||
if (!(gStageTime & 0xF)) {
|
||||
gBgScrollRegs[0][0] = (gBgScrollRegs[0][0] - 1) & 0xff;
|
||||
|
||||
@@ -5,21 +5,21 @@
|
||||
|
||||
#include "constants/tilemaps.h"
|
||||
|
||||
extern const Background gUnknown_080D5864[4];
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
void CreateStageBg_Zone5(void)
|
||||
{
|
||||
Background *background = &gUnknown_03005850.unk0;
|
||||
Background *background = &gStageBackgroundsRam.unk0;
|
||||
if (IS_SINGLE_PLAYER) {
|
||||
gDispCnt |= 0x100;
|
||||
gBgCntRegs[0] = 0x1b0c;
|
||||
*background = gUnknown_080D5864[3];
|
||||
*background = gStageCameraBgTemplates[3];
|
||||
background->tilemapId = TM_SKY_CANYON_CLOUDS_FOREGROUND;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
sub_8002A3C(background);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(27);
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
InitBackground(background);
|
||||
}
|
||||
gBgScrollRegs[0][0] = 0;
|
||||
gBgScrollRegs[0][1] = 0;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "constants/tilemaps.h"
|
||||
|
||||
extern const Background gUnknown_080D5864[4];
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
void CreateStageBg_Zone6_Boss(void);
|
||||
|
||||
@@ -74,7 +74,7 @@ void CreateStageBg_Zone6_Acts(void)
|
||||
|
||||
void CreateStageBg_Zone6_Boss(void)
|
||||
{
|
||||
Background *background = &gUnknown_03005850.unk0;
|
||||
Background *background = &gStageBackgroundsRam.unk0;
|
||||
gDispCnt |= DISPCNT_BG0_ON;
|
||||
gBgCntRegs[0] = 0x1a0f;
|
||||
gUnknown_03004D80[0] = 0;
|
||||
@@ -88,12 +88,12 @@ void CreateStageBg_Zone6_Boss(void)
|
||||
gBgScrollRegs[3][0] = 0;
|
||||
gBgScrollRegs[3][1] = 0;
|
||||
|
||||
*background = gUnknown_080D5864[3];
|
||||
*background = gStageCameraBgTemplates[3];
|
||||
background->tilemapId = TM_TECHNO_BASE_BG_CIRCUIT_MASK;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(26);
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(26);
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
}
|
||||
@@ -27,22 +27,22 @@ static const u16 sPalette_Zone7BgCeiling[16] = INCBIN_U16("graphics/080D5C82.gba
|
||||
|
||||
void CreateStageBg_Zone7(void)
|
||||
{
|
||||
Background *bg = &gUnknown_03005850.unk0;
|
||||
Background *bg = &gStageBackgroundsRam.unk0;
|
||||
const Background *src;
|
||||
gDispCnt = DISPCNT_OBJ_ON | DISPCNT_BG2_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_1D_MAP
|
||||
| DISPCNT_MODE_0;
|
||||
|
||||
gBgCntRegs[0] = 0x160F;
|
||||
|
||||
src = gUnknown_080D5864;
|
||||
src = gStageCameraBgTemplates;
|
||||
memcpy(bg, &src[3], sizeof(Background));
|
||||
|
||||
bg->tilemapId = TM_UNK_SPACE_BG;
|
||||
bg->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
bg->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
bg->unk26 = 32;
|
||||
bg->unk28 = 20;
|
||||
sub_8002A3C(bg);
|
||||
bg->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
bg->targetTilesX = 32;
|
||||
bg->targetTilesY = 20;
|
||||
InitBackground(bg);
|
||||
|
||||
gBgCntRegs[3] &= ~BGCNT_PRIORITY(3);
|
||||
gBgCntRegs[3] |= BGCNT_PRIORITY(3);
|
||||
|
||||
@@ -23,23 +23,23 @@ void CreateStageBg_ZoneFinal_0(void)
|
||||
gUnknown_03002280[2][2] = 0xFF;
|
||||
gUnknown_03002280[2][3] = 0x20;
|
||||
|
||||
bgDst = &gUnknown_03005850.unk80;
|
||||
bgDst = &gStageBackgroundsRam.unk80;
|
||||
gBgCntRegs[2]
|
||||
= BGCNT_SCREENBASE(26) | BGCNT_256COLOR | BGCNT_CHARBASE(2) | BGCNT_PRIORITY(1);
|
||||
bgSrc = gUnknown_080D5864;
|
||||
bgSrc = gStageCameraBgTemplates;
|
||||
memcpy(bgDst, &bgSrc[2], sizeof(Background));
|
||||
|
||||
bgDst->tilemapId = TM_EXTRA_BOSS_COCKPIT;
|
||||
bgDst->graphics.dest = (void *)BG_CHAR_ADDR(2);
|
||||
|
||||
// TODO: Should this be a different macro?
|
||||
bgDst->tilesVram = (void *)BG_TILE_ADDR(416);
|
||||
bgDst->unk26 = 10;
|
||||
bgDst->unk28 = 9;
|
||||
bgDst->layoutVram = (void *)BG_TILE_ADDR(416);
|
||||
bgDst->targetTilesX = 10;
|
||||
bgDst->targetTilesY = 9;
|
||||
bgDst->flags |= BACKGROUND_FLAG_4;
|
||||
sub_8002A3C(bgDst);
|
||||
InitBackground(bgDst);
|
||||
|
||||
bgDst = &gUnknown_03005850.unk0;
|
||||
bgDst = &gStageBackgroundsRam.unk0;
|
||||
gBgCntRegs[0]
|
||||
= BGCNT_SCREENBASE(30) | BGCNT_16COLOR | BGCNT_CHARBASE(1) | BGCNT_PRIORITY(3);
|
||||
|
||||
@@ -49,11 +49,11 @@ void CreateStageBg_ZoneFinal_0(void)
|
||||
bgDst->graphics.dest = (void *)BG_CHAR_ADDR(1);
|
||||
|
||||
// TODO: Should this be a different macro?
|
||||
bgDst->tilesVram = (void *)BG_TILE_ADDR(480);
|
||||
bgDst->unk26 = 32;
|
||||
bgDst->unk28 = 20;
|
||||
bgDst->layoutVram = (void *)BG_TILE_ADDR(480);
|
||||
bgDst->targetTilesX = 32;
|
||||
bgDst->targetTilesY = 20;
|
||||
bgDst->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(bgDst);
|
||||
InitBackground(bgDst);
|
||||
|
||||
gBgScrollRegs[0][0] = 0;
|
||||
gBgScrollRegs[0][1] = 0;
|
||||
|
||||
+96
-99
@@ -18,11 +18,13 @@
|
||||
extern const CameraMain sStageBgUpdateFuncs[];
|
||||
extern const u32 *gCollisionTable[NUM_LEVEL_IDS];
|
||||
|
||||
void sub_802C668(s32 *, s32 *);
|
||||
static void sub_801C708(s32, s32);
|
||||
void Task_801E0A8(void);
|
||||
void TaskDestructor_801E040(struct Task *);
|
||||
|
||||
const Background gUnknown_080D5864[4] = {
|
||||
#define BOSS_CAM_FRAME_DELTA_PIXELS 5
|
||||
|
||||
const Background gStageCameraBgTemplates[4] = {
|
||||
{
|
||||
.graphics = {
|
||||
.src = NULL,
|
||||
@@ -30,10 +32,10 @@ const Background gUnknown_080D5864[4] = {
|
||||
.size = 0,
|
||||
.anim = 0,
|
||||
},
|
||||
.tilesVram = (void*)BG_SCREEN_ADDR(30),
|
||||
.unk10 = NULL,
|
||||
.unk14 = 0,
|
||||
.unk16 = 0,
|
||||
.layoutVram = (void*)BG_SCREEN_ADDR(30),
|
||||
.layout = NULL,
|
||||
.xTiles = 0,
|
||||
.yTiles = 0,
|
||||
.unk18 = 0,
|
||||
.unk1A = 0,
|
||||
.tilemapId = 0,
|
||||
@@ -41,12 +43,11 @@ const Background gUnknown_080D5864[4] = {
|
||||
.unk20 = 0,
|
||||
.unk22 = 0,
|
||||
.unk24 = 0,
|
||||
.unk26 = 31,
|
||||
.unk28 = 21,
|
||||
.unk2A = 0,
|
||||
.targetTilesX = (DISPLAY_WIDTH / TILE_WIDTH) + 1,
|
||||
.targetTilesY = (DISPLAY_HEIGHT / TILE_WIDTH) + 1,
|
||||
.paletteOffset = 0,
|
||||
.animFrameCounter = 0,
|
||||
.animDelayCounter = 0,
|
||||
.unk2D = 0,
|
||||
.flags = BACKGROUND_FLAG_IS_LEVEL_MAP | BACKGROUND_FLAG_20 | BACKGROUND_UPDATE_PALETTE | BACKGROUND_UPDATE_GRAPHICS | BACKGROUND_FLAGS_BG_ID(1),
|
||||
.scrollX = 0,
|
||||
.scrollY = 0,
|
||||
@@ -63,10 +64,10 @@ const Background gUnknown_080D5864[4] = {
|
||||
.size = 0,
|
||||
.anim = 0,
|
||||
},
|
||||
.tilesVram = (void*)BG_SCREEN_ADDR(31),
|
||||
.unk10 = NULL,
|
||||
.unk14 = 0,
|
||||
.unk16 = 0,
|
||||
.layoutVram = (void*)BG_SCREEN_ADDR(31),
|
||||
.layout = NULL,
|
||||
.xTiles = 0,
|
||||
.yTiles = 0,
|
||||
.unk18 = 0,
|
||||
.unk1A = 0,
|
||||
.tilemapId = 0,
|
||||
@@ -74,12 +75,11 @@ const Background gUnknown_080D5864[4] = {
|
||||
.unk20 = 0,
|
||||
.unk22 = 0,
|
||||
.unk24 = 0,
|
||||
.unk26 = 31,
|
||||
.unk28 = 21,
|
||||
.unk2A = 0,
|
||||
.targetTilesX = (DISPLAY_WIDTH / TILE_WIDTH) + 1,
|
||||
.targetTilesY = (DISPLAY_HEIGHT / TILE_WIDTH) + 1,
|
||||
.paletteOffset = 0,
|
||||
.animFrameCounter = 0,
|
||||
.animDelayCounter = 0,
|
||||
.unk2D = 0,
|
||||
.flags = BACKGROUND_FLAG_IS_LEVEL_MAP | BACKGROUND_FLAG_20 | BACKGROUND_FLAGS_BG_ID(2),
|
||||
.scrollX = 0,
|
||||
.scrollY = 0,
|
||||
@@ -96,10 +96,10 @@ const Background gUnknown_080D5864[4] = {
|
||||
.size = 0,
|
||||
.anim = 0,
|
||||
},
|
||||
.tilesVram = (void*)BG_SCREEN_ADDR(29),
|
||||
.unk10 = NULL,
|
||||
.unk14 = 0,
|
||||
.unk16 = 0,
|
||||
.layoutVram = (void*)BG_SCREEN_ADDR(29),
|
||||
.layout = NULL,
|
||||
.xTiles = 0,
|
||||
.yTiles = 0,
|
||||
.unk18 = 0,
|
||||
.unk1A = 0,
|
||||
.tilemapId = 0,
|
||||
@@ -107,12 +107,11 @@ const Background gUnknown_080D5864[4] = {
|
||||
.unk20 = 0,
|
||||
.unk22 = 0,
|
||||
.unk24 = 0,
|
||||
.unk26 = 32,
|
||||
.unk28 = 32,
|
||||
.unk2A = 0,
|
||||
.targetTilesX = 32,
|
||||
.targetTilesY = 32,
|
||||
.paletteOffset = 0,
|
||||
.animFrameCounter = 0,
|
||||
.animDelayCounter = 0,
|
||||
.unk2D = 0,
|
||||
.flags = BACKGROUND_UPDATE_PALETTE | BACKGROUND_FLAGS_BG_ID(3),
|
||||
.scrollX = 0,
|
||||
.scrollY = 0,
|
||||
@@ -125,14 +124,14 @@ const Background gUnknown_080D5864[4] = {
|
||||
{
|
||||
.graphics = {
|
||||
.src = NULL,
|
||||
.dest = (void*)0x600C000,
|
||||
.dest = (void*)BG_CHAR_ADDR(3),
|
||||
.size = 0,
|
||||
.anim = 0,
|
||||
},
|
||||
.tilesVram = (void*)BG_SCREEN_ADDR(28),
|
||||
.unk10 = NULL,
|
||||
.unk14 = 0,
|
||||
.unk16 = 0,
|
||||
.layoutVram = (void*)BG_SCREEN_ADDR(28),
|
||||
.layout = NULL,
|
||||
.xTiles = 0,
|
||||
.yTiles = 0,
|
||||
.unk18 = 0,
|
||||
.unk1A = 0,
|
||||
.tilemapId = 0,
|
||||
@@ -140,12 +139,11 @@ const Background gUnknown_080D5864[4] = {
|
||||
.unk20 = 0,
|
||||
.unk22 = 0,
|
||||
.unk24 = 0,
|
||||
.unk26 = 32,
|
||||
.unk28 = 32,
|
||||
.unk2A = 0,
|
||||
.targetTilesX = 32,
|
||||
.targetTilesY = 32,
|
||||
.paletteOffset = 0,
|
||||
.animFrameCounter = 0,
|
||||
.animDelayCounter = 0,
|
||||
.unk2D = 0,
|
||||
.flags = BACKGROUND_UPDATE_PALETTE | BACKGROUND_FLAGS_BG_ID(0),
|
||||
.scrollX = 0,
|
||||
.scrollY = 0,
|
||||
@@ -161,7 +159,7 @@ const u16 gUnknown_080D5964[][2]
|
||||
= { { 32, 216 }, { 32, 204 }, { 32, 216 }, { 32, 208 }, { 32, 208 },
|
||||
{ 32, 232 }, { 32, 264 }, { 32, 264 }, { 32, 264 } };
|
||||
|
||||
static const VoidFn sStageInitProcedures[] = {
|
||||
static const VoidFn sStageBgInitProcedures[] = {
|
||||
[LEVEL_INDEX(ZONE_1, ACT_1)] = CreateStageBg_Zone1,
|
||||
[LEVEL_INDEX(ZONE_1, ACT_2)] = CreateStageBg_Zone1,
|
||||
[LEVEL_INDEX(ZONE_1, ACT_BOSS)] = CreateStageBg_Zone1,
|
||||
@@ -253,40 +251,40 @@ static const CameraMain sStageBgUpdateFuncs[NUM_LEVEL_IDS] = {
|
||||
};
|
||||
|
||||
static const s8 gUnknown_080D5A98[NUM_LEVEL_IDS][4] = {
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x40, 0x20, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x20, 0x40, 0x02, 0x1C }, //
|
||||
{ 0x20, 0x20, 0x02, 0x1D }, //
|
||||
{ 0x40, 0x20, 0x02, 0x1C }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 64, 32, 2, 28 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 28 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 28 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 32, 64, 2, 28 }, //
|
||||
{ 32, 32, 2, 29 }, //
|
||||
{ 64, 32, 2, 28 }, //
|
||||
};
|
||||
|
||||
void InitCamera(u32 level)
|
||||
@@ -300,33 +298,35 @@ void InitCamera(u32 level)
|
||||
const s8 *unkA98 = gUnknown_080D5A98[level];
|
||||
|
||||
gDispCnt = 0x3E40;
|
||||
if (level == 0x1D) {
|
||||
if (level == LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
|
||||
gDispCnt = 0x3741;
|
||||
}
|
||||
|
||||
gBgCntRegs[1] = 0x1E01;
|
||||
gBgCntRegs[2] = 0x1F02;
|
||||
gBgCntRegs[1]
|
||||
= (BGCNT_SCREENBASE(30) | BGCNT_16COLOR | BGCNT_CHARBASE(0) | BGCNT_PRIORITY(1));
|
||||
gBgCntRegs[2]
|
||||
= (BGCNT_SCREENBASE(31) | BGCNT_16COLOR | BGCNT_CHARBASE(0) | BGCNT_PRIORITY(2));
|
||||
temp = ((unkA98[0] + 0x1F) >> 6 | ((unkA98[1] + 0x1F) >> 6) << 1) << 0xE;
|
||||
gBgCntRegs[3] = temp | 3 | (unkA98[3] << 8) | (unkA98[2] << 2);
|
||||
|
||||
if (level == 0x1D) {
|
||||
if (level == LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
|
||||
gDispCnt = 0x3641;
|
||||
}
|
||||
|
||||
bgs = &gUnknown_03005850;
|
||||
memcpy(&gUnknown_03005850.unk40, &gUnknown_080D5864[0], 0x40);
|
||||
bgs = &gStageBackgroundsRam;
|
||||
memcpy(&gStageBackgroundsRam.unk40, &gStageCameraBgTemplates[0], sizeof(Background));
|
||||
bgs->unk40.tilemapId = TM_LEVEL_METATILES_0(level);
|
||||
|
||||
memcpy(&gUnknown_03005850.unk80, &gUnknown_080D5864[1], 0x40);
|
||||
memcpy(&gStageBackgroundsRam.unk80, &gStageCameraBgTemplates[1], sizeof(Background));
|
||||
bgs->unk80.tilemapId = TM_LEVEL_METATILES_1(level);
|
||||
|
||||
memcpy(&gUnknown_03005850.unkC0, &gUnknown_080D5864[2], 0x40);
|
||||
memcpy(&gStageBackgroundsRam.unkC0, &gStageCameraBgTemplates[2], sizeof(Background));
|
||||
bgs->unkC0.tilemapId = TM_LEVEL_BG(level);
|
||||
|
||||
bgs->unkC0.graphics.dest = (void *)BG_CHAR_ADDR(unkA98[2]);
|
||||
bgs->unkC0.tilesVram = (void *)BG_SCREEN_ADDR(unkA98[3]);
|
||||
bgs->unkC0.unk26 = unkA98[0];
|
||||
bgs->unkC0.unk28 = unkA98[1];
|
||||
bgs->unkC0.layoutVram = (void *)BG_SCREEN_ADDR(unkA98[3]);
|
||||
bgs->unkC0.targetTilesX = unkA98[0];
|
||||
bgs->unkC0.targetTilesY = unkA98[1];
|
||||
|
||||
gUnknown_03004D80[1] = 0;
|
||||
gUnknown_03002280[1][0] = 0;
|
||||
@@ -344,10 +344,10 @@ void InitCamera(u32 level)
|
||||
bgs->unk80.flags |= BACKGROUND_UPDATE_ANIMATIONS | BACKGROUND_UPDATE_GRAPHICS;
|
||||
}
|
||||
|
||||
if (level != 0x1D) {
|
||||
sub_8002A3C(&bgs->unk40);
|
||||
sub_8002A3C(&bgs->unk80);
|
||||
sub_8002A3C(&bgs->unkC0);
|
||||
if (level != LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
|
||||
InitBackground(&bgs->unk40);
|
||||
InitBackground(&bgs->unk80);
|
||||
InitBackground(&bgs->unkC0);
|
||||
}
|
||||
|
||||
if (gGameMode != GAME_MODE_MULTI_PLAYER_COLLECT_RINGS) {
|
||||
@@ -362,9 +362,10 @@ void InitCamera(u32 level)
|
||||
camera->unk34 = gUnknown_030059C8[7];
|
||||
|
||||
if (((gCurrentLevel & ACTS_PER_ZONE) == ACT_BOSS)
|
||||
|| ((gCurrentLevel == 0x1C) && (gUnknown_030054B0 == 0))
|
||||
|| (gCurrentLevel == 0x1D)) {
|
||||
if (gCurrentLevel == 0x1D) {
|
||||
|| ((gCurrentLevel == LEVEL_INDEX(ZONE_FINAL, ACT_XX_FINAL_ZONE))
|
||||
&& (gUnknown_030054B0 == 0))
|
||||
|| (gCurrentLevel == LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53))) {
|
||||
if (gCurrentLevel == LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
|
||||
sub_802C668(&player->x, &player->y);
|
||||
gUnknown_03005440 = gUnknown_080D5964[LEVEL_TO_ZONE(0x20)][0];
|
||||
gUnknown_030054BC = gUnknown_080D5964[LEVEL_TO_ZONE(0x20)][1];
|
||||
@@ -418,15 +419,11 @@ void InitCamera(u32 level)
|
||||
|
||||
camera->unk58 = sStageBgUpdateFuncs[level];
|
||||
|
||||
if (sStageInitProcedures[level] != NULL) {
|
||||
sStageInitProcedures[level]();
|
||||
if (sStageBgInitProcedures[level] != NULL) {
|
||||
sStageBgInitProcedures[level]();
|
||||
}
|
||||
}
|
||||
|
||||
void sub_801C708(s32, s32);
|
||||
|
||||
#define BOSS_CAM_FRAME_DELTA_PIXELS 5
|
||||
|
||||
void UpdateCamera(void)
|
||||
{
|
||||
Player *player = &gPlayer;
|
||||
@@ -606,23 +603,23 @@ void UpdateCamera(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_801C708(s32 x, s32 y)
|
||||
static void sub_801C708(s32 x, s32 y)
|
||||
{
|
||||
|
||||
if (gCurrentLevel != LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
|
||||
Background *layer = &gUnknown_03005850.unk40;
|
||||
Background *layer = &gStageBackgroundsRam.unk40;
|
||||
gBgScrollRegs[1][0] = x & 7;
|
||||
gBgScrollRegs[1][1] = y & 7;
|
||||
layer->scrollX = x;
|
||||
layer->scrollY = y;
|
||||
sub_8002A3C(layer);
|
||||
InitBackground(layer);
|
||||
UpdateBgAnimationTiles(layer);
|
||||
|
||||
layer++;
|
||||
layer = &gStageBackgroundsRam.unk80;
|
||||
gBgScrollRegs[2][0] = x & 7;
|
||||
gBgScrollRegs[2][1] = y & 7;
|
||||
layer->scrollX = x;
|
||||
layer->scrollY = y;
|
||||
sub_8002A3C(layer);
|
||||
InitBackground(layer);
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,14 @@
|
||||
#include "task.h"
|
||||
#include "lib/m4a.h"
|
||||
#include "game/game.h"
|
||||
#include "game/stage/collect_ring_effect.h"
|
||||
#include "game/stage/rings_manager.h"
|
||||
|
||||
#include "constants/animations.h"
|
||||
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u8 unk30;
|
||||
u8 bPanSfxLeft;
|
||||
u8 unk31;
|
||||
} RingEffect;
|
||||
|
||||
@@ -18,7 +19,7 @@ extern struct SongHeader se_ring_copy;
|
||||
|
||||
void CreateCollectRingEffect(s16 x, s16 y)
|
||||
{
|
||||
if (gUnknown_0300540C < 8) {
|
||||
if (gActiveCollectRingEffectCount < 8) {
|
||||
struct Task *t
|
||||
= TaskCreate(Task_CollectRingEffect, sizeof(RingEffect), 0x2000, 0, NULL);
|
||||
RingEffect *re = TaskGetStructPtr(t);
|
||||
@@ -40,8 +41,8 @@ void CreateCollectRingEffect(s16 x, s16 y)
|
||||
s->palId = 0;
|
||||
s->unk10 = SPRITE_FLAG(PRIORITY, 2);
|
||||
|
||||
re->unk30 = gRingCount & 1;
|
||||
if (re->unk30) {
|
||||
re->bPanSfxLeft = gRingCount & 1;
|
||||
if (re->bPanSfxLeft) {
|
||||
MPlayStart(&gMPlayInfo_SE2, &se_ring_copy);
|
||||
m4aMPlayImmInit(&gMPlayInfo_SE2);
|
||||
m4aMPlayVolumeControl(&gMPlayInfo_SE2, 0xFFFF, 128);
|
||||
@@ -53,7 +54,7 @@ void CreateCollectRingEffect(s16 x, s16 y)
|
||||
m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, +64);
|
||||
}
|
||||
|
||||
gUnknown_0300540C++;
|
||||
gActiveCollectRingEffectCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +71,7 @@ void Task_CollectRingEffect(void)
|
||||
if (UpdateSpriteAnimation(s) == 0) {
|
||||
DisplaySprite(s);
|
||||
|
||||
gUnknown_0300540C--;
|
||||
gActiveCollectRingEffectCount--;
|
||||
|
||||
TaskDestroy(gCurTask);
|
||||
}
|
||||
|
||||
@@ -149,8 +149,8 @@ void Task_PauseMenuUpdate(void)
|
||||
DmaCopy16(3, pm->pal6A, &(((u16 *)OBJ_PLTT)[249]), sizeof(pm->pal6A));
|
||||
DmaCopy16(3, pm->pal64, &(((u16 *)OBJ_PLTT)[252]), sizeof(pm->pal64));
|
||||
|
||||
if (gUnknown_03005660.unk0 == 1) {
|
||||
u16 *somePalette = TaskGetStructPtr(gUnknown_03005660.t);
|
||||
if (gWater.isActive == TRUE) {
|
||||
u16 *somePalette = TaskGetStructPtr(gWater.t);
|
||||
|
||||
DmaCopy16(3, pm->pal6A, &somePalette[249], sizeof(pm->pal6A));
|
||||
DmaCopy16(3, pm->pal64, &somePalette[252], sizeof(pm->pal64));
|
||||
@@ -159,8 +159,8 @@ void Task_PauseMenuUpdate(void)
|
||||
DmaCopy16(3, pm->pal6A, &(((u16 *)OBJ_PLTT)[252]), sizeof(pm->pal6A));
|
||||
DmaCopy16(3, pm->pal64, &(((u16 *)OBJ_PLTT)[249]), sizeof(pm->pal64));
|
||||
|
||||
if (gUnknown_03005660.unk0 == 1) {
|
||||
u16 *somePalette = TaskGetStructPtr(gUnknown_03005660.t);
|
||||
if (gWater.isActive == TRUE) {
|
||||
u16 *somePalette = TaskGetStructPtr(gWater.t);
|
||||
|
||||
DmaCopy16(3, pm->pal6A, &somePalette[252], sizeof(pm->pal6A));
|
||||
DmaCopy16(3, pm->pal64, &somePalette[249], sizeof(pm->pal64));
|
||||
|
||||
@@ -193,7 +193,7 @@ void sub_8088944(struct TimeAttackLobbyScreen *lobbyScreen)
|
||||
background = &lobbyScreen->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(29);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(29);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_MESSAGE_BOX_BLACK;
|
||||
@@ -201,16 +201,16 @@ void sub_8088944(struct TimeAttackLobbyScreen *lobbyScreen)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x1C;
|
||||
background->unk28 = 0xC;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x1C;
|
||||
background->targetTilesY = 0xC;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &lobbyScreen->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(7);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(7);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_GREEN_CARET;
|
||||
@@ -218,11 +218,11 @@ void sub_8088944(struct TimeAttackLobbyScreen *lobbyScreen)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
transition = &lobbyScreen->unk1A0;
|
||||
transition->unk0 = 1;
|
||||
|
||||
@@ -202,7 +202,7 @@ void CreateTimeAttackModeSelectionScreen(void)
|
||||
background = &modeScreen->unk0;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(20);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_TA_AND_MP_WHITE_BG;
|
||||
@@ -210,16 +210,16 @@ void CreateTimeAttackModeSelectionScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(0);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
background = &modeScreen->unk40;
|
||||
background->graphics.dest = (void *)BG_SCREEN_ADDR(24);
|
||||
background->graphics.anim = 0;
|
||||
background->tilesVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->layoutVram = (void *)BG_SCREEN_ADDR(22);
|
||||
background->unk18 = 0;
|
||||
background->unk1A = 0;
|
||||
background->tilemapId = TM_TA_ORANGE_BG;
|
||||
@@ -227,11 +227,11 @@ void CreateTimeAttackModeSelectionScreen(void)
|
||||
background->unk20 = 0;
|
||||
background->unk22 = 0;
|
||||
background->unk24 = 0;
|
||||
background->unk26 = 0x20;
|
||||
background->unk28 = 0x20;
|
||||
background->unk2A = 0;
|
||||
background->targetTilesX = 0x20;
|
||||
background->targetTilesY = 0x20;
|
||||
background->paletteOffset = 0;
|
||||
background->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(background);
|
||||
InitBackground(background);
|
||||
|
||||
m4aSongNumStart(MUS_TIME_ATTACK_MENU);
|
||||
}
|
||||
|
||||
+50
-50
@@ -412,7 +412,7 @@ static void CreateTitleScreenWithoutIntro(struct TitleScreen *titleScreen)
|
||||
bg0 = &titleScreen->unk0;
|
||||
bg0->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
bg0->graphics.anim = 0;
|
||||
bg0->tilesVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->layoutVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->unk18 = 0;
|
||||
bg0->unk1A = SPRITE_OAM_ORDER(0);
|
||||
if (gLoadedSaveGame->language < 2) {
|
||||
@@ -424,12 +424,12 @@ static void CreateTitleScreenWithoutIntro(struct TitleScreen *titleScreen)
|
||||
bg0->unk20 = 0;
|
||||
bg0->unk22 = 0;
|
||||
bg0->unk24 = 0;
|
||||
bg0->unk26 = 0x1a;
|
||||
bg0->unk28 = 10;
|
||||
bg0->unk2A = 0;
|
||||
bg0->targetTilesX = 26;
|
||||
bg0->targetTilesY = 10;
|
||||
bg0->paletteOffset = 0;
|
||||
bg0->flags = BACKGROUND_FLAG_4 | BACKGROUND_FLAGS_BG_ID(2);
|
||||
|
||||
sub_8002A3C(bg0);
|
||||
InitBackground(bg0);
|
||||
|
||||
gDispCnt &= ~DISPCNT_BG0_ON;
|
||||
gDispCnt |= DISPCNT_BG1_ON | DISPCNT_BG2_ON;
|
||||
@@ -442,7 +442,7 @@ static void CreateTitleScreenWithoutIntro(struct TitleScreen *titleScreen)
|
||||
config40 = &titleScreen->unk40;
|
||||
config40->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
config40->graphics.anim = 0;
|
||||
config40->tilesVram = (void *)BG_SCREEN_ADDR(29);
|
||||
config40->layoutVram = (void *)BG_SCREEN_ADDR(29);
|
||||
config40->unk18 = 0;
|
||||
config40->unk1A = 0;
|
||||
config40->tilemapId = TM_TITLE_SCREEN_BG;
|
||||
@@ -450,12 +450,12 @@ static void CreateTitleScreenWithoutIntro(struct TitleScreen *titleScreen)
|
||||
config40->unk20 = 0;
|
||||
config40->unk22 = 0;
|
||||
config40->unk24 = 0;
|
||||
config40->unk26 = 0x20;
|
||||
config40->unk28 = 0x40;
|
||||
config40->unk2A = 0;
|
||||
config40->targetTilesX = 0x20;
|
||||
config40->targetTilesY = 0x40;
|
||||
config40->paletteOffset = 0;
|
||||
config40->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
|
||||
sub_8002A3C(config40);
|
||||
InitBackground(config40);
|
||||
|
||||
m4aSongNumStart(MUS_TITLE_FANFARE);
|
||||
|
||||
@@ -502,7 +502,7 @@ static void InitTitleScreenBackgrounds(struct TitleScreen *titleScreen)
|
||||
|
||||
bg80->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
bg80->graphics.anim = 0;
|
||||
bg80->tilesVram = (void *)BG_SCREEN_ADDR(31);
|
||||
bg80->layoutVram = (void *)BG_SCREEN_ADDR(31);
|
||||
bg80->unk18 = 0;
|
||||
bg80->unk1A = SPRITE_OAM_ORDER(0);
|
||||
bg80->tilemapId = TM_INTRO_PRESENTED_BY_SEGA;
|
||||
@@ -510,18 +510,18 @@ static void InitTitleScreenBackgrounds(struct TitleScreen *titleScreen)
|
||||
bg80->unk20 = 0;
|
||||
bg80->unk22 = 0;
|
||||
bg80->unk24 = 0;
|
||||
bg80->unk26 = 0x1e;
|
||||
bg80->unk28 = 0x14;
|
||||
bg80->unk2A = 0;
|
||||
bg80->targetTilesX = 30;
|
||||
bg80->targetTilesY = 20;
|
||||
bg80->paletteOffset = 0;
|
||||
bg80->flags = 0;
|
||||
|
||||
sub_8002A3C(bg80);
|
||||
InitBackground(bg80);
|
||||
|
||||
bg0 = &titleScreen->unk0;
|
||||
|
||||
bg0->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
bg0->graphics.anim = 0;
|
||||
bg0->tilesVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->layoutVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->unk18 = 0;
|
||||
bg0->unk1A = SPRITE_OAM_ORDER(0);
|
||||
bg0->tilemapId = TM_INTRO_WATER;
|
||||
@@ -529,12 +529,12 @@ static void InitTitleScreenBackgrounds(struct TitleScreen *titleScreen)
|
||||
bg0->unk20 = 0;
|
||||
bg0->unk22 = 0;
|
||||
bg0->unk24 = 0;
|
||||
bg0->unk26 = 0x20;
|
||||
bg0->unk28 = 0x20;
|
||||
bg0->unk2A = 0;
|
||||
bg0->targetTilesX = 32;
|
||||
bg0->targetTilesY = 32;
|
||||
bg0->paletteOffset = 0;
|
||||
bg0->flags = BACKGROUND_FLAG_4 | BACKGROUND_FLAGS_BG_ID(2);
|
||||
|
||||
sub_8002A3C(bg0);
|
||||
InitBackground(bg0);
|
||||
}
|
||||
|
||||
static void InitTitleScreenUI(struct TitleScreen *titleScreen)
|
||||
@@ -687,7 +687,7 @@ static void Task_IntroStartSonicTeamLogoAnim(void)
|
||||
bg = &titleScreen->introSonicLogo;
|
||||
bg->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
bg->graphics.anim = 0;
|
||||
bg->tilesVram = (void *)BG_SCREEN_ADDR(31);
|
||||
bg->layoutVram = (void *)BG_SCREEN_ADDR(31);
|
||||
bg->unk18 = 0;
|
||||
bg->unk1A = 0;
|
||||
bg->tilemapId = TM_INTRO_CREATED_BY_SONIC_TEAM;
|
||||
@@ -695,11 +695,11 @@ static void Task_IntroStartSonicTeamLogoAnim(void)
|
||||
bg->unk20 = 0;
|
||||
bg->unk22 = 0;
|
||||
bg->unk24 = 0;
|
||||
bg->unk26 = 0x1e;
|
||||
bg->unk28 = 0x14;
|
||||
bg->unk2A = 0;
|
||||
bg->targetTilesX = 30;
|
||||
bg->targetTilesY = 20;
|
||||
bg->paletteOffset = 0;
|
||||
bg->flags = 0x10;
|
||||
sub_8002A3C(bg);
|
||||
InitBackground(bg);
|
||||
}
|
||||
|
||||
if (titleScreen->animFrame > 2) {
|
||||
@@ -766,7 +766,7 @@ static void Task_IntroStartSkyTransition(void)
|
||||
config40 = &titleScreen->unk40;
|
||||
config40->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
config40->graphics.anim = 0;
|
||||
config40->tilesVram = (void *)BG_SCREEN_ADDR(29);
|
||||
config40->layoutVram = (void *)BG_SCREEN_ADDR(29);
|
||||
config40->unk18 = 0;
|
||||
config40->unk1A = 0;
|
||||
config40->tilemapId = TM_TITLE_SCREEN_BG;
|
||||
@@ -774,11 +774,11 @@ static void Task_IntroStartSkyTransition(void)
|
||||
config40->unk20 = 0;
|
||||
config40->unk22 = 0;
|
||||
config40->unk24 = 0;
|
||||
config40->unk26 = 0x20;
|
||||
config40->unk28 = 0x40;
|
||||
config40->unk2A = 0;
|
||||
config40->targetTilesX = 0x20;
|
||||
config40->targetTilesY = 0x40;
|
||||
config40->paletteOffset = 0;
|
||||
config40->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(config40);
|
||||
InitBackground(config40);
|
||||
}
|
||||
|
||||
// Once the animation frame is at 140
|
||||
@@ -844,7 +844,7 @@ static void Task_IntroPanSkyAnim(void)
|
||||
bg0 = &titleScreen->unk0;
|
||||
bg0->graphics.dest = (void *)BG_SCREEN_ADDR(8);
|
||||
bg0->graphics.anim = 0;
|
||||
bg0->tilesVram = (void *)BG_SCREEN_ADDR(31);
|
||||
bg0->layoutVram = (void *)BG_SCREEN_ADDR(31);
|
||||
bg0->unk18 = 0;
|
||||
bg0->unk1A = 0;
|
||||
bg0->tilemapId = TM_LENS_FLARE_BG;
|
||||
@@ -852,11 +852,11 @@ static void Task_IntroPanSkyAnim(void)
|
||||
bg0->unk20 = 0;
|
||||
bg0->unk22 = 0;
|
||||
bg0->unk24 = 0;
|
||||
bg0->unk26 = 7;
|
||||
bg0->unk28 = 0x10;
|
||||
bg0->unk2A = 0;
|
||||
bg0->targetTilesX = 7;
|
||||
bg0->targetTilesY = 0x10;
|
||||
bg0->paletteOffset = 0;
|
||||
bg0->flags = 0x10;
|
||||
sub_8002A3C(bg0);
|
||||
InitBackground(bg0);
|
||||
|
||||
gBgScrollRegs[0][1] = 0x4F;
|
||||
gCurTask->main = Task_IntroSkyAnim;
|
||||
@@ -942,7 +942,7 @@ static void Task_IntroSkyAnim(void)
|
||||
|
||||
bg0->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
bg0->graphics.anim = 0;
|
||||
bg0->tilesVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->layoutVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->unk18 = 0;
|
||||
bg0->unk1A = 0;
|
||||
|
||||
@@ -956,12 +956,12 @@ static void Task_IntroSkyAnim(void)
|
||||
bg0->unk20 = 0;
|
||||
bg0->unk22 = 0;
|
||||
bg0->unk24 = 0;
|
||||
bg0->unk26 = 0x1A;
|
||||
bg0->unk28 = 10;
|
||||
bg0->unk2A = 0;
|
||||
bg0->targetTilesX = 0x1A;
|
||||
bg0->targetTilesY = 10;
|
||||
bg0->paletteOffset = 0;
|
||||
bg0->flags = BACKGROUND_FLAG_4 | BACKGROUND_FLAGS_BG_ID(2);
|
||||
|
||||
sub_8002A3C(bg0);
|
||||
InitBackground(bg0);
|
||||
|
||||
gBgCntRegs[2] &= 0xDFFF;
|
||||
gCurTask->main = Task_IntroFadeInTitleScreenAnim;
|
||||
@@ -1351,7 +1351,7 @@ static void Task_ShowTitleScreenIntroSkipped(void)
|
||||
|
||||
bg0->graphics.dest = (void *)BG_SCREEN_ADDR(0);
|
||||
bg0->graphics.anim = 0;
|
||||
bg0->tilesVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->layoutVram = (void *)BG_SCREEN_ADDR(26);
|
||||
bg0->unk18 = 0;
|
||||
bg0->unk1A = 0;
|
||||
|
||||
@@ -1366,16 +1366,16 @@ static void Task_ShowTitleScreenIntroSkipped(void)
|
||||
bg0->unk20 = 0;
|
||||
bg0->unk22 = 0;
|
||||
bg0->unk24 = 0;
|
||||
bg0->unk26 = 0x1A;
|
||||
bg0->unk28 = 10;
|
||||
bg0->unk2A = 0;
|
||||
bg0->targetTilesX = 0x1A;
|
||||
bg0->targetTilesY = 10;
|
||||
bg0->paletteOffset = 0;
|
||||
bg0->flags = BACKGROUND_FLAG_4 | BACKGROUND_FLAGS_BG_ID(2);
|
||||
sub_8002A3C(bg0);
|
||||
InitBackground(bg0);
|
||||
|
||||
config40 = &titleScreen->unk40;
|
||||
config40->graphics.dest = (void *)BG_SCREEN_ADDR(16);
|
||||
config40->graphics.anim = 0;
|
||||
config40->tilesVram = (void *)BG_SCREEN_ADDR(29);
|
||||
config40->layoutVram = (void *)BG_SCREEN_ADDR(29);
|
||||
config40->unk18 = 0;
|
||||
config40->unk1A = 0;
|
||||
config40->tilemapId = TM_TITLE_SCREEN_BG;
|
||||
@@ -1383,11 +1383,11 @@ static void Task_ShowTitleScreenIntroSkipped(void)
|
||||
config40->unk20 = 0;
|
||||
config40->unk22 = 0;
|
||||
config40->unk24 = 0;
|
||||
config40->unk26 = 0x20;
|
||||
config40->unk28 = 0x40;
|
||||
config40->unk2A = 0;
|
||||
config40->targetTilesX = 0x20;
|
||||
config40->targetTilesY = 0x40;
|
||||
config40->paletteOffset = 0;
|
||||
config40->flags = BACKGROUND_FLAGS_BG_ID(1);
|
||||
sub_8002A3C(config40);
|
||||
InitBackground(config40);
|
||||
|
||||
gDispCnt &= ~0x100;
|
||||
gDispCnt |= 0x600;
|
||||
|
||||
@@ -44,7 +44,8 @@ static void Task_DrowningCountdown(void)
|
||||
if (ts->unk14 & 0x2)
|
||||
transform->height = -transform->height;
|
||||
|
||||
if (((u16)(transform->x + 0x20) > 0x130) || ((u16)(transform->y + 0x20) > 0xE0)
|
||||
if ((transform->x < -32 || transform->x > DISPLAY_WIDTH + 32)
|
||||
|| (transform->y < -32 || transform->y > DISPLAY_HEIGHT + 32)
|
||||
|| (ts->unk10 > 0x80)) {
|
||||
TaskDestroy(gCurTask);
|
||||
return;
|
||||
@@ -205,9 +206,10 @@ static void Task_SpawnAirBubbles(void)
|
||||
if (ts->unk14 & 0x2)
|
||||
transform->height = -transform->height;
|
||||
|
||||
if (((u16)(transform->x + 0x20) > 0x130) || ((u16)(transform->y + 0x20) > 0xE0)
|
||||
|| ((u16)gUnknown_03005660.unk0 != 1) || (gUnknown_03005660.unk4 < 0)
|
||||
|| (Q_24_8_TO_INT(r4) - 3 < gUnknown_03005660.unk4) || (ts->unk10 > 0x1E0)) {
|
||||
if ((transform->x < -32 || transform->x > DISPLAY_WIDTH + 32)
|
||||
|| (transform->y < -32 || transform->y > DISPLAY_HEIGHT + 32)
|
||||
|| (gWater.isActive != TRUE) || (gWater.currentWaterLevel < 0)
|
||||
|| (Q_24_8_TO_INT(r4) - 3 < gWater.currentWaterLevel) || (ts->unk10 > 0x1E0)) {
|
||||
TaskDestroy(gCurTask);
|
||||
return;
|
||||
} else {
|
||||
|
||||
+8
-6
@@ -18,7 +18,7 @@ build/sa2/src/core.o(.data);
|
||||
. = 0x000053E8; gUnknown_030053E8 = .;
|
||||
. = 0x000053EC; gMultiplayerLanguage = .;
|
||||
. = 0x000053F0; gRingCount = .;
|
||||
. = 0x0000540C; gUnknown_0300540C = .;
|
||||
. = 0x0000540C; gActiveCollectRingEffectCount = .;
|
||||
. = 0x00005410; gMultiplayerIds = .;
|
||||
. = 0x00005420; gUnknown_03005420 = .;
|
||||
. = 0x00005424; gUnknown_03005424 = .;
|
||||
@@ -46,7 +46,7 @@ build/sa2/src/core.o(.data);
|
||||
|
||||
. = 0x000054C8; gDemoPlayCounter = .;
|
||||
. = 0x000054CC; gGameMode = .;
|
||||
. = 0x000054D0; gUnknown_030054D0 = .;
|
||||
. = 0x000054D0; gStageGoalX = .;
|
||||
. = 0x000054D4; gMultiplayerMissingHeartbeats = .;
|
||||
. = 0x000054D8; gMultiplayerUnlockedLevels = .;
|
||||
. = 0x000054DC; gEntitiesManagerTask = .;
|
||||
@@ -68,10 +68,10 @@ build/sa2/src/core.o(.data);
|
||||
. = 0x000055B8; gMultiplayerConnections = .;
|
||||
. = 0x000055BC; gUnknown_030055BC = .;
|
||||
. = 0x000055D0; gUnknown_030055D0 = .;
|
||||
. = 0x000055D4; gUnknown_030055D4 = .;
|
||||
. = 0x000055D4; gNewInputCountersIndex = .;
|
||||
. = 0x000055D8; gUnknown_030055D8 = .;
|
||||
. = 0x000055E0; gUnknown_030055E0 = .;
|
||||
. = 0x00005660; gUnknown_03005660 = .;
|
||||
. = 0x000055E0; gNewInputCounters = .;
|
||||
. = 0x00005660; gWater = .;
|
||||
. = 0x000056A4; gUnknown_030056A4 = .;
|
||||
. = 0x000056B0; gUnknown_030056B0 = .;
|
||||
. = 0x000057B0; gUnknown_030057B0 = .;
|
||||
@@ -81,7 +81,7 @@ build/sa2/src/core.o(.data);
|
||||
. = 0x00005840; gUnknown_03005840 = .;
|
||||
. = 0x00005844; gUnknown_03005844 = .;
|
||||
. = 0x00005848; gGameStageTask = .;
|
||||
. = 0x00005850; gUnknown_03005850 = .;
|
||||
. = 0x00005850; gStageBackgroundsRam = .;
|
||||
. = 0x00005960; gCamera = .;
|
||||
|
||||
/* part of camera */
|
||||
@@ -107,6 +107,8 @@ build/sa2/src/game/save.o(.data);
|
||||
build/sa2/src/game/multiboot/collect_rings/time_display.o(.data);
|
||||
|
||||
build/sa2/src/game/math_0.o(.data);
|
||||
. = ALIGN(8);
|
||||
build/sa2/src/game/game_6_0.o(.data);
|
||||
. = ALIGN(16);
|
||||
build/sa2/src/game/backgrounds.o(.data);
|
||||
. = ALIGN(16);
|
||||
|
||||
Reference in new issue
Block a user