Compare commits
1 Commits
cleanup/ip
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aef4d19df6 |
@@ -60,10 +60,16 @@ namespace gui {
|
|||||||
|
|
||||||
virtual void onEvent(u32 compId, u32 event, void* data) {} // 0x08 (0x02)
|
virtual void onEvent(u32 compId, u32 event, void* data) {} // 0x08 (0x02)
|
||||||
|
|
||||||
|
#ifdef IPL_MEMORYCARD_BASE_CPP
|
||||||
|
virtual void setManager(Manager* manager); // 0x0C (0x03)
|
||||||
|
virtual void setLatestEventCtrlNo(int ctrlNo); // 0x10 (0x04)
|
||||||
|
virtual int getLatestEventCtrlNo(); // 0x14 (0x05)
|
||||||
|
#else
|
||||||
virtual void setManager(Manager* manager) { mpManager = manager; } // 0x0C (0x03)
|
virtual void setManager(Manager* manager) { mpManager = manager; } // 0x0C (0x03)
|
||||||
|
|
||||||
virtual void setLatestEventCtrlNo(int ctrlNo) { mLatestCtrlNum = ctrlNo; } // 0x10 (0x04)
|
virtual void setLatestEventCtrlNo(int ctrlNo) { mLatestCtrlNum = ctrlNo; } // 0x10 (0x04)
|
||||||
virtual int getLatestEventCtrlNo() { return mLatestCtrlNum; } // 0x14 (0x05)
|
virtual int getLatestEventCtrlNo() { return mLatestCtrlNum; } // 0x14 (0x05)
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Manager* mpManager; // 0x04
|
Manager* mpManager; // 0x04
|
||||||
@@ -256,7 +262,11 @@ namespace gui {
|
|||||||
virtual bool contain(f32 x, f32 y); // 0x68 (0x1A)
|
virtual bool contain(f32 x, f32 y); // 0x68 (0x1A)
|
||||||
|
|
||||||
virtual void setPane(nw4r::lyt::Pane* pane) { mpPane = pane; } // 0x6C (0x1B)
|
virtual void setPane(nw4r::lyt::Pane* pane) { mpPane = pane; } // 0x6C (0x1B)
|
||||||
|
#ifdef IPL_MEMORYCARD_BASE_CPP
|
||||||
|
virtual nw4r::lyt::Pane* getPane(); // 0x70 (0x1C)
|
||||||
|
#else
|
||||||
virtual nw4r::lyt::Pane* getPane() { return mpPane; } // 0x70 (0x1C)
|
virtual nw4r::lyt::Pane* getPane() { return mpPane; } // 0x70 (0x1C)
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nw4r::lyt::Pane* mpPane; // 0x88
|
nw4r::lyt::Pane* mpPane; // 0x88
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <nw4r/math.h>
|
#include <nw4r/math.h>
|
||||||
|
|
||||||
|
#include "math/iplMathTypes.h"
|
||||||
#include "utility/iplFrameController.h"
|
#include "utility/iplFrameController.h"
|
||||||
|
|
||||||
#ifdef IPL_GCW_INTP_CTOR_OUT_OF_LINE
|
#ifdef IPL_GCW_INTP_CTOR_OUT_OF_LINE
|
||||||
@@ -61,6 +62,46 @@ namespace ipl {
|
|||||||
T get2() const { return (((mStart * (mMaxFrame - mFrame)) + (mEnd * mFrame)) / mMaxFrame); }
|
T get2() const { return (((mStart * (mMaxFrame - mFrame)) + (mEnd * mFrame)) / mMaxFrame); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef IPL_GC_WINDOW_CPP
|
||||||
|
template <>
|
||||||
|
class __declspec(novtable) Interporation<VEC3> : public utility::FrameController {
|
||||||
|
public:
|
||||||
|
Interporation() {}
|
||||||
|
virtual ~Interporation();
|
||||||
|
|
||||||
|
void init(int playback, f32 maxFrame, f32 minFrame, const VEC3& start, const VEC3& end, f32 speed = 1.0f) {
|
||||||
|
mStart = start;
|
||||||
|
mEnd = end;
|
||||||
|
utility::FrameController::init(playback, maxFrame, minFrame, speed);
|
||||||
|
}
|
||||||
|
|
||||||
|
const VEC3& getStart() { return mStart; }
|
||||||
|
const VEC3& getEnd() { return mEnd; }
|
||||||
|
|
||||||
|
void playBackwards() {
|
||||||
|
mAnmType = ANIM_TYPE_BACKWARD;
|
||||||
|
mState = ANIM_STATE_PLAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
VEC3 mStart;
|
||||||
|
VEC3 mEnd;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
class LinearIntp<VEC3> : public Interporation<VEC3> {
|
||||||
|
public:
|
||||||
|
#ifdef IPL_GCW_INTP_CTOR_OUT_OF_LINE
|
||||||
|
LinearIntp() NO_INLINE;
|
||||||
|
#else
|
||||||
|
LinearIntp() NO_INLINE {}
|
||||||
|
#endif
|
||||||
|
virtual ~LinearIntp();
|
||||||
|
VEC3 get() const;
|
||||||
|
VEC3 get2() const { return (((mStart * (mMaxFrame - mFrame)) + (mEnd * mFrame)) / mMaxFrame); }
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -93,11 +93,15 @@ namespace ipl {
|
|||||||
operator nw4r::math::_VEC3*() { return reinterpret_cast<nw4r::math::_VEC3*>(this); }
|
operator nw4r::math::_VEC3*() { return reinterpret_cast<nw4r::math::_VEC3*>(this); }
|
||||||
operator const nw4r::math::_VEC3*() const { return reinterpret_cast<const nw4r::math::_VEC3*>(this); }
|
operator const nw4r::math::_VEC3*() const { return reinterpret_cast<const nw4r::math::_VEC3*>(this); }
|
||||||
|
|
||||||
|
#ifdef IPL_MEMORY_CARD_CPP
|
||||||
|
VEC3(const nw4r::math::_VEC3& r);
|
||||||
|
#else
|
||||||
VEC3(const nw4r::math::_VEC3& r) {
|
VEC3(const nw4r::math::_VEC3& r) {
|
||||||
x = r.x;
|
x = r.x;
|
||||||
y = r.y;
|
y = r.y;
|
||||||
z = r.z;
|
z = r.z;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
VEC3(const nw4r::math::_VEC2& r) {
|
VEC3(const nw4r::math::_VEC2& r) {
|
||||||
x = r.x;
|
x = r.x;
|
||||||
y = r.y;
|
y = r.y;
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ namespace ipl {
|
|||||||
};
|
};
|
||||||
|
|
||||||
namespace utility {
|
namespace utility {
|
||||||
|
#ifdef IPL_GC_WINDOW_CPP
|
||||||
|
class __declspec(novtable) FrameController {
|
||||||
|
#else
|
||||||
class FrameController {
|
class FrameController {
|
||||||
|
#endif
|
||||||
protected:
|
protected:
|
||||||
enum {
|
enum {
|
||||||
ANIM_STATE_STOP = 0,
|
ANIM_STATE_STOP = 0,
|
||||||
|
|||||||
@@ -109,7 +109,11 @@ namespace nw4r {
|
|||||||
void SetSize(const Size& size) { mSize = size; }
|
void SetSize(const Size& size) { mSize = size; }
|
||||||
|
|
||||||
bool IsVisible() { return detail::TestBit(mFlag, BIT_VISIBLE); };
|
bool IsVisible() { return detail::TestBit(mFlag, BIT_VISIBLE); };
|
||||||
|
#ifdef IPL_GC_WINDOW_CPP
|
||||||
|
void SetVisible(bool visible);
|
||||||
|
#else
|
||||||
void SetVisible(bool visible) { detail::SetBit(&mFlag, BIT_VISIBLE, visible); };
|
void SetVisible(bool visible) { detail::SetBit(&mFlag, BIT_VISIBLE, visible); };
|
||||||
|
#endif
|
||||||
|
|
||||||
bool IsInfluencedAlpha() { return detail::TestBit(mFlag, BIT_INFLUENCED_ALPHA); };
|
bool IsInfluencedAlpha() { return detail::TestBit(mFlag, BIT_INFLUENCED_ALPHA); };
|
||||||
void SetInfluencedAlpha(bool visible) { detail::SetBit(&mFlag, BIT_INFLUENCED_ALPHA, visible); };
|
void SetInfluencedAlpha(bool visible) { detail::SetBit(&mFlag, BIT_INFLUENCED_ALPHA, visible); };
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ namespace nw4r {
|
|||||||
y = pF[1];
|
y = pF[1];
|
||||||
z = pF[2];
|
z = pF[2];
|
||||||
}
|
}
|
||||||
#if defined(IPL_SD_CHANNEL_SELECT_CPP)
|
#if defined(IPL_SD_CHANNEL_SELECT_CPP) || defined(IPL_MEMORY_CARD_CPP)
|
||||||
VEC3(f32 fx, f32 fy, f32 fz);
|
VEC3(f32 fx, f32 fy, f32 fz);
|
||||||
#else
|
#else
|
||||||
VEC3(f32 fx, f32 fy, f32 fz) {
|
VEC3(f32 fx, f32 fy, f32 fz) {
|
||||||
@@ -170,6 +170,9 @@ namespace nw4r {
|
|||||||
operator Vec*() { return reinterpret_cast<Vec*>(this); }
|
operator Vec*() { return reinterpret_cast<Vec*>(this); }
|
||||||
operator const Vec*() const { return reinterpret_cast<const Vec*>(this); }
|
operator const Vec*() const { return reinterpret_cast<const Vec*>(this); }
|
||||||
|
|
||||||
|
#ifdef IPL_GC_WINDOW_CPP
|
||||||
|
VEC3& operator=(const VEC3& rhs);
|
||||||
|
#endif
|
||||||
VEC3& operator+=(const VEC3& rhs) {
|
VEC3& operator+=(const VEC3& rhs) {
|
||||||
VEC3Add(this, this, &rhs);
|
VEC3Add(this, this, &rhs);
|
||||||
return *this;
|
return *this;
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ MemoryBase::MemoryBase() : mpLayout(NULL), unk_0x08(NULL) {
|
|||||||
nw4r::ut::List_Init(&mAnmButtonList, offsetof(AnmButton, mLink));
|
nw4r::ut::List_Init(&mAnmButtonList, offsetof(AnmButton, mLink));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MemCardEventHandler::~MemCardEventHandler() {}
|
MemCardEventHandler::~MemCardEventHandler() {}
|
||||||
|
|
||||||
MemoryBaseEvent::MemoryBaseEvent(MemoryBase* memoryBase) : mpBase(memoryBase) {}
|
MemoryBaseEvent::MemoryBaseEvent(MemoryBase* memoryBase) : mpBase(memoryBase) {}
|
||||||
|
|||||||
@@ -342,8 +342,8 @@ void MemoryCardManager::update_change_cardstate(u8 slot) {
|
|||||||
GXTexObj* MemoryCardManager::create_icon(u8 slot, s16 index) {
|
GXTexObj* MemoryCardManager::create_icon(u8 slot, s16 index) {
|
||||||
memorycard::IconState (*icons)[0x7f] = reinterpret_cast<memorycard::IconState(*)[0x7f]>(memorycard::getIconStateArray());
|
memorycard::IconState (*icons)[0x7f] = reinterpret_cast<memorycard::IconState(*)[0x7f]>(memorycard::getIconStateArray());
|
||||||
int total = 0;
|
int total = 0;
|
||||||
u32 file = mFile[slot][index].fileNo;
|
|
||||||
s16 frame = 0;
|
s16 frame = 0;
|
||||||
|
u32 file = mFile[slot][index].fileNo;
|
||||||
do {
|
do {
|
||||||
u32 shift = frame << 1;
|
u32 shift = frame << 1;
|
||||||
frame++;
|
frame++;
|
||||||
|
|||||||
Reference in New Issue
Block a user