mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-22 05:49:01 -04:00
Merge branch 'main' into 26-02-27-allocator-isolation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#ifndef M_DO_M_DO_MEMCARD_H
|
||||
#define M_DO_M_DO_MEMCARD_H
|
||||
|
||||
#include <dolphin/card.h>
|
||||
#include <dolphin/os.h>
|
||||
#include <card.h>
|
||||
#include <os.h>
|
||||
#include "global.h"
|
||||
|
||||
#define SAVEDATA_SIZE 0xA94 // Size of 1 Quest Log
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define M_DO_M_DO_MEMCARDRWMNG_H
|
||||
|
||||
#include "global.h"
|
||||
#include <dolphin/card.h>
|
||||
#include <card.h>
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
#include <revolution/nand.h>
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#ifndef M_DO_M_DO_RESET_H
|
||||
#define M_DO_M_DO_RESET_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <types.h>
|
||||
|
||||
void mDoRst_reset(int, u32, int);
|
||||
void mDoRst_resetCallBack(int, void*);
|
||||
|
||||
#if !PLATFORM_GCN
|
||||
void mDoRst_shutdownCallBack();
|
||||
#endif
|
||||
|
||||
struct mDoRstData {
|
||||
/* 0x00 */ int mReset;
|
||||
/* 0x04 */ int mResetPrepare;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Z2AudioLib/Z2AudioMgr.h"
|
||||
#include "Z2AudioLib/Z2EnvSeMgr.h"
|
||||
#include "Z2AudioLib/Z2LinkMgr.h"
|
||||
#include "dusk/audio.h"
|
||||
|
||||
class mDoAud_zelAudio_c : public Z2AudioMgr {
|
||||
public:
|
||||
@@ -27,13 +28,13 @@ public:
|
||||
static u8 isResetFlag() { return mResetFlag; }
|
||||
static void onResetFlag() { mResetFlag = true; }
|
||||
static void offResetFlag() { mResetFlag = false; }
|
||||
static bool isBgmSet() { return mBgmSet; }
|
||||
static u8 isBgmSet() { return mBgmSet; }
|
||||
static void onBgmSet() { mBgmSet = true; }
|
||||
static void offBgmSet() { mBgmSet = false; }
|
||||
|
||||
static u8 mInitFlag;
|
||||
static u8 mResetFlag;
|
||||
static bool mBgmSet;
|
||||
static u8 mBgmSet;
|
||||
};
|
||||
|
||||
extern JKRSolidHeap* g_mDoAud_audioHeap;
|
||||
@@ -47,273 +48,338 @@ void mDoAud_setFadeInStart(u8 param_0);
|
||||
void mDoAud_setFadeOutStart(u8 param_0);
|
||||
|
||||
inline void mDoAud_setLinkGroupInfo(u8 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
if (Z2GetLink() != NULL) {
|
||||
Z2GetLink()->setLinkGroupInfo(param_0);
|
||||
}
|
||||
}
|
||||
|
||||
inline void mDoAud_setLinkHp(s32 param_0, s32 param_1) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
if (Z2GetLink() != NULL) {
|
||||
Z2GetLink()->setLinkHp(param_0, param_1);
|
||||
}
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmSetSwordUsing(s32 id) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmSetSwordUsing(id);
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmStart(u32 i_bgmID) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmStart(i_bgmID, 0, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmAllMute(u32 i_count) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmAllMute(i_count, 0.0f);
|
||||
}
|
||||
|
||||
inline void mDoAud_subBgmStart(u32 i_bgmID) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->subBgmStart(i_bgmID);
|
||||
}
|
||||
|
||||
inline void mDoAud_subBgmStop() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->subBgmStop();
|
||||
}
|
||||
|
||||
inline u32 mDoAud_checkPlayingSubBgmFlag() {
|
||||
DUSK_AUDIO_SKIP(0)
|
||||
return Z2AudioMgr::getInterface()->checkPlayingSubBgmFlag();
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmNowBattle(f32 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmNowBattle(param_0);
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmStreamPrepare(u32 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmStreamPrepare(param_0);
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmStreamPlay() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmStreamPlay();
|
||||
}
|
||||
|
||||
inline void mDoAud_setHour(s32 hour) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->setHour(hour);
|
||||
}
|
||||
|
||||
inline void mDoAud_setMinute(s32 min) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->setMinute(min);
|
||||
}
|
||||
|
||||
inline void mDoAud_setWeekday(s32 day) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->setWeekday(day);
|
||||
}
|
||||
|
||||
inline void mDoAud_setInDarkness(bool state) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->setInDarkness(state);
|
||||
}
|
||||
|
||||
inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->seStart(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->seStartLevel(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_seStop(u32 i_sfxID, u32 param_1) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->seStop(i_sfxID, param_1);
|
||||
}
|
||||
|
||||
inline void mDoAud_messageSePlay(u16 param_0, Vec* position, s8 param_2) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->messageSePlay(param_0, position, param_2);
|
||||
}
|
||||
|
||||
inline void mDoAud_sceneBgmStart() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->sceneBgmStart();
|
||||
}
|
||||
|
||||
inline void mDoAud_seDeleteObject(Vec*) {}
|
||||
|
||||
inline void mDoAud_load2ndDynamicWave() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->load2ndDynamicWave();
|
||||
}
|
||||
|
||||
inline bool mDoAud_check1stDynamicWave() {
|
||||
DUSK_AUDIO_SKIP(false)
|
||||
return Z2AudioMgr::getInterface()->check1stDynamicWave();
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmStop(u32 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->bgmStop(param_0, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_rainPlay(s32 enable) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startRainSe(enable, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_heartGaugeOn() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->heartGaugeOn();
|
||||
}
|
||||
|
||||
inline void mDoAud_setSnowPower(s8 i_power) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.setSnowPower(i_power);
|
||||
}
|
||||
|
||||
inline void mDoAud_setFogWipeWidth(f32 i_width) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.setFogWipeWidth(i_width);
|
||||
}
|
||||
|
||||
inline void mDoAud_startFogWipeTrigger(const Vec* param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startFogWipeTrigger((Vec*)param_0);
|
||||
}
|
||||
|
||||
inline void mDoAud_changeSubBgmStatus(s32 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->changeSubBgmStatus(param_0);
|
||||
}
|
||||
|
||||
inline void mDoAud_taktModeMute() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->taktModeMute();
|
||||
}
|
||||
|
||||
inline void mDoAud_taktModeMuteOff() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->taktModeMuteOff();
|
||||
}
|
||||
|
||||
inline void mDoAud_getCameraMapInfo(u32 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->getCameraMapInfo(param_0);
|
||||
}
|
||||
|
||||
inline void mDoAud_setCameraGroupInfo(u8 param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->setCameraGroupInfo(param_0);
|
||||
}
|
||||
|
||||
inline void mDoAud_setLinkShieldType(s32 param_0, s32 param_1) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
if (Z2GetLink() != NULL) {
|
||||
Z2GetLink()->setLinkShieldType(param_0, param_1);
|
||||
}
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_framework() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.framework();
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_resetScene() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.resetScene();
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvSe_startFarThunderSe(const Vec* param_0) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startFarThunderSe((Vec*)param_0, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvSe_startNearThunderSe() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startNearThunderSe(0);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_initStrongWind() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.initStrongWindSe();
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_setWindDirection(Vec* i_direction) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.setWindDirection(i_direction);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_startStrongWindSe(s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startStrongWindSe(i_reverb);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_setWindType(u8 i_type) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.setWindType(i_type);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_initStaticEnvSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3, const Vec* param_4) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.initStaticEnvSe(param_0, param_1, param_2, param_3, (Vec*)param_4);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_startStaticEnvSe(s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startStaticEnvSe(i_reverb);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_initRiverSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.initRiverSe(param_0, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_registRiverSePos(const Vec* i_pos) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.registRiverSePos((Vec*)i_pos);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_startRiverSe(s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startRiverSe(i_reverb);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_initFallSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.initFallSe(param_0, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_registFallSePos(const Vec* i_pos) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.registFallSePos((Vec*)i_pos);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_startFallSe(s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startFallSe(i_reverb);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_initSmellSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.initSmellSe(param_0, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_registSmellSePos(const Vec* i_pos) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.registSmellSePos((Vec*)i_pos);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_startSmellSe(s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startSmellSe(i_reverb);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_registWindowPos(const Vec* i_pos) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.registWindowPos((Vec*)i_pos);
|
||||
}
|
||||
|
||||
inline void mDoAud_mEnvse_registWolfSmellSePos(const Vec* i_pos) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.registWolfSmellSePos((Vec*)i_pos);
|
||||
}
|
||||
|
||||
inline void mDoAud_initLv3WaterSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.initLv3WaterSe(param_0, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
inline void mDoAud_registLv3WaterSePos(u8 param_0, const Vec* i_pos) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.registLv3WaterSePos(param_0, (Vec*)i_pos);
|
||||
}
|
||||
|
||||
inline void mDoAud_startLv3WaterSe(s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startLv3WaterSe(i_reverb);
|
||||
}
|
||||
|
||||
inline void mDoAud_setHyrulSewerOpen(bool i_close) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.setHyrulSewerOpen(i_close);
|
||||
}
|
||||
|
||||
inline void mDoAud_startFogSe() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
g_mEnvSeMgr.startFogSe();
|
||||
}
|
||||
|
||||
inline void mDoAud_talkOut() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->talkOut();
|
||||
}
|
||||
|
||||
inline void mDoAud_talkIn() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->talkIn();
|
||||
}
|
||||
|
||||
inline void mDoAud_setOutputMode(u32 mode) {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->setOutputMode(mode);
|
||||
}
|
||||
|
||||
inline void mDoAud_loadStaticWaves() {
|
||||
DUSK_AUDIO_SKIP()
|
||||
Z2AudioMgr::getInterface()->loadStaticWaves();
|
||||
}
|
||||
|
||||
inline int mDoAud_monsSeStart(u32 i_soundId, const Vec* i_pos, u32 i_actorId, u32 param_3,
|
||||
s8 i_reverb) {
|
||||
DUSK_AUDIO_SKIP(0)
|
||||
UNUSED(i_actorId);
|
||||
return Z2GetAudioMgr()->seStart(i_soundId, i_pos, param_3, i_reverb, 1.0f, 1.0f, -1.0f, -1.0f,
|
||||
0);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#ifndef M_DO_M_DO_DVD_THREAD_H
|
||||
#define M_DO_M_DO_DVD_THREAD_H
|
||||
|
||||
#include <dolphin/os.h>
|
||||
#include "JSystem/JKernel/JKRArchive.h"
|
||||
#include <os.h>
|
||||
#include <os.h>
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "f_pc/f_pc_node.h"
|
||||
|
||||
@@ -149,9 +150,9 @@ struct mDoDvdThd {
|
||||
|
||||
namespace mDoDvdHack {
|
||||
typedef struct FSTEntry {
|
||||
/* 0x00 */ uint isDirAndStringOff;
|
||||
/* 0x04 */ uint parentOrPosition;
|
||||
/* 0x08 */ uint nextEntryOrLength;
|
||||
/* 0x00 */ u32 isDirAndStringOff;
|
||||
/* 0x04 */ u32 parentOrPosition;
|
||||
/* 0x08 */ u32 nextEntryOrLength;
|
||||
} FSTEntry;
|
||||
|
||||
extern OSBootInfo* BootInfo;
|
||||
|
||||
+12
-13
@@ -16,6 +16,7 @@ class JKRHeap;
|
||||
class JKRSolidHeap;
|
||||
struct ResTIMG;
|
||||
class Z2Creature;
|
||||
struct cXy;
|
||||
|
||||
namespace mDoExt {
|
||||
extern u8 CurrentHeapAdjustVerbose;
|
||||
@@ -483,11 +484,6 @@ struct mDoExt_3Dline_field_0x10_c {
|
||||
s8 z;
|
||||
};
|
||||
|
||||
struct mDoExt_3Dline_field_0x18_c {
|
||||
f32 field_0x0;
|
||||
f32 field_0x4;
|
||||
};
|
||||
|
||||
class mDoExt_3Dline_c {
|
||||
public:
|
||||
int init(u16, int, BOOL);
|
||||
@@ -495,12 +491,9 @@ public:
|
||||
|
||||
/* 0x00 */ cXyz* field_0x0;
|
||||
/* 0x04 */ f32* field_0x4;
|
||||
/* 0x08 */ cXyz* field_0x8;
|
||||
/* 0x0C */ cXyz* field_0xc;
|
||||
/* 0x10 */ mDoExt_3Dline_field_0x10_c* field_0x10;
|
||||
/* 0x14 */ mDoExt_3Dline_field_0x10_c* field_0x14;
|
||||
/* 0x18 */ mDoExt_3Dline_field_0x18_c* field_0x18;
|
||||
/* 0x1C */ mDoExt_3Dline_field_0x18_c* field_0x1c;
|
||||
/* 0x08 */ cXyz* field_0x8[2];
|
||||
/* 0x10 */ mDoExt_3Dline_field_0x10_c* field_0x10[2];
|
||||
/* 0x18 */ cXy* field_0x18[2];
|
||||
};
|
||||
|
||||
class mDoExt_offCupOnAupPacket : public J3DPacket {
|
||||
@@ -555,8 +548,8 @@ public:
|
||||
class mDoExt_3DlineMat0_c : public mDoExt_3DlineMat_c {
|
||||
public:
|
||||
int init(u16, u16, int);
|
||||
void update(int, f32, _GXColor&, u16, dKy_tevstr_c*);
|
||||
void update(int, _GXColor&, dKy_tevstr_c*);
|
||||
void update(int, f32, GXColor&, u16, dKy_tevstr_c*);
|
||||
void update(int, GXColor&, dKy_tevstr_c*);
|
||||
|
||||
virtual int getMaterialID() { return 0; }
|
||||
virtual void setMaterial();
|
||||
@@ -774,6 +767,12 @@ void mDoExt_restoreCurrentHeap();
|
||||
JKRExpHeap* mDoExt_getGameHeap();
|
||||
void mDoExt_setSafeGameHeapSize();
|
||||
size_t mDoExt_getSafeGameHeapSize();
|
||||
intptr_t mDoExt_getSafeArchiveHeapSize();
|
||||
intptr_t mDoExt_getSafeJ2dHeapSize();
|
||||
intptr_t mDoExt_getSafeCommandHeapSize();
|
||||
void mDoExt_setSafeCommandHeapSize();
|
||||
void mDoExt_setSafeArchiveHeapSize();
|
||||
void mDoExt_setSafeJ2dHeapSize();
|
||||
void mDoExt_destroySolidHeap(JKRSolidHeap* i_heap);
|
||||
JKRHeap* mDoExt_setCurrentHeap(JKRHeap* i_heap);
|
||||
JKRExpHeap* mDoExt_getArchiveHeap();
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
class csr_c {
|
||||
public:
|
||||
virtual ~csr_c() {}
|
||||
virtual void draw(f32, f32) = 0;
|
||||
virtual bool isPointer();
|
||||
|
||||
static void particleExecute();
|
||||
@@ -68,16 +69,18 @@ public:
|
||||
};
|
||||
|
||||
static void entryBaseCsr(csr_c*);
|
||||
static void releaseCsr(void);
|
||||
static void entryCsr(csr_c*);
|
||||
#endif
|
||||
|
||||
static void create();
|
||||
static void beginRender();
|
||||
static void fadeOut(f32);
|
||||
static void fadeOut(f32, _GXColor&);
|
||||
static void fadeIn(f32 fadeSpeed, _GXColor& fadeColor) {
|
||||
static void fadeOut(f32, GXColor&);
|
||||
static void fadeIn(f32 fadeSpeed, GXColor& fadeColor) {
|
||||
fadeOut(-fadeSpeed, fadeColor);
|
||||
}
|
||||
static void fadeOut_f(f32, _GXColor&);
|
||||
static void fadeOut_f(f32, GXColor&);
|
||||
static void onBlure(const Mtx);
|
||||
static void onBlure();
|
||||
static void calcFade();
|
||||
@@ -103,7 +106,7 @@ public:
|
||||
static void endFrame() { JFWDisplay::getManager()->endFrame(); }
|
||||
static void offFade() { mFade = 0; }
|
||||
static u8 isFade() { return mFade; }
|
||||
static void fadeIn_f(f32 i_fadeSpeed, _GXColor& i_fadeColor) { fadeOut_f(-i_fadeSpeed, i_fadeColor); }
|
||||
static void fadeIn_f(f32 i_fadeSpeed, GXColor& i_fadeColor) { fadeOut_f(-i_fadeSpeed, i_fadeColor); }
|
||||
static void offBlure() { mBlureFlag = false; }
|
||||
static u8 isBlure() { return mBlureFlag; }
|
||||
static void setBlureRate(u8 i_rate) { mBlureRate = i_rate; }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define M_DO_M_DO_HOSTIO_H
|
||||
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
class mDoHIO_child_c {
|
||||
public:
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
#define M_DO_M_DO_LIB_H
|
||||
|
||||
#include "JSystem/J3DU/J3DUClipper.h"
|
||||
#include <dolphin/gx/GXStruct.h>
|
||||
|
||||
typedef struct _GXTexObj GXTexObj;
|
||||
typedef struct _GXTlutObj GXTlutObj;
|
||||
typedef struct Vec Vec;
|
||||
struct ResTIMG;
|
||||
|
||||
@@ -42,4 +41,8 @@ u32 mDoLib_setResTimgObj(ResTIMG const* res, GXTexObj* o_texObj, u32 tlut_name,
|
||||
GXTlutObj* o_tlutObj);
|
||||
void mDoLib_pos2camera(Vec* src, Vec* dst);
|
||||
|
||||
#if PLATFORM_WII
|
||||
void mDoLib_2Dto3D(f32, f32, f32, Vec*);
|
||||
#endif
|
||||
|
||||
#endif /* M_DO_M_DO_LIB_H */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef M_DO_M_DO_MACHINE_H
|
||||
#define M_DO_M_DO_MACHINE_H
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <gx.h>
|
||||
|
||||
typedef struct OSContext OSContext;
|
||||
class JKRHeap;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define M_DO_M_DO_MAIN_H
|
||||
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <os.h>
|
||||
|
||||
class JKRExpHeap;
|
||||
|
||||
|
||||
+13
-5
@@ -3,8 +3,10 @@
|
||||
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include <dolphin/mtx.h>
|
||||
#include <mtx.h>
|
||||
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "dusk/endian.h"
|
||||
|
||||
extern u8 g_printCurrentHeapDebug;
|
||||
extern u8 g_printOtherHeapDebug;
|
||||
@@ -40,10 +42,6 @@ inline void cMtx_concat(const Mtx a, const Mtx b, Mtx ab) {
|
||||
mDoMtx_concat(a, b, ab);
|
||||
}
|
||||
|
||||
inline void cMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
|
||||
MTXScale(m, x, y, z);
|
||||
}
|
||||
|
||||
inline void mDoMtx_multVec(CMtxP m, const Vec* src, Vec* dst) {
|
||||
PSMTXMultVec(m, src, dst);
|
||||
}
|
||||
@@ -146,6 +144,10 @@ inline void mDoMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
|
||||
MTXScale(m, x, y, z);
|
||||
}
|
||||
|
||||
inline void cMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
|
||||
mDoMtx_scale(m, x, y, z);
|
||||
}
|
||||
|
||||
inline void mDoMtx_quat(Mtx m, const Quaternion* q) {
|
||||
MTXQuat(m, q);
|
||||
}
|
||||
@@ -263,6 +265,12 @@ public:
|
||||
* @param b The output Vec
|
||||
*/
|
||||
static void multVec(const Vec* a, Vec* b) { PSMTXMultVec(now, a, b); }
|
||||
#if TARGET_LITTLE_ENDIAN
|
||||
static void multVec(const BE(Vec)* a, Vec* b) {
|
||||
Vec aCopy = *a;
|
||||
multVec(&aCopy, b);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Multiplies a given Vec `a` by the `now` Matrix's "Scale-and-Rotate" component and places the result into Vec `b`
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef M_DO_M_DO_PRINTF_H
|
||||
#define M_DO_M_DO_PRINTF_H
|
||||
|
||||
#include <cstdarg>
|
||||
#include "dolphin/types.h"
|
||||
#include <os.h>
|
||||
#include "dusk/endian.h"
|
||||
|
||||
void my_PutString(const char*);
|
||||
void mDoPrintf_vprintf_Interrupt(char const*, va_list);
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
#ifndef M_RE_CONTROLLER_PAD_H
|
||||
#define M_RE_CONTROLLER_PAD_H
|
||||
|
||||
#include <revolution/mtx.h>
|
||||
#include <revolution/kpad.h>
|
||||
|
||||
class mReCPd {
|
||||
public:
|
||||
struct Pad {
|
||||
struct Acc {
|
||||
void clean();
|
||||
void changeStts(u32, bool);
|
||||
void calcSwingVec();
|
||||
void calcSttsRem();
|
||||
void calcSttsFs();
|
||||
|
||||
/* 0x000 */ Vec field_0x0[120];
|
||||
/* 0x5A0 */ Vec field_0x5a0[120];
|
||||
/* 0xB40 */ int field_0xb40;
|
||||
/* 0xB44 */ int m_swing;
|
||||
/* 0xB48 */ Vec2 m_swingVec;
|
||||
/* 0xB50 */ u8 field_0xb50;
|
||||
/* 0xB51 */ u8 field_0xb51;
|
||||
/* 0xB54 */ f32 field_0xb54;
|
||||
/* 0xB58 */ u8 field_0xB58[0xB68 - 0xB58];
|
||||
/* 0xB68 */ Mtx field_0xb68;
|
||||
/* 0xB98 */ f32 field_0xb98;
|
||||
/* 0xB9C */ int field_0xb9c;
|
||||
/* 0xBA0 */ f32 field_0xba0;
|
||||
/* 0xBA4 */ f32 field_0xba4;
|
||||
/* 0xBA8 */ u8 field_0xBA8[0xBAC - 0xBA8];
|
||||
/* 0xBAC */ int field_0xbac;
|
||||
/* 0xBB0 */ f32 field_0xbb0;
|
||||
/* 0xBB4 */ f32 field_0xbb4;
|
||||
/* 0xBB8 */ u8 field_0xBB8[0xBBC - 0xBB8];
|
||||
/* 0xBBC */ int field_0xbbc;
|
||||
/* 0xBC0 */ int field_0xbc0;
|
||||
};
|
||||
|
||||
void clean();
|
||||
void cleanOneTime();
|
||||
void copyRemAcc();
|
||||
void copyFSAcc();
|
||||
void cleanTrig();
|
||||
void cleanHold();
|
||||
void cleanRelease();
|
||||
void clearUpDown();
|
||||
void calcDpdBox(Vec2*, Vec2*, f32, f32);
|
||||
void calcDpdOld();
|
||||
void calcDpd2DPos();
|
||||
void calcDpdRatioPos();
|
||||
void calcDpdPlayCirPos();
|
||||
void calcDpdPlayBoxPos();
|
||||
|
||||
/* 0x0000 */ u32 field_0x0;
|
||||
/* 0x0004 */ KPADStatus field_0x4[10];
|
||||
/* 0x0554 */ int field_0x554;
|
||||
/* 0x0558 */ KPADStatus field_0x558;
|
||||
/* 0x05E0 */ Acc m_remAcc;
|
||||
/* 0x11A4 */ Acc m_FSAcc;
|
||||
/* 0x1D68 */ f32 m_stick3D;
|
||||
/* 0x1D6C */ f32 field_0x1d6c;
|
||||
/* 0x1D70 */ f32 m_stickValue;
|
||||
/* 0x1D74 */ s16 m_stickAngle;
|
||||
/* 0x1D76 */ s16 m_stick3DAngle;
|
||||
/* 0x1D78 */ Vec2 field_0x1d78;
|
||||
/* 0x1D80 */ Vec2 field_0x1d80;
|
||||
/* 0x1D88 */ f32 field_0x1d88;
|
||||
/* 0x1D8C */ f32 field_0x1d8c;
|
||||
/* 0x1D90 */ f32 field_0x1d90;
|
||||
/* 0x1D94 */ f32 field_0x1d94;
|
||||
/* 0x1D98 */ f32 field_0x1d98;
|
||||
/* 0x1D9C */ f32 field_0x1d9c;
|
||||
/* 0x1DA0 */ f32 field_0x1da0;
|
||||
/* 0x1DA4 */ f32 field_0x1da4;
|
||||
/* 0x1DA8 */ Vec2 field_0x1da8;
|
||||
/* 0x1DB0 */ Vec2 field_0x1db0;
|
||||
/* 0x1DB8 */ f32 field_0x1db8;
|
||||
/* 0x1DBC */ f32 field_0x1dbc;
|
||||
/* 0x1DC0 */ f32 field_0x1dc0;
|
||||
/* 0x1DC4 */ int field_0x1dc4;
|
||||
/* 0x1DC8 */ int field_0x1dc8;
|
||||
/* 0x1DCC */ int m_swingBlock;
|
||||
/* 0x1DD0 */ int field_0x1dd0;
|
||||
/* 0x1DD4 */ u8 field_0x1dd4;
|
||||
/* 0x1DD8 */ int field_0x1dd8;
|
||||
/* 0x1DDC */ u8 field_0x1ddc;
|
||||
/* 0x1DDD */ u8 field_0x1ddd;
|
||||
/* 0x1DE0 */ int field_0x1de0;
|
||||
/* 0x1DE4 */ int field_0x1de4;
|
||||
/* 0x1DE8 */ u8 field_0x1de8;
|
||||
/* 0x1DEC */ int field_0x1dec;
|
||||
/* 0x1DF0 */ u8 field_0x1df0;
|
||||
/* 0x1DF4 */ int field_0x1df4;
|
||||
/* 0x1DF8 */ u32 field_0x1df8;
|
||||
/* 0x1DFC */ u32 field_0x1dfc;
|
||||
/* 0x1E00 */ int field_0x1e00;
|
||||
/* 0x1E04 */ u8 field_0x1e04;
|
||||
/* 0x1E05 */ u8 field_0x1e05;
|
||||
};
|
||||
|
||||
struct motorWave_t {
|
||||
u8* field_0x0;
|
||||
u16 field_0x4;
|
||||
u16 field_0x6;
|
||||
u8 field_0x8;
|
||||
};
|
||||
|
||||
static void enableDpd(u32);
|
||||
static void disableDpd(u32);
|
||||
static void onConnect(u32);
|
||||
static void setExtensionCallback();
|
||||
static void onGetInfoAsync(u32);
|
||||
static void create();
|
||||
static void startMoterWave(motorWave_t*, u8*, bool);
|
||||
static void startMoterWave(int, u8*, bool);
|
||||
static void stopMoterWave(motorWave_t*);
|
||||
static void stopMoterWave(int);
|
||||
static void updateMoterWave();
|
||||
static void stopMoter();
|
||||
static void getLowBat(u32);
|
||||
static void setLowBat(u32, int);
|
||||
static void onLowBatChk(u32);
|
||||
static void procNoData(u32);
|
||||
static void read();
|
||||
static void calibrateDist(int);
|
||||
static void getDpd2DPos(u32);
|
||||
static void getDpdRatioPos(u32);
|
||||
static void getDpdRatioBoxPos(u32);
|
||||
static void chkDpdOk(u32);
|
||||
static void chkDpdValid(u32);
|
||||
static void chkDpdPosIn(u32);
|
||||
static void getKPADAcc(u32, Vec*, int);
|
||||
static void getAngleXy(u32);
|
||||
static void getAngleZy(u32);
|
||||
static void getKPADAccValue(u32, int);
|
||||
static void getKPADAccValueMax(u32);
|
||||
static void getKPADAccSpeed(u32, int);
|
||||
static void getKPADAccSpeedMax(u32);
|
||||
static void getKPADFsAccValue(u32, int);
|
||||
static void getKPADFsAccValueMax(u32);
|
||||
static s16 getFSStickAngle3DRev(u32);
|
||||
static void calcUnderVec(Pad::Acc*, f32);
|
||||
|
||||
static u32 getHoldB(u32);
|
||||
static u32 getHoldMinus(u32);
|
||||
static u32 getHoldPlus(u32);
|
||||
static u32 getHoldZ1(u32);
|
||||
static u32 getTrigB(u32);
|
||||
static u32 getTrigMinus(u32);
|
||||
static u32 getTrigHome(u32);
|
||||
static u32 getTrigPlus(u32);
|
||||
static u32 getTrigZ1(u32);
|
||||
static u32 chkSwingBlock(u32);
|
||||
static u32 getTrigSwing(u32);
|
||||
static Vec2& getSwingVec(u32);
|
||||
static u32 chkSimpleProbe(u32);
|
||||
static BOOL chkDevTypeValid(u32);
|
||||
static u32 getFSTrigSwing(u32);
|
||||
|
||||
static void plusCalValue();
|
||||
static void minusCalValue();
|
||||
|
||||
// made up, copying concepts from m_Do_controller_pad
|
||||
static WPADInfo& getPadInfo(u32 i_pad) { return m_pad_info[i_pad]; }
|
||||
static Pad& getPad(u32 i_pad) { return m_pad[i_pad]; }
|
||||
static u32 getTrig(u32 i_pad) { return getPad(i_pad).field_0x4[0].trig; }
|
||||
static u32 getHold(u32 i_pad) { return getPad(i_pad).field_0x4[0].hold; }
|
||||
|
||||
static u32 getHoldA(u32 i_pad) { return getHold(i_pad) & WPAD_BUTTON_A; }
|
||||
static u32 getHoldRight(u32 i_pad) { return getHold(i_pad) & WPAD_BUTTON_RIGHT; }
|
||||
static u32 getHoldLeft(u32 i_pad) { return getHold(i_pad) & WPAD_BUTTON_LEFT; }
|
||||
static u32 getHoldUp(u32 i_pad) { return getHold(i_pad) & WPAD_BUTTON_UP; }
|
||||
static u32 getTrigA(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_A; }
|
||||
static u32 getTrigRight(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_RIGHT; }
|
||||
static u32 getTrigLeft(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_LEFT; }
|
||||
|
||||
static u32 getTrigUp(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_UP; }
|
||||
static u32 getTrigStart(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_PLUS; }
|
||||
|
||||
static WPADInfo m_pad_info[4];
|
||||
static Pad m_pad[4];
|
||||
static int m_cal_value;
|
||||
};
|
||||
|
||||
#endif /* M_RE_CONTROLLER_PAD_H */
|
||||
Reference in New Issue
Block a user