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_
|
#ifndef __D_COM_INF_GAME_H_
|
||||||
#define D_COM_INF_GAME_H_
|
#define __D_COM_INF_GAME_H_
|
||||||
|
|
||||||
#include "d/d_drawlist/d_drawlist.h"
|
#include "d/d_drawlist/d_drawlist.h"
|
||||||
#include "d/d_event/d_event/d_event.h"
|
#include "d/d_event/d_event/d_event.h"
|
||||||
|
|
|
@ -7,6 +7,47 @@ struct dMeter2Info_c_vtable {
|
||||||
};
|
};
|
||||||
|
|
||||||
class dMeter2Info_c {
|
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:
|
private:
|
||||||
dMeter2Info_c_vtable* vtable;
|
dMeter2Info_c_vtable* vtable;
|
||||||
u8 unk4[4];
|
u8 unk4[4];
|
||||||
|
|
|
@ -2,22 +2,50 @@
|
||||||
#define D_SAVE_H_
|
#define D_SAVE_H_
|
||||||
|
|
||||||
#include "dolphin/types.h"
|
#include "dolphin/types.h"
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#define DEFAULT_SELECT_ITEM_INDEX 0
|
#define DEFAULT_SELECT_ITEM_INDEX 0
|
||||||
#define MAX_SELECT_ITEM 3
|
#define MAX_SELECT_ITEM 3
|
||||||
|
#define MAX_EVENTS 256
|
||||||
|
|
||||||
static const int MAX_ITEM_SLOTS = 24;
|
static const int MAX_ITEM_SLOTS = 24;
|
||||||
static const int ITEM_XY_MAX_DUMMY = 8;
|
static const int ITEM_XY_MAX_DUMMY = 8;
|
||||||
static const int LIGHT_DROP_STAGE = 4;
|
static const int LIGHT_DROP_STAGE = 4;
|
||||||
static const int LETTER_INFO_BIT = 64;
|
static const int LETTER_INFO_BIT = 64;
|
||||||
|
|
||||||
|
|
||||||
enum Wallets {
|
enum Wallets {
|
||||||
WALLET,
|
WALLET,
|
||||||
BIG_WALLET,
|
BIG_WALLET,
|
||||||
GIANT_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 {
|
enum ItemTable {
|
||||||
AIR_LETTER = 234,
|
AIR_LETTER = 234,
|
||||||
ANCIENT_DOCUMENT = 233,
|
ANCIENT_DOCUMENT = 233,
|
||||||
|
@ -277,40 +305,40 @@ enum ItemTable {
|
||||||
noentry9 = 60
|
noentry9 = 60
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EquipmentBits{
|
enum EquipmentBits {
|
||||||
CLOTHING_BITFIELD,
|
CLOTHING_BITFIELD,
|
||||||
SWORD_BITFIELD,
|
SWORD_BITFIELD,
|
||||||
SHIELD_BITFIELD
|
SHIELD_BITFIELD
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Swords{
|
enum Swords {
|
||||||
ORDON_SWORD_FLAG,
|
ORDON_SWORD_FLAG,
|
||||||
MASTER_SWORD_FLAG,
|
MASTER_SWORD_FLAG,
|
||||||
WOODEN_SWORD_FLAG,
|
WOODEN_SWORD_FLAG,
|
||||||
LIGHT_SWORD_FLAG
|
LIGHT_SWORD_FLAG
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Shields{
|
enum Shields {
|
||||||
ORDON_SHIELD_FLAG,
|
ORDON_SHIELD_FLAG,
|
||||||
HYLIAN_SHIELD_FLAG,
|
HYLIAN_SHIELD_FLAG,
|
||||||
WOODEN_SHIELD_FLAG
|
WOODEN_SHIELD_FLAG
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Armors{
|
enum Armors {
|
||||||
HEROS_CLOTHES_FLAG
|
HEROS_CLOTHES_FLAG
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DungeonItem{
|
enum DungeonItem {
|
||||||
MAP_FLAG,
|
MAP_FLAG,
|
||||||
COMPASS_FLAG,
|
COMPASS_FLAG,
|
||||||
BOSS_KEY_FLAG,
|
BOSS_KEY_FLAG,
|
||||||
OOCCOO_NOTE_FLAG = 6
|
OOCCOO_NOTE_FLAG = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AreaVessel{
|
enum AreaVessel {
|
||||||
FARON_VESSEL,
|
FARON_VESSEL,
|
||||||
ELDIN_VESSEL,
|
ELDIN_VESSEL,
|
||||||
LANAYRU_VESSEL
|
LANAYRU_VESSEL
|
||||||
};
|
};
|
||||||
|
|
||||||
class dSv_player_status_a_c {
|
class dSv_player_status_a_c {
|
||||||
|
@ -326,10 +354,10 @@ class dSv_player_status_a_c {
|
||||||
inline u16& getCurrentHealth() {
|
inline u16& getCurrentHealth() {
|
||||||
return current_health;
|
return current_health;
|
||||||
}
|
}
|
||||||
inline void setWalletLV(u8 lv){
|
inline void setWalletLV(u8 lv) {
|
||||||
current_wallet = lv;
|
current_wallet = lv;
|
||||||
}
|
}
|
||||||
void setLanternOil(u16 amount){
|
void setLanternOil(u16 amount) {
|
||||||
max_lantern_oil = amount;
|
max_lantern_oil = amount;
|
||||||
current_lantern_oil = amount;
|
current_lantern_oil = amount;
|
||||||
}
|
}
|
||||||
|
@ -391,7 +419,7 @@ class dSv_horse_place_c {
|
||||||
private:
|
private:
|
||||||
cXyz position;
|
cXyz position;
|
||||||
u16 angle;
|
u16 angle;
|
||||||
u8 current_stage[8];
|
char current_stage[8];
|
||||||
u8 spawn_id;
|
u8 spawn_id;
|
||||||
u8 room_id;
|
u8 room_id;
|
||||||
};
|
};
|
||||||
|
@ -402,7 +430,7 @@ class dSv_player_return_place_c {
|
||||||
void set(const char*, s8, u8);
|
void set(const char*, s8, u8);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u8 current_stage[8];
|
char current_stage[8];
|
||||||
u8 spawn_id;
|
u8 spawn_id;
|
||||||
u8 room_id;
|
u8 room_id;
|
||||||
u8 unk10;
|
u8 unk10;
|
||||||
|
@ -419,7 +447,7 @@ class dSv_player_field_last_stay_info_c {
|
||||||
private:
|
private:
|
||||||
cXyz last_position;
|
cXyz last_position;
|
||||||
u16 last_angle;
|
u16 last_angle;
|
||||||
u8 last_stage[8];
|
char last_stage[8];
|
||||||
u8 last_spawn_id;
|
u8 last_spawn_id;
|
||||||
u8 last_room_id;
|
u8 last_room_id;
|
||||||
u8 unk24;
|
u8 unk24;
|
||||||
|
@ -435,7 +463,7 @@ class dSv_player_last_mark_info_c {
|
||||||
private:
|
private:
|
||||||
cXyz ooccoo_position;
|
cXyz ooccoo_position;
|
||||||
u16 ooccoo_angle;
|
u16 ooccoo_angle;
|
||||||
u8 ooccoo_stage[8];
|
char ooccoo_stage[8];
|
||||||
u8 ooccoo_spawn_id;
|
u8 ooccoo_spawn_id;
|
||||||
u8 ooccoo_room_id;
|
u8 ooccoo_room_id;
|
||||||
char unk24;
|
char unk24;
|
||||||
|
@ -469,7 +497,7 @@ class dSv_player_item_c {
|
||||||
void setRodTypeLevelUp(void);
|
void setRodTypeLevelUp(void);
|
||||||
void setBaitItem(u8);
|
void setBaitItem(u8);
|
||||||
|
|
||||||
static const int BOMB_BAG_MAX = 4;
|
static const int BOMB_BAG_MAX = 3;
|
||||||
static const int BOTTLE_MAX = 4;
|
static const int BOTTLE_MAX = 4;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -482,7 +510,7 @@ class dSv_player_get_item_c {
|
||||||
void init(void);
|
void init(void);
|
||||||
void onFirstBit(u8);
|
void onFirstBit(u8);
|
||||||
void offFirstBit(u8);
|
void offFirstBit(u8);
|
||||||
bool isFirstBit(u8) const;
|
int isFirstBit(u8) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u32 pause_menu_bit_fields[4];
|
u32 pause_menu_bit_fields[4];
|
||||||
|
@ -498,7 +526,7 @@ class dSv_player_item_record_c {
|
||||||
u8 addBottleNum(u8, short);
|
u8 addBottleNum(u8, short);
|
||||||
u8 getBottleNum(u8) const;
|
u8 getBottleNum(u8) const;
|
||||||
|
|
||||||
void setBowAmount(u8 amount){ bow = amount; }
|
void setBowAmount(u8 amount) { bow = amount; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u8 bow;
|
u8 bow;
|
||||||
|
@ -514,7 +542,7 @@ class dSv_player_item_max_c {
|
||||||
void setBombNum(u8, u8);
|
void setBombNum(u8, u8);
|
||||||
u8 getBombNum(u8) const;
|
u8 getBombNum(u8) const;
|
||||||
|
|
||||||
void setBowCapacity(u8 max){ item_capacities[0] = max; }
|
void setBowCapacity(u8 max) { item_capacities[0] = max; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u8 item_capacities[8];
|
u8 item_capacities[8];
|
||||||
|
@ -530,7 +558,7 @@ class dSv_player_collect_c {
|
||||||
void onCollectMirror(u8);
|
void onCollectMirror(u8);
|
||||||
bool isCollectMirror(u8) const;
|
bool isCollectMirror(u8) const;
|
||||||
|
|
||||||
u8 getPoeCount(){ return poe_count; }
|
u8 getPoeCount() { return poe_count; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u8 unk0[8];
|
u8 unk0[8];
|
||||||
|
@ -554,7 +582,7 @@ class dSv_player_wolf_c {
|
||||||
class dSv_light_drop_c {
|
class dSv_light_drop_c {
|
||||||
public:
|
public:
|
||||||
void init(void);
|
void init(void);
|
||||||
void setLightDropNum(u8,u8);
|
void setLightDropNum(u8, u8);
|
||||||
u8 getLightDropNum(u8) const;
|
u8 getLightDropNum(u8) const;
|
||||||
void onLightDropGetFlag(u8);
|
void onLightDropGetFlag(u8);
|
||||||
bool isLightDropGetFlag(u8) const;
|
bool isLightDropGetFlag(u8) const;
|
||||||
|
@ -571,10 +599,11 @@ class dSv_letter_info_c {
|
||||||
void onLetterGetFlag(int);
|
void onLetterGetFlag(int);
|
||||||
bool isLetterGetFlag(int) const;
|
bool isLetterGetFlag(int) const;
|
||||||
void onLetterReadFlag(int);
|
void onLetterReadFlag(int);
|
||||||
bool isLetterReadFlag(int) const;
|
int isLetterReadFlag(int) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u32 letter_read_flags[4];
|
u32 letter_get_bitfields[2];
|
||||||
|
u32 letter_read_bitfields[2];
|
||||||
u8 unk16[64];
|
u8 unk16[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -638,15 +667,15 @@ class dSv_player_c {
|
||||||
void init(void);
|
void init(void);
|
||||||
dSv_player_info_c& getPlayerInfo() { return player_info; }
|
dSv_player_info_c& getPlayerInfo() { return player_info; }
|
||||||
dSv_player_status_a_c& getPlayerStatusA() { return player_status_a; }
|
dSv_player_status_a_c& getPlayerStatusA() { return player_status_a; }
|
||||||
dSv_player_item_c& getPlayerItem(){ return player_item; }
|
dSv_player_item_c& getPlayerItem() { return player_item; }
|
||||||
dSv_player_collect_c& getPlayerCollect(){ return player_collect;}
|
dSv_player_collect_c& getPlayerCollect() { return player_collect; }
|
||||||
dSv_player_item_record_c& getPlayerItemRecord(){ return player_item_record; }
|
dSv_player_item_record_c& getPlayerItemRecord() { return player_item_record; }
|
||||||
dSv_player_item_max_c& getPlayerItemMax(){ return player_item_max;}
|
dSv_player_item_max_c& getPlayerItemMax() { return player_item_max; }
|
||||||
dSv_light_drop_c& getLightDrop(){ return light_drop; }
|
dSv_light_drop_c& getLightDrop() { return light_drop; }
|
||||||
dSv_player_get_item_c& getPlayerGetItem(){ return player_get_item;}
|
dSv_player_get_item_c& getPlayerGetItem() { return player_get_item; }
|
||||||
|
|
||||||
void setPlayerStatusAWalletLV(u8 lv) { player_status_a.setWalletLV(lv); }
|
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:
|
private:
|
||||||
dSv_player_status_a_c player_status_a;
|
dSv_player_status_a_c player_status_a;
|
||||||
|
@ -684,7 +713,7 @@ class dSv_memBit_c {
|
||||||
void onDungeonItem(int);
|
void onDungeonItem(int);
|
||||||
bool isDungeonItem(int) const;
|
bool isDungeonItem(int) const;
|
||||||
|
|
||||||
u8 getSmallKeys(){
|
u8 getSmallKeys() {
|
||||||
return small_key_flags;
|
return small_key_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,7 +822,7 @@ class dSv_zoneBit_c {
|
||||||
};
|
};
|
||||||
|
|
||||||
class dSv_zoneActor_c {
|
class dSv_zoneActor_c {
|
||||||
public:
|
public:
|
||||||
void init(void);
|
void init(void);
|
||||||
void on(int);
|
void on(int);
|
||||||
void off(int);
|
void off(int);
|
||||||
|
@ -809,7 +838,7 @@ class dSv_zone_c {
|
||||||
public:
|
public:
|
||||||
dSv_zone_c(void); // the assembly for this is in d_com_inf_game.s
|
dSv_zone_c(void); // the assembly for this is in d_com_inf_game.s
|
||||||
void init(int);
|
void init(int);
|
||||||
dSv_zoneBit_c& getZoneBit() { return zone_bit;}
|
dSv_zoneBit_c& getZoneBit() { return zone_bit; }
|
||||||
dSv_zoneActor_c& getZoneActor() { return zone_actor; }
|
dSv_zoneActor_c& getZoneActor() { return zone_actor; }
|
||||||
|
|
||||||
s8& getUnk0() { return unk0; }
|
s8& getUnk0() { return unk0; }
|
||||||
|
@ -848,14 +877,16 @@ class dSv_save_c {
|
||||||
public:
|
public:
|
||||||
void init(void);
|
void init(void);
|
||||||
dSv_memory2_c* getSave2(int);
|
dSv_memory2_c* getSave2(int);
|
||||||
dSv_player_c& getPlayer() {return player; }
|
dSv_player_c& getPlayer() { return player; }
|
||||||
dSv_player_status_a_c& getPlayerStatusA() {return player.getPlayerStatusA(); }
|
dSv_player_status_a_c& getPlayerStatusA() { return player.getPlayerStatusA(); }
|
||||||
dSv_event_c& getEventFlags() {return event_flags;}
|
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;
|
static const int STAGE_MAX = 4;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
dSv_player_c player;
|
dSv_player_c player;
|
||||||
u8 unk492[4];
|
u8 unk492[4];
|
||||||
|
|
|
@ -18,7 +18,6 @@ extern "C" {
|
||||||
void dComIfGs_setMixItemIndex(void);
|
void dComIfGs_setMixItemIndex(void);
|
||||||
void dComIfGs_setSelectItemIndex(void);
|
void dComIfGs_setSelectItemIndex(void);
|
||||||
void dComIfGs_getMixItemIndex(void);
|
void dComIfGs_getMixItemIndex(void);
|
||||||
void dComIfGs_getBottleMax(void);
|
|
||||||
char* strcpy(char*,const char*);
|
char* strcpy(char*,const char*);
|
||||||
int strcmp(char*,char*);
|
int strcmp(char*,char*);
|
||||||
void setBombNum__21dSv_player_item_max_cFUcUc(void);
|
void setBombNum__21dSv_player_item_max_cFUcUc(void);
|
||||||
|
@ -252,6 +251,7 @@ extern "C" {
|
||||||
void ARQInit(void);
|
void ARQInit(void);
|
||||||
void DCStoreRangeNoSync(void);
|
void DCStoreRangeNoSync(void);
|
||||||
void __RAS_OSDisableInterrupts_begin(void);
|
void __RAS_OSDisableInterrupts_begin(void);
|
||||||
|
u8 dComIfGs_getBottleMax(void);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DVD
|
// DVD
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 8f9660840060fd9af64ab8e60d05c4480ce600c0
|
Loading…
Reference in New Issue