mirror of
https://github.com/zeldaret/tww.git
synced 2026-10-09 05:31:51 -04:00
d_s_open and d_s_open_sub OK for demo
This commit is contained in:
+2
-2
@@ -667,8 +667,8 @@ config.libs = [
|
||||
Object(Matching, "d/d_s_logo.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_s_menu.cpp"),
|
||||
Object(EquivalentFor("D44J01", "GZLJ01", "GZLE01"), "d/d_s_name.cpp"), # stripped vtable padding
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_s_open.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_s_open_sub.cpp"),
|
||||
Object(Matching, "d/d_s_open.cpp"),
|
||||
Object(Matching, "d/d_s_open_sub.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_s_play.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_s_room.cpp"),
|
||||
Object(Matching, "d/d_s_title.cpp"),
|
||||
|
||||
+20
-4
@@ -2,6 +2,7 @@
|
||||
#define D_S_OPEN
|
||||
|
||||
#include "JSystem/J2DGraph/J2DPane.h"
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "d/d_drawlist.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "f_op/f_op_scene.h"
|
||||
@@ -13,11 +14,20 @@ class dScnOpen_message_c {
|
||||
public:
|
||||
dScnOpen_message_c(JKRExpHeap*);
|
||||
virtual ~dScnOpen_message_c();
|
||||
inline void set_pane_pointer(J2DPane* tx1, J2DPane* tx2);
|
||||
void set_message(u32, int);
|
||||
void exec();
|
||||
|
||||
public:
|
||||
f32 getAlpha() { return alpha; }
|
||||
bool isNext() { return mbIsNext; }
|
||||
void set_pane_pointer(J2DPane* tx1, J2DPane* tx2) {
|
||||
tTextBox = (J2DTextBox*)tx1;
|
||||
rTextBox = (J2DTextBox*)tx2;
|
||||
tTextBox->setFont(tFont);
|
||||
rTextBox->setFont(rFont);
|
||||
rTextBox->setLineSpace(tTextBox->getLineSpace());
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x0004 */ char msg1[0x800];
|
||||
/* 0x0804 */ char msg2[0x800];
|
||||
/* 0x1004 */ char msg3[0x800];
|
||||
@@ -38,7 +48,7 @@ public:
|
||||
/* 0x22DC */ int mTimer;
|
||||
/* 0x22E0 */ int mTimerMax;
|
||||
/* 0x22E4 */ u32 mProc;
|
||||
/* 0x22E8 */ u8 field_0x22e8;
|
||||
/* 0x22E8 */ bool mbIsNext;
|
||||
/* 0x22EC */ int field_0x22ec;
|
||||
};
|
||||
|
||||
@@ -48,8 +58,11 @@ public:
|
||||
virtual ~dScnOpen_proc_c();
|
||||
void proc_execute();
|
||||
void proc_draw();
|
||||
virtual void draw();
|
||||
virtual void draw() { proc_draw(); }
|
||||
|
||||
bool isEnd() { return mState == 44; }
|
||||
|
||||
public:
|
||||
/* 0x004 */ JKRExpHeap* exp_heap;
|
||||
/* 0x008 */ dScnOpen_message_c* m_message;
|
||||
/* 0x00C */ J2DScreen* m_Screen;
|
||||
@@ -71,10 +84,13 @@ public:
|
||||
BOOL draw();
|
||||
BOOL execute();
|
||||
|
||||
private:
|
||||
/* 0x1C4 */ request_of_phase_process_class mPhs;
|
||||
/* 0x1CC */ JKRSolidHeap* solid_heap;
|
||||
/* 0x1D0 */ dScnOpen_proc_c* mpProc;
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 0x1D4 */ u8 field_0x1d4;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* D_S_OPEN */
|
||||
|
||||
+20
-5
@@ -16,23 +16,32 @@
|
||||
|
||||
/* 80232A68-80232BC4 .text create__10dScnOpen_cFv */
|
||||
cPhs_State dScnOpen_c::create() {
|
||||
#if VERSION > VERSION_DEMO
|
||||
dComIfGp_offEnableNextStage();
|
||||
mpProc = NULL;
|
||||
#endif
|
||||
|
||||
cPhs_State rt = dComIfG_resLoad(&mPhs, "Opening");
|
||||
if (rt == cPhs_COMPLEATE_e) {
|
||||
solid_heap = mDoExt_createSolidHeapFromGameToCurrent(0x20000, 0);
|
||||
JUT_ASSERT(0x3b, solid_heap != NULL);
|
||||
JUT_ASSERT(DEMO_SELECT(56, 59), solid_heap != NULL);
|
||||
mpProc = new dScnOpen_proc_c();
|
||||
#if VERSION > VERSION_DEMO
|
||||
field_0x1d4 = NULL;
|
||||
#endif
|
||||
mDoExt_restoreCurrentHeap();
|
||||
mDoExt_adjustSolidHeap(solid_heap);
|
||||
mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 30);
|
||||
#if VERSION > VERSION_DEMO
|
||||
return cPhs_COMPLEATE_e;
|
||||
} else if (rt == cPhs_ERROR_e) {
|
||||
JUT_ASSERT(0x48, rt == cPhs_COMPLEATE_e);
|
||||
#endif
|
||||
}
|
||||
#if VERSION > VERSION_DEMO
|
||||
else if (rt == cPhs_ERROR_e) {
|
||||
JUT_ASSERT(72, rt == cPhs_COMPLEATE_e);
|
||||
return rt;
|
||||
}
|
||||
#endif
|
||||
|
||||
return rt;
|
||||
}
|
||||
@@ -45,16 +54,22 @@ BOOL dScnOpen_c::execute() {
|
||||
if (!fopOvlpM_IsPeek() && !dComIfG_resetToOpening(this)) {
|
||||
#endif
|
||||
if (fpcM_GetName(this) == fpcNm_OPEN2_SCENE_e && (CPad_CHECK_TRIG_A(0) || CPad_CHECK_TRIG_B(0) || CPad_CHECK_TRIG_START(0))) {
|
||||
#if VERSION == VERSION_DEMO
|
||||
dComIfG_changeOpeningScene(this, fpcNm_OPENING2_SCENE_e);
|
||||
#else
|
||||
field_0x1d4 = 1;
|
||||
mDoAud_bgmStop(20);
|
||||
#endif
|
||||
mDoAud_bgmStop(DEMO_SELECT(30, 20));
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
if (field_0x1d4 == 1 && !mDoAud_isUsedHeapForStreamBuffer())
|
||||
dComIfG_changeOpeningScene(this, fpcNm_OPENING2_SCENE_e);
|
||||
#endif
|
||||
}
|
||||
|
||||
mpProc->proc_execute();
|
||||
if (mpProc->mState == 44)
|
||||
if (mpProc->isEnd())
|
||||
changeGameScene();
|
||||
|
||||
return TRUE;
|
||||
|
||||
+11
-24
@@ -41,7 +41,7 @@ void dScnOpen_message_c::set_message(u32 i_msgNo, int param_1) {
|
||||
alpha = 0.0f;
|
||||
mTimer = 0;
|
||||
mTimerMax = dScnOpen_message_timer_table[msgNo - 0x579] * 30;
|
||||
field_0x22e8 = 0;
|
||||
mbIsNext = false;
|
||||
|
||||
strcpy(msg1, "");
|
||||
strcpy(msg2, "");
|
||||
@@ -143,7 +143,7 @@ void dScnOpen_message_c::exec() {
|
||||
alpha = 0.0f;
|
||||
|
||||
if (field_0x22ec == 0) {
|
||||
field_0x22e8 = 1;
|
||||
mbIsNext = true;
|
||||
mProc = 4;
|
||||
} else {
|
||||
mProc = 3;
|
||||
@@ -191,14 +191,6 @@ dScnOpen_message_c::~dScnOpen_message_c() {
|
||||
mDoExt_setCurrentHeap(old_heap);
|
||||
}
|
||||
|
||||
void dScnOpen_message_c::set_pane_pointer(J2DPane* tx1, J2DPane* tx2) {
|
||||
tTextBox = (J2DTextBox*)tx1;
|
||||
rTextBox = (J2DTextBox*)tx2;
|
||||
tTextBox->setFont(tFont);
|
||||
rTextBox->setFont(rFont);
|
||||
rTextBox->setLineSpace(tTextBox->getLineSpace());
|
||||
}
|
||||
|
||||
enum {
|
||||
PANE_d1,
|
||||
PANE_d2,
|
||||
@@ -308,7 +300,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
fopMsgM_paneTrans(&pane[10], 0.0f, -190.0f);
|
||||
mState = 3;
|
||||
case 3:
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 4;
|
||||
break;
|
||||
case 4:
|
||||
@@ -343,7 +335,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
mState = 9;
|
||||
case 9:
|
||||
mPosX -= 0.5719626f;
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 10;
|
||||
fopMsgM_paneTrans(&pane[0], 0.0f, mPosX);
|
||||
break;
|
||||
@@ -367,7 +359,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
m_message->set_message(0x57b, 3);
|
||||
mState = 13;
|
||||
case 13:
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 14;
|
||||
break;
|
||||
case 14:
|
||||
@@ -397,7 +389,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
fopMsgM_setNowAlpha(&pane[2], 1.0f);
|
||||
mState = 19;
|
||||
case 19:
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 20;
|
||||
break;
|
||||
case 20:
|
||||
@@ -433,7 +425,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
mState = 25;
|
||||
case 25:
|
||||
mPosX -= 0.47482014f;
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 26;
|
||||
fopMsgM_paneTrans(&pane[3], mPosX, 0.0f);
|
||||
break;
|
||||
@@ -460,7 +452,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
fopMsgM_setNowAlpha(&pane[5], 1.0f);
|
||||
mState = 29;
|
||||
case 29:
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 30;
|
||||
break;
|
||||
case 30:
|
||||
@@ -489,7 +481,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
fopMsgM_paneTrans(&pane[10], 0.0f, -190.0f);
|
||||
mState = 35;
|
||||
case 35:
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 36;
|
||||
break;
|
||||
case 36:
|
||||
@@ -526,7 +518,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
if (mScale < 1.0f)
|
||||
mScale = 1.0f;
|
||||
fopMsgM_paneScaleXY(&pane[6], mScale);
|
||||
if (m_message->field_0x22e8 != 0)
|
||||
if (m_message->isNext())
|
||||
mState = 42;
|
||||
break;
|
||||
case 42:
|
||||
@@ -544,7 +536,7 @@ void dScnOpen_proc_c::proc_execute() {
|
||||
break;
|
||||
}
|
||||
|
||||
f32 alpha = m_message->alpha;
|
||||
f32 alpha = m_message->getAlpha();
|
||||
fopMsgM_setNowAlpha(&pane[9], alpha);
|
||||
fopMsgM_setNowAlpha(&pane[10], alpha);
|
||||
|
||||
@@ -562,8 +554,3 @@ void dScnOpen_proc_c::proc_draw() {
|
||||
m_Screen->draw(0.0f, 0.0f, graf);
|
||||
mDoExt_setCurrentHeap(old_heap);
|
||||
}
|
||||
|
||||
/* 80234550-80234570 .text draw__15dScnOpen_proc_cFv */
|
||||
void dScnOpen_proc_c::draw() {
|
||||
proc_draw();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user