mirror of
https://github.com/zeldaret/st
synced 2026-09-07 11:11:37 -04:00
Merge headers from nitro decomp (#69)
* merge headers from nitro decomp * cleanup: use inlines from g2.h and gx.h when changing registers * cleanup: remove externs declarations in source files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_027e0cd8.hpp"
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
ARM Actor::Actor() {
|
||||
this->mVel.x = 0;
|
||||
@@ -21,9 +21,9 @@ ARM Actor::Actor() {
|
||||
this->mUnk_5C.func_ov000_020975f8();
|
||||
this->mRef.Reset();
|
||||
this->mpProfile = NULL;
|
||||
_MI_CpuCopy(&data_ov000_020b539c_eur.mUnk_00, &this->mUnk_5C, sizeof(ActorParams));
|
||||
Vec3p_Copy(&this->mUnk_5C.mInitialPos, &this->mPos);
|
||||
Vec3p_Copy(&this->mUnk_5C.mInitialPos, &this->mPrevPos);
|
||||
MI_CpuCopyFast(&data_ov000_020b539c_eur.mUnk_00, &this->mUnk_5C, sizeof(ActorParams));
|
||||
VecFx32_Copy(&this->mUnk_5C.mInitialPos, &this->mPos);
|
||||
VecFx32_Copy(&this->mUnk_5C.mInitialPos, &this->mPrevPos);
|
||||
this->mAngle = this->mUnk_5C.mInitialAngle;
|
||||
SET_FLAGS(this->mFlags, ActorFlag_Alive, ActorFlag_Visible, ActorFlag_Active, ActorFlag_14);
|
||||
this->mUnk_44 = 0xFF;
|
||||
@@ -82,7 +82,7 @@ ARM void Actor::func_ov000_020984f0() {
|
||||
}
|
||||
|
||||
// non-matching
|
||||
ARM void Actor::vfunc_00(Vec3p *param1) {
|
||||
ARM void Actor::vfunc_00(VecFx32 *param1) {
|
||||
*param1 = mPos;
|
||||
param1->y += mUnk_4E;
|
||||
// short sVar1;
|
||||
@@ -94,7 +94,7 @@ ARM void Actor::vfunc_00(Vec3p *param1) {
|
||||
// param1->z = this->mPos.z;
|
||||
}
|
||||
|
||||
ARM Vec3p *Actor::func_ov000_0209853c(unk32 param1) {
|
||||
ARM VecFx32 *Actor::func_ov000_0209853c(unk32 param1) {
|
||||
return data_027e0ce0->func_01fff148(param1);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ ARM unk32 Actor::vfunc_38(unk32 param1) {
|
||||
}
|
||||
|
||||
// non-matching
|
||||
ARM bool Actor::vfunc_3c(unk32 param2, Vec3p *param3) {
|
||||
ARM bool Actor::vfunc_3c(unk32 param2, VecFx32 *param3) {
|
||||
if (!GET_FLAG(this->mFlags, ActorFlag_Grabbed)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ ARM void ActorUnkEFIK::vfunc_20() {
|
||||
u16 random = gRandom.Next32(0, 6);
|
||||
|
||||
if (random == 0) {
|
||||
Vec3p vec;
|
||||
VecFx32 vec;
|
||||
pUVar5->func_ov000_020808f4(&vec, bStack_40, 0);
|
||||
data_027e0cec->func_ov000_020a0220(&this->mUnk_98, &vec);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
|
||||
extern "C" void func_01ffedac(u16 *, Vec3p *);
|
||||
extern "C" void func_01ffb9cc(void *, Vec3p *);
|
||||
extern "C" void func_01ffedac(u16 *, VecFx32 *);
|
||||
extern "C" void func_01ffb9cc(void *, VecFx32 *);
|
||||
|
||||
ARM DECL_PROFILE(ActorProfileUnkSWOB);
|
||||
|
||||
@@ -79,19 +79,19 @@ ARM void ActorUnkSWOB::func_ov000_0209aa30(void) {
|
||||
}
|
||||
break;
|
||||
case 2: {
|
||||
Vec3p temp;
|
||||
Vec3p vec2;
|
||||
Vec3p vec;
|
||||
VecFx32 temp;
|
||||
VecFx32 vec2;
|
||||
VecFx32 vec;
|
||||
ActorParams AStack_7c;
|
||||
u16 auStack_80[2];
|
||||
int j;
|
||||
u32 i;
|
||||
|
||||
data_ov000_020b5214.func_ov000_0206db44(0xA3);
|
||||
temp.coords = data_027e0ce0->func_01fff148(0)->coords;
|
||||
vec2.x = temp.x;
|
||||
vec2.y = temp.y + FLOAT_TO_Q20(3.0f);
|
||||
vec2.z = temp.z;
|
||||
temp = *data_027e0ce0->func_01fff148(0);
|
||||
vec2.x = temp.x;
|
||||
vec2.y = temp.y + FLOAT_TO_Q20(3.0f);
|
||||
vec2.z = temp.z;
|
||||
|
||||
AStack_7c.mUnk_28 = 0;
|
||||
AStack_7c.func_ov000_020975f8();
|
||||
@@ -104,7 +104,7 @@ ARM void ActorUnkSWOB::func_ov000_0209aa30(void) {
|
||||
vec.y = 0;
|
||||
vec.z = INT_TO_Q20(gRandom.Next32(0, 11) - 5);
|
||||
|
||||
Vec3p_Add(&vec, &vec2, &vec);
|
||||
VecFx32_Add(&vec, &vec2, &vec);
|
||||
|
||||
if (j < 10) {
|
||||
func_01ffedac(auStack_80, &vec);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "flags.h"
|
||||
#include "global.h"
|
||||
|
||||
ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a8ae0(q20 param1) {
|
||||
ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a8ae0(fx32 param1) {
|
||||
u32 posY = this->mVel.y;
|
||||
|
||||
if (posY <= param1) {
|
||||
@@ -110,10 +110,10 @@ ARM void ActorUnk_ov000_020a8bb0::vfunc_b4() {
|
||||
}
|
||||
|
||||
// non-matching
|
||||
ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a8e9c(Vec3p *param1) {
|
||||
q20 z = param1->x;
|
||||
q20 y = param1->y;
|
||||
q20 x = param1->z;
|
||||
ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a8e9c(VecFx32 *param1) {
|
||||
fx32 z = param1->x;
|
||||
fx32 y = param1->y;
|
||||
fx32 x = param1->z;
|
||||
|
||||
this->mUnk_0C0.x = x;
|
||||
this->mUnk_0C0.y = y;
|
||||
@@ -192,7 +192,7 @@ ARM unk32 ActorUnk_ov000_020a8bb0::vfunc_84() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a91b8(Vec3p *param1, unk32 param2) {
|
||||
ARM void ActorUnk_ov000_020a8bb0::func_ov000_020a91b8(VecFx32 *param1, unk32 param2) {
|
||||
this->func_ov000_020a8e9c(param1);
|
||||
|
||||
if (param2 != 0) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "Item/ItemManager.hpp"
|
||||
#include "Save/SaveManager.hpp"
|
||||
#include "System/Random.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "global.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
static const unk32 data_ov000_020afda8[] = {
|
||||
0x0015007E, 0x0015007F, 0x00150080, 0x00150081, 0x00150082, 0x00150083, 0x00150084, 0x00150085,
|
||||
@@ -86,7 +86,7 @@ extern u16 data_ov000_020afe90;
|
||||
extern u16 data_ov000_020afe94;
|
||||
|
||||
ARM void TreasureManager::func_ov000_020a9b10(void *param1) {
|
||||
_MI_CpuCopy(param1, this, sizeof(TreasureManager));
|
||||
MI_CpuCopyFast(param1, this, sizeof(TreasureManager));
|
||||
}
|
||||
|
||||
ARM unk32 TreasureManager::func_ov000_020a9b2c(unk32 param1) {
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "Actor/ActorManager.hpp"
|
||||
#include "Physics/Cylinder.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "Unknown/UnkStruct_027e0998.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b4.hpp"
|
||||
#include "Unknown/UnkStruct_027e0cd8.hpp"
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5d34.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" void func_01ffb714(Vec3p *, Vec3p *, void *);
|
||||
extern "C" void func_01ffb9cc(Vec3p *, Vec3p *);
|
||||
extern "C" u16 func_01ffbbe0(q20 x, q20 z);
|
||||
extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *);
|
||||
extern "C" void func_01ffb9cc(VecFx32 *, VecFx32 *);
|
||||
extern "C" u16 func_01ffbbe0(fx32 x, fx32 z);
|
||||
extern "C" void func_01ffecdc(unk32 param1, Cylinder *param2);
|
||||
extern "C" bool func_01ffd768(unk32, void *, void *, unk8);
|
||||
|
||||
@@ -32,13 +32,13 @@ ARM MapObject::MapObject() {
|
||||
|
||||
*(u32 *) &this->mUnk_38 = *ptr2->mUnk_00;
|
||||
|
||||
Vec3p *ptr = ptr2->mUnk_08;
|
||||
VecFx32 *ptr = ptr2->mUnk_08;
|
||||
this->mPos.x = ptr->x;
|
||||
this->mPos.y = ptr->y;
|
||||
this->mPos.z = ptr->z;
|
||||
|
||||
this->mUnk_14 = *ptr2->mUnk_0C;
|
||||
_MI_CpuCopy(ptr2->mUnk_04, &this->mUnk_20, sizeof(MapObject_20));
|
||||
MI_CpuCopyFast(ptr2->mUnk_04, &this->mUnk_20, sizeof(MapObject_20));
|
||||
|
||||
for (int i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
|
||||
this->mUnk_18[i] = 0;
|
||||
@@ -56,12 +56,12 @@ ARM bool MapObject::vfunc_00() {
|
||||
ARM void MapObject::vfunc_04() {}
|
||||
|
||||
ARM void MapObject::func_ov000_0209d0bc(Vec2b *param1, MapObject *thisx) {
|
||||
Vec3p pos;
|
||||
VecFx32 pos;
|
||||
Vec2p out;
|
||||
|
||||
MapObjectManager *t = data_027e0cd8->mUnk_10;
|
||||
pos.coords = thisx->mPos.coords;
|
||||
t->func_01fff6d0(&pos, (q20 *) &out.y, (q20 *) &out.x);
|
||||
pos = thisx->mPos;
|
||||
t->func_01fff6d0(&pos, (fx32 *) &out.y, (fx32 *) &out.x);
|
||||
|
||||
Vec2p temp;
|
||||
temp.y = out.x;
|
||||
@@ -91,7 +91,7 @@ ARM bool MapObject::func_ov000_0209d144(Vec2s *param1, unk32 param2, unk32 param
|
||||
stack[1] = 0;
|
||||
stack[2] = 0;
|
||||
|
||||
this->vfunc_2C((Vec3p *) &stack);
|
||||
this->vfunc_2C((VecFx32 *) &stack);
|
||||
unk8 value = this->mpProfile->mUnk_04[param2];
|
||||
Vec2s stack2;
|
||||
|
||||
@@ -118,10 +118,10 @@ ARM unk32 MapObject::vfunc_28() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ARM bool MapObject::vfunc_2C(Vec3p *param1) {
|
||||
ARM bool MapObject::vfunc_2C(VecFx32 *param1) {
|
||||
if (this->mUnk_10 != NULL) {
|
||||
this->mUnk_10->vfunc_18(param1);
|
||||
Vec3p_Add(param1, &this->mPos, param1);
|
||||
VecFx32_Add(param1, &this->mPos, param1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ ARM bool MapObject::vfunc_2C(Vec3p *param1) {
|
||||
}
|
||||
|
||||
ARM void MapObject::func_ov000_0209d22c(unk16 *param1, MapObject *thisx, unk32 param2) {
|
||||
Vec3p local_18;
|
||||
VecFx32 local_18;
|
||||
func_01ffb714(data_027e0ce0->func_01fff148(param2), &thisx->mPos, &local_18);
|
||||
*param1 = func_01ffbbe0(local_18.x, local_18.z);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ ARM void MapObject::func_ov000_0209d2f0(unk32 param1, unk32 param2, Vec2b *param
|
||||
}
|
||||
}
|
||||
|
||||
ARM void MapObject::func_ov000_0209d3b4(unk32 param1, q20 size) {
|
||||
ARM void MapObject::func_ov000_0209d3b4(unk32 param1, fx32 size) {
|
||||
Cylinder spC;
|
||||
|
||||
if (this->mUnk_10 != NULL) {
|
||||
@@ -180,7 +180,7 @@ ARM void MapObject::func_ov000_0209d3b4(unk32 param1, q20 size) {
|
||||
spC.Init(FLOAT_TO_Q20(0.5f));
|
||||
}
|
||||
|
||||
Vec3p_Add(&spC.pos, &this->mPos, &spC.pos);
|
||||
VecFx32_Add(&spC.pos, &this->mPos, &spC.pos);
|
||||
spC.size += size;
|
||||
|
||||
func_01ffecdc(param1, &spC);
|
||||
@@ -229,7 +229,7 @@ ARM void MapObject::func_ov000_0209d518(unk32 param1, unk32 param2, unk32 param3
|
||||
}
|
||||
|
||||
struct TempStruct {
|
||||
Vec3p pos;
|
||||
VecFx32 pos;
|
||||
u16 param_r2;
|
||||
s16 extra_s16;
|
||||
u16 extra_u16;
|
||||
@@ -239,7 +239,7 @@ struct TempStruct {
|
||||
};
|
||||
|
||||
// non-matching
|
||||
ARM void MapObject::func_ov000_0209d54c(void *param1, MapObject *thisx, unk32 param2, Vec3p *param3, unk32 param4,
|
||||
ARM void MapObject::func_ov000_0209d54c(void *param1, MapObject *thisx, unk32 param2, VecFx32 *param3, unk32 param4,
|
||||
unk32 param5) {
|
||||
TempStruct local_4c;
|
||||
local_4c.mUnk_28 = 0;
|
||||
@@ -287,10 +287,10 @@ ARM bool MapObject::func_ov000_0209d668() {
|
||||
return pUVar1->func_ov000_02081f3c(this->mUnk_20.mUnk_14, uVar2);
|
||||
}
|
||||
|
||||
ARM void MapObject::func_ov000_0209d6ac(Vec3p *param1) {
|
||||
ARM void MapObject::func_ov000_0209d6ac(VecFx32 *param1) {
|
||||
if (this->mUnk_10 == NULL) {
|
||||
volatile Vec3p *tempPos = &this->mPos;
|
||||
Vec3p pos;
|
||||
volatile VecFx32 *tempPos = &this->mPos;
|
||||
VecFx32 pos;
|
||||
|
||||
pos.x = tempPos->x;
|
||||
pos.y = tempPos->y;
|
||||
@@ -303,5 +303,5 @@ ARM void MapObject::func_ov000_0209d6ac(Vec3p *param1) {
|
||||
}
|
||||
|
||||
this->mUnk_10->vfunc_1C(param1);
|
||||
Vec3p_Add(param1, &this->mPos, param1);
|
||||
VecFx32_Add(param1, &this->mPos, param1);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ ARM bool MapObjectMiniBlocks::vfunc_00(void) {
|
||||
this->mPos.y = pUnkStruct_027e0cd8_0c->func_01ffedf4(&vec);
|
||||
}
|
||||
|
||||
Vec3p vec;
|
||||
VecFx32 vec;
|
||||
vec.x = FLOAT_TO_Q20(0.0f);
|
||||
vec.y = FLOAT_TO_Q20(0.0f);
|
||||
vec.z = FLOAT_TO_Q20(0.0f);
|
||||
@@ -125,7 +125,7 @@ next:
|
||||
}
|
||||
|
||||
func_01ff9638(&vec, -this->mUnk_14);
|
||||
Vec3p_Add(&this->mPos, &vec, &this->mPos);
|
||||
VecFx32_Add(&this->mPos, &vec, &this->mPos);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "Actor/Actor.hpp"
|
||||
#include "MapObject/MapObject.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_ov000_020b5d34.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern unk8 data_ov000_020af4d4[];
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "MapObject/MapObjectSwitchStep.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "Unknown/UnkStruct_027e0998.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a8.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" unk32 func_0200f218(unk32, const char *);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "Actor/ActorManager.hpp"
|
||||
#include "System/OverlayManager.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_027e09a0.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
@@ -9,6 +8,7 @@
|
||||
#include "Unknown/UnkStruct_027e0d70.hpp"
|
||||
#include "flags.h"
|
||||
#include "global.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" {
|
||||
void func_ov000_020977e4();
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
extern "C" {
|
||||
void *func_ov024_020d1658();
|
||||
void *func_ov000_02066294();
|
||||
void GX_SetGraphicsMode(unk32 param1, unk32 param2, unk32 param3);
|
||||
void GXS_SetGraphicsMode(unk32 param1);
|
||||
}
|
||||
|
||||
extern int data_ov001_020c27a8;
|
||||
|
||||
@@ -9,33 +9,26 @@
|
||||
#include "Unknown/UnkStruct_0204e64c.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b4ec4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/dc.h>
|
||||
#include <nitro/gx.h>
|
||||
#include <nitro/os.h>
|
||||
#include <nitro/reg.h>
|
||||
#include <nitro/tp.h>
|
||||
|
||||
extern "C" {
|
||||
void OS_SetIrqFunction(unk32 param1, void *param2);
|
||||
void func_0201245c();
|
||||
void func_02027a28(void *param1, unk32 param2);
|
||||
void DC_FlushAll();
|
||||
void func_02013184();
|
||||
void func_020131b0();
|
||||
void OS_EnableIrqMask(unk32 param1);
|
||||
void GX_VBlankIntr(unk32 param1);
|
||||
void func_02031e48(void *param1);
|
||||
void OS_WakeupThreadDirect(void *param1);
|
||||
unk32 OS_GetArenaLo(unk32 param1);
|
||||
unk32 OS_GetArenaHi(unk32 param1);
|
||||
|
||||
UnkStruct_02011e10_Sub1 *func_020012e0(unk32 param1, unk32 param2, unk32 param3);
|
||||
unk32 func_0202d624(void *param1, unk32 param2);
|
||||
void *func_02001fd4(void *param1, size_t param2);
|
||||
void func_020013ac(void *param1);
|
||||
UnkStruct_02011e10_Sub1 *func_02001098(unk32 param1, unk32 param2, unk32 param3);
|
||||
unk32 func_020011f4();
|
||||
void OS_SetArenaLo(unk32 param1, unk32 param2);
|
||||
void TP_Init();
|
||||
unk32 OS_func_0065();
|
||||
unk32 TP_GetUserInfo(void *param1);
|
||||
void TP_SetCalibrateParam(void *param1);
|
||||
|
||||
void func_0200a7b0(unk32 param1, void *param2, void *param3, void *param4, unk32 param5, unk32 param6, unk32 param7,
|
||||
unk32 param8);
|
||||
}
|
||||
@@ -83,8 +76,8 @@ ARM UnkStruct_02049b18::UnkStruct_02049b18() {
|
||||
}
|
||||
|
||||
ARM void UnkStruct_02011e10::func_ov018_020c4980() {
|
||||
unk32 arenaLo = OS_GetArenaLo(0);
|
||||
unk32 arenaHi = OS_GetArenaHi(0);
|
||||
unk32 arenaLo = OS_GetMainArenaLo();
|
||||
unk32 arenaHi = OS_GetMainArenaHi();
|
||||
|
||||
for (int i = 0; i < HeapIndex_Max; i++) {
|
||||
this->mUnk_00[i] = NULL;
|
||||
@@ -126,10 +119,10 @@ ARM void UnkStruct_02011e10::func_ov018_020c4a5c() {
|
||||
temp_r7 = OS_GetArenaLo(0);
|
||||
temp_r7 += temp_r5;
|
||||
|
||||
temp_r0 = OS_GetArenaHi(0);
|
||||
temp_r0 = OS_GetMainArenaHi();
|
||||
this->mUnk_00[1] = func_02001098(temp_r7, temp_r0 - temp_r7, 2);
|
||||
this->mUnk_5C = func_020011f4();
|
||||
OS_SetArenaLo(0, temp_r0);
|
||||
OS_SetMainArenaLo((void *) temp_r0);
|
||||
this->mUnk_74 = 1;
|
||||
}
|
||||
|
||||
@@ -145,14 +138,14 @@ ARM UnkStruct_02049b80::UnkStruct_02049b80() {
|
||||
}
|
||||
|
||||
ARM UnkStruct_02049b18_06::UnkStruct_02049b18_06() {
|
||||
unk8 auStack_18[8];
|
||||
TPCalibrateParam params;
|
||||
|
||||
TP_Init();
|
||||
|
||||
if (OS_func_0065() != 0) {
|
||||
if (OS_func_0065()) {
|
||||
TP_SetCalibrateParam(NULL);
|
||||
} else if (TP_GetUserInfo(auStack_18) != 0) {
|
||||
TP_SetCalibrateParam(auStack_18);
|
||||
} else if (TP_GetUserInfo(¶ms)) {
|
||||
TP_SetCalibrateParam(¶ms);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "System/Random.hpp"
|
||||
#include "System/SysFault.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_02049f04.hpp"
|
||||
#include "Unknown/UnkStruct_0204a060.hpp"
|
||||
#include "Unknown/UnkStruct_0204a090.hpp"
|
||||
@@ -17,22 +16,18 @@
|
||||
#include "Unknown/UnkStruct_ov000_020b52b4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b52e8.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5340.hpp"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include <nitro/card.h>
|
||||
#include <nitro/gx.h>
|
||||
#include <nitro/os.h>
|
||||
#include <nitro/rtc.h>
|
||||
|
||||
extern "C" {
|
||||
unk32 func_02014fe0();
|
||||
unk16 OS_GetLockID();
|
||||
void GX_DispOn();
|
||||
void func_020327c8(void *param1, unk32 param2);
|
||||
void CARD_LockBackup(u16 param1);
|
||||
void CARD_UnlockBackup(u16 param1);
|
||||
unk32 CARD_IdentifyBackup(unk32 param1);
|
||||
unk32 CARD_ReadWriteBackupAsync(void *param1, void *param2, unk32 param3, unk32 param4, unk32 param5, unk32 param6,
|
||||
unk32 param7, unk32 param8, unk32 param9);
|
||||
unk32 CARD_GetResultCode();
|
||||
void func_0201bdd0();
|
||||
void OS_SetIrqFunction(unk32 param1, void *param2);
|
||||
void NNS_SndInit();
|
||||
void NNS_SndArcInit(void *param1, const char *soundDataPath, unk32 param2, unk32 param3);
|
||||
void NNS_SndArcPlayerSetup(unk32 param1);
|
||||
@@ -46,7 +41,6 @@ void func_0202f958(unk32 param1);
|
||||
void func_02005030(void *param1);
|
||||
void NNS_SndHandleInit(void *param1);
|
||||
void NNS_SndPlayerStopSeq(void *param1, unk32 param2);
|
||||
void RTC_Init();
|
||||
}
|
||||
|
||||
ARM void func_ov018_020c4e8c(void) {
|
||||
@@ -133,11 +127,11 @@ ARM SaveManager::SaveManager() {
|
||||
int uVar8 = 1;
|
||||
CARD_LockBackup(this->mUnk_204);
|
||||
|
||||
if (CARD_IdentifyBackup(0x1402) != 0) {
|
||||
if (CARD_IdentifyBackup(CARD_BACKUP_TYPE_FLASH_8MBITS)) {
|
||||
stack_struct stack[MAX_SAVE_SLOTS];
|
||||
int cVar1;
|
||||
|
||||
if (CARD_ReadWriteBackupAsync((void *) 0xF4E00, &stack[0], 0x40, 0, 0, 0, 6, 1, 0) == 1) {
|
||||
if (CARD_ReadFlashAsync(0xF4E00, &stack[0], 0x40, NULL, NULL) == true) {
|
||||
if (!stack[0].UnkCheck() && !stack[1].UnkCheck()) {
|
||||
cVar1 = 1;
|
||||
} else {
|
||||
@@ -159,7 +153,7 @@ ARM SaveManager::SaveManager() {
|
||||
MI_CpuFill16(0, (u16 *) stack[1].mUnk_06, 0x16);
|
||||
|
||||
uVar8 = 2;
|
||||
CARD_ReadWriteBackupAsync(stack, (void *) 0xF4E00, 0x40, 0, 0, 0, 7, 10, 2);
|
||||
CARD_WriteAndVerifyFlashAsync((u32) stack, (void *) 0xF4E00, 0x40, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,7 +189,7 @@ ARM void UnkStruct_0204a110::func_ov018_020c5300() {
|
||||
func_02018c90(2);
|
||||
this->mUnk_010.func_0201c890(0x0004800, 0x00016800, 1, 1, 0);
|
||||
GX_DispOn();
|
||||
REG_DISPCNT_SUB |= 0x00010000;
|
||||
GXS_DispOn();
|
||||
}
|
||||
|
||||
ARM UnkStruct_0204e640::UnkStruct_0204e640() {
|
||||
@@ -273,11 +267,11 @@ ARM UnkStruct_0204a110_Sub6::UnkStruct_0204a110_Sub6() {
|
||||
}
|
||||
|
||||
ARM UnkStruct_0204a110_Sub7::UnkStruct_0204a110_Sub7() {
|
||||
this->mUnk_00 = 0;
|
||||
this->mUnk_01 = 0;
|
||||
this->mUnk_0C.coords = data_027e0120.coords;
|
||||
this->mUnk_04 = new(HeapIndex_Main) UnkSystem2_UnkSubSystem9();
|
||||
this->mUnk_08 = new(HeapIndex_Main) UnkStruct_0204a110_Sub7_08();
|
||||
this->mUnk_00 = 0;
|
||||
this->mUnk_01 = 0;
|
||||
this->mUnk_0C = data_027e0120;
|
||||
this->mUnk_04 = new(HeapIndex_Main) UnkSystem2_UnkSubSystem9();
|
||||
this->mUnk_08 = new(HeapIndex_Main) UnkStruct_0204a110_Sub7_08();
|
||||
}
|
||||
|
||||
ARM UnkStruct_0204a110_Sub8::UnkStruct_0204a110_Sub8() {
|
||||
|
||||
@@ -3,16 +3,11 @@
|
||||
#include "Unknown/UnkStruct_02049b80.hpp"
|
||||
#include "Unknown/UnkStruct_02049bd4.hpp"
|
||||
|
||||
#include <nitro/card.h>
|
||||
#include <wstring.h>
|
||||
|
||||
extern "C" {
|
||||
unk32 func_020328c8(void *, void *, size_t);
|
||||
unk32 CARD_GetResultCode();
|
||||
void CARD_LockBackup(u16 param1);
|
||||
void CARD_UnlockBackup(u16 param1);
|
||||
unk32 CARD_ReadWriteBackupAsync(void *src, uintptr_t dest, unk32 param3, unk32 param4, unk32 param5, unk32 param6,
|
||||
unk32 param7, unk32 param8, unk32 param9);
|
||||
|
||||
bool func_ov000_020a0a90(size_t param1, void *param2, size_t param3);
|
||||
void func_ov000_020a0b58();
|
||||
};
|
||||
@@ -199,7 +194,7 @@ ARM void SaveFile::func_ov019_020d0d50() {
|
||||
stack[1].mUnk_04 = 0x1A;
|
||||
MI_CpuFill16(0, &stack[1].mUnk_06, 0x16);
|
||||
|
||||
CARD_ReadWriteBackupAsync(stack, SAVE_DATA_SIZE * 2, sizeof(stack_struct) * 2, 0, 0, 0, 7, 10, 2);
|
||||
CARD_WriteAndVerifyFlashAsync((u32) stack, (void *) (SAVE_DATA_SIZE * 2), sizeof(stack_struct) * 2, NULL, NULL);
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/gJJbb
|
||||
@@ -242,7 +237,7 @@ ARM void SaveFile::func_ov019_020d13b8() {
|
||||
|
||||
ARM void SaveSub7::func_ov019_020d1400() {
|
||||
this->mUnk_00[0].mUnk_7E = func_020328c8(&gSaveManager.mUnk_004, &this->mUnk_00, sizeof(SaveSub17) - sizeof(u16));
|
||||
_MI_CpuCopy(&this->mUnk_00[0], &this->mUnk_00[1], sizeof(SaveSub17));
|
||||
MI_CpuCopyFast(&this->mUnk_00[0], &this->mUnk_00[1], sizeof(SaveSub17));
|
||||
}
|
||||
|
||||
// non-matching
|
||||
@@ -265,13 +260,13 @@ ARM void SaveFile::func_ov019_020d1434() {
|
||||
}
|
||||
ARM void SaveSub5::func_ov019_020d14c0() {
|
||||
this->mUnk_000[0].mUnk_3FE = func_020328c8(&gSaveManager.mUnk_004, &this->mUnk_000, offsetof(SaveSub15, mUnk_3FE));
|
||||
_MI_CpuCopy(&this->mUnk_000[0], &this->mUnk_000[1], sizeof(SaveSub15));
|
||||
MI_CpuCopyFast(&this->mUnk_000[0], &this->mUnk_000[1], sizeof(SaveSub15));
|
||||
}
|
||||
|
||||
ARM void SaveInfo::func_ov019_020d14fc() {
|
||||
this->mSaveInfoData[0].mUnk_DFE =
|
||||
func_020328c8(&gSaveManager.mUnk_004, &this->mSaveInfoData[0].mUnk_000, offsetof(SaveInfoData, mUnk_DFE));
|
||||
_MI_CpuCopy(&this->mSaveInfoData[0], &this->mSaveInfoData[1], sizeof(SaveInfoData));
|
||||
MI_CpuCopyFast(&this->mSaveInfoData[0], &this->mSaveInfoData[1], sizeof(SaveInfoData));
|
||||
}
|
||||
|
||||
//! TODO: weird sizeof
|
||||
@@ -296,13 +291,13 @@ ARM void SaveFile::func_ov019_020d1538() {
|
||||
|
||||
ARM void SaveSub6::func_ov019_020d15cc() {
|
||||
this->mUnk_00[0].mUnk_7E = func_020328c8(&gSaveManager.mUnk_004, &this->mUnk_00, offsetof(SaveSub16, mUnk_7E));
|
||||
_MI_CpuCopy(&this->mUnk_00[0], &this->mUnk_00[1], sizeof(SaveSub16));
|
||||
MI_CpuCopyFast(&this->mUnk_00[0], &this->mUnk_00[1], sizeof(SaveSub16));
|
||||
}
|
||||
|
||||
ARM void SaveTreasures::func_ov019_020d1600() {
|
||||
this->mTreasureData[0].mUnk_7E =
|
||||
func_020328c8(&gSaveManager.mUnk_004, &this->mTreasureData, offsetof(TreasureData, mUnk_7E));
|
||||
_MI_CpuCopy(&this->mTreasureData[0], &this->mTreasureData[1], sizeof(TreasureData));
|
||||
MI_CpuCopyFast(&this->mTreasureData[0], &this->mTreasureData[1], sizeof(TreasureData));
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/ibnQS
|
||||
@@ -325,15 +320,15 @@ ARM void SaveFile::func_ov019_020d16d0() {
|
||||
SaveSlot *pSub2 = &this->mSlots[this->mSaveSlotIndex];
|
||||
SaveSlot *pSub3 = &this->mSlots[saveSlotIndex];
|
||||
|
||||
_MI_CpuCopy(&pSub2->mSaveInfo, &pSub3->mSaveInfo, sizeof(SaveInfo));
|
||||
_MI_CpuCopy(&pSub2->mTreasures, &pSub3->mTreasures, sizeof(SaveTreasures));
|
||||
_MI_CpuCopy(&pSub2->mUnk_2600, &pSub3->mUnk_2600, sizeof(SaveSub7));
|
||||
MI_CpuCopyFast(&pSub2->mSaveInfo, &pSub3->mSaveInfo, sizeof(SaveInfo));
|
||||
MI_CpuCopyFast(&pSub2->mTreasures, &pSub3->mTreasures, sizeof(SaveTreasures));
|
||||
MI_CpuCopyFast(&pSub2->mUnk_2600, &pSub3->mUnk_2600, sizeof(SaveSub7));
|
||||
|
||||
pSub3->mUnk_1D00.func_ov000_020a12a0();
|
||||
_MI_CpuCopy(&pSub2->mUnk_1D00, &pSub3->mUnk_1D00, sizeof(SaveSub5));
|
||||
MI_CpuCopyFast(&pSub2->mUnk_1D00, &pSub3->mUnk_1D00, sizeof(SaveSub5));
|
||||
|
||||
_MI_CpuFill(0, &pSub3->mUnk_2500, sizeof(SaveSub6));
|
||||
_MI_CpuCopy(&pSub2->mUnk_2500, &pSub3->mUnk_2500, sizeof(SaveSub6));
|
||||
MI_CpuClearFast(&pSub3->mUnk_2500, sizeof(SaveSub6));
|
||||
MI_CpuCopyFast(&pSub2->mUnk_2500, &pSub3->mUnk_2500, sizeof(SaveSub6));
|
||||
|
||||
this->mSaveSlotIndex = saveSlotIndex;
|
||||
this->func_ov019_020d1538();
|
||||
@@ -362,7 +357,7 @@ ARM void SaveFile::func_ov019_020d1808(unk32 param1) {
|
||||
SaveSlot *pSub2 = &this->mSlots[param1];
|
||||
stack_struct2 stack1[5];
|
||||
|
||||
if (CARD_ReadWriteBackupAsync(pSub2, param1 * SAVE_DATA_SIZE, sizeof(SaveSlot), 0, 0, 0, 6, 1, 0) == 0) {
|
||||
if (CARD_ReadFlashAsync((u32) pSub2, (void *) (param1 * SAVE_DATA_SIZE), sizeof(SaveSlot), NULL, NULL) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -398,7 +393,7 @@ ARM void SaveFile::func_ov019_020d1808(unk32 param1) {
|
||||
|
||||
if (stack1[i].mUnk_00 != 0) {
|
||||
if (stack1[i].mUnk_04 == 0 || stack1[i].mUnk_00 != stack1[i * 2].mUnk_04) {
|
||||
_MI_CpuCopy(puVar5, puVar5 + data_ov019_020d1bd4[i], data_ov019_020d1bd4[i]);
|
||||
MI_CpuCopyFast(puVar5, puVar5 + data_ov019_020d1bd4[i], data_ov019_020d1bd4[i]);
|
||||
this->mUnk_04E00[param1][1].mUnk_00 |= 1 << (i & 0xFF);
|
||||
}
|
||||
} else {
|
||||
@@ -407,7 +402,7 @@ ARM void SaveFile::func_ov019_020d1808(unk32 param1) {
|
||||
if (stack1[i * 2].mUnk_04 == 0) {
|
||||
this->mUnk_04E00[param1][1].mUnk_00 |= 1 << (i & 0xFF);
|
||||
} else {
|
||||
_MI_CpuCopy(puVar5 + data_ov019_020d1bd4[i], puVar5, data_ov019_020d1bd4[i]);
|
||||
MI_CpuCopyFast(puVar5 + data_ov019_020d1bd4[i], puVar5, data_ov019_020d1bd4[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -432,7 +427,7 @@ ARM void SaveFile::func_ov019_020d1b14(unk32 param1) {
|
||||
pSVar3->mSaveInfo.func_ov000_020a1028();
|
||||
pSVar3->mSaveInfo.func_ov019_020d14fc();
|
||||
|
||||
_MI_CpuFill(0, &pSVar3->mTreasures, sizeof(SaveTreasures));
|
||||
MI_CpuClearFast(&pSVar3->mTreasures, sizeof(SaveTreasures));
|
||||
for (int i = 0; i < TreasureType_Max; i++) {
|
||||
pSVar3->mTreasures.mTreasureData[0].mUnk_3C[i] = TreasureType_None;
|
||||
}
|
||||
@@ -441,7 +436,7 @@ ARM void SaveFile::func_ov019_020d1b14(unk32 param1) {
|
||||
this->mSlots[param1].mUnk_1D00.func_ov000_020a12a0();
|
||||
this->mSlots[param1].mUnk_1D00.func_ov019_020d14c0();
|
||||
|
||||
_MI_CpuFill(0, &this->mSlots[param1].mUnk_2500, 0x80);
|
||||
MI_CpuClearFast(&this->mSlots[param1].mUnk_2500, 0x80);
|
||||
this->mSlots[param1].mUnk_2500.func_ov019_020d15cc();
|
||||
|
||||
this->mSlots[param1].mUnk_2600.func_ov000_020a10f4();
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/g2.h>
|
||||
|
||||
extern "C" {
|
||||
void _G2_SetBlend(void *pReg, unk32 param1, unk32 param2, unk32 param3, unk32 param4);
|
||||
void func_ov000_02062e44(void *param1, void *param2);
|
||||
};
|
||||
|
||||
@@ -185,9 +185,9 @@ ARM FileSelectMain::FileSelectMain() :
|
||||
data_0204a110.func_020195a0("MSB:SelectBG.nclr", 0, 6, 0);
|
||||
// Test1 aauStack_94[6];
|
||||
// Test2 aauStack_48;
|
||||
REG_DISPCNT &= 0xFFFFE0FF;
|
||||
REG_DISPCNT |= 0x00001C00;
|
||||
_G2_SetBlend(®_BLDCNT, 4, 8, 0, 0x10);
|
||||
|
||||
GX_SetVisiblePlane(28);
|
||||
G2_SetBlendAlpha(4, 8, 0, 16);
|
||||
this->mUnk_0C.Append(&this->mUnk_005C);
|
||||
this->func_ov019_020c63dc();
|
||||
this->func_ov019_020c6d10();
|
||||
@@ -766,7 +766,7 @@ ARM void FileSelectMain::func_ov019_020c7878() {
|
||||
this->mUnk_15D4.mUnk_2A = true;
|
||||
this->mUnk_18EC.mUnk_2A = true;
|
||||
this->mUnk_005C.mUnk_2A = true;
|
||||
REG_BLDALPHA = 0x1010;
|
||||
G2_ChangeBlendAlpha(16, 16);
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c78ac() {
|
||||
@@ -1135,7 +1135,7 @@ ARM void FileSelectMain::vfunc_08(Input *pButtons, TouchControl *pTouchControl)
|
||||
|
||||
CALL_PTMF(PTMF<FileSelectMain>, data_ov019_020d1f94[this->mState]);
|
||||
this->mUnk_002C.UpdateLogic();
|
||||
REG_BLDALPHA = this->mUnk_002C.func_0201eaa0() | 0x1000;
|
||||
G2_ChangeBlendAlpha(this->mUnk_002C.func_0201eaa0(), 16);
|
||||
}
|
||||
|
||||
ARM void FileSelectMain::func_ov019_020c8290() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "Unknown/UnkStruct_ov003_020ba740.hpp"
|
||||
#include "regs.h"
|
||||
#include <nitro/reg.h>
|
||||
|
||||
const unk16 data_ov019_020d1bb0[] = {0x01, 0x37, 0x38, 0x39, 0x3C, 0x00};
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "FileSelect/FileSelect.hpp"
|
||||
#include "Unknown/UnkStruct_0204a088.hpp"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/gx.h>
|
||||
|
||||
extern "C" GameModeManagerBase_104 *func_ov003_020b6520(void *param1, void *param2);
|
||||
|
||||
@@ -51,8 +52,7 @@ ARM void FileSelectManager_160::vfunc_10(unk32 param1, unk32 param2) {
|
||||
this->mUnk_10->Detach();
|
||||
this->mUnk_10->func_ov019_020cb664();
|
||||
this->mUnk_14 = func_ov003_020b6520(&this->mUnk_18, this->mUnk_1C);
|
||||
REG_DISPCNT &= 0xFFFFE0FF;
|
||||
REG_DISPCNT |= 0x1F00;
|
||||
GX_SetVisiblePlane(31);
|
||||
data_0204999c.func_02013070();
|
||||
}
|
||||
|
||||
@@ -94,8 +94,7 @@ ARM void FileSelectManager_160::vfunc_20(unk32 param1, unk32 param2) {
|
||||
this->mUnk_10->func_ov019_020cb5dc();
|
||||
this->mUnk_10->func_ov019_020cb718();
|
||||
|
||||
REG_DISPCNT &= 0xFFFFE0FF;
|
||||
REG_DISPCNT |= 0x1C00;
|
||||
GX_SetVisiblePlane(28);
|
||||
|
||||
data_0204999c.func_02013070();
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
#include "System/Random.hpp"
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "global.h"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/dc.h>
|
||||
#include <nitro/g2.h>
|
||||
|
||||
extern "C" {
|
||||
void func_0200a7b0(unk32 param1, void *param2, void *param3, void *param4, unk32 param5, unk32 param6, unk32 param7,
|
||||
unk32 param8);
|
||||
void _G2_SetBlend(void *pReg, unk32 param1, unk32 param2, unk32 param3, unk32 param4);
|
||||
void DC_FlushAll();
|
||||
};
|
||||
|
||||
FileSelectOptionsManager *gpFSOptionsManager = NULL;
|
||||
@@ -47,9 +47,8 @@ ARM FileSelectSubScreen::FileSelectSubScreen() :
|
||||
this->mUnk_0FA8.func_02017520("TPD:Tape_d", "TPD:Tape_d", NULL);
|
||||
this->mUnk_0FE4.func_02017520("TPE:Tape_e", "TPE:Tape_e", NULL);
|
||||
|
||||
REG_DISPCNT_SUB &= ~0x00001F00;
|
||||
REG_DISPCNT_SUB |= 0x00001F00;
|
||||
_G2_SetBlend(®_BLDCNT_SUB, 0x01, 0x1E, 0x08, 0x0A);
|
||||
GXS_SetVisiblePlane(31);
|
||||
G2S_SetBlendAlpha(1, 30, 8, 10);
|
||||
|
||||
{
|
||||
UnkStruct2 stack_narc("Screen/Bg/Cover.bin", 1);
|
||||
@@ -75,9 +74,9 @@ ARM void FileSelectSubScreen::vfunc_08(Input *pButtons, TouchControl *pTouchCont
|
||||
this->mUnk_0024 = this->mUnk_0020;
|
||||
this->mUnk_0020 += 0x800;
|
||||
|
||||
REG_BG1OFS_SUB = ROUND_Q20(this->mUnk_0020) & 0x1FF;
|
||||
REG_BG2OFS_SUB = (ROUND_Q20(this->mUnk_0020) + 0x100) & 0x1FF;
|
||||
REG_BG3OFS_SUB = (ROUND_Q20(this->mUnk_0020) / 2) & 0x1FF;
|
||||
G2S_SetBG1Offset(ROUND_Q20(this->mUnk_0020), 0);
|
||||
G2S_SetBG2Offset(ROUND_Q20(this->mUnk_0020) + 0x100, 0);
|
||||
G2S_SetBG3Offset(ROUND_Q20(this->mUnk_0020) / 2, 0);
|
||||
|
||||
if (!(ROUND_Q20(this->mUnk_0020) % 256) && (ROUND_Q20(this->mUnk_0024) % 256)) {
|
||||
switch (this->mUnk_001C) {
|
||||
|
||||
@@ -25,13 +25,12 @@
|
||||
#include "Unknown/UnkStruct_ov026_0213f578.hpp"
|
||||
#include "Unknown/UnkStruct_ov026_0213f590.hpp"
|
||||
#include "Unknown/UnkStruct_ov031_02118fa4.hpp"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
|
||||
#include <nitro/dc.h>
|
||||
#include <nitro/g2.h>
|
||||
|
||||
extern "C" {
|
||||
void GX_SetGraphicsMode(unk32 param1, unk32 param2, unk32 param3);
|
||||
void GXS_SetGraphicsMode(unk32 param1);
|
||||
void DC_FlushAll();
|
||||
void func_02019b3c();
|
||||
void func_02019c4c();
|
||||
void func_02019a74();
|
||||
@@ -56,13 +55,11 @@ AdventureModeManager::~AdventureModeManager() {
|
||||
}
|
||||
|
||||
void AdventureModeManager::func_ov024_020c5288() {
|
||||
REG_DISPCNT &= ~0x1F00;
|
||||
REG_DISPCNT |= 0x1100;
|
||||
GX_SetVisiblePlane(17);
|
||||
}
|
||||
|
||||
void AdventureModeManager::func_ov024_020c52a0() {
|
||||
REG_DISPCNT &= ~0x1F00;
|
||||
REG_DISPCNT |= 0x1100;
|
||||
GX_SetVisiblePlane(17);
|
||||
}
|
||||
|
||||
void AdventureModeManager::func_ov024_020c52b8() {
|
||||
@@ -81,8 +78,8 @@ void AdventureModeManager::func_ov024_020c52f4() {
|
||||
|
||||
void AdventureModeManager::func_ov024_020c530c() {
|
||||
GXS_SetGraphicsMode(5);
|
||||
REG_BG2CNT_SUB = (REG_BG2CNT_SUB & 0x43) | 0x4d08;
|
||||
REG_BG3CNT_SUB = (REG_BG3CNT_SUB & 0x43) | 0x4e14;
|
||||
G2S_SetBG2Control(1, 0, 13, 2, 0);
|
||||
G2S_SetBG3Control(1, 0, 14, 5, 0);
|
||||
this->func_ov024_020c6db8(0x1C);
|
||||
}
|
||||
|
||||
@@ -93,11 +90,11 @@ void AdventureModeManager::func_ov024_020c5364() {
|
||||
|
||||
void AdventureModeManager::func_ov024_020c537c() {
|
||||
GXS_SetGraphicsMode(3);
|
||||
REG_BG0CNT_SUB = (REG_BG0CNT_SUB & 0x43) | 0x1800;
|
||||
G2S_SetBG0Control(0, 0, 24, 0, 0);
|
||||
this->func_ov024_020c6d2c(1);
|
||||
REG_BG2CNT_SUB = (REG_BG2CNT_SUB & 0x43) | 0x1a0c;
|
||||
REG_BG3CNT_SUB = (REG_BG3CNT_SUB & 0x43) | 0x5b14;
|
||||
this->func_ov024_020c6db8(0x1f);
|
||||
G2S_SetBG2Control(0, 0, 26, 3, 0);
|
||||
G2S_SetBG3Control(1, 0, 27, 5, 0);
|
||||
this->func_ov024_020c6db8(0x1F);
|
||||
}
|
||||
|
||||
void AdventureModeManager::func_ov024_020c53e8() {
|
||||
@@ -126,8 +123,7 @@ void AdventureModeManager::func_ov024_020c53e8() {
|
||||
data_0204a110.mUnk_D9C.func_0201c494(0);
|
||||
|
||||
if (data_0204a110.mUnk_008 == 5) {
|
||||
REG_DISPCNT &= ~0x1F00;
|
||||
REG_DISPCNT |= 0x0200;
|
||||
GX_SetVisiblePlane(2);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
@@ -142,8 +138,7 @@ void AdventureModeManager::func_ov024_020c53e8() {
|
||||
data_0204a110.mUnk_D9C.func_0201c494(1);
|
||||
|
||||
if (data_0204a110.mUnk_008 == 5) {
|
||||
REG_DISPCNT &= ~0x1F00;
|
||||
REG_DISPCNT |= 0x0200;
|
||||
GX_SetVisiblePlane(2);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
@@ -180,7 +175,7 @@ void AdventureModeManager::vfunc_24() {
|
||||
this->func_ov024_020c5cec();
|
||||
}
|
||||
|
||||
if (CHECK_BUTTON_COMBO(this->mButtons.press, BTN_START) && this->mUnk_15C->mUnk_47) {
|
||||
if (CHECK_BUTTON_COMBO(this->mButtons.press, PAD_BUTTON_START) && this->mUnk_15C->mUnk_47) {
|
||||
this->mUnk_15C->func_ov017_020c3c64();
|
||||
}
|
||||
|
||||
@@ -216,7 +211,7 @@ void AdventureModeManager::vfunc_24() {
|
||||
}
|
||||
|
||||
bool var_r0;
|
||||
if (CHECK_BUTTON_COMBO(this->mButtons.press, BTN_START) && data_027e09a4->IsNotCutscene()) {
|
||||
if (CHECK_BUTTON_COMBO(this->mButtons.press, PAD_BUTTON_START) && data_027e09a4->IsNotCutscene()) {
|
||||
if (!data_027e09b8->func_ov000_020732dc(0) && !data_027e09b8->func_ov000_020732dc(1)) {
|
||||
if (!data_027e09b8->func_ov000_020732dc(2) && data_0204e5f8.mUnk_3A == 0 && data_0204e5f8.mUnk_3E == 0 &&
|
||||
!data_0204e5f8.mUnk_18) {
|
||||
@@ -307,7 +302,7 @@ void AdventureModeManager::vfunc_24() {
|
||||
if (data_0204e5f8.mUnk_3A == 0 && data_0204e5f8.mUnk_3E == 0 && !data_0204e5f8.mUnk_18) {
|
||||
// should we open the menu
|
||||
press = this->mButtons.press;
|
||||
if (CHECK_BUTTON_COMBO(press, BTN_DRIGHT) || CHECK_BUTTON_COMBO(press, BTN_Y)) {
|
||||
if (CHECK_BUTTON_COMBO(press, PAD_KEY_RIGHT) || CHECK_BUTTON_COMBO(press, PAD_BUTTON_Y)) {
|
||||
if (this->func_ov024_020c5dac() != 0) {
|
||||
if (data_0204a088->mUnk_00 != 1) {
|
||||
return;
|
||||
@@ -327,7 +322,7 @@ void AdventureModeManager::vfunc_24() {
|
||||
|
||||
// should we switch to the map screen
|
||||
press = this->mButtons.press;
|
||||
if (CHECK_BUTTON_COMBO(press, BTN_DDOWN) || CHECK_BUTTON_COMBO(press, BTN_B)) {
|
||||
if (CHECK_BUTTON_COMBO(press, PAD_KEY_DOWN) || CHECK_BUTTON_COMBO(press, PAD_BUTTON_B)) {
|
||||
if (this->func_ov024_020c5f70() != 0) {
|
||||
switch (data_0204a088->mUnk_00) {
|
||||
case 1:
|
||||
@@ -370,7 +365,7 @@ void AdventureModeManager::vfunc_24() {
|
||||
}
|
||||
|
||||
// should we open the collection
|
||||
if (CHECK_BUTTON_COMBO(this->mButtons.press, BTN_SELECT)) {
|
||||
if (CHECK_BUTTON_COMBO(this->mButtons.press, PAD_BUTTON_SELECT)) {
|
||||
if (this->func_ov024_020c60f4()) {
|
||||
switch (data_0204a088->mUnk_00) {
|
||||
case 1:
|
||||
@@ -406,8 +401,8 @@ void AdventureModeManager::vfunc_24() {
|
||||
|
||||
// should we open the rail map
|
||||
press = this->mButtons.press;
|
||||
if (!CHECK_BUTTON_COMBO(press, BTN_DLEFT)) {
|
||||
if (!CHECK_BUTTON_COMBO(press, BTN_A)) {
|
||||
if (!CHECK_BUTTON_COMBO(press, PAD_KEY_LEFT)) {
|
||||
if (!CHECK_BUTTON_COMBO(press, PAD_BUTTON_A)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -914,9 +909,9 @@ void AdventureModeManager::func_ov024_020c6d20(unk32 param1) {
|
||||
|
||||
void AdventureModeManager::func_ov024_020c6d2c(unk32 param1) {
|
||||
if (param1) {
|
||||
REG_BG1CNT_SUB = (REG_BG1CNT_SUB & 0x43) | 0x1904;
|
||||
G2S_SetBG1Control(0, 0, 25, 1, 0);
|
||||
} else {
|
||||
REG_BG1CNT_SUB = (REG_BG1CNT_SUB & 0x43) | 0x0C00;
|
||||
G2S_SetBG1Control(0, 0, 12, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
|
||||
extern "C" void GX_func_0008(void *, unk32, unk32);
|
||||
#include <nitro/gx.h>
|
||||
|
||||
AdventureModeManager_15C_20_00::AdventureModeManager_15C_20_00(bool param1) :
|
||||
mUnk_778(false),
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
|
||||
#include "Unknown/UnkStruct_ov024_020d86a0.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/g2.h>
|
||||
#include <nitro/reg.h>
|
||||
|
||||
extern "C" void func_02019b3c();
|
||||
extern "C" AdventureModeManager_160_18 *func_ov006_020b6ab0(void *, void *);
|
||||
@@ -165,7 +167,7 @@ void AdventureModeManager_160::func_ov024_020c7d4c(unk32 param1) {
|
||||
}
|
||||
}
|
||||
|
||||
REG_BG2CNT_SUB = (REG_BG2CNT_SUB & ~0x03) | 0x01;
|
||||
G2S_SetBG2Priority(1);
|
||||
}
|
||||
|
||||
void AdventureModeManager_160::vfunc_18(unk32 param1) {
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b4f70.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/gx.h>
|
||||
|
||||
extern "C" GameModeManagerBase_104 *func_ov008_020b6520(void *);
|
||||
|
||||
@@ -43,8 +44,8 @@ void AdventureModeManager_170::vfunc_0C(unk32 param1) {
|
||||
this->mUnk_38--;
|
||||
|
||||
if (this->mUnk_38 == 0) {
|
||||
REG_DISPCNT = (REG_DISPCNT & ~0x1F00) | 0x1000;
|
||||
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x1000;
|
||||
GX_SetVisiblePlane(16);
|
||||
GXS_SetVisiblePlane(16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/g2.h>
|
||||
|
||||
extern "C" AdventureModeManager_18C_10 *func_ov011_020b6520(void *, int);
|
||||
extern "C" void func_ov011_020b84f0(s16 *param1, void *, unk32 param2);
|
||||
@@ -199,9 +200,9 @@ void AdventureModeManager_18C::func_ov024_020c9c6c() {
|
||||
this->mUnk_10 = func_ov011_020b6520(&this->mUnk_0C, var_r4);
|
||||
}
|
||||
|
||||
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x1C00;
|
||||
REG_BG2CNT_SUB = (REG_BG2CNT_SUB & ~0x03) | 0x03;
|
||||
REG_BG3CNT_SUB = (REG_BG3CNT_SUB & ~0x03) | 0x02;
|
||||
GXS_SetVisiblePlane(28);
|
||||
G2S_SetBG2Priority(3);
|
||||
G2S_SetBG3Priority(2);
|
||||
}
|
||||
|
||||
void AdventureModeManager_18C::vfunc_14(unk32 param1) {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
#include "Unknown/UnkStruct_0204a088.hpp"
|
||||
#include "Unknown/UnkStruct_0204e5f8.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "regs.h"
|
||||
|
||||
#include <nitro/gx.h>
|
||||
|
||||
extern "C" AdventureModeManager_190_10 *func_ov011_020b8e54(void *, int);
|
||||
|
||||
@@ -39,8 +40,8 @@ void AdventureModeManager_190::vfunc_0C(unk32 param1) {
|
||||
void AdventureModeManager_190::vfunc_10(unk32 param1, unk32 param2) {
|
||||
if (param1 == 1) {
|
||||
data_0204a088->func_ov000_02061248();
|
||||
this->mUnk_10 = func_ov011_020b8e54(&this->mUnk_0C, this->mUnk_60);
|
||||
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x1800;
|
||||
this->mUnk_10 = func_ov011_020b8e54(&this->mUnk_0C, this->mUnk_60);
|
||||
GXS_SetVisiblePlane(24);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,19 @@
|
||||
#include "MainGame/AdventureMode.hpp"
|
||||
#include "Save/SaveManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b52b4.hpp"
|
||||
#include "Unknown/UnkStruct_ov017_020c3f70.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include <nitro/dc.h>
|
||||
#include <nitro/gx.h>
|
||||
|
||||
extern "C" {
|
||||
void GX_LoadBG0Char(void *ptr, u32 offset, u32 size);
|
||||
void GX_LoadBG1Char(void *ptr, u32 offset, u32 size);
|
||||
void GX_LoadBG2Char(void *ptr, u32 offset, u32 size);
|
||||
void GX_LoadBG3Char(void *ptr, u32 offset, u32 size);
|
||||
|
||||
void GXS_LoadBG0Char(void *ptr, u32 offset, u32 size);
|
||||
void GXS_LoadBG1Char(void *ptr, u32 offset, u32 size);
|
||||
void GXS_LoadBG2Char(void *ptr, u32 offset, u32 size);
|
||||
void GXS_LoadBG3Char(void *ptr, u32 offset, u32 size);
|
||||
|
||||
void GXS_BeginLoadBGExtPltt(void);
|
||||
void GXS_LoadBGExtPltt(void *ptr, u32 offset, u32 size);
|
||||
void GXS_EndLoadBGExtPltt(void);
|
||||
|
||||
void DC_func_0004(void *, int);
|
||||
void DC_func_0002();
|
||||
|
||||
void func_ov000_0205a950(u8 bgType, bool isTopScreen, bool);
|
||||
void func_ov000_0205a944(u8 bgType, bool isTopScreen, bool);
|
||||
void func_01ffb644(q20 x, q20 y);
|
||||
void func_01ffb644(fx32 x, fx32 y);
|
||||
unk32 func_01ffb558();
|
||||
|
||||
void func_02029058(void *, void *);
|
||||
@@ -64,7 +50,7 @@ AdventureModeManager_1B8_Base::~AdventureModeManager_1B8_Base() {
|
||||
}
|
||||
|
||||
void AdventureModeManager_1B8_Base::func_ov024_020d0698() {
|
||||
_MI_CpuFill(0, this->mUnk_18, this->mUnk_14);
|
||||
MI_CpuClearFast(this->mUnk_18, this->mUnk_14);
|
||||
this->mUnk_0A = true;
|
||||
this->mUnk_0D = true;
|
||||
this->mUnk_00 = ADVMGR_UNK;
|
||||
@@ -272,7 +258,7 @@ void AdventureModeManager_1B8_Base::func_ov024_020d0a64() {
|
||||
|
||||
if (var_r6 != 0) {
|
||||
UnkDataStruct2 sp4(var_r6);
|
||||
_MI_CpuFill(0, sp4.unk_00, var_r6);
|
||||
MI_CpuClearFast(sp4.unk_00, var_r6);
|
||||
this->TryLoadBGChar(sp4.unk_00, GetUnkValue2(), var_r6);
|
||||
}
|
||||
|
||||
@@ -281,7 +267,7 @@ void AdventureModeManager_1B8_Base::func_ov024_020d0a64() {
|
||||
|
||||
if (var_r7 != 0) {
|
||||
UnkDataStruct2 sp0(var_r7);
|
||||
_MI_CpuFill(0, sp0.unk_00, var_r7);
|
||||
MI_CpuClearFast(sp0.unk_00, var_r7);
|
||||
this->TryLoadBGChar(sp0.unk_00, GetUnkValue2() + GetUnkValue(var_r6), var_r7);
|
||||
}
|
||||
}
|
||||
@@ -656,7 +642,7 @@ void AdventureModeManager_1B8::func_ov024_020d1564(const AdventureModeManager_1B
|
||||
|
||||
void AdventureModeManager_1B8::func_ov024_020d1614(void *param1) {
|
||||
this->mUnk_28 = param1;
|
||||
_MI_CpuFill(0, this->mUnk_28, 0x1000);
|
||||
MI_CpuClearFast(this->mUnk_28, 0x1000);
|
||||
data_ov017_020c3f70.func_ov017_020bba78();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ UnkStruct_027e0998 *UnkStruct_027e0998::Create() {
|
||||
return new(HeapIndex_1) UnkStruct_027e0998();
|
||||
}
|
||||
|
||||
bool UnkStruct_027e0998::vfunc_00(Vec3p *pPos, Vec2s *param2, u16 *param3) {
|
||||
bool UnkStruct_027e0998::vfunc_00(VecFx32 *pPos, Vec2s *param2, u16 *param3) {
|
||||
if (data_027e09a4->IsCutscene()) {
|
||||
CutsceneParamsEntry *pEntry = Cutscene_GetParamEntry(data_027e09a4->CurrentCSIndex());
|
||||
|
||||
@@ -83,7 +83,7 @@ bool UnkStruct_027e0998::vfunc_00(Vec3p *pPos, Vec2s *param2, u16 *param3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Vec3p pos;
|
||||
VecFx32 pos;
|
||||
pos.x = data_027e0cd8->mUnk_24.x;
|
||||
pos.y = data_027e0cd8->mUnk_24.y;
|
||||
pos.z = data_027e0cd8->mUnk_24.z;
|
||||
@@ -103,7 +103,7 @@ bool UnkStruct_027e0998::func_ov024_020c716c() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UnkStruct_027e0998::func_ov024_020c7214(Vec3p *pPos, Vec2s *param2, u16 *param3) {
|
||||
bool UnkStruct_027e0998::func_ov024_020c7214(VecFx32 *pPos, Vec2s *param2, u16 *param3) {
|
||||
bool temp_r4 = this->UnkStruct_027e0998_Base::vfunc_00(pPos, param2, param3);
|
||||
|
||||
if (data_027e09a4->func_01ffd3d8()) {
|
||||
|
||||
@@ -6,12 +6,9 @@
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b51b8.hpp"
|
||||
#include "Unknown/UnkStruct_ov024_020d8660.hpp"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
|
||||
extern "C" {
|
||||
void GX_func_0008(void *, unk32, unk32);
|
||||
}
|
||||
#include <nitro/gx.h>
|
||||
|
||||
extern unk32 data_ov000_020b3000;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "MainGame/MiscAdvManager.hpp"
|
||||
#include "Item/ItemManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_02049bac.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" u8 func_ov000_020a9a50();
|
||||
|
||||
@@ -21,7 +21,7 @@ MiscAdvManager::~MiscAdvManager() {}
|
||||
void MiscAdvManager::func_ov024_020d6310(MiscAdvManager *pSrc) {
|
||||
u16 local_10;
|
||||
|
||||
_MI_CpuCopy(pSrc, this, sizeof(MiscAdvManager));
|
||||
MI_CpuCopyFast(pSrc, this, sizeof(MiscAdvManager));
|
||||
data_02049bac.func_02014a34(&local_10);
|
||||
|
||||
if (local_10 == this->mUnk_28) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "Game/GameModeManager.hpp"
|
||||
#include "System/OverlayManager.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_02049be0.hpp"
|
||||
#include "Unknown/UnkStruct_0204a088.hpp"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
@@ -11,9 +10,10 @@
|
||||
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b4f84.hpp"
|
||||
#include "Unknown/UnkStruct_ov024_020d8694.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" unk32 func_02014fe0();
|
||||
extern "C" q20 func_01ffb428(unk32, unk32);
|
||||
extern "C" fx32 func_01ffb428(unk32, unk32);
|
||||
|
||||
UnkTitleCardSystem1::UnkTitleCardSystem1(GameModeManagerBase_004 *param1) :
|
||||
mUnk_004(4),
|
||||
@@ -556,9 +556,9 @@ void UnkStruct_ov024_020d8694_188::vfunc_00() {
|
||||
}
|
||||
|
||||
void UnkStruct_ov024_020d8694_188::vfunc_04(unk8 *param1) {
|
||||
Vec4p local;
|
||||
local.coords = data_027e0120.coords;
|
||||
local.w = func_01ffb428(0x1000, this->mUnk_144.func_0201ec30());
|
||||
MtxFx22 local;
|
||||
local = data_027e0120;
|
||||
local.w = func_01ffb428(0x1000, this->mUnk_144.func_0201ec30());
|
||||
|
||||
UnkDataStruct1 local_30(&local, 0x40);
|
||||
this->func_ov024_020cb654(param1, &local_30);
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "Unknown/UnkStruct_027e0954.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b5214.hpp"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
#include <nitro/button.h>
|
||||
#include <nitro/pad.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -255,7 +254,7 @@ void TitleScreen::func_ov025_020c53d0(Input *pButtons, TouchControl *pTouchContr
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c55a4(Input *pButtons, TouchControl *pTouchControl) {
|
||||
if (CHECK_TOUCH_FLAGS(pTouchControl, TouchFlag_UntouchedNow) || CHECK_BUTTON_COMBO(pButtons->press, BTN_START)) {
|
||||
if (CHECK_TOUCH_FLAGS(pTouchControl, TouchFlag_UntouchedNow) || CHECK_BUTTON_COMBO(pButtons->press, PAD_BUTTON_START)) {
|
||||
data_ov000_020b5214.func_ov000_0206db44(0x0B);
|
||||
this->func_ov025_020c4ea0(TitleScreenState_ToFileSelect);
|
||||
}
|
||||
@@ -349,15 +348,14 @@ void TitleScreen::vfunc_0C(unk32 param1) {
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c592c() {
|
||||
REG_DISPCNT &= ~0xE000;
|
||||
REG_DISPCNT |= 0x8000;
|
||||
GX_SetVisibleWindows(4);
|
||||
|
||||
REG_WINOUT = (REG_WINOUT & ~0x3F00) | 0x1900;
|
||||
REG_WINOUT = (REG_WINOUT & ~0x3F) | 0x09;
|
||||
}
|
||||
|
||||
void TitleScreen::func_ov025_020c5964() {
|
||||
REG_DISPCNT &= ~0xE000;
|
||||
GX_SetVisibleWindows(0);
|
||||
REG_WINOUT = (REG_WINOUT & ~0x3F) | 0x30;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
#include "TitleScreen/TitleScreen.hpp"
|
||||
#include "regs.h"
|
||||
#include <nitro/reg.h>
|
||||
|
||||
const unk16 data_ov025_020c5a0c[] = {0x0016, 0x003C};
|
||||
|
||||
extern "C" {
|
||||
void GX_SetGraphicsMode(unk32 param1, unk32 param2, unk32 param3);
|
||||
void GXS_SetGraphicsMode(unk32 param1);
|
||||
}
|
||||
|
||||
ARM TitleScreenManager *TitleScreenManager::Create(unk32 param1) {
|
||||
return new(HeapIndex_1) TitleScreenManager(param1);
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
#include "Unknown/UnkStruct_027e0d34.hpp"
|
||||
|
||||
extern "C" void func_01ffedac(u16 *, Vec3p *);
|
||||
extern "C" void func_01fff05c(u32 *, UnkStruct_027e0cd8_0c *, Vec3p *);
|
||||
extern "C" void func_01ffedac(u16 *, VecFx32 *);
|
||||
extern "C" void func_01fff05c(u32 *, UnkStruct_027e0cd8_0c *, VecFx32 *);
|
||||
extern "C" unk32 func_02017158();
|
||||
extern "C" void func_ov000_02098838();
|
||||
extern "C" void func_ov017_020bf99c();
|
||||
@@ -33,7 +33,7 @@ ARM ActorProfileRupee::ActorProfileRupee() :
|
||||
}
|
||||
|
||||
struct stack_struct {
|
||||
Vec3p sp4; // 4 8 c
|
||||
VecFx32 sp4; // 4 8 c
|
||||
unk32 pad1;
|
||||
unk16 sp14;
|
||||
u8 pad2[0x16];
|
||||
@@ -44,7 +44,7 @@ struct stack_struct {
|
||||
};
|
||||
|
||||
// non-matching
|
||||
ARM void ActorRupee::func_ov031_020e8d2c(Vec3p *param1, u8 param2, unk32 param3, unk32 param4) {
|
||||
ARM void ActorRupee::func_ov031_020e8d2c(VecFx32 *param1, u8 param2, unk32 param3, unk32 param4) {
|
||||
stack_struct stack;
|
||||
stack.sp2C = 0;
|
||||
stack.func_ov000_020975f8();
|
||||
@@ -99,7 +99,7 @@ ARM bool ActorRupee::vfunc_18(unk32 param1) {
|
||||
this->mUnk_96 = 0x1E0;
|
||||
this->mUnk_94 = 0;
|
||||
{
|
||||
Vec3p vel;
|
||||
VecFx32 vel;
|
||||
vel.x = 0;
|
||||
vel.y = 0;
|
||||
vel.z = 0;
|
||||
@@ -114,16 +114,16 @@ ARM bool ActorRupee::vfunc_18(unk32 param1) {
|
||||
this->mUnk_96 = 0x1E0;
|
||||
this->mUnk_94 = 0;
|
||||
{
|
||||
Vec3p vel;
|
||||
VecFx32 vel;
|
||||
|
||||
q20 vx = gRandom.Next32(0, 0x223) - 0x111;
|
||||
vel.x = vx;
|
||||
fx32 vx = gRandom.Next32(0, 0x223) - 0x111;
|
||||
vel.x = vx;
|
||||
|
||||
q20 vy = gRandom.Next32(0, 0x333) + 0x555;
|
||||
vel.y = vy;
|
||||
fx32 vy = gRandom.Next32(0, 0x333) + 0x555;
|
||||
vel.y = vy;
|
||||
|
||||
q20 vz = gRandom.Next32(0, 0x223) - 0x111;
|
||||
vel.z = vz;
|
||||
fx32 vz = gRandom.Next32(0, 0x223) - 0x111;
|
||||
vel.z = vz;
|
||||
|
||||
this->mVel.x = vel.x;
|
||||
this->mVel.y = vel.y;
|
||||
@@ -136,7 +136,7 @@ ARM bool ActorRupee::vfunc_18(unk32 param1) {
|
||||
this->mUnk_96 = 0x1E0;
|
||||
this->mUnk_94 = 0;
|
||||
{
|
||||
Vec3p vel;
|
||||
VecFx32 vel;
|
||||
vel.x = 0;
|
||||
vel.y = 0x800;
|
||||
vel.z = 0;
|
||||
@@ -207,7 +207,7 @@ ARM void ActorRupee::func_ov031_020e9068() {
|
||||
}
|
||||
|
||||
ARM void ActorRupee::func_ov031_020e9108() {
|
||||
Vec3p vel;
|
||||
VecFx32 vel;
|
||||
|
||||
vel.x = gRandom.Next32(0, 0x19B);
|
||||
vel.y = gRandom.Next32(0, 0x19A);
|
||||
@@ -343,8 +343,8 @@ ARM void ActorRupee::func_ov031_020e9438() {
|
||||
|
||||
ARM void ActorRupee::func_ov031_020e9450() {
|
||||
this->func_ov017_020bf9c8(gpActorManager->func_01fff3b4(this->mUnk_BC));
|
||||
Vec3p_Copy(&this->mPos, &this->mPrevPos);
|
||||
Vec3p_Add(&this->mPos, &this->mVel, &this->mPos);
|
||||
VecFx32_Copy(&this->mPos, &this->mPrevPos);
|
||||
VecFx32_Add(&this->mPos, &this->mVel, &this->mPos);
|
||||
|
||||
if (!GET_FLAG(this->mFlags, ActorFlag_5)) {
|
||||
return;
|
||||
@@ -560,7 +560,7 @@ ARM void ActorRupee::func_ov031_020e9904(unk32 param1) {
|
||||
|
||||
extern "C" void func_01fff17c(unk16 *, UnkStruct_027e0ce0 *, unk32);
|
||||
extern "C" void func_02018114(unk16 *, unk32);
|
||||
typedef void (*UnkCallback_vfunc_20)(Vec3p *);
|
||||
typedef void (*UnkCallback_vfunc_20)(VecFx32 *);
|
||||
|
||||
struct UnkStruct_ov031_02113588 {
|
||||
/* 00 */ UnkCallback_vfunc_20 callback;
|
||||
@@ -585,7 +585,7 @@ ARM void ActorRupee::vfunc_20() {
|
||||
short sStack_1c;
|
||||
u16 uStack_1e;
|
||||
u16 uStack_20;
|
||||
Vec3p test;
|
||||
VecFx32 test;
|
||||
|
||||
uStack_1a = 0;
|
||||
uVar2 = 0x666;
|
||||
@@ -686,7 +686,7 @@ ARM void ActorRupee::vfunc_20() {
|
||||
|
||||
ARM void ActorRupee::func_ov031_020e9b88() {
|
||||
func_ov000_02098838();
|
||||
Vec3p_Add(&this->mPos, &this->mVel, &this->mPos);
|
||||
VecFx32_Add(&this->mPos, &this->mVel, &this->mPos);
|
||||
|
||||
if (this->mUnk_5C.mInitialPos.y < this->mPos.y + this->mVel.y) {
|
||||
this->mUnk_44 = 0x9C;
|
||||
@@ -702,7 +702,7 @@ ARM void ActorRupee::func_ov031_020e9b88() {
|
||||
|
||||
ARM void ActorRupee::func_ov031_020e9be8() {
|
||||
func_ov000_02098838();
|
||||
Vec3p_Add(&this->mPos, &this->mVel, &this->mPos);
|
||||
VecFx32_Add(&this->mPos, &this->mVel, &this->mPos);
|
||||
|
||||
if (this->mVel.y < 0) {
|
||||
this->mUnk_44 = 3;
|
||||
@@ -713,12 +713,12 @@ ARM void ActorRupee::func_ov031_020e9be8() {
|
||||
extern "C" void func_ov000_0205c1f0(unk32 *, unk16);
|
||||
extern unk32 data_ov031_02110aa0[];
|
||||
extern unk32 data_ov031_02113468[];
|
||||
extern "C" void func_ov000_0205c204(unk32 *, Vec3p *, unk32, unk32, unk32);
|
||||
extern "C" void func_ov000_0205c204(unk32 *, VecFx32 *, unk32, unk32, unk32);
|
||||
|
||||
// non-matching
|
||||
ARM void ActorRupee::vfunc_2c(unk32 param1) {
|
||||
Vec3p iStack_18;
|
||||
Vec3p iStack_28;
|
||||
VecFx32 iStack_18;
|
||||
VecFx32 iStack_28;
|
||||
unk32 auStack_30[4];
|
||||
s32 uVar2;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "Unknown/UnkStruct_027e0cd8.hpp"
|
||||
|
||||
extern "C" void func_01ffedac(Vec2b *, Vec3p *);
|
||||
extern "C" void func_01ffedac(Vec2b *, VecFx32 *);
|
||||
|
||||
ARM DECL_PROFILE(ActorProfileUnkNORE);
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
extern "C" unk32 func_0200f218(unk32, const char *);
|
||||
extern "C" void func_0200b58c(void *);
|
||||
extern "C" void func_01ffb714(Vec3p *, Vec3p *, void *);
|
||||
extern "C" void func_01ffcfcc(Vec3p *, Vec3p *, Vec3p *);
|
||||
extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *);
|
||||
extern "C" void func_01ffcfcc(VecFx32 *, VecFx32 *, VecFx32 *);
|
||||
|
||||
struct UnkStruct_ov031_02117c84 {
|
||||
u16 mUnk_00;
|
||||
@@ -90,14 +90,14 @@ ARM bool MapObjectChestBase::vfunc_00() {
|
||||
|
||||
// non-matching
|
||||
ARM void MapObjectChestBase::vfunc_04() {
|
||||
q20 iVar2;
|
||||
fx32 iVar2;
|
||||
UnkStruct_027e0cd8_0c *pUVar5;
|
||||
Vec3p sp48;
|
||||
Vec3p sp3C;
|
||||
Vec3p local_38;
|
||||
Vec3p local_44;
|
||||
Vec3p sp18;
|
||||
Vec3p spC;
|
||||
VecFx32 sp48;
|
||||
VecFx32 sp3C;
|
||||
VecFx32 local_38;
|
||||
VecFx32 local_44;
|
||||
VecFx32 sp18;
|
||||
VecFx32 spC;
|
||||
Vec2b local_5e;
|
||||
Vec2b local_62;
|
||||
Vec2b local_64;
|
||||
@@ -125,7 +125,7 @@ ARM void MapObjectChestBase::vfunc_04() {
|
||||
spC.y = FLOAT_TO_Q20(1.0f);
|
||||
spC.z = FLOAT_TO_Q20(0.5f);
|
||||
|
||||
Vec3p_Add((Vec3p *) &sp3C, &spC, (Vec3p *) &sp3C);
|
||||
VecFx32_Add((VecFx32 *) &sp3C, &spC, (VecFx32 *) &sp3C);
|
||||
|
||||
local_68.x = this->mUnk_3A.x;
|
||||
local_68.y = this->mUnk_3A.y;
|
||||
@@ -180,7 +180,7 @@ ARM void MapObjectChestBase::vfunc_04() {
|
||||
}
|
||||
}
|
||||
|
||||
func_01ffcfcc(&local_44, &sp48, (Vec3p *) &sp3C);
|
||||
func_01ffcfcc(&local_44, &sp48, (VecFx32 *) &sp3C);
|
||||
|
||||
this->mUnk_050.mUnk_0C.x = local_44.x;
|
||||
this->mUnk_050.mUnk_0C.y = local_44.y;
|
||||
@@ -251,8 +251,8 @@ ARM bool MapObjectChestBase::vfunc_44() {
|
||||
}
|
||||
|
||||
ARM void MapObjectChestBase::func_ov031_02103f48() {
|
||||
Vec3p local_10;
|
||||
Vec3p_Init(this->mPos.x, this->mPos.y + 0x800, this->mPos.z, &local_10);
|
||||
VecFx32 local_10;
|
||||
VecFx32_Init(this->mPos.x, this->mPos.y + 0x800, this->mPos.z, &local_10);
|
||||
data_027e0cec->func_ov000_0209feac(0x81f, &local_10, 4, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#define DOORBASE_DTOR_NOINLINE
|
||||
#include "MapObject/MapObjectDoorBase.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_0204af1c.hpp"
|
||||
#include "Unknown/UnkStruct_027e0998.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" unk32 func_01ffb464(unk32 param1);
|
||||
extern "C" void func_01ff9218(void *, unk32, unk32);
|
||||
@@ -310,7 +310,7 @@ struct UnkStackStruct {
|
||||
s16 mUnk_04;
|
||||
s16 mUnk_06;
|
||||
unk32 mUnk_08;
|
||||
Vec3p mUnk_0C;
|
||||
VecFx32 mUnk_0C;
|
||||
u16 mUnk_18;
|
||||
u16 mUnk_1A;
|
||||
u16 mUnk_1C;
|
||||
@@ -367,13 +367,13 @@ ARM void MapObjectDoorBase::vfunc_5C(unk32 param1, unk32 param2) {
|
||||
auStack_5c.mUnk_3B = 0;
|
||||
}
|
||||
|
||||
UnkStackStruct *puVar5 = (UnkStackStruct *) func_ov000_02077590(3);
|
||||
auStack_5c.mUnk_18 = puVar5->mUnk_00;
|
||||
auStack_5c.mUnk_1A = puVar5->mUnk_02;
|
||||
auStack_5c.mUnk_1C = puVar5->mUnk_04;
|
||||
auStack_5c.mUnk_1E = puVar5->mUnk_06;
|
||||
auStack_5c.mUnk_20 = puVar5->mUnk_08;
|
||||
auStack_5c.mUnk_24.coords = puVar5->mUnk_0C.coords;
|
||||
UnkStackStruct *puVar5 = (UnkStackStruct *) func_ov000_02077590(3);
|
||||
auStack_5c.mUnk_18 = puVar5->mUnk_00;
|
||||
auStack_5c.mUnk_1A = puVar5->mUnk_02;
|
||||
auStack_5c.mUnk_1C = puVar5->mUnk_04;
|
||||
auStack_5c.mUnk_1E = puVar5->mUnk_06;
|
||||
auStack_5c.mUnk_20 = puVar5->mUnk_08;
|
||||
auStack_5c.mUnk_24 = puVar5->mUnk_0C;
|
||||
|
||||
u16 unk_18 = puVar5->mUnk_18;
|
||||
u16 unk_1A = puVar5->mUnk_1A;
|
||||
@@ -455,13 +455,13 @@ ARM void MapObjectDoorBase::vfunc_5C(unk32 param1, unk32 param2) {
|
||||
|
||||
auStack_9c.mUnk_38 |= 0x200;
|
||||
|
||||
UnkStackStruct *puVar5 = (UnkStackStruct *) func_ov000_02077590(2);
|
||||
auStack_9c.mUnk_18 = puVar5->mUnk_00;
|
||||
auStack_9c.mUnk_1A = puVar5->mUnk_02;
|
||||
auStack_9c.mUnk_1C = puVar5->mUnk_04;
|
||||
auStack_9c.mUnk_1E = puVar5->mUnk_06;
|
||||
auStack_9c.mUnk_20 = puVar5->mUnk_08;
|
||||
auStack_9c.mUnk_24.coords = puVar5->mUnk_0C.coords;
|
||||
UnkStackStruct *puVar5 = (UnkStackStruct *) func_ov000_02077590(2);
|
||||
auStack_9c.mUnk_18 = puVar5->mUnk_00;
|
||||
auStack_9c.mUnk_1A = puVar5->mUnk_02;
|
||||
auStack_9c.mUnk_1C = puVar5->mUnk_04;
|
||||
auStack_9c.mUnk_1E = puVar5->mUnk_06;
|
||||
auStack_9c.mUnk_20 = puVar5->mUnk_08;
|
||||
auStack_9c.mUnk_24 = puVar5->mUnk_0C;
|
||||
|
||||
u16 unk_18 = puVar5->mUnk_18;
|
||||
u16 unk_1A = puVar5->mUnk_1A;
|
||||
@@ -552,7 +552,7 @@ struct stack_struct {
|
||||
};
|
||||
|
||||
extern "C" void func_01ff9fbc(Mat2p *, unk32, Mat2p *);
|
||||
extern q4 data_0203f964[];
|
||||
extern fx16 data_0203f964[];
|
||||
|
||||
ARM void MapObjectDoorBase::func_ov031_020fcb78(s8 *param1, s8 param2) {
|
||||
Vec2s sp10;
|
||||
@@ -653,8 +653,8 @@ ARM void MapObjectDoorBase::vfunc_44() {}
|
||||
|
||||
ARM void MapObjectDoorBase::vfunc_4C() {}
|
||||
|
||||
ARM void MapObjectDoorBase::vfunc_84(unk32 param1, Vec3p *param2, unk16 *param3) {
|
||||
Vec3p local_20;
|
||||
ARM void MapObjectDoorBase::vfunc_84(unk32 param1, VecFx32 *param2, unk16 *param3) {
|
||||
VecFx32 local_20;
|
||||
*param3 = this->mUnk_14;
|
||||
|
||||
if (param1 != 0) {
|
||||
@@ -669,7 +669,7 @@ ARM void MapObjectDoorBase::vfunc_84(unk32 param1, Vec3p *param2, unk16 *param3)
|
||||
*param3 += -DEG_TO_ANG(180);
|
||||
}
|
||||
|
||||
Vec3p_Add(&this->mPos, &local_20, param2);
|
||||
VecFx32_Add(&this->mPos, &local_20, param2);
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorBase::func_ov031_020fcf0c(unk32 param1) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
|
||||
extern "C" f32 func_02039f04(unk32);
|
||||
extern "C" void func_01ffaf74(Vec3p *, Mat4x3p *, Vec3p *);
|
||||
extern "C" void func_01ffcfcc(Vec3p *, Vec3p *, Vec3p *);
|
||||
extern "C" void func_01ffaf74(VecFx32 *, Mat4x3p *, VecFx32 *);
|
||||
extern "C" void func_01ffcfcc(VecFx32 *, VecFx32 *, VecFx32 *);
|
||||
extern "C" unk32 func_01ffb428(unk32, unk32);
|
||||
extern "C" unk32 func_01ffb464(unk32 param1);
|
||||
extern "C" void func_01ff9218(void *, unk32, unk32);
|
||||
@@ -49,9 +49,9 @@ ARM u16 MapObjectDoorClick::vfunc2_1C(unk32 param1) {
|
||||
|
||||
// https://decomp.me/scratch/zmw3b
|
||||
ARM bool MapObjectDoorClick::vfunc_00(void) {
|
||||
Vec3p local_1c;
|
||||
Vec3p local_28;
|
||||
Vec3p local_40[2];
|
||||
VecFx32 local_1c;
|
||||
VecFx32 local_28;
|
||||
VecFx32 local_40[2];
|
||||
|
||||
this->func_ov031_020fbf10(true, false);
|
||||
this->mUnk_8B = true;
|
||||
@@ -223,8 +223,8 @@ ARM void MapObjectDoorClick::vfunc_14(void) {
|
||||
u16 angle = (u16) sVar2;
|
||||
|
||||
Mat3p m;
|
||||
Vec3p local_48;
|
||||
Vec3p temp;
|
||||
VecFx32 local_48;
|
||||
VecFx32 temp;
|
||||
|
||||
Mat3p_InitYRotation(&m, SIN(angle), COS(angle));
|
||||
temp.x = this->mPos.x - FLOAT_TO_Q20(1.0f) + this->mUnk_70;
|
||||
@@ -350,15 +350,15 @@ ARM void MapObjectDoorClick::vfunc_7C(void) {
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorClick::vfunc_78(void) {
|
||||
Vec3p local_24;
|
||||
Vec3p local_30;
|
||||
Vec3p VStack_3c;
|
||||
Vec3p VStack_48;
|
||||
VecFx32 local_24;
|
||||
VecFx32 local_30;
|
||||
VecFx32 VStack_3c;
|
||||
VecFx32 VStack_48;
|
||||
Mat4x3p m;
|
||||
Vec3p local_84;
|
||||
Vec3p local_90;
|
||||
VecFx32 local_84;
|
||||
VecFx32 local_90;
|
||||
|
||||
Vec3p temp;
|
||||
VecFx32 temp;
|
||||
temp.x = this->mPos.x;
|
||||
temp.z = this->mPos.z;
|
||||
temp.y = this->mPos.y;
|
||||
@@ -387,13 +387,13 @@ ARM void MapObjectDoorClick::vfunc_78(void) {
|
||||
func_01ffaf74(&local_90, &m, &local_90);
|
||||
func_01ffaf74(&local_84, &m, &local_84);
|
||||
|
||||
Vec3p_Add(&local_24, &local_90, &local_24);
|
||||
Vec3p_Add(&local_24, &local_84, &VStack_3c);
|
||||
VecFx32_Add(&local_24, &local_90, &local_24);
|
||||
VecFx32_Add(&local_24, &local_84, &VStack_3c);
|
||||
|
||||
local_90.x = -local_90.x;
|
||||
local_84.x = -local_84.x;
|
||||
Vec3p_Add(&local_30, &local_90, &local_30);
|
||||
Vec3p_Add(&local_30, &local_84, &VStack_48);
|
||||
VecFx32_Add(&local_30, &local_90, &local_30);
|
||||
VecFx32_Add(&local_30, &local_84, &VStack_48);
|
||||
|
||||
if (this->mUnk_68.mUnk_00 != NULL) {
|
||||
this->mUnk_68.mUnk_00->func_ov000_02052c48(&VStack_3c, &local_24);
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
extern "C" void *func_ov000_02077590(unk32);
|
||||
extern "C" unk32 func_01ffb428(unk32, unk32);
|
||||
extern "C" void func_01ffaf74(Vec3p *, Mat4x3p *, Vec3p *);
|
||||
extern "C" void func_01ff93c0(Vec3p *, q20);
|
||||
extern "C" void func_01ffaf74(VecFx32 *, Mat4x3p *, VecFx32 *);
|
||||
extern "C" void func_01ff93c0(VecFx32 *, fx32);
|
||||
extern unk32 data_ov031_02110c00[];
|
||||
extern UnkStruct_ov000_020b34c4_Callback data_ov000_020b4cc4;
|
||||
|
||||
@@ -62,7 +62,7 @@ ARM bool MapObjectDoorDangerSpawn::vfunc_00(void) {
|
||||
|
||||
ARM void MapObjectDoorDangerSpawn::vfunc_04(void) {
|
||||
UnkStruct_027e0cd8_0c *ptr;
|
||||
Vec3p auStack_20;
|
||||
VecFx32 auStack_20;
|
||||
|
||||
if (this->mUnk_20.mUnk_00[1] == 2) {
|
||||
this->mUnk_6C = 0;
|
||||
@@ -159,8 +159,8 @@ struct UnkStruct_Copy {
|
||||
ARM void MapObjectDoorDangerSpawn::vfunc_08(void) {
|
||||
UnkStruct_Copy sp3C;
|
||||
UnkStruct_Copy sp1C;
|
||||
Vec3p sp10;
|
||||
Vec3p sp4;
|
||||
VecFx32 sp10;
|
||||
VecFx32 sp4;
|
||||
|
||||
if (this->mUnk_AC < this->mUnk_AE) {
|
||||
this->mUnk_AC++;
|
||||
@@ -521,7 +521,7 @@ ARM bool MapObjectDoorDangerSpawn::vfunc_6C(void) {
|
||||
|
||||
ARM bool MapObjectDoorDangerSpawn::func_ov031_020fdec8(void) {
|
||||
UnkStruct_027e0cd8_0c *pUVar4;
|
||||
Vec3p *uVar3;
|
||||
VecFx32 *uVar3;
|
||||
int iVar1;
|
||||
|
||||
switch (this->mUnk_20.mUnk_00[1]) {
|
||||
@@ -570,7 +570,7 @@ ARM void MapObjectDoorDangerSpawn::vfunc_14(void) {
|
||||
Mat3p m;
|
||||
Mat3p_InitYRotation(&m, SIN((u16) this->mUnk_14), COS((u16) this->mUnk_14));
|
||||
|
||||
Vec3p pos(this->mPos);
|
||||
VecFx32 pos(this->mPos);
|
||||
pos.y += -(this->mUnk_6C * 2);
|
||||
|
||||
this->mUnk_94.vfunc_14(&m, &pos);
|
||||
@@ -602,13 +602,13 @@ ARM void MapObjectDoorDangerSpawn::vfunc2_10(void) {
|
||||
|
||||
// https://decomp.me/scratch/DEJfq
|
||||
ARM void MapObjectDoorDangerSpawn::vfunc_74(void) {
|
||||
Vec3p local_28;
|
||||
Vec3p local_34;
|
||||
Vec3p local_40;
|
||||
Vec3p local_4c;
|
||||
VecFx32 local_28;
|
||||
VecFx32 local_34;
|
||||
VecFx32 local_40;
|
||||
VecFx32 local_4c;
|
||||
Mat4x3p m;
|
||||
|
||||
q20 b33 = 0xB33;
|
||||
fx32 b33 = 0xB33;
|
||||
|
||||
local_34.x = this->mPos.x;
|
||||
local_34.y = this->mPos.y;
|
||||
@@ -637,8 +637,8 @@ ARM void MapObjectDoorDangerSpawn::vfunc_74(void) {
|
||||
func_01ffaf74(&local_40, &m, &local_40);
|
||||
func_01ffaf74(&local_4c, &m, &local_4c);
|
||||
|
||||
Vec3p_Add(&local_28, &local_40, &local_28);
|
||||
Vec3p_Add(&local_34, &local_4c, &local_34);
|
||||
VecFx32_Add(&local_28, &local_40, &local_28);
|
||||
VecFx32_Add(&local_34, &local_4c, &local_34);
|
||||
|
||||
data_027e0cec->func_ov000_0209ff8c(&this->mUnk_68, 0x8CF, &local_28, 4);
|
||||
data_027e0cec->func_ov000_0209ff8c(&this->mUnk_A8, 0x8CF, &local_34, 4);
|
||||
@@ -694,7 +694,7 @@ ARM unk32 MapObjectDoorDangerSpawn::vfunc_8C(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorDangerSpawn::vfunc_84(unk32 param1, Vec3p *param2, unk16 *param3) {
|
||||
ARM void MapObjectDoorDangerSpawn::vfunc_84(unk32 param1, VecFx32 *param2, unk16 *param3) {
|
||||
s16 iVar1;
|
||||
|
||||
if (!this->mUnk_58) {
|
||||
@@ -702,7 +702,7 @@ ARM void MapObjectDoorDangerSpawn::vfunc_84(unk32 param1, Vec3p *param2, unk16 *
|
||||
return;
|
||||
}
|
||||
|
||||
Vec3p local_24;
|
||||
VecFx32 local_24;
|
||||
*param3 = this->mUnk_14;
|
||||
iVar1 = this->mUnk_14 + DEG_TO_ANG(30);
|
||||
if (param1 != 0) {
|
||||
@@ -716,9 +716,9 @@ ARM void MapObjectDoorDangerSpawn::vfunc_84(unk32 param1, Vec3p *param2, unk16 *
|
||||
|
||||
*param3 += DEG_TO_ANG(180);
|
||||
}
|
||||
Vec3p_Add(&this->mPos, &local_24, param2);
|
||||
VecFx32_Add(&this->mPos, &local_24, param2);
|
||||
|
||||
Vec3p local_30;
|
||||
VecFx32 local_30;
|
||||
this->mUnk_5A = this->mUnk_14;
|
||||
iVar1 = this->mUnk_14 - DEG_TO_ANG(30);
|
||||
if (param1 != 0) {
|
||||
@@ -731,25 +731,25 @@ ARM void MapObjectDoorDangerSpawn::vfunc_84(unk32 param1, Vec3p *param2, unk16 *
|
||||
local_30.y = 0;
|
||||
this->mUnk_5A += DEG_TO_ANG(180);
|
||||
}
|
||||
Vec3p_Add(&this->mPos, &local_30, &this->mUnk_5C);
|
||||
VecFx32_Add(&this->mPos, &local_30, &this->mUnk_5C);
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorDangerSpawn::func_ov031_020fe5fc(Vec3p *param1, MapObjectDoorDangerSpawn *thisx) {
|
||||
ARM void MapObjectDoorDangerSpawn::func_ov031_020fe5fc(VecFx32 *param1, MapObjectDoorDangerSpawn *thisx) {
|
||||
if (data_027e0ce0->func_01fff1a4()) {
|
||||
Vec3p *piVar2 = data_027e0ce0->func_01fff148(1);
|
||||
Vec3p *piVar3 = data_027e0ce0->func_01fff148(0);
|
||||
VecFx32 *piVar2 = data_027e0ce0->func_01fff148(1);
|
||||
VecFx32 *piVar3 = data_027e0ce0->func_01fff148(0);
|
||||
|
||||
Vec3p temp;
|
||||
Vec3p_Init(piVar3->x, piVar3->y, piVar3->z, &temp);
|
||||
VecFx32 temp;
|
||||
VecFx32_Init(piVar3->x, piVar3->y, piVar3->z, &temp);
|
||||
|
||||
Vec3p pos;
|
||||
Vec3p_Init(temp.x + piVar2->x, temp.y + piVar2->y, temp.z + piVar2->z, &pos);
|
||||
VecFx32 pos;
|
||||
VecFx32_Init(temp.x + piVar2->x, temp.y + piVar2->y, temp.z + piVar2->z, &pos);
|
||||
|
||||
func_01ff93c0(&pos, FLOAT_TO_Q20(0.5f));
|
||||
param1->coords = pos.coords;
|
||||
*param1 = pos;
|
||||
} else {
|
||||
Vec3p *piVar4 = data_027e0ce0->func_01fff148(0);
|
||||
param1->coords = piVar4->coords;
|
||||
VecFx32 *piVar4 = data_027e0ce0->func_01fff148(0);
|
||||
*param1 = *piVar4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
|
||||
extern "C" f32 func_02039f04(unk32);
|
||||
extern "C" void func_01ffaf74(Vec3p *, Mat4x3p *, Vec3p *);
|
||||
extern "C" void func_01ffaf74(VecFx32 *, Mat4x3p *, VecFx32 *);
|
||||
|
||||
const UnkStruct_ov031_021150b0 data_ov031_02115184(0x1E66);
|
||||
|
||||
@@ -68,8 +68,8 @@ ARM void MapObjectDoorKey::vfunc_14(void) {
|
||||
u16 angle = (u16) sVar2;
|
||||
|
||||
Mat3p m;
|
||||
Vec3p local_48;
|
||||
Vec3p temp;
|
||||
VecFx32 local_48;
|
||||
VecFx32 temp;
|
||||
|
||||
Mat3p_InitYRotation(&m, SIN(angle), COS(angle));
|
||||
temp.x = this->mPos.x - FLOAT_TO_Q20(1.0f) + this->mUnk_70;
|
||||
@@ -175,15 +175,15 @@ ARM void MapObjectDoorKey::vfunc_7C(void) {
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorKey::vfunc_78(void) {
|
||||
Vec3p local_24;
|
||||
Vec3p local_30;
|
||||
Vec3p VStack_3c;
|
||||
Vec3p VStack_48;
|
||||
VecFx32 local_24;
|
||||
VecFx32 local_30;
|
||||
VecFx32 VStack_3c;
|
||||
VecFx32 VStack_48;
|
||||
Mat4x3p m;
|
||||
Vec3p local_84;
|
||||
Vec3p local_90;
|
||||
VecFx32 local_84;
|
||||
VecFx32 local_90;
|
||||
|
||||
Vec3p temp;
|
||||
VecFx32 temp;
|
||||
temp.x = this->mPos.x;
|
||||
temp.z = this->mPos.z;
|
||||
temp.y = this->mPos.y;
|
||||
@@ -212,13 +212,13 @@ ARM void MapObjectDoorKey::vfunc_78(void) {
|
||||
func_01ffaf74(&local_90, &m, &local_90);
|
||||
func_01ffaf74(&local_84, &m, &local_84);
|
||||
|
||||
Vec3p_Add(&local_24, &local_90, &local_24);
|
||||
Vec3p_Add(&local_24, &local_84, &VStack_3c);
|
||||
VecFx32_Add(&local_24, &local_90, &local_24);
|
||||
VecFx32_Add(&local_24, &local_84, &VStack_3c);
|
||||
|
||||
local_90.x = -local_90.x;
|
||||
local_84.x = -local_84.x;
|
||||
Vec3p_Add(&local_30, &local_90, &local_30);
|
||||
Vec3p_Add(&local_30, &local_84, &VStack_48);
|
||||
VecFx32_Add(&local_30, &local_90, &local_30);
|
||||
VecFx32_Add(&local_30, &local_84, &VStack_48);
|
||||
|
||||
if (this->mUnk_68.mUnk_00 != NULL) {
|
||||
this->mUnk_68.mUnk_00->func_ov000_02052c48(&VStack_3c, &local_24);
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
#include "versions.h"
|
||||
|
||||
extern "C" void func_01ffaf74(Vec3p *, Mat4x3p *, Vec3p *);
|
||||
extern "C" q20 func_01ffb464(q20);
|
||||
extern "C" void func_01ff9218(q20 *, q20, q20);
|
||||
extern "C" void func_01ffaf74(VecFx32 *, Mat4x3p *, VecFx32 *);
|
||||
extern "C" fx32 func_01ffb464(fx32);
|
||||
extern "C" void func_01ff9218(fx32 *, fx32, fx32);
|
||||
|
||||
const UnkStruct_ov031_021150b0 data_ov031_02115254(0x1E66);
|
||||
|
||||
@@ -118,7 +118,7 @@ ARM void MapObjectDoorSwitch::vfunc_14(void) {
|
||||
|
||||
Mat3p_InitYRotation(&m, SIN(angle), COS(angle));
|
||||
|
||||
Vec3p local_40(this->mPos);
|
||||
VecFx32 local_40(this->mPos);
|
||||
local_40.y -= this->mUnk_6C * 2;
|
||||
this->mUnk_094.vfunc_14(&m, &local_40);
|
||||
}
|
||||
@@ -128,16 +128,16 @@ ARM void MapObjectDoorSwitch::vfunc_18(s8 *param1, s8 param2) {
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorSwitch::vfunc_74(void) {
|
||||
Vec3p local_20 = this->mPos;
|
||||
Vec3p local_2c;
|
||||
Vec3p_Init(0, 0, 0x666, &local_2c);
|
||||
VecFx32 local_20 = this->mPos;
|
||||
VecFx32 local_2c;
|
||||
VecFx32_Init(0, 0, 0x666, &local_2c);
|
||||
|
||||
Mat4x3p m;
|
||||
u16 angle = this->mUnk_14;
|
||||
|
||||
Mat4x3p_InitYRotation(&m, SIN(angle), COS(angle));
|
||||
func_01ffaf74(&local_2c, &m, &local_2c);
|
||||
Vec3p_Add(&local_20, &local_2c, &local_20);
|
||||
VecFx32_Add(&local_20, &local_2c, &local_20);
|
||||
|
||||
data_027e0cec->func_ov000_0209ff8c(&this->mUnk_68, 0x8CF, &local_20, 4);
|
||||
|
||||
@@ -224,7 +224,7 @@ ARM void MapObjectDoorSwitch::vfunc_54(void) {
|
||||
func_01ff9218(&this->mUnkPos, -FLOAT_TO_Q20(1.35f), func_01ffb464(INT_TO_Q20(this->mUnk_80)));
|
||||
}
|
||||
|
||||
q20 temp_118 = this->mUnkPos;
|
||||
fx32 temp_118 = this->mUnkPos;
|
||||
this->mUnk_0F4.mUnk_0C.x = -FLOAT_TO_Q20(1.0f);
|
||||
this->mUnk_0F4.mUnk_0C.y = FLOAT_TO_Q20(0.0f);
|
||||
this->mUnk_0F4.mUnk_0C.z = temp_118;
|
||||
@@ -271,7 +271,7 @@ ARM void MapObjectDoorSwitch::vfunc_54(void) {
|
||||
func_01ff9218(&this->mUnkPos, -FLOAT_TO_Q20(1.35f), func_01ffb464(INT_TO_Q20(this->mUnk_80)));
|
||||
}
|
||||
|
||||
q20 temp_118 = this->mUnkPos;
|
||||
fx32 temp_118 = this->mUnkPos;
|
||||
this->mUnk_0F4.mUnk_0C.x = -FLOAT_TO_Q20(1.0f);
|
||||
this->mUnk_0F4.mUnk_0C.y = FLOAT_TO_Q20(0.0f);
|
||||
this->mUnk_0F4.mUnk_0C.z = temp_118;
|
||||
|
||||
@@ -38,7 +38,7 @@ extern "C" void func_01ffb6e4(unk32, const void *, void *);
|
||||
extern "C" void func_01ffc5a0(UnkSystem4 *, unk32, u16, void *, unk32);
|
||||
extern "C" void func_ov000_0208f820();
|
||||
extern "C" unk32 func_ov024_020d5354(unk32 *, u16 *);
|
||||
extern "C" void func_ov000_02058fc4(unk32 *, UnkStruct_PlayerGet_74 *, Vec3p *);
|
||||
extern "C" void func_ov000_02058fc4(unk32 *, UnkStruct_PlayerGet_74 *, VecFx32 *);
|
||||
extern unk32 *data_027e0958;
|
||||
extern "C" void func_ov000_0208ba10(void *, void *, unk32);
|
||||
extern "C" void func_02015ea8(unk32, void *);
|
||||
@@ -501,12 +501,12 @@ ARM void PlayerGet::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) {
|
||||
ItemId itemId;
|
||||
ItemManager *pItemManager;
|
||||
Actor *iVar10;
|
||||
Vec3p *pUnk_38;
|
||||
Vec3p *pUnk_3c;
|
||||
VecFx32 *pUnk_38;
|
||||
VecFx32 *pUnk_3c;
|
||||
|
||||
switch (param1->mUnk_04) {
|
||||
case 0x39:
|
||||
Vec3p temp;
|
||||
VecFx32 temp;
|
||||
itemId = param1->mUnk_1C;
|
||||
temp.x = param1->mUnk_10.x;
|
||||
temp.y = param1->mUnk_10.y;
|
||||
@@ -703,9 +703,9 @@ ARM void PlayerGet::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) {
|
||||
|
||||
if (this->mUnk_54.mItemId != ItemId_Nothing) {
|
||||
unk32 uStack_f0[4];
|
||||
Vec3p VStack_fc;
|
||||
VecFx32 VStack_fc;
|
||||
|
||||
Vec3p_Add(this->mUnk_34, &data_ov110_021861ec.mUnk_00, &VStack_fc);
|
||||
VecFx32_Add(this->mUnk_34, &data_ov110_021861ec.mUnk_00, &VStack_fc);
|
||||
data_027e0cec->func_ov000_0209feac(0x874, &VStack_fc, 1, 0, 0);
|
||||
uStack_f0[0] = 0x870;
|
||||
uStack_f0[1] = 0x871;
|
||||
@@ -1002,7 +1002,7 @@ ARM void PlayerGet::vfunc_10(unk32 param1, unk32 param2) {
|
||||
}
|
||||
|
||||
ARM void PlayerGet::vfunc_18(unk32 param1, unk32 param2, unk32 param3) {
|
||||
Vec3p auStack_18;
|
||||
VecFx32 auStack_18;
|
||||
|
||||
switch (param2) {
|
||||
case 0x39:
|
||||
@@ -1010,7 +1010,7 @@ ARM void PlayerGet::vfunc_18(unk32 param1, unk32 param2, unk32 param3) {
|
||||
break;
|
||||
case 0x3B:
|
||||
if (param3 != 0 && this->mUnk_54.mItemId != ItemId_Nothing && this->mUnk_8C.mUnk_04 != 0) {
|
||||
Vec3p_Add(this->mUnk_34, (Vec3p *) &data_ov110_021861ec.mUnk_00, &auStack_18);
|
||||
VecFx32_Add(this->mUnk_34, (VecFx32 *) &data_ov110_021861ec.mUnk_00, &auStack_18);
|
||||
func_ov000_02058fc4(data_027e0958, &this->mUnk_74, &auStack_18);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "math.hpp"
|
||||
|
||||
extern "C" void func_ov000_0205ca74(unk32);
|
||||
extern "C" void func_ov000_0205d65c(void *, Vec3p *, Vec3p *, u32);
|
||||
extern "C" void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, u32);
|
||||
|
||||
ARM PlayerSceneChange::PlayerSceneChange() {
|
||||
this->mUnk_68 = this->mUnk_2C->mUnk_14C;
|
||||
@@ -63,21 +63,21 @@ ARM s16 PlayerSceneChange::func_ov112_02184bbc(s16 param1) {
|
||||
|
||||
extern "C" bool func_ov096_02179c14();
|
||||
extern "C" void func_ov034_02121de4(void *);
|
||||
extern q4 data_02040964[];
|
||||
extern q4 data_0203e964[];
|
||||
extern q4 data_02041964[];
|
||||
extern q4 data_0203f964[];
|
||||
extern q4 data_0203feb0[];
|
||||
extern "C" void func_01ffb714(Vec3p *, Vec3p *, void *);
|
||||
extern fx16 data_02040964[];
|
||||
extern fx16 data_0203e964[];
|
||||
extern fx16 data_02041964[];
|
||||
extern fx16 data_0203f964[];
|
||||
extern fx16 data_0203feb0[];
|
||||
extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *);
|
||||
extern "C" void func_01ff9638(void *, s16);
|
||||
extern "C" void func_01ff9770(void *);
|
||||
extern unk32 data_ov000_020b3000;
|
||||
extern "C" bool func_ov000_02080998(Vec3p *);
|
||||
extern "C" bool func_ov000_02080998(VecFx32 *);
|
||||
extern "C" void func_01ff930c(UnkStruct_ov000_0208f820_40 *, unk16, unk32);
|
||||
|
||||
// https://decomp.me/scratch/c7PhN
|
||||
ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) {
|
||||
q4 *pSinCosTable = gSinCosTable;
|
||||
fx16 *pSinCosTable = gSinCosTable;
|
||||
Vec2b stack4;
|
||||
s16 stack3;
|
||||
Vec2b stack2;
|
||||
@@ -119,10 +119,10 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
break;
|
||||
}
|
||||
|
||||
Vec3p *temp_r8 = this->mUnk_34;
|
||||
this->mUnk_70.x = temp_r8->x;
|
||||
this->mUnk_70.y = temp_r8->y;
|
||||
this->mUnk_70.z = temp_r8->z;
|
||||
VecFx32 *temp_r8 = this->mUnk_34;
|
||||
this->mUnk_70.x = temp_r8->x;
|
||||
this->mUnk_70.y = temp_r8->y;
|
||||
this->mUnk_70.z = temp_r8->z;
|
||||
|
||||
this->mUnk_A8 = -0x8000;
|
||||
this->mUnk_AA = -0x8000;
|
||||
@@ -153,7 +153,7 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
MapObjectUnkDRTY *pDRTY = (MapObjectUnkDRTY *) gpMapObjManager->func_01fff498(stack2);
|
||||
|
||||
if (pDRTY != NULL) {
|
||||
pDRTY->func_ov000_0209d6ac((Vec3p *) &this->mUnk_70);
|
||||
pDRTY->func_ov000_0209d6ac((VecFx32 *) &this->mUnk_70);
|
||||
|
||||
if (this->mUnk_68 == 0x19) {
|
||||
pDRTY->func_ov034_02121d84();
|
||||
@@ -195,7 +195,7 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
break;
|
||||
}
|
||||
|
||||
func_ov000_0205d65c(&stack3, this->mUnk_34, (Vec3p *) &this->mUnk_70, this->mUnk_40->mUnk_00);
|
||||
func_ov000_0205d65c(&stack3, this->mUnk_34, (VecFx32 *) &this->mUnk_70, this->mUnk_40->mUnk_00);
|
||||
this->mUnk_40->mUnk_00 = stack3;
|
||||
|
||||
switch (this->mUnk_68) {
|
||||
@@ -215,14 +215,14 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
|
||||
unk32 sp78;
|
||||
unk16 temp_r8_2 = this->mUnk_A8 - 0x8000;
|
||||
func_01ffb714(this->mUnk_34, (Vec3p *) &this->mUnk_70, &sp78);
|
||||
func_01ffb714(this->mUnk_34, (VecFx32 *) &this->mUnk_70, &sp78);
|
||||
func_01ff9638(&sp78, -temp_r8_2);
|
||||
this->mUnk_9C.x = -sp78;
|
||||
this->mUnk_9C.y = 0;
|
||||
this->mUnk_9C.z = 0;
|
||||
func_01ff9638(&this->mUnk_9C, temp_r8_2);
|
||||
|
||||
q20 temp_r0_11 = Vec3p_Length(&this->mUnk_9C);
|
||||
fx32 temp_r0_11 = VecFx32_Length(&this->mUnk_9C);
|
||||
if (temp_r0_11 > 0x800) {
|
||||
if ((((temp_r0_11 - 0x800) / 10) + ((temp_r0_11 - 0x800) >> 0x1F)) <= 0) {
|
||||
this->mUnk_9C.x = 0;
|
||||
@@ -230,7 +230,7 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
this->mUnk_9C.z = 0;
|
||||
} else {
|
||||
func_01ff9770(&this->mUnk_9C);
|
||||
Vec3p_Add(this->mUnk_3C, &this->mUnk_9C, this->mUnk_3C);
|
||||
VecFx32_Add(this->mUnk_3C, &this->mUnk_9C, this->mUnk_3C);
|
||||
}
|
||||
} else {
|
||||
this->mUnk_9C.x = 0;
|
||||
@@ -264,16 +264,16 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
}
|
||||
|
||||
if (this->mUnk_28->mUnk_98 != NULL) {
|
||||
this->mUnk_28->mUnk_98->func_ov093_0216f76c((Vec3p *) &this->mUnk_70, this->mUnk_68);
|
||||
this->mUnk_28->mUnk_98->func_ov093_0216f76c((VecFx32 *) &this->mUnk_70, this->mUnk_68);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x3D: {
|
||||
Vec3p *pVec = this->mUnk_38;
|
||||
pVec->x = 0;
|
||||
pVec->y = 0;
|
||||
pVec->z = 0;
|
||||
VecFx32 *pVec = this->mUnk_38;
|
||||
pVec->x = 0;
|
||||
pVec->y = 0;
|
||||
pVec->z = 0;
|
||||
break;
|
||||
}
|
||||
case 0x3E: {
|
||||
@@ -343,7 +343,7 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
|
||||
this->mUnk_6C = -1;
|
||||
|
||||
Vec3p *pVec = this->mUnk_34;
|
||||
VecFx32 *pVec = this->mUnk_34;
|
||||
this->mUnk_70.x = pVec->x;
|
||||
this->mUnk_70.y = pVec->y;
|
||||
this->mUnk_70.z = pVec->z;
|
||||
@@ -424,14 +424,14 @@ ARM void PlayerSceneChange::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1
|
||||
case 0x11:
|
||||
case 0x13:
|
||||
case 0x24: {
|
||||
q20 posY = ptr->vfunc_28(this->mUnk_34, 0, 0);
|
||||
fx32 posY = ptr->vfunc_28(this->mUnk_34, 0, 0);
|
||||
if (this->mUnk_34->y >= posY) {
|
||||
this->mUnk_34->y = posY;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
q20 posY = ptr->vfunc_28(this->mUnk_34, 0, 0);
|
||||
fx32 posY = ptr->vfunc_28(this->mUnk_34, 0, 0);
|
||||
if (this->mUnk_34->y <= posY) {
|
||||
this->mUnk_34->y = posY;
|
||||
}
|
||||
@@ -463,14 +463,14 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
switch (param1) {
|
||||
case 0x3C:
|
||||
if (this->mUnk_68 == 0x19) {
|
||||
if (this->func_ov000_020914b0(0x3C, (Vec3p *) &this->mUnk_70, this->mUnk_7C)) {
|
||||
if (this->func_ov000_020914b0(0x3C, (VecFx32 *) &this->mUnk_70, this->mUnk_7C)) {
|
||||
this->mUnk_30->func_ov000_020921e4(0x3D);
|
||||
}
|
||||
|
||||
Vec3p *temp_r1 = this->mUnk_34;
|
||||
this->mUnk_80.x = temp_r1->x;
|
||||
this->mUnk_80.y = temp_r1->y;
|
||||
this->mUnk_80.z = temp_r1->z;
|
||||
VecFx32 *temp_r1 = this->mUnk_34;
|
||||
this->mUnk_80.x = temp_r1->x;
|
||||
this->mUnk_80.y = temp_r1->y;
|
||||
this->mUnk_80.z = temp_r1->z;
|
||||
} else {
|
||||
if (this->mUnk_6C > 0) {
|
||||
this->mUnk_6C--;
|
||||
@@ -490,7 +490,7 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->func_ov000_020914b0(0x3C, (Vec3p *) &this->mUnk_70, this->mUnk_7C)) {
|
||||
if (this->func_ov000_020914b0(0x3C, (VecFx32 *) &this->mUnk_70, this->mUnk_7C)) {
|
||||
s16 var_r1_2 = this->mUnk_40->mUnk_00;
|
||||
bool var_r3 = true;
|
||||
|
||||
@@ -544,9 +544,9 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
}
|
||||
|
||||
// s16 iVar3 = var_r1_2 >> 4;
|
||||
// q20 uVar6 = gSinCosTable[iVar3 * 2] * 0x2000;
|
||||
// q20 uVar5 = gSinCosTable[iVar3 * 2 + 1] * 0x2000;
|
||||
// q20 iVar2 = (gSinCosTable[iVar3 * 2 + 1] >> 0x13) + (0xfffff7ff < uVar5);
|
||||
// fx32 uVar6 = gSinCosTable[iVar3 * 2] * 0x2000;
|
||||
// fx32 uVar5 = gSinCosTable[iVar3 * 2 + 1] * 0x2000;
|
||||
// fx32 iVar2 = (gSinCosTable[iVar3 * 2 + 1] >> 0x13) + (0xfffff7ff < uVar5);
|
||||
|
||||
// this->mUnk_70.x +=
|
||||
// (((uVar6 + 0x800) >> 0xc) | (gSinCosTable[iVar3 * 2] >> 0x13) + (0xfffff7ff < uVar6)) * 0x100000;
|
||||
@@ -564,8 +564,8 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
case 0x21:
|
||||
case 0x25: {
|
||||
s16 value = this->func_ov112_02184bbc(0);
|
||||
q4 sin = SIN2(data_0203feb0, value);
|
||||
q4 cos = COS2(data_0203feb0, value);
|
||||
fx16 sin = SIN2(data_0203feb0, value);
|
||||
fx16 cos = COS2(data_0203feb0, value);
|
||||
|
||||
this->mUnk_70.x += MUL_Q20(sin, 0x19A);
|
||||
this->mUnk_70.z += MUL_Q20(cos, 0x19A);
|
||||
@@ -584,13 +584,13 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
if (!this->mUnk_AC) {
|
||||
func_01ff930c(this->mUnk_40, this->mUnk_AA, 0x200);
|
||||
|
||||
Vec3p *temp_r2_4 = this->mUnk_34;
|
||||
this->mUnk_70.x = temp_r2_4->x;
|
||||
this->mUnk_70.y = temp_r2_4->y;
|
||||
this->mUnk_70.z = temp_r2_4->z;
|
||||
VecFx32 *temp_r2_4 = this->mUnk_34;
|
||||
this->mUnk_70.x = temp_r2_4->x;
|
||||
this->mUnk_70.y = temp_r2_4->y;
|
||||
this->mUnk_70.z = temp_r2_4->z;
|
||||
|
||||
q4 sin = SIN2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
q4 cos = COS2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
fx16 sin = SIN2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
fx16 cos = COS2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
this->mUnk_70.x += MUL_Q20(sin, 0x19A);
|
||||
this->mUnk_70.z += MUL_Q20(cos, 0x19A);
|
||||
}
|
||||
@@ -605,7 +605,7 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
case 0x13:
|
||||
case 0x14:
|
||||
if (this->mUnk_30->mUnk_70 < 0x0A) {
|
||||
Vec3p_Add(this->mUnk_3C, &this->mUnk_9C, this->mUnk_3C);
|
||||
VecFx32_Add(this->mUnk_3C, &this->mUnk_9C, this->mUnk_3C);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -630,7 +630,7 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
break;
|
||||
case 0x3D: {
|
||||
func_01ff930c(this->mUnk_40, 0, 0xE39);
|
||||
Vec3p *temp_r2_8 = this->mUnk_34;
|
||||
VecFx32 *temp_r2_8 = this->mUnk_34;
|
||||
|
||||
this->mUnk_80.x = temp_r2_8->x;
|
||||
this->mUnk_80.y = temp_r2_8->y;
|
||||
@@ -676,7 +676,7 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
break;
|
||||
}
|
||||
|
||||
bool temp_r5_2 = this->func_ov000_020914b0(0x3F, (Vec3p *) &this->mUnk_70, this->mUnk_7C);
|
||||
bool temp_r5_2 = this->func_ov000_020914b0(0x3F, (VecFx32 *) &this->mUnk_70, this->mUnk_7C);
|
||||
|
||||
switch (this->mUnk_68) {
|
||||
case 0x0F:
|
||||
@@ -684,8 +684,8 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
case 0x13:
|
||||
case 0x24: {
|
||||
UnkStruct_027e0cd8_0c *temp_r0_13 = data_027e0cd8->mUnk_0C;
|
||||
q20 temp_r0_14 = temp_r0_13->vfunc_28(this->mUnk_34, 0, 0);
|
||||
Vec3p *temp_r2_9 = this->mUnk_34;
|
||||
fx32 temp_r0_14 = temp_r0_13->vfunc_28(this->mUnk_34, 0, 0);
|
||||
VecFx32 *temp_r2_9 = this->mUnk_34;
|
||||
|
||||
if (temp_r2_9->y < temp_r0_14) {
|
||||
temp_r2_9->y = temp_r0_14;
|
||||
@@ -706,8 +706,8 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
if (!this->func_ov000_02091e68(param2) && data_02049b18.mUnk_06.mTouchControl.mState.touch) {
|
||||
func_ov000_0205ca74(this->mUnk_98);
|
||||
this->mUnk_98 = -1;
|
||||
q4 sin = SIN2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
q4 cos = COS2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
fx16 sin = SIN2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
fx16 cos = COS2(data_0203feb0, this->mUnk_40->mUnk_00);
|
||||
this->mUnk_70.x += MUL_Q20(sin, FLOAT_TO_Q20(2.0f));
|
||||
this->mUnk_70.z += MUL_Q20(cos, FLOAT_TO_Q20(2.0f));
|
||||
this->mUnk_AD = true;
|
||||
@@ -724,14 +724,14 @@ ARM void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) {
|
||||
}
|
||||
}
|
||||
|
||||
ARM bool PlayerSceneChange::vfunc_1c(Vec3p *param1) {
|
||||
ARM bool PlayerSceneChange::vfunc_1c(VecFx32 *param1) {
|
||||
if (data_027e0cdc->func_ov000_02082a28(1) == 0) {
|
||||
switch (this->mUnk_30->mUnk_68) {
|
||||
case 0x3C:
|
||||
case 0x3D:
|
||||
case 0x3E:
|
||||
case 0x3F: {
|
||||
Vec3p unk_80;
|
||||
VecFx32 unk_80;
|
||||
|
||||
unk_80.x = this->mUnk_80.x;
|
||||
unk_80.y = this->mUnk_80.y;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
extern "C" void func_ov000_0208ba10(void *, void *, unk32);
|
||||
extern "C" void func_ov000_02087ee8();
|
||||
extern "C" void func_ov000_0205d65c(void *, Vec3p *, Vec3p *, u32);
|
||||
extern "C" void func_ov000_0208cac8(UnkStruct_ov000_0208f820_28 *, Vec3p *, unk32);
|
||||
extern "C" void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, u32);
|
||||
extern "C" void func_ov000_0208cac8(UnkStruct_ov000_0208f820_28 *, VecFx32 *, unk32);
|
||||
extern "C" unk32 func_ov000_0208dc98(unk32);
|
||||
extern "C" void func_ov000_020830a4(unk32, unk32, unk32, unk32, unk32, unk32);
|
||||
extern "C" unk32 func_ov000_02093718(UnkStruct_ov000_0208f820_30 *);
|
||||
@@ -22,10 +22,10 @@ ARM void PlayerSceneChange2::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param
|
||||
s16 auStack_18[12];
|
||||
s16 auStack_2c;
|
||||
|
||||
Vec3p *pVVar1 = this->mUnk_38;
|
||||
pVVar1->x = 0;
|
||||
pVVar1->y = 0;
|
||||
pVVar1->z = 0;
|
||||
VecFx32 *pVVar1 = this->mUnk_38;
|
||||
pVVar1->x = 0;
|
||||
pVVar1->y = 0;
|
||||
pVVar1->z = 0;
|
||||
|
||||
this->mUnk_2C->mUnk_58 = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ ARM void PlayerSceneChange2::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param
|
||||
this->mUnk_54.z = this->mUnk_34->z;
|
||||
this->mUnk_60 = param1->mUnk_10;
|
||||
|
||||
func_ov000_0205d65c(&auStack_2c, &this->mUnk_60, (Vec3p *) &this->mUnk_54, this->mUnk_40->mUnk_00);
|
||||
func_ov000_0205d65c(&auStack_2c, &this->mUnk_60, (VecFx32 *) &this->mUnk_54, this->mUnk_40->mUnk_00);
|
||||
this->mUnk_40->mUnk_00 = auStack_2c;
|
||||
|
||||
func_ov000_0208cac8(this->mUnk_28, &this->mUnk_60, 0);
|
||||
@@ -73,7 +73,7 @@ ARM void PlayerSceneChange2::vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param
|
||||
case 0x44:
|
||||
func_ov000_0208cac8(this->mUnk_28, &this->mUnk_60, 0);
|
||||
|
||||
func_ov000_0205d65c(&auStack_2c, this->mUnk_34, (Vec3p *) &this->mUnk_54, this->mUnk_40->mUnk_00);
|
||||
func_ov000_0205d65c(&auStack_2c, this->mUnk_34, (VecFx32 *) &this->mUnk_54, this->mUnk_40->mUnk_00);
|
||||
this->mUnk_40->mUnk_00 = auStack_2c;
|
||||
|
||||
this->mUnk_2C->mUnk_26 = 0;
|
||||
|
||||
@@ -7,19 +7,18 @@
|
||||
#include "Unknown/UnkStruct_0204e64c.hpp"
|
||||
#include "Unknown/UnkStruct_027e0208.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
|
||||
#include "regs.h"
|
||||
#include "versions.h"
|
||||
|
||||
#include <nitro/card.h>
|
||||
#include <nitro/os.h>
|
||||
#include <nitro/reg.h>
|
||||
|
||||
extern "C" void func_020196fc();
|
||||
extern "C" unk32 CARD_func_0033();
|
||||
extern "C" void CARD_func_0034();
|
||||
extern "C" void FlushGfxQueue();
|
||||
extern "C" void func_020132c8();
|
||||
extern "C" void func_020132dc();
|
||||
extern "C" void func_02013354();
|
||||
extern "C" void func_0201328c();
|
||||
extern "C" int OS_DisableInterrupts_Irq();
|
||||
extern "C" void OS_RestoreInterrupts(int enabled);
|
||||
extern Mat3p gGeomMatrix;
|
||||
|
||||
ARM void Game::func_02013370(unk32 param1) {
|
||||
@@ -63,7 +62,7 @@ ARM void Game::Run() {
|
||||
this->mUnk_08 = NULL;
|
||||
}
|
||||
|
||||
if (CARD_func_0033() != 0) {
|
||||
if (CARD_func_0033()) {
|
||||
CARD_func_0034();
|
||||
}
|
||||
|
||||
@@ -136,7 +135,7 @@ ARM void Game::Run() {
|
||||
{
|
||||
int enabled = OS_DisableInterrupts_Irq();
|
||||
this->mUnk_1C.func_02013e18(func_020132dc, 0);
|
||||
REG_SWAP_BUFFERS = 3;
|
||||
REG_GFX_FIFO_SWAP_BUFFERS = 3;
|
||||
OS_RestoreInterrupts(enabled);
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -1,8 +1,10 @@
|
||||
#include "Game/Game.hpp"
|
||||
#include "global.h"
|
||||
#include "regs.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/gx.h>
|
||||
#include <nitro/hw.h>
|
||||
|
||||
void func_0203b920(void);
|
||||
void func_02011da0(void);
|
||||
void CallStaticInitializers(void);
|
||||
@@ -15,8 +17,6 @@ void func_01ffbd70(void);
|
||||
|
||||
void main();
|
||||
|
||||
#define UNK_027FFF9C (*(u32 *) 0x027FFF9C)
|
||||
|
||||
typedef void (*UnkStruct_027e0000_Callback)(void);
|
||||
struct UnkStruct_027e0000 {
|
||||
unk8 mUnk_00[0x3FFC];
|
||||
@@ -54,12 +54,12 @@ extern "C" ARM void Entry(void) {
|
||||
REG_IME = 0x04000000;
|
||||
|
||||
do {
|
||||
} while (REG_VCOUNT != 0x0);
|
||||
} while (GX_GetVCount() != 0x0);
|
||||
|
||||
func_02000a78();
|
||||
func_0200093c(0, (u32 *) data_027e0000, 0x4000);
|
||||
func_0200093c(0, ®_PALETTE_A, 0x400);
|
||||
func_0200093c(0x200, ®_OAM_A, 0x400);
|
||||
func_0200093c(0, (u32 *) HW_PLTT, 0x400);
|
||||
func_0200093c(0x200, (u32 *) HW_OAM, 0x400);
|
||||
func_02000950(BuildInfo.mUnk_14);
|
||||
func_020009fc();
|
||||
puVar4 = BuildInfo.mUnk_10;
|
||||
@@ -79,7 +79,7 @@ extern "C" ARM void Entry(void) {
|
||||
uVar3 = uVar3 + 0x20;
|
||||
} while ((int) uVar3 < (int) puVar4);
|
||||
|
||||
UNK_027FFF9C = 0x0;
|
||||
REG_027FFF9C = 0x0;
|
||||
data_027e0000->mUnk_3FFC = func_01ffbd70;
|
||||
|
||||
func_0203b920();
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
#include "Player/TouchControl.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include <nitro/pad.h>
|
||||
|
||||
// non-matching
|
||||
ARM void TouchControl::UpdateState(TouchState *state, const TouchStateFlags *stateFlags) {
|
||||
if (stateFlags->touch == 1) {
|
||||
if (stateFlags->flags == 0) {
|
||||
ARM void TouchControl::UpdateState(TouchState *state, const TPData *data) {
|
||||
if (data->touch == 1) {
|
||||
if (data->validity == TP_VALIDITY_VALID) {
|
||||
state->touch = true;
|
||||
|
||||
u16 x = stateFlags->touchPos.x;
|
||||
u16 y = stateFlags->touchPos.y;
|
||||
u16 x = data->x;
|
||||
u16 y = data->y;
|
||||
state->touchPos.x = x;
|
||||
state->touchPos.y = y;
|
||||
} else {
|
||||
if ((stateFlags->flags & 1) == 0) {
|
||||
state->touchPos.x = stateFlags->touchPos.x;
|
||||
if ((data->validity & TP_VALIDITY_INVALID_X) == 0) {
|
||||
state->touchPos.x = data->x;
|
||||
}
|
||||
|
||||
if ((stateFlags->flags & 2) == 0) {
|
||||
state->touchPos.y = stateFlags->touchPos.y;
|
||||
if ((data->validity & TP_VALIDITY_INVALID_Y) == 0) {
|
||||
state->touchPos.y = data->y;
|
||||
}
|
||||
|
||||
if (state->touchPos.x >= 0 && state->touchPos.x < 0x100 && state->touchPos.y >= 0 && state->touchPos.y < 0xC0) {
|
||||
@@ -123,7 +125,7 @@ ARM void TouchControl::UpdateFlags(u16 speed) {
|
||||
}
|
||||
}
|
||||
|
||||
ARM void TouchControl::UpdateWithStateFlags(TouchStateFlags *state, u16 speed) {
|
||||
ARM void TouchControl::UpdateWithStateFlags(TPData *state, u16 speed) {
|
||||
this->mPrevState = this->mState;
|
||||
this->UpdateState(&this->mState, state);
|
||||
this->UpdateFlags(speed);
|
||||
@@ -136,11 +138,11 @@ ARM void TouchControl::Update(const TouchState *state, u16 speed) {
|
||||
}
|
||||
|
||||
ARM bool TouchControl::func_020143f0() {
|
||||
return ((*((u16 *) 0x027FFFA8) & 0x8000) >> 15) == 1;
|
||||
return PAD_DetectFold() == 1;
|
||||
}
|
||||
|
||||
ARM void TouchControl::func_02014414(u16 speedIncrease, bool shouldIncrease) {
|
||||
TouchStateFlags touchState;
|
||||
TPData data;
|
||||
|
||||
if (shouldIncrease) {
|
||||
this->IncreaseSpeed(speedIncrease);
|
||||
@@ -148,12 +150,12 @@ ARM void TouchControl::func_02014414(u16 speedIncrease, bool shouldIncrease) {
|
||||
}
|
||||
|
||||
if (TouchControl::func_020143f0()) {
|
||||
MI_CpuFill16(0, (u16 *) &touchState, sizeof(TouchStateFlags));
|
||||
MI_CpuFill16(0, (u16 *) &data, sizeof(TPData));
|
||||
} else {
|
||||
TP_GetTouchStateFlags(&touchState);
|
||||
TP_GetData(&data);
|
||||
}
|
||||
|
||||
this->UpdateWithStateFlags(&touchState, speedIncrease);
|
||||
this->UpdateWithStateFlags(&data, speedIncrease);
|
||||
}
|
||||
|
||||
ARM void TouchControl::func_02014478(TouchState *state, u16 speed) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "System/OverlayManager.hpp"
|
||||
#include "global.h"
|
||||
#include <nitro/Overlay.h>
|
||||
|
||||
#include <nitro/fs.h>
|
||||
|
||||
struct UnkStruct_020ee698 {
|
||||
/* 00 */ unk8 mUnk_00[0x2C];
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
#include "System/SysFault.hpp"
|
||||
#include "System/OverlayManager.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_02049b18.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b4f84.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_020b50c0.hpp"
|
||||
#include "global.h"
|
||||
#include "regs.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include <nitro/g2.h>
|
||||
#include <nitro/os.h>
|
||||
#include <nitro/reg.h>
|
||||
|
||||
extern "C" void _OS_Panic();
|
||||
extern "C" void func_020131ec();
|
||||
extern "C" void func_02013214();
|
||||
extern "C" void func_ov020_020c86d8(void *);
|
||||
extern "C" void func_02014d38(void *, int);
|
||||
extern "C" void func_020196fc();
|
||||
extern "C" void GX_SetBankForBG(int);
|
||||
extern "C" void GX_SetBankForSubBG(int);
|
||||
extern "C" void GX_SetBankForLCDC(int);
|
||||
extern "C" void GX_SetGraphicsMode(int, int, int);
|
||||
extern "C" void GXS_SetGraphicsMode(int);
|
||||
extern "C" unk32 func_ov000_02068504(int);
|
||||
extern "C" unk32 func_020147a8();
|
||||
extern "C" void *G2S_func_0001();
|
||||
extern "C" void func_0201b278(bool, bool);
|
||||
extern "C" void func_0201b180(bool, bool);
|
||||
extern "C" void GXS_LoadBGPltt(void *, int, int);
|
||||
extern "C" void SetBrightColor(void *, int);
|
||||
extern int data_02049bd4;
|
||||
|
||||
@@ -59,12 +54,10 @@ THUMB void SysFault::func_020127f0(unk32 param1) {
|
||||
GX_SetBankForLCDC(0x100);
|
||||
GX_SetGraphicsMode(1, 0, 0);
|
||||
GXS_SetGraphicsMode(0);
|
||||
|
||||
REG_DISPCNT = ((REG_DISPCNT & ~0x1F00) | 0x100);
|
||||
REG_DISPCNT_SUB = (REG_DISPCNT_SUB & ~0x1F00) | 0x100;
|
||||
|
||||
REG_BG0CNT = (REG_BG0CNT & 0x43) | 4;
|
||||
REG_BG0CNT_SUB = (REG_BG0CNT_SUB & 0x43) | 4;
|
||||
GX_SetVisiblePlane(1);
|
||||
GXS_SetVisiblePlane(1);
|
||||
G2_SetBG0Control(0, 0, 0, 1, 0);
|
||||
G2S_SetBG0Control(0, 0, 0, 1, 0);
|
||||
|
||||
if (this->mUnk_05 < 0xFF) {
|
||||
this->mUnk_05 = 0xFF;
|
||||
@@ -199,6 +192,6 @@ THUMB void SysFault::func_020127f0(unk32 param1) {
|
||||
}
|
||||
|
||||
this->mUnk_05 = 0;
|
||||
_OS_Panic();
|
||||
OS_Panic();
|
||||
}
|
||||
}
|
||||
|
||||
+39
-45
@@ -1,57 +1,51 @@
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "regs.h"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "types.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include <nitro/g2.h>
|
||||
#include <nitro/hw.h>
|
||||
#include <nitro/reg.h>
|
||||
|
||||
extern "C" void GX_SetGraphicsMode(int, int, int);
|
||||
extern "C" void GXS_SetGraphicsMode(int);
|
||||
extern "C" void G2_SetBGAffine(void *, void *, int, int, int, int);
|
||||
extern "C" void func_020242a0();
|
||||
extern "C" void func_020241f4();
|
||||
extern "C" void GX_ResetBankForBGExtPltt();
|
||||
extern "C" void func_0202428c();
|
||||
extern "C" void func_02024208();
|
||||
extern "C" void GX_ResetBankForOBJExtPltt();
|
||||
extern "C" void func_020242b4();
|
||||
extern "C" void GX_ResetBankForSubBGExtPltt();
|
||||
extern "C" void func_020242c8();
|
||||
extern "C" void GX_ResetBankForSubOBJExtPltt();
|
||||
extern "C" void func_02024264();
|
||||
extern "C" void func_02024278();
|
||||
extern "C" void GX_SetBankForLCDC(int);
|
||||
extern "C" void GX_DisableBankForLCDC();
|
||||
extern int data_027e0120;
|
||||
|
||||
extern "C" void func_020196fc() {
|
||||
GX_SetGraphicsMode(1, 0, 0);
|
||||
GXS_SetGraphicsMode(0);
|
||||
REG_BG0OFS = 0;
|
||||
REG_BG1OFS = 0;
|
||||
REG_BG2OFS = 0;
|
||||
REG_BG3OFS = 0;
|
||||
REG_BG0OFS_SUB = 0;
|
||||
REG_BG1OFS_SUB = 0;
|
||||
REG_BG2OFS_SUB = 0;
|
||||
REG_BG3OFS_SUB = 0;
|
||||
G2_SetBGAffine(®_BG2PA, &data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2_SetBGAffine(®_BG3PA, &data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2_SetBGAffine(®_BG2PA_SUB, &data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2_SetBGAffine(®_BG3PA_SUB, &data_027e0120, 0x80, 0x60, 0, 0);
|
||||
REG_BG0CNT = REG_BG0CNT & 0xffbf;
|
||||
REG_BG1CNT = REG_BG1CNT & 0xffbf;
|
||||
REG_BG2CNT = REG_BG2CNT & 0xffbf;
|
||||
REG_BG3CNT = REG_BG3CNT & 0xffbf;
|
||||
REG_BG0CNT_SUB = REG_BG0CNT_SUB & 0xffbf;
|
||||
REG_BG1CNT_SUB = REG_BG1CNT_SUB & 0xffbf;
|
||||
REG_BG2CNT_SUB = REG_BG2CNT_SUB & 0xffbf;
|
||||
REG_BG3CNT_SUB = REG_BG3CNT_SUB & 0xffbf;
|
||||
REG_MOSAIC = 0;
|
||||
REG_MOSAIC_SUB = 0;
|
||||
REG_OBJMOSAIC = 0;
|
||||
REG_OBJMOSAIC_SUB = 0;
|
||||
REG_BLDCNT = 0;
|
||||
REG_BLDCNT_SUB = 0;
|
||||
REG_DISPCNT &= 0xffff1fff;
|
||||
REG_DISPCNT_SUB &= 0xffff1fff;
|
||||
G2_SetBG0Offset(0, 0);
|
||||
G2_SetBG1Offset(0, 0);
|
||||
G2_SetBG2Offset(0, 0);
|
||||
G2_SetBG3Offset(0, 0);
|
||||
G2S_SetBG0Offset(0, 0);
|
||||
G2S_SetBG1Offset(0, 0);
|
||||
G2S_SetBG2Offset(0, 0);
|
||||
G2S_SetBG3Offset(0, 0);
|
||||
G2_SetBG2Affine(&data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2_SetBG3Affine(&data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2S_SetBG2Affine(&data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2S_SetBG3Affine(&data_027e0120, 0x80, 0x60, 0, 0);
|
||||
G2_BG0Mosaic(false);
|
||||
G2_BG1Mosaic(false);
|
||||
G2_BG2Mosaic(false);
|
||||
G2_BG3Mosaic(false);
|
||||
G2S_BG0Mosaic(false);
|
||||
G2S_BG1Mosaic(false);
|
||||
G2S_BG2Mosaic(false);
|
||||
G2S_BG3Mosaic(false);
|
||||
G2_SetBGMosaicSize(0, 0);
|
||||
G2S_SetBGMosaicSize(0, 0);
|
||||
G2_SetOBJMosaicSize(0, 0);
|
||||
G2S_SetOBJMosaicSize(0, 0);
|
||||
G2_BlendNone();
|
||||
G2S_BlendNone();
|
||||
GX_SetVisibleWindows(0);
|
||||
GXS_SetVisibleWindows(0);
|
||||
func_020242a0();
|
||||
func_020241f4();
|
||||
GX_ResetBankForBGExtPltt();
|
||||
@@ -66,12 +60,12 @@ extern "C" void func_020196fc() {
|
||||
func_02024278();
|
||||
GX_SetBankForLCDC(0x1ff);
|
||||
|
||||
_MI_CpuFill(0, ®_VRAM, 0xa4000);
|
||||
MI_CpuClearFast(HW_LCDC_VRAM, HW_LCDC_VRAM_SIZE);
|
||||
GX_DisableBankForLCDC();
|
||||
|
||||
_MI_CpuFill(0xc0, ®_OAM_A, 0x400);
|
||||
_MI_CpuFill(0, ®_PALETTE_A, 0x400);
|
||||
MI_CpuFillFast(HW_OAM, 0xC0, HW_OAM_SIZE);
|
||||
MI_CpuClearFast(HW_PLTT, HW_PLTT_SIZE);
|
||||
|
||||
_MI_CpuFill(0xc0, ®_OAM_B, 0x400);
|
||||
_MI_CpuFill(0, ®_PALETTE_B, 0x400);
|
||||
MI_CpuFillFast(HW_DB_OAM, 0xC0, HW_DB_OAM_SIZE);
|
||||
MI_CpuClearFast(HW_DB_PLTT, HW_DB_PLTT_SIZE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user