Link demoSection.cpp

This commit is contained in:
HeartPiece 2022-12-31 14:16:49 +11:00
parent 7c786f03da
commit 55d61777fe
7 changed files with 70 additions and 1518 deletions

File diff suppressed because it is too large Load Diff

View File

@ -226,11 +226,11 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/captionMgr.cpp">captionMgr.cpp</a> | 10382 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/gameflow.cpp">gameflow.cpp</a> | 11288 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/commonSaveData.cpp">commonSaveData.cpp</a> | 11360 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/loadResource.cpp">loadResource.cpp</a> | 11781 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/heapStatus.cpp">heapStatus.cpp</a> | 12405 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/dvdThread.cpp">dvdThread.cpp</a> | 12535 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/P2DScreen.cpp">P2DScreen.cpp</a> | 13017 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/demoSection.cpp">demoSection.cpp</a> | 13022 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/modelEffect.cpp">modelEffect.cpp</a> | 13177 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectSpecialActor.cpp">JSTObjectSpecialActor.cpp</a> | 13400 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/messageObj.cpp">messageObj.cpp</a> | 16076 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/light.cpp">light.cpp</a> | 17491 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/wipe.cpp">wipe.cpp</a> | 17645 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/screenObj.cpp">screenObj.cpp</a> | 17826 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/pikmin2AramMgr.cpp">pikmin2AramMgr.cpp</a> | 18340 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectCamera.cpp">JSTObjectCamera.cpp</a> | 18682 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/P2DScreen.cpp">P2DScreen.cpp</a> | 13017 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/modelEffect.cpp">modelEffect.cpp</a> | 13177 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectSpecialActor.cpp">JSTObjectSpecialActor.cpp</a> | 13400 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/messageObj.cpp">messageObj.cpp</a> | 16076 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/light.cpp">light.cpp</a> | 17491 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/wipe.cpp">wipe.cpp</a> | 17645 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/screenObj.cpp">screenObj.cpp</a> | 17826 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/pikmin2AramMgr.cpp">pikmin2AramMgr.cpp</a> | 18340 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectCamera.cpp">JSTObjectCamera.cpp</a> | 18682 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectParticleActor.cpp">JSTObjectParticleActor.cpp</a> | 21679 |
### <section id="utilityU">utilityU</section>
| File | Size (bytes) | File | Size (bytes) |

View File

