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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user