mirror of
https://github.com/zeldaret/st
synced 2026-08-15 20:59:59 -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:
@@ -20,7 +20,7 @@
|
||||
|
||||
class ActorParams {
|
||||
public:
|
||||
/* 00 */ Vec3p mInitialPos;
|
||||
/* 00 */ VecFx32 mInitialPos;
|
||||
/* 0C */ s16 mInitialAngle;
|
||||
/* 0E */ s8 mUnk_0E;
|
||||
/* 0F */ bool mUnk_0F;
|
||||
@@ -102,9 +102,9 @@ class Actor_c4;
|
||||
class Actor : public SysObject {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 04 */ Vec3p mPos;
|
||||
/* 10 */ Vec3p mPrevPos;
|
||||
/* 1C */ Vec3p mVel;
|
||||
/* 04 */ VecFx32 mPos;
|
||||
/* 10 */ VecFx32 mPrevPos;
|
||||
/* 1C */ VecFx32 mVel;
|
||||
/* 28 */ s16 mAngle;
|
||||
/* 2A */ unk16 mUnk_2A;
|
||||
/* 2C */ unk32 mUnk_2C; // gravity?
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
/* 90 */ ActorProfile *mpProfile;
|
||||
/* 94 */
|
||||
|
||||
/* 00 */ virtual void vfunc_00(Vec3p *param1);
|
||||
/* 00 */ virtual void vfunc_00(VecFx32 *param1);
|
||||
/* 04 */ virtual bool vfunc_04();
|
||||
/* 08 */ virtual unk16 vfunc_08();
|
||||
/* 0C */ virtual unk8 vfunc_0c();
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
/* 30 */ virtual void vfunc_30();
|
||||
/* 34 */ virtual unk32 vfunc_34();
|
||||
/* 38 */ virtual unk32 vfunc_38(unk32 param1);
|
||||
/* 3C */ virtual bool vfunc_3c(unk32 param2, Vec3p *param3);
|
||||
/* 3C */ virtual bool vfunc_3c(unk32 param2, VecFx32 *param3);
|
||||
/* 40 */ virtual void vfunc_40();
|
||||
/* 44 */ virtual void vfunc_44();
|
||||
/* 48 */ virtual void vfunc_48();
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
unk32 func_ov000_02098910(unk32 param1, unk32 param2);
|
||||
|
||||
s32 func_ov000_02098518(unk32 *param1);
|
||||
Vec3p *func_ov000_0209853c(unk32 param1);
|
||||
VecFx32 *func_ov000_0209853c(unk32 param1);
|
||||
s32 func_ov000_02098554();
|
||||
s16 func_ov000_0209856c();
|
||||
s8 func_ov000_02098578();
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
bool func_ov000_02098a60(unk32 param1);
|
||||
void func_ov000_02098a88(unk32 param1, unk32 param2);
|
||||
|
||||
void func_ov017_020bf5c4(Vec3p *param1, unk32 param2, unk32 param3, unk32 param4, unk32 param5);
|
||||
void func_ov017_020bf5c4(VecFx32 *param1, unk32 param2, unk32 param3, unk32 param4, unk32 param5);
|
||||
};
|
||||
|
||||
struct Actor_c4_stack {
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
void func_ov017_020bf9c8(Actor *param1);
|
||||
|
||||
void func_ov031_020e8d2c(Vec3p *param1, u8 param2, unk32 param3, unk32 param4);
|
||||
void func_ov031_020e8d2c(VecFx32 *param1, u8 param2, unk32 param3, unk32 param4);
|
||||
void func_ov031_020e8fec();
|
||||
void func_ov031_020e9068();
|
||||
void func_ov031_020e9108();
|
||||
|
||||
@@ -24,8 +24,8 @@ public:
|
||||
/* 2C */ unk32 mUnk_2C;
|
||||
/* 30 */ unk16 mUnk_30;
|
||||
/* 32 */ unk16 mUnk_32;
|
||||
/* 34 */ Vec3p mUnk_34;
|
||||
/* 40 */ Vec3p mUnk_40;
|
||||
/* 34 */ VecFx32 mUnk_34;
|
||||
/* 40 */ VecFx32 mUnk_40;
|
||||
/* 4C */
|
||||
|
||||
ActorUnk_vfunc_b0();
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
/* 0A */ unk32 mUnk_08;
|
||||
/* 0C */
|
||||
|
||||
void func_01ffc6d4(u16 param1, Vec3p *pos);
|
||||
void func_01ffc6d4(u16 param1, VecFx32 *pos);
|
||||
|
||||
ActorUnk_ov000_020a8bb0_a4() {}
|
||||
~ActorUnk_ov000_020a8bb0_a4() {}
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
/* 0B4 */ unk32 mUnk_0B4;
|
||||
/* 0B8 */ unk32 mUnk_0B8;
|
||||
/* 0BC */ ActorRef mUnk_0BC;
|
||||
/* 0C0 */ Vec3p mUnk_0C0;
|
||||
/* 0C0 */ VecFx32 mUnk_0C0;
|
||||
/* 0CC */ unk16 mUnk_0CC;
|
||||
/* 0CC */ unk16 mUnk_0CE;
|
||||
/* 0D0 */ unk32 mUnk_0D0;
|
||||
@@ -134,14 +134,14 @@ public:
|
||||
/* B8 */ virtual void vfunc_b8();
|
||||
/* BC */
|
||||
|
||||
void func_ov000_020a8ae0(q20 param1);
|
||||
void func_ov000_020a8ae0(fx32 param1);
|
||||
ActorUnk_ov000_020a8bb0(UnkSystem4 *param1, unk32 param2);
|
||||
bool func_ov000_020a8db0();
|
||||
bool func_ov000_020a8dd0();
|
||||
void func_ov000_020a8df0(ActorRef param1, unk32 param2);
|
||||
void func_ov000_020a8e9c(Vec3p *param1);
|
||||
void func_ov000_020a8e9c(VecFx32 *param1);
|
||||
void func_ov000_020a8ff4();
|
||||
void func_ov000_020a91b8(Vec3p *param1, unk32 param2);
|
||||
void func_ov000_020a91b8(VecFx32 *param1, unk32 param2);
|
||||
void func_ov000_020a9200();
|
||||
void func_ov000_020a9248();
|
||||
void func_ov000_020a94b0();
|
||||
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
/* 9A */ unk8 mUnk_9A;
|
||||
/* 9B */ SCCNType mUnk_9B : 8;
|
||||
/* 9C */ unk32 mUnk_9C;
|
||||
/* A0 */ q20 mUnk_A0;
|
||||
/* A4 */ q20 mUnk_A4;
|
||||
/* A8 */ q20 mUnk_A8;
|
||||
/* AC */ q20 mUnk_AC;
|
||||
/* B0 */ q20 mUnk_B0;
|
||||
/* B4 */ q20 mUnk_B4;
|
||||
/* A0 */ fx32 mUnk_A0;
|
||||
/* A4 */ fx32 mUnk_A4;
|
||||
/* A8 */ fx32 mUnk_A8;
|
||||
/* AC */ fx32 mUnk_AC;
|
||||
/* B0 */ fx32 mUnk_B0;
|
||||
/* B4 */ fx32 mUnk_B4;
|
||||
/* B8 */ unk32 mUnk_B8;
|
||||
/* BC */ unk32 mUnk_BC;
|
||||
/* C0 */ unk32 mUnk_C0;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "global.h"
|
||||
#include "iterator.hpp"
|
||||
#include "math.hpp"
|
||||
#include "regs.h"
|
||||
#include "types.h"
|
||||
#include <nitro/reg.h>
|
||||
|
||||
extern const unk16 data_ov019_020d1bb0[];
|
||||
extern "C" void func_ov001_020bd6a8();
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include "Player/TouchControl.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_02049b18.hpp"
|
||||
#include "input.hpp"
|
||||
#include "math.hpp"
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/button.h>
|
||||
#include <nitro/touch.h>
|
||||
#include <nitro/tp.h>
|
||||
|
||||
class GameModeManagerBase;
|
||||
class GameModeManagerBase_104;
|
||||
|
||||
@@ -67,16 +67,16 @@ public:
|
||||
/* 0C */ virtual void vfunc_0C() = 0;
|
||||
/* 10 */ virtual void vfunc_10(Cylinder *param1) = 0;
|
||||
/* 14 */ virtual void vfunc_14() = 0;
|
||||
/* 18 */ virtual void vfunc_18(Vec3p *param1) = 0;
|
||||
/* 1C */ virtual void vfunc_1C(Vec3p *param1) = 0;
|
||||
/* 18 */ virtual void vfunc_18(VecFx32 *param1) = 0;
|
||||
/* 1C */ virtual void vfunc_1C(VecFx32 *param1) = 0;
|
||||
/* 20 */
|
||||
};
|
||||
|
||||
class MapObject_10 : public MapObject_10_Base {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 0C */ Vec3p mUnk_0C;
|
||||
/* 18 */ Vec3p mUnk_18;
|
||||
/* 0C */ VecFx32 mUnk_0C;
|
||||
/* 18 */ VecFx32 mUnk_18;
|
||||
/* 24 */
|
||||
|
||||
MapObject_10() {}
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
/* 0C */ virtual void vfunc_0C();
|
||||
/* 10 */ virtual void vfunc_10(Cylinder *param1);
|
||||
/* 14 */ virtual void vfunc_14();
|
||||
/* 18 */ virtual void vfunc_18(Vec3p *param1);
|
||||
/* 1C */ virtual void vfunc_1C(Vec3p *param1);
|
||||
/* 18 */ virtual void vfunc_18(VecFx32 *param1);
|
||||
/* 1C */ virtual void vfunc_1C(VecFx32 *param1);
|
||||
/* 20 */
|
||||
};
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
class MapObject : public SysObject {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 04 */ Vec3p mPos;
|
||||
/* 04 */ VecFx32 mPos;
|
||||
/* 10 */ MapObject_10 *mUnk_10;
|
||||
/* 14 */ s16 mUnk_14;
|
||||
/* 16 */ s16 mUnk_16;
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
/* 20 */ virtual void vfunc_20();
|
||||
/* 24 */ virtual void vfunc_24();
|
||||
/* 28 */ virtual unk32 vfunc_28();
|
||||
/* 2C */ virtual bool vfunc_2C(Vec3p *param1);
|
||||
/* 2C */ virtual bool vfunc_2C(VecFx32 *param1);
|
||||
/* 30 */ virtual ~MapObject();
|
||||
/* 38 */
|
||||
|
||||
@@ -175,15 +175,15 @@ public:
|
||||
bool func_ov000_0209d29c(unk32 param1);
|
||||
void func_ov000_0209d2c4(unk32 param1, unk32 param2);
|
||||
void func_ov000_0209d2f0(unk32 param1, unk32 param2, Vec2b *param3);
|
||||
void func_ov000_0209d3b4(unk32 param1, q20 size);
|
||||
void func_ov000_0209d3b4(unk32 param1, fx32 size);
|
||||
void func_ov000_0209d434(s8 *param1, UnkStruct_ov019_020d24c8_28_258_00 *param2, unk32 param3);
|
||||
void func_ov000_0209d518(unk32 param1, unk32 param2, unk32 param3, u8 param4);
|
||||
void func_ov000_0209d5c8(ActorRef ref);
|
||||
void func_ov000_0209d614(unk32 param1);
|
||||
bool func_ov000_0209d668();
|
||||
void func_ov000_0209d6ac(Vec3p *param1);
|
||||
void func_ov000_0209d6ac(VecFx32 *param1);
|
||||
|
||||
static void func_ov000_0209d0bc(Vec2b *param1, MapObject *thisx);
|
||||
static void func_ov000_0209d22c(unk16 *param1, MapObject *thisx, unk32 param2);
|
||||
static void func_ov000_0209d54c(void *param1, MapObject *thisx, unk32 param2, Vec3p *param3, unk32 param4, unk32 param5);
|
||||
static void func_ov000_0209d54c(void *param1, MapObject *thisx, unk32 param2, VecFx32 *param3, unk32 param4, unk32 param5);
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
/* 04 */ unk32 mUnk_44;
|
||||
/* 08 */ unk16 mUnk_48;
|
||||
/* 0A */ s16 mUnk_4A;
|
||||
/* 0C */ Vec3p mUnk_4C;
|
||||
/* 0C */ VecFx32 mUnk_4C;
|
||||
/* 18 */
|
||||
|
||||
MapObject_UnkStruct1(); // func_ov000_02073194 & func_ov000_020731c4
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
/* 18 */ bool mUnk_58;
|
||||
/* 19 */ unk8 mUnk_59;
|
||||
/* 1A */ s16 mUnk_5A;
|
||||
/* 1C */ Vec3p mUnk_5C;
|
||||
/* 1C */ VecFx32 mUnk_5C;
|
||||
/* 28 */
|
||||
|
||||
MapObject_UnkStruct1_Derived1(); // func_ov000_02073234
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
/* 78 */ virtual void vfunc_78();
|
||||
/* 7C */ virtual void vfunc_7C();
|
||||
/* 80 */ virtual void vfunc_80();
|
||||
/* 84 */ virtual void vfunc_84(unk32 param1, Vec3p *param2, unk16 *param3);
|
||||
/* 84 */ virtual void vfunc_84(unk32 param1, VecFx32 *param2, unk16 *param3);
|
||||
/* 88 */ virtual bool vfunc_88();
|
||||
/* 8C */ virtual unk32 vfunc_8C();
|
||||
/* 90 */
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
/* 6C */ virtual bool vfunc_6C() override;
|
||||
/* 74 */ virtual void vfunc_74() override;
|
||||
/* 7C */ virtual void vfunc_7C() override;
|
||||
/* 84 */ virtual void vfunc_84(unk32 param1, Vec3p *param2, unk16 *param3) override;
|
||||
/* 84 */ virtual void vfunc_84(unk32 param1, VecFx32 *param2, unk16 *param3) override;
|
||||
/* 88 */ virtual bool vfunc_88() override;
|
||||
/* 8C */ virtual unk32 vfunc_8C() override;
|
||||
|
||||
@@ -72,5 +72,5 @@ public:
|
||||
|
||||
bool func_ov031_020fdec8(void);
|
||||
|
||||
static void func_ov031_020fe5fc(Vec3p *param1, MapObjectDoorDangerSpawn *thisx);
|
||||
static void func_ov031_020fe5fc(VecFx32 *param1, MapObjectDoorDangerSpawn *thisx);
|
||||
};
|
||||
|
||||
@@ -14,14 +14,14 @@ public:
|
||||
/* 0F4 */ MapObject_10 mUnk_0F4;
|
||||
#if IS_JP
|
||||
/* 118 */ MapObject_10 mUnk_118;
|
||||
/* 13C */ q20 mUnkPos;
|
||||
/* 13C */ fx32 mUnkPos;
|
||||
/* 140 */ bool mUnk_140;
|
||||
/* 141 */ bool mUnk_141;
|
||||
/* 142 */ unk8 mUnk_142; // pad
|
||||
/* 143 */ unk8 mUnk_143; // pad
|
||||
/* 144 */
|
||||
#else
|
||||
/* 118 */ q20 mUnkPos;
|
||||
/* 118 */ fx32 mUnkPos;
|
||||
/* 11C */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
MapObject *func_01fff498(Vec2b param1);
|
||||
void func_01fff4cc(UnkCallback_func_01fff4cc param1, void *param2);
|
||||
MapObject **func_01fff520(UnkStruct_ov000_020b34c4 *param1, MapObject **param2);
|
||||
void func_01fff6d0(Vec3p *param1, s32 *param2, s32 *param3);
|
||||
void func_01fff6d0(VecFx32 *param1, s32 *param2, s32 *param3);
|
||||
|
||||
MapObjectId func_ov000_0209c3a8(Vec2b *param1);
|
||||
void func_ov000_0209c3e8();
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
#include "math.hpp"
|
||||
|
||||
struct Cylinder {
|
||||
Vec3p pos;
|
||||
q20 size; // height and radius
|
||||
VecFx32 pos;
|
||||
fx32 size; // height and radius
|
||||
|
||||
Cylinder() {}
|
||||
Cylinder(q20 size) {
|
||||
Cylinder(fx32 size) {
|
||||
this->Init(size);
|
||||
}
|
||||
|
||||
void Init(q20 size) {
|
||||
void Init(fx32 size) {
|
||||
pos.x = 0;
|
||||
pos.y = size;
|
||||
pos.z = 0;
|
||||
@@ -22,7 +22,7 @@ struct Cylinder {
|
||||
}
|
||||
|
||||
void MakeEmpty() {
|
||||
pos = gVec3p_ZERO;
|
||||
pos = gVecFx32_ZERO;
|
||||
size = -1;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// incomplete
|
||||
class PlayerActor {
|
||||
public:
|
||||
/* 00 */ Vec3p mPos;
|
||||
/* 0C */ Vec3p mPrevPos;
|
||||
/* 18 */ Vec3p mVel;
|
||||
/* 24 */ Vec3p mAccel;
|
||||
/* 00 */ VecFx32 mPos;
|
||||
/* 0C */ VecFx32 mPrevPos;
|
||||
/* 18 */ VecFx32 mVel;
|
||||
/* 24 */ VecFx32 mAccel;
|
||||
/* 30 */ u16 mAngle;
|
||||
/* 32 */ u8 mInvincibilityTimer;
|
||||
/* 33 */ u8 mInvincibilityIconTimer; // the blinking icon on top-screen
|
||||
|
||||
@@ -90,10 +90,10 @@ struct UnkStruct_ov110_02185dc8 {
|
||||
|
||||
class UnkStruct_ov110_021861ec {
|
||||
public:
|
||||
/* 00 */ Vec3p mUnk_00;
|
||||
/* 00 */ VecFx32 mUnk_00;
|
||||
/* 0C */
|
||||
|
||||
ARM UnkStruct_ov110_021861ec(q20 x, q20 y, q20 z) {
|
||||
ARM UnkStruct_ov110_021861ec(fx32 x, fx32 y, fx32 z) {
|
||||
this->mUnk_00.x = x;
|
||||
this->mUnk_00.y = y;
|
||||
this->mUnk_00.z = z;
|
||||
|
||||
@@ -17,14 +17,14 @@ public:
|
||||
/* 54 */ UnkStruct_SceneChange1 mUnk_54;
|
||||
/* 68 */ unk32 mUnk_68;
|
||||
/* 6C */ s32 mUnk_6C;
|
||||
/* 70 */ volatile Vec3p mUnk_70;
|
||||
/* 70 */ volatile VecFx32 mUnk_70;
|
||||
/* 7C */ unk32 mUnk_7C;
|
||||
/* 80 */ volatile Vec3p mUnk_80;
|
||||
/* 80 */ volatile VecFx32 mUnk_80;
|
||||
/* 8C */ unk32 mUnk_8C;
|
||||
/* 90 */ volatile u32 mUnk_90;
|
||||
/* 94 */ u16 mUnk_94[2];
|
||||
/* 98 */ unk32 mUnk_98;
|
||||
/* 9C */ Vec3p mUnk_9C;
|
||||
/* 9C */ VecFx32 mUnk_9C;
|
||||
/* A8 */ unk16 mUnk_A8;
|
||||
/* AA */ unk16 mUnk_AA;
|
||||
/* AC */ bool mUnk_AC;
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
/* 04 */ virtual ~PlayerSceneChange() override;
|
||||
/* 0C */ virtual void vfunc_0c(UnkStruct_PlayerGet_vfunc_0c_param1 *param1) override;
|
||||
/* 10 */ virtual void vfunc_10(unk32 param1, unk32 param2) override;
|
||||
/* 1C */ virtual bool vfunc_1c(Vec3p *param1) override;
|
||||
/* 1C */ virtual bool vfunc_1c(VecFx32 *param1) override;
|
||||
};
|
||||
|
||||
class PlayerSceneChange2 : public UnkStruct_ov000_0208f820 {
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
/* 48 */ unk32 mUnk_48;
|
||||
/* 4C */ unk32 mUnk_4C;
|
||||
/* 50 */ unk32 mUnk_50;
|
||||
/* 54 */ Vec3p mUnk_54;
|
||||
/* 54 */ Vec3p mUnk_60;
|
||||
/* 54 */ VecFx32 mUnk_54;
|
||||
/* 54 */ VecFx32 mUnk_60;
|
||||
|
||||
PlayerSceneChange2();
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
#include "math.hpp"
|
||||
#include "types.h"
|
||||
#include <nitro/touch.h>
|
||||
|
||||
#include <nitro/tp.h>
|
||||
|
||||
typedef u16 TouchFlags;
|
||||
enum TouchFlag_ {
|
||||
@@ -14,6 +15,14 @@ enum TouchFlag_ {
|
||||
|
||||
#define CHECK_TOUCH_FLAGS(pTC, flags) ((pTC)->mFlags & (flags))
|
||||
|
||||
struct TouchState {
|
||||
/* 00 */ bool touch;
|
||||
/* 01 */ bool unk_01;
|
||||
/* 02 */ struct {
|
||||
s16 x, y;
|
||||
} touchPos;
|
||||
}; // size = 0x06
|
||||
|
||||
class TouchControl {
|
||||
public:
|
||||
/* 00 */ u16 mSpeed;
|
||||
@@ -34,11 +43,13 @@ public:
|
||||
TouchControl();
|
||||
void IncreaseSpeed(u16 increase);
|
||||
void UpdateFlags(u16 speed);
|
||||
void UpdateWithStateFlags(TouchStateFlags *state, u16 speed);
|
||||
void UpdateWithStateFlags(TPData *state, u16 speed);
|
||||
void Update(const TouchState *state, u16 speed);
|
||||
void func_02014414(u16 speedIncrease, bool shouldIncrease);
|
||||
void func_02014478(TouchState *state, u16 speed);
|
||||
|
||||
static bool func_020143f0();
|
||||
static void UpdateState(TouchState *state, const TouchStateFlags *stateFlags);
|
||||
static void UpdateState(TouchState *state, const TPData *stateFlags);
|
||||
};
|
||||
|
||||
extern TouchState data_02049b4c;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include "MainGame/MiscAdvManager.hpp"
|
||||
#include "Save/AdventureFlags.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
//! TODO: kinda draft state for now
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "System/SysFault.hpp"
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/Overlay.h>
|
||||
#include <nitro/fs.h>
|
||||
|
||||
typedef u32 ItemFlag;
|
||||
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
#include "Game/GameModeManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "regs.h"
|
||||
#include "types.h"
|
||||
|
||||
extern "C" {
|
||||
void GX_SetGraphicsMode(unk32 param1, unk32 param2, unk32 param3);
|
||||
void GXS_SetGraphicsMode(unk32 param1);
|
||||
}
|
||||
#include <nitro/g2.h>
|
||||
#include <nitro/reg.h>
|
||||
|
||||
DECL_PTMF(TitleScreenPTMF, Input *pButtons, TouchControl *pTouchControl);
|
||||
|
||||
@@ -124,7 +121,7 @@ public:
|
||||
this->mpGameMode = NULL;
|
||||
GX_SetGraphicsMode(1, 0, 1);
|
||||
GXS_SetGraphicsMode(5);
|
||||
REG_BG3CNT_SUB = (REG_BG3CNT_SUB & 0x0043) | 0x4E14;
|
||||
G2S_SetBG3Control(1, 0, 14, 5, 0);
|
||||
}
|
||||
|
||||
void func_ov025_020c4c20();
|
||||
|
||||
+10
-10
@@ -3,11 +3,11 @@
|
||||
#include "Game/GameModeManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkFileSystem.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "global.h"
|
||||
#include "math.hpp"
|
||||
#include "profile.hpp"
|
||||
#include "types.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include <nns/text.h>
|
||||
|
||||
@@ -1006,7 +1006,7 @@ public:
|
||||
/* 08 */ virtual void vfunc_08(void *param1); // resource thing? (GetUnkPointer1_Impl as param1)
|
||||
/* 0C */ virtual void vfunc_0C();
|
||||
/* 10 */ virtual void vfunc_10();
|
||||
/* 14 */ virtual void vfunc_14(Mat3p *param1, Vec3p *param2);
|
||||
/* 14 */ virtual void vfunc_14(Mat3p *param1, VecFx32 *param2);
|
||||
/* 18 */ virtual void vfunc_18();
|
||||
/* 1C */ virtual void vfunc_1C(UnkSystem4_vfunc_1C *param1);
|
||||
/* 20 */ virtual void vfunc_20();
|
||||
@@ -1093,10 +1093,10 @@ public:
|
||||
// data_ov000_020b1a98
|
||||
/* 00 */ virtual ~UnkSystem6();
|
||||
/* 08 */ virtual void vfunc_08(void *param1); // resource thing like UnkSystem4?
|
||||
/* 0C */ virtual void vfunc_0C() = 0;
|
||||
/* 10 */ virtual void vfunc_10() = 0;
|
||||
/* 14 */ virtual void vfunc_14(Mat3p *param1, Vec3p *param2) = 0;
|
||||
/* 18 */ virtual void vfunc_18() = 0;
|
||||
/* 0C */ virtual void vfunc_0C() = 0;
|
||||
/* 10 */ virtual void vfunc_10() = 0;
|
||||
/* 14 */ virtual void vfunc_14(Mat3p *param1, VecFx32 *param2) = 0;
|
||||
/* 18 */ virtual void vfunc_18() = 0;
|
||||
/* 1C */
|
||||
};
|
||||
|
||||
@@ -1111,7 +1111,7 @@ public:
|
||||
// data_ov000_020b1a48
|
||||
/* 00 */ virtual ~UnkSystem6_Derived1() override {}
|
||||
/* 10 */ virtual void vfunc_10() override;
|
||||
/* 14 */ virtual void vfunc_14(Mat3p *param1, Vec3p *param2) override;
|
||||
/* 14 */ virtual void vfunc_14(Mat3p *param1, VecFx32 *param2) override;
|
||||
/* 18 */ virtual void vfunc_18() override;
|
||||
};
|
||||
|
||||
@@ -1140,13 +1140,13 @@ struct UnkStackStruct1 {
|
||||
/* 03 */ unk8 mUnk_03;
|
||||
/* 04 */ void *mUnk_04;
|
||||
/* 08 */ unk32 mUnk_08;
|
||||
/* 0C */ Vec3p mUnk_0C;
|
||||
/* 0C */ VecFx32 mUnk_0C;
|
||||
/* 18 */ unk16 mUnk_18;
|
||||
/* 1A */ unk16 mUnk_1A;
|
||||
/* 1C */ unk16 mUnk_1C;
|
||||
/* 1E */ unk16 mUnk_1E;
|
||||
/* 20 */ unk32 mUnk_20;
|
||||
/* 24 */ Vec3p mUnk_24;
|
||||
/* 24 */ VecFx32 mUnk_24;
|
||||
/* 30 */ unk16 mUnk_30;
|
||||
/* 32 */ unk16 mUnk_32;
|
||||
/* 34 */ unk16 mUnk_34;
|
||||
@@ -1165,7 +1165,7 @@ struct UnkSystem7_UnkStruct_00 {
|
||||
/* 28 */ STRUCT_PAD(0x28, 0xA4);
|
||||
/* A4 */ unk16 mUnk_A4;
|
||||
|
||||
void func_ov000_02052c48(Vec3p *param1, Vec3p *param2);
|
||||
void func_ov000_02052c48(VecFx32 *param1, VecFx32 *param2);
|
||||
};
|
||||
|
||||
class UnkSystem7 {
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "types.h"
|
||||
|
||||
//! TODO: temporary place until this is documented properly
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void MI_CpuFill16(int value, void *dst, size_t size);
|
||||
void MI_CpuCopy16(void *src, void *dest, size_t size);
|
||||
void MI_CpuFill32(int value, void *dest, size_t size);
|
||||
// MI_CpuCopy32
|
||||
// Stream32
|
||||
void _MI_CpuFill(int value, void *dst, size_t size);
|
||||
void _MI_CpuCopy(void *src, void *dest, size_t size);
|
||||
// CopySingle256
|
||||
// CopySingle288
|
||||
// CopySingle384
|
||||
// CopySingle512
|
||||
void MI_CpuFill8(void *dst, int value, size_t size);
|
||||
// Copy
|
||||
// Zero288
|
||||
// Swap32
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "Player/TouchControl.hpp"
|
||||
#include "global.h"
|
||||
#include "input.hpp"
|
||||
#include "types.h"
|
||||
#include <nitro/button.h>
|
||||
|
||||
class UnkStruct_02049b18_06 {
|
||||
public:
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/mi.h>
|
||||
|
||||
class GameModeManagerBase;
|
||||
|
||||
struct UnkStruct_0204a110_Sub2_000_158 {
|
||||
@@ -69,7 +70,7 @@ public:
|
||||
/* 200 */
|
||||
|
||||
UnkStruct_0204a110_Sub3_00() {
|
||||
MI_CpuFill16(0, (u16 *) this->mUnk_000, sizeof(this->mUnk_000));
|
||||
MI_CpuFill16(0, this->mUnk_000, sizeof(this->mUnk_000));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -159,8 +160,7 @@ public:
|
||||
UnkSubStruct1_Methods;
|
||||
};
|
||||
|
||||
//! TODO: actually a matrix
|
||||
extern Vec4p data_027e0120;
|
||||
extern MtxFx22 data_027e0120;
|
||||
|
||||
class UnkStruct_0204a110_Sub7 {
|
||||
public:
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
/* 03 */ unk8 mUnk_03;
|
||||
/* 04 */ UnkSystem2_UnkSubSystem9 *mUnk_04;
|
||||
/* 08 */ UnkStruct_0204a110_Sub7_08 *mUnk_08;
|
||||
/* 0C */ Vec4p mUnk_0C; // same type as data_027e0120?
|
||||
/* 0C */ MtxFx22 mUnk_0C;
|
||||
/* 1C */
|
||||
|
||||
UnkStruct_0204a110_Sub7();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Unknown/UnkStruct_02049b18.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
#include <nitro/button.h>
|
||||
#include <nitro/pad.h>
|
||||
|
||||
class UnkStruct_0204e64c_00 {
|
||||
public:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "Player/Player.hpp"
|
||||
#include "Player/TouchControl.hpp"
|
||||
#include "global.h"
|
||||
#include <nitro/button.h>
|
||||
#include <nitro/pad.h>
|
||||
|
||||
// incomplete
|
||||
class UnkStruct_027e0478 {
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
UnkStruct_027e0998_Base();
|
||||
|
||||
// data_ov000_020b1e08
|
||||
/* 00 */ virtual bool vfunc_00(Vec3p *pPos, Vec2s *param2, u16 *param3);
|
||||
/* 00 */ virtual bool vfunc_00(VecFx32 *pPos, Vec2s *param2, u16 *param3);
|
||||
/* 04 */
|
||||
|
||||
void func_ov000_02061760();
|
||||
@@ -38,11 +38,11 @@ public:
|
||||
~UnkStruct_027e0998(); // ClearInstance
|
||||
|
||||
// data_ov024_020d7c98
|
||||
/* 00 */ virtual bool vfunc_00(Vec3p *pPos, Vec2s *param2, u16 *param3) override;
|
||||
/* 00 */ virtual bool vfunc_00(VecFx32 *pPos, Vec2s *param2, u16 *param3) override;
|
||||
/* 04 */
|
||||
|
||||
bool func_ov024_020c716c();
|
||||
bool func_ov024_020c7214(Vec3p *pPos, Vec2s *param2, u16 *param3);
|
||||
bool func_ov024_020c7214(VecFx32 *pPos, Vec2s *param2, u16 *param3);
|
||||
bool func_ov024_020c727c(Vec2s *param1, u16 *param2);
|
||||
bool func_ov024_020c7300(unk32 param1);
|
||||
bool func_ov024_020c7354();
|
||||
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
/* 28 */ unk32 mUnk_28;
|
||||
/* 2C */ s16 mUnk_2C;
|
||||
/* 2C */ unk16 mUnk_2E;
|
||||
/* 30 */ Vec3p mUnk_30;
|
||||
/* 30 */ VecFx32 mUnk_30;
|
||||
/* 3C */ STRUCT_PAD(0x3C, 0x54);
|
||||
/* 54 */ void *mUnk_54; // vtable
|
||||
/* 58 */ UnkStruct_WarpUnk1 *mpWarpUnk1;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
class UnkStruct_027e09a8 {
|
||||
public:
|
||||
void func_ov000_02071b30(unk32 param1, Vec3p *pPos, unk32 param3);
|
||||
void func_ov000_02071d34(void *param1, unk32 param2, Vec3p *pPos, unk32 param4);
|
||||
void func_ov000_02071b30(unk32 param1, VecFx32 *pPos, unk32 param3);
|
||||
void func_ov000_02071d34(void *param1, unk32 param2, VecFx32 *pPos, unk32 param4);
|
||||
};
|
||||
|
||||
extern UnkStruct_027e09a8 *data_027e09a8;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Unknown/UnkMemFuncs.h"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
#include <nitro/mi.h>
|
||||
|
||||
#include "math.hpp"
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
class UnkStruct_027e09bc_0c {
|
||||
public:
|
||||
void func_ov000_02078230(unk32 param1);
|
||||
bool func_ov000_0207834c(Vec3p *param1, unk32 param2, unk32 param3);
|
||||
bool func_ov000_02078764(Vec3p *param1, void *param2, unk32 param3);
|
||||
bool func_ov000_0207834c(VecFx32 *param1, unk32 param2, unk32 param3);
|
||||
bool func_ov000_02078764(VecFx32 *param1, void *param2, unk32 param3);
|
||||
};
|
||||
|
||||
class UnkStruct_027e09bc {
|
||||
|
||||
@@ -90,10 +90,10 @@ public:
|
||||
/* 1C */ virtual void vfunc_1c();
|
||||
/* 20 */ virtual void vfunc_20();
|
||||
/* 24 */ virtual void vfunc_24();
|
||||
/* 28 */ virtual q20 vfunc_28(Vec3p *param1, unk32 param2, unk32 param3);
|
||||
/* 28 */ virtual fx32 vfunc_28(VecFx32 *param1, unk32 param2, unk32 param3);
|
||||
/* 2C */ virtual void vfunc_2c();
|
||||
|
||||
q20 func_01ffedf4(Vec2b *pPos);
|
||||
fx32 func_01ffedf4(Vec2b *pPos);
|
||||
|
||||
unk32 func_ov000_02080180(void *param1);
|
||||
bool func_ov000_02080658(unk32 param1, UnkStruct_SceneChange1 *param2);
|
||||
@@ -102,9 +102,9 @@ public:
|
||||
void func_ov000_020801b0(Vec2b *param1, unk32 param2, unk32 param3);
|
||||
void func_ov000_0208053c(u16 param1);
|
||||
void func_ov000_020803ec(u16 param1);
|
||||
unk32 func_ov000_020802ec(u16 param1, Vec3p *param2);
|
||||
unk32 func_ov000_020802ec(u16 param1, VecFx32 *param2);
|
||||
|
||||
Vec3p *func_ov001_020b8a5c(unk32 spawnIndex, unk32 param1);
|
||||
VecFx32 *func_ov001_020b8a5c(unk32 spawnIndex, unk32 param1);
|
||||
};
|
||||
|
||||
class UnkStruct_027e0cd8_04_0C {
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
/* 0C */ UnkStruct_027e0cd8_0c *mUnk_0C; // related to train?
|
||||
/* 10 */ MapObjectManager *mUnk_10;
|
||||
/* 14 */ STRUCT_PAD(0x14, 0x24);
|
||||
/* 24 */ Vec3p mUnk_24;
|
||||
/* 24 */ VecFx32 mUnk_24;
|
||||
/* 34 */ STRUCT_PAD(0x34, 0x4C);
|
||||
/* 4C */
|
||||
|
||||
|
||||
@@ -76,14 +76,14 @@ public:
|
||||
/* 40 */ unk32 *mUnk_40; // pointer to data_027e0478 when not on the train
|
||||
/* 44 */
|
||||
|
||||
Vec3p *func_01fff148(unk32 param1);
|
||||
VecFx32 *func_01fff148(unk32 param1);
|
||||
bool func_01fff1a4();
|
||||
|
||||
// overlay 0
|
||||
void func_ov000_0208a318(unk32 param1, unk32 param2, unk32 param3);
|
||||
void func_ov000_0208bbd4(unk32 param1, Vec3p *param2, u16 param3);
|
||||
void func_ov000_0208bbd4(unk32 param1, VecFx32 *param2, u16 param3);
|
||||
|
||||
void func_ov000_0208bbd4(unk32 param1, Vec3p *param2, void *param3);
|
||||
void func_ov000_0208bbd4(unk32 param1, VecFx32 *param2, void *param3);
|
||||
|
||||
static UnkStruct_027e0ce0_34 *func_ov000_0205c904();
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
class UnkStruct_027e0cec {
|
||||
public:
|
||||
void func_ov000_0209feac(unk32 param1, Vec3p *param2, unk32 param3, unk32 param4, unk32 param5);
|
||||
void func_ov000_0209ff8c(UnkStruct_PlayerGet_ec *param1, unk32 param2, Vec3p *param3, unk32 param4);
|
||||
void func_ov000_020a0000(UnkStruct_PlayerGet_ec *param1, void *param2, unk32 *param3, Vec3p *param4, unk32 param5);
|
||||
void func_ov000_0209feac(unk32 param1, VecFx32 *param2, unk32 param3, unk32 param4, unk32 param5);
|
||||
void func_ov000_0209ff8c(UnkStruct_PlayerGet_ec *param1, unk32 param2, VecFx32 *param3, unk32 param4);
|
||||
void func_ov000_020a0000(UnkStruct_PlayerGet_ec *param1, void *param2, unk32 *param3, VecFx32 *param4, unk32 param5);
|
||||
void func_ov000_020a0110(UnkStruct_PlayerGet_ec *param1);
|
||||
void func_ov000_020a0220(void *param1, void *param2);
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "Unknown/UnkStruct_02049b18.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
#include <nitro/button.h>
|
||||
#include <nitro/pad.h>
|
||||
|
||||
class UnkStruct_ov000_02067bc4_Sub1 {
|
||||
public:
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
// /* 3C */ unk32 mUnk_3C;
|
||||
// /* 40 */ u16 mUnk_40;
|
||||
|
||||
void func_ov093_0216f76c(Vec3p *param1, unk32 param2);
|
||||
void func_ov093_0216f76c(VecFx32 *param1, unk32 param2);
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_0208f820_28 {
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
/* 04 */ unk32 mUnk_04;
|
||||
/* 08 */ unk32 mUnk_08;
|
||||
/* 0C */ unk32 mUnk_0C;
|
||||
/* 10 */ Vec3p mUnk_10;
|
||||
/* 10 */ VecFx32 mUnk_10;
|
||||
/* 1C */ ItemId mUnk_1C;
|
||||
};
|
||||
|
||||
@@ -204,9 +204,9 @@ public:
|
||||
/* 28 */ UnkStruct_ov000_0208f820_28 *mUnk_28;
|
||||
/* 2C */ UnkStruct_ov000_0208f820_2c *mUnk_2C;
|
||||
/* 30 */ UnkStruct_ov000_0208f820_30 *mUnk_30;
|
||||
/* 34 */ Vec3p *mUnk_34;
|
||||
/* 38 */ Vec3p *mUnk_38;
|
||||
/* 3C */ Vec3p *mUnk_3C;
|
||||
/* 34 */ VecFx32 *mUnk_34;
|
||||
/* 38 */ VecFx32 *mUnk_38;
|
||||
/* 3C */ VecFx32 *mUnk_3C;
|
||||
/* 40 */ UnkStruct_ov000_0208f820_40 *mUnk_40;
|
||||
/* 44 */ UnkStruct_ov000_0208f820_44 *mUnk_44;
|
||||
/* 48 */
|
||||
@@ -217,11 +217,11 @@ public:
|
||||
/* 10 */ virtual void vfunc_10(unk32 param1, unk32 param2) = 0;
|
||||
/* 14 */ virtual void vfunc_14();
|
||||
/* 18 */ virtual void vfunc_18(unk32 param1, unk32 param2, unk32 param3);
|
||||
/* 1C */ virtual bool vfunc_1c(Vec3p *param1);
|
||||
/* 1C */ virtual bool vfunc_1c(VecFx32 *param1);
|
||||
/* 20 */
|
||||
|
||||
UnkStruct_ov000_0208f820();
|
||||
|
||||
bool func_ov000_020914b0(unk32 param1, Vec3p *param2, unk32 param3);
|
||||
bool func_ov000_020914b0(unk32 param1, VecFx32 *param2, unk32 param3);
|
||||
bool func_ov000_02091e68(unk32 param1);
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ class UnkStruct_ov000_020b5d34_00 {
|
||||
public:
|
||||
/* 00 */ unk32 *mUnk_00;
|
||||
/* 04 */ MapObject_20 *mUnk_04;
|
||||
/* 08 */ Vec3p *mUnk_08;
|
||||
/* 08 */ VecFx32 *mUnk_08;
|
||||
/* 0C */ s16 *mUnk_0C;
|
||||
/* 10 */
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/button.h>
|
||||
#include <nitro/pad.h>
|
||||
|
||||
// Title Card Scene Message Index (see sBMGSceneMap)
|
||||
typedef s32 TC_SceneMsgIdx;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef GLOBAL_H
|
||||
#define GLOBAL_H
|
||||
|
||||
#define ARRAY_LEN_U(arr) (u32)((sizeof(arr) / sizeof(*arr)))
|
||||
#define ARRAY_LEN(arr) (s32)((sizeof(arr) / sizeof(*arr)))
|
||||
|
||||
// Prevent the IDE from reporting errors that the compiler/linker won't report
|
||||
#ifdef __INTELLISENSE__
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include <nitro/pad.h>
|
||||
|
||||
#define CHECK_BUTTON_COMBO(value, btn) ((value) & (btn))
|
||||
|
||||
struct Input {
|
||||
/* 00 */ u16 cur;
|
||||
/* 02 */ volatile u16 press;
|
||||
/* 04 */ u16 release;
|
||||
/* 06 */
|
||||
|
||||
Input();
|
||||
unk32 func_02013c08(u16 param1);
|
||||
unk32 func_02013b24(unk32 param1);
|
||||
unk32 func_02013bbc();
|
||||
};
|
||||
+8
-8
@@ -231,11 +231,11 @@ static inline void Vec2b_Copy(const Vec2b *a, Vec2b *dst) {
|
||||
|
||||
union Vec2pCpp {
|
||||
struct {
|
||||
/* 0 */ q20 x;
|
||||
/* 4 */ q20 y;
|
||||
/* 0 */ fx32 x;
|
||||
/* 4 */ fx32 y;
|
||||
/* 8 */
|
||||
};
|
||||
q20 coords[2];
|
||||
fx32 coords[2];
|
||||
|
||||
void operator=(const Vec2pCpp &from) {
|
||||
this->x = from.x;
|
||||
@@ -243,7 +243,7 @@ union Vec2pCpp {
|
||||
}
|
||||
|
||||
Vec2pCpp() {}
|
||||
Vec2pCpp(q20 X, q20 Y) {
|
||||
Vec2pCpp(fx32 X, fx32 Y) {
|
||||
x = X;
|
||||
y = Y;
|
||||
}
|
||||
@@ -267,16 +267,16 @@ static inline void Vec2pCpp_Clear(Vec2pCpp *dst) {
|
||||
}
|
||||
|
||||
static inline void Vec2pCpp_Add(const Vec2pCpp *a, const Vec2pCpp *b, Vec2pCpp *dst) {
|
||||
q20 x = a->x + b->x;
|
||||
q20 y = a->y + b->y;
|
||||
fx32 x = a->x + b->x;
|
||||
fx32 y = a->y + b->y;
|
||||
|
||||
dst->x = x;
|
||||
dst->y = y;
|
||||
}
|
||||
|
||||
static inline void Vec2pCpp_Sub(const Vec2pCpp *a, const Vec2pCpp *b, Vec2pCpp *dst) {
|
||||
q20 x = a->x - b->x;
|
||||
q20 y = a->y - b->y;
|
||||
fx32 x = a->x - b->x;
|
||||
fx32 y = a->y - b->y;
|
||||
|
||||
dst->x = x;
|
||||
dst->y = y;
|
||||
|
||||
-157
@@ -1,157 +0,0 @@
|
||||
#ifndef _NITRO_REG_H
|
||||
#define _NITRO_REG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define REG_POWER_CNT (*(vu16 *) 0x04000304)
|
||||
#define REG_IME (*(vu16 *) 0x04000208)
|
||||
|
||||
#define REG_DISPSTAT (*(vu16 *) 0x4000004)
|
||||
#define REG_VCOUNT (*(vu16 *) 0x04000006)
|
||||
|
||||
#define REG_VRAM_CNT_ABCD (*(vu32 *) 0x04000240)
|
||||
#define REG_VRAM_CNT_A (*(vu8 *) 0x04000240)
|
||||
#define REG_VRAM_CNT_B (*(vu8 *) 0x04000241)
|
||||
#define REG_VRAM_CNT_C (*(vu8 *) 0x04000242)
|
||||
#define REG_VRAM_CNT_D (*(vu8 *) 0x04000243)
|
||||
#define REG_VRAM_CNT_E (*(vu8 *) 0x04000244)
|
||||
#define REG_VRAM_CNT_F (*(vu8 *) 0x04000245)
|
||||
#define REG_VRAM_CNT_G (*(vu8 *) 0x04000246)
|
||||
#define REG_WRAM_CNT (*(vu8 *) 0x04000247)
|
||||
#define REG_VRAM_CNT_HI (*(vu16 *) 0x04000248)
|
||||
#define REG_VRAM_CNT_H (*(vu8 *) 0x04000248)
|
||||
#define REG_VRAM_CNT_I (*(vu8 *) 0x04000249)
|
||||
|
||||
#define REG_PAD (*(u16 *) 0x027FFFA8)
|
||||
#define REG_KEYINPUT (*(u16 *) 0x04000130)
|
||||
|
||||
#define REG_FRAME_COUNTER (*(u32 *) 0x027FFC3C)
|
||||
#define REG_027FFC40 (*(u16 *) 0x027FFC40)
|
||||
#define REG_FNT_ROM_OFFSET (*(u32 *) 0x027FFE40)
|
||||
#define REG_FNT_SIZE (*(u32 *) 0x027FFE44)
|
||||
#define REG_FAT_ROM_OFFSET (*(u32 *) 0x027FFE48)
|
||||
#define REG_FAT_SIZE (*(u32 *) 0x027FFE4C)
|
||||
|
||||
extern u32 _DTCM_BASE; // TODO: Provide address via LCF
|
||||
#define DTCM_BASE ((u8 *) &_DTCM_BASE)
|
||||
#define REG_IRQ (*(u32 *) (DTCM_BASE + 0x3FF8))
|
||||
|
||||
#define _MAIN_REG_BASE 0x04000000
|
||||
#define _SUB_REG_BASE 0x04001000
|
||||
|
||||
#define _REG_DISPCNT(base) (*(u32 *) ((base) | 0x0))
|
||||
#define _REG_BG0CNT(base) (*(vu16 *) ((base) | 0x8))
|
||||
#define _REG_BG1CNT(base) (*(vu16 *) ((base) | 0xa))
|
||||
#define _REG_BG2CNT(base) (*(vu16 *) ((base) | 0xc))
|
||||
#define _REG_BG3CNT(base) (*(vu16 *) ((base) | 0xe))
|
||||
#define _REG_BG0OFS(base) (*(u32 *) ((base) | 0x10))
|
||||
#define _REG_BG1OFS(base) (*(u32 *) ((base) | 0x14))
|
||||
#define _REG_BG2OFS(base) (*(u32 *) ((base) | 0x18))
|
||||
#define _REG_BG3OFS(base) (*(u32 *) ((base) | 0x1c))
|
||||
#define _REG_BG2PA(base) (*(u16 *) ((base) | 0x20))
|
||||
#define _REG_BG2PB(base) (*(u16 *) ((base) | 0x22))
|
||||
#define _REG_BG2PC(base) (*(u16 *) ((base) | 0x24))
|
||||
#define _REG_BG2PD(base) (*(u16 *) ((base) | 0x26))
|
||||
#define _REG_BG2X(base) (*(u32 *) ((base) | 0x28))
|
||||
#define _REG_BG2Y(base) (*(u32 *) ((base) | 0x2c))
|
||||
#define _REG_BG3PA(base) (*(u16 *) ((base) | 0x30))
|
||||
#define _REG_BG3PB(base) (*(u16 *) ((base) | 0x32))
|
||||
#define _REG_BG3PC(base) (*(u16 *) ((base) | 0x34))
|
||||
#define _REG_BG3PD(base) (*(u16 *) ((base) | 0x36))
|
||||
#define _REG_BG3X(base) (*(u32 *) ((base) | 0x38))
|
||||
#define _REG_BG3Y(base) (*(u32 *) ((base) | 0x3c))
|
||||
#define _REG_WININ(base) (*(u16 *) ((base) | 0x48))
|
||||
#define _REG_WINOUT(base) (*(u16 *) ((base) | 0x4a))
|
||||
#define _REG_MOSAIC(base) (*(u8 *) ((base) | 0x4c))
|
||||
#define _REG_OBJMOSAIC(base) (*(u8 *) ((base) | 0x4d))
|
||||
#define _REG_BLDCNT(base) (*(u16 *) ((base) | 0x50))
|
||||
#define _REG_BLDALPHA(base) (*(u16 *) ((base) | 0x52))
|
||||
#define _REG_MASTER_BRIGHT(base) (*(u16 *) ((base) | 0x6c))
|
||||
|
||||
#define REG_DISPCNT _REG_DISPCNT(_MAIN_REG_BASE)
|
||||
#define REG_BG0CNT _REG_BG0CNT(_MAIN_REG_BASE)
|
||||
#define REG_BG1CNT _REG_BG1CNT(_MAIN_REG_BASE)
|
||||
#define REG_BG2CNT _REG_BG2CNT(_MAIN_REG_BASE)
|
||||
#define REG_BG3CNT _REG_BG3CNT(_MAIN_REG_BASE)
|
||||
#define REG_BG0OFS _REG_BG0OFS(_MAIN_REG_BASE)
|
||||
#define REG_BG1OFS _REG_BG1OFS(_MAIN_REG_BASE)
|
||||
#define REG_BG2OFS _REG_BG2OFS(_MAIN_REG_BASE)
|
||||
#define REG_BG3OFS _REG_BG3OFS(_MAIN_REG_BASE)
|
||||
#define REG_BG2PA _REG_BG2PA(_MAIN_REG_BASE)
|
||||
#define REG_BG2PB _REG_BG2PB(_MAIN_REG_BASE)
|
||||
#define REG_BG2PC _REG_BG2PC(_MAIN_REG_BASE)
|
||||
#define REG_BG2PD _REG_BG2PD(_MAIN_REG_BASE)
|
||||
#define REG_BG2X _REG_BG2X(_MAIN_REG_BASE)
|
||||
#define REG_BG2Y _REG_BG2Y(_MAIN_REG_BASE)
|
||||
#define REG_BG3PA _REG_BG3PA(_MAIN_REG_BASE)
|
||||
#define REG_BG3PB _REG_BG3PB(_MAIN_REG_BASE)
|
||||
#define REG_BG3PC _REG_BG3PC(_MAIN_REG_BASE)
|
||||
#define REG_BG3PD _REG_BG3PD(_MAIN_REG_BASE)
|
||||
#define REG_BG3X _REG_BG3X(_MAIN_REG_BASE)
|
||||
#define REG_BG3Y _REG_BG3Y(_MAIN_REG_BASE)
|
||||
#define REG_WININ _REG_WININ(_MAIN_REG_BASE)
|
||||
#define REG_WINOUT _REG_WINOUT(_MAIN_REG_BASE)
|
||||
#define REG_MOSAIC _REG_MOSAIC(_MAIN_REG_BASE)
|
||||
#define REG_OBJMOSAIC _REG_OBJMOSAIC(_MAIN_REG_BASE)
|
||||
#define REG_BLDCNT _REG_BLDCNT(_MAIN_REG_BASE)
|
||||
#define REG_BLDALPHA _REG_BLDALPHA(_MAIN_REG_BASE)
|
||||
#define REG_MASTER_BRIGHT _REG_MASTER_BRIGHT(_MAIN_REG_BASE)
|
||||
|
||||
#define REG_DISPCNT_SUB _REG_DISPCNT(_SUB_REG_BASE)
|
||||
#define REG_BG0CNT_SUB _REG_BG0CNT(_SUB_REG_BASE)
|
||||
#define REG_BG1CNT_SUB _REG_BG1CNT(_SUB_REG_BASE)
|
||||
#define REG_BG2CNT_SUB _REG_BG2CNT(_SUB_REG_BASE)
|
||||
#define REG_BG3CNT_SUB _REG_BG3CNT(_SUB_REG_BASE)
|
||||
#define REG_BG0OFS_SUB _REG_BG0OFS(_SUB_REG_BASE)
|
||||
#define REG_BG1OFS_SUB _REG_BG1OFS(_SUB_REG_BASE)
|
||||
#define REG_BG2OFS_SUB _REG_BG2OFS(_SUB_REG_BASE)
|
||||
#define REG_BG3OFS_SUB _REG_BG3OFS(_SUB_REG_BASE)
|
||||
#define REG_BG2PA_SUB _REG_BG2PA(_SUB_REG_BASE)
|
||||
#define REG_BG2PB_SUB _REG_BG2PB(_SUB_REG_BASE)
|
||||
#define REG_BG2PC_SUB _REG_BG2PC(_SUB_REG_BASE)
|
||||
#define REG_BG2PD_SUB _REG_BG2PD(_SUB_REG_BASE)
|
||||
#define REG_BG2X_SUB _REG_BG2X(_SUB_REG_BASE)
|
||||
#define REG_BG2Y_SUB _REG_BG2Y(_SUB_REG_BASE)
|
||||
#define REG_BG3PA_SUB _REG_BG3PA(_SUB_REG_BASE)
|
||||
#define REG_BG3PB_SUB _REG_BG3PB(_SUB_REG_BASE)
|
||||
#define REG_BG3PC_SUB _REG_BG3PC(_SUB_REG_BASE)
|
||||
#define REG_BG3PD_SUB _REG_BG3PD(_SUB_REG_BASE)
|
||||
#define REG_BG3X_SUB _REG_BG3X(_SUB_REG_BASE)
|
||||
#define REG_BG3Y_SUB _REG_BG3Y(_SUB_REG_BASE)
|
||||
#define REG_WININ_SUB _REG_WININ(_SUB_REG_BASE)
|
||||
#define REG_WINOUT_SUB _REG_WINOUT(_SUB_REG_BASE)
|
||||
#define REG_MOSAIC_SUB _REG_MOSAIC(_SUB_REG_BASE)
|
||||
#define REG_OBJMOSAIC_SUB _REG_OBJMOSAIC(_SUB_REG_BASE)
|
||||
#define REG_BLDCNT_SUB _REG_BLDCNT(_SUB_REG_BASE)
|
||||
#define REG_BLDALPHA_SUB _REG_BLDALPHA(_SUB_REG_BASE)
|
||||
#define REG_MASTER_BRIGHT_SUB _REG_MASTER_BRIGHT(_SUB_REG_BASE)
|
||||
|
||||
#define REG_SWAP_BUFFERS (*(((u32 *) (_MAIN_REG_BASE | 0x00000540))))
|
||||
|
||||
#define REG_VRAM (*(((u32 *) (0x06800000))))
|
||||
#define REG_PALETTE_A (*(((u32 *) (0x05000000))))
|
||||
#define REG_PALETTE_B (*(((u32 *) (0x05000400))))
|
||||
#define REG_OAM_A (*(((u32 *) (0x07000000))))
|
||||
#define REG_OAM_B (*(((u32 *) (0x07000400))))
|
||||
|
||||
#define REG_GFX_FIFO (*(vu32 *) 0x04000400)
|
||||
#define GFX_FIFO_MTX_MODE (*(vu32 *) 0x04000440)
|
||||
#define GFX_FIFO_MTX_PUSH (*(vu32 *) 0x04000444)
|
||||
#define GFX_FIFO_MTX_POP (*(vu32 *) 0x04000448)
|
||||
#define GFX_FIFO_MTX_STORE (*(vu32 *) 0x0400044c)
|
||||
#define GFX_FIFO_MTX_RESTORE (*(vu32 *) 0x04000450)
|
||||
#define GFX_FIFO_MTX_IDENTITY (*(vu32 *) 0x04000454)
|
||||
#define GFX_FIFO_SWAP_BUFFERS (*(vu32 *) 0x04000540)
|
||||
#define GFX_FIFO_VIEWPORT (*(vu32 *) 0x04000580)
|
||||
#define REG_GFX_RAM_COUNT (*(vu16 *) 0x04000604)
|
||||
#define REG_GFX_RAM_COUNT_2 (*(vu16 *) 0x04000606)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1
-31
@@ -1,37 +1,7 @@
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
typedef unsigned long long u64;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef long long s64;
|
||||
typedef int s32;
|
||||
typedef short s16;
|
||||
typedef char s8;
|
||||
|
||||
typedef float f32;
|
||||
typedef double f64;
|
||||
|
||||
typedef volatile u64 vu64;
|
||||
typedef volatile u32 vu32;
|
||||
typedef volatile u16 vu16;
|
||||
typedef volatile u8 vu8;
|
||||
|
||||
typedef volatile s64 vs64;
|
||||
typedef volatile s32 vs32;
|
||||
typedef volatile s16 vs16;
|
||||
typedef volatile s8 vs8;
|
||||
|
||||
typedef volatile f32 vf32;
|
||||
typedef volatile f64 vf64;
|
||||
|
||||
typedef u32 BOOL;
|
||||
|
||||
#define ATTRIBUTE_ALIGN(x) __attribute__((aligned(x)))
|
||||
#include <nitro/types.h>
|
||||
|
||||
typedef s8 unk8;
|
||||
typedef s16 unk16;
|
||||
|
||||
Reference in New Issue
Block a user