mirror of
https://github.com/zeldaret/st
synced 2026-07-11 15:18:45 -04:00
Misc Stuff 2 (#33)
* match UnkStruct_ov000_020b4f84_00_Base * lots of random stuff * match other funcs from game.cpp * data_02049a2c -> gGame, UnkStruct_02049a2c -> Game * match operator new * fix regressions * fix some warnings * another round of random things * another round of random things 2 * complete slots column in overlays.md * add scene indices * gamemode stuff * misc stuff * fix build issues * document random things * fix regressions * final round of random things (for now)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/GameMode.hpp"
|
||||
#include "Game/GameModeStartUp.hpp"
|
||||
#include "Save/SaveManager.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
typedef void (*GameUnkCallback1)(void);
|
||||
typedef void (*GameUnkCallback2)(void);
|
||||
typedef unk32 (*GameUnkCallback3)(void);
|
||||
|
||||
class GameModeFileSelect;
|
||||
|
||||
class UnkStruct_02049a2c_1C {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 04 */ unk32 mUnk_04;
|
||||
/* 08 */ STRUCT_PAD(0x08, 0xCC);
|
||||
/* CC */
|
||||
|
||||
UnkStruct_02049a2c_1C();
|
||||
unk32 func_02013e18(void *param1, unk32 param2);
|
||||
|
||||
// data_020437d8 vtable
|
||||
/* 00 */ virtual ~UnkStruct_02049a2c_1C();
|
||||
/* 08 */ virtual void vfunc_08();
|
||||
};
|
||||
|
||||
class Game {
|
||||
public:
|
||||
/* 00 */ GameModeBase *mpCurrentGameMode;
|
||||
/* 04 */ GameModeCreateCallback createCallback;
|
||||
/* 08 */ GameUnkCallback1 mUnk_08; // seems related to entering and leaving houses/grottos??
|
||||
/* 0C */ unk32 mFrameCounter;
|
||||
/* 10 */ SaveFile *mpSaveFile;
|
||||
/* 14 */ GameUnkCallback2 mUnk_14; // only set for wireless stuff?
|
||||
/* 18 */ GameUnkCallback3 mUnk_18; // same as above
|
||||
/* 1C */ UnkStruct_02049a2c_1C mUnk_1C;
|
||||
/* E8 */
|
||||
|
||||
Game();
|
||||
|
||||
void Run();
|
||||
void func_02013370(unk32 param1);
|
||||
bool TrySetCreateCallback(GameModeCreateCallback createCallback);
|
||||
|
||||
void func_ov000_020576d0();
|
||||
void func_ov000_0205770c();
|
||||
|
||||
void func_ov018_020c48a4();
|
||||
void func_ov018_020c48f8(); // loads overlay 0
|
||||
|
||||
GameModeFileSelect *GetGameModeFileSelect() {
|
||||
return (GameModeFileSelect *) this->mpCurrentGameMode;
|
||||
}
|
||||
|
||||
static GameModeStartUp *func_ov018_020c4ba8();
|
||||
};
|
||||
|
||||
extern Game gGame;
|
||||
@@ -12,8 +12,8 @@ public:
|
||||
|
||||
// data_02044018 vtable
|
||||
/* 00 */ virtual ~GameModeBase();
|
||||
/* 08 */ virtual void vfunc_08();
|
||||
/* 0C */ virtual void vfunc_0C() = 0;
|
||||
/* 08 */ virtual void vfunc_08(); // Init
|
||||
/* 0C */ virtual void vfunc_0C() = 0; // Update
|
||||
/* 10 */ virtual void vfunc_10();
|
||||
/* 14 */ virtual void vfunc_14();
|
||||
/* 18 */ virtual void vfunc_18();
|
||||
@@ -22,3 +22,5 @@ public:
|
||||
/* 24 */ virtual unk32 vfunc_24();
|
||||
/* 28 */
|
||||
};
|
||||
|
||||
typedef GameModeBase *(*GameModeCreateCallback)(void);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "FileSelect/FileSelect.hpp"
|
||||
#include "Game/Game.hpp"
|
||||
#include "Game/GameModeManager.hpp"
|
||||
#include "Unknown/UnkStruct_02049a2c.hpp"
|
||||
#include "Unknown/UnkStruct_02049bd4.hpp"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
this->mSaveSlotIndex = 0;
|
||||
data_02049bd4.func_02014cdc(2);
|
||||
data_02049bd4.mUnk_02 &= 0xFFFB;
|
||||
data_02049a2c.func_02013370(1);
|
||||
gGame.func_02013370(1);
|
||||
data_0204999c.mUnk_60 = 0xD6D8;
|
||||
data_ov000_020b504c.func_ov001_020be668();
|
||||
data_0204a110.func_ov001_020bd514(2, FileSelectManager::Create, 0, 1);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/GameMode.hpp"
|
||||
#include "Player/TouchControl.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_02049b18.hpp"
|
||||
@@ -193,7 +194,37 @@ public:
|
||||
/* 28 */ virtual void vfunc_28(unk8 *param1);
|
||||
/* 2C */ virtual void vfunc_2C(unk8 *param1);
|
||||
/* 30 */ virtual void vfunc_30(unk32 param1);
|
||||
/* 34 */ virtual void vfunc_34();
|
||||
/* 34 */ virtual void vfunc_34(unk32 param1, unk32 param2);
|
||||
|
||||
static GameModeManagerBase *Create(unk32 param1);
|
||||
};
|
||||
|
||||
class TitleScreen;
|
||||
class MainGame;
|
||||
|
||||
class TitleScreenManager_Base : public GameModeManagerBase {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 154 */ GameModeBase *mpGameMode;
|
||||
|
||||
TitleScreenManager_Base();
|
||||
|
||||
TitleScreen *GetTitleScreen() {
|
||||
return (TitleScreen *) this->mpGameMode;
|
||||
}
|
||||
|
||||
MainGame *GetMainGame() {
|
||||
return (MainGame *) this->mpGameMode;
|
||||
}
|
||||
|
||||
// data_ov000_020b1d14 vtable
|
||||
/* 08 */ virtual ~TitleScreenManager_Base() override;
|
||||
/* 10 */ virtual void vfunc_10(unk32 param1, unk32 param2, unk32 param3) override;
|
||||
/* 38 */ virtual void vfunc_38(unk32 param1, unk32 param2, unk32 param3, unk32 param4);
|
||||
/* 3C */ virtual void vfunc_3C();
|
||||
/* 40 */ virtual void vfunc_40();
|
||||
/* 44 */ virtual void vfunc_44();
|
||||
/* 48 */
|
||||
};
|
||||
|
||||
extern TitleScreenManager_Base *data_027e0994;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/GameModeManager.hpp"
|
||||
|
||||
class MainGameManager : public TitleScreenManager_Base {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 154 */
|
||||
|
||||
// data_ov024_020d7c18 vtable
|
||||
/* 08 */ virtual ~MainGameManager() override;
|
||||
/* 10 */ virtual void vfunc_10(unk32 param1, unk32 param2, unk32 param3) override;
|
||||
/* 14 */ virtual void vfunc_14() override;
|
||||
/* 18 */ virtual void vfunc_18() override;
|
||||
/* 1C */ virtual void vfunc_1C() override;
|
||||
/* 20 */ virtual void vfunc_20() override;
|
||||
/* 24 */ virtual void vfunc_24() override;
|
||||
/* 28 */ virtual void vfunc_28(unk8 *param1) override;
|
||||
/* 2C */ virtual void vfunc_2C(unk8 *param1) override;
|
||||
/* 30 */ virtual void vfunc_30(unk32 param1) override;
|
||||
/* 34 */ virtual void vfunc_34(unk32 param1, unk32 param2) override;
|
||||
/* 38 */ virtual void vfunc_38(unk32 param1, unk32 param2, unk32 param3, unk32 param4) override;
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "nitro/math.h"
|
||||
#include "types.h"
|
||||
|
||||
// incomplete
|
||||
class PlayerActor {
|
||||
public:
|
||||
/* 00 */ Vec3p mPos;
|
||||
/* 0C */ Vec3p mPrevPos;
|
||||
/* 18 */ Vec3p mVel;
|
||||
/* 24 */ Vec3p mAccel;
|
||||
/* 30 */ u16 mAngle;
|
||||
/* 32 */ u8 mInvincibilityTimer;
|
||||
/* 33 */ u8 mInvincibilityIconTimer; // the blinking icon on top-screen
|
||||
|
||||
void func_ov001_020bc820(); // TODO: params
|
||||
};
|
||||
@@ -425,9 +425,9 @@ enum AdventureFlag_ {
|
||||
/* 0x18F */ AdventureFlag_Unk_18F = FLAG(12, 15),
|
||||
/* 0x190 */ AdventureFlag_Unk_190 = FLAG(12, 16),
|
||||
/* 0x191 */ AdventureFlag_Unk_191 = FLAG(12, 17),
|
||||
/* 0x192 */ AdventureFlag_Unk_192 = FLAG(12, 18),
|
||||
/* 0x193 */ AdventureFlag_Unk_193 = FLAG(12, 19),
|
||||
/* 0x194 */ AdventureFlag_Unk_194 = FLAG(12, 20),
|
||||
/* 0x192 */ AdventureFlag_ObtainedBeedleFreebieCard = FLAG(12, 18),
|
||||
/* 0x193 */ AdventureFlag_ObtainedBeedleQuintuplePointsCard = FLAG(12, 19),
|
||||
/* 0x194 */ AdventureFlag_ObtainedBeedlePointsCard = FLAG(12, 20),
|
||||
/* 0x195 */ AdventureFlag_Unk_195 = FLAG(12, 21),
|
||||
/* 0x196 */ AdventureFlag_Unk_196 = FLAG(12, 22),
|
||||
/* 0x197 */ AdventureFlag_Unk_197 = FLAG(12, 23),
|
||||
|
||||
@@ -395,7 +395,7 @@ public:
|
||||
|
||||
void LoadEquipItem(ItemFlag equipId);
|
||||
|
||||
SysFault *func_020148d0(unk32 param1);
|
||||
void func_020148d0(OverlayIndex index);
|
||||
void func_02014994(unk32 param1);
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ struct Random {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
Vec2us &NextPos(u16 xMax, u16 yMax) {
|
||||
Vec2us pos;
|
||||
|
||||
@@ -60,6 +61,12 @@ struct Random {
|
||||
|
||||
return pos;
|
||||
}
|
||||
#else
|
||||
const Vec2us NextPos(u16 xMax, u16 yMax) {
|
||||
const Vec2us pos = {(u16) this->Next32(0, xMax), (u16) this->Next32(0, yMax)};
|
||||
return pos;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
class SysFault {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ unk8 mUnk_04;
|
||||
/* 05 */ unk8 mUnk_05;
|
||||
/* 04 */ u8 mUnk_04;
|
||||
/* 05 */ u8 mUnk_05;
|
||||
|
||||
void func_020125a4(char *file, u16 line, char *msg, ...);
|
||||
void func_020127f0(unk32 param1);
|
||||
|
||||
void func_ov018_020c4840();
|
||||
};
|
||||
|
||||
+26
-18
@@ -1,37 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "System/SysFault.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define GAME_ASSERT(cond, line, msg, ...) \
|
||||
(!(cond) ? data_02049984.func_020125a4(__FILE__, (line), (msg), __VA_ARGS__) : ((void) 0))
|
||||
#define ASSERT(cond, msg, ...) GAME_ASSERT(cond, __LINE__, msg, __VA_ARGS__)
|
||||
|
||||
typedef u32 UnkId;
|
||||
enum __UnkId {
|
||||
UnkId_EXPH = 'EXPH',
|
||||
UnkId_FRMH = 'FRMH',
|
||||
UnkId_UNTH = 'UNTH',
|
||||
UnkId_UNSH = 'UNSH',
|
||||
UnkId_EXPH = 'EXPH', // Expanded Heap?
|
||||
UnkId_FRMH = 'FRMH', // Frame Heap?
|
||||
UnkId_UNTH = 'UNTH', // Unit Heap?
|
||||
UnkId_UNSH = 'UNSH', // Unspecified Heap?
|
||||
};
|
||||
|
||||
typedef u32 HeapIndex;
|
||||
typedef s16 HeapIndex16;
|
||||
enum HeapIndex_ {
|
||||
HeapIndex_0 = 0,
|
||||
HeapIndex_1 = 1,
|
||||
HeapIndex_2 = 2,
|
||||
HeapIndex_3 = 3,
|
||||
HeapIndex_4 = 4,
|
||||
HeapIndex_5 = 5,
|
||||
HeapIndex_6 = 6,
|
||||
HeapIndex_7 = 7,
|
||||
HeapIndex_8 = 8,
|
||||
HeapIndex_Max = 9
|
||||
HeapIndex_Main = 0, // UnkId_FRMH
|
||||
HeapIndex_1 = 1, // UnkId_EXPH
|
||||
HeapIndex_2 = 2, // UnkId_UNSH
|
||||
HeapIndex_ITCM = 3, // UnkId_UNSH
|
||||
HeapIndex_DTCM = 4, // ?
|
||||
HeapIndex_5 = 5, // ?
|
||||
HeapIndex_6 = 6, // UnkId_FRMH
|
||||
HeapIndex_7 = 7, // ?
|
||||
HeapIndex_8 = 8, // ?
|
||||
HeapIndex_Max = 9
|
||||
};
|
||||
|
||||
class SysObject {
|
||||
public:
|
||||
static void operator delete[](void *ptr);
|
||||
void operator delete[](void *ptr);
|
||||
};
|
||||
|
||||
static void *operator new(unsigned long length, u32 id, u32 idLength = 4);
|
||||
static void *operator new[](unsigned long length, u32 id, u32 idLength = 4);
|
||||
void *operator new(size_t length, u32 id, u32 idLength = 4);
|
||||
void *operator new[](size_t length, u32 id, u32 idLength = 4);
|
||||
|
||||
class UnkStruct_02011e10_Sub1 {
|
||||
public:
|
||||
@@ -51,7 +59,7 @@ public:
|
||||
|
||||
class UnkStruct_02011e10 : public SysObject {
|
||||
public:
|
||||
/* 00 */ UnkStruct_02011e10_Sub1 *mUnk_00[HeapIndex_Max];
|
||||
/* 00 */ UnkStruct_02011e10_Sub1 *mUnk_00[HeapIndex_Max]; // the pointer seems to match arena lo
|
||||
/* 24 */ unk32 mUnk_24[2];
|
||||
/* 28 */ STRUCT_PAD(0x2C, 0x5C);
|
||||
/* 5C */ unk32 mUnk_5C;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/GameModeManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "regs.h"
|
||||
#include "types.h"
|
||||
@@ -23,23 +24,6 @@ enum TitleScreenState_ {
|
||||
TitleScreenState_Max = 6
|
||||
};
|
||||
|
||||
class TitleScreenManager_Base : public GameModeManagerBase {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 154 */
|
||||
|
||||
TitleScreenManager_Base();
|
||||
|
||||
// data_ov000_020b1d14 vtable
|
||||
/* 08 */ virtual ~TitleScreenManager_Base() override;
|
||||
/* 10 */ virtual void vfunc_10(unk32 param1, unk32 param2, unk32 param3) override;
|
||||
/* 38 */ virtual void vfunc_38();
|
||||
/* 3C */ virtual void vfunc_3C();
|
||||
/* 40 */ virtual void vfunc_40();
|
||||
/* 44 */ virtual void vfunc_44();
|
||||
/* 48 */
|
||||
};
|
||||
|
||||
class TitleScreen_Sub2 : public GameModeLinkListNode {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
@@ -197,11 +181,10 @@ public:
|
||||
class TitleScreenManager : public TitleScreenManager_Base {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 154 */ TitleScreen *mpTitleScreen;
|
||||
/* 158 */
|
||||
|
||||
TitleScreenManager(unk32 param1) NO_INLINE {
|
||||
this->mpTitleScreen = NULL;
|
||||
this->mpGameMode = NULL;
|
||||
GX_SetGraphicsMode(1, 0, 1);
|
||||
GXS_SetGraphicsMode(5);
|
||||
REG_BG3CNT_SUB = (REG_BG3CNT_SUB & 0x0043) | 0x4E14;
|
||||
@@ -217,9 +200,7 @@ public:
|
||||
/* 24 */ virtual void vfunc_24() override;
|
||||
/* 28 */ virtual void vfunc_28(unk8 *param1) override;
|
||||
/* 2C */ virtual void vfunc_2C(unk8 *param1) override;
|
||||
/* 38 */ virtual void vfunc_38() override;
|
||||
/* 38 */ virtual void vfunc_38(unk32 param1, unk32 param2, unk32 param3, unk32 param4) override;
|
||||
|
||||
static TitleScreenManager *Create(unk32 param1);
|
||||
};
|
||||
|
||||
extern TitleScreenManager *data_027e0994;
|
||||
|
||||
+48
-32
@@ -4,6 +4,7 @@
|
||||
#include "System/SysNew.hpp"
|
||||
#include "global.h"
|
||||
#include "nitro/math.h"
|
||||
#include "nns/text.h"
|
||||
#include "types.h"
|
||||
|
||||
extern "C" void func_0201e8d4(void *param1, void *param2);
|
||||
@@ -566,13 +567,15 @@ public:
|
||||
/* 044 */ unk32 mUnk_044;
|
||||
/* 048 */ unk32 mUnk_048;
|
||||
/* 04C */ unk32 mUnk_04C;
|
||||
/* 050 */ STRUCT_PAD(0x50, 0x130);
|
||||
/* 050 */ STRUCT_PAD(0x50, 0x130); // e0
|
||||
|
||||
UnkSystem2_UnkSubSystem5_Base_10();
|
||||
|
||||
// data_ov000_020b20fc (vtable)
|
||||
/* 00 */ virtual ~UnkSystem2_UnkSubSystem5_Base_10();
|
||||
/* 08 */ virtual void vfunc_08();
|
||||
/* 0C */ virtual void vfunc_0C();
|
||||
/* 10 */ virtual void vfunc_10();
|
||||
/* 10 */ virtual void vfunc_10(void *param1);
|
||||
/* 14 */ virtual void vfunc_14();
|
||||
/* 18 */ virtual void vfunc_18();
|
||||
/* 1C */ virtual void vfunc_1C();
|
||||
@@ -590,35 +593,18 @@ public:
|
||||
/* 4C */
|
||||
};
|
||||
|
||||
class UnkSystem2_UnkSubSystem5_Base {
|
||||
public:
|
||||
/* 000 (vtable) */
|
||||
/* 004 */ wchar_t *mpString; // in this context it points to the player's name
|
||||
/* 008 */ unk16 mUnk_008;
|
||||
/* 00A */ unk16 mUnk_00A;
|
||||
/* 00C */ void *mUnk_00C;
|
||||
/* 010 */ UnkSystem2_UnkSubSystem5_Base_10 mUnk_010;
|
||||
|
||||
~UnkSystem2_UnkSubSystem5_Base();
|
||||
|
||||
/* 00 */ virtual void vfunc_00();
|
||||
/* 04 */
|
||||
struct UnkSystem2_UnkSubSystem11_Base_1C {
|
||||
u8 pad[0x10];
|
||||
};
|
||||
|
||||
class UnkSystem2_UnkSubSystem11 {
|
||||
class UnkSystem2_UnkSubSystem11_Base {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 04 */ void *mUnk_04;
|
||||
/* 08 */ unk32 mUnk_08;
|
||||
/* 0C */ unk32 mUnk_0C;
|
||||
/* 10 */ unk32 mUnk_10;
|
||||
/* 14 */ unk32 mUnk_14;
|
||||
/* 18 */ void *mUnk_18;
|
||||
/* 1C */ void *mUnk_1C;
|
||||
/* 20 */
|
||||
/* 04 */ Text_UnkStruct2 mUnk_04;
|
||||
/* 1C */ UnkSystem2_UnkSubSystem11_Base_1C mUnk_1C; // +0x24: space between characters, set from BMG INF1 entry
|
||||
/* 2C */
|
||||
|
||||
void func_ov000_02061f60();
|
||||
~UnkSystem2_UnkSubSystem11();
|
||||
UnkSystem2_UnkSubSystem11_Base(); // func_ov000_02061ce0
|
||||
|
||||
// data_ov000_020b1e9c vtable
|
||||
/* 00 */ virtual void vfunc_00();
|
||||
@@ -627,10 +613,31 @@ public:
|
||||
/* 0C */ virtual void vfunc_0C();
|
||||
};
|
||||
|
||||
// this class seems related to drawing strings?
|
||||
class UnkSystem2_UnkSubSystem5 : public UnkSystem2_UnkSubSystem5_Base {
|
||||
class UnkSystem2_UnkSubSystem11 : public UnkSystem2_UnkSubSystem11_Base {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 00 (base) */
|
||||
/* 2C */ STRUCT_PAD(0x2C, 0xE8);
|
||||
/* E8 */
|
||||
|
||||
UnkSystem2_UnkSubSystem11(); // func_ov000_02061f30
|
||||
~UnkSystem2_UnkSubSystem11();
|
||||
void func_ov000_02061f60();
|
||||
|
||||
// data_ov000_020b1e9c vtable
|
||||
/* 00 */ virtual void vfunc_00() override;
|
||||
/* 04 */ virtual void vfunc_04() override;
|
||||
/* 08 */ virtual void vfunc_08() override;
|
||||
/* 0C */ virtual void vfunc_0C() override;
|
||||
};
|
||||
|
||||
class UnkSystem2_UnkSubSystem5_Base {
|
||||
public:
|
||||
/* 000 (vtable) */
|
||||
/* 004 */ wchar_t *mpString; // in this context it points to the player's name
|
||||
/* 008 */ unk16 mUnk_008; // UnkSystem2_UnkSubSystem5()'s param1
|
||||
/* 00A */ unk16 mUnk_00A; // UnkSystem2_UnkSubSystem5()'s param2
|
||||
/* 00C */ void *mUnk_00C;
|
||||
/* 010 */ UnkSystem2_UnkSubSystem5_Base_10 mUnk_010;
|
||||
/* 130 */ STRUCT_PAD(0x130, 0x140);
|
||||
/* 140 */ unk16 mUnk_140;
|
||||
/* 142 */ unk16 mUnk_142;
|
||||
@@ -641,12 +648,21 @@ public:
|
||||
/* 14D */ unk8 mUnk_14D; // 0x545
|
||||
/* 14E */ unk8 mUnk_14E; // 0x546
|
||||
/* 14F */ unk8 mUnk_14F; // 0x547
|
||||
|
||||
UnkSystem2_UnkSubSystem5_Base(UnkSystem2_UnkSubSystem11 *param1, unk32 param2, unk32 param3); // func_0201f288
|
||||
~UnkSystem2_UnkSubSystem5_Base();
|
||||
|
||||
/* 00 */ virtual void vfunc_00();
|
||||
/* 04 */
|
||||
};
|
||||
|
||||
// this class seems related to drawing strings?
|
||||
class UnkSystem2_UnkSubSystem5 : public UnkSystem2_UnkSubSystem5_Base {
|
||||
public:
|
||||
/* 000 (base) */
|
||||
/* 150 */ UnkSystem2_UnkSubSystem11 mUnk_150;
|
||||
/* 170 */ void *mUnk_170;
|
||||
/* 144 */ STRUCT_PAD(0x174, 0x238);
|
||||
/* 238 */
|
||||
|
||||
UnkSystem2_UnkSubSystem5() {}
|
||||
UnkSystem2_UnkSubSystem5(unk32 param1, unk32 param2);
|
||||
~UnkSystem2_UnkSubSystem5() {}
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/GameMode.hpp"
|
||||
#include "Game/GameModeStartUp.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class GameModeFileSelect;
|
||||
|
||||
class UnkStruct_02049a2c_1C {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 04 */
|
||||
|
||||
UnkStruct_02049a2c_1C();
|
||||
|
||||
// data_020437d8 vtable
|
||||
/* 00 */ virtual ~UnkStruct_02049a2c_1C();
|
||||
/* 08 */ virtual void vfunc_08();
|
||||
};
|
||||
|
||||
class UnkStruct_02049a2c {
|
||||
public:
|
||||
/* 00 */ GameModeBase *mUnk_00;
|
||||
/* 04 */ void *mUnk_04;
|
||||
/* 08 */ unk32 mUnk_08;
|
||||
/* 0C */ unk32 mUnk_0C;
|
||||
/* 10 */ unk32 mUnk_10;
|
||||
/* 14 */ unk32 mUnk_14;
|
||||
/* 18 */ unk32 mUnk_18;
|
||||
/* 1C */ UnkStruct_02049a2c_1C mUnk_1C;
|
||||
/* 20 */ unk32 mUnk_20;
|
||||
/* 24 */ STRUCT_PAD(0x24, 0xE8);
|
||||
/* E8 */
|
||||
|
||||
UnkStruct_02049a2c();
|
||||
|
||||
void Run(void);
|
||||
void func_02013370(unk32 param1);
|
||||
bool func_02013724(void *param1);
|
||||
|
||||
void func_ov018_020c48a4(unk32 param1);
|
||||
void func_ov018_020c48f8(); // loads overlay 0
|
||||
|
||||
GameModeFileSelect *GetUnk00_FileSelect() {
|
||||
return (GameModeFileSelect *) this->mUnk_00;
|
||||
}
|
||||
|
||||
static GameModeStartUp *func_ov018_020c4ba8();
|
||||
};
|
||||
|
||||
extern UnkStruct_02049a2c data_02049a2c;
|
||||
@@ -24,6 +24,9 @@ public:
|
||||
|
||||
UnkStruct_02049b18();
|
||||
~UnkStruct_02049b18();
|
||||
void func_02013768();
|
||||
void func_02013840(u16 param1, unk32 param2);
|
||||
void func_020138f4(unk32 param1);
|
||||
};
|
||||
|
||||
extern UnkStruct_02049b18 data_02049b18;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_02049b74 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
|
||||
UnkStruct_02049b74();
|
||||
~UnkStruct_02049b74();
|
||||
void func_02013a44(unk32 param1);
|
||||
};
|
||||
|
||||
extern UnkStruct_02049b74 data_02049b74;
|
||||
@@ -10,6 +10,7 @@ public:
|
||||
|
||||
void func_02014c60(unk32 param1);
|
||||
void func_02014cdc(unk32 param1);
|
||||
void func_02014d98();
|
||||
};
|
||||
|
||||
extern UnkStruct_02049bd4 data_02049bd4;
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/GameMode.hpp"
|
||||
#include "Game/GameModeManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "Unknown/UnkStruct_ov000_02067bc4.hpp"
|
||||
#include "types.h"
|
||||
|
||||
class GameModeFileSelect;
|
||||
|
||||
class UnkStruct_0204a060_Base3 : public SysObject {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
@@ -64,13 +67,13 @@ public:
|
||||
class UnkStruct_0204a060 : public UnkStruct_0204a060_Base {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 24 */ void *callback; //! TODO: is it a PTMF?
|
||||
/* 24 */ GameModeCreateCallback createCallback;
|
||||
|
||||
UnkStruct_0204a060();
|
||||
|
||||
void func_020183c0(void);
|
||||
bool func_020183d4(bool param1, void *param2, unk32 param3);
|
||||
static void func_02018424(void); //! TODO: is it a PTMF?
|
||||
bool func_020183d4(bool param1, GameModeCreateCallback createFunc, unk32 param3);
|
||||
static GameModeFileSelect *func_02018424(void);
|
||||
|
||||
// data_02044048 vtable
|
||||
/* 00 */ virtual ~UnkStruct_0204a060() override;
|
||||
|
||||
@@ -13,18 +13,20 @@ public:
|
||||
~UnkStruct_0204a088_Base(); //! TODO: most likely inlined but can't make it work for some reasons
|
||||
};
|
||||
|
||||
// members 00 04 and 08 are used in data_ov000_020b1d74 to figure out which overlay to load next in slot 1
|
||||
class UnkStruct_0204a088 : public UnkStruct_0204a088_Base {
|
||||
public:
|
||||
/* 000 */ unk32 mUnk_00;
|
||||
/* 000 */ unk32 mUnk_04;
|
||||
/* 000 */ unk32 mUnk_08;
|
||||
/* 00C */ FileSelectManager_UnkDrawBase mUnk_0C[23];
|
||||
/* 000 */ unk32 mUnk_00; // current index
|
||||
/* 000 */ unk32 mUnk_04; // prev index
|
||||
/* 000 */ unk32 mUnk_08; // next index
|
||||
/* 00C */ FileSelectManager_UnkDrawBase mUnk_0C[23]; // 23 possible overlays
|
||||
/* 120 */ u16 mUnk_120;
|
||||
/* 122 */ unk16 mUnk_122;
|
||||
/* 123 */ unk8 mUnk_123;
|
||||
|
||||
void func_ov000_02061098(void);
|
||||
void func_ov000_020611dc(void *param1, unk32 param2);
|
||||
void func_ov000_020611fc(unk32 param2);
|
||||
void func_ov000_020611fc(unk32 param2); // sets new index
|
||||
void func_ov000_02061224(void);
|
||||
void func_ov000_02061230(void);
|
||||
void func_ov000_02061248(void);
|
||||
|
||||
@@ -175,7 +175,8 @@ public:
|
||||
class UnkStruct_0204a110 {
|
||||
public:
|
||||
/* 000 */ unk32 mUnk_000;
|
||||
/* 004 */ unk32 mUnk_004;
|
||||
/* 004 */ u16 mUnk_004;
|
||||
/* 004 */ unk16 mUnk_006;
|
||||
/* 008 */ unk32 mUnk_008;
|
||||
/* 00C */ unk32 mUnk_00C;
|
||||
/* 010 */ UnkStruct_0204a110_Sub2 mUnk_010;
|
||||
@@ -216,6 +217,12 @@ public:
|
||||
void func_020195a0(const char *param1, unk32 param2, unk32 param3, unk32 param4);
|
||||
void func_0201967c(unk32 param2, unk32 param3, unk32 param4, unk32 param5, unk32 param6);
|
||||
void func_02019538(unk32 param1, unk32 param2);
|
||||
unk32 func_02019300(unk32 param1);
|
||||
void func_02019350();
|
||||
void func_020194dc();
|
||||
void func_02019408();
|
||||
void func_02019454();
|
||||
unk32 func_02019514();
|
||||
|
||||
void func_ov001_020bd514(unk32 param1, void *param2, unk32 param3, unk32 param4);
|
||||
void func_ov001_020bd58c(void);
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
/* 06 */ unk16 mUnk_06;
|
||||
/* 08 */ unk16 mUnk_08;
|
||||
/* 0A */ unk8 mUnk_0A;
|
||||
/* 0B */ unk8 mUnk_0B;
|
||||
/* 0B */ u8 mUnk_0B; // bool?
|
||||
/* 0C */ unk8 mUnk_0C;
|
||||
/* 0D */ unk8 mUnk_0D;
|
||||
/* 0E */ unk8 mUnk_0E;
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
|
||||
UnkStruct_0204e64c();
|
||||
~UnkStruct_0204e64c();
|
||||
void func_020201c4(unk32 param1);
|
||||
};
|
||||
|
||||
extern UnkStruct_0204e64c data_0204e64c;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_027e0208 {
|
||||
public:
|
||||
/* 000 */ unk32 mUnk_000;
|
||||
/* 004 */ STRUCT_PAD(0x04, 0xE0);
|
||||
/* 0E0 */ unk32 mUnk_0E0;
|
||||
/* 0E4 */ unk32 mUnk_0E4;
|
||||
/* 0E8 */ unk32 mUnk_0E8;
|
||||
/* 0EC */ unk32 mUnk_0EC;
|
||||
/* 0F0 */ unk32 mUnk_0F0;
|
||||
/* 0F4 */ unk32 mUnk_0F4;
|
||||
/* 0F4 */ unk32 mUnk_0F8;
|
||||
/* 0F4 */ unk32 mUnk_0FC;
|
||||
|
||||
UnkStruct_027e0208();
|
||||
~UnkStruct_027e0208();
|
||||
};
|
||||
|
||||
extern UnkStruct_027e0208 data_027e0208;
|
||||
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item/ItemManager.hpp"
|
||||
#include "Player/Player.hpp"
|
||||
#include "Player/TouchControl.hpp"
|
||||
#include "global.h"
|
||||
#include "nitro/button.h"
|
||||
|
||||
// incomplete
|
||||
class UnkStruct_027e0478 {
|
||||
public:
|
||||
/* 000 */ void *mUnk_000; // set to -1 on land and to a pointer on train?
|
||||
/* 004 */ void *mUnk_004;
|
||||
/* 008 */ ItemManager *mpItemManager;
|
||||
/* 00C */ Input mButtons;
|
||||
/* 012 */ unk16 mUnk_012;
|
||||
/* 014 */ TouchControl mTouchControl;
|
||||
/* 036 */ STRUCT_PAD(0x36, 0xF0);
|
||||
/* 0F0 */ unk32 mUnk_0F0; // seems to be the walking speed of link??
|
||||
/* 0F4 */ unk32 mUnk_0F4;
|
||||
/* 0F8 */ unk32 mUnk_0F8;
|
||||
/* 0FC */ unk32 mUnk_0FC;
|
||||
/* 100 */ unk32 mUnk_100;
|
||||
/* 104 */ unk8 mUnk_104;
|
||||
/* 105 */ unk8 mUnk_105; // set to 0 on idle, set to 3 when pulling out an item
|
||||
/* 106 */ unk8 mUnk_106;
|
||||
/* 107 */ unk8 mUnk_107;
|
||||
/* 108 */ void *mUnk_108; // vtable
|
||||
/* 10C */ void *mUnk_10C; // linklist?
|
||||
/* 110 */ void *mUnk_110;
|
||||
/* 114 */ STRUCT_PAD(0x114, 0x154);
|
||||
/* 154 */ PlayerActor mPlayer;
|
||||
};
|
||||
|
||||
extern UnkStruct_027e0478 data_027e0478;
|
||||
@@ -1,9 +1,144 @@
|
||||
#pragma once
|
||||
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_0204a060.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
naming scheme:
|
||||
- test_xxx: debug area
|
||||
- e3_xxx: E3 demo area
|
||||
- t_xxx: "T" for "Train" -> overworld area
|
||||
- d_xxx: "D" for "Dungeon" -> dungeon area
|
||||
- b_xxx: "B" for "Boss" -> dungeon boss area
|
||||
- f_xxx: "F" for "Field" -> normal gameplay area (also known as a "land" area)
|
||||
*/
|
||||
enum SceneIndex {
|
||||
/* 0 */ SceneIndex_test_trn = 0x00, //
|
||||
/* 1 */ SceneIndex_test_trn2 = 0x01, //
|
||||
/* 2 */ SceneIndex_test_pre = 0x02, //
|
||||
/* 3 */ SceneIndex_test_iwa = 0x03, //
|
||||
/* 4 */ SceneIndex_t_area0 = 0x04, // Forest Realm
|
||||
/* 5 */ SceneIndex_t_area1 = 0x05, // Snow Realm
|
||||
/* 6 */ SceneIndex_t_area2 = 0x06, // Ocean Realm
|
||||
/* 7 */ SceneIndex_t_area3 = 0x07, // Fire Realm
|
||||
/* 8 */ SceneIndex_t_tutorial = 0x08, //
|
||||
/* 9 */ SceneIndex_t_forest = 0x09, //
|
||||
/* 10 */ SceneIndex_t_smarine = 0x0A, //
|
||||
/* 11 */ SceneIndex_t_smount = 0x0B, // rocktite scene?
|
||||
/* 12 */ SceneIndex_t_smount2 = 0x0C, // rocktite scene?
|
||||
/* 13 */ SceneIndex_t_smount3 = 0x0D, // rocktite fire realm scene?
|
||||
/* 14 */ SceneIndex_t_minigame = 0x0E, // goron target range minigame
|
||||
/* 15 */ SceneIndex_t_dark = 0x0F, // Dark Realm
|
||||
/* 16 */ SceneIndex_t_eviltrain = 0x10, // train cole fight
|
||||
/* 17 */ SceneIndex_t_eviltrain2 = 0x11, // same as above
|
||||
/* 18 */ SceneIndex_t_eviltrain3 = 0x12, // same as above
|
||||
/* 19 */ SceneIndex_d_main = 0x13, // Tower Of Spirits
|
||||
/* 20 */ SceneIndex_d_main_f = 0x14, // ToS base
|
||||
/* 21 */ SceneIndex_d_main_s = 0x15, // ToS top stairs
|
||||
/* 22 */ SceneIndex_d_main_a = 0x16, // ToS altar
|
||||
/* 23 */ SceneIndex_d_main_w = 0x17, // ToS inner Stairs
|
||||
/* 24 */ SceneIndex_d_tutorial = 0x18, // Tunnel to ToS
|
||||
/* 25 */ SceneIndex_d_forest = 0x19, // Forest Temple
|
||||
/* 26 */ SceneIndex_d_snow26 = 0x1A, // Snow Temple
|
||||
/* 27 */ SceneIndex_d_water27 = 0x1B, // Water Temple
|
||||
/* 28 */ SceneIndex_d_flame = 0x1C, // Fire Temple
|
||||
/* 29 */ SceneIndex_d_sand = 0x1D, // Sand Temple
|
||||
/* 30 */ SceneIndex_b_forest = 0x1E, // Stagnox
|
||||
/* 31 */ SceneIndex_b_snow = 0x1F, // Fraaz
|
||||
/* 32 */ SceneIndex_b_water = 0x20, // Phytops
|
||||
/* 33 */ SceneIndex_b_flame = 0x21, // Cragma
|
||||
/* 34 */ SceneIndex_b_sand = 0x22, // Skeldritch
|
||||
/* 35 */ SceneIndex_b_deago = 0x23, // Byrne
|
||||
/* 36 */ SceneIndex_b_last1 = 0x24, // demon zelda train
|
||||
/* 37 */ SceneIndex_b_last2 = 0x25, // malladus beast 1
|
||||
/* 38 */ SceneIndex_b_last22 = 0x26, // malladus song
|
||||
/* 39 */ SceneIndex_b_last23 = 0x27, // mallasdus beast 2
|
||||
/* 40 */ SceneIndex_f_hyral = 0x28, // hyrule castle
|
||||
/* 41 */ SceneIndex_f_htown = 0x29, // castle town
|
||||
/* 42 */ SceneIndex_f_forest1 = 0x2A, // Whittleton
|
||||
/* 43 */ SceneIndex_f_snow = 0x2B, // Anouki Village
|
||||
/* 44 */ SceneIndex_f_water = 0x2C, // Papuchia Village
|
||||
/* 45 */ SceneIndex_f_flame = 0x2D, // Goron Village
|
||||
/* 46 */ SceneIndex_f_flame5 = 0x2E,
|
||||
/* 47 */ SceneIndex_f_first = 0x2F, // Aboda Village
|
||||
/* 48 */ SceneIndex_f_forest2 = 0x30, // Forest Sanctuary
|
||||
/* 49 */ SceneIndex_f_snow2 = 0x31, // Snow Sanctuary
|
||||
/* 50 */ SceneIndex_f_water2 = 0x32, // Water Sanctuary
|
||||
/* 51 */ SceneIndex_f_flame2 = 0x33, // Fire Sanctuary
|
||||
/* 52 */ SceneIndex_f_sand = 0x34, // Sand Sanctuary
|
||||
/* 53 */ SceneIndex_f_tetsuo = 0x35, // Icy Spring
|
||||
/* 54 */ SceneIndex_f_bridge = 0x36, // Bridge Worker's House
|
||||
/* 55 */ SceneIndex_f_bridge2 = 0x37, // Trading Post
|
||||
/* 56 */ SceneIndex_f_forest3 = 0x38, // whittleton forest
|
||||
/* 57 */ SceneIndex_f_water3 = 0x39, // papuchia south
|
||||
/* 58 */ SceneIndex_f_ajito = 0x3A, // Pirate Hideout
|
||||
/* 59 */ SceneIndex_f_ajito2 = 0x3B, // same as above
|
||||
/* 60 */ SceneIndex_f_flame3 = 0x3C, // Goron Target Range
|
||||
/* 61 */ SceneIndex_f_flame4 = 0x3D, // Dark Ore Mine
|
||||
/* 62 */ SceneIndex_f_rabbit = 0x3E, // Rabbit Haven
|
||||
/* 63 */ SceneIndex_f_kakushi1 = 0x3F, // Snowdrift Station
|
||||
/* 64 */ SceneIndex_f_kakushi2 = 0x40, // Disorientation Station
|
||||
/* 65 */ SceneIndex_f_kakushi3 = 0x41, // Ends of the Earth Station
|
||||
/* 66 */ SceneIndex_f_kakushi4 = 0x42, // train required?
|
||||
/* 67 */ SceneIndex_f_pirate = 0x43, // Train passenger pirate attack (including Carben)
|
||||
/* 68 */ SceneIndex_f_passenger = 0x44, // Anjean force gem
|
||||
/* 69 */ SceneIndex_f_trnnpc = 0x45, // Ferrus encounter
|
||||
/* 70 */ SceneIndex_tekiya00 = 0x46, // take em all on?
|
||||
/* 71 */ SceneIndex_tekiya01 = 0x47, // take em all on?
|
||||
/* 72 */ SceneIndex_tekiya02 = 0x48, // take em all on?
|
||||
/* 73 */ SceneIndex_tekiya03 = 0x49, // take em all on?
|
||||
/* 74 */ SceneIndex_tekiya04 = 0x4A, // take em all on?
|
||||
/* 75 */ SceneIndex_tekiya05 = 0x4B, // take em all on?
|
||||
/* 76 */ SceneIndex_tekiya06 = 0x4C, // take em all on?
|
||||
/* 77 */ SceneIndex_tekiya07 = 0x4D, // take em all on?
|
||||
/* 78 */ SceneIndex_tekiya08 = 0x4E, // take em all on?
|
||||
/* 79 */ SceneIndex_tekiya09 = 0x4F, // take em all on?
|
||||
/* 80 */ SceneIndex_demo_train = 0x50, // title screen?
|
||||
/* 81 */ SceneIndex_e3_train = 0x51, // ?
|
||||
/* 82 */ SceneIndex_e3_dungeon = 0x52, // ?
|
||||
/* 83 */ SceneIndex_e3_boss = 0x53, // forest temple boss
|
||||
/* 84 */ SceneIndex_e3_bossm = 0x54, // fake forest temple room
|
||||
/* 85 */ SceneIndex_e3_smount = 0x55, // ?
|
||||
/* 86 */ SceneIndex_test_hiratsu = 0x56, // ?
|
||||
/* 87 */ SceneIndex_test_sik = 0x57, // ?
|
||||
/* 88 */ SceneIndex_test_fuj = 0x58, // ?
|
||||
/* 89 */ SceneIndex_test_nit = 0x59, // ?
|
||||
/* 90 */ SceneIndex_test_mri = 0x5A, // ?
|
||||
/* 91 */ SceneIndex_test_morita = 0x5B, // ?
|
||||
/* 92 */ SceneIndex_test_yamaz = 0x5C, // ?
|
||||
/* 93 */ SceneIndex_test_sako = 0x5D, // ?
|
||||
/* 94 */ SceneIndex_test_kita = 0x5E, // ?
|
||||
/* 95 */ SceneIndex_test_take = 0x5F, // ?
|
||||
/* 96 */ SceneIndex_test_suzuki = 0x60, // ?
|
||||
/* 97 */ SceneIndex_test_okane = 0x61, // ?
|
||||
/* 98 */ SceneIndex_test_dera = 0x62, // ?
|
||||
/* 99 */ SceneIndex_test_hosaka = 0x63, // ?
|
||||
/* 100 */ SceneIndex_test_hosaka_f = 0x64, // ?
|
||||
/* 101 */ SceneIndex_test_kato = 0x65, // ?
|
||||
/* 102 */ SceneIndex_test_okane_f = 0x66, // ?
|
||||
/* 103 */ SceneIndex_test_yamaz_f = 0x67, // ?
|
||||
/* 104 */ SceneIndex_test_sako_f = 0x68, // ?
|
||||
/* 105 */ SceneIndex_test_take_f = 0x69, // ?
|
||||
/* 106 */ SceneIndex_test_kiuchi = 0x6A, // ?
|
||||
/* 107 */ SceneIndex_test_dera_f = 0x6B, // ?
|
||||
/* 108 */ SceneIndex_test_slope = 0x6C, // ?
|
||||
/* 109 */ SceneIndex_battle01 = 0x6D, // battle mode?
|
||||
/* 110 */ SceneIndex_battle02 = 0x6E, // battle mode?
|
||||
/* 111 */ SceneIndex_battle03 = 0x6F, // battle mode?
|
||||
/* 112 */ SceneIndex_battle04 = 0x70, // battle mode?
|
||||
/* 113 */ SceneIndex_battle05 = 0x71, // battle mode?
|
||||
/* 114 */ SceneIndex_battle06 = 0x72, // battle mode?
|
||||
/* 115 */ SceneIndex_battle07 = 0x73, // battle mode?
|
||||
/* 116 */ SceneIndex_battle08 = 0x74, // battle mode?
|
||||
/* 117 */ SceneIndex_battle09 = 0x75, // battle mode?
|
||||
/* 118 */ SceneIndex_battle10 = 0x76, // battle mode?
|
||||
/* 119 */ SceneIndex_battle11 = 0x77, // battle mode?
|
||||
/* 120 */ SceneIndex_battle12 = 0x78, // battle mode?
|
||||
/* 121 */ SceneIndex_Max = 0x79
|
||||
};
|
||||
|
||||
struct UnkStruct_027e09a4_58_78 {
|
||||
unk32 mUnk_00;
|
||||
unk32 mUnk_04;
|
||||
@@ -22,31 +157,89 @@ struct UnkStruct_func_01ffd400 {
|
||||
/* 1B */ u8 mUnk_1B;
|
||||
};
|
||||
|
||||
struct UnkStruct_SceneChange1 {
|
||||
/* 00 */ unk32 nextSceneIndex;
|
||||
/* 04 */ unk32 mUnk_04;
|
||||
/* 08 */ unk16 mUnk_08;
|
||||
/* 0A */ unk8 mUnk_0A;
|
||||
/* 0B */ unk8 mUnk_0B;
|
||||
/* 0C */ unk8 mUnk_0C;
|
||||
/* 0D */ unk8 mUnk_0D;
|
||||
/* 0E */ unk8 mUnk_0E;
|
||||
/* 0F */ unk8 mUnk_0F;
|
||||
/* 10 */ unk8 mUnk_10;
|
||||
/* 11 */ unk8 mUnk_11;
|
||||
/* 12 */ unk8 mUnk_12;
|
||||
/* 13 */ unk8 mUnk_13;
|
||||
/* 14 */
|
||||
|
||||
UnkStruct_SceneChange1() {
|
||||
this->nextSceneIndex = SceneIndex_Max;
|
||||
this->mUnk_04 = 0;
|
||||
this->mUnk_08 = 0;
|
||||
this->mUnk_0A = 0xFF;
|
||||
this->mUnk_0B = 0;
|
||||
this->mUnk_0C = 0;
|
||||
this->mUnk_0D = 0;
|
||||
this->mUnk_0E = 0x2B;
|
||||
this->mUnk_0F = 0;
|
||||
this->mUnk_10 = 0;
|
||||
}
|
||||
};
|
||||
|
||||
class UnkStruct_WarpUnk1 : public UnkStruct_0204a060_Base {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 24 */ STRUCT_PAD(0x24, 0x78);
|
||||
/* 78 */ UnkStruct_SceneChange1 mUnk_78;
|
||||
/* 8C */ unk32 mNextSceneIndex;
|
||||
/* 90 */ STRUCT_PAD(0x90, 0xB4);
|
||||
/* B4 */ unk32
|
||||
mSpawnTransitionType; // the behavior of Link when entering a new scene (walk from the entrance, stay still etc)
|
||||
};
|
||||
|
||||
class UnkStruct_027e09a4 : public SysObject {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 00 */ unk32 mSceneIndex; // the scene index of the current area, this isn't saved when you save the game
|
||||
/* 04 */ unk32 mUnk_04;
|
||||
/* 08 */ unk32 mUnk_08;
|
||||
/* 0C */ u8 mUnk_0C;
|
||||
/* 0D */ STRUCT_PAD(0x0D, 0x60);
|
||||
/* 0D */ unk8 mUnk_0D;
|
||||
/* 0E */ unk8 mUnk_0E;
|
||||
/* 0F */ unk8 mUnk_0F;
|
||||
/* 10 */ unk32 *mUnk_10;
|
||||
/* 14 */ unk32 mSavedSceneIndex;
|
||||
/* 18 */ unk32 mUnk_18;
|
||||
/* 1C */ unk8 mUnk_1C;
|
||||
/* 1D */ unk8 mUnk_1D;
|
||||
/* 1E */ unk8 mSavedHouseIndex; // this changes when you enter a house, it's not clear if it has another purpose yet
|
||||
/* 1F */ unk8 mSavedSpawnIndex; // changing this then saving will change your spawn location after opening the save again
|
||||
// (not the area)
|
||||
/* 20 */ unk32 mUnk_20;
|
||||
/* 24 */ STRUCT_PAD(0x24, 0x54);
|
||||
/* 54 */ void *mUnk_54; // vtable
|
||||
/* 58 */ UnkStruct_WarpUnk1 *mpWarpUnk1;
|
||||
/* 5C */ unk32 mUnk_5C;
|
||||
/* 60 */ unk32 mUnk_60;
|
||||
/* 64 */ unk32 mUnk_64;
|
||||
/* 68 */
|
||||
|
||||
bool UnkCheck(unk32 value) {
|
||||
switch (value) {
|
||||
case 0x03:
|
||||
case 0x13:
|
||||
case 0x42:
|
||||
case 0x5A:
|
||||
case 0x5B:
|
||||
case 0x5D:
|
||||
case 0x63:
|
||||
bool UnkCheck(unk32 sceneIndex) {
|
||||
switch (sceneIndex) {
|
||||
case SceneIndex_test_iwa:
|
||||
case SceneIndex_d_main:
|
||||
case SceneIndex_f_kakushi4:
|
||||
case SceneIndex_test_mri:
|
||||
case SceneIndex_test_morita:
|
||||
case SceneIndex_test_sako:
|
||||
case SceneIndex_test_hosaka:
|
||||
return true;
|
||||
case 0x5C:
|
||||
case 0x5E:
|
||||
case 0x5F:
|
||||
case 0x60:
|
||||
case 0x61:
|
||||
case 0x62:
|
||||
case SceneIndex_test_yamaz:
|
||||
case SceneIndex_test_kita:
|
||||
case SceneIndex_test_take:
|
||||
case SceneIndex_test_suzuki:
|
||||
case SceneIndex_test_okane:
|
||||
case SceneIndex_test_dera:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
/* 03 */ unk8 mUnk_03;
|
||||
/* 04 */ unk32 *mUnk_04;
|
||||
/* 08 */ unk32 *mUnk_08;
|
||||
/* 0c */ unk32 *mUnk_0c;
|
||||
/* 0c */ unk32 *mUnk_0c; // vtable
|
||||
/* 10 */ unk32 *mUnk_10;
|
||||
/* 14 */ unk32 *mUnk_14;
|
||||
/* 18 */ unk32 *mUnk_18;
|
||||
|
||||
@@ -10,11 +10,11 @@ public:
|
||||
|
||||
class UnkStruct_027e0ce8 {
|
||||
public:
|
||||
/* 00 */ unk32 mUnk_00;
|
||||
/* 04 */ unk32 mUnk_04;
|
||||
/* 00 */ void *mUnk_00; // pointer to polygon list?
|
||||
/* 04 */ void *mUnk_04; // pointer to the end of that list
|
||||
/* 08 */ UnkStruct_func_01fff520_ret **mUnk_08;
|
||||
|
||||
UnkStruct_func_01fff520_ret **func_01fff520(UnkStruct_ov000_020b34c4 *param1, unk32);
|
||||
UnkStruct_func_01fff520_ret **func_01fff520(UnkStruct_ov000_020b34c4 *param1, void *);
|
||||
unk32 func_01fff498(UnkStruct_ov000_0208f820_04 param1);
|
||||
};
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
/* 004 */ GameModeManagerBase_004 *mUnk_004;
|
||||
/* 008 */ UnkStruct_ov000_02067bc4_Sub2 *mUnk_008;
|
||||
/* 00C */ UnkStruct_ov000_020b504c_Sub4 mUnk_00C[7];
|
||||
/* 028 */ unk32 mUnk_028;
|
||||
/* 028 */ unk32 mUnk_028; // pointer to the subsystem that handles drawing the textboxes
|
||||
/* 02C */ unk32 mUnk_02C;
|
||||
/* 030 */ unk32 mUnk_030;
|
||||
/* 034 */ Input mButtons;
|
||||
|
||||
@@ -1,32 +1,82 @@
|
||||
#pragma once
|
||||
|
||||
#include "System/SysNew.hpp"
|
||||
#include "nns/font.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_ov000_020b4f84_00_Base : public SysObject {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
|
||||
// data_02043f08 vtable
|
||||
/* 00 */ virtual ~UnkStruct_ov000_020b4f84_00_Base();
|
||||
/* 08 */ virtual void vfunc_08();
|
||||
/* 0C */ virtual void vfunc_0C();
|
||||
/* 10 */ virtual void vfunc_10();
|
||||
enum {
|
||||
FontIndex_DSZ2_msg = 0,
|
||||
FontIndex_LC_Font_s = 1, // unused?
|
||||
FontIndex_DSZ2_endL = 2,
|
||||
FontIndex_DSZ2_endS = 3,
|
||||
FontIndex_04 = 4,
|
||||
FontIndex_LC_Font_s_Name = 5,
|
||||
FontIndex_Max = 6
|
||||
};
|
||||
|
||||
class UnkStruct_ov000_020b4f84_00_Base2 {
|
||||
public:
|
||||
/* 00 (vtable) */
|
||||
/* 04 */ void *mUnk_04;
|
||||
/* 08 */ union {
|
||||
void *mpFile;
|
||||
void *volatile mpFile2;
|
||||
};
|
||||
/* 0C */ size_t mFileSize;
|
||||
/* 10 */ HeapIndex16 mHeapIndex;
|
||||
|
||||
UnkStruct_ov000_020b4f84_00_Base2() {}
|
||||
UnkStruct_ov000_020b4f84_00_Base2(void *param1, unk32 param2) :
|
||||
mUnk_04(param1),
|
||||
mpFile(NULL),
|
||||
mFileSize(0),
|
||||
mHeapIndex(param2) {}
|
||||
|
||||
/* 00 */ virtual ~UnkStruct_ov000_020b4f84_00_Base2() {}
|
||||
/* 08 */ virtual void *vfunc_08(unk32 param1); // file open?
|
||||
/* 0C */ virtual void vfunc_0C(void); // allocate?
|
||||
/* 10 */ virtual size_t vfunc_10(unk32 param1);
|
||||
};
|
||||
|
||||
// file handler? doesn't seem to be specifically tied to fonts
|
||||
class UnkStruct_ov000_020b4f84_00_Base : public UnkStruct_ov000_020b4f84_00_Base2 {
|
||||
public:
|
||||
/* 12 */ unk8 mUnk_12;
|
||||
/* 13 */ unk8 mUnk_13;
|
||||
/* 14 */
|
||||
|
||||
UnkStruct_ov000_020b4f84_00_Base();
|
||||
UnkStruct_ov000_020b4f84_00_Base(void *param1, unk32 param2, unk32 param3, u8 param4);
|
||||
|
||||
// data_02043f08 vtable
|
||||
/* 00 */ virtual ~UnkStruct_ov000_020b4f84_00_Base() override;
|
||||
/* 08 */ virtual void *vfunc_08(unk32 param1) override;
|
||||
/* 0C */ virtual void vfunc_0C(void) override;
|
||||
/* 10 */ virtual size_t vfunc_10(unk32 param1) override;
|
||||
|
||||
void func_02015528();
|
||||
void func_0201552c();
|
||||
unk32 func_02015534();
|
||||
};
|
||||
|
||||
// FontEntry?
|
||||
class UnkStruct_ov000_020b4f84_00 : public UnkStruct_ov000_020b4f84_00_Base {
|
||||
public:
|
||||
/* 00 (base) */
|
||||
/* 04 */ unk8 mUnk_04[0x1C];
|
||||
/* 14 */ Font_UnkStruct1 mUnk_14;
|
||||
/* 1C */ unk16 mUnk_1C;
|
||||
/* 1E */ unk16 mUnk_1E;
|
||||
/* 20 */
|
||||
|
||||
UnkStruct_ov000_020b4f84_00();
|
||||
~UnkStruct_ov000_020b4f84_00();
|
||||
void func_ov000_02066610(const char *fontPath, unk32 param2, unk32 param3);
|
||||
};
|
||||
|
||||
// FontManager?
|
||||
class UnkStruct_ov000_020b4f84 {
|
||||
public:
|
||||
/* 00 */ UnkStruct_ov000_020b4f84_00 mUnk_00[6];
|
||||
/* 00 */ UnkStruct_ov000_020b4f84_00 mUnk_00[FontIndex_Max];
|
||||
/* C0 */ unk16 mUnk_C0;
|
||||
/* C2 */ unk16 mUnk_C2;
|
||||
|
||||
@@ -34,4 +84,5 @@ public:
|
||||
void func_ov000_0206667c(unk32 param1, unk32 param2);
|
||||
};
|
||||
|
||||
// gFontManager?
|
||||
extern UnkStruct_ov000_020b4f84 data_ov000_020b4f84;
|
||||
|
||||
@@ -47,12 +47,13 @@ public:
|
||||
|
||||
void func_ov000_02069d3c(unk32 param1);
|
||||
void func_ov000_02069d7c(void);
|
||||
void func_ov000_02069f58(void);
|
||||
unk32 func_ov000_0206a5d8(unk32 param1);
|
||||
void func_ov000_0206a6a4(unk32 param1);
|
||||
void func_ov000_0206a758(void);
|
||||
void func_ov000_0206a77c(void);
|
||||
void func_ov001_020bd8ac(void);
|
||||
|
||||
void func_ov001_020bd8ac(void);
|
||||
void func_ov001_020bd8dc(void);
|
||||
|
||||
UnkStruct_ov018_020c5ac0 *func_ov018_020c5718(void);
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
void func_ov000_0206d6b4(unk32 param1, unk32 param2);
|
||||
void func_ov000_0206d83c(unk32 param1);
|
||||
void func_ov000_0206db44(unk32 param1);
|
||||
void func_ov000_0206db44(unk32 param1); // play sfx?
|
||||
};
|
||||
|
||||
extern UnkStruct_ov000_020b5214 data_ov000_020b5214;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
class UnkStruct_ov024_020d86b0 {
|
||||
public:
|
||||
/* 00 */ STRUCT_PAD(0x00, 0x7E);
|
||||
/* 7E */ s8 mNumPostcards; // current amount of postcards
|
||||
/* 7F */ s8 mNumPostedCards; // current amount of posted postcards
|
||||
/* 80 */ STRUCT_PAD(0x80, 0x90);
|
||||
/* 90 */
|
||||
};
|
||||
|
||||
extern UnkStruct_ov024_020d86b0 *data_ov024_020d86b0;
|
||||
+2
-2
@@ -26,9 +26,8 @@
|
||||
#define SBSS_BEGIN _Pragma("section sbss begin")
|
||||
#define SBSS_END _Pragma("section sbss end")
|
||||
|
||||
#define NO_INLINE __attribute__((never_inline))
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#define NO_INLINE __attribute__((never_inline))
|
||||
#define AT_ADDRESS(xyz) : (xyz)
|
||||
#define DECL_SECTION(x) __declspec(section x)
|
||||
#define EXPORT __declspec(export)
|
||||
@@ -40,6 +39,7 @@
|
||||
#define EXPORT
|
||||
#define WEAK
|
||||
#define ASM
|
||||
#define NO_INLINE
|
||||
#endif
|
||||
|
||||
#define STRUCT_PAD(from, to) unsigned char _pad_##from[(to) - (from)]
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#define BTN_DDOWN (1 << 7) // 0x0080
|
||||
#define BTN_R (1 << 8) // 0x0100
|
||||
#define BTN_L (1 << 9) // 0x0200
|
||||
#define BTN_X (1 << 10) // 0x0400
|
||||
#define BTN_Y (1 << 11) // 0x0800
|
||||
|
||||
#define CHECK_BUTTON_COMBO(value, btn) ((value) & (btn))
|
||||
|
||||
@@ -24,4 +26,5 @@ struct Input {
|
||||
Input();
|
||||
unk32 func_02013c08(u16 param1);
|
||||
unk32 func_02013b24(unk32 param1);
|
||||
unk32 func_02013bbc();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _NNS_FONT_H
|
||||
#define _NNS_FONT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct Font_UnkStruct1 {
|
||||
/* 00 */ void *mpFINF; // pointer to the FINF section of the FNTR file
|
||||
/* 04 */ void *mUnk_04; // pointer to a function
|
||||
/* 08 */
|
||||
} Font_UnkStruct1;
|
||||
|
||||
void func_020090b0(Font_UnkStruct1 *pFont_UnkStruct1, void *pFontFile);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
#ifndef _NNS_TEXT_H
|
||||
#define _NNS_TEXT_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct Text_UnkStruct2;
|
||||
struct Text_UnkStruct4;
|
||||
|
||||
typedef void (*Text_UnkCallback1)(Text_UnkStruct2 *param1, void *param2, unk32 param3, unk32 param4, unk32 param5,
|
||||
Text_UnkStruct4 *param6);
|
||||
typedef void (*Text_UnkCallback2)(Text_UnkStruct2 *param1, unk32 param2);
|
||||
typedef void (*Text_UnkCallback3)(Text_UnkStruct2 *param1, unk32 param2, unk32 param3, unk32 param4, unk32 param5,
|
||||
unk32 param6);
|
||||
|
||||
typedef struct Text_UnkStruct5 {
|
||||
/* 00 */ unk8 unk_00;
|
||||
/* 01 */ unk8 unk_01;
|
||||
/* 02 */ unk8 unk_02;
|
||||
} Text_UnkStruct5;
|
||||
|
||||
typedef struct Text_UnkStruct4 {
|
||||
/* 00 */ Text_UnkStruct5 *unk_00;
|
||||
/* 04 */ void *unk_04;
|
||||
} Text_UnkStruct4;
|
||||
|
||||
typedef struct Text_UnkStruct3 {
|
||||
/* 00 */ Text_UnkCallback1 func_00;
|
||||
/* 04 */ Text_UnkCallback2 func_04;
|
||||
/* 08 */ Text_UnkCallback3 func_08;
|
||||
} Text_UnkStruct3;
|
||||
|
||||
typedef struct Text_UnkStruct2 {
|
||||
/* 00 */ void *unk_00;
|
||||
/* 04 */ unk32 unk_04;
|
||||
/* 08 */ unk32 unk_08;
|
||||
/* 0C */ unk8 unk_0C;
|
||||
/* 0D */ unk8 unk_0D;
|
||||
/* 0E */ unk8 unk_0E;
|
||||
/* 0F */ unk8 unk_0F;
|
||||
/* 10 */ unk32 unk_10;
|
||||
/* 14 */ Text_UnkStruct3 *unk_14;
|
||||
} Text_UnkStruct2;
|
||||
|
||||
typedef struct Text_UnkStruct1 {
|
||||
/* 00 */ Text_UnkStruct2 *unk_00;
|
||||
/* 04 */ void *unk_04;
|
||||
/* 08 */ unk32 unk_08;
|
||||
/* 0C */ unk32 unk_0C;
|
||||
} Text_UnkStruct1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+134
-25
@@ -1,36 +1,145 @@
|
||||
#pragma once
|
||||
#ifndef _NITRO_REG_H
|
||||
#define _NITRO_REG_H
|
||||
|
||||
#define ARM9_IO_BASE 0x04000000
|
||||
#define SHARED_WORK_BASE 0x027FF000
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define REG_WORD_PTR(addr) ((u32 *) (addr))
|
||||
#define REG_WORD(addr) (*(REG_WORD_PTR(addr)))
|
||||
#include "types.h"
|
||||
|
||||
#define REG_HALFWORD_PTR(addr) ((u16 *) (addr))
|
||||
#define REG_HALFWORD(addr) (*(REG_HALFWORD_PTR(addr)))
|
||||
#define REG_POWER_CNT (*(vu16 *) 0x04000304)
|
||||
#define REG_IME (*(vu16 *) 0x04000208)
|
||||
|
||||
#define REG_IME REG_WORD(*(u32 *) 0x04000208)
|
||||
#define REG_VCOUNT REG_WORD_PTR(*(u32 *) 0x04000006)
|
||||
#define RAM_PALETTES REG_WORD_PTR((u32 *) 0x05000000)
|
||||
#define RAM_OAM REG_WORD_PTR((u32 *) 0x07000000)
|
||||
#define REG_DISPSTAT (*(vu16 *) 0x4000004)
|
||||
#define REG_VCOUNT (*(vu16 *) 0x04000006)
|
||||
|
||||
#define REG_DISPCNT REG_WORD(ARM9_IO_BASE)
|
||||
#define REG_DISPCNT_SUB REG_WORD(ARM9_IO_BASE | 0x00001000)
|
||||
#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_BLDCNT REG_WORD(ARM9_IO_BASE | 0x00000050)
|
||||
#define REG_BLDCNT_SUB REG_WORD(ARM9_IO_BASE | 0x00001050)
|
||||
#define REG_PAD (*(u16 *) 0x027FFFA8)
|
||||
#define REG_KEYINPUT (*(u16 *) 0x04000130)
|
||||
|
||||
#define REG_BG1HOFS_SUB REG_WORD(ARM9_IO_BASE | 0x00001014)
|
||||
#define REG_BG2HOFS_SUB REG_WORD(ARM9_IO_BASE | 0x00001018)
|
||||
#define REG_BG3HOFS_SUB REG_WORD(ARM9_IO_BASE | 0x0000101C)
|
||||
#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)
|
||||
|
||||
#define REG_BLDALPHA REG_HALFWORD(ARM9_IO_BASE | 0x00000052)
|
||||
extern u32 _DTCM_BASE; // TODO: Provide address via LCF
|
||||
#define DTCM_BASE ((u8 *) &_DTCM_BASE)
|
||||
#define REG_IRQ (*(u32 *) (DTCM_BASE + 0x3FF8))
|
||||
|
||||
#define REG_WININ REG_HALFWORD(ARM9_IO_BASE | 0x00000048)
|
||||
#define REG_WINOUT REG_HALFWORD(ARM9_IO_BASE | 0x0000004A)
|
||||
#define REG_WININ_SUB REG_HALFWORD(ARM9_IO_BASE | 0x00001048)
|
||||
#define REG_WINOUT_SUB REG_HALFWORD(ARM9_IO_BASE | 0x0000104A)
|
||||
#define _MAIN_REG_BASE 0x04000000
|
||||
#define _SUB_REG_BASE 0x04001000
|
||||
|
||||
#define REG_BG3CNT_SUB REG_HALFWORD(ARM9_IO_BASE | 0x0000100E)
|
||||
#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 SHARED_WORK_C3C REG_WORD(SHARED_WORK_BASE | 0xC3C)
|
||||
#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))))
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,23 @@ 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)))
|
||||
|
||||
typedef s8 unk8;
|
||||
typedef s16 unk16;
|
||||
typedef s32 unk32;
|
||||
|
||||
Reference in New Issue
Block a user