add d_meter2_info methods, addBottleNum OK, getBombNum OK, isLetterReadFlag OK

This commit is contained in:
unknown 2020-12-06 20:46:16 -05:00
parent 86f892c3d3
commit cbd06e5668
No known key found for this signature in database
GPG Key ID: 4312662758CE7D5A
7 changed files with 384 additions and 335 deletions

View File

@ -0,0 +1,12 @@
#ifndef __CONTROL_H_
#define __CONTROL_H_
#include "dolphin/types.h"
// this may actually go somewhere else, but defining it here for now
class JMSMesgEntry_c {
};
#endif

View File

@ -1,5 +1,5 @@
#ifndef D_COM_INF_GAME_H_
#define D_COM_INF_GAME_H_
#ifndef __D_COM_INF_GAME_H_
#define __D_COM_INF_GAME_H_
#include "d/d_drawlist/d_drawlist.h"
#include "d/d_event/d_event/d_event.h"

View File

@ -7,6 +7,47 @@ struct dMeter2Info_c_vtable {
};
class dMeter2Info_c {
public:
dMeter2Info_c::dMeter2Info_c();
dMeter2Info_c::~dMeter2Info_c();
void init(void);
void setFloatingMessage(u16, s16, bool);
void setFloatingFlow(u16, s16, bool);
int isFloatingMessageVisible(void);
int decFloatingMessageTimer(void);
void resetFloatingMessage(void);
void decMsgKeyWaitTimer(void);
void getString(u32, char*, JMSMesgEntry_c*); // define JMSMesgEntry
void getStringKana(u32, char*, JMSMesgEntry_c*);
void getStringKanji(u32, char*, JMSMesgEntry_c*);
double getStringLength(J2DTextBox*, char*); // define J2DTextBox
dMeter2Info_c* getStringLength(JUTFont*, float, float, char*);
void onDirectUseItem(int);
int isDirectUseItem(int);
int setMeterString(s32);
void resetWarpStatus(void);
void warpInProc(void);
void warpOutProc(void);
void resetMeterString(void);
void setWarpInfo(const char*, const cXyz&, s16, u8, u8, u8);
u8 getItemType(u8);
u8 readItemTexture(u8, void*, J2DPicture*, void*, J2DPicture*, void*, J2DPicture*, void*, J2DPicture*, int); // define J2DPicture
void setItemColor(u8, J2DPicture*, J2DPicture*, J2DPicture*, J2DPicture*);
u8 get2ndTexture(u8);
u8 get3rdTexture(u8);
u8 get4thTexture(u8);
void set1stColor(u8, J2DPicture*);
void set2ndColor(u8, J2DPicture*);
void set3rdColor(u8, J2DPicture*);
void set4thColor(u8, J2DPicture*);
void setHotSpringTimer(u8);
void decHotSpringtimer(void);
void changeWater(u8);
void setMiniGameItem(u8);
void resetMiniGameItem(bool);
void setMiniGameCount(s8);
void setSaveStageName(const char*);
private:
dMeter2Info_c_vtable* vtable;
u8 unk4[4];

View File

@ -2,22 +2,50 @@
#define D_SAVE_H_
#include "dolphin/types.h"
#include "global.h"
#define DEFAULT_SELECT_ITEM_INDEX 0
#define MAX_SELECT_ITEM 3
#define MAX_EVENTS 256
static const int MAX_ITEM_SLOTS = 24;
static const int ITEM_XY_MAX_DUMMY = 8;
static const int LIGHT_DROP_STAGE = 4;
static const int LETTER_INFO_BIT = 64;
enum Wallets {
WALLET,
BIG_WALLET,
GIANT_WALLET
};
enum ItemSlots {
SLOT_0,
SLOT_1,
SLOT_2,
SLOT_3,
SLOT_4,
SLOT_5,
SLOT_6,
SLOT_7,
SLOT_8,
SLOT_9,
SLOT_10,
SLOT_11,
SLOT_12,
SLOT_13,
SLOT_14,
SLOT_15,
SLOT_16,
SLOT_17,
SLOT_18,
SLOT_19,
SLOT_20,
SLOT_21,
SLOT_22,
SLOT_23
};
enum ItemTable {
AIR_LETTER = 234,
ANCIENT_DOCUMENT = 233,
@ -391,7 +419,7 @@ class dSv_horse_place_c {
private:
cXyz position;
u16 angle;
u8 current_stage[8];
char current_stage[8];
u8 spawn_id;
u8 room_id;
};
@ -402,7 +430,7 @@ class dSv_player_return_place_c {
void set(const char*, s8, u8);
private:
u8 current_stage[8];
char current_stage[8];
u8 spawn_id;
u8 room_id;
u8 unk10;
@ -419,7 +447,7 @@ class dSv_player_field_last_stay_info_c {
private:
cXyz last_position;
u16 last_angle;
u8 last_stage[8];
char last_stage[8];
u8 last_spawn_id;
u8 last_room_id;
u8 unk24;
@ -435,7 +463,7 @@ class dSv_player_last_mark_info_c {
private:
cXyz ooccoo_position;
u16 ooccoo_angle;
u8 ooccoo_stage[8];
char ooccoo_stage[8];
u8 ooccoo_spawn_id;
u8 ooccoo_room_id;
char unk24;
@ -469,7 +497,7 @@ class dSv_player_item_c {
void setRodTypeLevelUp(void);
void setBaitItem(u8);
static const int BOMB_BAG_MAX = 4;
static const int BOMB_BAG_MAX = 3;
static const int BOTTLE_MAX = 4;
private:
@ -482,7 +510,7 @@ class dSv_player_get_item_c {
void init(void);
void onFirstBit(u8);
void offFirstBit(u8);
bool isFirstBit(u8) const;
int isFirstBit(u8) const;
private:
u32 pause_menu_bit_fields[4];
@ -571,10 +599,11 @@ class dSv_letter_info_c {
void onLetterGetFlag(int);
bool isLetterGetFlag(int) const;
void onLetterReadFlag(int);
bool isLetterReadFlag(int) const;
int isLetterReadFlag(int) const;
private:
u32 letter_read_flags[4];
u32 letter_get_bitfields[2];
u32 letter_read_bitfields[2];
u8 unk16[64];
};
@ -850,6 +879,8 @@ class dSv_save_c {
dSv_memory2_c* getSave2(int);
dSv_player_c& getPlayer() { return player; }
dSv_player_status_a_c& getPlayerStatusA() { return player.getPlayerStatusA(); }
dSv_player_get_item_c& getPlayerGetItem() { return player.getPlayerGetItem(); }
dSv_player_item_c& getPlayerItem() { return player.getPlayerItem(); }
dSv_event_c& getEventFlags() { return event_flags; }
void setPlayerStatusAWallet(u8 lv) { player.setPlayerStatusAWalletLV(lv); }

View File

@ -18,7 +18,6 @@ extern "C" {
void dComIfGs_setMixItemIndex(void);
void dComIfGs_setSelectItemIndex(void);
void dComIfGs_getMixItemIndex(void);
void dComIfGs_getBottleMax(void);
char* strcpy(char*,const char*);
int strcmp(char*,char*);
void setBombNum__21dSv_player_item_max_cFUcUc(void);
@ -252,6 +251,7 @@ extern "C" {
void ARQInit(void);
void DCStoreRangeNoSync(void);
void __RAS_OSDisableInterrupts_begin(void);
u8 dComIfGs_getBottleMax(void);
}
// DVD

View File

@ -1,13 +1,17 @@
#include "d/d_save/d_save/d_save.h"
#include "d/d_com/d_com_inf_game/d_com_inf_game.h"
#include "global.h"
u8 dSv_item_rename(u8 item_id) {
switch (item_id) {
case OIL_BOTTLE_2: return OIL_BOTTLE;
case RED_BOTTLE_2: return RED_BOTTLE;
case OIL2: return OIL;
default: return item_id;
case OIL_BOTTLE_2:
return OIL_BOTTLE;
case RED_BOTTLE_2:
return RED_BOTTLE;
case OIL2:
return OIL;
default:
return item_id;
}
}
@ -75,9 +79,12 @@ u8 dSv_player_status_a_c::getMixItemIndex(signed int i_no) const {
u16 dSv_player_status_a_c::getRupeeMax(void) const {
if (current_wallet < 3) { // if you make this a default, it wont match. Compiler, pls.
switch (current_wallet) {
case WALLET: return 300;
case BIG_WALLET: return 600;
case GIANT_WALLET: return 1000;
case WALLET:
return 300;
case BIG_WALLET:
return 600;
case GIANT_WALLET:
return 1000;
}
}
return 0;
@ -91,7 +98,6 @@ int dSv_player_status_a_c::isMagicFlag(u8 i_magic) const {
}
void dSv_player_status_b_c::init() {
this->unk4 = 0;
this->unk0 = 0;
this->transform_level_flag = 0;
@ -136,7 +142,7 @@ void dSv_horse_place_c::init(void) {
}
void dSv_horse_place_c::set(const char* i_name, const cXyz& i_position, short i_angle, signed char i_room_id) {
strcpy((char*)current_stage, i_name);
strcpy(current_stage, i_name);
this->position.x = i_position.x;
this->position.y = i_position.y;
this->position.z = i_position.z;
@ -145,7 +151,7 @@ void dSv_horse_place_c::set(const char* i_name, const cXyz& i_position, short i_
}
void dSv_player_return_place_c::init(void) {
strcpy((char*)current_stage,(char*)lbl_80379234+1);
strcpy(current_stage, (char*)lbl_80379234 + 1);
this->room_id = 1;
this->spawn_id = 0;
this->unk10 = 21;
@ -153,7 +159,7 @@ void dSv_player_return_place_c::init(void) {
}
void dSv_player_return_place_c::set(const char* i_name, s8 i_room_id, u8 i_spawn_id) {
strcpy((char*)current_stage, i_name);
strcpy(current_stage, i_name);
this->room_id = i_room_id;
this->spawn_id = i_spawn_id;
}
@ -161,7 +167,7 @@ void dSv_player_return_place_c::set(const char* i_name, s8 i_room_id, u8 i_spawn
void dSv_player_field_last_stay_info_c::init() {
float position_val;
strcpy((char*)last_stage, (char*)lbl_80379234);
strcpy(last_stage, (char*)lbl_80379234);
position_val = lbl_80451D5C;
this->last_position.x = lbl_80451D5C;
@ -179,11 +185,9 @@ void dSv_player_field_last_stay_info_c::init() {
}
void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_last_position, short i_last_angle, signed char i_last_spawn_id, u8 i_last_room_id) {
strcpy((char*)last_stage, i_name);
strcpy(last_stage, i_name);
this->last_position.x = i_last_position.x;
this->last_position.y = i_last_position.y;
this->last_position.z = i_last_position.z;
this->last_position = i_last_position;
this->last_angle = i_last_angle;
this->last_spawn_id = i_last_spawn_id;
this->last_room_id = i_last_room_id;
@ -209,7 +213,7 @@ bool dSv_player_field_last_stay_info_c::isRegionBit(int param_1) const {
void dSv_player_last_mark_info_c::init(void) {
float position;
strcpy((char*)ooccoo_stage,(char*)lbl_80379234);
strcpy(ooccoo_stage, (char*)lbl_80379234);
position = lbl_80451D5C;
this->ooccoo_position.x = lbl_80451D5C;
this->ooccoo_position.y = position;
@ -225,10 +229,8 @@ void dSv_player_last_mark_info_c::init(void) {
}
void dSv_player_last_mark_info_c::setWarpItemData(const char* i_ooccoo_stage, const cXyz& i_ooccoo_position, short i_ooccoo_angle, s8 i_ooccoo_room_id, u8 unk1, u8 unk2) {
strcpy((char*)ooccoo_stage,i_ooccoo_stage);
this->ooccoo_position.x = i_ooccoo_position.x;
this->ooccoo_position.y = i_ooccoo_position.y;
this->ooccoo_position.z = i_ooccoo_position.z;
strcpy(ooccoo_stage, i_ooccoo_stage);
this->ooccoo_position = i_ooccoo_position;
this->ooccoo_angle = i_ooccoo_angle;
this->ooccoo_room_id = i_ooccoo_room_id;
}
@ -241,7 +243,6 @@ void dSv_player_item_c::init(void) {
}
void dSv_player_item_c::setItem(int current_items_index, u8 new_items_index) {
if (current_items_index < MAX_ITEM_SLOTS) {
this->items[current_items_index] = new_items_index;
this->setLineUpItem();
@ -324,7 +325,6 @@ u8 dSv_player_item_c::getItem(int param_1, bool param_2) const {
asm u8 dSv_player_item_c::getItem(int param_1, bool param_2) const {
nofralloc
#include "d/d_save/d_save/asm/func_80033030.s"
}
#endif
@ -446,7 +446,8 @@ u8 dSv_player_item_c::checkEmptyBottle(void) {
u8 num = 0;
for (int i = 0; i < BOTTLE_MAX; i++) {
if(items[i+0xb] == EMPTY_BOTTLE) {
// Loop through the bottle slots (11 - 14) and increment counter for every empty bottle
if (items[i + SLOT_11] == EMPTY_BOTTLE) {
num++;
}
}
@ -474,7 +475,6 @@ void dSv_player_item_c::setEmptyBombBagItemIn(u8 param_1,u8 param_2, bool param_
// this is a few instructions off
#ifdef NONMATCHING
void dSv_player_item_c::setEmptyBombBag(void) {
int current_item_index;
u8 uVar1;
@ -501,14 +501,15 @@ asm void dSv_player_item_c::setEmptyBombBag(u8, u8) {
}
u8 dSv_player_item_c::checkBombBag(u8 param_1) {
u8 ok = 0;
u8 counter = 0;
for (int i = 0; i < 3; i++) {
if (param_1 == this->items[i + 15]) {
ok++;
for (int i = 0; i < BOMB_BAG_MAX; i++) {
// Loop through the bomb bag slots (15 - 17) and increment counter for every match
if (param_1 == this->items[i + SLOT_15]) {
counter++;
}
}
return ok;
return counter;
}
asm void dSv_player_item_c::setWarashibeItem(u8) {
@ -517,19 +518,19 @@ asm void dSv_player_item_c::setWarashibeItem(u8) {
}
void dSv_player_item_c::setRodTypeLevelUp(void) {
int current_fishing_rod_item_id = this->items[0x14];
int current_fishing_rod_item_id = this->items[SLOT_20];
switch (current_fishing_rod_item_id) {
case BEE_ROD: {
this->items[0x14] = JEWEL_BEE_ROD;
this->items[SLOT_20] = JEWEL_BEE_ROD;
break;
}
case WORM_ROD: {
this->items[0x14] = JEWEL_WORM_ROD;
this->items[SLOT_20] = JEWEL_WORM_ROD;
break;
}
case FISHING_ROD_1: {
this->items[0x14] = JEWEL_ROD;
this->items[SLOT_20] = JEWEL_ROD;
break;
}
}
@ -544,15 +545,15 @@ void dSv_player_item_c::setRodTypeLevelUp(void) {
void dSv_player_item_c::setBaitItem(u8 param_1) {
switch (param_1) {
case BEE_CHILD: {
isFirstBit(61) ? this->items[0x14] = JEWEL_BEE_ROD : this->items[0x14] = BEE_ROD;
isFirstBit(61) ? this->items[SLOT_20] = JEWEL_BEE_ROD : this->items[SLOT_20] = BEE_ROD;
break;
}
case WORM: {
isFirstBit(61) ? this->items[0x14] = JEWEL_WORM_ROD : this->items[0x14] = WORM_ROD;
isFirstBit(61) ? this->items[SLOT_20] = JEWEL_WORM_ROD : this->items[SLOT_20] = WORM_ROD;
break;
}
case NO_ITEM: {
isFirstBit(61) ? this->items[0x14] = JEWEL_ROD : this->items[0x14] = FISHING_ROD_1;
isFirstBit(61) ? this->items[SLOT_20] = JEWEL_ROD : this->items[SLOT_20] = FISHING_ROD_1;
break;
}
}
@ -592,7 +593,7 @@ asm void dSv_player_get_item_c::offFirstBit(u8) {
#include "d/d_save/d_save/asm/func_80033E94.s"
}
asm bool dSv_player_get_item_c::isFirstBit(u8) const {
asm int dSv_player_get_item_c::isFirstBit(u8) const {
nofralloc
#include "d/d_save/d_save/asm/func_80033EC8.s"
}
@ -627,13 +628,10 @@ void dSv_player_item_record_c::setBottleNum(u8 i_bottleIdx, u8 bottle_num) {
this->bottles[i_bottleIdx] = bottle_num;
}
#ifdef NONMATCHING
u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, short param_2) {
int iVar3 = this->bottles[i_bottleIdx] + param_2;
dSv_player_item_c ok;
ok.getItem((u8)(i_bottleIdx + 0xB),true);
g_dComIfG_gameInfo.save_file.getPlayerItem().getItem((u8)(i_bottleIdx + 0xB), true);
if (iVar3 < 0) {
this->bottles[i_bottleIdx] = 0;
@ -644,19 +642,12 @@ u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, short param_2) {
}
return this->bottles[i_bottleIdx];
}
#else
asm u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, short param_2) {
nofralloc
#include "d/d_save/d_save/asm/func_80033F9C.s"
}
#endif
u8 dSv_player_item_record_c::getBottleNum(u8 i_bottleIdx) const {
return this->bottles[i_bottleIdx];
}
void dSv_player_item_max_c::init(void) {
for (int i = 0; i < 7; i++) {
this->item_capacities[i] = 30;
}
@ -668,38 +659,39 @@ void dSv_player_item_max_c::init(void) {
void dSv_player_item_max_c::setBombNum(u8 bomb_id, u8 bomb_max) {
switch (bomb_id) {
case NORMAL_BOMB: this->item_capacities[1] = bomb_max; return;
case WATER_BOMB: this->item_capacities[2] = bomb_max; return;
case POKE_BOMB: this->item_capacities[6] = bomb_max; return;
case NORMAL_BOMB:
this->item_capacities[1] = bomb_max;
return;
case WATER_BOMB:
this->item_capacities[2] = bomb_max;
return;
case POKE_BOMB:
this->item_capacities[6] = bomb_max;
return;
}
}
// this is close, the isFirstBit keeps screwing everything up :(
#ifdef NONMATCHING
u8 dSv_player_item_max_c::getBombNum(u8 param_1) const {
u8 iVar3;
iVar3 = 0x1;
if (isFirstBit(79)) {
if (g_dComIfG_gameInfo.save_file.getPlayerGetItem().isFirstBit(BOMB_BAG_LV2)) {
iVar3 = 0x2;
}
switch (param_1) {
case WATER_BOMB: return (u8)(this->bomb_bags_ammo_max[0x1] * iVar3);
case NORMAL_BOMB: return (u8)(this->bomb_bags_ammo_max[0x1] * iVar3);
case POKE_BOMB: return (u8)(this->unk_ammo_max[0x2] * iVar3);
default: return 0;
case NORMAL_BOMB:
return (u8)(this->item_capacities[0x1] * iVar3);
case WATER_BOMB:
return (u8)(this->item_capacities[0x2] * iVar3);
case POKE_BOMB:
return (u8)(this->item_capacities[0x6] * iVar3);
default:
return 0;
}
}
#else
asm u8 dSv_player_item_max_c::getBombNum(u8 param_1) const {
nofralloc
#include "d/d_save/d_save/asm/func_800340F8.s"
}
#endif
void dSv_player_collect_c::init(void) {
for (int i = 0; i < 8; i++) {
this->unk0[i] = 0;
}
@ -783,8 +775,8 @@ bool dSv_light_drop_c::isLightDropGetFlag(u8 i_nowLevel) const {
void dSv_letter_info_c::init(void) {
for (int i = 0; i < 2; i++) {
this->letter_read_flags[i] = 0;
this->letter_read_flags[i + 2] = 0;
this->letter_get_bitfields[i] = 0;
this->letter_read_bitfields[i] = 0;
}
for (int i = 0; i < LETTER_INFO_BIT; i++) {
@ -793,29 +785,20 @@ void dSv_letter_info_c::init(void) {
}
void dSv_letter_info_c::onLetterGetFlag(int i_no) {
this->letter_read_flags[i_no >> 0x5] |= 0x1 << (i_no & 0x1F);
this->letter_get_bitfields[i_no >> 0x5] |= 0x1 << (i_no & 0x1F);
}
bool dSv_letter_info_c::isLetterGetFlag(int i_no) const {
return this->letter_read_flags[i_no >> 0x5] & (1 << (i_no & 0x1F)) ? true : false;
return this->letter_get_bitfields[i_no >> 0x5] & (1 << (i_no & 0x1F)) ? true : false;
}
void dSv_letter_info_c::onLetterReadFlag(int i_no) {
(this->letter_read_flags + (i_no >> 0x5))[0x2] |= 0x1 << (i_no & 0x1F);
this->letter_read_bitfields[i_no >> 0x5] |= 0x1 << (i_no & 0x1F);
}
#ifdef NONMATCHING
bool dSv_letter_info_c::isLetterReadFlag(int i_no) const {
u32 tmp = this->letter_read_flags[(i_no >> 5) + 2];
int tmp2 = (1 << (i_no & 0x1F));
return tmp2 & tmp ? true : false;
int dSv_letter_info_c::isLetterReadFlag(int i_no) const {
return this->letter_read_bitfields[i_no >> 5] & 1 << (i_no & 0x1F) ? 1 : 0;
}
#else
asm bool dSv_letter_info_c::isLetterReadFlag(int) const {
nofralloc
#include "d/d_save/d_save/asm/func_8003449C.s"
}
#endif
void dSv_fishing_info_c::init(void) {
for (int i = 0; i < 16; i++) {
@ -837,7 +820,7 @@ namespace d_meter2_info {
public:
void getString(unsigned long, char*, JMSMesgEntry_c*);
};
}
} // namespace d_meter2_info
void dSv_player_info_c::init(void) {
unsigned long a = 0x382;
@ -982,10 +965,9 @@ bool dSv_memBit_c::isSwitch(int i_no) const {
// instruction in wrong place
#ifdef NONMATCHING
bool dSv_memBit_c::revSwitch(int i_no) {
int uVar2 = 0x1 << (i_no & 0x1F);
u32* puVar1 = (i_no >> 0x5) + this->area_flags_bitfields1;
puVar1[0x2] ^= uVar2;
return puVar1[0x2] & uVar2 ? true : false;
unsigned int tmp = 1 << (i_no & 0x1F);
(this->area_flags_bitfields1 + (i_no >> 0x5))[0x2] ^= tmp;
return (this->area_flags_bitfields1 + (i_no >> 0x5))[0x2] & tmp ? true : false;
}
#else
asm u8 dSv_memBit_c::revSwitch(int) {
@ -1011,7 +993,7 @@ bool dSv_memBit_c::isDungeonItem(int i_no) const {
}
void dSv_event_c::init(void) {
for (int i = 0; i < 256; i++) {
for (int i = 0; i < MAX_EVENTS; i++) {
this->events[i] = 0;
}
setInitEventBit();
@ -1129,7 +1111,6 @@ void dSv_zoneBit_c::init(void) {
this->switch_bitfield[i] = 0;
}
for (int i = 0; i < 2; i++) {
this->item_bitfield[i] = 0;
}
@ -1251,7 +1232,6 @@ void dSv_info_c::init(void) {
this->events.init();
}
void dSv_save_c::init(void) {
this->player.init();
for (int i = 0; i < 0x20; i++) {
@ -1273,7 +1253,6 @@ dSv_memory2_c* dSv_save_c::getSave2(int i_stage2No) {
#ifdef NONMATCHING
void dSv_info_c::getSave(int i_stageNo) {
for (int i = 0; i < dSv_save_c::STAGE_MAX; i++) {
}
}
#else
@ -1286,11 +1265,9 @@ asm void dSv_info_c::getSave(int i_stageNo) {
#ifdef NONMATCHING
void dSv_info_c::getSave(int i_stageNo) {
for (int i = 0; i < dSv_save_c::STAGE_MAX; i++) {
}
for (int i = 0; i < dSv_save_c::STAGE_MAX; i++) {
}
}
#else
@ -1324,16 +1301,13 @@ void dSv_info_c::onSwitch(int i_no, int i_roomNo) {
if (i_no < 0x80) {
this->memory.getTempFlags().onSwitch(i_no);
}
else if (i_no < 0xc0) {
} else if (i_no < 0xc0) {
this->dungeon_bit.onSwitch(i_no - 0x80);
}
else {
} else {
int zoneId = dStage_roomControl_c_NS_getZoneNo(i_roomNo, i_no);
if (i_no < 0xE0) {
this->zones[zoneId].getZoneBit().onSwitch(i_no - 0xC0);
}
else {
} else {
this->zones[zoneId].getZoneBit().onOneSwitch(i_no - 0xE0);
}
}
@ -1346,16 +1320,13 @@ void dSv_info_c::offSwitch(int i_no, int i_roomNo) {
if (i_no < 0x80) {
this->memory.getTempFlags().offSwitch(i_no);
}
else if (i_no < 0xc0) {
} else if (i_no < 0xc0) {
this->dungeon_bit.offSwitch(i_no - 0x80);
}
else {
} else {
int zoneId = dStage_roomControl_c_NS_getZoneNo(i_roomNo, i_no);
if (i_no < 0xE0) {
this->zones[zoneId].getZoneBit().offSwitch(i_no - 0xC0);
}
else {
} else {
this->zones[zoneId].getZoneBit().offOneSwitch(i_no - 0xE0);
}
}
@ -1370,16 +1341,13 @@ bool dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
if (i_no < 0x80) {
return this->memory.getTempFlags().isSwitch(i_no);
}
else if (i_no < 0xc0) {
} else if (i_no < 0xc0) {
return this->dungeon_bit.isSwitch(i_no - 0x80);
}
else {
} else {
int zoneId = dStage_roomControl_c_NS_getZoneNo(i_roomNo, i_no);
if (i_no < 0xE0) {
return this->zones[zoneId].getZoneBit().isSwitch(i_no - 0xC0);
}
else {
} else {
return this->zones[zoneId].getZoneBit().isOneSwitch(i_no - 0xE0);
}
}
@ -1398,16 +1366,13 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) {
if (i_no < 0x80) {
this->dungeon_bit.onItem(i_no);
}
else if (i_no < 0xA0) {
} else if (i_no < 0xA0) {
this->memory.getTempFlags().onItem(i_no - 0x80);
}
else {
} else {
int zoneNo = dStage_roomControl_c_NS_getZoneNo(i_roomNo, i_no);
if (i_no < 0xC0) {
this->zones[zoneNo].getZoneBit().onItem(i_no - 0xA0);
}
else {
} else {
this->zones[zoneNo].getZoneBit().onOneItem(i_no - 0xC0);
}
}
@ -1418,7 +1383,6 @@ asm bool dSv_info_c::isItem(int i_no, int i_roomNo) const {
#include "d/d_save/d_save/asm/func_80035590.s"
}
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) {
return;

1
tools/asm-differ Submodule

@ -0,0 +1 @@
Subproject commit 8f9660840060fd9af64ab8e60d05c4480ce600c0