mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 13:23:27 -04:00
JStudio/JMessage work and cleanup
This commit is contained in:
@@ -52,11 +52,11 @@ struct TVector {
|
||||
void** end() { return mEnd; }
|
||||
void** const end() const { return mEnd; }
|
||||
|
||||
u8 _00;
|
||||
void** mBegin;
|
||||
void** mEnd;
|
||||
void** _0C;
|
||||
vector::ExtendFunc mExtend;
|
||||
/* 0x04 */ u8 _00;
|
||||
/* 0x08 */ void** mBegin;
|
||||
/* 0x0C */ void** mEnd;
|
||||
/* 0x10 */ void** _0C;
|
||||
/* 0x14 */ vector::ExtendFunc mExtend;
|
||||
};
|
||||
|
||||
struct TVector_pointer_void : TVector<void*, TAllocator> {
|
||||
|
||||
@@ -20,12 +20,12 @@ public:
|
||||
struct TStack_ {
|
||||
TStack_() { clear(); }
|
||||
|
||||
TStack_(const TStack_& other) {
|
||||
for (int i = 0; i < mNum; i++) {
|
||||
mStack[i] = mStack[i];
|
||||
}
|
||||
mNum = other.mNum;
|
||||
}
|
||||
// TStack_(const TStack_& other) {
|
||||
// for (int i = 0; i < mNum; i++) {
|
||||
// mStack[i] = mStack[i];
|
||||
// }
|
||||
// mNum = other.mNum;
|
||||
// }
|
||||
|
||||
inline void clear() { mNum = 0; }
|
||||
inline void push(const char* str) {
|
||||
@@ -41,12 +41,10 @@ public:
|
||||
/* 0x10 */ u32 mNum;
|
||||
};
|
||||
|
||||
// XXX: None of this shows up in the debug map. Is this TStatusData?
|
||||
struct TProcess {
|
||||
TProcess() { reset_normal(); }
|
||||
struct TStatusData_ {
|
||||
TStatusData_() { mCallBack = process_onCharacterEnd_normal_; }
|
||||
|
||||
void reset_normal() { mCallBack = process_onCharacterEnd_normal_; }
|
||||
void reset_select() { mCallBack = process_onCharacterEnd_select_; }
|
||||
void reset() {} // TODO
|
||||
|
||||
/* 0x00 */ ProcessorCallBack mCallBack;
|
||||
/* 0x04 */ void* mCallBackWork[4];
|
||||
@@ -89,13 +87,29 @@ public:
|
||||
void on_tag_();
|
||||
bool process_character_();
|
||||
|
||||
TControl* getControl() const { return mControl; }
|
||||
const char* getCurrent() const { return mCurrent; }
|
||||
void setCurrent_(const char* v) { mCurrent = v; }
|
||||
void on_character(int character) { do_character(character); }
|
||||
void on_tag(u32 tag, const void* data, u32 size) {
|
||||
if (!do_tag(tag, data, size)) {
|
||||
do_tag_(tag, data, size);
|
||||
}
|
||||
}
|
||||
void on_begin(const void* param_0, const char* param_1) { do_begin_(param_0, param_1); }
|
||||
void on_end() { do_end_(); }
|
||||
|
||||
// TODO: these inlines don't work because of circular includes
|
||||
// const char* on_message(u32 code) { mControl->on_message(code); }
|
||||
// void on_message_limited(u16 messageIndex) { mControl->on_message_limited(messageIndex); }
|
||||
// void on_word(u32 messageIndex) { mControl->on_word(messageIndex); }
|
||||
// void on_isLeadByte(int param_0) { mControl->on_isLeadByte(param_0); }
|
||||
|
||||
/* 0x00 */ /* vtable */
|
||||
/* 0x04 */ TControl* mControl;
|
||||
/* 0x08 */ const char* mCurrent;
|
||||
/* 0x0C */ TStack_ mStack;
|
||||
/* 0x20 */ TProcess mProcess;
|
||||
/* 0x20 */ TStatusData_ mStatusData;
|
||||
};
|
||||
|
||||
struct TSequenceProcessor : public TProcessor {
|
||||
@@ -142,7 +156,7 @@ struct TSequenceProcessor : public TProcessor {
|
||||
void process_setMessageIndex_reserved_(u16);
|
||||
void process_setMessageCode_(const TSequenceProcessor*, u16, u16);
|
||||
|
||||
void reset() {}
|
||||
void reset() { reset_(NULL); }
|
||||
void setBegin(const void* param_1, const char* param_2) {
|
||||
reset_(param_2);
|
||||
do_begin_(param_1, param_2);
|
||||
@@ -164,6 +178,7 @@ struct TRenderingProcessor : public TProcessor {
|
||||
TRenderingProcessor(const TReference*);
|
||||
TRenderingProcessor(TControl*);
|
||||
|
||||
void reset() { reset_(NULL); }
|
||||
void setBegin(const void* entry, const char* data) {
|
||||
reset_(data);
|
||||
do_begin_(entry, data);
|
||||
|
||||
@@ -11,6 +11,7 @@ typedef f64 (*ExtrapolateParameter)(f64, f64);
|
||||
|
||||
class TFunctionValue;
|
||||
class TFunctionValueAttributeSet;
|
||||
class TFunctionValueAttributeSet;
|
||||
|
||||
class TFunctionValueAttribute_refer;
|
||||
class TFunctionValueAttribute_range;
|
||||
@@ -188,8 +189,9 @@ public:
|
||||
};
|
||||
typedef f64 (*UnkFunc)(f64, const TFunctionValueAttribute_refer*,
|
||||
const TFunctionValue_composite::TData*);
|
||||
typedef f64 (*CompositeFunc)(const JGadget::TVector_pointer<TFunctionValue>&,
|
||||
typedef f64 (*CompositeFunc)(const JGadget::TVector_pointer<TFunctionValue*>&,
|
||||
const TFunctionValue_composite::TData&, f64);
|
||||
typedef TFunctionValue_composite::TData (*GetCompositeFunc)(const void*);
|
||||
|
||||
TFunctionValue_composite();
|
||||
virtual ~TFunctionValue_composite() {}
|
||||
|
||||
@@ -28,18 +28,17 @@ public:
|
||||
return ret;
|
||||
}
|
||||
const void* getContent() const {
|
||||
u32 size = align_roundUp(get_IDSize(), 4);
|
||||
return (const void*)((int)getBlockEnd_() + size);
|
||||
return (const void*)((const u8*)getBlockEnd_() + align_roundUp(get_IDSize(), 4));
|
||||
}
|
||||
};
|
||||
|
||||
class TParse_TParagraph : public TParseData_aligned<4> {
|
||||
public:
|
||||
struct TData {
|
||||
/* 0x04 */ u32 u32Size;
|
||||
/* 0x08 */ u32 u32Type;
|
||||
/* 0x0C */ const void* pContent;
|
||||
/* 0x10 */ const void* next;
|
||||
/* 0x00 */ u32 u32Size;
|
||||
/* 0x04 */ u32 u32Type;
|
||||
/* 0x08 */ const void* pContent;
|
||||
/* 0x0C */ const void* next;
|
||||
};
|
||||
TParse_TParagraph(const void* content) : TParseData_aligned<4>(content) {}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ extern const char ga4cSignature[4];
|
||||
|
||||
const int PARAGRAPH_DATA = 1;
|
||||
|
||||
typedef enum TEComposite {
|
||||
enum TEComposite {
|
||||
/* 0x0 */ COMPOSITE_NONE,
|
||||
/* 0x1 */ COMPOSITE_RAW,
|
||||
/* 0x2 */ COMPOSITE_IDX,
|
||||
@@ -26,7 +26,10 @@ typedef enum TEComposite {
|
||||
/* 0x8 */ COMPOSITE_ENUM_SIZE,
|
||||
};
|
||||
|
||||
typedef const void* (*CompositeOperation)(TFunctionValue_composite::TData);
|
||||
struct CompositeOperation {
|
||||
TFunctionValue_composite::CompositeFunc mSetFunc;
|
||||
TFunctionValue_composite::GetCompositeFunc mGetFunc;
|
||||
};
|
||||
|
||||
struct TBlock {
|
||||
/* 0x0 */ u32 size;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
private:
|
||||
/* 0x4 */ TFactory* pFactory;
|
||||
/* 0x8 */ JGadget::TLinkList<TObject, 12> ocObject_;
|
||||
/* 0x8 */ JGadget::TLinkList<TObject, -12> ocObject_;
|
||||
}; // Size: 0x14
|
||||
|
||||
class TObject_composite : public TObject {
|
||||
|
||||
Reference in New Issue
Block a user