mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-29 08:12:52 -04:00
Various JSystem work (#2383)
* JKernel and JStudio cleanup * JMessage cleanup * JAudio cleanup * JASBNKParser work * functionvalue work * fvb work * J2D and J3D cleanup * steal from tww * J2DPictureEx mostly done * fix build
This commit is contained in:
@@ -1731,7 +1731,7 @@ JSystem/JStudio/JStudio/ctb.cpp:
|
||||
.data start:0x803C4878 end:0x803C48E0
|
||||
|
||||
JSystem/JStudio/JStudio/functionvalue.cpp:
|
||||
.text start:0x80281648 end:0x80283E24
|
||||
.text start:0x80281648 end:0x80283F80
|
||||
.rodata start:0x8039A9F0 end:0x8039AA00
|
||||
.data start:0x803C48E0 end:0x803C49C0
|
||||
.sbss start:0x804511E8 end:0x804511F0
|
||||
@@ -1740,17 +1740,11 @@ JSystem/JStudio/JStudio/functionvalue.cpp:
|
||||
JSystem/JStudio/JStudio/fvb-data.cpp:
|
||||
.sdata2 start:0x80455450 end:0x80455458
|
||||
|
||||
JSystem/JStudio/JStudio/functionvalue-inline.cpp:
|
||||
.text start:0x80283E24 end:0x80283F80
|
||||
|
||||
JSystem/JStudio/JStudio/fvb.cpp:
|
||||
.text start:0x80283F80 end:0x80285018
|
||||
.text start:0x80283F80 end:0x802850AC
|
||||
.rodata start:0x8039AA00 end:0x8039AA40
|
||||
.data start:0x803C49C0 end:0x803C4AC0
|
||||
|
||||
JSystem/JStudio/JStudio/fvb-inline.cpp:
|
||||
.text start:0x80285018 end:0x802850AC
|
||||
|
||||
JSystem/JStudio/JStudio/fvb-data-parse.cpp:
|
||||
.text start:0x802850AC end:0x80285114
|
||||
|
||||
|
||||
@@ -13703,7 +13703,7 @@ JSUConvertOffsetToPtr<11_GXCullMode>__FPCvPCv = .text:0x802F4290; // type:functi
|
||||
JSUConvertOffsetToPtr<14J2DIndInitData>__FPCvPCv = .text:0x802F42A8; // type:function size:0x18 scope:global align:4
|
||||
JSUConvertOffsetToPtr<Us>__FPCvPCv = .text:0x802F42C0; // type:function size:0x18 scope:global align:4
|
||||
JSUConvertOffsetToPtr<19J2DMaterialInitData>__FPCvPCv = .text:0x802F42D8; // type:function size:0x18 scope:global align:4
|
||||
J2DPrint_print_alpha_va = .text:0x802F42F0; // type:function size:0xA4 scope:global align:4
|
||||
J2DPrint_print_alpha_va__FP8J2DPrintUcPCcP16__va_list_struct = .text:0x802F42F0; // type:function size:0xA4 scope:global align:4
|
||||
__ct__8J2DPrintFP7JUTFontffQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColor = .text:0x802F4394; // type:function size:0x8C scope:global align:4
|
||||
__dt__8J2DPrintFv = .text:0x802F4420; // type:function size:0x48 scope:global align:4
|
||||
private_initiate__8J2DPrintFP7JUTFontffQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorb = .text:0x802F4468; // type:function size:0x1F0 scope:global align:4
|
||||
|
||||
+18
-20
@@ -768,20 +768,18 @@ config.libs = [
|
||||
JSystemLib(
|
||||
"JStudio",
|
||||
[
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/ctb.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/ctb.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/ctb-data.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/functionvalue.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/functionvalue-inline.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/fvb.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/fvb-inline.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/fvb-data.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/fvb-data-parse.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/jstudio-control.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/jstudio-data.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/jstudio-math.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/jstudio-math.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/jstudio-object.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/object-id.cpp"),
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio/stb.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/stb.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/stb-data-parse.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio/stb-data.cpp"),
|
||||
],
|
||||
@@ -789,7 +787,7 @@ config.libs = [
|
||||
JSystemLib(
|
||||
"JStudio_JStage",
|
||||
[
|
||||
Object(NonMatching, "JSystem/JStudio/JStudio_JStage/control.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio_JStage/control.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio_JStage/object.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio_JStage/object-actor.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JStudio/JStudio_JStage/object-ambientlight.cpp"),
|
||||
@@ -819,7 +817,7 @@ config.libs = [
|
||||
Object(NonMatching, "JSystem/JAudio2/JASTaskThread.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASDvdThread.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASCallback.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio2/JASHeapCtrl.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio2/JASHeapCtrl.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASResArcLoader.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASProbe.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JAudio2/JASReport.cpp"),
|
||||
@@ -888,11 +886,11 @@ config.libs = [
|
||||
JSystemLib(
|
||||
"JMessage",
|
||||
[
|
||||
Object(NonMatching, "JSystem/JMessage/control.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JMessage/control.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JMessage/data.cpp"),
|
||||
Object(NonMatching, "JSystem/JMessage/processor.cpp"),
|
||||
Object(NonMatching, "JSystem/JMessage/processor.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(NonMatching, "JSystem/JMessage/resource.cpp"),
|
||||
Object(NonMatching, "JSystem/JMessage/locale.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JMessage/locale.cpp"),
|
||||
],
|
||||
),
|
||||
{
|
||||
@@ -957,13 +955,13 @@ config.libs = [
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRArchivePub.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRArchivePri.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRMemArchive.cpp"),
|
||||
Object(NonMatching, "JSystem/JKernel/JKRAramArchive.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRAramArchive.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRDvdArchive.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRCompArchive.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRFile.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRDvdFile.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRDvdRipper.cpp"),
|
||||
Object(NonMatching, "JSystem/JKernel/JKRDvdAramRipper.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRDvdAramRipper.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JKernel/JKRDecomp.cpp"),
|
||||
],
|
||||
),
|
||||
@@ -980,9 +978,9 @@ config.libs = [
|
||||
JSystemLib(
|
||||
"JGadget",
|
||||
[
|
||||
Object(NonMatching, "JSystem/JGadget/binary.cpp"),
|
||||
Object(NonMatching, "JSystem/JGadget/linklist.cpp"),
|
||||
Object(Equivalent, "JSystem/JGadget/std-vector.cpp", extra_cflags=['-pragma "nosyminline off"']), # just weak order
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JGadget/binary.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JGadget/linklist.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/JGadget/std-vector.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
],
|
||||
),
|
||||
JSystemLib(
|
||||
@@ -1016,14 +1014,14 @@ config.libs = [
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DGrafContext.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DOrthoGraph.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DTevs.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DMaterial.cpp"),
|
||||
Object(Equivalent, "JSystem/J2DGraph/J2DMaterial.cpp", extra_cflags=['-pragma "nosyminline off"']), # weak func order
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DMatBlock.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DMaterialFactory.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DPrint.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DPrint.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DPane.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DScreen.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DWindow.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DPicture.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DPicture.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J2DGraph/J2DTextBox.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DWindowEx.cpp"),
|
||||
Object(NonMatching, "JSystem/J2DGraph/J2DPictureEx.cpp"),
|
||||
@@ -1045,7 +1043,7 @@ config.libs = [
|
||||
Object(NonMatching, "JSystem/J3DGraphBase/J3DShapeMtx.cpp"),
|
||||
Object(NonMatching, "JSystem/J3DGraphBase/J3DShapeDraw.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphBase/J3DShape.cpp"),
|
||||
Object(NonMatching, "JSystem/J3DGraphBase/J3DMaterial.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphBase/J3DMaterial.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(NonMatching, "JSystem/J3DGraphBase/J3DMatBlock.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphBase/J3DTevs.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphBase/J3DDrawBuffer.cpp"),
|
||||
@@ -1075,7 +1073,7 @@ config.libs = [
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DClusterLoader.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DModelLoader.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
Object(NonMatching, "JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DJointFactory.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DShapeFactory.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "JSystem/J3DGraphLoader/J3DAnmLoader.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||
|
||||
@@ -774,48 +774,12 @@ public:
|
||||
void setTexGenNum(u32 num) { mTexGenNum = num; }
|
||||
void setTexCoord(u32 i, J2DTexCoord coord) { mTexGenCoord[i] = coord; }
|
||||
void setTexMtx(u32 i, J2DTexMtx* mtx) { mTexMtx[i] = mtx; }
|
||||
J2DTexMtx& getTexMtx(u32 i) { return *mTexMtx[i]; }
|
||||
J2DTexCoord& getTexCoord(u32 i) { return mTexGenCoord[i]; }
|
||||
|
||||
/* 802EB620 */ virtual ~J2DTexGenBlock();
|
||||
}; // Size: 0x48
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
*
|
||||
*/
|
||||
struct J2DColorChanInfo {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x0 */ u8 field_0x1;
|
||||
/* 0x0 */ u8 field_0x2;
|
||||
/* 0x0 */ u8 field_0x3;
|
||||
};
|
||||
|
||||
inline u8 J2DCalcColorChanID(const J2DColorChanInfo& info) { return info.field_0x1; }
|
||||
extern const J2DColorChanInfo j2dDefaultColorChanInfo;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
*
|
||||
*/
|
||||
class J2DColorChan {
|
||||
public:
|
||||
/* 802EB280 */ J2DColorChan() {
|
||||
setColorChanInfo(j2dDefaultColorChanInfo);
|
||||
}
|
||||
J2DColorChan(const J2DColorChanInfo& info) {
|
||||
mColorChan = J2DCalcColorChanID(info);
|
||||
}
|
||||
|
||||
void setColorChanInfo(const J2DColorChanInfo& info) {
|
||||
mColorChan = J2DCalcColorChanID(info);
|
||||
}
|
||||
|
||||
u16 getMatSrc() const { return mColorChan & 1; }
|
||||
|
||||
private:
|
||||
/* 0x0 */ u16 mColorChan;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
*
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
#define J2DPICTURE_H
|
||||
|
||||
#include "JSystem/J2DGraph/J2DPane.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
|
||||
class J2DMaterial;
|
||||
class JUTPalette;
|
||||
class JUTTexture;
|
||||
struct ResTIMG;
|
||||
struct ResTLUT;
|
||||
|
||||
@@ -55,28 +55,42 @@ struct J2DScrnBlockPictureParameter {
|
||||
class J2DPicture : public J2DPane {
|
||||
public:
|
||||
/* 802FCFF0 */ virtual ~J2DPicture();
|
||||
/* 802FF2E8 */ virtual u16 getTypeID() const;
|
||||
/* 802FF2E8 */ virtual u16 getTypeID() const { return 18; }
|
||||
/* 802FDB28 */ virtual void drawSelf(f32, f32);
|
||||
/* 802FDB90 */ virtual void drawSelf(f32, f32, Mtx*);
|
||||
/* 802FF09C */ virtual bool isUsed(ResTIMG const*);
|
||||
/* 802FF63C */ virtual bool isUsed(ResFONT const*);
|
||||
/* 802FF65C */ virtual void rewriteAlpha();
|
||||
/* 802FCCDC */ virtual void initiate(ResTIMG const*, ResTLUT const*);
|
||||
/* 802FD098 */ virtual bool prepareTexture(u8);
|
||||
/* 801BDD40 */ virtual bool append(ResTIMG const*, f32);
|
||||
/* 802FF238 */ virtual bool append(ResTIMG const*, JUTPalette*, f32);
|
||||
/* 801BDD40 */ virtual bool append(ResTIMG const* param_0, f32 param_1) {
|
||||
return insert(param_0, mTextureNum, param_1);
|
||||
}
|
||||
/* 802FF238 */ virtual bool append(ResTIMG const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
return insert(param_0, param_1, mTextureNum, param_2);
|
||||
}
|
||||
/* 80020338 */ virtual bool append(char const* param_0, f32 param_1) {
|
||||
return insert(param_0, mTextureNum, param_1);
|
||||
}
|
||||
|
||||
/* 802FF2F0 */ virtual bool append(char const*, JUTPalette*, f32);
|
||||
/* 802FF208 */ virtual bool append(JUTTexture*, f32);
|
||||
/* 802FF3E0 */ virtual void prepend(ResTIMG const*, f32);
|
||||
/* 802FF3B0 */ virtual void prepend(ResTIMG const*, JUTPalette*, f32);
|
||||
/* 802FF380 */ virtual void prepend(char const*, f32);
|
||||
/* 802FF350 */ virtual void prepend(char const*, JUTPalette*, f32);
|
||||
/* 802FF320 */ virtual void prepend(JUTTexture*, f32);
|
||||
/* 801BDD70 */ virtual void insert(ResTIMG const*, u8, f32);
|
||||
/* 802FF2F0 */ virtual bool append(char const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
return insert(param_0, param_1, mTextureNum, param_2);
|
||||
}
|
||||
/* 802FF208 */ virtual bool append(JUTTexture* param_0, f32 param_1) {
|
||||
return insert(param_0, mTextureNum, param_1);
|
||||
}
|
||||
/* 802FF3E0 */ virtual void prepend(ResTIMG const* param_0, f32 param_1) {
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
/* 802FF3B0 */ virtual void prepend(ResTIMG const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
insert(param_0, param_1, 0, param_2);
|
||||
}
|
||||
/* 802FF380 */ virtual void prepend(char const* param_0, f32 param_1) {
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
/* 802FF350 */ virtual void prepend(char const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
insert(param_0, param_1, 0, param_2);
|
||||
}
|
||||
/* 802FF320 */ virtual void prepend(JUTTexture* param_0, f32 param_1) {
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
/* 801BDD70 */ virtual bool insert(ResTIMG const*, u8, f32);
|
||||
/* 802FD168 */ virtual bool insert(ResTIMG const*, JUTPalette*, u8, f32);
|
||||
/* 80020368 */ virtual bool insert(char const* param_0, u8 param_1, f32 param_2) {
|
||||
return insert(param_0, NULL, param_1, param_2);
|
||||
@@ -84,16 +98,40 @@ public:
|
||||
/* 802FD4B4 */ virtual bool insert(char const*, JUTPalette*, u8, f32);
|
||||
/* 802FD524 */ virtual bool insert(JUTTexture*, u8, f32);
|
||||
/* 802FD6F4 */ virtual bool remove(u8);
|
||||
/* 802FF410 */ virtual bool remove();
|
||||
/* 802FF410 */ virtual bool remove() { return remove(mTextureNum - 1); }
|
||||
/* 802FD814 */ virtual bool remove(JUTTexture*);
|
||||
/* 802FF4E0 */ virtual void draw(f32, f32, bool, bool, bool);
|
||||
/* 802FF448 */ virtual void draw(f32, f32, u8, bool, bool, bool);
|
||||
/* 802FF4E0 */ virtual void draw(f32 param_0, f32 param_1, bool param_2, bool param_3,
|
||||
bool param_4) {
|
||||
draw(param_0, param_1, 0, param_2, param_3, param_4);
|
||||
}
|
||||
/* 802FF448 */ virtual void draw(f32 param_0, f32 param_1, u8 param_2, bool param_3,
|
||||
bool param_4, bool param_5) {
|
||||
if (param_2 < mTextureNum && mTexture[param_2] != NULL) {
|
||||
draw(param_0, param_1, mTexture[param_2]->getWidth(), mTexture[param_2]->getHeight(),
|
||||
param_3, param_4, param_5);
|
||||
}
|
||||
}
|
||||
/* 802FDC70 */ virtual void draw(f32, f32, f32, f32, bool, bool, bool);
|
||||
/* 802FF588 */ virtual void drawOut(f32, f32, f32, f32, f32, f32);
|
||||
/* 802FF524 */ virtual void drawOut(f32, f32, f32, f32, f32, f32, f32, f32);
|
||||
/* 802FF588 */ virtual void drawOut(f32 param_0, f32 param_1, f32 param_2, f32 param_3,
|
||||
f32 param_4, f32 param_5) {
|
||||
if (mTexture[0] != NULL) {
|
||||
drawOut(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3),
|
||||
JGeometry::TBox2<f32>(param_4, param_5, param_4 + mTexture[0]->getWidth(),
|
||||
param_5 + mTexture[0]->getHeight()));
|
||||
}
|
||||
}
|
||||
/* 802FF524 */ virtual void drawOut(f32 param_0, f32 param_1, f32 param_2, f32 param_3,
|
||||
f32 param_4, f32 param_5, f32 param_6, f32 param_7) {
|
||||
drawOut(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3),
|
||||
JGeometry::TBox2<f32>(param_4, param_5, param_4 + param_6, param_5 + param_7));
|
||||
}
|
||||
/* 802FDF88 */ virtual void drawOut(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
|
||||
/* 802FF29C */ virtual void load(_GXTexMapID, u8);
|
||||
/* 802FF268 */ virtual void load(u8);
|
||||
/* 802FF29C */ virtual void load(_GXTexMapID param_0, u8 param_1) {
|
||||
if (param_1 < mTextureNum && param_1 < 2 && mTexture[param_1] != NULL) {
|
||||
mTexture[param_1]->load(param_0);
|
||||
}
|
||||
}
|
||||
/* 802FF268 */ virtual void load(u8 param_0) { load((_GXTexMapID)param_0, param_0); }
|
||||
/* 800202CC */ virtual void setBlendRatio(f32 param_0, f32 param_1) {
|
||||
setBlendColorRatio(param_0, param_1);
|
||||
setBlendAlphaRatio(param_0, param_1);
|
||||
@@ -105,7 +143,7 @@ public:
|
||||
/* 802FD9BC */ virtual const ResTIMG* changeTexture(ResTIMG const*, u8, JUTPalette*);
|
||||
/* 802FDAC8 */ virtual const ResTIMG* changeTexture(char const*, u8, JUTPalette*);
|
||||
/* 800539DC */ virtual JUTTexture* getTexture(u8) const;
|
||||
/* 802FF634 */ virtual u8 getTextureCount() const;
|
||||
/* 802FF634 */ virtual u8 getTextureCount() const { return mTextureNum; }
|
||||
/* 80053C6C */ virtual bool setBlack(JUtility::TColor i_black) {
|
||||
mBlack = i_black;
|
||||
return true;
|
||||
@@ -130,6 +168,9 @@ public:
|
||||
/* 802FE380 */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16,
|
||||
s16, Mtx*);
|
||||
/* 802FF100 */ virtual u8 getUsableTlut(u8);
|
||||
/* 802FF09C */ virtual bool isUsed(ResTIMG const*);
|
||||
/* 802FF63C */ virtual bool isUsed(ResFONT const* param_0) { return J2DPane::isUsed(param_0); }
|
||||
/* 802FF65C */ virtual void rewriteAlpha() {}
|
||||
|
||||
/* 802FC800 */ J2DPicture(u64, JGeometry::TBox2<f32> const&, ResTIMG const*, ResTLUT const*);
|
||||
/* 802FC708 */ J2DPicture(ResTIMG const*);
|
||||
|
||||
@@ -12,7 +12,16 @@ class J2DMaterial;
|
||||
*/
|
||||
class J2DPictureEx : public J2DPicture {
|
||||
public:
|
||||
enum stage_enum {};
|
||||
enum stage_enum {
|
||||
STAGE_0,
|
||||
STAGE_1,
|
||||
STAGE_2,
|
||||
STAGE_3,
|
||||
STAGE_4,
|
||||
STAGE_5,
|
||||
STAGE_6,
|
||||
STAGE_7,
|
||||
};
|
||||
|
||||
/* 803036EC */ J2DPictureEx(J2DPane*, JSURandomInputStream*, u32, J2DMaterial*);
|
||||
/* 803040E4 */ void insertCommon(u8, f32);
|
||||
@@ -57,7 +66,7 @@ public:
|
||||
/* 80306F94 */ virtual void prepend(char const*, f32);
|
||||
/* 80306F64 */ virtual void prepend(char const*, JUTPalette*, f32);
|
||||
/* 80306F34 */ virtual void prepend(JUTTexture*, f32);
|
||||
/* 80307058 */ virtual void insert(ResTIMG const*, u8, f32);
|
||||
/* 80307058 */ virtual bool insert(ResTIMG const*, u8, f32);
|
||||
/* 80303F34 */ virtual bool insert(ResTIMG const*, JUTPalette*, u8, f32);
|
||||
/* 80307024 */ virtual bool insert(char const*, u8, f32);
|
||||
/* 80303FD8 */ virtual bool insert(char const*, JUTPalette*, u8, f32);
|
||||
@@ -100,8 +109,9 @@ private:
|
||||
/* 0x160 */ f32 field_0x160[6]; // related to blend color ratio
|
||||
/* 0x178 */ f32 field_0x178[6]; // related to blend alpha ratio
|
||||
/* 0x190 */ u8 field_0x190;
|
||||
/* 0x194 */ int field_0x194;
|
||||
/* 0x198 */ int field_0x198;
|
||||
/* 0x194 */ J2DAnmVisibilityFull* field_0x194;
|
||||
/* 0x198 */ J2DAnmVtxColor* field_0x198;
|
||||
/* 0x19C */ u8 field_0x19c;
|
||||
};
|
||||
|
||||
#endif /* J2DPICTUREEX_H */
|
||||
|
||||
@@ -279,11 +279,11 @@ extern J2DTexCoordInfo const j2dDefaultTexCoordInfo[8];
|
||||
class J2DTexCoord {
|
||||
public:
|
||||
/* 802EB260 */ inline J2DTexCoord() {
|
||||
*(J2DTexCoordInfo*)this = j2dDefaultTexCoordInfo[0];
|
||||
mTexCoordInfo = j2dDefaultTexCoordInfo[0];
|
||||
}
|
||||
|
||||
J2DTexCoord(const J2DTexCoordInfo& info) {
|
||||
*(J2DTexCoordInfo*)this = info;
|
||||
mTexCoordInfo = info;
|
||||
}
|
||||
void setTexCoordInfo(const J2DTexCoordInfo& info) { mTexCoordInfo = info; }
|
||||
void setTexGenMtx(u8 texGenMtx) { mTexCoordInfo.mTexGenMtx = texGenMtx; }
|
||||
@@ -553,6 +553,43 @@ private:
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
*
|
||||
*/
|
||||
struct J2DColorChanInfo {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x0 */ u8 field_0x1;
|
||||
/* 0x0 */ u8 field_0x2;
|
||||
/* 0x0 */ u8 field_0x3;
|
||||
};
|
||||
|
||||
inline u8 J2DCalcColorChanID(const J2DColorChanInfo& info) { return info.field_0x1; }
|
||||
extern const J2DColorChanInfo j2dDefaultColorChanInfo;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
*
|
||||
*/
|
||||
class J2DColorChan {
|
||||
public:
|
||||
/* 802EB280 */ J2DColorChan() {
|
||||
setColorChanInfo(j2dDefaultColorChanInfo);
|
||||
}
|
||||
J2DColorChan(const J2DColorChanInfo& info) {
|
||||
mColorChan = J2DCalcColorChanID(info);
|
||||
}
|
||||
|
||||
void setColorChanInfo(const J2DColorChanInfo& info) {
|
||||
mColorChan = J2DCalcColorChanID(info);
|
||||
}
|
||||
|
||||
u16 getMatSrc() const { return mColorChan & 1; }
|
||||
|
||||
private:
|
||||
/* 0x0 */ u16 mColorChan;
|
||||
};
|
||||
|
||||
extern const GXColor j2dDefaultColInfo;
|
||||
extern const GXColorS10 j2dDefaultTevColor;
|
||||
extern const GXColor j2dDefaultTevKColor;
|
||||
|
||||
@@ -31,7 +31,8 @@ struct J3DGXColor : public GXColor {
|
||||
/* 8000E538 */ J3DGXColor() {}
|
||||
J3DGXColor(J3DGXColor const& other) { __memcpy(this, &other, sizeof(J3DGXColor)); }
|
||||
J3DGXColor(GXColor const& color) : GXColor(color) {}
|
||||
J3DGXColor& operator=(const GXColor& color) {
|
||||
// making color a reference breaks J3DColorBlockLightOff::initialize et al
|
||||
J3DGXColor& operator=(GXColor color) {
|
||||
*(GXColor*)this = color;
|
||||
return *this;
|
||||
}
|
||||
@@ -1054,8 +1055,8 @@ public:
|
||||
/* 80317414 */ virtual void setIndTexMtx(u32, J3DIndTexMtx const*) {}
|
||||
/* 8000E060 */ virtual void setIndTexMtx(u32, J3DIndTexMtx) {}
|
||||
/* 8000DF6C */ virtual J3DIndTexMtx* getIndTexMtx(u32) { return NULL; }
|
||||
/* 8000E020 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale) {}
|
||||
/* 80317418 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale const*) {}
|
||||
/* 8000E020 */ virtual void setIndTexCoordScale(u32, J3DIndTexCoordScale) {}
|
||||
/* 8000DF64 */ virtual J3DIndTexCoordScale* getIndTexCoordScale(u32) { return NULL; }
|
||||
/* 8031726C */ virtual ~J3DIndBlock() {}
|
||||
};
|
||||
@@ -1066,9 +1067,9 @@ public:
|
||||
*/
|
||||
class J3DIndBlockNull : public J3DIndBlock {
|
||||
public:
|
||||
/* 803173A0 */ virtual void reset(J3DIndBlock*) {}
|
||||
/* 80317398 */ virtual void diff(u32) {}
|
||||
/* 8031739C */ virtual void load() {}
|
||||
/* 803173A0 */ virtual void reset(J3DIndBlock*) {}
|
||||
/* 803173A4 */ virtual u32 getType() { return 'IBLN'; }
|
||||
/* 803173B0 */ virtual ~J3DIndBlockNull() {}
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ struct J3DTexCoord : public J3DTexCoordInfo {
|
||||
u8 getTexGenType() const { return mTexGenType; }
|
||||
u8 getTexGenSrc() const { return mTexGenSrc; }
|
||||
u8 getTexGenMtx() const { return mTexGenMtx; }
|
||||
u16 getTexMtxReg() const { return mTexMtxReg & 0xff; }
|
||||
u32 getTexMtxReg() const { return mTexMtxReg & 0xff; }
|
||||
void setTexGenMtx(u8 param_1) { mTexGenMtx = param_1; }
|
||||
void setTexMtxReg(u16 reg) { mTexMtxReg = reg; }
|
||||
J3DTexCoord& operator=(const J3DTexCoord& other) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define JASBNKPARSER_H
|
||||
|
||||
#include "JSystem/JAudio2/JASOscillator.h"
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
|
||||
class JASBank;
|
||||
class JASBasicBank;
|
||||
@@ -53,24 +54,85 @@ namespace JASBNKParser {
|
||||
/* 0xC */ u32 mOffsets[0];
|
||||
};
|
||||
|
||||
/* 80299600 */ static TChunk* findChunk(void const*, u32);
|
||||
/* 8029963C */ static JASBasicBank* createBasicBank(void const*, JKRHeap*);
|
||||
/* 80299600 */ TChunk* findChunk(void const*, u32);
|
||||
/* 8029963C */ JASBasicBank* createBasicBank(void const*, JKRHeap*);
|
||||
};
|
||||
|
||||
namespace Ver0 {
|
||||
struct THeader {};
|
||||
template<typename T>
|
||||
struct TOffset {
|
||||
/* 0x0 */ u32 offset;
|
||||
T* ptr(void const* stream) const { return JSUConvertOffsetToPtr<T>(stream, offset); }
|
||||
};
|
||||
|
||||
struct TOsc {};
|
||||
struct TOsc {
|
||||
/* 0x00 */ u8 mTarget;
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ TOffset<JASOscillator::Point> mPointOffset;
|
||||
/* 0x0C */ TOffset<JASOscillator::Point> field_0xc;
|
||||
/* 0x10 */ f32 mScale;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
};
|
||||
|
||||
/* 80299A3C */ static JASBasicBank* createBasicBank(void const*, JKRHeap*);
|
||||
/* 80299E68 */ static void findOscPtr(JASBasicBank*, THeader const*, TOsc const*);
|
||||
/* 80299F8C */ static void getOscTableEndPtr(JASOscillator::Point const*);
|
||||
struct TVmap {
|
||||
/* 0x00 */ u8 field_0x0[4];
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
};
|
||||
|
||||
struct TKeymap {
|
||||
/* 0x00 */ u8 mHighKey;
|
||||
/* 0x01 */ u8 field_0x1[7];
|
||||
/* 0x08 */ TOffset<TVmap> mVmapOffset;
|
||||
};
|
||||
|
||||
struct TInst {
|
||||
/* 0x00 */ u8 field_0x0[8];
|
||||
/* 0x08 */ f32 mVolume;
|
||||
/* 0x0C */ f32 mPitch;
|
||||
/* 0x10 */ TOffset<TOsc> mOscOffset[2];
|
||||
/* 0x18 */ u8 field_0x18[0x10];
|
||||
/* 0x28 */ u32 mKeyRegionCount;
|
||||
/* 0x2C */ TOffset<TKeymap> mKeymapOffset[0];
|
||||
};
|
||||
|
||||
struct TPmap {
|
||||
/* 0x00 */ f32 mVolume;
|
||||
/* 0x04 */ f32 mPitch;
|
||||
/* 0x08 */ u8 field_0x8[0xc];
|
||||
/* 0x14 */ TOffset<TVmap> mVmapOffset;
|
||||
};
|
||||
|
||||
struct TPerc {
|
||||
/* 0x000 */ u32 mMagic;
|
||||
/* 0x000 */ u8 field_0x0[0x84];
|
||||
/* 0x088 */ TOffset<TPmap> mPmapOffset[0x80];
|
||||
/* 0x288 */ s8 mPan[0x80];
|
||||
/* 0x308 */ u16 mRelease[0x80];
|
||||
};
|
||||
|
||||
struct TOffsetData {
|
||||
/* 0x000 */ u8 field_0x20[4];
|
||||
/* 0x004 */ TOffset<TInst> mInstOffset[0x80];
|
||||
/* 0x204 */ u8 field_0x204[0x190];
|
||||
/* 0x394 */ TOffset<TPerc> mPercOffset[12];
|
||||
};
|
||||
|
||||
struct THeader {
|
||||
/* 0x00 */ u8 field_0x0[0x20];
|
||||
/* 0x20 */ TOffsetData mOffsets;
|
||||
};
|
||||
|
||||
/* 80299A3C */ JASBasicBank* createBasicBank(void const*, JKRHeap*);
|
||||
/* 80299E68 */ JASOscillator::Data* findOscPtr(JASBasicBank*, THeader const*, TOsc const*);
|
||||
/* 80299F8C */ JASOscillator::Point const* getOscTableEndPtr(JASOscillator::Point const*);
|
||||
};
|
||||
|
||||
/* 80299538 */ static JASBank* createBank(void const*, JKRHeap*);
|
||||
/* 80299558 */ static JASBasicBank* createBasicBank(void const*, JKRHeap*);
|
||||
/* 80299538 */ JASBank* createBank(void const*, JKRHeap*);
|
||||
/* 80299558 */ JASBasicBank* createBasicBank(void const*, JKRHeap*);
|
||||
|
||||
inline static u32 getBankNumber(const void* param_0) { return ((u32*)param_0)[2]; }
|
||||
inline u32 getBankNumber(const void* param_0) { return ((u32*)param_0)[2]; }
|
||||
|
||||
extern u32 sUsedHeapSize;
|
||||
};
|
||||
|
||||
@@ -68,13 +68,11 @@ namespace JASThreadingModel {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template <typename A0>
|
||||
struct ObjectLevelLockable {
|
||||
// Should be templated on the chunk memory but couldn't initialize it inside the class itself
|
||||
//template <typename A0>
|
||||
struct Lock {
|
||||
Lock(OSMutex* mutex) {
|
||||
mMutex = mutex;
|
||||
Lock(A0 const& mutex) {
|
||||
mMutex = (A0*)&mutex;
|
||||
OSLockMutex(mMutex);
|
||||
}
|
||||
|
||||
@@ -82,7 +80,7 @@ namespace JASThreadingModel {
|
||||
OSUnlockMutex(mMutex);
|
||||
}
|
||||
|
||||
OSMutex* mMutex;
|
||||
A0* mMutex;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -105,8 +103,8 @@ namespace JASKernel { JKRHeap* getSystemHeap(); };
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
*/
|
||||
template<u32 ChunkSize, typename T>
|
||||
class JASMemChunkPool {
|
||||
template<u32 ChunkSize, template<typename> class T>
|
||||
class JASMemChunkPool : public OSMutex {
|
||||
struct MemoryChunk {
|
||||
MemoryChunk(MemoryChunk* nextChunk) {
|
||||
mNextChunk = nextChunk;
|
||||
@@ -156,7 +154,7 @@ class JASMemChunkPool {
|
||||
};
|
||||
public:
|
||||
JASMemChunkPool() {
|
||||
OSInitMutex(&mMutex);
|
||||
OSInitMutex(this);
|
||||
field_0x18 = NULL;
|
||||
createNewChunk();
|
||||
}
|
||||
@@ -185,7 +183,7 @@ public:
|
||||
}
|
||||
|
||||
void* alloc(u32 size) {
|
||||
typename T::Lock lock(&mMutex);
|
||||
typename T<JASMemChunkPool<ChunkSize, T> >::Lock lock(*this);
|
||||
if (field_0x18->getFreeSize() < size) {
|
||||
if (ChunkSize < size) {
|
||||
return NULL;
|
||||
@@ -198,7 +196,7 @@ public:
|
||||
}
|
||||
|
||||
void free(void* ptr) {
|
||||
typename T::Lock lock(&mMutex);
|
||||
typename T<JASMemChunkPool<ChunkSize, T> >::Lock lock(*this);
|
||||
MemoryChunk* chunk = field_0x18;
|
||||
MemoryChunk* prevChunk = NULL;
|
||||
while (chunk != NULL) {
|
||||
@@ -216,7 +214,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* 0x00 */ OSMutex mMutex;
|
||||
/* 0x18 */ MemoryChunk* field_0x18;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "JSystem/JAudio2/JASSeqCtrl.h"
|
||||
#include "JSystem/JAudio2/JASTrackPort.h"
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "global.h"
|
||||
|
||||
struct JASSoundParams;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ struct TParseData_aligned : public TParseData {
|
||||
|
||||
// Base for header and/or block parsing
|
||||
struct TParse_header_block {
|
||||
virtual ~TParse_header_block();
|
||||
virtual ~TParse_header_block() = 0;
|
||||
|
||||
virtual bool parseHeader_next(const void** ppData_inout, u32* puBlock_out, u32 arg2) = 0;
|
||||
virtual bool parseBlock_next(const void** ppData_inout, u32* puData_out, u32 arg2) = 0;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define LINKLIST_H
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <iterator.h>
|
||||
|
||||
namespace JGadget {
|
||||
struct TLinkListNode {
|
||||
@@ -146,6 +147,12 @@ struct TLinkList : public TNodeLinkList {
|
||||
T* operator->() const { return Element_toValue(base.operator->()); }
|
||||
T& operator*() const { return *operator->(); }
|
||||
|
||||
typedef s32 difference_type;
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::bidirectional_iterator_tag iterator_category;
|
||||
|
||||
public:
|
||||
/* 0x00 */ TNodeLinkList::iterator base;
|
||||
};
|
||||
@@ -221,7 +228,7 @@ struct TLinkList : public TNodeLinkList {
|
||||
|
||||
template <typename T, int I>
|
||||
struct TLinkList_factory : public TLinkList<T, I> {
|
||||
virtual ~TLinkList_factory() {}
|
||||
inline virtual ~TLinkList_factory() = 0;
|
||||
virtual T* Do_create() = 0;
|
||||
virtual void Do_destroy(T*) = 0;
|
||||
void Clear_destroy() {
|
||||
@@ -233,6 +240,9 @@ struct TLinkList_factory : public TLinkList<T, I> {
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, int I>
|
||||
TLinkList_factory<T, I>::~TLinkList_factory() {}
|
||||
|
||||
template <typename T>
|
||||
struct TEnumerator {
|
||||
inline TEnumerator(T _current, T _end)
|
||||
|
||||
@@ -2,9 +2,24 @@
|
||||
#define SEARCH_H
|
||||
|
||||
#include "dolphin/os.h"
|
||||
#include <iterator.h>
|
||||
#include <functional.h>
|
||||
#include <algorithm.h>
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
namespace search {
|
||||
|
||||
template <typename T>
|
||||
struct TExpandStride_ {};
|
||||
|
||||
template <>
|
||||
struct TExpandStride_<s32> {
|
||||
static s32 get(s32 n) { return n << 3; }
|
||||
};
|
||||
|
||||
} // namespace search
|
||||
|
||||
//! @todo: mangled name isn't correct, fix this
|
||||
//! Current: toValueFromIndex<PFdd_d>__7JGadgetFiPCPFdd_dUlRCPFdd_d
|
||||
//! Target: toValueFromIndex<PFdd_d>__7JGadgetFiPCPFdd_dUlRCPFdd_d_RCPFdd_d
|
||||
@@ -14,6 +29,92 @@ inline const T& toValueFromIndex(int idx, const T* pValue, u32 count, const T& f
|
||||
return (idx >= count) ? fallback : pValue[idx];
|
||||
}
|
||||
|
||||
template <typename Iterator, typename T, typename Predicate>
|
||||
inline Iterator findUpperBound_binary_all(Iterator first, Iterator last, const T& val, Predicate p) {
|
||||
return upper_bound(first, last, val, p);
|
||||
}
|
||||
|
||||
template <typename Iterator, typename T, typename Predicate>
|
||||
inline Iterator findUpperBound_binary_begin(Iterator first, Iterator last, const T& val, Predicate p) {
|
||||
if (first == last) {
|
||||
return last;
|
||||
}
|
||||
|
||||
typedef typename std::iterator_traits<Iterator>::difference_type difference_type;
|
||||
difference_type dist = std::distance(first, last);
|
||||
difference_type stride = 1;
|
||||
search::TExpandStride_<difference_type> expand;
|
||||
Iterator i = first;
|
||||
|
||||
while (true) {
|
||||
if (p(val, *i)) {
|
||||
if (stride == 1) {
|
||||
return i;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
first = i;
|
||||
dist -= stride;
|
||||
if (dist <= 0) {
|
||||
i = last;
|
||||
break;
|
||||
}
|
||||
i += stride;
|
||||
stride = expand.get(stride);
|
||||
}
|
||||
|
||||
return findUpperBound_binary_all(first, i, val, p);
|
||||
}
|
||||
|
||||
template <typename Iterator, typename T, typename Predicate>
|
||||
inline Iterator findUpperBound_binary_end(Iterator first, Iterator last, const T& val, Predicate p) {
|
||||
if (first == last) {
|
||||
return last;
|
||||
}
|
||||
|
||||
typedef typename std::iterator_traits<Iterator>::difference_type difference_type;
|
||||
--last;
|
||||
difference_type dist = std::distance(first, last);
|
||||
difference_type stride = 1;
|
||||
search::TExpandStride_<difference_type> expand;
|
||||
Iterator i = last;
|
||||
|
||||
while (true) {
|
||||
if (!p(val, *i)) {
|
||||
if (stride == 1) {
|
||||
return ++i;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
last = i;
|
||||
dist -= stride;
|
||||
if (dist <= 0) {
|
||||
i = first;
|
||||
break;
|
||||
}
|
||||
i -= stride;
|
||||
stride = expand.get(stride);
|
||||
}
|
||||
|
||||
return findUpperBound_binary_all(i, ++last, val, p);
|
||||
}
|
||||
|
||||
template <typename Iterator, typename T, typename Predicate>
|
||||
Iterator findUpperBound_binary_current(Iterator first, Iterator last, Iterator current, const T& val, Predicate p) {
|
||||
return current == last || p(val, *current) ?
|
||||
findUpperBound_binary_end(first, current, val, p)
|
||||
: findUpperBound_binary_begin(current, last, val, p);
|
||||
}
|
||||
|
||||
// NONMATCHING stack alloc
|
||||
template <typename Iterator, typename T>
|
||||
Iterator findUpperBound_binary_current(Iterator first, Iterator last, Iterator current, const T& val) {
|
||||
std::less<T> less;
|
||||
return findUpperBound_binary_current(first, last, current, val, less);
|
||||
}
|
||||
|
||||
} // namespace JGadget
|
||||
|
||||
#endif /* SEARCH_H */
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define STD_VECTOR_H
|
||||
|
||||
#include "JSystem/JGadget/std-memory.h"
|
||||
#include "algorithm.h"
|
||||
#include "msl_memory.h"
|
||||
#include <algorithm.h>
|
||||
#include <msl_memory.h>
|
||||
|
||||
namespace JGadget {
|
||||
namespace vector {
|
||||
@@ -41,12 +41,6 @@ struct TVector {
|
||||
mAllocator.deallocate(pBegin_, 0);
|
||||
}
|
||||
|
||||
T* insert(T* pos, const T& val) {
|
||||
u32 diff = (int)((u32)pos - (u32)begin()) / 4;
|
||||
insert(pos, 1, val);
|
||||
return pBegin_ + diff;
|
||||
}
|
||||
|
||||
void insert(T* pos, u32 count, const T& val) {
|
||||
if (count != 0) {
|
||||
T* ptr = Insert_raw(pos, count);
|
||||
@@ -110,11 +104,17 @@ struct TVector {
|
||||
return endOfCopy;
|
||||
}
|
||||
|
||||
T* begin() { return pBegin_; }
|
||||
T* insert(T* pos, const T& val) {
|
||||
u32 diff = (int)((u32)pos - (u32)begin()) / 4;
|
||||
insert(pos, 1, val);
|
||||
return pBegin_ + diff;
|
||||
}
|
||||
|
||||
T* end() { return pEnd_; }
|
||||
T* begin() const { return pBegin_; }
|
||||
|
||||
u32 size() {
|
||||
T* end() const { return pEnd_; }
|
||||
|
||||
u32 size() const {
|
||||
if (pBegin_ == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -171,6 +171,23 @@ struct TVector_pointer_void : public TVector<void*, TAllocator<void*> > {
|
||||
void clear() { erase(begin(), end()); }
|
||||
void push_back(const void*& value) { insert(end(), (void* const&)value); }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct TVector_pointer : TVector_pointer_void {
|
||||
TVector_pointer(const TAllocator<void*>& allocator) : TVector_pointer_void(allocator) {}
|
||||
~TVector_pointer() {}
|
||||
|
||||
const T* begin() const { return (const T*)TVector_pointer_void::begin(); }
|
||||
T* begin() { return (T*)TVector_pointer_void::begin(); }
|
||||
|
||||
const T* end() const { return (const T*)TVector_pointer_void::end(); }
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace JGadget
|
||||
|
||||
#endif /* STD_VECTOR_H */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef VECTOR_H
|
||||
#define VECTOR_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
extern u8 data_804511E0;
|
||||
extern u8 lit_569[];
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef u32 (*ExtendFunc)(u32, u32, u32);
|
||||
template <typename T>
|
||||
struct TAllocator {
|
||||
static TAllocator get() {}
|
||||
inline TAllocator() { _0 = lit_569[0]; }
|
||||
inline TAllocator(u8 param_0) { _0 = param_0; }
|
||||
/* 0x0 */ u8 _0;
|
||||
/* 0x4 */ u32 _4;
|
||||
/* 0x8 */ u32 _8;
|
||||
@@ -83,4 +83,4 @@ struct TVector_pointer : TVector_pointer_void {
|
||||
|
||||
} // namespace JGadget
|
||||
|
||||
#endif /* VECTOR_H */
|
||||
#endif /* VECTOR_H */
|
||||
|
||||
@@ -46,8 +46,8 @@ template<>
|
||||
struct TUtil<double> {
|
||||
static inline double epsilon() { return 32.0f * FLT_EPSILON; }
|
||||
static inline double one() { return 1.0; }
|
||||
static inline double atan2(double x, double y) { return atan2(x, y); }
|
||||
static inline double asin(double x) { return asin(x); }
|
||||
static inline double atan2(double x, double y) { return ::atan2(x, y); }
|
||||
static inline double asin(double x) { return ::asin(x); }
|
||||
static inline double halfPI() { return 1.5707963267948966; }
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JKernel/JKRArchive.h"
|
||||
|
||||
class JKRAramBlock;
|
||||
class JKRDvdFile;
|
||||
class JKRFile;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jkernel
|
||||
@@ -31,7 +31,7 @@ private:
|
||||
/* 0x00 */ // vtable
|
||||
/* 0x04 */ // JKRArchive
|
||||
/* 0x64 */ JKRAramBlock* mBlock;
|
||||
/* 0x68 */ JKRDvdFile* mDvdFile;
|
||||
/* 0x68 */ JKRFile* mDvdFile;
|
||||
}; // Size = 0x6C
|
||||
|
||||
#endif /* JKRARAMARCHIVE_H */
|
||||
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
static bool syncAram(JKRADCommand*, int);
|
||||
|
||||
static void setSZSBufferSize(u32 size) { sSZSBufferSize = size; }
|
||||
static bool isErrorRetry() { return errorRetry; }
|
||||
|
||||
// TODO: fix type
|
||||
static JSUList<JKRADCommand> sDvdAramAsyncList;
|
||||
|
||||
@@ -45,8 +45,8 @@ struct data {
|
||||
|
||||
char* get() const { return (char*)getRaw(); }
|
||||
u8 get_formSupplement() const { return *(u8*)(get() + 0xB); }
|
||||
u16 get_number() const { return *(u16*)(get() + 0x8); }
|
||||
char* getContent() const { return (char*)get() + 0x10; }
|
||||
int get_number() const { return *(u16*)(get() + 0x8); }
|
||||
u32* getContent() const { return (u32*)((u32)getRaw() + 0x10); }
|
||||
u8 get_form() const { return *(u8*)(get() + 0xA) & 0xF; }
|
||||
bool get_isOrdered() const { return *(u8*)(get() + 0xA) & 0xF0; }
|
||||
};
|
||||
|
||||
@@ -108,8 +108,10 @@ struct TProcessor {
|
||||
/* 802A82F4 */ static bool process_onCharacterEnd_select_(JMessage::TProcessor*);
|
||||
/* 802A833C */ static const char* process_onSelect_limited_(JMessage::TProcessor*);
|
||||
/* 802A8358 */ static const char* process_onSelect_(JMessage::TProcessor*);
|
||||
/* 802A8C24 */ const char* on_message(u32) const;
|
||||
/* 802A8C44 */ const char* getMessageText_messageCode(u32) const;
|
||||
/* 802A8C24 */ const char* on_message(u32 param_0) const { return getMessageText_messageCode(param_0); }
|
||||
/* 802A8C44 */ const char* getMessageText_messageCode(u32 param_0) const {
|
||||
return getMessageText_messageCode(param_0 >> 0x10, param_0 & 0xFFFF);
|
||||
}
|
||||
|
||||
/* 802A7B48 */ virtual ~TProcessor();
|
||||
/* 802A7FC0 */ virtual void do_reset();
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "JSystem/JMessage/data.h"
|
||||
#include "JSystem/JMessage/locale.h"
|
||||
#include "JSystem/JStudio/JStudio/fvb-data.h"
|
||||
|
||||
namespace JMessage {
|
||||
|
||||
@@ -114,7 +113,7 @@ struct TResourceContainer {
|
||||
static JMessage::locale::parseCharacter_function sapfnParseCharacter_[5];
|
||||
|
||||
/* 0x00 */ u8 mEncodingType;
|
||||
/* 0x04 */ int (*pfnParseCharacter_)(const char** string);
|
||||
/* 0x04 */ JMessage::locale::parseCharacter_function pfnParseCharacter_;
|
||||
/* 0x08 */ TCResource resContainer_;
|
||||
/* 0x18 */ TResource_color resColor_;
|
||||
};
|
||||
|
||||
@@ -112,7 +112,7 @@ struct data {
|
||||
struct TObject_TxyzRy : public TObject {
|
||||
/* 80280F60 */ TObject_TxyzRy(JStudio::ctb::data::TParse_TBlock const&);
|
||||
|
||||
/* 80281554 */ virtual ~TObject_TxyzRy();
|
||||
/* 80281554 */ virtual ~TObject_TxyzRy() {}
|
||||
/* 80280FBC */ virtual int getScheme() const;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef FUNCTIONVALUE_H
|
||||
#define FUNCTIONVALUE_H
|
||||
|
||||
#include "JSystem/JGadget/search.h"
|
||||
#include "JSystem/JGadget/vector.h"
|
||||
#include "global.h"
|
||||
#include "JSystem/JGadget/std-vector.h"
|
||||
#include "dolphin/os.h"
|
||||
#include <iterator.h>
|
||||
|
||||
extern u8 lit_569;
|
||||
|
||||
namespace JStudio {
|
||||
|
||||
@@ -66,20 +68,19 @@ public:
|
||||
: TFunctionValueAttributeSet_const(refer, range, interp) {}
|
||||
|
||||
TFunctionValueAttribute_refer* refer_get() const {
|
||||
return static_cast<const TFunctionValueAttributeSet_const*>(this)->refer_get();
|
||||
return TFunctionValueAttributeSet_const::refer_get();
|
||||
}
|
||||
TFunctionValueAttribute_range* range_get() const {
|
||||
return static_cast<const TFunctionValueAttributeSet_const*>(this)->range_get();
|
||||
return TFunctionValueAttributeSet_const::range_get();
|
||||
}
|
||||
TFunctionValueAttribute_interpolate* interpolate_get() const {
|
||||
return static_cast<const TFunctionValueAttributeSet_const*>(this)->interpolate_get();
|
||||
return TFunctionValueAttributeSet_const::interpolate_get();
|
||||
}
|
||||
};
|
||||
|
||||
class TFunctionValueAttribute_refer : public JGadget::TVector_pointer<TFunctionValue*> {
|
||||
public:
|
||||
TFunctionValueAttribute_refer() :
|
||||
JGadget::TVector_pointer<TFunctionValue*>(JGadget::TAllocator<void*>()) {}
|
||||
inline TFunctionValueAttribute_refer();
|
||||
~TFunctionValueAttribute_refer() {}
|
||||
|
||||
/* 802816E8 */ void refer_initialize();
|
||||
@@ -191,7 +192,7 @@ 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);
|
||||
|
||||
/* 80281D5C */ TFunctionValue_composite();
|
||||
@@ -227,7 +228,7 @@ public:
|
||||
TData data;
|
||||
};
|
||||
|
||||
class TFunctionValue_transition : TFunctionValue,
|
||||
class TFunctionValue_transition : public TFunctionValue,
|
||||
TFunctionValueAttribute_range,
|
||||
TFunctionValueAttribute_interpolate {
|
||||
public:
|
||||
@@ -252,7 +253,7 @@ private:
|
||||
/* 0x50 */ f64 _50;
|
||||
};
|
||||
|
||||
class TFunctionValue_list : TFunctionValue,
|
||||
class TFunctionValue_list : public TFunctionValue,
|
||||
TFunctionValueAttribute_range,
|
||||
TFunctionValueAttribute_interpolate {
|
||||
public:
|
||||
@@ -303,25 +304,44 @@ private:
|
||||
/* 0x58 */ update_INTERPOLATE pfnUpdate_;
|
||||
};
|
||||
|
||||
class TFunctionValue_list_parameter : TFunctionValue,
|
||||
class TFunctionValue_list_parameter : public TFunctionValue,
|
||||
TFunctionValueAttribute_range,
|
||||
TFunctionValueAttribute_interpolate {
|
||||
public:
|
||||
struct TIterator_data_ {
|
||||
TIterator_data_(const f32* value) : value_(value) {}
|
||||
TIterator_data_(const TIterator_data_& other) : value_(other.value_) {}
|
||||
|
||||
void operator=(const TIterator_data_& rhs) { value_ = rhs.value_; }
|
||||
TIterator_data_& operator--() {
|
||||
value_ -= 2;
|
||||
return *this;
|
||||
}
|
||||
TIterator_data_& operator-=(s32 n) {
|
||||
value_ -= n * 2;
|
||||
return *this;
|
||||
}
|
||||
s32 operator-(const TIterator_data_& other) {
|
||||
return (u32)(value_ - other.value_) >> 1;
|
||||
}
|
||||
TIterator_data_& operator++() {
|
||||
value_ += 2;
|
||||
return *this;
|
||||
}
|
||||
TIterator_data_& operator+=(s32 n) {
|
||||
value_ += n * 2;
|
||||
return *this;
|
||||
}
|
||||
friend bool operator==(const TIterator_data_& lhs, const TIterator_data_& rhs) { return lhs.value_ == rhs.value_; }
|
||||
f32 operator*() { return *value_; }
|
||||
|
||||
const f32* get() const { return value_; }
|
||||
void set(const f32* value) { value_ = value; }
|
||||
|
||||
const f32* value_;
|
||||
|
||||
typedef s32 difference_type;
|
||||
typedef f32 value_type;
|
||||
typedef const f32* pointer;
|
||||
typedef const f32& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
typedef f64 (*update_INTERPOLATE)(const TFunctionValue_list_parameter&, f64);
|
||||
|
||||
@@ -358,7 +378,7 @@ private:
|
||||
/* 0x58 */ update_INTERPOLATE pfnUpdate_;
|
||||
};
|
||||
|
||||
class TFunctionValue_hermite : TFunctionValue, TFunctionValueAttribute_range {
|
||||
class TFunctionValue_hermite : public TFunctionValue, TFunctionValueAttribute_range {
|
||||
public:
|
||||
struct TIterator_data_ {
|
||||
TIterator_data_(const TFunctionValue_hermite& rParent, const f32* value) {
|
||||
@@ -374,14 +394,36 @@ public:
|
||||
}
|
||||
|
||||
friend bool operator==(const TIterator_data_& lhs, const TIterator_data_& rhs) { return lhs.value_ == rhs.value_; }
|
||||
f32 operator*() { return *value_; }
|
||||
|
||||
TIterator_data_& operator--() {
|
||||
value_ -= size_;
|
||||
return *this;
|
||||
}
|
||||
TIterator_data_& operator-=(s32 n) {
|
||||
value_ -= size_ * n;
|
||||
return *this;
|
||||
}
|
||||
s32 operator-(const TIterator_data_& other) {
|
||||
return (value_ - other.value_) / size_;
|
||||
}
|
||||
TIterator_data_& operator++() {
|
||||
value_ += size_;
|
||||
return *this;
|
||||
}
|
||||
TIterator_data_& operator+=(s32 n) {
|
||||
value_ += size_ * n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/* 0x00 */ const f32* value_;
|
||||
/* 0x04 */ u32 size_;
|
||||
|
||||
typedef s32 difference_type;
|
||||
typedef f32 value_type;
|
||||
typedef const f32* pointer;
|
||||
typedef const f32& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
/* 802832C4 */ TFunctionValue_hermite();
|
||||
|
||||
@@ -36,10 +36,10 @@ public:
|
||||
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) {}
|
||||
|
||||
|
||||
@@ -26,7 +26,10 @@ typedef enum TEComposite {
|
||||
/* 0x8 */ COMPOSITE_ENUM_SIZE,
|
||||
};
|
||||
|
||||
typedef const void* (*CompositeOperation)(TFunctionValue_composite::TData);
|
||||
struct CompositeOperation {
|
||||
TFunctionValue_composite::CompositeFunc composite;
|
||||
TFunctionValue_composite::TData (*getCompositeData)(const void*);
|
||||
};
|
||||
|
||||
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 {
|
||||
|
||||
@@ -44,16 +44,16 @@ namespace math {
|
||||
return VECMag(&local_18);
|
||||
}
|
||||
|
||||
inline void getFromTransformation_S(CMtxP param_1, Vec* param_2) {
|
||||
param_2->x = getFromTransformation_Sn(param_1, 0);
|
||||
param_2->y = getFromTransformation_Sn(param_1, 1);
|
||||
param_2->z = getFromTransformation_Sn(param_1, 2);
|
||||
inline void getFromTransformation_S(Vec* param_1, CMtxP param_2) {
|
||||
param_1->x = getFromTransformation_Sn(param_2, 0);
|
||||
param_1->y = getFromTransformation_Sn(param_2, 1);
|
||||
param_1->z = getFromTransformation_Sn(param_2, 2);
|
||||
}
|
||||
|
||||
inline void getFromTransformation_T(CMtxP param_1, Vec* param_2) {
|
||||
param_2->x = param_1[0][3];
|
||||
param_2->y = param_1[1][3];
|
||||
param_2->z = param_1[2][3];
|
||||
inline void getFromTransformation_T(Vec* param_1, CMtxP param_2) {
|
||||
param_1->x = param_2[0][3];
|
||||
param_1->y = param_2[1][3];
|
||||
param_1->z = param_2[2][3];
|
||||
}
|
||||
|
||||
inline void getTransformation_T(Mtx mtx, const Vec* param_2) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define JSTUDIO_OBJECT_H
|
||||
|
||||
#include "JSystem/JStudio/JStudio/jstudio-control.h"
|
||||
#include "global.h"
|
||||
#include "limits.h"
|
||||
#include "math.h"
|
||||
|
||||
@@ -27,7 +28,7 @@ struct TVariableValue {
|
||||
/* 80285E0C */ virtual ~TOutput() = 0;
|
||||
};
|
||||
|
||||
struct TOutput_none_ {
|
||||
struct TOutput_none_ : TOutput {
|
||||
/* 80285F6C */ ~TOutput_none_();
|
||||
/* 80285FCC */ void operator()(f32, JStudio::TAdaptor*) const;
|
||||
};
|
||||
@@ -36,7 +37,7 @@ struct TVariableValue {
|
||||
/* 80285EB8 */ static void update_immediate_(JStudio::TVariableValue*, f64);
|
||||
/* 80285ECC */ static void update_time_(JStudio::TVariableValue*, f64);
|
||||
/* 80285F08 */ static void update_functionValue_(JStudio::TVariableValue*, f64);
|
||||
/* 8028B568 */ TVariableValue() : field_0x4(0), field_0x8(NULL), pOutput_((TOutput*)soOutput_none_) {}
|
||||
/* 8028B568 */ TVariableValue() : field_0x4(0), field_0x8(NULL), pOutput_(&soOutput_none_) {}
|
||||
|
||||
void setValue_immediate(f32 value) {
|
||||
field_0x8 = &update_immediate_;
|
||||
@@ -83,10 +84,10 @@ struct TVariableValue {
|
||||
}
|
||||
|
||||
void setOutput(const TOutput* param_1) {
|
||||
pOutput_ = (param_1 != NULL) ? param_1 : (TOutput*)soOutput_none_;
|
||||
pOutput_ = (param_1 != NULL) ? param_1 : &soOutput_none_;
|
||||
}
|
||||
|
||||
static u8 soOutput_none_[4 + 4 /* padding */];
|
||||
static TOutput_none_ soOutput_none_;
|
||||
|
||||
/* 0x00 */ f32 mValue;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
|
||||
@@ -15,17 +15,20 @@ public:
|
||||
inline const u8* getID() const { return (const u8*)mID; }
|
||||
inline u32 getIDSize() const { return mID_size; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
/* 0x00 */ const void* mID;
|
||||
/* 0x04 */ u32 mID_size;
|
||||
};
|
||||
|
||||
struct TPRObject_ID_equal : public TIDData {
|
||||
TPRObject_ID_equal(const void* id, u32 id_size) : TIDData(id, id_size) {}
|
||||
};
|
||||
|
||||
struct TObject_ID : public TIDData {
|
||||
TObject_ID(const void* id, u32 id_size) : TIDData(id, id_size) {}
|
||||
TIDData const& getIDData() const { return *this; }
|
||||
};
|
||||
|
||||
struct TPRObject_ID_equal : public TIDData {
|
||||
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) {}
|
||||
bool operator()(TObject_ID const& id) const { return TIDData::isEqual(id.getIDData(), *this); }
|
||||
};
|
||||
|
||||
} // namespace object
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
/* 80288B78 */ void setFlag_operation(u8, int);
|
||||
/* 80288BD0 */ void reset(void const*);
|
||||
/* 80288BE8 */ u8 forward(u32);
|
||||
/* 80288BE8 */ bool forward(u32);
|
||||
/* 80288E18 */ virtual void do_begin();
|
||||
/* 80288E1C */ virtual void do_end();
|
||||
/* 80288E20 */ virtual void do_paragraph(u32, void const*, u32);
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
/* 80289300 */ void destroyObject_all();
|
||||
/* 80289364 */ TObject* getObject(void const*, u32);
|
||||
/* 80289404 */ void reset();
|
||||
/* 802894B4 */ u8 forward(u32);
|
||||
/* 802894B4 */ bool forward(u32);
|
||||
|
||||
void setStatus_(u32 status) { mStatus = status; }
|
||||
void resetStatus_() { setStatus_(0); }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef JSTUDIO_JSTAGE_CONTROL_H
|
||||
#define JSTUDIO_JSTAGE_CONTROL_H
|
||||
|
||||
#include "JSystem/JGadget/pointer.h"
|
||||
#include "JSystem/JStage/JSGActor.h"
|
||||
#include "JSystem/JStage/JSGAmbientLight.h"
|
||||
#include "JSystem/JStage/JSGCamera.h"
|
||||
@@ -51,6 +52,10 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T
|
||||
typedef f32 (JStage::TActor::*Getter)() const;
|
||||
typedef f32 (JStage::TActor::*MaxGetter)() const;
|
||||
|
||||
enum TEVariableValue {
|
||||
TEACTOR_1 = 1,
|
||||
};
|
||||
|
||||
struct TVVOutput_ANIMATION_FRAME_
|
||||
: public JStudio::TVariableValue::TOutput
|
||||
{
|
||||
@@ -300,7 +305,7 @@ inline bool transform_toGlobalFromLocal(JStudio::TControl::TTransform_position*
|
||||
if (!transform_toGlobalFromLocal(afStack_38, param_2, param_3, param_4)) {
|
||||
return false;
|
||||
}
|
||||
JStudio::math::getFromTransformation_T(afStack_38, param_1);
|
||||
JStudio::math::getFromTransformation_T(param_1, afStack_38);
|
||||
return true;
|
||||
}
|
||||
/* 8028A328 */ bool
|
||||
@@ -310,6 +315,28 @@ inline bool transform_toGlobalFromLocal(JStudio::TControl::TTransform_position*
|
||||
/* 8028A3CC */ bool transform_toLocalFromGlobal(f32 (*)[4],
|
||||
JStudio::TControl::TTransform_position const&,
|
||||
JStage::TObject const*, u32);
|
||||
|
||||
namespace {
|
||||
|
||||
template <class AdaptorT, class ObjectT>
|
||||
JStudio::TObject* createObject_JSG_(const JStudio::stb::data::TParse_TBlock_object& param_1,
|
||||
JStage::TObject* param_2, const JStage::TSystem* param_3) {
|
||||
ObjectT* objt = (ObjectT*)param_2;
|
||||
AdaptorT* pAdaptor = new AdaptorT(param_3, objt);
|
||||
if (pAdaptor == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
JGadget::TPointer_delete<AdaptorT> adaptorGuard(pAdaptor);
|
||||
JStudio::TObject* pObj = JStudio::TCreateObject::createFromAdaptor<AdaptorT>(param_1, pAdaptor);
|
||||
if (pObj == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
adaptorGuard.set(NULL);
|
||||
return pObj;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
}; // namespace JStudio_JStage
|
||||
|
||||
#endif /* JSTUDIO_JSTAGE_CONTROL_H */
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
void load(_GXTexMapID);
|
||||
|
||||
const ResTIMG* getTexInfo() const { return mTexInfo; }
|
||||
u8 getFormat() const { return mTexInfo->format; }
|
||||
s32 getFormat() const { return mTexInfo->format; }
|
||||
s32 getTransparency() { return mTexInfo->alphaEnabled; }
|
||||
s32 getWidth() const { return mTexInfo->width; }
|
||||
s32 getHeight() const { return mTexInfo->height; }
|
||||
|
||||
@@ -35,7 +35,7 @@ struct SMatrix33C {
|
||||
return data[i][j];
|
||||
}
|
||||
|
||||
inline T at(int i, int j) {
|
||||
inline T at(int i, int j) const {
|
||||
return data[i][j];
|
||||
}
|
||||
|
||||
@@ -51,21 +51,6 @@ struct SMatrix33C {
|
||||
ref(2,1) = param_8;
|
||||
ref(2,2) = param_9;
|
||||
}
|
||||
|
||||
inline void getEulerXYZ(TVec3<T>* param_1) {
|
||||
if (at(2, 0) - TUtil<T>::one() >= TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(at(0,1), at(1,1)), -TUtil<T>::halfPI(), 0.0);
|
||||
} else {
|
||||
if (at(2, 0) - TUtil<T>::one() >= TUtil<T>::one() + TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(at(0, 1), at(1, 1)), TUtil<T>::halfPI(),
|
||||
0.0);
|
||||
} else {
|
||||
param_1->x = TUtil<T>::atan2(at(2, 1), at(2, 2));
|
||||
param_1->z = TUtil<T>::atan2(at(0, 1), at(0, 0));
|
||||
param_1->y = TUtil<T>::asin(at(2, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -74,6 +59,23 @@ struct TMatrix34 : public T {};
|
||||
template <typename T>
|
||||
struct TRotation3 : public T {};
|
||||
|
||||
template<typename T>
|
||||
struct TRotation3<SMatrix33C<T> > : public SMatrix33C<T> {
|
||||
inline void getEulerXYZ(TVec3<T>* param_1) const {
|
||||
if (at(2, 0) - TUtil<T>::one() >= -TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(-at(0, 1), at(1, 1)), -TUtil<T>::halfPI(), 0.0);
|
||||
} else {
|
||||
if (at(2, 0) + TUtil<T>::one() <= TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(at(0, 1), at(1, 1)), TUtil<T>::halfPI(), 0.0);
|
||||
} else {
|
||||
param_1->x = TUtil<T>::atan2(at(2, 1), at(2, 2));
|
||||
param_1->z = TUtil<T>::atan2(at(1, 0), at(0, 0));
|
||||
param_1->y = TUtil<T>::asin(-at(2, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct TPosition3 : public T {};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "JSystem/JAudio2/JASSoundParams.h"
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
#include "JSystem/JAudio2/JAUAudibleParam.h"
|
||||
#include "JSystem/TPosition3.hh"
|
||||
#include "JSystem/TPosition3.h"
|
||||
|
||||
struct Z2Audible;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTPalette.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
/* 802EA1AC-802EA2CC 2E4AEC 0120+00 0/0 1/1 0/0 .text __ct__11J2DMaterialFv */
|
||||
J2DMaterial::J2DMaterial() {
|
||||
@@ -305,17 +304,17 @@ void J2DMaterial::animation() {
|
||||
ResTIMG* img = mAnmPointer->mPatternAnm->getResTIMG(idx);
|
||||
if (texture->getTexInfo() != img) {
|
||||
JUTPalette* palette = NULL;
|
||||
u32 tlut = GX_TLUT0;
|
||||
GXTlut tlut = GX_TLUT0;
|
||||
if (img->indexTexture != 0) {
|
||||
palette = mAnmPointer->mPatternAnm->getPalette(idx);
|
||||
if (palette->getNumColors() > 256) {
|
||||
tlut = i % 4 + 16;
|
||||
tlut = (GXTlut)(i % 4 + 16);
|
||||
} else {
|
||||
tlut = i;
|
||||
tlut = (GXTlut)i;
|
||||
}
|
||||
}
|
||||
|
||||
texture->storeTIMG(img, palette, (GXTlut)tlut);
|
||||
texture->storeTIMG(img, palette, tlut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
#include "JSystem/JUtility/JUTResource.h"
|
||||
#include "string.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
/* 802F2AD0-802F2C94 2ED410 01C4+00 0/0 1/1 0/0 .text
|
||||
@@ -108,7 +107,7 @@ J2DMaterial* J2DMaterialFactory::create(J2DMaterial* param_0, int index, u32 par
|
||||
local_380 = aJStack_12c.getResource(local_37c, 'TIMG', NULL);
|
||||
}
|
||||
if (local_380 == NULL && J2DScreen::getDataManage() != NULL) {
|
||||
char acStack_230[256];
|
||||
char acStack_230[257];
|
||||
strcpy(acStack_230, param_3->getName(texNo));
|
||||
local_380 = J2DScreen::getDataManage()->get(acStack_230);
|
||||
}
|
||||
@@ -128,7 +127,7 @@ J2DMaterial* J2DMaterialFactory::create(J2DMaterial* param_0, int index, u32 par
|
||||
}
|
||||
if (local_388 == NULL && J2DScreen::getDataManage() != NULL) {
|
||||
char* pcVar9 = param_4->getName(param_0->getTevBlock()->getFontNo());
|
||||
char acStack_334[256];
|
||||
char acStack_334[257];
|
||||
strcpy(acStack_334, pcVar9);
|
||||
local_388 = J2DScreen::getDataManage()->get(acStack_334);
|
||||
}
|
||||
@@ -294,7 +293,7 @@ J2DTevOrder J2DMaterialFactory::newTevOrder(int param_0, int param_1) const {
|
||||
/* 802F3A1C-802F3AB4 2EE35C 0098+00 1/1 0/0 0/0 .text newTevColor__18J2DMaterialFactoryCFii */
|
||||
// NONMATCHING - J2DGXColorS10 init issues
|
||||
J2DGXColorS10 J2DMaterialFactory::newTevColor(int param_0, int param_1) const {
|
||||
GXColorS10 color = {};
|
||||
GXColorS10 color = {0, 0, 0, 0};
|
||||
J2DGXColorS10 rv = J2DGXColorS10(color);
|
||||
J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]];
|
||||
if (iVar2->field_0x92[param_1] != 0xffff) {
|
||||
|
||||
@@ -10,250 +10,8 @@
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "JSystem/JUtility/JUTResource.h"
|
||||
#include "JSystem/JSupport/JSURandomInputStream.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/gx.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__10J2DPictureFv();
|
||||
extern "C" void __ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP10JKRArchive();
|
||||
extern "C" void __ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP11J2DMaterial();
|
||||
extern "C" void __ct__10J2DPictureFPC7ResTIMG();
|
||||
extern "C" void func_802FC800();
|
||||
extern "C" void private_readStream__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP10JKRArchive();
|
||||
extern "C" void initiate__10J2DPictureFPC7ResTIMGPC7ResTLUT();
|
||||
extern "C" void private_initiate__10J2DPictureFPC7ResTIMGPC7ResTLUT();
|
||||
extern "C" void initinfo__10J2DPictureFv();
|
||||
extern "C" void __dt__10J2DPictureFv();
|
||||
extern "C" void prepareTexture__10J2DPictureFUc();
|
||||
extern "C" void insert__10J2DPictureFPC7ResTIMGP10JUTPaletteUcf();
|
||||
extern "C" void insert__10J2DPictureFPCcP10JUTPaletteUcf();
|
||||
extern "C" void insert__10J2DPictureFP10JUTTextureUcf();
|
||||
extern "C" void remove__10J2DPictureFUc();
|
||||
extern "C" void remove__10J2DPictureFP10JUTTexture();
|
||||
extern "C" void changeTexture__10J2DPictureFPC7ResTIMGUc();
|
||||
extern "C" void changeTexture__10J2DPictureFPCcUc();
|
||||
extern "C" void changeTexture__10J2DPictureFPC7ResTIMGUcP10JUTPalette();
|
||||
extern "C" void changeTexture__10J2DPictureFPCcUcP10JUTPalette();
|
||||
extern "C" void drawSelf__10J2DPictureFff();
|
||||
extern "C" void drawSelf__10J2DPictureFffPA3_A4_f();
|
||||
extern "C" void drawFullSet__10J2DPictureFffffPA3_A4_f();
|
||||
extern "C" void draw__10J2DPictureFffffbbb();
|
||||
extern "C" void func_802FDF88();
|
||||
extern "C" void drawTexCoord__10J2DPictureFffffssssssssPA3_A4_f();
|
||||
extern "C" void setTevMode__10J2DPictureFv();
|
||||
extern "C" void swap__10J2DPictureFRfRf();
|
||||
extern "C" void setBlendColorRatio__10J2DPictureFff();
|
||||
extern "C" void setBlendAlphaRatio__10J2DPictureFff();
|
||||
extern "C" void setBlendKonstColor__10J2DPictureFv();
|
||||
extern "C" void setBlendKonstAlpha__10J2DPictureFv();
|
||||
extern "C" void getNewColor__10J2DPictureFPQ28JUtility6TColor();
|
||||
extern "C" void setTexCoord__10J2DPictureFPC10JUTTexture10J2DBinding9J2DMirrorb();
|
||||
extern "C" void func_802FED84();
|
||||
extern "C" void isUsed__10J2DPictureFPC7ResTIMG();
|
||||
extern "C" void getUsableTlut__10J2DPictureFUc();
|
||||
extern "C" void getTlutID__10J2DPictureFPC7ResTIMGUc();
|
||||
extern "C" void func_802FF204(void* _this);
|
||||
extern "C" void append__10J2DPictureFP10JUTTexturef();
|
||||
extern "C" void append__10J2DPictureFPC7ResTIMGP10JUTPalettef();
|
||||
extern "C" void load__10J2DPictureFUc();
|
||||
extern "C" void load__10J2DPictureF11_GXTexMapIDUc();
|
||||
extern "C" s32 getTypeID__10J2DPictureCFv();
|
||||
extern "C" void append__10J2DPictureFPCcP10JUTPalettef();
|
||||
extern "C" void prepend__10J2DPictureFP10JUTTexturef();
|
||||
extern "C" void prepend__10J2DPictureFPCcP10JUTPalettef();
|
||||
extern "C" void prepend__10J2DPictureFPCcf();
|
||||
extern "C" void prepend__10J2DPictureFPC7ResTIMGP10JUTPalettef();
|
||||
extern "C" void prepend__10J2DPictureFPC7ResTIMGf();
|
||||
extern "C" void remove__10J2DPictureFv();
|
||||
extern "C" void draw__10J2DPictureFffUcbbb();
|
||||
extern "C" void draw__10J2DPictureFffbbb();
|
||||
extern "C" void drawOut__10J2DPictureFffffffff();
|
||||
extern "C" void drawOut__10J2DPictureFffffff();
|
||||
extern "C" void getTextureCount__10J2DPictureCFv();
|
||||
extern "C" void isUsed__10J2DPictureFPC7ResFONT();
|
||||
extern "C" void rewriteAlpha__10J2DPictureFv();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void setAlpha__7J2DPaneFUc();
|
||||
extern "C" void setBlendRatio__10J2DPictureFff();
|
||||
extern "C" void append__10J2DPictureFPCcf();
|
||||
extern "C" void insert__10J2DPictureFPCcUcf();
|
||||
extern "C" void getTexture__10J2DPictureCFUc();
|
||||
extern "C" void calcMtx__7J2DPaneFv();
|
||||
extern "C" void makeMatrix__7J2DPaneFff();
|
||||
extern "C" void setWhite__10J2DPictureFQ28JUtility6TColor();
|
||||
extern "C" void setBlack__10J2DPictureFQ28JUtility6TColor();
|
||||
extern "C" void setAnimation__7J2DPaneFP15J2DAnmTevRegKey();
|
||||
extern "C" void setAnimation__7J2DPaneFP11J2DAnmColor();
|
||||
extern "C" void setBlackWhite__10J2DPictureFQ28JUtility6TColorQ28JUtility6TColor();
|
||||
extern "C" void setAnimation__7J2DPaneFP19J2DAnmTextureSRTKey();
|
||||
extern "C" void __ct__Q28JUtility6TColorFv();
|
||||
extern "C" void append__10J2DPictureFPC7ResTIMGf();
|
||||
extern "C" void insert__10J2DPictureFPC7ResTIMGUcf();
|
||||
extern "C" void getWhite__10J2DPictureCFv();
|
||||
extern "C" void getBlack__10J2DPictureCFv();
|
||||
extern "C" void setAnimation__7J2DPaneFP14J2DAnmVtxColor();
|
||||
extern "C" void setAnimation__7J2DPaneFP20J2DAnmVisibilityFull();
|
||||
extern "C" void setAnimation__7J2DPaneFP16J2DAnmTexPattern();
|
||||
extern "C" bool getMaterial__10J2DPictureCFv();
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void read__14JSUInputStreamFPvl();
|
||||
extern "C" void peek__20JSURandomInputStreamFPvl();
|
||||
extern "C" void seek__20JSURandomInputStreamFl17JSUStreamSeekFrom();
|
||||
extern "C" void __dt__10JUTTextureFv();
|
||||
extern "C" void storeTIMG__10JUTTextureFPC7ResTIMGUc();
|
||||
extern "C" void storeTIMG__10JUTTextureFPC7ResTIMGP10JUTPalette();
|
||||
extern "C" void storeTIMG__10JUTTextureFPC7ResTIMGP10JUTPalette7_GXTlut();
|
||||
extern "C" void attachPalette__10JUTTextureFP10JUTPalette();
|
||||
extern "C" void load__10JUTTextureF11_GXTexMapID();
|
||||
extern "C" void storeTLUT__10JUTPaletteF7_GXTlutP7ResTLUT();
|
||||
extern "C" void __ct__7J2DPaneFv();
|
||||
extern "C" void func_802F5E88();
|
||||
extern "C" void makePaneStream__7J2DPaneFP7J2DPaneP20JSURandomInputStream();
|
||||
extern "C" void __dt__7J2DPaneFv();
|
||||
extern "C" void func_802F6D18();
|
||||
extern "C" void move__7J2DPaneFff();
|
||||
extern "C" void add__7J2DPaneFff();
|
||||
extern "C" void resize__7J2DPaneFff();
|
||||
extern "C" void search__7J2DPaneFUx();
|
||||
extern "C" void searchUserInfo__7J2DPaneFUx();
|
||||
extern "C" void isUsed__7J2DPaneFPC7ResTIMG();
|
||||
extern "C" void isUsed__7J2DPaneFPC7ResFONT();
|
||||
extern "C" void makeMatrix__7J2DPaneFffff();
|
||||
extern "C" void setCullBack__7J2DPaneF11_GXCullMode();
|
||||
extern "C" void makePaneExStream__7J2DPaneFP7J2DPaneP20JSURandomInputStream();
|
||||
extern "C" void J2DCast_F32_to_S16__7J2DPaneFfUc();
|
||||
extern "C" void getPointer__7J2DPaneFP20JSURandomInputStreamUlP10JKRArchive();
|
||||
extern "C" void setAnimation__7J2DPaneFP10J2DAnmBase();
|
||||
extern "C" void setAnimation__7J2DPaneFP15J2DAnmTransform();
|
||||
extern "C" void clearAnmTransform__7J2DPaneFv();
|
||||
extern "C" void animationTransform__7J2DPaneFPC15J2DAnmTransform();
|
||||
extern "C" void setVisibileAnimation__7J2DPaneFP20J2DAnmVisibilityFull();
|
||||
extern "C" void setVtxColorAnimation__7J2DPaneFP14J2DAnmVtxColor();
|
||||
extern "C" void animationPane__7J2DPaneFPC15J2DAnmTransform();
|
||||
extern "C" void setAnimationVF__7J2DPaneFP20J2DAnmVisibilityFull();
|
||||
extern "C" void setAnimationVC__7J2DPaneFP14J2DAnmVtxColor();
|
||||
extern "C" void setCullBack__7J2DPaneFb();
|
||||
extern "C" void setConnectParent__7J2DPaneFb();
|
||||
extern "C" void update__7J2DPaneFv();
|
||||
extern "C" void getNameResource__9J2DScreenFPCc();
|
||||
extern "C" void __construct_array();
|
||||
extern "C" void _savegpr_21();
|
||||
extern "C" void _savegpr_22();
|
||||
extern "C" void _savegpr_25();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_21();
|
||||
extern "C" void _restgpr_22();
|
||||
extern "C" void _restgpr_25();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CD1D8-803CD328 02A2F8 014C+04 6/6 0/0 0/0 .data __vt__10J2DPicture */
|
||||
SECTION_DATA extern void* __vt__10J2DPicture[83 + 1 /* padding */] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__10J2DPictureFv,
|
||||
(void*)getTypeID__10J2DPictureCFv,
|
||||
(void*)move__7J2DPaneFff,
|
||||
(void*)add__7J2DPaneFff,
|
||||
(void*)resize__7J2DPaneFff,
|
||||
(void*)setCullBack__7J2DPaneFb,
|
||||
(void*)setCullBack__7J2DPaneF11_GXCullMode,
|
||||
(void*)setAlpha__7J2DPaneFUc,
|
||||
(void*)setConnectParent__7J2DPaneFb,
|
||||
(void*)calcMtx__7J2DPaneFv,
|
||||
(void*)update__7J2DPaneFv,
|
||||
(void*)drawSelf__10J2DPictureFff,
|
||||
(void*)drawSelf__10J2DPictureFffPA3_A4_f,
|
||||
(void*)search__7J2DPaneFUx,
|
||||
(void*)searchUserInfo__7J2DPaneFUx,
|
||||
(void*)makeMatrix__7J2DPaneFff,
|
||||
(void*)makeMatrix__7J2DPaneFffff,
|
||||
(void*)isUsed__10J2DPictureFPC7ResTIMG,
|
||||
(void*)isUsed__10J2DPictureFPC7ResFONT,
|
||||
(void*)clearAnmTransform__7J2DPaneFv,
|
||||
(void*)rewriteAlpha__10J2DPictureFv,
|
||||
(void*)setAnimation__7J2DPaneFP10J2DAnmBase,
|
||||
(void*)setAnimation__7J2DPaneFP15J2DAnmTransform,
|
||||
(void*)setAnimation__7J2DPaneFP11J2DAnmColor,
|
||||
(void*)setAnimation__7J2DPaneFP16J2DAnmTexPattern,
|
||||
(void*)setAnimation__7J2DPaneFP19J2DAnmTextureSRTKey,
|
||||
(void*)setAnimation__7J2DPaneFP15J2DAnmTevRegKey,
|
||||
(void*)setAnimation__7J2DPaneFP20J2DAnmVisibilityFull,
|
||||
(void*)setAnimation__7J2DPaneFP14J2DAnmVtxColor,
|
||||
(void*)animationTransform__7J2DPaneFPC15J2DAnmTransform,
|
||||
(void*)setVisibileAnimation__7J2DPaneFP20J2DAnmVisibilityFull,
|
||||
(void*)setAnimationVF__7J2DPaneFP20J2DAnmVisibilityFull,
|
||||
(void*)setVtxColorAnimation__7J2DPaneFP14J2DAnmVtxColor,
|
||||
(void*)setAnimationVC__7J2DPaneFP14J2DAnmVtxColor,
|
||||
(void*)animationPane__7J2DPaneFPC15J2DAnmTransform,
|
||||
(void*)initiate__10J2DPictureFPC7ResTIMGPC7ResTLUT,
|
||||
(void*)prepareTexture__10J2DPictureFUc,
|
||||
(void*)append__10J2DPictureFPC7ResTIMGf,
|
||||
(void*)append__10J2DPictureFPC7ResTIMGP10JUTPalettef,
|
||||
(void*)append__10J2DPictureFPCcf,
|
||||
(void*)append__10J2DPictureFPCcP10JUTPalettef,
|
||||
(void*)append__10J2DPictureFP10JUTTexturef,
|
||||
(void*)prepend__10J2DPictureFPC7ResTIMGf,
|
||||
(void*)prepend__10J2DPictureFPC7ResTIMGP10JUTPalettef,
|
||||
(void*)prepend__10J2DPictureFPCcf,
|
||||
(void*)prepend__10J2DPictureFPCcP10JUTPalettef,
|
||||
(void*)prepend__10J2DPictureFP10JUTTexturef,
|
||||
(void*)insert__10J2DPictureFPC7ResTIMGUcf,
|
||||
(void*)insert__10J2DPictureFPC7ResTIMGP10JUTPaletteUcf,
|
||||
(void*)insert__10J2DPictureFPCcUcf,
|
||||
(void*)insert__10J2DPictureFPCcP10JUTPaletteUcf,
|
||||
(void*)insert__10J2DPictureFP10JUTTextureUcf,
|
||||
(void*)remove__10J2DPictureFUc,
|
||||
(void*)remove__10J2DPictureFv,
|
||||
(void*)remove__10J2DPictureFP10JUTTexture,
|
||||
(void*)draw__10J2DPictureFffbbb,
|
||||
(void*)draw__10J2DPictureFffUcbbb,
|
||||
(void*)draw__10J2DPictureFffffbbb,
|
||||
(void*)drawOut__10J2DPictureFffffff,
|
||||
(void*)drawOut__10J2DPictureFffffffff,
|
||||
(void*)func_802FDF88,
|
||||
(void*)load__10J2DPictureF11_GXTexMapIDUc,
|
||||
(void*)load__10J2DPictureFUc,
|
||||
(void*)setBlendRatio__10J2DPictureFff,
|
||||
(void*)setBlendColorRatio__10J2DPictureFff,
|
||||
(void*)setBlendAlphaRatio__10J2DPictureFff,
|
||||
(void*)changeTexture__10J2DPictureFPC7ResTIMGUc,
|
||||
(void*)changeTexture__10J2DPictureFPCcUc,
|
||||
(void*)changeTexture__10J2DPictureFPC7ResTIMGUcP10JUTPalette,
|
||||
(void*)changeTexture__10J2DPictureFPCcUcP10JUTPalette,
|
||||
(void*)getTexture__10J2DPictureCFUc,
|
||||
(void*)getTextureCount__10J2DPictureCFv,
|
||||
(void*)setBlack__10J2DPictureFQ28JUtility6TColor,
|
||||
(void*)setWhite__10J2DPictureFQ28JUtility6TColor,
|
||||
(void*)setBlackWhite__10J2DPictureFQ28JUtility6TColorQ28JUtility6TColor,
|
||||
(void*)getBlack__10J2DPictureCFv,
|
||||
(void*)getWhite__10J2DPictureCFv,
|
||||
(void*)getMaterial__10J2DPictureCFv,
|
||||
(void*)drawFullSet__10J2DPictureFffffPA3_A4_f,
|
||||
(void*)drawTexCoord__10J2DPictureFffffssssssssPA3_A4_f,
|
||||
(void*)getUsableTlut__10J2DPictureFUc,
|
||||
/* padding */
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* 802FC050-802FC118 2F6990 00C8+00 0/0 2/2 0/0 .text __ct__10J2DPictureFv */
|
||||
J2DPicture::J2DPicture() : mPalette(NULL) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
@@ -273,11 +31,6 @@ J2DPicture::J2DPicture(J2DPane* p_pane, JSURandomInputStream* p_stream, JKRArchi
|
||||
private_readStream(p_pane, p_stream, p_archive);
|
||||
}
|
||||
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80456260-80456268 004860 0008+00 1/1 0/0 0/0 .sdata2 @1739 */
|
||||
SECTION_SDATA2 static f64 lit_1739 = 4503599627370496.0 /* cast u32 to float */;
|
||||
|
||||
/* 802FC1D4-802FC708 2F6B14 0534+00 0/0 1/1 0/0 .text
|
||||
* __ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP11J2DMaterial */
|
||||
J2DPicture::J2DPicture(J2DPane* p_pane, JSURandomInputStream* p_stream, J2DMaterial* p_material)
|
||||
@@ -381,11 +134,6 @@ J2DPicture::J2DPicture(J2DPane* p_pane, JSURandomInputStream* p_stream, J2DMater
|
||||
setBlendAlphaRatio(alpha.a, alpha.b);
|
||||
}
|
||||
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80456268-8045626C 004868 0004+00 9/9 0/0 0/0 .sdata2 @1767 */
|
||||
SECTION_SDATA2 static f32 lit_1767 = 1.0f;
|
||||
|
||||
/* 802FC708-802FC800 2F7048 00F8+00 0/0 20/20 1/1 .text __ct__10J2DPictureFPC7ResTIMG */
|
||||
J2DPicture::J2DPicture(ResTIMG const* p_timg) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
@@ -419,7 +167,6 @@ J2DPicture::J2DPicture(u64 tag, JGeometry::TBox2<f32> const& bounds, ResTIMG con
|
||||
initinfo();
|
||||
}
|
||||
|
||||
|
||||
/* 802FC8E8-802FCCDC 2F7228 03F4+00 1/1 0/0 0/0 .text
|
||||
* private_readStream__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP10JKRArchive */
|
||||
void J2DPicture::private_readStream(J2DPane* parent, JSURandomInputStream* stream,
|
||||
@@ -496,19 +243,6 @@ void J2DPicture::private_readStream(J2DPane* parent, JSURandomInputStream* strea
|
||||
setBlendRatio(1.0f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8045626C-80456270 00486C 0004+00 9/9 0/0 0/0 .sdata2 @2017 */
|
||||
SECTION_SDATA2 static u8 lit_2017[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 80456270-80456278 004870 0008+00 7/7 0/0 0/0 .sdata2 @2021 */
|
||||
SECTION_SDATA2 static f64 lit_2021 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 802FCCDC-802FCD70 2F761C 0094+00 1/0 0/0 0/0 .text initiate__10J2DPictureFPC7ResTIMGPC7ResTLUT
|
||||
*/
|
||||
void J2DPicture::initiate(const ResTIMG* img, const ResTLUT* lut) {
|
||||
@@ -520,7 +254,6 @@ void J2DPicture::initiate(const ResTIMG* img, const ResTLUT* lut) {
|
||||
place(JGeometry::TBox2<f32>(0.0f, 0.0f, mTexture[0]->getWidth(), mTexture[0]->getHeight()));
|
||||
}
|
||||
|
||||
|
||||
/* 802FCD70-802FCE9C 2F76B0 012C+00 2/2 0/0 0/0 .text
|
||||
* private_initiate__10J2DPictureFPC7ResTIMGPC7ResTLUT */
|
||||
void J2DPicture::private_initiate(const ResTIMG* timg, const ResTLUT* tlut) {
|
||||
@@ -555,7 +288,7 @@ void J2DPicture::private_initiate(const ResTIMG* timg, const ResTLUT* tlut) {
|
||||
void J2DPicture::initinfo() {
|
||||
mKind = 'PIC1';
|
||||
setTexCoord(NULL, BIND15, MIRROR0, false);
|
||||
setBlendRatio(lit_1767, lit_1767);
|
||||
setBlendRatio(1.0f, 1.0f);
|
||||
|
||||
mBlack = 0;
|
||||
mWhite = -1;
|
||||
@@ -782,6 +515,11 @@ const ResTIMG* J2DPicture::changeTexture(char const* resName, u8 param_1) {
|
||||
return changeTexture((ResTIMG*)resource, param_1);
|
||||
}
|
||||
|
||||
static bool dummy_weak_order(JUTTexture* tex) {
|
||||
J2DPicture* picture;
|
||||
return picture->append(tex, 1.0f);
|
||||
}
|
||||
|
||||
/* 802FD9BC-802FDAC8 2F82FC 010C+00 1/0 0/0 0/0 .text
|
||||
* changeTexture__10J2DPictureFPC7ResTIMGUcP10JUTPalette */
|
||||
const ResTIMG* J2DPicture::changeTexture(ResTIMG const* img, u8 texIndex, JUTPalette* palette) {
|
||||
@@ -1125,10 +863,6 @@ void J2DPicture::setBlendAlphaRatio(f32 param_0, f32 param_1) {
|
||||
setBlendKonstAlpha();
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80456278-8045627C 004878 0004+00 2/2 0/0 0/0 .sdata2 @2758 */
|
||||
SECTION_SDATA2 static f32 lit_2758 = 255.0f;
|
||||
|
||||
/* 802FEAC4-802FEB94 2F9404 00D0+00 4/4 0/0 0/0 .text setBlendKonstColor__10J2DPictureFv
|
||||
*/
|
||||
void J2DPicture::setBlendKonstColor() {
|
||||
@@ -1148,7 +882,6 @@ void J2DPicture::setBlendKonstColor() {
|
||||
mBlendKonstColor = uvar3;
|
||||
}
|
||||
|
||||
|
||||
/* 802FEB94-802FEC64 2F94D4 00D0+00 4/4 0/0 0/0 .text setBlendKonstAlpha__10J2DPictureFv
|
||||
*/
|
||||
void J2DPicture::setBlendKonstAlpha() {
|
||||
@@ -1168,7 +901,6 @@ void J2DPicture::setBlendKonstAlpha() {
|
||||
mBlendKonstAlpha = uvar3;
|
||||
}
|
||||
|
||||
|
||||
/* 802FEC64-802FED44 2F95A4 00E0+00 3/3 0/0 0/0 .text
|
||||
* getNewColor__10J2DPictureFPQ28JUtility6TColor */
|
||||
void J2DPicture::getNewColor(JUtility::TColor* param_0) {
|
||||
@@ -1192,10 +924,6 @@ void J2DPicture::setTexCoord(JUTTexture const* param_0, J2DBinding param_1, J2DM
|
||||
setTexCoord(&field_0x10a[0], param_0, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8045627C-80456280 00487C 0004+00 1/1 0/0 0/0 .sdata2 @2933 */
|
||||
SECTION_SDATA2 static f32 lit_2933 = 0.5f;
|
||||
|
||||
/* 802FED84-802FF09C 2F96C4 0318+00 2/2 0/0 0/0 .text
|
||||
* setTexCoord__10J2DPictureFPQ29JGeometry8TVec2<s>PC10JUTTexture10J2DBinding9J2DMirrorb */
|
||||
void J2DPicture::setTexCoord(JGeometry::TVec2<s16>* param_0, JUTTexture const* param_1,
|
||||
@@ -1362,123 +1090,3 @@ GXTlut J2DPicture::getTlutID(ResTIMG const* img, u8 param_1) {
|
||||
|
||||
return (GXTlut)param_1;
|
||||
}
|
||||
|
||||
/* 802FF204-802FF208 2F9B44 0004+00 5/5 1/1 0/0 .text __ct__Q29JGeometry8TVec2<s>Fv */
|
||||
extern "C" void func_802FF204(void* _this) {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
/* 802FF208-802FF238 2F9B48 0030+00 1/0 0/0 0/0 .text append__10J2DPictureFP10JUTTexturef
|
||||
*/
|
||||
bool J2DPicture::append(JUTTexture* param_0, f32 param_1) {
|
||||
return insert(param_0, mTextureNum, param_1);
|
||||
}
|
||||
|
||||
/* 802FF238-802FF268 2F9B78 0030+00 1/0 0/0 0/0 .text
|
||||
* append__10J2DPictureFPC7ResTIMGP10JUTPalettef */
|
||||
bool J2DPicture::append(ResTIMG const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
return insert(param_0, param_1, mTextureNum, param_2);
|
||||
}
|
||||
|
||||
/* 802FF268-802FF29C 2F9BA8 0034+00 1/0 0/0 0/0 .text load__10J2DPictureFUc */
|
||||
void J2DPicture::load(u8 param_0) {
|
||||
load((_GXTexMapID)param_0, param_0);
|
||||
}
|
||||
|
||||
/* 802FF29C-802FF2E8 2F9BDC 004C+00 1/0 0/0 0/0 .text load__10J2DPictureF11_GXTexMapIDUc
|
||||
*/
|
||||
void J2DPicture::load(_GXTexMapID param_0, u8 param_1) {
|
||||
if (param_1 < mTextureNum && param_1 < 2 && mTexture[param_1] != NULL) {
|
||||
mTexture[param_1]->load(param_0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 802FF2E8-802FF2F0 2F9C28 0008+00 1/0 1/0 0/0 .text getTypeID__10J2DPictureCFv */
|
||||
u16 J2DPicture::getTypeID() const {
|
||||
return 18;
|
||||
}
|
||||
|
||||
/* 802FF2F0-802FF320 2F9C30 0030+00 1/0 0/0 0/0 .text append__10J2DPictureFPCcP10JUTPalettef */
|
||||
bool J2DPicture::append(char const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
return insert(param_0, param_1, mTextureNum, param_2);
|
||||
}
|
||||
|
||||
/* 802FF320-802FF350 2F9C60 0030+00 1/0 0/0 0/0 .text prepend__10J2DPictureFP10JUTTexturef */
|
||||
void J2DPicture::prepend(JUTTexture* param_0, f32 param_1) {
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
|
||||
/* 802FF350-802FF380 2F9C90 0030+00 1/0 0/0 0/0 .text prepend__10J2DPictureFPCcP10JUTPalettef */
|
||||
void J2DPicture::prepend(char const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
insert(param_0, param_1, 0, param_2);
|
||||
}
|
||||
|
||||
/* 802FF380-802FF3B0 2F9CC0 0030+00 1/0 0/0 0/0 .text prepend__10J2DPictureFPCcf */
|
||||
void J2DPicture::prepend(char const* param_0, f32 param_1) {
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
|
||||
/* 802FF3B0-802FF3E0 2F9CF0 0030+00 1/0 0/0 0/0 .text
|
||||
* prepend__10J2DPictureFPC7ResTIMGP10JUTPalettef */
|
||||
void J2DPicture::prepend(ResTIMG const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
insert(param_0, param_1, 0, param_2);
|
||||
}
|
||||
|
||||
/* 802FF3E0-802FF410 2F9D20 0030+00 1/0 0/0 0/0 .text prepend__10J2DPictureFPC7ResTIMGf
|
||||
*/
|
||||
void J2DPicture::prepend(ResTIMG const* param_0, f32 param_1) {
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
|
||||
/* 802FF410-802FF448 2F9D50 0038+00 1/0 0/0 0/0 .text remove__10J2DPictureFv */
|
||||
bool J2DPicture::remove() {
|
||||
return remove(mTextureNum - 1);
|
||||
}
|
||||
|
||||
/* 802FF448-802FF4E0 2F9D88 0098+00 1/0 0/0 0/0 .text draw__10J2DPictureFffUcbbb */
|
||||
void J2DPicture::draw(f32 param_0, f32 param_1, u8 param_2, bool param_3, bool param_4,
|
||||
bool param_5) {
|
||||
if (param_2 < mTextureNum && mTexture[param_2] != NULL) {
|
||||
draw(param_0, param_1, mTexture[param_2]->getWidth(), mTexture[param_2]->getHeight(),
|
||||
param_3, param_4, param_5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 802FF4E0-802FF524 2F9E20 0044+00 1/0 0/0 0/0 .text draw__10J2DPictureFffbbb */
|
||||
void J2DPicture::draw(f32 param_0, f32 param_1, bool param_2, bool param_3, bool param_4) {
|
||||
draw(param_0, param_1, 0, param_2, param_3, param_4);
|
||||
}
|
||||
|
||||
/* 802FF524-802FF588 2F9E64 0064+00 1/0 0/0 0/0 .text drawOut__10J2DPictureFffffffff */
|
||||
void J2DPicture::drawOut(f32 param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4,
|
||||
f32 param_5, f32 param_6, f32 param_7) {
|
||||
drawOut(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3),
|
||||
JGeometry::TBox2<f32>(param_4, param_5, param_4 + param_6, param_5 + param_7));
|
||||
}
|
||||
|
||||
/* 802FF588-802FF634 2F9EC8 00AC+00 1/0 0/0 0/0 .text drawOut__10J2DPictureFffffff */
|
||||
void J2DPicture::drawOut(f32 param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4,
|
||||
f32 param_5) {
|
||||
if (mTexture[0] != NULL) {
|
||||
drawOut(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3),
|
||||
JGeometry::TBox2<f32>(param_4, param_5, param_4 + mTexture[0]->getWidth(),
|
||||
param_5 + mTexture[0]->getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 802FF634-802FF63C 2F9F74 0008+00 1/0 0/0 0/0 .text getTextureCount__10J2DPictureCFv */
|
||||
u8 J2DPicture::getTextureCount() const {
|
||||
return mTextureNum;
|
||||
}
|
||||
|
||||
/* 802FF63C-802FF65C 2F9F7C 0020+00 1/0 0/0 0/0 .text isUsed__10J2DPictureFPC7ResFONT */
|
||||
bool J2DPicture::isUsed(ResFONT const* param_0) {
|
||||
return J2DPane::isUsed(param_0);
|
||||
}
|
||||
|
||||
/* 802FF65C-802FF660 2F9F9C 0004+00 1/0 0/0 0/0 .text rewriteAlpha__10J2DPictureFv */
|
||||
void J2DPicture::rewriteAlpha() {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
@@ -226,12 +226,56 @@ bool J2DPictureEx::insert(JUTTexture* param_0, u8 param_1, f32 param_2) {
|
||||
}
|
||||
|
||||
/* 803040E4-8030437C 2FEA24 0298+00 2/2 0/0 0/0 .text insertCommon__12J2DPictureExFUcf */
|
||||
void J2DPictureEx::insertCommon(u8 param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::insertCommon(u8 pos, f32 param_1) {
|
||||
u8 new_tev_stage_num;
|
||||
u8 tex_gen_num = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
mMaterial->getTevBlock()->getMaxStage();
|
||||
int tev_stage_num = mMaterial->getTevBlock()->getTevStageNum();
|
||||
bool bVar1;
|
||||
if (tex_gen_num <= 1) {
|
||||
bVar1 = tev_stage_num != 1;
|
||||
} else {
|
||||
bVar1 = tev_stage_num != tex_gen_num + 1;
|
||||
}
|
||||
|
||||
shiftSetBlendRatio(pos, param_1, true, true);
|
||||
shiftSetBlendRatio(pos, param_1, false, true);
|
||||
|
||||
tex_gen_num++;
|
||||
mMaterial->getTexGenBlock()->setTexGenNum(tex_gen_num);
|
||||
|
||||
J2DTexCoordInfo tex_coord_info;
|
||||
tex_coord_info.mTexGenType = GX_TG_MTX2x4;
|
||||
tex_coord_info.mTexGenSrc = GX_TG_TEX0;
|
||||
for (int i = tex_gen_num - 1; i >= pos; i--) {
|
||||
tex_coord_info.mTexGenMtx = i * 3 + 30;
|
||||
J2DTexCoord tex_coord(tex_coord_info);
|
||||
mMaterial->getTexGenBlock()->setTexCoord((u8)i, tex_coord);
|
||||
}
|
||||
|
||||
for (int i = tex_gen_num - 1; i > pos; i--) {
|
||||
mMaterial->getTexGenBlock()->setTexMtx((u8)i, mMaterial->getTexGenBlock()->getTexMtx((u8)(i - 1)));
|
||||
}
|
||||
|
||||
J2DTexMtx tex_mtx;
|
||||
mMaterial->getTexGenBlock()->setTexMtx(pos, tex_mtx);
|
||||
|
||||
if (tex_gen_num == 1) {
|
||||
new_tev_stage_num = 1;
|
||||
} else {
|
||||
new_tev_stage_num = tex_gen_num + (bVar1 ? 2 : 1);
|
||||
}
|
||||
mMaterial->getTevBlock()->setTevStageNum(new_tev_stage_num);
|
||||
|
||||
setTevOrder(tex_gen_num, new_tev_stage_num, bVar1);
|
||||
setTevStage(tex_gen_num, new_tev_stage_num, bVar1);
|
||||
setTevKColor(tex_gen_num);
|
||||
setTevKColorSel(tex_gen_num);
|
||||
setTevKAlphaSel(tex_gen_num);
|
||||
}
|
||||
|
||||
/* 8030437C-8030446C 2FECBC 00F0+00 2/2 0/0 0/0 .text isInsert__12J2DPictureExCFUc */
|
||||
bool J2DPictureEx::isInsert(u8 param_0) const {
|
||||
bool J2DPictureEx::isInsert(u8 pos) const {
|
||||
if (mMaterial == NULL) {
|
||||
return false;
|
||||
}
|
||||
@@ -240,7 +284,7 @@ bool J2DPictureEx::isInsert(u8 param_0) const {
|
||||
}
|
||||
|
||||
u8 texGenNum = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
if (texGenNum >= 8 || param_0 >= 8 || param_0 > texGenNum) {
|
||||
if (texGenNum >= 8 || pos >= 8 || pos > texGenNum) {
|
||||
return false;
|
||||
}
|
||||
u8 bVar5 = mMaterial->getTevBlock()->getMaxStage();
|
||||
@@ -256,8 +300,36 @@ bool J2DPictureEx::isInsert(u8 param_0) const {
|
||||
}
|
||||
|
||||
/* 8030446C-80304608 2FEDAC 019C+00 1/0 0/0 0/0 .text remove__12J2DPictureExFUc */
|
||||
bool J2DPictureEx::remove(u8 param_0) {
|
||||
// NONMATCHING
|
||||
// NONMATCHING regalloc
|
||||
bool J2DPictureEx::remove(u8 pos) {
|
||||
if (!isRemove(pos)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 tex_gen_num = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
u8 tev_stage_num = mMaterial->getTevBlock()->getTevStageNum();
|
||||
bool bVar1 = tev_stage_num != tex_gen_num + 1;
|
||||
|
||||
shiftSetBlendRatio(pos, 0.0f, true, false);
|
||||
shiftSetBlendRatio(pos, 0.0f, false, false);
|
||||
|
||||
tex_gen_num--;
|
||||
mMaterial->getTexGenBlock()->setTexGenNum(tex_gen_num);
|
||||
mMaterial->getTevBlock()->removeTexture(pos);
|
||||
|
||||
if (tex_gen_num != 1) {
|
||||
tev_stage_num = tex_gen_num + (bVar1 ? 2 : 1);
|
||||
} else {
|
||||
tev_stage_num = bVar1 ? 2 : 1;
|
||||
}
|
||||
mMaterial->getTevBlock()->setTevStageNum(tev_stage_num);
|
||||
|
||||
setTevOrder(tex_gen_num, tev_stage_num, bVar1);
|
||||
setTevStage(tex_gen_num, tev_stage_num, bVar1);
|
||||
setTevKColor(tex_gen_num);
|
||||
setTevKColorSel(tex_gen_num);
|
||||
setTevKAlphaSel(tex_gen_num);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 80304608-8030466C 2FEF48 0064+00 1/0 0/0 0/0 .text remove__12J2DPictureExFv */
|
||||
@@ -311,28 +383,232 @@ bool J2DPictureEx::isRemove(u8 param_0) const {
|
||||
}
|
||||
|
||||
/* 8030477C-80304890 2FF0BC 0114+00 1/0 0/0 0/0 .text draw__12J2DPictureExFffUcbbb */
|
||||
void J2DPictureEx::draw(f32 param_0, f32 param_1, u8 param_2, bool param_3, bool param_4,
|
||||
bool param_5) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::draw(f32 param_0, f32 param_1, u8 texNo, bool param_3, bool param_4,
|
||||
bool param_5) {
|
||||
if (mMaterial == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaterial->getTevBlock() == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (texNo >= mMaterial->getTexGenBlock()->getTexGenNum()) {
|
||||
return;
|
||||
}
|
||||
|
||||
JUTTexture* texture = mMaterial->getTevBlock()->getTexture(texNo);
|
||||
if (texture != NULL) {
|
||||
draw(param_0, param_1, texture->getWidth(), texture->getHeight(),
|
||||
param_3, param_4, param_5);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80304890-80304D88 2FF1D0 04F8+00 1/0 0/0 0/0 .text draw__12J2DPictureExFffffbbb */
|
||||
void J2DPictureEx::draw(f32 param_0, f32 param_1, f32 param_2, f32 param_3, bool param_4,
|
||||
bool param_5, bool param_6) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::draw(f32 param_0, f32 param_1, f32 width, f32 height, bool param_4,
|
||||
bool param_5, bool param_6) {
|
||||
if (!isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaterial == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaterial->getTevBlock() == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaterial->getTexGenBlock()->getTexGenNum() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
mMaterial->setGX();
|
||||
makeMatrix(param_0, param_1, 0.0f, 0.0f);
|
||||
GXLoadPosMtxImm(mPositionMtx, GX_PNMTX0);
|
||||
GXSetCurrentMtx(GX_PNMTX0);
|
||||
|
||||
if (!mMaterial->isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
|
||||
mColorAlpha = mAlpha;
|
||||
|
||||
JUtility::TColor corner_color[4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
corner_color[i] = mCornerColor[i];
|
||||
}
|
||||
|
||||
if (mMaterial->getMaterialAlphaCalc() == 1) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
corner_color[i].a = (mColorAlpha * corner_color[i].a) / 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
|
||||
GXPosition3f32(0.0f, 0.0f, 0.0f);
|
||||
GXColor1u32(corner_color[0]);
|
||||
if (!param_6) {
|
||||
GXTexCoord2u16(param_4 ? 0x8000 : 0, param_5 ? 0x8000 : 0);
|
||||
} else {
|
||||
GXTexCoord2u16(param_4 ? 0x8000 : 0, param_5 ? 0 : 0x8000);
|
||||
}
|
||||
|
||||
GXPosition3f32(width, 0.0f, 0.0f);
|
||||
GXColor1u32(corner_color[1]);
|
||||
if (!param_6) {
|
||||
GXTexCoord2u16(param_4 ? 0 : 0x8000, param_5 ? 0x8000 : 0);
|
||||
} else {
|
||||
GXTexCoord2u16(param_4 ? 0x8000 : 0, param_5 ? 0x8000 : 0);
|
||||
}
|
||||
|
||||
GXPosition3f32(width, height, 0.0f);
|
||||
GXColor1u32(corner_color[3]);
|
||||
if (!param_6) {
|
||||
GXTexCoord2u16(param_4 ? 0 : 0x8000, param_5 ? 0 : 0x8000);
|
||||
} else {
|
||||
GXTexCoord2u16(param_4 ? 0 : 0x8000, param_5 ? 0x8000 : 0);
|
||||
}
|
||||
|
||||
GXPosition3f32(0.0f, height, 0.0f);
|
||||
GXColor1u32(corner_color[2]);
|
||||
if (!param_6) {
|
||||
GXTexCoord2u16(param_4 ? 0x8000 : 0, param_5 ? 0 : 0x8000);
|
||||
} else {
|
||||
GXTexCoord2u16(param_4 ? 0 : 0x8000, param_5 ? 0 : 0x8000);
|
||||
}
|
||||
|
||||
GXEnd();
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
GXSetNumTexGens(0);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
GXSetTevSwapModeTable((GXTevSwapSel)i, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
|
||||
}
|
||||
GXSetNumIndStages(0);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
GXSetTevDirect((GXTevStageID)i);
|
||||
}
|
||||
Mtx mtx;
|
||||
MTXIdentity(mtx);
|
||||
GXLoadPosMtxImm(mtx, GX_PNMTX0);
|
||||
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_NONE);
|
||||
}
|
||||
|
||||
/* 80304D88-80304EF0 2FF6C8 0168+00 1/0 0/0 0/0 .text drawOut__12J2DPictureExFffffff */
|
||||
// NONMATCHING stack ordering
|
||||
void J2DPictureEx::drawOut(f32 param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4,
|
||||
f32 param_5) {
|
||||
// NONMATCHING
|
||||
f32 param_5) {
|
||||
if (mMaterial == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaterial->getTevBlock() == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
JUTTexture* texture = mMaterial->getTevBlock()->getTexture(0);
|
||||
if (texture != NULL) {
|
||||
JGeometry::TBox2<f32> box1(param_4, param_5, param_4 + texture->getWidth(), param_5 + texture->getHeight());
|
||||
JGeometry::TBox2<f32> box2(param_0, param_1, param_0 + param_2, param_1 + param_3);
|
||||
drawOut(box1, box2);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80304EF0-80305264 2FF830 0374+00 1/0 0/0 0/0 .text
|
||||
* drawOut__12J2DPictureExFRCQ29JGeometry8TBox2<f>RCQ29JGeometry8TBox2<f> */
|
||||
void J2DPictureEx::drawOut(JGeometry::TBox2<f32> const& param_0,
|
||||
JGeometry::TBox2<f32> const& param_1) {
|
||||
// NONMATCHING
|
||||
JGeometry::TBox2<f32> const& param_1) {
|
||||
if (mMaterial == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMaterial->getTevBlock() == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mMaterial->setGX();
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
|
||||
if (!mMaterial->isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mColorAlpha = mAlpha;
|
||||
JUtility::TColor corner_color[4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
corner_color[i] = mCornerColor[i];
|
||||
}
|
||||
if (mMaterial->getMaterialAlphaCalc() == 1) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
corner_color[i].a = (mColorAlpha * corner_color[i].a) / 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
f32 x1 = (param_0.i.x - param_1.i.x) / param_1.getWidth();
|
||||
f32 x2 = (param_0.f.x - param_1.f.x) / param_1.getWidth() + 1.0f;
|
||||
f32 y1 = (param_0.i.y - param_1.i.y) / param_1.getHeight();
|
||||
f32 y2 = (param_0.f.y - param_1.f.y) / param_1.getHeight() + 1.0f;
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
|
||||
GXPosition3f32(param_0.i.x, param_0.i.y, 0.0f);
|
||||
GXColor1u32(corner_color[0]);
|
||||
GXTexCoord2f32(x1, y1);
|
||||
GXPosition3f32(param_0.f.x, param_0.i.y, 0.0f);
|
||||
GXColor1u32(corner_color[1]);
|
||||
GXTexCoord2f32(x2, y1);
|
||||
GXPosition3f32(param_0.f.x, param_0.f.y, 0.0f);
|
||||
GXColor1u32(corner_color[3]);
|
||||
GXTexCoord2f32(x2, y2);
|
||||
GXPosition3f32(param_0.i.x, param_0.f.y, 0.0f);
|
||||
GXColor1u32(corner_color[2]);
|
||||
GXTexCoord2f32(x1, y2);
|
||||
|
||||
GXEnd();
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBX8, 15);
|
||||
GXSetNumTexGens(0);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTevOp(GX_TEVSTAGE0, GX_PASSCLR);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
GXSetTevSwapModeTable((GXTevSwapSel)i, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
|
||||
}
|
||||
GXSetNumIndStages(0);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
GXSetTevDirect((GXTevStageID)i);
|
||||
}
|
||||
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_NONE);
|
||||
}
|
||||
|
||||
/* 80305264-803052AC 2FFBA4 0048+00 1/0 0/0 0/0 .text load__12J2DPictureExF11_GXTexMapIDUc */
|
||||
@@ -351,32 +627,171 @@ void J2DPictureEx::load(_GXTexMapID param_0, u8 param_1) {
|
||||
/* 803052AC-803053E0 2FFBEC 0134+00 3/3 0/0 0/0 .text setTevOrder__12J2DPictureExFUcUcb
|
||||
*/
|
||||
void J2DPictureEx::setTevOrder(u8 param_0, u8 param_1, bool param_2) {
|
||||
// NONMATCHING
|
||||
u16 local_30[16];
|
||||
if (param_0 == 1) {
|
||||
if (!param_2) {
|
||||
local_30[0] = 4;
|
||||
} else {
|
||||
local_30[0] = 0xff;
|
||||
local_30[1] = 0xff04;
|
||||
}
|
||||
} else {
|
||||
for (u8 i = 0; i < param_0; i++) {
|
||||
local_30[i] = (i << 8) | 0xff;
|
||||
}
|
||||
if (!param_2) {
|
||||
local_30[param_0] = 0xff04;
|
||||
} else {
|
||||
local_30[param_0] = 0xffff;
|
||||
local_30[param_0 + 1] = 0xff04;
|
||||
}
|
||||
}
|
||||
|
||||
for (u8 i = 0; i < param_1; i++) {
|
||||
J2DTevOrderInfo info;
|
||||
info.mTexMap = info.mTexCoord = local_30[i] >> 8;
|
||||
info.mColor = local_30[i] & 0xff;
|
||||
J2DTevOrder order(info);
|
||||
mMaterial->getTevBlock()->setTevOrder(i, order);
|
||||
}
|
||||
}
|
||||
|
||||
/* 803053E0-80305688 2FFD20 02A8+00 3/3 0/0 0/0 .text setTevStage__12J2DPictureExFUcUcb
|
||||
*/
|
||||
void J2DPictureEx::setTevStage(u8 param_0, u8 param_1, bool param_2) {
|
||||
// NONMATCHING
|
||||
if (param_0 == 1) {
|
||||
J2DTevStage* stage = mMaterial->getTevBlock()->getTevStage(0);
|
||||
JUTTexture* texture = mMaterial->getTevBlock()->getTexture(0);
|
||||
bool bVar1 = false;
|
||||
if (texture != NULL && texture->getTexInfo() != NULL
|
||||
&& (texture->getFormat() == 0 || texture->getFormat() == 1)
|
||||
&& texture->getTransparency() == 0)
|
||||
{
|
||||
bVar1 = true;
|
||||
}
|
||||
if (!param_2) {
|
||||
setStage(stage, bVar1 ? STAGE_1 : STAGE_0);
|
||||
} else {
|
||||
setStage(stage, bVar1 ? STAGE_6 : STAGE_5);
|
||||
stage = mMaterial->getTevBlock()->getTevStage(1);
|
||||
setStage(stage, STAGE_4);
|
||||
}
|
||||
} else if (!param_2) {
|
||||
J2DTevStage* stage = mMaterial->getTevBlock()->getTevStage(0);
|
||||
setStage(stage, STAGE_2);
|
||||
for (u8 i = 1; i < param_0; i++) {
|
||||
stage = mMaterial->getTevBlock()->getTevStage(i);
|
||||
setStage(stage, STAGE_3);
|
||||
}
|
||||
stage = mMaterial->getTevBlock()->getTevStage(param_0);
|
||||
setStage(stage, STAGE_4);
|
||||
} else {
|
||||
J2DTevStage* stage = mMaterial->getTevBlock()->getTevStage(0);
|
||||
setStage(stage, STAGE_2);
|
||||
for (u8 i = 1; i < param_0; i++) {
|
||||
stage = mMaterial->getTevBlock()->getTevStage(i);
|
||||
setStage(stage, STAGE_3);
|
||||
}
|
||||
stage = mMaterial->getTevBlock()->getTevStage(param_0);
|
||||
setStage(stage, STAGE_7);
|
||||
stage = mMaterial->getTevBlock()->getTevStage((u8)(param_0 + 1));
|
||||
setStage(stage, STAGE_4);
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A1D50-803A1D70 02E3B0 0020+00 1/1 0/0 0/0 .rodata @2555 */
|
||||
SECTION_RODATA static u8 const lit_2555[32] = {
|
||||
0x0F, 0x08, 0x0A, 0x0F, 0x0F, 0x08, 0x0A, 0x0F, 0x0F, 0x08, 0x0E, 0x0F, 0x0F, 0x08, 0x0E, 0x00,
|
||||
0x0F, 0x0A, 0x00, 0x0F, 0x02, 0x04, 0x08, 0x0F, 0x02, 0x04, 0x08, 0x0F, 0x02, 0x04, 0x00, 0x0F,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1D50, &lit_2555);
|
||||
|
||||
/* 80305688-80305928 2FFFC8 02A0+00 1/1 0/0 0/0 .text
|
||||
* setStage__12J2DPictureExFP11J2DTevStageQ212J2DPictureEx10stage_enum */
|
||||
void J2DPictureEx::setStage(J2DTevStage* param_0, J2DPictureEx::stage_enum param_1) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setStage(J2DTevStage* stage, J2DPictureEx::stage_enum idx) {
|
||||
s8 colorData[8][4] = {
|
||||
{0x0F, 0x08, 0x0A, 0x0F},
|
||||
{0x0F, 0x08, 0x0A, 0x0F},
|
||||
{0x0F, 0x08, 0x0E, 0x0F},
|
||||
{0x0F, 0x08, 0x0E, 0x00},
|
||||
{0x0F, 0x0A, 0x00, 0x0F},
|
||||
{0x02, 0x04, 0x08, 0x0F},
|
||||
{0x02, 0x04, 0x08, 0x0F},
|
||||
{0x02, 0x04, 0x00, 0x0F},
|
||||
};
|
||||
s8 alphaData[8][4] = {
|
||||
{0x07, 0x04, 0x05, 0x07},
|
||||
{0x05, 0x07, 0x07, 0x07},
|
||||
{0x07, 0x04, 0x06, 0x07},
|
||||
{0x07, 0x04, 0x06, 0x00},
|
||||
{0x07, 0x05, 0x00, 0x07},
|
||||
{0x01, 0x02, 0x04, 0x07},
|
||||
{0x07, 0x07, 0x07, 0x02},
|
||||
{0x01, 0x02, 0x00, 0x07},
|
||||
};
|
||||
s8 opData[8][5] = {
|
||||
{0x00, 0x00, 0x00, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x01, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
};
|
||||
|
||||
stage->setTevColorAB(colorData[idx][0], colorData[idx][1]);
|
||||
stage->setTevColorCD(colorData[idx][2], colorData[idx][3]);
|
||||
stage->setTevColorOp(opData[idx][0], opData[idx][1], opData[idx][2], opData[idx][3], opData[idx][4]);
|
||||
stage->setAlphaABCD(alphaData[idx][0], alphaData[idx][1], alphaData[idx][2], alphaData[idx][3]);
|
||||
stage->setTevAlphaOp(opData[idx][0], opData[idx][1], opData[idx][2], opData[idx][3], opData[idx][4]);
|
||||
}
|
||||
|
||||
/* 80305928-80305C70 300268 0348+00 5/5 0/0 0/0 .text setTevKColor__12J2DPictureExFUc */
|
||||
void J2DPictureEx::setTevKColor(u8 param_0) {
|
||||
// NONMATCHING
|
||||
if (param_0 == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
f32 fVar2 = 0.0f;
|
||||
f32 fVar3 = 0.0f;
|
||||
|
||||
if (param_0 < 2) {
|
||||
for (u8 i = 0; i < param_0; i++) {
|
||||
fVar2 += field_0x11c[i];
|
||||
fVar3 += field_0x124[i];
|
||||
}
|
||||
} else {
|
||||
for (u8 i = 0; i < 2; i++) {
|
||||
fVar2 += field_0x11c[i];
|
||||
fVar3 += field_0x124[i];
|
||||
}
|
||||
for (u8 i = 0; i < param_0 - 2; i++) {
|
||||
fVar2 += field_0x160[i];
|
||||
fVar3 += field_0x178[i];
|
||||
}
|
||||
}
|
||||
|
||||
u8 local_3c[8];
|
||||
u8 local_44[8];
|
||||
|
||||
for (u8 i = 0; i < 8; i++) {
|
||||
local_3c[i] = 0xff;
|
||||
local_44[i] = 0xff;
|
||||
}
|
||||
|
||||
for (u8 i = 0; i < param_0; i++) {
|
||||
if (i < 2) {
|
||||
local_3c[i] = field_0x11c[i] * 0xff / fVar2;
|
||||
local_44[i] = field_0x124[i] * 0xff / fVar3;
|
||||
} else {
|
||||
local_3c[i] = field_0x160[i - 2] * 0xff / fVar2;
|
||||
local_44[i] = field_0x178[i - 2] * 0xff / fVar3;
|
||||
}
|
||||
}
|
||||
|
||||
JUtility::TColor color[4];
|
||||
color[3] = local_3c[3] << 24 | local_3c[2] << 16 | local_3c[1] << 8 | local_3c[0];
|
||||
color[2] = local_3c[7] << 24 | local_3c[6] << 16 | local_3c[5] << 8 | local_3c[4];
|
||||
color[1] = local_44[3] << 24 | local_44[2] << 16 | local_44[1] << 8 | local_44[0];
|
||||
color[0] = local_44[7] << 24 | local_44[6] << 16 | local_44[5] << 8 | local_44[4];
|
||||
|
||||
for (u8 i = 0; i < 4; i++) {
|
||||
mMaterial->getTevBlock()->setTevKColor(i, color[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80305C70-80305D18 3005B0 00A8+00 3/3 0/0 0/0 .text setTevKColorSel__12J2DPictureExFUc
|
||||
@@ -472,8 +887,35 @@ void J2DPictureEx::setBlendAlphaRatio(f32 param_0, f32 param_1) {
|
||||
|
||||
/* 80305F94-803060DC 3008D4 0148+00 1/0 0/0 0/0 .text changeTexture__12J2DPictureExFPC7ResTIMGUc
|
||||
*/
|
||||
const ResTIMG* J2DPictureEx::changeTexture(ResTIMG const* param_0, u8 param_1) {
|
||||
// NONMATCHING
|
||||
// NONMATCHING small regalloc
|
||||
const ResTIMG* J2DPictureEx::changeTexture(ResTIMG const* img, u8 param_1) {
|
||||
if (mMaterial == NULL || img == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u32 tex_gen_num = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
if (param_1 > tex_gen_num) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u8 max_stage = mMaterial->getTevBlock()->getMaxStage();
|
||||
max_stage = max_stage > 8 ? 8 : max_stage;
|
||||
if (param_1 >= max_stage) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (param_1 < tex_gen_num) {
|
||||
const ResTIMG* texinfo = getTexture(param_1)->getTexInfo();
|
||||
u8 uVar6 = 0;
|
||||
if (img->indexTexture) {
|
||||
uVar6 = getUsableTlut(param_1);
|
||||
}
|
||||
getTexture(param_1)->storeTIMG(img, uVar6);
|
||||
return texinfo;
|
||||
} else {
|
||||
append(img, 1.0f);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* 803060DC-80306134 300A1C 0058+00 1/0 0/0 0/0 .text changeTexture__12J2DPictureExFPCcUc
|
||||
@@ -485,7 +927,7 @@ const ResTIMG* J2DPictureEx::changeTexture(char const* param_0, u8 param_1) {
|
||||
|
||||
/* 80306134-80306298 300A74 0164+00 1/0 0/0 0/0 .text
|
||||
* changeTexture__12J2DPictureExFPC7ResTIMGUcP10JUTPalette */
|
||||
// Issues with param_1 >= bVar5. Maybe some inline min function.
|
||||
// NONMATCHING Issues with param_1 >= bVar5. Maybe some inline min function.
|
||||
inline u8 mina(u8 a, u8 b) {
|
||||
return a > b ? b : a;
|
||||
}
|
||||
@@ -620,193 +1062,331 @@ bool J2DPictureEx::setBlackWhite(JUtility::TColor param_0, JUtility::TColor para
|
||||
|
||||
/* 80306664-80306824 300FA4 01C0+00 4/4 0/0 0/0 .text
|
||||
* getBlackWhite__12J2DPictureExCFPQ28JUtility6TColorPQ28JUtility6TColor */
|
||||
bool J2DPictureEx::getBlackWhite(JUtility::TColor* param_0, JUtility::TColor* param_1) const {
|
||||
// NONMATCHING
|
||||
// NONMATCHING regswap
|
||||
bool J2DPictureEx::getBlackWhite(JUtility::TColor* black, JUtility::TColor* white) const {
|
||||
if (mMaterial == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mMaterial->getTevBlock() == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 tex_gen_num = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
u32 tev_stage_num = mMaterial->getTevBlock()->getTevStageNum();
|
||||
bool bVar1;
|
||||
if (tex_gen_num == 1) {
|
||||
bVar1 = tev_stage_num != 1;
|
||||
} else {
|
||||
bVar1 = tev_stage_num != tex_gen_num + 1;
|
||||
}
|
||||
|
||||
*black = 0x00000000;
|
||||
*white = 0xffffffff;
|
||||
|
||||
if (bVar1) {
|
||||
J2DGXColorS10 tevColor0 = *mMaterial->getTevBlock()->getTevColor(0);
|
||||
J2DGXColorS10 tevColor1 = *mMaterial->getTevBlock()->getTevColor(1);
|
||||
*black = (u8)tevColor0.r << 24 | (u8)tevColor0.g << 16 | (u8)tevColor0.b << 8 | (u8)tevColor0.a;
|
||||
*white = (u8)tevColor1.r << 24 | (u8)tevColor1.g << 16 | (u8)tevColor1.b << 8 | (u8)tevColor1.a;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 80306824-803068F8 301164 00D4+00 1/1 0/0 0/0 .text
|
||||
* isSetBlackWhite__12J2DPictureExCFQ28JUtility6TColorQ28JUtility6TColor */
|
||||
bool J2DPictureEx::isSetBlackWhite(JUtility::TColor param_0, JUtility::TColor param_1) const {
|
||||
// NONMATCHING
|
||||
// NONMATCHING missing clrlwi, regalloc
|
||||
bool J2DPictureEx::isSetBlackWhite(JUtility::TColor black, JUtility::TColor white) const {
|
||||
if (black == 0x00000000 && white == 0xffffffff) {
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 tex_gen_num = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
u32 tev_stage_num = mMaterial->getTevBlock()->getTevStageNum();
|
||||
u8 max_tev_stage = mMaterial->getTevBlock()->getMaxStage();
|
||||
|
||||
if (max_tev_stage == 16) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (max_tev_stage == 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 tmp = tex_gen_num == 1 ? 2 : tex_gen_num + 2;
|
||||
return max_tev_stage <= tmp;
|
||||
}
|
||||
|
||||
/* 803068F8-80306958 301238 0060+00 1/0 0/0 0/0 .text getBlack__12J2DPictureExCFv */
|
||||
JUtility::TColor J2DPictureEx::getBlack() const {
|
||||
// NONMATCHING
|
||||
JUtility::TColor black, white;
|
||||
if (!getBlackWhite(&black, &white)) {
|
||||
return 0x00000000;
|
||||
} else {
|
||||
return black;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306958-803069B8 301298 0060+00 1/0 0/0 0/0 .text getWhite__12J2DPictureExCFv */
|
||||
JUtility::TColor J2DPictureEx::getWhite() const {
|
||||
// NONMATCHING
|
||||
JUtility::TColor black, white;
|
||||
if (!getBlackWhite(&black, &white)) {
|
||||
return 0xffffffff;
|
||||
} else {
|
||||
return white;
|
||||
}
|
||||
}
|
||||
|
||||
/* 803069B8-803069D8 3012F8 0020+00 1/0 0/0 0/0 .text setAlpha__12J2DPictureExFUc */
|
||||
void J2DPictureEx::setAlpha(u8 param_0) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setAlpha(u8 alpha) {
|
||||
mAlpha = alpha;
|
||||
if (mMaterial != NULL && mMaterial->getColorBlock()->getMatColor(0) != NULL) {
|
||||
mMaterial->getColorBlock()->getMatColor(0)->a = alpha;
|
||||
}
|
||||
}
|
||||
|
||||
/* 803069D8-80306A0C 301318 0034+00 1/0 0/0 0/0 .text setCullBack__12J2DPictureExF11_GXCullMode */
|
||||
void J2DPictureEx::setCullBack(_GXCullMode param_0) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setCullBack(GXCullMode cullMode) {
|
||||
mCullMode = cullMode;
|
||||
if (mMaterial != NULL) {
|
||||
mMaterial->getColorBlock()->setCullMode(cullMode);
|
||||
}
|
||||
J2DPane::setCullBack(cullMode);
|
||||
}
|
||||
|
||||
/* 80306A0C-80306A24 30134C 0018+00 1/0 0/0 0/0 .text rewriteAlpha__12J2DPictureExFv */
|
||||
void J2DPictureEx::rewriteAlpha() {
|
||||
// NONMATCHING
|
||||
if (mMaterial != NULL) {
|
||||
mAlpha = mMaterial->getColorBlock()->getMatColor(0)->a;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306A24-80306AC4 301364 00A0+00 1/0 0/0 0/0 .text isUsed__12J2DPictureExFPC7ResTIMG
|
||||
*/
|
||||
bool J2DPictureEx::isUsed(ResTIMG const* param_0) {
|
||||
// NONMATCHING
|
||||
bool J2DPictureEx::isUsed(ResTIMG const* texInfo) {
|
||||
if (mMaterial != NULL && mMaterial->getTevBlock() != NULL) {
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
JUTTexture* texture = mMaterial->getTevBlock()->getTexture(i);
|
||||
if (texture != NULL && texture->getTexInfo() == texInfo) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return J2DPane::isUsed(texInfo);
|
||||
}
|
||||
|
||||
/* 80306AC4-80306AF0 301404 002C+00 1/0 0/0 0/0 .text setAnimation__12J2DPictureExFP11J2DAnmColor
|
||||
*/
|
||||
void J2DPictureEx::setAnimation(J2DAnmColor* param_0) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setAnimation(J2DAnmColor* anm) {
|
||||
if (mMaterial != NULL) {
|
||||
mMaterial->setAnimation(anm);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306AF0-80306B1C 301430 002C+00 1/0 0/0 0/0 .text
|
||||
* setAnimation__12J2DPictureExFP19J2DAnmTextureSRTKey */
|
||||
void J2DPictureEx::setAnimation(J2DAnmTextureSRTKey* param_0) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setAnimation(J2DAnmTextureSRTKey* anm) {
|
||||
if (mMaterial != NULL) {
|
||||
mMaterial->setAnimation(anm);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306B1C-80306B48 30145C 002C+00 1/0 0/0 0/0 .text
|
||||
* setAnimation__12J2DPictureExFP16J2DAnmTexPattern */
|
||||
void J2DPictureEx::setAnimation(J2DAnmTexPattern* param_0) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setAnimation(J2DAnmTexPattern* anm) {
|
||||
if (mMaterial != NULL) {
|
||||
mMaterial->setAnimation(anm);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306B48-80306B74 301488 002C+00 1/0 0/0 0/0 .text
|
||||
* setAnimation__12J2DPictureExFP15J2DAnmTevRegKey */
|
||||
void J2DPictureEx::setAnimation(J2DAnmTevRegKey* param_0) {
|
||||
// NONMATCHING
|
||||
void J2DPictureEx::setAnimation(J2DAnmTevRegKey* anm) {
|
||||
if (mMaterial != NULL) {
|
||||
mMaterial->setAnimation(anm);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306B74-80306B7C -00001 0008+00 0/0 0/0 0/0 .text
|
||||
* setAnimation__12J2DPictureExFP20J2DAnmVisibilityFull */
|
||||
void J2DPictureEx::setAnimation(J2DAnmVisibilityFull* param_0) {
|
||||
*(u32*)(((u8*)this) + 404) /* this->field_0x194 */ = (u32)(param_0);
|
||||
void J2DPictureEx::setAnimation(J2DAnmVisibilityFull* anm) {
|
||||
field_0x194 = anm;
|
||||
}
|
||||
|
||||
/* 80306B7C-80306C70 3014BC 00F4+00 1/0 0/0 0/0 .text
|
||||
* setAnimation__12J2DPictureExFP14J2DAnmVtxColor */
|
||||
void J2DPictureEx::setAnimation(J2DAnmVtxColor* param_0) {
|
||||
// NONMATCHING
|
||||
// NONMATCHING regswap
|
||||
void J2DPictureEx::setAnimation(J2DAnmVtxColor* anm) {
|
||||
field_0x198 = anm;
|
||||
field_0x19c = 0;
|
||||
|
||||
if (anm != NULL) {
|
||||
u16 anm_table_num = anm->getAnmTableNum(0);
|
||||
for (u8 i = 0; i < 4; i++) {
|
||||
if (field_0x158[i] != 0xffff) {
|
||||
for (u16 j = 0; j < anm_table_num; j++) {
|
||||
J3DAnmVtxColorIndexData* data = anm->getAnmVtxColorIndexData(0, j);
|
||||
u16* index = anm->getVtxColorIndexPointer(0) + (u32)data->mpData;
|
||||
for (u16 k = 0; k < data->mNum; k++) {
|
||||
if (index[k] == field_0x158[i]) {
|
||||
field_0x198 = anm;
|
||||
field_0x19c |= 1 << i;
|
||||
goto next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
next:;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x19c == 0) {
|
||||
field_0x198 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80306C70-80306DC8 3015B0 0158+00 1/0 0/0 0/0 .text
|
||||
* animationPane__12J2DPictureExFPC15J2DAnmTransform */
|
||||
const J2DAnmTransform* J2DPictureEx::animationPane(J2DAnmTransform const* param_0) {
|
||||
// NONMATCHING
|
||||
const J2DAnmTransform* J2DPictureEx::animationPane(J2DAnmTransform const* anm) {
|
||||
if (field_0x194 != NULL && field_0x154 != 0xffff) {
|
||||
u8 tmp;
|
||||
field_0x194->getVisibility(field_0x154, &tmp);
|
||||
if (tmp != 0) {
|
||||
show();
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x198 != NULL) {
|
||||
u16 anm_table_num = field_0x198->getAnmTableNum(0);
|
||||
for (u8 i = 0; i < 4; i++) {
|
||||
if (field_0x19c & (1 << i)) {
|
||||
for (u16 j = 0; j < anm_table_num; j++) {
|
||||
J3DAnmVtxColorIndexData* data = field_0x198->getAnmVtxColorIndexData(0, j);
|
||||
u16* index = field_0x198->getVtxColorIndexPointer(0) + (u32)data->mpData;
|
||||
for (u16 k = 0; k < data->mNum; k++) {
|
||||
if (index[k] == field_0x158[i]) {
|
||||
field_0x198->getColor(0, j, &mCornerColor[i]);
|
||||
goto next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
next:;
|
||||
}
|
||||
}
|
||||
|
||||
return J2DPane::animationPane(anm);
|
||||
}
|
||||
|
||||
/* 80306DC8-80306ED4 301708 010C+00 1/0 0/0 0/0 .text getUsableTlut__12J2DPictureExFUc */
|
||||
u8 J2DPictureEx::getUsableTlut(u8 param_0) {
|
||||
// NONMATCHING
|
||||
u32 tex_gen_num = mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
u8 usedTluts = 0;
|
||||
|
||||
for (u8 i = 0; i < tex_gen_num; i++) {
|
||||
JUTTexture* texture = mMaterial->getTevBlock()->getTexture(i);
|
||||
if (i != param_0 && texture != NULL) {
|
||||
const ResTIMG* texInfo = texture->getTexInfo();
|
||||
if (texInfo != NULL && texInfo->indexTexture != 0) {
|
||||
int tlut_name = texture->getTlutName();
|
||||
u8 tlut_index = tlut_name - (tlut_name >= GX_BIGTLUT0 ? GX_BIGTLUT0 : GX_TLUT0);
|
||||
if (tlut_index < 8) {
|
||||
usedTluts |= 1 << tlut_index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u8 i = 0;
|
||||
for (; i < 8; i++) {
|
||||
if (!(usedTluts & (1 << i))) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80306ED4-80306F04 301814 0030+00 1/0 0/0 0/0 .text append__12J2DPictureExFPC7ResTIMGf
|
||||
*/
|
||||
bool J2DPictureEx::append(ResTIMG const* param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
return append(param_0, NULL, param_1);
|
||||
}
|
||||
|
||||
/* 80306F04-80306F34 301844 0030+00 1/0 0/0 0/0 .text append__12J2DPictureExFPCcf */
|
||||
bool J2DPictureEx::append(char const* param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
return append(param_0, NULL, param_1);
|
||||
}
|
||||
|
||||
/* 80306F34-80306F64 301874 0030+00 1/0 0/0 0/0 .text prepend__12J2DPictureExFP10JUTTexturef */
|
||||
void J2DPictureEx::prepend(JUTTexture* param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
|
||||
/* 80306F64-80306F94 3018A4 0030+00 1/0 0/0 0/0 .text prepend__12J2DPictureExFPCcP10JUTPalettef */
|
||||
void J2DPictureEx::prepend(char const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
// NONMATCHING
|
||||
insert(param_0, param_1, 0, param_2);
|
||||
}
|
||||
|
||||
/* 80306F94-80306FC4 3018D4 0030+00 1/0 0/0 0/0 .text prepend__12J2DPictureExFPCcf */
|
||||
void J2DPictureEx::prepend(char const* param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
|
||||
/* 80306FC4-80306FF4 301904 0030+00 1/0 0/0 0/0 .text
|
||||
* prepend__12J2DPictureExFPC7ResTIMGP10JUTPalettef */
|
||||
void J2DPictureEx::prepend(ResTIMG const* param_0, JUTPalette* param_1, f32 param_2) {
|
||||
// NONMATCHING
|
||||
insert(param_0, param_1, 0, param_2);
|
||||
}
|
||||
|
||||
/* 80306FF4-80307024 301934 0030+00 1/0 0/0 0/0 .text prepend__12J2DPictureExFPC7ResTIMGf
|
||||
*/
|
||||
void J2DPictureEx::prepend(ResTIMG const* param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
insert(param_0, 0, param_1);
|
||||
}
|
||||
|
||||
/* 80307024-80307058 301964 0034+00 1/0 0/0 0/0 .text insert__12J2DPictureExFPCcUcf */
|
||||
bool J2DPictureEx::insert(char const* param_0, u8 param_1, f32 param_2) {
|
||||
// NONMATCHING
|
||||
return insert(param_0, NULL, param_1, param_2);
|
||||
}
|
||||
|
||||
/* 80307058-8030708C 301998 0034+00 1/0 0/0 0/0 .text insert__12J2DPictureExFPC7ResTIMGUcf */
|
||||
void J2DPictureEx::insert(ResTIMG const* param_0, u8 param_1, f32 param_2) {
|
||||
// NONMATCHING
|
||||
bool J2DPictureEx::insert(ResTIMG const* param_0, u8 param_1, f32 param_2) {
|
||||
return insert(param_0, NULL, param_1, param_2);
|
||||
}
|
||||
|
||||
/* 8030708C-803070D0 3019CC 0044+00 1/0 0/0 0/0 .text draw__12J2DPictureExFffbbb */
|
||||
void J2DPictureEx::draw(f32 param_0, f32 param_1, bool param_2, bool param_3, bool param_4) {
|
||||
// NONMATCHING
|
||||
return draw(param_0, param_1, 0, param_2, param_3, param_4);
|
||||
}
|
||||
|
||||
/* 803070D0-80307134 301A10 0064+00 1/0 0/0 0/0 .text drawOut__12J2DPictureExFffffffff */
|
||||
void J2DPictureEx::drawOut(f32 param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4,
|
||||
f32 param_5, f32 param_6, f32 param_7) {
|
||||
// NONMATCHING
|
||||
drawOut(JGeometry::TBox2<f32>(param_0, param_1, param_0 + param_2, param_1 + param_3),
|
||||
JGeometry::TBox2<f32>(param_4, param_5, param_4 + param_6, param_5 + param_7));
|
||||
}
|
||||
|
||||
/* 80307134-80307168 301A74 0034+00 1/0 0/0 0/0 .text load__12J2DPictureExFUc */
|
||||
void J2DPictureEx::load(u8 param_0) {
|
||||
// NONMATCHING
|
||||
load((GXTexMapID)param_0, param_0);
|
||||
}
|
||||
|
||||
/* 80307168-803071A4 301AA8 003C+00 1/0 0/0 0/0 .text setCullBack__12J2DPictureExFb */
|
||||
void J2DPictureEx::setCullBack(bool param_0) {
|
||||
// NONMATCHING
|
||||
setCullBack(param_0 ? GX_CULL_BACK : GX_CULL_NONE);
|
||||
}
|
||||
|
||||
/* 803071A4-803071C4 301AE4 0020+00 1/0 0/0 0/0 .text isUsed__12J2DPictureExFPC7ResFONT
|
||||
*/
|
||||
bool J2DPictureEx::isUsed(ResFONT const* param_0) {
|
||||
// NONMATCHING
|
||||
return J2DPane::isUsed(param_0);
|
||||
}
|
||||
|
||||
/* 803071C4-803071E4 301B04 0020+00 1/0 0/0 0/0 .text setAnimation__12J2DPictureExFP10J2DAnmBase
|
||||
*/
|
||||
void J2DPictureEx::setAnimation(J2DAnmBase* param_0) {
|
||||
// NONMATCHING
|
||||
J2DPane::setAnimation(param_0);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A1D70-803A1D90 02E3D0 0020+00 0/0 0/0 0/0 .rodata @2556 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 const lit_2556[32] = {
|
||||
0x07, 0x04, 0x05, 0x07, 0x05, 0x07, 0x07, 0x07, 0x07, 0x04, 0x06, 0x07, 0x07, 0x04, 0x06, 0x00,
|
||||
0x07, 0x05, 0x00, 0x07, 0x01, 0x02, 0x04, 0x07, 0x07, 0x07, 0x07, 0x02, 0x01, 0x02, 0x00, 0x07,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1D70, &lit_2556);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1D90-803A1DB8 02E3F0 0028+00 0/0 0/0 0/0 .rodata @2557 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 const lit_2557[40] = {
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1D90, &lit_2557);
|
||||
#pragma pop
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JSupport/JSUMemoryStream.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "global.h"
|
||||
|
||||
/* 802F8498-802F8540 2F2DD8 00A8+00 0/0 59/59 4/4 .text __ct__9J2DScreenFv */
|
||||
J2DScreen::J2DScreen()
|
||||
|
||||
@@ -6,14 +6,6 @@
|
||||
#include "JSystem/J2DGraph/J2DWindowEx.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "JSystem/JSupport/JSURandomInputStream.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A1C60-803A1C70 02E2C0 0010+00 2/2 0/0 0/0 .rodata @1508 */
|
||||
SECTION_RODATA static u8 const lit_1508[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1C60, &lit_1508);
|
||||
|
||||
struct J2DWindowExDef {
|
||||
u32 field_0x0[4];
|
||||
@@ -93,7 +85,6 @@ J2DWindowEx::J2DWindowEx(J2DPane* param_0, JSURandomInputStream* param_1, u32 pa
|
||||
setMinSize();
|
||||
}
|
||||
|
||||
|
||||
/* 80300F80-80301144 2FB8C0 01C4+00 1/1 0/0 0/0 .text setMinSize__11J2DWindowExFv */
|
||||
void J2DWindowEx::setMinSize() {
|
||||
field_0x140 = 1;
|
||||
@@ -112,8 +103,10 @@ void J2DWindowEx::setMinSize() {
|
||||
if (mFrameMaterial[2]->getTevBlock()->getTexture(0) == NULL) return;
|
||||
if (mFrameMaterial[3]->getTevBlock()->getTexture(0) == NULL) return;
|
||||
|
||||
field_0x140 = mFrameMaterial[0]->getTevBlock()->getTexture(0)->getWidth() + mFrameMaterial[1]->getTevBlock()->getTexture(0)->getWidth();
|
||||
field_0x142 = mFrameMaterial[0]->getTevBlock()->getTexture(0)->getHeight() + mFrameMaterial[2]->getTevBlock()->getTexture(0)->getHeight();
|
||||
field_0x140 = mFrameMaterial[0]->getTevBlock()->getTexture(0)->getWidth()
|
||||
+ mFrameMaterial[1]->getTevBlock()->getTexture(0)->getWidth();
|
||||
field_0x142 = mFrameMaterial[0]->getTevBlock()->getTexture(0)->getHeight()
|
||||
+ mFrameMaterial[2]->getTevBlock()->getTexture(0)->getHeight();
|
||||
}
|
||||
|
||||
/* 80301144-8030122C 2FBA84 00E8+00 1/0 0/0 0/0 .text __dt__11J2DWindowExFv */
|
||||
@@ -319,6 +312,10 @@ void J2DWindowEx::draw_private(JGeometry::TBox2<f32> const& param_0,
|
||||
}
|
||||
}
|
||||
|
||||
static f32 dummy_literal() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
/* 80301994-80301D74 2FC2D4 03E0+00 1/0 0/0 0/0 .text
|
||||
* drawContents__11J2DWindowExFRCQ29JGeometry8TBox2<f> */
|
||||
void J2DWindowEx::drawContents(JGeometry::TBox2<f32> const& param_1) {
|
||||
@@ -447,7 +444,6 @@ void J2DWindowEx::drawFrameTexture(f32 param_1, f32 param_2, f32 param_3, f32 pa
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 80301FC8-80302164 2FC908 019C+00 1/0 0/0 0/0 .text draw__11J2DWindowExFRCQ29JGeometry8TBox2<f>
|
||||
*/
|
||||
void J2DWindowEx::draw(JGeometry::TBox2<f32> const& param_1) {
|
||||
@@ -476,7 +472,6 @@ void J2DWindowEx::draw(JGeometry::TBox2<f32> const& param_1) {
|
||||
draw(param_1, aTStack_78);
|
||||
}
|
||||
|
||||
|
||||
/* 80302164-80302284 2FCAA4 0120+00 1/0 0/0 0/0 .text
|
||||
* draw__11J2DWindowExFRCQ29JGeometry8TBox2<f>RCQ29JGeometry8TBox2<f> */
|
||||
void J2DWindowEx::draw(JGeometry::TBox2<f32> const& param_1, JGeometry::TBox2<f32> const& param_2) {
|
||||
@@ -499,7 +494,6 @@ void J2DWindowEx::draw(JGeometry::TBox2<f32> const& param_1, JGeometry::TBox2<f3
|
||||
GXLoadPosMtxImm(auStack_60, 0);
|
||||
}
|
||||
|
||||
|
||||
/* 80302284-80302388 2FCBC4 0104+00 1/1 0/0 0/0 .text setTevOrder__11J2DWindowExFb */
|
||||
void J2DWindowEx::setTevOrder(bool param_0) {
|
||||
u16 local_28[2];
|
||||
@@ -551,6 +545,48 @@ void J2DWindowEx::setTevStage(bool param_1) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 803A1C70-803A1C80 02E2D0 0010+00 0/0 0/0 0/0 .rodata @1557 */
|
||||
static u8 const lit_1557[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803A1C80-803A1C90 02E2E0 0010+00 0/0 0/0 0/0 .rodata @1566 */
|
||||
static u8 const lit_1566[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803A1C90-803A1CA0 02E2F0 0010+00 0/0 0/0 0/0 .rodata @1575 */
|
||||
static u8 const lit_1575[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
|
||||
/* 803A1CA0-803A1CB0 02E300 0010+00 0/0 0/0 0/0 .rodata @1581 */
|
||||
static u8 const lit_1581[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
|
||||
/* 803A1CB0-803A1CC0 02E310 0010+00 0/0 0/0 0/0 .rodata @1587 */
|
||||
static u8 const lit_1587[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803A1CC0-803A1CD0 02E320 0010+00 0/0 0/0 0/0 .rodata @1596 */
|
||||
static u8 const lit_1596[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803A1CD0-803A1CE0 02E330 0010+00 0/0 0/0 0/0 .rodata @1605 */
|
||||
static u8 const lit_1605[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803A1CE0-803A1CF0 02E340 0010+00 0/0 0/0 0/0 .rodata @1612 */
|
||||
static u8 const lit_1612[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 803024B4-80302764 2FCDF4 02B0+00 1/1 0/0 0/0 .text
|
||||
* setStage__11J2DWindowExFP11J2DTevStageQ211J2DWindowEx10stage_enum */
|
||||
void J2DWindowEx::setStage(J2DTevStage* param_0, J2DWindowEx::stage_enum param_1) {
|
||||
@@ -563,8 +599,8 @@ void J2DWindowEx::setStage(J2DTevStage* param_0, J2DWindowEx::stage_enum param_1
|
||||
{0x01, 0x02, 0x04, 0x07}, {0x07, 0x07, 0x07, 0x02}, {0x07, 0x07, 0x07, 0x05},
|
||||
};
|
||||
s8 local_68[6][5] = {
|
||||
{1, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 1, 0, 0, 1},
|
||||
{0, 0, 1, 0, 0}, {1, 0, 0, 0, 0}, {0, 0, 0, 0, 1},
|
||||
{0, 0, 0, 1, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 1, 0},
|
||||
{0, 0, 0, 1, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 1, 0},
|
||||
};
|
||||
|
||||
param_0->setTevColorAB(local_30[param_1][0], local_30[param_1][1]);
|
||||
@@ -677,8 +713,10 @@ bool J2DWindowEx::getBlackWhite(JUtility::TColor* param_0, JUtility::TColor* par
|
||||
color1.g = color1p->g;
|
||||
color1.b = color1p->b;
|
||||
color1.a = color1p->a;
|
||||
*param_0 = JUtility::TColor((((u8)color0.r) << 0x18) | (((u8)color0.g) << 0x10) | (((u8)color0.b) << 0x8) | (((u8)color0.a)));
|
||||
*param_1 = JUtility::TColor((((u8)color1.r) << 0x18) | (((u8)color1.g) << 0x10) | (((u8)color1.b) << 0x8) | (((u8)color1.a)));
|
||||
*param_0 = JUtility::TColor((((u8)color0.r) << 0x18) | (((u8)color0.g) << 0x10)
|
||||
| (((u8)color0.b) << 0x8) | (((u8)color0.a)));
|
||||
*param_1 = JUtility::TColor((((u8)color1.r) << 0x18) | (((u8)color1.g) << 0x10)
|
||||
| (((u8)color1.b) << 0x8) | (((u8)color1.a)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -901,140 +939,6 @@ void J2DWindowEx::setAnimation(J2DAnmVtxColor* param_0) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A1C70-803A1C80 02E2D0 0010+00 0/0 0/0 0/0 .rodata @1557 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1557[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1C70, &lit_1557);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1C80-803A1C90 02E2E0 0010+00 0/0 0/0 0/0 .rodata @1566 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1566[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1C80, &lit_1566);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1C90-803A1CA0 02E2F0 0010+00 0/0 0/0 0/0 .rodata @1575 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1575[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1C90, &lit_1575);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1CA0-803A1CB0 02E300 0010+00 0/0 0/0 0/0 .rodata @1581 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1581[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1CA0, &lit_1581);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1CB0-803A1CC0 02E310 0010+00 0/0 0/0 0/0 .rodata @1587 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1587[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1CB0, &lit_1587);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1CC0-803A1CD0 02E320 0010+00 0/0 0/0 0/0 .rodata @1596 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1596[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1CC0, &lit_1596);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1CD0-803A1CE0 02E330 0010+00 0/0 0/0 0/0 .rodata @1605 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1605[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1CD0, &lit_1605);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1CE0-803A1CF0 02E340 0010+00 0/0 0/0 0/0 .rodata @1612 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_1612[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1CE0, &lit_1612);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1CF0-803A1D08 02E350 0018+00 0/0 0/0 0/0 .rodata @2530 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_2530[24] = {
|
||||
0x0F, 0x08, 0x0A, 0x0F, 0x0F, 0x08, 0x0A, 0x0F, 0x0F, 0x0A, 0x00, 0x0F,
|
||||
0x02, 0x04, 0x08, 0x0F, 0x02, 0x04, 0x08, 0x0F, 0x0F, 0x0F, 0x0F, 0x0A,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1CF0, &lit_2530);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1D08-803A1D20 02E368 0018+00 0/0 0/0 0/0 .rodata @2531 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_2531[24] = {
|
||||
0x07, 0x04, 0x05, 0x07, 0x05, 0x07, 0x07, 0x07, 0x07, 0x05, 0x00, 0x07,
|
||||
0x01, 0x02, 0x04, 0x07, 0x07, 0x07, 0x07, 0x02, 0x07, 0x07, 0x07, 0x05,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1D08, &lit_2531);
|
||||
#pragma pop
|
||||
|
||||
/* 803A1D20-803A1D40 02E380 001E+02 0/0 0/0 0/0 .rodata @2532 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_RODATA static u8 const lit_2532[30 + 2 /* padding */] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x00,
|
||||
/* padding */
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803A1D20, &lit_2532);
|
||||
#pragma pop
|
||||
|
||||
/* 80303370-80303510 2FDCB0 01A0+00 1/0 0/0 0/0 .text
|
||||
* animationPane__11J2DWindowExFPC15J2DAnmTransform */
|
||||
const J2DAnmTransform* J2DWindowEx::animationPane(J2DAnmTransform const* param_0) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "JSystem/J3DGraphBase/J3DGD.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTransform.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/os.h"
|
||||
#include "string.h"
|
||||
#include "global.h"
|
||||
@@ -359,8 +358,8 @@ void J3DColorBlockLightOff::load() {
|
||||
mColorChanOffset = GDGetCurrOffset();
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
}
|
||||
|
||||
@@ -376,8 +375,8 @@ void J3DColorBlockAmbientOn::load() {
|
||||
mColorChanOffset = GDGetCurrOffset();
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
}
|
||||
|
||||
@@ -390,8 +389,8 @@ void J3DColorBlockLightOn::load() {
|
||||
mColorChanOffset = GDGetCurrOffset();
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (mLight[i] != NULL) {
|
||||
@@ -423,8 +422,8 @@ void J3DColorBlockLightOff::patchLight() {
|
||||
GDOverflowCheck(SizeOfLoadColorChans);
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
void* end = GDGetCurrPointer();
|
||||
DCStoreRange(start, (u32)end - (u32)start);
|
||||
@@ -453,8 +452,8 @@ void J3DColorBlockLightOn::patchLight() {
|
||||
GDOverflowCheck(SizeOfLoadColorChans);
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (mLight[i] != NULL) {
|
||||
@@ -484,8 +483,8 @@ void J3DColorBlockLightOff::diffColorChan() {
|
||||
GDOverflowCheck(SizeOfLoadColorChans);
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
}
|
||||
|
||||
@@ -521,8 +520,8 @@ void J3DColorBlockLightOn::diffColorChan() {
|
||||
GDOverflowCheck(SizeOfLoadColorChans);
|
||||
J3DGDWriteXFCmdHdr(0x100e, 4);
|
||||
mColorChan[0].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[2].load();
|
||||
mColorChan[1].load();
|
||||
mColorChan[3].load();
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,6 @@ void J3DMaterial::setCurrentMtx() {
|
||||
}
|
||||
|
||||
/* 80316AC8-80316D68 311408 02A0+00 1/1 0/0 0/0 .text calcCurrentMtx__11J3DMaterialFv */
|
||||
// NONMATCHING Issues with setCurrentTexMtx
|
||||
void J3DMaterial::calcCurrentMtx() {
|
||||
if (!j3dSys.checkFlag(0x40000000)) {
|
||||
mCurrentMtx.setCurrentTexMtx(
|
||||
|
||||
@@ -10,16 +10,6 @@
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void countVertex__12J3DShapeDrawFUl();
|
||||
extern "C" void* __nwa__FUli();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void _savegpr_18();
|
||||
extern "C" void _restgpr_18();
|
||||
|
||||
/* 80314924-80314974 30F264 0050+00 1/1 0/0 0/0 .text countVertex__12J3DShapeDrawFUl */
|
||||
u32 J3DShapeDraw::countVertex(u32 stride) {
|
||||
u32 count = 0;
|
||||
@@ -54,18 +44,18 @@ void J3DShapeDraw::addTexMtxIndexInDL(u32 stride, u32 attrOffs, u32 valueBase) {
|
||||
|
||||
// Copy count
|
||||
// regalloc (I suspect there's a way to shove this in a u16 temp without an mr)
|
||||
u32 vtxNum = *((u16*)(oldDL + 1));
|
||||
s32 vtxNum = *((u16*)(oldDL + 1));
|
||||
*((u16*)newDL) = vtxNum;
|
||||
newDL += 2;
|
||||
|
||||
for (s32 i = 0; i < (u16)vtxNum; i++) {
|
||||
for (s32 i = 0; i < vtxNum; i++) {
|
||||
u8* oldDLVtx = &oldDL[stride * i + 3];
|
||||
u8 pnmtxidx = *oldDLVtx;
|
||||
memcpy(newDL, oldDLVtx, attrOffs);
|
||||
u8* newDL1 = &newDL[attrOffs];
|
||||
*newDL1++ = valueBase + pnmtxidx;
|
||||
memcpy(newDL1, oldDLVtx + attrOffs, stride - attrOffs);
|
||||
newDL = newDL1 + (stride - attrOffs);
|
||||
newDL += attrOffs;
|
||||
*newDL++ = valueBase + pnmtxidx;
|
||||
memcpy(newDL, oldDLVtx + attrOffs, stride - attrOffs);
|
||||
newDL += (stride - attrOffs);
|
||||
}
|
||||
|
||||
oldDL += stride * vtxNum;
|
||||
|
||||
@@ -235,7 +235,7 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
||||
i_material->mIndBlock->setIndTexOrder(i, newIndTexOrder(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < ind_tex_stage_num; i++) {
|
||||
i_material->mIndBlock->setIndTexCoordScale(i, &newIndTexCoordScale(i_idx, i));
|
||||
i_material->mIndBlock->setIndTexCoordScale(i, newIndTexCoordScale(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
i_material->mTevBlock->setIndTevStage(i, newIndTevStage(i_idx, i));
|
||||
@@ -328,7 +328,7 @@ J3DMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial* i_material,
|
||||
i_material->mIndBlock->setIndTexOrder(i, newIndTexOrder(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < ind_tex_stage_num; i++) {
|
||||
i_material->mIndBlock->setIndTexCoordScale(i, &newIndTexCoordScale(i_idx, i));
|
||||
i_material->mIndBlock->setIndTexCoordScale(i, newIndTexCoordScale(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
i_material->mTevBlock->setIndTevStage(i, newIndTevStage(i_idx, i));
|
||||
@@ -590,12 +590,9 @@ J3DTevOrder J3DMaterialFactory::newTevOrder(int i_idx, int i_no) const {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80456BB8-80456BBC 000058 0004+00 1/1 0/0 0/0 .sbss2 @1897 */
|
||||
SECTION_SBSS2 static GXColorS10 defaultTevColor;
|
||||
|
||||
/* 803321A0-80332210 32CAE0 0070+00 2/2 0/0 0/0 .text newTevColor__18J3DMaterialFactoryCFii */
|
||||
J3DGXColorS10 J3DMaterialFactory::newTevColor(int i_idx, int i_no) const {
|
||||
J3DGXColorS10 dflt = defaultTevColor;
|
||||
J3DGXColorS10 dflt = (GXColorS10){0, 0, 0, 0};
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
if (mtl_init_data->mTevColorIdx[i_no] != 0xffff) {
|
||||
return mpTevColor[mtl_init_data->mTevColorIdx[i_no]];
|
||||
|
||||
@@ -112,25 +112,28 @@ u32 J3DModelLoader::calcLoadMaterialTableSize(const void* stream) {
|
||||
return size;
|
||||
}
|
||||
|
||||
inline u32 getBdlFlag_MaterialType(u32 flags) {
|
||||
return flags & (J3DMLF_13 | J3DMLF_DoBdlMaterialCalc);
|
||||
}
|
||||
|
||||
/* 80336A98-80336CD8 3313D8 0240+00 0/0 3/0 0/0 .text
|
||||
* calcLoadBinaryDisplayListSize__14J3DModelLoaderFPCvUl */
|
||||
// NONMATCHING flags issue
|
||||
u32 J3DModelLoader::calcLoadBinaryDisplayListSize(const void* stream, u32 flags) {
|
||||
u32 size = 0;
|
||||
size += sizeof(J3DModelData);
|
||||
const J3DModelFileData* header = (const J3DModelFileData*)stream;
|
||||
const J3DModelBlock* nextBlock = header->mBlocks;
|
||||
u32 i = 0;
|
||||
size += sizeof(J3DModelData);
|
||||
for (; i < header->mBlockNum; i++) {
|
||||
for (u32 i = 0; i < header->mBlockNum; i++) {
|
||||
switch (nextBlock->mBlockType) {
|
||||
case 'INF1':
|
||||
size += calcSizeInformation((const J3DModelInfoBlock*)nextBlock, flags);
|
||||
size += calcSizeInformation((const J3DModelInfoBlock*)nextBlock, (u32)flags);
|
||||
break;
|
||||
case 'JNT1':
|
||||
size += calcSizeJoint((const J3DJointBlock*)nextBlock);
|
||||
break;
|
||||
case 'SHP1':
|
||||
size += calcSizeShape((const J3DShapeBlock*)nextBlock, flags);
|
||||
size += calcSizeShape((const J3DShapeBlock*)nextBlock, (u32)flags);
|
||||
break;
|
||||
case 'TEX1':
|
||||
size += calcSizeTexture((const J3DTextureBlock*)nextBlock);
|
||||
@@ -142,12 +145,13 @@ u32 J3DModelLoader::calcLoadBinaryDisplayListSize(const void* stream, u32 flags)
|
||||
break;
|
||||
case 'MAT3': {
|
||||
u32 flags2 = (J3DMLF_21 | J3DMLF_Material_PE_Full | J3DMLF_Material_Color_LightOn);
|
||||
flags2 |= flags & (J3DMLF_Material_UseIndirect | J3DMLF_26);
|
||||
flags2 |= (u32)flags & (J3DMLF_Material_UseIndirect | J3DMLF_26);
|
||||
mpMaterialBlock = (const J3DMaterialBlock*)nextBlock;
|
||||
if ((flags & (J3DMLF_13 | J3DMLF_DoBdlMaterialCalc)) == 0) {
|
||||
u32 flag_mtl_type = getBdlFlag_MaterialType(flags);
|
||||
if (flag_mtl_type == 0) {
|
||||
field_0x18 = 1;
|
||||
size += calcSizeMaterial((const J3DMaterialBlock*)nextBlock, flags2);
|
||||
} else if ((flags & (J3DMLF_13 | J3DMLF_DoBdlMaterialCalc)) == J3DMLF_DoBdlMaterialCalc) {
|
||||
} else if (flag_mtl_type == J3DMLF_DoBdlMaterialCalc) {
|
||||
field_0x18 = 1;
|
||||
size += calcSizePatchedMaterial((const J3DMaterialBlock*)nextBlock, flags2);
|
||||
}
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
#include "JSystem/JAudio2/JASReport.h"
|
||||
#include "JSystem/JAudio2/JASLfo.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/ai.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
/* 80431C58-80431C68 05E978 000C+04 2/2 0/0 0/0 .bss sDmaDacBuffer__9JASDriver */
|
||||
s16* JASDriver::sDmaDacBuffer[3];
|
||||
|
||||
@@ -29,8 +29,6 @@ u32 JASAramStream::sChannelMax;
|
||||
/* 80451260 0001+00 data_80451260 None */
|
||||
/* 80451261 0001+00 data_80451261 None */
|
||||
/* 80451262 0006+00 data_80451262 None */
|
||||
extern bool struct_80451260;
|
||||
extern bool struct_80451261;
|
||||
bool struct_80451260;
|
||||
bool struct_80451261;
|
||||
|
||||
@@ -331,7 +329,7 @@ bool JASAramStream::load() {
|
||||
}
|
||||
field_0x10c++;
|
||||
if (field_0x10c >= field_0x108) {
|
||||
u32 uvar8 = mBlock - 1 + field_0x108;
|
||||
u32 uvar8 = field_0x108 - 1 + mBlock;
|
||||
if (mLoop) {
|
||||
while (uvar8 > loop_end_block) {
|
||||
uvar8 -= loop_end_block;
|
||||
@@ -364,7 +362,6 @@ s32 JASAramStream::channelProcCallback(void* i_this) {
|
||||
|
||||
/* 80296D94-80296DF0 2916D4 005C+00 2/1 0/0 0/0 .text dvdErrorCheck__13JASAramStreamFPv
|
||||
*/
|
||||
// NONMATCHING supposed to use a switch table
|
||||
s32 JASAramStream::dvdErrorCheck(void* param_0) {
|
||||
switch (DVDGetDriveStatus()) {
|
||||
case DVD_STATE_END:
|
||||
@@ -375,7 +372,6 @@ s32 JASAramStream::dvdErrorCheck(void* param_0) {
|
||||
case DVD_STATE_WAITING:
|
||||
case DVD_STATE_COVER_CLOSED:
|
||||
case DVD_STATE_NO_DISK:
|
||||
case DVD_STATE_COVER_OPEN:
|
||||
case DVD_STATE_WRONG_DISK:
|
||||
case DVD_STATE_MOTOR_STOPPED:
|
||||
case DVD_STATE_IGNORED:
|
||||
@@ -436,7 +432,7 @@ void JASAramStream::updateChannel(u32 i_callbackType, JASChannel* i_channel,
|
||||
i_dspChannel->field_0x110 = 0;
|
||||
field_0x120 = 0;
|
||||
field_0x12c |= 2;
|
||||
if (field_0x0c4 < -1) {
|
||||
if (field_0x0c4 < 0xffffffff) {
|
||||
field_0x0c4++;
|
||||
}
|
||||
field_0x0c0 = false;
|
||||
@@ -447,7 +443,7 @@ void JASAramStream::updateChannel(u32 i_callbackType, JASChannel* i_channel,
|
||||
}
|
||||
f32 fvar1 = field_0x0c4;
|
||||
fvar1 *= mLoopEnd - mLoopStart;
|
||||
if (field_0x0c4 < -1) {
|
||||
if (field_0x0c4 < 0xffffffff) {
|
||||
fvar1 += field_0x0b8;
|
||||
}
|
||||
fvar1 /= field_0x164;
|
||||
@@ -579,7 +575,7 @@ void JASAramStream::updateChannel(u32 i_callbackType, JASChannel* i_channel,
|
||||
}
|
||||
|
||||
/* 802974AC-80297658 291DEC 01AC+00 1/1 0/0 0/0 .text channelProc__13JASAramStreamFv */
|
||||
// NONMATCHING instruction ordering
|
||||
// NONMATCHING instruction ordering / regalloc
|
||||
s32 JASAramStream::channelProc() {
|
||||
OSMessage msg;
|
||||
while (OSReceiveMessage(&field_0x020, &msg, OS_MESSAGE_NOBLOCK)) {
|
||||
|
||||
@@ -59,7 +59,6 @@ JASBNKParser::Ver1::TChunk* JASBNKParser::Ver1::findChunk(void const* stream, u3
|
||||
|
||||
/* 8029963C-80299A3C 293F7C 0400+00 1/1 0/0 0/0 .text
|
||||
* createBasicBank__Q212JASBNKParser4Ver1FPCvP7JKRHeap */
|
||||
// NONMATCHING instruction ordering, regalloc
|
||||
JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* heap) {
|
||||
if (heap == NULL) {
|
||||
heap = JASDram;
|
||||
@@ -74,44 +73,40 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h
|
||||
TOscChunk* osc_chunk = (TOscChunk*)findChunk(stream, 'OSCT');
|
||||
TListChunk* list_chunk = (TListChunk*)findChunk(stream, 'LIST');
|
||||
|
||||
void* envt = new (heap, 2) u8[envt_chunk->mSize];
|
||||
u8* envt = new (heap, 2) u8[envt_chunk->mSize];
|
||||
JASCalc::bcopy(envt_chunk->mData, envt, envt_chunk->mSize);
|
||||
|
||||
u32 count = osc_chunk->mCount;
|
||||
TOsc* osc = osc_chunk->mOsc;
|
||||
u32* ptr = &osc_chunk->mCount;
|
||||
u32 count = *ptr++;
|
||||
JASOscillator::Data* osc_data = new (heap, 0) JASOscillator::Data[count];
|
||||
for (int i = 0; i < count; i++, osc++) {
|
||||
for (int i = 0; i < count; i++, ptr += sizeof(TOsc) >> 2) {
|
||||
TOsc* osc = (TOsc*)ptr;
|
||||
JASOscillator::Data* data = &osc_data[i];
|
||||
data->mTarget = osc->mTarget;
|
||||
data->_04 = osc->_08;
|
||||
data->mScale = osc->mScale;
|
||||
data->_14 = osc->_18;
|
||||
data->mTable = (JASOscillator::Point*)((int)envt + osc->mTableOffset);
|
||||
data->_0C = (JASOscillator::Point*)((int)envt + osc->_10);
|
||||
data->mTable = (JASOscillator::Point*)(envt + osc->mTableOffset);
|
||||
data->_0C = (JASOscillator::Point*)(envt + osc->_10);
|
||||
}
|
||||
|
||||
bank->newInstTable(list_chunk->mCount, heap);
|
||||
for (int i = 0; i < list_chunk->mCount; i++) {
|
||||
if (list_chunk->mOffsets[i] != 0) {
|
||||
u32* ptr = (u32*)((int)stream + list_chunk->mOffsets[i]);
|
||||
u32* data = ptr + 1;
|
||||
switch (*ptr) {
|
||||
u32* data = (u32*)((int)stream + list_chunk->mOffsets[i]);
|
||||
switch (*data++) {
|
||||
case 'Inst': {
|
||||
JASBasicInst* inst = new (heap, 0) JASBasicInst();
|
||||
u32 count = *data;
|
||||
data++;
|
||||
u32 count = *data++;
|
||||
for (int j = 0; j < count; j++) {
|
||||
u32 index = *data;
|
||||
data++;
|
||||
u32 index = *data++;
|
||||
inst->setOsc(j, &osc_data[index]);
|
||||
}
|
||||
count = *data;
|
||||
data++;
|
||||
count = *data++;
|
||||
for (int j = 0; j < count; j++) {
|
||||
data++;
|
||||
}
|
||||
count = *data;
|
||||
data++;
|
||||
count = *data++;
|
||||
inst->setKeyRegionCount(count, heap);
|
||||
for (int j = 0; j < count; j++) {
|
||||
JASBasicInst::TKeymap* keymap = inst->getKeyRegion(j);
|
||||
@@ -133,12 +128,10 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h
|
||||
|
||||
case 'Perc': {
|
||||
JASDrumSet* drum = new (heap, 0) JASDrumSet();
|
||||
u32 count = *data;
|
||||
data++;
|
||||
u32 count = *data++;
|
||||
drum->newPercArray(count, heap);
|
||||
for (int j = 0; j < count; j++) {
|
||||
u32 offset = *data;
|
||||
data++;
|
||||
u32 offset = *data++;
|
||||
if (offset != 0) {
|
||||
JASDrumSet::TPerc* perc = new (heap, 0) JASDrumSet::TPerc();
|
||||
u32* ptr = (u32*)((int)stream + offset);
|
||||
@@ -148,8 +141,7 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h
|
||||
perc->setPan((f32)perc_data->mPan / 127.0f);
|
||||
perc->setRelease(perc_data->mRelease);
|
||||
ptr = (u32*)&perc_data->field_0xc;
|
||||
u32 count2 = *ptr;
|
||||
ptr++;
|
||||
u32 count2 = *ptr++;
|
||||
for (int k = 0; k < count2; k++) {
|
||||
ptr++;
|
||||
}
|
||||
@@ -173,20 +165,150 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h
|
||||
|
||||
/* 80299A3C-80299E68 29437C 042C+00 1/1 0/0 0/0 .text
|
||||
* createBasicBank__Q212JASBNKParser4Ver0FPCvP7JKRHeap */
|
||||
// NONMATCHING
|
||||
JASBasicBank* JASBNKParser::Ver0::createBasicBank(void const* stream, JKRHeap* heap) {
|
||||
// NONMATCHING
|
||||
THeader const* header = (THeader*)stream;
|
||||
|
||||
if (heap == NULL) {
|
||||
heap = JASDram;
|
||||
}
|
||||
|
||||
JASBasicBank* bank = new (heap, 0) JASBasicBank();
|
||||
if (bank == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bank->newInstTable(0x80, heap);
|
||||
|
||||
for (int i = 0; i < 0x80; i++) {
|
||||
TInst* tinst = header->mOffsets.mInstOffset[i].ptr(stream);
|
||||
if (tinst != NULL) {
|
||||
JASBasicInst* inst = new (heap, 0) JASBasicInst();
|
||||
inst->setVolume(tinst->mVolume);
|
||||
inst->setPitch(tinst->mPitch);
|
||||
|
||||
int osc_idx = 0;
|
||||
for (int j = 0; j < 2; j++) {
|
||||
TOsc* tosc = tinst->mOscOffset[j].ptr(stream);
|
||||
if (tosc != NULL) {
|
||||
JASOscillator::Data* osc_data = findOscPtr(bank, header, tosc);
|
||||
if (osc_data != NULL) {
|
||||
inst->setOsc(osc_idx, osc_data);
|
||||
} else {
|
||||
osc_data = new (heap, 0) JASOscillator::Data();
|
||||
osc_data->mTarget = tosc->mTarget;
|
||||
osc_data->_04 = tosc->field_0x4;
|
||||
u32 size;
|
||||
|
||||
JASOscillator::Point* points = tosc->mPointOffset.ptr(stream);
|
||||
if (points != NULL) {
|
||||
size = getOscTableEndPtr(points) - points;
|
||||
JASOscillator::Point* table = new (heap, 0) JASOscillator::Point[size];
|
||||
JASCalc::bcopy(points, table, size * sizeof(JASOscillator::Point));
|
||||
osc_data->mTable = table;
|
||||
} else {
|
||||
osc_data->mTable = NULL;
|
||||
}
|
||||
|
||||
points = tosc->field_0xc.ptr(stream);
|
||||
if (points != NULL) {
|
||||
size = getOscTableEndPtr(points) - points;
|
||||
JASOscillator::Point* table = new (heap, 0) JASOscillator::Point[size];
|
||||
JASCalc::bcopy(points, table, size * sizeof(JASOscillator::Point));
|
||||
osc_data->_0C = table;
|
||||
} else {
|
||||
osc_data->_0C = NULL;
|
||||
}
|
||||
|
||||
osc_data->mScale = tosc->mScale;
|
||||
osc_data->_14 = tosc->field_0x14;
|
||||
inst->setOsc(osc_idx, osc_data);
|
||||
}
|
||||
|
||||
osc_idx++;
|
||||
}
|
||||
}
|
||||
|
||||
inst->setKeyRegionCount(tinst->mKeyRegionCount, heap);
|
||||
for (int j = 0; j < tinst->mKeyRegionCount; j++) {
|
||||
JASBasicInst::TKeymap* keymap = inst->getKeyRegion(j);
|
||||
TKeymap* tkeymap = tinst->mKeymapOffset[j].ptr(stream);
|
||||
keymap->setHighKey(tkeymap->mHighKey);
|
||||
TVmap* tvmap = tkeymap->mVmapOffset.ptr(stream);
|
||||
keymap->field_0x4 = JSULoHalf(tvmap->field_0x4);
|
||||
keymap->field_0x8 = tvmap->field_0x8;
|
||||
keymap->field_0xc = tvmap->field_0xc;
|
||||
}
|
||||
|
||||
bank->setInst(i, inst);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
TPerc* tperc = header->mOffsets.mPercOffset[i].ptr(stream);
|
||||
if (tperc != NULL) {
|
||||
JASDrumSet* drumset = new (heap, 0) JASDrumSet();
|
||||
drumset->newPercArray(0x80, heap);
|
||||
|
||||
for (int j = 0; j < 0x80; j++) {
|
||||
TPmap* tpmap = tperc->mPmapOffset[j].ptr(stream);
|
||||
if (tpmap != NULL) {
|
||||
JASDrumSet::TPerc* perc = new (heap, 0) JASDrumSet::TPerc();
|
||||
perc->setVolume(tpmap->mVolume);
|
||||
perc->setPitch(tpmap->mPitch);
|
||||
if (tperc->mMagic == 'PER2') {
|
||||
perc->setPan(tperc->mPan[j] / 127.0f);
|
||||
perc->setRelease(tperc->mRelease[j]);
|
||||
}
|
||||
TVmap* vmap = tpmap->mVmapOffset.ptr(stream);
|
||||
perc->field_0xe = JSULoHalf(vmap->field_0x4);
|
||||
perc->field_0x10 = vmap->field_0x8;
|
||||
perc->field_0x14 = vmap->field_0xc;
|
||||
drumset->setPerc(j, perc);
|
||||
}
|
||||
}
|
||||
|
||||
bank->setInst(i + 0xe4, drumset);
|
||||
}
|
||||
}
|
||||
|
||||
return bank;
|
||||
}
|
||||
|
||||
/* 80299E68-80299F8C 2947A8 0124+00 1/1 0/0 0/0 .text
|
||||
* findOscPtr__Q212JASBNKParser4Ver0FP12JASBasicBankPCQ312JASBNKParser4Ver07THeaderPCQ312JASBNKParser4Ver04TOsc
|
||||
*/
|
||||
void JASBNKParser::Ver0::findOscPtr(JASBasicBank* param_0, THeader const* param_1,
|
||||
TOsc const* param_2) {
|
||||
// NONMATCHING
|
||||
JASOscillator::Data* JASBNKParser::Ver0::findOscPtr(JASBasicBank* bank, THeader const* header,
|
||||
TOsc const* osc) {
|
||||
TOffsetData const* data = &header->mOffsets;
|
||||
for (int i = 0; i < 0x80; i++) {
|
||||
TInst* tinst = data->mInstOffset[i].ptr(header);
|
||||
if (tinst != NULL) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
TOsc* tosc = tinst->mOscOffset[j].ptr(header);
|
||||
if (tosc == osc) {
|
||||
JASInst* inst = bank->getInst(i);
|
||||
if (inst != NULL) {
|
||||
JASInstParam param;
|
||||
inst->getParam(0x3c, 0x7f, ¶m);
|
||||
if (j < param.field_0x1d) {
|
||||
return param.field_0x14[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 80299F8C-80299FA0 2948CC 0014+00 1/1 0/0 0/0 .text
|
||||
* getOscTableEndPtr__Q212JASBNKParser4Ver0FPCQ213JASOscillator5Point */
|
||||
void JASBNKParser::Ver0::getOscTableEndPtr(JASOscillator::Point const* param_0) {
|
||||
// NONMATCHING
|
||||
JASOscillator::Point const* JASBNKParser::Ver0::getOscTableEndPtr(JASOscillator::Point const* points) {
|
||||
s16 tmp;
|
||||
do {
|
||||
tmp = points->_0;
|
||||
points++;
|
||||
} while (tmp <= 10);
|
||||
return points;
|
||||
}
|
||||
|
||||
@@ -8,65 +8,6 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__16JASBasicWaveBankFv();
|
||||
extern "C" void __dt__16JASBasicWaveBankFv();
|
||||
extern "C" void __dt__Q216JASBasicWaveBank11TWaveHandleFv();
|
||||
extern "C" void getWaveGroup__16JASBasicWaveBankFUl();
|
||||
extern "C" void setGroupCount__16JASBasicWaveBankFUlP7JKRHeap();
|
||||
extern "C" void setWaveTableSize__16JASBasicWaveBankFUlP7JKRHeap();
|
||||
extern "C" void incWaveTable__16JASBasicWaveBankFPCQ216JASBasicWaveBank10TWaveGroup();
|
||||
extern "C" void decWaveTable__16JASBasicWaveBankFPCQ216JASBasicWaveBank10TWaveGroup();
|
||||
extern "C" void getWaveHandle__16JASBasicWaveBankCFUl();
|
||||
extern "C" void
|
||||
setWaveInfo__16JASBasicWaveBankFPQ216JASBasicWaveBank10TWaveGroupiUsRC11JASWaveInfo();
|
||||
extern "C" void __ct__Q216JASBasicWaveBank10TWaveGroupFv();
|
||||
extern "C" void __dt__Q216JASBasicWaveBank10TWaveGroupFv();
|
||||
extern "C" void setWaveCount__Q216JASBasicWaveBank10TWaveGroupFUlP7JKRHeap();
|
||||
extern "C" void onLoadDone__Q216JASBasicWaveBank10TWaveGroupFv();
|
||||
extern "C" void onEraseDone__Q216JASBasicWaveBank10TWaveGroupFv();
|
||||
extern "C" void getWaveID__Q216JASBasicWaveBank10TWaveGroupCFi();
|
||||
extern "C" void getWavePtr__Q216JASBasicWaveBank11TWaveHandleCFv();
|
||||
extern "C" void __dt__11JASWaveBankFv();
|
||||
extern "C" void __dt__13JASWaveHandleFv();
|
||||
extern "C" void __ct__Q216JASBasicWaveBank11TWaveHandleFv();
|
||||
extern "C" void __ct__Q216JASBasicWaveBank14TGroupWaveInfoFv();
|
||||
extern "C" void getWaveInfo__Q216JASBasicWaveBank11TWaveHandleCFv();
|
||||
extern "C" void getWaveArc__16JASBasicWaveBankFUl();
|
||||
extern "C" void getArcCount__16JASBasicWaveBankCFv();
|
||||
extern "C" u8 mNoLoad__16JASBasicWaveBank[4 + 4 /* padding */];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__10JASWaveArcFv();
|
||||
extern "C" void __dt__10JASWaveArcFv();
|
||||
extern "C" void onDispose__10JASWaveArcFv();
|
||||
extern "C" void* __nwa__FUlP7JKRHeapi();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dla__FPv();
|
||||
extern "C" void __destroy_new_array();
|
||||
extern "C" void __construct_new_array();
|
||||
extern "C" void _savegpr_25();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_25();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" u32 one__11JASWaveInfo[1 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802984F8-80298558 292E38 0060+00 0/0 1/1 0/0 .text __ct__16JASBasicWaveBankFv */
|
||||
JASBasicWaveBank::JASBasicWaveBank() {
|
||||
mWaveTable = NULL;
|
||||
|
||||
@@ -843,15 +843,15 @@ s32 JASSeqParser::cmdDump(JASTrack* param_0, u32* param_1) {
|
||||
}
|
||||
|
||||
/* 8029526C-80295498 28FBAC 022C+00 1/0 0/0 0/0 .text cmdPrintf__12JASSeqParserFP8JASTrackPUl */
|
||||
// NONMATCHING many things
|
||||
// NONMATCHING problem with second for loop
|
||||
s32 JASSeqParser::cmdPrintf(JASTrack* param_0, u32* param_1) {
|
||||
u8 stack_c[4];
|
||||
u32 stack_10[4];
|
||||
char buffer[128];
|
||||
|
||||
JASSeqCtrl* seqCtrl = param_0->getSeqCtrl();
|
||||
int r30 = 0;
|
||||
for (u8 i = 0; i < 128; i++) {
|
||||
u32 r30 = 0;
|
||||
for (u32 i = 0; i < 128; i++) {
|
||||
buffer[i] = seqCtrl->readByte();
|
||||
if (buffer[i] == 0) {
|
||||
break;
|
||||
@@ -861,15 +861,18 @@ s32 JASSeqParser::cmdPrintf(JASTrack* param_0, u32* param_1) {
|
||||
if (buffer[i] == 0) {
|
||||
break;
|
||||
}
|
||||
if (buffer[i] == 'n') {
|
||||
switch (buffer[i]) {
|
||||
case 'n':
|
||||
buffer[i] = '\r';
|
||||
}
|
||||
} else if (buffer[i] == '%') {
|
||||
buffer[i + 1] = seqCtrl->readByte();
|
||||
if (buffer[i + 1] == 0) {
|
||||
break;
|
||||
}
|
||||
switch (buffer[i + 1]) {
|
||||
} else if (buffer[i] == '%') {
|
||||
i++;
|
||||
buffer[i] = seqCtrl->readByte();
|
||||
if (buffer[i] == 0) {
|
||||
break;
|
||||
}
|
||||
switch (buffer[i]) {
|
||||
case 'd':
|
||||
stack_c[r30] = 0;
|
||||
break;
|
||||
@@ -881,18 +884,17 @@ s32 JASSeqParser::cmdPrintf(JASTrack* param_0, u32* param_1) {
|
||||
break;
|
||||
case 'r':
|
||||
stack_c[r30] = 3;
|
||||
buffer[i + 1] = 'd';
|
||||
buffer[i] = 'd';
|
||||
break;
|
||||
case 'R':
|
||||
stack_c[r30] = 4;
|
||||
buffer[i + 1] = 'x';
|
||||
break;
|
||||
default:
|
||||
buffer[i] = 'x';
|
||||
break;
|
||||
}
|
||||
r30++;
|
||||
}
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < r30; i++) {
|
||||
stack_10[i] = seqCtrl->readByte();
|
||||
switch (stack_c[i]) {
|
||||
@@ -903,10 +905,9 @@ s32 JASSeqParser::cmdPrintf(JASTrack* param_0, u32* param_1) {
|
||||
case 4:
|
||||
stack_10[i] = readReg(param_0, stack_10[i] & 0xff);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
JASReport(buffer, stack_10[0], stack_10[1], stack_10[2], stack_10[3]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "JSystem/JAudio2/JASDSPInterface.h"
|
||||
|
||||
/* 80291228-8029131C 28BB68 00F4+00 1/1 3/3 0/0 .text __ct__8JASTrackFv */
|
||||
// NONMATCHING
|
||||
JASTrack::JASTrack() : mDefaultChannelMgr(this), mChannelMgrCount(1), mStatus(0) {
|
||||
mChannelMgrs[0] = &mDefaultChannelMgr;
|
||||
for (int i = 1; i < 4; i++) {
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "JSystem/JAudio2/JAUStreamFileTable.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "stdlib.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/dvd.h"
|
||||
|
||||
namespace {
|
||||
@@ -78,12 +77,6 @@ JAUSection::TSectionData::TSectionData() {
|
||||
field_0x9c = 0;
|
||||
}
|
||||
|
||||
/* 8039B950-8039B950 027FB0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_8039B950 = "index out of range of bitset::reset";
|
||||
#pragma pop
|
||||
|
||||
/* 802A4F68-802A4FE4 29F8A8 007C+00 1/1 0/0 0/0 .text
|
||||
* resetRegisteredBankTables__Q210JAUSection12TSectionDataFv */
|
||||
void JAUSection::TSectionData::resetRegisteredBankTables() {
|
||||
@@ -139,7 +132,6 @@ void JAUSection::dispose() {
|
||||
|
||||
/* 802A51E4-802A52A0 29FB24 00BC+00 0/0 1/1 0/0 .text newSoundTable__10JAUSectionFPCvUlb
|
||||
*/
|
||||
// NONMATCHING regalloc
|
||||
JAUSoundTable* JAUSection::newSoundTable(void const* bst, u32 param_1, bool param_2) {
|
||||
JUT_ASSERT(285, isOpen());
|
||||
JUT_ASSERT(286, isBuilding());
|
||||
@@ -148,7 +140,7 @@ JAUSoundTable* JAUSection::newSoundTable(void const* bst, u32 param_1, bool para
|
||||
JUT_ASSERT(289, sectionHeap_->sectionHeapData_.soundTable == 0);
|
||||
{
|
||||
TPushCurrentHeap push(getHeap_());
|
||||
void* bstDst;
|
||||
void const* bstDst = bst;
|
||||
if (param_1) {
|
||||
bstDst = newCopy(bst, param_1, 4);
|
||||
JUT_ASSERT(296, bstDst);
|
||||
@@ -163,7 +155,6 @@ JAUSoundTable* JAUSection::newSoundTable(void const* bst, u32 param_1, bool para
|
||||
}
|
||||
|
||||
/* 802A52A0-802A535C 29FBE0 00BC+00 0/0 1/1 0/0 .text newSoundNameTable__10JAUSectionFPCvUlb */
|
||||
// NONMATCHING regalloc
|
||||
JAUSoundNameTable* JAUSection::newSoundNameTable(void const* bstn, u32 param_1, bool param_2) {
|
||||
JUT_ASSERT(315, isOpen());
|
||||
JUT_ASSERT(316, isBuilding());
|
||||
@@ -172,7 +163,7 @@ JAUSoundNameTable* JAUSection::newSoundNameTable(void const* bstn, u32 param_1,
|
||||
JUT_ASSERT(319, sectionHeap_->sectionHeapData_.soundNameTable == 0);
|
||||
{
|
||||
TPushCurrentHeap push(getHeap_());
|
||||
void* bstnDst;
|
||||
void const* bstnDst = bstn;
|
||||
if (param_1) {
|
||||
bstnDst = newCopy(bstn, param_1, 4);
|
||||
JUT_ASSERT(326, bstnDst);
|
||||
@@ -304,13 +295,10 @@ void* JAUSection::newCopy(void const* param_0, u32 param_1, s32 param_2) {
|
||||
return r31;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8039B950-8039B950 027FB0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_8039B974 = "index out of range of bitset::test";
|
||||
SECTION_DEAD static char const* const stringBase_8039B997 = "index out of range of bitset::set";
|
||||
#pragma pop
|
||||
static bool dummy_string(int i) {
|
||||
std::bitset<1> x;
|
||||
return x.test(i);
|
||||
}
|
||||
|
||||
/* 802A5854-802A5948 2A0194 00F4+00 0/0 1/1 0/0 .text newWaveBank__10JAUSectionFUlPCv */
|
||||
JASWaveBank* JAUSection::newWaveBank(u32 bank_no, void const* param_1) {
|
||||
|
||||
@@ -33,7 +33,6 @@ JGadget::binary::parseVariableUInt_16_32_following(void const* buffer, u32* para
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* 802DC8C8-802DC910 2D7208 0048+00 0/0 4/4 0/0 .text
|
||||
* __dt__Q37JGadget6binary19TParse_header_blockFv */
|
||||
JGadget::binary::TParse_header_block::~TParse_header_block() {
|
||||
@@ -69,4 +68,4 @@ bool JGadget::binary::TParse_header_block::parse_next(void const** ptrLocation,
|
||||
headerEnd--;
|
||||
}
|
||||
return checkLastBlock;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@ JGadget::TVector_pointer_void::TVector_pointer_void(JGadget::TAllocator<void*> c
|
||||
JGadget::TVector_pointer_void::~TVector_pointer_void() {
|
||||
}
|
||||
|
||||
void dummy_weak_order(JGadget::TVector<void*> vec) {
|
||||
vec.insert(NULL, 0, NULL);
|
||||
}
|
||||
|
||||
/* 802DCDA4-802DCDC4 2D76E4 0020+00 0/0 1/1 0/0 .text
|
||||
* insert__Q27JGadget20TVector_pointer_voidFPPvRCPv */
|
||||
void JGadget::TVector_pointer_void::insert(void** param_0, void* const& param_1) {
|
||||
|
||||
@@ -10,95 +10,9 @@
|
||||
#include "JSystem/JKernel/JKRDvdFile.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "dol2asm.h"
|
||||
#include "math.h"
|
||||
#include "string.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__14JKRAramArchiveFlQ210JKRArchive15EMountDirection();
|
||||
extern "C" void __dt__14JKRAramArchiveFv();
|
||||
extern "C" void open__14JKRAramArchiveFl();
|
||||
extern "C" void fetchResource__14JKRAramArchiveFPQ210JKRArchive12SDIFileEntryPUl();
|
||||
extern "C" void fetchResource__14JKRAramArchiveFPvUlPQ210JKRArchive12SDIFileEntryPUl();
|
||||
extern "C" void getAramAddress_Entry__14JKRAramArchiveFPQ210JKRArchive12SDIFileEntry();
|
||||
extern "C" void getAramAddress__14JKRAramArchiveFPCc();
|
||||
extern "C" void fetchResource_subroutine__14JKRAramArchiveFUlUlPUcUli();
|
||||
extern "C" void fetchResource_subroutine__14JKRAramArchiveFUlUlP7JKRHeapiPPUc();
|
||||
extern "C" void getExpandedResSize__14JKRAramArchiveCFPCv();
|
||||
extern "C" void __dt__7JKRFileFv();
|
||||
extern "C" extern char const* const JKRAramArchive__stringBase0;
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void alloc__7JKRHeapFUliP7JKRHeap();
|
||||
extern "C" void alloc__7JKRHeapFUli();
|
||||
extern "C" void free__7JKRHeapFPvP7JKRHeap();
|
||||
extern "C" void free__7JKRHeapFPv();
|
||||
extern "C" void copyMemory__7JKRHeapFPvPvUl();
|
||||
extern "C" void* __nw__FUlP7JKRHeapi();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__11JKRDisposerFv();
|
||||
extern "C" void aramToMainRam__7JKRAramFUlPUcUl15JKRExpandSwitchUlP7JKRHeapiPUl();
|
||||
extern "C" void alloc__11JKRAramHeapFUlQ211JKRAramHeap10EAllocMode();
|
||||
extern "C" void unmount__13JKRFileLoaderFv();
|
||||
extern "C" void becomeCurrent__10JKRArchiveFPCc();
|
||||
extern "C" void getResource__10JKRArchiveFPCc();
|
||||
extern "C" void getResource__10JKRArchiveFUlPCc();
|
||||
extern "C" void readResource__10JKRArchiveFPvUlUlPCc();
|
||||
extern "C" void readResource__10JKRArchiveFPvUlPCc();
|
||||
extern "C" void removeResourceAll__10JKRArchiveFv();
|
||||
extern "C" void removeResource__10JKRArchiveFPv();
|
||||
extern "C" void detachResource__10JKRArchiveFPv();
|
||||
extern "C" void getResSize__10JKRArchiveCFPCv();
|
||||
extern "C" void countFile__10JKRArchiveCFPCc();
|
||||
extern "C" void getFirstFile__10JKRArchiveCFPCc();
|
||||
extern "C" void __ct__10JKRArchiveFlQ210JKRArchive10EMountMode();
|
||||
extern "C" void __dt__10JKRArchiveFv();
|
||||
extern "C" void findFsResource__10JKRArchiveCFPCcUl();
|
||||
extern "C" void findPtrResource__10JKRArchiveCFPCv();
|
||||
extern "C" void setExpandSize__10JKRArchiveFPQ210JKRArchive12SDIFileEntryUl();
|
||||
extern "C" void getExpandSize__10JKRArchiveCFPQ210JKRArchive12SDIFileEntry();
|
||||
extern "C" void __ct__10JKRDvdFileFl();
|
||||
extern "C" void
|
||||
loadToMainRAM__12JKRDvdRipperFlPUc15JKRExpandSwitchUlP7JKRHeapQ212JKRDvdRipper15EAllocDirectionUlPiPUl();
|
||||
extern "C" void loadToAram__16JKRDvdAramRipperFlUl15JKRExpandSwitchUlUlPUl();
|
||||
extern "C" void prepend__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void remove__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void panic_f__12JUTExceptionFPCciPCce();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" u8 sVolumeList__13JKRFileLoader[12];
|
||||
extern "C" u8 sSystemHeap__7JKRHeap[4];
|
||||
extern "C" u8 sAramObject__7JKRAram[4];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CC328-803CC348 029448 0020+00 1/1 4/4 0/0 .data __vt__7JKRFile */
|
||||
SECTION_DATA extern void* __vt__7JKRFile[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__7JKRFileFv,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
};
|
||||
|
||||
/* 802D70C0-802D7168 2D1A00 00A8+00 0/0 1/1 0/0 .text
|
||||
* __ct__14JKRAramArchiveFlQ210JKRArchive15EMountDirection */
|
||||
JKRAramArchive::JKRAramArchive(s32 entryNumber, JKRArchive::EMountDirection mountDirection)
|
||||
@@ -424,9 +338,3 @@ u32 JKRAramArchive::getExpandedResSize(const void* ptr) const {
|
||||
((JKRArchive*)this)->setExpandSize(entry, expandSize);
|
||||
return expandSize;
|
||||
}
|
||||
|
||||
/* 802D7B90-802D7BF0 2D24D0 0060+00 1/0 0/0 0/0 .text __dt__7JKRFileFv */
|
||||
// JKRFile::~JKRFile() {
|
||||
extern "C" void __dt__7JKRFileFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
@@ -17,59 +17,6 @@ static u8* firstSrcData();
|
||||
static u8* nextSrcData(u8*);
|
||||
static u32 dmaBufferFlush(u32);
|
||||
|
||||
extern "C" void __dt__18JSUFileInputStreamFv();
|
||||
extern "C" static int JKRDecompressFromDVDToAram__FP10JKRDvdFileUlUlUlUlUlPUl();
|
||||
extern "C" static int decompSZS_subroutine__FPUcUl();
|
||||
extern "C" static u8* firstSrcData__Fv();
|
||||
extern "C" static u8* nextSrcData__FPUc();
|
||||
extern "C" static int dmaBufferFlush__FUl();
|
||||
extern "C" void __sinit_JKRDvdAramRipper_cpp();
|
||||
extern "C" void func_802DB62C(void* _this);
|
||||
extern "C" u8 sDvdAramAsyncList__16JKRDvdAramRipper[12];
|
||||
extern "C" u32 sSZSBufferSize__16JKRDvdAramRipper;
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void alloc__7JKRHeapFUli();
|
||||
extern "C" void free__7JKRHeapFPvP7JKRHeap();
|
||||
extern "C" void* __nw__FUlP7JKRHeapi();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void alloc__11JKRAramHeapFUlQ211JKRAramHeap10EAllocMode();
|
||||
extern "C" void orderSync__12JKRAramPieceFiUlUlUlP12JKRAramBlock();
|
||||
extern "C" void write_StreamToAram_Async__13JKRAramStreamFP18JSUFileInputStreamUlUlUlPUl();
|
||||
extern "C" void sync__13JKRAramStreamFP20JKRAramStreamCommandi();
|
||||
extern "C" void checkCompressed__9JKRDecompFPUc();
|
||||
extern "C" void __ct__10JSUPtrLinkFPv();
|
||||
extern "C" void __dt__10JSUPtrLinkFv();
|
||||
extern "C" void __dt__10JSUPtrListFv();
|
||||
extern "C" void initiate__10JSUPtrListFv();
|
||||
extern "C" void append__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void remove__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void __dt__14JSUInputStreamFv();
|
||||
extern "C" void __ct__18JSUFileInputStreamFP7JKRFile();
|
||||
extern "C" void __register_global_object();
|
||||
extern "C" void _savegpr_23();
|
||||
extern "C" void _savegpr_24();
|
||||
extern "C" void _savegpr_25();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_23();
|
||||
extern "C" void _restgpr_24();
|
||||
extern "C" void _restgpr_25();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* __vt__20JSURandomInputStream[9];
|
||||
extern "C" extern void* __vt__18JSUFileInputStream[9 + 1 /* padding */];
|
||||
extern "C" u8 sSystemHeap__7JKRHeap[4];
|
||||
extern "C" u8 sAramObject__7JKRAram[4];
|
||||
extern "C" bool errorRetry__16JKRDvdAramRipper;
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802DA874-802DA918 2D51B4 00A4+00 0/0 3/3 0/0 .text
|
||||
* loadToAram__16JKRDvdAramRipperFlUl15JKRExpandSwitchUlUlPUl */
|
||||
JKRAramBlock* JKRDvdAramRipper::loadToAram(s32 entryNumber, u32 address,
|
||||
@@ -249,12 +196,6 @@ JKRADCommand* JKRDvdAramRipper::callCommand_Async(JKRADCommand* command) {
|
||||
return bVar1 == true ? command : NULL;
|
||||
}
|
||||
|
||||
/* 802DADD8-802DAE48 2D5718 0070+00 0/0 1/0 0/0 .text __dt__18JSUFileInputStreamFv */
|
||||
// JSUFileInputStream::~JSUFileInputStream() {
|
||||
extern "C" void __dt__18JSUFileInputStreamFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 802DAE48-802DAF1C 2D5788 00D4+00 1/1 0/0 0/0 .text
|
||||
* syncAram__16JKRDvdAramRipperFP12JKRADCommandi */
|
||||
bool JKRDvdAramRipper::syncAram(JKRADCommand* command, int param_1) {
|
||||
@@ -295,7 +236,6 @@ JKRADCommand::~JKRADCommand() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804343C0-804343D8 0610E0 0018+00 1/1 0/0 0/0 .bss decompMutex */
|
||||
static OSMutex decompMutex;
|
||||
|
||||
@@ -518,11 +458,14 @@ static u8* firstSrcData() {
|
||||
}
|
||||
|
||||
/* 802DB49C-802DB580 2D5DDC 00E4+00 1/1 0/0 0/0 .text nextSrcData__FPUc */
|
||||
// NONMATCHING - regalloc
|
||||
static u8* nextSrcData(u8* src) {
|
||||
u8* dest;
|
||||
u32 size = szpEnd - src;
|
||||
dest = IS_NOT_ALIGNED(size, 0x20) ? szpBuf + 0x20 - (size & (0x20 - 1)) : szpBuf;
|
||||
u8* dest;
|
||||
if (IS_NOT_ALIGNED(size, 0x20)) {
|
||||
dest = szpBuf + 0x20 - (size & (0x20 - 1));
|
||||
} else {
|
||||
dest = szpBuf;
|
||||
}
|
||||
memcpy(dest, src, size);
|
||||
u32 transSize = szpEnd - (dest + size);
|
||||
if (transSize > transLeft) {
|
||||
@@ -530,11 +473,11 @@ static u8* nextSrcData(u8* src) {
|
||||
}
|
||||
|
||||
while (true) {
|
||||
s32 result = DVDReadPrio(&srcFile->mFileInfo, dest + size, transSize, srcOffset, 2);
|
||||
s32 result = DVDReadPrio(srcFile->getFileInfo(), dest + size, transSize, srcOffset, 2);
|
||||
if (result >= 0) {
|
||||
break;
|
||||
}
|
||||
if (JKRDvdAramRipper::errorRetry == 0) {
|
||||
if (!JKRDvdAramRipper::isErrorRetry()) {
|
||||
return NULL;
|
||||
}
|
||||
VIWaitForRetrace();
|
||||
|
||||
@@ -5,24 +5,6 @@
|
||||
|
||||
#include "JSystem/JMessage/control.h"
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void reset__Q28JMessage10TProcessorFv();
|
||||
extern "C" void getResource_groupID__Q28JMessage10TProcessorCFUs();
|
||||
extern "C" void toMessageCode_messageID__Q28JMessage10TProcessorCFUlUlPb();
|
||||
extern "C" void process_onCharacterEnd_normal___Q28JMessage10TProcessorFPQ28JMessage10TProcessor();
|
||||
extern "C" void process__Q28JMessage18TSequenceProcessorFPCc();
|
||||
extern "C" void process__Q28JMessage19TRenderingProcessorFPCc();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_28();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802A7548-802A758C 2A1E88 0044+00 0/0 2/2 0/0 .text __ct__Q28JMessage8TControlFv */
|
||||
JMessage::TControl::TControl()
|
||||
: pSequenceProcessor_(NULL), pRenderingProcessor_(NULL), messageCode_(0xFFFF),
|
||||
@@ -66,7 +48,6 @@ int JMessage::TControl::update() {
|
||||
}
|
||||
|
||||
/* 802A76BC-802A77E8 2A1FFC 012C+00 0/0 5/5 0/0 .text render__Q28JMessage8TControlFv */
|
||||
// NONMATCHING
|
||||
void JMessage::TControl::render() {
|
||||
if (isReady_render_()) {
|
||||
pRenderingProcessor_->setBegin_messageEntryText(pResourceCache_, pEntry_, field_0x20);
|
||||
|
||||
@@ -6,39 +6,16 @@
|
||||
#include "JSystem/JMessage/locale.h"
|
||||
#include <dolphin.h>
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void parseCharacter_ShiftJIS__Q28JMessage6localeFPPCc();
|
||||
extern "C" void parseCharacter_UTF8__Q28JMessage6localeFPPCc();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802A9528-802A958C 2A3E68 0064+00 0/0 1/0 0/0 .text
|
||||
* parseCharacter_ShiftJIS__Q28JMessage6localeFPPCc */
|
||||
// NONMATCHING
|
||||
int JMessage::locale::parseCharacter_ShiftJIS(char const** str) {
|
||||
int c;
|
||||
int ret;
|
||||
u8* temp_r4_2;
|
||||
u8* temp_r5;
|
||||
|
||||
temp_r5 = (u8*)*str;
|
||||
c = *temp_r5;
|
||||
ret = c;
|
||||
|
||||
u8 c = **str;
|
||||
int ret = c;
|
||||
*str = *str + 1;
|
||||
|
||||
if (isLeadByte_ShiftJIS(c)) {
|
||||
temp_r4_2 = (u8*)*str;
|
||||
ret = (c << 8) | *temp_r4_2;
|
||||
ret <<= 8;
|
||||
ret |= *(u8*)*str;
|
||||
*str = *str + 1;
|
||||
}
|
||||
|
||||
@@ -47,6 +24,37 @@ int JMessage::locale::parseCharacter_ShiftJIS(char const** str) {
|
||||
|
||||
/* 802A958C-802A968C 2A3ECC 0100+00 0/0 1/0 0/0 .text parseCharacter_UTF8__Q28JMessage6localeFPPCc
|
||||
*/
|
||||
int JMessage::locale::parseCharacter_UTF8(char const** param_0) {
|
||||
// NONMATCHING
|
||||
int JMessage::locale::parseCharacter_UTF8(char const** str) {
|
||||
int c = *(u8*)*str;
|
||||
int ret = c;
|
||||
*str = *str + 1;
|
||||
|
||||
if (c & 0x80) {
|
||||
if ((c & 0xe0) == 0xc0) {
|
||||
ret = (ret & 0x1f) << 6;
|
||||
ret |= **str & 0x3f;
|
||||
*str = *str + 1;
|
||||
} else if ((c & 0xf0) == 0xe0) {
|
||||
ret = (ret & 0xf) << 6;
|
||||
ret |= **str & 0x3f;
|
||||
*str = *str + 1;
|
||||
ret <<= 6;
|
||||
ret |= **str & 0x3f;
|
||||
*str = *str + 1;
|
||||
} else if ((c & 0xf8) == 0xf0) {
|
||||
ret = (ret & 0x7) << 6;
|
||||
ret |= **str & 0x3f;
|
||||
*str = *str + 1;
|
||||
ret <<= 6;
|
||||
ret |= **str & 0x3f;
|
||||
*str = *str + 1;
|
||||
ret <<= 6;
|
||||
ret |= **str & 0x3f;
|
||||
*str = *str + 1;
|
||||
} else {
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -7,102 +7,6 @@
|
||||
#include "JSystem/JMessage/control.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__Q28JMessage10TReferenceFv();
|
||||
extern "C" bool do_word__Q28JMessage10TReferenceCFUl();
|
||||
extern "C" void __dt__Q28JMessage10TProcessorFv();
|
||||
extern "C" void reset__Q28JMessage10TProcessorFv();
|
||||
extern "C" void stack_pushCurrent__Q28JMessage10TProcessorFPCc();
|
||||
extern "C" void stack_popCurrent__Q28JMessage10TProcessorFv();
|
||||
extern "C" void getResource_groupID__Q28JMessage10TProcessorCFUs();
|
||||
extern "C" void toMessageCode_messageID__Q28JMessage10TProcessorCFUlUlPb();
|
||||
extern "C" void on_select_begin__Q28JMessage10TProcessorFPFPQ28JMessage10TProcessor_PCcPCvPCcUl();
|
||||
extern "C" void on_select_end__Q28JMessage10TProcessorFv();
|
||||
extern "C" void on_select_separate__Q28JMessage10TProcessorFv();
|
||||
extern "C" void do_reset__Q28JMessage10TProcessorFv();
|
||||
extern "C" void do_begin__Q28JMessage10TProcessorFPCvPCc();
|
||||
extern "C" void do_end__Q28JMessage10TProcessorFv();
|
||||
extern "C" void do_character__Q28JMessage10TProcessorFi();
|
||||
extern "C" bool do_tag__Q28JMessage10TProcessorFUlPCvUl();
|
||||
extern "C" void do_select_begin__Q28JMessage10TProcessorFUl();
|
||||
extern "C" void do_select_end__Q28JMessage10TProcessorFv();
|
||||
extern "C" void do_select_separate__Q28JMessage10TProcessorFv();
|
||||
extern "C" void on_tag___Q28JMessage10TProcessorFv();
|
||||
extern "C" void do_resetStatus___Q28JMessage10TProcessorFPCc();
|
||||
extern "C" bool do_setBegin_isReady___Q28JMessage10TProcessorCFv();
|
||||
extern "C" void do_tag___Q28JMessage10TProcessorFUlPCvUl();
|
||||
extern "C" void process_character___Q28JMessage10TProcessorFv();
|
||||
extern "C" void process_onCharacterEnd_normal___Q28JMessage10TProcessorFPQ28JMessage10TProcessor();
|
||||
extern "C" void process_onCharacterEnd_select___Q28JMessage10TProcessorFPQ28JMessage10TProcessor();
|
||||
extern "C" void process_onSelect_limited___Q28JMessage10TProcessorFPQ28JMessage10TProcessor();
|
||||
extern "C" void process_onSelect___Q28JMessage10TProcessorFPQ28JMessage10TProcessor();
|
||||
extern "C" void
|
||||
__ct__Q28JMessage18TSequenceProcessorFPCQ28JMessage10TReferencePQ28JMessage8TControl();
|
||||
extern "C" void __dt__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void process__Q28JMessage18TSequenceProcessorFPCc();
|
||||
extern "C" void on_isReady__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void
|
||||
on_jump_register__Q28JMessage18TSequenceProcessorFPFPCQ28JMessage18TSequenceProcessor_PCvUl();
|
||||
extern "C" void on_jump_isReady__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void on_jump__Q28JMessage18TSequenceProcessorFPCvPCc();
|
||||
extern "C" void
|
||||
on_branch_register__Q28JMessage18TSequenceProcessorFPFPCQ28JMessage18TSequenceProcessorUl_PCvPCvUl();
|
||||
extern "C" void on_branch_query__Q28JMessage18TSequenceProcessorFUl();
|
||||
extern "C" void on_branch_queryResult__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void on_branch__Q28JMessage18TSequenceProcessorFPCvPCc();
|
||||
extern "C" bool do_isReady__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" bool do_jump_isReady__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void do_jump__Q28JMessage18TSequenceProcessorFPCvPCc();
|
||||
extern "C" void do_branch_query__Q28JMessage18TSequenceProcessorFUl();
|
||||
extern "C" s32 do_branch_queryResult__Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void do_branch__Q28JMessage18TSequenceProcessorFPCvPCc();
|
||||
extern "C" void do_resetStatus___Q28JMessage18TSequenceProcessorFPCc();
|
||||
extern "C" void do_setBegin_isReady___Q28JMessage18TSequenceProcessorCFv();
|
||||
extern "C" void do_begin___Q28JMessage18TSequenceProcessorFPCvPCc();
|
||||
extern "C" void do_end___Q28JMessage18TSequenceProcessorFv();
|
||||
extern "C" void do_tag___Q28JMessage18TSequenceProcessorFUlPCvUl();
|
||||
extern "C" void process_setMessageIndex_reserved___Q28JMessage18TSequenceProcessorFUs();
|
||||
extern "C" void
|
||||
process_setMessageCode___Q28JMessage18TSequenceProcessorFPCQ28JMessage18TSequenceProcessorUsUs();
|
||||
extern "C" void
|
||||
process_onJump_limited___Q28JMessage18TSequenceProcessorFPCQ28JMessage18TSequenceProcessor();
|
||||
extern "C" void
|
||||
process_onJump___Q28JMessage18TSequenceProcessorFPCQ28JMessage18TSequenceProcessor();
|
||||
extern "C" void
|
||||
process_onBranch_limited___Q28JMessage18TSequenceProcessorFPCQ28JMessage18TSequenceProcessorUl();
|
||||
extern "C" void
|
||||
process_onBranch___Q28JMessage18TSequenceProcessorFPCQ28JMessage18TSequenceProcessorUl();
|
||||
extern "C" void __ct__Q28JMessage19TRenderingProcessorFPCQ28JMessage10TReference();
|
||||
extern "C" void __dt__Q28JMessage19TRenderingProcessorFv();
|
||||
extern "C" void process__Q28JMessage19TRenderingProcessorFPCc();
|
||||
extern "C" void do_begin___Q28JMessage19TRenderingProcessorFPCvPCc();
|
||||
extern "C" void do_end___Q28JMessage19TRenderingProcessorFv();
|
||||
extern "C" void do_tag___Q28JMessage19TRenderingProcessorFUlPCvUl();
|
||||
extern "C" void on_message__Q28JMessage10TProcessorCFUl();
|
||||
extern "C" void getMessageText_messageCode__Q28JMessage10TProcessorCFUl();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void setMessageCode_inSequence___Q28JMessage8TControlFPCQ28JMessage10TProcessorUsUs();
|
||||
extern "C" void toMessageIndex_messageID__Q28JMessage9TResourceCFUlUlPb();
|
||||
extern "C" void Get_groupID__Q38JMessage18TResourceContainer10TCResourceFUs();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802A7AF8-802A7B40 2A2438 0048+00 1/0 2/2 0/0 .text __dt__Q28JMessage10TReferenceFv */
|
||||
JMessage::TReference::~TReference() {}
|
||||
|
||||
@@ -152,13 +56,14 @@ const JMessage::TResource* JMessage::TProcessor::getResource_groupID(u16 groupID
|
||||
|
||||
/* 802A7CD4-802A7E38 2A2614 0164+00 0/0 1/1 0/0 .text
|
||||
* toMessageCode_messageID__Q28JMessage10TProcessorCFUlUlPb */
|
||||
// NONMATCHING - TContainerEnumerator_const stack issues
|
||||
u32 JMessage::TProcessor::toMessageCode_messageID(u32 param_0, u32 param_1,
|
||||
bool* param_2) const {
|
||||
// NONMATCHING regalloc
|
||||
u32 JMessage::TProcessor::toMessageCode_messageID(u32 param_0, u32 param_1, bool* param_2) const {
|
||||
const TResource* this_00 = getResourceCache();
|
||||
u16 uVar4;
|
||||
if (this_00 != NULL && (uVar4 = this_00->toMessageIndex_messageID(param_0, param_1, param_2)) != 0xffff) {
|
||||
return uVar4 | (this_00->getGroupID() << 16);
|
||||
if (this_00 != NULL) {
|
||||
u16 uVar4 = this_00->toMessageIndex_messageID(param_0, param_1, param_2);
|
||||
if (uVar4 != 0xffff) {
|
||||
return uVar4 | (this_00->getGroupID() << 16);
|
||||
}
|
||||
}
|
||||
TResourceContainer* this_01 = getResourceContainer();
|
||||
if (this_01 == NULL) {
|
||||
@@ -167,13 +72,15 @@ u32 JMessage::TProcessor::toMessageCode_messageID(u32 param_0, u32 param_1,
|
||||
|
||||
JGadget::TContainerEnumerator_const<JMessage::TResource, 0> enumerator(this_01->getResourceContainer());
|
||||
const TResource* this_02;
|
||||
while (!enumerator) {
|
||||
while (enumerator) {
|
||||
this_02 = (const TResource*)&(*enumerator);
|
||||
if (this_02 == this_00 || (uVar4 = this_02->toMessageIndex_messageID(param_0, param_1, param_2)) == 0xffff) {
|
||||
continue;
|
||||
if (this_02 != this_00) {
|
||||
u16 uVar4 = this_02->toMessageIndex_messageID(param_0, param_1, param_2);
|
||||
if (uVar4 != 0xffff) {
|
||||
((JMessage::TProcessor*)this)->pResourceCache_ = this_02;
|
||||
return uVar4 | (this_02->getGroupID() << 0x10);
|
||||
}
|
||||
}
|
||||
((JMessage::TProcessor*)this)->pResourceCache_ = this_02;
|
||||
return uVar4 | (this_02->getGroupID() << 0x10);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -280,11 +187,11 @@ void JMessage::TProcessor::do_tag_(u32 uTag, void const* data, u32 uSize) {
|
||||
switch (code) {
|
||||
case 4:
|
||||
stack_pushCurrent(
|
||||
on_word(JGadget::binary::TParseValue<u32, TParseValue_endian_big_>::parse(data)));
|
||||
on_word(JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(data)));
|
||||
break;
|
||||
case 5:
|
||||
stack_pushCurrent(on_message(
|
||||
JGadget::binary::TParseValue<u32, TParseValue_endian_big_>::parse(data)));
|
||||
JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(data)));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -353,7 +260,7 @@ bool JMessage::TProcessor::process_onCharacterEnd_select_(JMessage::TProcessor*
|
||||
/* 802A833C-802A8358 2A2C7C 001C+00 1/1 0/0 0/0 .text
|
||||
* process_onSelect_limited___Q28JMessage10TProcessorFPQ28JMessage10TProcessor */
|
||||
const char* JMessage::TProcessor::process_onSelect_limited_(JMessage::TProcessor* pThis) {
|
||||
u16 data = JGadget::binary::TParseValue<u16, TParseValue_endian_big_>::parse((u16*)pThis->oProcess_.rData.pOffset);
|
||||
u16 data = JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse((u16*)pThis->oProcess_.rData.pOffset);
|
||||
|
||||
pThis->oProcess_.rData.pOffset =
|
||||
(void*)((u8*)pThis->oProcess_.rData.pOffset + 2);
|
||||
@@ -364,7 +271,7 @@ const char* JMessage::TProcessor::process_onSelect_limited_(JMessage::TProcessor
|
||||
/* 802A8358-802A8374 2A2C98 001C+00 1/1 0/0 0/0 .text
|
||||
* process_onSelect___Q28JMessage10TProcessorFPQ28JMessage10TProcessor */
|
||||
const char* JMessage::TProcessor::process_onSelect_(JMessage::TProcessor* pThis) {
|
||||
u32 data = JGadget::binary::TParseValue<u32, TParseValue_endian_big_>::parse((u32*)pThis->oProcess_.rData.pOffset);
|
||||
u32 data = JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse((u32*)pThis->oProcess_.rData.pOffset);
|
||||
|
||||
pThis->oProcess_.rData.pOffset =
|
||||
(void*)((u8*)pThis->oProcess_.rData.pOffset + 4);
|
||||
@@ -388,7 +295,7 @@ const char* JMessage::TSequenceProcessor::process(char const* param_0) {
|
||||
switch (eStatus_) {
|
||||
case STATUS_NORMAL:
|
||||
break;
|
||||
case STATUS_JUMP:
|
||||
case STATUS_JUMP: {
|
||||
if (!on_jump_isReady()) {
|
||||
return pszCurrent_;
|
||||
}
|
||||
@@ -399,6 +306,7 @@ const char* JMessage::TSequenceProcessor::process(char const* param_0) {
|
||||
on_jump(data, pControl_->getMessageText_begin());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case STATUS_BRANCH:
|
||||
u32 tmp = on_branch_queryResult();
|
||||
if (tmp > 0x7FFFFFFF) {
|
||||
@@ -564,10 +472,11 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* data, u32 uSize
|
||||
case 2:
|
||||
case 3:
|
||||
break;
|
||||
case 6:
|
||||
u32 tmp = JGadget::binary::TParseValue<u32, TParseValue_endian_big_>::parse(temp);
|
||||
case 6: {
|
||||
u32 tmp = JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(temp);
|
||||
on_jump_register(process_onJump_, tmp);
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
break;
|
||||
default:
|
||||
@@ -589,12 +498,12 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* data, u32 uSize
|
||||
break;
|
||||
case 0xF8:
|
||||
on_branch_register(process_onBranch_limited_, temp + 2,
|
||||
JGadget::binary::TParseValue<u16, TParseValue_endian_big_>::parse(temp));
|
||||
JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(temp));
|
||||
on_branch_query(code);
|
||||
break;
|
||||
case 0xF7:
|
||||
on_branch_register(process_onBranch_, temp + 2,
|
||||
JGadget::binary::TParseValue<u16, TParseValue_endian_big_>::parse(temp));
|
||||
JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(temp));
|
||||
on_branch_query(code);
|
||||
break;
|
||||
default:
|
||||
@@ -608,9 +517,10 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* data, u32 uSize
|
||||
// NONMATCHING
|
||||
void JMessage::TSequenceProcessor::process_setMessageIndex_reserved_(u16 u16Index) {
|
||||
JUT_ASSERT(890, u16Index >= 0xff00);
|
||||
if (u16Index != -1) {
|
||||
switch (u16Index) {
|
||||
case 0xffff:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 802A8944-802A89B8 2A3284 0074+00 4/4 0/0 0/0 .text
|
||||
@@ -651,7 +561,7 @@ const void*
|
||||
JMessage::TSequenceProcessor::process_onBranch_limited_(JMessage::TSequenceProcessor const* param_0,
|
||||
u32 uTargetIndex) {
|
||||
return process_setMessageIndex_(
|
||||
param_0, JGadget::binary::TParseValue<u16, TParseValue_endian_big_>::parse(
|
||||
param_0, JGadget::binary::TParseValue<u16, JGadget::binary::TParseValue_endian_big_>::parse(
|
||||
param_0->oProcess2_.process.branch_process.pTarget, uTargetIndex));
|
||||
}
|
||||
|
||||
@@ -661,7 +571,7 @@ const void*
|
||||
JMessage::TSequenceProcessor::process_onBranch_(JMessage::TSequenceProcessor const* param_0,
|
||||
u32 uTargetIndex) {
|
||||
return process_setMessageCode_(
|
||||
param_0, JGadget::binary::TParseValue<u32, TParseValue_endian_big_>::parse(
|
||||
param_0, JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(
|
||||
param_0->oProcess2_.process.branch_process.pTarget, uTargetIndex));
|
||||
}
|
||||
|
||||
@@ -729,14 +639,3 @@ void JMessage::TRenderingProcessor::do_tag_(u32 uTag, void const* data, u32 uSiz
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 802A8C24-802A8C44 2A3564 0020+00 1/1 0/0 0/0 .text on_message__Q28JMessage10TProcessorCFUl */
|
||||
const char* JMessage::TProcessor::on_message(u32 param_0) const {
|
||||
return getMessageText_messageCode(param_0);
|
||||
}
|
||||
|
||||
/* 802A8C44-802A8CDC 2A3584 0098+00 1/1 0/0 0/0 .text
|
||||
* getMessageText_messageCode__Q28JMessage10TProcessorCFUl */
|
||||
const char* JMessage::TProcessor::getMessageText_messageCode(u32 param_0) const {
|
||||
return getMessageText_messageCode(param_0 >> 0x10, param_0 & 0xFFFF);
|
||||
}
|
||||
|
||||
@@ -4,71 +4,15 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JMessage/resource.h"
|
||||
#include "JSystem/JGadget/search.h"
|
||||
#include <algorithm.h>
|
||||
#include "dol2asm.h"
|
||||
#include "string.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
namespace std {
|
||||
template <typename A1, typename B1>
|
||||
void lower_bound(/* ... */);
|
||||
/* 802A94D4 */ /* std::lower_bound<u32 const*, u32> */
|
||||
void func_802A94D4(void* _this, u32 const*, u32 const*, u32 const&);
|
||||
}; // namespace std
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void toMessageIndex_messageID__Q28JMessage9TResourceCFUlUlPb();
|
||||
extern "C" void __ct__Q38JMessage18TResourceContainer10TCResourceFv();
|
||||
extern "C" void __dt__Q38JMessage18TResourceContainer10TCResourceFv();
|
||||
extern "C" void Get_groupID__Q38JMessage18TResourceContainer10TCResourceFUs();
|
||||
extern "C" void Do_create__Q38JMessage18TResourceContainer10TCResourceFv();
|
||||
extern "C" void Do_destroy__Q38JMessage18TResourceContainer10TCResourceFPQ28JMessage9TResource();
|
||||
extern "C" void __ct__Q28JMessage18TResourceContainerFv();
|
||||
extern "C" void setEncoding__Q28JMessage18TResourceContainerFUc();
|
||||
extern "C" void setEncoding___Q28JMessage18TResourceContainerFUc();
|
||||
extern "C" void __ct__Q28JMessage6TParseFPQ28JMessage18TResourceContainer();
|
||||
extern "C" void __dt__Q28JMessage6TParseFv();
|
||||
extern "C" void parseHeader_next__Q28JMessage6TParseFPPCvPUlUl();
|
||||
extern "C" void parseBlock_next__Q28JMessage6TParseFPPCvPUlUl();
|
||||
extern "C" void parseCharacter_1Byte__Q28JMessage6localeFPPCc();
|
||||
extern "C" void parseCharacter_2Byte__Q28JMessage6localeFPPCc();
|
||||
extern "C" void func_802A94D4(void* _this, u32 const*, u32 const*, u32 const&);
|
||||
extern "C" void* sapfnParseCharacter___Q28JMessage18TResourceContainer[5];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void parseCharacter_ShiftJIS__Q28JMessage6localeFPPCc();
|
||||
extern "C" void parseCharacter_UTF8__Q28JMessage6localeFPPCc();
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__Q37JGadget6binary19TParse_header_blockFv();
|
||||
extern "C" void __dt__Q27JGadget13TNodeLinkListFv();
|
||||
extern "C" void
|
||||
Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode();
|
||||
extern "C" void Erase__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" extern void* __vt__Q37JGadget6binary19TParse_header_block[5];
|
||||
extern "C" f32 ga4cSignature__Q28JMessage4data[1 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802A8CDC-802A8EC0 2A361C 01E4+00 0/0 1/1 0/0 .text
|
||||
* toMessageIndex_messageID__Q28JMessage9TResourceCFUlUlPb */
|
||||
// NONMATCHING - instruction order
|
||||
u16 JMessage::TResource::toMessageIndex_messageID(u32 lowerHalf, u32 upperHalf,
|
||||
bool* isMsgValid) const {
|
||||
if (!mMessageID.get()) {
|
||||
if (!mMessageID.getRaw()) {
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
@@ -118,21 +62,19 @@ u16 JMessage::TResource::toMessageIndex_messageID(u32 lowerHalf, u32 upperHalf,
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
const u32* first = (u32*)mMessageID.getContent();
|
||||
const u32* last = (u32*)(first + mMessageID.get_number());
|
||||
int number = mMessageID.get_number();
|
||||
const u32* first = mMessageID.getContent();
|
||||
const u32* last = first + number;
|
||||
|
||||
const u32* lower;
|
||||
if (mMessageID.get_isOrdered()) {
|
||||
lower = std::lower_bound<const u32*, u32>(first, last, val);
|
||||
lower = std::lower_bound(first, last, val);
|
||||
|
||||
if (lower == last || *lower != val) {
|
||||
return 0xFFFF;
|
||||
}
|
||||
} else {
|
||||
lower = first;
|
||||
while (lower != last && *lower != val) {
|
||||
lower++;
|
||||
}
|
||||
lower = std::find(first, last, val);
|
||||
if (lower == last) {
|
||||
return 0xFFFF;
|
||||
}
|
||||
@@ -150,41 +92,12 @@ JMessage::locale::parseCharacter_function JMessage::TResourceContainer::sapfnPar
|
||||
JMessage::locale::parseCharacter_UTF8,
|
||||
};
|
||||
|
||||
/* 803C9C94-803C9CA8 026DB4 0014+00 2/2 0/0 0/0 .data __vt__Q28JMessage6TParse */
|
||||
SECTION_DATA extern void* __vt__Q28JMessage6TParse[5] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q28JMessage6TParseFv,
|
||||
(void*)parseHeader_next__Q28JMessage6TParseFPPCvPUlUl,
|
||||
(void*)parseBlock_next__Q28JMessage6TParseFPPCvPUlUl,
|
||||
};
|
||||
|
||||
/* 803C9CA8-803C9CBC 026DC8 0014+00 2/2 0/0 0/0 .data
|
||||
* __vt__Q38JMessage18TResourceContainer10TCResource */
|
||||
SECTION_DATA extern void* __vt__Q38JMessage18TResourceContainer10TCResource[5] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q38JMessage18TResourceContainer10TCResourceFv,
|
||||
(void*)Do_create__Q38JMessage18TResourceContainer10TCResourceFv,
|
||||
(void*)Do_destroy__Q38JMessage18TResourceContainer10TCResourceFPQ28JMessage9TResource,
|
||||
};
|
||||
|
||||
/* 803C9CBC-803C9CD0 026DDC 0014+00 2/2 0/0 0/0 .data
|
||||
* __vt__Q27JGadget42TLinkList_factory<Q28JMessage9TResource,0> */
|
||||
SECTION_DATA extern void* data_803C9CBC[5] = {
|
||||
(void*)NULL /* RTTI */, (void*)NULL, (void*)NULL, (void*)NULL, (void*)NULL,
|
||||
};
|
||||
|
||||
/* 802A8EC0-802A8EF8 2A3800 0038+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q38JMessage18TResourceContainer10TCResourceFv */
|
||||
// need to fix TLinkList_factory vtable stuff
|
||||
JMessage::TResourceContainer::TCResource::TCResource() {
|
||||
// NONMATCHING
|
||||
}
|
||||
JMessage::TResourceContainer::TCResource::TCResource() {}
|
||||
|
||||
/* 802A8EF8-802A8F6C 2A3838 0074+00 1/0 2/2 0/0 .text
|
||||
* __dt__Q38JMessage18TResourceContainer10TCResourceFv */
|
||||
// need to fix TLinkList_factory vtable stuff
|
||||
JMessage::TResourceContainer::TCResource::~TCResource() {}
|
||||
|
||||
/* 802A8F6C-802A8FFC 2A38AC 0090+00 0/0 1/1 0/0 .text
|
||||
@@ -209,6 +122,7 @@ JMessage::TResource* JMessage::TResourceContainer::TCResource::Do_create() {
|
||||
|
||||
/* 802A9048-802A906C 2A3988 0024+00 1/0 0/0 0/0 .text
|
||||
* Do_destroy__Q38JMessage18TResourceContainer10TCResourceFPQ28JMessage9TResource */
|
||||
// NONMATCHING extra null comparison
|
||||
void JMessage::TResourceContainer::TCResource::Do_destroy(JMessage::TResource* param_0) {
|
||||
delete param_0;
|
||||
}
|
||||
@@ -247,7 +161,7 @@ JMessage::TParse::~TParse() {}
|
||||
|
||||
/* 802A91B8-802A92F4 2A3AF8 013C+00 1/0 0/0 0/0 .text
|
||||
* parseHeader_next__Q28JMessage6TParseFPPCvPUlUl */
|
||||
// NONMATCHING
|
||||
// NONMATCHING regalloc, missing clrlwi
|
||||
bool JMessage::TParse::parseHeader_next(void const** ppData_inout, u32* puBlock_out, u32 param_2) {
|
||||
const void* pData = *ppData_inout;
|
||||
|
||||
@@ -317,9 +231,3 @@ int JMessage::locale::parseCharacter_2Byte(char const** string) {
|
||||
|
||||
return parse_char;
|
||||
}
|
||||
|
||||
/* 802A94D4-802A9528 2A3E14 0054+00 1/1 0/0 0/0 .text lower_bound<PCUl,Ul>__3stdFPCUlPCUlRCUl */
|
||||
/* extern "C" void func_802A94D4(void* _this, u32 const* param_0, u32 const* param_1,
|
||||
u32 const& param_2) {
|
||||
// NONMATCHING
|
||||
} */
|
||||
|
||||
@@ -6,123 +6,15 @@
|
||||
#include "JSystem/JStudio/JStudio/ctb.h"
|
||||
#include "iterator.h"
|
||||
#include "string.h"
|
||||
#include "dol2asm.h"
|
||||
#include <algorithm.h>
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
namespace std {
|
||||
void func_802815B4(void* _this, JGadget::TLinkList<JStudio::ctb::TObject, 12>::iterator,
|
||||
JGadget::TLinkList<JStudio::ctb::TObject, 12>::iterator, JStudio::object::TPRObject_ID_equal);
|
||||
}; // namespace std
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__Q37JStudio3ctb7TObjectFv();
|
||||
extern "C" void __ct__Q37JStudio3ctb14TObject_TxyzRyFRCQ47JStudio3ctb4data13TParse_TBlock();
|
||||
extern "C" bool getScheme__Q37JStudio3ctb14TObject_TxyzRyCFv();
|
||||
extern "C" void __ct__Q37JStudio3ctb8TControlFv();
|
||||
extern "C" void __dt__Q37JStudio3ctb8TControlFv();
|
||||
extern "C" void appendObject__Q37JStudio3ctb8TControlFPQ37JStudio3ctb7TObject();
|
||||
extern "C" void removeObject__Q37JStudio3ctb8TControlFPQ37JStudio3ctb7TObject();
|
||||
extern "C" void destroyObject__Q37JStudio3ctb8TControlFPQ37JStudio3ctb7TObject();
|
||||
extern "C" void destroyObject_all__Q37JStudio3ctb8TControlFv();
|
||||
extern "C" void getObject__Q37JStudio3ctb8TControlFPCvUl();
|
||||
extern "C" void getObject_index__Q37JStudio3ctb8TControlFUl();
|
||||
extern "C" void __dt__Q37JStudio3ctb8TFactoryFv();
|
||||
extern "C" void create__Q37JStudio3ctb8TFactoryFRCQ47JStudio3ctb4data13TParse_TBlock();
|
||||
extern "C" void destroy__Q37JStudio3ctb8TFactoryFPQ37JStudio3ctb7TObject();
|
||||
extern "C" void __ct__Q37JStudio3ctb6TParseFPQ37JStudio3ctb8TControl();
|
||||
extern "C" void __dt__Q37JStudio3ctb6TParseFv();
|
||||
extern "C" void parseHeader_next__Q37JStudio3ctb6TParseFPPCvPUlUl();
|
||||
extern "C" void parseBlock_next__Q37JStudio3ctb6TParseFPPCvPUlUl();
|
||||
extern "C" void __dt__Q37JStudio3ctb14TObject_TxyzRyFv();
|
||||
extern "C" void func_802815B4(void* _this, JGadget::TLinkList<JStudio::ctb::TObject, 12>::iterator,
|
||||
JGadget::TLinkList<JStudio::ctb::TObject, 12>::iterator,
|
||||
JStudio::object::TPRObject_ID_equal);
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void
|
||||
isEqual__Q37JStudio6object7TIDDataFRCQ37JStudio6object7TIDDataRCQ37JStudio6object7TIDData();
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__Q37JGadget6binary19TParse_header_blockFv();
|
||||
extern "C" void __dt__Q27JGadget13TNodeLinkListFv();
|
||||
extern "C" void
|
||||
Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode();
|
||||
extern "C" void Erase__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" u32 ga4cSignature__Q37JStudio3ctb4data[1 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C4878-803C488C 021998 0014+00 2/2 0/0 0/0 .data __vt__Q37JStudio3ctb6TParse */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3ctb6TParse[5] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3ctb6TParseFv,
|
||||
(void*)parseHeader_next__Q37JStudio3ctb6TParseFPPCvPUlUl,
|
||||
(void*)parseBlock_next__Q37JStudio3ctb6TParseFPPCvPUlUl,
|
||||
};
|
||||
|
||||
/* 803C488C-803C48A0 0219AC 0014+00 1/1 4/4 0/0 .data __vt__Q37JGadget6binary19TParse_header_block
|
||||
*/
|
||||
SECTION_DATA extern void* __vt__Q37JGadget6binary19TParse_header_block[5] = {
|
||||
(void*)NULL /* RTTI */, (void*)NULL, (void*)NULL, (void*)NULL, (void*)NULL,
|
||||
};
|
||||
|
||||
/* 803C48A0-803C48B4 0219C0 0014+00 1/1 1/1 0/0 .data __vt__Q37JStudio3ctb8TFactory */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3ctb8TFactory[5] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3ctb8TFactoryFv,
|
||||
(void*)create__Q37JStudio3ctb8TFactoryFRCQ47JStudio3ctb4data13TParse_TBlock,
|
||||
(void*)destroy__Q37JStudio3ctb8TFactoryFPQ37JStudio3ctb7TObject,
|
||||
};
|
||||
|
||||
/* 803C48B4-803C48C0 0219D4 000C+00 2/2 0/0 0/0 .data __vt__Q37JStudio3ctb8TControl */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3ctb8TControl[3] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3ctb8TControlFv,
|
||||
};
|
||||
|
||||
/* 803C48C0-803C48D0 0219E0 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3ctb14TObject_TxyzRy */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3ctb14TObject_TxyzRy[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3ctb14TObject_TxyzRyFv,
|
||||
(void*)getScheme__Q37JStudio3ctb14TObject_TxyzRyCFv,
|
||||
};
|
||||
|
||||
/* 803C48D0-803C48E0 0219F0 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3ctb7TObject */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3ctb7TObject[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
};
|
||||
|
||||
/* 80280F18-80280F60 27B858 0048+00 1/1 0/0 0/0 .text __dt__Q37JStudio3ctb7TObjectFv */
|
||||
JStudio::ctb::TObject::~TObject() {
|
||||
}
|
||||
JStudio::ctb::TObject::~TObject() {}
|
||||
|
||||
/* 80280F60-80280FBC 27B8A0 005C+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3ctb14TObject_TxyzRyFRCQ47JStudio3ctb4data13TParse_TBlock */
|
||||
JStudio::ctb::TObject_TxyzRy::TObject_TxyzRy(JStudio::ctb::data::TParse_TBlock const& param_0) : TObject(param_0.get_ID(), param_0.get_IDSize(), param_0.getContent()) {
|
||||
|
||||
}
|
||||
JStudio::ctb::TObject_TxyzRy::TObject_TxyzRy(JStudio::ctb::data::TParse_TBlock const& param_0)
|
||||
: TObject(param_0.get_ID(), param_0.get_IDSize(), param_0.getContent()) {}
|
||||
|
||||
/* 80280FBC-80280FC4 27B8FC 0008+00 1/0 0/0 0/0 .text getScheme__Q37JStudio3ctb14TObject_TxyzRyCFv
|
||||
*/
|
||||
@@ -134,10 +26,7 @@ int JStudio::ctb::TObject_TxyzRy::getScheme() const {
|
||||
JStudio::ctb::TControl::TControl() : pFactory_(NULL) {}
|
||||
|
||||
/* 80280FF4-80281060 27B934 006C+00 1/0 1/1 0/0 .text __dt__Q37JStudio3ctb8TControlFv */
|
||||
// JStudio::ctb::TControl::~TControl() {
|
||||
extern "C" void __dt__Q37JStudio3ctb8TControlFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
JStudio::ctb::TControl::~TControl() {}
|
||||
|
||||
/* 80281060-802810AC 27B9A0 004C+00 1/1 0/0 0/0 .text
|
||||
* appendObject__Q37JStudio3ctb8TControlFPQ37JStudio3ctb7TObject */
|
||||
@@ -190,10 +79,7 @@ JStudio::ctb::TObject* JStudio::ctb::TControl::getObject_index(u32 param_0) {
|
||||
}
|
||||
|
||||
/* 80281274-802812BC 27BBB4 0048+00 1/0 1/1 0/0 .text __dt__Q37JStudio3ctb8TFactoryFv */
|
||||
// JStudio::ctb::TFactory::~TFactory() {
|
||||
extern "C" void __dt__Q37JStudio3ctb8TFactoryFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
JStudio::ctb::TFactory::~TFactory() {}
|
||||
|
||||
/* 802812BC-80281320 27BBFC 0064+00 1/0 0/0 0/0 .text
|
||||
* create__Q37JStudio3ctb8TFactoryFRCQ47JStudio3ctb4data13TParse_TBlock */
|
||||
@@ -214,15 +100,11 @@ void JStudio::ctb::TFactory::destroy(JStudio::ctb::TObject* param_0) {
|
||||
|
||||
/* 8028135C-8028137C 27BC9C 0020+00 0/0 1/1 0/0 .text
|
||||
* __ct__Q37JStudio3ctb6TParseFPQ37JStudio3ctb8TControl */
|
||||
JStudio::ctb::TParse::TParse(JStudio::ctb::TControl* param_0) {
|
||||
// NONMATCHING
|
||||
}
|
||||
// NONMATCHING TParse_header_block vtable location
|
||||
JStudio::ctb::TParse::TParse(JStudio::ctb::TControl* param_0) : pControl_(param_0) {}
|
||||
|
||||
/* 8028137C-802813DC 27BCBC 0060+00 1/0 1/1 0/0 .text __dt__Q37JStudio3ctb6TParseFv */
|
||||
// JStudio::ctb::TParse::~TParse() {
|
||||
extern "C" void __dt__Q37JStudio3ctb6TParseFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
JStudio::ctb::TParse::~TParse() {}
|
||||
|
||||
/* 802813DC-80281470 27BD1C 0094+00 1/0 0/0 0/0 .text
|
||||
* parseHeader_next__Q37JStudio3ctb6TParseFPPCvPUlUl */
|
||||
@@ -283,18 +165,3 @@ bool JStudio::ctb::TParse::parseBlock_next(void const** ppData_inout, u32* puDat
|
||||
pControl->appendObject(pTVar6);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 80281554-802815B4 27BE94 0060+00 1/0 0/0 0/0 .text __dt__Q37JStudio3ctb14TObject_TxyzRyFv */
|
||||
// JStudio::ctb::TObject_TxyzRy::~TObject_TxyzRy() {
|
||||
extern "C" void __dt__Q37JStudio3ctb14TObject_TxyzRyFv() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 802815B4-80281648 27BEF4 0094+00 1/1 0/0 0/0 .text
|
||||
* find_if<Q37JGadget37TLinkList<Q37JStudio3ctb7TObject,-12>8iterator,Q37JStudio6object18TPRObject_ID_equal>__3stdFQ37JGadget37TLinkList<Q37JStudio3ctb7TObject,-12>8iteratorQ37JGadget37TLinkList<Q37JStudio3ctb7TObject,-12>8iteratorQ37JStudio6object18TPRObject_ID_equal
|
||||
*/
|
||||
extern "C" void func_802815B4(void* _this, JGadget::TLinkList<JStudio::ctb::TObject, 12>::iterator param_0,
|
||||
JGadget::TLinkList<JStudio::ctb::TObject, 12>::iterator param_1,
|
||||
JStudio::object::TPRObject_ID_equal param_2) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#include "JSystem/JStudio/JStudio/functionvalue.h"
|
||||
|
||||
namespace std {
|
||||
template <typename A1>
|
||||
struct less {};
|
||||
/* less<f64> */
|
||||
struct less__template0 {};
|
||||
|
||||
template <typename A1, typename B1, typename C1>
|
||||
void upper_bound(/* ... */);
|
||||
}; // namespace std
|
||||
|
||||
/* 80283E24-80283EB8 27E764 0094+00 1/1 0/0 0/0 .text
|
||||
* upper_bound<Q37JStudio29TFunctionValue_list_parameter15TIterator_data_,d,Q23std7less<d>>__3stdFQ37JStudio29TFunctionValue_list_parameter15TIterator_data_Q37JStudio29TFunctionValue_list_parameter15TIterator_data_RCdQ23std7less<d>
|
||||
*/
|
||||
#pragma force_active on
|
||||
extern "C" inline void
|
||||
func_80283E24(void* _this, JStudio::TFunctionValue_list_parameter::TIterator_data_ param_0,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_ param_1, f64 const& param_2,
|
||||
std::less<f64> param_3) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80283EB8-80283F80 27E7F8 00C8+00 1/1 0/0 0/0 .text
|
||||
* upper_bound<Q37JStudio22TFunctionValue_hermite15TIterator_data_,d,Q23std7less<d>>__3stdFQ37JStudio22TFunctionValue_hermite15TIterator_data_Q37JStudio22TFunctionValue_hermite15TIterator_data_RCdQ23std7less<d>
|
||||
*/
|
||||
#pragma force_active on
|
||||
extern "C" inline void func_80283EB8(void* _this,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_0,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_1,
|
||||
f64 const& param_2, std::less<f64> param_3) {
|
||||
// NONMATCHING
|
||||
}
|
||||
@@ -4,316 +4,12 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JStudio/JStudio/functionvalue.h"
|
||||
#include "JSystem/JGadget/search.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "math.h"
|
||||
#include "stdlib.h"
|
||||
#include "dol2asm.h"
|
||||
#include "iterator.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
template <typename Iterator, typename B1>
|
||||
Iterator findUpperBound_binary_current(Iterator, Iterator, Iterator, const B1&);
|
||||
}; // namespace JGadget
|
||||
|
||||
namespace std {
|
||||
template <typename A1>
|
||||
struct less {};
|
||||
/* less<f64> */
|
||||
struct less__template0 {};
|
||||
|
||||
template <typename A1, typename B1, typename C1>
|
||||
void upper_bound(/* ... */);
|
||||
/* 80283EB8 */ /* std::upper_bound<JStudio::TFunctionValue_hermite::TIterator_data_, f64,
|
||||
std::less<f64>> */
|
||||
void func_80283EB8(void* _this, JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_, f64 const&, std::less<f64>);
|
||||
/* 80283E24 */ /* std::upper_bound<JStudio::TFunctionValue_list_parameter::TIterator_data_, f64,
|
||||
std::less<f64>> */
|
||||
void func_80283E24(void* _this, JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_, f64 const&,
|
||||
std::less<f64>);
|
||||
}; // namespace std
|
||||
|
||||
namespace JGadget {
|
||||
/* 80283858 */ JStudio::TFunctionValue_hermite::TIterator_data_
|
||||
func_80283858(JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_, f64 const&);
|
||||
/* 802835DC */ JStudio::TFunctionValue_list_parameter::TIterator_data_
|
||||
func_802835DC(JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_, f64 const&);
|
||||
/* 80283634 */ void func_80283634(void* _this,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
f64 const&, std::less<f64>);
|
||||
/* 802838C8 */ void func_802838C8(void* _this, JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_, f64 const&,
|
||||
std::less<f64>);
|
||||
} // namespace JGadget
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void toFunction_outside__Q27JStudio14TFunctionValueFi();
|
||||
extern "C" void __ct__Q27JStudio14TFunctionValueFv();
|
||||
extern "C" void __dt__Q27JStudio14TFunctionValueFv();
|
||||
extern "C" void refer_initialize__Q27JStudio29TFunctionValueAttribute_referFv();
|
||||
extern "C" void interpolateValue_hermite__Q27JStudio13functionvalueFddddddd();
|
||||
extern "C" void interpolateValue_BSpline_uniform__Q27JStudio13functionvalueFddddd();
|
||||
extern "C" void interpolateValue_BSpline_nonuniform__Q27JStudio13functionvalueFdPCdPCd();
|
||||
extern "C" void extrapolateParameter_turn__Q27JStudio13functionvalueFdd();
|
||||
extern "C" void range_initialize__Q27JStudio29TFunctionValueAttribute_rangeFv();
|
||||
extern "C" void range_prepare__Q27JStudio29TFunctionValueAttribute_rangeFv();
|
||||
extern "C" void range_set__Q27JStudio29TFunctionValueAttribute_rangeFdd();
|
||||
extern "C" void range_getParameter__Q27JStudio29TFunctionValueAttribute_rangeCFddd();
|
||||
extern "C" void __ct__Q27JStudio29TFunctionValueAttribute_rangeFv();
|
||||
extern "C" void __ct__Q27JStudio24TFunctionValue_compositeFv();
|
||||
extern "C" bool getType__Q27JStudio24TFunctionValue_compositeCFv();
|
||||
extern "C" void getAttributeSet__Q27JStudio24TFunctionValue_compositeFv();
|
||||
extern "C" void initialize__Q27JStudio24TFunctionValue_compositeFv();
|
||||
extern "C" void prepare__Q27JStudio24TFunctionValue_compositeFv();
|
||||
extern "C" void getValue__Q27JStudio24TFunctionValue_compositeFd();
|
||||
extern "C" void func_80281E5C();
|
||||
extern "C" void func_80281EC8();
|
||||
extern "C" void func_8028202C();
|
||||
extern "C" void func_80282094();
|
||||
extern "C" void func_80282118();
|
||||
extern "C" void func_80282200();
|
||||
extern "C" void func_80282284();
|
||||
extern "C" void __ct__Q27JStudio23TFunctionValue_constantFv();
|
||||
extern "C" s32 getType__Q27JStudio23TFunctionValue_constantCFv();
|
||||
extern "C" void getAttributeSet__Q27JStudio23TFunctionValue_constantFv();
|
||||
extern "C" void initialize__Q27JStudio23TFunctionValue_constantFv();
|
||||
extern "C" void prepare__Q27JStudio23TFunctionValue_constantFv();
|
||||
extern "C" void getValue__Q27JStudio23TFunctionValue_constantFd();
|
||||
extern "C" void __ct__Q27JStudio25TFunctionValue_transitionFv();
|
||||
extern "C" s32 getType__Q27JStudio25TFunctionValue_transitionCFv();
|
||||
extern "C" void getAttributeSet__Q27JStudio25TFunctionValue_transitionFv();
|
||||
extern "C" void initialize__Q27JStudio25TFunctionValue_transitionFv();
|
||||
extern "C" void prepare__Q27JStudio25TFunctionValue_transitionFv();
|
||||
extern "C" void getValue__Q27JStudio25TFunctionValue_transitionFd();
|
||||
extern "C" void __ct__Q27JStudio19TFunctionValue_listFv();
|
||||
extern "C" s32 getType__Q27JStudio19TFunctionValue_listCFv();
|
||||
extern "C" void getAttributeSet__Q27JStudio19TFunctionValue_listFv();
|
||||
extern "C" void initialize__Q27JStudio19TFunctionValue_listFv();
|
||||
extern "C" void prepare__Q27JStudio19TFunctionValue_listFv();
|
||||
extern "C" void getValue__Q27JStudio19TFunctionValue_listFd();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_NONE___Q27JStudio19TFunctionValue_listFRCQ27JStudio19TFunctionValue_listRCQ37JStudio19TFunctionValue_list11TIndexData_();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_LINEAR___Q27JStudio19TFunctionValue_listFRCQ27JStudio19TFunctionValue_listRCQ37JStudio19TFunctionValue_list11TIndexData_();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_PLATEAU___Q27JStudio19TFunctionValue_listFRCQ27JStudio19TFunctionValue_listRCQ37JStudio19TFunctionValue_list11TIndexData_();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_BSPLINE_dataMore3___Q27JStudio19TFunctionValue_listFRCQ27JStudio19TFunctionValue_listRCQ37JStudio19TFunctionValue_list11TIndexData_();
|
||||
extern "C" void __ct__Q27JStudio29TFunctionValue_list_parameterFv();
|
||||
extern "C" s32 getType__Q27JStudio29TFunctionValue_list_parameterCFv();
|
||||
extern "C" void getAttributeSet__Q27JStudio29TFunctionValue_list_parameterFv();
|
||||
extern "C" void data_set__Q27JStudio29TFunctionValue_list_parameterFPCfUl();
|
||||
extern "C" void initialize__Q27JStudio29TFunctionValue_list_parameterFv();
|
||||
extern "C" void prepare__Q27JStudio29TFunctionValue_list_parameterFv();
|
||||
extern "C" void getValue__Q27JStudio29TFunctionValue_list_parameterFd();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_NONE___Q27JStudio29TFunctionValue_list_parameterFRCQ27JStudio29TFunctionValue_list_parameterd();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_LINEAR___Q27JStudio29TFunctionValue_list_parameterFRCQ27JStudio29TFunctionValue_list_parameterd();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_PLATEAU___Q27JStudio29TFunctionValue_list_parameterFRCQ27JStudio29TFunctionValue_list_parameterd();
|
||||
extern "C" void
|
||||
update_INTERPOLATE_BSPLINE_dataMore3___Q27JStudio29TFunctionValue_list_parameterFRCQ27JStudio29TFunctionValue_list_parameterd();
|
||||
extern "C" void __ct__Q27JStudio22TFunctionValue_hermiteFv();
|
||||
extern "C" s32 getType__Q27JStudio22TFunctionValue_hermiteCFv();
|
||||
extern "C" void getAttributeSet__Q27JStudio22TFunctionValue_hermiteFv();
|
||||
extern "C" void data_set__Q27JStudio22TFunctionValue_hermiteFPCfUlUl();
|
||||
extern "C" void initialize__Q27JStudio22TFunctionValue_hermiteFv();
|
||||
extern "C" void prepare__Q27JStudio22TFunctionValue_hermiteFv();
|
||||
extern "C" void getValue__Q27JStudio22TFunctionValue_hermiteFd();
|
||||
extern "C" void extrapolateParameter_raw__Q27JStudio13functionvalueFdd();
|
||||
extern "C" void extrapolateParameter_repeat__Q27JStudio13functionvalueFdd();
|
||||
extern "C" void extrapolateParameter_clamp__Q27JStudio13functionvalueFdd();
|
||||
extern "C" JStudio::TFunctionValue_list_parameter::TIterator_data_
|
||||
func_802835DC(JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_, f64 const&);
|
||||
extern "C" void func_80283634(void* _this, JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_, f64 const&,
|
||||
std::less<f64>);
|
||||
extern "C" JStudio::TFunctionValue_hermite::TIterator_data_
|
||||
func_80283858(JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_, f64 const&);
|
||||
extern "C" void func_802838C8(void* _this, JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_, f64 const&,
|
||||
std::less<f64>);
|
||||
extern "C" void __dt__Q27JStudio22TFunctionValue_hermiteFv();
|
||||
extern "C" void __dt__Q27JStudio29TFunctionValue_list_parameterFv();
|
||||
extern "C" void __dt__Q27JStudio19TFunctionValue_listFv();
|
||||
extern "C" void __dt__Q27JStudio25TFunctionValue_transitionFv();
|
||||
extern "C" void __dt__Q27JStudio23TFunctionValue_constantFv();
|
||||
extern "C" void __dt__Q27JStudio24TFunctionValue_compositeFv();
|
||||
extern "C" void func_80283E24(void* _this, JStudio::TFunctionValue_list_parameter::TIterator_data_,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_, f64 const&,
|
||||
std::less<f64>);
|
||||
extern "C" void func_80283EB8(void* _this, JStudio::TFunctionValue_hermite::TIterator_data_,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_, f64 const&,
|
||||
std::less<f64>);
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void func_802DCCD0();
|
||||
extern "C" void __dt__Q27JGadget20TVector_pointer_voidFv();
|
||||
extern "C" void erase__Q27JGadget20TVector_pointer_voidFPPvPPv();
|
||||
extern "C" void __cvt_fp2unsigned();
|
||||
extern "C" void _savefpr_29();
|
||||
extern "C" void _restfpr_29();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C48E0-803C4900 021A00 0020+00 2/2 1/1 0/0 .data __vt__Q27JStudio22TFunctionValue_hermite */
|
||||
SECTION_DATA extern void* __vt__Q27JStudio22TFunctionValue_hermite[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q27JStudio22TFunctionValue_hermiteFv,
|
||||
(void*)getType__Q27JStudio22TFunctionValue_hermiteCFv,
|
||||
(void*)getAttributeSet__Q27JStudio22TFunctionValue_hermiteFv,
|
||||
(void*)initialize__Q27JStudio22TFunctionValue_hermiteFv,
|
||||
(void*)prepare__Q27JStudio22TFunctionValue_hermiteFv,
|
||||
(void*)getValue__Q27JStudio22TFunctionValue_hermiteFd,
|
||||
};
|
||||
|
||||
/* 803C4900-803C4920 021A20 0020+00 2/2 1/1 0/0 .data
|
||||
* __vt__Q27JStudio29TFunctionValue_list_parameter */
|
||||
SECTION_DATA extern void* __vt__Q27JStudio29TFunctionValue_list_parameter[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q27JStudio29TFunctionValue_list_parameterFv,
|
||||
(void*)getType__Q27JStudio29TFunctionValue_list_parameterCFv,
|
||||
(void*)getAttributeSet__Q27JStudio29TFunctionValue_list_parameterFv,
|
||||
(void*)initialize__Q27JStudio29TFunctionValue_list_parameterFv,
|
||||
(void*)prepare__Q27JStudio29TFunctionValue_list_parameterFv,
|
||||
(void*)getValue__Q27JStudio29TFunctionValue_list_parameterFd,
|
||||
};
|
||||
|
||||
/* 803C4920-803C4940 021A40 0020+00 2/2 1/1 0/0 .data __vt__Q27JStudio19TFunctionValue_list */
|
||||
SECTION_DATA extern void* __vt__Q27JStudio19TFunctionValue_list[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q27JStudio19TFunctionValue_listFv,
|
||||
(void*)getType__Q27JStudio19TFunctionValue_listCFv,
|
||||
(void*)getAttributeSet__Q27JStudio19TFunctionValue_listFv,
|
||||
(void*)initialize__Q27JStudio19TFunctionValue_listFv,
|
||||
(void*)prepare__Q27JStudio19TFunctionValue_listFv,
|
||||
(void*)getValue__Q27JStudio19TFunctionValue_listFd,
|
||||
};
|
||||
|
||||
/* 803C4940-803C4960 021A60 0020+00 2/2 1/1 0/0 .data __vt__Q27JStudio25TFunctionValue_transition
|
||||
*/
|
||||
SECTION_DATA extern void* __vt__Q27JStudio25TFunctionValue_transition[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q27JStudio25TFunctionValue_transitionFv,
|
||||
(void*)getType__Q27JStudio25TFunctionValue_transitionCFv,
|
||||
(void*)getAttributeSet__Q27JStudio25TFunctionValue_transitionFv,
|
||||
(void*)initialize__Q27JStudio25TFunctionValue_transitionFv,
|
||||
(void*)prepare__Q27JStudio25TFunctionValue_transitionFv,
|
||||
(void*)getValue__Q27JStudio25TFunctionValue_transitionFd,
|
||||
};
|
||||
|
||||
/* 803C4960-803C4980 021A80 0020+00 2/2 1/1 0/0 .data __vt__Q27JStudio23TFunctionValue_constant */
|
||||
SECTION_DATA extern void* __vt__Q27JStudio23TFunctionValue_constant[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q27JStudio23TFunctionValue_constantFv,
|
||||
(void*)getType__Q27JStudio23TFunctionValue_constantCFv,
|
||||
(void*)getAttributeSet__Q27JStudio23TFunctionValue_constantFv,
|
||||
(void*)initialize__Q27JStudio23TFunctionValue_constantFv,
|
||||
(void*)prepare__Q27JStudio23TFunctionValue_constantFv,
|
||||
(void*)getValue__Q27JStudio23TFunctionValue_constantFd,
|
||||
};
|
||||
|
||||
/* 803C4980-803C49A0 021AA0 0020+00 2/2 1/1 0/0 .data __vt__Q27JStudio24TFunctionValue_composite
|
||||
*/
|
||||
SECTION_DATA extern void* __vt__Q27JStudio24TFunctionValue_composite[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q27JStudio24TFunctionValue_compositeFv,
|
||||
(void*)getType__Q27JStudio24TFunctionValue_compositeCFv,
|
||||
(void*)getAttributeSet__Q27JStudio24TFunctionValue_compositeFv,
|
||||
(void*)initialize__Q27JStudio24TFunctionValue_compositeFv,
|
||||
(void*)prepare__Q27JStudio24TFunctionValue_compositeFv,
|
||||
(void*)getValue__Q27JStudio24TFunctionValue_compositeFd,
|
||||
};
|
||||
|
||||
/* 803C49A0-803C49C0 021AC0 0020+00 2/2 0/0 0/0 .data __vt__Q27JStudio14TFunctionValue */
|
||||
SECTION_DATA extern void* __vt__Q27JStudio14TFunctionValue[8] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
};
|
||||
|
||||
// /* ##############################################################################################
|
||||
// */
|
||||
// /* 80455400-80455408 003A00 0008+00 13/13 0/0 0/0 .sdata2 @652 */
|
||||
SECTION_SDATA2 static u8 lit_652[8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 80455408-80455410 003A08 0008+00 5/5 0/0 0/0 .sdata2 @792 */
|
||||
SECTION_SDATA2 static f64 lit_792 = 1.0;
|
||||
|
||||
/* 80455410-80455418 003A10 0008+00 1/1 0/0 0/0 .sdata2 @793 */
|
||||
SECTION_SDATA2 static f64 lit_793 = 3.0;
|
||||
|
||||
/* 80455418-80455420 003A18 0008+00 1/1 0/0 0/0 .sdata2 @794 */
|
||||
SECTION_SDATA2 static f64 lit_794 = -2.0;
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455420-80455428 003A20 0008+00 1/1 0/0 0/0 .sdata2 @799 */
|
||||
SECTION_SDATA2 static f64 lit_799 = 1.0 / 6.0;
|
||||
|
||||
/* 80455428-80455430 003A28 0008+00 5/5 0/0 0/0 .sdata2 @800 */
|
||||
SECTION_SDATA2 static f64 lit_800 = 0.5;
|
||||
|
||||
/* 80455430-80455438 003A30 0008+00 1/1 0/0 0/0 .sdata2 @801 */
|
||||
SECTION_SDATA2 static f64 lit_801 = 2.0 / 3.0;
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455438-80455440 003A38 0008+00 3/3 0/0 0/0 .sdata2 @842 */
|
||||
SECTION_SDATA2 static f64 lit_842 = 2.0;
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455440-80455448 003A40 0008+00 1/1 0/0 0/0 .sdata2 @867 */
|
||||
SECTION_SDATA2 static f64 lit_867 = -1.0;
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804511E8-804511F0 0006E8 0001+07 1/1 0/0 0/0 .sbss @569 */
|
||||
static u8 lit_569[1 + 7 /* padding */];
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455448-80455450 003A48 0008+00 1/1 0/0 0/0 .sdata2 @1517 */
|
||||
SECTION_SDATA2 static f64 lit_1517 = 4503599627370496.0 /* cast u32 to float */;
|
||||
|
||||
namespace JStudio {
|
||||
|
||||
@@ -342,7 +38,7 @@ const ExtrapolateParameter gapfnExtrapolateParameter_[4] = {
|
||||
functionvalue::extrapolateParameter_clamp,
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
||||
ExtrapolateParameter TFunctionValue::toFunction_outside(int idx) {
|
||||
ExtrapolateParameter fallback = NULL;
|
||||
@@ -364,10 +60,17 @@ ExtrapolateParameter TFunctionValue::toFunction_outside(int idx) {
|
||||
TFunctionValue::TFunctionValue() {}
|
||||
TFunctionValue::~TFunctionValue() {}
|
||||
|
||||
TFunctionValueAttribute_refer::TFunctionValueAttribute_refer() :
|
||||
JGadget::TVector_pointer<TFunctionValue*>(JGadget::TAllocator<void*>()) {}
|
||||
|
||||
void TFunctionValueAttribute_refer::refer_initialize() {
|
||||
clear();
|
||||
}
|
||||
|
||||
static f64 dummy_literal1() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
namespace functionvalue {
|
||||
|
||||
/* 80281710-80281774 27C050 0064+00 4/4 0/0 0/0 .text
|
||||
@@ -392,33 +95,49 @@ f64 interpolateValue_hermite(f64 c0, f64 c1, f64 x, f64 c2, f64 x2, f64 c3, f64
|
||||
|
||||
/* 80281774-802817D8 27C0B4 0064+00 1/1 0/0 0/0 .text
|
||||
* interpolateValue_BSpline_uniform__Q27JStudio13functionvalueFddddd */
|
||||
// NONMATCHING - really minor regalloc.
|
||||
f64 interpolateValue_BSpline_uniform(f64 f1, f64 f2, f64 f3, f64 f4, f64 f5) {
|
||||
// pow3(1.0 - f1)
|
||||
f64 f6 = (1.0 - f1);
|
||||
f64 temp = f6;
|
||||
temp = (f6 * f6) * temp;
|
||||
f64 f6 = (1.0 - f1) * (1.0 - f1);
|
||||
f64 f9 = f6 * (1.0 - f1);
|
||||
|
||||
f64 f0 = f1 * f1;
|
||||
f64 f8 = f0 * f1;
|
||||
|
||||
f64 temp2 = (0.5 + (1.0 / 6.0) * ((f1 + f0) - f8));
|
||||
f64 temp3 = temp2 * f4;
|
||||
f64 temp = f9;
|
||||
f64 temp3 = ((0.5 * f8 - f0) + (2.0 / 3.0));
|
||||
f64 temp2 = ((1.0 / 6.0) + 0.5 * ((f1 + f0) - f8));
|
||||
|
||||
f64 temp4 = (((1.0 / 6.0) * f8 - f0) + (2.0 / 3.0));
|
||||
f64 temp5 = temp4 * f3;
|
||||
|
||||
return temp5 + (temp * f2 + f8 * f5) * 0.5 +
|
||||
temp3;
|
||||
return temp3 * f3 + (temp * f2 + f8 * f5) * (1.0 / 6.0) + temp2 * f4;
|
||||
}
|
||||
|
||||
/* 802817D8-802818B8 27C118 00E0+00 1/1 0/0 0/0 .text
|
||||
* interpolateValue_BSpline_nonuniform__Q27JStudio13functionvalueFdPCdPCd */
|
||||
f64 interpolateValue_BSpline_nonuniform(f64 param_0, f64 const* param_1, f64 const* param_2) {
|
||||
// NONMATCHING
|
||||
f64 interpolateValue_BSpline_nonuniform(f64 f, f64 const* p1, f64 const* p2) {
|
||||
f64 f0 = p2[0];
|
||||
f64 f1 = p2[1];
|
||||
f64 f2 = p2[2];
|
||||
f64 f3 = p2[3];
|
||||
f64 f4 = p2[4];
|
||||
f64 f5 = p2[5];
|
||||
f64 a0 = f - f0;
|
||||
f64 a1 = f - f1;
|
||||
f64 a2 = f - f2;
|
||||
f64 a3 = f3 - f;
|
||||
f64 a4 = f4 - f;
|
||||
f64 a5 = f5 - f;
|
||||
f64 t0 = 1.0 / (f3 - f2);
|
||||
f64 t1 = (a3 * t0) / (f3 - f1);
|
||||
f64 t2 = (a2 * t0) / (f4 - f2);
|
||||
f64 t3 = (a3 * t1) / (f3 - f0);
|
||||
f64 t4 = (a1 * t1 + a4 * t2) / (f4 - f1);
|
||||
f64 t5 = (a2 * t2) / (f5 - f2);
|
||||
f64 coeff0 = a3 * t3;
|
||||
f64 coeff1 = a0 * t3 + a4 * t4;
|
||||
f64 coeff2 = a1 * t4 + a5 * t5;
|
||||
f64 coeff3 = a2 * t5;
|
||||
return coeff0 * p1[0] + coeff1 * p1[1] + coeff2 * p1[2] + coeff3 * p1[3];
|
||||
}
|
||||
|
||||
inline f64 interpolateValue_linear(double a1, double a2, double a3, double a4, double a5) {
|
||||
inline f64 interpolateValue_linear(f64 a1, f64 a2, f64 a3, f64 a4, f64 a5) {
|
||||
return a3 + ((a5 - a3) * (a1 - a2)) / (a4 - a2);
|
||||
}
|
||||
|
||||
@@ -441,11 +160,10 @@ f64 extrapolateParameter_turn(f64 param_0, f64 param_1) {
|
||||
return dVar1;
|
||||
}
|
||||
|
||||
|
||||
} // namespace functionvalue
|
||||
|
||||
void TFunctionValueAttribute_range::range_initialize() {
|
||||
fBegin_ = NAN; // NaN
|
||||
fBegin_ = NAN;
|
||||
fEnd_ = fBegin_;
|
||||
fDifference_ = fBegin_;
|
||||
|
||||
@@ -462,24 +180,24 @@ void TFunctionValueAttribute_range::range_prepare() {
|
||||
JUTWarn w;
|
||||
w << "unknown progress : " << progress;
|
||||
case 0:
|
||||
_20 = DOUBLE_LABEL(/* 0.0 */ lit_652);
|
||||
_28 = DOUBLE_LABEL(/* 1.0 */ lit_792);
|
||||
_20 = 0.0;
|
||||
_28 = 1.0;
|
||||
break;
|
||||
case 1:
|
||||
_20 = DOUBLE_LABEL(/* 0.0 */ lit_652);
|
||||
_28 = DOUBLE_LABEL(/*-1.0 */ lit_867);
|
||||
_20 = 0.0;
|
||||
_28 = -1.0;
|
||||
break;
|
||||
case 2:
|
||||
_20 = fBegin_;
|
||||
_28 = DOUBLE_LABEL(/*-1.0 */ lit_867);
|
||||
_28 = -1.0;
|
||||
break;
|
||||
case 3:
|
||||
_20 = fEnd_;
|
||||
_28 = DOUBLE_LABEL(/*-1.0 */ lit_867);
|
||||
_28 = -1.0;
|
||||
break;
|
||||
case 4:
|
||||
_20 = DOUBLE_LABEL(/* 0.5 */ lit_800) * (fBegin_ + fEnd_);
|
||||
_28 = DOUBLE_LABEL(/*-1.0 */ lit_867);
|
||||
_20 = 0.5 * (fBegin_ + fEnd_);
|
||||
_28 = -1.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -514,7 +232,7 @@ f64 TFunctionValueAttribute_range::range_getParameter(f64 arg1, f64 arg2, f64 ar
|
||||
result = range_getParameter_outside(progress + fEnd_);
|
||||
break;
|
||||
case 3:
|
||||
result = range_getParameter_outside(progress + lit_800 * (fBegin_ + fEnd_));
|
||||
result = range_getParameter_outside(progress + 0.5 * (fBegin_ + fEnd_));
|
||||
break;
|
||||
case 4:
|
||||
f64 temp = range_getParameter_outside(progress);
|
||||
@@ -532,7 +250,6 @@ TFunctionValueAttribute_range::TFunctionValueAttribute_range()
|
||||
|
||||
/* 80281D5C-80281DB8 27C69C 005C+00 0/0 1/1 0/0 .text __ct__Q27JStudio24TFunctionValue_compositeFv
|
||||
*/
|
||||
|
||||
TFunctionValue_composite::TFunctionValue_composite() : pfn_(NULL), data((void*)NULL) {
|
||||
}
|
||||
|
||||
@@ -783,7 +500,6 @@ void TFunctionValue_transition::prepare() {
|
||||
|
||||
/* 802824F4-802826BC 27CE34 01C8+00 1/0 0/0 0/0 .text
|
||||
* getValue__Q27JStudio25TFunctionValue_transitionFd */
|
||||
// NONMATCHING - regalloc. Maybe return value related.
|
||||
f64 TFunctionValue_transition::getValue(f64 param_1) {
|
||||
f64 progress = range_getParameter_progress(param_1);
|
||||
f64 dVar3 = range_getParameter_outside(progress);
|
||||
@@ -819,6 +535,8 @@ f64 TFunctionValue_transition::getValue(f64 param_1) {
|
||||
return _48 + ((dVar3 - range_getBegin()) * data_getDifference()) / range_getDifference();
|
||||
case 2:
|
||||
return functionvalue::interpolateValue_plateau(dVar3, range_getBegin(), _48, range_getEnd(), _50);
|
||||
default:
|
||||
goto ADJ_UNK3_label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1037,9 +755,7 @@ f64 TFunctionValue_list_parameter::getValue(f64 param_0) {
|
||||
param_0 = range_getParameter(param_0, data_getValue_front(), data_getValue_back());
|
||||
JUT_ASSERT(1395, pfData_!=0)
|
||||
|
||||
// TODO: change to actual function
|
||||
//dat3 = JGadget::findUpperBound_binary_current(dat1, dat2, dat3, &pfData_);
|
||||
dat3 = func_802835DC(dat1, dat2, dat3, param_0);
|
||||
dat3 = JGadget::findUpperBound_binary_current(dat1, dat2, dat3, param_0);
|
||||
if (dat3 == dat1) {
|
||||
return dat3.get()[1];
|
||||
}
|
||||
@@ -1153,7 +869,7 @@ f64 TFunctionValue_list_parameter::update_INTERPOLATE_BSPLINE_dataMore3_(
|
||||
}
|
||||
break;
|
||||
}
|
||||
functionvalue::interpolateValue_BSpline_nonuniform(param_2, (f64*)&local_68, (f64*)&local_48);
|
||||
return functionvalue::interpolateValue_BSpline_nonuniform(param_2, local_68, local_48);
|
||||
}
|
||||
|
||||
|
||||
@@ -1203,9 +919,7 @@ void TFunctionValue_hermite::prepare() {
|
||||
f64 TFunctionValue_hermite::getValue(f64 pfData_) {
|
||||
pfData_ = range_getParameter(pfData_, data_getValue_front(), data_getValue_back());
|
||||
JUT_ASSERT(1395, pfData_!=0)
|
||||
// TODO: change to actual function
|
||||
//dat3 = JGadget::findUpperBound_binary_current(dat1, dat2, dat3, &pfData_);
|
||||
dat3 = func_80283858(dat1, dat2, dat3, pfData_);
|
||||
dat3 = JGadget::findUpperBound_binary_current(dat1, dat2, dat3, pfData_);
|
||||
|
||||
if (dat3 == dat1) {
|
||||
return dat3.get()[1];
|
||||
@@ -1235,15 +949,15 @@ f64 extrapolateParameter_raw(f64 a1, f64 a2) {
|
||||
inline f64 extrapolateParameter_repeat(f64 a1, f64 a2) {
|
||||
f64 t = fmod(a1, a2);
|
||||
|
||||
if (t < DOUBLE_LABEL(/* 0.0 */ lit_652))
|
||||
if (t < 0.0)
|
||||
t += a2;
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
f64 extrapolateParameter_clamp(f64 value, f64 max) {
|
||||
if (value <= DOUBLE_LABEL(/* 0.0 */ lit_652))
|
||||
return DOUBLE_LABEL(/* 0.0 */ lit_652);
|
||||
if (value <= 0.0)
|
||||
return 0.0;
|
||||
|
||||
if (max <= value)
|
||||
value = max;
|
||||
@@ -1253,45 +967,3 @@ f64 extrapolateParameter_clamp(f64 value, f64 max) {
|
||||
|
||||
} // namespace functionvalue
|
||||
} // namespace JStudio
|
||||
|
||||
/* 802835DC-80283634 27DF1C 0058+00 1/1 0/0 0/0 .text
|
||||
* findUpperBound_binary_current<Q37JStudio29TFunctionValue_list_parameter15TIterator_data_,d>__7JGadgetFQ37JStudio29TFunctionValue_list_parameter15TIterator_data_Q37JStudio29TFunctionValue_list_parameter15TIterator_data_Q37JStudio29TFunctionValue_list_parameter15TIterator_data_RCd
|
||||
*/
|
||||
extern "C" JStudio::TFunctionValue_list_parameter::TIterator_data_
|
||||
func_802835DC(JStudio::TFunctionValue_list_parameter::TIterator_data_ param_0,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_ param_1,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_ param_2, f64 const& param_3) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80283634-80283858 27DF74 0224+00 1/1 0/0 0/0 .text
|
||||
* findUpperBound_binary_current<Q37JStudio29TFunctionValue_list_parameter15TIterator_data_,d,Q23std7less<d>>__7JGadgetFQ37JStudio29TFunctionValue_list_parameter15TIterator_data_Q37JStudio29TFunctionValue_list_parameter15TIterator_data_Q37JStudio29TFunctionValue_list_parameter15TIterator_data_RCdQ23std7less<d>
|
||||
*/
|
||||
extern "C" void func_80283634(void* _this,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_ param_0,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_ param_1,
|
||||
JStudio::TFunctionValue_list_parameter::TIterator_data_ param_2,
|
||||
f64 const& param_3, std::less<f64> param_4) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 80283858-802838C8 27E198 0070+00 1/1 0/0 0/0 .text
|
||||
* findUpperBound_binary_current<Q37JStudio22TFunctionValue_hermite15TIterator_data_,d>__7JGadgetFQ37JStudio22TFunctionValue_hermite15TIterator_data_Q37JStudio22TFunctionValue_hermite15TIterator_data_Q37JStudio22TFunctionValue_hermite15TIterator_data_RCd
|
||||
*/
|
||||
extern "C" JStudio::TFunctionValue_hermite::TIterator_data_
|
||||
func_80283858(JStudio::TFunctionValue_hermite::TIterator_data_ param_0,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_1,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_2, f64 const& param_3) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 802838C8-80283BC4 27E208 02FC+00 1/1 0/0 0/0 .text
|
||||
* findUpperBound_binary_current<Q37JStudio22TFunctionValue_hermite15TIterator_data_,d,Q23std7less<d>>__7JGadgetFQ37JStudio22TFunctionValue_hermite15TIterator_data_Q37JStudio22TFunctionValue_hermite15TIterator_data_Q37JStudio22TFunctionValue_hermite15TIterator_data_RCdQ23std7less<d>
|
||||
*/
|
||||
extern "C" void func_802838C8(void* _this,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_0,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_1,
|
||||
JStudio::TFunctionValue_hermite::TIterator_data_ param_2,
|
||||
f64 const& param_3, std::less<f64> param_4) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#include "JSystem/JStudio/JStudio/object-id.h"
|
||||
|
||||
namespace JGadget {
|
||||
/* TLinkList<JStudio::fvb::TObject, 12> */
|
||||
struct TLinkList__template1 {
|
||||
struct iterator {};
|
||||
};
|
||||
|
||||
/* TVector_pointer<JStudio::TFunctionValue*> */
|
||||
struct TVector_pointer__template0 {};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
extern "C" void
|
||||
isEqual__Q37JStudio6object7TIDDataFRCQ37JStudio6object7TIDDataRCQ37JStudio6object7TIDData();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_28();
|
||||
|
||||
/* 80285018-802850AC 27F958 0094+00 1/1 0/0 0/0 .text
|
||||
* find_if<Q37JGadget37TLinkList<Q37JStudio3fvb7TObject,-12>8iterator,Q37JStudio6object18TPRObject_ID_equal>__3stdFQ37JGadget37TLinkList<Q37JStudio3fvb7TObject,-12>8iteratorQ37JGadget37TLinkList<Q37JStudio3fvb7TObject,-12>8iteratorQ37JStudio6object18TPRObject_ID_equal
|
||||
*/
|
||||
extern "C" void func_80285018(void* _this, JGadget::TLinkList__template1::iterator param_0,
|
||||
JGadget::TLinkList__template1::iterator param_1,
|
||||
JStudio::object::TPRObject_ID_equal param_2) {
|
||||
// NONMATCHING
|
||||
}
|
||||
@@ -5,304 +5,14 @@
|
||||
|
||||
#include "JSystem/JStudio/JStudio/fvb.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
namespace JGadget {
|
||||
/* TLinkList<JStudio::fvb::TObject, 12> */
|
||||
struct TLinkList__template1 {
|
||||
struct iterator {};
|
||||
};
|
||||
|
||||
/* TVector_pointer<JStudio::TFunctionValue*> */
|
||||
struct TVector_pointer__template0 {};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
namespace std {
|
||||
template <typename A1, typename B1>
|
||||
void find_if(/* ... */);
|
||||
/* 80285018 */ /* std::find_if<JGadget::TLinkList<JStudio::fvb::TObject, 12>::iterator,
|
||||
JStudio::object::TPRObject_ID_equal> */
|
||||
void func_80285018(void* _this, JGadget::TLinkList__template1::iterator,
|
||||
JGadget::TLinkList__template1::iterator, JStudio::object::TPRObject_ID_equal);
|
||||
}; // namespace std
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__Q37JStudio3fvb7TObjectFv();
|
||||
extern "C" void
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl();
|
||||
extern "C" static void func_80284234();
|
||||
extern "C" void __ct__Q37JStudio3fvb17TObject_compositeFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void
|
||||
prepare_data___Q37JStudio3fvb17TObject_compositeFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __ct__Q37JStudio3fvb16TObject_constantFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void
|
||||
prepare_data___Q37JStudio3fvb16TObject_constantFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __ct__Q37JStudio3fvb18TObject_transitionFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void
|
||||
prepare_data___Q37JStudio3fvb18TObject_transitionFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __ct__Q37JStudio3fvb12TObject_listFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void
|
||||
prepare_data___Q37JStudio3fvb12TObject_listFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __ct__Q37JStudio3fvb22TObject_list_parameterFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void
|
||||
prepare_data___Q37JStudio3fvb22TObject_list_parameterFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __ct__Q37JStudio3fvb15TObject_hermiteFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void
|
||||
prepare_data___Q37JStudio3fvb15TObject_hermiteFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __ct__Q37JStudio3fvb8TControlFv();
|
||||
extern "C" void __dt__Q37JStudio3fvb8TControlFv();
|
||||
extern "C" void appendObject__Q37JStudio3fvb8TControlFPQ37JStudio3fvb7TObject();
|
||||
extern "C" void removeObject__Q37JStudio3fvb8TControlFPQ37JStudio3fvb7TObject();
|
||||
extern "C" void destroyObject__Q37JStudio3fvb8TControlFPQ37JStudio3fvb7TObject();
|
||||
extern "C" void destroyObject_all__Q37JStudio3fvb8TControlFv();
|
||||
extern "C" void getObject__Q37JStudio3fvb8TControlFPCvUl();
|
||||
extern "C" void getObject_index__Q37JStudio3fvb8TControlFUl();
|
||||
extern "C" void __dt__Q37JStudio3fvb8TFactoryFv();
|
||||
extern "C" void create__Q37JStudio3fvb8TFactoryFRCQ47JStudio3fvb4data13TParse_TBlock();
|
||||
extern "C" void destroy__Q37JStudio3fvb8TFactoryFPQ37JStudio3fvb7TObject();
|
||||
extern "C" void __ct__Q37JStudio3fvb6TParseFPQ37JStudio3fvb8TControl();
|
||||
extern "C" void __dt__Q37JStudio3fvb6TParseFv();
|
||||
extern "C" void parseHeader_next__Q37JStudio3fvb6TParseFPPCvPUlUl();
|
||||
extern "C" void parseBlock_next__Q37JStudio3fvb6TParseFPPCvPUlUl();
|
||||
extern "C" void __dt__Q37JStudio3fvb15TObject_hermiteFv();
|
||||
extern "C" void __dt__Q37JStudio3fvb22TObject_list_parameterFv();
|
||||
extern "C" void __dt__Q37JStudio3fvb12TObject_listFv();
|
||||
extern "C" void __dt__Q37JStudio3fvb18TObject_transitionFv();
|
||||
extern "C" void __dt__Q37JStudio3fvb16TObject_constantFv();
|
||||
extern "C" void __dt__Q37JStudio3fvb17TObject_compositeFv();
|
||||
extern "C" void func_80285018(void* _this, JGadget::TLinkList__template1::iterator,
|
||||
JGadget::TLinkList__template1::iterator,
|
||||
JStudio::object::TPRObject_ID_equal);
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__Q27JStudio14TFunctionValueFv();
|
||||
extern "C" void range_set__Q27JStudio29TFunctionValueAttribute_rangeFdd();
|
||||
extern "C" void __ct__Q27JStudio24TFunctionValue_compositeFv();
|
||||
extern "C" void func_80281E5C();
|
||||
extern "C" void func_80281EC8();
|
||||
extern "C" void func_8028202C();
|
||||
extern "C" void func_80282094();
|
||||
extern "C" void func_80282118();
|
||||
extern "C" void func_80282200();
|
||||
extern "C" void func_80282284();
|
||||
extern "C" void __ct__Q27JStudio23TFunctionValue_constantFv();
|
||||
extern "C" void __ct__Q27JStudio25TFunctionValue_transitionFv();
|
||||
extern "C" void __ct__Q27JStudio19TFunctionValue_listFv();
|
||||
extern "C" void __ct__Q27JStudio29TFunctionValue_list_parameterFv();
|
||||
extern "C" void data_set__Q27JStudio29TFunctionValue_list_parameterFPCfUl();
|
||||
extern "C" void __ct__Q27JStudio22TFunctionValue_hermiteFv();
|
||||
extern "C" void data_set__Q27JStudio22TFunctionValue_hermiteFPCfUlUl();
|
||||
extern "C" void
|
||||
getData__Q47JStudio3fvb4data17TParse_TParagraphCFPQ57JStudio3fvb4data17TParse_TParagraph5TData();
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __dt__Q37JGadget6binary19TParse_header_blockFv();
|
||||
extern "C" void __dt__Q27JGadget13TNodeLinkListFv();
|
||||
extern "C" void
|
||||
Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode();
|
||||
extern "C" void Erase__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
|
||||
extern "C" void __dt__Q27JGadget20TVector_pointer_voidFv();
|
||||
extern "C" void insert__Q27JGadget20TVector_pointer_voidFPPvRCPv();
|
||||
extern "C" void _savegpr_23();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_23();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" int memcmp(const void*, const void*, u32);
|
||||
extern "C" extern void* __vt__Q37JGadget6binary19TParse_header_block[5];
|
||||
extern "C" extern void* __vt__Q27JStudio22TFunctionValue_hermite[8];
|
||||
extern "C" extern void* __vt__Q27JStudio29TFunctionValue_list_parameter[8];
|
||||
extern "C" extern void* __vt__Q27JStudio19TFunctionValue_list[8];
|
||||
extern "C" extern void* __vt__Q27JStudio25TFunctionValue_transition[8];
|
||||
extern "C" extern void* __vt__Q27JStudio23TFunctionValue_constant[8];
|
||||
extern "C" extern void* __vt__Q27JStudio24TFunctionValue_composite[8];
|
||||
extern "C" f32 ga4cSignature__Q37JStudio3fvb4data[1 + 1 /* padding */];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C49C0-803C4A1C -00001 005C+00 1/1 0/0 0/0 .data @838 */
|
||||
SECTION_DATA static void* lit_838[23] = {
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1F8),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0xA0),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1EC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0xC0),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x128),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x17C),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x198),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1AC),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1C0),
|
||||
(void*)(((char*)
|
||||
prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl) +
|
||||
0x1DC),
|
||||
};
|
||||
|
||||
/* 803C4A1C-803C4A30 021B3C 0014+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb6TParse */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb6TParse[5] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb6TParseFv,
|
||||
(void*)parseHeader_next__Q37JStudio3fvb6TParseFPPCvPUlUl,
|
||||
(void*)parseBlock_next__Q37JStudio3fvb6TParseFPPCvPUlUl,
|
||||
};
|
||||
|
||||
/* 803C4A30-803C4A44 021B50 0014+00 1/1 1/1 0/0 .data __vt__Q37JStudio3fvb8TFactory */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb8TFactory[5] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb8TFactoryFv,
|
||||
(void*)create__Q37JStudio3fvb8TFactoryFRCQ47JStudio3fvb4data13TParse_TBlock,
|
||||
(void*)destroy__Q37JStudio3fvb8TFactoryFPQ37JStudio3fvb7TObject,
|
||||
};
|
||||
|
||||
/* 803C4A44-803C4A50 021B64 000C+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb8TControl */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb8TControl[3] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb8TControlFv,
|
||||
};
|
||||
|
||||
/* 803C4A50-803C4A60 021B70 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb15TObject_hermite */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb15TObject_hermite[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb15TObject_hermiteFv,
|
||||
(void*)
|
||||
prepare_data___Q37JStudio3fvb15TObject_hermiteFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl,
|
||||
};
|
||||
|
||||
/* 803C4A60-803C4A70 021B80 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb22TObject_list_parameter
|
||||
*/
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb22TObject_list_parameter[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb22TObject_list_parameterFv,
|
||||
(void*)
|
||||
prepare_data___Q37JStudio3fvb22TObject_list_parameterFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl,
|
||||
};
|
||||
|
||||
/* 803C4A70-803C4A80 021B90 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb12TObject_list
|
||||
*/
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb12TObject_list[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb12TObject_listFv,
|
||||
(void*)
|
||||
prepare_data___Q37JStudio3fvb12TObject_listFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl,
|
||||
};
|
||||
|
||||
/* 803C4A80-803C4A90 021BA0 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb18TObject_transition */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb18TObject_transition[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb18TObject_transitionFv,
|
||||
(void*)
|
||||
prepare_data___Q37JStudio3fvb18TObject_transitionFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl,
|
||||
};
|
||||
|
||||
/* 803C4A90-803C4AA0 021BB0 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb16TObject_constant */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb16TObject_constant[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb16TObject_constantFv,
|
||||
(void*)
|
||||
prepare_data___Q37JStudio3fvb16TObject_constantFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl,
|
||||
};
|
||||
|
||||
/* 803C4AA0-803C4AB0 021BC0 0010+00 2/2 0/0 0/0 .data __vt__Q37JStudio3fvb17TObject_composite */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb17TObject_composite[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__Q37JStudio3fvb17TObject_compositeFv,
|
||||
(void*)
|
||||
prepare_data___Q37JStudio3fvb17TObject_compositeFRCQ57JStudio3fvb4data17TParse_TParagraph5TDataPQ37JStudio3fvb8TControl,
|
||||
};
|
||||
|
||||
/* 803C4AB0-803C4AC0 021BD0 0010+00 7/7 0/0 0/0 .data __vt__Q37JStudio3fvb7TObject */
|
||||
SECTION_DATA extern void* __vt__Q37JStudio3fvb7TObject[4] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
(void*)NULL,
|
||||
};
|
||||
#include <string.h>
|
||||
|
||||
namespace JStudio {
|
||||
namespace fvb {
|
||||
|
||||
TObject::~TObject() {}
|
||||
|
||||
// NONMATCHING
|
||||
// NONMATCHING regalloc, missing mr, addition order
|
||||
void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
ASSERT(pfv_ != 0);
|
||||
|
||||
@@ -319,8 +29,7 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
const void* pContent = dat.pContent;
|
||||
switch (u32Type) {
|
||||
case 0:
|
||||
pfv_->prepare();
|
||||
return;
|
||||
goto end;
|
||||
case 1:
|
||||
prepare_data_(dat, pControl);
|
||||
break;
|
||||
@@ -334,19 +43,20 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
w << "invalid paragraph";
|
||||
} else {
|
||||
JGadget::TVector_pointer<TFunctionValue*>& rCnt = pfvaRefer->refer_referContainer();
|
||||
data::TParse_TParagraph::TData** pBegin =
|
||||
(data::TParse_TParagraph::TData**)rCnt.pBegin_;
|
||||
// todo: these definitely use a different struct
|
||||
for (data::TParse_TParagraph::TData* i = *pBegin; i != NULL; i = *pBegin) {
|
||||
TObject* pObject = pControl->getObject(pContent, i->u32Size);
|
||||
u32* content = (u32*)pContent;
|
||||
u32 i = content[0];
|
||||
u32* ptr = content + 1;
|
||||
for (; i != 0; ptr++, i--) {
|
||||
u32 size = *ptr;
|
||||
TObject* pObject = pControl->getObject(ptr + 1, size);
|
||||
if (pObject == NULL) {
|
||||
JUTWarn w;
|
||||
w << "object not found by ID";
|
||||
} else {
|
||||
TFunctionValue* const& rfv = pObject->referFunctionValue();
|
||||
TFunctionValue* rfv = pObject->referFunctionValue();
|
||||
rCnt.push_back(rfv);
|
||||
}
|
||||
*pBegin += align_roundUp(i->u32Size, 4);
|
||||
ptr += align_roundUp(size, 4) >> 2;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
@@ -360,18 +70,19 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
w << "invalid paragraph";
|
||||
} else {
|
||||
JGadget::TVector_pointer<TFunctionValue*>& rCnt = pfvaRefer->refer_referContainer();
|
||||
data::TParse_TParagraph::TData** pBegin =
|
||||
(data::TParse_TParagraph::TData**)rCnt.pBegin_;
|
||||
for (data::TParse_TParagraph::TData* i = *pBegin; i != NULL; i = *pBegin) {
|
||||
TObject* pObject = pControl->getObject_index(u32Size);
|
||||
u32* content = (u32*)pContent;
|
||||
u32* ptr = content;
|
||||
u32 i = content[0];
|
||||
for (; ptr++, i != 0; i--) {
|
||||
u32 index = *ptr;
|
||||
TObject* pObject = pControl->getObject_index(index);
|
||||
if (pObject == NULL) {
|
||||
JUTWarn w;
|
||||
w << "object not found by index : " << u32Size;
|
||||
w << "object not found by index : " << index;
|
||||
} else {
|
||||
TFunctionValue* const& rfv = pObject->referFunctionValue();
|
||||
rCnt.push_back(rfv);
|
||||
TFunctionValue& rfv = *pObject->referFunctionValue();
|
||||
rCnt.push_back(&rfv);
|
||||
}
|
||||
*pBegin += align_roundUp(i->u32Size, 4);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
@@ -384,7 +95,7 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
JUTWarn w;
|
||||
w << "invalid paragraph";
|
||||
} else {
|
||||
f64* arr = (f64*)pContent;
|
||||
f32* arr = (f32*)pContent;
|
||||
pfvaRange->range_set(arr[0], arr[1]);
|
||||
}
|
||||
} break;
|
||||
@@ -423,8 +134,9 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
JUTWarn w;
|
||||
w << "invalid paragraph";
|
||||
} else {
|
||||
TFunctionValue::TEOutside* out = (TFunctionValue::TEOutside*)pContent;
|
||||
pfvaRange->range_setOutside(out[0], out[1]);
|
||||
u16* out = (u16*)pContent;
|
||||
pfvaRange->range_setOutside((TFunctionValue::TEOutside)out[0],
|
||||
(TFunctionValue::TEOutside)out[1]);
|
||||
}
|
||||
} break;
|
||||
case 0x16: {
|
||||
@@ -444,11 +156,14 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
|
||||
JUTWarn w;
|
||||
w << "unknown paragraph : " << u32Type;
|
||||
}
|
||||
pData = dat.next;
|
||||
ASSERT(pData != 0);
|
||||
}
|
||||
end:
|
||||
JUT_EXPECT(pData == pNext);
|
||||
pfv_->prepare();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
TFunctionValue_composite::TData getCompositeData_raw_(const void* arg1) {
|
||||
@@ -479,67 +194,52 @@ TFunctionValue_composite::TData getCompositeData_divide_(const void* arg1) {
|
||||
return TFunctionValue_composite::TData(*(f32*)arg1);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
} // namespace fvb
|
||||
} // namespace JStudio
|
||||
|
||||
using namespace JStudio::fvb;
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8039AA00-8039AA40 -00001 0040+00 1/1 0/0 0/0 .rodata
|
||||
* saCompositeOperation___Q37JStudio3fvb17@unnamed@fvb_cpp@ */
|
||||
SECTION_RODATA static void* const data_8039AA00[16] = {
|
||||
(void*)NULL, (void*)NULL,
|
||||
(void*)func_80281E5C, (void*)getCompositeData_raw_,
|
||||
(void*)func_80281EC8, (void*)getCompositeData_index_,
|
||||
(void*)func_8028202C, (void*)getCompositeData_parameter_,
|
||||
(void*)func_80282094, (void*)getCompositeData_add_,
|
||||
(void*)func_80282118, (void*)getCompositeData_subtract_,
|
||||
(void*)func_80282200, (void*)getCompositeData_multiply_,
|
||||
(void*)func_80282284, (void*)getCompositeData_divide_,
|
||||
const data::CompositeOperation saCompositeOperation_[8] = {
|
||||
{NULL, NULL},
|
||||
{&TFunctionValue_composite::composite_raw, &getCompositeData_raw_},
|
||||
{&TFunctionValue_composite::composite_index, &getCompositeData_index_},
|
||||
{&TFunctionValue_composite::composite_parameter, &getCompositeData_parameter_},
|
||||
{&TFunctionValue_composite::composite_add, &getCompositeData_add_},
|
||||
{&TFunctionValue_composite::composite_subtract, &getCompositeData_subtract_},
|
||||
{&TFunctionValue_composite::composite_multiply, &getCompositeData_multiply_},
|
||||
{&TFunctionValue_composite::composite_divide, &getCompositeData_divide_},
|
||||
};
|
||||
|
||||
/* 80284240-80284254 27EB80 0014+00 1/1 0/0 0/0 .text
|
||||
* getCompositeOperation___Q37JStudio3fvb17@unnamed@fvb_cpp@FQ47JStudio3fvb4data11TEComposite */
|
||||
static data::CompositeOperation* func_80284240(data::TEComposite comp) {
|
||||
// NONMATCHING
|
||||
static const data::CompositeOperation* getCompositeOperation_(data::TEComposite comp) {
|
||||
return &saCompositeOperation_[comp];
|
||||
}
|
||||
|
||||
namespace JStudio {
|
||||
namespace fvb {
|
||||
} // namespace
|
||||
|
||||
/* 80284254-802842D4 27EB94 0080+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3fvb17TObject_compositeFRCQ47JStudio3fvb4data13TParse_TBlock */
|
||||
// NONMATCHING
|
||||
// TObject_composite::TObject_composite(const data::TParse_TBlock& block) : TObject(block, &fnValue) {}
|
||||
TObject_composite::TObject_composite(const data::TParse_TBlock& block) : TObject(block, &fnValue) {}
|
||||
|
||||
// NONMATCHING - incomplete
|
||||
/* void TObject_composite::prepare_data_(const data::TParse_TParagraph::TData& rData,
|
||||
void TObject_composite::prepare_data_(const data::TParse_TParagraph::TData& rData,
|
||||
TControl* control) {
|
||||
ASSERT(rData.u32Type == data::PARAGRAPH_DATA);
|
||||
|
||||
u32 u32Size = rData.u32Size;
|
||||
JUT_EXPECT(u32Size == 8);
|
||||
|
||||
const TFunctionValue_composite* pContent =
|
||||
static_cast<const TFunctionValue_composite*>(rData.pContent);
|
||||
struct unknown {
|
||||
data::TEComposite composite_type;
|
||||
u32 data;
|
||||
};
|
||||
|
||||
const unknown* pContent = static_cast<const unknown*>(rData.pContent);
|
||||
ASSERT(pContent != NULL);
|
||||
|
||||
data::CompositeOperation* ops = func_80284240(*(data::TEComposite*)pContent);
|
||||
data::CompositeOperation pfn = ops[1];
|
||||
|
||||
ASSERT(pfn != NULL);
|
||||
|
||||
pfn(pContent->data);
|
||||
fnValue.data_set((TFunctionValue_composite::CompositeFunc)*ops, pContent->data);
|
||||
} */
|
||||
const data::CompositeOperation* op = getCompositeOperation_(pContent->composite_type);
|
||||
fnValue.data_set(op->composite, op->getCompositeData(&pContent->data));
|
||||
}
|
||||
|
||||
/* 80284338-802843B8 27EC78 0080+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3fvb16TObject_constantFRCQ47JStudio3fvb4data13TParse_TBlock */
|
||||
/* TObject_constant::TObject_constant(data::TParse_TBlock const& param_0) {
|
||||
// NONMATCHING
|
||||
} */
|
||||
TObject_constant::TObject_constant(data::TParse_TBlock const& param_0)
|
||||
: TObject(param_0, &fnValue) {}
|
||||
|
||||
void TObject_constant::prepare_data_(const data::TParse_TParagraph::TData& rData,
|
||||
TControl* control) {
|
||||
@@ -556,9 +256,8 @@ void TObject_constant::prepare_data_(const data::TParse_TParagraph::TData& rData
|
||||
|
||||
/* 802843C8-80284448 27ED08 0080+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3fvb18TObject_transitionFRCQ47JStudio3fvb4data13TParse_TBlock */
|
||||
/* TObject_transition::TObject_transition(data::TParse_TBlock const& param_0) {
|
||||
// NONMATCHING
|
||||
} */
|
||||
TObject_transition::TObject_transition(data::TParse_TBlock const& param_0)
|
||||
: TObject(param_0, &fnValue) {}
|
||||
|
||||
void TObject_transition::prepare_data_(const data::TParse_TParagraph::TData& rData,
|
||||
TControl* control) {
|
||||
@@ -575,9 +274,7 @@ void TObject_transition::prepare_data_(const data::TParse_TParagraph::TData& rDa
|
||||
|
||||
/* 80284460-802844E0 27EDA0 0080+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3fvb12TObject_listFRCQ47JStudio3fvb4data13TParse_TBlock */
|
||||
/* TObject_list::TObject_list(data::TParse_TBlock const& param_0) {
|
||||
// NONMATCHING
|
||||
} */
|
||||
TObject_list::TObject_list(data::TParse_TBlock const& param_0) : TObject(param_0, &fnValue) {}
|
||||
|
||||
void TObject_list::prepare_data_(const data::TParse_TParagraph::TData& rData, TControl* control) {
|
||||
ASSERT(rData.u32Type == data::PARAGRAPH_DATA);
|
||||
@@ -594,9 +291,8 @@ void TObject_list::prepare_data_(const data::TParse_TParagraph::TData& rData, TC
|
||||
|
||||
/* 80284500-80284580 27EE40 0080+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3fvb22TObject_list_parameterFRCQ47JStudio3fvb4data13TParse_TBlock */
|
||||
/* TObject_list_parameter::TObject_list_parameter(data::TParse_TBlock const& param_0) {
|
||||
// NONMATCHING
|
||||
} */
|
||||
TObject_list_parameter::TObject_list_parameter(data::TParse_TBlock const& param_0)
|
||||
: TObject(param_0, &fnValue) {}
|
||||
|
||||
void TObject_list_parameter::prepare_data_(const data::TParse_TParagraph::TData& rData,
|
||||
TControl* control) {
|
||||
@@ -613,9 +309,7 @@ void TObject_list_parameter::prepare_data_(const data::TParse_TParagraph::TData&
|
||||
|
||||
/* 802845B0-80284630 27EEF0 0080+00 1/1 0/0 0/0 .text
|
||||
* __ct__Q37JStudio3fvb15TObject_hermiteFRCQ47JStudio3fvb4data13TParse_TBlock */
|
||||
/* TObject_hermite::TObject_hermite(data::TParse_TBlock const& param_0) {
|
||||
// NONMATCHING
|
||||
} */
|
||||
TObject_hermite::TObject_hermite(data::TParse_TBlock const& param_0) : TObject(param_0, &fnValue) {}
|
||||
|
||||
void TObject_hermite::prepare_data_(const data::TParse_TParagraph::TData& rData,
|
||||
TControl* control) {
|
||||
@@ -638,37 +332,50 @@ TControl::~TControl() {
|
||||
|
||||
/* 80284704-80284750 27F044 004C+00 1/1 0/0 0/0 .text
|
||||
* appendObject__Q37JStudio3fvb8TControlFPQ37JStudio3fvb7TObject */
|
||||
void TControl::appendObject(TObject* param_0) {
|
||||
// NONMATCHING
|
||||
void TControl::appendObject(TObject* object) {
|
||||
ocObject_.Push_back(object);
|
||||
}
|
||||
|
||||
/* 80284750-80284780 27F090 0030+00 1/1 0/0 0/0 .text
|
||||
* removeObject__Q37JStudio3fvb8TControlFPQ37JStudio3fvb7TObject */
|
||||
void TControl::removeObject(TObject* param_0) {
|
||||
// NONMATCHING
|
||||
void TControl::removeObject(TObject* object) {
|
||||
ocObject_.Erase(object);
|
||||
}
|
||||
|
||||
/* 80284780-802847D0 27F0C0 0050+00 1/1 0/0 0/0 .text
|
||||
* destroyObject__Q37JStudio3fvb8TControlFPQ37JStudio3fvb7TObject */
|
||||
void TControl::destroyObject(TObject* param_0) {
|
||||
// NONMATCHING
|
||||
void TControl::destroyObject(TObject* object) {
|
||||
removeObject(object);
|
||||
getFactory()->destroy(object);
|
||||
}
|
||||
|
||||
/* 802847D0-80284834 27F110 0064+00 0/0 2/2 0/0 .text destroyObject_all__Q37JStudio3fvb8TControlFv
|
||||
*/
|
||||
void TControl::destroyObject_all() {
|
||||
// NONMATCHING
|
||||
while (!ocObject_.empty()) {
|
||||
destroyObject(&ocObject_.back());
|
||||
}
|
||||
}
|
||||
|
||||
/* 80284834-802848D4 27F174 00A0+00 2/2 1/1 0/0 .text getObject__Q37JStudio3fvb8TControlFPCvUl */
|
||||
TObject* TControl::getObject(void const* param_0, u32 param_1) {
|
||||
// NONMATCHING
|
||||
TObject* TControl::getObject(void const* id, u32 idSize) {
|
||||
typedef JGadget::TLinkList<TObject, -12>::iterator iterator;
|
||||
iterator begin = ocObject_.begin();
|
||||
iterator end = ocObject_.end();
|
||||
iterator it = std::find_if(begin, end, object::TPRObject_ID_equal(id, idSize));
|
||||
return it != end ? &*it : NULL;
|
||||
}
|
||||
|
||||
/* 802848D4-80284918 27F214 0044+00 1/1 1/1 0/0 .text getObject_index__Q37JStudio3fvb8TControlFUl
|
||||
*/
|
||||
TObject* TControl::getObject_index(u32 param_0) {
|
||||
// NONMATCHING
|
||||
TObject* TControl::getObject_index(u32 index) {
|
||||
if (index >= ocObject_.size()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JGadget::TLinkList<TObject, -12>::iterator it = ocObject_.begin();
|
||||
std::advance(it, index);
|
||||
return &*it;
|
||||
}
|
||||
|
||||
TFactory::~TFactory() {}
|
||||
|
||||
@@ -5,55 +5,17 @@
|
||||
|
||||
#include "JSystem/JStudio/JStudio/jstudio-math.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/TPosition3.hh"
|
||||
#include "dol2asm.h"
|
||||
#include "JSystem/TPosition3.h"
|
||||
#include "math.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void getRotation_xyz__Q27JStudio4mathFPA4_ffff();
|
||||
extern "C" void getTransformation_SRxyzT__Q27JStudio4mathFPA4_fRC3VecRC3VecRC3Vec();
|
||||
extern "C" void getFromTransformation_SRxyzT__Q27JStudio4mathFP3VecP3VecP3VecPA4_Cf();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455468-8045546C 003A68 0004+00 1/1 0/0 0/0 .sdata2 @488 */
|
||||
SECTION_SDATA2 static f32 lit_488 = 0.01745329238474369f;
|
||||
|
||||
/* 8045546C-80455470 003A6C 0004+00 2/2 0/0 0/0 .sdata2 @489 */
|
||||
SECTION_SDATA2 static u8 lit_489[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 802859DC-80285B44 28031C 0168+00 1/1 0/0 0/0 .text getRotation_xyz__Q27JStudio4mathFPA4_ffff */
|
||||
// NONMATCHING - regalloc
|
||||
void JStudio::math::getRotation_xyz(MtxP param_1, f32 x, f32 y, f32 z) {
|
||||
x = DEG_TO_RAD(x);
|
||||
f32 cosx = cos(x);
|
||||
f32 sinx = sin(x);
|
||||
y = DEG_TO_RAD(y);
|
||||
f32 cosy = cos(y);
|
||||
f32 siny = sin(y);
|
||||
z = DEG_TO_RAD(z);
|
||||
f32 cosz = cos(z);
|
||||
f32 sinz = sin(z);
|
||||
f32 cosx = i_cosf(DEG_TO_RAD(x));
|
||||
f32 sinx = i_sinf(DEG_TO_RAD(x));
|
||||
f32 cosy = i_cosf(DEG_TO_RAD(y));
|
||||
f32 siny = i_sinf(DEG_TO_RAD(y));
|
||||
f32 cosz = i_cosf(DEG_TO_RAD(z));
|
||||
f32 sinz = i_sinf(DEG_TO_RAD(z));
|
||||
f32 cosxcosz = cosx * cosz;
|
||||
f32 cosxsinz = cosx * sinz;
|
||||
f32 sinxcosz = sinx * cosz;
|
||||
@@ -84,38 +46,12 @@ void JStudio::math::getTransformation_SRxyzT(MtxP param_1, Vec const& param_2, V
|
||||
MTXTransApply(amStack_70, param_1, param_4.x, param_4.y, param_4.z);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80455470-80455478 003A70 0008+00 1/1 0/0 0/0 .sdata2 @623 */
|
||||
SECTION_SDATA2 static u8 lit_623[8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 80455478-80455480 003A78 0008+00 1/1 0/0 0/0 .sdata2 @624 */
|
||||
SECTION_SDATA2 static f64 lit_624 = 1.0;
|
||||
|
||||
/* 80455480-80455488 003A80 0004+04 1/1 0/0 0/0 .sdata2 @625 */
|
||||
SECTION_SDATA2 static f32 lit_625[1 + 1 /* padding */] = {
|
||||
32.0f,
|
||||
/* padding */
|
||||
0.0f,
|
||||
};
|
||||
|
||||
/* 80455488-80455490 003A88 0008+00 1/1 0/0 0/0 .sdata2 @626 */
|
||||
SECTION_SDATA2 static f64 lit_626 = -1.5707963267948966;
|
||||
|
||||
/* 80455490-80455498 003A90 0008+00 1/1 0/0 0/0 .sdata2 @627 */
|
||||
SECTION_SDATA2 static f64 lit_627 = 1.5707963267948966;
|
||||
|
||||
/* 80455498-804554A0 003A98 0008+00 1/1 0/0 0/0 .sdata2 @628 */
|
||||
SECTION_SDATA2 static f64 lit_628 = 57.29577951308232;
|
||||
|
||||
/* 80285BCC-80285E0C 28050C 0240+00 0/0 2/2 0/0 .text
|
||||
* getFromTransformation_SRxyzT__Q27JStudio4mathFP3VecP3VecP3VecPA4_Cf */
|
||||
// NONMATCHING - getEulerXYZ is not inlined
|
||||
void JStudio::math::getFromTransformation_SRxyzT(Vec* param_1, Vec* param_2, Vec* param_3,
|
||||
CMtxP param_4) {
|
||||
getFromTransformation_S(param_4, param_1);
|
||||
getFromTransformation_T(param_4, param_3);
|
||||
getFromTransformation_S(param_1, param_4);
|
||||
getFromTransformation_T(param_3, param_4);
|
||||
JGeometry::TRotation3<JGeometry::SMatrix33C<double> > aTStack_88;
|
||||
JGeometry::TVec3<double> local_a0;
|
||||
double dVar9 = 0.0;
|
||||
@@ -130,10 +66,9 @@ void JStudio::math::getFromTransformation_SRxyzT(Vec* param_1, Vec* param_2, Vec
|
||||
if (0.0f != param_1->z) {
|
||||
dVar7 = 1.0 / param_1->z;
|
||||
}
|
||||
aTStack_88.set( param_4[0][0] * dVar9,
|
||||
param_4[0][1] * dVar8, param_4[0][2] * dVar7, param_4[1][0] * dVar9,
|
||||
param_4[1][2] * dVar8, param_4[1][3] * dVar7, param_4[2][0] * dVar9,
|
||||
param_4[2][1] * dVar8, param_4[2][2] * dVar7);
|
||||
aTStack_88.set(param_4[0][0] * dVar9, param_4[0][1] * dVar8, param_4[0][2] * dVar7,
|
||||
param_4[1][0] * dVar9, param_4[1][1] * dVar8, param_4[1][2] * dVar7,
|
||||
param_4[2][0] * dVar9, param_4[2][1] * dVar8, param_4[2][2] * dVar7);
|
||||
aTStack_88.getEulerXYZ(&local_a0);
|
||||
local_a0 *= 57.29577951308232;
|
||||
param_2->x = local_a0.x;
|
||||
|
||||
@@ -1666,7 +1666,7 @@ static u8 data_80431038[16];
|
||||
|
||||
/* 804511F0-804511F8 0006F0 0004+04 6/6 6/6 0/0 .sbss soOutput_none___Q27JStudio14TVariableValue
|
||||
*/
|
||||
u8 JStudio::TVariableValue::soOutput_none_[4 + 4 /* padding */];
|
||||
JStudio::TVariableValue::TOutput_none_ JStudio::TVariableValue::soOutput_none_;
|
||||
|
||||
/* 8028694C-80286C9C 28128C 0350+00 2/0 0/0 0/0 .text
|
||||
* do_paragraph__Q27JStudio13TObject_actorFUlPCvUl */
|
||||
|
||||
@@ -1,48 +1,8 @@
|
||||
#include "JSystem/JStudio/JStudio/stb.h"
|
||||
#include "JSystem/JStudio/JStudio/jstudio-object.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "algorithm.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
namespace std {
|
||||
|
||||
/* 80289928 */ /* std::find_if<JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator,
|
||||
JStudio::object::TPRObject_ID_equal> */
|
||||
void func_80289928(void* _this, JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator,
|
||||
JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator,
|
||||
JStudio::object::TPRObject_ID_equal);
|
||||
}; // namespace std
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void reset__Q37JStudio3stb7TObjectFPCv();
|
||||
extern "C" void forward__Q37JStudio3stb7TObjectFUl();
|
||||
extern "C" void destroyObject__Q37JStudio3stb8TControlFPQ37JStudio3stb7TObject();
|
||||
extern "C" void func_80289928(void* _this, JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator,
|
||||
JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator,
|
||||
JStudio::object::TPRObject_ID_equal);
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void
|
||||
isEqual__Q37JStudio6object7TIDDataFRCQ37JStudio6object7TIDDataRCQ37JStudio6object7TIDData();
|
||||
extern "C" void
|
||||
Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode();
|
||||
extern "C" void Erase__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
|
||||
extern "C" void _savegpr_25();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_25();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" int memcmp(const void*, const void*, u32);
|
||||
#include <algorithm.h>
|
||||
#include <string.h>
|
||||
|
||||
namespace JStudio {
|
||||
namespace stb {
|
||||
@@ -112,8 +72,8 @@ void TObject::reset(const void* arg1) {
|
||||
u32Wait_ = 0;
|
||||
}
|
||||
|
||||
u8 TObject::forward(u32 arg1) {
|
||||
u8 temp = false;
|
||||
bool TObject::forward(u32 arg1) {
|
||||
bool temp = false;
|
||||
|
||||
while (true) {
|
||||
if (mFlag & 0x8000) {
|
||||
@@ -134,7 +94,7 @@ u8 TObject::forward(u32 arg1) {
|
||||
ASSERT(false);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (getStatus() == STATUS_INACTIVE) {
|
||||
@@ -151,7 +111,7 @@ u8 TObject::forward(u32 arg1) {
|
||||
setStatus_(STATUS_SUSPEND);
|
||||
on_wait(arg1);
|
||||
}
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
@@ -168,7 +128,7 @@ u8 TObject::forward(u32 arg1) {
|
||||
setStatus_(STATUS_END);
|
||||
on_end();
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!bSequence_) {
|
||||
@@ -194,7 +154,7 @@ u8 TObject::forward(u32 arg1) {
|
||||
} else {
|
||||
u32Wait_ -= arg1;
|
||||
on_wait(arg1);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,21 +342,15 @@ void TControl::reset() {
|
||||
|
||||
/* 802894B4-802895B4 283DF4 0100+00 0/0 2/2 0/0 .text forward__Q37JStudio3stb8TControlFUl
|
||||
*/
|
||||
// NONMATCHING - regalloc
|
||||
u8 TControl::forward(u32 param_0) {
|
||||
bool TControl::forward(u32 param_0) {
|
||||
_54 = mObject_control.getSuspend();
|
||||
u8 rv = mObject_control.forward(param_0);
|
||||
bool rv = mObject_control.forward(param_0);
|
||||
int uVar7 = 0xf;
|
||||
int uVar6 = 0;
|
||||
JGadget::TContainerEnumerator<JStudio::stb::TObject, -12> aTStack_38(&mObjectContainer);
|
||||
while (aTStack_38) {
|
||||
JStudio::stb::TObject& this_00 = *aTStack_38;
|
||||
u8 iVar5 = 0;
|
||||
u8 iVar4 = this_00.forward(param_0);
|
||||
if (iVar4 != 0 || rv != 0) {
|
||||
iVar5 = 1;
|
||||
}
|
||||
rv = iVar5;
|
||||
rv = this_00.forward(param_0) || rv;
|
||||
int uVar3 = this_00.getStatus();
|
||||
uVar7 &= uVar3;
|
||||
uVar6 |= uVar3;
|
||||
@@ -524,13 +478,3 @@ bool TParse::parseBlock_object(const data::TParse_TBlock_object& ppObject, u32 f
|
||||
|
||||
} // namespace stb
|
||||
} // namespace JStudio
|
||||
|
||||
/* 80289928-802899BC 284268 0094+00 1/1 0/0 0/0 .text
|
||||
* find_if<Q37JGadget37TLinkList<Q37JStudio3stb7TObject,-12>8iterator,Q37JStudio6object18TPRObject_ID_equal>__3stdFQ37JGadget37TLinkList<Q37JStudio3stb7TObject,-12>8iteratorQ37JGadget37TLinkList<Q37JStudio3stb7TObject,-12>8iteratorQ37JStudio6object18TPRObject_ID_equal
|
||||
*/
|
||||
extern "C" void func_80289928(void* _this,
|
||||
JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator param_0,
|
||||
JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator param_1,
|
||||
JStudio::object::TPRObject_ID_equal param_2) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JStudio/JStudio_JStage/control.h"
|
||||
#include "JSystem/JGadget/pointer.h"
|
||||
#include "JSystem/JStage/JSGActor.h"
|
||||
#include "JSystem/JStage/JSGLight.h"
|
||||
#include "JSystem/JStage/JSGFog.h"
|
||||
@@ -14,23 +13,6 @@
|
||||
/* 80289B00-80289B60 284440 0060+00 1/0 0/0 0/0 .text __dt__Q214JStudio_JStage13TCreateObjectFv */
|
||||
JStudio_JStage::TCreateObject::~TCreateObject() {}
|
||||
|
||||
template <class AdaptorT, class ObjectT>
|
||||
JStudio::TObject* createObject_JSG_(const JStudio::stb::data::TParse_TBlock_object& param_1,
|
||||
JStage::TObject* param_2, const JStage::TSystem* param_3) {
|
||||
ObjectT* objt = (ObjectT*)param_2;
|
||||
AdaptorT* pAdaptor = new AdaptorT(param_3, objt);
|
||||
if (pAdaptor == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
JGadget::TPointer_delete<AdaptorT> adaptorGuard(pAdaptor);
|
||||
JStudio::TObject* pObj = JStudio::TCreateObject::createFromAdaptor<AdaptorT>(param_1, pAdaptor);
|
||||
if (pObj == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
adaptorGuard.set(NULL);
|
||||
return pObj;
|
||||
}
|
||||
|
||||
/* 80289B60-80289CE4 2844A0 0184+00 1/0 0/0 0/0 .text
|
||||
* create__Q214JStudio_JStage13TCreateObjectFPPQ27JStudio7TObjectRCQ47JStudio3stb4data20TParse_TBlock_object
|
||||
*/
|
||||
@@ -78,4 +60,4 @@ bool JStudio_JStage::TCreateObject::create(
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ JStudio_JStage::TAdaptor_actor::~TAdaptor_actor() {
|
||||
adaptor_do_end();
|
||||
}
|
||||
|
||||
|
||||
/* 8028A728-8028A7B4 285068 008C+00 1/0 0/0 0/0 .text
|
||||
* adaptor_do_prepare__Q214JStudio_JStage14TAdaptor_actorFv */
|
||||
void JStudio_JStage::TAdaptor_actor::adaptor_do_prepare() {
|
||||
@@ -43,7 +42,6 @@ void JStudio_JStage::TAdaptor_actor::adaptor_do_prepare() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 8028A7B4-8028A8D8 2850F4 0124+00 1/0 0/0 0/0 .text
|
||||
* adaptor_do_begin__Q214JStudio_JStage14TAdaptor_actorFv */
|
||||
void JStudio_JStage::TAdaptor_actor::adaptor_do_begin() {
|
||||
@@ -137,7 +135,6 @@ void JStudio_JStage::TAdaptor_actor::adaptor_do_TEXTURE_ANIMATION(JStudio::data:
|
||||
setJSG_ID_(&JStage::TActor::JSGSetTextureAnimation, operation, param_2, param_3);
|
||||
}
|
||||
|
||||
|
||||
/* 8028AAB4-8028AAC8 2853F4 0014+00 1/0 0/0 0/0 .text
|
||||
* adaptor_do_TEXTURE_ANIMATION_MODE__Q214JStudio_JStage14TAdaptor_actorFQ37JStudio4data15TEOperationDataPCvUl
|
||||
*/
|
||||
|
||||
@@ -4,56 +4,6 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JStudio/JStudio_JStage/object-light.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__Q214JStudio_JStage14TAdaptor_lightFPCQ26JStage7TSystemPQ26JStage6TLight();
|
||||
extern "C" void __dt__Q214JStudio_JStage14TAdaptor_lightFv();
|
||||
extern "C" void adaptor_do_prepare__Q214JStudio_JStage14TAdaptor_lightFv();
|
||||
extern "C" void adaptor_do_begin__Q214JStudio_JStage14TAdaptor_lightFv();
|
||||
extern "C" void adaptor_do_end__Q214JStudio_JStage14TAdaptor_lightFv();
|
||||
extern "C" void adaptor_do_update__Q214JStudio_JStage14TAdaptor_lightFUl();
|
||||
extern "C" void adaptor_do_data__Q214JStudio_JStage14TAdaptor_lightFPCvUlPCvUl();
|
||||
extern "C" void
|
||||
adaptor_do_FACULTY__Q214JStudio_JStage14TAdaptor_lightFQ37JStudio4data15TEOperationDataPCvUl();
|
||||
extern "C" void
|
||||
adaptor_do_ENABLE__Q214JStudio_JStage14TAdaptor_lightFQ37JStudio4data15TEOperationDataPCvUl();
|
||||
extern "C" void
|
||||
__cl__Q314JStudio_JStage14TAdaptor_light20TVVOutput_direction_CFfPQ27JStudio8TAdaptor();
|
||||
extern "C" void __dt__Q314JStudio_JStage14TAdaptor_light20TVVOutput_direction_Fv();
|
||||
extern "C" void func_8028D2B8();
|
||||
extern "C" u8 saoVVOutput_direction___Q214JStudio_JStage14TAdaptor_light[72];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void __dt__Q37JStudio14TVariableValue7TOutputFv();
|
||||
extern "C" void update_immediate___Q27JStudio14TVariableValueFPQ27JStudio14TVariableValued();
|
||||
extern "C" void adaptor_setVariableValue_Vec__Q27JStudio8TAdaptorFPCUlRC3Vec();
|
||||
extern "C" void adaptor_getVariableValue_Vec__Q27JStudio8TAdaptorCFP3VecPCUl();
|
||||
extern "C" void adaptor_setVariableValue_GXColor__Q27JStudio8TAdaptorFPCUlRC8_GXColor();
|
||||
extern "C" void adaptor_getVariableValue_GXColor__Q27JStudio8TAdaptorCFP8_GXColorPCUl();
|
||||
extern "C" void __dt__Q27JStudio14TAdaptor_lightFv();
|
||||
extern "C" void adaptor_object_data___Q214JStudio_JStage16TAdaptor_object_FPCvUlPCvUl();
|
||||
extern "C" void
|
||||
adaptor_object_ENABLE___Q214JStudio_JStage16TAdaptor_object_FQ37JStudio4data15TEOperationDataPCvUl();
|
||||
extern "C" void __ct__Q27JStudio14TVariableValueFv();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __register_global_object();
|
||||
extern "C" void __construct_array();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" u8 const sauVariableValue_4_COLOR_RGBA__Q27JStudio14TAdaptor_light[16];
|
||||
extern "C" u8 const sauVariableValue_3_POSITION_XYZ__Q27JStudio14TAdaptor_light[12];
|
||||
extern "C" u8 const sauVariableValue_3_TARGET_POSITION_XYZ__Q27JStudio14TAdaptor_light[12];
|
||||
extern "C" extern void* __vt__Q27JStudio14TAdaptor_light[10];
|
||||
extern "C" extern void* __vt__Q27JStudio8TAdaptor[8];
|
||||
extern "C" extern void* __vt__Q37JStudio14TVariableValue7TOutput[4];
|
||||
extern "C" u8 soOutput_none___Q27JStudio14TVariableValue[4 + 4 /* padding */];
|
||||
|
||||
/* 8028CB50-8028CBF4 287490 00A4+00 0/0 1/1 0/0 .text
|
||||
* __ct__Q214JStudio_JStage14TAdaptor_lightFPCQ26JStage7TSystemPQ26JStage6TLight */
|
||||
@@ -101,28 +51,6 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_prepare() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804554E8-804554F0 003AE8 0004+04 1/1 0/0 0/0 .sdata2 @846 */
|
||||
SECTION_SDATA2 static f32 lit_846[1 + 1 /* padding */] = {
|
||||
0.0f,
|
||||
/* padding */
|
||||
0.0f,
|
||||
};
|
||||
|
||||
/* 804554F0-804554F8 003AF0 0008+00 1/1 0/0 0/0 .sdata2 @847 */
|
||||
SECTION_SDATA2 static f64 lit_847 = 0.5;
|
||||
|
||||
/* 804554F8-80455500 003AF8 0008+00 1/1 0/0 0/0 .sdata2 @848 */
|
||||
SECTION_SDATA2 static f64 lit_848 = 3.0;
|
||||
|
||||
/* 80455500-80455508 003B00 0008+00 1/1 0/0 0/0 .sdata2 @849 */
|
||||
SECTION_SDATA2 static u8 lit_849[8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 80455508-8045550C 003B08 0004+00 1/1 0/0 0/0 .sdata2 @850 */
|
||||
SECTION_SDATA2 static f32 lit_850 = 57.295780181884766f;
|
||||
|
||||
/* 8028CCB0-8028CF68 2875F0 02B8+00 1/0 0/0 0/0 .text
|
||||
* adaptor_do_begin__Q214JStudio_JStage14TAdaptor_lightFv */
|
||||
// NONMATCHING - regalloc
|
||||
@@ -145,10 +73,10 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_begin() {
|
||||
f32 diry = finalTransform->direction.y;
|
||||
f32 dirz = finalTransform->direction.z;
|
||||
f32 sqr = sqrtf(dirx * dirx + dirz * dirz);
|
||||
f32 dVar11 = atan2(dirx, dirz);
|
||||
f32 dVar9 = atan2(diry, sqr);
|
||||
adaptor_setVariableValue_immediate(10, (180.0f / M_PI) * dVar11);
|
||||
adaptor_setVariableValue_immediate(11, (180.0f / M_PI) * dVar9);
|
||||
f32 dVar11 = atan2f(dirx, dirz);
|
||||
f32 dVar9 = atan2f(diry, sqr);
|
||||
adaptor_setVariableValue_immediate(10, MTXRadToDeg(dVar11));
|
||||
adaptor_setVariableValue_immediate(11, MTXRadToDeg(dVar9));
|
||||
Vec VStack_c4;
|
||||
VECAdd(&finalTransform->position, &finalTransform->direction, &VStack_c4);
|
||||
adaptor_setVariableValue_Vec(sauVariableValue_3_TARGET_POSITION_XYZ, VStack_c4);
|
||||
@@ -160,13 +88,8 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_end() {
|
||||
adaptor_object_end_();
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8045550C-80455510 003B0C 0004+00 1/1 0/0 0/0 .sdata2 @898 */
|
||||
SECTION_SDATA2 static f32 lit_898 = 0.01745329238474369f;
|
||||
|
||||
/* 8028CFBC-8028D18C 2878FC 01D0+00 1/0 0/0 0/0 .text
|
||||
* adaptor_do_update__Q214JStudio_JStage14TAdaptor_lightFUl */
|
||||
// NONMATCHING - float regalloc
|
||||
void JStudio_JStage::TAdaptor_light::adaptor_do_update(u32 param_1) {
|
||||
JStage::TLight* lightObj = get_pJSG_();
|
||||
const JStudio::TObject* pObject = adaptor_getObject();
|
||||
@@ -183,13 +106,13 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_update(u32 param_1) {
|
||||
case 1:
|
||||
f32 dVar10 = adaptor_getVariableValue(10)->getValue();
|
||||
f32 dVar11 = adaptor_getVariableValue(11)->getValue();
|
||||
f32 temp = 0.01745329238474369f * dVar11;
|
||||
f32 dVar12 = cos(temp);
|
||||
f32 sinVal = sin(temp);
|
||||
f32 temp2 = 0.01745329238474369f * dVar10;
|
||||
VStack_198.direction.x = dVar12 * (f32)sin(temp2);
|
||||
f32 temp = MTXDegToRad(dVar11);
|
||||
f32 dVar12 = i_cosf(temp);
|
||||
f32 sinVal = i_sinf(temp);
|
||||
f32 temp2 = MTXDegToRad(dVar10);
|
||||
VStack_198.direction.x = dVar12 * i_sinf(temp2);
|
||||
VStack_198.direction.y = sinVal;
|
||||
VStack_198.direction.z = dVar12 * (f32)cos(temp2);
|
||||
VStack_198.direction.z = dVar12 * i_cosf(temp2);
|
||||
break;
|
||||
case 2:
|
||||
Vec VStack_1c0;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef MSL_ALGORITHM_H_
|
||||
#define MSL_ALGORITHM_H_
|
||||
|
||||
#include <string.h>
|
||||
#include <iterator.h>
|
||||
|
||||
namespace std {
|
||||
@@ -26,11 +25,45 @@ ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T
|
||||
return first;
|
||||
}
|
||||
|
||||
template <class ForwardIterator, class T, class Predicate>
|
||||
ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T& val, Predicate p) {
|
||||
typedef typename iterator_traits<ForwardIterator>::difference_type difference_type;
|
||||
difference_type len = std::distance(first, last);
|
||||
|
||||
while (len > 0) {
|
||||
ForwardIterator i = first;
|
||||
difference_type step = len / 2;
|
||||
std::advance(i, step);
|
||||
|
||||
if (!p(val, *i)) {
|
||||
first = ++i;
|
||||
len -= step + 1;
|
||||
} else {
|
||||
len = step;
|
||||
}
|
||||
}
|
||||
|
||||
return first;
|
||||
}
|
||||
|
||||
template <class ForwardIterator, class T>
|
||||
ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T& val);
|
||||
|
||||
template<class InputIt, class UnaryPredicate>
|
||||
InputIt find_if(InputIt first, InputIt last, UnaryPredicate p);
|
||||
InputIt find_if(InputIt first, InputIt last, UnaryPredicate p) {
|
||||
while (first != last && !p(*first)) {
|
||||
++first;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
// fakematch: val should be a const reference, but that breaks JMessage::TResource::toMessageIndex_messageID
|
||||
template<class ForwardIterator, class T>
|
||||
inline ForwardIterator find(ForwardIterator first, ForwardIterator last, T& val) {
|
||||
for (; first != last && *first != val; ++first) {
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
/*
|
||||
template<class OutputIt, class Size, int A2>
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#define MSL_FUNCTIONAL_H_
|
||||
|
||||
namespace std {
|
||||
template <class T> struct less {};
|
||||
template <class T> struct less {
|
||||
bool operator()(const T& a, const T& b) const {
|
||||
return a < b;
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef MSL_ITERATOR_H_
|
||||
#define MSL_ITERATOR_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
namespace std {
|
||||
struct input_iterator_tag {};
|
||||
struct output_iterator_tag {};
|
||||
|
||||
@@ -1732,17 +1732,6 @@ void dMenu_Dmap_c::_create() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 801BDD40-801BDD70 1B8680 0030+00 0/0 1/0 0/0 .text append__10J2DPictureFPC7ResTIMGf */
|
||||
bool J2DPicture::append(ResTIMG const* param_0, f32 param_1) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* 801BDD70-801BDDA4 1B86B0 0034+00 0/0 1/0 0/0 .text insert__10J2DPictureFPC7ResTIMGUcf
|
||||
*/
|
||||
void J2DPicture::insert(ResTIMG const* param_0, u8 param_1, f32 param_2) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80454054-80454058 002654 0004+00 1/1 0/0 0/0 .sdata2 @6017 */
|
||||
SECTION_SDATA2 static f32 lit_6017 = 12.0f / 17.0f;
|
||||
|
||||
+2
-1
@@ -123,6 +123,7 @@ static const J3DTexMtxInfo l_texMtxInfo = {
|
||||
/* 8003A840-8003AACC 035180 028C+00 1/1 0/0 0/0 .text addWarpMaterial__FP12J3DModelData
|
||||
*/
|
||||
// NONMATCHING l_alphaCompInfo needs to be placed in .sdata2, but the function breaks if it is declared const
|
||||
// Also see J3DAlphaComp::setAlphaCompInfo in J3DMatBlock.h
|
||||
static void addWarpMaterial(J3DModelData* i_modelData) {
|
||||
static J3DTevStageInfo const l_tevStageInfo = {
|
||||
0x05, 0x0F, 0x08, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
@@ -171,7 +172,7 @@ static void addWarpMaterial(J3DModelData* i_modelData) {
|
||||
|
||||
J3DPEBlock* peBlock = material->getPEBlock();
|
||||
J3DAlphaComp* alphaComp = peBlock->getAlphaComp();
|
||||
static J3DAlphaCompInfo const l_alphaCompInfo = {0x04, 0x80, 0x00, 0x03, 0xFF, 0, 0, 0};
|
||||
static J3DAlphaCompInfo l_alphaCompInfo = {0x04, 0x80, 0x00, 0x03, 0xFF, 0, 0, 0};
|
||||
alphaComp->setAlphaCompInfo(l_alphaCompInfo);
|
||||
peBlock->setZCompLoc((u8)0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user