mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-24 15:43:13 -04:00
wip
This commit is contained in:
+131
-9
@@ -6443,7 +6443,7 @@ asm bool daAlink_c::getStickAngleFromPlayerShape(s16* param_0) const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daAlink_c::commonLineCheck(cXyz* param_0, cXyz* param_1) {
|
||||
asm bool daAlink_c::commonLineCheck(cXyz* param_0, cXyz* param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_alink/commonLineCheck__9daAlink_cFP4cXyzP4cXyz.s"
|
||||
}
|
||||
@@ -14470,7 +14470,7 @@ COMPILER_STRIP_GATE(0x80391FEC, &swimOffset);
|
||||
static u8 lit_4409[12];
|
||||
|
||||
/* 80425514-80425520 052234 000C+00 32/35 0/0 0/0 .bss l_waitBaseAnime */
|
||||
static f32 l_waitBaseAnime[3];
|
||||
static Vec l_waitBaseAnime;
|
||||
|
||||
/* 80425520-8042552C 052240 000C+00 0/1 0/0 0/0 .bss @4410 */
|
||||
#pragma push
|
||||
@@ -17963,9 +17963,7 @@ bool daAlink_c::procSlideLandInit(int param_0) {
|
||||
field_0x3478 = daAlinkHIO_slide_c0::m.mForwardLandAnm.field_0x10;
|
||||
field_0x3198 = 1;
|
||||
field_0x2f99 = 4;
|
||||
field_0x3588.x = l_waitBaseAnime[0];
|
||||
field_0x3588.y = l_waitBaseAnime[1];
|
||||
field_0x3588.z = l_waitBaseAnime[2];
|
||||
field_0x3588 = l_waitBaseAnime;
|
||||
} else {
|
||||
setSingleAnimeParam(ANM_FORWARD_SLIDE_LAND, &daAlinkHIO_slide_c0::m.mBackwardLandAnm);
|
||||
field_0x3478 = daAlinkHIO_slide_c0::m.mBackwardLandAnm.field_0x10;
|
||||
@@ -18411,9 +18409,132 @@ static u8 lit_4420[12];
|
||||
#pragma pop
|
||||
|
||||
/* 8042561C-80425628 05233C 000C+00 37/39 0/0 0/0 .bss l_wolfBaseAnime */
|
||||
static f32 l_wolfBaseAnime[3];
|
||||
static Vec l_wolfBaseAnime;
|
||||
|
||||
inline dEvt_control_c& i_dComIfGp_getEvent() {
|
||||
return g_dComIfG_gameInfo.play.getEvent();
|
||||
}
|
||||
|
||||
bool daMidna_c::checkMidnaRealBody() {
|
||||
return dKy_darkworld_check() == 1 || dComIfGs_isTransformLV(3);
|
||||
}
|
||||
|
||||
/* 800C77F4-800C7C64 0C2134 0470+00 4/2 0/0 0/0 .text procCoMetamorphoseInit__9daAlink_cFv */
|
||||
// 1 missing instruction, lots of regalloc. maybe related
|
||||
#ifdef NONMATCHING
|
||||
bool daAlink_c::procCoMetamorphoseInit() {
|
||||
int svar8 = 0;
|
||||
|
||||
if (i_dComIfGp_getEvent().i_isOrderOK()) {
|
||||
if (!dComIfGp_event_compulsory(this, NULL, 0xFFFF)) {
|
||||
return 0;
|
||||
}
|
||||
mDemo.i_setSpecialDemoType();
|
||||
mDamageTimer = 0;
|
||||
svar8 = 1;
|
||||
}
|
||||
|
||||
if (!commonProcInitNotSameProc(METAMORPHOSE)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
field_0x3198 = svar8;
|
||||
field_0x3008 = 0;
|
||||
field_0x300e = 0;
|
||||
field_0x3010 = 0;
|
||||
field_0x347c = 1.0f;
|
||||
mFallVoiceInit = 0;
|
||||
|
||||
if ((i_checkWolf() && mDemo.getDemoMode() == 0x39) || (!i_checkWolf() && mDemo.getDemoMode() == 0x3A)) {
|
||||
field_0x300a = 1;
|
||||
mSpeed.y = 0.0f;
|
||||
mNormalSpeed = 0.0f;
|
||||
if (i_checkWolf()) {
|
||||
mCommonCounter = mCollisionRot.x;
|
||||
}
|
||||
} else {
|
||||
deleteEquipItem(0, 1);
|
||||
|
||||
if (i_checkEndResetFlg0(ERFLG0_UNK_2) && checkStageName("D_MN08")) {
|
||||
field_0x3010 = 1;
|
||||
}
|
||||
field_0x300a = 0;
|
||||
|
||||
if (i_checkWolf()) {
|
||||
// Transform Wolf -> Human
|
||||
setSingleAnimeWolfBase(ANM_TRANFORM_HUMAN);
|
||||
field_0x3588 = l_wolfBaseAnime;
|
||||
field_0x347c = 0.5f;
|
||||
field_0x3480 = daAlinkHIO_basic_c0::m.mWolfLinkTransformSpeed;
|
||||
mCommonCounter = mCollisionRot.x;
|
||||
|
||||
daMidna_c* midna = getMidnaActor();
|
||||
if (i_checkMidnaRide() && midna->checkMidnaRealBody() && midna->checkDemoTypeNone()) {
|
||||
midna->changeOriginalDemo();
|
||||
midna->changeDemoMode(15);
|
||||
}
|
||||
} else {
|
||||
// Transform Human -> Wolf
|
||||
if (mDemo.getDemoMode() == 0x39 && mDemo.getParam1() == 1) {
|
||||
voiceStart(Z2SE_AL_V_TRANSFORM);
|
||||
}
|
||||
setSingleAnimeBase(ANM_TRANSFORM_WOLF);
|
||||
setMetamorphoseModel(1);
|
||||
field_0x3588 = l_waitBaseAnime;
|
||||
field_0x3480 = daAlinkHIO_basic_c0::m.mLinkWolfTransformSpeed;
|
||||
|
||||
cXyz pos(mCurrent.mPosition.x + (cM_ssin(mCollisionRot.y) * 100.0f),
|
||||
mCurrent.mPosition.y + 300.0f,
|
||||
mCurrent.mPosition.z + (cM_scos(mCollisionRot.y) * 100.0f));
|
||||
mLinkGndChk.SetPos(&pos);
|
||||
|
||||
f32 gnd_cross = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
|
||||
if (gnd_cross != -1000000000.0f) {
|
||||
pos.y = -1000000000.0f;
|
||||
cXyz tmp_4c = mCurrent.mPosition;
|
||||
cXyz tmp_58 = pos;
|
||||
BOOL check = false;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (i == 3) {
|
||||
tmp_4c.y = gnd_cross + 5.0f;
|
||||
} else {
|
||||
tmp_4c.y = mCurrent.mPosition.y + field_0x18B0[i].GetWallH();
|
||||
}
|
||||
tmp_58.y = tmp_4c.y;
|
||||
|
||||
|
||||
if (commonLineCheck(&tmp_4c, &tmp_58) && dBgS_CheckBWallPoly(mLinkLinChk)) {
|
||||
if (dComIfG_Bgsp().GetWallCode(mLinkLinChk) != 7) {
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (check) {
|
||||
mCommonCounter = field_0x2ff0;
|
||||
} else {
|
||||
pos -= mCurrent.mPosition;
|
||||
pos.atan2sY_XZ();
|
||||
mCommonCounter = svar8;
|
||||
|
||||
if (cM_deg2s(70.0f) < abs(mCommonCounter)) {
|
||||
mCommonCounter = field_0x2ff0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mCommonCounter = 0;
|
||||
}
|
||||
}
|
||||
mSpeed.y = 0.0f;
|
||||
mNormalSpeed = 0.0f;
|
||||
field_0x3012 = 0;
|
||||
}
|
||||
|
||||
field_0x3484 = mCurrent.mPosition.y;
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -18422,6 +18543,7 @@ asm bool daAlink_c::procCoMetamorphoseInit() {
|
||||
#include "asm/d/a/d_a_alink/procCoMetamorphoseInit__9daAlink_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80392070-8039207C 01E6D0 000C+00 0/1 0/0 0/0 .rodata @74273 */
|
||||
@@ -19258,11 +19380,11 @@ u8 daAlink_c::getClothesChangeWaitTimer() const {
|
||||
|
||||
/* 800D01A8-800D01E0 0CAAE8 0038+00 1/0 0/0 0/0 .text checkHorseStart__9daAlink_cFv */
|
||||
u32 daPy_py_c::getLastSceneMode() {
|
||||
return dComIfGs_getLastSceneMode();
|
||||
return dComIfGs_getLastSceneMode() & 0xF;
|
||||
}
|
||||
|
||||
BOOL daAlink_c::checkHorseStart() {
|
||||
return checkHorseStart(getLastSceneMode() & 0xF, getStartMode());
|
||||
return checkHorseStart(getLastSceneMode(), getStartMode());
|
||||
}
|
||||
|
||||
/* 800D01E0-800D0208 0CAB20 0028+00 1/0 0/0 0/0 .text checkCutTurnCharge__9daAlink_cCFv
|
||||
@@ -22110,7 +22232,7 @@ fopAc_ac_c* daAlink_c::getBoomerangActor() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daAlink_c::checkBoomerangChargeEnd() {
|
||||
asm bool daAlink_c::checkBoomerangChargeEnd() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_alink/checkBoomerangChargeEnd__9daAlink_cFv.s"
|
||||
}
|
||||
|
||||
+236
-224
@@ -11,6 +11,7 @@
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_actor_iter.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "rel/d/a/d_a_boomerang/d_a_boomerang.h"
|
||||
|
||||
//
|
||||
@@ -23,12 +24,6 @@ struct mDoMtx_stack_c {
|
||||
static u8 now[48];
|
||||
};
|
||||
|
||||
struct J3DAnmLoaderDataBaseFlag {};
|
||||
|
||||
struct J3DAnmLoaderDataBase {
|
||||
/* 80337B40 */ void load(void const*, J3DAnmLoaderDataBaseFlag);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -146,6 +141,10 @@ extern "C" u8 sOldVcdVatCmd__8J3DShape[4];
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
inline s8 dComIfGp_getPlayerCameraID(int idx) {
|
||||
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453600-80453608 001C00 0004+04 6/6 0/0 0/0 .sdata2 @4215 */
|
||||
SECTION_SDATA2 static f32 lit_4215[1 + 1 /* padding */] = {
|
||||
@@ -302,37 +301,15 @@ asm void daPy_boomerangMove_c::bgCheckAfterOffset(cXyz const* param_0) {
|
||||
#endif
|
||||
|
||||
/* 8015EA0C-8015EA20 15934C 0014+00 0/0 3/3 0/0 .text setParamData__9daPy_py_cFiiii */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm u32 daPy_py_c::setParamData(int param_0, int param_1, int param_2, int param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setParamData__9daPy_py_cFiiii.s"
|
||||
u32 daPy_py_c::setParamData(int param_0, int param_1, int param_2, int param_3) {
|
||||
return param_3 | (param_0 & 0x3F | (param_1 & 0x1F) << 0xC | param_2 << 0x18);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015EA20-8015EA48 159360 0028+00 0/0 10/10 3/3 .text checkFishingRodItem__9daPy_py_cFi
|
||||
*/
|
||||
#ifdef NONMATCHING
|
||||
BOOL daPy_py_c::checkFishingRodItem(int i_item_id) {
|
||||
bool is_fishing_item = false;
|
||||
|
||||
if (i_item_id == FISHING_ROD_1 || i_item_id < BEE_ROD || i_item_id <= JEWEL_WORM_ROD) {
|
||||
is_fishing_item = true;
|
||||
}
|
||||
|
||||
return is_fishing_item;
|
||||
BOOL daPy_py_c::checkFishingRodItem(int i_itemNo) {
|
||||
return i_itemNo == FISHING_ROD_1 || (i_itemNo >= BEE_ROD && i_itemNo <= JEWEL_WORM_ROD);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm BOOL daPy_py_c::checkFishingRodItem(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkFishingRodItem__9daPy_py_cFi.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8015EA48-8015EA88 159388 0040+00 0/0 3/3 0/0 .text checkBombItem__9daPy_py_cFi */
|
||||
#pragma push
|
||||
@@ -345,25 +322,17 @@ asm BOOL daPy_py_c::checkBombItem(int param_0) {
|
||||
#pragma pop
|
||||
|
||||
/* 8015EA88-8015EAD8 1593C8 0050+00 0/0 5/5 0/0 .text checkBottleItem__9daPy_py_cFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm BOOL daPy_py_c::checkBottleItem(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkBottleItem__9daPy_py_cFi.s"
|
||||
// is there a way to write this with a switch?
|
||||
BOOL daPy_py_c::checkBottleItem(int i_itemNo) {
|
||||
return (i_itemNo >= EMPTY_BOTTLE && i_itemNo <= FAIRY) || i_itemNo == BEE_CHILD || i_itemNo == WORM || i_itemNo == FAIRY_DROP || i_itemNo == CHUCHU_BLACK || (i_itemNo >= CHUCHU_RARE && i_itemNo <= LV3_SOUP);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015EAD8-8015EB40 159418 0068+00 0/0 3/3 0/0 .text checkDrinkBottleItem__9daPy_py_cFi
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::checkDrinkBottleItem(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkDrinkBottleItem__9daPy_py_cFi.s"
|
||||
// is there a way to write this with a switch?
|
||||
BOOL daPy_py_c::checkDrinkBottleItem(int i_itemNo) {
|
||||
return (i_itemNo >= RED_BOTTLE && i_itemNo <= HALF_MILK_BOTTLE) || i_itemNo == RED_BOTTLE_2 || i_itemNo == UGLY_SOUP || i_itemNo == HOT_SPRING || i_itemNo == BEE_CHILD || i_itemNo == CHUCHU_BLACK || i_itemNo == FAIRY_DROP || (i_itemNo >= CHUCHU_RARE && i_itemNo != CHUCHU_YELLOW && i_itemNo <= LV3_SOUP);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015EB40-8015EB68 159480 0028+00 0/0 4/4 0/0 .text checkOilBottleItem__9daPy_py_cFi */
|
||||
BOOL daPy_py_c::checkOilBottleItem(int i_itemNo) {
|
||||
@@ -388,14 +357,9 @@ BOOL daPy_py_c::checkHookshotItem(int i_itemNo) {
|
||||
}
|
||||
|
||||
/* 8015EBD8-8015EC28 159518 0050+00 0/0 3/3 0/0 .text checkTradeItem__9daPy_py_cFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm BOOL daPy_py_c::checkTradeItem(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkTradeItem__9daPy_py_cFi.s"
|
||||
BOOL daPy_py_c::checkTradeItem(int i_itemNo) {
|
||||
return (i_itemNo >= LETTER && i_itemNo <= IRIAS_PENDANT) || i_itemNo == ANCIENT_DOCUMENT || i_itemNo == AIR_LETTER || i_itemNo == ANCIENT_DOCUMENT2 || i_itemNo == RAFRELS_MEMO || i_itemNo == TKS_LETTER || i_itemNo == ASHS_SCRIBBLING;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015EC28-8015EC48 159568 0020+00 0/0 2/2 0/0 .text checkDungeonWarpItem__9daPy_py_cFi
|
||||
*/
|
||||
@@ -450,33 +414,46 @@ void daPy_anmHeap_c::initData() {
|
||||
}
|
||||
|
||||
/* 8015EDC4-8015EE00 159704 003C+00 0/0 1/1 1/1 .text mallocBuffer__14daPy_anmHeap_cFv */
|
||||
#ifdef NONMATCHING
|
||||
void* daPy_anmHeap_c::mallocBuffer() {
|
||||
void* buf = new (0x20) void*[mBufferSize];
|
||||
mBuffer = buf;
|
||||
mBuffer = new (0x20) char[mBufferSize];
|
||||
return mBuffer;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void* daPy_anmHeap_c::mallocBuffer() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/mallocBuffer__14daPy_anmHeap_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8015EE00-8015EF84 159740 0184+00 0/0 1/1 1/1 .text
|
||||
* createHeap__14daPy_anmHeap_cFQ214daPy_anmHeap_c16daAlinkHEAP_TYPE */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_anmHeap_c::createHeap(daPy_anmHeap_c::daAlinkHEAP_TYPE param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/createHeap__14daPy_anmHeap_cFQ214daPy_anmHeap_c16daAlinkHEAP_TYPE.s"
|
||||
void daPy_anmHeap_c::createHeap(daPy_anmHeap_c::daAlinkHEAP_TYPE heap_type) {
|
||||
u32 size;
|
||||
|
||||
if (heap_type == 4) {
|
||||
size = mBufferSize;
|
||||
} else if (heap_type == 3) {
|
||||
size = 0x50;
|
||||
} else if (heap_type == 0) {
|
||||
size = 0x40;
|
||||
} else if (heap_type == 1) {
|
||||
size = 0x40;
|
||||
} else {
|
||||
size = 0xA0;
|
||||
}
|
||||
|
||||
JKRHeap* tmp;
|
||||
mAnimeHeap = mDoExt_createSolidHeapFromGameToCurrent(&tmp, size, 0x20);
|
||||
|
||||
if (heap_type == 4) {
|
||||
char* tmpWork = new char[size];
|
||||
} else if (heap_type == 3) {
|
||||
mDoExt_transAnmBas* tmpTransBas = new mDoExt_transAnmBas(NULL);
|
||||
} else if (heap_type == 0) {
|
||||
J3DAnmTransformKey* tmpTrans = new J3DAnmTransformKey();
|
||||
} else if (heap_type == 1) {
|
||||
J3DAnmTexPattern* tmpTp = new J3DAnmTexPattern();
|
||||
} else {
|
||||
J3DAnmTextureSRTKey* tmpTk = new J3DAnmTextureSRTKey();
|
||||
}
|
||||
|
||||
mDoExt_setCurrentHeap(tmp);
|
||||
mDoExt_adjustSolidHeap(mAnimeHeap);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80453648-80453650 001C48 0008+00 1/0 0/0 0/0 .sdata2 sumouArcName$4614 */
|
||||
@@ -519,59 +496,66 @@ SECTION_SDATA2 static char lastGanonArcName[8] = "B_gnd";
|
||||
SECTION_SDATA2 static char pigGanonArcName[8] = "B_mgn";
|
||||
|
||||
/* 8015EF84-8015F068 1598C4 00E4+00 3/3 0/0 0/0 .text loadData__14daPy_anmHeap_cFUs */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm J3DAnmBase* daPy_anmHeap_c::loadData(u16 param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/loadData__14daPy_anmHeap_cFUs.s"
|
||||
void* daPy_anmHeap_c::loadData(u16 id) {
|
||||
if (mArcNo == 0xFFFF) {
|
||||
dComIfGp_getAnmArchive()->readIdxResource(mBuffer, mBufferSize, id);
|
||||
JKRHeap* heap = setAnimeHeap();
|
||||
void* data = J3DAnmLoaderDataBase::load(mBuffer, UNK_FLAG0);
|
||||
mDoExt_setCurrentHeap(heap);
|
||||
return data;
|
||||
}
|
||||
|
||||
if (mArcNo == 0) {
|
||||
return dComIfG_getObjectIDRes(dStage_roomControl_c::getDemoArcName(), id);
|
||||
}
|
||||
|
||||
return dComIfG_getObjectRes(arcName[mArcNo - 1], id);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F068-8015F0D0 1599A8 0068+00 0/0 9/9 5/5 .text loadDataIdx__14daPy_anmHeap_cFUs */
|
||||
J3DAnmBase* daPy_anmHeap_c::loadDataIdx(u16 pID) {
|
||||
J3DAnmBase* tmp;
|
||||
void* daPy_anmHeap_c::loadDataIdx(u16 id) {
|
||||
void* data;
|
||||
|
||||
if (pID == mIdx && mArcNo == 0xffff) {
|
||||
tmp = NULL;
|
||||
if (id == mIdx && mArcNo == 0xFFFF) {
|
||||
data = NULL;
|
||||
} else {
|
||||
mIdx = pID;
|
||||
mArcNo = 0xffff;
|
||||
if (mPriIdx == 0xffff) {
|
||||
tmp = loadData(pID);
|
||||
mIdx = id;
|
||||
mArcNo = 0xFFFF;
|
||||
if (mPriIdx == 0xFFFF) {
|
||||
data = loadData(id);
|
||||
} else {
|
||||
tmp = NULL;
|
||||
data = NULL;
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
return data;
|
||||
}
|
||||
|
||||
/* 8015F0D0-8015F118 159A10 0048+00 0/0 3/3 0/0 .text loadDataPriIdx__14daPy_anmHeap_cFUs
|
||||
*/
|
||||
J3DAnmBase* daPy_anmHeap_c::loadDataPriIdx(u16 pID) {
|
||||
J3DAnmBase* tmp;
|
||||
void* daPy_anmHeap_c::loadDataPriIdx(u16 id) {
|
||||
void* data;
|
||||
|
||||
if (pID == mPriIdx || mArcNo != 0xffff) {
|
||||
tmp = NULL;
|
||||
if (id == mPriIdx || mArcNo != 0xFFFF) {
|
||||
data = NULL;
|
||||
} else {
|
||||
mPriIdx = pID;
|
||||
tmp = loadData(pID);
|
||||
mPriIdx = id;
|
||||
data = loadData(id);
|
||||
}
|
||||
return tmp;
|
||||
return data;
|
||||
}
|
||||
|
||||
/* 8015F118-8015F168 159A58 0050+00 0/0 5/5 5/5 .text loadDataDemoRID__14daPy_anmHeap_cFUsUs */
|
||||
J3DAnmBase* daPy_anmHeap_c::loadDataDemoRID(u16 pID, u16 pArcNo) {
|
||||
J3DAnmBase* tmp;
|
||||
void* daPy_anmHeap_c::loadDataDemoRID(u16 id, u16 arc_no) {
|
||||
void* data;
|
||||
|
||||
if (pID == mIdx && pArcNo == mArcNo) {
|
||||
tmp = NULL;
|
||||
if (id == mIdx && arc_no == mArcNo) {
|
||||
data = NULL;
|
||||
} else {
|
||||
mIdx = pID;
|
||||
mArcNo = pArcNo;
|
||||
tmp = loadData(pID);
|
||||
mIdx = id;
|
||||
mArcNo = arc_no;
|
||||
data = loadData(id);
|
||||
}
|
||||
return tmp;
|
||||
return data;
|
||||
}
|
||||
|
||||
/* 8015F168-8015F1A0 159AA8 0038+00 1/1 4/4 0/0 .text setAnimeHeap__14daPy_anmHeap_cFv */
|
||||
@@ -582,7 +566,7 @@ JKRHeap* daPy_anmHeap_c::setAnimeHeap() {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803BA0C0-803BA14C 0171E0 0089+03 1/1 0/0 0/0 .data l_sightDL */
|
||||
SECTION_DATA static u8 l_sightDL[137 + 3 /* padding */] = {
|
||||
SECTION_DATA static u8 l_sightDL[137] = {
|
||||
0x10,
|
||||
0x00,
|
||||
0x00,
|
||||
@@ -720,10 +704,6 @@ SECTION_DATA static u8 l_sightDL[137 + 3 /* padding */] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
/* padding */
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 80453678-8045367C 001C78 0004+00 1/1 0/0 0/0 .sdata2 @4668 */
|
||||
@@ -759,14 +739,10 @@ asm void daPy_sightPacket_c::setSight() {
|
||||
|
||||
/* 8015F384-8015F398 159CC4 0014+00 0/0 1/1 0/0 .text
|
||||
* setSightImage__18daPy_sightPacket_cFP7ResTIMG */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_sightPacket_c::setSightImage(ResTIMG* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setSightImage__18daPy_sightPacket_cFP7ResTIMG.s"
|
||||
void daPy_sightPacket_c::setSightImage(ResTIMG* p_img) {
|
||||
mpImg = p_img;
|
||||
mpData = (u8*)p_img + p_img->texDataOffset;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F398-8015F3C4 159CD8 002C+00 0/0 8/8 10/10 .text checkMasterSwordEquip__9daPy_py_cFv */
|
||||
BOOL daPy_py_c::checkMasterSwordEquip() {
|
||||
@@ -811,72 +787,74 @@ s16 daPy_py_c::checkNowWolfEyeUp() {
|
||||
|
||||
/* 8015F438-8015F478 159D78 0040+00 0/0 0/0 1/1 .text forceRestartRoom__9daPy_py_cFiUli
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::forceRestartRoom(int param_0, u32 param_1, int param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/forceRestartRoom__9daPy_py_cFiUli.s"
|
||||
// move these inlines?
|
||||
inline BOOL i_dComIfGp_event_runCheck() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().runCheck();
|
||||
}
|
||||
|
||||
void daAlink_c::startRestartRoomFromOut(int param_0, u32 param_1, int param_2) {
|
||||
startRestartRoom(param_1, param_2, param_0, i_dComIfGp_event_runCheck());
|
||||
}
|
||||
|
||||
void daPy_py_c::forceRestartRoom(int param_0, u32 param_1, int param_2) {
|
||||
daAlink_getAlinkActorClass()->startRestartRoomFromOut(param_0, param_1, param_2);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F478-8015F4B8 159DB8 0040+00 0/0 0/0 3/3 .text
|
||||
* setFmChainPos__9daPy_py_cFP10fopAc_ac_cP4cXyzi */
|
||||
#ifdef NONMATCHING
|
||||
void daPy_py_c::setFmChainPos(fopAc_ac_c* param_0, cXyz* param_1, int param_2) {
|
||||
daAlink_getAlinkActorClass()->setFmChainPosFromOut(param_0, param_1, param_2);
|
||||
}
|
||||
|
||||
/* 8015F4B8-8015F4F0 159DF8 0038+00 0/0 0/0 1/1 .text cancelFmChainGrab__9daPy_py_cFv */
|
||||
void daPy_py_c::cancelFmChainGrab() {
|
||||
daAlink_getAlinkActorClass()->cancelFmChainGrabFromOut();
|
||||
}
|
||||
|
||||
/* 8015F4F0-8015F520 159E30 0030+00 0/0 0/0 17/17 .text setLookPos__9daPy_py_cFP4cXyz */
|
||||
void daPy_py_c::setLookPos(cXyz* p_pos) {
|
||||
daAlink_getAlinkActorClass()->setLookPosFromOut(p_pos);
|
||||
}
|
||||
|
||||
/* 8015F520-8015F55C 159E60 003C+00 0/0 0/0 4/4 .text setPlayerSe__9daPy_py_cFUl */
|
||||
void daPy_py_c::setPlayerSe(u32 se_id) {
|
||||
daAlink_getAlinkActorClass()->seStartOnlyReverb(se_id);
|
||||
}
|
||||
|
||||
/* 8015F55C-8015F60C 159E9C 00B0+00 1/1 0/0 2/2 .text
|
||||
* linkGrabSubjectNoDraw__9daPy_py_cFP10fopAc_ac_c */
|
||||
// regalloc
|
||||
#ifdef NONMATCHING
|
||||
inline daPy_py_c* daPy_getPlayerActorClass() {
|
||||
return (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
}
|
||||
|
||||
bool daPy_py_c::linkGrabSubjectNoDraw(fopAc_ac_c* p_ac) {
|
||||
bool check_carry = false;
|
||||
bool ret = false;
|
||||
|
||||
if (fopAcM_checkCarryNow(p_ac)) {
|
||||
if (daPy_getPlayerActorClass()->getGrabActorID() == fopAcM_GetID(p_ac)) {
|
||||
check_carry = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (check_carry && dComIfGp_checkCameraAttentionStatus(dComIfGp_getPlayerCameraID(0), 2) != 0) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::setFmChainPos(fopAc_ac_c* param_0, cXyz* param_1, int param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setFmChainPos__9daPy_py_cFP10fopAc_ac_cP4cXyzi.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8015F4B8-8015F4F0 159DF8 0038+00 0/0 0/0 1/1 .text cancelFmChainGrab__9daPy_py_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::cancelFmChainGrab() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/cancelFmChainGrab__9daPy_py_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F4F0-8015F520 159E30 0030+00 0/0 0/0 17/17 .text setLookPos__9daPy_py_cFP4cXyz */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::setLookPos(cXyz* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setLookPos__9daPy_py_cFP4cXyz.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F520-8015F55C 159E60 003C+00 0/0 0/0 4/4 .text setPlayerSe__9daPy_py_cFUl */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::setPlayerSe(u32 param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setPlayerSe__9daPy_py_cFUl.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F55C-8015F60C 159E9C 00B0+00 1/1 0/0 2/2 .text
|
||||
* linkGrabSubjectNoDraw__9daPy_py_cFP10fopAc_ac_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::linkGrabSubjectNoDraw(fopAc_ac_c* param_0) {
|
||||
asm bool daPy_py_c::linkGrabSubjectNoDraw(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/linkGrabSubjectNoDraw__9daPy_py_cFP10fopAc_ac_c.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8015F60C-8015F660 159F4C 0054+00 0/0 0/0 2/2 .text
|
||||
* wolfGrabSubjectNoDraw__9daPy_py_cFP10fopAc_ac_c */
|
||||
@@ -889,36 +867,45 @@ asm void daPy_py_c::wolfGrabSubjectNoDraw(fopAc_ac_c* param_0) {
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
u32 daPy_py_c::getLastSceneMode() {
|
||||
return dComIfGs_getLastSceneMode() & 0xF;
|
||||
}
|
||||
|
||||
/* 8015F660-8015F698 159FA0 0038+00 2/2 1/1 1/1 .text checkRoomRestartStart__9daPy_py_cFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::checkRoomRestartStart() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkRoomRestartStart__9daPy_py_cFv.s"
|
||||
bool daPy_py_c::checkRoomRestartStart() {
|
||||
u8 mode = getLastSceneMode();
|
||||
|
||||
if (mode == 4 || mode == 8 || mode == 5) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
inline dStage_stageDt_c* dComIfGp_getStage() {
|
||||
return &g_dComIfG_gameInfo.play.getStage();
|
||||
}
|
||||
|
||||
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
|
||||
return param_0->field_0x09 >> 1 & 0x1f;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F698-8015F730 159FD8 0098+00 0/0 2/2 1/1 .text checkCarryStartLightBallA__9daPy_py_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm u32 daPy_py_c::checkCarryStartLightBallA() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkCarryStartLightBallA__9daPy_py_cFv.s"
|
||||
u32 daPy_py_c::checkCarryStartLightBallA() {
|
||||
if (checkRoomRestartStart() || !dComIfGp_getStage() || !dComIfGp_getStage()->getStagInfo() || dStage_stagInfo_GetSaveTbl(dComIfGp_getStage()->getStagInfo()) != 0x17) {
|
||||
return FALSE;
|
||||
}
|
||||
return dComIfGs_getLastSceneMode() & 0x100000;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F730-8015F7C8 15A070 0098+00 0/0 2/2 1/1 .text checkCarryStartLightBallB__9daPy_py_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm u32 daPy_py_c::checkCarryStartLightBallB() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkCarryStartLightBallB__9daPy_py_cFv.s"
|
||||
u32 daPy_py_c::checkCarryStartLightBallB() {
|
||||
if (checkRoomRestartStart() || !dComIfGp_getStage() || !dComIfGp_getStage()->getStagInfo() || dStage_stagInfo_GetSaveTbl(dComIfGp_getStage()->getStagInfo()) != 0x17) {
|
||||
return FALSE;
|
||||
}
|
||||
return dComIfGs_getLastSceneMode() & 0x80000;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
float daPy_py_c::getSpinnerRideSpeed() const {
|
||||
float rideSpeed;
|
||||
@@ -942,14 +929,9 @@ asm void daPy_py_c::checkSpinnerReflectEffect() {
|
||||
|
||||
/* 8015F89C-8015F8C8 15A1DC 002C+00 0/0 0/0 7/7 .text checkBoomerangCharge__9daPy_py_cFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::checkBoomerangCharge() {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/checkBoomerangCharge__9daPy_py_cFv.s"
|
||||
bool daPy_py_c::checkBoomerangCharge() {
|
||||
return daAlink_getAlinkActorClass()->checkBoomerangChargeEnd();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F8C8-8015F8D0 15A208 0008+00 0/0 0/0 1/1 .text checkBoomerangChargeTime__9daPy_py_cFv */
|
||||
bool daPy_py_c::checkBoomerangChargeTime() {
|
||||
@@ -964,46 +946,75 @@ daBoomerang_c* daPy_py_c::getThrowBoomerangActor() {
|
||||
|
||||
/* 8015F8E4-8015F914 15A224 0030+00 0/0 0/0 2/2 .text
|
||||
* cancelBoomerangLockActor__9daPy_py_cFP10fopAc_ac_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::cancelBoomerangLockActor(fopAc_ac_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/cancelBoomerangLockActor__9daPy_py_cFP10fopAc_ac_c.s"
|
||||
void daPy_py_c::cancelBoomerangLockActor(fopAc_ac_c* p_ac) {
|
||||
daAlink_getAlinkActorClass()->cancelBoomerangLock(p_ac);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F914-8015F954 15A254 0040+00 0/0 0/0 2/2 .text setPlayerDamage__9daPy_py_cFii */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::setPlayerDamage(int param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setPlayerDamage__9daPy_py_cFii.s"
|
||||
void daPy_py_c::setPlayerDamage(int param_0, int param_1) {
|
||||
daAlink_getAlinkActorClass()->setDamagePoint(param_0, 0, param_1, 0);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F954-8015F968 15A294 0014+00 0/0 3/3 0/0 .text setMidnaMotionNum__9daPy_py_cFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::setMidnaMotionNum(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setMidnaMotionNum__9daPy_py_cFi.s"
|
||||
void daPy_py_c::setMidnaMotionNum(int motion_num) {
|
||||
if (m_midnaActor != NULL) {
|
||||
m_midnaActor->setMotionNum(motion_num);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F968-8015F97C 15A2A8 0014+00 0/0 3/3 0/0 .text setMidnaFaceNum__9daPy_py_cFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void daPy_py_c::setMidnaFaceNum(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/a/d_a_player/setMidnaFaceNum__9daPy_py_cFi.s"
|
||||
void daPy_py_c::setMidnaFaceNum(int face_num) {
|
||||
if (m_midnaActor != NULL) {
|
||||
m_midnaActor->setFaceNum(face_num);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8015F97C-8015FA2C 15A2BC 00B0+00 0/0 7/7 2/2 .text daPy_addCalcShort__FPsssss */
|
||||
// 1 instruction in wrong place
|
||||
#ifdef NONMATCHING
|
||||
int daPy_addCalcShort(s16* param_0, s16 param_1, s16 param_2, s16 param_3, s16 param_4) {
|
||||
s16 temp_r0;
|
||||
s16 temp_r0_2;
|
||||
s16 temp_r8;
|
||||
s16 temp_r9;
|
||||
s32 temp_r10;
|
||||
s32 temp_r4;
|
||||
s32 temp_r5;
|
||||
s32 phi_r4;
|
||||
|
||||
temp_r8 = *param_0;
|
||||
temp_r9 = (s16) param_1;
|
||||
temp_r10 = temp_r9 - temp_r8;
|
||||
|
||||
if (temp_r8 != temp_r9) {
|
||||
temp_r5 = temp_r10 / param_2;
|
||||
temp_r0 = (s16) param_4;
|
||||
if (temp_r5 > temp_r0 || temp_r5 < -temp_r0) {
|
||||
temp_r0_2 = param_3;
|
||||
temp_r4 = -temp_r0_2;
|
||||
phi_r4 = temp_r4;
|
||||
if (temp_r5 < temp_r4) {
|
||||
phi_r4 = temp_r5;
|
||||
} else if (temp_r5 > temp_r0_2) {
|
||||
phi_r4 = temp_r0_2;
|
||||
}
|
||||
*param_0 += phi_r4;
|
||||
}
|
||||
else if (temp_r10 >= 0) {
|
||||
*param_0 = temp_r8 + param_4;
|
||||
if (temp_r9 - *param_0 <= 0) {
|
||||
*param_0 = param_1;
|
||||
}
|
||||
} else {
|
||||
*param_0 = temp_r8 - param_4;
|
||||
if (temp_r9 - *param_0 >= 0) {
|
||||
*param_0 = param_1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return temp_r9 - *param_0;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -1012,6 +1023,7 @@ asm void daPy_addCalcShort(s16* param_0, s16 param_1, s16 param_2, s16 param_3,
|
||||
#include "asm/d/a/d_a_player/daPy_addCalcShort__FPsssss.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803BA14C-803BA160 01726C 0010+04 0/0 4/4 0/0 .data __vt__18daPy_sightPacket_c */
|
||||
|
||||
+1
-1
@@ -533,7 +533,7 @@ bool dBgS::GetUnderwaterRoofCode(cBgS_PolyInfo const& poly) {
|
||||
}
|
||||
|
||||
/* 80074E00-80074E50 06F740 0050+00 0/0 13/13 5/5 .text GetWallCode__4dBgSFRC13cBgS_PolyInfo */
|
||||
bool dBgS::GetWallCode(cBgS_PolyInfo const& poly) {
|
||||
s32 dBgS::GetWallCode(cBgS_PolyInfo const& poly) {
|
||||
int bg_index = poly.GetBgIndex();
|
||||
if (m_chk_element[bg_index].ChkUsed()) {
|
||||
return m_chk_element[bg_index].m_bgw_base_ptr->GetWallCode(poly);
|
||||
|
||||
+1
-1
@@ -1157,7 +1157,7 @@ asm void dBgW::GetLinkNo(cBgS_PolyInfo const& param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm bool dBgW::GetWallCode(cBgS_PolyInfo const& param_0) {
|
||||
asm s32 dBgW::GetWallCode(cBgS_PolyInfo const& param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/bg/d_bg_w/GetWallCode__4dBgWFRC13cBgS_PolyInfo.s"
|
||||
}
|
||||
|
||||
@@ -761,7 +761,7 @@ asm void dBgWKCol::GetLinkNo(cBgS_PolyInfo const& param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dBgWKCol::GetWallCode(cBgS_PolyInfo const& param_0) {
|
||||
asm s32 dBgWKCol::GetWallCode(cBgS_PolyInfo const& param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/bg/d_bg_w_kcol/GetWallCode__8dBgWKColFRC13cBgS_PolyInfo.s"
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
inline u8 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
|
||||
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* param_0) {
|
||||
return param_0->field_0x09 >> 1 & 0x1f;
|
||||
}
|
||||
|
||||
|
||||
+3
-6
@@ -31,10 +31,6 @@ struct mDoGph_gInf_c {
|
||||
static u8 mZbufferTimg[4];
|
||||
};
|
||||
|
||||
struct mDoExt_transAnmBas {
|
||||
/* 8003C784 */ ~mDoExt_transAnmBas();
|
||||
};
|
||||
|
||||
struct dBgWKCol {
|
||||
/* 8007E7D0 */ void initKCollision(void*);
|
||||
};
|
||||
@@ -996,7 +992,7 @@ asm void* dRes_control_c::getRes(char const* param_0, char const* param_1, dRes_
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dRes_control_c::getIDRes(char const* param_0, u16 param_1, dRes_info_c* param_2,
|
||||
asm void* dRes_control_c::getIDRes(char const* param_0, u16 param_1, dRes_info_c* param_2,
|
||||
int param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/getIDRes__14dRes_control_cFPCcUsP11dRes_info_ci.s"
|
||||
@@ -1096,7 +1092,8 @@ s32 J3DAnmTransform::getKind() const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm mDoExt_transAnmBas::~mDoExt_transAnmBas() {
|
||||
// asm mDoExt_transAnmBas::~mDoExt_transAnmBas() {
|
||||
extern "C" asm void __dt__18mDoExt_transAnmBasFv() {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/__dt__18mDoExt_transAnmBasFv.s"
|
||||
}
|
||||
|
||||
+4
-4
@@ -433,8 +433,8 @@ extern "C" u8 mResetData__6mDoRst[4 + 4 /* padding */];
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
inline dStage_stageDt_c& dComIfGp_getStage() {
|
||||
return g_dComIfG_gameInfo.play.getStage();
|
||||
inline dStage_stageDt_c* dComIfGp_getStage() {
|
||||
return &g_dComIfG_gameInfo.play.getStage();
|
||||
}
|
||||
|
||||
void dStage_nextStage_c::set(const char* i_stage, s8 i_roomId, s16 i_point, s8 i_layer, s8 i_wipe,
|
||||
@@ -2283,7 +2283,7 @@ void dStage_infoCreate() {
|
||||
void* stageRsrc = dComIfG_getStageRes("stage.dzs");
|
||||
|
||||
dComIfGp_roomControl_init();
|
||||
dStage_dt_c_stageInitLoader(stageRsrc, &dComIfGp_getStage());
|
||||
dStage_dt_c_stageInitLoader(stageRsrc, dComIfGp_getStage());
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
@@ -2294,7 +2294,7 @@ SECTION_DEAD static char const* const stringBase_80378B73 = "vrbox_sora.bmd";
|
||||
#pragma pop
|
||||
|
||||
/* 80406194-804061A0 032EB4 000A+02 2/2 14/14 7/7 .bss mDemoArcName__20dStage_roomControl_c */
|
||||
u8 dStage_roomControl_c::mDemoArcName[10 + 2 /* padding */];
|
||||
char dStage_roomControl_c::mDemoArcName[10];
|
||||
|
||||
/* 80026D38-80026DF8 021678 00C0+00 0/0 1/1 0/0 .text dStage_Create__Fv */
|
||||
#pragma push
|
||||
|
||||
@@ -3177,7 +3177,7 @@ asm void dKy_depth_dist_set(void* param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dKy_darkworld_check() {
|
||||
asm bool dKy_darkworld_check() {
|
||||
nofralloc
|
||||
#include "asm/d/kankyo/d_kankyo/dKy_darkworld_check__Fv.s"
|
||||
}
|
||||
|
||||
+381
-53
@@ -308,31 +308,330 @@ SECTION_SDATA2 static u8 lit_4662[4] = {
|
||||
/* 804549CC-804549D0 002FCC 0004+00 13/13 0/0 0/0 .sdata2 @4663 */
|
||||
SECTION_SDATA2 static f32 lit_4663 = 1.0f;
|
||||
|
||||
/* 8021EA14-8021F128 219354 0714+00 1/1 0/0 0/0 .text _create__9dMeter2_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeter2_c::_create() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/_create__9dMeter2_cFv.s"
|
||||
inline u16 dComIfGs_getLife() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getLife();
|
||||
}
|
||||
|
||||
inline u16 i_dComIfGs_getRupee() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getRupee();
|
||||
}
|
||||
|
||||
inline u8 dComIfGp_getRStatus() {
|
||||
return g_dComIfG_gameInfo.play.getRStatus();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setBottleStatus(u8 param_0, u8 param_1) {
|
||||
g_dComIfG_gameInfo.play.setBottleStatus(param_0, param_1);
|
||||
}
|
||||
|
||||
inline u8 dComIfGp_getDoStatus() {
|
||||
return g_dComIfG_gameInfo.play.getDoStatus();
|
||||
}
|
||||
|
||||
inline void dMeter2Info_offUseButton(int flag) {
|
||||
g_meter2_info.offUseButton(flag);
|
||||
}
|
||||
|
||||
/* 8021EA14-8021F128 219354 0714+00 1/1 0/0 0/0 .text _create__9dMeter2_cFv */
|
||||
// this can be cleaned up with float literals when everything else is decompiled
|
||||
int dMeter2_c::_create() {
|
||||
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
|
||||
if (dStage_stagInfo_GetUpButton(stag_info) == 1) {
|
||||
mpHeap = fopMsgM_createExpHeap(0x5A400, NULL);
|
||||
} else {
|
||||
mpHeap = fopMsgM_createExpHeap(0x60800, NULL);
|
||||
}
|
||||
|
||||
JKRHeap* heap = mDoExt_setCurrentHeap(mpHeap);
|
||||
mpHeap->getTotalFreeSize();
|
||||
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP00")) {
|
||||
dMeter2Info_setNowCount(0);
|
||||
dMeter2Info_setMaxCount(0);
|
||||
}
|
||||
|
||||
field_0x128 = 0;
|
||||
field_0x12c = field_0x128;
|
||||
field_0x124 = 0;
|
||||
mSubContents = 0;
|
||||
mSubContentsStringType = 0;
|
||||
field_0x1e6 = 0;
|
||||
field_0x1e7 = 0;
|
||||
|
||||
mItemMaxNum[2] = dComIfGs_getArrowMax();
|
||||
mArrowNum = dComIfGs_getArrowNum();
|
||||
mItemMaxNum[3] = dComIfGs_getPachinkoMax();
|
||||
mPachinkoNum = dComIfGs_getPachinkoNum();
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mBombMax[i] = dComIfGs_getBombMax(dComIfGs_getItem((u8)(i + SLOT_15), 1));
|
||||
mBombNum[i] = dComIfGs_getBombNum(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mItemMaxNum[i] = dComIfGs_getSelectItemIndex(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
mBottleNum[i] = dComIfGs_getBottleNum(i);
|
||||
}
|
||||
|
||||
field_0x1e8 = 0;
|
||||
field_0x1e9 = 0;
|
||||
field_0x1ea = 0;
|
||||
field_0x1eb = 0;
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
field_0x1b8[i] = 0;
|
||||
}
|
||||
|
||||
field_0x1ec = 0;
|
||||
field_0x1ed = 0;
|
||||
field_0x1ee = 0;
|
||||
|
||||
mNowLifeGauge = dComIfGs_getLife();
|
||||
dComIfGp_setItemNowLife((u8)mNowLifeGauge);
|
||||
|
||||
mMaxLife = dComIfGs_getMaxLife();
|
||||
|
||||
mNowMagic = dComIfGs_getMagic();
|
||||
dComIfGp_setItemNowMagic(mNowMagic);
|
||||
|
||||
mMaxMagic = dComIfGs_getMaxMagic();
|
||||
|
||||
mNowOil = dComIfGs_getOil();
|
||||
dComIfGp_setItemNowOil(mNowOil);
|
||||
|
||||
mMaxOil = dComIfGs_getMaxOil();
|
||||
|
||||
mNowOxygen = dComIfGp_getOxygen();
|
||||
dComIfGp_setNowOxygen(mNowOxygen);
|
||||
|
||||
mMaxOxygen = dComIfGp_getMaxOxygen();
|
||||
|
||||
field_0x130 = FLOAT_LABEL(lit_4662);
|
||||
|
||||
u8 dark_area = dComIfGp_getStartStageDarkArea();
|
||||
mLightDropNum = dComIfGs_getLightDropNum(dark_area);
|
||||
|
||||
mNeedLightDropNum = dComIfGp_getNeedLightDropNum();
|
||||
|
||||
mRupeeNum = i_dComIfGs_getRupee();
|
||||
mKeyNum = dComIfGs_getKeyNum();
|
||||
|
||||
field_0x1c4 = dComIfGp_getDoStatus();
|
||||
field_0x1dc = dComIfGp_isDoSetFlag(2);
|
||||
|
||||
int i = 0;
|
||||
f32 temp0 = FLOAT_LABEL(lit_4662);
|
||||
for (; i < 2; i++) {
|
||||
field_0x134[i] = temp0;
|
||||
field_0x13c[i] = temp0;
|
||||
}
|
||||
field_0x144 = lit_4663;
|
||||
|
||||
field_0x1c5 = dComIfGp_getAStatus();
|
||||
field_0x1c6 = 0;
|
||||
field_0x1dd = dComIfGp_isASetFlag(2);
|
||||
|
||||
i = 0;
|
||||
f32 temp1 = FLOAT_LABEL(lit_4662);
|
||||
for (; i < 2; i++) {
|
||||
field_0x148[i] = temp1;
|
||||
field_0x150[i] = temp1;
|
||||
}
|
||||
field_0x158 = lit_4663;
|
||||
|
||||
field_0x1e4 = 0;
|
||||
field_0x1e2 = dComIfGs_getSelectEquipSword();
|
||||
field_0x1e3 = 0;
|
||||
|
||||
field_0x1fe = 0;
|
||||
field_0x1fd = 0;
|
||||
field_0x1ff = 0;
|
||||
field_0x200 = 0;
|
||||
field_0x201 = 0;
|
||||
|
||||
field_0x1c7 = dComIfGs_getCollectSmell();
|
||||
field_0x1c8 = dComIfGp_getRStatus();
|
||||
field_0x1de = dComIfGp_isRSetFlag(2);
|
||||
field_0x1df = dComIfGp_isXSetFlag(2);
|
||||
field_0x1e0 = dComIfGp_isYSetFlag(2);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
dComIfGp_setSelectItem(i);
|
||||
}
|
||||
|
||||
field_0x1d2[0] = dComIfGp_getSelectItem(0);
|
||||
field_0x1d2[2] = dComIfGp_getSelectItem(1);
|
||||
field_0x1d2[1] = dComIfGp_getXStatus();
|
||||
field_0x1d2[3] = dComIfGp_getYStatus();
|
||||
f32 temp2 = FLOAT_LABEL(lit_4662);
|
||||
field_0x188 = temp2;
|
||||
field_0x18c = temp2;
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
field_0x1d6[i] = dMeter2Info_isDirectUseItem(i);
|
||||
field_0x1d8[i] = dComIfGp_getSelectItemNum(i);
|
||||
}
|
||||
|
||||
field_0x1e1 = 0;
|
||||
field_0x1b4 = 0;
|
||||
|
||||
f32 temp3 = FLOAT_LABEL(lit_4662);
|
||||
field_0x15c = temp3;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
field_0x160[i] = temp3;
|
||||
field_0x174[i] = temp3;
|
||||
}
|
||||
field_0x190 = 0;
|
||||
|
||||
field_0x1c9 = dComIfGp_getZStatus();
|
||||
field_0x1ca = dComIfGp_get3DStatus();
|
||||
field_0x1cb = dComIfGp_getCStickStatus();
|
||||
field_0x1cc = dComIfGp_getSButtonStatus();
|
||||
field_0x1cd = dComIfGp_getNunStatus();
|
||||
field_0x1ce = dComIfGp_getRemoConStatus();
|
||||
field_0x1cf = dComIfGp_getNunZStatus();
|
||||
field_0x1d0 = dComIfGp_getNunCStatus();
|
||||
field_0x1d1 = dComIfGp_getBottleStatus();
|
||||
|
||||
field_0x1ac = dMeter2Info_isUseButton(16);
|
||||
field_0x19a = 0;
|
||||
|
||||
mpMeterDraw = new dMeter2Draw_c(mpHeap);
|
||||
|
||||
field_0x130 = mpMeterDraw->getNowLightDropRateCalc();
|
||||
mpHeap->getTotalFreeSize();
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (field_0x128 == 0) {
|
||||
if (field_0x1d2[i * 2] == BOMB_BAG_LV1 || field_0x1d2[i * 2] == NORMAL_BOMB ||
|
||||
field_0x1d2[i * 2] == WATER_BOMB || field_0x1d2[i * 2] == POKE_BOMB) {
|
||||
mpMeterDraw->setItemNum(i, dComIfGp_getSelectItemNum(i), dComIfGp_getSelectItemMaxNum(i));
|
||||
} else if (field_0x1d2[i * 2] == BEE_CHILD) {
|
||||
mpMeterDraw->setItemNum(i, dComIfGp_getSelectItemNum(i), dComIfGp_getSelectItemMaxNum(i));
|
||||
} else if (field_0x1d2[i * 2] == BOW || field_0x1d2[i * 2] == LIGHT_ARROW ||
|
||||
field_0x1d2[i * 2] == ARROW_LV1 || field_0x1d2[i * 2] == ARROW_LV2 ||
|
||||
field_0x1d2[i * 2] == ARROW_LV3 || field_0x1d2[i * 2] == HAWK_ARROW) {
|
||||
mpMeterDraw->setItemNum(i, mArrowNum, dComIfGs_getArrowMax());
|
||||
} else if (field_0x1d2[i * 2] == PACHINKO) {
|
||||
mpMeterDraw->setItemNum(i, mPachinkoNum, dComIfGs_getPachinkoMax());
|
||||
} else if (field_0x1d2[i * 2] == BOMB_ARROW) {
|
||||
u8 item_num = dComIfGp_getSelectItemNum(i);
|
||||
u8 item_max = dComIfGp_getSelectItemMaxNum(i);
|
||||
if (item_num > mArrowNum) {
|
||||
item_num = mArrowNum;
|
||||
}
|
||||
u8 temp = dComIfGs_getArrowMax() & 0xFF;
|
||||
if (item_max < temp) {
|
||||
item_max = temp;
|
||||
}
|
||||
mpMeterDraw->setItemNum(i, item_num, item_max);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mpMap = NULL;
|
||||
if (dMeterMap_c::isEnableDispMapAndMapDispSizeTypeNo()) {
|
||||
mpMap = new dMeterMap_c(mpMeterDraw->getMainScreenPtr());
|
||||
} else {
|
||||
if (g_meter2_info.mMapStatus == 2) {
|
||||
g_meter2_info.mMapStatus = 0;
|
||||
}
|
||||
}
|
||||
dMeter2Info_setMeterMapClass(mpMap);
|
||||
|
||||
mpHeap->getTotalFreeSize();
|
||||
mpSubHeap = fopMsgM_createExpHeap(0x5000, mpHeap);
|
||||
field_0x108 = NULL;
|
||||
field_0x110 = NULL;
|
||||
field_0x114 = NULL;
|
||||
field_0x118 = NULL;
|
||||
|
||||
mpHeap->getTotalFreeSize();
|
||||
field_0x11c = NULL;
|
||||
mDoExt_setCurrentHeap(heap);
|
||||
return 4;
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isEventBit(u16 id) {
|
||||
return g_dComIfG_gameInfo.info.getSavedata().getEvent().isEventBit(id);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_event_runCheck() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().runCheck();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8021F128-8021F370 219A68 0248+00 1/1 0/0 0/0 .text _execute__9dMeter2_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeter2_c::_execute() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/_execute__9dMeter2_cFv.s"
|
||||
int dMeter2_c::_execute() {
|
||||
JKRHeap* heap = mDoExt_setCurrentHeap(mpHeap);
|
||||
|
||||
if (!dComIfGs_isCollectMirror(0) && dComIfGs_isEventBit(0x5420)) {
|
||||
dComIfGs_onCollectMirror(0);
|
||||
}
|
||||
|
||||
if (!dComIfGs_isCollectCrystal(3) && dComIfGs_isEventBit(0x5410)) {
|
||||
dComIfGs_onCollectCrystal(3);
|
||||
}
|
||||
|
||||
checkStatus();
|
||||
mpMeterDraw->exec(field_0x124);
|
||||
|
||||
moveLife();
|
||||
moveKantera();
|
||||
moveOxygen();
|
||||
moveLightDrop();
|
||||
moveRupee();
|
||||
moveKey();
|
||||
moveButtonXY();
|
||||
moveButtonA();
|
||||
moveButtonB();
|
||||
moveButtonR();
|
||||
moveButtonZ();
|
||||
moveButton3D();
|
||||
moveButtonC();
|
||||
moveButtonS();
|
||||
moveButtonCross();
|
||||
moveTouchSubMenu();
|
||||
moveBombNum();
|
||||
moveArrowNum();
|
||||
movePachinkoNum();
|
||||
moveBottleNum();
|
||||
|
||||
if (mpMap != NULL) {
|
||||
mpMap->_move(field_0x124);
|
||||
} else {
|
||||
dMeterMap_c::meter_map_move(field_0x124);
|
||||
}
|
||||
|
||||
moveSubContents();
|
||||
move2DContents();
|
||||
|
||||
if (!dComIfGp_isPauseFlag() && !dComIfGp_event_runCheck()) {
|
||||
dMeter2Info_decHotSpringTimer();
|
||||
}
|
||||
|
||||
dMeter2Info_allUseButton();
|
||||
dMeter2Info_offUseButton(0x800);
|
||||
dMeter2Info_resetGameStatus();
|
||||
dComIfGp_setNunStatus(0, 0, 0);
|
||||
dComIfGp_setRemoConStatus(0, 0, 0);
|
||||
dComIfGp_setNunZStatus(0, 0);
|
||||
dComIfGp_setNunCStatus(0, 0);
|
||||
dComIfGp_setBottleStatus(0, 0);
|
||||
dComIfGp_setCStickStatus(0, 0, 0);
|
||||
|
||||
mDoExt_setCurrentHeap(heap);
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8021F370-8021F49C 219CB0 012C+00 1/1 0/0 0/0 .text _draw__9dMeter2_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeter2_c::_draw() {
|
||||
asm int dMeter2_c::_draw() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/_draw__9dMeter2_cFv.s"
|
||||
}
|
||||
@@ -350,7 +649,7 @@ SECTION_SDATA2 static f32 lit_4837[1 + 1 /* padding */] = {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeter2_c::_delete() {
|
||||
asm int dMeter2_c::_delete() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/_delete__9dMeter2_cFv.s"
|
||||
}
|
||||
@@ -367,15 +666,16 @@ asm void dMeter2_c::emphasisButtonDelete() {
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8021F780-8021F7B0 21A0C0 0030+00 0/0 0/0 1/1 .text setLifeZero__9dMeter2_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeter2_c::setLifeZero() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/setLifeZero__9dMeter2_cFv.s"
|
||||
inline void i_dComIfGp_setItemLifeCount(f32 amount, u8 type) {
|
||||
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
|
||||
}
|
||||
|
||||
/* 8021F780-8021F7B0 21A0C0 0030+00 0/0 0/0 1/1 .text setLifeZero__9dMeter2_cFv */
|
||||
void dMeter2_c::setLifeZero() {
|
||||
dComIfGs_setLife(1);
|
||||
setNowLifeGauge(1);
|
||||
i_dComIfGp_setItemLifeCount(lit_4837[0], 0);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803BFA28-803BFA54 -00001 002C+00 1/1 0/0 0/0 .data @5038 */
|
||||
@@ -434,6 +734,49 @@ asm void dMeter2_c::moveKantera() {
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* void dMeter2_c::moveKantera() {
|
||||
s32 max_oil = dComIfGs_getMaxOil();
|
||||
bool meter_visible = false;
|
||||
|
||||
s32 cur_oil = 0;
|
||||
if (dComIfGp_getItemMaxOilCount() != 0) {
|
||||
if (dComIfGs_getMaxOil() + dComIfGp_getItemMaxOilCount() <= max_oil) {
|
||||
max_oil = dComIfGs_getMaxOil() + dComIfGp_getItemMaxOilCount();
|
||||
if (max_oil < 0) {
|
||||
max_oil = 0;
|
||||
}
|
||||
}
|
||||
dComIfGs_setMaxOil(max_oil);
|
||||
|
||||
cur_oil = dComIfGs_getOil();
|
||||
dComIfGp_setItemOilCount(max_oil - cur_oil);
|
||||
dComIfGp_clearItemMaxOilCount();
|
||||
meter_visible = true;
|
||||
cur_oil = max_oil;
|
||||
}
|
||||
|
||||
if (dComIfGp_getItemOilCount() != 0) {
|
||||
if (!meter_visible) {
|
||||
cur_oil = dComIfGs_getMaxOil();
|
||||
}
|
||||
|
||||
if (dComIfGs_getOil() + dComIfGp_getItemOilCount() <= cur_oil) {
|
||||
cur_oil = dComIfGs_getOil();
|
||||
if (dComIfGs_getOil() < 0) {
|
||||
cur_oil = 0;
|
||||
}
|
||||
}
|
||||
|
||||
dComIfGs_setOil(cur_oil);
|
||||
dComIfGp_clearItemOilCount();
|
||||
meter_visible = true;
|
||||
}
|
||||
|
||||
if () {
|
||||
|
||||
}
|
||||
} */
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804549EC-804549F0 002FEC 0004+00 2/2 0/0 0/0 .sdata2 @5933 */
|
||||
SECTION_SDATA2 static f32 lit_5933 = 0.5f;
|
||||
@@ -831,45 +1174,30 @@ asm void dMeter2_c::isPachinkoEquip() {
|
||||
#pragma pop
|
||||
|
||||
/* 80225AA0-80225AC0 2203E0 0020+00 1/0 0/0 0/0 .text dMeter2_Draw__FP9dMeter2_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dMeter2_Draw(dMeter2_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/dMeter2_Draw__FP9dMeter2_c.s"
|
||||
static int dMeter2_Draw(dMeter2_c* p_meter) {
|
||||
return p_meter->_draw();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80225AC0-80225AE0 220400 0020+00 1/0 0/0 0/0 .text dMeter2_Execute__FP9dMeter2_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dMeter2_Execute(dMeter2_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/dMeter2_Execute__FP9dMeter2_c.s"
|
||||
static int dMeter2_Execute(dMeter2_c* p_meter) {
|
||||
return p_meter->_execute();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80225AE0-80225AE8 220420 0008+00 1/0 0/0 0/0 .text dMeter2_IsDelete__FP9dMeter2_c */
|
||||
static bool dMeter2_IsDelete(dMeter2_c* param_0) {
|
||||
return true;
|
||||
static int dMeter2_IsDelete(dMeter2_c* p_meter) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80225AE8-80225B08 220428 0020+00 1/0 0/0 0/0 .text dMeter2_Delete__FP9dMeter2_c */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dMeter2_Delete(dMeter2_c* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/dMeter2_Delete__FP9dMeter2_c.s"
|
||||
static int dMeter2_Delete(dMeter2_c* p_meter) {
|
||||
return p_meter->_delete();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80225B08-80225BB8 220448 00B0+00 1/0 0/0 0/0 .text dMeter2_Create__FP9msg_class */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void dMeter2_Create(msg_class* param_0) {
|
||||
static asm int dMeter2_Create(msg_class* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2/dMeter2_Create__FP9msg_class.s"
|
||||
}
|
||||
@@ -877,10 +1205,10 @@ static asm void dMeter2_Create(msg_class* param_0) {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803BFA54-803BFA68 -00001 0014+00 1/0 0/0 0/0 .data l_dMeter2_Method */
|
||||
SECTION_DATA static void* l_dMeter2_Method[5] = {
|
||||
(void*)dMeter2_Create__FP9msg_class, (void*)dMeter2_Delete__FP9dMeter2_c,
|
||||
(void*)dMeter2_Execute__FP9dMeter2_c, (void*)dMeter2_IsDelete__FP9dMeter2_c,
|
||||
(void*)dMeter2_Draw__FP9dMeter2_c,
|
||||
SECTION_DATA static dMeter2_Method l_dMeter2_Method[5] = {
|
||||
(dMeter2_Method)dMeter2_Create, dMeter2_Delete,
|
||||
dMeter2_Execute, dMeter2_IsDelete,
|
||||
dMeter2_Draw,
|
||||
};
|
||||
|
||||
/* 803BFA68-803BFA90 -00001 0028+00 0/0 0/0 1/0 .data g_profile_METER2 */
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
//
|
||||
|
||||
#include "d/meter/d_meter2_draw.h"
|
||||
#include "d/meter/d_meter_HIO.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -11,35 +14,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct dSv_player_item_c {
|
||||
/* 80033030 */ void getItem(int, bool) const;
|
||||
};
|
||||
|
||||
struct dSv_light_drop_c {
|
||||
/* 80034340 */ void getLightDropNum(u8) const;
|
||||
/* 8003439C */ void isLightDropGetFlag(u8) const;
|
||||
};
|
||||
|
||||
struct dSv_event_c {
|
||||
/* 800349BC */ void isEventBit(u16) const;
|
||||
};
|
||||
|
||||
struct dMsgObject_c {
|
||||
/* 802370E8 */ void isHowlMessage();
|
||||
/* 8023822C */ void getStatus();
|
||||
};
|
||||
|
||||
struct JMSMesgEntry_c {};
|
||||
|
||||
struct dMeter2Info_c {
|
||||
/* 8021C250 */ void getString(u32, char*, JMSMesgEntry_c*);
|
||||
/* 8021C370 */ void getStringKana(u32, char*, JMSMesgEntry_c*);
|
||||
/* 8021C544 */ void getStringKanji(u32, char*, JMSMesgEntry_c*);
|
||||
/* 8021C950 */ void isDirectUseItem(int);
|
||||
/* 8021CF08 */ void readItemTexture(u8, void*, J2DPicture*, void*, J2DPicture*, void*,
|
||||
J2DPicture*, void*, J2DPicture*, int);
|
||||
};
|
||||
|
||||
struct dKantera_icon_c {
|
||||
/* 801AE938 */ dKantera_icon_c();
|
||||
/* 801AEB7C */ void setAlphaRate(f32);
|
||||
@@ -48,12 +22,6 @@ struct dKantera_icon_c {
|
||||
/* 801AEC44 */ void setNowGauge(u16, u16);
|
||||
};
|
||||
|
||||
struct dItem_data {
|
||||
static void* item_resource[1530];
|
||||
};
|
||||
|
||||
struct JAISoundID {};
|
||||
|
||||
struct Z2SeMgr {
|
||||
/* 802AB984 */ void seStart(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8);
|
||||
/* 802AC50C */ void seStartLevel(JAISoundID, Vec const*, u32, s8, f32, f32, f32, f32, u8);
|
||||
@@ -63,10 +31,6 @@ struct Z2AudioMgr {
|
||||
static u8 mAudioMgrPtr[4 + 4 /* padding */];
|
||||
};
|
||||
|
||||
struct J2DAnmLoaderDataBase {
|
||||
/* 80308A6C */ void load(void const*);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -258,13 +222,8 @@ extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" void strcmp();
|
||||
extern "C" void strcpy();
|
||||
extern "C" extern void* __vt__12dDlst_base_c[3];
|
||||
extern "C" void* item_resource__10dItem_data[1530];
|
||||
extern "C" extern u8 g_dComIfG_gameInfo[122384];
|
||||
extern "C" extern u8 g_drawHIO[3880];
|
||||
extern "C" extern u8 g_meter2_info[248];
|
||||
extern "C" extern u8 g_MsgObject_HIO_c[1040];
|
||||
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
|
||||
@@ -745,6 +704,55 @@ SECTION_DEAD static char const* const stringBase_80398A0A = "zelda_game_image_sa
|
||||
#pragma pop
|
||||
|
||||
/* 80211E64-80212190 20C7A4 032C+00 1/1 0/0 0/0 .text initMagic__13dMeter2Draw_cFv */
|
||||
#ifdef NONMATCHING
|
||||
void dMeter2Draw_c::initMagic() {
|
||||
field_0x550 = 0.0f;
|
||||
field_0x554 = 0.0f;
|
||||
|
||||
mpMagicParent = new CPaneMgr(mpKanteraScreen, 'magic_n', 2, NULL);
|
||||
mpMagicBase = new CPaneMgr(mpKanteraScreen, 'mm_base', 0, NULL);
|
||||
mpMagicFrameL = new CPaneMgr(mpKanteraScreen, 'm_w_l_n', 2, NULL);
|
||||
mpMagicFrameR = new CPaneMgr(mpKanteraScreen, 'm_w_r_n', 2, NULL);
|
||||
mpMagicMeter = new CPaneMgr(mpKanteraScreen, 'mm_00', 0, NULL);
|
||||
|
||||
void* res = JKRFileLoader::getGlbResource("zelda_game_image_sanso_10percent.bpk", dComIfGp_getMain2DArchive());
|
||||
field_0x53c = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
|
||||
field_0x53c->searchUpdateMaterialID(mpKanteraScreen);
|
||||
|
||||
res = JKRFileLoader::getGlbResource("zelda_game_image_sanso_25percent.bpk", dComIfGp_getMain2DArchive());
|
||||
field_0x540 = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
|
||||
field_0x540->searchUpdateMaterialID(mpKanteraScreen);
|
||||
|
||||
res = JKRFileLoader::getGlbResource("zelda_game_image_sanso_50percent.bpk", dComIfGp_getMain2DArchive());
|
||||
field_0x544 = (J2DAnmColorKey*)J2DAnmLoaderDataBase::load(res);
|
||||
field_0x544->searchUpdateMaterialID(mpKanteraScreen);
|
||||
|
||||
field_0x558 = 0.0f;
|
||||
mpMagicParent->setAlphaRate(0.0f);
|
||||
|
||||
f32 offsetX = g_drawHIO.mLifeTopPosX;
|
||||
f32 offsetY = 0.0f;
|
||||
|
||||
if (dComIfGs_getMaxLife() <= 50) {
|
||||
offsetY = g_drawHIO.mLifeTopPosY;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
field_0x5fc[i] = 0.0f;
|
||||
field_0x742[i] = 0;
|
||||
}
|
||||
|
||||
u8 magic = dComIfGs_getMagic();
|
||||
u8 max_magic = dComIfGs_getMaxMagic();
|
||||
drawMagic(max_magic, magic, g_drawHIO.mMagicMeterPosX + offsetX, g_drawHIO.mMagicMeterPosY + offsetY);
|
||||
setAlphaMagicChange(true);
|
||||
|
||||
u16 oil = dComIfGs_getOil();
|
||||
u16 max_oil = dComIfGs_getMaxOil();
|
||||
drawKantera(max_oil, oil, g_drawHIO.mLanternMeterPosX + offsetX, g_drawHIO.mLanternMeterPosY + (g_drawHIO.mNoMagicPosY + offsetY));
|
||||
setAlphaKanteraChange(true);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -753,6 +761,7 @@ asm void dMeter2Draw_c::initMagic() {
|
||||
#include "asm/d/meter/d_meter2_draw/initMagic__13dMeter2Draw_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80398640-803986C0 024CA0 0080+00 0/1 0/0 0/0 .rodata tuta_0$5094 */
|
||||
@@ -1072,6 +1081,26 @@ asm void dMeter2Draw_c::drawKanteraScreen(u8 param_0) {
|
||||
SECTION_SDATA2 static f32 lit_6175 = 0.03125f;
|
||||
|
||||
/* 80215290-80215380 20FBD0 00F0+00 1/1 0/0 0/0 .text drawMagic__13dMeter2Draw_cFssff */
|
||||
#ifdef NONMATCHING
|
||||
void dMeter2Draw_c::drawMagic(s16 max_count, s16 now_count, f32 x_pos, f32 y_pos) {
|
||||
f32 x_diff = mpMagicFrameR->getInitPosX() - mpMagicFrameL->getInitPosX();
|
||||
|
||||
field_0x584 = mpMagicMeter->getInitSizeX() * (lit_6175 * now_count);
|
||||
field_0x590 = mpMagicMeter->getInitSizeY();
|
||||
|
||||
field_0x59c = mpMagicFrameL->getInitPosX() * x_diff * (max_count * lit_6175);
|
||||
field_0x5a8 = mpMagicFrameL->getInitPosY();
|
||||
|
||||
field_0x5b4 = mpMagicBase->getInitSizeX() * (max_count * lit_6175);
|
||||
field_0x5c0 = mpMagicBase->getInitSizeY();
|
||||
|
||||
field_0x5cc = g_drawHIO.mMagicMeterScale;
|
||||
field_0x5d8 = g_drawHIO.mMagicMeterScale;
|
||||
|
||||
field_0x5e4 = x_pos;
|
||||
field_0x5f0 = y_pos;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -1080,6 +1109,7 @@ asm void dMeter2Draw_c::drawMagic(s16 param_0, s16 param_1, f32 param_2, f32 par
|
||||
#include "asm/d/meter/d_meter2_draw/drawMagic__13dMeter2Draw_cFssff.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 80215380-802154A8 20FCC0 0128+00 2/2 0/0 0/0 .text setAlphaMagicChange__13dMeter2Draw_cFb */
|
||||
#pragma push
|
||||
@@ -1207,7 +1237,7 @@ void dMeter2Draw_c::setAlphaLightDropChange(bool param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeter2Draw_c::getNowLightDropRateCalc() {
|
||||
asm f32 dMeter2Draw_c::getNowLightDropRateCalc() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter2_draw/getNowLightDropRateCalc__13dMeter2Draw_cFv.s"
|
||||
}
|
||||
|
||||
@@ -1875,65 +1875,17 @@ extern "C" asm void __dt__16dMeter_drawHIO_cFv() {
|
||||
/* 8020123C-80201284 1FBB7C 0048+00 2/1 0/0 0/0 .text __dt__16dMeter_menuHIO_cFv */
|
||||
dMeter_menuHIO_c::~dMeter_menuHIO_c() {}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8042EBB0-8042EBBC 05B8D0 000C+00 1/1 0/0 0/0 .bss @3766 */
|
||||
static u8 lit_3766[12];
|
||||
|
||||
/* 8042EBBC-8042EBC8 05B8DC 000C+00 0/1 0/0 0/0 .bss @3767 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 lit_3767[12];
|
||||
#pragma pop
|
||||
/* 804510B0-804510B8 0005B0 0008+00 1/1 1/1 0/0 .sbss g_menuHIO */
|
||||
dMeter_menuHIO_c g_menuHIO;
|
||||
|
||||
/* 8042EBC8-8042FAF0 05B8E8 0F28+00 0/1 157/157 0/0 .bss g_drawHIO */
|
||||
extern u8 g_drawHIO[3880];
|
||||
u8 g_drawHIO[3880];
|
||||
|
||||
/* 8042FAF0-8042FAFC 05C810 000C+00 0/1 0/0 0/0 .bss @3768 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 lit_3768[12];
|
||||
#pragma pop
|
||||
dMeter_drawHIO_c g_drawHIO;
|
||||
|
||||
/* 8042FAFC-8042FC54 05C81C 0158+00 0/1 19/19 0/0 .bss g_ringHIO */
|
||||
extern u8 g_ringHIO[344];
|
||||
u8 g_ringHIO[344];
|
||||
|
||||
/* 8042FC54-8042FC60 05C974 000C+00 0/1 0/0 0/0 .bss @3769 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 lit_3769[12];
|
||||
#pragma pop
|
||||
dMeter_ringHIO_c g_ringHIO;
|
||||
|
||||
/* 8042FC60-80430104 05C980 04A4+00 0/1 54/54 0/0 .bss g_fmapHIO */
|
||||
extern u8 g_fmapHIO[1188];
|
||||
u8 g_fmapHIO[1188];
|
||||
|
||||
/* 80430104-80430110 05CE24 000C+00 0/1 0/0 0/0 .bss @3770 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
static u8 lit_3770[12];
|
||||
#pragma pop
|
||||
dMeter_fmapHIO_c g_fmapHIO;
|
||||
|
||||
/* 80430110-80430158 05CE30 0044+04 0/1 6/6 1/1 .bss g_cursorHIO */
|
||||
extern u8 g_cursorHIO[68 + 4 /* padding */];
|
||||
u8 g_cursorHIO[68 + 4 /* padding */];
|
||||
|
||||
/* 804510B0-804510B8 0005B0 0008+00 1/1 1/1 0/0 .sbss g_menuHIO */
|
||||
extern u8 g_menuHIO[8];
|
||||
u8 g_menuHIO[8];
|
||||
|
||||
/* 80201284-80201328 1FBBC4 00A4+00 0/0 1/0 0/0 .text __sinit_d_meter_HIO_cpp */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void __sinit_d_meter_HIO_cpp() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter_HIO/__sinit_d_meter_HIO_cpp.s"
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
REGISTER_CTORS(0x80201284, __sinit_d_meter_HIO_cpp);
|
||||
#pragma pop
|
||||
dMeter_cursorHIO_c g_cursorHIO;
|
||||
|
||||
@@ -170,7 +170,7 @@ asm void dMeterMap_c::getMapDispSizeTypeNo() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dMeterMap_c::isEnableDispMapAndMapDispSizeTypeNo() {
|
||||
asm bool dMeterMap_c::isEnableDispMapAndMapDispSizeTypeNo() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter_map/isEnableDispMapAndMapDispSizeTypeNo__11dMeterMap_cFv.s"
|
||||
}
|
||||
|
||||
@@ -1970,20 +1970,22 @@ SECTION_DEAD static char const* const pad_80379296 = "\0";
|
||||
/* 80035BD0-80035C88 030510 00B8+00 0/0 3/3 0/0 .text initdata_to_card__10dSv_info_cFPci
|
||||
*/
|
||||
#ifdef NONMATCHING
|
||||
void dSv_info_c::initdata_to_card(char* param_0, int fileNo) {
|
||||
int dSv_info_c::initdata_to_card(char* param_0, int fileNo) {
|
||||
char* ptr = param_0 + (fileNo * 0xa94);
|
||||
dSv_save_c tmp;
|
||||
|
||||
tmp.init();
|
||||
tmp.getPlayer().getPlayerInfo().setPlayerName("");
|
||||
tmp.getPlayer().getPlayerInfo().setHorseName("");
|
||||
memcpy(¶m_0 + fileNo * 0xa94, &tmp, 0x958);
|
||||
memcpy(&ptr, &tmp, 0x958);
|
||||
printf("INIT size:%d\n", 0x958);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dSv_info_c::initdata_to_card(char* param_0, int param_1) {
|
||||
asm int dSv_info_c::initdata_to_card(char* param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/save/d_save/initdata_to_card__10dSv_info_cFPci.s"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user