diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-04-06 11:08:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-06 21:08:25 +0300 |
| commit | 54dd7640969e1f414f9b1111f874f85171ab6987 (patch) | |
| tree | 8f83caa22c5ab811736e3625be599061d478af10 /src/d/d_save.cpp | |
| parent | 4361019959acf84f347fec62315f8aefb2d63a6f (diff) | |
GCN pal / jpn support, some debug work (#2375)
* d_save debug cleanup / d_s_menu debug
* gameinfo / kankyo struct debug fixes
* pal building ok
* jp building ok
* some tests with jp
* some more pal/jp tests
Diffstat (limited to 'src/d/d_save.cpp')
| -rw-r--r-- | src/d/d_save.cpp | 784 |
1 files changed, 638 insertions, 146 deletions
diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index e8249e064a..8d7b20405c 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -10,6 +10,8 @@ #include "d/d_com_inf_game.h" #include "d/d_meter2_info.h" #include "d/actor/d_a_obj_carry.h" +#include "f_op/f_op_scene_mng.h" +#include "JSystem/JHostIO/JORFile.h" /* 80032918-80032958 02D258 0040+00 4/4 0/0 0/0 .text dSv_item_rename__FUc */ static u8 dSv_item_rename(u8 i_itemNo) { @@ -64,6 +66,8 @@ void dSv_player_status_a_c::init() { /* 80032A48-80032A5C 02D388 0014+00 0/0 1/1 0/0 .text * setSelectItemIndex__21dSv_player_status_a_cFiUc */ void dSv_player_status_a_c::setSelectItemIndex(int i_no, u8 i_slotNo) { + JUT_ASSERT(107, (i_no >= 0) && (i_no < ITEM_XY_MAX_DUMMY/2)); + if (i_no < MAX_SELECT_ITEM) { mSelectItem[i_no] = i_slotNo; } @@ -72,6 +76,8 @@ void dSv_player_status_a_c::setSelectItemIndex(int i_no, u8 i_slotNo) { /* 80032A5C-80032A78 02D39C 001C+00 7/7 20/20 0/0 .text * getSelectItemIndex__21dSv_player_status_a_cCFi */ u8 dSv_player_status_a_c::getSelectItemIndex(int i_no) const { + JUT_ASSERT(124, (i_no >= 0) && (i_no < ITEM_XY_MAX_DUMMY/2)); + if (i_no < MAX_SELECT_ITEM) { return mSelectItem[i_no]; } @@ -81,6 +87,8 @@ u8 dSv_player_status_a_c::getSelectItemIndex(int i_no) const { /* 80032A78-80032A8C 02D3B8 0014+00 0/0 1/1 0/0 .text setMixItemIndex__21dSv_player_status_a_cFiUc */ void dSv_player_status_a_c::setMixItemIndex(int i_no, u8 i_slotNo) { + JUT_ASSERT(143, (i_no >= 0) && (i_no < ITEM_XY_MAX_DUMMY/2)); + if (i_no < MAX_SELECT_ITEM) { mMixItem[i_no] = i_slotNo; } @@ -89,6 +97,8 @@ void dSv_player_status_a_c::setMixItemIndex(int i_no, u8 i_slotNo) { /* 80032A8C-80032AA8 02D3CC 001C+00 0/0 1/1 0/0 .text getMixItemIndex__21dSv_player_status_a_cCFi */ u8 dSv_player_status_a_c::getMixItemIndex(int i_no) const { + JUT_ASSERT(160, (i_no >= 0) && (i_no < ITEM_XY_MAX_DUMMY/2)); + if (i_no < MAX_SELECT_ITEM) { return mMixItem[i_no]; } @@ -107,13 +117,33 @@ u16 dSv_player_status_a_c::getRupeeMax() const { return 1000; } } + return 0; } +void dSv_player_status_a_c::onMagicFlag(u8 i_magic) { + JUT_ASSERT(203, 0 <= i_magic && i_magic < 8); + if (i_magic == 0) { + dComIfGs_onEventBit(dSv_event_flag_c::M_097); + } + + mMagicFlag |= (u8)(1 << i_magic); +} + +void dSv_player_status_a_c::offMagicFlag(u8 i_magic) { + JUT_ASSERT(222, 0 <= i_magic && i_magic < 8); + if (i_magic == 0) { + dComIfGs_offEventBit(dSv_event_flag_c::M_097); + } + + mMagicFlag &= (u8)~(u8)(1 << i_magic); +} + /* 80032AF8-80032B50 02D438 0058+00 0/0 1/1 0/0 .text isMagicFlag__21dSv_player_status_a_cCFUc */ BOOL dSv_player_status_a_c::isMagicFlag(u8 i_magic) const { + JUT_ASSERT(241, 0 <= i_magic && i_magic < 8); if (i_magic == 0) { - return dComIfGs_isEventBit(dSv_event_flag_c::M_097); // Magic Unlocked + return dComIfGs_isEventBit(dSv_event_flag_c::M_097); } return (mMagicFlag & (u8)(1 << i_magic)) ? TRUE : FALSE; @@ -135,21 +165,35 @@ void dSv_player_status_b_c::init() { /* 80032B94-80032BB0 02D4D4 001C+00 0/0 1/1 0/0 .text onDarkClearLV__21dSv_player_status_b_cFi */ void dSv_player_status_b_c::onDarkClearLV(int i_no) { + JUT_ASSERT(281, (i_no >= 0) && (i_no < 8)); mDarkClearLevelFlag |= (u8)(1 << i_no); } +void dSv_player_status_b_c::offDarkClearLV(int i_no) { + JUT_ASSERT(296, (i_no >= 0) && (i_no < 8)); + mDarkClearLevelFlag &= (u8)~(u8)(1 << i_no); +} + /* 80032BB0-80032BD0 02D4F0 0020+00 0/0 4/4 8/8 .text isDarkClearLV__21dSv_player_status_b_cCFi */ BOOL dSv_player_status_b_c::isDarkClearLV(int i_no) const { + JUT_ASSERT(311, (i_no >= 0) && (i_no < 8)); return mDarkClearLevelFlag & (u8)(1 << i_no) ? TRUE : FALSE; } /* 80032BD0-80032BEC 02D510 001C+00 0/0 1/1 0/0 .text onTransformLV__21dSv_player_status_b_cFi */ void dSv_player_status_b_c::onTransformLV(int i_no) { + JUT_ASSERT(326, (i_no >= 0) && (i_no < 8)); mTransformLevelFlag |= (u8)(1 << i_no); } +void dSv_player_status_b_c::offTransformLV(int i_no) { + JUT_ASSERT(341, (i_no >= 0) && (i_no < 8)); + mTransformLevelFlag &= (u8)~(u8)(1 << i_no); +} + /* 80032BEC-80032C0C 02D52C 0020+00 0/0 8/8 9/9 .text isTransformLV__21dSv_player_status_b_cCFi */ BOOL dSv_player_status_b_c::isTransformLV(int i_no) const { + JUT_ASSERT(356, (i_no >= 0) && (i_no < 8)); return mTransformLevelFlag & (u8)(1 << i_no) ? TRUE : FALSE; } @@ -164,6 +208,7 @@ void dSv_horse_place_c::init() { /* 80032C64-80032CC8 02D5A4 0064+00 0/0 0/0 1/1 .text set__17dSv_horse_place_cFPCcRC4cXyzsSc */ void dSv_horse_place_c::set(const char* i_name, const cXyz& i_pos, s16 i_angle, s8 i_roomNo) { + JUT_ASSERT(391, strlen(i_name) <= 7); strcpy(mName, i_name); mPos = i_pos; mAngleY = i_angle; @@ -182,6 +227,7 @@ void dSv_player_return_place_c::init() { /* 80032D1C-80032D60 02D65C 0044+00 0/0 0/0 1/1 .text set__25dSv_player_return_place_cFPCcScUc */ void dSv_player_return_place_c::set(const char* i_name, s8 i_roomNo, u8 i_status) { + JUT_ASSERT(426, strlen(i_name) <= 7); strcpy(mName, i_name); mRoomNo = i_roomNo; mPlayerStatus = i_status; @@ -207,8 +253,9 @@ void dSv_player_field_last_stay_info_c::init() { * set__33dSv_player_field_last_stay_info_cFPCcRC4cXyzsScUc */ void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_pos, s16 i_angle, s8 i_spawn, u8 i_regionNo) { + JUT_ASSERT(468, strlen(i_name) <= 7); strcpy(mName, i_name); - mPos = i_pos; + mPos.set(i_pos); mAngleY = i_angle; mLastSpawnId = i_spawn; mRegionNo = i_regionNo; @@ -219,6 +266,8 @@ void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_po void dSv_player_field_last_stay_info_c::onRegionBit(int i_region) { if (i_region >= 0 && i_region < 8) { mRegion |= (u8)(1 << i_region); + } else { + JUT_WARN(490, "region error!! %d", i_region); } } @@ -227,8 +276,10 @@ void dSv_player_field_last_stay_info_c::onRegionBit(int i_region) { BOOL dSv_player_field_last_stay_info_c::isRegionBit(int i_region) const { if (i_region >= 0 && i_region < 8) { return (mRegion & (u8)(1 << i_region)) ? TRUE : FALSE; + } else { + JUT_WARN(526, "region error!! %d", i_region); + return FALSE; } - return false; } /* 80032EB0-80032F2C 02D7F0 007C+00 1/1 0/0 0/0 .text init__27dSv_player_last_mark_info_cFv */ @@ -238,7 +289,7 @@ void dSv_player_last_mark_info_c::init() { mAngleY = 0; mRoomNo = 0; mSpawnId = 0; - mWarpAcceptStage = -1; + resetWarpAcceptStage(); for (int i = 0; i < 3; i++) { unk25[i] = 0; @@ -248,11 +299,14 @@ void dSv_player_last_mark_info_c::init() { /* 80032F2C-80032F90 02D86C 0064+00 0/0 1/1 0/0 .text * setWarpItemData__27dSv_player_last_mark_info_cFPCcRC4cXyzsScUcUc */ void dSv_player_last_mark_info_c::setWarpItemData(const char* i_name, const cXyz& i_pos, - s16 i_angle, s8 i_roomNo, u8, u8) { + s16 i_angle, s8 i_roomNo, u8 unk_4, u8 unk_5) { strcpy(mName, i_name); mPos.set(i_pos); mAngleY = i_angle; mRoomNo = i_roomNo; + + (void)unk_4; + (void)unk_5; } /* 80032F90-80032FB8 02D8D0 0028+00 1/1 0/0 0/0 .text init__17dSv_player_item_cFv */ @@ -283,9 +337,9 @@ u8 dSv_player_item_c::getItem(int i_slotNo, bool i_checkCombo) const { if (i_slotNo < MAX_ITEM_SLOTS) { if (i_checkCombo) { for (int i = 0; i < SELECT_ITEM_NUM; i++) { - if ((i_slotNo == dComIfGs_getSelectItemIndex(i) || - i_slotNo == dComIfGs_getMixItemIndex(i)) && - dComIfGs_getMixItemIndex(i) != fpcNm_ITEM_NONE) { + if ((i_slotNo == dComIfGs_getSelectItemIndex(i) || i_slotNo == dComIfGs_getMixItemIndex(i)) && + dComIfGs_getMixItemIndex(i) != fpcNm_ITEM_NONE) + { u8 select_item = mItems[dComIfGs_getSelectItemIndex(i)]; u8 mix_item = mItems[dComIfGs_getMixItemIndex(i)]; @@ -333,8 +387,11 @@ u8 dSv_player_item_c::getItem(int i_slotNo, bool i_checkCombo) const { // This block will only run on the Wii version if (i == SELECT_ITEM_B) { + OS_REPORT("合成アイテム不定2===>%d, %d\n", dComIfGs_getSelectItemIndex(i), dComIfGs_getMixItemIndex(i)); + if (dComIfGs_getSelectItemIndex(i) == 0 && - dComIfGs_getMixItemIndex(i) == 0) { + dComIfGs_getMixItemIndex(i) == 0) + { dComIfGs_setSelectItemIndex(i, fpcNm_ITEM_NONE); dComIfGs_setMixItemIndex(i, fpcNm_ITEM_NONE); return fpcNm_ITEM_NONE; @@ -342,6 +399,7 @@ u8 dSv_player_item_c::getItem(int i_slotNo, bool i_checkCombo) const { } // Uncertain combination item===>%d, %d\n OSReport_Error("合成アイテム不定===>%d, %d\n", select_item, mix_item); + JUT_ASSERT(731, 0); } } } @@ -354,8 +412,10 @@ u8 dSv_player_item_c::getItem(int i_slotNo, bool i_checkCombo) const { /* 800332F8-80033354 02DC38 005C+00 2/2 0/0 0/0 .text setLineUpItem__17dSv_player_item_cFv */ void dSv_player_item_c::setLineUpItem() { static u8 i_item_lst[23] = { - 0x0A, 0x08, 0x06, 0x02, 0x09, 0x04, 0x03, 0x00, 0x01, 0x17, 0x14, 0x05, - 0x0F, 0x10, 0x11, 0x0B, 0x0C, 0x0D, 0x0E, 0x13, 0x12, 0x16, 0x15, + 10, 8, 6, 2, 9, 4, 3, + 0, 1, 23, 20, 5, 15, 16, + 17, 11, 12, 13, 14, 19, 18, + 22, 21 }; int slot_idx = 0; @@ -365,7 +425,7 @@ void dSv_player_item_c::setLineUpItem() { } for (int i = 0; i < 23; i++) { - u32 current = i_item_lst[i]; + u8 current = i_item_lst[i]; if (mItems[current] != fpcNm_ITEM_NONE) { mItemSlots[slot_idx] = current; slot_idx++; @@ -458,93 +518,16 @@ void dSv_player_item_c::setEquipBottleItemEmpty(u8 curItemIn) { /* 800336E0-80033754 02E020 0074+00 0/0 30/30 0/0 .text checkBottle__17dSv_player_item_cFUc */ u8 dSv_player_item_c::checkBottle(u8 i_itemNo) { u8 num_bottles = 0; - u8 item_id = dSv_item_rename(i_itemNo); + i_itemNo = dSv_item_rename(i_itemNo); for (int i = 0; i < BOTTLE_MAX; i++) { - if (item_id == mItems[i + SLOT_11]) { + if (i_itemNo == mItems[i + SLOT_11]) { num_bottles++; } } return num_bottles; } -/* ############################################################################################## */ -/* 803A7288-803A78F8 0043A8 066C+04 2/2 45/45 148/148 .data saveBitLabels__16dSv_event_flag_c */ -u16 dSv_event_flag_c::saveBitLabels[822] = { - UNUSED, TEST_001, TEST_002, TEST_003, TEST_004, F_0001, F_0002, F_0003, F_0004, F_0005, F_0006, - F_0007, F_0008, F_0009, F_0010, F_0011, F_0012, F_0013, F_0014, F_0015, F_0016, F_0017, F_0018, - F_0019, F_0020, D_0001, F_0021, F_0022, F_0023, F_0024, F_0025, F_0026, F_0027, F_0028, F_0029, - F_0030, F_0031, F_0032, F_0033, M_006, M_007, M_008, M_009, M_010, M_011, M_012, M_013, - M_014, M_015, M_016, M_017, M_018, M_019, M_020, M_021, M_022, M_023, M_024, M_025, - M_026, M_027, M_028, M_029, M_030, M_031, M_032, M_033, M_034, M_035, M_036, M_037, - M_038, M_039, M_040, M_041, M_042, M_043, M_044, M_045, M_046, M_047, M_048, M_049, - M_050, M_051, M_052, M_053, M_054, M_055, M_056, M_057, M_058, M_059, M_060, M_061, - M_062, M_063, M_064, M_065, M_066, M_067, M_068, M_069, M_070, M_071, M_072, M_073, - M_074, M_075, M_076, M_077, M_078, M_079, M_080, M_081, M_082, M_083, M_084, M_085, - M_086, M_087, M_088, M_089, M_090, M_091, M_092, M_093, M_094, M_095, M_096, F_0034, - F_0035, M_001, M_003, F_0036, F_0037, F_0038, F_0039, F_0040, F_0041, F_0042, F_0043, F_0044, - F_0045, F_0046, F_0047, F_0048, F_0049, F_0050, F_0051, F_0052, F_0053, F_0054, F_0055, F_0056, - F_0057, F_0058, F_0059, F_0060, F_0061, F_0062, F_0063, F_0064, F_0065, F_0066, F_0067, F_0068, - F_0069, F_0070, M_002, F_0071, F_0072, F_0073, F_0074, F_0075, F_0076, F_0077, F_0078, F_0079, - F_0080, F_0081, F_0082, F_0083, F_0084, F_0085, EREG_000, F_0086, F_0087, F_0088, F_0089, - F_0090, F_0091, F_0092, F_0093, F_0094, F_0095, F_0096, F_0097, TOTAL_PRICE_HIGH, TOTAL_PRICE_LOW, - TOTAL_PAYMENT_HIGH, TOTAL_PAYMENT_LOW, F_0202, F_0203, F_0204, F_0205, F_0206, F_0207, - F_0208, F_0209, F_0210, F_0211, F_0212, F_0213, F_0214, F_0215, F_0216, F_0217, F_0218, F_0219, - F_0220, F_0221, F_0222, F_0223, F_0224, F_0225, F_0226, F_0227, F_0228, F_0229, F_0230, F_0231, - F_0232, F_0233, F_234, F_0235, F_0236, F_0237, F_0238, T_0239, F_0240, F_0241, F_0242, F_0243, - F_0244, MAP_VISIBLE, F_0246, F_0247, F_0248, F_0249, F_0250, F_0251, F_0252, F_0253, F_0254, - F_0255, F_0256, F_0257, F_0258, F_0259, F_0260, F_0261, F_0262, F_0263, F_0264, F_0265, F_0266, - F_0267, F_0268, F_0269, F_0270, F_0271, F_0272, F_0273, F_0274, F_0275, F_0276, F_0277, F_0278, - F_0279, F_0280, F_0281, F_282, F_283, F_284, F_285, F_286, F_287, F_288, F_289, F_290, - M_097, F_0292, F_0293, F_0294, F_0295, F_0296, F_0297, F_0298, F_0299, F_0300, F_0301, F_0302, - F_0303, F_0304, F_0305, F_0306, F_0307, F_0308, F_0309, F_0310, F_0311, F_0312, F_0313, F_0314, - F_0315, F_0316, F_0317, F_0318, F_0319, F_0320, F_0321, F_0322, F_0323, F_0324, F_0325, F_0326, - F_0327, F_0328, F_0329, F_0330, F_0331, F_0332, F_0333, F_0334, F_0335, F_0336, F_0337, F_0338, - F_0339, F_0340, F_0341, F_0342, F_0343, F_0344, F_0345, F_0346, F_0347, F_0348, F_0349, F_0350, - F_0351, F_0352, F_0353, F_0354, F_0355, F_0356, F_0357, F_0358, F_0359, F_0360, F_0361, F_0362, - F_0363, F_0364, F_0365, F_0366, F_0367, F_0368, F_0369, F_0370, F_0371, F_0372, F_0373, F_0374, - F_0375, F_0376, F_0377, F_0378, F_0379, F_0380, F_0381, F_0382, F_0383, F_0384, F_0385, F_0386, - F_0387, F_0388, F_0389, F_0390, F_0391, F_0392, F_0393, F_0394, F_0395, F_0396, F_0397, F_0398, - F_0399, F_0400, F_0401, F_0402, F_0403, F_0404, F_0405, F_0406, F_0407, F_0408, F_0409, F_0410, - F_0411, F_0412, F_0413, F_0414, F_0415, F_0416, F_0417, F_0418, F_0419, F_0420, F_0421, F_0422, - F_0423, F_0424, F_0425, F_0426, F_0427, F_0428, F_0429, F_0430, F_0431, F_0432, F_0433, F_0434, - F_0435, F_0436, F_0437, F_0438, F_0439, F_0440, F_0441, F_0442, F_0443, F_0444, F_0445, F_0446, - F_0447, F_0448, F_0449, F_0450, FUND_RAISING_LOW, FUND_RAISING_HIGH, F_0453, F_0454, - F_0455, F_0456, F_0457, F_0458, F_0459, F_0460, F_0461, F_0462, F_0463, F_0464, F_0465, F_0466, - F_0467, F_0468, F_0469, F_0470, F_0471, F_0472, F_0473, F_0474, F_0475, F_0476, F_0477, F_0478, - F_0479, F_0480, F_0481, F_0482, F_0483, F_0484, F_0485, F_0486, F_0487, F_0488, F_0489, F_0490, - F_0491, F_0492, F_0493, F_0494, F_0495, F_0496, F_0497, F_0498, F_0499, F_0500, F_0501, F_0502, - F_0503, F_0504, F_0505, F_0506, F_0507, F_0508, F_0509, F_0510, FUND_RAISING_LOW2, FUND_RAISING_HIGH2, - F_0513, F_0514, F_0515, F_0516, F_0517, F_0518, F_0519, F_0520, F_0521, F_0522, F_0523, F_0524, - F_0525, F_0526, F_0527, F_0528, F_0529, F_0530, F_0531, F_0532, F_0533, F_0534, F_0535, F_0536, - F_0537, F_0538, F_0539, F_0540, F_0541, F_0542, F_0543, F_0544, F_0545, F_0546, F_0547, F_0548, - F_0549, F_0550, F_0551, F_0552, F_0553, F_0554, F_0555, F_0556, F_0557, F_0558, F_0559, F_0560, - F_0561, F_0562, F_0563, F_0564, F_0565, F_0566, F_0567, F_0568, F_0569, F_0570, F_0571, F_0572, - F_0573, F_0574, F_0575, F_0576, F_0577, F_0578, F_0579, F_0580, F_0581, F_0582, F_0583, F_0584, - F_0585, F_0586, F_0587, F_0588, F_0589, F_0590, F_0591, F_0592, F_0593, F_0594, F_0595, F_0596, - F_0597, F_0598, F_0599, F_0600, F_0601, UNUSED, F_0700, F_0701, F_0702, F_0606, F_0607, F_0608, - F_0609, F_0610, F_0611, F_0612, F_0613, F_0614, F_0615, F_0616, F_0617, F_0618, F_0619, F_0620, - F_0621, F_0622, F_0623, F_0624, F_0625, F_0626, F_0627, F_0628, F_0629, F_0630, F_0631, F_0632, - F_0633, F_0634, F_0635, F_0636, F_0637, F_0638, F_0639, F_0640, F_0641, F_0642, F_0643, F_0644, - F_0645, F_0646, F_0647, F_0648, F_0649, F_0650, F_0651, F_0652, F_0653, F_0654, F_0655, F_0656, - F_0657, F_0658, F_0659, F_0660, F_0661, F_0662, F_0663, F_0664, F_0665, F_0666, F_0667, F_0668, - F_0669, F_0670, F_0671, F_0672, F_0673, F_0674, F_0675, F_0676, F_0677, F_0678, F_0679, F_0680, - F_0681, F_0682, F_0683, F_0684, F_0685, F_0686, F_0687, F_0688, F_0689, F_0690, F_0691, F_0692, - F_0693, F_0694, F_0695, F_0696, F_0697, F_0698, F_0699, F_0700B, F_0701B, F_0702B, - F_0703, F_0704, F_0705, F_0706, F_0707, F_0708, F_0709, KORO2_LEVEL, LM_RECORD_0, RI_RECORD_0, - NP_RECORD_0, CF_RECORD_0, F_0715, F_0716, F_0717, F_0718, F_0719, F_0720, F_0721, F_0722, - F_0723, F_0724, F_0725, F_0726, F_0727, F_0728, F_0729, F_0730, SP_LURE__USE_COUNT, F_0732, - F_0733, F_0734, F_0735, F_0736, F_0737, F_0738, F_0739, F_0740, F_0741, F_0742, F_0743, F_0744, - F_0745, F_0746, F_0747, F_0748, F_0749, F_0750, F_0751, F_0752, F_0753, F_0754, F_0755, F_0756, - F_0757, F_0758, F_0759, KAKERA_GET_INFO_00, KAKERA_GET_INFO_01, KAKERA_GET_INFO_02, - KAKERA_GET_INFO_03, KAKERA_GET_INFO_04, KAKERA_GET_INFO_05, B_BTN_GUIDE, J_BTN_GUIDE, - F_0768, F_0769, F_0770, F_0771, F_0772, F_0773, F_0774, F_0775, F_0776, F_0777, F_0778, F_0779, - F_0780, F_0781, F_0782, F_0783, F_0784, F_0785, F_0786, F_0787, F_0788, F_0789, F_0790, F_0791, - F_0792, F_0793, F_0794, F_0795, F_0796, F_0797, F_0798, F_0799, F_0800, F_0801, F_0802, F_0803, - F_0804, F_0805, F_0806, F_0807, F_0808, F_0809, F_0810, F_0811, F_0812, F_0813, F_0814, F_0815, - F_0816, F_0817, F_0818, F_0819, F_0820, KORO2_ALLCLEAR, -}; - /* 80033754-800337EC 02E094 0098+00 0/0 1/1 0/0 .text checkInsectBottle__17dSv_player_item_cFv */ BOOL dSv_player_item_c::checkInsectBottle() { for (int i = 0; i < 24; i++) { @@ -641,15 +624,13 @@ void dSv_player_item_c::setEmptyBombBag(u8 i_newBomb, u8 i_bombNum) { if (dComIfGs_getItem((u8)(i + SLOT_15), true) == fpcNm_ITEM_NONE) { dComIfGs_setItem((u8)(i + SLOT_15), i_newBomb); - if (i_newBomb == fpcNm_ITEM_BOMB_BAG_LV1) { - return; - } - - if (i_bombNum > dComIfGs_getBombMax(i_newBomb)) { - i_bombNum = dComIfGs_getBombMax(i_newBomb); + if (i_newBomb != fpcNm_ITEM_BOMB_BAG_LV1) { + if (i_bombNum > dComIfGs_getBombMax(i_newBomb)) { + i_bombNum = dComIfGs_getBombMax(i_newBomb); + } + + dComIfGs_setBombNum(i, i_bombNum); } - - dComIfGs_setBombNum(i, i_bombNum); return; } } @@ -706,18 +687,27 @@ void dSv_player_item_c::setRodTypeLevelUp() { void dSv_player_item_c::setBaitItem(u8 i_itemNo) { switch (i_itemNo) { case fpcNm_ITEM_BEE_CHILD: { - dComIfGs_isItemFirstBit(fpcNm_ITEM_ZORAS_JEWEL) ? mItems[SLOT_20] = fpcNm_ITEM_JEWEL_BEE_ROD : - mItems[SLOT_20] = fpcNm_ITEM_BEE_ROD; + if (dComIfGs_isItemFirstBit(fpcNm_ITEM_ZORAS_JEWEL)) { + mItems[SLOT_20] = fpcNm_ITEM_JEWEL_BEE_ROD; + } else { + mItems[SLOT_20] = fpcNm_ITEM_BEE_ROD; + } break; } case fpcNm_ITEM_WORM: { - dComIfGs_isItemFirstBit(fpcNm_ITEM_ZORAS_JEWEL) ? mItems[SLOT_20] = fpcNm_ITEM_JEWEL_WORM_ROD : - mItems[SLOT_20] = fpcNm_ITEM_WORM_ROD; + if (dComIfGs_isItemFirstBit(fpcNm_ITEM_ZORAS_JEWEL)) { + mItems[SLOT_20] = fpcNm_ITEM_JEWEL_WORM_ROD; + } else { + mItems[SLOT_20] = fpcNm_ITEM_WORM_ROD; + } break; } case fpcNm_ITEM_NONE: { - dComIfGs_isItemFirstBit(fpcNm_ITEM_ZORAS_JEWEL) ? mItems[SLOT_20] = fpcNm_ITEM_JEWEL_ROD : - mItems[SLOT_20] = fpcNm_ITEM_FISHING_ROD_1; + if (dComIfGs_isItemFirstBit(fpcNm_ITEM_ZORAS_JEWEL)) { + mItems[SLOT_20] = fpcNm_ITEM_JEWEL_ROD; + } else { + mItems[SLOT_20] = fpcNm_ITEM_FISHING_ROD_1; + } break; } } @@ -735,18 +725,30 @@ void dSv_player_get_item_c::init() { } /* 80033E60-80033E94 02E7A0 0034+00 0/0 3/3 1/1 .text onFirstBit__21dSv_player_get_item_cFUc */ -void dSv_player_get_item_c::onFirstBit(u8 i_itemNo) { - mItemFlags[i_itemNo / 32] |= (1 << (i_itemNo % 32)); +void dSv_player_get_item_c::onFirstBit(u8 i_itemno) { + JUT_ASSERT(1563, 0 <= i_itemno && i_itemno < ITEM_BIT_MAX); + + int index = i_itemno / 32; + int bit = i_itemno % 32; + mItemFlags[index] |= (1 << bit); } /* 80033E94-80033EC8 02E7D4 0034+00 0/0 7/7 1/1 .text offFirstBit__21dSv_player_get_item_cFUc */ -void dSv_player_get_item_c::offFirstBit(u8 i_itemNo) { - mItemFlags[i_itemNo / 32] &= ~(1 << (i_itemNo % 32)); +void dSv_player_get_item_c::offFirstBit(u8 i_itemno) { + JUT_ASSERT(1581, 0 <= i_itemno && i_itemno < ITEM_BIT_MAX); + + int index = i_itemno / 32; + int bit = i_itemno % 32; + mItemFlags[index] &= ~(1 << bit); } /* 80033EC8-80033F00 02E808 0038+00 4/4 87/87 2/2 .text isFirstBit__21dSv_player_get_item_cCFUc */ -int dSv_player_get_item_c::isFirstBit(u8 i_itemNo) const { - return mItemFlags[i_itemNo / 32] & (1 << (i_itemNo % 32)) ? TRUE : FALSE; +BOOL dSv_player_get_item_c::isFirstBit(u8 i_itemno) const { + JUT_ASSERT(1599, 0 <= i_itemno && i_itemno < ITEM_BIT_MAX); + + int index = i_itemno / 32; + int bit = i_itemno % 32; + return mItemFlags[index] & (1 << bit) ? TRUE : FALSE; } /* 80033F00-80033F6C 02E840 006C+00 1/1 0/0 0/0 .text init__24dSv_player_item_record_cFv @@ -772,27 +774,37 @@ void dSv_player_item_record_c::init() { /* 80033F6C-80033F7C 02E8AC 0010+00 3/3 5/5 0/0 .text setBombNum__24dSv_player_item_record_cFUcUc */ void dSv_player_item_record_c::setBombNum(u8 i_bagIdx, u8 i_bombNum) { +#if VERSION == VERSION_SHIELD_DEBUG + if (i_bagIdx == 8) { + return; + } +#endif + + JUT_ASSERT(1651, 0 <= i_bagIdx && i_bagIdx < dSv_player_item_c::BOMB_BAG_MAX); mBombNum[i_bagIdx] = i_bombNum; } /* 80033F7C-80033F8C 02E8BC 0010+00 0/0 13/13 2/2 .text getBombNum__24dSv_player_item_record_cCFUc */ u8 dSv_player_item_record_c::getBombNum(u8 i_bagIdx) const { + JUT_ASSERT(1718, 0 <= i_bagIdx && i_bagIdx < dSv_player_item_c::BOMB_BAG_MAX); return mBombNum[i_bagIdx]; } /* 80033F8C-80033F9C 02E8CC 0010+00 0/0 2/2 0/0 .text * setBottleNum__24dSv_player_item_record_cFUcUc */ void dSv_player_item_record_c::setBottleNum(u8 i_bottleIdx, u8 i_bottleNum) { + JUT_ASSERT(1733, 0 <= i_bottleIdx && i_bottleIdx < dSv_player_item_c::BOTTLE_MAX); mBottleNum[i_bottleIdx] = i_bottleNum; } /* 80033F9C-80034030 02E8DC 0094+00 0/0 1/1 0/0 .text addBottleNum__24dSv_player_item_record_cFUcs */ u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, s16 i_no) { + JUT_ASSERT(1748, 0 <= i_bottleIdx && i_bottleIdx < dSv_player_item_c::BOTTLE_MAX); int bottleNum = mBottleNum[i_bottleIdx] + i_no; - dComIfGs_getItem((u8)(i_bottleIdx + SLOT_11), true); + u8 var_r28 = dComIfGs_getItem((u8)(i_bottleIdx + SLOT_11), true); if (bottleNum < 0) { mBottleNum[i_bottleIdx] = 0; @@ -808,6 +820,7 @@ u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, s16 i_no) { /* 80034030-80034040 02E970 0010+00 0/0 4/4 0/0 .text getBottleNum__24dSv_player_item_record_cCFUc */ u8 dSv_player_item_record_c::getBottleNum(u8 i_bottleIdx) const { + JUT_ASSERT(1776, 0 <= i_bottleIdx && i_bottleIdx < dSv_player_item_c::BOTTLE_MAX); return mBottleNum[i_bottleIdx]; } @@ -833,7 +846,6 @@ void dSv_player_item_max_c::setBombNum(u8 i_bombType, u8 i_maxNum) { return; case fpcNm_ITEM_POKE_BOMB: mItemMax[POKE_BOMB_MAX] = i_maxNum; - return; } } @@ -871,35 +883,56 @@ void dSv_player_collect_c::init() { /* 800341E8-80034208 02EB28 0020+00 0/0 8/8 0/0 .text setCollect__20dSv_player_collect_cFiUc */ void dSv_player_collect_c::setCollect(int i_item_type, u8 i_item) { + JUT_ASSERT(1894, 0 <= i_item && i_item < 8); mItem[i_item_type] |= (u8)(1 << i_item); } +void dSv_player_collect_c::offCollect(int i_item_type, u8 i_item) { + JUT_ASSERT(1909, 0 <= i_item && i_item < 8); + mItem[i_item_type] &= (u8)~(u8)(1 << i_item); +} + /* 80034208-8003422C 02EB48 0024+00 0/0 4/4 4/4 .text isCollect__20dSv_player_collect_cCFiUc */ BOOL dSv_player_collect_c::isCollect(int i_item_type, u8 i_item) const { + JUT_ASSERT(1924, 0 <= i_item && i_item < 8); return mItem[i_item_type] & (u8)(1 << i_item) ? TRUE : FALSE; } /* 8003422C-8003424C 02EB6C 0020+00 0/0 1/1 1/1 .text onCollectCrystal__20dSv_player_collect_cFUc */ void dSv_player_collect_c::onCollectCrystal(u8 i_item) { + JUT_ASSERT(1956, 0 <= i_item && i_item < 8); mCrystal |= (u8)(1 << i_item); } +void dSv_player_collect_c::offCollectCrystal(u8 i_item) { + JUT_ASSERT(1971, 0 <= i_item && i_item < 8); + mCrystal &= (u8)~(u8)(1 << i_item); +} + /* 8003424C-80034270 02EB8C 0024+00 0/0 4/4 0/0 .text isCollectCrystal__20dSv_player_collect_cCFUc */ BOOL dSv_player_collect_c::isCollectCrystal(u8 i_item) const { + JUT_ASSERT(1986, 0 <= i_item && i_item < 8); return mCrystal & (u8)(1 << i_item) ? TRUE : FALSE; } /* 80034270-80034290 02EBB0 0020+00 0/0 1/1 1/1 .text onCollectMirror__20dSv_player_collect_cFUc */ void dSv_player_collect_c::onCollectMirror(u8 i_item) { + JUT_ASSERT(2001, 0 <= i_item && i_item < 8); mMirror |= (u8)(1 << i_item); } +void dSv_player_collect_c::offCollectMirror(u8 i_item) { + JUT_ASSERT(2016, 0 <= i_item && i_item < 8); + mMirror &= (u8)~(u8)(1 << i_item); +} + /* 80034290-800342B4 02EBD0 0024+00 0/0 4/4 0/0 .text isCollectMirror__20dSv_player_collect_cCFUc */ BOOL dSv_player_collect_c::isCollectMirror(u8 i_item) const { + JUT_ASSERT(2031, 0 <= i_item && i_item < 8); return mMirror & (u8)(1 << i_item) ? TRUE : FALSE; } @@ -928,6 +961,7 @@ void dSv_light_drop_c::init() { /* 80034320-80034340 02EC60 0020+00 0/0 0/0 1/1 .text setLightDropNum__16dSv_light_drop_cFUcUc */ void dSv_light_drop_c::setLightDropNum(u8 i_nowLevel, u8 i_dropNum) { if (i_nowLevel < LIGHT_DROP_STAGE || i_nowLevel > 6) { + JUT_ASSERT(2089, (i_nowLevel >= 0) && (i_nowLevel < LIGHT_DROP_STAGE)); mLightDropNum[i_nowLevel] = i_dropNum; } } @@ -937,22 +971,34 @@ u8 dSv_light_drop_c::getLightDropNum(u8 i_nowLevel) const { if (i_nowLevel >= LIGHT_DROP_STAGE && i_nowLevel <= 6) { return 0; } + + JUT_ASSERT(2107, (i_nowLevel >= 0) && (i_nowLevel < LIGHT_DROP_STAGE)); return mLightDropNum[i_nowLevel]; } /* 80034368-8003439C 02ECA8 0034+00 0/0 4/4 0/0 .text onLightDropGetFlag__16dSv_light_drop_cFUc */ void dSv_light_drop_c::onLightDropGetFlag(u8 i_nowLevel) { if (i_nowLevel < LIGHT_DROP_STAGE || i_nowLevel > 6) { + JUT_ASSERT(2208, (i_nowLevel >= 0) && (i_nowLevel < LIGHT_DROP_STAGE)); mLightDropGetFlag |= (u8)(1 << i_nowLevel); } } +void dSv_light_drop_c::offLightDropGetFlag(u8 i_nowLevel) { + if (i_nowLevel < LIGHT_DROP_STAGE || i_nowLevel > 6) { + JUT_ASSERT(2227, (i_nowLevel >= 0) && (i_nowLevel < LIGHT_DROP_STAGE)); + mLightDropGetFlag &= (u8)~(u8)(1 << i_nowLevel); + } +} + /* 8003439C-800343DC 02ECDC 0040+00 0/0 8/8 2/2 .text isLightDropGetFlag__16dSv_light_drop_cCFUc */ BOOL dSv_light_drop_c::isLightDropGetFlag(u8 i_nowLevel) const { if (i_nowLevel >= LIGHT_DROP_STAGE && i_nowLevel <= 6) { return 0; } + + JUT_ASSERT(2246, (i_nowLevel >= 0) && (i_nowLevel < LIGHT_DROP_STAGE)); return mLightDropGetFlag & (u8)(1 << i_nowLevel) ? TRUE : FALSE; } @@ -970,21 +1016,25 @@ void dSv_letter_info_c::init() { /* 80034428-8003444C 02ED68 0024+00 0/0 2/2 0/0 .text onLetterGetFlag__17dSv_letter_info_cFi */ void dSv_letter_info_c::onLetterGetFlag(int i_no) { + JUT_ASSERT(2281, (i_no >= 0) && (i_no < LETTER_INFO_BIT)); mLetterGetFlags[i_no >> 5] |= 1 << (i_no & 0x1F); } /* 8003444C-80034474 02ED8C 0028+00 0/0 4/4 0/0 .text isLetterGetFlag__17dSv_letter_info_cCFi */ BOOL dSv_letter_info_c::isLetterGetFlag(int i_no) const { + JUT_ASSERT(2311, (i_no >= 0) && (i_no < LETTER_INFO_BIT)); return mLetterGetFlags[i_no >> 5] & (1 << (i_no & 0x1F)) ? TRUE : FALSE; } /* 80034474-8003449C 02EDB4 0028+00 0/0 1/1 0/0 .text onLetterReadFlag__17dSv_letter_info_cFi */ void dSv_letter_info_c::onLetterReadFlag(int i_no) { + JUT_ASSERT(2326, (i_no >= 0) && (i_no < LETTER_INFO_BIT)); mLetterReadFlags[i_no >> 5] |= 1 << (i_no & 0x1F); } /* 8003449C-800344C8 02EDDC 002C+00 0/0 3/3 0/0 .text isLetterReadFlag__17dSv_letter_info_cCFi */ BOOL dSv_letter_info_c::isLetterReadFlag(int i_no) const { + JUT_ASSERT(2356, (i_no >= 0) && (i_no < LETTER_INFO_BIT)); return mLetterReadFlags[i_no >> 5] & 1 << (i_no & 0x1F) ? TRUE : FALSE; } @@ -999,7 +1049,7 @@ void dSv_fishing_info_c::init() { /* 800344FC-80034518 02EE3C 001C+00 0/0 0/0 1/1 .text addFishCount__18dSv_fishing_info_cFUc */ void dSv_fishing_info_c::addFishCount(u8 i_fishIdx) { if (mFishCount[i_fishIdx] < 999) { - mFishCount[i_fishIdx] += 1; + mFishCount[i_fishIdx]++; } } @@ -1008,7 +1058,6 @@ void dSv_player_info_c::init() { dMeter2Info_getString(0x382, mPlayerName, NULL); // Link dMeter2Info_getString(0x383, mHorseName, NULL); // Epona - unk4 = 0; unk0 = 0; mTotalTime = 0; unk16 = 0; @@ -1020,10 +1069,17 @@ void dSv_player_info_c::init() { } } +extern "C" u8 SCGetLanguage(); + /* 800345AC-80034644 02EEEC 0098+00 1/1 0/0 0/0 .text init__19dSv_player_config_cFv */ void dSv_player_config_c::init() { +#if VERSION == VERSION_GCN_JPN + unk0 = 0; +#else unk0 = 1; +#endif +#if VERSION != VERSION_SHIELD_DEBUG if (OSGetSoundMode() == OS_SOUND_MODE_MONO) { mSoundMode = OS_SOUND_MODE_MONO; Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_MONO); @@ -1031,10 +1087,19 @@ void dSv_player_config_c::init() { mSoundMode = OS_SOUND_MODE_STEREO; Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_STEREO); } +#endif mAttentionType = 0; mVibration = 1; - unk4 = 0; + +#if VERSION == VERSION_GCN_PAL + mLanguage = OSGetLanguage(); +#elif VERSION == VERSION_SHIELD_DEBUG + mLanguage = SCGetLanguage(); +#else + mLanguage = 0; +#endif + unk5 = 0; mShortCut = 0; mCalibrateDist = 350; @@ -1045,7 +1110,39 @@ void dSv_player_config_c::init() { /* 80034644-80034684 02EF84 0040+00 0/0 4/4 0/0 .text checkVibration__19dSv_player_config_cCFv */ u32 dSv_player_config_c::checkVibration() const { +#if VERSION != VERSION_SHIELD_DEBUG return JUTGamePad::sRumbleSupported & 0x80000000 ? dComIfGp_getNowVibration() : 0; +#else + return dComIfGp_getNowVibration(); +#endif +} + +u8 dSv_player_config_c::getPalLanguage() const { +#if VERSION == VERSION_GCN_PAL + switch (OSGetLanguage()) { + case 0: + return LANGAUGE_ENGLISH; + case 1: + return LANGAUGE_GERMAN; + case 2: + return LANGAUGE_FRENCH; + case 3: + return LANGAUGE_SPANISH; + case 4: + return LANGAUGE_ITALIAN; + } +#elif VERSION == VERSION_SHIELD_DEBUG + switch (SCGetLanguage()) { + case 1: + return 0; + case 3: + return 2; + case 4: + return 3; + } +#endif + + return 0; } /* 80034684-8003468C 02EFC4 0008+00 1/1 2/2 0/0 .text getSound__19dSv_player_config_cFv @@ -1101,43 +1198,54 @@ void dSv_memBit_c::init() { mSwitch[i] = 0; } - mItem[0] = 0; + for (int i = 0; i < 1; i++) { + mItem[i] = 0; + } + mKeyNum = 0; mDungeonItem = 0; } /* 800347A0-800347C4 02F0E0 0024+00 0/0 0/0 15/15 .text onTbox__12dSv_memBit_cFi */ void dSv_memBit_c::onTbox(int i_no) { + JUT_ASSERT(2726, 0 <= i_no && i_no < TBOX_MAX); mTbox[i_no >> 5] |= 1 << (i_no & 0x1F); } /* 800347C4-800347E8 02F104 0024+00 0/0 0/0 5/5 .text offTbox__12dSv_memBit_cFi */ void dSv_memBit_c::offTbox(int i_no) { + JUT_ASSERT(2740, 0 <= i_no && i_no < TBOX_MAX); mTbox[i_no >> 5] &= ~(1 << (i_no & 0x1F)); } /* 800347E8-80034810 02F128 0028+00 0/0 6/6 7/7 .text isTbox__12dSv_memBit_cCFi */ BOOL dSv_memBit_c::isTbox(int i_no) const { + JUT_ASSERT(2754, 0 <= i_no && i_no < TBOX_MAX); return 1 << (i_no & 0x1f) & mTbox[i_no >> 5] ? TRUE : FALSE; } /* 80034810-80034838 02F150 0028+00 1/1 5/5 18/18 .text onSwitch__12dSv_memBit_cFi */ void dSv_memBit_c::onSwitch(int i_no) { + JUT_ASSERT(2786, 0 <= i_no && i_no < 128); mSwitch[i_no >> 5] |= 1 << (i_no & 0x1F); } /* 80034838-80034860 02F178 0028+00 1/1 3/3 3/3 .text offSwitch__12dSv_memBit_cFi */ void dSv_memBit_c::offSwitch(int i_no) { + JUT_ASSERT(2800, 0 <= i_no && i_no < 128); mSwitch[i_no >> 5] &= ~(1 << (i_no & 0x1F)); } /* 80034860-8003488C 02F1A0 002C+00 1/1 11/11 23/23 .text isSwitch__12dSv_memBit_cCFi */ BOOL dSv_memBit_c::isSwitch(int i_no) const { + JUT_ASSERT(2814, 0 <= i_no && i_no < 128); return (mSwitch[i_no >> 5] & 1 << (i_no & 0x1F)) ? TRUE : FALSE; } /* 8003488C-800348C4 02F1CC 0038+00 1/1 0/0 0/0 .text revSwitch__12dSv_memBit_cFi */ BOOL dSv_memBit_c::revSwitch(int i_no) { + JUT_ASSERT(2828, 0 <= i_no && i_no < 128); + u32 switchInd = i_no >> 5; u32 tmp = 1 << (i_no & 0x1F); mSwitch[switchInd] ^= tmp; @@ -1146,30 +1254,46 @@ BOOL dSv_memBit_c::revSwitch(int i_no) { /* 800348C4-800348EC 02F204 0028+00 1/1 0/0 0/0 .text onItem__12dSv_memBit_cFi */ void dSv_memBit_c::onItem(int i_no) { + JUT_ASSERT(2847, 0 <= i_no && i_no < 64); mItem[i_no >> 5] |= 1 << (i_no & 0x1F); } +void dSv_memBit_c::offItem(int i_no) { + JUT_ASSERT(2861, 0 <= i_no && i_no < 64); + mItem[i_no >> 5] |= ~(1 << (i_no & 0x1F)); +} + /* 800348EC-80034918 02F22C 002C+00 1/1 2/2 1/1 .text isItem__12dSv_memBit_cCFi */ BOOL dSv_memBit_c::isItem(int i_no) const { + JUT_ASSERT(2875, 0 <= i_no && i_no < 64); return (mItem[i_no >> 5] & 1 << (i_no & 0x1F)) ? TRUE : FALSE; } /* 80034918-80034934 02F258 001C+00 0/0 8/8 18/18 .text onDungeonItem__12dSv_memBit_cFi */ void dSv_memBit_c::onDungeonItem(int i_no) { + JUT_ASSERT(2969, 0 <= i_no && i_no < DSV_MEMBIT_ENUM_MAX); mDungeonItem |= (u8)(1 << i_no); } +void dSv_memBit_c::offDungeonItem(int i_no) { + JUT_ASSERT(2983, 0 <= i_no && i_no < DSV_MEMBIT_ENUM_MAX); + mDungeonItem &= (u8)~(u8)(1 << i_no); +} + /* 80034934-80034954 02F274 0020+00 0/0 27/27 47/47 .text isDungeonItem__12dSv_memBit_cCFi */ s32 dSv_memBit_c::isDungeonItem(int i_no) const { + JUT_ASSERT(2998, 0 <= i_no && i_no < DSV_MEMBIT_ENUM_MAX); return mDungeonItem & (u8)(1 << i_no) ? TRUE : FALSE; } /* 80034954-8003498C 02F294 0038+00 2/2 0/0 0/0 .text init__11dSv_event_cFv */ void dSv_event_c::init() { - for (int i = 0; i < MAX_EVENTS; i++) { + int i; + for (i = 0; i < MAX_EVENTS; i++) { mEvent[i] = 0; } + setInitEventBit(); } @@ -1205,10 +1329,13 @@ u8 dSv_event_c::getEventReg(u16 i_reg) const { /* 80034A1C-80034A64 02F35C 0048+00 1/1 0/0 0/0 .text init__14dSv_MiniGame_cFv */ void dSv_MiniGame_c::init() { - unk0 = 0; - for (int i = 0; i < 3; i++) { - unk1[i] = 0; + for (int i = 0; i < 1; i++) { + unk0[i][0] = 0; + for (int j = 0; j < 3; j++) { + unk0[i][1 + j] = 0; + } } + mStarTime = 120000; mBalloonScore = 0; mRaceGameTime = 0; @@ -1230,22 +1357,29 @@ void dSv_memory2_c::init() { /* 80034AA4-80034AC8 02F3E4 0024+00 0/0 1/1 1/1 .text onVisitedRoom__13dSv_memory2_cFi */ void dSv_memory2_c::onVisitedRoom(int i_no) { + JUT_ASSERT(3279, 0 <= i_no && i_no < 64); mVisitedRoom[i_no >> 5] |= 1 << (i_no & 0x1F); } /* 80034AC8-80034AEC 02F408 0024+00 0/0 1/1 1/1 .text offVisitedRoom__13dSv_memory2_cFi */ void dSv_memory2_c::offVisitedRoom(int i_no) { + JUT_ASSERT(3293, 0 <= i_no && i_no < 64); mVisitedRoom[i_no >> 5] &= ~(1 << (i_no & 0x1F)); } /* 80034AEC-80034B14 02F42C 0028+00 0/0 4/4 0/0 .text isVisitedRoom__13dSv_memory2_cFi */ BOOL dSv_memory2_c::isVisitedRoom(int i_no) { + JUT_ASSERT(3307, 0 <= i_no && i_no < 64); return (1 << (i_no & 0x1F) & mVisitedRoom[i_no >> 5]) ? TRUE : FALSE; } /* 80034B14-80034B98 02F454 0084+00 1/1 1/1 0/0 .text init__12dSv_danBit_cFSc */ bool dSv_danBit_c::init(s8 i_stageNo) { + OS_REPORT("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + OS_REPORT("\n!!! dSv_danBit_c::init i_stage=[%d] mStageNo=[%d]", i_stageNo, mStageNo); + OS_REPORT("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + if (i_stageNo != mStageNo) { mSwitch[0] = 0; mSwitch[1] = 0; @@ -1262,7 +1396,6 @@ bool dSv_danBit_c::init(s8 i_stageNo) { daObjCarry_c::clrSaveFlag(); return true; - } else { daObjCarry_c::setSaveFlag(); return false; @@ -1271,21 +1404,26 @@ bool dSv_danBit_c::init(s8 i_stageNo) { /* 80034B98-80034BC0 02F4D8 0028+00 1/1 2/2 26/26 .text onSwitch__12dSv_danBit_cFi */ void dSv_danBit_c::onSwitch(int i_no) { + JUT_ASSERT(3384, 0 <= i_no && i_no < 64); mSwitch[i_no >> 5] |= 1 << (i_no & 0x1F); } /* 80034BC0-80034BE8 02F500 0028+00 1/1 1/1 10/10 .text offSwitch__12dSv_danBit_cFi */ void dSv_danBit_c::offSwitch(int i_no) { + JUT_ASSERT(3398, 0 <= i_no && i_no < 64); mSwitch[i_no >> 5] &= ~(1 << (i_no & 0x1F)); } /* 80034BE8-80034C14 02F528 002C+00 1/1 6/6 14/14 .text isSwitch__12dSv_danBit_cCFi */ BOOL dSv_danBit_c::isSwitch(int i_no) const { + JUT_ASSERT(3412, 0 <= i_no && i_no < 64); return mSwitch[i_no >> 5] & (1 << (i_no & 0x1F)) ? TRUE : FALSE; } /* 80034C14-80034C4C 02F554 0038+00 1/1 0/0 0/0 .text revSwitch__12dSv_danBit_cFi */ BOOL dSv_danBit_c::revSwitch(int i_no) { + JUT_ASSERT(3426, 0 <= i_no && i_no < 64); + int uVar1 = 1 << (i_no & 0x1F); mSwitch[i_no >> 5] ^= uVar1; return mSwitch[i_no >> 5] & uVar1 ? TRUE : FALSE; @@ -1293,14 +1431,27 @@ BOOL dSv_danBit_c::revSwitch(int i_no) { /* 80034C4C-80034C74 02F58C 0028+00 1/1 0/0 0/0 .text onItem__12dSv_danBit_cFi */ void dSv_danBit_c::onItem(int i_no) { + JUT_ASSERT(3444, 0 <= i_no && i_no < ITEM_MAX_DAN); mItem[i_no >> 5] |= 1 << (i_no & 0x1F); } +void dSv_danBit_c::offItem(int i_no) { + JUT_ASSERT(3458, 0 <= i_no && i_no < ITEM_MAX_DAN); + mItem[i_no >> 5] &= ~(1 << (i_no & 0x1F)); +} + /* 80034C74-80034CA0 02F5B4 002C+00 1/1 2/2 0/0 .text isItem__12dSv_danBit_cCFi */ BOOL dSv_danBit_c::isItem(int i_no) const { + JUT_ASSERT(3472, 0 <= i_no && i_no < ITEM_MAX_DAN); return mItem[i_no >> 5] & 1 << (i_no & 0x1F) ? TRUE : FALSE; } +#if VERSION == VERSION_SHIELD_DEBUG +static void dummyString() { + DEAD_STRING("i_no < 6"); +} +#endif + /* 80034CA0-80034CEC 02F5E0 004C+00 1/1 0/0 0/0 .text init__13dSv_zoneBit_cFv */ void dSv_zoneBit_c::init() { for (int i = 0; i < 2; i++) { @@ -1328,21 +1479,26 @@ void dSv_zoneBit_c::clearRoomItem() { /* 80034D04-80034D2C 02F644 0028+00 1/1 1/1 0/0 .text onSwitch__13dSv_zoneBit_cFi */ void dSv_zoneBit_c::onSwitch(int i_no) { + JUT_ASSERT(3587, 0 <= i_no && i_no < SWITCH_ZONE_MAX); mSwitch[i_no >> 4] |= (u16)(1 << (i_no & 0xF)); } /* 80034D2C-80034D50 02F66C 0024+00 1/1 1/1 0/0 .text offSwitch__13dSv_zoneBit_cFi */ void dSv_zoneBit_c::offSwitch(int i_no) { + JUT_ASSERT(3601, 0 <= i_no && i_no < SWITCH_ZONE_MAX); mSwitch[i_no >> 4] &= ~(1 << (i_no & 0xF)); } /* 80034D50-80034D78 02F690 0028+00 1/1 1/1 0/0 .text isSwitch__13dSv_zoneBit_cCFi */ BOOL dSv_zoneBit_c::isSwitch(int i_no) const { + JUT_ASSERT(3615, 0 <= i_no && i_no < SWITCH_ZONE_MAX); return mSwitch[i_no >> 4] & 1 << (i_no & 0xF) ? TRUE : FALSE; } /* 80034D78-80034DAC 02F6B8 0034+00 1/1 0/0 0/0 .text revSwitch__13dSv_zoneBit_cFi */ BOOL dSv_zoneBit_c::revSwitch(int i_no) { + JUT_ASSERT(3629, 0 <= i_no && i_no < SWITCH_ZONE_MAX); + u32 switchInd = i_no >> 4; int uVar1 = 1 << (i_no & 0xF); mSwitch[switchInd] ^= uVar1; @@ -1351,21 +1507,26 @@ BOOL dSv_zoneBit_c::revSwitch(int i_no) { /* 80034DAC-80034DC8 02F6EC 001C+00 1/1 1/1 0/0 .text onOneSwitch__13dSv_zoneBit_cFi */ void dSv_zoneBit_c::onOneSwitch(int i_no) { + JUT_ASSERT(3649, 0 <= i_no && i_no < SWITCH_ONE_ZONE_MAX); mRoomSwitch |= (u16)(1 << i_no); } /* 80034DC8-80034DE0 02F708 0018+00 1/1 1/1 0/0 .text offOneSwitch__13dSv_zoneBit_cFi */ void dSv_zoneBit_c::offOneSwitch(int i_no) { + JUT_ASSERT(3663, 0 <= i_no && i_no < SWITCH_ONE_ZONE_MAX); mRoomSwitch &= ~(1 << i_no); } /* 80034DE0-80034DFC 02F720 001C+00 1/1 1/1 0/0 .text isOneSwitch__13dSv_zoneBit_cCFi */ BOOL dSv_zoneBit_c::isOneSwitch(int i_no) const { + JUT_ASSERT(3677, 0 <= i_no && i_no < SWITCH_ONE_ZONE_MAX); return mRoomSwitch & 1 << i_no ? TRUE : FALSE; } /* 80034DFC-80034E24 02F73C 0028+00 1/1 0/0 0/0 .text revOneSwitch__13dSv_zoneBit_cFi */ BOOL dSv_zoneBit_c::revOneSwitch(int i_no) { + JUT_ASSERT(3691, 0 <= i_no && i_no < SWITCH_ONE_ZONE_MAX); + int iVar1 = 1 << i_no; mRoomSwitch ^= iVar1; return mRoomSwitch & iVar1 ? TRUE : FALSE; @@ -1373,21 +1534,35 @@ BOOL dSv_zoneBit_c::revOneSwitch(int i_no) { /* 80034E24-80034E50 02F764 002C+00 1/1 0/0 0/0 .text onItem__13dSv_zoneBit_cFi */ void dSv_zoneBit_c::onItem(int i_no) { + JUT_ASSERT(3711, 0 <= i_no && i_no < ITEM_ZONE_MAX); mItem[i_no >> 4] |= (u16)(1 << (i_no & 0xF)); } +void dSv_zoneBit_c::offItem(int i_no) { + JUT_ASSERT(3729, 0 <= i_no && i_no < ITEM_ZONE_MAX); + mItem[i_no >> 4] &= (u16)~(1 << (i_no & 0xF)); +} + /* 80034E50-80034E7C 02F790 002C+00 1/1 1/1 0/0 .text isItem__13dSv_zoneBit_cCFi */ BOOL dSv_zoneBit_c::isItem(int i_no) const { + JUT_ASSERT(3745, 0 <= i_no && i_no < ITEM_ZONE_MAX); return mItem[i_no >> 4] & 1 << (i_no & 0xF) ? TRUE : FALSE; } /* 80034E7C-80034E98 02F7BC 001C+00 1/1 0/0 0/0 .text onOneItem__13dSv_zoneBit_cFi */ void dSv_zoneBit_c::onOneItem(int i_no) { + JUT_ASSERT(3783, 0 <= i_no && i_no < ITEM_ONE_ZONE_MAX); mRoomItem |= (u16)(1 << i_no); } +void dSv_zoneBit_c::offOneItem(int i_no) { + JUT_ASSERT(3798, 0 <= i_no && i_no < ITEM_ONE_ZONE_MAX); + mRoomItem &= (u16)~(1 << i_no); +} + /* 80034E98-80034EB4 02F7D8 001C+00 1/1 1/1 0/0 .text isOneItem__13dSv_zoneBit_cCFi */ BOOL dSv_zoneBit_c::isOneItem(int i_no) const { + JUT_ASSERT(3811, 0 <= i_no && i_no < ITEM_ONE_ZONE_MAX); return mRoomItem & 1 << i_no ? TRUE : FALSE; } @@ -1400,16 +1575,19 @@ void dSv_zoneActor_c::init() { /* 80034ED4-80034EF8 02F814 0024+00 1/1 0/0 0/0 .text on__15dSv_zoneActor_cFi */ void dSv_zoneActor_c::on(int i_id) { + JUT_ASSERT(3856, 0 <= i_id && i_id < ACTOR_MAX); mActorFlags[i_id >> 5] |= 1 << (i_id & 0x1F); } /* 80034EF8-80034F1C 02F838 0024+00 1/1 0/0 0/0 .text off__15dSv_zoneActor_cFi */ void dSv_zoneActor_c::off(int i_id) { + JUT_ASSERT(3870, 0 <= i_id && i_id < ACTOR_MAX); mActorFlags[i_id >> 5] &= ~(1 << (i_id & 0x1F)); } /* 80034F1C-80034F44 02F85C 0028+00 1/1 0/0 0/0 .text is__15dSv_zoneActor_cCFi */ BOOL dSv_zoneActor_c::is(int i_id) const { + JUT_ASSERT(3884, 0 <= i_id && i_id < ACTOR_MAX); return mActorFlags[i_id >> 5] & 1 << (i_id & 0x1F) ? TRUE : FALSE; } @@ -1442,6 +1620,11 @@ void dSv_info_c::init() { initDan(-1); initZone(); mTmp.init(); + +#if VERSION == VERSION_SHIELD_DEBUG + unk_0x0 = 0; + unk_0x1 = 0; +#endif } /* 8003501C-800350A8 02F95C 008C+00 2/2 0/0 0/0 .text init__10dSv_save_cFv */ @@ -1461,16 +1644,19 @@ void dSv_save_c::init() { /* 800350A8-800350BC 02F9E8 0014+00 0/0 6/6 1/1 .text getSave2__10dSv_save_cFi */ dSv_memory2_c* dSv_save_c::getSave2(int i_stage2No) { + JUT_ASSERT(4117, 0 <= i_stage2No && i_stage2No < STAGE2_MAX); return &mSave2[i_stage2No]; } /* 800350BC-800350F0 02F9FC 0034+00 0/0 1/1 0/0 .text getSave__10dSv_info_cFi */ void dSv_info_c::getSave(int i_stageNo) { + JUT_ASSERT(4133, 0 <= i_stageNo && i_stageNo < dSv_save_c::STAGE_MAX); mMemory = mSavedata.getSave(i_stageNo); } /* 800350F0-8003514C 02FA30 005C+00 0/0 2/2 0/0 .text putSave__10dSv_info_cFi */ void dSv_info_c::putSave(int i_stageNo) { + JUT_ASSERT(4149, 0 <= i_stageNo && i_stageNo < dSv_save_c::STAGE_MAX); mSavedata.putSave(i_stageNo, mMemory); } @@ -1495,6 +1681,8 @@ u32 dSv_info_c::createZone(int i_roomNo) { /* 80035200-800352B0 02FB40 00B0+00 0/0 8/8 352/352 .text onSwitch__10dSv_info_cFii */ void dSv_info_c::onSwitch(int i_no, int i_roomNo) { + JUT_ASSERT(4210, (0 <= i_no && i_no < (MEMORY_SWITCH+ DAN_SWITCH+ ZONE_SWITCH+ ONEZONE_SWITCH)) || i_no == -1 || i_no == 255); + if (i_no == -1 || i_no == 255) { return; } @@ -1504,7 +1692,10 @@ void dSv_info_c::onSwitch(int i_no, int i_roomNo) { } else if (i_no < (MEMORY_SWITCH + DAN_SWITCH)) { mDan.onSwitch(i_no - MEMORY_SWITCH); } else { + JUT_ASSERT(4226, 0 <= i_roomNo && i_roomNo < 64); int zoneId = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4228, 0 <= zoneId && zoneId < ZONE_MAX); + if (i_no < (MEMORY_SWITCH + DAN_SWITCH + ZONE_SWITCH)) { mZone[zoneId].getBit().onSwitch(i_no - (MEMORY_SWITCH + DAN_SWITCH)); } else { @@ -1515,6 +1706,8 @@ void dSv_info_c::onSwitch(int i_no, int i_roomNo) { /* 800352B0-80035360 02FBF0 00B0+00 0/0 2/2 93/93 .text offSwitch__10dSv_info_cFii */ void dSv_info_c::offSwitch(int i_no, int i_roomNo) { + JUT_ASSERT(4256, (0 <= i_no && i_no < (MEMORY_SWITCH+ DAN_SWITCH+ ZONE_SWITCH+ ONEZONE_SWITCH)) || i_no == -1 || i_no == 255); + if (i_no == -1 || i_no == 255) { return; } @@ -1524,17 +1717,25 @@ void dSv_info_c::offSwitch(int i_no, int i_roomNo) { } else if (i_no < (MEMORY_SWITCH + DAN_SWITCH)) { mDan.offSwitch(i_no - MEMORY_SWITCH); } else { - int zoneId = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4269, 0 <= i_roomNo && i_roomNo < 64); + int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4271, 0 <= zoneNo && zoneNo < ZONE_MAX); + if (i_no < (MEMORY_SWITCH + DAN_SWITCH + ZONE_SWITCH)) { - mZone[zoneId].getBit().offSwitch(i_no - (MEMORY_SWITCH + DAN_SWITCH)); + mZone[zoneNo].getBit().offSwitch(i_no - (MEMORY_SWITCH + DAN_SWITCH)); } else { - mZone[zoneId].getBit().offOneSwitch(i_no - (MEMORY_SWITCH + DAN_SWITCH + ZONE_SWITCH)); + mZone[zoneNo].getBit().offOneSwitch(i_no - (MEMORY_SWITCH + DAN_SWITCH + ZONE_SWITCH)); } } } /* 80035360-8003542C 02FCA0 00CC+00 0/0 27/27 734/734 .text isSwitch__10dSv_info_cCFii */ BOOL dSv_info_c::isSwitch(int i_no, int i_roomNo) const { + if (!((0 <= i_no && i_no < (MEMORY_SWITCH+ DAN_SWITCH+ ZONE_SWITCH+ ONEZONE_SWITCH)) || i_no == -1 || i_no == 255)) { + OS_REPORT("i_no = %d\n", i_no); + JUT_ASSERT(4302, 0); + } + if (i_no == -1 || i_no == 255) { return FALSE; } @@ -1544,7 +1745,9 @@ BOOL dSv_info_c::isSwitch(int i_no, int i_roomNo) const { } else if (i_no < (MEMORY_SWITCH + DAN_SWITCH)) { return mDan.isSwitch(i_no - MEMORY_SWITCH); } else { + JUT_ASSERT(4269, 0 <= i_roomNo && i_roomNo < 64); int zoneId = dComIfGp_roomControl_getZoneNo(i_roomNo); + if (zoneId < 0 || zoneId >= ZONE_MAX) { return FALSE; } else { @@ -1560,6 +1763,8 @@ BOOL dSv_info_c::isSwitch(int i_no, int i_roomNo) const { /* 8003542C-800354E0 02FD6C 00B4+00 0/0 0/0 2/2 .text revSwitch__10dSv_info_cFii */ BOOL dSv_info_c::revSwitch(int i_no, int i_roomNo) { + JUT_ASSERT(4356, (0 <= i_no && i_no < (MEMORY_SWITCH+ DAN_SWITCH+ ZONE_SWITCH+ ONEZONE_SWITCH)) || i_no == -1 || i_no == 255); + if (i_no == -1 || i_no == 255) { return FALSE; } @@ -1569,7 +1774,10 @@ BOOL dSv_info_c::revSwitch(int i_no, int i_roomNo) { } else if (i_no < (MEMORY_SWITCH + DAN_SWITCH)) { return mDan.revSwitch(i_no - MEMORY_SWITCH); } else { + JUT_ASSERT(4368, 0 <= i_roomNo && i_roomNo < 64); int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4370, 0 <= zoneNo && zoneNo < ZONE_MAX); + if (i_no < (MEMORY_SWITCH + DAN_SWITCH + ZONE_SWITCH)) { return mZone[zoneNo].getBit().revSwitch(i_no - (MEMORY_SWITCH + DAN_SWITCH)); } else { @@ -1581,6 +1789,8 @@ BOOL dSv_info_c::revSwitch(int i_no, int i_roomNo) { /* 800354E0-80035590 02FE20 00B0+00 0/0 1/1 3/3 .text onItem__10dSv_info_cFii */ void dSv_info_c::onItem(int i_no, int i_roomNo) { + JUT_ASSERT(4398, (0 <= i_no && i_no < (MEMORY_ITEM+ DAN_ITEM+ ZONE_ITEM+ ONEZONE_ITEM)) || i_no == -1 || i_no == 255); + if (i_no == -1 || i_no == 255) { return; } @@ -1590,7 +1800,10 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) { } else if (i_no < (MEMORY_ITEM + DAN_ITEM)) { mMemory.getBit().onItem(i_no - MEMORY_ITEM); } else { + JUT_ASSERT(4414, 0 <= i_roomNo && i_roomNo < 64); int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4416, 0 <= zoneNo && zoneNo < ZONE_MAX); + if (i_no < (MEMORY_ITEM + DAN_ITEM + ZONE_ITEM)) { mZone[zoneNo].getBit().onItem(i_no - (MEMORY_ITEM + DAN_ITEM)); } else { @@ -1601,6 +1814,8 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) { /* 80035590-80035644 02FED0 00B4+00 0/0 1/1 3/3 .text isItem__10dSv_info_cCFii */ BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const { + JUT_ASSERT(4488, (0 <= i_no && i_no < (MEMORY_ITEM+ DAN_ITEM+ ZONE_ITEM+ ONEZONE_ITEM)) || i_no == -1 || i_no == 255); + if (i_no == -1 || i_no == 255) { return FALSE; } @@ -1610,7 +1825,10 @@ BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const { } else if (i_no < (MEMORY_ITEM + DAN_ITEM)) { return mMemory.getBit().isItem(i_no - MEMORY_ITEM); } else { + JUT_ASSERT(4501, 0 <= i_roomNo && i_roomNo < 64); int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4503, 0 <= zoneNo && zoneNo < ZONE_MAX); + if (i_no < (MEMORY_ITEM + DAN_ITEM + ZONE_ITEM)) { return mZone[zoneNo].getBit().isItem(i_no - (MEMORY_ITEM + DAN_ITEM)); } else { @@ -1621,31 +1839,42 @@ BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const { /* 80035644-800356B4 02FF84 0070+00 0/0 1/1 4/4 .text onActor__10dSv_info_cFii */ void dSv_info_c::onActor(int i_id, int i_roomNo) { - if (i_id == -1 || i_id == dSv_zoneActor_c::ACTOR_MAX || i_roomNo == -1) { + if (i_id == -1 || i_id == 0xFFFF || i_roomNo == -1) { return; } + JUT_ASSERT(4573, (0 <= i_id && i_id < dSv_zoneActor_c::ACTOR_MAX) && (0 <= i_roomNo && i_roomNo < 64)); int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4575, 0 <= zoneNo && zoneNo < ZONE_MAX); mZone[zoneNo].getActor().on(i_id); } /* 800356B4-80035724 02FFF4 0070+00 0/0 0/0 2/2 .text offActor__10dSv_info_cFii */ void dSv_info_c::offActor(int i_id, int i_roomNo) { - if (i_id == -1 || i_id == dSv_zoneActor_c::ACTOR_MAX || i_roomNo == -1) { + if (i_id == -1 || i_id == 0xFFFF || i_roomNo == -1) { return; } + JUT_ASSERT(4598, (0 <= i_id && i_id < dSv_zoneActor_c::ACTOR_MAX) && (0 <= i_roomNo && i_roomNo < 64)); int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4600, 0 <= zoneNo && zoneNo < ZONE_MAX); mZone[zoneNo].getActor().off(i_id); } /* 80035724-80035798 030064 0074+00 0/0 3/3 0/0 .text isActor__10dSv_info_cCFii */ BOOL dSv_info_c::isActor(int i_id, int i_roomNo) const { - if (i_id == -1 || i_id == dSv_zoneActor_c::ACTOR_MAX || i_roomNo == -1) { + if (i_id == -1 || i_id == 0xFFFF || i_roomNo == -1) { return FALSE; } + if (!(0 <= i_id && i_id < dSv_zoneActor_c::ACTOR_MAX)) { + OS_REPORT("#######isActor=%d\n", i_id); + JUT_ASSERT(4624, 0 <= i_id && i_id < dSv_zoneActor_c::ACTOR_MAX); + } + + JUT_ASSERT(4626, 0 <= i_roomNo && i_roomNo < 64); int zoneNo = dComIfGp_roomControl_getZoneNo(i_roomNo); + JUT_ASSERT(4628, 0 <= zoneNo && zoneNo < ZONE_MAX); return mZone[zoneNo].getActor().is(i_id); } @@ -1663,14 +1892,14 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) { u16 current_lantern_oil = 0; // If haven't gotten then lantern back from the monkey - if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) { + if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[226])) { // Store whether or not it's stolen and dropped - lantern_dropped = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224]); - lantern_stolen = dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225]); + lantern_dropped = dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[224]); + lantern_stolen = dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[225]); // Then turn those events off - dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[224]); - dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[225]); + dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[224]); + dComIfGs_offEventBit((u16)dSv_event_flag_c::saveBitLabels[225]); // Used to turn events back on later lantern_not_recovered = true; @@ -1690,6 +1919,8 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) { } card_ptr += dataNum * QUEST_LOG_SIZE; + char* var_r29 = card_ptr; + dSv_save_c* savedata = dComIfGs_getSaveData(); start = dComIfGs_getSaveStartTime(); @@ -1705,15 +1936,23 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) { savedata->getPlayer().getPlayerStatusB().setDateIpl(OSGetTime()); memcpy(card_ptr, savedata, sizeof(dSv_save_c)); - printf("Write size:%d\n", sizeof(dSv_save_c)); + card_ptr += 0x958; + OS_REPORT("(dSv_player_c) size %d\n", sizeof(dSv_player_c)); + OS_REPORT("(dSv_memory_c) size %d(%d)\n", sizeof(dSv_memory_c)); + OS_REPORT("(dSv_memory2_c) size %d(%d)\n", sizeof(dSv_memory2_c)); + OS_REPORT("(dSv_event_c) size %d\n", sizeof(dSv_event_c)); + OS_REPORT("(dSv_reserve_c) size %d\n", sizeof(dSv_reserve_c)); + OS_REPORT("(dSv_MiniGame_c) size %d\n", sizeof(dSv_MiniGame_c)); + OS_REPORT("セーブ全体情報(dSv_save_c) size %d\n", sizeof(dSv_save_c)); + printf("Write size:%d\n", card_ptr - var_r29); // Now that we've saved, reset events if needed if (lantern_not_recovered == true) { if (lantern_dropped) { - dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[224]); + dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[224]); } if (lantern_stolen) { - dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[225]); + dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[225]); } } @@ -1722,16 +1961,25 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) { dComIfGs_setItem(SLOT_1, fpcNm_ITEM_NONE); dComIfGs_setOil(current_lantern_oil); } + + if (card_ptr - var_r29 > (QUEST_LOG_SIZE - 8)) { + printf("SAVE size over(%d/%d)\n", (QUEST_LOG_SIZE - 8), card_ptr - var_r29); + return -1; + } - printf("SAVE size:%d\n", sizeof(dSv_save_c)); + printf("SAVE size:%d\n", card_ptr - var_r29); return 0; } /* 80035A04-80035BD0 030344 01CC+00 0/0 2/2 0/0 .text card_to_memory__10dSv_info_cFPci */ int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) { i_cardPtr = i_cardPtr + i_dataNum * QUEST_LOG_SIZE; + char* var_r30 = i_cardPtr; + memcpy(dComIfGs_getSaveData(), i_cardPtr, sizeof(dSv_save_c)); + i_cardPtr += sizeof(dSv_save_c); +#if VERSION != VERSION_SHIELD_DEBUG if (OSGetSoundMode() == OS_SOUND_MODE_MONO) { g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(OS_SOUND_MODE_MONO); Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_MONO); @@ -1741,6 +1989,7 @@ int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) { g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(OS_SOUND_MODE_STEREO); Z2AudioMgr::mAudioMgrPtr->setOutputMode(OS_SOUND_MODE_STEREO); } +#endif dSv_save_c* savedata = dComIfGs_getSaveData(); if (savedata->getPlayer().getPlayerStatusA().getLife() < 12) { @@ -1759,14 +2008,16 @@ int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) { } dComIfGs_setLineUpItem(); + dComIfGp_setNowVibration(savedata->getPlayer().getConfig().getVibration()); + dMeter2Info_setSaveStageName(g_dComIfG_gameInfo.info.getPlayer().getPlayerReturnPlace().getName()); - u8 save_vibration = savedata->getPlayer().getConfig().getVibration(); - dComIfGp_setNowVibration(save_vibration); - - char* save_stage = g_dComIfG_gameInfo.info.getPlayer().getPlayerReturnPlace().getName(); - dMeter2Info_setSaveStageName(save_stage); + OS_REPORT("########### save stage ====> %s\n", dMeter2Info_getSaveStageName()); + if (i_cardPtr - var_r30 > (QUEST_LOG_SIZE - 8)) { + printf("LOAD size over(%d/%d)\n", (QUEST_LOG_SIZE - 8), i_cardPtr - var_r30); + return -1; + } - printf("LOAD size:%d\n", sizeof(dSv_save_c)); + printf("LOAD size:%d\n", i_cardPtr - var_r30); return 0; } @@ -1774,17 +2025,258 @@ int dSv_info_c::card_to_memory(char* i_cardPtr, int i_dataNum) { */ int dSv_info_c::initdata_to_card(char* i_cardPtr, int i_dataNum) { i_cardPtr = i_cardPtr + (i_dataNum * QUEST_LOG_SIZE); - dSv_save_c save; + char* var_r30 = i_cardPtr; + dSv_save_c save; save.init(); save.getPlayer().getPlayerInfo().setPlayerName(""); save.getPlayer().getPlayerInfo().setHorseName(""); memcpy(i_cardPtr, &save, sizeof(dSv_save_c)); - printf("INIT size:%d\n", sizeof(dSv_save_c)); + i_cardPtr += sizeof(dSv_save_c); + + if (i_cardPtr - var_r30 > (QUEST_LOG_SIZE - 8)) { + printf("INIT size over %d/%d\n", (QUEST_LOG_SIZE - 8), i_cardPtr - var_r30); + return -1; + } + + printf("INIT size:%d\n", i_cardPtr - var_r30); return 0; } -/* ############################################################################################## */ +#ifdef DEBUG +flagFile_c::flagFile_c() { + m_no = mDoHIO_CREATE_CHILD("フラグファイル", this); + m_flags = FLAG_ALL_e; +} + +flagFile_c::~flagFile_c() { + mDoHIO_DELETE_CHILD(m_no); +} + +void flagFile_c::genMessage(JORMContext* mctx) { + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("- フラグデータのデバッグ用一時セーブ", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genButton(" 読込 ", 101, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + + if (fopScnM_SearchByID(dStage_roomControl_c::getProcID()) != NULL) { + mctx->genLabel("- セーブ要素", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genCheckBox(" ステージ名", &m_flags, FLAG_SCENE_e, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genCheckBox(" セーブ領域", &m_flags, FLAG_SAVE_e, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genCheckBox(" セーブ作業領域", &m_flags, FLAG_MEM_e, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genCheckBox(" ダンジョンセーブ", &m_flags, FLAG_DAN_e, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genButton(" 書出 ", 102, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + mctx->genLabel("-", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); + } +} + +void flagFile_c::listenPropertyEvent(const JORPropertyEvent* i_event) { + JORReflexible::listenPropertyEvent(i_event); + + const char ext_mask[] = "フラグファイル(*.zff)\0*.zff\0その他のファイル(*.*)\0*.*\0"; + char buffer[sizeof(dSv_save_c)]; + u32 head[2]; + + switch ((u32)i_event->id) { + case 101: { + JORFile file; + if (file.open(1, ext_mask, NULL, NULL, NULL)) { + OS_REPORT("read from %s\n", file.getFilename()); + char* scene_name = (char*)dComIfGs_getSaveInfo() + 1; + *scene_name = 0; + + BOOL read_end = FALSE; + while (!read_end) { + file.readData(head, sizeof(head)); + switch (head[0]) { + case '_SCN': { + file.readData(scene_name, head[1]); + OS_REPORT("scene name [%s]\n", scene_name); + + const char* start_stage_name = dComIfGp_getStartStageName(); + if (fopScnM_SearchByID(dStage_roomControl_c::getProcID()) != NULL && + strcmp(start_stage_name, scene_name) != 0) + { + OS_REPORT("error: bad scene: %s now!!\n", start_stage_name); + read_end = TRUE; + } + break; + } + case '+SAV': { + OS_REPORT("save data...\n"); + file.readData(&buffer, head[1]); + dSv_save_c* save = (dSv_save_c*)buffer; + dComIfGs_getSaveInfo()->setSavedata(*save); + break; + } + case '+MEM': { + OS_REPORT("temporary data...\n"); + file.readData(&buffer, head[1]); + dSv_memory_c* mem = (dSv_memory_c*)buffer; + dComIfGs_getSaveInfo()->setMemory(*mem); + break; + } + case '+DAN': { + OS_REPORT("dungeon save data...\n"); + file.readData(&buffer, head[1]); + dSv_danBit_c* dan = (dSv_danBit_c*)buffer; + dComIfGs_getSaveInfo()->setDan(*dan); + break; + } + default: + OS_REPORT("error: illegal flag data\n"); + case 'END_': + read_end = TRUE; + } + } + + file.close(); + dComIfGs_getSaveInfo()->unk_0x0 = 1; + } + break; + } + case 102: { + OSCalendarTime time; + OSTicksToCalendarTime(OSGetTime(), &time); + + const char* start_stage_name = dComIfGp_getStartStageName(); + char filename[64]; + sprintf(filename, "_%02d%02d%02d%02d%02d-%s.zff", time.mon + 1, time.mday, time.hour, time.min, time.sec, start_stage_name); + OS_REPORT("write to %s\n", filename); + + JORFile file; + if (file.open(filename, 2, "", NULL, NULL, NULL)) { + if (check_flag(FLAG_SCENE_e)) { + head[0] = '_SCN'; + head[1] = strlen(start_stage_name) + 1; + + file.writeData(head, sizeof(head)); + file.writeData(start_stage_name, head[1]); + } + + if (check_flag(FLAG_SAVE_e)) { + head[0] = '+SAV'; + head[1] = sizeof(dSv_save_c); + + file.writeData(head, sizeof(head)); + file.writeData(&dComIfGs_getSaveInfo()->getSavedata(), head[1]); + } + + if (check_flag(FLAG_MEM_e)) { + head[0] = '+MEM'; + head[1] = sizeof(dSv_memory_c); + + file.writeData(head, sizeof(head)); + file.writeData(&dComIfGs_getSaveInfo()->getMemory(), head[1]); + } + + if (check_flag(FLAG_DAN_e)) { + head[0] = '+DAN'; + head[1] = sizeof(dSv_danBit_c); + + file.writeData(head, sizeof(head)); + file.writeData(&dComIfGs_getSaveInfo()->getDan(), head[1]); + } + + head[0] = 'END_'; + head[1] = 0; + + file.writeData(head, sizeof(head)); + file.close(); + } + break; + } + } +} + +BOOL flagFile_c::check_flag(u16 i_flag) { + return (m_flags & i_flag) != 0; +} +#endif + +/* 803A7288-803A78F8 0043A8 066C+04 2/2 45/45 148/148 .data saveBitLabels__16dSv_event_flag_c */ +#if VERSION > VERSION_GCN_JPN +const +#endif +u16 dSv_event_flag_c::saveBitLabels[822] = { + UNUSED, TEST_001, TEST_002, TEST_003, TEST_004, F_0001, F_0002, F_0003, F_0004, F_0005, F_0006, + F_0007, F_0008, F_0009, F_0010, F_0011, F_0012, F_0013, F_0014, F_0015, F_0016, F_0017, F_0018, + F_0019, F_0020, D_0001, F_0021, F_0022, F_0023, F_0024, F_0025, F_0026, F_0027, F_0028, F_0029, + F_0030, F_0031, F_0032, F_0033, M_006, M_007, M_008, M_009, M_010, M_011, M_012, M_013, + M_014, M_015, M_016, M_017, M_018, M_019, M_020, M_021, M_022, M_023, M_024, M_025, + M_026, M_027, M_028, M_029, M_030, M_031, M_032, M_033, M_034, M_035, M_036, M_037, + M_038, M_039, M_040, M_041, M_042, M_043, M_044, M_045, M_046, M_047, M_048, M_049, + M_050, M_051, M_052, M_053, M_054, M_055, M_056, M_057, M_058, M_059, M_060, M_061, + M_062, M_063, M_064, M_065, M_066, M_067, M_068, M_069, M_070, M_071, M_072, M_073, + M_074, M_075, M_076, M_077, M_078, M_079, M_080, M_081, M_082, M_083, M_084, M_085, + M_086, M_087, M_088, M_089, M_090, M_091, M_092, M_093, M_094, M_095, M_096, F_0034, + F_0035, M_001, M_003, F_0036, F_0037, F_0038, F_0039, F_0040, F_0041, F_0042, F_0043, F_0044, + F_0045, F_0046, F_0047, F_0048, F_0049, F_0050, F_0051, F_0052, F_0053, F_0054, F_0055, F_0056, + F_0057, F_0058, F_0059, F_0060, F_0061, F_0062, F_0063, F_0064, F_0065, F_0066, F_0067, F_0068, + F_0069, F_0070, M_002, F_0071, F_0072, F_0073, F_0074, F_0075, F_0076, F_0077, F_0078, F_0079, + F_0080, F_0081, F_0082, F_0083, F_0084, F_0085, EREG_000, F_0086, F_0087, F_0088, F_0089, + F_0090, F_0091, F_0092, F_0093, F_0094, F_0095, F_0096, F_0097, TOTAL_PRICE_HIGH, TOTAL_PRICE_LOW, + TOTAL_PAYMENT_HIGH, TOTAL_PAYMENT_LOW, F_0202, F_0203, F_0204, F_0205, F_0206, F_0207, + F_0208, F_0209, F_0210, F_0211, F_0212, F_0213, F_0214, F_0215, F_0216, F_0217, F_0218, F_0219, + F_0220, F_0221, F_0222, F_0223, F_0224, F_0225, F_0226, F_0227, F_0228, F_0229, F_0230, F_0231, + F_0232, F_0233, F_234, F_0235, F_0236, F_0237, F_0238, T_0239, F_0240, F_0241, F_0242, F_0243, + F_0244, MAP_VISIBLE, F_0246, F_0247, F_0248, F_0249, F_0250, F_0251, F_0252, F_0253, F_0254, + F_0255, F_0256, F_0257, F_0258, F_0259, F_0260, F_0261, F_0262, F_0263, F_0264, F_0265, F_0266, + F_0267, F_0268, F_0269, F_0270, F_0271, F_0272, F_0273, F_0274, F_0275, F_0276, F_0277, F_0278, + F_0279, F_0280, F_0281, F_282, F_283, F_284, F_285, F_286, F_287, F_288, F_289, F_290, + M_097, F_0292, F_0293, F_0294, F_0295, F_0296, F_0297, F_0298, F_0299, F_0300, F_0301, F_0302, + F_0303, F_0304, F_0305, F_0306, F_0307, F_0308, F_0309, F_0310, F_0311, F_0312, F_0313, F_0314, + F_0315, F_0316, F_0317, F_0318, F_0319, F_0320, F_0321, F_0322, F_0323, F_0324, F_0325, F_0326, + F_0327, F_0328, F_0329, F_0330, F_0331, F_0332, F_0333, F_0334, F_0335, F_0336, F_0337, F_0338, + F_0339, F_0340, F_0341, F_0342, F_0343, F_0344, F_0345, F_0346, F_0347, F_0348, F_0349, F_0350, + F_0351, F_0352, F_0353, F_0354, F_0355, F_0356, F_0357, F_0358, F_0359, F_0360, F_0361, F_0362, + F_0363, F_0364, F_0365, F_0366, F_0367, F_0368, F_0369, F_0370, F_0371, F_0372, F_0373, F_0374, + F_0375, F_0376, F_0377, F_0378, F_0379, F_0380, F_0381, F_0382, F_0383, F_0384, F_0385, F_0386, + F_0387, F_0388, F_0389, F_0390, F_0391, F_0392, F_0393, F_0394, F_0395, F_0396, F_0397, F_0398, + F_0399, F_0400, F_0401, F_0402, F_0403, F_0404, F_0405, F_0406, F_0407, F_0408, F_0409, F_0410, + F_0411, F_0412, F_0413, F_0414, F_0415, F_0416, F_0417, F_0418, F_0419, F_0420, F_0421, F_0422, + F_0423, F_0424, F_0425, F_0426, F_0427, F_0428, F_0429, F_0430, F_0431, F_0432, F_0433, F_0434, + F_0435, F_0436, F_0437, F_0438, F_0439, F_0440, F_0441, F_0442, F_0443, F_0444, F_0445, F_0446, + F_0447, F_0448, F_0449, F_0450, FUND_RAISING_LOW, FUND_RAISING_HIGH, F_0453, F_0454, + F_0455, F_0456, F_0457, F_0458, F_0459, F_0460, F_0461, F_0462, F_0463, F_0464, F_0465, F_0466, + F_0467, F_0468, F_0469, F_0470, F_0471, F_0472, F_0473, F_0474, F_0475, F_0476, F_0477, F_0478, + F_0479, F_0480, F_0481, F_0482, F_0483, F_0484, F_0485, F_0486, F_0487, F_0488, F_0489, F_0490, + F_0491, F_0492, F_0493, F_0494, F_0495, F_0496, F_0497, F_0498, F_0499, F_0500, F_0501, F_0502, + F_0503, F_0504, F_0505, F_0506, F_0507, F_0508, F_0509, F_0510, FUND_RAISING_LOW2, FUND_RAISING_HIGH2, + F_0513, F_0514, F_0515, F_0516, F_0517, F_0518, F_0519, F_0520, F_0521, F_0522, F_0523, F_0524, + F_0525, F_0526, F_0527, F_0528, F_0529, F_0530, F_0531, F_0532, F_0533, F_0534, F_0535, F_0536, + F_0537, F_0538, F_0539, F_0540, F_0541, F_0542, F_0543, F_0544, F_0545, F_0546, F_0547, F_0548, + F_0549, F_0550, F_0551, F_0552, F_0553, F_0554, F_0555, F_0556, F_0557, F_0558, F_0559, F_0560, + F_0561, F_0562, F_0563, F_0564, F_0565, F_0566, F_0567, F_0568, F_0569, F_0570, F_0571, F_0572, + F_0573, F_0574, F_0575, F_0576, F_0577, F_0578, F_0579, F_0580, F_0581, F_0582, F_0583, F_0584, + F_0585, F_0586, F_0587, F_0588, F_0589, F_0590, F_0591, F_0592, F_0593, F_0594, F_0595, F_0596, + F_0597, F_0598, F_0599, F_0600, F_0601, UNUSED, F_0700, F_0701, F_0702, F_0606, F_0607, F_0608, + F_0609, F_0610, F_0611, F_0612, F_0613, F_0614, F_0615, F_0616, F_0617, F_0618, F_0619, F_0620, + F_0621, F_0622, F_0623, F_0624, F_0625, F_0626, F_0627, F_0628, F_0629, F_0630, F_0631, F_0632, + F_0633, F_0634, F_0635, F_0636, F_0637, F_0638, F_0639, F_0640, F_0641, F_0642, F_0643, F_0644, + F_0645, F_0646, F_0647, F_0648, F_0649, F_0650, F_0651, F_0652, F_0653, F_0654, F_0655, F_0656, + F_0657, F_0658, F_0659, F_0660, F_0661, F_0662, F_0663, F_0664, F_0665, F_0666, F_0667, F_0668, + F_0669, F_0670, F_0671, F_0672, F_0673, F_0674, F_0675, F_0676, F_0677, F_0678, F_0679, F_0680, + F_0681, F_0682, F_0683, F_0684, F_0685, F_0686, F_0687, F_0688, F_0689, F_0690, F_0691, F_0692, + F_0693, F_0694, F_0695, F_0696, F_0697, F_0698, F_0699, F_0700B, F_0701B, F_0702B, + F_0703, F_0704, F_0705, F_0706, F_0707, F_0708, F_0709, KORO2_LEVEL, LM_RECORD_0, RI_RECORD_0, + NP_RECORD_0, CF_RECORD_0, F_0715, F_0716, F_0717, F_0718, F_0719, F_0720, F_0721, F_0722, + F_0723, F_0724, F_0725, F_0726, F_0727, F_0728, F_0729, F_0730, SP_LURE__USE_COUNT, F_0732, + F_0733, F_0734, F_0735, F_0736, F_0737, F_0738, F_0739, F_0740, F_0741, F_0742, F_0743, F_0744, + F_0745, F_0746, F_0747, F_0748, F_0749, F_0750, F_0751, F_0752, F_0753, F_0754, F_0755, F_0756, + F_0757, F_0758, F_0759, KAKERA_GET_INFO_00, KAKERA_GET_INFO_01, KAKERA_GET_INFO_02, + KAKERA_GET_INFO_03, KAKERA_GET_INFO_04, KAKERA_GET_INFO_05, B_BTN_GUIDE, J_BTN_GUIDE, + F_0768, F_0769, F_0770, F_0771, F_0772, F_0773, F_0774, F_0775, F_0776, F_0777, F_0778, F_0779, + F_0780, F_0781, F_0782, F_0783, F_0784, F_0785, F_0786, F_0787, F_0788, F_0789, F_0790, F_0791, + F_0792, F_0793, F_0794, F_0795, F_0796, F_0797, F_0798, F_0799, F_0800, F_0801, F_0802, F_0803, + F_0804, F_0805, F_0806, F_0807, F_0808, F_0809, F_0810, F_0811, F_0812, F_0813, F_0814, F_0815, + F_0816, F_0817, F_0818, F_0819, F_0820, KORO2_ALLCLEAR, +}; + /* 803790C0-80379234 005720 0172+02 0/0 17/17 7/7 .rodata tempBitLabels__20dSv_event_tmp_flag_c */ u16 const dSv_event_tmp_flag_c::tempBitLabels[185] = { UNUSED, UNUSED, T_0002, T_0003, T_0004, T_0005, T_0006, T_0007, T_0001, T_0008, T_0009, T_0010, |
