d_menu_map_common progress

This commit is contained in:
jdflyer 2023-01-21 16:47:18 -07:00
parent 2f764d277f
commit 0fb9c6d98f
5 changed files with 394 additions and 58 deletions

View File

@ -21,7 +21,13 @@ enum J2DRotateAxis {
/* 0x7A */ ROTATE_Z = 'z'
};
enum J2DBasePosition {};
enum J2DBasePosition {
J2DBasePosition_0,
J2DBasePosition_1,
J2DBasePosition_2,
J2DBasePosition_3,
J2DBasePosition_4,
};
struct J2DPaneHeader {
/* 0x0 */ u32 mKind;

View File

@ -345,6 +345,7 @@ public:
JKRArchive* getCollectResArchive() { return mCollectResArchive; }
JKRArchive* getItemIconArchive() { return mItemIconArchive; }
JKRArchive* getNameResArchive() { return mNameResArchive; }
JKRArchive* getFmapResArchive() { return mFmapResArchive; }
JKRAramArchive* getFieldMapArchive2() { return (JKRAramArchive*)mFieldMapArchive2; }
void setFieldMapArchive2(JKRArchive* arc) { mFieldMapArchive2 = arc; }
@ -2850,4 +2851,8 @@ inline daAlink_c* daAlink_getAlinkActorClass() {
return (daAlink_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
}
inline JKRArchive* dComIfGp_getFmapResArchive() {
return g_dComIfG_gameInfo.play.getFmapResArchive();
}
#endif /* D_COM_D_COM_INF_GAME_H */

View File

@ -49,6 +49,18 @@ public:
mPositionY = y;
}
void onUpdateFlag() {
mUpdateFlag = true;
}
void resetUpdateFlag() {
mUpdateFlag = false;
}
bool getUpdateFlag() {
return mUpdateFlag;
}
private:
/* 0x04 */ J2DScreen* mpScreen;
/* 0x08 */ J2DPane* mpPane;
@ -71,6 +83,8 @@ private:
/* 0xA4 */ f32 field_0xa4[4];
/* 0xB4 */ u8 field_0xb4;
/* 0xB5 */ s8 mNameIdx;
/* 0xB6 */ u8 field_0xb6;
/* 0xB7 */ bool mUpdateFlag;
};
#endif /* D_D_SELECT_CURSOR_H */

3
makewibo.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
#used with objdiff to force it to build with wibo
make $1 WINE=wibo WINE_LD=wine

View File

