Fix w06 symbols for PAL and port mstory2Dll to every version (#523)

* Fix w06 symbols for PAL

* Port mstory2Dll to every version
This commit is contained in:
dbalatoni13 2025-01-11 18:38:53 +01:00 committed by GitHub
parent f79a3f88b1
commit 090ab1c05f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 2181 additions and 2006 deletions

View file

@ -308,21 +308,21 @@ void fn_1_C4C0(void)
void fn_1_C574(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660052);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x52));
object->motion[1] = Hu3DMotionIDGet(object->model[1]);
Hu3DModelShadowMapObjSet(object->model[1], "base_story-base");
fn_1_1DFC(object, 1, 1, 0, 1);
object->model[2] = Hu3DModelCreateFile(0x660053);
object->motion[2] = Hu3DJointMotionFile(object->model[2], 0x660054);
object->motion[3] = Hu3DJointMotionFile(object->model[2], 0x660055);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x53));
object->motion[2] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x54));
object->motion[3] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x55));
fn_1_1DFC(object, 2, 2, 0, 2);
object->model[5] = Hu3DModelCreateFile(0x660059);
object->model[5] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x59));
object->motion[5] = Hu3DMotionIDGet(object->model[5]);
Hu3DModelPosSet(object->model[5], 0, 80, 460);
Hu3DModelAttrSet(object->model[5], 1);
Hu3DModelShadowSet(object->model[5]);
fn_1_1DFC(object, 5, 5, 0, 2);
object->model[6] = Hu3DModelCreateFile(0x66005A);
object->model[6] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x5A));
object->motion[6] = Hu3DMotionIDGet(object->model[6]);
Hu3DModelHookSet(object->model[5], "koopasgbox_fix-effect_fook2", object->model[6]);
Hu3DModelAttrSet(object->model[6], 1);
@ -354,10 +354,10 @@ void fn_1_C858(void)
void fn_1_CB0C(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660062);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660063);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660066);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660069);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x62 : 0x66));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x63 : 0x67));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x66 : 0x6A));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x69 : 0x6C));
Hu3DModelPosSet(object->model[1], 0, 0, 150);
Hu3DModelRotSet(object->model[1], 0, 0, 0);
Hu3DModelScaleSet(object->model[1], 1.25f, 1.25f, 1.25f);
@ -404,12 +404,12 @@ void fn_1_CD78(void)
void fn_1_D030(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x66007D);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x66007E);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660080);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660081);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660084);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x660085);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7D : 0x7B));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7E : 0x7C));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x80 : 0x7D));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x81 : 0x7E));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x84 : 0x7F));
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x85 : 0x80));
Hu3DModelPosSet(object->model[1], -300, 0, 890);
Hu3DModelRotSet(object->model[1], 0, 30, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -518,7 +518,7 @@ void fn_1_D898(omObjData *object, int player)
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
Hu3DModelShadowSet(object->model[1]);
fn_1_1DFC(object, 1, 1, 0, 1);
object->model[2] = Hu3DModelCreateFile(0x660056);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x56));
Hu3DModelPosSet(
object->model[2], lbl_1_data_668[playerNo].x, lbl_1_data_668[lbl_1_bss_3DC.unk30[playerNo].unk18 - 1].y, lbl_1_data_668[playerNo].z);
if (lbl_1_bss_3DC.unk30[playerNo].unk18 == 4) {

View file

@ -16,7 +16,6 @@
#include "game/window.h"
#include "game/wipe.h"
typedef struct {
/* 0x000 */ s32 unk00;
/* 0x004 */ s32 unk04;
@ -382,15 +381,15 @@ void fn_1_9768(void)
void fn_1_981C(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660050);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x50));
object->motion[0] = Hu3DMotionIDGet(object->model[1]);
fn_1_1DFC(object, 1, 0, 0, 2);
Hu3DModelShadowMapObjSet(object->model[1], "base_fix9-base");
object->model[2] = Hu3DModelCreateFile(0x660053);
object->motion[2] = Hu3DJointMotionFile(object->model[2], 0x660054);
object->motion[3] = Hu3DJointMotionFile(object->model[2], 0x660055);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x53));
object->motion[2] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x54));
object->motion[3] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x55));
fn_1_1DFC(object, 2, 3, 0, 2);
object->model[4] = Hu3DModelCreateFile(0x660051);
object->model[4] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x51));
}
void fn_1_9954(omObjData *arg0, StructBss16C *arg1)
@ -441,10 +440,10 @@ void fn_1_9CB8(omObjData *object)
object->model[1] = CharModelCreate(charNo, 1);
object->motion[1] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x00));
object->motion[2] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x35));
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660018 + charNo);
object->motion[7] = Hu3DJointMotionFile(object->model[1], 0x660048 + charNo);
object->motion[8] = Hu3DJointMotionFile(object->model[1], 0x660040 + charNo);
object->motion[9] = Hu3DJointMotionFile(object->model[1], 0x660020 + charNo);
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x18) + charNo);
object->motion[7] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x48) + charNo);
object->motion[8] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x40) + charNo);
object->motion[9] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x20) + charNo);
object->motion[10] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x12));
CharModelMotionDataClose(charNo);
Hu3DModelPosSet(object->model[1], 120, 0, 800);
@ -488,13 +487,13 @@ void fn_1_9FDC(void)
void fn_1_A288(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660072);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660073);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660075);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660076);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x66007A);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x66007B);
object->motion[6] = Hu3DJointMotionFile(object->model[1], 0x660079);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x72 : 0x73));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x73 : 0x74));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x75));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x76));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7A : 0x78));
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7B : 0x79));
object->motion[6] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x79 : 0x77));
Hu3DModelPosSet(object->model[1], 0, 0, 460);
Hu3DModelRotSet(object->model[1], 0, 0, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -532,15 +531,15 @@ void fn_1_A58C(void)
void fn_1_A848(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660062);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660063);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660065);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660066);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660069);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x660068);
object->motion[6] = Hu3DJointMotionFile(object->model[1], 0x66006C);
object->motion[7] = Hu3DJointMotionFile(object->model[1], 0x66006D);
object->motion[8] = Hu3DJointMotionFile(object->model[1], 0x660064);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x62 : 0x66));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x63 : 0x67));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x65 : 0x69));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x66 : 0x6A));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x69 : 0x6C));
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x68 : 0x6B));
object->motion[6] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x6C : 0x6D));
object->motion[7] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x6D : 0x6E));
object->motion[8] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x64 : 0x68));
Hu3DModelPosSet(object->model[1], -120, 0, 800);
Hu3DModelRotSet(object->model[1], 0, 90, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);

