mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 13:08:33 -04:00
add wii usa rev0 support (#2505)
* wii usa rev0 dol building ok * wii dol cleanup * some wii tests * most rels building
This commit is contained in:
@@ -24,7 +24,7 @@ JKRHeap* JKRHeap::sCurrentHeap;
|
||||
/* 80451378-8045137C 000878 0004+00 3/3 10/10 0/0 .sbss sRootHeap__7JKRHeap */
|
||||
JKRHeap* JKRHeap::sRootHeap;
|
||||
|
||||
#ifdef DEBUG
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
JKRHeap* JKRHeap::sRootHeap2;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#include "d/d_home_button.h"
|
||||
#include "Z2AudioLib/Z2AudioMgr.h"
|
||||
|
||||
int SECallback(int param_0, int param_1) {
|
||||
if (param_0 == 5) {
|
||||
Z2AudioMgr::getInterface()->homeMenuSeCallback(param_1);
|
||||
return 1;
|
||||
} else {
|
||||
OSReport("SECallback: %d, %d\n", param_0, param_1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void dHomeButton_c::create_(int param_0, void* param_1) {
|
||||
initCursorPos();
|
||||
initHomeButtonInfo(param_0, param_1);
|
||||
|
||||
m_info.mem = JKRGetRootHeap2()->alloc(0x80000, 0);
|
||||
m_info.memSize = 0x80000;
|
||||
m_info.pAllocator = 0;
|
||||
|
||||
HBMCreate(&m_info);
|
||||
}
|
||||
|
||||
int dHomeButton_c::execute_() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void dHomeButton_c::initHomeButtonInfo(int param_0, void* param_1) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void dHomeButton_c::initCursorPos() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void dHomeButton_c::calcCursorPos() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void dHomeButton_c::onReset() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void dHomeButton_c::create(int param_0, void* param_1) {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
int dHomeButton_c::execute() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
void dHomeButton_c::drawCapture(u8 param_0, void (*param_1)(J2DOrthoGraph&, void*), void* param_2) {
|
||||
// NONMATCHING
|
||||
}
|
||||
+11
-1
@@ -193,7 +193,11 @@ static bool objectSetCheck(room_of_scene_class* i_this) {
|
||||
if (*dStage_roomControl_c::getDemoArcName() != '\0') {
|
||||
int phase = dComIfG_syncObjectRes(dStage_roomControl_c::getDemoArcName());
|
||||
|
||||
if (phase >= 0 && phase > 0) {
|
||||
if (phase < 0) {
|
||||
#if VERSION == VERSION_WII_USA_R0
|
||||
dStage_escapeRestart();
|
||||
#endif
|
||||
} else if (phase > 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -342,6 +346,9 @@ static int phase_1(room_of_scene_class* i_this) {
|
||||
}
|
||||
|
||||
if (!dComIfG_setStageRes(arcName, heap)) {
|
||||
#if VERSION == VERSION_WII_USA_R0
|
||||
dStage_escapeRestart();
|
||||
#endif
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
@@ -355,6 +362,9 @@ static int phase_2(room_of_scene_class* i_this) {
|
||||
int phase = dComIfG_syncStageRes(arcName);
|
||||
|
||||
if (phase < 0) {
|
||||
#if VERSION == VERSION_WII_USA_R0
|
||||
dStage_escapeRestart();
|
||||
#endif
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1079,7 +1079,7 @@ void dSv_player_config_c::init() {
|
||||
unk0 = 1;
|
||||
#endif
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
#if PLATFORM_GCN
|
||||
if (OSGetSoundMode() == OS_SOUND_MODE_MONO) {
|
||||
mSoundMode = OS_SOUND_MODE_MONO;
|
||||
Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_MONO);
|
||||
@@ -1110,7 +1110,7 @@ void dSv_player_config_c::init() {
|
||||
|
||||
/* 80034644-80034684 02EF84 0040+00 0/0 4/4 0/0 .text checkVibration__19dSv_player_config_cCFv */
|
||||
u32 dSv_player_config_c::checkVibration() const {
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
#if PLATFORM_GCN
|
||||
return JUTGamePad::sRumbleSupported & 0x80000000 ? dComIfGp_getNowVibration() : 0;
|
||||
#else
|
||||
return dComIfGp_getNowVibration();
|
||||
@@ -1979,7 +1979,7 @@ int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) {
|
||||
memcpy(dComIfGs_getSaveData(), i_cardPtr, sizeof(dSv_save_c));
|
||||
i_cardPtr += sizeof(dSv_save_c);
|
||||
|
||||
#if VERSION != VERSION_SHIELD_DEBUG
|
||||
#if PLATFORM_GCN
|
||||
if (OSGetSoundMode() == OS_SOUND_MODE_MONO) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(OS_SOUND_MODE_MONO);
|
||||
Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_MONO);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "stdio.h"
|
||||
#include "SSystem/SComponent/c_malloc.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/d_lib.h"
|
||||
#include "d/d_map_path_dmap.h"
|
||||
#include "d/d_map_path_fmap.h"
|
||||
@@ -2793,3 +2794,11 @@ void dStage_restartRoom(u32 roomParam, u32 mode, int param_2) {
|
||||
mode, 0, 0, 0, param_2, 0);
|
||||
dComIfGs_setRestartRoomParam(roomParam);
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_WII_USA_R0
|
||||
void dStage_escapeRestart() {
|
||||
daAlink_c* player_p = daAlink_getAlinkActorClass();
|
||||
dComIfGs_setTurnRestart(player_p->current.pos, player_p->shape_angle.y, fopAcM_GetRoomNo(player_p), fopAcM_GetParam(player_p));
|
||||
dComIfGp_setNextStage(dComIfGp_getStartStageName(), -2, dComIfGs_getTurnRestartRoomNo(), -1, 0.0f, 0, 0, 9, 0, 1, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -17,23 +17,35 @@ interface_of_controller_pad mDoCPd_c::m_cpadInfo[4];
|
||||
|
||||
/* 80007954-80007A94 002294 0140+00 0/0 1/1 0/0 .text create__8mDoCPd_cFv */
|
||||
void mDoCPd_c::create() {
|
||||
#if PLATFORM_GCN || PLATFORM_SHIELD
|
||||
JUTGamePad* pad = new JUTGamePad(JUTGamePad::EPort1);
|
||||
m_gamePad[0] = pad;
|
||||
#endif
|
||||
|
||||
if (mDoMain::developmentMode != 0) {
|
||||
#if PLATFORM_WII
|
||||
m_gamePad[0] = new JUTGamePad(JUTGamePad::EPort1);
|
||||
#endif
|
||||
|
||||
m_gamePad[1] = new JUTGamePad(JUTGamePad::EPort2);
|
||||
m_gamePad[2] = new JUTGamePad(JUTGamePad::EPort3);
|
||||
m_gamePad[3] = new JUTGamePad(JUTGamePad::EPort4);
|
||||
} else {
|
||||
#if PLATFORM_WII
|
||||
m_gamePad[0] = NULL;
|
||||
#endif
|
||||
|
||||
m_gamePad[1] = NULL;
|
||||
m_gamePad[2] = NULL;
|
||||
m_gamePad[3] = NULL;
|
||||
}
|
||||
|
||||
#if PLATFORM_GCN || PLATFORM_SHIELD
|
||||
if (!mDoRst::isReset()) {
|
||||
JUTGamePad::clearResetOccurred();
|
||||
JUTGamePad::setResetCallback(mDoRst_resetCallBack, NULL);
|
||||
}
|
||||
#endif
|
||||
JUTGamePad::setAnalogMode(3);
|
||||
|
||||
interface_of_controller_pad* cpad = &m_cpadInfo[0];
|
||||
|
||||
Reference in New Issue
Block a user