mirror of https://github.com/zeldaret/tp.git
getDemoIDData matched, fix up various inlines and template classes (#2489)
* Fix debug build * getDemoIDData matched, fix up various inlines and template classes * Remove nonmatching comments
This commit is contained in:
parent
5a13ca438a
commit
23cba4d117
|
@ -21909,7 +21909,8 @@ struct_80450FB0 = .sbss:0x80450FB0; // type:object size:0x1 scope:global align:8
|
||||||
lbl_80450FB1 = .sbss:0x80450FB1; // type:object size:0x1 data:byte
|
lbl_80450FB1 = .sbss:0x80450FB1; // type:object size:0x1 data:byte
|
||||||
lbl_80450FB2 = .sbss:0x80450FB2; // type:object size:0x1 data:byte
|
lbl_80450FB2 = .sbss:0x80450FB2; // type:object size:0x1 data:byte
|
||||||
struct_80450FB8 = .sbss:0x80450FB8; // type:object size:0x4 scope:global align:4 data:byte
|
struct_80450FB8 = .sbss:0x80450FB8; // type:object size:0x4 scope:global align:4 data:byte
|
||||||
struct_80450FBC = .sbss:0x80450FBC; // type:object size:0x4 scope:global align:4 data:byte
|
init$33110 = .sbss:0x80450FBC; // type:object size:0x1 scope:local align:1 data:byte
|
||||||
|
init$33113 = .sbss:0x80450FBD; // type:object size:0x1 scope:local align:1 data:byte
|
||||||
it$36766 = .sbss:0x80450FC0; // type:object size:0x4 scope:local align:4 data:4byte
|
it$36766 = .sbss:0x80450FC0; // type:object size:0x4 scope:local align:4 data:4byte
|
||||||
struct_80450FC4 = .sbss:0x80450FC4; // type:object size:0x4 scope:local align:4 data:byte
|
struct_80450FC4 = .sbss:0x80450FC4; // type:object size:0x4 scope:local align:4 data:byte
|
||||||
m_eye_move_flg = .sbss:0x80450FC8; // type:object size:0x1 scope:local align:1 data:byte
|
m_eye_move_flg = .sbss:0x80450FC8; // type:object size:0x1 scope:local align:1 data:byte
|
||||||
|
|
|
@ -64483,8 +64483,8 @@ lbl_8074C890 = .sbss:0x8074C890; // type:object size:0x1 data:byte hash:0xB74E39
|
||||||
lbl_8074C891 = .sbss:0x8074C891; // type:object size:0x1 data:byte hash:0xC3C1301D dhash:0xBD2F6E4C
|
lbl_8074C891 = .sbss:0x8074C891; // type:object size:0x1 data:byte hash:0xC3C1301D dhash:0xBD2F6E4C
|
||||||
lbl_8074C892 = .sbss:0x8074C892; // type:object size:0x1 data:byte hash:0xC3C1345F dhash:0xBD2F6E4C
|
lbl_8074C892 = .sbss:0x8074C892; // type:object size:0x1 data:byte hash:0xC3C1345F dhash:0xBD2F6E4C
|
||||||
lbl_8074C893 = .sbss:0x8074C893; // type:object size:0x1 data:byte hash:0xC3C1491D dhash:0xBD2F6E4C
|
lbl_8074C893 = .sbss:0x8074C893; // type:object size:0x1 data:byte hash:0xC3C1491D dhash:0xBD2F6E4C
|
||||||
lbl_8074C894 = .sbss:0x8074C894; // type:object size:0x1 data:byte hash:0x2C9C4113 dhash:0xC335850F
|
@GUARD@daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi@dummy = .sbss:0x8074C894; // type:object size:0x1 data:byte hash:0x2C9C4113 dhash:0xC335850F
|
||||||
lbl_8074C895 = .sbss:0x8074C895; // type:object size:0x1 data:byte hash:0xABFECE16 dhash:0xC335850F
|
@GUARD@daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi@it@0 = .sbss:0x8074C895; // type:object size:0x1 data:byte hash:0xABFECE16 dhash:0xC335850F
|
||||||
@LOCAL@daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi@it@0 = .sbss:0x8074C898; // type:object size:0x4 scope:local hash:0x7C41017E dhash:0x7A3314A7
|
@LOCAL@daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi@it@0 = .sbss:0x8074C898; // type:object size:0x4 scope:local hash:0x7C41017E dhash:0x7A3314A7
|
||||||
lbl_8074C89C = .sbss:0x8074C89C; // type:object size:0x1 data:byte hash:0x91B5CF4E dhash:0x3C2D8E6B
|
lbl_8074C89C = .sbss:0x8074C89C; // type:object size:0x1 data:byte hash:0x91B5CF4E dhash:0x3C2D8E6B
|
||||||
lbl_8074C89D = .sbss:0x8074C89D; // type:object size:0x1 data:byte hash:0x1F6B40C0 dhash:0x3C2D8E6B
|
lbl_8074C89D = .sbss:0x8074C89D; // type:object size:0x1 data:byte hash:0x1F6B40C0 dhash:0x3C2D8E6B
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define BINARY_H
|
#define BINARY_H
|
||||||
|
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
|
#include "JSystem/JGadget/search.h"
|
||||||
|
|
||||||
namespace JGadget {
|
namespace JGadget {
|
||||||
namespace binary {
|
namespace binary {
|
||||||
|
@ -26,11 +27,11 @@ struct TParseData {
|
||||||
/* 0x0 */ const void* raw;
|
/* 0x0 */ const void* raw;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <int T>
|
template <int S>
|
||||||
struct TParseData_aligned : public TParseData {
|
struct TParseData_aligned : public TParseData {
|
||||||
TParseData_aligned(const void* pContent) : TParseData(pContent) {}
|
TParseData_aligned(const void* pContent) : TParseData(pContent) {}
|
||||||
void setRaw(const void* p) {
|
void setRaw(const void* p) {
|
||||||
/* if ((u32)p % T != 0) {
|
/* if ((u32)p % S != 0) {
|
||||||
JUTWarn w;
|
JUTWarn w;
|
||||||
w << "misaligned : " << (u32)p;
|
w << "misaligned : " << (u32)p;
|
||||||
} */
|
} */
|
||||||
|
@ -63,41 +64,56 @@ struct TParse_header_block {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct TParseValue_raw_ {
|
struct TParseValue_raw_ {
|
||||||
typedef T ParseType;
|
typedef T ParseType;
|
||||||
static T parse(const void* data) { return *(T*)data; }
|
static T parse(const void* data) { return (T)*(T*)data; }
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct TParseValue_raw : public TParseValue_raw_<T> {
|
||||||
|
typedef TParseValue_raw_<T> InnerParseValueClass;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct TParseValue_endian_big_ : public TParseValue_raw_<T> {
|
struct TParseValue_endian_big_ : public TParseValue_raw_<T> {
|
||||||
static T parse(const void* data) { return TParseValue_raw_::parse(data); }
|
static T parse(const void* data) { return TParseValue_raw_<T>::parse(data); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, template <class> class Parser>
|
template <class Parser>
|
||||||
struct TParseValue : public Parser<T> {
|
struct TParseValue : public Parser {
|
||||||
static T parse(const void* data) { return Parser<T>::parse(data); }
|
static typename Parser::ParseType parse(const void* data) { return Parser::parse(data); }
|
||||||
|
|
||||||
static T parse(const void* data, s32 advanceNum) {
|
static typename Parser::ParseType parse(const void* data, s32 advanceNum) {
|
||||||
return Parser<T>::parse(advance(data, advanceNum));
|
return Parser::parse(advance(data, advanceNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const void* advance(const void* data, s32 advanceNum) {
|
static const void* advance(const void* data, s32 advanceNum) {
|
||||||
return (char*)data + (advanceNum * sizeof(T));
|
return (char*)data + (advanceNum * sizeof(Parser::ParseType));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class Parser, int size>
|
template<class Parser, int size>
|
||||||
struct TValueIterator {
|
struct TValueIterator
|
||||||
|
: public JGadget::TIterator<
|
||||||
|
std::random_access_iterator_tag,
|
||||||
|
typename Parser::ParseType,
|
||||||
|
ptrdiff_t,
|
||||||
|
typename Parser::ParseType*,
|
||||||
|
typename Parser::ParseType&
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename Parser::ParseType ValueType;
|
||||||
|
|
||||||
TValueIterator(const void* begin) {
|
TValueIterator(const void* begin) {
|
||||||
mBegin = begin;
|
mBegin = reinterpret_cast<const char*>(begin);
|
||||||
}
|
}
|
||||||
|
|
||||||
const void* get() const { return mBegin; }
|
const void* get() const { return mBegin; }
|
||||||
|
|
||||||
typename Parser::ParseType operator*() const {
|
typename Parser::ParseType operator*() const {
|
||||||
return Parser::parse(get());
|
return TParseValue<typename Parser::InnerParseValueClass>::parse(get());
|
||||||
}
|
}
|
||||||
|
|
||||||
TValueIterator& operator++() {
|
TValueIterator& operator++() {
|
||||||
const_cast<u32*>(mBegin)++;
|
mBegin += size;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,32 +123,68 @@ struct TValueIterator {
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
TValueIterator& operator+=(s32 v) {
|
TValueIterator& operator+=(s32 n) {
|
||||||
const_cast<u32*>(mBegin) += v;
|
mBegin += size * n;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const void* mBegin;
|
TValueIterator& operator--() {
|
||||||
|
mBegin -= size;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
char const* mBegin;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct TValueIterator_raw : public TValueIterator<TParseValue_raw_<u8>, 1> {
|
struct TValueIterator_raw : public TValueIterator<TParseValue_raw<T>, sizeof(T)> {
|
||||||
TValueIterator_raw(const void* begin) : TValueIterator<TParseValue_raw_<u8>, 1>(begin) {}
|
TValueIterator_raw(const void* begin) : TValueIterator<TParseValue_raw<T>, sizeof(T)>(begin) {}
|
||||||
|
|
||||||
|
friend bool operator==(TValueIterator<TParseValue_raw<T>, sizeof(T)> a, TValueIterator<TParseValue_raw<T>, sizeof(T)> b) {
|
||||||
|
return a.mBegin == b.mBegin;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend bool operator!=(TValueIterator<TParseValue_raw<T>, sizeof(T)> a, TValueIterator<TParseValue_raw<T>, sizeof(T)> b) {
|
||||||
|
return !operator==(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
friend TValueIterator<TParseValue_raw<T>, sizeof(T)> operator+(TValueIterator<TParseValue_raw<T>, sizeof(T)> a, s32 b) {
|
||||||
|
TValueIterator<TParseValue_raw<T>, sizeof(T)> it = a;
|
||||||
|
it += b;
|
||||||
|
return it;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct TParseValue_misaligned : TParseValue_raw_<T> {
|
struct TParseValue_misaligned_ : public TParseValue_raw_<T> {
|
||||||
static T parse(const void* data) { return TParseValue_raw_::parse(data); }
|
typedef T ParseType;
|
||||||
|
static T parse(const void* data) { return TParseValue_raw_<T>::parse(data); }
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct TParseValue_misaligned : public TParseValue_raw_<T> {
|
||||||
|
typedef TParseValue_misaligned_<T> InnerParseValueClass;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct TValueIterator_misaligned : public TValueIterator<TParseValue_misaligned<T>, sizeof(T)> {
|
struct TValueIterator_misaligned : public TValueIterator<TParseValue_misaligned<T>, sizeof(T)> {
|
||||||
TValueIterator_misaligned(const void* begin) : TValueIterator<TParseValue_misaligned<T>, sizeof(T)>(begin) {}
|
TValueIterator_misaligned(const void* begin) : TValueIterator<TParseValue_misaligned<T>, sizeof(T)>(begin) {}
|
||||||
|
|
||||||
|
friend bool operator==(TValueIterator<TParseValue_misaligned<T>, sizeof(T)> a, TValueIterator<TParseValue_misaligned<T>, sizeof(T)> b) {
|
||||||
|
return a.mBegin == b.mBegin;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend bool operator!=(TValueIterator<TParseValue_misaligned<T>, sizeof(T)> a, TValueIterator<TParseValue_misaligned<T>, sizeof(T)> b) {
|
||||||
|
return !operator==(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
friend TValueIterator<TParseValue_misaligned<T>, sizeof(T)> operator+(TValueIterator<TParseValue_misaligned<T>, sizeof(T)> a, s32 b) {
|
||||||
|
TValueIterator<TParseValue_misaligned<T>, sizeof(T)> it(a);
|
||||||
|
it += b;
|
||||||
|
return it;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline bool operator==(TValueIterator<TParseValue_misaligned<u32>, 4> a, TValueIterator<TParseValue_misaligned<u32>, 4> b) { return a.mBegin == b.mBegin; }
|
|
||||||
|
|
||||||
} // namespace binary
|
} // namespace binary
|
||||||
} // namespace JGadget
|
} // namespace JGadget
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ struct TObject_ID : public TIDData {
|
||||||
|
|
||||||
struct TPRObject_ID_equal : public TIDData {
|
struct TPRObject_ID_equal : public TIDData {
|
||||||
TPRObject_ID_equal(const void* id, u32 id_size) : TIDData(id, id_size) {}
|
TPRObject_ID_equal(const void* id, u32 id_size) : TIDData(id, id_size) {}
|
||||||
TPRObject_ID_equal(const TPRObject_ID_equal& other) : TIDData(other.mID, other.mID_size) {}
|
~TPRObject_ID_equal() {}
|
||||||
bool operator()(TObject_ID const& id) const { return TIDData::isEqual(id.getIDData(), *this); }
|
bool operator()(TObject_ID const& id) const { return TIDData::isEqual(id.getIDData(), *this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,16 +65,16 @@ public:
|
||||||
/* 80289A08 */ void getData(TData*) const;
|
/* 80289A08 */ void getData(TData*) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TParse_TParagraph_data : public TParseData_aligned<4> {
|
struct TParse_TParagraph_data : public TParseData {
|
||||||
struct TData {
|
struct TData {
|
||||||
/* 0x00 */ u8 status;
|
/* 0x00 */ u8 status;
|
||||||
/* 0x04 */ u32 dataSize;
|
/* 0x04 */ u32 entrySize;
|
||||||
/* 0x08 */ u32 _8;
|
/* 0x08 */ u32 entryCount;
|
||||||
/* 0x0C */ const void* fileCount;
|
/* 0x0C */ const void* content;
|
||||||
/* 0x10 */ const void* _10;
|
/* 0x10 */ const void* next;
|
||||||
};
|
};
|
||||||
|
|
||||||
TParse_TParagraph_data(const void* content) : TParseData_aligned<4>(content) {}
|
TParse_TParagraph_data(const void* content) : TParseData(content) {}
|
||||||
/* 80289A80 */ void getData(TData* pData) const;
|
/* 80289A80 */ void getData(TData* pData) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ public:
|
||||||
|
|
||||||
u16 get_flag() const { return get()->flag; }
|
u16 get_flag() const { return get()->flag; }
|
||||||
u16 get_IDSize() const { return get()->id_size; }
|
u16 get_IDSize() const { return get()->id_size; }
|
||||||
u32 get_type() const { return get()->type; }
|
|
||||||
const void* get_ID() const { return get()->id; }
|
const void* get_ID() const { return get()->id; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "dolphin/os.h"
|
#include "dolphin/os.h"
|
||||||
|
|
||||||
namespace JStudio {
|
namespace JStudio {
|
||||||
struct TObject;
|
class TObject;
|
||||||
namespace stb {
|
namespace stb {
|
||||||
|
|
||||||
class TControl;
|
class TControl;
|
||||||
|
@ -156,11 +156,10 @@ private:
|
||||||
/* 0x54 */ s32 _54;
|
/* 0x54 */ s32 _54;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <int T>
|
template <int S>
|
||||||
struct TParseData : public data::TParse_TParagraph_data::TData {
|
struct TParseData : public data::TParse_TParagraph_data::TData {
|
||||||
TParseData(const void* pContent) {
|
TParseData(const void* pContent) {
|
||||||
data::TParse_TParagraph_data data(pContent);
|
set(data::TParse_TParagraph_data(pContent));
|
||||||
set(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TParseData() {
|
TParseData() {
|
||||||
|
@ -171,45 +170,57 @@ struct TParseData : public data::TParse_TParagraph_data::TData {
|
||||||
data.getData(this);
|
data.getData(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set(const void* pContent) {
|
||||||
|
set(data::TParse_TParagraph_data(pContent));
|
||||||
|
}
|
||||||
|
|
||||||
bool isEnd() const {
|
bool isEnd() const {
|
||||||
return status == 0;
|
return status == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool empty() const {
|
bool empty() const {
|
||||||
return fileCount == NULL;
|
return content == NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isValid() const {
|
bool isValid() const {
|
||||||
return !empty() && status == 50;
|
return !empty() && status == S;
|
||||||
}
|
}
|
||||||
|
|
||||||
const void* getContent() const { return fileCount; }
|
const void* getContent() const { return content; }
|
||||||
|
|
||||||
u32 size() const { return dataSize; }
|
u32 size() const { return entryCount; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <int T, class Iterator=JGadget::binary::TValueIterator_raw<u8> >
|
template <int S, class Iterator=JGadget::binary::TValueIterator_raw<u8> >
|
||||||
struct TParseData_fixed : public TParseData<T> {
|
struct TParseData_fixed : public TParseData<S> {
|
||||||
TParseData_fixed(const void* pContent) : TParseData<T>(pContent) {}
|
TParseData_fixed(const void* pContent) : TParseData<S>(pContent) {}
|
||||||
TParseData_fixed() : TParseData<T>() {}
|
TParseData_fixed() : TParseData<S>() {}
|
||||||
|
|
||||||
const void* getNext() const {
|
const void* getNext() const {
|
||||||
return _10;
|
return this->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isValid() const {
|
bool isValid() const {
|
||||||
return TParseData::isValid() && getNext() != NULL;
|
return TParseData<S>::isValid() && getNext() != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator begin() const {
|
Iterator begin() const {
|
||||||
return Iterator(fileCount);
|
return Iterator(this->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator end() const {
|
Iterator end() const {
|
||||||
Iterator i(fileCount);
|
Iterator i(this->content);
|
||||||
i += size();
|
i += this->size();
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typename Iterator::ValueType front() const {
|
||||||
|
return *begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
typename Iterator::ValueType back() const {
|
||||||
|
return *--end();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TParseData_string : public TParseData<0x60> {
|
struct TParseData_string : public TParseData<0x60> {
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
/* 802E56DC */ virtual void draw();
|
/* 802E56DC */ virtual void draw();
|
||||||
|
|
||||||
s32 getStatus() const { return mStatus; }
|
s32 getStatus() const { return mStatus; }
|
||||||
void setColor(JUtility::TColor& color) { mColor.set(color); }
|
void setColor(JUtility::TColor color) { mColor.set(color); }
|
||||||
|
|
||||||
/* 0x04 */ s32 mStatus;
|
/* 0x04 */ s32 mStatus;
|
||||||
/* 0x08 */ u16 field_0x8;
|
/* 0x08 */ u16 field_0x8;
|
||||||
|
|
|
@ -28,7 +28,10 @@ struct TColor : public GXColor {
|
||||||
}
|
}
|
||||||
|
|
||||||
void set(u32 u32Color) { *(u32*)&r = u32Color; }
|
void set(u32 u32Color) { *(u32*)&r = u32Color; }
|
||||||
void set(GXColor gxColor) { *(GXColor*)&r = gxColor; }
|
void set(GXColor gxColor) {
|
||||||
|
GXColor* temp = this;
|
||||||
|
*temp = gxColor;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} // namespace JUtility
|
} // namespace JUtility
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,10 @@ public:
|
||||||
typedef int (daObj_GrA_c::*MotionFunc)(int);
|
typedef int (daObj_GrA_c::*MotionFunc)(int);
|
||||||
typedef int (daObj_GrA_c::*Process)(void*);
|
typedef int (daObj_GrA_c::*Process)(void*);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
NUMLOOKMODES_e = 4,
|
||||||
|
};
|
||||||
|
|
||||||
class daObj_GrA_prtclMngr_c {
|
class daObj_GrA_prtclMngr_c {
|
||||||
public:
|
public:
|
||||||
/* 80C04E14 */ ~daObj_GrA_prtclMngr_c() {}
|
/* 80C04E14 */ ~daObj_GrA_prtclMngr_c() {}
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
/* 0x212 */ u16 field_0x212;
|
/* 0x212 */ u16 field_0x212;
|
||||||
/* 0x214 */ u16 field_0x214;
|
/* 0x214 */ u16 field_0x214;
|
||||||
/* 0x218 */ u32 field_0x218;
|
/* 0x218 */ u32 field_0x218;
|
||||||
/* 0x21C */ void* buffer;
|
/* 0x21C */ void* dummyGameAlloc;
|
||||||
/* 0x220 */ mDoDvdThd_mountXArchive_c* mpField0Command;
|
/* 0x220 */ mDoDvdThd_mountXArchive_c* mpField0Command;
|
||||||
/* 0x224 */ mDoDvdThd_mountXArchive_c* mpAlAnmCommand;
|
/* 0x224 */ mDoDvdThd_mountXArchive_c* mpAlAnmCommand;
|
||||||
/* 0x228 */ u8 field_0x228[4];
|
/* 0x228 */ u8 field_0x228[4];
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "JSystem/JFramework/JFWDisplay.h"
|
#include "JSystem/JFramework/JFWDisplay.h"
|
||||||
#include "dolphin/mtx.h"
|
#include "dolphin/mtx.h"
|
||||||
|
|
||||||
class JUTFader;
|
|
||||||
|
|
||||||
int mDoGph_Create();
|
int mDoGph_Create();
|
||||||
void mDoGph_drawFilterQuad(s8 param_0, s8 param_1);
|
void mDoGph_drawFilterQuad(s8 param_0, s8 param_1);
|
||||||
|
|
||||||
|
@ -61,7 +59,7 @@ public:
|
||||||
|
|
||||||
static int startFadeOut(int param_0) { return JFWDisplay::getManager()->startFadeOut(param_0); }
|
static int startFadeOut(int param_0) { return JFWDisplay::getManager()->startFadeOut(param_0); }
|
||||||
static int startFadeIn(int param_0) { return JFWDisplay::getManager()->startFadeIn(param_0); }
|
static int startFadeIn(int param_0) { return JFWDisplay::getManager()->startFadeIn(param_0); }
|
||||||
static void setFadeColor(JUtility::TColor color) { mFader->mColor.set(color); }
|
static void setFadeColor(JUtility::TColor& color) { mFader->setColor(color); }
|
||||||
static void setClearColor(JUtility::TColor color) { JFWDisplay::getManager()->setClearColor(color); }
|
static void setClearColor(JUtility::TColor color) { JFWDisplay::getManager()->setClearColor(color); }
|
||||||
static void setBackColor(GXColor& color) { mBackColor = color; }
|
static void setBackColor(GXColor& color) { mBackColor = color; }
|
||||||
static void endFrame() { JFWDisplay::getManager()->endFrame(); }
|
static void endFrame() { JFWDisplay::getManager()->endFrame(); }
|
||||||
|
|
|
@ -216,11 +216,11 @@ void JMessage::TProcessor::do_tag_(u32 uTag, void const* pData, u32 uSize) {
|
||||||
switch (uCode & 0xFFFF) {
|
switch (uCode & 0xFFFF) {
|
||||||
case 4:
|
case 4:
|
||||||
JUT_ASSERT(331, uSize==4);
|
JUT_ASSERT(331, uSize==4);
|
||||||
stack_pushCurrent(on_word(JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(pData)));
|
stack_pushCurrent(on_word(JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u32> >::parse(pData)));
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
JUT_ASSERT(341, uSize==4);
|
JUT_ASSERT(341, uSize==4);
|
||||||
stack_pushCurrent(on_message(JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(pData)));
|
stack_pushCurrent(on_message(JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u32> >::parse(pData)));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
JGADGET_WARNMSG1(351, "unknown system-tag-code : ", uCode & 0xFFFF);
|
JGADGET_WARNMSG1(351, "unknown system-tag-code : ", uCode & 0xFFFF);
|
||||||
|
@ -315,7 +315,7 @@ const char* JMessage::TProcessor::process_onSelect_limited_(JMessage::TProcessor
|
||||||
JUT_ASSERT(457, rData.uRest>0);
|
JUT_ASSERT(457, rData.uRest>0);
|
||||||
|
|
||||||
u16* puOffset = (u16*)rData.pOffset;
|
u16* puOffset = (u16*)rData.pOffset;
|
||||||
u16 uData = JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(puOffset);
|
u16 uData = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u16> >::parse(puOffset);
|
||||||
|
|
||||||
rData.pOffset = (void*)(puOffset + 1);
|
rData.pOffset = (void*)(puOffset + 1);
|
||||||
return &rData.pcBase[uData];
|
return &rData.pcBase[uData];
|
||||||
|
@ -331,7 +331,7 @@ const char* JMessage::TProcessor::process_onSelect_(JMessage::TProcessor* pThis)
|
||||||
JUT_ASSERT(474, rData.uRest>0);
|
JUT_ASSERT(474, rData.uRest>0);
|
||||||
|
|
||||||
u32* puOffset = (u32*)rData.pOffset;
|
u32* puOffset = (u32*)rData.pOffset;
|
||||||
u32 uData = JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(puOffset);
|
u32 uData = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u32> >::parse(puOffset);
|
||||||
|
|
||||||
rData.pOffset = (void*)(puOffset + 1);
|
rData.pOffset = (void*)(puOffset + 1);
|
||||||
return &rData.pcBase[uData];
|
return &rData.pcBase[uData];
|
||||||
|
@ -574,7 +574,7 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* pData, u32 uSiz
|
||||||
break;
|
break;
|
||||||
case 6: {
|
case 6: {
|
||||||
JUT_ASSERT(807, uSize==4);
|
JUT_ASSERT(807, uSize==4);
|
||||||
u32 u32Target = JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(pData);
|
u32 u32Target = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u32> >::parse(pData);
|
||||||
on_jump_register(process_onJump_, u32Target);
|
on_jump_register(process_onJump_, u32Target);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -610,7 +610,7 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* pData, u32 uSiz
|
||||||
}
|
}
|
||||||
case 0xF8: {
|
case 0xF8: {
|
||||||
u16* pu16Data = (u16*)pData;
|
u16* pu16Data = (u16*)pData;
|
||||||
u32 uNumber = JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(pu16Data);
|
u32 uNumber = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u16> >::parse(pu16Data);
|
||||||
JUT_ASSERT(859, uSize==2+2*uNumber);
|
JUT_ASSERT(859, uSize==2+2*uNumber);
|
||||||
on_branch_register(process_onBranch_limited_, pu16Data + 1, uNumber);
|
on_branch_register(process_onBranch_limited_, pu16Data + 1, uNumber);
|
||||||
on_branch_query(uCode & 0xFFFF);
|
on_branch_query(uCode & 0xFFFF);
|
||||||
|
@ -618,7 +618,7 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* pData, u32 uSiz
|
||||||
}
|
}
|
||||||
case 0xF7: {
|
case 0xF7: {
|
||||||
u16* pu16Data = (u16*)pData;
|
u16* pu16Data = (u16*)pData;
|
||||||
u32 uNumber = JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(pu16Data);
|
u32 uNumber = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u16> >::parse(pu16Data);
|
||||||
JUT_ASSERT(871, uSize==2+4*uNumber);
|
JUT_ASSERT(871, uSize==2+4*uNumber);
|
||||||
on_branch_register(process_onBranch_, pu16Data + 1, uNumber);
|
on_branch_register(process_onBranch_, pu16Data + 1, uNumber);
|
||||||
on_branch_query(uCode & 0xFFFF);
|
on_branch_query(uCode & 0xFFFF);
|
||||||
|
@ -689,7 +689,7 @@ JMessage::TSequenceProcessor::process_onBranch_limited_(JMessage::TSequenceProce
|
||||||
JUT_ASSERT(942, rData.pTarget!=0);
|
JUT_ASSERT(942, rData.pTarget!=0);
|
||||||
JUT_ASSERT(943, uTargetIndex<rData.uTarget);
|
JUT_ASSERT(943, uTargetIndex<rData.uTarget);
|
||||||
|
|
||||||
u16 u16Index = JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(rData.pTarget, uTargetIndex);
|
u16 u16Index = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u16> >::parse(rData.pTarget, uTargetIndex);
|
||||||
return process_setMessageIndex_(pProcessor, u16Index);
|
return process_setMessageIndex_(pProcessor, u16Index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ JMessage::TSequenceProcessor::process_onBranch_(JMessage::TSequenceProcessor con
|
||||||
JUT_ASSERT(957, rData.pTarget!=0);
|
JUT_ASSERT(957, rData.pTarget!=0);
|
||||||
JUT_ASSERT(958, uTargetIndex<rData.uTarget);
|
JUT_ASSERT(958, uTargetIndex<rData.uTarget);
|
||||||
|
|
||||||
u32 uCode = JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(rData.pTarget, uTargetIndex);
|
u32 uCode = JGadget::binary::TParseValue<JGadget::binary::TParseValue_endian_big_<u32> >::parse(rData.pTarget, uTargetIndex);
|
||||||
return process_setMessageCode_(pProcessor, uCode);
|
return process_setMessageCode_(pProcessor, uCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "JSystem/JStudio/JStudio/stb-data-parse.h"
|
#include "JSystem/JStudio/JStudio/stb-data-parse.h"
|
||||||
|
#include "JSystem/JUtility/JUTAssert.h"
|
||||||
#include "dolphin/os.h"
|
#include "dolphin/os.h"
|
||||||
|
|
||||||
namespace JStudio {
|
namespace JStudio {
|
||||||
|
@ -47,37 +48,37 @@ void TParse_TParagraph::getData(TData* pData) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParse_TParagraph_data::getData(data::TParse_TParagraph_data::TData* pData) const {
|
void TParse_TParagraph_data::getData(TParse_TParagraph_data::TData* pData) const {
|
||||||
u8* set2;
|
JUT_ASSERT(104, pData!=0);
|
||||||
|
pData->entrySize = 0;
|
||||||
|
pData->entryCount = 0;
|
||||||
|
pData->content = NULL;
|
||||||
|
pData->next = NULL;
|
||||||
|
u8* temp = (u8*)getRaw();
|
||||||
|
u8* filedata = temp;
|
||||||
|
if (filedata == NULL)
|
||||||
|
return;
|
||||||
|
u8 r29 = *filedata;
|
||||||
|
pData->status = r29 & ~0x8;
|
||||||
|
if (!r29)
|
||||||
|
return;
|
||||||
|
filedata++;
|
||||||
|
u32 r28 = 1;
|
||||||
|
if (r29 & 8) {
|
||||||
|
r28 = *filedata;
|
||||||
|
filedata++;
|
||||||
|
}
|
||||||
|
pData->entryCount = r28;
|
||||||
|
pData->content = filedata;
|
||||||
|
|
||||||
int dSize = pData->dataSize = 0;
|
u8 r27 = r29 & 7;
|
||||||
pData->_8 = 0;
|
if (r27 == 0)
|
||||||
pData->fileCount = NULL;
|
return;
|
||||||
pData->_10 = NULL;
|
u32 dataSize = (gauDataSize_TEParagraph_data)[r27];
|
||||||
u8* filedata = (u8*)getRaw();
|
pData->entrySize = dataSize;
|
||||||
if (filedata == NULL)
|
pData->next = filedata + (dataSize * r28);
|
||||||
return;
|
|
||||||
u8 set = *filedata;
|
|
||||||
pData->status = set & ~0x8;
|
|
||||||
if (!set)
|
|
||||||
return;
|
|
||||||
int is8;
|
|
||||||
int set3 = 1;
|
|
||||||
is8 = set & 8;
|
|
||||||
// Probably fake match
|
|
||||||
if (set2 = (filedata + 1), is8) {
|
|
||||||
set3 = *set2++;
|
|
||||||
}
|
|
||||||
pData->_8 = set3;
|
|
||||||
pData->fileCount = set2;
|
|
||||||
|
|
||||||
if (!(set & 7))
|
|
||||||
return;
|
|
||||||
dSize = (gauDataSize_TEParagraph_data)[set &= 7];
|
|
||||||
pData->dataSize = dSize;
|
|
||||||
pData->_10 = (u8*)set2 + (dSize * set3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace data
|
} // namespace data
|
||||||
} // namespace stb
|
} // namespace stb
|
||||||
} // namespace JStudio
|
} // namespace JStudio
|
||||||
|
|
|
@ -1441,7 +1441,6 @@ f32 daAlink_c::setStickAnmData(J3DAnmBase* i_anm, int param_1, int param_2, u16
|
||||||
|
|
||||||
/* 80119464-801195C0 113DA4 015C+00 1/1 0/0 0/0 .text
|
/* 80119464-801195C0 113DA4 015C+00 1/1 0/0 0/0 .text
|
||||||
* daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi */
|
* daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi */
|
||||||
// NONMATCHING - some stack issues
|
|
||||||
static int daAlink_c_getDemoIDData(dDemo_actor_c* param_0, int* param_1, int* param_2,
|
static int daAlink_c_getDemoIDData(dDemo_actor_c* param_0, int* param_1, int* param_2,
|
||||||
int* param_3, u16* param_4, int* param_5, int* param_6) {
|
int* param_3, u16* param_4, int* param_5, int* param_6) {
|
||||||
JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned<u32> > sp30(param_0->getPrm()->getData());
|
JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned<u32> > sp30(param_0->getPrm()->getData());
|
||||||
|
|
|
@ -1591,7 +1591,7 @@ static cPhs__Step daE_GB_Create(fopAc_ac_c* a_this) {
|
||||||
u8 swBit = fopAcM_GetParam(a_this) >> 16;
|
u8 swBit = fopAcM_GetParam(a_this) >> 16;
|
||||||
if (swBit != 0xFF) {
|
if (swBit != 0xFF) {
|
||||||
if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo(a_this))) {
|
if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo(a_this))) {
|
||||||
OS_REPORT("E_gb やられ後なので再セットしません\n")
|
OS_REPORT("E_gb やられ後なので再セットしません\n");
|
||||||
return cPhs_ERROR_e;
|
return cPhs_ERROR_e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
#include "d/actor/d_a_set_bgobj.h"
|
#include "d/actor/d_a_set_bgobj.h"
|
||||||
#include "d/d_com_inf_game.h"
|
#include "d/d_com_inf_game.h"
|
||||||
#include "dol2asm.h"
|
#include "dol2asm.h"
|
||||||
|
#include "d/d_a_obj.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
class daObjFlag3_Hio_c : public JORReflexible {
|
class daObjFlag3_Hio_c : public JORReflexible {
|
||||||
|
public:
|
||||||
daObjFlag3_Hio_c() {
|
daObjFlag3_Hio_c() {
|
||||||
mCount = 0;
|
mCount = 0;
|
||||||
default_set();
|
default_set();
|
||||||
|
@ -23,7 +25,7 @@ class daObjFlag3_Hio_c : public JORReflexible {
|
||||||
ctx->genSlider("重力", &mAttr.mGravity, -10.0f, 0.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
ctx->genSlider("重力", &mAttr.mGravity, -10.0f, 0.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
|
||||||
ctx->genSlider("バネ係数", &mAttr.mSpringCoeeficient, 0.0f, 10.0f, 0, NULL, 0xffff, 0xffff,
|
ctx->genSlider("バネ係数", &mAttr.mSpringCoeeficient, 0.0f, 10.0f, 0, NULL, 0xffff, 0xffff,
|
||||||
0x200, 0x18);
|
0x200, 0x18);
|
||||||
ctx->genSlider("減衰率", &mAttr.mAttenuationRate, 0.0f, 1.0f, 0, NULL, 0xffff, 0xffff,
|
ctx->genSlider("減衰率", &mAttr.mDecayRate, 0.0f, 1.0f, 0, NULL, 0xffff, 0xffff,
|
||||||
0x200, 0x18);
|
0x200, 0x18);
|
||||||
ctx->genSlider("風係数", &mAttr.mWindCoefficient, 0.0f, 100.0f, 0, NULL, 0xffff, 0xffff,
|
ctx->genSlider("風係数", &mAttr.mWindCoefficient, 0.0f, 100.0f, 0, NULL, 0xffff, 0xffff,
|
||||||
0x200, 0x18);
|
0x200, 0x18);
|
||||||
|
@ -45,6 +47,8 @@ class daObjFlag3_Hio_c : public JORReflexible {
|
||||||
/* 0x4 */ int mCount;
|
/* 0x4 */ int mCount;
|
||||||
/* 0x8 */ daObjFlag3_Attr_c mAttr;
|
/* 0x8 */ daObjFlag3_Attr_c mAttr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
daObjFlag3_Hio_c M_hio;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 80BF0458-80BF046C 000000 0014+00 3/3 0/0 0/0 .rodata M_attr__12daObjFlag3_c */
|
/* 80BF0458-80BF046C 000000 0014+00 3/3 0/0 0/0 .rodata M_attr__12daObjFlag3_c */
|
||||||
|
|
|
@ -241,8 +241,11 @@ void daTitle_c::nextScene_init() {
|
||||||
void daTitle_c::nextScene_proc() {
|
void daTitle_c::nextScene_proc() {
|
||||||
if (!fopOvlpM_IsPeek() && !mDoRst::isReset()) {
|
if (!fopOvlpM_IsPeek() && !mDoRst::isReset()) {
|
||||||
scene_class* playScene = fopScnM_SearchByID(dStage_roomControl_c::getProcID());
|
scene_class* playScene = fopScnM_SearchByID(dStage_roomControl_c::getProcID());
|
||||||
|
JUT_ASSERT(706, playScene != 0);
|
||||||
fopScnM_ChangeReq(playScene, 13, 0, 5);
|
fopScnM_ChangeReq(playScene, 13, 0, 5);
|
||||||
|
#if VERSION != VERSION_SHIELD_DEBUG
|
||||||
mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor);
|
mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,6 @@ const u8* dDemo_c::m_branchData;
|
||||||
|
|
||||||
/* 80038338-80038490 032C78 0158+00 0/0 1/1 5/5 .text getDemoIDData__13dDemo_actor_cFPiPiPiPUsPUc
|
/* 80038338-80038490 032C78 0158+00 0/0 1/1 5/5 .text getDemoIDData__13dDemo_actor_cFPiPiPiPUsPUc
|
||||||
*/
|
*/
|
||||||
// NONMATCHING - some stack issues
|
|
||||||
int dDemo_actor_c::getDemoIDData(int* param_0, int* param_1, int* param_2, u16* param_3,
|
int dDemo_actor_c::getDemoIDData(int* param_0, int* param_1, int* param_2, u16* param_3,
|
||||||
u8* param_4) {
|
u8* param_4) {
|
||||||
JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned<u32> > data(getPrm()->getData());
|
JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned<u32> > data(getPrm()->getData());
|
||||||
|
|
|
@ -432,7 +432,7 @@ dScnLogo_c::~dScnLogo_c() {
|
||||||
|
|
||||||
field_0x1d4->destroy();
|
field_0x1d4->destroy();
|
||||||
field_0x1d0->destroy();
|
field_0x1d0->destroy();
|
||||||
JKRFree(buffer);
|
JKRFree(dummyGameAlloc);
|
||||||
|
|
||||||
dComIfGp_particle_createCommon(mParticleCommand->getMemAddress());
|
dComIfGp_particle_createCommon(mParticleCommand->getMemAddress());
|
||||||
dComIfGp_setFieldMapArchive2(mpField0Command->getArchive());
|
dComIfGp_setFieldMapArchive2(mpField0Command->getArchive());
|
||||||
|
@ -508,8 +508,9 @@ static int phase_0(dScnLogo_c* i_this) {
|
||||||
mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor);
|
mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor);
|
||||||
dComIfGp_particle_create();
|
dComIfGp_particle_create();
|
||||||
|
|
||||||
i_this->buffer = mDoExt_getGameHeap()->alloc(0x340000, -0x10);
|
i_this->dummyGameAlloc = mDoExt_getGameHeap()->alloc(0x340000, -0x10);
|
||||||
i_this->field_0x1d0 = JKRExpHeap::create(i_this->buffer, 0x340000, NULL, false);
|
JUT_ASSERT(1523, i_this->dummyGameAlloc != 0);
|
||||||
|
i_this->field_0x1d0 = JKRExpHeap::create(i_this->dummyGameAlloc, 0x340000, NULL, false);
|
||||||
i_this->field_0x1d4 = JKRExpHeap::create(0x130000, i_this->field_0x1d0, false);
|
i_this->field_0x1d4 = JKRExpHeap::create(0x130000, i_this->field_0x1d0, false);
|
||||||
|
|
||||||
return cPhs_NEXT_e;
|
return cPhs_NEXT_e;
|
||||||
|
|
Loading…
Reference in New Issue