@ -13,13 +13,16 @@ enum EDrawInitMode {};
namespace Demo {
struct HIORootNode : public Game::HIORootNode {
HIORootNode()
: Game::HIORootNode(nullptr)
HIORootNode(Section* section)
: Game::HIORootNode(section)
{
m_name = "THPセクション";
m_name = "THPセクション";
}
virtual ~HIORootNode() { } // _08 (weak)
// _00 = VTBL
// _00-_1C = Game::HIORootNode
};
// Size: 0x1B0
@ -29,7 +32,7 @@ struct Section : public Game::BaseHIOSection {
virtual ~Section(); // _08
virtual void init(); // _18
virtual void doExit(); // _24
virtual bool forceReset(); // _2C (weak)
virtual bool forceReset() { return false; } // _2C (weak)
virtual void doLoadingStart(); // _34
virtual bool doLoading(); // _38
virtual bool doUpdate(); // _3C

View File

@ -18,39 +18,40 @@ public:
static JUTProcBar* sManager;
u8 _00[4];
u32 _04;
u32 _08;
u32 _0C;
u8 _10[8];
u32 _18;
u32 _1C;
u32 _20;
u8 _24[8];
u32 _2C;
u32 _30;
u32 _34;
u8 _38[8];
u32 _40;
u32 _44;
u32 _48;
u8 _4C[8];
u32 _54;
u32 _58;
u32 _5C;
u32 _60;
CTime _64[8];
u32 _108;
u8 _10C;
u32 _110;
u32 _114;
u32 _118;
u32 _11C;
u32 _120;
u32 _124;
u32 _128;
u32 _12C;
u8 _130;
u8 _00[4]; // _00
u32 _04; // _04
u32 _08; // _08
u32 _0C; // _0C
u8 _10[8]; // _10
u32 _18; // _18
u32 _1C; // _1C
u32 _20; // _20
u8 _24[8]; // _24
u32 _2C; // _2C
u32 _30; // _30
u32 _34; // _34
u8 _38[8]; // _38
u32 _40; // _40
u32 _44; // _44
u32 _48; // _48
u8 _4C[8]; // _4C
u32 _54; // _54
u32 _58; // _58
u32 _5C; // _5C
u32 _60; // _60
CTime _64[8]; // _64
u32 _104; // _104
u32 _108; // _108
u8 _10C; // _10C
u32 _110; // _110
u32 _114; // _114
u32 _118; // _118
u32 _11C; // _11C
u32 _120; // _120
u32 _124; // _124
u32 _128; // _128
u32 _12C; // _12C
u8 _130; // _130
private:
}; // 0x134 size

View File

@ -1151,7 +1151,7 @@ GC:=\
$(BUILD_DIR)/asm/sysGCU/titleSection.o\
$(BUILD_DIR)/asm/sysGCU/loadResource.o\
$(BUILD_DIR)/src/sysGCU/rootMenuSection.o\
$(BUILD_DIR)/asm/sysGCU/demoSection.o\
$(BUILD_DIR)/src/sysGCU/demoSection.o\
$(BUILD_DIR)/asm/sysGCU/THPAudioDecode.o\
$(BUILD_DIR)/src/sysGCU/THPDraw.o\
$(BUILD_DIR)/asm/sysGCU/THPPlayer.o\

View File

@ -10,132 +10,13 @@
#include "JSystem/JUT/JUTProcBar.h"
#include "JSystem/JUT/JUTTexture.h"
const char* name = "demoSection";
/*
Generated from dpostproc
.section .rodata # 0x804732E0 - 0x8049E220
.global lbl_8049B3C0
lbl_8049B3C0:
.asciz "demoSection.cpp"
.asciz "TitleSection::init"
.skip 1
.asciz "JMANewSinTable"
.skip 1
.4byte 0x54485083 # "THP?¿½Z?¿½N?¿½V?¿½?¿½?¿½?¿½"
.4byte 0x5A834E83
.4byte 0x56838783
.4byte 0x93000000
.asciz "frameBuffer"
.global lbl_8049B410
lbl_8049B410:
.asciz "PSGame.h"
.skip 3
.global lbl_8049B41C
lbl_8049B41C:
.asciz "P2Assert"
.skip 3
.asciz "/user/yamashita/arc/demoMovieLogo_us.szs"
.skip 3
.asciz "/data/timg/pikmin2_logo.bti"
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.global "sLogoLocate__Q24Demo25@unnamed@demoSection_cpp@"
"sLogoLocate__Q24Demo25@unnamed@demoSection_cpp@":
.4byte 0x0172000F
.4byte 0x0172000F
.4byte 0x0172000F
.4byte 0x01720028
.4byte 0x0172000F
.4byte 0x0172000F
.4byte 0x0172000F
.4byte 0x01720028
.global lbl_804ED348
lbl_804ED348:
.4byte 0x00000000
.4byte 0xFFFFFFFF
.4byte loadResource__Q24Demo7SectionFv
.global "__vt__25Delegate<Q24Demo7Section>"
"__vt__25Delegate<Q24Demo7Section>":
.4byte 0
.4byte 0
.4byte "invoke__25Delegate<Q24Demo7Section>Fv"
.global __vt__Q24Demo11HIORootNode
__vt__Q24Demo11HIORootNode:
.4byte 0
.4byte 0
.4byte __dt__Q24Demo11HIORootNodeFv
.4byte getChildCount__5CNodeFv
.global __vt__Q24Demo7Section
__vt__Q24Demo7Section:
.4byte 0
.4byte 0
.4byte __dt__Q24Demo7SectionFv
.4byte run__7SectionFv
.4byte update__7SectionFv
.4byte draw__7SectionFR8Graphics
.4byte init__Q24Demo7SectionFv
.4byte drawInit__7SectionFR8Graphics
.4byte drawInit__7SectionFR8GraphicsQ27Section13EDrawInitMode
.4byte doExit__Q24Demo7SectionFv
.4byte forceFinish__7SectionFv
.4byte forceReset__Q24Demo7SectionFv
.4byte getCurrentSection__7SectionFv
.4byte doLoadingStart__Q24Demo7SectionFv
.4byte doLoading__Q24Demo7SectionFv
.4byte doUpdate__Q24Demo7SectionFv
.4byte doDraw__Q24Demo7SectionFR8Graphics
.4byte isFinishable__7SectionFv
.4byte initHIO__Q24Game14BaseHIOSectionFPQ24Game11HIORootNode
.4byte refreshHIO__Q24Game14BaseHIOSectionFv
.section .sdata, "wa" # 0x80514680 - 0x80514D80
.global "sMovieIndexTable__Q24Demo25@unnamed@demoSection_cpp@"
"sMovieIndexTable__Q24Demo25@unnamed@demoSection_cpp@":
.byte 0x05
.byte 0x06
.byte 0x07
.byte 0x00
.byte 0x08
.byte 0x09
.byte 0x0A
.byte 0x00
.global "sMovieIndex__Q24Demo25@unnamed@demoSection_cpp@"
"sMovieIndex__Q24Demo25@unnamed@demoSection_cpp@":
.byte 0xFF
.byte 0x00
.byte 0x00
.byte 0x00
.section .sdata2, "a" # 0x80516360 - 0x80520E40
.global lbl_80520AB0
lbl_80520AB0:
.float 0.0
.global lbl_80520AB4
lbl_80520AB4:
.float 0.5
.global lbl_80520AB8
lbl_80520AB8:
.float 32768.0
.global lbl_80520ABC
lbl_80520ABC:
.float 8.0
.global lbl_80520AC0
lbl_80520AC0:
.4byte 0x43300000
.4byte 0x80000000
.global lbl_80520AC8
lbl_80520AC8:
.4byte 0x43300000
.4byte 0x00000000
*/
static void _Print(char* format, ...) { OSReport(format, __FILE__); }
namespace Demo {
namespace {
static s8 sMovieIndex = -1;
static u8 sMovieIndexTable[8] = { 5, 6, 7, 0, 8, 9, 10, 0 };
static s8 sMovieIndex = -1;
struct LogoLocation {
u16 x;
@ -178,20 +59,20 @@ void Section::init()
sys->heapStatusStart("JMANewSinTable", nullptr);
sys->heapStatusEnd("JMANewSinTable");
HIORootNode* root = new HIORootNode;
HIORootNode* root = new HIORootNode(this);
initHIO(root);
sys->heapStatusStart("frameBuffer", nullptr);
setDisplay(JFWDisplay::createManager(nullptr, _1C, JUTXfb::DoubleBuffer, false), 1);
setDisplay(JFWDisplay::createManager(nullptr, m_displayHeap, JUTXfb::DoubleBuffer, false), 1);
sys->heapStatusEnd("frameBuffer");
m_controller = new Controller(JUTGamePad::PORT_0);
sys->setFrameRate(2);
m_moviePlayer.init(_1C);
m_moviePlayer.init(m_displayHeap);
addGenNode(m_genNode);
_30 = 0.5f;
addGenNode(&m_moviePlayer);
m_timeStep = 0.5f;
// this struct appears messed up
JUTProcBar::sManager->_10C = 0;
@ -214,66 +95,6 @@ void Section::doDraw(Graphics& gfx)
J2DPicture pic(m_logoTexture);
LogoLocation& location = sLogoLocate[sMovieIndex];
pic.draw(location.x, location.y, pic._020.f.x - pic._020.i.x, pic._020.f.y - pic._020.i.y, false, false, false);
/*
stwu r1, -0x190(r1)
mflr r0
stw r0, 0x194(r1)
stw r31, 0x18c(r1)
mr r31, r4
stw r30, 0x188(r1)
mr r30, r3
addi r3, r30, 0xc0
lwz r12, 0xc0(r30)
lwz r12, 0x20(r12)
mtctr r12
bctrl
addi r3, r31, 0xbc
lwz r12, 0xbc(r31)
lwz r12, 0x14(r12)
mtctr r12
bctrl
lwz r4, 0x1ac(r30)
addi r3, r1, 8
bl __ct__10J2DPictureFP10JUTTexture
lbz r4, "sMovieIndex__Q24Demo25@unnamed@demoSection_cpp@"@sda21(r13)
lis r0, 0x4330
lis r3, "sLogoLocate__Q24Demo25@unnamed@demoSection_cpp@"@ha
stw r0, 0x170(r1)
extsb r4, r4
lfd f2, lbl_80520AC8@sda21(r2)
slwi r4, r4, 2
addi r3, r3, "sLogoLocate__Q24Demo25@unnamed@demoSection_cpp@"@l
add r4, r3, r4
stw r0, 0x178(r1)
lhz r5, 0(r4)
addi r3, r1, 8
lhz r0, 2(r4)
li r4, 0
stw r5, 0x174(r1)
li r5, 0
lfs f5, 0x30(r1)
li r6, 0
stw r0, 0x17c(r1)
lfd f1, 0x170(r1)
lfd f0, 0x178(r1)
lfs f3, 0x28(r1)
fsubs f1, f1, f2
lfs f4, 0x34(r1)
fsubs f2, f0, f2
lfs f0, 0x2c(r1)
fsubs f3, f5, f3
fsubs f4, f4, f0
bl draw__10J2DPictureFffffbbb
addi r3, r1, 8
li r4, -1
bl __dt__10J2DPictureFv
lwz r0, 0x194(r1)
lwz r31, 0x18c(r1)
lwz r30, 0x188(r1)
mtlr r0
addi r1, r1, 0x190
blr
*/
}
/*
@ -287,18 +108,18 @@ bool Section::doUpdate()
BaseHIOSection::doUpdate();
if (m_moviePlayer.isFinishPlaying()) {
m_active = 0;
m_isMainActive = false;
}
// closer but still weird
if ((u8)(m_controller->m_padButton.m_buttonDown) && m_active) {
// if any button is pressed
if (m_controller->isButtonDown(~JUTGamePad::False) && m_isMainActive) {
PSSystem::spSysIF->playSystemSe(PSSE_SY_MENU_CANCEL, 0);
m_active = 0;
m_isMainActive = false;
}
m_moviePlayer.play();
m_moviePlayer.update();
return m_active;
return m_isMainActive;
}
/*
@ -312,64 +133,11 @@ void Section::doExit()
PSSystem::checkSceneMgr(mgr);
mgr->deleteCurrentScene();
// really dumb signed/unsigned jank here
if ((s8)(++sMovieIndex) >= 8) {
if ((s8)(++sMovieIndex) >= (u32)8) {
sMovieIndex = 0;
}
m_moviePlayer.stop();
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
stw r30, 8(r1)
mr r30, r3
lwz r0, spSceneMgr__8PSSystem@sda21(r13)
cmplwi r0, 0
bne lbl_8044D008
lis r3, lbl_8049B410@ha
lis r5, lbl_8049B41C@ha
addi r3, r3, lbl_8049B410@l
li r4, 0x1d3
addi r5, r5, lbl_8049B41C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
lbl_8044D008:
lwz r31, spSceneMgr__8PSSystem@sda21(r13)
cmplwi r31, 0
bne lbl_8044D030
lis r3, lbl_8049B410@ha
lis r5, lbl_8049B41C@ha
addi r3, r3, lbl_8049B410@l
li r4, 0x1dc
addi r5, r5, lbl_8049B41C@l
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
lbl_8044D030:
mr r3, r31
bl deleteCurrentScene__Q28PSSystem8SceneMgrFv
lbz r3, "sMovieIndex__Q24Demo25@unnamed@demoSection_cpp@"@sda21(r13)
addi r3, r3, 1
extsb r0, r3
stb r3, "sMovieIndex__Q24Demo25@unnamed@demoSection_cpp@"@sda21(r13)
cmplwi r0, 8
blt lbl_8044D058
li r0, 0
stb r0, "sMovieIndex__Q24Demo25@unnamed@demoSection_cpp@"@sda21(r13)
lbl_8044D058:
addi r3, r30, 0xc0
bl stop__Q24Game9THPPlayerFv
lwz r0, 0x14(r1)
lwz r31, 0xc(r1)
lwz r30, 8(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
}
/*
@ -406,139 +174,6 @@ void Section::loadResource()
P2ASSERTLINE(433, timg);
m_logoTexture = new JUTTexture(timg);
/*
stwu r1, -0x20(r1)
mflr r0
lis r4, lbl_8049B3C0@ha
li r5, 0
stw r0, 0x24(r1)
li r6, 1
stw r31, 0x1c(r1)
addi r31, r4, lbl_8049B3C0@l
li r4, 1
stw r30, 0x18(r1)
stw r29, 0x14(r1)
mr r29, r3
addi r3, r31, 0x68
bl
mount__10JKRArchiveFPCcQ210JKRArchive10EMountModeP7JKRHeapQ210JKRArchive15EMountDirection
cmplwi r3, 0
bne lbl_8044D1A8
addi r3, r31, 0
addi r5, r31, 0x5c
li r4, 0x1ac
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
lbl_8044D1A8:
addi r3, r31, 0x94
bl getGlbResource__13JKRFileLoaderFPCc
or. r30, r3, r3
bne lbl_8044D1CC
addi r3, r31, 0
addi r5, r31, 0x5c
li r4, 0x1b1
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
lbl_8044D1CC:
li r3, 0x40
bl __nw__FUl
or. r31, r3, r3
beq lbl_8044D1FC
li r0, 0
mr r4, r30
stw r0, 0x28(r31)
li r5, 0
bl storeTIMG__10JUTTextureFPC7ResTIMGUc
lbz r0, 0x3b(r31)
rlwinm r0, r0, 0, 0x1e, 0x1e
stb r0, 0x3b(r31)
lbl_8044D1FC:
stw r31, 0x1ac(r29)
lwz r0, 0x24(r1)
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
mtlr r0
addi r1, r1, 0x20
blr
*/
}
/*
* --INFO--
* Address: 8044D21C
* Size: 000070
*/
// HIORootNode::~HIORootNode()
// {
/*
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
mr r31, r4
stw r30, 8(r1)
or. r30, r3, r3
beq lbl_8044D270
lis r4, __vt__Q24Demo11HIORootNode@ha
addi r0, r4, __vt__Q24Demo11HIORootNode@l
stw r0, 0(r30)
beq lbl_8044D260
lis r5, __vt__Q24Game11HIORootNode@ha
li r4, 0
addi r0, r5, __vt__Q24Game11HIORootNode@l
stw r0, 0(r30)
bl __dt__5CNodeFv
lbl_8044D260:
extsh. r0, r31
ble lbl_8044D270
mr r3, r30
bl __dl__FPv
lbl_8044D270:
lwz r0, 0x14(r1)
mr r3, r30
lwz r31, 0xc(r1)
lwz r30, 8(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
// }
/*
* --INFO--
* Address: 8044D28C
* Size: 000008
*/
bool Section::forceReset() { return false; }
/*
* @generated
* --INFO--
* Address: 8044D294
* Size: 000030
*/
// void Delegate<Section>::invoke()
// {
// /*
// stwu r1, -0x10(r1)
// mflr r0
// mr r4, r3
// stw r0, 0x14(r1)
// addi r12, r4, 8
// lwz r3, 4(r3)
// bl __ptmf_scall
// nop
// lwz r0, 0x14(r1)
// mtlr r0
// addi r1, r1, 0x10
// blr
// */
// }
} // namespace Demo

View File

@ -287,3 +287,5 @@ You have 1531 out of 10000 Pokos and 55 out of 201 treasures.",2022-12-29 17:53:
You have 1538 out of 10000 Pokos and 55 out of 201 treasures.",2022-12-30 21:39:35.609735
1543,718176,0.15436837109487847,55,196927,0.2762507434881659,"
You have 1543 out of 10000 Pokos and 55 out of 201 treasures.",2022-12-31 13:52:42.701304
1547,719980,0.15475613195218246,55,197283,0.2767501430864017,"
You have 1547 out of 10000 Pokos and 55 out of 201 treasures.",2022-12-31 14:16:30.391356

1 code_count_in_pokos code_completion_in_bytes code_completion_in_percentage data_count_in_treasures data_completion_in_bytes data_completion_in_percentage sentence created_at
287
288
289
290
291