mirror of https://github.com/zeldaret/tp.git
add d_meter2_info methods, addBottleNum OK, getBombNum OK, isLetterReadFlag OK
This commit is contained in:
parent
86f892c3d3
commit
cbd06e5668
|
@ -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
|
|
@ -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"
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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,
|
||||
|
@ -277,37 +305,37 @@ enum ItemTable {
|
|||
noentry9 = 60
|
||||
};
|
||||
|
||||
enum EquipmentBits{
|
||||
enum EquipmentBits {
|
||||
CLOTHING_BITFIELD,
|
||||
SWORD_BITFIELD,
|
||||
SHIELD_BITFIELD
|
||||
};
|
||||
|
||||
enum Swords{
|
||||
enum Swords {
|
||||
ORDON_SWORD_FLAG,
|
||||
MASTER_SWORD_FLAG,
|
||||
WOODEN_SWORD_FLAG,
|
||||
LIGHT_SWORD_FLAG
|
||||
};
|
||||
|
||||
enum Shields{
|
||||
enum Shields {
|
||||
ORDON_SHIELD_FLAG,
|
||||
HYLIAN_SHIELD_FLAG,
|
||||
WOODEN_SHIELD_FLAG
|
||||
};
|
||||
|
||||
enum Armors{
|
||||
enum Armors {
|
||||
HEROS_CLOTHES_FLAG
|
||||
};
|
||||
|
||||
enum DungeonItem{
|
||||
enum DungeonItem {
|
||||
MAP_FLAG,
|
||||
COMPASS_FLAG,
|
||||
BOSS_KEY_FLAG,
|
||||
OOCCOO_NOTE_FLAG = 6
|
||||
};
|
||||
|
||||
enum AreaVessel{
|
||||
enum AreaVessel {
|
||||
FARON_VESSEL,
|
||||
ELDIN_VESSEL,
|
||||
LANAYRU_VESSEL
|
||||
|
@ -326,10 +354,10 @@ class dSv_player_status_a_c {
|
|||
inline u16& getCurrentHealth() {
|
||||
return current_health;
|
||||
}
|
||||
inline void setWalletLV(u8 lv){
|
||||
inline void setWalletLV(u8 lv) {
|
||||
current_wallet = lv;
|
||||
}
|
||||
void setLanternOil(u16 amount){
|
||||
void setLanternOil(u16 amount) {
|
||||
max_lantern_oil = amount;
|
||||
current_lantern_oil = amount;
|
||||
}
|
||||
|
@ -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];
|
||||
|
@ -498,7 +526,7 @@ class dSv_player_item_record_c {
|
|||
u8 addBottleNum(u8, short);
|
||||
u8 getBottleNum(u8) const;
|
||||
|
||||
void setBowAmount(u8 amount){ bow = amount; }
|
||||
void setBowAmount(u8 amount) { bow = amount; }
|
||||
|
||||
private:
|
||||
u8 bow;
|
||||
|
@ -514,7 +542,7 @@ class dSv_player_item_max_c {
|
|||
void setBombNum(u8, u8);
|
||||
u8 getBombNum(u8) const;
|
||||
|
||||
void setBowCapacity(u8 max){ item_capacities[0] = max; }
|
||||
void setBowCapacity(u8 max) { item_capacities[0] = max; }
|
||||
|
||||
private:
|
||||
u8 item_capacities[8];
|
||||
|
@ -530,7 +558,7 @@ class dSv_player_collect_c {
|
|||
void onCollectMirror(u8);
|
||||
bool isCollectMirror(u8) const;
|
||||
|
||||
u8 getPoeCount(){ return poe_count; }
|
||||
u8 getPoeCount() { return poe_count; }
|
||||
|
||||
private:
|
||||
u8 unk0[8];
|
||||
|
@ -554,7 +582,7 @@ class dSv_player_wolf_c {
|
|||
class dSv_light_drop_c {
|
||||
public:
|
||||
void init(void);
|
||||
void setLightDropNum(u8,u8);
|
||||
void setLightDropNum(u8, u8);
|
||||
u8 getLightDropNum(u8) const;
|
||||
void onLightDropGetFlag(u8);
|
||||
bool isLightDropGetFlag(u8) const;
|
||||
|
@ -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];
|
||||
};
|
||||
|
||||
|
@ -638,15 +667,15 @@ class dSv_player_c {
|
|||
void init(void);
|
||||
dSv_player_info_c& getPlayerInfo() { return player_info; }
|
||||
dSv_player_status_a_c& getPlayerStatusA() { return player_status_a; }
|
||||
dSv_player_item_c& getPlayerItem(){ return player_item; }
|
||||
dSv_player_collect_c& getPlayerCollect(){ return player_collect;}
|
||||
dSv_player_item_record_c& getPlayerItemRecord(){ return player_item_record; }
|
||||
dSv_player_item_max_c& getPlayerItemMax(){ return player_item_max;}
|
||||
dSv_light_drop_c& getLightDrop(){ return light_drop; }
|
||||
dSv_player_get_item_c& getPlayerGetItem(){ return player_get_item;}
|
||||
dSv_player_item_c& getPlayerItem() { return player_item; }
|
||||
dSv_player_collect_c& getPlayerCollect() { return player_collect; }
|
||||
dSv_player_item_record_c& getPlayerItemRecord() { return player_item_record; }
|
||||
dSv_player_item_max_c& getPlayerItemMax() { return player_item_max; }
|
||||
dSv_light_drop_c& getLightDrop() { return light_drop; }
|
||||
dSv_player_get_item_c& getPlayerGetItem() { return player_get_item; }
|
||||
|
||||
void setPlayerStatusAWalletLV(u8 lv) { player_status_a.setWalletLV(lv); }
|
||||
void setPlayerStatusAOil(u16 amount){ player_status_a.setLanternOil(amount);}
|
||||
void setPlayerStatusAOil(u16 amount) { player_status_a.setLanternOil(amount); }
|
||||
|
||||
private:
|
||||
dSv_player_status_a_c player_status_a;
|
||||
|
@ -684,7 +713,7 @@ class dSv_memBit_c {
|
|||
void onDungeonItem(int);
|
||||
bool isDungeonItem(int) const;
|
||||
|
||||
u8 getSmallKeys(){
|
||||
u8 getSmallKeys() {
|
||||
return small_key_flags;
|
||||
}
|
||||
|
||||
|
@ -809,7 +838,7 @@ class dSv_zone_c {
|
|||
public:
|
||||
dSv_zone_c(void); // the assembly for this is in d_com_inf_game.s
|
||||
void init(int);
|
||||
dSv_zoneBit_c& getZoneBit() { return zone_bit;}
|
||||
dSv_zoneBit_c& getZoneBit() { return zone_bit; }
|
||||
dSv_zoneActor_c& getZoneActor() { return zone_actor; }
|
||||
|
||||
s8& getUnk0() { return unk0; }
|
||||
|
@ -848,11 +877,13 @@ class dSv_save_c {
|
|||
public:
|
||||
void init(void);
|
||||
dSv_memory2_c* getSave2(int);
|
||||
dSv_player_c& getPlayer() {return player; }
|
||||
dSv_player_status_a_c& getPlayerStatusA() {return player.getPlayerStatusA(); }
|
||||
dSv_event_c& getEventFlags() {return event_flags;}
|
||||
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); }
|
||||
void setPlayerStatusAWallet(u8 lv) { player.setPlayerStatusAWalletLV(lv); }
|
||||
|
||||
static const int STAGE_MAX = 4;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,10 +78,13 @@ 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;
|
||||
switch (current_wallet) {
|
||||
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();
|
||||
|
@ -323,8 +324,7 @@ u8 dSv_player_item_c::getItem(int param_1, bool param_2) const {
|
|||
#else
|
||||
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"
|
||||
|
||||
#include "d/d_save/d_save/asm/func_80033030.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -349,7 +349,7 @@ void dSv_player_item_c::setLineUpItem(void) {
|
|||
#else
|
||||
asm void dSv_player_item_c::setLineUpItem(void) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_800332F8.s"
|
||||
#include "d/d_save/d_save/asm/func_800332F8.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -361,7 +361,7 @@ u8 dSv_player_item_c::getLineUpItem(int slot_number) const {
|
|||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void dSv_player_item_c::setBottleItemIn(u8 i_item_id_1, u8 i_item_id_2){
|
||||
void dSv_player_item_c::setBottleItemIn(u8 i_item_id_1, u8 i_item_id_2) {
|
||||
u8 current_item_index;
|
||||
u8 new_item_index;
|
||||
|
||||
|
@ -370,15 +370,15 @@ void dSv_player_item_c::setBottleItemIn(u8 i_item_id_1, u8 i_item_id_2){
|
|||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
// sanitize input to make sure it's only a bottle
|
||||
if (current_item_index == items[i+11]) {
|
||||
setItem(i+11,new_item_index);
|
||||
if (current_item_index == items[i + 11]) {
|
||||
setItem(i + 11, new_item_index);
|
||||
// if hotsprings water, turn on the timer
|
||||
if (new_item_index == 107) {
|
||||
setHotSpringTimer(i+11);
|
||||
setHotSpringTimer(i + 11);
|
||||
}
|
||||
for (int j = 0; j < 4; j++) {
|
||||
j = getSelectItemIndex(i);
|
||||
if (i+11 == j) {
|
||||
if (i + 11 == j) {
|
||||
dComIfGp_setSelectItem(j);
|
||||
}
|
||||
}
|
||||
|
@ -386,51 +386,51 @@ void dSv_player_item_c::setBottleItemIn(u8 i_item_id_1, u8 i_item_id_2){
|
|||
}
|
||||
}
|
||||
#else
|
||||
asm void dSv_player_item_c::setBottleItemIn(u8 i_item_id_1, u8 i_item_id_2){
|
||||
asm void dSv_player_item_c::setBottleItemIn(u8 i_item_id_1, u8 i_item_id_2) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033370.s"
|
||||
#include "d/d_save/d_save/asm/func_80033370.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
// this is 1 instruction off
|
||||
#ifdef NONMATCHING
|
||||
void dSv_player_item_c::setEmptyBottleItemIn(u8 i_item_id){
|
||||
void dSv_player_item_c::setEmptyBottleItemIn(u8 i_item_id) {
|
||||
u8 item_id = (dSv_item_rename(i_item_id));
|
||||
setBottleItemIn(96,item_id);
|
||||
setBottleItemIn(96, item_id);
|
||||
}
|
||||
#else
|
||||
asm void dSv_player_item_c::setEmptyBottleItemIn(u8 i_item_id){
|
||||
asm void dSv_player_item_c::setEmptyBottleItemIn(u8 i_item_id) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033450.s"
|
||||
#include "d/d_save/d_save/asm/func_80033450.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
asm void dSv_player_item_c::setEmptyBottle(void) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033494.s"
|
||||
#include "d/d_save/d_save/asm/func_80033494.s"
|
||||
}
|
||||
|
||||
asm void dSv_player_item_c::setEmptyBottle(u8){
|
||||
asm void dSv_player_item_c::setEmptyBottle(u8) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033514.s"
|
||||
#include "d/d_save/d_save/asm/func_80033514.s"
|
||||
}
|
||||
|
||||
asm void dSv_player_item_c::setEquipBottleItemIn(u8, u8) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033598.s"
|
||||
#include "d/d_save/d_save/asm/func_80033598.s"
|
||||
}
|
||||
|
||||
void dSv_player_item_c::setEquipBottleItemEmpty(u8 selected_index) {
|
||||
setEquipBottleItemIn(selected_index,EMPTY_BOTTLE);
|
||||
setEquipBottleItemIn(selected_index, EMPTY_BOTTLE);
|
||||
}
|
||||
|
||||
u8 dSv_player_item_c::checkBottle(u8 i_item_id){
|
||||
u8 dSv_player_item_c::checkBottle(u8 i_item_id) {
|
||||
u8 item_id;
|
||||
u8 num_bottles = 0;
|
||||
|
||||
item_id = dSv_item_rename(i_item_id);
|
||||
for (int i = 0; i < BOTTLE_MAX; i++) {
|
||||
if (item_id == items[i+0xb]) {
|
||||
if (item_id == items[i + 0xb]) {
|
||||
num_bottles++;
|
||||
}
|
||||
}
|
||||
|
@ -439,14 +439,15 @@ u8 dSv_player_item_c::checkBottle(u8 i_item_id){
|
|||
|
||||
asm u8 dSv_player_item_c::checkInsectBottle(void){
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033754.s"
|
||||
#include "d/d_save/d_save/asm/func_80033754.s"
|
||||
}
|
||||
|
||||
u8 dSv_player_item_c::checkEmptyBottle(void) {
|
||||
u8 num = 0;
|
||||
|
||||
for(int i = 0; i < BOTTLE_MAX; i++) {
|
||||
if(items[i+0xb] == EMPTY_BOTTLE) {
|
||||
for (int i = 0; i < BOTTLE_MAX; i++) {
|
||||
// Loop through the bottle slots (11 - 14) and increment counter for every empty bottle
|
||||
if (items[i + SLOT_11] == EMPTY_BOTTLE) {
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
@ -455,35 +456,34 @@ u8 dSv_player_item_c::checkEmptyBottle(void) {
|
|||
|
||||
asm void dSv_player_item_c::setBombBagItemIn(u8, u8, bool) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033828.s"
|
||||
#include "d/d_save/d_save/asm/func_80033828.s"
|
||||
}
|
||||
|
||||
asm void dSv_player_item_c::setBombBagItemIn(u8, u8, u8, bool) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033910.s"
|
||||
#include "d/d_save/d_save/asm/func_80033910.s"
|
||||
}
|
||||
|
||||
void dSv_player_item_c::setEmptyBombBagItemIn(u8 param_1,bool param_2) {
|
||||
setBombBagItemIn(BOMB_BAG_LV1,param_1,param_2);
|
||||
void dSv_player_item_c::setEmptyBombBagItemIn(u8 param_1, bool param_2) {
|
||||
setBombBagItemIn(BOMB_BAG_LV1, param_1, param_2);
|
||||
}
|
||||
|
||||
void dSv_player_item_c::setEmptyBombBagItemIn(u8 param_1,u8 param_2, bool param_3) {
|
||||
setBombBagItemIn(BOMB_BAG_LV1,param_1,param_2,param_3);
|
||||
void dSv_player_item_c::setEmptyBombBagItemIn(u8 param_1, u8 param_2, bool param_3) {
|
||||
setBombBagItemIn(BOMB_BAG_LV1, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
// this is a few instructions off
|
||||
#ifdef NONMATCHING
|
||||
void dSv_player_item_c::setEmptyBombBag(void) {
|
||||
|
||||
int current_item_index;
|
||||
u8 uVar1;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
current_item_index = (u8)(i + 15);
|
||||
uVar1 = getItem(current_item_index,true);
|
||||
uVar1 = getItem(current_item_index, true);
|
||||
|
||||
if (uVar1 == 0xff) {
|
||||
setItem(current_item_index,80);
|
||||
setItem(current_item_index, 80);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -491,45 +491,46 @@ void dSv_player_item_c::setEmptyBombBag(void) {
|
|||
#else
|
||||
asm void dSv_player_item_c::setEmptyBombBag(void) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033A88.s"
|
||||
#include "d/d_save/d_save/asm/func_80033A88.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
asm void dSv_player_item_c::setEmptyBombBag(u8, u8) {
|
||||
asm void dSv_player_item_c::setEmptyBombBag(u8, u8){
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033B08.s"
|
||||
#include "d/d_save/d_save/asm/func_80033B08.s"
|
||||
}
|
||||
|
||||
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) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033C2C.s"
|
||||
#include "d/d_save/d_save/asm/func_80033C2C.s"
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -564,7 +565,7 @@ void dSv_player_item_c::setBaitItem(u8 param_1) {
|
|||
#else
|
||||
asm void dSv_player_item_c::setBaitItem(u8 param_1) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033D40.s"
|
||||
#include "d/d_save/d_save/asm/func_80033D40.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -583,18 +584,18 @@ void dSv_player_get_item_c::onFirstBit(u8 i_itemno) {
|
|||
#else
|
||||
asm void dSv_player_get_item_c::onFirstBit(u8) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033E60.s"
|
||||
#include "d/d_save/d_save/asm/func_80033E60.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
asm void dSv_player_get_item_c::offFirstBit(u8) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033E94.s"
|
||||
#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"
|
||||
#include "d/d_save/d_save/asm/func_80033EC8.s"
|
||||
}
|
||||
|
||||
void dSv_player_item_record_c::init(void) {
|
||||
|
@ -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,62 +642,56 @@ 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;
|
||||
}
|
||||
setBombNum(NORMAL_BOMB,30);
|
||||
setBombNum(WATER_BOMB,15);
|
||||
setBombNum(POKE_BOMB,10);
|
||||
setBombNum(NORMAL_BOMB, 30);
|
||||
setBombNum(WATER_BOMB, 15);
|
||||
setBombNum(POKE_BOMB, 10);
|
||||
this->item_capacities[7] = 0;
|
||||
}
|
||||
|
||||
void dSv_player_item_max_c::setBombNum(u8 bomb_id,u8 bomb_max) {
|
||||
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;
|
||||
}
|
||||
|
@ -755,7 +747,7 @@ void dSv_light_drop_c::init(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void dSv_light_drop_c::setLightDropNum(u8 i_nowLevel,u8 param_2) {
|
||||
void dSv_light_drop_c::setLightDropNum(u8 i_nowLevel, u8 param_2) {
|
||||
if ((i_nowLevel < LIGHT_DROP_STAGE) || (i_nowLevel > 6)) {
|
||||
this->light_drop_counts[i_nowLevel] = param_2;
|
||||
}
|
||||
|
@ -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++) {
|
||||
|
@ -835,9 +818,9 @@ void dSv_fishing_info_c::addFishCount(u8 fish_index) {
|
|||
namespace d_meter2_info {
|
||||
class dMeter2Info_c {
|
||||
public:
|
||||
void getString(unsigned long, char*, JMSMesgEntry_c *);
|
||||
void getString(unsigned long, char*, JMSMesgEntry_c*);
|
||||
};
|
||||
}
|
||||
} // namespace d_meter2_info
|
||||
|
||||
void dSv_player_info_c::init(void) {
|
||||
unsigned long a = 0x382;
|
||||
|
@ -848,8 +831,8 @@ void dSv_player_info_c::init(void) {
|
|||
|
||||
d_meter2_info::dMeter2Info_c ok;
|
||||
|
||||
ok.getString(a,(char*)this->link_name,c);
|
||||
ok.getString(b,(char*)this->epona_name,d);
|
||||
ok.getString(a, (char*)this->link_name, c);
|
||||
ok.getString(b, (char*)this->epona_name, d);
|
||||
|
||||
this->unk4 = 0;
|
||||
this->unk0 = 0;
|
||||
|
@ -866,7 +849,7 @@ void dSv_player_info_c::init(void) {
|
|||
#else
|
||||
asm void dSv_player_info_c::init(void) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80034518.s"
|
||||
#include "d/d_save/d_save/asm/func_80034518.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -877,10 +860,10 @@ void dSv_player_config_c::init(void) {
|
|||
os_sound_mode = OSGetSoundMode();
|
||||
if (os_sound_mode == 0) {
|
||||
this->sound_mode = 0;
|
||||
Z2AudioMgr_NS_setOutputMode(lbl_80451368,0);
|
||||
Z2AudioMgr_NS_setOutputMode(lbl_80451368, 0);
|
||||
} else {
|
||||
this->sound_mode = 1;
|
||||
Z2AudioMgr_NS_setOutputMode(lbl_80451368,1);
|
||||
Z2AudioMgr_NS_setOutputMode(lbl_80451368, 1);
|
||||
}
|
||||
|
||||
this->unk2 = 0;
|
||||
|
@ -902,7 +885,7 @@ u32 dSv_player_config_c::checkVibration(void) const {
|
|||
#else
|
||||
asm u32 dSv_player_config_c::checkVibration(void) const {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80034644.s"
|
||||
#include "d/d_save/d_save/asm/func_80034644.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -982,15 +965,14 @@ 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){
|
||||
asm u8 dSv_memBit_c::revSwitch(int) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_8003488C.s"
|
||||
#include "d/d_save/d_save/asm/func_8003488C.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1168,7 +1149,7 @@ bool dSv_zoneBit_c::revSwitch(int i_no) {
|
|||
#else
|
||||
asm bool dSv_zoneBit_c::revSwitch(int i_no) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80034D78.s"
|
||||
#include "d/d_save/d_save/asm/func_80034D78.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -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,30 +1253,27 @@ 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
|
||||
asm void dSv_info_c::getSave(int i_stageNo) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_800350BC.s"
|
||||
#include "d/d_save/d_save/asm/func_800350BC.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
#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
|
||||
asm void dSv_info_c::putSave(int i_stageNo) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_800350F0.s"
|
||||
#include "d/d_save/d_save/asm/func_800350F0.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -1387,7 +1355,7 @@ bool dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
|
|||
#else
|
||||
asm bool dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80035360.s"
|
||||
#include "d/d_save/d_save/asm/func_80035360.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -1415,10 +1380,9 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) {
|
|||
|
||||
asm bool dSv_info_c::isItem(int i_no, int i_roomNo) const {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80035590.s"
|
||||
#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;
|
||||
|
@ -1439,20 +1403,20 @@ void dSv_info_c::offActor(int i_id, int i_roomNo) {
|
|||
|
||||
asm bool dSv_info_c::isActor(int i_id, int i_roomNo) const {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80035724.s"
|
||||
#include "d/d_save/d_save/asm/func_80035724.s"
|
||||
}
|
||||
|
||||
asm void dSv_info_c::memory_to_card(char*, int) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80035798.s"
|
||||
#include "d/d_save/d_save/asm/func_80035798.s"
|
||||
}
|
||||
|
||||
asm void dSv_info_c::card_to_memory(char*, int) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80035A04.s"
|
||||
#include "d/d_save/d_save/asm/func_80035A04.s"
|
||||
}
|
||||
|
||||
asm void dSv_info_c::initdata_to_card(char*, int) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80035BD0.s"
|
||||
#include "d/d_save/d_save/asm/func_80035BD0.s"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8f9660840060fd9af64ab8e60d05c4480ce600c0
|
Loading…
Reference in New Issue