mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-09 06:03:22 -04:00
Fix weak func order for d_stage
This commit is contained in:
+1
-1
@@ -463,7 +463,7 @@ config.libs = [
|
||||
"progress_category": "game",
|
||||
"host": True,
|
||||
"objects": [
|
||||
Object(Equivalent, "d/d_stage.cpp"), # weak func order
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_stage.cpp"),
|
||||
Object(NonMatching, "d/d_map.cpp"),
|
||||
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_com_inf_game.cpp", extra_cflags=['-sym off']),
|
||||
Object(Matching, "d/d_com_lib_game.cpp"),
|
||||
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
~dComIfG_play_c() {}
|
||||
|
||||
dStage_roomControl_c* getRoomControl() { return &mRoomCtrl; }
|
||||
dStage_stageDt_c& getStage() { return mStageData; }
|
||||
dStage_dt_c& getStage() { return mStageData; }
|
||||
dEvt_control_c& getEvent() { return mEvtCtrl; }
|
||||
dEvent_manager_c& getEvtManager() { return mEvtManager; }
|
||||
dPa_control_c* getParticle() { return mParticle; }
|
||||
@@ -2131,6 +2131,10 @@ inline void dComIfGp_setCb1Player(fopAc_ac_c* player) {
|
||||
g_dComIfG_gameInfo.play.setPlayerPtr(1, player);
|
||||
}
|
||||
|
||||
inline dStage_dt_c& dComIfGp_getStage() {
|
||||
return g_dComIfG_gameInfo.play.getStage();
|
||||
}
|
||||
|
||||
inline roomRead_class* dComIfGp_getStageRoom() {
|
||||
return g_dComIfG_gameInfo.play.getStage().getRoom();
|
||||
}
|
||||
@@ -2175,6 +2179,10 @@ inline u16 dComIfGp_getStagePlayerNum() {
|
||||
return g_dComIfG_gameInfo.play.getStage().getPlayerNum();
|
||||
}
|
||||
|
||||
inline stage_scls_info_dummy_class* dComIfGp_getStageSclsInfo() {
|
||||
return g_dComIfG_gameInfo.play.getStage().getSclsInfo();
|
||||
}
|
||||
|
||||
inline daShip_c* dComIfGp_getShipActor() {
|
||||
return (daShip_c*)g_dComIfG_gameInfo.play.getPlayerPtr(2);
|
||||
}
|
||||
@@ -2207,14 +2215,6 @@ inline u8 dComIfGp_getIkadaShipBeforeRoomId() {
|
||||
return g_dComIfG_gameInfo.play.getIkadaShipBeforeRoomId();
|
||||
}
|
||||
|
||||
inline stage_scls_info_dummy_class* dComIfGp_getStageSclsInfo() {
|
||||
return g_dComIfG_gameInfo.play.getStage().getSclsInfo();
|
||||
}
|
||||
|
||||
inline dStage_stageDt_c& dComIfGp_getStage() {
|
||||
return g_dComIfG_gameInfo.play.getStage();
|
||||
}
|
||||
|
||||
inline dVibration_c& dComIfGp_getVibration() {
|
||||
return g_dComIfG_gameInfo.play.getVibration();
|
||||
}
|
||||
|
||||
@@ -597,6 +597,7 @@ public:
|
||||
|
||||
class dStage_roomDt_c : public dStage_dt_c {
|
||||
public:
|
||||
void setRoomNo(int roomNo) { mRoomNo = roomNo; }
|
||||
/* vt[ 2] */ virtual void init();
|
||||
/* vt[ 3] */ virtual int getRoomNo() const { return mRoomNo; }
|
||||
/* vt[ 4] */ virtual void setCamera(stage_camera_class* i_camera) { mpCamera = i_camera; }
|
||||
|
||||
+5
-5
@@ -246,9 +246,9 @@ void dCamera_c::initialize(camera_class* camera, fopAc_ac_c* playerActor, u32 ca
|
||||
mTrimSize = 0;
|
||||
mTrimTypeForce = -1;
|
||||
|
||||
dStage_stageDt_c* stage_dt = &dComIfGp_getStage();
|
||||
dStage_dt_c* stage_dt = &dComIfGp_getStage();
|
||||
if (stage_dt != NULL) {
|
||||
stage_stag_info_class* stag_info = stage_dt->getStagInfo();
|
||||
stage_stag_info_class* stag_info = stage_dt->getStagInfo();
|
||||
if (stag_info && stag_info->mCameraMapToolID != -1) { // Bug, comparing unsigned value with -1
|
||||
mapToolType = GetCameraTypeFromMapToolID(stag_info->mCameraMapToolID, -1);
|
||||
if (mapToolType != 0xFF && Chtyp(mapToolType)) {
|
||||
@@ -1510,7 +1510,7 @@ bool dCamera_c::onStyleChange(s32 i_style1, s32 i_style2) {
|
||||
|
||||
/* 80164F5C-8016513C .text GetCameraTypeFromMapToolID__9dCamera_cFll */
|
||||
int dCamera_c::GetCameraTypeFromMapToolID(s32 r27, s32 i_roomNo) {
|
||||
dStage_stageDt_c& stage_dt = *(dStage_stageDt_c*)&dComIfGp_getStage();
|
||||
dStage_dt_c& stage_dt = *(dStage_dt_c*)&dComIfGp_getStage();
|
||||
|
||||
int cam_type_num;
|
||||
int arrowIdx;
|
||||
@@ -4633,7 +4633,7 @@ void store(camera_process_class* i_this) {
|
||||
|
||||
int camera_id = get_camera_id(a_this);
|
||||
|
||||
dStage_stageDt_c* stage = &dComIfGp_getStage();
|
||||
dStage_dt_c* stage = &dComIfGp_getStage();
|
||||
|
||||
cXyz oldCenter = *fopCamM_GetCenter_p(a_this);
|
||||
cXyz oldEye = *fopCamM_GetEye_p(a_this);
|
||||
@@ -4834,7 +4834,7 @@ cPhs_State init_phase2(camera_class* i_this) {
|
||||
float farPlane = 160000.0f;
|
||||
|
||||
if (dComIfGp_getStage().getStagInfo() != NULL) {
|
||||
dStage_stageDt_c* stage_dt = &dComIfGp_getStage();
|
||||
dStage_dt_c* stage_dt = &dComIfGp_getStage();
|
||||
stage_dt->getStagInfo();
|
||||
|
||||
farPlane = stage_dt->getStagInfo()->mFarPlane;
|
||||
|
||||
+1
-1
@@ -191,7 +191,7 @@ cPhs_State phase_2(room_of_scene_class* i_this) {
|
||||
}
|
||||
|
||||
i_this->mpRoomDt = dComIfGp_roomControl_getStatusRoomDt(roomNo);
|
||||
i_this->mpRoomDt->mRoomNo = roomNo;
|
||||
i_this->mpRoomDt->setRoomNo(roomNo);
|
||||
i_this->mpRoomData = dComIfG_getStageRes(arcName, "room.dzr");
|
||||
|
||||
if (i_this->mpRoomData != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user