This commit is contained in:
petrie911 2024-02-12 12:53:43 -06:00 committed by GitHub
parent 8754a483f2
commit 32ff1bf34d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 123 additions and 107 deletions

View File

@ -338,13 +338,14 @@ extern f32 D_80161A44;
// fox_play
extern u8 D_80161A50;
extern f32 D_80161A54;
//
extern s32 D_80161A58;
extern s32 D_80161A5C;
extern u16 D_Timer_80161A60;
extern u16 D_80161A62;
extern s32 D_80161A64;
extern EnvSettings* sEnvSettings;
//
// fox_context
extern s32 D_80161A70; // Color32?
extern s32 D_80161A74;
extern s32 D_80161A78;

6
src/main/fox_context.c Normal file
View File

@ -0,0 +1,6 @@
#include "global.h"
u8 D_800D3180[30] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
UNK_TYPE D_800D31A0[4] = { 0 };

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering2.h"
#include "global.h"
#include "fox_map.h"
@ -14,59 +15,15 @@ u8 D_800D2F6C[20] = {
PLANET_CORNERIA, PLANET_MACBETH, PLANET_TITANIA, PLANET_AQUAS, PLANET_FORTUNA,
PLANET_METEO, PLANET_KATINA, PLANET_BOLSE, PLANET_SECTOR_Z, SAVE_SLOT_VENOM_2,
};
Vec3f D_800D2F80 = { -65.0f, -22.0f, -65.0f };
Vec3f D_800D2F8C = { 65.0f, -22.0f, -65.0f };
EnvSettings* D_800D2F98[21] = {
&D_6037160, &D_ENV_6026C80, &D_602A120, &D_6023F20, &D_6028760, &D_602E4B0, &D_6007E30,
&D_601F1F0, &D_60266D0, &D_C035110, &D_6006A60, &D_6030E30_Env, &D_6005000, &D_602E540,
&D_600EA90, NULL, &D_6011000, &D_600FF30_Env, &D_6006E70, &D_6014D50, &D_302DD70,
};
f32 D_800D2FEC[5] = {
0.0f, 0.5f, -0.5f, 0.5f, -0.5f,
};
s32 D_800D3000[4][4] = {
{ 20, 40, 0, 0 },
{ 20, 20, 0, 0 },
{ 0, 0, 0, 0 },
{ 80, 120, 0, 0 },
};
Vec3f D_800D3040[6] = {
{ 0.0f, -20.0f, 0.0f }, { -17.5f, -17.5f, 0.0f }, { -17.5f, 17.5f, 0.0f },
{ 0.0f, 20.0f, 0.0f }, { 17.5f, 17.5f, 0.0f }, { 17.5f, -17.5f, 0.0f },
};
Vec3f D_800D3088[4] = {
{ 0.0f, -20.0f, 0.0f },
{ 0.0f, 20.0f, 0.0f },
{ 20.0f, 0.0f, 0.0f },
{ -20.0f, 0.0f, 0.0f },
};
Vec3f D_800D30B8[4] = {
{ 0.0f, -20.0f, 0.0f },
{ 0.0f, 20.0f, 0.0f },
{ -20.0f, 0.0f, 0.0f },
{ 20.0f, 0.0f, 0.0f },
};
Vec3f D_800D30E8 = { 0.0f, -10.0f, 0.0f };
f32 D_800D30F4[4] = { 3.0f, 4.0f, 5.0f, 3.0f };
f32 D_800D3104[4] = { 0.2f, 0.25f, 0.3f, 0.2f };
f32 D_800D3114[4] = { 10000.0f, -10000.0f, 10000.0f, -10000.0f };
f32 D_800D3124[12] = {
10000.0f, -10000.0f, -10000.0f, 10000.0f, 500.0f, -500.0f, 500.0f, -500.0f, 500.0f, -500.0f, -500.0f, 500.0f,
};
f32 D_800D3154[4] = {
45.0f,
-135.0f,
135.0f,
-45.0f,
};
s32 D_800D3164[6] = {
1, 1, -1, 1, -1, 1,
};
u8 D_800D317C = 255;
u8 D_800D3180[30] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
UNK_TYPE D_800D31A0[4] = { 0 };
u8 D_80161A50;
f32 D_80161A54;
s32 D_80161A58;
s32 D_80161A5C;
u16 D_Timer_80161A60;
u16 D_80161A62;
s32 D_80161A64;
EnvSettings* sEnvSettings;
extern f32 D_i3_801C4188;
@ -251,8 +208,8 @@ void func_800A46A0(Player* player) {
}
void func_800A4C40(Player* player) {
Vec3f sp54 = D_800D2F80;
Vec3f sp48 = D_800D2F8C;
Vec3f sp54 = { -65.0f, -22.0f, -65.0f };
Vec3f sp48 = { 65.0f, -22.0f, -65.0f };
Vec3f sp3C;
Vec3f sp30;
@ -493,6 +450,12 @@ void func_800A5844(void) {
}
}
EnvSettings* D_800D2F98[21] = {
&D_6037160, &D_ENV_6026C80, &D_602A120, &D_6023F20, &D_6028760, &D_602E4B0, &D_6007E30,
&D_601F1F0, &D_60266D0, &D_C035110, &D_6006A60, &D_6030E30_Env, &D_6005000, &D_602E540,
&D_600EA90, NULL, &D_6011000, &D_600FF30_Env, &D_6006E70, &D_6014D50, &D_302DD70,
};
void func_800A594C(void) {
if (gVersusMode) {
switch (gVersusStage) {
@ -949,6 +912,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
}
}
f32 D_800D2FEC[5] = {
0.0f, 0.5f, -0.5f, 0.5f, -0.5f,
};
void func_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) {
player->unk_21C = arg1;
switch (arg1) {
@ -1466,6 +1433,29 @@ void func_800A86E4(Player* player) {
}
}
s32 D_800D3000[4][4] = {
{ 20, 40, 0, 0 },
{ 20, 20, 0, 0 },
{ 0, 0, 0, 0 },
{ 80, 120, 0, 0 },
};
Vec3f D_800D3040[6] = {
{ 0.0f, -20.0f, 0.0f }, { -17.5f, -17.5f, 0.0f }, { -17.5f, 17.5f, 0.0f },
{ 0.0f, 20.0f, 0.0f }, { 17.5f, 17.5f, 0.0f }, { 17.5f, -17.5f, 0.0f },
};
Vec3f D_800D3088[4] = {
{ 0.0f, -20.0f, 0.0f },
{ 0.0f, 20.0f, 0.0f },
{ 20.0f, 0.0f, 0.0f },
{ -20.0f, 0.0f, 0.0f },
};
Vec3f D_800D30B8[4] = {
{ 0.0f, -20.0f, 0.0f },
{ 0.0f, 20.0f, 0.0f },
{ -20.0f, 0.0f, 0.0f },
{ 20.0f, 0.0f, 0.0f },
};
void func_800A8804(Player* playerA, Player* playerB) {
if (playerA->timer_498 == 0) {
Player_ApplyDamage(playerA, 0, D_800D3000[playerA->form][playerB->form]);
@ -2112,7 +2102,7 @@ void func_800AA800(Player* player) {
Vec3f spBC;
Vec3f spB0;
f32 spA8[2];
Vec3f sp9C = D_800D30E8;
Vec3f sp9C = { 0.0f, -10.0f, 0.0f };
Vec3f* rot;
s32 pad3;
s32 pad4;
@ -3816,6 +3806,9 @@ void func_800AF928(Player* player) {
func_800A46A0(player);
}
f32 D_800D30F4[4] = { 3.0f, 4.0f, 5.0f, 3.0f };
f32 D_800D3104[4] = { 0.2f, 0.25f, 0.3f, 0.2f };
void func_800B00C0(Player* player) {
f32 sp2C = 0.0f;
f32 sp28 = 0.7f;
@ -4022,6 +4015,14 @@ void func_800B0194(Player* player) {
player->unk_138 = player->pos.z;
}
f32 D_800D3114[4] = { 10000.0f, -10000.0f, 10000.0f, -10000.0f };
f32 D_800D3124[4] = { 10000.0f, -10000.0f, -10000.0f, 10000.0f };
f32 D_800D3134[8] = {
// unused? possibly two f32[4]?
500.0f, -500.0f, 500.0f, -500.0f, 500.0f, -500.0f, -500.0f, 500.0f,
};
f32 D_800D3154[4] = { 45.0f, -135.0f, 135.0f, -45.0f };
void func_800B0F50(Player* playerx) {
s32 j;
Vec3f* sp38;
@ -4876,6 +4877,10 @@ void func_800B3314(Player* player) {
}
}
s32 D_800D3164[6] = {
1, 1, -1, 1, -1, 1,
};
void func_800B39E0(Player* player) {
s32 i;
@ -6291,6 +6296,8 @@ void func_800B832C(void) {
func_800B79B0();
}
u8 D_800D317C = 255;
void func_800B852C(ObjectId objId, Item* item) {
u8 sp1F = (u8) RAND_FLOAT(5.0f);

View File

@ -281,6 +281,7 @@
- [0xD3460, .data, fox_game]
- [0xD3520, .data, fox_A4290]
- [0xD3B50, .data, fox_play]
- [0xD3D80, .data, fox_context]
- [0xD3DB0, .data, fox_rcp]
- [0xD5670, .data, fox_radio]
- [0xD5680, .data, fox_reset]
@ -320,59 +321,60 @@
# Nintendo Library bss
- { start: 0xDE480, type: .bss, vram: 0x800DD880, name: sys_joybus }
- { start: 0xDE480, type: bss, vram: 0x800DDAA0, name: sys_main }
- { start: 0xDE480, type: .bss, vram: 0x8013B3A0, name: sys_math }
- { start: 0xDE480, type: .bss, vram: 0x8013B3C0, name: sys_matrix }
- { start: 0xDE480, type: .bss, vram: 0x8013C3D0, name: sys_memory }
- { start: 0xDE480, type: .bss, vram: 0x80144BE0, name: sys_timer }
- { start: 0xDE480, type: .bss, vram: 0x80144F60, name: sys_save }
- { start: 0xDE480, type: .bss, vram: 0x80145360, name: sys_fault }
- { start: 0xDE480, type: bss, vram: 0x80145D40, name: sys_audio }
- { type: bss, vram: 0x800DDAA0, name: sys_main }
- { type: .bss, vram: 0x8013B3A0, name: sys_math }
- { type: .bss, vram: 0x8013B3C0, name: sys_matrix }
- { type: .bss, vram: 0x8013C3D0, name: sys_memory }
- { type: .bss, vram: 0x80144BE0, name: sys_timer }
- { type: .bss, vram: 0x80144F60, name: sys_save }
- { type: .bss, vram: 0x80145360, name: sys_fault }
- { type: bss, vram: 0x80145D40, name: sys_audio }
# Libultra bss
- { start: 0xDE480, type: bss, vram: 0x80156620, name: ../libultra/io/controller }
- { start: 0xDE480, type: bss, vram: 0x801566B0, name: ../libultra/io/motor }
- { start: 0xDE480, type: bss, vram: 0x801568F0, name: ../libultra/os/seteventmesg }
- { start: 0xDE480, type: bss, vram: 0x801569B0, name: ../libultra/io/sptask }
- { start: 0xDE480, type: bss, vram: 0x801569F0, name: ../libultra/io/vimgr }
- { start: 0xDE480, type: bss, vram: 0x80157C10, name: ../libultra/io/pimgr }
- { start: 0xDE480, type: bss, vram: 0x801593D0, name: ../libultra/os/initialize }
- { start: 0xDE480, type: bss, vram: 0x801593E0, name: ../libultra/io/conteepread }
- { start: 0xDE480, type: bss, vram: 0x80159420, name: ../libultra/io/cartrominit }
- { start: 0xDE480, type: bss, vram: 0x801594A0, name: ../libultra/io/siacs }
- { start: 0xDE480, type: bss, vram: 0x801594C0, name: ../libultra/io/pfsisplug }
- { start: 0xDE480, type: bss, vram: 0x80159500, name: ../libultra/os/timerintr }
- { start: 0xDE480, type: bss, vram: 0x80159560, name: ../libultra/io/leodiskinit }
- { start: 0xDE480, type: bss, vram: 0x801595E0, name: ../libultra/io/piacs }
- { start: 0xDE480, type: bss, vram: 0x80159600, name: ../libultra/debug/kdebugserver }
- { start: 0xDE480, type: bss, vram: 0x801597C0, name: ../libultra/host/readhost }
- { start: 0xDE480, type: bss, vram: 0x801597F0, name: ../libultra/rmon/rmonsio }
- { start: 0xDE480, type: bss, vram: 0x8015A010, name: ../libultra/os/initrdb }
- { start: 0xDE480, type: bss, vram: 0x8015A030, name: ../libultra/io/leointerrupt }
- { start: 0xDE480, type: bss, vram: 0x8015B030, name: ../libultra/rmon/rmonmem }
- { start: 0xDE480, type: bss, vram: 0x8015B130, name: ../libultra/rmon/rmonmisc }
- { start: 0xDE480, type: bss, vram: 0x8015F350, name: ../libultra/rmon/rmonregs }
- { start: 0xDE480, type: bss, vram: 0x8015F370, name: ../libultra/rmon/rmonbrk }
- { start: 0xDE480, type: bss, vram: 0x8015F480, name: ../libultra/rmon/rmonmain }
- { type: bss, vram: 0x80156620, name: ../libultra/io/controller }
- { type: bss, vram: 0x801566B0, name: ../libultra/io/motor }
- { type: bss, vram: 0x801568F0, name: ../libultra/os/seteventmesg }
- { type: bss, vram: 0x801569B0, name: ../libultra/io/sptask }
- { type: bss, vram: 0x801569F0, name: ../libultra/io/vimgr }
- { type: bss, vram: 0x80157C10, name: ../libultra/io/pimgr }
- { type: bss, vram: 0x801593D0, name: ../libultra/os/initialize }
- { type: bss, vram: 0x801593E0, name: ../libultra/io/conteepread }
- { type: bss, vram: 0x80159420, name: ../libultra/io/cartrominit }
- { type: bss, vram: 0x801594A0, name: ../libultra/io/siacs }
- { type: bss, vram: 0x801594C0, name: ../libultra/io/pfsisplug }
- { type: bss, vram: 0x80159500, name: ../libultra/os/timerintr }
- { type: bss, vram: 0x80159560, name: ../libultra/io/leodiskinit }
- { type: bss, vram: 0x801595E0, name: ../libultra/io/piacs }
- { type: bss, vram: 0x80159600, name: ../libultra/debug/kdebugserver }
- { type: bss, vram: 0x801597C0, name: ../libultra/host/readhost }
- { type: bss, vram: 0x801597F0, name: ../libultra/rmon/rmonsio }
- { type: bss, vram: 0x8015A010, name: ../libultra/os/initrdb }
- { type: bss, vram: 0x8015A030, name: ../libultra/io/leointerrupt }
- { type: bss, vram: 0x8015B030, name: ../libultra/rmon/rmonmem }
- { type: bss, vram: 0x8015B130, name: ../libultra/rmon/rmonmisc }
- { type: bss, vram: 0x8015F350, name: ../libultra/rmon/rmonregs }
- { type: bss, vram: 0x8015F370, name: ../libultra/rmon/rmonbrk }
- { type: bss, vram: 0x8015F480, name: ../libultra/rmon/rmonmain }
# Game engine bss
- { start: 0xDE480, type: .bss, vram: 0x8015F900, name: fox_360 }
- { start: 0xDE480, type: .bss, vram: 0x8015F950, name: fox_beam }
- { start: 0xDE480, type: .bss, vram: 0x8015F960, name: fox_bg }
- { start: 0xDE480, type: .bss, vram: 0x801613A0, name: fox_boss }
- { start: 0xDE480, type: .bss, vram: 0x801613B0, name: fox_display }
- { start: 0xDE480, type: .bss, vram: 0x801615D0, name: fox_edisplay }
- { start: 0xDE480, type: .bss, vram: 0x80161670, name: fox_enmy }
- { start: 0xDE480, type: .bss, vram: 0x80161690, name: fox_enmy2 }
- { start: 0xDE480, type: .bss, vram: 0x801616A0, name: fox_hud }
- { start: 0xDE480, type: .bss, vram: 0x80161950, name: fox_97F80 }
- { start: 0xDE480, type: .bss, vram: 0x801619A0, name: fox_std_lib }
- { start: 0xDE480, type: .bss, vram: 0x80161A10, name: fox_game }
- { start: 0xDE480, type: bss, vram: 0x80161A50, name: fox_play }
- { start: 0xDE480, type: .bss, vram: 0x80178580, name: fox_rcp }
- { start: 0xDE480, type: .bss, vram: 0x80178720, name: fox_radio }
- { start: 0xDE480, type: .bss, vram: 0x80178750, name: fox_versus }
- { start: 0xDE480, type: .bss, vram: 0x80178870, name: fox_save }
- { type: .bss, vram: 0x8015F900, name: fox_360 }
- { type: .bss, vram: 0x8015F950, name: fox_beam }
- { type: .bss, vram: 0x8015F960, name: fox_bg }
- { type: .bss, vram: 0x801613A0, name: fox_boss }
- { type: .bss, vram: 0x801613B0, name: fox_display }
- { type: .bss, vram: 0x801615D0, name: fox_edisplay }
- { type: .bss, vram: 0x80161670, name: fox_enmy }
- { type: .bss, vram: 0x80161690, name: fox_enmy2 }
- { type: .bss, vram: 0x801616A0, name: fox_hud }
- { type: .bss, vram: 0x80161950, name: fox_97F80 }
- { type: .bss, vram: 0x801619A0, name: fox_std_lib }
- { type: .bss, vram: 0x80161A10, name: fox_game }
- { type: .bss, vram: 0x80161A50, name: fox_play }
- { type: bss, vram: 0x80161A70, name: fox_context}
- { type: .bss, vram: 0x80178580, name: fox_rcp }
- { type: .bss, vram: 0x80178720, name: fox_radio }
- { type: .bss, vram: 0x80178750, name: fox_versus }
- { type: .bss, vram: 0x80178870, name: fox_save }
- name: dma_table
type: code