Fix dll killing, load modeseldll
This commit is contained in:
parent
c133583b3b
commit
176f6f9638
15 changed files with 159 additions and 52 deletions
|
|
@ -907,9 +907,12 @@ static void SMSound3DDraw(void);
|
|||
|
||||
static void SMSound3DInit(omObjData *object)
|
||||
{
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
s8 *data = msmSeGetIndexPtr(emiCompDataNo);
|
||||
emiCompVal = data[12];
|
||||
object->func = SMSound3DUpdate;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void SMSound3DUpdate(omObjData *object)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "version.h"
|
||||
|
||||
static void *cardWork;
|
||||
u8 UnMountCnt;
|
||||
SHARED_SYM u8 UnMountCnt;
|
||||
|
||||
static void MountCallBack(s32 chan, s32 result);
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ static UnkCharInstanceStruct charInstance[8];
|
|||
static s16 effectMdl[8];
|
||||
static EffectParamData *particleData[8];
|
||||
static Process *itemHookProcess[32];
|
||||
static u16 lbl_801975B0[8];
|
||||
static u8 lbl_801975C0[0x90]; // Unused?
|
||||
static u16 effectFlag[15];
|
||||
static u8 lbl_801975C0[0x82]; // Unused?
|
||||
|
||||
static s32 skipAnimUpdate;
|
||||
static void *effectAMemP;
|
||||
|
|
@ -1135,7 +1135,7 @@ void CharModelKill(s16 character)
|
|||
CharModelKill(i);
|
||||
}
|
||||
for (i = 0; i < 15; i++) {
|
||||
lbl_801975B0[i] = 0;
|
||||
effectFlag[i] = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1736,10 +1736,10 @@ void CharModelEffectEnableSet(s16 character, s32 arg1)
|
|||
|
||||
if (character >= 8) {
|
||||
if (arg1 == 0) {
|
||||
lbl_801975B0[character] |= 0x10;
|
||||
effectFlag[character] |= 0x10;
|
||||
}
|
||||
else {
|
||||
lbl_801975B0[character] &= ~0x10;
|
||||
effectFlag[character] &= ~0x10;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1835,7 +1835,7 @@ static void UpdateNpcEffect(void)
|
|||
temp_r26 = Hu3DMotionTimeGet(temp_r25);
|
||||
switch (temp_r27[2]) {
|
||||
case 0:
|
||||
if (!(temp_r26 & 0xF) && !(lbl_801975B0[temp_r28] & 0x10)) {
|
||||
if (!(temp_r26 & 0xF) && !(effectFlag[temp_r28] & 0x10)) {
|
||||
effectDustParam.unk0C.x = 2.0 * -sind(temp_r30->rot.y);
|
||||
effectDustParam.unk0C.y = 1.0 + 0.1 * frandmod(10);
|
||||
effectDustParam.unk0C.z = 2.0 * -cosd(temp_r30->rot.y);
|
||||
|
|
@ -1854,7 +1854,7 @@ static void UpdateNpcEffect(void)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if (!(temp_r26 & 3) && !(lbl_801975B0[temp_r28] & 0x10)) {
|
||||
if (!(temp_r26 & 3) && !(effectFlag[temp_r28] & 0x10)) {
|
||||
effectDustParam.unk0C.x = 4.0 * -sind(temp_r30->rot.y);
|
||||
effectDustParam.unk0C.y = 2.0 + 0.1 * frandmod(10);
|
||||
effectDustParam.unk0C.z = 4.0 * -cosd(temp_r30->rot.y);
|
||||
|
|
@ -1874,7 +1874,7 @@ static void UpdateNpcEffect(void)
|
|||
break;
|
||||
case 2:
|
||||
if (temp_r28 != -1) {
|
||||
if (!(temp_r26 & 0x1F) && !(lbl_801975B0[temp_r28] & 0x10)) {
|
||||
if (!(temp_r26 & 0x1F) && !(effectFlag[temp_r28] & 0x10)) {
|
||||
effectDustParam.unk0C.x = 2.0 * -sind(temp_r30->rot.y);
|
||||
effectDustParam.unk0C.y = 1.0 + 0.1 * frandmod(10);
|
||||
effectDustParam.unk0C.z = 2.0 * -cosd(temp_r30->rot.y);
|
||||
|
|
@ -1893,7 +1893,7 @@ static void UpdateNpcEffect(void)
|
|||
break;
|
||||
case 3:
|
||||
if (temp_r28 != -1) {
|
||||
if (!(temp_r26 & 3) && !(lbl_801975B0[temp_r28] & 0x10)) {
|
||||
if (!(temp_r26 & 3) && !(effectFlag[temp_r28] & 0x10)) {
|
||||
effectDustParam.unk0C.x = 2.0 * -sind(temp_r30->rot.y);
|
||||
effectDustParam.unk0C.y = 1.0 + 0.1 * frandmod(10);
|
||||
effectDustParam.unk0C.z = 2.0 * -cosd(temp_r30->rot.y);
|
||||
|
|
@ -1912,7 +1912,7 @@ static void UpdateNpcEffect(void)
|
|||
break;
|
||||
case 4:
|
||||
if (temp_r28 != -1) {
|
||||
if (!(temp_r26 & 7) && !(lbl_801975B0[temp_r28] & 0x10)) {
|
||||
if (!(temp_r26 & 7) && !(effectFlag[temp_r28] & 0x10)) {
|
||||
effectDustParam.unk0C.x = 2.0 * -sind(temp_r30->rot.y);
|
||||
effectDustParam.unk0C.y = 1.0 + 0.1 * frandmod(10);
|
||||
effectDustParam.unk0C.z = 2.0 * -cosd(temp_r30->rot.y);
|
||||
|
|
@ -1933,7 +1933,7 @@ static void UpdateNpcEffect(void)
|
|||
if (temp_r26 != 0) {
|
||||
break;
|
||||
}
|
||||
if (lbl_801975B0[temp_r28] & 0x10) {
|
||||
if (effectFlag[temp_r28] & 0x10) {
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define SHADOW_HEAP_SIZE 0x9000
|
||||
|
||||
ModelData Hu3DData[HU3D_MODEL_MAX];
|
||||
SHARED_SYM ModelData Hu3DData[HU3D_MODEL_MAX];
|
||||
CameraData Hu3DCamera[HU3D_CAM_MAX];
|
||||
static s16 layerNum[8];
|
||||
static void (*layerHook[8])(s16);
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ void omDLLUnlink(omDllData *dll_ptr, s16 flag)
|
|||
{
|
||||
OSReport("odjdll>Unlink DLL:%s\n", dll_ptr->name);
|
||||
#ifdef _WIN32
|
||||
FreeLibrary(dll_ptr->hModule);
|
||||
FreeLibrary(dll_ptr->hModule);
|
||||
#else
|
||||
if(flag == 1) {
|
||||
OSReport("objdll>Unlink DLL epilog\n");
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <game/sprite.h>
|
||||
#include "game/pad.h"
|
||||
#include "game/printfunc.h"
|
||||
#include "game/minigame_seq.h"
|
||||
#include "game/window.h"
|
||||
|
||||
|
||||
#define OM_OVL_HIS_MAX 16
|
||||
|
|
@ -46,6 +48,11 @@ char omUPauseFlag;
|
|||
SHARED_SYM s16 omSysExitReq;
|
||||
s16 omdispinfo;
|
||||
|
||||
#ifdef TARGET_PC
|
||||
OverlayID pcOvlToKill = OVL_INVALID;
|
||||
s16 pcOvlKillArg = 0;
|
||||
#endif
|
||||
|
||||
static omOvlHisData omovlhis[OM_OVL_HIS_MAX];
|
||||
|
||||
u8 omSysPauseEnableFlag = TRUE;
|
||||
|
|
@ -63,16 +70,19 @@ void omMasterInit(s32 prio, FileListEntry *ovl_list, s32 ovl_count, OverlayID st
|
|||
omovlhisidx = -1;
|
||||
omOvlCallEx(start_ovl, 1, 0, 0);
|
||||
omDBGSysKeyObj = NULL;
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
omSysPauseEnable(TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void omWatchOverlayProc(void)
|
||||
{
|
||||
while (1) {
|
||||
if (omcurovl == OVL_INVALID) {
|
||||
#ifdef TARGET_PC
|
||||
if (pcOvlToKill >= 0) {
|
||||
omDLLNumEnd(pcOvlToKill, pcOvlKillArg);
|
||||
pcOvlToKill = OVL_INVALID;
|
||||
}
|
||||
#endif
|
||||
if (omnextovl >= 0 && fadeStat == 0) {
|
||||
HuPrcSleep(0);
|
||||
OSReport("++++++++++++++++++++ Start New OVL %d (EVT:%d STAT:0x%08x) ++++++++++++++++++\n", omnextovl, omnextovlevtno, omnextovlstat);
|
||||
|
|
@ -84,22 +94,16 @@ static void omWatchOverlayProc(void)
|
|||
OSReport("objman>Init esp\n");
|
||||
espInit();
|
||||
OSReport("objman>Call objectsetup\n");
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
HuAudVoiceInit(omnextovl);
|
||||
HuAudDllSndGrpSet(omnextovl);
|
||||
#endif
|
||||
omcurovl = omnextovl;
|
||||
omovlevtno = omnextovlevtno;
|
||||
omovlstat = omnextovlstat;
|
||||
omnextovl = OVL_INVALID;
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
if (_CheckFlag(FLAG_ID_MAKE(1, 12))) {
|
||||
MGSeqPracticeInit();
|
||||
}
|
||||
omSysPauseEnable(TRUE);
|
||||
#endif
|
||||
omcurdll = omDLLStart(omcurovl, 0);
|
||||
OSReport("objman>ObjectSetup end\n");
|
||||
if (omcurovl != OVL_INVALID) {
|
||||
|
|
@ -130,6 +134,7 @@ void omOvlCallEx(OverlayID overlay, s16 arg2, s32 event, s32 stat)
|
|||
omovlhis[++omovlhisidx].overlay = overlay;
|
||||
omovlhis[omovlhisidx].event = event;
|
||||
omovlhis[omovlhisidx].stat = stat;
|
||||
|
||||
omOvlGotoEx(overlay, arg2, event, stat);
|
||||
}
|
||||
|
||||
|
|
@ -157,16 +162,10 @@ void omOvlReturnEx(s16 level, s16 arg2)
|
|||
|
||||
void omOvlKill(s16 arg)
|
||||
{
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
CharModelKill(-1);
|
||||
MGSeqKillAll();
|
||||
#endif
|
||||
Hu3DAllKill();
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
HuWinAllKill();
|
||||
#endif
|
||||
HuSprClose();
|
||||
HuPrcChildKill(omwatchproc);
|
||||
HuMemDirectFreeNum(HEAP_SYSTEM, MEMORY_DEFAULT_NUM);
|
||||
|
|
@ -174,13 +173,16 @@ void omOvlKill(s16 arg)
|
|||
HuMemDirectFreeNum(HEAP_DVD, MEMORY_DEFAULT_NUM);
|
||||
HuMemDirectFreeNum(HEAP_DATA, MEMORY_DEFAULT_NUM);
|
||||
HuPadRumbleAllStop();
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
HuAudFXListnerKill();
|
||||
#endif
|
||||
OSReport("OvlKill %d\n", arg);
|
||||
omSysExitReq = FALSE;
|
||||
#ifdef TARGET_PC
|
||||
// this function is called from the DLL, we can't kill it directly here
|
||||
pcOvlToKill = omcurovl;
|
||||
pcOvlKillArg = arg;
|
||||
#else
|
||||
omDLLNumEnd(omcurovl, arg);
|
||||
#endif
|
||||
omcurovl = OVL_INVALID;
|
||||
omDBGSysKeyObj = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1168,10 +1168,10 @@ s16 mgBattleStar[4];
|
|||
s16 mgBattleStarMax;
|
||||
u8 lbl_801D3E94;
|
||||
u32 mgRecordExtra;
|
||||
s32 mgQuitExtraF;
|
||||
s32 mgPracticeEnableF;
|
||||
SHARED_SYM s32 mgQuitExtraF;
|
||||
SHARED_SYM s32 mgPracticeEnableF;
|
||||
s32 mgInstExitEnableF;
|
||||
u8 mgBoardHostEnableF;
|
||||
SHARED_SYM u8 mgBoardHostEnableF;
|
||||
|
||||
s16 mgTicTacToeGrid[3][3];
|
||||
u8 mgIndexList[256];
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ static void SLKillSaveWin(void);
|
|||
|
||||
extern u8 UnMountCnt;
|
||||
|
||||
CARDFileInfo curFileInfo;
|
||||
SaveBufAll saveBuf;
|
||||
SHARED_SYM CARDFileInfo curFileInfo;
|
||||
SHARED_SYM SaveBufAll saveBuf;
|
||||
|
||||
u64 SLSerialNo;
|
||||
s32 saveExecF;
|
||||
u8 curBoxNo;
|
||||
s16 curSlotNo;
|
||||
SHARED_SYM s16 curSlotNo;
|
||||
|
||||
#if VERSION_JP
|
||||
static u8 commentTbl[2][32] = { "マリオパーティ4", "??月??日 データ?です。" };
|
||||
|
|
@ -42,7 +42,7 @@ static u8 sjisNumTbl[20] = "0123456789";
|
|||
static u8 commentTbl[2][32] = { "Mario Party 4", "File 0 00/00/0000" };
|
||||
#endif
|
||||
|
||||
char *SaveFileNameTbl[] = { "MARIPA4BOX0", "MARIPA4BOX1", "MARIPA4BOX2" };
|
||||
SHARED_SYM char *SaveFileNameTbl[] = { "MARIPA4BOX0", "MARIPA4BOX1", "MARIPA4BOX2" };
|
||||
|
||||
s32 SaveEnableF = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -686,6 +686,15 @@ s32 msmMusSetParam(s32 arg0, MSM_MUSPARAM* arg1)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void msmMusSetMasterVolume(s32 vol)
|
||||
{
|
||||
}
|
||||
|
||||
s32 msmSysGetOutputMode(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 HuSoftResetButtonCheck(void)
|
||||
{
|
||||
//puts("HuSoftResetButtonCheck is a stub");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue