diff options
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPane.h | 3 | ||||
| -rw-r--r-- | include/JSystem/JGadget/binary.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JGadget/define.h | 10 | ||||
| -rw-r--r-- | include/JSystem/JGadget/std-vector.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JGeometry.h | 17 | ||||
| -rw-r--r-- | include/JSystem/JStudio/JStudio/fvb-data-parse.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JStudio/JStudio/fvb-data.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JStudio/JStudio/fvb.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JStudio/JStudio/object-id.h | 1 |
9 files changed, 29 insertions, 22 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index 2ef48562d0..dccc76e448 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -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 */ diff --git a/include/JSystem/JGadget/binary.h b/include/JSystem/JGadget/binary.h index 24f7c96085..77e74ffc5d 100644 --- a/include/JSystem/JGadget/binary.h +++ b/include/JSystem/JGadget/binary.h @@ -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); } diff --git a/include/JSystem/JGadget/define.h b/include/JSystem/JGadget/define.h index 045ef439c3..4ae789ada2 100644 --- a/include/JSystem/JGadget/define.h +++ b/include/JSystem/JGadget/define.h @@ -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); \ diff --git a/include/JSystem/JGadget/std-vector.h b/include/JSystem/JGadget/std-vector.h index 8bcc499e7a..740671bef2 100644 --- a/include/JSystem/JGadget/std-vector.h +++ b/include/JSystem/JGadget/std-vector.h @@ -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); } }; diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 5ae2e827d0..2522028442 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -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() { diff --git a/include/JSystem/JStudio/JStudio/fvb-data-parse.h b/include/JSystem/JStudio/JStudio/fvb-data-parse.h index 776d86c321..fbb0c568df 100644 --- a/include/JSystem/JStudio/JStudio/fvb-data-parse.h +++ b/include/JSystem/JStudio/JStudio/fvb-data-parse.h @@ -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)); } }; diff --git a/include/JSystem/JStudio/JStudio/fvb-data.h b/include/JSystem/JStudio/JStudio/fvb-data.h index cacc41cafd..b88f637dbb 100644 --- a/include/JSystem/JStudio/JStudio/fvb-data.h +++ b/include/JSystem/JStudio/JStudio/fvb-data.h @@ -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 { diff --git a/include/JSystem/JStudio/JStudio/fvb.h b/include/JSystem/JStudio/JStudio/fvb.h index 5ccf0d0f1c..3536aa018e 100644 --- a/include/JSystem/JStudio/JStudio/fvb.h +++ b/include/JSystem/JStudio/JStudio/fvb.h @@ -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_; }; diff --git a/include/JSystem/JStudio/JStudio/object-id.h b/include/JSystem/JStudio/JStudio/object-id.h index cd05ef494b..5803a872ec 100644 --- a/include/JSystem/JStudio/JStudio/object-id.h +++ b/include/JSystem/JStudio/JStudio/object-id.h @@ -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(); } }; |