@ -4,24 +4,18 @@
//
#include "d/menu/d_menu_map_common.h"
#include "JSystem/J2DGraph/J2DPane.h"
#include "JSystem/J2DGraph/J2DPicture.h"
#include "JSystem/JUtility/TColor.h"
#include "d/com/d_com_inf_game.h"
#include "d/d_select_cursor.h"
#include "d/meter/d_meter_HIO.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Types:
//
struct JKRArchive {};
struct dSelect_cursor_c {
/* 80194220 */ dSelect_cursor_c(u8, f32, JKRArchive*);
/* 801951C8 */ void setScale(f32);
/* 801952A0 */ void setAlphaRate(f32);
};
struct dMenuMapCommon_c {
/* 801C2718 */ dMenuMapCommon_c();
/* 801C27B4 */ ~dMenuMapCommon_c();
/* 801C27B4 */ virtual ~dMenuMapCommon_c();
/* 801C28D8 */ void initiate(JKRArchive*);
/* 801C38E4 */ void drawIcon(f32, f32, f32, f32);
/* 801C3EC4 */ void iconScale(int, f32, f32, f32);
@ -30,25 +24,37 @@ struct dMenuMapCommon_c {
/* 801C4494 */ void setBlendRatio(u8, f32, f32);
/* 801C452C */ void blinkMove(s16);
/* 801C4600 */ void moveLightDropAnime();
/* 801C4738 */ void getIconSizeX(u8);
/* 801C4778 */ void getIconSizeY(u8);
/* 801C4738 */ float getIconSizeX(u8 index);
/* 801C4778 */ float getIconSizeY(u8 index);
/* 801C47C4 */ void debugIcon();
};
struct ResTIMG {};
struct data {
/* 0x00 */ float _0;
/* 0x04 */ float _4;
/* 0x08 */ float _8;
/* 0x0C */ float _C;
/* 0x10 */ float _10;
/* 0x14 */ u8 _14;
/* 0x15 */ u8 _15;
};
struct J2DRotateAxis {};
struct J2DPicture {
/* 802FC708 */ J2DPicture(ResTIMG const*);
};
struct J2DBasePosition {};
struct J2DPane {
/* 802F71DC */ void rotate(f32, f32, J2DRotateAxis, f32);
/* 802F76F8 */ void setBasePosition(J2DBasePosition);
/* 802F77D0 */ void setInfluencedAlpha(bool, bool);
/* 0x004 */ J2DPicture* mPictures[23];
/* 0x060 */ J2DPicture* _60;
/* 0x064 */ dSelect_cursor_c* mpDrawCursor;
/* 0x068 */ dSelect_cursor_c* mpPortalIcon;
/* 0x06C */ u32 _6c;
/* 0x070 */ data _70[128];
/* 0xC70 */ u16 _c70;
/* 0xC72 */ u16 _c72;
/* 0xC74 */ u16 _c74;
/* 0xC76 */ u16 _c76;
/* 0xC78 */ float _c78;
/* 0xC7C */ float _c7c;
/* 0xC80 */ float _c80;
/* 0xC84 */ float _c84;
/* 0xC88 */ float _c88;
/* 0xC8C */ float _c8c;
/* 0xC90 */ u8 _c90;
};
//
@ -87,8 +93,6 @@ extern "C" void _savegpr_26();
extern "C" void _savegpr_29();
extern "C" void _restgpr_26();
extern "C" void _restgpr_29();
extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" extern u8 g_fmapHIO[1188];
//
// Declarations:
@ -96,27 +100,19 @@ extern "C" extern u8 g_fmapHIO[1188];
/* ############################################################################################## */
/* 803BCF18-803BD02C 01A038 0114+00 2/2 0/0 0/0 .data map_icon_size */
SECTION_DATA static u8 map_icon_size[276] = {
0x3F, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00,
0x3F, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x11, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x42, 0x87, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x42, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00,
struct map_icon_size_t {
float mXSize;
float mYSize;
u8 mIndex;
};
static map_icon_size_t map_icon_size[] = {
{1.0f, 1.0f, 0x0}, {1.0f, 1.0f, 0x1}, {40.0f, 40.0f, 0x11}, {40.0f, 40.0f, 0x2},
{40.0f, 40.0f, 0x12}, {40.0f, 40.0f, 0x4}, {40.0f, 40.0f, 0x3}, {40.0f, 40.0f, 0x5},
{40.0f, 40.0f, 0x6}, {40.0f, 40.0f, 0x7}, {40.0f, 40.0f, 0x9}, {40.0f, 40.0f, 0xa},
{40.0f, 40.0f, 0xb}, {40.0f, 40.0f, 0xc}, {40.0f, 40.0f, 0xf}, {40.0f, 40.0f, 0x10},
{40.0f, 40.0f, 0x8}, {67.5f, 40.0f, 0xd}, {40.0f, 40.0f, 0xe}, {40.0f, 40.0f, 0x13},
{40.0f, 40.0f, 0x14}, {40.0f, 40.0f, 0x15}, {40.0f, 40.0f, 0x16}};
/* 803BD02C-803BD038 01A14C 000C+00 2/2 0/0 0/0 .data __vt__16dMenuMapCommon_c */
SECTION_DATA extern void* __vt__16dMenuMapCommon_c[3] = {
(void*)NULL /* RTTI */,
@ -133,6 +129,28 @@ SECTION_SDATA2 static u8 lit_3703[4] = {
};
/* 801C2718-801C27B4 1BD058 009C+00 0/0 2/2 0/0 .text __ct__16dMenuMapCommon_cFv */
// matches with literals
#ifdef NONMATCHING
dMenuMapCommon_c::dMenuMapCommon_c() {
for (int i = 0; i < 23; i++) {
mPictures[i] = NULL;
}
_60 = 0;
mpDrawCursor = NULL;
mpPortalIcon = NULL;
_6c = 0;
_c72 = 0;
_c78 = 0.0f;
_c74 = 0;
_c80 = 0.0f;
_c7c = 0.0f;
_c84 = 0.0f;
_c88 = 0.0f;
_c8c = 0.0f;
_c90 = 0;
clearIconInfo();
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@ -141,6 +159,7 @@ asm dMenuMapCommon_c::dMenuMapCommon_c() {
#include "asm/d/menu/d_menu_map_common/__ct__16dMenuMapCommon_cFv.s"
}
#pragma pop
#endif
/* 801C27B4-801C28D8 1BD0F4 0124+00 1/0 2/2 0/0 .text __dt__16dMenuMapCommon_cFv */
#pragma push
@ -152,6 +171,232 @@ asm dMenuMapCommon_c::~dMenuMapCommon_c() {
}
#pragma pop
/* 804540DC-804540E0 0026DC 0004+00 7/7 0/0 0/0 .sdata2 @3882 */
SECTION_SDATA2 static f32 lit_3882 = 1.0f;
/* 801C28D8-801C38E4 1BD218 100C+00 0/0 2/2 0/0 .text initiate__16dMenuMapCommon_cFP10JKRArchive
*/
// matches with literals
#ifdef NONMATCHING
void dMenuMapCommon_c::initiate(JKRArchive* arc) {
// Links the images on the map zoomed out to the ones zoomed in
ResTIMG* mp_image;
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_boss_s_ci8_16_00.bti");
ASSERT(mp_image != 0);
mPictures[4] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_boss_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[4]->append(mp_image, 1.0f);
mPictures[4]->setBasePosition(J2DBasePosition_4);
mPictures[4]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_boss_s_ci8_16_00.bti");
ASSERT(mp_image != 0);
mPictures[3] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_boss_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[3]->append(mp_image, 1.0f);
mPictures[3]->setBasePosition(J2DBasePosition_4);
mPictures[3]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_map_icon_enter_ci8_24_02.bti");
ASSERT(mp_image != 0);
mPictures[20] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_map_icon_enter_ci8_02.bti");
ASSERT(mp_image != 0);
mPictures[20]->append(mp_image, 1.0f);
mPictures[20]->setBasePosition(J2DBasePosition_4);
mPictures[20]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_enter_s_ci8_24_00.bti");
ASSERT(mp_image != 0);
mPictures[21] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_enter_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[21]->append(mp_image, 1.0f);
mPictures[21]->setBasePosition(J2DBasePosition_4);
mPictures[21]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_map_icon_warp_24_ci8_00.bti");
ASSERT(mp_image != 0);
mPictures[22] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_map_icon_warp_32_ci8_00.bti");
ASSERT(mp_image != 0);
mPictures[22]->append(mp_image, 1.0f);
mPictures[22]->setBasePosition(J2DBasePosition_4);
mPictures[22]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_box_s_ci8_24_00.bti");
ASSERT(mp_image != 0);
mPictures[19] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_box_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[19]->append(mp_image, 1.0f);
mPictures[19]->setBasePosition(J2DBasePosition_4);
mPictures[19]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_gray_00.bti");
ASSERT(mp_image != 0);
mPictures[14] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_key_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[14]->append(mp_image, 1.0f);
mPictures[14]->setBasePosition(J2DBasePosition_4);
mPictures[14]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[9] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "st_yuki_M.bti");
ASSERT(mp_image != 0);
mPictures[9]->append(mp_image, 1.0f);
mPictures[9]->setBasePosition(J2DBasePosition_4);
mPictures[9]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[10] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "st_yuki_W.bti");
ASSERT(mp_image != 0);
mPictures[10]->append(mp_image, 1.0f);
mPictures[10]->setBasePosition(J2DBasePosition_4);
mPictures[10]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_yellow_00.bti");
ASSERT(mp_image != 0);
mPictures[11] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "st_gold_wolf.bti");
ASSERT(mp_image != 0);
mPictures[11]->append(mp_image, 1.0f);
mPictures[11]->setBasePosition(J2DBasePosition_4);
mPictures[11]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[12] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_monkey_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[12]->append(mp_image, 1.0f);
mPictures[12]->setBasePosition(J2DBasePosition_4);
mPictures[12]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_blue_00.bti");
ASSERT(mp_image != 0);
mPictures[15] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "ni_obacyan.bti");
ASSERT(mp_image != 0);
mPictures[15]->append(mp_image, 1.0f);
mPictures[15]->setBasePosition(J2DBasePosition_4);
mPictures[15]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_blue_00.bti");
ASSERT(mp_image != 0);
mPictures[16] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "ni_obacyan.bti");
ASSERT(mp_image != 0);
mPictures[16]->append(mp_image, 1.0f);
mPictures[16]->setBasePosition(J2DBasePosition_4);
mPictures[16]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[8] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG',
"im_zelda_map_icon_copy_stone_statue_snup_try_00_04.bti");
ASSERT(mp_image != 0);
mPictures[8]->append(mp_image, 1.0f);
mPictures[8]->setBasePosition(J2DBasePosition_4);
mPictures[8]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_link_s_ci8_24_00.bti");
ASSERT(mp_image != 0);
mPictures[17] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_link_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[17]->append(mp_image, 1.0f);
mPictures[17]->setBasePosition(J2DBasePosition_4);
mPictures[17]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_penant_s_ci8_24_00.bti");
ASSERT(mp_image != 0);
mPictures[2] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_penant_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[2]->append(mp_image, 1.0f);
mPictures[2]->setBasePosition(J2DBasePosition_4);
mPictures[2]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_black_32.bti");
ASSERT(mp_image != 0);
mPictures[5] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_black_32.bti");
ASSERT(mp_image != 0);
mPictures[5]->append(mp_image, 1.0f);
mPictures[5]->setBasePosition(J2DBasePosition_4);
mPictures[5]->setInfluencedAlpha(false, false);
mPictures[5]->setBlackWhite(JUtility::TColor(0, 0, 0, 0), JUtility::TColor(0, 0, 0, 255));
// todo check if this value is mPictures[23] (out of the array) or field 0x60
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_hikari_no_shizuku_try_10_00_24x24.bti");
ASSERT(mp_image != 0);
mPictures[23] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_hikari_no_shizuku_try_10_00_24x24.bti");
ASSERT(mp_image != 0);
mPictures[23]->append(mp_image, 1.0f);
mPictures[23]->setBasePosition(J2DBasePosition_4);
mPictures[23]->setInfluencedAlpha(false, false);
mPictures[23]->setBlackWhite(JUtility::TColor(0, 240, 170, 0),
JUtility::TColor(255, 255, 230, 255));
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[6] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_zelda_map_icon_hikari_ball_03.bti");
ASSERT(mp_image != 0);
mPictures[6]->append(mp_image, 1.0f);
mPictures[6]->setBasePosition(J2DBasePosition_4);
mPictures[6]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[7] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_map_icon_iron_ball_ci8_32_00.bti");
ASSERT(mp_image != 0);
mPictures[7]->append(mp_image, 1.0f);
mPictures[7]->setBasePosition(J2DBasePosition_4);
mPictures[7]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "tt_map_icon_s_size_circle_ci4_00.bti");
ASSERT(mp_image != 0);
mPictures[13] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_map_icon_basha_ci8.bti");
ASSERT(mp_image != 0);
mPictures[13]->append(mp_image, 1.0f);
mPictures[13]->setBasePosition(J2DBasePosition_4);
mPictures[13]->setInfluencedAlpha(false, false);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_nijumaru_40x40_ind_01.bti");
ASSERT(mp_image != 0);
mPictures[18] = new J2DPicture(mp_image);
mp_image = (ResTIMG*)arc->getResource('TIMG', "im_nijumaru_40x40_ind_01.bti");
ASSERT(mp_image != 0);
mPictures[18]->append(mp_image, 1.0f);
mPictures[18]->setBasePosition(J2DBasePosition_4);
mPictures[18]->setInfluencedAlpha(false, false);
mpDrawCursor = new dSelect_cursor_c(4, 1.0f, NULL);
ASSERT(mpDrawCursor != 0);
if (arc == dComIfGp_getFmapResArchive()) {
mpPortalIcon = new dSelect_cursor_c(5, 1.0f, arc);
ASSERT(mpPortalIcon != 0);
}
}
#else
/* ############################################################################################## */
/* 803959C0-803959C0 022020 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
@ -197,11 +442,6 @@ SECTION_DEAD static char const* const stringBase_80395D72 = "im_nijumaru_40x40_i
SECTION_DEAD static char const* const pad_80395D8F = "";
#pragma pop
/* 804540DC-804540E0 0026DC 0004+00 7/7 0/0 0/0 .sdata2 @3882 */
SECTION_SDATA2 static f32 lit_3882 = 1.0f;
/* 801C28D8-801C38E4 1BD218 100C+00 0/0 2/2 0/0 .text initiate__16dMenuMapCommon_cFP10JKRArchive
*/
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@ -210,6 +450,7 @@ asm void dMenuMapCommon_c::initiate(JKRArchive* param_0) {
#include "asm/d/menu/d_menu_map_common/initiate__16dMenuMapCommon_cFP10JKRArchive.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 804540E0-804540E4 0026E0 0004+00 1/1 0/0 0/0 .sdata2 @4010 */
@ -226,6 +467,50 @@ SECTION_SDATA2 static f32 lit_4013 = 180.0f;
/* 801C38E4-801C3EC4 1BE224 05E0+00 0/0 2/2 0/0 .text drawIcon__16dMenuMapCommon_cFffff
*/
#ifdef NONMATCHING
void dMenuMapCommon_c::drawIcon(f32 param_0, f32 param_1, f32 param_2, f32 param_3) {
s16 tmp[128];
if (g_fmapHIO.mMapIconHIO.mIconDebug) {
debugIcon();
}
if (mpDrawCursor) {
mpDrawCursor->onUpdateFlag();
}
if (mpPortalIcon) {
mpPortalIcon->onUpdateFlag();
}
int counter = 0;
for (int i = 0; i < 128; i++) {
tmp[i] = -1;
}
for (int i = 0; i < 22; i++) {
for (int j = 0; j < 128; j++) {
if (i == _70[j]._14 && _70[j]._15 != 0) {
tmp[counter] = j;
counter++;
}
}
}
for (int i = 0; i < 128; i++) {
s16 val = tmp[i];
if (val != -1) {
if (_70[val]._14 == 0) {
float float1 = _70[val]._0;
float float2 = _70[val]._4;
if (mpPortalIcon) {
if (mpPortalIcon->getUpdateFlag()) {
if (_70[val]._15 == 2) {
mpPortalIcon->setAlphaRate(255.0f);
}
}
}
}
}
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
@ -234,6 +519,7 @@ asm void dMenuMapCommon_c::drawIcon(f32 param_0, f32 param_1, f32 param_2, f32 p
#include "asm/d/menu/d_menu_map_common/drawIcon__16dMenuMapCommon_cFffff.s"
}
#pragma pop
#endif
/* ############################################################################################## */
/* 804540F0-804540F4 0026F0 0004+00 1/1 0/0 0/0 .sdata2 @4072 */
@ -315,25 +601,47 @@ asm void dMenuMapCommon_c::moveLightDropAnime() {
/* 801C4738-801C4778 1BF078 0040+00 1/1 0/0 0/0 .text getIconSizeX__16dMenuMapCommon_cFUc
*/
#ifdef NONMATCHING
float dMenuMapCommon_c::getIconSizeX(u8 index) {
for (int i = 0; i<ARRAY_SIZE(map_icon_size); i++) {
if (map_icon_size[index].mIndex == index) {
return map_icon_size[index].mXSize;
}
}
return 0.0f;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dMenuMapCommon_c::getIconSizeX(u8 param_0) {
asm float dMenuMapCommon_c::getIconSizeX(u8 param_0) {
nofralloc
#include "asm/d/menu/d_menu_map_common/getIconSizeX__16dMenuMapCommon_cFUc.s"
}
#pragma pop
#endif
/* 801C4778-801C47C4 1BF0B8 004C+00 1/1 0/0 0/0 .text getIconSizeY__16dMenuMapCommon_cFUc
*/
#ifdef NONMATCHING
float dMenuMapCommon_c::getIconSizeY(u8 index) {
for (int i = 0; i<ARRAY_SIZE(map_icon_size); i++) {
if (map_icon_size[index].mIndex == index) {
return map_icon_size[index].mYSize;
}
}
return 0.0f;
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void dMenuMapCommon_c::getIconSizeY(u8 param_0) {
asm float dMenuMapCommon_c::getIconSizeY(u8 param_0) {
nofralloc
#include "asm/d/menu/d_menu_map_common/getIconSizeY__16dMenuMapCommon_cFUc.s"
}
#pragma pop
#endif
/* 801C47C4-801C4D54 1BF104 0590+00 1/1 0/0 0/0 .text debugIcon__16dMenuMapCommon_cFv */
#pragma push