diff options
| author | Luke Street <luke@street.dev> | 2026-02-28 21:19:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-28 20:19:17 -0800 |
| commit | 6a48380461bc9baabe1706ba57ca0cedfa2d0c51 (patch) | |
| tree | 593e054cfcb0250e63917c58b445a7e1f025a023 /src/d/d_menu_dmap.cpp | |
| parent | b5d3b8c059c10711370437f7db7539cd90f1cb29 (diff) | |
More GCC compatibility/warning fixes (#3118)
* Wrap >4-char literals in a MULTI_CHAR macro
Modern compilers do not support CW's non-standard behavior with
>4 char literals. We can, however, use a constexpr function to
compute the u64 values directly. This leaves <=4 char literals
unchanged.
* Replace non-pointer usages of NULL with 0
* Define NULL to nullptr on C++11 and above
* Fix more -Wpointer-arith and -Woverflow warnings
* Replace u32/s32 with uintptr_t/intptr_t where appropriate
* JSUOutputStream: Overload all standard int types
Diffstat (limited to 'src/d/d_menu_dmap.cpp')
| -rw-r--r-- | src/d/d_menu_dmap.cpp | 192 |
1 files changed, 96 insertions, 96 deletions
diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index 70367af4e3..187fa4b172 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -147,32 +147,32 @@ void dMenu_DmapBg_c::mapScreenInit() { } #if (PLATFORM_WII || PLATFORM_SHIELD) - mpBlack = new CPaneMgrAlpha(mMapScreen[0], 'm_black', 2, NULL); + mpBlack = new CPaneMgrAlpha(mMapScreen[0], MULTI_CHAR('m_black'), 2, NULL); JUT_ASSERT(699, mpBlack != NULL); mpBlack->setAlphaRate(0.0f); #else mpBlack = NULL; #endif - mMapScreen[0]->search('map_icon')->hide(); - mMapScreen[0]->search('map_aria')->hide(); - mMapScreen[0]->search('n_all')->hide(); - mMapScreen[1]->search('n_all')->hide(); - mMapScreen[0]->search('m_black')->hide(); - mMapScreen[1]->search('bs_00_0')->hide(); - mMapScreen[1]->search('bs_00_1')->hide(); - mMapScreen[1]->search('gold00_0')->hide(); - mMapScreen[1]->search('gold00_1')->hide(); - mMapScreen[1]->search('m_black')->hide(); - mMapScreen[1]->search('center_n')->hide(); - mMapScreen[1]->search('map_ai_n')->setBasePosition(J2DBasePosition_0); - mMapScreen[0]->search('center_n')->setBasePosition(J2DBasePosition_4); + mMapScreen[0]->search(MULTI_CHAR('map_icon'))->hide(); + mMapScreen[0]->search(MULTI_CHAR('map_aria'))->hide(); + mMapScreen[0]->search(MULTI_CHAR('n_all'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('n_all'))->hide(); + mMapScreen[0]->search(MULTI_CHAR('m_black'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('bs_00_0'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('bs_00_1'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('gold00_0'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('gold00_1'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('m_black'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('center_n'))->hide(); + mMapScreen[1]->search(MULTI_CHAR('map_ai_n'))->setBasePosition(J2DBasePosition_0); + mMapScreen[0]->search(MULTI_CHAR('center_n'))->setBasePosition(J2DBasePosition_4); OSInitFastCast(); { Mtx m; CPaneMgr pane; - Vec vtx = pane.getGlobalVtx(mMapScreen[1]->search('map_icon'), &m, 0, false, 0); + Vec vtx = pane.getGlobalVtx(mMapScreen[1]->search(MULTI_CHAR('map_icon')), &m, 0, false, 0); field_0xdc0 = vtx.x; field_0xdc4 = vtx.y; } @@ -193,7 +193,7 @@ void dMenu_DmapBg_c::mapScreenInit() { mMapScreen[0]->animation(); setGoldAnimation(true); - mMapPane = (J2DPicture*)mMapScreen[1]->search('map_aria'); + mMapPane = (J2DPicture*)mMapScreen[1]->search(MULTI_CHAR('map_aria')); mMapPane->setCornerColor(JUtility::TColor(0xFF, 0xFF, 0xFF, 0xFF)); mMapPane->setWhite(JUtility::TColor(0xFF, 0xFF, 0xFF, 0xFF)); @@ -204,7 +204,7 @@ void dMenu_DmapBg_c::mapScreenInit() { mMapWidth = vtx3.x - vtx0.x; mMapHeight = vtx3.y - vtx0.y; - J2DPicture* map_icon_pic = (J2DPicture*)mMapScreen[1]->search('map_icon'); + J2DPicture* map_icon_pic = (J2DPicture*)mMapScreen[1]->search(MULTI_CHAR('map_icon')); map_icon_pic->setBasePosition(J2DBasePosition_4); map_icon_pic->setCornerColor(JUtility::TColor(0xFF, 0xFF, 0xFF, 0xFF)); map_icon_pic->setAlpha(0); @@ -212,7 +212,7 @@ void dMenu_DmapBg_c::mapScreenInit() { initiate(dComIfGp_getDmapResArchive()); for (int i = 0; i < 2; i++) { - mpMapSpace[i] = new CPaneMgr(mMapScreen[i], 'mapspace', 0, NULL); + mpMapSpace[i] = new CPaneMgr(mMapScreen[i], MULTI_CHAR('mapspace'), 0, NULL); JUT_ASSERT(817, mpMapSpace[i] != NULL); mpMapSpace[i]->paneTrans(0.0f, -15.0f); @@ -282,15 +282,15 @@ bool dMenu_DmapBg_c::iconScaleAnm() { } void dMenu_DmapBg_c::buttonIconScreenInit() { - static u64 const cont_at[5] = {'cont_at', 'cont_at1', 'cont_at2', 'cont_at3', 'cont_at4'}; - static u64 const cont_bt[5] = {'cont_bt', 'cont_bt1', 'cont_bt2', 'cont_bt3', 'cont_bt4'}; - static u64 const font_at[5] = {'font_at', 'font_at1', 'font_at2', 'font_at3', 'font_at4'}; - static u64 const font_bt[5] = {'font_bt', 'font_bt1', 'font_bt2', 'font_bt3', 'font_bt4'}; + static u64 const cont_at[5] = {MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')}; + static u64 const cont_bt[5] = {MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4')}; + static u64 const font_at[5] = {MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4')}; + static u64 const font_bt[5] = {MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4')}; static u64 const c_tag[2] = { #if VERSION == VERSION_GCN_JPN - 'c_text_s', 'c_text' + MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') #else - 'f_text_s', 'f_text' + MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text') #endif }; @@ -314,9 +314,9 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { #else mDecorateScreen = NULL; mpDecorateRoot = NULL; - mButtonScreen->search('w_spot')->hide(); - mButtonScreen->search('spot00')->hide(); - mButtonScreen->search('spot01')->hide(); + mButtonScreen->search(MULTI_CHAR('w_spot'))->hide(); + mButtonScreen->search(MULTI_CHAR('spot00'))->hide(); + mButtonScreen->search(MULTI_CHAR('spot01'))->hide(); #endif mpButtonRoot = new CPaneMgrAlphaMorf(mButtonScreen, 'ROOT', 2, NULL); @@ -327,7 +327,7 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { mpButtonText[i] = NULL; } - mpCButton = new CPaneMgrAlpha(mButtonScreen, 'c_btn', 2, NULL); + mpCButton = new CPaneMgrAlpha(mButtonScreen, MULTI_CHAR('c_btn'), 2, NULL); JUT_ASSERT(978, mpCButton != NULL); mpJButton = NULL; @@ -373,9 +373,9 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) { static u64 const cont_at[5] = { #if VERSION == VERSION_GCN_JPN - 'cont_at', 'cont_at1', 'cont_at2', 'cont_at3', 'cont_at4' + MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4') #else - 'font_at', 'font_at1', 'font_at2', 'font_at3', 'font_at4' + MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4') #endif }; for (int i = 0; i < 5; i++) { @@ -390,9 +390,9 @@ void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) { void dMenu_DmapBg_c::setBButtonString(u32 i_msgNo) { static u64 const cont_bt[5] = { #if VERSION == VERSION_GCN_JPN - 'cont_bt', 'cont_bt1', 'cont_bt2', 'cont_bt3', 'cont_bt4' + MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4') #else - 'font_bt', 'font_bt1', 'font_bt2', 'font_bt3', 'font_bt4' + MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4') #endif }; for (int i = 0; i < 5; i++) { @@ -413,9 +413,9 @@ dMenu_Dmap_c* dMenu_Dmap_c::myclass; void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) { static u64 const c_tag[2] = { #if VERSION == VERSION_GCN_JPN - 'c_text_s', 'c_text' + MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') #else - 'f_text_s', 'f_text' + MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text') #endif }; int i; @@ -479,7 +479,7 @@ void dMenu_DmapBg_c::baseScreenInit() { JUT_ASSERT(1362, fg != false); dPaneClass_showNullPane(mFloorScreen); - mBaseScreen->search('w_btn_n')->hide(); + mBaseScreen->search(MULTI_CHAR('w_btn_n'))->hide(); mpBaseRoot = new CPaneMgrAlphaMorf(mBaseScreen, 'ROOT', 2, NULL); JUT_ASSERT(1396, mpBaseRoot != NULL); @@ -494,11 +494,11 @@ void dMenu_DmapBg_c::baseScreenInit() { mpDrawCursor->setParam(0.95f, 0.9f, 0.1f, 0.6f, 0.5f); #if VERSION == VERSION_GCN_JPN - J2DTextBox* uVar9 = (J2DTextBox*)mBaseScreen->search('t_t00'); - mBaseScreen->search('f_t_00')->hide(); + J2DTextBox* uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('t_t00')); + mBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); #else - J2DTextBox* uVar9 = (J2DTextBox*)mBaseScreen->search('f_t_00'); - mBaseScreen->search('t_t00')->hide(); + J2DTextBox* uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('f_t_00')); + mBaseScreen->search(MULTI_CHAR('t_t00'))->hide(); #endif uVar9->setFont(mDoExt_getSubFont()); uVar9->setString(32, ""); @@ -524,11 +524,11 @@ void dMenu_DmapBg_c::setFloorMessage() { }; #if VERSION == VERSION_GCN_JPN - #define FLOOR_TAG(A, B) ('ffoor0_0' | (A<<16) | (B)) - #define FFOOR_TAG(A, B) ('floor0_0' | (A<<16) | (B)) + #define FLOOR_TAG(A, B) (MULTI_CHAR('ffoor0_0') | (A<<16) | (B)) + #define FFOOR_TAG(A, B) (MULTI_CHAR('floor0_0') | (A<<16) | (B)) #else - #define FLOOR_TAG(A, B) ('floor0_0' | (A<<16) | (B)) - #define FFOOR_TAG(A, B) ('ffoor0_0' | (A<<16) | (B)) + #define FLOOR_TAG(A, B) (MULTI_CHAR('floor0_0') | (A<<16) | (B)) + #define FFOOR_TAG(A, B) (MULTI_CHAR('ffoor0_0') | (A<<16) | (B)) #endif floor_textbox_1[0] = (J2DTextBox*)mFloorScreen->search(FFOOR_TAG(7, 1)); @@ -795,8 +795,8 @@ void dMenu_DmapBg_c::setAllAlphaRate(f32 i_rate, bool param_2) { } void dMenu_DmapBg_c::setGoldAnimation(bool param_1) { - J2DPane* gold0 = mMapScreen[0]->search('gold00_0'); - J2DPane* gold1 = mMapScreen[0]->search('gold00_1'); + J2DPane* gold0 = mMapScreen[0]->search(MULTI_CHAR('gold00_0')); + J2DPane* gold1 = mMapScreen[0]->search(MULTI_CHAR('gold00_1')); if (param_1) { gold0->setAnimation(field_0xd28[0]); @@ -809,13 +809,13 @@ void dMenu_DmapBg_c::setGoldAnimation(bool param_1) { void dMenu_DmapBg_c::setGoldFrameAlphaRate(f32 i_rate) { if (0.0f == i_rate) { - mMapScreen[0]->search('gold00_0')->hide(); - mMapScreen[0]->search('gold00_1')->hide(); + mMapScreen[0]->search(MULTI_CHAR('gold00_0'))->hide(); + mMapScreen[0]->search(MULTI_CHAR('gold00_1'))->hide(); } else { - mMapScreen[0]->search('gold00_0')->show(); - mMapScreen[0]->search('gold00_1')->show(); - mMapScreen[0]->search('gold00_0')->setAlpha(i_rate * 255.0f); - mMapScreen[0]->search('gold00_1')->setAlpha(i_rate * 255.0f); + mMapScreen[0]->search(MULTI_CHAR('gold00_0'))->show(); + mMapScreen[0]->search(MULTI_CHAR('gold00_1'))->show(); + mMapScreen[0]->search(MULTI_CHAR('gold00_0'))->setAlpha(i_rate * 255.0f); + mMapScreen[0]->search(MULTI_CHAR('gold00_1'))->setAlpha(i_rate * 255.0f); } } @@ -875,7 +875,7 @@ void dMenu_DmapBg_c::draw() { mMapScreen[0]->draw(field_0xd94, field_0xd98, grafContext); if (mpBackTexture != NULL) { - J2DPane* center_pane = mMapScreen[0]->search('center_n'); + J2DPane* center_pane = mMapScreen[0]->search(MULTI_CHAR('center_n')); CPaneMgr pane; Mtx mtx; Vec local_200 = pane.getGlobalVtx(center_pane, &mtx, 0, false, 0); @@ -904,7 +904,7 @@ void dMenu_DmapBg_c::draw() { mMapScreen[1]->draw(field_0xd94, field_0xd98, grafContext); - J2DPane* center_pane = mMapScreen[1]->search('center_n'); + J2DPane* center_pane = mMapScreen[1]->search(MULTI_CHAR('center_n')); CPaneMgr pane; Mtx local_110; Vec local_218 = pane.getGlobalVtx(center_pane, &local_110, 0, false, 0); @@ -1061,18 +1061,18 @@ dMenu_Dmap_c::dMenu_Dmap_c(JKRExpHeap* param_1, STControl* param_2, CSTControl* } void dMenu_Dmap_c::screenInit() { - static u64 const floor_tag[8] = {'floor7_n', 'floor0_n', 'floor1_n', 'floor2_n', - 'floor3_n', 'floor4_n', 'floor5_n', 'floor6_n'}; - static u64 const icon_tag[8] = {'ico_set7', 'ico_set0', 'ico_set1', 'ico_set2', - 'ico_set3', 'ico_set4', 'ico_set5', 'ico_set6'}; - static u64 const boss_tag[8] = {'ic_st_b7', 'ic_st_b0', 'ic_st_b1', 'ic_st_b2', - 'ic_st_b3', 'ic_st_b4', 'ic_st_b5', 'ic_st_b6'}; - static u64 const stay_tag[2] = {'rink_nul', 'boss_nul'}; - static u64 const waku_tag[3] = {'gray_map', 'gray_con', 'gray_key'}; - static u64 const key_tag[3] = {'key_00', 'key_01', 'key_02'}; - static u64 const item_tag[3] = {'map000', 'con000', 'i_key_n'}; - - field_0x10 = new CPaneMgr(mpDrawBg->mBaseScreen, 'floo_s_n', 0, NULL); + static u64 const floor_tag[8] = {MULTI_CHAR('floor7_n'), MULTI_CHAR('floor0_n'), MULTI_CHAR('floor1_n'), MULTI_CHAR('floor2_n'), + MULTI_CHAR('floor3_n'), MULTI_CHAR('floor4_n'), MULTI_CHAR('floor5_n'), MULTI_CHAR('floor6_n')}; + static u64 const icon_tag[8] = {MULTI_CHAR('ico_set7'), MULTI_CHAR('ico_set0'), MULTI_CHAR('ico_set1'), MULTI_CHAR('ico_set2'), + MULTI_CHAR('ico_set3'), MULTI_CHAR('ico_set4'), MULTI_CHAR('ico_set5'), MULTI_CHAR('ico_set6')}; + static u64 const boss_tag[8] = {MULTI_CHAR('ic_st_b7'), MULTI_CHAR('ic_st_b0'), MULTI_CHAR('ic_st_b1'), MULTI_CHAR('ic_st_b2'), + MULTI_CHAR('ic_st_b3'), MULTI_CHAR('ic_st_b4'), MULTI_CHAR('ic_st_b5'), MULTI_CHAR('ic_st_b6')}; + static u64 const stay_tag[2] = {MULTI_CHAR('rink_nul'), MULTI_CHAR('boss_nul')}; + static u64 const waku_tag[3] = {MULTI_CHAR('gray_map'), MULTI_CHAR('gray_con'), MULTI_CHAR('gray_key')}; + static u64 const key_tag[3] = {MULTI_CHAR('key_00'), MULTI_CHAR('key_01'), MULTI_CHAR('key_02')}; + static u64 const item_tag[3] = {MULTI_CHAR('map000'), MULTI_CHAR('con000'), MULTI_CHAR('i_key_n')}; + + field_0x10 = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('floo_s_n'), 0, NULL); for (int i = 0; i < 8; i++) { field_0x114[i] = 0.0f; @@ -1119,7 +1119,7 @@ void dMenu_Dmap_c::screenInit() { f32 var_f29; f32 var_f28 = 7.0f; - var_f29 = mpDrawBg->mFloorScreen->search('s_n_all')->getHeight(); + var_f29 = mpDrawBg->mFloorScreen->search(MULTI_CHAR('s_n_all'))->getHeight(); f32 var_f30 = mSelFloor[0]->getPanePtr()->getHeight(); f32 var_f27 = mFloorAll - mBottomFloor + 1; @@ -1138,19 +1138,19 @@ void dMenu_Dmap_c::screenInit() { iconMoveCalc(); Vec local_b0 = mSelFloor[getDefaultCurFloorPos()]->getGlobalVtxCenter(false, 0); mpDrawBg->mpDrawCursor->setPos(local_b0.x + field_0x104, local_b0.y, mSelFloor[getDefaultCurFloorPos()]->getPanePtr(), true); - field_0x94 = new CPaneMgr(mpDrawBg->mBaseScreen, 'item_s_n', 0, NULL); - field_0x7c[0] = new CPaneMgr(mpDrawBg->mBaseScreen, 'map_n', 3, NULL); - field_0x7c[1] = new CPaneMgr(mpDrawBg->mBaseScreen, 'con_n', 3, NULL); - field_0x7c[2] = new CPaneMgr(mpDrawBg->mBaseScreen, 'key_n', 3, NULL); - field_0x88[0] = new CPaneMgr(mpDrawBg->mBaseScreen, 'map000', 3, NULL); - field_0x88[1] = new CPaneMgr(mpDrawBg->mBaseScreen, 'con000', 3, NULL); + field_0x94 = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('item_s_n'), 0, NULL); + field_0x7c[0] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('map_n'), 3, NULL); + field_0x7c[1] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('con_n'), 3, NULL); + field_0x7c[2] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('key_n'), 3, NULL); + field_0x88[0] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('map000'), 3, NULL); + field_0x88[1] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('con000'), 3, NULL); if (dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo()) == dStage_SaveTbl_LV2) { - field_0x88[2] = new CPaneMgr(mpDrawBg->mBaseScreen, 'i_key_n', 3, NULL); + field_0x88[2] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('i_key_n'), 3, NULL); } else if (dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo()) == dStage_SaveTbl_LV5) { - field_0x88[2] = new CPaneMgr(mpDrawBg->mBaseScreen, 'lv5_k_n', 3, NULL); + field_0x88[2] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('lv5_k_n'), 3, NULL); } else { - field_0x88[2] = new CPaneMgr(mpDrawBg->mBaseScreen, 'nor_k_n', 3, NULL); + field_0x88[2] = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('nor_k_n'), 3, NULL); } for (int i = 0; i < 3; i++) { @@ -1158,8 +1158,8 @@ void dMenu_Dmap_c::screenInit() { } if (dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo()) == dStage_SaveTbl_LV2) { - mpDrawBg->mBaseScreen->search('lv5_k_n')->hide(); - mpDrawBg->mBaseScreen->search('nor_k_n')->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('lv5_k_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('nor_k_n'))->hide(); u8 key_num = 0; if (checkItemGet(fpcNm_ITEM_L2_KEY_PIECES1, 1)) { @@ -1187,19 +1187,19 @@ void dMenu_Dmap_c::screenInit() { } if (key_num == 0 || dMeter2Info_isTempBit(0)) { - mpDrawBg->mBaseScreen->search('key_n_n')->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('key_n_n'))->hide(); } else { ResTIMG* tex = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', dMeter2Info_getNumberTextureName(key_num)); - ((J2DPicture*)mpDrawBg->mBaseScreen->search('c_n_2_s'))->changeTexture(tex, 0); - ((J2DPicture*)mpDrawBg->mBaseScreen->search('c_n_2'))->changeTexture(tex, 0); + ((J2DPicture*)mpDrawBg->mBaseScreen->search(MULTI_CHAR('c_n_2_s')))->changeTexture(tex, 0); + ((J2DPicture*)mpDrawBg->mBaseScreen->search(MULTI_CHAR('c_n_2')))->changeTexture(tex, 0); tex = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', dMeter2Info_getNumberTextureName(3)); - ((J2DPicture*)mpDrawBg->mBaseScreen->search('c_n_1_s'))->changeTexture(tex, 0); - ((J2DPicture*)mpDrawBg->mBaseScreen->search('c_n_1'))->changeTexture(tex, 0); + ((J2DPicture*)mpDrawBg->mBaseScreen->search(MULTI_CHAR('c_n_1_s')))->changeTexture(tex, 0); + ((J2DPicture*)mpDrawBg->mBaseScreen->search(MULTI_CHAR('c_n_1')))->changeTexture(tex, 0); } } else if (dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo()) == dStage_SaveTbl_LV5) { - mpDrawBg->mBaseScreen->search('i_key_n')->hide(); - mpDrawBg->mBaseScreen->search('nor_k_n')->hide(); - mpDrawBg->mBaseScreen->search('key_n_n')->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('i_key_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('nor_k_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('key_n_n'))->hide(); u8 itemNo = fpcNm_ITEM_NONE; field_0x174[2] = 0; @@ -1230,14 +1230,14 @@ void dMenu_Dmap_c::screenInit() { case fpcNm_ITEM_TOMATO_PUREE: case fpcNm_ITEM_TASTE: dMeter2Info_readItemTexture(itemNo, mItemTexBuf, - (J2DPicture*)mpDrawBg->mBaseScreen->search('lv5_boss'), NULL, NULL, NULL, NULL, + (J2DPicture*)mpDrawBg->mBaseScreen->search(MULTI_CHAR('lv5_boss')), NULL, NULL, NULL, NULL, NULL, NULL, -1); break; } } else { - mpDrawBg->mBaseScreen->search('i_key_n')->hide(); - mpDrawBg->mBaseScreen->search('lv5_k_n')->hide(); - mpDrawBg->mBaseScreen->search('key_n_n')->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('i_key_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('lv5_k_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('key_n_n'))->hide(); field_0x174[2] = (u8)dComIfGs_isDungeonItemBossKey() ? fpcNm_ITEM_BOSS_KEY : 0; } @@ -1258,9 +1258,9 @@ void dMenu_Dmap_c::screenInit() { mpDrawBg->mBaseScreen->search(waku_tag[i])->hide(); if (i == 2) { - mpDrawBg->mBaseScreen->search('lv5_k_n')->hide(); - mpDrawBg->mBaseScreen->search('nor_k_n')->hide(); - mpDrawBg->mBaseScreen->search('key_n_n')->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('lv5_k_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('nor_k_n'))->hide(); + mpDrawBg->mBaseScreen->search(MULTI_CHAR('key_n_n'))->hide(); } } } @@ -1270,7 +1270,7 @@ void dMenu_Dmap_c::screenInit() { } field_0x94->hide(); - field_0x98 = new CPaneMgr(mpDrawBg->mBaseScreen, 'so_s_n', 0, NULL); + field_0x98 = new CPaneMgr(mpDrawBg->mBaseScreen, MULTI_CHAR('so_s_n'), 0, NULL); field_0x98->hide(); } @@ -1728,7 +1728,7 @@ void dMenu_Dmap_c::_create() { screenInit(); - mpDrawBg->getMapPane()->changeTexture(mMapCtrl->getResTIMGPointer(0), NULL); + mpDrawBg->getMapPane()->changeTexture(mMapCtrl->getResTIMGPointer(0), 0); if (mpDrawBg->getMapPane()->append(mMapCtrl->getResTIMGPointer(1), 1.0f)) { mpDrawBg->getMapPane()->setBlendRatio(1.0f, 0.0f); @@ -2025,8 +2025,8 @@ void dMenu_Dmap_c::_draw() { sp14[1] = -(field_0x138 + 100.0f * (sp20 * mMapCtrl->getPixelPerCm())); Vec spC; - spC.x = mpDrawBg->mMapScreen[0]->search('center_n')->getGlbBounds().i.x + (mpDrawBg->mMapScreen[0]->search('center_n')->getWidth() / 2); - spC.y = mpDrawBg->mMapScreen[0]->search('center_n')->getGlbBounds().i.y + (mpDrawBg->mMapScreen[0]->search('center_n')->getHeight() / 2); + spC.x = mpDrawBg->mMapScreen[0]->search(MULTI_CHAR('center_n'))->getGlbBounds().i.x + (mpDrawBg->mMapScreen[0]->search(MULTI_CHAR('center_n'))->getWidth() / 2); + spC.y = mpDrawBg->mMapScreen[0]->search(MULTI_CHAR('center_n'))->getGlbBounds().i.y + (mpDrawBg->mMapScreen[0]->search(MULTI_CHAR('center_n'))->getHeight() / 2); CPaneMgr sp70; //!@bug It's unclear what this is supposed to be, but a stack pointer being converted to a bool is probably not intended. |
