From 05eb1400faaa957905fbbe8fa284df4ab1472a58 Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 20 Sep 2012 15:30:05 +0200 Subject: cleaning up in preparation for the new HUD, plus a few other changes --- include/game.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'include/game.h') diff --git a/include/game.h b/include/game.h index 169b01d..7e8456d 100755 --- a/include/game.h +++ b/include/game.h @@ -3067,6 +3067,57 @@ namespace mHeap { }; void WriteNumberToTextBox(int *number, const int *fieldLength, nw4r::lyt::TextBox *textBox, bool unk); // 800B3B60 + +namespace EGG { + class MsgRes { + private: + const u8 *bmg, *INF1, *DAT1, *STR1, *MID1, *FLW1, *FLI1; + public: + MsgRes(const u8 *bmgFile, u32 unusedParam); // 802D7970 + virtual ~MsgRes(); + + static void parseFormatCode(wchar_t initialTag, const wchar_t *string, u8 *outArgsSize, u32 *outCmd, const wchar_t **args); // 802D7B10 + + const wchar_t *findStringForMessageID(int category, int message) const; // 0x802D7B50 + + private: + void setBMG(const u8 *ptr); // 802D7B90 + void setINF(const u8 *ptr); // 802D7BA0 + void setDAT(const u8 *ptr); // 802D7BB0 + void setSTR(const u8 *ptr); // 802D7BC0 + void setMID(const u8 *ptr); // 802D7BD0 + void setFLW(const u8 *ptr); // 802D7BE0 + void setFLI(const u8 *ptr); // 802D7BF0 + int identifySectionByMagic(u32 magic) const; // 802D7C00 + + protected: + struct INFEntry { + u32 stringOffset; + }; + const INFEntry *findINFForMessageID(int category, int message) const; // 802D7C90 + u32 getEntryFromMID(int index) const; // 802D7D70 + }; +} +namespace dScript { + class Res_c : public EGG::MsgRes { + public: + Res_c(const u8 *bmgFile, u32 unusedParam); // 800CE7F0 + ~Res_c(); + + u16 getCharScaleForMessageID(int category, int message) const; // 800CE890 + u8 getFontIDForMessageID(int category, int message) const; // 800CE8C0 + }; +} +class MessageClass { + public: + dDvdLoader_c loader; + void *rawBmgPointer; + dScript::Res_c *msgRes; +}; + +dScript::Res_c *GetBMG(); // 800CDD50 +void WriteBMGToTextBox(nw4r::lyt::TextBox *textBox, dScript::Res_c *res, int category, int message, int argCount, ...); // 0x800C9B50 + extern "C" dAc_Py_c* GetSpecificPlayerActor(int number); extern "C" dStageActor_c *CreateActor(u16 classID, int settings, Vec pos, char rot, char layer); extern "C" dStageActor_c *Actor_SearchByID(u32 actorID); -- cgit v1.2.3