View file

@ -471,21 +471,21 @@ void fn_1_FDFC(void)
void fn_1_FEB0(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660052);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x52));
object->motion[1] = Hu3DMotionIDGet(object->model[1]);
Hu3DModelShadowMapObjSet(object->model[1], "base_story-base");
fn_1_1DFC(object, 1, 1, 0, 1);
object->model[2] = Hu3DModelCreateFile(0x660053);
object->motion[2] = Hu3DJointMotionFile(object->model[2], 0x660054);
object->motion[3] = Hu3DJointMotionFile(object->model[2], 0x660055);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x53));
object->motion[2] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x54));
object->motion[3] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x55));
fn_1_1DFC(object, 2, 2, 0, 2);
object->model[5] = Hu3DModelCreateFile(0x660057);
object->model[5] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x57));
object->motion[5] = Hu3DMotionIDGet(object->model[5]);
Hu3DModelPosSet(object->model[5], 0, 80, 460);
Hu3DModelAttrSet(object->model[5], 1);
Hu3DModelShadowSet(object->model[5]);
fn_1_1DFC(object, 5, 5, 0, 2);
object->model[6] = Hu3DModelCreateFile(0x660058);
object->model[6] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x58));
object->motion[6] = Hu3DMotionIDGet(object->model[6]);
Hu3DModelHookSet(object->model[5], "koopabox_fix-effect_fook2", object->model[6]);
Hu3DModelAttrSet(object->model[6], 1);
@ -517,11 +517,11 @@ void fn_1_10194(void)
void fn_1_10448(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660062);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660063);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660065);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660069);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660066);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x62 : 0x66));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x63 : 0x67));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x65 : 0x69));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x69 : 0x6C));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x66 : 0x6A));
Hu3DModelPosSet(object->model[1], -180, 0, 800);
Hu3DModelRotSet(object->model[1], 0, 60, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -598,12 +598,12 @@ void fn_1_1094C(void)
void fn_1_10C00(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x66007D);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x66007E);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660080);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660081);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660084);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x660085);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7D : 0x7B));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7E : 0x7C));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x80 : 0x7D));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x81 : 0x7E));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x84 : 0x7F));
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x85 : 0x80));
Hu3DModelPosSet(object->model[1], -300, 0, 890);
Hu3DModelRotSet(object->model[1], 0, 30, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -714,7 +714,7 @@ void fn_1_1154C(omObjData *object, int player)
object->motion[3] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x05));
object->motion[4] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x1A));
object->motion[5] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x6D));
object->motion[6] = Hu3DJointMotionFile(object->model[1], 0x660018 + charNo);
object->motion[6] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x18) + charNo);
CharModelMotionDataClose(charNo);
Hu3DModelPosSet(
object->model[1], lbl_1_data_81C[playerNo].x, lbl_1_data_81C[lbl_1_bss_688.unk30[playerNo].unk18 - 1].y + 90, lbl_1_data_81C[playerNo].z);
@ -722,7 +722,7 @@ void fn_1_1154C(omObjData *object, int player)
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
Hu3DModelShadowSet(object->model[1]);
fn_1_1DFC(object, 1, 1, 0, 1);
object->model[2] = Hu3DModelCreateFile(0x660056);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x56));
Hu3DModelPosSet(
object->model[2], lbl_1_data_81C[playerNo].x, lbl_1_data_81C[lbl_1_bss_688.unk30[playerNo].unk18 - 1].y, lbl_1_data_81C[playerNo].z);
if (lbl_1_bss_688.unk30[playerNo].unk18 == 4) {

View file

@ -9,6 +9,7 @@
#include "game/hsfanim.h"
#include "game/hsfman.h"
#include "game/hsfmotion.h"
#include "game/memory.h"
#include "game/minigame_seq.h"
#include "game/objsub.h"
#include "game/pad.h"
@ -17,6 +18,11 @@
#include "game/window.h"
#include "game/wipe.h"
#ifndef __MWERKS__
#include "game/audio.h"
#include "game/saveload.h"
#include "game/thpmain.h"
#endif
typedef struct {
/* 0x000 */ s32 unk00;
@ -308,15 +314,36 @@ void fn_1_19334(void)
fn_1_BE8(60);
{
int time = 0;
#if VERSION_PAL
s32 languageOffset = 0;
#endif
int gid = HuSprGrpCreate(3);
int sprid = HuTHPSprCreate(lbl_1_data_10E4[lbl_1_bss_C0C.unk30[lbl_1_bss_C0C.unk00].unk10], FALSE, 1000);
HuSprGrpMemberSet(gid, 0, sprid);
HuSprPosSet(gid, 0, 288, 240);
sprid = HuSprCreate(HuSprAnimRead(HuDataReadNum(0x660060, 0x10000000)), 950, 0);
#if VERSION_PAL
switch (GWGameStat.language) {
case 2:
languageOffset = 1;
break;
case 3:
languageOffset = 2;
break;
case 4:
languageOffset = 3;
break;
case 5:
languageOffset = 4;
break;
}
sprid = HuSprCreate(HuSprAnimRead(HuDataReadNum(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x60) + languageOffset, MEMORY_DEFAULT_NUM)), 950, 0);
#else
sprid = HuSprCreate(HuSprAnimRead(HuDataReadNum(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x60), MEMORY_DEFAULT_NUM)), 950, 0);
#endif
HuSprGrpMemberSet(gid, 1, sprid);
HuSprPosSet(gid, 1, 288, 226);
HuSprAttrSet(gid, 1, HUSPR_ATTR_DISPOFF);
sprid = HuSprCreate(HuSprAnimRead(HuDataReadNum(0x660061, 0x10000000)), 950, 0);
sprid = HuSprCreate(HuSprAnimRead(HuDataReadNum(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x61 : 0x65), MEMORY_DEFAULT_NUM)), 950, 0);
HuSprGrpMemberSet(gid, 2, sprid);
HuSprBankSet(gid, 2, lbl_1_bss_C0C.unk30[lbl_1_bss_C0C.unk00].unk10);
if (GWLanguageGet() == 0 && lbl_1_bss_C0C.unk30[lbl_1_bss_C0C.unk00].unk10 == 5) {
@ -331,7 +358,7 @@ void fn_1_19334(void)
HuPrcVSleep();
}
while (!HuTHPEndCheck()) {
if (time >= 3300) {
if (time >= (VERSION_NTSC ? 3300 : 2725)) {
HuSprAttrReset(gid, 1, HUSPR_ATTR_DISPOFF);
HuSprAttrReset(gid, 2, HUSPR_ATTR_DISPOFF);
}
@ -455,17 +482,17 @@ void fn_1_19F14(void)
void fn_1_19FC8(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660050);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x50));
object->motion[0] = Hu3DMotionIDGet(object->model[1]);
fn_1_1DFC(object, 1, 0, 0, 2);
Hu3DModelShadowMapObjSet(object->model[1], "base_fix9-base");
Hu3DModelAttrSet(object->model[1], 1);
object->model[2] = Hu3DModelCreateFile(0x660053);
object->motion[2] = Hu3DJointMotionFile(object->model[2], 0x660054);
object->motion[3] = Hu3DJointMotionFile(object->model[2], 0x660055);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x53));
object->motion[2] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x54));
object->motion[3] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x55));
Hu3DModelAttrSet(object->model[2], 1);
fn_1_1DFC(object, 2, 3, 0, 2);
object->model[4] = Hu3DModelCreateFile(0x660051);
object->model[4] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x51));
Hu3DModelAttrSet(object->model[4], 1);
Hu3DModelPosSet(object->model[1], 0, -1000, 0);
}
@ -486,10 +513,10 @@ void fn_1_1A160(void)
void fn_1_1A368(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660062);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660063);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660070);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660071);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x62 : 0x66));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x63 : 0x67));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x70 : 0x71));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x71 : 0x72));
Hu3DModelPosSet(object->model[1], 0, 0, 600);
Hu3DModelRotSet(object->model[1], 0, 180, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -524,12 +551,12 @@ void fn_1_1A578(void)
void fn_1_1A7CC(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660072);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660073);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660075);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660076);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x66007C);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x660079);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x72 : 0x73));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x73 : 0x74));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x75));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x76));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7C : 0x7A));
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x79 : 0x77));
Hu3DModelPosSet(object->model[1], 0, 0, 460);
Hu3DModelRotSet(object->model[1], 0, 0, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -590,8 +617,8 @@ void fn_1_1AE20(omObjData *object)
object->model[1] = CharModelCreate(charNo, 1);
object->motion[1] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x00));
object->motion[2] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x35));
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660010 + charNo);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660008 + charNo);
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x10) + charNo);
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x08) + charNo);
CharModelMotionDataClose(charNo);
Hu3DModelPosSet(object->model[1], 120, 0, 800);
Hu3DModelRotSet(object->model[1], 0, -135, 0);

