mirror of
https://github.com/pret/pokestadium.git
synced 2026-03-21 17:24:20 -05:00
stage_loader
This commit is contained in:
parent
02c8008768
commit
57201ca5cc
80
include/color.h
Normal file
80
include/color.h
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
// For checking the alpha bit in an RGBA16 pixel
|
||||
#define RGBA16_PIXEL_OPAQUE 1
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 r;
|
||||
/* 0x1 */ u8 g;
|
||||
/* 0x2 */ u8 b;
|
||||
} Color_RGB8; // size = 0x3
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 r;
|
||||
/* 0x1 */ u8 g;
|
||||
/* 0x2 */ u8 b;
|
||||
/* 0x3 */ u8 a;
|
||||
} Color_RGBA8; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 r;
|
||||
/* 0x2 */ s16 g;
|
||||
/* 0x4 */ s16 b;
|
||||
} Color_RGB16; // size = 0x6
|
||||
|
||||
// only use when necessary for alignment purposes
|
||||
typedef union Color_RGBA8_u32 {
|
||||
struct {
|
||||
u8 r, g, b, a;
|
||||
};
|
||||
u32 rgba;
|
||||
} Color_RGBA8_u32;
|
||||
|
||||
typedef struct {
|
||||
f32 r, g, b, a;
|
||||
} Color_RGBAf;
|
||||
|
||||
typedef struct {
|
||||
u32 r, g, b, a;
|
||||
} Color_RGBAu32;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u16 r : 5;
|
||||
u16 g : 5;
|
||||
u16 b : 5;
|
||||
u16 a : 1;
|
||||
};
|
||||
u16 rgba;
|
||||
} Color_RGBA16;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u32 r : 5;
|
||||
u32 g : 5;
|
||||
u32 b : 5;
|
||||
u32 a : 1;
|
||||
};
|
||||
u16 rgba;
|
||||
} Color_RGBA16_2;
|
||||
|
||||
typedef union{
|
||||
struct {
|
||||
u32 r : 3;
|
||||
u32 g : 3;
|
||||
u32 b : 3;
|
||||
u32 a : 5;
|
||||
};
|
||||
u16 rgba;
|
||||
} Color_RGBA14;
|
||||
|
||||
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
|
||||
|
||||
#define RGBA16_GET_R(pixel) ((((pixel) & 0xF800) >> 11) & 0xFF)
|
||||
#define RGBA16_GET_G(pixel) ((((pixel) & 0x7C0) >> 6) & 0xFF)
|
||||
#define RGBA16_GET_B(pixel) ((((pixel) & 0x3E) >> 1) & 0xFF)
|
||||
|
||||
#endif
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "gfx.h"
|
||||
#include "color.h"
|
||||
|
||||
typedef struct unk_D_86002F58_004 {
|
||||
/* 0x000 */ char pad0[0xC];
|
||||
|
|
|
|||
|
|
@ -21,12 +21,6 @@ extern void func_800052B4(void);
|
|||
extern void func_800053B4(void *, s32); // types unknown
|
||||
extern void func_80005328(void *); // types unknown
|
||||
|
||||
// 6BC0.s
|
||||
extern u32 func_80006314(s32, s32, s32, s32, s32); // types unknown
|
||||
|
||||
// 75F0.s
|
||||
extern void HAL_Printf(s32 x, s32 y, char *str, ...);
|
||||
|
||||
// C030.s
|
||||
extern s32 func_8000B4C4(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef M2C
|
||||
#ident "$Revision: 1.23 $"
|
||||
#endif
|
||||
/*
|
||||
*
|
||||
* Copyright 1992, Silicon Graphics, Inc.
|
||||
|
|
|
|||
|
|
@ -40,4 +40,43 @@ extern unk_D_80068BA0* D_80068BA0[4];
|
|||
extern Gfx D_8006F518[];
|
||||
extern Gfx D_8006F630[];
|
||||
|
||||
typedef struct unk_D_800A7450 {
|
||||
/* 0x00 */ u8 unk_00;
|
||||
/* 0x01 */ u8 unk_01;
|
||||
/* 0x02 */ u8 unk_02;
|
||||
/* 0x03 */ u8 unk_03;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
/* 0x0C */ void* unk_0C;
|
||||
} unk_D_800A7450; // size >= 0x10
|
||||
extern unk_D_800A7450 D_800A7450;
|
||||
|
||||
extern Mtx D_800A7468;
|
||||
extern s32 gShowCPUProfiler;
|
||||
extern s32 gShowMEMProfiler;
|
||||
|
||||
|
||||
typedef struct unk_func_80007444 {
|
||||
/* 0x00 */ s16 unk_00;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ s16 unk_04;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ s16 unk_08;
|
||||
/* 0x0A */ s16 unk_0A;
|
||||
/* 0x0C */ s8 unk_0C;
|
||||
/* 0x0D */ s8 unk_0D;
|
||||
/* 0x0E */ s8 unk_0E;
|
||||
/* 0x0F */ s8 unk_0F;
|
||||
/* 0x10 */ s8 unk_10;
|
||||
/* 0x11 */ u8 unk_11;
|
||||
/* 0x12 */ u8 unk_12;
|
||||
/* 0x13 */ u8 unk_13;
|
||||
/* 0x14 */ u16 unk_14;
|
||||
/* 0x16 */ s8 unk_16;
|
||||
/* 0x18 */ void* unk_18[3];
|
||||
} unk_func_80007444; // size = 0x24
|
||||
extern unk_func_80007444* D_800A7464;
|
||||
|
||||
extern Gfx* D_800A74B0;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ segments:
|
|||
- [0x6430, c, controller] # controller code
|
||||
- [0x6A40, c]
|
||||
- [0x6BC0, c] #
|
||||
- [0x75F0, c] # stage loader
|
||||
- [0x75F0, c, stage_loader] # stage loader
|
||||
- [0x8EB0, c] # empty file/padding?
|
||||
- [0x8EC0, c, crash_screen] # crash handler
|
||||
- [0x9D20, c, profiler]
|
||||
- [0xAF00, c, math_util]
|
||||
|
|
@ -329,6 +330,7 @@ segments:
|
|||
# .data is somewhere in here
|
||||
- [0x69790, .data, util]
|
||||
- [0x697A0, bin, rom_data_697A0]
|
||||
- [0x697C0, .data, stage_loader]
|
||||
- [0x6A1B0, .data, crash_screen]
|
||||
- [0x6A3B0, .data, profiler]
|
||||
- [0x6A3D0, .data, gb_tower]
|
||||
|
|
|
|||
68
src/3FB0.c
68
src/3FB0.c
|
|
@ -52,7 +52,7 @@ void* func_80003DC4(uintptr_t romStart, uintptr_t romEnd, s32 arg2, s32 arg3) {
|
|||
func_80003B30(newaddr, romStart, romEnd, arg3);
|
||||
ret = func_80003D18(newaddr, newaddr, arg2);
|
||||
}
|
||||
// is PRESJPEG?
|
||||
// is PRESJPEG?
|
||||
} else if ((addr[0] == 'PRES') && (addr[1] == 'JPEG')) {
|
||||
newaddr = main_pool_alloc(ALIGN16(romEnd - romStart), side);
|
||||
if (newaddr != NULL) {
|
||||
|
|
@ -97,8 +97,8 @@ s32 func_80004258(s32 id, s32 arg1, s32 arg2, s32 arg3) {
|
|||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/3FB0/func_800043BC.s")
|
||||
|
||||
void *func_80004454(s32 arg0, uintptr_t romStart, uintptr_t romEnd) {
|
||||
void *addr = func_80003DC4(romStart, romEnd, 0, 0);
|
||||
void* func_80004454(s32 arg0, uintptr_t romStart, uintptr_t romEnd) {
|
||||
void* addr = func_80003DC4(romStart, romEnd, 0, 0);
|
||||
|
||||
if (addr != NULL) {
|
||||
func_800043BC(arg0, addr);
|
||||
|
|
@ -116,42 +116,42 @@ void* func_800044F4(uintptr_t romStart, uintptr_t romEnd, s32 arg2, s32 arg3) {
|
|||
|
||||
ret = NULL;
|
||||
switch (arg2) {
|
||||
case 0:
|
||||
newaddr = func_80003DC4(romStart, romEnd, 0, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
newaddr[0] |= 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
newaddr = func_80003DC4(romStart, romStart + 0x20, 0, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
sp28_2 = (ret[3] * 0x10) + 0x10;
|
||||
main_pool_try_free(ret);
|
||||
newaddr = func_80003DC4(romStart, romStart + sp28_2, 0, 0);
|
||||
case 0:
|
||||
newaddr = func_80003DC4(romStart, romEnd, 0, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
*newaddr |= 2;
|
||||
if (arg3 == 1) {
|
||||
newaddr[0] |= 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
newaddr = func_80003DC4(romStart, romStart + 0x20, 0, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
sp28_2 = (ret[3] * 0x10) + 0x10;
|
||||
main_pool_try_free(ret);
|
||||
newaddr = func_80003DC4(romStart, romStart + sp28_2, 0, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
*newaddr |= 2;
|
||||
if (arg3 == 1) {
|
||||
*newaddr |= 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
newaddr = func_80003DC4(romStart, romStart + 0x20, 1, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
sp28 = (ret[3] * 0x10) + 0x10;
|
||||
main_pool_try_free(ret);
|
||||
newaddr = func_80003DC4(romStart, romStart + sp28, 1, 0);
|
||||
ret = newaddr;
|
||||
if ((newaddr != NULL) && (arg3 == 1)) {
|
||||
*newaddr |= 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
newaddr = func_80003DC4(romStart, romStart + 0x20, 1, 0);
|
||||
ret = newaddr;
|
||||
if (newaddr != NULL) {
|
||||
sp28 = (ret[3] * 0x10) + 0x10;
|
||||
main_pool_try_free(ret);
|
||||
newaddr = func_80003DC4(romStart, romStart + sp28, 1, 0);
|
||||
ret = newaddr;
|
||||
if ((newaddr != NULL) && (arg3 == 1)) {
|
||||
*newaddr |= 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
if (ret != NULL) {
|
||||
ret[1] = romStart;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
#include "6A40.h"
|
||||
|
||||
struct UnkStruct800A7428 {
|
||||
u32 *unk0;
|
||||
u32 *unk4;
|
||||
u32* unk0;
|
||||
u32* unk4;
|
||||
u32 unk8;
|
||||
s32 unkC;
|
||||
s16 unk10;
|
||||
|
|
@ -27,7 +27,7 @@ void func_80005EAC(void) {
|
|||
}
|
||||
|
||||
void func_80005EDC(void) {
|
||||
s32 *temp_v0 = (s32*)&D_800A7428;
|
||||
s32* temp_v0 = (s32*)&D_800A7428;
|
||||
|
||||
D_800A7428.unk10 ^= 1;
|
||||
temp_v0 += D_800A7428.unk10;
|
||||
|
|
@ -37,7 +37,7 @@ void func_80005EDC(void) {
|
|||
}
|
||||
|
||||
void func_80005F1C(s32* arg0, s32* arg1) {
|
||||
s32 *ptr = (s32*)&D_800A7428;
|
||||
s32* ptr = (s32*)&D_800A7428;
|
||||
*arg1 = (uintptr_t)gDisplayListHead - ptr[D_800A7428.unk10];
|
||||
*arg0 = ptr[D_800A7428.unk10];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
|
||||
#include "common.h"
|
||||
|
||||
void func_800060E0(Gfx**, s32, s32, s16, s16);
|
||||
void* func_80006314(s32, s32, s32, s32, s32);
|
||||
void func_80006414(void*, void*);
|
||||
void func_80006450(void);
|
||||
void func_80006498(Gfx**, void*);
|
||||
void func_800067E4(Gfx**, s32, s32, s32, s32);
|
||||
|
||||
|
||||
|
|
|
|||
80
src/75F0.c
80
src/75F0.c
|
|
@ -1,80 +0,0 @@
|
|||
#include "common.h"
|
||||
#include "75F0.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800069F0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006C04.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006C6C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006CB4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006CF8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006D28.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006D50.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006F34.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006F98.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80006FE8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007234.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_8000725C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007304.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007444.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800075F8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007604.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007614.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007678.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800076C0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_8000771C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007754.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007778.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800077B4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007820.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800078D4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007990.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800079C4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007A2C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007A58.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007A80.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007C3C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007CD8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007DE4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007EF0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80007FC4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800080E0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_80008130.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/HAL_Printf.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/75F0/func_800081F8.s")
|
||||
17
src/75F0.h
17
src/75F0.h
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef _75F0_H_
|
||||
#define _75F0_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
void func_80006C6C(s32);
|
||||
void func_80006CB4(s32);
|
||||
s32 func_80007444(s32, s32, s32, s32, s32, s32);
|
||||
s32 func_80007604(void);
|
||||
void func_80007678(s32);
|
||||
void func_800076C0(void);
|
||||
s32 func_80007778(void);
|
||||
void func_800077B4(s32);
|
||||
void func_800079C4(void);
|
||||
|
||||
|
||||
#endif // _75F0_H_
|
||||
3
src/8EB0.c
Normal file
3
src/8EB0.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include "common.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/8EB0/func_800082B0.s")
|
||||
|
|
@ -100,7 +100,7 @@ extern s32 D_80084758;
|
|||
extern u64 D_80084760[0x100 / sizeof(u64)];
|
||||
|
||||
// function prototypes
|
||||
void func_80001AD4(u16 arg0);
|
||||
void func_80001AD4(u16 color);
|
||||
void func_80001C1C(struct UnkArray4* arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4, s32 arg5, s32 arg6, s32 arg7);
|
||||
|
||||
void func_80001380(struct UnkStruct80001380* arg0) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,12 @@ extern struct UnkStruct800A62E0 D_800A62E0;
|
|||
|
||||
void func_80001474(s8, s8);
|
||||
void func_800019C8(void);
|
||||
void func_80001AD4(u16);
|
||||
u16 func_80001B2C(void);
|
||||
void func_80001B7C(void);
|
||||
void func_80001BA8(void*);
|
||||
void func_80001BD4(s32);
|
||||
void func_80001C64(void);
|
||||
s32 func_80001C90(void);
|
||||
|
||||
#endif /* _SRC_DP_INTRO_H_ */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "src/memory.h"
|
||||
#include "src/3FB0.h"
|
||||
#include "src/6A40.h"
|
||||
#include "src/75F0.h"
|
||||
#include "src/stage_loader.h"
|
||||
#include "src/1CF30.h"
|
||||
#include "src/4BDC0.h"
|
||||
#include "src/fragments/2/fragment2.h"
|
||||
|
|
@ -31,192 +31,254 @@ typedef struct unk_D_86002920 {
|
|||
} unk_D_86002920; // size = 0xC
|
||||
|
||||
static unk_D_86002920 D_86002920[31] = {
|
||||
{0x87A0,
|
||||
0x1190,
|
||||
0x0032,
|
||||
0x0028,
|
||||
0x0005,
|
||||
0x0000,},
|
||||
{0x87A0,
|
||||
0x1178,
|
||||
0x004B,
|
||||
0x0037,
|
||||
0x0014,
|
||||
0x0000,},
|
||||
{0x87A0,
|
||||
0x1180,
|
||||
0x005C,
|
||||
0x003C,
|
||||
0x001E,
|
||||
0x0000,},
|
||||
{0x87A0,
|
||||
0x11A4,
|
||||
0x0063,
|
||||
0x005A,
|
||||
0x0028,
|
||||
0x0000,},
|
||||
{0xFFFF,
|
||||
0xFFE2,
|
||||
0xFFFF,
|
||||
0xFFF5,
|
||||
0x0000,
|
||||
0x0007,},
|
||||
{0x0000,
|
||||
0x0019,
|
||||
0x000D,
|
||||
0x000D,
|
||||
0x000B,
|
||||
0x000C,},
|
||||
{0x000F,
|
||||
0x000F,
|
||||
0x000D,
|
||||
0x000E,
|
||||
0x0011,
|
||||
0x0011,},
|
||||
{0x000F,
|
||||
0x0010,
|
||||
0x0013,
|
||||
0x0013,
|
||||
0x0011,
|
||||
0x0012,},
|
||||
{0xA5B3,
|
||||
0xA5A4,
|
||||
0xA5AD,
|
||||
0xA5F3,
|
||||
0xA5B0,
|
||||
0xA4CE,},
|
||||
{0xA4CF,
|
||||
0xA4CD,
|
||||
0xA4EB,
|
||||
0xA4C7,
|
||||
0xA5DD,
|
||||
0xA5F3,},
|
||||
{0x0000,
|
||||
0x0000,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,},
|
||||
{0xA4C7,
|
||||
0xA1A1,
|
||||
0xA5B8,
|
||||
0xA5E3,
|
||||
0xA5F3,
|
||||
0xA5D7,},
|
||||
{0xA4B7,
|
||||
0xA4C6,
|
||||
0xA1A1,
|
||||
0xA4A6,
|
||||
0xA4A8,
|
||||
0xA4CE,},
|
||||
{0xA5AB,
|
||||
0xA5A6,
|
||||
0xA5F3,
|
||||
0xA5BF,
|
||||
0xA1BC,
|
||||
0xA4F2,},
|
||||
{0x0000,
|
||||
0x0000,
|
||||
0xA4BF,
|
||||
0xA4AF,
|
||||
0xA4B5,
|
||||
0xA4F3,},
|
||||
{0xA1A1,
|
||||
0xA4BF,
|
||||
0xA4BF,
|
||||
0xA4A4,
|
||||
0xA4BF,
|
||||
0xA4D2,},
|
||||
{0xA4C8,
|
||||
0xA4AC,
|
||||
0xA1A1,
|
||||
0xA4AB,
|
||||
0xA4C1,
|
||||
0xA1A3,},
|
||||
{0x0000,
|
||||
0x0000,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,},
|
||||
{0xA4F2,
|
||||
0xA1A1,
|
||||
0xA4CA,
|
||||
0xA4AC,
|
||||
0xA4AF,
|
||||
0xA1A1,},
|
||||
{0xA4AA,
|
||||
0xA4B5,
|
||||
0xA4CA,
|
||||
0xA4A4,
|
||||
0xA4C8,
|
||||
0xA1A1,},
|
||||
{0xA5AB,
|
||||
0xA5A6,
|
||||
0xA5F3,
|
||||
0xA5BF,
|
||||
0xA1BC,
|
||||
0xA4DE,},
|
||||
{0xA4C7,
|
||||
0x0000,
|
||||
0xA4C8,
|
||||
0xA4C9,
|
||||
0xA4AB,
|
||||
0xA4CA,},
|
||||
{0xA4A4,
|
||||
0xA4E8,
|
||||
0xA1A3,
|
||||
0x0000,
|
||||
0xA4C1,
|
||||
0xA4E3,},
|
||||
{0xA4AF,
|
||||
0xA4C1,
|
||||
0xA4B9,
|
||||
0xA4EB,
|
||||
0xA1A1,
|
||||
0xA5BF,},
|
||||
{0xA5A4,
|
||||
0xA5DF,
|
||||
0xA5F3,
|
||||
0xA5B0,
|
||||
0xA4CB,
|
||||
0xA4A2,},
|
||||
{0xA4EF,
|
||||
0xA4BB,
|
||||
0xA4C6,
|
||||
0xA1A1,
|
||||
0xA5C6,
|
||||
0xA5F3,},
|
||||
{0xA5DD,
|
||||
0xA4E8,
|
||||
0xA4AF,
|
||||
0x0000,
|
||||
0xA5DC,
|
||||
0xA5BF,},
|
||||
{0xA5F3,
|
||||
0xA4F2,
|
||||
0xA4AA,
|
||||
0xA4B9,
|
||||
0xA4CE,
|
||||
0xA4AC,},
|
||||
{0xA1A1,
|
||||
0xA4B8,
|
||||
0xA4E7,
|
||||
0xA4A6,
|
||||
0xA4BA,
|
||||
0xA4CB,},
|
||||
{0xA5B8,
|
||||
0xA5E3,
|
||||
0xA5F3,
|
||||
0xA5D7,
|
||||
0xA4B9,
|
||||
0xA4EB,},
|
||||
{0xA5B3,
|
||||
0xA5C4,
|
||||
0xA4C0,
|
||||
0xA1A3,
|
||||
0x0000,
|
||||
0x0000,},
|
||||
{
|
||||
0x87A0,
|
||||
0x1190,
|
||||
0x0032,
|
||||
0x0028,
|
||||
0x0005,
|
||||
0x0000,
|
||||
},
|
||||
{
|
||||
0x87A0,
|
||||
0x1178,
|
||||
0x004B,
|
||||
0x0037,
|
||||
0x0014,
|
||||
0x0000,
|
||||
},
|
||||
{
|
||||
0x87A0,
|
||||
0x1180,
|
||||
0x005C,
|
||||
0x003C,
|
||||
0x001E,
|
||||
0x0000,
|
||||
},
|
||||
{
|
||||
0x87A0,
|
||||
0x11A4,
|
||||
0x0063,
|
||||
0x005A,
|
||||
0x0028,
|
||||
0x0000,
|
||||
},
|
||||
{
|
||||
0xFFFF,
|
||||
0xFFE2,
|
||||
0xFFFF,
|
||||
0xFFF5,
|
||||
0x0000,
|
||||
0x0007,
|
||||
},
|
||||
{
|
||||
0x0000,
|
||||
0x0019,
|
||||
0x000D,
|
||||
0x000D,
|
||||
0x000B,
|
||||
0x000C,
|
||||
},
|
||||
{
|
||||
0x000F,
|
||||
0x000F,
|
||||
0x000D,
|
||||
0x000E,
|
||||
0x0011,
|
||||
0x0011,
|
||||
},
|
||||
{
|
||||
0x000F,
|
||||
0x0010,
|
||||
0x0013,
|
||||
0x0013,
|
||||
0x0011,
|
||||
0x0012,
|
||||
},
|
||||
{
|
||||
0xA5B3,
|
||||
0xA5A4,
|
||||
0xA5AD,
|
||||
0xA5F3,
|
||||
0xA5B0,
|
||||
0xA4CE,
|
||||
},
|
||||
{
|
||||
0xA4CF,
|
||||
0xA4CD,
|
||||
0xA4EB,
|
||||
0xA4C7,
|
||||
0xA5DD,
|
||||
0xA5F3,
|
||||
},
|
||||
{
|
||||
0x0000,
|
||||
0x0000,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
},
|
||||
{
|
||||
0xA4C7,
|
||||
0xA1A1,
|
||||
0xA5B8,
|
||||
0xA5E3,
|
||||
0xA5F3,
|
||||
0xA5D7,
|
||||
},
|
||||
{
|
||||
0xA4B7,
|
||||
0xA4C6,
|
||||
0xA1A1,
|
||||
0xA4A6,
|
||||
0xA4A8,
|
||||
0xA4CE,
|
||||
},
|
||||
{
|
||||
0xA5AB,
|
||||
0xA5A6,
|
||||
0xA5F3,
|
||||
0xA5BF,
|
||||
0xA1BC,
|
||||
0xA4F2,
|
||||
},
|
||||
{
|
||||
0x0000,
|
||||
0x0000,
|
||||
0xA4BF,
|
||||
0xA4AF,
|
||||
0xA4B5,
|
||||
0xA4F3,
|
||||
},
|
||||
{
|
||||
0xA1A1,
|
||||
0xA4BF,
|
||||
0xA4BF,
|
||||
0xA4A4,
|
||||
0xA4BF,
|
||||
0xA4D2,
|
||||
},
|
||||
{
|
||||
0xA4C8,
|
||||
0xA4AC,
|
||||
0xA1A1,
|
||||
0xA4AB,
|
||||
0xA4C1,
|
||||
0xA1A3,
|
||||
},
|
||||
{
|
||||
0x0000,
|
||||
0x0000,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
0xA1A1,
|
||||
},
|
||||
{
|
||||
0xA4F2,
|
||||
0xA1A1,
|
||||
0xA4CA,
|
||||
0xA4AC,
|
||||
0xA4AF,
|
||||
0xA1A1,
|
||||
},
|
||||
{
|
||||
0xA4AA,
|
||||
0xA4B5,
|
||||
0xA4CA,
|
||||
0xA4A4,
|
||||
0xA4C8,
|
||||
0xA1A1,
|
||||
},
|
||||
{
|
||||
0xA5AB,
|
||||
0xA5A6,
|
||||
0xA5F3,
|
||||
0xA5BF,
|
||||
0xA1BC,
|
||||
0xA4DE,
|
||||
},
|
||||
{
|
||||
0xA4C7,
|
||||
0x0000,
|
||||
0xA4C8,
|
||||
0xA4C9,
|
||||
0xA4AB,
|
||||
0xA4CA,
|
||||
},
|
||||
{
|
||||
0xA4A4,
|
||||
0xA4E8,
|
||||
0xA1A3,
|
||||
0x0000,
|
||||
0xA4C1,
|
||||
0xA4E3,
|
||||
},
|
||||
{
|
||||
0xA4AF,
|
||||
0xA4C1,
|
||||
0xA4B9,
|
||||
0xA4EB,
|
||||
0xA1A1,
|
||||
0xA5BF,
|
||||
},
|
||||
{
|
||||
0xA5A4,
|
||||
0xA5DF,
|
||||
0xA5F3,
|
||||
0xA5B0,
|
||||
0xA4CB,
|
||||
0xA4A2,
|
||||
},
|
||||
{
|
||||
0xA4EF,
|
||||
0xA4BB,
|
||||
0xA4C6,
|
||||
0xA1A1,
|
||||
0xA5C6,
|
||||
0xA5F3,
|
||||
},
|
||||
{
|
||||
0xA5DD,
|
||||
0xA4E8,
|
||||
0xA4AF,
|
||||
0x0000,
|
||||
0xA5DC,
|
||||
0xA5BF,
|
||||
},
|
||||
{
|
||||
0xA5F3,
|
||||
0xA4F2,
|
||||
0xA4AA,
|
||||
0xA4B9,
|
||||
0xA4CE,
|
||||
0xA4AC,
|
||||
},
|
||||
{
|
||||
0xA1A1,
|
||||
0xA4B8,
|
||||
0xA4E7,
|
||||
0xA4A6,
|
||||
0xA4BA,
|
||||
0xA4CB,
|
||||
},
|
||||
{
|
||||
0xA5B8,
|
||||
0xA5E3,
|
||||
0xA5F3,
|
||||
0xA5D7,
|
||||
0xA4B9,
|
||||
0xA4EB,
|
||||
},
|
||||
{
|
||||
0xA5B3,
|
||||
0xA5C4,
|
||||
0xA4C0,
|
||||
0xA1A3,
|
||||
0x0000,
|
||||
0x0000,
|
||||
},
|
||||
};
|
||||
|
||||
static f32 D_86002A94 = 50.0f;
|
||||
|
|
@ -231,86 +293,58 @@ typedef struct unk_D_86002A98 {
|
|||
} unk_D_86002A98; // size = 0xC
|
||||
|
||||
static unk_D_86002A98 D_86002A98[4] = {
|
||||
{0x0014,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0x0000,
|
||||
0xFFFF,},
|
||||
{0x005A,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0x00FF,
|
||||
0x00FF,},
|
||||
{0x00A0,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0xFF00,
|
||||
0x00FF,},
|
||||
{0x00E6,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0x00FF,},
|
||||
{
|
||||
0x0014,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0x0000,
|
||||
0xFFFF,
|
||||
},
|
||||
{
|
||||
0x005A,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0x00FF,
|
||||
0x00FF,
|
||||
},
|
||||
{
|
||||
0x00A0,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0xFF00,
|
||||
0x00FF,
|
||||
},
|
||||
{
|
||||
0x00E6,
|
||||
0x00D7,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0xFFFF,
|
||||
0x00FF,
|
||||
},
|
||||
};
|
||||
|
||||
static u8 D_86002AC8[] = {
|
||||
0x03, 0x03, 0xED, 0x80,
|
||||
0x00, 0x0E, 0x00, 0x00,
|
||||
0x03, 0x03, 0xF1, 0x80,
|
||||
0x00, 0x02, 0x00, 0x00,
|
||||
0x03, 0x03, 0xF5, 0x80,
|
||||
0x00, 0x06, 0x00, 0x00,
|
||||
0x03, 0x03, 0xF1, 0x80,
|
||||
0x00, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x03, 0xED, 0x80, 0x00, 0x0E, 0x00, 0x00, 0x03, 0x03, 0xF1, 0x80, 0x00, 0x02,
|
||||
0x00, 0x00, 0x03, 0x03, 0xF5, 0x80, 0x00, 0x06, 0x00, 0x00, 0x03, 0x03, 0xF1, 0x80,
|
||||
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static u8 D_86002AF0[] = {
|
||||
0x03, 0x04, 0x05, 0x80,
|
||||
0x00, 0x12, 0x00, 0x00,
|
||||
0x03, 0x04, 0x09, 0x80,
|
||||
0x00, 0x02, 0x00, 0x00,
|
||||
0x03, 0x04, 0x0D, 0x80,
|
||||
0x00, 0x08, 0x00, 0x00,
|
||||
0x03, 0x04, 0x09, 0x80,
|
||||
0x00, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x04, 0x05, 0x80, 0x00, 0x12, 0x00, 0x00, 0x03, 0x04, 0x09, 0x80, 0x00, 0x02,
|
||||
0x00, 0x00, 0x03, 0x04, 0x0D, 0x80, 0x00, 0x08, 0x00, 0x00, 0x03, 0x04, 0x09, 0x80,
|
||||
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static u32 D_86002B18[] = {
|
||||
0x0C00FFFF,
|
||||
(u32)&D_5000000,
|
||||
0x0B00001E,
|
||||
0x00000000,
|
||||
0x014000F0,
|
||||
0x0000000F,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)&D_5000000,
|
||||
0x0D000000,
|
||||
(u32)&D_5000000,
|
||||
0x0F000002,
|
||||
0x14000000,
|
||||
0x002B0012,
|
||||
0xFFFFFF32,
|
||||
0x16FFFFFF,
|
||||
0x0F000003,
|
||||
(u32)&D_5000000,
|
||||
0x0A000000,
|
||||
(u32)&D_800AC840,
|
||||
(u32)&D_6000000,
|
||||
(u32)&D_6000000,
|
||||
(u32)&D_6000000,
|
||||
(u32)&D_3000000,
|
||||
0x87806398,
|
||||
(u32)&D_6000000,
|
||||
(u32)&D_1000000,
|
||||
0x0C00FFFF, (u32)&D_5000000, 0x0B00001E, 0x00000000, 0x014000F0, 0x0000000F,
|
||||
0x00000000, 0x00000000, (u32)&D_5000000, 0x0D000000, (u32)&D_5000000, 0x0F000002,
|
||||
0x14000000, 0x002B0012, 0xFFFFFF32, 0x16FFFFFF, 0x0F000003, (u32)&D_5000000,
|
||||
0x0A000000, (u32)&D_800AC840, (u32)&D_6000000, (u32)&D_6000000, (u32)&D_6000000, (u32)&D_3000000,
|
||||
0x87806398, (u32)&D_6000000, (u32)&D_1000000,
|
||||
};
|
||||
|
||||
typedef struct unk_D_86002F30 {
|
||||
|
|
@ -371,12 +405,11 @@ void func_86000020(void) {
|
|||
D_86002F58[a].unk_17A = D_80068BA0[a]->unk_08;
|
||||
D_86002F58[a].unk_174 = D_80068BA0[a]->unk_06;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
D_86003B5C = &D_86002F58[i];
|
||||
if (D_86003B5C->unk_000 == 0) {
|
||||
if ((D_86002F48 != 0) && (D_86002F48 != 2) &&
|
||||
(D_86002F48 != 3) && (D_86002F48 != 5)) {
|
||||
if ((D_86002F48 != 0) && (D_86002F48 != 2) && (D_86002F48 != 3) && (D_86002F48 != 5)) {
|
||||
D_86003B5C->unk_174 = 0;
|
||||
D_86003B5C->unk_17A = 0;
|
||||
}
|
||||
|
|
@ -398,28 +431,28 @@ void func_86000020(void) {
|
|||
break;
|
||||
|
||||
case 8:
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0x90000) &&
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0x90000) &&
|
||||
(func_878001E8(0x64) < D_86002920[D_8780FA38].unk_08)) {
|
||||
D_86003B5C->unk_17A = 0x8000;
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0xD0000) &&
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0xD0000) &&
|
||||
(func_878001E8(0x64) < D_86002920[D_8780FA38].unk_08)) {
|
||||
D_86003B5C->unk_17A = 0x8000;
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0xB0000) &&
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0xB0000) &&
|
||||
(func_878001E8(0x64) < D_86002920[D_8780FA38].unk_08)) {
|
||||
D_86003B5C->unk_17A = 0x8000;
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0xF0000) &&
|
||||
if ((D_86003B5C->unk_004.unk_048 > 0xF0000) &&
|
||||
(func_878001E8(0x64) < D_86002920[D_8780FA38].unk_08)) {
|
||||
D_86003B5C->unk_17A = 0x8000;
|
||||
}
|
||||
|
|
@ -432,8 +465,8 @@ void func_86000020(void) {
|
|||
for (i = 0; i < 4; i++) {
|
||||
D_86003B5C = &D_86002F58[i];
|
||||
for (j = 1; j > 0; j--) {
|
||||
D_86003B5C->unk_176[j] = D_86003B5C->unk_176[j-1];
|
||||
D_86003B5C->unk_17C[j] = D_86003B5C->unk_17C[j-1];
|
||||
D_86003B5C->unk_176[j] = D_86003B5C->unk_176[j - 1];
|
||||
D_86003B5C->unk_17C[j] = D_86003B5C->unk_17C[j - 1];
|
||||
}
|
||||
D_86003B5C->unk_176[0] = D_86003B5C->unk_174;
|
||||
D_86003B5C->unk_17C[0] = D_86003B5C->unk_17A;
|
||||
|
|
@ -491,10 +524,14 @@ void func_86000564(void) {
|
|||
void func_860005B8(s32 arg0) {
|
||||
s32 i;
|
||||
UNUSED u8 sp68[] = {
|
||||
0, 0, 30,
|
||||
0,
|
||||
0,
|
||||
30,
|
||||
};
|
||||
UNUSED u8 sp64[] = {
|
||||
0, 0, 150,
|
||||
0,
|
||||
0,
|
||||
150,
|
||||
};
|
||||
|
||||
if (arg0 != 0) {
|
||||
|
|
@ -537,7 +574,8 @@ void func_860005B8(s32 arg0) {
|
|||
func_8001F3B4(0xC);
|
||||
func_8001F324(0xFF, 0xFF, 0xFF, 0xFF);
|
||||
func_8001F36C(0xF9, 0xF4, 0, 0xFF);
|
||||
func_8001F1E8(0xA0 - (func_878013D4(D_86003B7C, func_8002D7C0(0, 0, D_87806330, 0x15)) / 2), 0x20, func_8002D7C0(0, 0, D_87806330, 0x15));
|
||||
func_8001F1E8(0xA0 - (func_878013D4(D_86003B7C, func_8002D7C0(0, 0, D_87806330, 0x15)) / 2), 0x20,
|
||||
func_8002D7C0(0, 0, D_87806330, 0x15));
|
||||
func_8001F324(0xFF, 0xFF, 0xFF, 0xFF);
|
||||
func_8001F36C(0xFF, 0xFF, 0xFF, 0xFF);
|
||||
func_8001F1E8(0x28, 0x34, func_8002D7C0(0, 0, D_87806330, 0x16));
|
||||
|
|
@ -545,9 +583,9 @@ void func_860005B8(s32 arg0) {
|
|||
func_8001F1E8(0x28, 0x7C, func_8002D7C0(0, 0, D_87806330, 0x18));
|
||||
func_8001F324(0xC8, 0xC8, 0xFF, 0xFF);
|
||||
func_8001F36C(0x50, 0x50, 0xFF, 0xFF);
|
||||
|
||||
|
||||
temp_s0_2 = func_8002D7C0(0, 0, D_87806330, 0x5F);
|
||||
|
||||
|
||||
func_87801290(&sp50, &sp4C, func_8002D7C0(0, 0, D_87806330, 0x16), temp_s0_2, 0xC);
|
||||
if (sp50 >= 0) {
|
||||
func_8001F1E8(sp50 + 0x28, sp4C + 0x34, temp_s0_2);
|
||||
|
|
@ -581,7 +619,8 @@ void func_860005B8(s32 arg0) {
|
|||
func_8001EBE0(0x20, -2);
|
||||
func_8001F324(0xFF, 0xFF, 0xFF, 0xFF);
|
||||
func_8001F36C(0x1E, 0x1E, 0xFF, 0xFF);
|
||||
func_8001F1E8(0xA0 - (func_878013D4(D_86003B7C, func_8002D7C0(0, 0, D_87806330, 0x5A)) / 2), 0x64, func_8002D7C0(0, 0, D_87806330, 0x5A));
|
||||
func_8001F1E8(0xA0 - (func_878013D4(D_86003B7C, func_8002D7C0(0, 0, D_87806330, 0x5A)) / 2), 0x64,
|
||||
func_8002D7C0(0, 0, D_87806330, 0x5A));
|
||||
func_8001F4C4();
|
||||
break;
|
||||
}
|
||||
|
|
@ -597,10 +636,14 @@ void func_860005B8(s32 arg0) {
|
|||
}
|
||||
#else
|
||||
static u8 D_86002B84[] = {
|
||||
0, 0, 30,
|
||||
0,
|
||||
0,
|
||||
30,
|
||||
};
|
||||
static u8 D_86002B88[] = {
|
||||
0, 0, 150,
|
||||
0,
|
||||
0,
|
||||
150,
|
||||
};
|
||||
void func_860005B8(s32 arg0);
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/fragments/6/fragment6/func_860005B8.s")
|
||||
|
|
@ -611,134 +654,21 @@ static Gfx D_86002B90[] = {
|
|||
};
|
||||
|
||||
static u32 D_86002B98[] = {
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x000A000F,
|
||||
0x00140014,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x0000000A,
|
||||
0x00190021,
|
||||
0x002A0033,
|
||||
0x0036003B,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x0000000A,
|
||||
0x0019002A,
|
||||
0x003B004B,
|
||||
0x00550060,
|
||||
0x00640067,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00140025,
|
||||
0x003B0052,
|
||||
0x00670076,
|
||||
0x0082008B,
|
||||
0x00900094,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000014,
|
||||
0x002F0046,
|
||||
0x00600079,
|
||||
0x008D009F,
|
||||
0x00A900B1,
|
||||
0x00B600B9,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00140033,
|
||||
0x0052006D,
|
||||
0x0088009F,
|
||||
0x00B100C1,
|
||||
0x00CA00D1,
|
||||
0x00D400D6,
|
||||
0x00000000,
|
||||
0x00000014,
|
||||
0x002F0052,
|
||||
0x0071008D,
|
||||
0x00A900BE,
|
||||
0x00CF00D9,
|
||||
0x00E200E6,
|
||||
0x00EA00EA,
|
||||
0x00000000,
|
||||
0x000A0025,
|
||||
0x0046006D,
|
||||
0x008D00AD,
|
||||
0x00C400D6,
|
||||
0x00E300EC,
|
||||
0x00F100F4,
|
||||
0x00F600F7,
|
||||
0x00000000,
|
||||
0x0019003B,
|
||||
0x00600088,
|
||||
0x00A900C4,
|
||||
0x00D900E6,
|
||||
0x00F000F6,
|
||||
0x00F900FB,
|
||||
0x00FC00FC,
|
||||
0x0000000A,
|
||||
0x002A0052,
|
||||
0x0079009F,
|
||||
0x00BE00D6,
|
||||
0x00E600F2,
|
||||
0x00F800FC,
|
||||
0x00FD00FE,
|
||||
0x00FE00FE,
|
||||
0x00000019,
|
||||
0x003B0067,
|
||||
0x008D00B1,
|
||||
0x00CF00E3,
|
||||
0x00F000F8,
|
||||
0x00FC00FE,
|
||||
0x00FE00FF,
|
||||
0x00FF00FF,
|
||||
0x00000021,
|
||||
0x004B0076,
|
||||
0x009F00C1,
|
||||
0x00D900EC,
|
||||
0x00F600FC,
|
||||
0x00FE00FE,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x000A002A,
|
||||
0x00550082,
|
||||
0x00A900CA,
|
||||
0x00E200F1,
|
||||
0x00F900FD,
|
||||
0x00FE00FF,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x000F0033,
|
||||
0x0060008B,
|
||||
0x00B100D1,
|
||||
0x00E600F4,
|
||||
0x00FB00FE,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x00140036,
|
||||
0x00640090,
|
||||
0x00B600D4,
|
||||
0x00EA00F6,
|
||||
0x00FC00FE,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x0014003B,
|
||||
0x00670094,
|
||||
0x00B900D6,
|
||||
0x00EA00F7,
|
||||
0x00FC00FE,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x00FF00FF,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000A000F, 0x00140014, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x0000000A, 0x00190021, 0x002A0033, 0x0036003B, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x0000000A, 0x0019002A, 0x003B004B, 0x00550060, 0x00640067, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00140025, 0x003B0052, 0x00670076, 0x0082008B, 0x00900094, 0x00000000, 0x00000000, 0x00000014, 0x002F0046,
|
||||
0x00600079, 0x008D009F, 0x00A900B1, 0x00B600B9, 0x00000000, 0x00000000, 0x00140033, 0x0052006D, 0x0088009F,
|
||||
0x00B100C1, 0x00CA00D1, 0x00D400D6, 0x00000000, 0x00000014, 0x002F0052, 0x0071008D, 0x00A900BE, 0x00CF00D9,
|
||||
0x00E200E6, 0x00EA00EA, 0x00000000, 0x000A0025, 0x0046006D, 0x008D00AD, 0x00C400D6, 0x00E300EC, 0x00F100F4,
|
||||
0x00F600F7, 0x00000000, 0x0019003B, 0x00600088, 0x00A900C4, 0x00D900E6, 0x00F000F6, 0x00F900FB, 0x00FC00FC,
|
||||
0x0000000A, 0x002A0052, 0x0079009F, 0x00BE00D6, 0x00E600F2, 0x00F800FC, 0x00FD00FE, 0x00FE00FE, 0x00000019,
|
||||
0x003B0067, 0x008D00B1, 0x00CF00E3, 0x00F000F8, 0x00FC00FE, 0x00FE00FF, 0x00FF00FF, 0x00000021, 0x004B0076,
|
||||
0x009F00C1, 0x00D900EC, 0x00F600FC, 0x00FE00FE, 0x00FF00FF, 0x00FF00FF, 0x000A002A, 0x00550082, 0x00A900CA,
|
||||
0x00E200F1, 0x00F900FD, 0x00FE00FF, 0x00FF00FF, 0x00FF00FF, 0x000F0033, 0x0060008B, 0x00B100D1, 0x00E600F4,
|
||||
0x00FB00FE, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00140036, 0x00640090, 0x00B600D4, 0x00EA00F6, 0x00FC00FE,
|
||||
0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x0014003B, 0x00670094, 0x00B900D6, 0x00EA00F7, 0x00FC00FE, 0x00FF00FF,
|
||||
0x00FF00FF, 0x00FF00FF,
|
||||
};
|
||||
|
||||
static Vtx D_86002D98[] = {
|
||||
|
|
@ -758,7 +688,8 @@ static Gfx D_86002DD8[] = {
|
|||
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 0, 0, 0, 0, 200),
|
||||
gsDPSetTextureLUT(G_TT_NONE),
|
||||
gsDPLoadTextureBlock(D_86002B98, G_IM_FMT_IA, G_IM_SIZ_16b, 16, 16, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
|
||||
gsDPLoadTextureBlock(D_86002B98, G_IM_FMT_IA, G_IM_SIZ_16b, 16, 16, 0, G_TX_MIRROR | G_TX_WRAP,
|
||||
G_TX_MIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsSPVertex(D_86002D98, 4, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
|
|
@ -767,7 +698,6 @@ static Gfx D_86002DD8[] = {
|
|||
};
|
||||
|
||||
void func_86000C10(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_86000C18(void) {
|
||||
|
|
@ -874,7 +804,7 @@ s32 func_86000FD4(void) {
|
|||
D_86003B5C = &D_86002F58[i];
|
||||
D_86003B5C->unk_000 = (D_8780FA30[i] == 0) ? 0 : D_8780FA38 + 1;
|
||||
}
|
||||
|
||||
|
||||
D_86002F48 = 0;
|
||||
|
||||
var_s0_2 = true;
|
||||
|
|
@ -883,17 +813,17 @@ s32 func_86000FD4(void) {
|
|||
if (D_80068BA0[0]->unk_08 & 0x1000) {
|
||||
var_s0_2 = false;
|
||||
}
|
||||
|
||||
|
||||
if ((D_8780FA2A == 0) && (D_80068BA0[0]->unk_08 & 0x4000)) {
|
||||
func_80048B90(3);
|
||||
func_87802EB8(2);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func_86000D88(D_86002F48);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -909,7 +839,6 @@ void func_86001204(void) {
|
|||
D_86003B70[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
D_86003B68 = 1;
|
||||
D_86003B6A = 90;
|
||||
func_8780295C(1);
|
||||
|
|
@ -1125,8 +1054,8 @@ void func_860017C0(s32 arg0) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (((D_86003B5C->unk_004.unk_168 == 9) && ((D_86003B60->unk_048 >> 0x10) == 2)) ||
|
||||
((D_86003B5C->unk_004.unk_168 == 10) && ((D_86003B60->unk_048 >> 0x10) == 2)) ||
|
||||
if (((D_86003B5C->unk_004.unk_168 == 9) && ((D_86003B60->unk_048 >> 0x10) == 2)) ||
|
||||
((D_86003B5C->unk_004.unk_168 == 10) && ((D_86003B60->unk_048 >> 0x10) == 2)) ||
|
||||
((D_86003B5C->unk_004.unk_168 == 11) && ((D_86003B60->unk_048 >> 0x10) == 2))) {
|
||||
if (D_86003B70[arg0] == 0) {
|
||||
D_86003B64->unk_16A++;
|
||||
|
|
@ -1222,7 +1151,7 @@ s32 func_86001EEC(void) {
|
|||
s32 var_v0 = 0;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4 ; i++) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
D_86003B5C = &D_86002F58[i];
|
||||
switch (D_86003B5C->unk_004.unk_168) {
|
||||
case 5:
|
||||
|
|
@ -1332,7 +1261,7 @@ void func_86001F64(void) {
|
|||
var_s3_4 -= 1;
|
||||
}
|
||||
|
||||
if (var_s3_4 <= 0) {
|
||||
if (var_s3_4 <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1490,7 +1419,7 @@ void func_86002440(void) {
|
|||
func_8001BD04(D_86003B60, 0);
|
||||
func_800173CC(D_86003B60);
|
||||
}
|
||||
|
||||
|
||||
D_86002F50 = func_80004258(0, (u32)&D_124570, (u32)fragment7_ROM_START, 0);
|
||||
func_86000478();
|
||||
func_87802528();
|
||||
|
|
@ -1501,14 +1430,15 @@ void func_86002440(void);
|
|||
#endif
|
||||
|
||||
void func_86002778(UNUSED s32 arg0, UNUSED s32 arg1) {
|
||||
s32 sp24;
|
||||
unk_func_80007444* sp24;
|
||||
|
||||
main_pool_push_state(0x4D494E49);
|
||||
func_80005E40(0x20000, 0);
|
||||
sp24 = func_80007444(0, 1, 3, 1, 2, 1);
|
||||
sp24 = (unk_func_80007444*)func_80007444(0, 1, 3, 1, 2, 1);
|
||||
D_86003B7C = func_8001E94C(0x36, 0);
|
||||
func_80004258(((u32)&D_1000000 & 0x0F000000) >> 0x18, (u32)_4BD6B0_ROM_START, (u32)_4BE810_ROM_START, 0);
|
||||
func_80004454((((u32)fragment31_VRAM & 0x0FF00000) >> 0x14) - 0x10, (u32)fragment31_ROM_START, (u32)fragment32_ROM_START);
|
||||
func_80004454((((u32)fragment31_VRAM & 0x0FF00000) >> 0x14) - 0x10, (u32)fragment31_ROM_START,
|
||||
(u32)fragment32_ROM_START);
|
||||
func_80004454((((u32)&D_8D000000 & 0x0FF00000) >> 0x14) - 0x10, (u32)_5C7A70_ROM_START, (u32)_5C7AD0_ROM_START);
|
||||
func_86002440();
|
||||
func_878029C0();
|
||||
|
|
@ -1519,7 +1449,7 @@ void func_86002778(UNUSED s32 arg0, UNUSED s32 arg1) {
|
|||
func_860022F8(5);
|
||||
func_86001204();
|
||||
func_86001C90();
|
||||
|
||||
|
||||
if (D_8780FC92 == 0) {
|
||||
func_86001F64();
|
||||
}
|
||||
|
|
|
|||
10
src/memmap.h
10
src/memmap.h
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef _MEMMAP_H_
|
||||
#define _MEMMAP_H_
|
||||
|
||||
#ifdef M2C
|
||||
#define RELOCATIONS_SIZE 1
|
||||
#else
|
||||
#define RELOCATIONS_SIZE
|
||||
#endif
|
||||
|
||||
struct MemoryMap {
|
||||
uintptr_t vaddr;
|
||||
size_t size;
|
||||
|
|
@ -19,7 +25,7 @@ extern struct MemoryMap gFragments[240];
|
|||
|
||||
struct RelocTable {
|
||||
/* 0x00 */ u32 nRelocations;
|
||||
/* 0x04 */ u32 relocations[]; // variable size
|
||||
/* 0x04 */ u32 relocations[RELOCATIONS_SIZE]; // variable size
|
||||
};
|
||||
|
||||
struct Fragment {
|
||||
|
|
@ -30,7 +36,7 @@ struct Fragment {
|
|||
u32 relocOffset; // relocOffset
|
||||
u32 sizeInRom;
|
||||
u32 sizeInRam;
|
||||
char data[]; // variable size
|
||||
char data[RELOCATIONS_SIZE]; // variable size
|
||||
};
|
||||
|
||||
void Memmap_SetSegmentMap(u32 id, uintptr_t vaddr, u32 size);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void* main_pool_alloc_from_pool(u32 size, u32 side) {
|
|||
void* addr = NULL;
|
||||
|
||||
size = ALIGN16(size) + sizeof(struct MainPoolBlock);
|
||||
|
||||
|
||||
// do we have enough space?
|
||||
if (size > 0 && size <= sMemPool.available) {
|
||||
if (side == MEMORY_POOL_LEFT) {
|
||||
|
|
|
|||
38
src/reset.c
38
src/reset.c
|
|
@ -10,7 +10,7 @@ struct UnkStruct800A62E0 {
|
|||
|
||||
struct UnkStruct800A6D20 {
|
||||
OSThread thread;
|
||||
char filler1B0[0x5E0-0x1B0];
|
||||
char filler1B0[0x5E0 - 0x1B0];
|
||||
u32 unk5E0;
|
||||
};
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ extern s32 gSoftResetBlue;
|
|||
* Perform the horizontal framebuffer wipe across 15 different lines for a
|
||||
* screen with 320x240 resolution.
|
||||
*/
|
||||
void SoftReset_ClearLines320(u16 *buf) {
|
||||
void SoftReset_ClearLines320(u16* buf) {
|
||||
int i, j;
|
||||
|
||||
if (gSoftResetLineNum <= 15) {
|
||||
|
|
@ -42,11 +42,11 @@ void SoftReset_ClearLines320(u16 *buf) {
|
|||
|
||||
// iterate over and clear the 15 lines of the next frame during the effect.
|
||||
for (j = 0; j < 15; j++) {
|
||||
for(i = 0; i < 320; i++) {
|
||||
for (i = 0; i < 320; i++) {
|
||||
*ptr++ = 1;
|
||||
}
|
||||
ptr += (320*15); // move the framebuffer pointer to the next line to clear
|
||||
// (down 15 lines).
|
||||
ptr += (320 * 15); // move the framebuffer pointer to the next line to clear
|
||||
// (down 15 lines).
|
||||
}
|
||||
osWritebackDCacheAll();
|
||||
}
|
||||
|
|
@ -56,20 +56,20 @@ void SoftReset_ClearLines320(u16 *buf) {
|
|||
* Perform the horizontal framebuffer wipe across 15 different lines for a
|
||||
* screen with 640x480 resolution.
|
||||
*/
|
||||
void SoftReset_ClearLines640(u16 *buf) {
|
||||
void SoftReset_ClearLines640(u16* buf) {
|
||||
int i, j;
|
||||
|
||||
if (gSoftResetLineNum <= 15) {
|
||||
// where is the framebuffer starting, based on the line number of the effect?
|
||||
u16* ptr = buf + gSoftResetLineNum * (640*2);
|
||||
u16* ptr = buf + gSoftResetLineNum * (640 * 2);
|
||||
|
||||
// iterate over and clear the 15 lines of the next frame during the effect.
|
||||
for (j = 0; j < 15; j++) {
|
||||
for(i = 0; i < (640*2); i++) {
|
||||
for (i = 0; i < (640 * 2); i++) {
|
||||
*ptr++ = 1;
|
||||
}
|
||||
ptr += ((640*2)*15); // move the framebuffer pointer to the next line to clear
|
||||
// (down 15 lines).
|
||||
ptr += ((640 * 2) * 15); // move the framebuffer pointer to the next line to clear
|
||||
// (down 15 lines).
|
||||
}
|
||||
osWritebackDCacheAll();
|
||||
}
|
||||
|
|
@ -82,15 +82,17 @@ void func_8000559C(void) {
|
|||
if (gSoftResetLineNum == 0) {
|
||||
u16 color = func_80001B2C();
|
||||
// decoding a 5551 value back to the raw R/G/B values.
|
||||
gSoftResetRed = (color >> 11) & 31; // masked red?
|
||||
gSoftResetGreen = (color >> 6) & 31; // masked green?
|
||||
gSoftResetBlue = (color >> 1) & 31; // masked blue?
|
||||
gSoftResetRed = (color >> 11) & 31; // masked red?
|
||||
gSoftResetGreen = (color >> 6) & 31; // masked green?
|
||||
gSoftResetBlue = (color >> 1) & 31; // masked blue?
|
||||
}
|
||||
// this function is supposed to only take 1 argument. huh?
|
||||
// this function packs 3 values into a RGBA5551 format.
|
||||
func_80001AD4(((((u32) (gSoftResetRed * (15 - gSoftResetLineNum)) >> 4) << 11) |
|
||||
(((u32) (gSoftResetGreen * (15 - gSoftResetLineNum)) >> 4) << 6) |
|
||||
(((u32) (gSoftResetBlue * (15 - gSoftResetLineNum)) >> 4) << 1) | 1) & 0xFFFF, gSoftResetLineNum);
|
||||
func_80001AD4(((((u32)(gSoftResetRed * (15 - gSoftResetLineNum)) >> 4) << 11) |
|
||||
(((u32)(gSoftResetGreen * (15 - gSoftResetLineNum)) >> 4) << 6) |
|
||||
(((u32)(gSoftResetBlue * (15 - gSoftResetLineNum)) >> 4) << 1) | 1) &
|
||||
0xFFFF,
|
||||
gSoftResetLineNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -104,12 +106,12 @@ void SoftReset_Thread(void* unused) {
|
|||
func_80005328(&D_800A6D20.thread);
|
||||
|
||||
// thread loop
|
||||
while(1) {
|
||||
while (1) {
|
||||
func_80004CF4(&D_800A6D20.thread); // hangs here until gets a soft reset.
|
||||
if (D_800A62E0.unkA38 == 0) {
|
||||
continue;
|
||||
}
|
||||
if ((u32) D_800A6D20.unk5E0 < 0x10U) {
|
||||
if ((u32)D_800A6D20.unk5E0 < 0x10U) {
|
||||
struct UnkStruct4* temp_v0 = func_80001C58();
|
||||
if (temp_v0 != NULL) {
|
||||
if (temp_v0->unk4 == 320) {
|
||||
|
|
|
|||
745
src/stage_loader.c
Normal file
745
src/stage_loader.c
Normal file
|
|
@ -0,0 +1,745 @@
|
|||
#include "common.h"
|
||||
#include "stage_loader.h"
|
||||
#include "memory.h"
|
||||
#include "string.h"
|
||||
#include "dp_intro.h"
|
||||
#include "6BC0.h"
|
||||
#include "6A40.h"
|
||||
#include "memmap.h"
|
||||
#include "util.h"
|
||||
#include "profiler.h"
|
||||
#include "PR/xstdio.h"
|
||||
|
||||
typedef struct unk_D_80068CA0 {
|
||||
/* 0x00 */ struct unk_D_80068CA0* next;
|
||||
/* 0x04 */ s16 unk_04;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ s8 unk_08[4];
|
||||
} unk_D_80068CA0; // size = 0xC
|
||||
|
||||
static s32 D_80068BC0_Pad[2] = { 0, 0 };
|
||||
|
||||
static Mtx D_80068BC8 = { {
|
||||
{
|
||||
0x00010000,
|
||||
0x00000000,
|
||||
0x00000001,
|
||||
0x00000000,
|
||||
},
|
||||
{
|
||||
0x00000000,
|
||||
0x00010000,
|
||||
0x00000000,
|
||||
0x00000001,
|
||||
},
|
||||
{
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
},
|
||||
{
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
},
|
||||
} };
|
||||
|
||||
static Vp D_80068C08 = { {
|
||||
{
|
||||
0x0280,
|
||||
0x01E0,
|
||||
0x01FF,
|
||||
0x0000,
|
||||
},
|
||||
{
|
||||
0x0280,
|
||||
0x01E0,
|
||||
0x01FF,
|
||||
0x0000,
|
||||
},
|
||||
|
||||
} };
|
||||
|
||||
static Vp D_80068C18 = { {
|
||||
{
|
||||
0x0500,
|
||||
0x03C0,
|
||||
0x01FF,
|
||||
0x0000,
|
||||
},
|
||||
{
|
||||
0x0500,
|
||||
0x03C0,
|
||||
0x01FF,
|
||||
0x0000,
|
||||
},
|
||||
} };
|
||||
|
||||
static Vtx D_80068C28[] = {
|
||||
VTX(0, 240, 0, 0, 0, 0x00, 0x00, 0x81, 0xFF),
|
||||
VTX(0, 0, 0, 0, 0, 0x00, 0x00, 0x81, 0xFF),
|
||||
VTX(320, 0, 0, 0, 0, 0x00, 0x00, 0x81, 0xFF),
|
||||
VTX(320, 240, 0, 0, 0, 0x00, 0x00, 0x81, 0xFF),
|
||||
};
|
||||
|
||||
static Gfx D_80068C68[] = {
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetRenderMode(G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2),
|
||||
gsDPSetCombineLERP(0, 0, 0, ENVIRONMENT, 0, 0, 0, ENVIRONMENT, 0, 0, 0, ENVIRONMENT, 0, 0, 0, ENVIRONMENT),
|
||||
gsSPVertex(D_80068C28, 4, 0),
|
||||
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static s32 D_80068C98_Pad[2] = { 0, 0 };
|
||||
|
||||
static unk_D_80068CA0* D_80068CA0 = NULL;
|
||||
static unk_D_80068CA0* D_80068CA4 = NULL;
|
||||
|
||||
static s32 D_80068CA8 = 0;
|
||||
|
||||
static s32 D_80068BAC_Pad[1] = { 0 };
|
||||
|
||||
static u32 D_80068CB0[] = {
|
||||
0x00000000, 0xF1000F1F, 0x10000000, 0x00F10000, 0x00000FF1, 0x0000F100, 0x000F100F, 0x10000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xF1000F1F, 0x100F1F10, 0x0FFFF1F1, 0x00F1F11F, 0x1000F100,
|
||||
0x00F11001, 0xF100F100, 0xF100F100, 0x00000000, 0x00000000, 0x000000F1, 0x00000000, 0xF1000111, 0x10FFFFF1,
|
||||
0xF1F11111, 0x0F11F1F1, 0x10001100, 0x0F110000, 0x1F101F1F, 0x1100F100, 0x00000000, 0x00000000, 0x00000F11,
|
||||
0x00000000, 0xF1000000, 0x001F1F11, 0x1FFF1000, 0xF1101F11, 0x00000000, 0x0F100000, 0x0F1001F1, 0x10FFFFF1,
|
||||
0x0000000F, 0xFF100000, 0x0000F110, 0x00000000, 0xF1000000, 0x00FFFFF1, 0x01F1F10F, 0x1100F1F1, 0xF1000000,
|
||||
0x0F100000, 0x0F100F1F, 0x1011F111, 0x00000001, 0x11100000, 0x000F1100, 0x00000000, 0x11000000, 0x001F1F11,
|
||||
0xFFFF11F1, 0x10F1F11F, 0x11000000, 0x01F10000, 0xF110F111, 0xF100F100, 0x00F10000, 0x00000000, 0x00F11000,
|
||||
0x00000000, 0xF1000000, 0x00011110, 0x11F11011, 0x00111FF1, 0xF1000000, 0x001F100F, 0x11001100, 0x11001100,
|
||||
0x0F110000, 0x000000F1, 0x00110000, 0x00000000, 0x11000000, 0x00000000, 0x00110000, 0x00000111, 0x11000000,
|
||||
0x00011001, 0x10000000, 0x00000000, 0x01100000, 0x00000011, 0x00000000, 0x0FFF1000, 0xF1000FFF, 0x100FFF10,
|
||||
0x00FF10FF, 0xFFF10FFF, 0x10FFFFF1, 0x0FFF100F, 0xFF100000, 0x00000000, 0x00000000, 0x00000000, 0x000FFF10,
|
||||
0xF111F10F, 0xF100F111, 0xF1F111F1, 0x0F1F10F1, 0x1111F111, 0xF1F111F1, 0xF111F1F1, 0x11F10000, 0x00000000,
|
||||
0x000F1000, 0x00000F10, 0x00F111F1, 0xF100F101, 0xF1001100, 0xF11100F1, 0xF11F10FF, 0xFF10F100, 0x111100F1,
|
||||
0xF100F1F1, 0x00F100F1, 0x0000F100, 0x00F1100F, 0xFF1001F1, 0x001100F1, 0xF100F100, 0xF10000FF, 0x110FFF11,
|
||||
0xF10F1011, 0x11F1FFFF, 0x10000F11, 0x1FFF111F, 0xFFF10011, 0x00001100, 0x0F110001, 0x1110001F, 0x10000F11,
|
||||
0xF100F100, 0xF1000F11, 0x100111F1, 0xFFFFF100, 0x00F1F111, 0xF100F110, 0xF111F101, 0x11F100F1, 0x0000F100,
|
||||
0x01F1000F, 0xFF1000F1, 0x1000F110, 0xF100F100, 0xF100F110, 0x00F100F1, 0x111F11F1, 0x00F1F100, 0xF100F100,
|
||||
0xF100F1F1, 0x00F10011, 0x000F1100, 0x001F1001, 0x11100F11, 0x00001100, 0x1FFF110F, 0xFF10FFFF, 0xF11FFF11,
|
||||
0x000F101F, 0xFF111FFF, 0x1100F100, 0x1FFF111F, 0xFF110000, 0x00011000, 0x00011000, 0x00000110, 0x0000F100,
|
||||
0x01111001, 0x11101111, 0x11011110, 0x00011001, 0x11100111, 0x10001100, 0x01111001, 0x11100000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00001100, 0x0FFF1000, 0xF100FFFF, 0x100FFF10, 0xFFF100FF, 0xFFF1FFFF, 0xF10FFF10,
|
||||
0xF100F10F, 0xFF100000, 0xF1F100F1, 0xF10000F1, 0x00F1F100, 0xF10FFF10, 0xF111100F, 0x1F10F111, 0xF1F111F1,
|
||||
0xF11F10F1, 0x1111F111, 0x11F111F1, 0xF100F101, 0xF1100000, 0xF1F10F11, 0xF10000FF, 0x1FF1F100, 0xF1F111F1,
|
||||
0xF1FF10F1, 0x11F1F100, 0xF1F10011, 0xF101F1F1, 0x0000F100, 0x00F10011, 0xF100F100, 0xF1000000, 0xF1F1F110,
|
||||
0xF10000F1, 0xF1F1FF10, 0xF1F100F1, 0xF1F1F1F1, 0x00F1FFFF, 0x11F10000, 0xF100F1FF, 0xFF10FFFF, 0x10F1FFF1,
|
||||
0xFFFFF100, 0xF1000000, 0xF1FF1100, 0xF10000F1, 0xF1F1F1F1, 0xF1F100F1, 0xF1FFF1FF, 0xFFF1F111, 0xF1F10000,
|
||||
0xF100F1F1, 0x1110F111, 0x10F111F1, 0xF111F100, 0xF100F100, 0xF1F1F100, 0xF10000F1, 0x11F1F11F, 0xF1F100F1,
|
||||
0xF111F1F1, 0x11F1F100, 0xF1F100F1, 0xF10F11F1, 0x0000F100, 0x00F100F1, 0xF100F100, 0xF100F100, 0xF1F11F10,
|
||||
0xF10000F1, 0x00F1F101, 0xF1F100F1, 0x1FFF11F1, 0x00F1FFFF, 0x111FFF11, 0xFFF110FF, 0xFFF1F100, 0x001FFF11,
|
||||
0xF100F10F, 0xFF101FFF, 0x11F101F1, 0xFFFFF1F1, 0x00F1F100, 0xF11FFF11, 0x01111011, 0x00111111, 0x10011110,
|
||||
0x11110011, 0x11111100, 0x00011110, 0x11001101, 0x11100111, 0x10110011, 0x11111111, 0x00111100, 0x11011110,
|
||||
0xFFFF100F, 0xFF10FFFF, 0x100FFF10, 0xFFFFF1F1, 0x00F1F100, 0xF1F100F1, 0xF100F1F1, 0x00F1FFFF, 0xF100FF10,
|
||||
0x0000000F, 0xF10000F1, 0x00000000, 0xF111F1F1, 0x11F1F111, 0xF1F111F1, 0x11F111F1, 0x00F1F100, 0xF1F100F1,
|
||||
0xF100F1F1, 0x00F11111, 0xF100F110, 0xF1000001, 0xF1000F1F, 0x10000000, 0xF100F1F1, 0x00F1F100, 0xF1F10011,
|
||||
0x00F100F1, 0x00F1F100, 0xF1F100F1, 0x1F1F11F1, 0x00F1000F, 0x1100F100, 0x1F100000, 0xF100F111, 0xF1000000,
|
||||
0xF100F1F1, 0x00F1F100, 0xF11FFF10, 0x00F100F1, 0x00F1F100, 0xF1F1F1F1, 0x01F1101F, 0x1F1100F1, 0x1000F100,
|
||||
0x01F10000, 0xF1001100, 0x11000000, 0xFFFF11F1, 0xF1F1FFFF, 0x110111F1, 0x00F100F1, 0x00F11F1F, 0x11F1F1F1,
|
||||
0x0F1F1001, 0xF1100F11, 0x0000F100, 0x001F1000, 0xF1000000, 0x00000000, 0xF11110F1, 0x1F11F11F, 0x10F100F1,
|
||||
0x00F100F1, 0x00F10F1F, 0x10F1F1F1, 0xF111F100, 0xF100F110, 0x0000F100, 0x0001F100, 0xF1000000, 0x00000000,
|
||||
0xF100001F, 0xF1F1F101, 0xF11FFF11, 0x00F1001F, 0xFF1101F1, 0x101F1F11, 0xF100F100, 0xF100FFFF, 0xF100FF10,
|
||||
0x0000110F, 0xF1000000, 0x00FFFFF1, 0x11000001, 0x11111100, 0x11011110, 0x00110001, 0x11100011, 0x00011110,
|
||||
0x11001100, 0x11001111, 0x11001110, 0x00000001, 0x11000000, 0x00111111, 0x00000000, 0x0000F100, 0x00000000,
|
||||
0x000F1000, 0x000000FF, 0x10000000, 0xF1000000, 0x00000000, 0x00F10000, 0x0FF10000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x0000F100, 0x00000000, 0x000F1000, 0x00000F11, 0x100FF100, 0xF1000000, 0xF100000F, 0x10F10000,
|
||||
0x01F10000, 0x00000000, 0x00000000, 0x0000000F, 0xF100FFF1, 0x000FF100, 0x0FFF100F, 0xF1000F10, 0x00F11F10,
|
||||
0xFFF10000, 0x11000001, 0x10F10F10, 0x00F1000F, 0x1F10FFF1, 0x000FF100, 0x00000001, 0x1F10F11F, 0x10F11F10,
|
||||
0xF11F10F1, 0x1F10FFF1, 0x00F10F10, 0xF11F1000, 0xF100000F, 0x10F1F110, 0x00F100F1, 0xF1F1F11F, 0x10F11F10,
|
||||
0x0000000F, 0xFF10F10F, 0x10F10110, 0xF10F10FF, 0xFF101F11, 0x001FFF10, 0xF10F1000, 0xF100000F, 0x10FF1100,
|
||||
0x00F100F1, 0xF1F1F10F, 0x10F10F10, 0x000000F1, 0x1F10F10F, 0x10F10F10, 0xF10F10F1, 0x11100F10, 0x00011F10,
|
||||
0xF10F1000, 0xF100F10F, 0x10F1F100, 0x00F100F1, 0xF1F1F10F, 0x10F10F10, 0x0000001F, 0xF1F1FFF1, 0x101FF110,
|
||||
0x1FFF101F, 0xFF100F10, 0x000FF110, 0xF10F1000, 0xF1001FF1, 0x10F11F10, 0x0FFF10F1, 0xF1F1F10F, 0x101FF110,
|
||||
0x00000001, 0x11111111, 0x00011100, 0x01111001, 0x11100110, 0x00011100, 0x11011000, 0x11000111, 0x00110110,
|
||||
0x01111011, 0x11111101, 0x10011100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000F10, 0x00F1000F, 0x1000FFFF, 0xF1000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00F10000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000F110, 0x00F10001, 0xF1001111, 0x11000000,
|
||||
0x0FF1000F, 0xF100F1FF, 0x100FFFF1, 0x00F100F1, 0x0F10F100, 0xF1F100F1, 0xF100F1F1, 0x0F10FFFF, 0x1000F100,
|
||||
0x00F10000, 0xF1000000, 0x00000000, 0xF11F10F1, 0x1F10FF11, 0x10F11111, 0x0FFF10F1, 0x0F10F100, 0xF1F1F1F1,
|
||||
0x1F1F11F1, 0x0F10111F, 0x100F1100, 0x00110000, 0x1F100000, 0x00000000, 0xF10F10F1, 0x0F10F110, 0x001FFF10,
|
||||
0x01F110F1, 0x0F10F100, 0xF1F1F1F1, 0x01F1101F, 0xFF100FF1, 0x1001F100, 0x00F10000, 0xF1100000, 0x00000000,
|
||||
0xFFF1101F, 0xFF10F100, 0x000111F1, 0x00F100F1, 0x0F101F1F, 0x11F1F1F1, 0x0F1F1001, 0x1F10F111, 0x0000F100,
|
||||
0x00F10000, 0xF1000000, 0x00000000, 0xF1110001, 0x1F10F100, 0x00FFFF11, 0x00FF101F, 0xF11001F1, 0x101F1F11,
|
||||
0xF111F10F, 0xF110FFFF, 0x10001F10, 0x00F1000F, 0x11000000, 0x00000000, 0x11000000, 0x01101100, 0x00111110,
|
||||
0x00111001, 0x11000011, 0x00011110, 0x11001101, 0x11001111, 0x10000110, 0x00110001, 0x10000000, 0x00000000,
|
||||
};
|
||||
|
||||
s32 func_80007A58(void);
|
||||
void func_80007FC4(Gfx**, s32);
|
||||
void func_800080E0(void);
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void func_800069F0(void) {
|
||||
u8 a;
|
||||
u8 b;
|
||||
u8 g;
|
||||
u8 r;
|
||||
|
||||
if (D_800A7464->unk_11 == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
r = RGBA16_GET_R(D_800A7464->unk_14);
|
||||
g = RGBA16_GET_G(D_800A7464->unk_14);
|
||||
b = RGBA16_GET_B(D_800A7464->unk_14);
|
||||
|
||||
r = ((r << 3) | (r >> 2)) & 0xFF;
|
||||
g = ((g << 3) | (g >> 2)) & 0xFF;
|
||||
b = ((b << 3) | (b >> 2)) & 0xFF;
|
||||
|
||||
switch (D_800A7464->unk_11) {
|
||||
default:
|
||||
a = a;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
a = 0xFF;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
a = (0xFF - ((D_800A7464->unk_13 * 0xFF) / D_800A7464->unk_12));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
a = ((D_800A7464->unk_13 * 0xFF) / D_800A7464->unk_12);
|
||||
break;
|
||||
}
|
||||
|
||||
if (a != 0) {
|
||||
gDPSetEnvColor(gDisplayListHead++, r, g, b, a);
|
||||
gSPDisplayList(gDisplayListHead++, D_80068C68);
|
||||
}
|
||||
|
||||
if (D_800A7464->unk_11 == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
D_800A7464->unk_13++;
|
||||
if (D_800A7464->unk_13 == D_800A7464->unk_12) {
|
||||
if (D_800A7464->unk_11 == 2) {
|
||||
D_800A7464->unk_11 = 0;
|
||||
} else {
|
||||
D_800A7464->unk_11 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void func_800069F0(void);
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/stage_loader/func_800069F0.s")
|
||||
#endif
|
||||
|
||||
s32 func_80006C04(s32 arg0) {
|
||||
s32 ret = 0;
|
||||
|
||||
if ((D_800A7464 != NULL) && ((D_800A7464->unk_11 == 1) || (D_800A7464->unk_11 == 0))) {
|
||||
if (D_800A7464->unk_11 == 1) {
|
||||
D_800A7464->unk_11 = 2;
|
||||
} else {
|
||||
D_800A7464->unk_11 = 3;
|
||||
}
|
||||
|
||||
ret = 1;
|
||||
D_800A7464->unk_13 = 0;
|
||||
D_800A7464->unk_12 = arg0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80006C6C(s32 arg0) {
|
||||
s32 ret = 0;
|
||||
|
||||
if ((D_800A7464 != NULL) && (D_800A7464->unk_11 == 1)) {
|
||||
ret = func_80006C04(arg0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80006CB4(s32 arg0) {
|
||||
s32 ret = 0;
|
||||
|
||||
if ((D_800A7464 != NULL) && (D_800A7464->unk_11 == 0)) {
|
||||
ret = func_80006C04(arg0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void func_80006CF8(s32 arg0) {
|
||||
if (D_800A7464 != NULL) {
|
||||
D_800A7464->unk_11 = arg0;
|
||||
D_800A7464->unk_13 = 0;
|
||||
D_800A7464->unk_12 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80006D28(u32 arg0, u32 arg1) {
|
||||
if (arg0 < 3) {
|
||||
gShowCPUProfiler = arg0;
|
||||
}
|
||||
|
||||
if (arg1 < 2) {
|
||||
gShowMEMProfiler = arg1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80006D50(void) {
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPPipelineMode(gDisplayListHead++, G_PM_1PRIMITIVE);
|
||||
gDPSetTextureLOD(gDisplayListHead++, G_TL_TILE);
|
||||
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
|
||||
gDPSetTextureDetail(gDisplayListHead++, G_TD_CLAMP);
|
||||
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
|
||||
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
|
||||
gDPSetTextureConvert(gDisplayListHead++, G_TC_FILT);
|
||||
gDPSetCombineKey(gDisplayListHead++, G_CK_NONE);
|
||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
||||
gDPSetColorDither(gDisplayListHead++, G_CD_MAGICSQ);
|
||||
gDPSetAlphaDither(gDisplayListHead++, G_AD_PATTERN);
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
}
|
||||
|
||||
void func_80006F34(void) {
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
||||
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
gSPTexture(gDisplayListHead++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
||||
}
|
||||
|
||||
void func_80006F98(void) {
|
||||
func_80006450();
|
||||
Memmap_SetSegmentMap(0, 0x80000000, osMemSize);
|
||||
Memmap_SetSegments(&gDisplayListHead);
|
||||
func_80006D50();
|
||||
func_80006F34();
|
||||
}
|
||||
|
||||
void func_80006FE8(void) {
|
||||
func_80006498(&gDisplayListHead, D_800A7464->unk_18[D_800A7464->unk_16]);
|
||||
guOrtho(&D_800A7468, 0.0f, 320.0f, 0.0f, 240.0f, -2.0f, 2.0f, 1.0f);
|
||||
func_80006D50();
|
||||
func_80006F34();
|
||||
|
||||
gSPMatrix(gDisplayListHead++, (u32)&D_80068BC8 & 0x1FFFFFFF, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(gDisplayListHead++, (u32)&D_800A7468 & 0x1FFFFFFF, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPPerspNormalize(gDisplayListHead++, 0xFFFF);
|
||||
|
||||
if (D_800A7464->unk_0C == 1) {
|
||||
gSPViewport(gDisplayListHead++, (u32)&D_80068C18 & 0x1FFFFFFF);
|
||||
} else {
|
||||
gSPViewport(gDisplayListHead++, (u32)&D_80068C08 & 0x1FFFFFFF);
|
||||
}
|
||||
|
||||
func_800060E0(&gDisplayListHead, 0, 0, D_800A7464->unk_00, D_800A7464->unk_02);
|
||||
func_800069F0();
|
||||
|
||||
if (gShowCPUProfiler != 0) {
|
||||
print_profiler_metrics();
|
||||
}
|
||||
|
||||
func_80007FC4(&gDisplayListHead, func_80007A58());
|
||||
|
||||
if (gShowCPUProfiler != 0) {
|
||||
draw_profiler(gShowCPUProfiler - 1);
|
||||
}
|
||||
|
||||
if ((gShowCPUProfiler != 0) && (gShowMEMProfiler != 0)) {
|
||||
Util_DrawMemProfiler(&gDisplayListHead);
|
||||
}
|
||||
|
||||
gDPFullSync(gDisplayListHead++);
|
||||
gSPEndDisplayList(gDisplayListHead++);
|
||||
|
||||
func_80005F5C(0);
|
||||
}
|
||||
|
||||
void func_80007234(void) {
|
||||
func_80005EDC();
|
||||
func_80006F98();
|
||||
}
|
||||
|
||||
void func_8000725C(void) {
|
||||
func_80006FE8();
|
||||
D_800A7450.unk_00 = D_800A7464->unk_10;
|
||||
D_800A7450.unk_01 = D_800A7464->unk_0C;
|
||||
D_800A7450.unk_02 = D_800A7464->unk_0D;
|
||||
D_800A7450.unk_03 = D_800A7464->unk_16;
|
||||
D_800A7450.unk_0C = D_800A7464->unk_18[D_800A7464->unk_16];
|
||||
func_80005F1C(&D_800A7450.unk_04, &D_800A7450.unk_08);
|
||||
D_800A7464->unk_16++;
|
||||
if (D_800A7464->unk_16 == D_800A7464->unk_0E) {
|
||||
D_800A7464->unk_16 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80007304(void) {
|
||||
func_800079C4();
|
||||
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_FILL);
|
||||
gDPSetFillColor(gDisplayListHead++, (D_800A7464->unk_14 << 0x10) | D_800A7464->unk_14);
|
||||
gDPFillRectangle(gDisplayListHead++, D_800A7464->unk_04, D_800A7464->unk_08, D_800A7464->unk_06,
|
||||
D_800A7464->unk_0A);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
||||
}
|
||||
|
||||
unk_func_80007444* func_80007444(s8 arg0, s8 arg1, s8 arg2, s8 arg3, s8 arg4, s32 arg5) {
|
||||
unk_func_80007444* temp_v0 = main_pool_alloc(0x24, 0);
|
||||
|
||||
if (temp_v0 != NULL) {
|
||||
if (arg0 == 1) {
|
||||
temp_v0->unk_00 = 0x280, temp_v0->unk_02 = 0x1E0;
|
||||
} else {
|
||||
temp_v0->unk_00 = 0x140, temp_v0->unk_02 = 0xF0;
|
||||
}
|
||||
|
||||
temp_v0->unk_11 = 1;
|
||||
temp_v0->unk_0C = arg0;
|
||||
temp_v0->unk_0D = arg1;
|
||||
temp_v0->unk_0E = arg2;
|
||||
temp_v0->unk_0F = arg3;
|
||||
temp_v0->unk_10 = arg4;
|
||||
temp_v0->unk_14 = func_80001B2C();
|
||||
temp_v0->unk_16 = 0;
|
||||
temp_v0->unk_04 = 0;
|
||||
temp_v0->unk_06 = temp_v0->unk_00 - 1;
|
||||
temp_v0->unk_08 = 0;
|
||||
temp_v0->unk_0A = temp_v0->unk_02 - 1;
|
||||
|
||||
temp_v0->unk_18[0] = 0;
|
||||
temp_v0->unk_18[1] = 0;
|
||||
temp_v0->unk_18[2] = 0;
|
||||
|
||||
if (arg5 != 0) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < temp_v0->unk_0E; i++) {
|
||||
temp_v0->unk_18[i] = func_80006314(0, 2, temp_v0->unk_00, temp_v0->unk_02, 1);
|
||||
}
|
||||
|
||||
if (temp_v0->unk_0F == 1) {
|
||||
void* temp_s3 = func_80006314(0, 2, temp_v0->unk_00, temp_v0->unk_02, 0);
|
||||
|
||||
for (i = 0; i < temp_v0->unk_0E; i++) {
|
||||
func_80006414(temp_v0->unk_18[i], temp_s3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return temp_v0;
|
||||
}
|
||||
|
||||
unk_func_80007444* func_800075F8(void) {
|
||||
return D_800A7464;
|
||||
}
|
||||
|
||||
s32 func_80007604(void) {
|
||||
return D_800A7464->unk_11;
|
||||
}
|
||||
|
||||
void func_80007614(unk_func_80007444* arg0) {
|
||||
arg0->unk_11 = D_800A7464->unk_11;
|
||||
arg0->unk_12 = D_800A7464->unk_12;
|
||||
arg0->unk_13 = D_800A7464->unk_13;
|
||||
arg0->unk_14 = D_800A7464->unk_14;
|
||||
|
||||
if (D_800A7464->unk_16 < arg0->unk_0E) {
|
||||
arg0->unk_16 = D_800A7464->unk_16;
|
||||
} else {
|
||||
arg0->unk_16 = 0;
|
||||
}
|
||||
|
||||
D_800A7464 = arg0;
|
||||
}
|
||||
|
||||
void func_80007678(unk_func_80007444* arg0) {
|
||||
D_800A7464 = arg0;
|
||||
func_80001BA8(NULL);
|
||||
func_80001B7C();
|
||||
func_80001AD4(arg0->unk_14);
|
||||
func_80007234();
|
||||
}
|
||||
|
||||
void func_800076C0(void) {
|
||||
if (D_800A7464 != NULL) {
|
||||
func_80007304();
|
||||
func_8000725C();
|
||||
func_80001BA8(&D_800A7450);
|
||||
func_80001B7C();
|
||||
func_80001BD4(2);
|
||||
D_800A7464 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8000771C(void) {
|
||||
while (func_80001C90() == 0) {}
|
||||
}
|
||||
|
||||
void func_80007754(void) {
|
||||
Memmap_SetSegments(&gDisplayListHead);
|
||||
}
|
||||
|
||||
s32 func_80007778(void) {
|
||||
func_8000725C();
|
||||
func_80001BA8(&D_800A7450);
|
||||
func_80001B7C();
|
||||
func_80007234();
|
||||
}
|
||||
|
||||
void func_800077B4(s32 arg0) {
|
||||
while (arg0-- > 0) {
|
||||
func_80007304();
|
||||
func_8000725C();
|
||||
func_80001BA8(&D_800A7450);
|
||||
func_80001B7C();
|
||||
func_80007234();
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80007820(u32 arg0, s32 (*arg1)(u8)) {
|
||||
s32 var_s1 = 0;
|
||||
|
||||
if (arg0 == 0) {
|
||||
while (var_s1 == 0) {
|
||||
var_s1 = arg1(D_800A7464->unk_11);
|
||||
func_80007778();
|
||||
}
|
||||
} else {
|
||||
while (arg0-- > 0) {
|
||||
var_s1 = arg1(D_800A7464->unk_11);
|
||||
func_80007778();
|
||||
if (var_s1 != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return var_s1;
|
||||
}
|
||||
|
||||
s32 func_800078D4(s32 (*arg0)(u8), s32 arg1, s32 arg2) {
|
||||
s32 temp_v0;
|
||||
s32 var_s0;
|
||||
s32 var_s2;
|
||||
|
||||
var_s2 = 0;
|
||||
var_s0 = 1;
|
||||
func_80006C6C(arg1);
|
||||
|
||||
while (var_s0 != 0) {
|
||||
temp_v0 = arg0(D_800A7464->unk_11);
|
||||
if (var_s2 == 0) {
|
||||
if (temp_v0 != 0) {
|
||||
var_s2 = temp_v0;
|
||||
func_80006CB4(arg2);
|
||||
}
|
||||
} else if (D_800A7464->unk_11 == 1) {
|
||||
var_s0 = 0;
|
||||
}
|
||||
func_80007778();
|
||||
}
|
||||
|
||||
return var_s2;
|
||||
}
|
||||
|
||||
void func_80007990(u16 arg0) {
|
||||
if (D_800A7464 != NULL) {
|
||||
D_800A7464->unk_14 = arg0;
|
||||
func_80001AD4(arg0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800079C4(void) {
|
||||
if (D_800A7464 != NULL) {
|
||||
func_80006498(&gDisplayListHead, D_800A7464->unk_18[D_800A7464->unk_16]);
|
||||
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
||||
}
|
||||
}
|
||||
|
||||
void* func_80007A2C(void) {
|
||||
void* ret = NULL;
|
||||
|
||||
if (D_800A7464 != NULL) {
|
||||
ret = D_800A7464->unk_18[D_800A7464->unk_16];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80007A58(void) {
|
||||
s32 ret = 0;
|
||||
|
||||
if (D_800A7464 != NULL) {
|
||||
ret = D_800A7464->unk_0C == 1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void func_80007A80(void) {
|
||||
gDPPipeSync(D_800A74B0++);
|
||||
gDPSetCycleType(D_800A74B0++, G_CYC_1CYCLE);
|
||||
gDPSetTexturePersp(D_800A74B0++, G_TP_NONE);
|
||||
gDPSetTextureFilter(D_800A74B0++, G_TF_POINT);
|
||||
gDPSetPrimColor(D_800A74B0++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetRenderMode(D_800A74B0++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
||||
gDPSetCombineMode(D_800A74B0++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPLoadTextureBlock_4b(D_800A74B0++, (u32)D_80068CB0 & 0x1FFFFFFF, G_IM_FMT_IA, 96, 48, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 7, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
}
|
||||
|
||||
void func_80007C3C(void) {
|
||||
gDPPipeSync(D_800A74B0++);
|
||||
gDPSetTexturePersp(D_800A74B0++, G_TP_PERSP);
|
||||
gDPSetTextureFilter(D_800A74B0++, G_TF_BILERP);
|
||||
gDPSetAlphaCompare(D_800A74B0++, G_AC_NONE);
|
||||
gSPTexture(D_800A74B0++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF);
|
||||
}
|
||||
|
||||
void func_80007CD8(s16 arg0, s16 arg1, s16 arg2) {
|
||||
gSPTextureRectangle(D_800A74B0++, arg0 * 4, arg1 * 4, (arg0 + 6) << 2, (arg1 + 8) << 2, G_TX_RENDERTILE,
|
||||
((arg2 % 16) * 6) << 5, (u16)(arg2 / 16) << 8, 0x0400, 0x0400);
|
||||
}
|
||||
|
||||
void func_80007DE4(s16 arg0, s16 arg1, s16 arg2) {
|
||||
gSPTextureRectangle(D_800A74B0++, arg0 * 8, arg1 * 8, (arg0 + 6) << 3, (arg1 + 8) << 3, G_TX_RENDERTILE,
|
||||
((arg2 % 16) * 6) << 5, (u16)(arg2 / 16) << 8, 0x0200, 0x0200);
|
||||
}
|
||||
|
||||
void func_80007EF0(s16 arg0, s16 arg1, s8* arg2, s32 arg3) {
|
||||
s32 temp_s0;
|
||||
|
||||
while (*arg2 != 0) {
|
||||
temp_s0 = (*arg2++ & 0x7F) - 0x20;
|
||||
if (temp_s0 != 0) {
|
||||
if (arg3 == 0) {
|
||||
func_80007CD8(arg0, arg1, temp_s0);
|
||||
}
|
||||
|
||||
if (arg3 == 1) {
|
||||
func_80007DE4(arg0, arg1, temp_s0);
|
||||
}
|
||||
}
|
||||
arg0 += 6;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80007FC4(Gfx** arg0, s32 arg1) {
|
||||
unk_D_80068CA0* var_s0 = D_80068CA0;
|
||||
unk_D_80068CA0* var_s2 = D_80068CA4;
|
||||
|
||||
D_800A74B0 = *arg0;
|
||||
|
||||
if ((var_s0 != NULL) || (var_s2 != NULL)) {
|
||||
func_80007A80();
|
||||
|
||||
while (var_s0 != NULL) {
|
||||
unk_D_80068CA0* next = var_s0->next;
|
||||
|
||||
func_80007EF0(var_s0->unk_04, var_s0->unk_06, var_s0->unk_08, arg1);
|
||||
Util_Free(var_s0);
|
||||
var_s0 = next;
|
||||
}
|
||||
|
||||
while (var_s2 != NULL) {
|
||||
func_80007EF0(var_s2->unk_04, var_s2->unk_06, var_s2->unk_08, arg1);
|
||||
var_s2 = var_s2->next;
|
||||
}
|
||||
|
||||
func_80007C3C();
|
||||
D_80068CA0 = NULL;
|
||||
}
|
||||
|
||||
*arg0 = D_800A74B0;
|
||||
|
||||
D_80068CA8++;
|
||||
if (D_80068CA8 >= 0x384) {
|
||||
D_80068CA8 = 0;
|
||||
if (D_80068CA4 != NULL) {
|
||||
func_800080E0();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_800080E0(void) {
|
||||
unk_D_80068CA0* var_s0 = D_80068CA4;
|
||||
|
||||
while (var_s0 != NULL) {
|
||||
unk_D_80068CA0* next = var_s0->next;
|
||||
|
||||
Util_Free(var_s0);
|
||||
var_s0 = next;
|
||||
}
|
||||
|
||||
D_80068CA4 = NULL;
|
||||
}
|
||||
|
||||
char* func_80008130(char* buffer, const char* data, size_t size) {
|
||||
return (char*)memcpy(buffer, data, size) + size;
|
||||
}
|
||||
|
||||
s32 HAL_Printf(s16 x, s16 y, const char* fmt, ...) {
|
||||
s32 sp124;
|
||||
char sp20[0x104];
|
||||
unk_D_80068CA0* sp1C;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
sp124 = _Printf(func_80008130, sp20, fmt, args);
|
||||
|
||||
if (sp124 > 0) {
|
||||
sp1C = Util_Malloc(sp124 + sizeof(unk_D_80068CA0));
|
||||
if (sp1C != NULL) {
|
||||
sp1C->unk_04 = x;
|
||||
sp1C->unk_06 = y;
|
||||
memcpy(sp1C->unk_08, &sp20, sp124);
|
||||
sp1C->unk_08[sp124] = 0;
|
||||
sp1C->next = D_80068CA0;
|
||||
D_80068CA0 = sp1C;
|
||||
}
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
return sp124;
|
||||
}
|
||||
|
||||
s32 func_800081F8(s16 x, s16 y, const char* fmt, ...) {
|
||||
s32 sp124;
|
||||
char sp20[0x104];
|
||||
unk_D_80068CA0* sp1C;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
D_80068CA8 = 0;
|
||||
sp124 = _Printf(func_80008130, sp20, fmt, args);
|
||||
if (sp124 > 0) {
|
||||
sp1C = Util_Malloc(sp124 + sizeof(unk_D_80068CA0));
|
||||
if (sp1C != NULL) {
|
||||
sp1C->unk_04 = x;
|
||||
sp1C->unk_06 = y;
|
||||
memcpy(sp1C->unk_08, &sp20, sp124);
|
||||
sp1C->unk_08[sp124] = 0;
|
||||
sp1C->next = D_80068CA4;
|
||||
D_80068CA4 = sp1C;
|
||||
}
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
return sp124;
|
||||
}
|
||||
17
src/stage_loader.h
Normal file
17
src/stage_loader.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _STAGE_LOADER_H_
|
||||
#define _STAGE_LOADER_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
s32 func_80006C6C(s32);
|
||||
s32 func_80006CB4(s32);
|
||||
unk_func_80007444* func_80007444(s8 arg0, s8 arg1, s8 arg2, s8 arg3, s8 arg4, s32 arg5);
|
||||
s32 func_80007604(void);
|
||||
void func_80007678(unk_func_80007444*);
|
||||
void func_800076C0(void);
|
||||
s32 func_80007778(void);
|
||||
void func_800077B4(s32);
|
||||
void func_800079C4(void);
|
||||
|
||||
|
||||
#endif // _STAGE_LOADER_H_
|
||||
|
|
@ -28,6 +28,7 @@ CPP_FLAGS = [
|
|||
"-Iinclude/PR",
|
||||
"-Isrc",
|
||||
"-I.",
|
||||
"-DM2C",
|
||||
]
|
||||
|
||||
import os
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user