Files
tp/include/d/d_lib.h
T

96 lines
2.6 KiB
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef D_D_LIB_H
#define D_D_LIB_H
2023-05-12 12:10:14 -07:00
#include "SSystem/SComponent/c_xyz.h"
#include <dolphin/mtx.h>
#include <dolphin/os.h>
2023-05-12 12:10:14 -07:00
class fopAc_ac_c;
2021-03-28 22:49:05 +02:00
2023-09-04 16:17:51 -07:00
class JKRAramArchive;
u32 dLib_getExpandSizeFromAramArchive(JKRAramArchive* arc, char const* resName);
BOOL dLib_checkActorInRectangle(fopAc_ac_c* param_0, fopAc_ac_c* param_1, cXyz const* param_2,
cXyz const* param_3);
u8 dLib_getEventSwitchNo(int param_0);
2023-08-10 03:57:49 -06:00
class STControl {
public:
2022-02-24 14:04:56 -08:00
STControl() {
setWaitParm(15, 15, 0, 0, 0.9f, 0.5f, 0, 0x2000);
init();
}
enum EStickDir {
TRIG_LEFT = 1,
TRIG_RIGHT,
TRIG_UP = 4,
TRIG_UP_LEFT,
TRIG_UP_RIGHT,
TRIG_DOWN = 8,
TRIG_DOWN_LEFT,
TRIG_DOWN_RIGHT,
};
2025-11-30 14:23:42 -08:00
STControl(s16 delayY, s16 delayX, s16 param_2, s16 param_3, f32 threshold,
f32 param_5, s16 param_6, s16 param_7);
2025-11-30 14:23:42 -08:00
void setWaitParm(s16, s16, s16, s16, f32, f32, s16, s16);
void init();
void Xinit();
void Yinit();
virtual f32 getValueStick();
virtual s16 getAngleStick();
u8 checkTrigger();
bool checkLeftTrigger();
bool checkRightTrigger();
bool checkUpTrigger();
bool checkDownTrigger();
2021-06-18 06:33:51 -07:00
2022-01-04 04:53:20 -08:00
void setFirstWaitTime(s16 time) { mFirstWaitTime = time; }
2024-02-17 04:22:01 +02:00
s16 getYwaitTimer() { return mYwaitTimer; }
2025-05-25 13:29:53 -07:00
s16 getXwaitTimer() { return mXwaitTimer; }
2022-01-04 04:53:20 -08:00
/* 0x04 */ f32 mThreshold;
2021-06-18 06:33:51 -07:00
/* 0x08 */ f32 field_0x08;
/* 0x0C */ u8 mDirectionTrig;
2021-06-18 06:33:51 -07:00
/* 0x0D */ u8 field_0x0d;
/* 0x0E */ s16 field_0x0e;
/* 0x10 */ s16 field_0x10;
/* 0x12 */ s16 mRepeatDelayY;
/* 0x14 */ s16 mRepeatDelayX;
2021-06-18 06:33:51 -07:00
/* 0x16 */ s16 field_0x16;
/* 0x18 */ s16 mXwaitTimer;
/* 0x1A */ s16 mYwaitTimer;
/* 0x1C */ s16 field_0x1c;
/* 0x1E */ s16 field_0x1e;
/* 0x20 */ s16 field_0x20;
/* 0x22 */ s16 field_0x22;
/* 0x24 */ s16 field_0x24;
/* 0x26 */ s16 field_0x26;
/* 0x28 */ s16 mFirstWaitTime;
/* 0x2A */ s16 field_0x2a;
/* 0x2C */ s16 field_0x2c;
}; // Size = 0x30
struct CSTControl : public STControl {
2022-01-04 05:37:27 -08:00
CSTControl(s16 param_0, s16 param_1, s16 param_2, s16 param_3, f32 param_4, f32 param_5,
2022-01-04 04:53:20 -08:00
s16 param_6, s16 param_7)
2022-01-04 05:37:27 -08:00
: STControl(param_0, param_1, param_2, param_3, param_4, param_5, param_6, param_7) {}
2022-01-04 04:53:20 -08:00
2021-06-18 06:33:51 -07:00
virtual f32 getValueStick();
virtual s16 getAngleStick();
};
struct dLib_time_c {
2025-11-30 14:23:42 -08:00
static OSTime getTime();
static void stopTime();
static void startTime();
2021-06-18 06:33:51 -07:00
2022-10-18 05:15:45 -07:00
static OSTime m_diffTime;
static OSTime m_stopTime;
static bool m_timeStopped;
2021-06-18 06:33:51 -07:00
};
extern Quaternion ZeroQuat;
2021-03-28 22:49:05 +02:00
#endif /* D_D_LIB_H */