View file

@ -1235,4 +1235,8 @@ void fn_1_7384(int modelId, int charNo, float ofs, s32 maxTime, BOOL flag)
Hu3DMotionNoMotReset(modelId, "c002m1-ske_hair1", lbl_1_data_328[charNo][0]);
}
}
}
}
#if VERSION_PAL
// lbl_1_data_399
#endif

View file

@ -497,24 +497,24 @@ void fn_1_13C6C(omObjData *object)
Hu3DModelShadowSet(object->model[7]);
fn_1_1DFC(object, 7, 7, 0, 2);
HuDataDirClose(DATADIR_MSTORY4);
object->model[1] = Hu3DModelCreateFile(0x660052);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x52));
object->motion[1] = Hu3DMotionIDGet(object->model[1]);
Hu3DModelShadowMapObjSet(object->model[1], "base_story-base");
fn_1_1DFC(object, 1, 1, 0, 1);
object->model[2] = Hu3DModelCreateFile(0x660053);
object->motion[2] = Hu3DJointMotionFile(object->model[2], 0x660054);
object->motion[3] = Hu3DJointMotionFile(object->model[2], 0x660055);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x53));
object->motion[2] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x54));
object->motion[3] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x55));
fn_1_1DFC(object, 2, 3, 0, 2);
object->model[5] = Hu3DModelCreateFile(0x66005B);
object->model[5] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x5B));
Hu3DModelPosSet(object->model[5], 0, 125, 800);
Hu3DModelAttrSet(object->model[5], 1);
Hu3DModelShadowSet(object->model[5]);
object->model[6] = Hu3DModelCreateFile(0x66005D);
object->model[6] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x5D));
object->motion[6] = Hu3DMotionIDGet(object->model[6]);
Hu3DModelPosSet(object->model[6], 25, 125, 900);
Hu3DModelAttrSet(object->model[6], 1);
fn_1_1DFC(object, 6, 6, 0, 2);
object->model[8] = Hu3DModelCreateFile(0x66005F);
object->model[8] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x5F));
object->motion[8] = Hu3DMotionIDGet(object->model[8]);
Hu3DModelAttrSet(object->model[8], 1);
fn_1_1DFC(object, 8, 8, 0, 1);
@ -586,12 +586,12 @@ void fn_1_1449C(void)
void fn_1_14868(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660062);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660063);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660064);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x66006E);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x66006F);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x660069);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x62 : 0x66));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x63 : 0x67));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x64 : 0x68));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x6E : 0x6F));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x6F : 0x70));
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x69 : 0x6C));
Hu3DModelPosSet(object->model[1], -180, 0, 800);
Hu3DModelRotSet(object->model[1], 0, 60, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -650,11 +650,11 @@ void fn_1_14C40(void)
void fn_1_14F6C(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x66007D);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x66007E);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660080);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660081);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660086);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7D : 0x7B));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7E : 0x7C));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x80 : 0x7D));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x81 : 0x7E));
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x86 : 0x81));
Hu3DModelPosSet(object->model[1], -600, 0, 800);
Hu3DModelRotSet(object->model[1], 0, 60, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);
@ -741,10 +741,10 @@ void fn_1_1574C(omObjData *object)
object->model[1] = CharModelCreate(charNo, 1);
object->motion[1] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x00));
object->motion[2] = CharModelMotionCreate(charNo, DATA_MAKE_NUM(DATADIR_MARIOMOT, 0x02));
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660028 + charNo);
object->motion[4] = Hu3DJointMotionFile(object->model[1], 0x660030 + charNo);
object->motion[5] = Hu3DJointMotionFile(object->model[1], 0x660038 + charNo);
object->motion[6] = Hu3DJointMotionFile(object->model[1], 0x660000 + charNo);
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x28) + charNo);
object->motion[4] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x30) + charNo);
object->motion[5] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x38) + charNo);
object->motion[6] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x00) + charNo);
CharModelMotionDataClose(charNo);
Hu3DModelPosSet(object->model[1], 120, 0, 800);
Hu3DModelRotSet(object->model[1], 0, -60, 0);

