diff --git a/config/RSBE01_02/rels/st_pictchat/splits.txt b/config/RSBE01_02/rels/st_pictchat/splits.txt index cc01df4..fbd28e3 100644 --- a/config/RSBE01_02/rels/st_pictchat/splits.txt +++ b/config/RSBE01_02/rels/st_pictchat/splits.txt @@ -11,6 +11,24 @@ global_destructor_chain.c: .dtors start:0x00000000 end:0x00000008 .bss start:0x00000000 end:0x00000004 +mo_stage/st_pictchat/st_pictchat.cpp: + .text start:0x00000070 end:0x00002C5C + .ctors start:0x00000000 end:0x00000004 + .rodata start:0x00000000 end:0x00000048 + .data start:0x00000000 end:0x00000C08 + .bss start:0x00000008 end:0x00000018 + +mo_stage/st_pictchat/gr_pictchat.cpp: + .text start:0x00002C5C end:0x000033FC + .rodata start:0x00000048 end:0x00000080 + .data start:0x00000C08 end:0x000010B8 + +mo_stage/st_pictchat/gr_pictchat_pict.cpp: + .text start:0x000033FC end:0x0000D15C + .rodata start:0x00000080 end:0x00000110 + .data start:0x000010B8 end:0x00003DB8 + .bss start:0x00000018 end:0x00000128 + mo_stage/mo_stage.cpp: .text start:0x0000F378 end:0x0000F414 .data start:0x00005E48 end:0x00005E55 diff --git a/config/RSBE01_02/rels/st_pictchat/symbols.txt b/config/RSBE01_02/rels/st_pictchat/symbols.txt index 4747aa6..bfd35f9 100644 --- a/config/RSBE01_02/rels/st_pictchat/symbols.txt +++ b/config/RSBE01_02/rels/st_pictchat/symbols.txt @@ -1,11 +1,11 @@ __register_global_object = .text:0x00000000; // type:function size:0x1C scope:global data:4byte __destroy_global_chain = .text:0x0000001C; // type:function size:0x54 scope:global -fn_73_70 = .text:0x00000070; // type:function size:0x34 -fn_73_A4 = .text:0x000000A4; // type:function size:0x130 +create__10stPictchatFv = .text:0x00000070; // type:function size:0x34 +__ct__10stPictchatFv = .text:0x000000A4; // type:function size:0x130 fn_73_1D4 = .text:0x000001D4; // type:function size:0xEC fn_73_2C0 = .text:0x000002C0; // type:function size:0x8 fn_73_2C8 = .text:0x000002C8; // type:function size:0x51C -fn_73_7E4 = .text:0x000007E4; // type:function size:0xF8 +createObjBg__10stPictchatFi = .text:0x000007E4; // type:function size:0xF8 fn_73_8DC = .text:0x000008DC; // type:function size:0x8 fn_73_8E4 = .text:0x000008E4; // type:function size:0x8 fn_73_8EC = .text:0x000008EC; // type:function size:0x8 @@ -57,7 +57,7 @@ fn_73_1C94 = .text:0x00001C94; // type:function size:0x8 fn_73_1C9C = .text:0x00001C9C; // type:function size:0x10 fn_73_1CAC = .text:0x00001CAC; // type:function size:0x6C8 fn_73_2374 = .text:0x00002374; // type:function size:0x544 -fn_73_28B8 = .text:0x000028B8; // type:function size:0x178 +initPictIDList__10stPictchatFv = .text:0x000028B8; // type:function size:0x178 scope:global align:4 fn_73_2A30 = .text:0x00002A30; // type:function size:0x4 fn_73_2A34 = .text:0x00002A34; // type:function size:0x8 fn_73_2A3C = .text:0x00002A3C; // type:function size:0x8 @@ -89,16 +89,16 @@ fn_73_2B2C = .text:0x00002B2C; // type:function size:0x8 fn_73_2B34 = .text:0x00002B34; // type:function size:0x8 fn_73_2B3C = .text:0x00002B3C; // type:function size:0x8 fn_73_2B44 = .text:0x00002B44; // type:function size:0x8 -fn_73_2B4C = .text:0x00002B4C; // type:function size:0x64 -fn_73_2BB0 = .text:0x00002BB0; // type:function size:0x74 -fn_73_2C24 = .text:0x00002C24; // type:function size:0x34 +__sinit_\st_pictchat_cpp = .text:0x00002B4C; // type:function size:0x64 +__dt__32stClassInfoImpl<36,10stPictchat>Fv = .text:0x00002BB0; // type:function size:0x74 +create__32stClassInfoImpl<36,10stPictchat>Fv = .text:0x00002C24; // type:function size:0x34 fn_73_2C58 = .text:0x00002C58; // type:function size:0x4 fn_73_2C5C = .text:0x00002C5C; // type:function size:0x8 fn_73_2C64 = .text:0x00002C64; // type:function size:0x64 fn_73_2CC8 = .text:0x00002CC8; // type:function size:0x58 -fn_73_2D20 = .text:0x00002D20; // type:function size:0xFC +create__12grPictchatBgFiPCcPCc = .text:0x00002D20; // type:function size:0xFC fn_73_2E1C = .text:0x00002E1C; // type:function size:0xA0 -fn_73_2EBC = .text:0x00002EBC; // type:function size:0x74 +update__12grPictchatBgFf = .text:0x00002EBC; // type:function size:0x74 fn_73_2F30 = .text:0x00002F30; // type:function size:0xC0 fn_73_2FF0 = .text:0x00002FF0; // type:function size:0x388 fn_73_3378 = .text:0x00003378; // type:function size:0x8 diff --git a/configure.py b/configure.py index bc83f8b..2c802d0 100755 --- a/configure.py +++ b/configure.py @@ -1256,7 +1256,11 @@ def MatchingFor(*versions): "mw_version": config.linker_version, "cflags": cflags_rel, "host": False, - "objects": [], + "objects": [ + Object(NonMatching, "mo_stage/st_pictchat/st_pictchat.cpp"), + Object(NonMatching, "mo_stage/st_pictchat/gr_pictchat.cpp"), + Object(NonMatching, "mo_stage/st_pictchat/gr_pictchat_pict.cpp"), + ], }, { "lib": "st_pirates", diff --git a/include/st_pictchat/gr_pictchat.h b/include/st_pictchat/gr_pictchat.h new file mode 100644 index 0000000..3db34b1 --- /dev/null +++ b/include/st_pictchat/gr_pictchat.h @@ -0,0 +1,40 @@ +#pragma once + +#include +#include +#include +#include + +class grPictchat : public grYakumono { +protected: + u8 unk110; + float unk114; +public: + grPictchat(const char* taskName); + virtual ~grPictchat(); +}; + +class grPictchatBg : public grYakumono { +protected: + u8 unk150; + float unk154; + void *unk15C; + void *msgData; + u32 pictIDWork; + grCollisionJoint *unk168; +public: + bool isMessageInit; + Message* message; + u32 selectedPlayerNo; + + //static grPictchatBg(); + grPictchatBg(const char* taskName); + static grPictchatBg* create(int mdlIndex, const char *tgtNodeName, const char *taskName); + virtual void setMsgData(void *param1); + virtual void setPictIDWork(char param1); + virtual void update(float param1); + virtual void updateJoint(float param1); + virtual void updateMessage(float param1); + virtual ~grPictchatBg(); +}; +//static_assert(sizeof(grPictchat) == 0x158, "Class is the wrong size!"); diff --git a/include/st_pictchat/st_pictchat.h b/include/st_pictchat/st_pictchat.h new file mode 100644 index 0000000..115832e --- /dev/null +++ b/include/st_pictchat/st_pictchat.h @@ -0,0 +1,135 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +ST_CLASS_INFO + +class stPictchat : public stMelee { + + +public: + int unk1d8; + float unk1dC; + // int unk1e1; + char unk1e0; + char unk1e1; + char unk1e2; + char unk1e3; + char unk1e4; + //int unk1e5; + //int unk1e6; + //int unk1e7; + //int unk1e8; + //int unk1e9; + //int unk1ea; + //int unk1eb; + //int unk1ec; + //int unk1ed; + //int unk1ee; + //int unk1ef; + //int unk1f0; + //int unk1f1; + //int unk1f2; + //int unk1f3; + //int unk1f4; + //int unk1f5; + //int unk1f6; + //int unk1f7; + //int unk1f8; + //int unk1f9; + //int unk1fa; + //int unk1fb; + //int unk1fc; + //int unk1fd; + //int unk1fe; + //int unk1ff; + char pictIDList[27]; + char unk200; + char unk201; + char unk202; + char unk203; + char unk204; + char unk205; + char unk206; + stDataMultiContainer *unk208; + stDataMultiContainer *unk20C; + stDataMultiContainer *unk210; + stDataMultiContainer *unk214; + stDataMultiContainer *unk218; + stDataMultiContainer *unk21C; + stDataMultiContainer *unk220; + stDataMultiContainer *unk224; + stDataMultiContainer *unk228; + stDataMultiContainer *unk22C; + stDataMultiContainer *unk230; + stDataMultiContainer *unk234; + stDataMultiContainer *unk238; + stDataMultiContainer *unk23C; + stDataMultiContainer *unk240; + stDataMultiContainer *unk244; + stDataMultiContainer *unk248; + stDataMultiContainer *unk24C; + stDataMultiContainer *unk250; + stDataMultiContainer *unk254; + stDataMultiContainer *unk258; + stDataMultiContainer *unk25C; + stDataMultiContainer *unk260; + stDataMultiContainer *unk264; + stDataMultiContainer *unk268; + stDataMultiContainer *unk26C; + stDataMultiContainer *unk270; + + char unk430; + stTrigger *windTrigger; + grGimmickWindData *windAreaData; + stPictchat(); + //virtual ~stPictChat(); + //virtual void createObj(); + //virtual bool loading(); + //virtual bool startAppear(); + //virtual void setAppearKind(u8 kind); + //virtual void endAppear(); + //virtual void forceStopAppear(); + //virtual bool isAppear(); + //virtual s32 isStartAppearTimming(); + //virtual void update(float deltaFrame); + //virtual bool checkChangeScene(); + //virtual void resetChangeScene(); + //virtual void setChangeSceneNumber(s32 n); + + //virtual int getFinalTechniqColor() { return 0x14000496; } + //virtual IfSmashAppearTask* getAppearTask() { return m_smash_taunt_task; } + //virtual bool isBamperVector() { return true; } + //virtual int getPokeTrainerDrawLayer() { return 1; } + + static stPictchat* create(); + virtual bool loading(); + virtual void createObj(); + virtual void createObjBg(int index); + virtual void createObjSideBar(int index); + virtual void createObjSideBarLamp(int index); + virtual void createObjPict(int index); + virtual void createObjAttack(int index); + virtual void createObjHashigo(); + virtual void createObjHashigo(int index); + virtual void createObjSpring(); + virtual void createObjWind(); + virtual void createObjSpring(int index); + virtual void update(); + virtual void updatePict(); + virtual void initStageDataTbl(); + virtual void initPictIDList(); + virtual bool isBamperVector() { return true; } + static stClassInfoImpl bss_loc_14; +}; diff --git a/src/mo_stage/st_pictchat/gr_pictchat.cpp b/src/mo_stage/st_pictchat/gr_pictchat.cpp new file mode 100644 index 0000000..d991729 --- /dev/null +++ b/src/mo_stage/st_pictchat/gr_pictchat.cpp @@ -0,0 +1,200 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static void wrapper(grPictchat* ths, s32 mdlIndex) { + ths->setMdlIndex(mdlIndex); +} + +grPictchat::grPictchat(const char* taskname) : grYakumono(taskname) { + unk110 = 0; + unk114 = 0; + setupMelee(); +} + + +grPictchat::~grPictchat() {} +grPictchatBg::~grPictchatBg() {} + + + + +grPictchatBg* grPictchatBg::create(int mdlIndex, const char *tgtNodeName, const char *taskName) { + grPictchatBg *bg = new (Heaps::StageInstance) grPictchatBg(taskName); + if (bg != 0) { + //bg->grYakumono(taskName); + bg->isMessageInit = false; + bg->unk154 = 0; + bg->setupMelee(); + bg->msgData = 0; + bg->unk15C = 0; + bg->selectedPlayerNo = 0xFF; + bg->pictIDWork = 0; + bg->unk168 = 0; + bg->setMdlIndex(mdlIndex); + bg->setTgtNode(tgtNodeName); + } + return bg; +} + +void grPictchatBg::update(float param1) { + this->grGimmick::update(param1); + if (this->m_isUpdate != false) { + this->updateJoint(param1); + this->updateMessage(param1); + } +} + +void grPictchatBg::updateJoint(float param1) { + u16 uVar1; + grCollisionJoint *pgVar2; + u32 uVar3; + u8 nodeIndex; + grCollision *collision; + if (this->unk168) { + uVar3 = 0; + if (this->pictIDWork == 19) { + uVar3 = 0x2000; + } + this->unk168->m_0x52 = uVar3; + } else { + collision = this->m_collision; + if (collision == 0) { + uVar1 = collision->m_jointLen; + nodeIndex = 0; + //pgVar2 = this; + //pgVar2 = collision->getJoint(nodeIndex); + //((pgVar2 == (grPictchatBg *)0x0 || ((pgVar2->_grYakumono)._grGimmick._ground.modelAnimNum != this))))) { + while ((nodeIndex != uVar1 && + ((pgVar2 = collision->getJoint(nodeIndex), + pgVar2 == 0 || (pgVar2->m_ground != this))))) {// || (pgVar2 != this))) { || (this->m_modelAnimNum != 1) + nodeIndex++; + } + if (nodeIndex != uVar1) { + this->unk168 = pgVar2; + } + } + } + return; +} + +void grPictchatBg::updateMessage(float param1) { + Message* this_00; + u32 uVar1; + u32 uVar2; + int iVar3; + const char* pcVar4; + u32 uVar5; + u8 bVar6; + u8 bVar7; + gmGlobalModeMelee *pgVar8; + int iVar9; + float dVar10; + float uVar12; + double dVar11; + float fVar12; + char locald8[8]; + + char** locale4; + u32* locale8; + void* austack; + + if (this->isMessageInit != true) { + if (this->isMessageInit != false) { + return; + } + this_00 = new Message(0x1e0,Heaps::StageInstance); + this->message = this_00; + if (this_00 == 0){ + return; + } + this_00->allocMsgBuf(0x400,1,Heaps::StageInstance); + this_00->attachMsgBuf(0,this->m_sceneModels[0],"pictchat_font",1,3,0.0625); + this->isMessageInit = true; + } + this->message->changeMsgBuf(0); + this->message->clearMsgBuf(); + this->message->setWindow(-1700.0,0.0,1700.0,570.0); + this->message->setFace(4); + this->message->setFixedWidth(-1.0); + this->message->setColor(-1); + pgVar8 = g_GameGlobal->m_modeMelee; + if (pgVar8 == 0) { + return; + } + uVar5 = this->selectedPlayerNo; + if (uVar5 == 0xff) { + bVar7 = 0; + bVar7 = 0; + iVar9 = 7; + do { + locald8[bVar6] = 0xFF; + if (pgVar8->m_playersInitData[bVar6].m_state !=3) { + uVar5 = bVar7; + bVar7 = bVar7 + 1; + locald8[uVar5] = bVar6; + } + bVar6 = bVar6 + 1; + iVar9 = iVar9 - 1; + } while (iVar9 != 0); + + if (bVar7 == 0) { + return; + } + fVar12 = randf(); + uVar1 = bVar7; + uVar2 = uVar5; + if (uVar2 < uVar1) { + uVar1 = uVar2; + } + uVar5 = locald8[uVar1]; + this->selectedPlayerNo = locald8[uVar1]; + if (pgVar8->m_playersInitData[bVar6].m_state !=3) { + return; + } + } + + //iVar9 = 0; + iVar9 = muMenu::exchangeGmCharacterKind2MuStockchkind(pgVar8->m_playersInitData[uVar5].m_characterKind); + if (iVar9 == 23) { + iVar9 = 3; + } + + uVar12 = 0.0; + dVar10 = 20.0; + + dVar11 = 200.0; + this->message->setScale(dVar10,dVar10); + this->message->setCursorX(uVar12); + this->message->setCursorY(dVar11); + iVar3 = g_GameGlobal->getLanguage(); + if (iVar3 == 0) { + this->message->getPrintIndexData(this->unk15C,13,locale4,locale8); + //this->message->printf() + if (7 < locale8[0]) { + locale8[0] = 7; + } + //memcpy(austack,(void*)locale4,locale8) + pcVar4 = muMenu::exchangeMuStockchkind2MuCharName(iVar9); + this->message->printf(pcVar4); + } else { + pcVar4 = muMenu::exchangeMuStockchkind2MuCharName(iVar9); + this->message->printf(pcVar4); + } +} +//grPictchatBg::~grPictchatBg() {} \ No newline at end of file diff --git a/src/mo_stage/st_pictchat/st_pictchat.cpp b/src/mo_stage/st_pictchat/st_pictchat.cpp new file mode 100644 index 0000000..b750ee0 --- /dev/null +++ b/src/mo_stage/st_pictchat/st_pictchat.cpp @@ -0,0 +1,560 @@ +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +char conversion = 1; + +stClassInfoImpl stPictchat::bss_loc_14; + +stPictchat* stPictchat::create() { + return new (Heaps::StageInstance) stPictchat(); +} + +stPictchat::stPictchat() : stMelee("stPictchat", Stages::PictoChat) { + unk1d8 = 0; + unk1e0 = 1; + unk1e1 = 0; + unk1e2 = 0; + unk1e3 = 0; + unk1e4 = 0; + pictIDList[27]; + unk200 = 0xff; + unk201 = 5; + unk202 = 5; + unk203 = 5; + unk204 = 5; + unk205 = 5; + unk206 = 5; + windTrigger = 0x0; + windAreaData = 0x0; + unk430 = 0xffffffff; +} + +bool stPictchat::loading() { + return true; +} + +void stPictchat::createObj() { + testStageParamInit(m_fileData, 6); + testStageDataInit(m_fileData, 4, 0x14); + this->initStageDataTbl(); + this->createObjWind(); + this->createObjBg(0); + this->createObjPict(1); + this->createObjPict(2); + this->createObjPict(3); + this->createObjPict(4); + this->createObjPict(5); + this->createObjPict(6); + this->createObjPict(7); + this->createObjPict(8); + this->createObjPict(9); + this->createObjPict(10); + this->createObjPict(11); + this->createObjPict(12); + this->createObjPict(13); + this->createObjPict(14); + this->createObjPict(15); + this->createObjPict(16); + this->createObjPict(17); + this->createObjPict(18); + this->createObjPict(19); + this->createObjPict(20); + this->createObjPict(21); + this->createObjPict(22); + this->createObjPict(23); + this->createObjPict(24); + this->createObjPict(25); + this->createObjPict(26); + this->createObjPict(27); + this->createObjPict(28); + this->createObjPict(29); + createCollision(m_fileData, 2, 0x0); + this->createObjSideBar(30); + this->createObjSideBarLamp(31); + this->createObjHashigo(); + this->createObjSpring(); + this->createObjAttack(39); + this->createObjAttack(40); + this->createObjAttack(41); + this->createObjAttack(42); + this->createObjAttack(43); + this->createObjAttack(44); + initCameraParam(); + nw4r::g3d::ResFile posData(m_fileData->getData(Data_Type_Model, 0x64, 0xfffe)); + if (posData.ptr()) { + nw4r::g3d::ResFile copyPosData = posData; + createStagePositions(©PosData); + } else { + // if no stgPos model in pac, use defaults + createStagePositions(); + } + createWind2ndOnly(); + //m_wind2ndTrigger->setAreaSleep(1); + //for (size_t i = 0; i < getGroundNum(); i++) { + // static_cast(getGround(i))->initializeEntity(); + //} + //static_cast(getGround(3))->startEntityAutoLoop(); + loadStageAttrParam(m_fileData, 8); + nw4r::g3d::ResFileData* scn = (nw4r::g3d::ResFileData*) m_secondaryFileData->getData(Data_Type_Scene, 0, 0xFFFE); + registScnAnim(scn, 0); + initPosPokeTrainer(1, 0); + createObjPokeTrainer(m_fileData, 0x1f5, "PokeTrainer00", m_pokeTrainerPos, 0); +} + +void stPictchat::createObjBg(int index) { + void *pVar1; + grPictchatBg *bg; + switch (index) { + case 0: + bg = grPictchatBg::create(1,"StgPictchat00Ground","grPictchatMainBg"); + break; + default: + bg = 0; + break; + } + if (bg != 0) { + this->addGround(bg); + bg->startup(m_fileData,0,0); + bg->setStageData(m_stageData); + + pVar1 = this->m_fileData->getData(Data_Type_Misc,300,0xfffe); + bg->setMsgData(pVar1); + bg->setPictIDWork(this->unk1e1); + } +} + +//void Ground::setStageData(void* stageData) { +// this->m_stageData = stageData; +//} + +void grPictchatBg::setMsgData(void *param1) { + this->msgData = param1; +} + +void grPictchatBg::setPictIDWork(char param1) { + this->pictIDWork = param1; +} + +void stPictchat::createObjSideBar(int index) { + return; +} + +void stPictchat::createObjSideBarLamp(int index) { + return; +} + +void stPictchat::createObjPict(int index) { + void *pict; + char *pcVar7; + pcVar7 = "stPictchat"; + switch(index) { + default: + pict = 0x0; + break; + case 1: + pict = 0x0; + pcVar7[0] = '1'; + break; + } + + if (pict) { + + } + return; +} + +void stPictchat::createObjAttack(int index) { + return; +} + +void stPictchat::createObjHashigo() { + return; +} + +void stPictchat::createObjHashigo(int index) { + return; +} + +void stPictchat::createObjSpring() { + return; +} + +void stPictchat::createObjWind() { + grGimmickWindData *pgVar1; + stTrigger *windTrigger; + + pgVar1 = new grGimmickWindData(); + this->windAreaData = pgVar1; + + if (pgVar1) { + memset(pgVar1,0,0x40); + pgVar1 = this->windAreaData; + pgVar1->m_pos.m_x = 0.0; + pgVar1->m_pos.m_y = 36.0; + pgVar1->m_pos.m_z = 0.0; + this->windAreaData->m_speed = 0.5; + this->windAreaData->m_vector = 200.0; + pgVar1 = this->windAreaData; + pgVar1->m_areaData.m_offsetPos.m_x = 0.0; + pgVar1->m_areaData.m_offsetPos.m_y = 0.0; + pgVar1->m_areaData.m_range.m_x = 200.0; + pgVar1->m_areaData.m_range.m_y = 80.0; + windTrigger = g_stTriggerMng->createTrigger(Gimmick::Area_Wind,-1); + this->windTrigger = windTrigger; + windTrigger->setWindTrigger(this->windAreaData); + //m_wind2ndData->m_areaData = this->windAreaData->m_areaData; + + memset(m_wind2ndData,0,0x4c); + m_wind2ndData->m_pos.m_x = 0.0; + m_wind2ndData->m_pos.m_y = 36.0; + m_wind2ndData->m_pos.m_z = 0.0; + m_wind2ndData->m_speed = 0.5; + m_wind2ndData->m_vector = 200.0; + m_wind2ndData->m_60 = 195.0; + m_wind2ndData->m_64 = 20.0; + m_wind2ndData->m_68 = 1.5; + m_wind2ndData->m_72 = 80; + //pgVar1 = this->windAreaData; + m_wind2ndData->m_areaData.m_offsetPos.m_x = 0.0; + m_wind2ndData->m_areaData.m_offsetPos.m_y = 0.0; + m_wind2ndData->m_areaData.m_range.m_x = 200.0; + m_wind2ndData->m_areaData.m_range.m_y = 80.0; + + this->windTrigger->setWindParam(m_wind2ndData,1); + this->windTrigger->setAreaSleep(1); + } + return; +} + +void stPictchat::createObjSpring(int index) { + return; +} +//void stPictchat::fn_73_28B8() { //initPict + +//} +//void stPictchat::fn_73_28B8() { //initPict + +//} +//void stPictchat::fn_73_28B8() { //initPict + +//} +//void stPictchat::fn_73_28B8() { //initPict + +//} +//void stPictchat::fn_73_28B8() { //initPict + +//} +void stPictchat::update() { + this->updatePict(); +} + +void stPictchat::updatePict() { + void *uVar2; + char bVar4; + void *puVar5 = this->m_stageData; + if (puVar5 != 0) { + bVar4 = this->unk1d8; + if (bVar4 = 2) { + if (this->unk1dC == 0.0 || this->unk1e1 == 29) { + this->unk1e1 = 29; + this->unk1d8 = 3; + } + } else if (bVar4 < 2) { + if (bVar4 == 0) { + if (this->unk1e0 == 29) { + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + this->unk1e0 = 0; + } + } + this->unk1d8 = 1; + } else if (this->unk1dC == 0.0) { + if (26 < this->unk200) { + this->initPictIDList(); + this->unk200 = 0; + } + this->unk1e1 = this->pictIDList[this->unk200]; + bVar4 = this->unk1e4 + 1; + this->unk1e2 = this->unk1e1; + this->unk1e4 = bVar4; + if (23 < bVar4) { + this->unk1e4 = 23; + } + switch (this->unk1e1) { + case 1: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 2: + g_sndSystem->playSE(snd_se_stage_Crayon_season02,0,0,0,-1); + break; + case 3: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 4: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 5: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 6: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 7: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 8: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 9: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 10: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 11: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 12: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 13: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 14: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 15: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 16: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 17: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 18: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 19: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 20: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 21: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 22: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 23: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 24: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 25: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 26: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + case 27: + g_sndSystem->playSE(snd_se_stage_Crayon_season01,0,0,0,-1); + break; + } + this->unk1d8 = 2; + } + } else if (bVar4 < 4 && this->unk1e1 == 29) { + this->unk1d8 = 0; + } +} + +void stPictchat::initStageDataTbl() { + gfArchive *data; + void *pgVar1; + stDataMultiContainer *psVar2; + data = this->m_fileData; + if (data != 0) { + pgVar1 = data->getData(Data_Type_Misc,0xa,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk208 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x14,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk20C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x1e,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk210 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x28,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk214 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x32,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk218 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x3c,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk21C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x46,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk220 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x50,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk224 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x5a,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk228 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x64,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk22C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x6e,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk230 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x78,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk234 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x82,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk238 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x8c,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk23C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x96,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk240 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xa0,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk244 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xaa,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk248 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xb4,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk24C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xbe,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk250 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xc8,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk254 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xd2,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk258 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xdc,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk25C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xe6,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk260 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xf0,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk264 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0xfa,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk268 = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x104,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk26C = psVar2; + } + pgVar1 = this->m_fileData->getData(Data_Type_Misc,0x10e,0xfffe); + if (pgVar1 != 0) { + psVar2 = stDataMultiContainer::create(pgVar1,Heaps::StageInstance); + this->unk270 = psVar2; + } + } + return; +} + +void stPictchat::initPictIDList() { //initPict + char uVar1; + u32 uVar2; + u8 uVar3; + u8 uVar4; + u32 dVar5; + float fVar6; + for (uVar4 = 0; uVar4 < 27; uVar4++) { + this->pictIDList[uVar4] = uVar4 + 1; + } + dVar5 = 0x0; + //uVar4 = 0; + for (uVar4 = 0; uVar4 < 27; uVar4++) { + fVar6 = randf(); + uVar2 = uVar4; + //uVar4++; + uVar1 = this->pictIDList[uVar2]; + uVar3 = ((27-dVar5) * fVar6); + this->pictIDList[uVar2] = this->pictIDList[uVar3]; + this->pictIDList[uVar3] = uVar1; + } + return; +} \ No newline at end of file