fvb Matching (#2820)

* fvb Matching

* J2DScreen debug work
This commit is contained in:
hatal175
2025-11-19 04:13:35 +02:00
committed by GitHub
parent 158899a16d
commit 8a39ebfa8b
13 changed files with 157 additions and 162 deletions
+3
View File
@@ -211,7 +211,10 @@ public:
/* 0xD8 */ f32 mTranslateY;
/* 0xDC */ JSUTree<J2DPane> mPaneTree;
/* 0xF8 */ const J2DAnmTransform* mTransform;
#if !(PLATFORM_WII || PLATFORM_SHIELD)
/* 0xFC */ u32 _fc;
#endif
};
#endif /* J2DPANE_H */
+1 -1
View File
@@ -14,7 +14,7 @@ struct TEBit {
const void* parseVariableUInt_16_32_following(const void* pu16, u32* pu32First, u32* pu32Second,
TEBit* tebit);
inline u32 align_roundUp(u32 arg0, u32 uAlign) {
inline u32 align_roundUp(unsigned int arg0, unsigned int uAlign) {
return (arg0 + uAlign - 1) & ~(uAlign - 1);
}
+3 -7
View File
@@ -34,16 +34,12 @@ private:
};
#ifdef DEBUG
// these macros are probably wrong, needs work
#define JGADGET_ASSERTWARN(line, COND) \
if (!(COND)) { \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
out << #COND; \
}
((COND)) || (JGadget_outMessage(JGadget_outMessage::warning, __FILE__, line) << #COND, false);
#define JGADGET_WARNMSG(line, msg) \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
out << msg;
JGadget_outMessage(JGadget_outMessage::warning, __FILE__, line) << msg, false;
#define JGADGET_WARNMSG1(line, msg, arg) \
JGadget_outMessage out(JGadget_outMessage::warning, __FILE__, line); \
+2 -2
View File
@@ -170,7 +170,7 @@ struct TVector_pointer_void : public TVector<void*, TAllocator<void*> > {
void** erase(void**, void**);
void clear() { erase(begin(), end()); }
void push_back(const void*& value) { insert(end(), (void* const&)value); }
void push_back(void* const& value) { insert(end(), (void* const&)value); }
};
template <typename T>
@@ -185,7 +185,7 @@ struct TVector_pointer : TVector_pointer_void {
T* end() { return (T*)TVector_pointer_void::end(); }
void push_back(const T& ref) {
static_cast<TVector_pointer_void*>(this)->push_back((const void*&)ref);
static_cast<TVector_pointer_void*>(this)->push_back((void* const&)ref);
}
};
+12 -5
View File
@@ -389,16 +389,20 @@ template <typename T>
struct TVec2 {
TVec2() {}
TVec2(T v) { set(v); }
TVec2(T x, T y) { set(x, y); }
template <typename U>
TVec2(U x, U y) { set(x, y); }
void set(T v) { y = x = v; }
void set(T x, T y) {
template <typename U>
void set(U x, U y) {
this->x = x;
this->y = y;
}
void set(const TVec2& other) {
template <typename U>
void set(const TVec2<U>& other) {
x = other.x;
y = other.y;
}
@@ -481,9 +485,12 @@ template<> struct TBox<TVec2<f32> > {
};
template <typename T>
struct TBox2 : TBox<TVec2<T> > {
struct TBox2 : public TBox<TVec2<T> > {
TBox2() {}
TBox2(const TVec2<f32>& i, const TVec2<f32>& f) { set(i, f); }
TBox2(const TVec2<f32>& _i, const TVec2<f32>& _f) {
i.set(_i);
f.set(_f);
}
TBox2(f32 x0, f32 y0, f32 x1, f32 y1) { set(x0, y0, x1, y1); }
void absolute() {
@@ -15,8 +15,7 @@ public:
u32 get_size() const { return get()->size; }
const void* getNext() const {
u32 size = get_size();
return (const void*)((u8*)getRaw() + size);
return (const void*)((u8*)getRaw() + get_size());
}
u16 get_type() const { return get()->type; }
u16 get_IDSize() const { return get()->id_size; }
@@ -28,8 +27,7 @@ public:
return ret;
}
const void* getContent() const {
u32 size = align_roundUp(get_IDSize(), 4);
return (const void*)((int)getBlockEnd_() + size);
return (const void*)((int)getBlockEnd_() + align_roundUp(get_IDSize(), 4));
}
};
+3 -1
View File
@@ -26,9 +26,11 @@ typedef enum TEComposite {
/* 0x8 */ COMPOSITE_ENUM_SIZE,
};
typedef TFunctionValue_composite::TData (*CompositeDataFunc)(const void*);
struct CompositeOperation {
TFunctionValue_composite::CompositeFunc composite;
TFunctionValue_composite::TData (*getCompositeData)(const void*);
CompositeDataFunc getCompositeData;
};
struct TBlock {
+2 -2
View File
@@ -39,9 +39,9 @@ public:
void prepare(const data::TParse_TBlock& block, TControl* control);
TFunctionValue* const& referFunctionValue() { return pfv_; }
TFunctionValue* const referFunctionValue() { return pfv_; }
private:
protected:
/* 0x0C */ JGadget::TLinkListNode mNode;
/* 0x14 */ TFunctionValue* pfv_;
};
@@ -22,6 +22,7 @@ protected:
struct TObject_ID : public TIDData {
TObject_ID(const void* id, u32 id_size) : TIDData(id, id_size) {}
~TObject_ID() {}
TIDData const& getIDData() const { return *this; }
const u8 *getID() const { return TIDData::getID(); }
};