View file

@ -264,20 +264,20 @@ void fn_1_16FC0(void)
void fn_1_17074(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660052);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x52));
object->motion[1] = Hu3DMotionIDGet(object->model[1]);
Hu3DModelShadowMapObjSet(object->model[1], "base_story-base");
fn_1_1DFC(object, 1, 1, 0, 1);
object->model[2] = Hu3DModelCreateFile(0x660053);
object->motion[2] = Hu3DJointMotionFile(object->model[2], 0x660054);
object->motion[3] = Hu3DJointMotionFile(object->model[2], 0x660055);
object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x53));
object->motion[2] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x54));
object->motion[3] = Hu3DJointMotionFile(object->model[2], DATA_MAKE_NUM(DATADIR_MSTORY2, 0x55));
fn_1_1DFC(object, 2, 2, 0, 2);
object->model[5] = Hu3DModelCreateFile(0x660059);
object->model[5] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x59));
object->motion[5] = Hu3DMotionIDGet(object->model[5]);
Hu3DModelPosSet(object->model[5], 0, 80, 460);
Hu3DModelShadowSet(object->model[5]);
fn_1_1DFC(object, 5, 5, 0, 2);
object->model[6] = Hu3DModelCreateFile(0x66005A);
object->model[6] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, 0x5A));
object->motion[6] = Hu3DMotionIDGet(object->model[6]);
Hu3DModelHookSet(object->model[5], "koopasgbox_fix-effect_fook2", object->model[6]);
fn_1_1DFC(object, 6, 6, 0, 2);
@ -308,10 +308,10 @@ void fn_1_17338(void)
void fn_1_175CC(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x660062);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x660063);
object->motion[2] = Hu3DJointMotionFile(object->model[1], 0x660066);
object->motion[3] = Hu3DJointMotionFile(object->model[1], 0x660069);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x62 : 0x66));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x63 : 0x67));
object->motion[2] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x66 : 0x6A));
object->motion[3] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x69 : 0x6C));
Hu3DModelPosSet(object->model[1], 0, 0, 200);
Hu3DModelRotSet(object->model[1], 0, 0, 0);
Hu3DModelScaleSet(object->model[1], 1.6f, 1.6f, 1.6f);
@ -356,8 +356,8 @@ void fn_1_177F8(void)
void fn_1_17A70(omObjData *object)
{
object->model[1] = Hu3DModelCreateFile(0x66007D);
object->motion[1] = Hu3DJointMotionFile(object->model[1], 0x66007E);
object->model[1] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7D : 0x7B));
object->motion[1] = Hu3DJointMotionFile(object->model[1], DATA_MAKE_NUM(DATADIR_MSTORY2, VERSION_NTSC ? 0x7E : 0x7C));
Hu3DModelPosSet(object->model[1], -120, 0, 800);
Hu3DModelRotSet(object->model[1], 0, 135, 0);
Hu3DModelScaleSet(object->model[1], 1, 1, 1);

View file

@ -74,7 +74,10 @@ void fn_1_1B64C(void)
HuWinExAnimOut(var_r31);
HuWinExCleanup(var_r31);
if (SLSaveFlagGet() == 1 && temp_r30 == 0) {
if(omovlstat) {
#if VERSION_REV1
GWGameStat.story_continue = 1;
#endif
if (omovlstat) {
GWGameStat.story_continue = 0;
}
SLCommonSet();
@ -100,9 +103,10 @@ void fn_1_1B870(void)
do {
fn_1_BC8();
} while (lbl_1_bss_D14 != 1);
if(omovlstat == 0) {
if (omovlstat == 0) {
omOvlGotoEx(OVL_MSTORY2, 1, 4, 0);
} else {
}
else {
omOvlReturnEx(omovlhisidx, 1);
}
HuPrcEnd();