mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -04:00
Various d_ work (#2968)
* map work * various meter work * d_meter_button ShieldD almost equivalent * error fix
This commit is contained in:
@@ -78,7 +78,7 @@ public:
|
||||
virtual void writeLoop_(const void* pBuffer, s32 size, u32 pos);
|
||||
virtual void writeDone_(s32 len);
|
||||
virtual void waitMessage_();
|
||||
virtual s32 getFileSize() const;
|
||||
virtual s32 getFileSize() const { return mFileLength; }
|
||||
|
||||
/* 0x04 */ u32 mHandle;
|
||||
/* 0x08 */ s32 mFileLength;
|
||||
|
||||
@@ -1112,6 +1112,8 @@ public:
|
||||
|
||||
void CorrectCenter() { setFlag(0x40000000); }
|
||||
|
||||
int Gear() { return mGear; }
|
||||
|
||||
static engine_fn engine_tbl[];
|
||||
|
||||
/* 0x000 */ camera_class* field_0x0;
|
||||
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
u8 getYSetFlagForce() { return mItemInfo.mYSetFlagForce; }
|
||||
u8 getFaceAnimeID() { return mItemInfo.mFaceAnimeID; }
|
||||
u8 getBaseAnimeID() { return mItemInfo.mBaseAnimeID; }
|
||||
bool isCStickSetFlag(u8 flag) { return mItemInfo.mCStickSetFlag & flag; }
|
||||
bool isCStickSetFlag(u8 flag) { return (mItemInfo.mCStickSetFlag & flag) ? true : false; }
|
||||
bool isDoSetFlag(u8 flag) { return (mItemInfo.mDoSetFlag & flag) ? true : false; }
|
||||
bool isASetFlag(u8 flag) { return (mItemInfo.mASetFlag & flag) ? true : false; }
|
||||
bool isRSetFlag(u8 flag) { return (mItemInfo.mRSetFlag & flag) ? true : false; }
|
||||
|
||||
+29
-7
@@ -2,6 +2,11 @@
|
||||
#define D_MAP_D_MAP_H
|
||||
|
||||
#include "d/d_map_path_dmap.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
|
||||
struct dMap_HIO_prm_res_src_s {
|
||||
|
||||
};
|
||||
|
||||
class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c {
|
||||
public:
|
||||
@@ -21,10 +26,11 @@ public:
|
||||
virtual u32 addStringBinary(char*, u32, u32);
|
||||
|
||||
/* 0x04 */ u8 field_0x4[0x08 - 0x04];
|
||||
/* 0x08 */ dMap_HIO_list_c field_0x8;
|
||||
/* 0x08 */ dMap_HIO_list_c mList;
|
||||
|
||||
static dMap_HIO_c* mMySelfPointer;
|
||||
static dMpath_HIO_n::list_s l_list;
|
||||
static dMap_HIO_prm_res_src_s* m_res_src_p;
|
||||
};
|
||||
|
||||
struct dMap_prm_res_s {
|
||||
@@ -114,6 +120,7 @@ public:
|
||||
void setMapPaletteColorAlphaPer(int, int, f32);
|
||||
void resCopy();
|
||||
dMap_c(int, int, int, int);
|
||||
void changeTextureSize(int, int, int);
|
||||
void _remove();
|
||||
void getMapMinMaxXZ(int, f32*, f32*, f32*, f32*);
|
||||
void getPack(int, f32*, f32*);
|
||||
@@ -141,11 +148,15 @@ public:
|
||||
ResTIMG* getResTIMGPointer() { return mResTIMG; }
|
||||
f32 getTopEdgePlus() { return mTopEdgePlus; }
|
||||
f32 getPackPlusZ() { return mPackPlusZ; }
|
||||
f32 getPackZ() { return mPackZ; }
|
||||
f32 getTexelPerCm() { return 1.0f / field_0x58; }
|
||||
u16 getTexSizeY() { return mTexSizeY; }
|
||||
f32 getPackZ() const { return mPackZ; }
|
||||
f32 getTexelPerCm() const { return 1.0f / field_0x58; }
|
||||
u16 getTexSizeY() const { return mTexSizeH; }
|
||||
f32 getRightEdgePlus() { return mRightEdgePlus; }
|
||||
f32 getPackX() { return mPackX; }
|
||||
f32 getPackX() const { return mPackX; }
|
||||
int getStayRoomNo() const { return mStayRoomNo; }
|
||||
f32 getCenterZ() const { return mCenterZ; }
|
||||
|
||||
static dMap_c* m_mySelfPointer;
|
||||
|
||||
private:
|
||||
/* 0x40 */ dMap_prm_res_s* m_res_src;
|
||||
@@ -162,8 +173,8 @@ private:
|
||||
/* 0x6C */ f32 mRightEdgePlus;
|
||||
/* 0x70 */ f32 mTopEdgePlus;
|
||||
/* 0x74 */ int field_0x74;
|
||||
/* 0x78 */ u16 mTexSizeX;
|
||||
/* 0x7A */ u16 mTexSizeY;
|
||||
/* 0x78 */ u16 mTexSizeW;
|
||||
/* 0x7A */ u16 mTexSizeH;
|
||||
/* 0x7C */ int mStayRoomNo;
|
||||
/* 0x80 */ int field_0x80;
|
||||
/* 0x84 */ int field_0x84;
|
||||
@@ -175,4 +186,15 @@ private:
|
||||
/* 0x90 */ u8 field_0x90;
|
||||
}; // Size: 0x94
|
||||
|
||||
#if DEBUG
|
||||
class dMpath_RGBA_c {
|
||||
public:
|
||||
GXColor getGXColor() { return mColor; }
|
||||
|
||||
GXColor mColor;
|
||||
|
||||
virtual ~dMpath_RGBA_c() {}
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* D_MAP_D_MAP_H */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_MAP_D_MAP_PATH_H
|
||||
|
||||
#include "d/d_drawlist.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
|
||||
namespace dMpath_HIO_n {
|
||||
struct list_s {
|
||||
@@ -11,14 +12,14 @@ namespace dMpath_HIO_n {
|
||||
|
||||
class hioList_c {
|
||||
public:
|
||||
/* 0x00 */ list_s field_0x0;
|
||||
/* 0x00 */ list_s mList;
|
||||
|
||||
virtual ~hioList_c() {}
|
||||
virtual void copySrcToHio() = 0;
|
||||
virtual void copyHioToDst() = 0;
|
||||
virtual void copyBufToHio(const char*) = 0;
|
||||
|
||||
void set(const list_s& param_1) { field_0x0 = param_1; }
|
||||
void set(const list_s& param_1) { mList = param_1; }
|
||||
void gen(JORMContext*);
|
||||
void update(JORMContext*);
|
||||
u32 addString(char*, u32, u32) const;
|
||||
@@ -152,6 +153,7 @@ public:
|
||||
virtual const GXColor* getDecoLineColor(int, int);
|
||||
virtual s32 getDecorationLineWidth(int);
|
||||
|
||||
f32 getCmPerTexel() const { return mCmPerTexel; }
|
||||
bool isDrawAreaCheck(const Vec& param_0) {
|
||||
return (param_0.x >= mPosX - field_0x8 * 2.0f &&
|
||||
param_0.x <= mPosX + field_0x8 * 2.0f) &&
|
||||
|
||||
@@ -96,7 +96,9 @@ public:
|
||||
virtual ~dMenu_Option_c();
|
||||
|
||||
u8 getQuitStatus() { return mQuitStatus; }
|
||||
u8 isUseFlag(u8 i_flag) { return (mUseFlag & i_flag) != 0; }
|
||||
bool isUseFlag(u8 i_flag) {
|
||||
return ((u8)mUseFlag & (u8)i_flag) != 0 ? true : false;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x004 */ J2DScreen* mpBackScreen;
|
||||
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
void setItemParamZ(u8);
|
||||
void setItemParamB(u8);
|
||||
bool getFishingType();
|
||||
bool getCanoeFishing();
|
||||
u8 getCanoeFishing();
|
||||
bool getCameraSubject();
|
||||
bool getItemSubject();
|
||||
bool getPlayerSubject();
|
||||
|
||||
@@ -123,14 +123,14 @@ public:
|
||||
void setPauseStatus(u8 i_status) { mPauseStatus = i_status; }
|
||||
void resetPauseStatus() { mPauseStatus = 0; }
|
||||
u8 getPauseStatus() { return mPauseStatus; }
|
||||
bool isGameStatus(int i_status) { return mGameStatus & i_status; }
|
||||
bool isGameStatus(int i_status) { return (mGameStatus & (u16)i_status) != 0 ? true : false; }
|
||||
bool isTouchKeyCheck(int i_status) { return mTouchKeyCheck & (1 << i_status); }
|
||||
|
||||
// fake function, should be isTouchKeyCheck
|
||||
bool isTouchKeyCheck_alt(int i_status) { return (mTouchKeyCheck >> i_status) & 1; }
|
||||
|
||||
void setMapKeyDirection(u16 i_direction) { mMapKeyDirection = i_direction; }
|
||||
bool isSub2DStatus(int i_flag) { return mSub2DStatus & (1 << i_flag); }
|
||||
bool isSub2DStatus(int i_flag) { return (mSub2DStatus & (u16)(1 << i_flag)) != 0 ? true : false; }
|
||||
void offMenuInForce(int i_flag) { unk_0x98 &= ~(1 << i_flag); }
|
||||
bool isMenuInForce(int i_flag) { return unk_0x98 & (1 << i_flag); }
|
||||
u16 getMapKeyDirection() { return mMapKeyDirection; }
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
u16 getFloatingFlowID() { return mFloatingFlowID; }
|
||||
bool isFloatingMessageWakuVisible() { return mFloatingMessageWakuVisible; }
|
||||
void onBlinkButton(int i_flag) { mBlinkButton |= i_flag; }
|
||||
bool isBlinkButton(int i_flag) { return mBlinkButton & i_flag; }
|
||||
bool isBlinkButton(int i_flag) { return (mBlinkButton & (u16)i_flag) != 0 ? true : false; }
|
||||
void resetBlinkButton() { mBlinkButton = 0; }
|
||||
s16 getFloatingMessageTimer() { return mFloatingMessageTimer; }
|
||||
u16 getFloatingMessageID() { return mFloatingMessageID; }
|
||||
@@ -739,7 +739,7 @@ inline s16 dMeter2Info_getFloatingMessageTimer() {
|
||||
return g_meter2_info.getFloatingMessageTimer();
|
||||
}
|
||||
|
||||
inline u32 dMeter2Info_getFloatingMessageID() {
|
||||
inline u16 dMeter2Info_getFloatingMessageID() {
|
||||
return g_meter2_info.getFloatingMessageID();
|
||||
}
|
||||
|
||||
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
/* 0x2C4 */ f32 mButtonATextSpacing;
|
||||
/* 0x2C8 */ s32 mButtonATextActionID;
|
||||
/* 0x2CC */ u32 field_0x2cc;
|
||||
/* 0x2D0 */ bool mButtonATextDebug;
|
||||
/* 0x2D0 */ u8 mButtonATextDebug;
|
||||
/* 0x2D4 */ f32 mButtonBFontScale;
|
||||
/* 0x2D8 */ f32 mButtonBFontPosX;
|
||||
/* 0x2DC */ f32 mButtonBFontPosY;
|
||||
@@ -840,13 +840,13 @@ public:
|
||||
/* 0x420 */ s16 mButtonCrossMoveFrame;
|
||||
/* 0x422 */ s16 field_0x422;
|
||||
/* 0x424 */ s16 field_0x424;
|
||||
/* 0x426 */ bool mButtonDebug[4];
|
||||
/* 0x426 */ u8 mButtonDebug[4];
|
||||
/* 0x42A */ u8 mButtonXYItemDimAlpha;
|
||||
/* 0x42B */ u8 mButtonXYBaseDimAlpha;
|
||||
/* 0x42C */ u8 field_0x42c;
|
||||
/* 0x42D */ u8 mMaxSpurAmount;
|
||||
/* 0x42E */ bool mSpurDebug;
|
||||
/* 0x42F */ bool field_0x42f;
|
||||
/* 0x42E */ u8 mSpurDebug;
|
||||
/* 0x42F */ u8 field_0x42f;
|
||||
/* 0x430 */ JUtility::TColor mSpurIconPikariFrontInner;
|
||||
/* 0x434 */ JUtility::TColor mSpurIconPikariFrontOuter;
|
||||
/* 0x438 */ JUtility::TColor mSpurIconPikariBackInner;
|
||||
@@ -921,9 +921,9 @@ public:
|
||||
/* 0x55C */ u32 mMessageID;
|
||||
/* 0x560 */ u32 mFlowID;
|
||||
/* 0x564 */ s16 mMessageDuration;
|
||||
/* 0x566 */ bool mMessageDebug;
|
||||
/* 0x567 */ bool mFlowDebug;
|
||||
/* 0x568 */ bool mItemScaleAdjustON;
|
||||
/* 0x566 */ u8 mMessageDebug;
|
||||
/* 0x567 */ u8 mFlowDebug;
|
||||
/* 0x568 */ u8 mItemScaleAdjustON;
|
||||
/* 0x569 */ u8 mItemScalePercent;
|
||||
/* 0x56C */ f32 mTouchAreaUnselectScale[5];
|
||||
/* 0x580 */ f32 mTouchAreaSelectScale[5];
|
||||
@@ -937,7 +937,7 @@ public:
|
||||
/* 0x5F0 */ JUtility::TColor mTouchAreaSelectWhite[3];
|
||||
/* 0x5FC */ JUtility::TColor mTouchAreaSelectBlack[3];
|
||||
/* 0x608 */ s16 mTouchAreaSelectFrameNum;
|
||||
/* 0x60A */ bool field_0x60a;
|
||||
/* 0x60A */ u8 field_0x60a;
|
||||
/* 0x60C */ f32 mLanternIconMeterPosX;
|
||||
/* 0x610 */ f32 mLanternIconMeterPosY;
|
||||
/* 0x614 */ f32 mLanternIconMeterSize;
|
||||
|
||||
@@ -141,8 +141,12 @@ public:
|
||||
|
||||
bool isSetButton(u8 i_no) { return mButtonTimers[i_no] <= 0; }
|
||||
void onButtonShowBit(int i_bit) { field_0x4b0 |= (u16)(1 << i_bit); }
|
||||
#if DEBUG
|
||||
void offButtonShowBit(int i_bit) { field_0x4b0 &= (u16)~(u16)(1 << i_bit); }
|
||||
#else
|
||||
void offButtonShowBit(int i_bit) { field_0x4b0 &= ~(u16)(1 << i_bit); }
|
||||
bool isButtonShowBit(int i_bit) { return field_0x4b0 & (u16)(1 << i_bit); }
|
||||
#endif
|
||||
bool isButtonShowBit(int i_bit) { return field_0x4b0 & (u16)(1 << i_bit) ? true : false; }
|
||||
|
||||
static const int BUTTON_NUM = 22;
|
||||
|
||||
|
||||
+41
-32
@@ -2,6 +2,7 @@
|
||||
#define D_METER_D_METER_MAP_H
|
||||
|
||||
#include "d/d_map_path_dmap.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
|
||||
class J2DPicture;
|
||||
class dMap_c;
|
||||
@@ -12,43 +13,47 @@ public:
|
||||
dMeter_map_HIO_c();
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent*);
|
||||
virtual void genMessage(JORMContext*);
|
||||
virtual ~dMeter_map_HIO_c();
|
||||
virtual ~dMeter_map_HIO_c() {
|
||||
mMySelfPointer = NULL;
|
||||
mAreaMap = NULL;
|
||||
field_0x38 = 0;
|
||||
}
|
||||
|
||||
void update();
|
||||
|
||||
static dMeter_map_HIO_c* mMySelfPointer;
|
||||
private:
|
||||
/* 0x04 */ u8 field_0x4;
|
||||
/* 0x05 */ u8 field_0x5;
|
||||
/* 0x06 */ u8 field_0x6;
|
||||
/* 0x07 */ u8 field_0x7;
|
||||
/* 0x08 */ s16 field_0x8;
|
||||
/* 0x0A */ s16 field_0xa;
|
||||
/* 0x0C */ s16 field_0xc;
|
||||
/* 0x0E */ s16 field_0xe;
|
||||
/* 0x10 */ s16 field_0x10;
|
||||
/* 0x12 */ s16 field_0x12;
|
||||
/* 0x14 */ s16 field_0x14;
|
||||
|
||||
/* 0x04 */ s8 field_0x4;
|
||||
/* 0x05 */ u8 mDebugMapExpansion;
|
||||
/* 0x06 */ u8 mMapDisplayLocation;
|
||||
/* 0x08 */ s16 mWideBottomLeftX;
|
||||
/* 0x0A */ s16 mWideY;
|
||||
/* 0x0C */ s16 mNormalBottomLeftX;
|
||||
/* 0x0E */ s16 mNormalY;
|
||||
/* 0x10 */ s16 mGcBottomLeftX;
|
||||
/* 0x12 */ s16 mGcY;
|
||||
/* 0x14 */ s16 mHiddenRightX;
|
||||
/* 0x16 */ u8 field_0x16;
|
||||
/* 0x17 */ u8 field_0x17;
|
||||
/* 0x17 */ u8 mSizeTypeChange;
|
||||
/* 0x18 */ s16 field_0x18;
|
||||
/* 0x1A */ s16 field_0x1a;
|
||||
/* 0x1C */ s16 field_0x1c;
|
||||
/* 0x1E */ s16 field_0x1e;
|
||||
/* 0x20 */ s16 field_0x20;
|
||||
/* 0x22 */ s16 field_0x22;
|
||||
/* 0x24 */ s16 field_0x24;
|
||||
/* 0x26 */ u8 field_0x26;
|
||||
/* 0x27 */ u8 field_0x27[0x2a - 0x27];
|
||||
/* 0x1A */ s16 mMediumHorizontal;
|
||||
/* 0x1C */ s16 mMediumVertical;
|
||||
/* 0x1E */ s16 mBigHorizontal;
|
||||
/* 0x20 */ s16 mBigVertical;
|
||||
/* 0x22 */ s16 mSmallHorizontal;
|
||||
/* 0x24 */ s16 mSmallVertical;
|
||||
/* 0x26 */ u8 mMapDisplaySize;
|
||||
/* 0x28 */ s16 field_0x28;
|
||||
/* 0x2A */ s16 field_0x2a;
|
||||
/* 0x2C */ u8 field_0x2c;
|
||||
/* 0x2D */ u8 field_0x2d;
|
||||
/* 0x2E */ u8 field_0x2e;
|
||||
/* 0x2F */ u8 field_0x2f;
|
||||
/* 0x2C */ u8 mMapAlphaTest;
|
||||
/* 0x2D */ u8 mAlpha;
|
||||
/* 0x2E */ u8 mTextureResolutionHalved;
|
||||
/* 0x2F */ u8 mForcedMapTopEdgeChange;
|
||||
/* 0x30 */ s16 field_0x30;
|
||||
/* 0x32 */ u8 field_0x32;
|
||||
/* 0x33 */ u8 field_0x33;
|
||||
/* 0x34 */ dMap_HIO_c* field_0x34;
|
||||
/* 0x32 */ u8 mMapDisplayProhibited;
|
||||
/* 0x33 */ u8 mMapRenderingProhibited;
|
||||
/* 0x34 */ dMap_HIO_c* mAreaMap;
|
||||
/* 0x38 */ int field_0x38;
|
||||
};
|
||||
|
||||
class dMeterMap_c : public dDlst_base_c {
|
||||
@@ -68,6 +73,8 @@ public:
|
||||
static bool isMapOpenCheck();
|
||||
dMeterMap_c(J2DScreen*);
|
||||
void _create(J2DScreen*);
|
||||
void setDispPosOutSide();
|
||||
void setDispPosInSide();
|
||||
void _delete();
|
||||
void _move(u32);
|
||||
void _draw();
|
||||
@@ -83,17 +90,19 @@ public:
|
||||
virtual ~dMeterMap_c();
|
||||
|
||||
bool isDispPosInsideFlg() { return field_0x2d != 0; }
|
||||
dMeterMap_c* getMapPointer() { return (dMeterMap_c*)mMap; }
|
||||
void setSizeW(f32 w) { mSizeW = w; }
|
||||
void setSizeH(f32 h) { mSizeH = h; }
|
||||
|
||||
enum { MAP_SIZE_TYPE_BIG = 2, MAP_SIZE_TYPE_SMALL = 3, MAP_SIZE_TYPE_STAGE = 7 };
|
||||
enum { MAP_SIZE_TYPE_BIG = 2, MAP_SIZE_TYPE_SMALL = 3, MAP_SIZE_TYPE_MEDIUM = 4, MAP_SIZE_TYPE_STAGE = 7 };
|
||||
|
||||
static dMeterMap_c* mMySelfPointer;
|
||||
|
||||
private:
|
||||
#if DEBUG
|
||||
/* 0x04 */ u8 field_0x4_debug;
|
||||
/* 0x08 */ int field_0x8_debug;
|
||||
#endif
|
||||
|
||||
private:
|
||||
/* 0x04 */ J2DPicture* mMapJ2DPicture;
|
||||
/* 0x08 */ dMap_c* mMap;
|
||||
/* 0x0C */ s32 mIsCompass;
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
void changeGroupLocal(s16);
|
||||
bool getStringLocal(u32, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*, char*,
|
||||
char*, char*, s16*);
|
||||
u8 isGetItemMessage();
|
||||
bool isGetItemMessage();
|
||||
bool isKanbanMessage();
|
||||
bool isHowlMessage();
|
||||
bool isMidonaMessage();
|
||||
@@ -424,7 +424,7 @@ inline void dMsgObject_setTalkActor(fopAc_ac_c* actor) {
|
||||
inline bool dMsgObject_getString(u32 param_0, J2DTextBox* param_1, J2DTextBox* param_2,
|
||||
JUTFont* param_3, COutFont_c* param_4, char* param_5,
|
||||
char* param_6, char* param_7, s16* param_8) {
|
||||
return dMsgObject_c::getString(param_0, param_1, param_2, param_3, param_4, param_5, param_6,
|
||||
return dMsgObject_getMsgObjectClass()->getString(param_0, param_1, param_2, param_3, param_4, param_5, param_6,
|
||||
param_7, param_8);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ inline void dMsgObject_onMsgSend() {
|
||||
}
|
||||
|
||||
inline bool dMsgObject_isFukidashiCheck() {
|
||||
return dMsgObject_getMsgObjectClass()->getScrnDrawPtr() != NULL ? true : false;
|
||||
return dMsgObject_getMsgObjectClass()->getScrnDrawPtr() == NULL ? false : true;
|
||||
}
|
||||
|
||||
inline void* dMsgObject_getTalkHeap() {
|
||||
|
||||
+10
-3
@@ -80,6 +80,13 @@ struct stage_stag_info_class {
|
||||
/* 0x2C */ u8 mParticleNo[16];
|
||||
}; // Size: 0x3C
|
||||
|
||||
class dStage_stagInfo_c {
|
||||
public:
|
||||
enum {
|
||||
/* 0x1 */ UB_D_MAP = 1,
|
||||
};
|
||||
};
|
||||
|
||||
// SCLS
|
||||
struct stage_scls_info_class {
|
||||
/* 0x0 */ char mStage[8];
|
||||
@@ -1358,7 +1365,7 @@ inline u32 dStage_stagInfo_GetParticleNo(stage_stag_info_class* p_info) {
|
||||
return (p_info->field_0x0a >> 0x3) & 0xFF;
|
||||
}
|
||||
|
||||
inline s16 dStage_stagInfo_GetUpButton(stage_stag_info_class* p_info) {
|
||||
inline s32 dStage_stagInfo_GetUpButton(stage_stag_info_class* p_info) {
|
||||
return p_info->field_0x0a & 7;
|
||||
}
|
||||
|
||||
@@ -1475,11 +1482,11 @@ inline f32 dStage_FileList2_dt_GetRightRmX(dStage_FileList2_dt_c* p_fList2) {
|
||||
return p_fList2->mRightRmX;
|
||||
}
|
||||
|
||||
inline f32 dStage_FileList2_dt_GetInnerRmZ(dStage_FileList2_dt_c* p_fList2) {
|
||||
inline f32 dStage_FileList2_dt_GetInnerRmZ(const dStage_FileList2_dt_c* p_fList2) {
|
||||
return p_fList2->mInnerRmZ;
|
||||
}
|
||||
|
||||
inline f32 dStage_FileList2_dt_GetFrontRmZ(dStage_FileList2_dt_c* p_fList2) {
|
||||
inline f32 dStage_FileList2_dt_GetFrontRmZ(const dStage_FileList2_dt_c* p_fList2) {
|
||||
return p_fList2->mFrontRmZ;
|
||||
}
|
||||
|
||||
|
||||
+119
-13
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/d_map.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
@@ -23,18 +24,105 @@ void dMap_HIO_c::genMessage(JORMContext* mctx) {
|
||||
mctx->genButton("バイナリファイル書き出し", 0x4000006, 0, NULL, -1, -1, 512, 24);
|
||||
mctx->genButton("バイナリファイル読み込み", 0x4000007, 0, NULL, -1, -1, 512, 24);
|
||||
mctx->genButton("バイナリダンプ", 0x4000008, 0, NULL, -1, -1, 512, 24);
|
||||
field_0x8.gen(mctx);
|
||||
mList.gen(mctx);
|
||||
mctx->genButton("ID_INFO_ROOM_MAX_TEXEL", 0x4000009, 0, NULL, -1, -1, 512, 24);
|
||||
mctx->genButton("ID_INFO_SWITCH", 0x400000a, 0, NULL, -1, -1, 512, 24);
|
||||
}
|
||||
|
||||
dMap_HIO_c::dMap_HIO_c() {
|
||||
mMySelfPointer = this;
|
||||
field_0x8.set(l_list);
|
||||
mList.set(l_list);
|
||||
}
|
||||
|
||||
void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent*) {
|
||||
// DEBUG NONMATCHING
|
||||
void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) {
|
||||
// NONMATCHING
|
||||
JORReflexible::listenPropertyEvent(evt);
|
||||
|
||||
if (dMap_HIO_prm_res_dst_s::m_res != NULL) {
|
||||
JORFile jorFile;
|
||||
switch ((u32)evt->id) {
|
||||
case 0x4000002:
|
||||
if (dMap_c::m_mySelfPointer != NULL) {
|
||||
f32 packX, packZ;
|
||||
dMap_c::m_mySelfPointer->getPack(dMap_c::m_mySelfPointer->getStayRoomNo(), &packX, &packZ);
|
||||
OS_REPORT("mNowCenterRoomNo<%d>packX<%11.3f>packZ<%11.3f>\n", packX, packZ, dMap_c::m_mySelfPointer->getStayRoomNo());
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4000004:
|
||||
writeHostioTextFile(NULL);
|
||||
break;
|
||||
|
||||
case 0x4000005:
|
||||
writeBinaryTextFile(NULL);
|
||||
break;
|
||||
|
||||
case 0x4000006:
|
||||
writeBinaryFile(NULL);
|
||||
break;
|
||||
|
||||
case 0x4000007: {
|
||||
readBinaryFile(NULL);
|
||||
JORMContext* ctx_p = attachJORMContext(8);
|
||||
ctx_p->startUpdateNode(this);
|
||||
mList.update(ctx_p);
|
||||
ctx_p->endUpdateNode();
|
||||
releaseJORMContext(ctx_p);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x4000003: {
|
||||
JORMContext* ctx_p = attachJORMContext(8);
|
||||
ctx_p->startUpdateNode(this);
|
||||
mList.update(ctx_p);
|
||||
ctx_p->endUpdateNode();
|
||||
releaseJORMContext(ctx_p);
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x4000008:
|
||||
binaryDump(dMap_HIO_prm_res_dst_s::m_res, 0x1BC);
|
||||
break;
|
||||
|
||||
case 0x4000009:
|
||||
if (dMap_c::m_mySelfPointer != NULL) {
|
||||
f32 stageTexelMinZ = -3.4028235e38f;
|
||||
f32 stageTexelMaxZ = -3.4028235e38f;
|
||||
for (int i = 0; i < 64; i++) {
|
||||
dStage_FileList2_dt_c* fileList2_p = dStage_roomControl_c::getFileList2(i);
|
||||
if (fileList2_p != NULL) {
|
||||
f32 texelMaxZ = dStage_FileList2_dt_GetInnerRmZ(fileList2_p);
|
||||
f32 frontRmZ = dStage_FileList2_dt_GetFrontRmZ(fileList2_p);
|
||||
f32 cmPerTexel = dMap_c::m_mySelfPointer->getCmPerTexel();
|
||||
f32 texelMinZ = (dMap_c::m_mySelfPointer->getCenterZ() - texelMaxZ) / cmPerTexel;
|
||||
texelMaxZ = dMap_c::m_mySelfPointer->getCmPerTexel();
|
||||
texelMaxZ = (frontRmZ - dMap_c::m_mySelfPointer->getCenterZ()) / texelMaxZ;
|
||||
OS_REPORT("<%2d>texelMinZ<%10.3f>texelMaxZ<%10.3f>\n", texelMinZ, texelMaxZ, i);
|
||||
|
||||
if (texelMinZ > stageTexelMinZ) {
|
||||
stageTexelMinZ = texelMinZ;
|
||||
}
|
||||
|
||||
if (texelMaxZ > stageTexelMaxZ) {
|
||||
stageTexelMaxZ = texelMaxZ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OS_REPORT("stageTexelMinZ<%10.3f>\n", stageTexelMinZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dMap_HIO_list_c::copySrcToHio() {
|
||||
// NONMATCHING
|
||||
if (dMap_HIO_c::m_res_src_p != NULL) {
|
||||
dMpath_RGBA_c color;
|
||||
for (int i = 0; i < 51; i++) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -637,8 +725,8 @@ dMap_c::dMap_c(int param_0, int param_1, int param_2, int param_3) {
|
||||
mTopEdgePlus = 0.0f;
|
||||
|
||||
field_0x74 = 0;
|
||||
mTexSizeX = 0;
|
||||
mTexSizeY = 0;
|
||||
mTexSizeW = 0;
|
||||
mTexSizeH = 0;
|
||||
mStayRoomNo = -1;
|
||||
field_0x80 = -1;
|
||||
field_0x84 = -1;
|
||||
@@ -658,8 +746,8 @@ dMap_c::dMap_c(int param_0, int param_1, int param_2, int param_3) {
|
||||
m_res_src = (dMap_prm_res_s*)dComIfG_getObjectRes("Always", 0x45);
|
||||
resCopy();
|
||||
|
||||
mTexSizeX = param_0;
|
||||
mTexSizeY = param_1;
|
||||
mTexSizeW = param_0;
|
||||
mTexSizeH = param_1;
|
||||
|
||||
if (dMap_HIO_prm_res_dst_s::m_res->field_0x1ae > 0) {
|
||||
field_0x74 = dMap_HIO_prm_res_dst_s::m_res->field_0x1b0 / 6;
|
||||
@@ -669,14 +757,32 @@ dMap_c::dMap_c(int param_0, int param_1, int param_2, int param_3) {
|
||||
mImage_p = new (0x20) u8[buffer_size];
|
||||
JUT_ASSERT(0, mImage_p != NULL);
|
||||
|
||||
renderingDAmap_c::init(mImage_p, mTexSizeX, mTexSizeY, mTexSizeX, mTexSizeY);
|
||||
renderingDAmap_c::init(mImage_p, mTexSizeW, mTexSizeH, mTexSizeW, mTexSizeH);
|
||||
|
||||
mResTIMG = new (0x20) ResTIMG;
|
||||
JUT_ASSERT(0, mResTIMG != NULL);
|
||||
|
||||
makeResTIMG(mResTIMG, mTexSizeX, mTexSizeY, mImage_p, (u8*)m_res, 0x33);
|
||||
makeResTIMG(mResTIMG, mTexSizeW, mTexSizeH, mImage_p, (u8*)m_res, 0x33);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
void dMap_c::changeTextureSize(int param_1, int param_2, int param_3) {
|
||||
JUT_ASSERT(2672, mImage_p != NULL);
|
||||
JUT_ASSERT(2673, mResTIMG != NULL);
|
||||
|
||||
mTexSizeW = param_1 >> param_3;
|
||||
mTexSizeH = param_2 >> param_3;
|
||||
|
||||
u32 imageSize = GXGetTexBufferSize(mTexSizeW, mTexSizeH, 9, 0, 0);
|
||||
OS_REPORT("imageSize<%d> <%d kbyte>mTexSizeW<%d>mTexSizeH<%d>\n", imageSize, imageSize * 0.0009765625f, mTexSizeW, mTexSizeH);
|
||||
|
||||
JUT_ASSERT(2682, mImage_p != NULL);
|
||||
|
||||
init(mImage_p, mTexSizeW, mTexSizeH, param_1, param_2);
|
||||
makeResTIMG(mResTIMG, mTexSizeW, mTexSizeH, mImage_p, (u8*)m_res, 0x33);
|
||||
}
|
||||
#endif
|
||||
|
||||
void dMap_c::_remove() {
|
||||
if (mImage_p != NULL) {
|
||||
delete[] mImage_p;
|
||||
@@ -834,7 +940,7 @@ void dMap_c::calcMapCmPerTexel(int i_roomNo, f32* ip_cmPerTexel) {
|
||||
JUT_ASSERT(0, ip_cmPerTexel != NULL);
|
||||
|
||||
f32 cmPerTexel = 0.0f;
|
||||
JUT_ASSERT(0, mTexSizeY != 0);
|
||||
JUT_ASSERT(0, mTexSizeH != 0);
|
||||
|
||||
if (i_roomNo >= 0) {
|
||||
if (getStayType() == 0) {
|
||||
@@ -853,7 +959,7 @@ void dMap_c::calcMapCmPerTexel(int i_roomNo, f32* ip_cmPerTexel) {
|
||||
var_f3 = temp_f0;
|
||||
}
|
||||
|
||||
cmPerTexel = var_f3 / ((f32)mTexSizeY - (f32)(field_0x74 + 4));
|
||||
cmPerTexel = var_f3 / ((f32)mTexSizeH - (f32)(field_0x74 + 4));
|
||||
} else {
|
||||
f32 var_f31 = 0.0f;
|
||||
|
||||
@@ -868,7 +974,7 @@ void dMap_c::calcMapCmPerTexel(int i_roomNo, f32* ip_cmPerTexel) {
|
||||
var_f31 = 10800.0f;
|
||||
}
|
||||
|
||||
cmPerTexel = var_f31 / (f32)mTexSizeY;
|
||||
cmPerTexel = var_f31 / (f32)mTexSizeH;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
|
||||
+82
-18
@@ -103,10 +103,19 @@ void dMenu_Option_c::_create() {
|
||||
|
||||
mpFont = mDoExt_getMesgFont();
|
||||
mpString = new dMsgString_c();
|
||||
JUT_ASSERT(197, mpString != NULL);
|
||||
|
||||
|
||||
mpMeterHaihai = new dMeterHaihai_c(3);
|
||||
JUT_ASSERT(201, mpMeterHaihai);
|
||||
|
||||
field_0x3f6 = 0;
|
||||
mpScreen = new J2DScreen();
|
||||
mpScreen->setPriority("zelda_option_select_menu.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(205, mpScreen != NULL);
|
||||
|
||||
bool fg = mpScreen->setPriority("zelda_option_select_menu.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(210, fg != false);
|
||||
|
||||
mpScreen->search('base_a_n')->hide();
|
||||
mpScreen->search('y_set_p4')->hide();
|
||||
mpScreen->search('y_set_p3')->hide();
|
||||
@@ -120,24 +129,41 @@ void dMenu_Option_c::_create() {
|
||||
field_0x254[i]->setString(0x20, "");
|
||||
}
|
||||
mpBackScreen = new J2DScreen();
|
||||
mpBackScreen->setPriority("zelda_option_base.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(246, mpBackScreen != NULL);
|
||||
fg = mpBackScreen->setPriority("zelda_option_base.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(251, fg != false);
|
||||
mpBackScreen->search('wi_btn_n')->hide();
|
||||
field_0x27c = mpBackScreen->search('let_area');
|
||||
|
||||
mpClipScreen = new J2DScreen();
|
||||
mpClipScreen->setPriority("zelda_option_menu_text.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(265, mpClipScreen != NULL);
|
||||
fg = mpClipScreen->setPriority("zelda_option_menu_text.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(269, fg != false);
|
||||
dPaneClass_showNullPane(mpClipScreen);
|
||||
|
||||
mpClipScreen->setScissor(true);
|
||||
mpShadowScreen = new J2DScreen();
|
||||
mpShadowScreen->setPriority("zelda_option_menu_shadow.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(274, mpShadowScreen != NULL);
|
||||
fg = mpShadowScreen->setPriority("zelda_option_menu_shadow.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(278, fg != false);
|
||||
dPaneClass_showNullPane(mpShadowScreen);
|
||||
mpShadowScreen->search('mw_n_5')->hide();
|
||||
|
||||
mpTVScreen = new J2DScreen();
|
||||
mpTVScreen->setPriority("zelda_option_check.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(287, mpTVScreen != NULL);
|
||||
fg = mpTVScreen->setPriority("zelda_option_check.blo", 0x20000, mpArchive);
|
||||
JUT_ASSERT(291, fg != false);
|
||||
dPaneClass_showNullPane(mpTVScreen);
|
||||
|
||||
mpTVButtonAB = new CPaneMgr(mpTVScreen, 'g_abtn_n', 0, NULL);
|
||||
JUT_ASSERT(295, mpTVButtonAB != NULL);
|
||||
|
||||
mpTVButtonText = new CPaneMgr(mpTVScreen, 'a_text_n', 0, NULL);
|
||||
JUT_ASSERT(298, mpTVButtonText != NULL);
|
||||
mpTVScreen->search('g_abtn_n')->hide();
|
||||
|
||||
mpScreenIcon = new J2DScreen();
|
||||
JUT_ASSERT(325, mpScreenIcon != NULL);
|
||||
mpScreenIcon->setPriority("zelda_collect_soubi_do_icon_parts.blo", 0x20000, mpArchive);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mpButtonAB[i] = NULL;
|
||||
@@ -157,24 +183,31 @@ void dMenu_Option_c::_create() {
|
||||
setBButtonString(0x3F9);
|
||||
ResTIMG* timg = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti");
|
||||
mpBlackTex = new J2DPicture(timg);
|
||||
JUT_ASSERT(402, mpBlackTex != NULL);
|
||||
mpBlackTex->setBlackWhite(JUtility::TColor(0, 0, 0, 0), JUtility::TColor(0, 0, 0, 0xff));
|
||||
mpBlackTex->setAlpha(0);
|
||||
field_0x374 = 0.0f;
|
||||
mpWarning = new dFile_warning_c(mpArchive, 1);
|
||||
JUT_ASSERT(408, mpWarning != NULL);
|
||||
mpWarning->setFontColor(JUtility::TColor(0, 0, 0, 0), JUtility::TColor(0xc8, 0xc8, 0xc8, 0xff));
|
||||
mpSelectScreen = new J2DScreen();
|
||||
mpSelectScreen->setPriority("zelda_file_select_yes_no_window.blo", 0x1100000, mpArchive);
|
||||
JUT_ASSERT(412, mpSelectScreen != NULL);
|
||||
fg = mpSelectScreen->setPriority("zelda_file_select_yes_no_window.blo", 0x1100000, mpArchive);
|
||||
JUT_ASSERT(416, fg != false);
|
||||
dPaneClass_showNullPane(mpSelectScreen);
|
||||
void* resource = JKRGetNameResource("zelda_file_select_yes_no_window.bck", mpArchive);
|
||||
field_0x24 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(resource);
|
||||
field_0x28 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(resource);
|
||||
field_0x20 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(resource);
|
||||
|
||||
void* bck = JKRGetNameResource("zelda_file_select_yes_no_window.bck", mpArchive);
|
||||
field_0x24 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(bck);
|
||||
field_0x28 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(bck);
|
||||
field_0x20 = (J2DAnmTransform*)J2DAnmLoaderDataBase::load(bck);
|
||||
field_0x24->searchUpdateMaterialID(mpSelectScreen);
|
||||
field_0x28->searchUpdateMaterialID(mpSelectScreen);
|
||||
field_0x20->searchUpdateMaterialID(mpSelectScreen);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mpYesNoSelBase_c[i] = new CPaneMgr(mpSelectScreen, l_tagName012[i], 0, NULL);
|
||||
JUT_ASSERT(439, mpYesNoSelBase_c[i] != NULL);
|
||||
mpYesNoTxt_c[i] = new CPaneMgr(mpSelectScreen, l_tagName013[i], 0, NULL);
|
||||
JUT_ASSERT(441, mpYesNoTxt_c[i] != NULL);
|
||||
J2DTextBox* yesNoTxt = (J2DTextBox*)mpYesNoTxt_c[i]->getPanePtr();
|
||||
yesNoTxt->setFont(mDoExt_getMesgFont());
|
||||
char message[24];
|
||||
@@ -182,24 +215,33 @@ void dMenu_Option_c::_create() {
|
||||
J2DTextBox* yesNoTxt2 = (J2DTextBox*)mpYesNoTxt_c[i]->getPanePtr();
|
||||
yesNoTxt2->setString(0x20, message);
|
||||
}
|
||||
resource = JKRGetNameResource("zelda_file_select_yes_no_window.bpk", mpArchive);
|
||||
field_0x2c = (J2DAnmColor*)J2DAnmLoaderDataBase::load(resource);
|
||||
|
||||
void* bpk = JKRGetNameResource("zelda_file_select_yes_no_window.bpk", mpArchive);
|
||||
JUT_ASSERT(449, bpk != NULL);
|
||||
field_0x2c = (J2DAnmColor*)J2DAnmLoaderDataBase::load(bpk);
|
||||
field_0x2c->searchUpdateMaterialID(mpSelectScreen);
|
||||
field_0x3c0 = 0;
|
||||
resource = JKRGetNameResource("zelda_file_select_yes_no_window.btk", mpArchive);
|
||||
field_0x30 = (J2DAnmTextureSRTKey*)J2DAnmLoaderDataBase::load(resource);
|
||||
|
||||
void* btk = JKRGetNameResource("zelda_file_select_yes_no_window.btk", mpArchive);
|
||||
JUT_ASSERT(459, btk != NULL);
|
||||
field_0x30 = (J2DAnmTextureSRTKey*)J2DAnmLoaderDataBase::load(btk);
|
||||
field_0x30->searchUpdateMaterialID(mpSelectScreen);
|
||||
field_0x3c4 = 0;
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mpYesNoCurWaku_c[i] = new CPaneMgr(mpSelectScreen, l_tagName9[i], 0, NULL);
|
||||
JUT_ASSERT(482, mpYesNoCurWaku_c[i] != NULL);
|
||||
mpYesNoCurWakuG0_c[i] = new CPaneMgr(mpSelectScreen, l_tagName10[i], 0, NULL);
|
||||
JUT_ASSERT(484, mpYesNoCurWakuG0_c[i] != NULL);
|
||||
mpYesNoCurWakuG1_c[i] = new CPaneMgr(mpSelectScreen, l_tagName11[i], 0, NULL);
|
||||
JUT_ASSERT(486, mpYesNoCurWakuG1_c[i] != NULL);
|
||||
mpYesNoCurWaku_c[i]->getPanePtr()->setAnimation(field_0x2c);
|
||||
mpYesNoCurWakuG0_c[i]->getPanePtr()->setAnimation(field_0x2c);
|
||||
mpYesNoCurWakuG1_c[i]->getPanePtr()->setAnimation(field_0x2c);
|
||||
mpYesNoCurWakuG0_c[i]->getPanePtr()->setAnimation(field_0x30);
|
||||
mpYesNoCurWakuG1_c[i]->getPanePtr()->setAnimation(field_0x30);
|
||||
}
|
||||
|
||||
field_0x3f9 = 0;
|
||||
field_0x3fa = 0;
|
||||
field_0x401 = 0xff;
|
||||
@@ -209,6 +251,7 @@ void dMenu_Option_c::_create() {
|
||||
field_0x3fd[i] = 0;
|
||||
field_0x3ff[i] = 0;
|
||||
}
|
||||
|
||||
field_0x403 = 0;
|
||||
screenSet();
|
||||
field_0x3e0 = 0;
|
||||
@@ -234,6 +277,7 @@ void dMenu_Option_c::_create() {
|
||||
field_0x384[i] = 0.0f;
|
||||
field_0x39c[i] = 0.0f;
|
||||
}
|
||||
|
||||
field_0x3b8.r = 0xff;
|
||||
field_0x3b8.g = 0xff;
|
||||
field_0x3b8.b = 0xff;
|
||||
@@ -334,7 +378,15 @@ void dMenu_Option_c::_delete() {
|
||||
delete field_0x30;
|
||||
field_0x30 = NULL;
|
||||
|
||||
if (isUseFlag(1)) {
|
||||
if (
|
||||
isUseFlag(
|
||||
#if DEBUG
|
||||
0
|
||||
#else
|
||||
1
|
||||
#endif
|
||||
)
|
||||
) {
|
||||
delete mpStick;
|
||||
mpStick = NULL;
|
||||
}
|
||||
@@ -410,13 +462,13 @@ void dMenu_Option_c::_delete() {
|
||||
}
|
||||
|
||||
if (mpMount != NULL) {
|
||||
mpMount->getArchive()->unmount();
|
||||
delete mpMount;
|
||||
JKRUnmountArchive(mpMount->getArchive());
|
||||
mpMount->destroy();
|
||||
mpMount = NULL;
|
||||
}
|
||||
|
||||
if (mpArchive != NULL) {
|
||||
mpArchive->unmount();
|
||||
JKRUnmountArchive(mpArchive);
|
||||
mpArchive = NULL;
|
||||
}
|
||||
|
||||
@@ -428,6 +480,7 @@ void dMenu_Option_c::_move() {
|
||||
if (field_0x3ea != 0 && !isRumbleSupported()) {
|
||||
field_0x3ea = 0;
|
||||
}
|
||||
|
||||
if (mDoGph_gInf_c::getFader()->getStatus() == 1) {
|
||||
if (mDoCPd_c::getTrigA(PAD_1) != 0 && field_0x3ef != SelectType3 && field_0x3f3 == 5) {
|
||||
if (field_0x3f4 == 5 && field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 &&
|
||||
@@ -447,6 +500,7 @@ void dMenu_Option_c::_move() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mDoCPd_c::getTrigB(PAD_1) != 0 && field_0x3ef != SelectType3 && field_0x3f3 == 5 &&
|
||||
field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && field_0x3ef != SelectType7)
|
||||
{
|
||||
@@ -468,6 +522,7 @@ skip:
|
||||
if (field_0x3f3 == 5 && oldValue != SelectType4 && oldValue != SelectType5 && oldValue != SelectType6 && oldValue != SelectType7) {
|
||||
dpdMenuMove();
|
||||
}
|
||||
|
||||
field_0x3f2 = 0;
|
||||
if (field_0x3f1 != 0xff) {
|
||||
if (field_0x3f0 != field_0x3f1 && field_0x3ef != field_0x3f1) {
|
||||
@@ -477,17 +532,26 @@ skip:
|
||||
} else {
|
||||
field_0x3f0 = 0xff;
|
||||
}
|
||||
|
||||
(this->*process[field_0x3ef])();
|
||||
mpSelectScreen->animation();
|
||||
if (oldValue != field_0x3ef) {
|
||||
(this->*init[field_0x3ef])();
|
||||
}
|
||||
|
||||
setHIO(false);
|
||||
}
|
||||
|
||||
void dMenu_Option_c::_draw() {
|
||||
if (mpArchive != NULL) {
|
||||
J2DGrafContext* ctx = dComIfGp_getCurrentGrafPort();
|
||||
#if (PLATFORM_WII || PLATFORM_SHIELD)
|
||||
if (mpCalibration != NULL && field_0x3f4 != 5 && field_0x3f4 != 0 && field_0x3f4 != 4) {
|
||||
mpCalibration->draw();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
mpBlackTex->setAlpha(0xff);
|
||||
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
|
||||
mpBackScreen->draw(0.0f, 0.0f, ctx);
|
||||
|
||||
@@ -3886,7 +3886,7 @@ bool dMeter2Draw_c::getFishingType() {
|
||||
static const char* tex_name[] = {"tt_heart_00.bti", "tt_heart_01.bti", "tt_heart_02.bti",
|
||||
"tt_heart_03.bti"};
|
||||
|
||||
bool dMeter2Draw_c::getCanoeFishing() {
|
||||
u8 dMeter2Draw_c::getCanoeFishing() {
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") &&
|
||||
((daPy_py_c*)dComIfGp_getPlayer(0))->checkCanoeRide())
|
||||
{
|
||||
|
||||
+211
-119
@@ -32,6 +32,7 @@ dMeterButton_c::~dMeterButton_c() {
|
||||
}
|
||||
|
||||
int dMeterButton_c::_create() {
|
||||
OS_REPORT("dMeterButton_c::_create\n");
|
||||
screenInitButton();
|
||||
screenInitText();
|
||||
return cPhs_COMPLEATE_e;
|
||||
@@ -47,7 +48,7 @@ int dMeterButton_c::_execute(u32 i_flags, bool i_drawA, bool i_drawB, bool i_dra
|
||||
updateText(i_flags);
|
||||
field_0x4b0 = 0;
|
||||
|
||||
if (dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[49]) && !dMsgObject_isTalkNowCheck())
|
||||
if (dComIfGs_isTmpBit((u16)dSv_event_tmp_flag_c::tempBitLabels[49]) && !dMsgObject_isTalkNowCheck())
|
||||
{
|
||||
i_flags &= ~0x4000;
|
||||
}
|
||||
@@ -207,20 +208,16 @@ int dMeterButton_c::_execute(u32 i_flags, bool i_drawA, bool i_drawB, bool i_dra
|
||||
if (!mpButtonScreen->search('yaji_dn')->isVisible()) {
|
||||
mpButtonScreen->search('yaji_dn')->show();
|
||||
}
|
||||
} else {
|
||||
if (mpButtonScreen->search('yaji_dn')->isVisible() == true) {
|
||||
mpButtonScreen->search('yaji_dn')->hide();
|
||||
}
|
||||
} else if (mpButtonScreen->search('yaji_dn')->isVisible() == true) {
|
||||
mpButtonScreen->search('yaji_dn')->hide();
|
||||
}
|
||||
|
||||
if (dir_c & DIR_RIGHT_e) {
|
||||
if (!mpButtonScreen->search('yaji_rn')->isVisible()) {
|
||||
mpButtonScreen->search('yaji_rn')->show();
|
||||
}
|
||||
} else {
|
||||
if (mpButtonScreen->search('yaji_rn')->isVisible() == true) {
|
||||
mpButtonScreen->search('yaji_rn')->hide();
|
||||
}
|
||||
} else if (mpButtonScreen->search('yaji_rn')->isVisible() == true) {
|
||||
mpButtonScreen->search('yaji_rn')->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +227,7 @@ int dMeterButton_c::_execute(u32 i_flags, bool i_drawA, bool i_drawB, bool i_dra
|
||||
} else {
|
||||
cLib_addCalc2(&field_0x2fc[i], field_0x2f4[i], 1.0f, 10.0f);
|
||||
|
||||
if (fabsf(field_0x2fc[i] - field_0x2f4[i]) < 0.1f) {
|
||||
if (std::fabs(field_0x2fc[i] - field_0x2f4[i]) < 0.1f) {
|
||||
field_0x2fc[i] = field_0x2f4[i];
|
||||
}
|
||||
}
|
||||
@@ -647,7 +644,11 @@ bool dMeterButton_c::alphaAnimeButtonB(u32 i_flags, bool i_drawButton) {
|
||||
|
||||
bool dMeterButton_c::alphaAnimeButtonR(u32 i_flags, bool i_drawButton) {
|
||||
if ((i_flags & 0x4000) || dMsgObject_isTalkNowCheck() || !i_drawButton ||
|
||||
mButtonTimers[BUTTON_R_e] > 0 || (i_flags & 0x40000000) ||
|
||||
mButtonTimers[BUTTON_R_e] > 0 ||
|
||||
#if DEBUG
|
||||
(i_flags & 0x80) ||
|
||||
#endif
|
||||
(i_flags & 0x40000000) ||
|
||||
((i_flags & 0x40) && dComIfGp_event_checkHind(8)) || (i_flags & 0x100) || (i_flags & 8) ||
|
||||
(i_flags & 0x10) || (i_flags & 0x20))
|
||||
{
|
||||
@@ -997,24 +998,24 @@ void dMeterButton_c::screenInitButton() {
|
||||
OS_REPORT("enter dMeterButton_c::screenInitButton\n");
|
||||
|
||||
mpButtonScreen = new J2DScreen();
|
||||
JUT_ASSERT(0, mpButtonScreen != NULL);
|
||||
JUT_ASSERT(1830, mpButtonScreen != NULL);
|
||||
|
||||
OS_REPORT("load zelda_game_image_button_info.blo");
|
||||
|
||||
bool fg = mpButtonScreen->setPriority("zelda_game_image_button_info.blo", 0x20000,
|
||||
dComIfGp_getMeterButtonArchive());
|
||||
JUT_ASSERT(0, fg != false);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(1857, fg != false);
|
||||
if (!fg) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1859);
|
||||
}
|
||||
|
||||
dPaneClass_showNullPane(mpButtonScreen);
|
||||
field_0x00c = NULL;
|
||||
|
||||
mpParent = new CPaneMgr(mpButtonScreen, 'info_n', 0, NULL);
|
||||
if (mpParent == NULL) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
JUT_ASSERT(0, mpParent != NULL);
|
||||
if (mpParent == NULL)
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1867);
|
||||
JUT_ASSERT(1868, mpParent != NULL);
|
||||
|
||||
for (int i = 0; i < BUTTON_NUM; i++) {
|
||||
field_0x18c[i] = 0.0f;
|
||||
@@ -1038,51 +1039,55 @@ void dMeterButton_c::screenInitButton() {
|
||||
|
||||
mpButtonA = new CPaneMgr(mpButtonScreen, 'abtn_n', 2, NULL);
|
||||
if (mpButtonA == NULL) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1902);
|
||||
}
|
||||
JUT_ASSERT(0, mpButtonA != NULL);
|
||||
JUT_ASSERT(1903, mpButtonA != NULL);
|
||||
mpButtonA->setAlphaRate(0.0f);
|
||||
mpButtonA->show();
|
||||
|
||||
mpButtonB = new CPaneMgr(mpButtonScreen, 'bbtn_n', 2, NULL);
|
||||
if (mpButtonB == NULL) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1914);
|
||||
}
|
||||
JUT_ASSERT(0, mpButtonB != NULL);
|
||||
JUT_ASSERT(1916, mpButtonB != NULL);
|
||||
mpButtonB->setAlphaRate(0.0f);
|
||||
mpButtonB->show();
|
||||
|
||||
mpButtonR = new CPaneMgr(mpButtonScreen, 'rbtn_n', 2, NULL);
|
||||
if (mpButtonR == NULL) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1932);
|
||||
}
|
||||
JUT_ASSERT(0, mpButtonR != NULL);
|
||||
JUT_ASSERT(1934, mpButtonR != NULL);
|
||||
mpButtonR->setAlphaRate(0.0f);
|
||||
mpButtonR->show();
|
||||
|
||||
mpMidona = new CPaneMgr(mpButtonScreen, 'midona', 0, NULL);
|
||||
JUT_ASSERT(0, mpMidona != NULL);
|
||||
JUT_ASSERT(1939, mpMidona != NULL);
|
||||
if (mpMidona == NULL) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1941);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
field_0x0fc[i] = NULL;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (mpButtonScreen->search('zbtn') == 0) OS_REPORT("[%s] %d\n", __FILE__, 1947);
|
||||
if (mpButtonScreen->search('z_btnl') == 0) OS_REPORT("[%s] %d\n", __FILE__, 1948);
|
||||
#endif
|
||||
mpButtonScreen->search('zbtn')->show();
|
||||
mpButtonScreen->search('z_btnl')->show();
|
||||
|
||||
mpButtonZ = new CPaneMgr(mpButtonScreen, 'zbtn_n', 2, NULL);
|
||||
if (mpButtonZ == NULL) {
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 1954);
|
||||
}
|
||||
JUT_ASSERT(0, mpButtonZ != NULL);
|
||||
JUT_ASSERT(1956, mpButtonZ != NULL);
|
||||
mpButtonZ->setAlphaRate(0.0f);
|
||||
mpButtonZ->show();
|
||||
|
||||
mpButton3D = new CPaneMgr(mpButtonScreen, 'asbtn_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButton3D != NULL);
|
||||
JUT_ASSERT(1964, mpButton3D != NULL);
|
||||
mpButton3D->setAlphaRate(0.0f);
|
||||
mpButton3D->show();
|
||||
|
||||
@@ -1092,7 +1097,7 @@ void dMeterButton_c::screenInitButton() {
|
||||
mpButtonScreen->search('yaji_r_n')->hide();
|
||||
|
||||
mpButtonC = new CPaneMgr(mpButtonScreen, 'cbtn_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButtonC != NULL);
|
||||
JUT_ASSERT(1992, mpButtonC != NULL);
|
||||
mpButtonC->setAlphaRate(0.0f);
|
||||
mpButtonC->show();
|
||||
|
||||
@@ -1102,15 +1107,15 @@ void dMeterButton_c::screenInitButton() {
|
||||
mpButtonScreen->search('yaji_rn')->hide();
|
||||
|
||||
mpButtonS = new CPaneMgr(mpButtonScreen, 'sbtn_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButtonS != NULL);
|
||||
JUT_ASSERT(2002, mpButtonS != NULL);
|
||||
mpButtonS->setAlphaRate(0.0f);
|
||||
|
||||
mpButtonX = new CPaneMgr(mpButtonScreen, 'xbtn_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButtonX != NULL);
|
||||
JUT_ASSERT(2048, mpButtonX != NULL);
|
||||
mpButtonX->setAlphaRate(0.0f);
|
||||
|
||||
mpButtonY = new CPaneMgr(mpButtonScreen, 'ybtn_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButtonY != NULL);
|
||||
JUT_ASSERT(2052, mpButtonY != NULL);
|
||||
mpButtonY->setAlphaRate(0.0f);
|
||||
|
||||
mpButtonNun = NULL;
|
||||
@@ -1119,7 +1124,7 @@ void dMeterButton_c::screenInitButton() {
|
||||
mpButtonAR = NULL;
|
||||
|
||||
mpButton3DB = new CPaneMgr(mpButtonScreen, 'as_b_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButton3DB != NULL);
|
||||
JUT_ASSERT(2060, mpButton3DB != NULL);
|
||||
mpButton3DB->setAlphaRate(0.0f);
|
||||
|
||||
mpButtonNURE = NULL;
|
||||
@@ -1131,24 +1136,24 @@ void dMeterButton_c::screenInitButton() {
|
||||
mpButtonNunC = NULL;
|
||||
|
||||
mpButtonBin = new CPaneMgr(mpButtonScreen, 'bottl_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpButtonBin != NULL);
|
||||
JUT_ASSERT(2071, mpButtonBin != NULL);
|
||||
mpButtonBin->setAlphaRate(0.0f);
|
||||
|
||||
mpText[0] = new CPaneMgr(mpButtonScreen, 'text_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpText[0] != NULL);
|
||||
JUT_ASSERT(2075, mpText[0] != NULL);
|
||||
mpText[0]->setAlphaRate(0.0f);
|
||||
|
||||
mpText[1] = new CPaneMgr(mpButtonScreen, 'text2_n', 2, NULL);
|
||||
JUT_ASSERT(0, mpText[1] != NULL);
|
||||
JUT_ASSERT(2079, mpText[1] != NULL);
|
||||
mpText[1]->setAlphaRate(0.0f);
|
||||
|
||||
mpItem_c = new CPaneMgr(mpButtonScreen, 'fishing', 0, NULL);
|
||||
JUT_ASSERT(0, mpItem_c != NULL);
|
||||
JUT_ASSERT(2083, mpItem_c != NULL);
|
||||
mpItem_c->setAlphaRate(0.0f);
|
||||
|
||||
mpHeap = mDoExt_getCurrentHeap();
|
||||
mpFishingTex = mpHeap->alloc(0xC00, 0x20);
|
||||
JUT_ASSERT(0, mpFishingTex != NULL);
|
||||
JUT_ASSERT(2088, mpFishingTex != NULL);
|
||||
|
||||
u8 fishing_item = dComIfGs_getItem(SLOT_20, false);
|
||||
if (dMeter2Info_getMeterClass()->getMeterDrawPtr()->getCanoeFishing()) {
|
||||
@@ -1341,12 +1346,9 @@ void dMeterButton_c::screenInitButton() {
|
||||
field_0x5f4 = 0.0f;
|
||||
field_0x5f8 = 0.0f;
|
||||
field_0x5fc = 1.0f;
|
||||
mTextPosX[1] = 0.0f;
|
||||
mTextPosX[0] = 0.0f;
|
||||
mTextPosY[1] = 0.0f;
|
||||
mTextPosY[0] = 0.0f;
|
||||
mTextScale[1] = 1.0f;
|
||||
mTextScale[0] = 1.0f;
|
||||
mTextPosX[0] = mTextPosX[1] = 0.0f;
|
||||
mTextPosY[0] = mTextPosY[1] = 0.0f;
|
||||
mTextScale[0] = mTextScale[1] = 1.0f;
|
||||
mItemPosX = 0.0f;
|
||||
mItemPosY = 0.0f;
|
||||
mItemScale = 1.0f;
|
||||
@@ -1393,44 +1395,53 @@ void dMeterButton_c::screenInitButton() {
|
||||
|
||||
void dMeterButton_c::screenInitText() {
|
||||
mpScreen = new J2DScreen();
|
||||
JUT_ASSERT(0, mpScreen != NULL);
|
||||
JUT_ASSERT(2442, mpScreen != NULL);
|
||||
|
||||
OS_REPORT("enter dMeterButton_c::screenInitText(void)\n");
|
||||
|
||||
bool fg =
|
||||
mpScreen->setPriority("zelda_message_window_new.blo", 0x20000, dComIfGp_getMsgArchive(1));
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(0, fg != false);
|
||||
mpScreen->setPriority(
|
||||
#if DEBUG
|
||||
"zelda_message_window_new_revo.blo",
|
||||
#else
|
||||
"zelda_message_window_new.blo",
|
||||
#endif
|
||||
0x20000, dComIfGp_getMsgArchive(1));
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2450);
|
||||
JUT_ASSERT(2457, fg != false);
|
||||
dPaneClass_showNullPane(mpScreen);
|
||||
|
||||
mpFkAll_c = new CPaneMgr(mpScreen, 'n_all', 2, NULL);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(0, mpFkAll_c != NULL);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2461);
|
||||
JUT_ASSERT(2462, mpFkAll_c != NULL);
|
||||
mpFkAll_c->setAlphaRate(0.0f);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2465);
|
||||
|
||||
mpScreen->search('mg_null')->move(
|
||||
g_MsgObject_HIO_c.mTextPosX + mpScreen->search('mg_null')->getBounds().i.x,
|
||||
g_MsgObject_HIO_c.mTextPosY + mpScreen->search('mg_null')->getBounds().i.y);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2469);
|
||||
|
||||
mpFkRoot_c = new CPaneMgr(mpScreen, 'mg_null', 0, NULL);
|
||||
JUT_ASSERT(0, mpFkRoot_c != NULL);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(2472, mpFkRoot_c != NULL);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2474);
|
||||
|
||||
mpTextScreen = new J2DScreen();
|
||||
JUT_ASSERT(0, mpTextScreen != NULL);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(2478, mpTextScreen != NULL);
|
||||
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2480);
|
||||
|
||||
fg = mpTextScreen->setPriority("zelda_message_window_text.blo", 0x20000,
|
||||
dComIfGp_getMsgCommonArchive());
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(0, fg != false);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2491);
|
||||
|
||||
JUT_ASSERT(2493, fg != false);
|
||||
|
||||
dPaneClass_showNullPane(mpTextScreen);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2496);
|
||||
|
||||
mpTmRoot_c = new CPaneMgr(mpTextScreen, 'mg_null', 0, NULL);
|
||||
JUT_ASSERT(0, mpTmRoot_c != NULL);
|
||||
JUT_ASSERT(2499, mpTmRoot_c != NULL);
|
||||
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
if (dComIfGs_getOptUnk0() == 0) {
|
||||
@@ -1460,21 +1471,22 @@ void dMeterButton_c::screenInitText() {
|
||||
}
|
||||
#else
|
||||
mpTm_c[0] = new CPaneMgr(mpTextScreen, 'mg_e4lin', 0, NULL);
|
||||
JUT_ASSERT(0, mpTm_c[0] != NULL);
|
||||
JUT_ASSERT(2504, mpTm_c[0] != NULL);
|
||||
|
||||
mpTm_c[1] = new CPaneMgr(mpTextScreen, 't4_s', 0, NULL);
|
||||
JUT_ASSERT(0, mpTm_c[1] != NULL);
|
||||
JUT_ASSERT(2507, mpTm_c[1] != NULL);
|
||||
|
||||
field_0x0ec[0] = NULL;
|
||||
field_0x0ec[1] = NULL;
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2512);
|
||||
|
||||
mpTextScreen->search('n_3line')->hide();
|
||||
mpTextScreen->search('n_3fline')->hide();
|
||||
mpTextScreen->search('n_e4line')->show();
|
||||
#endif
|
||||
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2554);
|
||||
|
||||
f32 line_space = static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getLineSpace();
|
||||
for (int i = 0; i < 2; i++) {
|
||||
@@ -1501,10 +1513,12 @@ void dMeterButton_c::screenInitText() {
|
||||
field_0x4b4 = 0;
|
||||
|
||||
mpString_c = new dMsgString_c();
|
||||
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
|
||||
JUT_ASSERT(2572, mpString_c != NULL);
|
||||
|
||||
OS_REPORT("[%s] %d\n", __FILE__, 2574);
|
||||
|
||||
mpOutFont = new COutFont_c(0);
|
||||
JUT_ASSERT(0, mpOutFont != NULL);
|
||||
JUT_ASSERT(2577, mpOutFont != NULL);
|
||||
mpOutFont->createPane();
|
||||
|
||||
OS_REPORT("exit dMeterButton_c::screenInitText(void)\n");
|
||||
@@ -1542,12 +1556,15 @@ void dMeterButton_c::updateButton() {
|
||||
{
|
||||
parent_y_offset = -25.0f;
|
||||
set_parent_offset = true;
|
||||
} else if (strcmp(dComIfGp_getStartStageName(), "R_SP161") == 0 &&
|
||||
}
|
||||
#if !DEBUG
|
||||
else if (strcmp(dComIfGp_getStartStageName(), "R_SP161") == 0 &&
|
||||
dComIfGs_isOneZoneSwitch(14, -1))
|
||||
{
|
||||
parent_y_offset = -25.0f;
|
||||
set_parent_offset = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dMeter2Info_getMeterClass()->getSubContents() == 4) {
|
||||
parent_scale_factor = 0.8f;
|
||||
@@ -1762,12 +1779,11 @@ void dMeterButton_c::updateButton() {
|
||||
f32 x_offset = 0.0f;
|
||||
f32 y_offset = 0.0f;
|
||||
|
||||
u8 temp_r4 = field_0x4be[0];
|
||||
if (temp_r4 != BUTTON_NONE_e) {
|
||||
x_offset = field_0x18c[temp_r4];
|
||||
if (field_0x4be[0] != BUTTON_NONE_e) {
|
||||
x_offset = field_0x18c[field_0x4be[0]];
|
||||
}
|
||||
|
||||
if (temp_r4 == BUTTON_S_e) {
|
||||
if (field_0x4be[0] == BUTTON_S_e) {
|
||||
y_offset = mButtonSPosY;
|
||||
}
|
||||
|
||||
@@ -1789,12 +1805,11 @@ void dMeterButton_c::updateButton() {
|
||||
f32 x_offset = 0.0f;
|
||||
f32 y_offset = 0.0f;
|
||||
|
||||
u8 temp_r4 = field_0x4be[1];
|
||||
if (temp_r4 != BUTTON_NONE_e) {
|
||||
x_offset = field_0x18c[temp_r4];
|
||||
if (field_0x4be[1] != BUTTON_NONE_e) {
|
||||
x_offset = field_0x18c[field_0x4be[1]];
|
||||
}
|
||||
|
||||
if (temp_r4 == BUTTON_S_e) {
|
||||
if (field_0x4be[1] == BUTTON_S_e) {
|
||||
y_offset = mButtonSPosY;
|
||||
}
|
||||
|
||||
@@ -1861,9 +1876,10 @@ void dMeterButton_c::updateText(u32 i_flags) {
|
||||
char buf2[STR_BUF_LEN];
|
||||
char buf3[STR_BUF_LEN];
|
||||
|
||||
if (dMsgObject_getString(dMeter2Info_getFloatingMessageID(),
|
||||
bool getString = dMsgObject_getString(dMeter2Info_getFloatingMessageID(),
|
||||
static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), tbox,
|
||||
mDoExt_getMesgFont(), mpOutFont, buf1, buf2, buf3, NULL))
|
||||
mDoExt_getMesgFont(), mpOutFont, buf1, buf2, buf3, NULL);
|
||||
if (getString)
|
||||
{
|
||||
mMsgID = dMeter2Info_getFloatingMessageID();
|
||||
strcpy(static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getStringPtr(), buf1);
|
||||
@@ -1929,6 +1945,9 @@ void dMeterButton_c::setAlphaButtonAAnimeMin() {
|
||||
mButtonTimers[BUTTON_A_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonA->setAlphaRate(0.0f);
|
||||
mpButtonA->alphaAnimeStart(0);
|
||||
|
||||
@@ -1997,6 +2016,9 @@ void dMeterButton_c::setAlphaButtonBAnimeMin() {
|
||||
mButtonTimers[BUTTON_B_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonB->setAlphaRate(0.0f);
|
||||
mpButtonB->alphaAnimeStart(0);
|
||||
|
||||
@@ -2030,6 +2052,9 @@ void dMeterButton_c::setAlphaButtonRAnimeMin() {
|
||||
mButtonTimers[BUTTON_R_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonR->setAlphaRate(0.0f);
|
||||
mpButtonR->alphaAnimeStart(0);
|
||||
|
||||
@@ -2063,6 +2088,9 @@ void dMeterButton_c::setAlphaButtonZAnimeMin() {
|
||||
mButtonTimers[BUTTON_Z_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonZ->setAlphaRate(0.0f);
|
||||
mpButtonZ->alphaAnimeStart(0);
|
||||
|
||||
@@ -2096,6 +2124,9 @@ void dMeterButton_c::setAlphaButton3DAnimeMin() {
|
||||
mButtonTimers[BUTTON_3D_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButton3D->setAlphaRate(0.0f);
|
||||
mpButton3D->alphaAnimeStart(0);
|
||||
mButtonTimers[BUTTON_3D_e] = 0;
|
||||
@@ -2134,6 +2165,9 @@ void dMeterButton_c::setAlphaButtonCAnimeMin() {
|
||||
mButtonTimers[BUTTON_C_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonC->setAlphaRate(0.0f);
|
||||
mpButtonC->alphaAnimeStart(0);
|
||||
|
||||
@@ -2200,6 +2234,9 @@ void dMeterButton_c::setAlphaButtonSAnimeMin() {
|
||||
mButtonTimers[BUTTON_S_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonS->setAlphaRate(0.0f);
|
||||
mpButtonS->alphaAnimeStart(0);
|
||||
|
||||
@@ -2233,6 +2270,9 @@ void dMeterButton_c::setAlphaButtonXAnimeMin() {
|
||||
mButtonTimers[BUTTON_X_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonX->setAlphaRate(0.0f);
|
||||
mpButtonX->alphaAnimeStart(0);
|
||||
|
||||
@@ -2266,6 +2306,9 @@ void dMeterButton_c::setAlphaButtonYAnimeMin() {
|
||||
mButtonTimers[BUTTON_Y_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonY->setAlphaRate(0.0f);
|
||||
mpButtonY->alphaAnimeStart(0);
|
||||
|
||||
@@ -2300,6 +2343,9 @@ void dMeterButton_c::setAlphaButtonNunAnimeMin() {
|
||||
mButtonTimers[BUTTON_NUN_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonNun->setAlphaRate(0.0f);
|
||||
mpButtonNun->alphaAnimeStart(0);
|
||||
|
||||
@@ -2337,6 +2383,9 @@ void dMeterButton_c::setAlphaButtonRemoAnimeMin() {
|
||||
mButtonTimers[BUTTON_REMO_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonRemo->setAlphaRate(0.0f);
|
||||
mpButtonRemo->alphaAnimeStart(0);
|
||||
|
||||
@@ -2374,6 +2423,9 @@ void dMeterButton_c::setAlphaButtonRemo2AnimeMin() {
|
||||
mButtonTimers[BUTTON_REMO2_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
dComIfGp_isDoSetFlag(1);
|
||||
#endif
|
||||
mpButtonRemo2->setAlphaRate(0.0f);
|
||||
mpButtonRemo2->alphaAnimeStart(0);
|
||||
|
||||
@@ -2411,6 +2463,11 @@ void dMeterButton_c::setAlphaButtonARAnimeMin() {
|
||||
mButtonTimers[BUTTON_AR_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_isRemoConSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButtonAR->setAlphaRate(0.0f);
|
||||
mpButtonAR->alphaAnimeStart(0);
|
||||
|
||||
@@ -2448,6 +2505,11 @@ void dMeterButton_c::setAlphaButton3DBAnimeMin() {
|
||||
mButtonTimers[BUTTON_3DB_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_is3DSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButton3DB->setAlphaRate(0.0f);
|
||||
mpButton3DB->alphaAnimeStart(0);
|
||||
|
||||
@@ -2485,6 +2547,11 @@ void dMeterButton_c::setAlphaButtonNUREAnimeMin() {
|
||||
mButtonTimers[BUTTON_NURE_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_is3DSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButtonNURE->setAlphaRate(0.0f);
|
||||
mpButtonNURE->alphaAnimeStart(0);
|
||||
|
||||
@@ -2522,6 +2589,11 @@ void dMeterButton_c::setAlphaButtonReelAnimeMin() {
|
||||
mButtonTimers[BUTTON_REEL_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_is3DSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButtonReel->setAlphaRate(0.0f);
|
||||
mpButtonReel->alphaAnimeStart(0);
|
||||
|
||||
@@ -2655,6 +2727,11 @@ void dMeterButton_c::setAlphaButtonNunZAnimeMin() {
|
||||
mButtonTimers[BUTTON_NUNZ_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_is3DSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButtonNunZ->setAlphaRate(0.0f);
|
||||
mpButtonNunZ->alphaAnimeStart(0);
|
||||
|
||||
@@ -2692,6 +2769,11 @@ void dMeterButton_c::setAlphaButtonNunCAnimeMin() {
|
||||
mButtonTimers[BUTTON_NUNC_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_is3DSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButtonNunC->setAlphaRate(0.0f);
|
||||
mpButtonNunC->alphaAnimeStart(0);
|
||||
|
||||
@@ -2729,6 +2811,11 @@ void dMeterButton_c::setAlphaButtonBinAnimeMin() {
|
||||
mButtonTimers[BUTTON_BIN_e] = 30;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!dComIfGp_isDoSetFlag(1)) {
|
||||
dComIfGp_is3DSetFlag(1);
|
||||
}
|
||||
#endif
|
||||
mpButtonBin->setAlphaRate(0.0f);
|
||||
mpButtonBin->alphaAnimeStart(0);
|
||||
|
||||
@@ -2896,15 +2983,16 @@ void dMeterButton_c::setString(char* i_string, u8 i_button, u8 param_2, u8 param
|
||||
}
|
||||
}
|
||||
|
||||
getCenterPosCalc(i_button, i_string, param_2);
|
||||
|
||||
f32 centerPosCalc = getCenterPosCalc(i_button, i_string, param_2);
|
||||
f32 temp_f2_2;
|
||||
|
||||
if (param_2 == 0 && field_0x4be[1] == BUTTON_NONE_e) {
|
||||
field_0x2f4[param_2] = 0.0f;
|
||||
} else if (dComIfGp_is3DSetFlag(8)) {
|
||||
field_0x2f4[1] = 0.0f;
|
||||
field_0x2f4[0] = 0.0f;
|
||||
temp_f2_2 = 0.0f;
|
||||
field_0x2f4[0] = field_0x2f4[1] = 0.0f;
|
||||
} else {
|
||||
f32 temp_f2_2 = g_drawHIO.mEmpButton.mDisplaySpace + (field_0x1e4[0] + field_0x1e4[1]);
|
||||
temp_f2_2 = g_drawHIO.mEmpButton.mDisplaySpace + (field_0x1e4[0] + field_0x1e4[1]);
|
||||
|
||||
field_0x2f4[0] = (field_0x1e4[0] * 0.5f) - (temp_f2_2 * 0.5f);
|
||||
field_0x2f4[1] = (temp_f2_2 * 0.5f) - (field_0x1e4[1] * 0.5f);
|
||||
@@ -2949,6 +3037,9 @@ void dMeterButton_c::hideAll() {
|
||||
}
|
||||
|
||||
f32 dMeterButton_c::getCenterPosCalc(u8 i_button, char* i_string, int param_2) {
|
||||
f32 var_f0;
|
||||
f32 var_f3;
|
||||
f32 rv;
|
||||
f32 temp_f0 = 1.0f;
|
||||
field_0x1e4[param_2] =
|
||||
(mTextScale[param_2] * dMeter2Info_getStringLength(mpTextBox[0], i_string)) * temp_f0;
|
||||
@@ -2958,11 +3049,12 @@ f32 dMeterButton_c::getCenterPosCalc(u8 i_button, char* i_string, int param_2) {
|
||||
}
|
||||
|
||||
field_0x29c[param_2] = field_0x1e4[param_2];
|
||||
f32 temp_f31 = field_0x2e0[param_2] - ((mTextScale[param_2] * mpTextBox[0]->getWidth()) * 0.5f);
|
||||
f32 fVar1 = (mTextScale[param_2] * mpTextBox[0]->getWidth());
|
||||
f32 temp_f31 = field_0x2e0[param_2] - (fVar1 * 0.5f);
|
||||
f32 temp_f30 = temp_f31 + field_0x1e4[param_2];
|
||||
|
||||
f32* temp_r30 = mButtonWidth;
|
||||
temp_r30[i_button] = 0.0f;
|
||||
// f32* temp_r30 = mButtonWidth;
|
||||
mButtonWidth[i_button] = 0.0f;
|
||||
|
||||
switch (i_button) {
|
||||
case BUTTON_A_e:
|
||||
@@ -3054,8 +3146,8 @@ f32 dMeterButton_c::getCenterPosCalc(u8 i_button, char* i_string, int param_2) {
|
||||
|
||||
field_0x1e4[param_2] += mButtonWidth[i_button];
|
||||
|
||||
f32 var_f0 = (field_0x244[i_button] + field_0x304[i_button]) - (mButtonWidth[i_button] * 0.5f);
|
||||
f32 var_f3 = (field_0x244[i_button] + field_0x304[i_button]) + (mButtonWidth[i_button] * 0.5f);
|
||||
var_f0 = (field_0x244[i_button] + field_0x304[i_button]) - (mButtonWidth[i_button] * 0.5f);
|
||||
var_f3 = (field_0x244[i_button] + field_0x304[i_button]) + (mButtonWidth[i_button] * 0.5f);
|
||||
f32 var_f29;
|
||||
f32 var_f28;
|
||||
|
||||
@@ -3076,73 +3168,76 @@ f32 dMeterButton_c::getCenterPosCalc(u8 i_button, char* i_string, int param_2) {
|
||||
}
|
||||
}
|
||||
|
||||
return (var_f29 + var_f28) * 0.5f;
|
||||
rv = (var_f29 + var_f28) * 0.5f;
|
||||
return rv;
|
||||
}
|
||||
|
||||
void dMeterButton_c::trans_button(int param_0, f32 param_1) {
|
||||
u8 button = field_0x4be[param_0];
|
||||
void dMeterButton_c::trans_button(int i_idx, f32 param_1) {
|
||||
u8 button = field_0x4be[i_idx];
|
||||
|
||||
if (button != BUTTON_NONE_e) {
|
||||
f32 var_f31 = 0.0f;
|
||||
f32 buttonPosOffsetX = 0.0f;
|
||||
f32 offsetY = 0.0f;
|
||||
f32 screenCenter = (mDoGph_gInf_c::getMinXF() + mDoGph_gInf_c::getMaxX()) * 0.5f;
|
||||
f32 fVar4 = 20.0f;
|
||||
u8 var_r26 = 1;
|
||||
|
||||
field_0x18c[button] = (608.0f / 2) - field_0x244[button];
|
||||
f32 temp_f0 = field_0x18c[button];
|
||||
field_0x304[button] = ((mButtonWidth[button] + field_0x29c[param_0] + 20.0f) * 0.5f) -
|
||||
(mButtonWidth[button] * 0.5f);
|
||||
field_0x18c[button] = screenCenter - field_0x244[button];
|
||||
buttonPosOffsetX = field_0x18c[button];
|
||||
field_0x304[button] = ((mButtonWidth[button] + field_0x29c[i_idx] + fVar4) * 0.5f) - (mButtonWidth[button] * 0.5f);
|
||||
|
||||
switch (button) {
|
||||
case BUTTON_A_e:
|
||||
paneTrans(mpButtonA, field_0x304[BUTTON_A_e] + (param_1 + (mButtonAPosX + temp_f0)),
|
||||
paneTrans(mpButtonA, field_0x304[BUTTON_A_e] + (param_1 + (mButtonAPosX + buttonPosOffsetX)),
|
||||
mButtonAPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_B_e:
|
||||
paneTrans(mpButtonB, field_0x304[BUTTON_B_e] + (param_1 + (mButtonBPosX + temp_f0)),
|
||||
paneTrans(mpButtonB, field_0x304[BUTTON_B_e] + (param_1 + (mButtonBPosX + buttonPosOffsetX)),
|
||||
mButtonBPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_R_e:
|
||||
paneTrans(mpButtonR, field_0x304[BUTTON_R_e] + (param_1 + (mButtonRPosX + temp_f0)),
|
||||
paneTrans(mpButtonR, field_0x304[BUTTON_R_e] + (param_1 + (mButtonRPosX + buttonPosOffsetX)),
|
||||
mButtonRPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_Z_e:
|
||||
paneTrans(mpButtonZ, field_0x304[BUTTON_Z_e] + (param_1 + (mButtonZPosX + temp_f0)),
|
||||
paneTrans(mpButtonZ, field_0x304[BUTTON_Z_e] + (param_1 + (mButtonZPosX + buttonPosOffsetX)),
|
||||
mButtonZPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_3D_e:
|
||||
var_r26 = 0;
|
||||
field_0x304[button] = -field_0x304[button];
|
||||
paneTrans(mpButton3D, field_0x304[BUTTON_3D_e] + (param_1 + (mButton3DPosX + temp_f0)),
|
||||
paneTrans(mpButton3D, field_0x304[BUTTON_3D_e] + (param_1 + (mButton3DPosX + buttonPosOffsetX)),
|
||||
mButton3DPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_C_e:
|
||||
paneTrans(mpButtonC, field_0x304[BUTTON_C_e] + (param_1 + (mButtonCPosX + temp_f0)),
|
||||
paneTrans(mpButtonC, field_0x304[BUTTON_C_e] + (param_1 + (mButtonCPosX + buttonPosOffsetX)),
|
||||
mButtonCPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_S_e:
|
||||
paneTrans(mpButtonS, field_0x304[BUTTON_S_e] + (param_1 + (mButtonSPosX + temp_f0)),
|
||||
paneTrans(mpButtonS, field_0x304[BUTTON_S_e] + (param_1 + (mButtonSPosX + buttonPosOffsetX)),
|
||||
mButtonSPosY, 0xFF);
|
||||
var_f31 = mButtonSPosY;
|
||||
offsetY = mButtonSPosY;
|
||||
break;
|
||||
case BUTTON_X_e:
|
||||
paneTrans(mpButtonX, field_0x304[BUTTON_X_e] + (param_1 + (mButtonXPosX + temp_f0)),
|
||||
paneTrans(mpButtonX, field_0x304[BUTTON_X_e] + (param_1 + (mButtonXPosX + buttonPosOffsetX)),
|
||||
mButtonXPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_Y_e:
|
||||
paneTrans(mpButtonY, field_0x304[BUTTON_Y_e] + (param_1 + (mButtonYPosX + temp_f0)),
|
||||
paneTrans(mpButtonY, field_0x304[BUTTON_Y_e] + (param_1 + (mButtonYPosX + buttonPosOffsetX)),
|
||||
mButtonYPosY, 0xFF);
|
||||
break;
|
||||
case BUTTON_3DB_e:
|
||||
if (mpButton3DB != NULL) {
|
||||
paneTrans(mpButton3DB,
|
||||
field_0x304[BUTTON_3DB_e] + (param_1 + (mButton3DBPosX + temp_f0)),
|
||||
field_0x304[BUTTON_3DB_e] + (param_1 + (mButton3DBPosX + buttonPosOffsetX)),
|
||||
mButton3DBPosY, 0xFF);
|
||||
}
|
||||
break;
|
||||
case BUTTON_BIN_e:
|
||||
if (mpButtonBin != NULL) {
|
||||
paneTrans(mpButtonBin,
|
||||
field_0x304[BUTTON_BIN_e] + (param_1 + (mButtonBinPosX + temp_f0)),
|
||||
field_0x304[BUTTON_BIN_e] + (param_1 + (mButtonBinPosX + buttonPosOffsetX)),
|
||||
mButtonBinPosY, 0xFF);
|
||||
buttonPosOffsetX -= 10.0f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3150,24 +3245,21 @@ void dMeterButton_c::trans_button(int param_0, f32 param_1) {
|
||||
f32 var_f30;
|
||||
switch (var_r26) {
|
||||
case 1:
|
||||
var_f30 = ((field_0x35c * 0.5f) + (field_0x360 + (304.0f - field_0x2e0[param_0]))) -
|
||||
((mButtonWidth[button] + field_0x29c[param_0] + 20.0f) * 0.5f);
|
||||
var_f30 = ((field_0x35c * 0.5f) + (field_0x360 + (screenCenter - field_0x2e0[i_idx]))) - ((mButtonWidth[button] + field_0x29c[i_idx] + fVar4) * 0.5f);
|
||||
break;
|
||||
case 0:
|
||||
var_f30 = mButtonWidth[button] +
|
||||
(((field_0x35c * 0.5f) + (field_0x360 + (304.0f - field_0x2e0[param_0]))) -
|
||||
((mButtonWidth[button] + field_0x29c[param_0] + 20.0f) * 0.5f));
|
||||
(((field_0x35c * 0.5f) + (field_0x360 + (screenCenter - field_0x2e0[i_idx]))) - ((mButtonWidth[button] + field_0x29c[i_idx] + fVar4) * 0.5f));
|
||||
break;
|
||||
case 2:
|
||||
var_f30 = ((field_0x35c * 0.5f) + (field_0x360 + (304.0f - field_0x2e0[param_0]))) -
|
||||
(field_0x29c[param_0] * 0.5f);
|
||||
var_f30 = ((field_0x35c * 0.5f) + (field_0x360 + (screenCenter - field_0x2e0[i_idx]))) - (field_0x29c[i_idx] * 0.5f);
|
||||
break;
|
||||
}
|
||||
|
||||
paneTrans(mpText[param_0], param_1 + (mTextPosX[param_0] + var_f30),
|
||||
(mTextPosY[param_0] + var_f31) - 2.0f, param_0);
|
||||
paneTrans(mpText[i_idx], param_1 + (mTextPosX[i_idx] + var_f30),
|
||||
(mTextPosY[i_idx] + offsetY) - 2.0f, i_idx);
|
||||
|
||||
if (field_0x4d9 == param_0) {
|
||||
if (field_0x4d9 == i_idx) {
|
||||
paneTrans(mpItem_c, mItemPosX + param_1, mItemPosY, 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
+420
-135
@@ -15,48 +15,163 @@
|
||||
#include "d/d_msg_object.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "d/d_camera.h"
|
||||
|
||||
#if (PLATFORM_WII || PLATFORM_SHIELD)
|
||||
dMeter_map_HIO_c g_meter_mapHIO;
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
dMeter_map_HIO_c g_meter_map;
|
||||
dMeter_map_HIO_c* dMeter_map_HIO_c::mMySelfPointer = NULL;
|
||||
dMeterMap_c* dMeterMap_c::mMySelfPointer = NULL;
|
||||
|
||||
dMeter_map_HIO_c::dMeter_map_HIO_c() {
|
||||
dMeter_map_HIO_c::mMySelfPointer = this;
|
||||
field_0x34 = dMap_HIO_c::mMySelfPointer;
|
||||
field_0x5 = 0;
|
||||
field_0x6 = 0;
|
||||
field_0x8 = -38;
|
||||
field_0xa = 380;
|
||||
field_0xc = 35;
|
||||
field_0xe = 380;
|
||||
field_0x10 = 35;
|
||||
field_0x12 = 421;
|
||||
field_0x14 = -36;
|
||||
mAreaMap = dMap_HIO_c::mMySelfPointer;
|
||||
mDebugMapExpansion = 0;
|
||||
mMapDisplayLocation = 0;
|
||||
mWideBottomLeftX = -38;
|
||||
mWideY = 380;
|
||||
mNormalBottomLeftX = 35;
|
||||
mNormalY = 380;
|
||||
mGcBottomLeftX = 35;
|
||||
mGcY = 421;
|
||||
mHiddenRightX = -36;
|
||||
field_0x16 = 0;
|
||||
field_0x17 = 0;
|
||||
mSizeTypeChange = 0;
|
||||
field_0x18 = 1;
|
||||
field_0x1a = 144;
|
||||
field_0x1c = 144;
|
||||
field_0x1e = 216;
|
||||
field_0x20 = 216;
|
||||
field_0x22 = 96;
|
||||
field_0x24 = 96;
|
||||
field_0x26 = 0;
|
||||
mMediumHorizontal = 144;
|
||||
mMediumVertical = 144;
|
||||
mBigHorizontal = 216;
|
||||
mBigVertical = 216;
|
||||
mSmallHorizontal = 96;
|
||||
mSmallVertical = 96;
|
||||
mMapDisplaySize = 0;
|
||||
field_0x2a = 144;
|
||||
field_0x2c = 0;
|
||||
field_0x2d = 180;
|
||||
field_0x2e = 0;
|
||||
field_0x2f = 0;
|
||||
mMapAlphaTest = 0;
|
||||
mAlpha = 180;
|
||||
mTextureResolutionHalved = 0;
|
||||
mForcedMapTopEdgeChange = 0;
|
||||
field_0x30 = 144;
|
||||
field_0x32 = 0;
|
||||
field_0x33 = 0;
|
||||
mMapDisplayProhibited = 0;
|
||||
mMapRenderingProhibited = 0;
|
||||
}
|
||||
|
||||
void dMeter_map_HIO_c::genMessage(JORMContext* mctx) {
|
||||
// DEBUG NONMATCHING
|
||||
void dMeter_map_HIO_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genLabel("■デバック用マップ拡大■",0,0,(JOREventListener *)0x0,0xffff, 0xffff,0x200,0x18);
|
||||
ctx->genCheckBox("ONで拡大", &mDebugMapExpansion,'\x01',0,(JOREventListener *)0x0,0xffff ,0xffff,0x200,0x18);
|
||||
ctx->genLabel("■マップ表示位置■",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genCheckBox("ONで調整有効", &mMapDisplayLocation,'\x01',0,(JOREventListener *)0x0 ,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genLabel("*Wide(16:9)",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("左下X", &mWideBottomLeftX,-200,0x280,0,(JOREventListener *)0x0,0xffff, 0xffff,0x200,0x18);
|
||||
ctx->genSlider(" Y", &mWideY,0,0x1e0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genLabel("*Normal(4:3)",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("左下X", &mNormalBottomLeftX,-200,0x280,0,(JOREventListener *)0x0,0xffff ,0xffff,0x200,0x18);
|
||||
ctx->genSlider(" Y", &mNormalY,0,0x1e0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genLabel("*GC(4:3) WiiでMAPアイコン無しの場合のY座標にも使用します", 0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("左下X", &mGcBottomLeftX,-200,0x280,0,(JOREventListener *)0x0,0xffff, 0xffff,0x200,0x18);
|
||||
ctx->genSlider(" Y", &mGcY,0,0x1e0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18)
|
||||
;
|
||||
ctx->genSlider("隠右X", &mHiddenRightX,-600,800,0,(JOREventListener *)0x0,0xffff,0xffff ,0x200,0x18);
|
||||
ctx->genLabel("■マップ表示サイズ■",0,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genCheckBox("・ON変更", &mMapDisplaySize,'\x01',0,(JOREventListener *)0x0,0xffff, 0xffff,0x200,0x18);
|
||||
ctx->genSlider("", &field_0x2a,1,400,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genLabel("■マップサイズ■",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genCheckBox( "・サイズタイプの変更<サイズ変更後はテクスチャーサイズ変更をして下さい>" , &mSizeTypeChange,'\x01',0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->startRadioButton("", &field_0x18,1,(JOREventListener *)0x0,0xffff,0xffff,0x100,0xffff);
|
||||
ctx->genRadioButtonItem("中",1,0,0xffff,0xffff,0x80,0x10);
|
||||
ctx->genRadioButtonItem("大",2,0,0xffff,0xffff,0x80,0x10);
|
||||
ctx->genRadioButtonItem("小",3,0,0xffff,0xffff,0x80,0x10);
|
||||
ctx->endRadioButton();
|
||||
ctx->genLabel( "・各サイズ<サイズ変更後はテクスチャーサイズ変更をして下さい>" ,0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genLabel("・中",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("横", &mMediumHorizontal,1,0x90,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genSlider("縦", &mMediumVertical,1,0x90,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genLabel("・大",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("横", &mBigHorizontal,1,0xd8,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genSlider("縦", &mBigVertical,1,0xd8,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genLabel("・小",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("横", &mSmallHorizontal,1,0x90,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genSlider("縦", &mSmallVertical,1,0x90,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genCheckBox("・テクスチャー解像度半分", &mTextureResolutionHalved,'\x01',0 ,(JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genButton("テクスチャーサイズ変更",0x4000001,0,(JOREventListener *)0x0,0xffff, 0xffff,0x200,0x18);
|
||||
ctx->genLabel("■マップアルファ■",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genCheckBox("マップアルファテストONで有効", &mMapAlphaTest,'\x01',0, (JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("アルファ", &mAlpha,'\0',0xff,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
|
||||
if (dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 1 && field_0x18 != 1) {
|
||||
field_0x18 = 1;
|
||||
update();
|
||||
}
|
||||
|
||||
ctx->genLabel("■強制マップ上端変更■",0,0,(JOREventListener *)0x0,0xffff,0xffff, 0x200,0x18);
|
||||
ctx->genCheckBox("ONで有効", &mForcedMapTopEdgeChange,'\x01',0,(JOREventListener *)0x0, 0xffff,0xffff,0x200,0x18);
|
||||
ctx->genSlider("", &field_0x30,-1,0x1e0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genLabel("ONからOFFにする場合は-1にしてからOFFにして下さい",0,0, (JOREventListener *)0x0,0xffff,0xffff,0x200,0x18);
|
||||
|
||||
mAreaMap = dMap_HIO_c::mMySelfPointer;
|
||||
if (mAreaMap != NULL) {
|
||||
ctx->genNode("エリアマップ",this->mAreaMap,0,0);
|
||||
}
|
||||
|
||||
ctx->genLabel("■マップ表示禁止■",0,0,(JOREventListener *)0x0,0xffff,0xffff,0x200, 0x18);
|
||||
ctx->genCheckBox("ONで有効", &mMapDisplayProhibited,'\x01',0,(JOREventListener *)0x0, 0xffff,0xffff,0x200,0x18);
|
||||
ctx->genLabel("■マップレンダリング禁止■",0,0,(JOREventListener *)0x0,0xffff, 0xffff,0x200,0x18);
|
||||
ctx->genCheckBox("ONで有効", &mMapRenderingProhibited,'\x01',0,(JOREventListener *)0x0, 0xffff,0xffff,0x200,0x18);
|
||||
}
|
||||
|
||||
void dMeter_map_HIO_c::listenPropertyEvent(const JORPropertyEvent*) {
|
||||
void dMeter_map_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) {
|
||||
// DEBUG NONMATCHING
|
||||
JORReflexible::listenPropertyEvent(evt);
|
||||
|
||||
switch ((u32)evt->id) {
|
||||
case 0x4000001:
|
||||
int mapDispType = dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo());
|
||||
if (dMeterMap_c::mMySelfPointer != NULL) {
|
||||
dMeterMap_c* map_p = dMeterMap_c::mMySelfPointer->getMapPointer();
|
||||
if (map_p != NULL) {
|
||||
int sizeType = map_p->getMapDispSizeTypeNo();
|
||||
s16 width;
|
||||
s16 height;
|
||||
|
||||
switch (sizeType) {
|
||||
case dMeterMap_c::MAP_SIZE_TYPE_BIG:
|
||||
width = g_meter_mapHIO.mBigHorizontal;
|
||||
height = g_meter_mapHIO.mBigVertical;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (mapDispType != dStage_stagInfo_c::UB_D_MAP) {
|
||||
width = g_meter_mapHIO.mMediumHorizontal;
|
||||
height = g_meter_mapHIO.mMediumVertical;
|
||||
break;
|
||||
}
|
||||
|
||||
// You cannot specify a large size for the dungeon map
|
||||
OS_REPORT("ダンジョンマップは大サイズ指定できません\n");
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case dMeterMap_c::MAP_SIZE_TYPE_SMALL:
|
||||
width = g_meter_mapHIO.mSmallHorizontal;
|
||||
height = g_meter_mapHIO.mSmallVertical;
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_meter_mapHIO.mTextureResolutionHalved) {
|
||||
dMeterMap_c::mMySelfPointer->field_0x8_debug = 1;
|
||||
} else {
|
||||
dMeterMap_c::mMySelfPointer->field_0x8_debug = 0;
|
||||
}
|
||||
|
||||
field_0x28 = (s16)width;
|
||||
dMeterMap_c::mMySelfPointer->setSizeW(width);
|
||||
dMeterMap_c::mMySelfPointer->setSizeH(height);
|
||||
dMeterMap_c::mMySelfPointer->field_0x4_debug = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dMeter_map_HIO_c::update() {
|
||||
@@ -80,6 +195,7 @@ bool dMeterMap_c::isEnableDispMap() {
|
||||
if (minimapEnable && dMpath_c::isExistMapPathData()) {
|
||||
enableMap = true;
|
||||
}
|
||||
|
||||
return enableMap;
|
||||
}
|
||||
|
||||
@@ -93,15 +209,25 @@ int dMeterMap_c::getMapDispSizeTypeNo() {
|
||||
}
|
||||
|
||||
u32 stageMapSizeTypeNo = dStage_stagInfo_GetMiniMap(dComIfGp_getStage()->getStagInfo());
|
||||
JUT_ASSERT(536, stageMapSizeTypeNo != MAP_SIZE_TYPE_STAGE);
|
||||
s32 mapDispType = dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo());
|
||||
|
||||
if (mapDispType == 1) {
|
||||
uvar6 = 1;
|
||||
JUT_ASSERT(544, stageMapSizeTypeNo != MAP_SIZE_TYPE_SMALL);
|
||||
JUT_ASSERT(545, stageMapSizeTypeNo != MAP_SIZE_TYPE_BIG);
|
||||
} else if (uvar6 == 7) {
|
||||
uvar6 = stageMapSizeTypeNo;
|
||||
}
|
||||
|
||||
int mapDispSizeType = 0;
|
||||
|
||||
#if DEBUG
|
||||
if (g_meter_mapHIO.mSizeTypeChange) {
|
||||
uvar6 = g_meter_mapHIO.field_0x18;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (uvar6) {
|
||||
case 0:
|
||||
break;
|
||||
@@ -113,9 +239,12 @@ int dMeterMap_c::getMapDispSizeTypeNo() {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (mapDispType != 1) {
|
||||
mapDispSizeType = 2;
|
||||
if (mapDispType == 1) {
|
||||
JUT_ASSERT(573, mapDispType != dStage_stagInfo_c::UB_D_MAP);
|
||||
break;
|
||||
}
|
||||
|
||||
mapDispSizeType = 2;
|
||||
break;
|
||||
case 3:
|
||||
if (mapDispType == 1) {
|
||||
@@ -138,31 +267,58 @@ bool dMeterMap_c::isEnableDispMapAndMapDispSizeTypeNo() {
|
||||
}
|
||||
|
||||
f32 dMeterMap_c::getMapDispEdgeBottomY_Layout() {
|
||||
#if (PLATFORM_WII || PLATFORM_SHIELD)
|
||||
if (dComIfGs_getOptPointer() == 0) {
|
||||
return g_meter_mapHIO.mGcY;
|
||||
}
|
||||
|
||||
if (mDoGph_gInf_c::isWide()) {
|
||||
return g_meter_mapHIO.mWideY;
|
||||
}
|
||||
|
||||
return g_meter_mapHIO.mNormalY;
|
||||
#else
|
||||
return 421.0f;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool dMeterMap_c::isEventRunCheck() {
|
||||
if (dComIfGp_event_runCheck()) {
|
||||
return true;
|
||||
} else if (dMsgObject_isTalkNowCheck()) {
|
||||
}
|
||||
|
||||
if (dMsgObject_isTalkNowCheck()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return dComIfGp_event_runCheck() != field_0x30 ? 1 : 0;
|
||||
if (dComIfGp_event_runCheck() != field_0x30) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
f32 dMeterMap_c::getMapDispEdgeLeftX_Layout() {
|
||||
#if (PLATFORM_WII || PLATFORM_SHIELD)
|
||||
if (mDoGph_gInf_c::isWide()) {
|
||||
return g_meter_mapHIO.mWideBottomLeftX + field_0x28;
|
||||
}
|
||||
|
||||
return g_meter_mapHIO.mNormalBottomLeftX + field_0x28;
|
||||
#else
|
||||
return field_0x28 + 35;
|
||||
#endif
|
||||
}
|
||||
|
||||
f32 dMeterMap_c::getMapDispEdgeTop() {
|
||||
f32 tmp = 0.0f;
|
||||
if (mMap != NULL) {
|
||||
tmp = mMap->getTexSizeY() -
|
||||
mMap->getTexelPerCm() * (mMap->getPackZ() - mMap->getPackPlusZ()) -
|
||||
mMap->getTexelPerCm() * (mMap->getPackZ() + -mMap->getPackPlusZ()) -
|
||||
mMap->getTopEdgePlus();
|
||||
}
|
||||
return getMapDispEdgeBottomY_Layout() - tmp;
|
||||
f32 rv = getMapDispEdgeBottomY_Layout() - tmp;
|
||||
return rv;
|
||||
}
|
||||
|
||||
s16 dMeterMap_c::getDispPosInside_OffsetX() {
|
||||
@@ -170,7 +326,16 @@ s16 dMeterMap_c::getDispPosInside_OffsetX() {
|
||||
}
|
||||
|
||||
s16 dMeterMap_c::getDispPosOutSide_OffsetX() {
|
||||
f32 dvar3 = -36.0f - mSizeW;
|
||||
#if DEBUG
|
||||
f32 fVar1 = g_meter_mapHIO.mHiddenRightX + mDoGph_gInf_c::getMinXF();
|
||||
#endif
|
||||
f32 dvar3 =
|
||||
#if DEBUG
|
||||
fVar1
|
||||
#else
|
||||
-36.0f
|
||||
#endif
|
||||
- mSizeW;
|
||||
f32 offset = 0.0f;
|
||||
if (mMap != NULL) {
|
||||
offset = mMap->getTexelPerCm() * mMap->getPackX();
|
||||
@@ -199,11 +364,22 @@ void dMeterMap_c::setMapAlpha(u8 i_alpha) {
|
||||
}
|
||||
|
||||
bool dMeterMap_c::isMapOpenCheck() {
|
||||
return dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 7 ? false : true;
|
||||
#if DEBUG
|
||||
if (dCam_getBody()->Gear() == 1) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 7) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
dMeterMap_c::dMeterMap_c(J2DScreen* i_scrn) {
|
||||
#if DEBUG
|
||||
i_scrn = i_scrn;
|
||||
field_0x4_debug = 0;
|
||||
field_0x8_debug = 0;
|
||||
dMeterMap_c::mMySelfPointer = this;
|
||||
@@ -212,6 +388,11 @@ dMeterMap_c::dMeterMap_c(J2DScreen* i_scrn) {
|
||||
}
|
||||
|
||||
dMeterMap_c::~dMeterMap_c() {
|
||||
#if DEBUG
|
||||
field_0x4_debug = 0;
|
||||
field_0x8_debug = 0;
|
||||
#endif
|
||||
|
||||
_delete();
|
||||
}
|
||||
|
||||
@@ -254,13 +435,19 @@ void dMeterMap_c::_create(J2DScreen* unused) {
|
||||
sizeX = 96;
|
||||
sizeY = 96;
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT(988, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
mSizeW = (s16)sizeX;
|
||||
mSizeH = (s16)sizeY;
|
||||
|
||||
mMap = new dMap_c(sizeX, sizeY, dispSizeW, dispSizeH);
|
||||
JUT_ASSERT(999, mMap != NULL);
|
||||
|
||||
mMapJ2DPicture = new J2DPicture(mMap->getResTIMGPointer());
|
||||
JUT_ASSERT(1002, mMapJ2DPicture != NULL);
|
||||
|
||||
mIsCompass = dComIfGs_isDungeonItemCompass();
|
||||
mIsMap = dComIfGs_isDungeonItemMap();
|
||||
@@ -298,6 +485,16 @@ void dMeterMap_c::_create(J2DScreen* unused) {
|
||||
field_0x2b = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]);
|
||||
}
|
||||
|
||||
void dMeterMap_c::setDispPosOutSide() {
|
||||
field_0x2d = 0;
|
||||
field_0x28 = getDispPosOutSide_OffsetX();
|
||||
}
|
||||
|
||||
void dMeterMap_c::setDispPosInSide() {
|
||||
field_0x2d = 1;
|
||||
field_0x28 = getDispPosInside_OffsetX();
|
||||
}
|
||||
|
||||
void dMeterMap_c::_delete() {
|
||||
if (mMapJ2DPicture != NULL) {
|
||||
delete mMapJ2DPicture;
|
||||
@@ -317,17 +514,26 @@ void dMeterMap_c::_delete() {
|
||||
}
|
||||
|
||||
void dMeterMap_c::_move(u32 param_0) {
|
||||
/* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */
|
||||
/* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */
|
||||
if (!field_0x2b && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118])) {
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP115") == 0) {
|
||||
/* dSv_event_flag_c::M_086 - Twilight Hyrule Field - Show Boss Bug's Tear of Light on the map */
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[119]);
|
||||
} else {
|
||||
/* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */
|
||||
/* dSv_event_flag_c::M_085 - Twilight Hyrule Field - Midna dialogue right before Boss Bug's Tear of Light appears */
|
||||
field_0x2b = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118]);
|
||||
dMeter2Info_setPauseStatus(2);
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (field_0x4_debug) {
|
||||
mMap->changeTextureSize(mSizeW, mSizeH, field_0x8_debug);
|
||||
mMapJ2DPicture->changeTexture(mMap->getResTIMGPointer(), 0);
|
||||
field_0x4_debug = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int stayNo = dComIfGp_roomControl_getStayNo();
|
||||
|
||||
field_0x14 = param_0;
|
||||
@@ -343,7 +549,11 @@ void dMeterMap_c::_move(u32 param_0) {
|
||||
|
||||
if (field_0x2d != 0) {
|
||||
if (field_0x28 != getDispPosInside_OffsetX()) {
|
||||
cLib_addCalcAngleS(&field_0x28, getDispPosInside_OffsetX(), 2, 60, 10);
|
||||
if (!cLib_addCalcAngleS(&field_0x28, getDispPosInside_OffsetX(), 2, 60, 10)) {
|
||||
#if DEBUG
|
||||
cLib_checkBit<u8>((int)field_0x2e, 4);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cLib_addCalcAngleS(&field_0x28, getDispPosOutSide_OffsetX(), 2, 60, 10);
|
||||
@@ -351,6 +561,23 @@ void dMeterMap_c::_move(u32 param_0) {
|
||||
|
||||
Vec map_pos = dMapInfo_n::getMapPlayerPos();
|
||||
|
||||
#if DEBUG
|
||||
f32 sizeW = g_meter_mapHIO.field_0x28;
|
||||
f32 sizeH = g_meter_mapHIO.field_0x28;
|
||||
if (g_meter_mapHIO.mDebugMapExpansion) {
|
||||
sizeW = 400.0f;
|
||||
sizeH = 400.0f;
|
||||
}
|
||||
|
||||
if (g_meter_mapHIO.mMapDisplaySize && mMap != NULL) {
|
||||
sizeW = g_meter_mapHIO.field_0x2a;
|
||||
sizeH = g_meter_mapHIO.field_0x2a;
|
||||
}
|
||||
|
||||
mSizeW = (s16)sizeW;
|
||||
mSizeH = (s16)sizeH;
|
||||
#endif
|
||||
|
||||
field_0x18 = field_0x28 + getMapDispEdgeLeftX_Layout();
|
||||
field_0x1c = getMapDispEdgeBottomY_Layout() - mSizeH;
|
||||
|
||||
@@ -359,111 +586,159 @@ void dMeterMap_c::_move(u32 param_0) {
|
||||
}
|
||||
|
||||
void dMeterMap_c::_draw() {
|
||||
#if DEBUG
|
||||
if (!g_meter_mapHIO.mMapRenderingProhibited) {
|
||||
mMap->_draw();
|
||||
dComIfGd_set2DOpa(this);
|
||||
}
|
||||
#else
|
||||
mMap->_draw();
|
||||
dComIfGd_set2DOpa(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
void dMeterMap_c::draw() {
|
||||
if (mMap != NULL && mMap->isDraw()) {
|
||||
dComIfGp_getCurrentGrafPort()->setup2D();
|
||||
if (
|
||||
#if DEBUG
|
||||
!g_meter_mapHIO.mMapDisplayProhibited &&
|
||||
#endif
|
||||
mMap != NULL && mMap->isDraw()
|
||||
) {
|
||||
J2DGrafContext* graf = dComIfGp_getCurrentGrafPort();
|
||||
graf->setup2D();
|
||||
f32 sizeX = mSizeW;
|
||||
f32 sizeY = mSizeH;
|
||||
f32 tmp2 = field_0x18;
|
||||
f32 tmp3 = field_0x1c;
|
||||
|
||||
mMapJ2DPicture->setAlpha(mMapAlpha);
|
||||
u8 alpha = mMapAlpha;
|
||||
#if DEBUG
|
||||
if (g_meter_mapHIO.mMapAlphaTest) {
|
||||
alpha = g_meter_mapHIO.mAlpha;
|
||||
}
|
||||
#endif
|
||||
mMapJ2DPicture->setAlpha(alpha);
|
||||
|
||||
mMapJ2DPicture->draw(tmp2, tmp3, sizeX, sizeY, false, false, false);
|
||||
mMapJ2DPicture->calcMtx();
|
||||
}
|
||||
}
|
||||
|
||||
void dMeterMap_c::ctrlShowMap() {
|
||||
int unused = 0;
|
||||
if (!dMeter2Info_isGameStatus(1)) {
|
||||
if (!isMapOpenCheck() && !isEventRunCheck()) {
|
||||
if (dMw_LEFT_TRIGGER() || dMw_RIGHT_TRIGGER()) {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
}
|
||||
} else {
|
||||
if (dMeter2Info_getPauseStatus() == 1 || dMeter2Info_getPauseStatus() == 7 ||
|
||||
dMeter2Info_getPauseStatus() == 3 || dMeter2Info_getPauseStatus() == 5 ||
|
||||
dMeter2Info_getPauseStatus() == 2 || dMeter2Info_getPauseStatus() == 6)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (dMeter2Info_getPauseStatus() == 1 || dMeter2Info_getPauseStatus() == 7 ||
|
||||
dMeter2Info_getPauseStatus() == 3 || dMeter2Info_getPauseStatus() == 5 ||
|
||||
dMeter2Info_getPauseStatus() == 2 || dMeter2Info_getPauseStatus() == 6)
|
||||
{
|
||||
#if !DEBUG
|
||||
if (dMeter2Info_getMapStatus() == 0 && field_0x2d == 0) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
dMeter2Info_setMapStatus(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (
|
||||
#if DEBUG
|
||||
dMeter2Info_getMapStatus() == 0 &&
|
||||
#else
|
||||
dMeter2Info_getMapStatus() == 1 && field_0x2d != 0 &&
|
||||
#endif
|
||||
isFmapScreen()
|
||||
) {
|
||||
switch (dMeter2Info_getPauseStatus()) {
|
||||
case 1:
|
||||
dMeter2Info_setMapStatus(4);
|
||||
break;
|
||||
case 7:
|
||||
dMeter2Info_setMapStatus(7);
|
||||
break;
|
||||
case 3:
|
||||
dMeter2Info_setMapStatus(8);
|
||||
break;
|
||||
case 5:
|
||||
dMeter2Info_setMapStatus(9);
|
||||
break;
|
||||
case 2:
|
||||
dMeter2Info_setMapStatus(5);
|
||||
break;
|
||||
case 6:
|
||||
dMeter2Info_setMapStatus(3);
|
||||
break;
|
||||
}
|
||||
|
||||
dMeter2Info_setMapKeyDirection(0x400);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
#if !DEBUG
|
||||
dMeter2Info_set2DVibration();
|
||||
#endif
|
||||
}
|
||||
dMeter2Info_resetPauseStatus();
|
||||
} else if (dMeter2Info_getPauseStatus() == 4) {
|
||||
dMeter2Info_resetPauseStatus();
|
||||
if (isDmapScreen()) {
|
||||
#if !DEBUG
|
||||
if (dMeter2Info_getMapStatus() == 0 && field_0x2d == 0) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
dMeter2Info_setMapStatus(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dMeter2Info_getMapStatus() == 1 && field_0x2d != 0 && isFmapScreen()) {
|
||||
switch (dMeter2Info_getPauseStatus()) {
|
||||
case 1:
|
||||
dMeter2Info_setMapStatus(4);
|
||||
break;
|
||||
case 7:
|
||||
dMeter2Info_setMapStatus(7);
|
||||
break;
|
||||
case 3:
|
||||
dMeter2Info_setMapStatus(8);
|
||||
break;
|
||||
case 5:
|
||||
dMeter2Info_setMapStatus(9);
|
||||
break;
|
||||
case 2:
|
||||
dMeter2Info_setMapStatus(5);
|
||||
break;
|
||||
case 6:
|
||||
dMeter2Info_setMapStatus(3);
|
||||
break;
|
||||
}
|
||||
if (
|
||||
#if DEBUG
|
||||
dMeter2Info_getMapStatus() == 0
|
||||
#else
|
||||
dMeter2Info_getMapStatus() == 1 && field_0x2d != 0
|
||||
#endif
|
||||
) {
|
||||
dMeter2Info_setMapStatus(6);
|
||||
dMeter2Info_setMapKeyDirection(0x400);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
dMeter2Info_resetPauseStatus();
|
||||
} else {
|
||||
if (dMeter2Info_getPauseStatus() == 4) {
|
||||
dMeter2Info_resetPauseStatus();
|
||||
if (isDmapScreen()) {
|
||||
if (dMeter2Info_getMapStatus() == 0 && field_0x2d == 0) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
dMeter2Info_setMapStatus(1);
|
||||
}
|
||||
|
||||
if (dMeter2Info_getMapStatus() == 1 && field_0x2d != 0) {
|
||||
dMeter2Info_setMapStatus(6);
|
||||
dMeter2Info_setMapKeyDirection(0x400);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f,
|
||||
-1.0f, -1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
}
|
||||
|
||||
} else if (!mDoCPd_c::getTrigUp(PAD_1) && !mDoCPd_c::getTrigDown(PAD_1)) {
|
||||
keyCheck();
|
||||
}
|
||||
}
|
||||
|
||||
if (mIsCompass != dComIfGs_isDungeonItemCompass()) {
|
||||
if (!isDispPosInsideFlg()) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
dMeter2Info_setMapStatus(1);
|
||||
}
|
||||
mIsCompass = dComIfGs_isDungeonItemCompass();
|
||||
} else if (!mDoCPd_c::getTrigUp(PAD_1) && !mDoCPd_c::getTrigDown(PAD_1)) {
|
||||
keyCheck();
|
||||
}
|
||||
|
||||
if (mIsCompass != dComIfGs_isDungeonItemCompass()) {
|
||||
if (!isDispPosInsideFlg()) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
#if !DEBUG
|
||||
dMeter2Info_setMapStatus(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (mIsMap != dComIfGs_isDungeonItemMap()) {
|
||||
if (!isDispPosInsideFlg()) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
dMeter2Info_setMapStatus(1);
|
||||
}
|
||||
mIsMap = dComIfGs_isDungeonItemMap();
|
||||
mIsCompass = dComIfGs_isDungeonItemCompass();
|
||||
unused = 0;
|
||||
}
|
||||
|
||||
if (mIsMap != dComIfGs_isDungeonItemMap()) {
|
||||
if (!isDispPosInsideFlg()) {
|
||||
setDispPosInsideFlg_SE_On();
|
||||
#if !DEBUG
|
||||
dMeter2Info_setMapStatus(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
mIsMap = dComIfGs_isDungeonItemMap();
|
||||
unused = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -515,7 +790,11 @@ bool dMeterMap_c::isFmapScreen() {
|
||||
}
|
||||
|
||||
bool dMeterMap_c::isDmapScreen() {
|
||||
return dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 1 ? 1 : 0;
|
||||
if (dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()) == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void dMeterMap_c::meter_map_move(u32 param_0) {
|
||||
@@ -529,32 +808,38 @@ void dMeterMap_c::meter_map_move(u32 param_0) {
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
dMeter2Info_resetPauseStatus();
|
||||
} else {
|
||||
if (dMw_LEFT_TRIGGER() && !dComIfGp_event_runCheck() &&
|
||||
!dMsgObject_isTalkNowCheck() &&
|
||||
(dMeter2Info_getMapStatus() == 0 || dMeter2Info_getMapStatus() == 1))
|
||||
{
|
||||
if (dMeter2Info_getMapStatus() == 0 && !dMeter2Info_isSub2DStatus(1)) {
|
||||
if (isFmapScreen() || isDmapScreen()) {
|
||||
dMeter2Info_setMapStatus(2);
|
||||
dMeter2Info_setMapKeyDirection(0x200);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
} else if (
|
||||
#if DEBUG
|
||||
dMw_RIGHT_TRIGGER() &&
|
||||
#else
|
||||
dMw_LEFT_TRIGGER() &&
|
||||
#endif
|
||||
!dComIfGp_event_runCheck() &&
|
||||
!dMsgObject_isTalkNowCheck() &&
|
||||
(dMeter2Info_getMapStatus() == 0 || dMeter2Info_getMapStatus() == 1))
|
||||
{
|
||||
#if !DEBUG
|
||||
if (dMeter2Info_getMapStatus() == 0 && !dMeter2Info_isSub2DStatus(1)) {
|
||||
if (isFmapScreen() || isDmapScreen()) {
|
||||
dMeter2Info_setMapStatus(2);
|
||||
dMeter2Info_setMapKeyDirection(0x200);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
} else if (dMw_RIGHT_TRIGGER() && !dComIfGp_event_runCheck() &&
|
||||
!dMsgObject_isTalkNowCheck() &&
|
||||
(dMeter2Info_getMapStatus() == 0 || dMeter2Info_getMapStatus() == 1))
|
||||
{
|
||||
if (!dMeter2Info_isSub2DStatus(1)) {
|
||||
if (isFmapScreen() || isDmapScreen()) {
|
||||
dMeter2Info_setMapStatus(2);
|
||||
dMeter2Info_setMapKeyDirection(0x400);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
}
|
||||
} else if (dMw_RIGHT_TRIGGER() && !dComIfGp_event_runCheck() &&
|
||||
!dMsgObject_isTalkNowCheck() &&
|
||||
(dMeter2Info_getMapStatus() == 0 || dMeter2Info_getMapStatus() == 1))
|
||||
{
|
||||
#endif
|
||||
if (!dMeter2Info_isSub2DStatus(1)) {
|
||||
if (isFmapScreen() || isDmapScreen()) {
|
||||
dMeter2Info_setMapStatus(2);
|
||||
dMeter2Info_setMapKeyDirection(0x400);
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MAP_OPEN_S, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1323,7 +1323,7 @@ void dMsgObject_c::talkStartInit() {
|
||||
(((dComIfGp_isHeapLockFlag() == 2 ||
|
||||
(dComIfGp_isHeapLockFlag() == 3 || dComIfGp_isHeapLockFlag() == 1)) &&
|
||||
field_0x4cd == 0 && mpTalkHeap != NULL))) &&
|
||||
(mpScrnDraw == NULL && dMeter2Info_getFloatingMessageID() != 0x13eb))
|
||||
(mpScrnDraw == NULL && (u32)dMeter2Info_getFloatingMessageID() != 0x13eb))
|
||||
{
|
||||
if (!bVar1 && ((dComIfGp_isHeapLockFlag() == 0 || dComIfGp_isHeapLockFlag() == 5))) {
|
||||
dComIfGp_setHeapLockFlag(7);
|
||||
@@ -1743,8 +1743,8 @@ bool dMsgObject_c::getStringLocal(u32 param_1, J2DTextBox* param_2, J2DTextBox*
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 dMsgObject_c::isGetItemMessage() {
|
||||
return mFukiKind == 9;
|
||||
bool dMsgObject_c::isGetItemMessage() {
|
||||
return (u8)(mFukiKind == 9);
|
||||
}
|
||||
|
||||
bool dMsgObject_c::isKanbanMessage() {
|
||||
|
||||
Reference in New Issue
Block a user