use dolphin types, begin changing class member naming convention

This commit is contained in:
unknown 2020-12-08 00:46:44 -05:00
parent b8bd1bbab1
commit 5684d3b149
No known key found for this signature in database
GPG Key ID: 4312662758CE7D5A
2 changed files with 146 additions and 146 deletions

View File

@ -351,33 +351,33 @@ class dSv_player_status_a_c {
u16 getRupeeMax(void) const;
int isMagicFlag(u8) const;
inline u16& getCurrentHealth() {
return current_health;
u16& getCurrentHealth() {
return mCurrentHealth;
}
inline void setWalletLV(u8 lv) {
current_wallet = lv;
void setWalletLV(u8 lv) {
mCurrentWallet = lv;
}
void setLanternOil(u16 amount) {
max_lantern_oil = amount;
current_lantern_oil = amount;
mMaxLanternOil = amount;
mCurrentLanternOil = amount;
}
private:
u16 max_health;
u16 current_health;
u16 current_rupees;
u16 max_lantern_oil;
u16 current_lantern_oil;
u16 mMaxHealth;
u16 mCurrentHealth;
u16 mCurrentRupees;
u16 mMaxLanternOil;
u16 mCurrentLanternOil;
u8 unk10;
u8 select_item[3];
u8 mix_item[3];
u8 mSelectItem[3];
u8 mMixItem[3];
u8 unk17;
u8 unk18;
u8 equipment[6];
u8 current_wallet;
u8 mEquipment[6];
u8 mCurrentWallet;
u8 unk26;
u8 unk27;
u8 magic_flag;
u8 mMagicFlag;
u8 unk29;
u8 unk30;
u8 unk31[3];
@ -388,21 +388,21 @@ class dSv_player_status_b_c {
public:
void init(void);
void onDarkClearLV(int);
bool isDarkClearLV(int) const;
BOOL isDarkClearLV(int) const;
void onTransformLV(int);
bool isTransformLV(int) const;
BOOL isTransformLV(int) const;
private:
u32 unk0;
u32 unk4;
u8 transform_level_flag;
u8 dark_clear_level_flag;
u8 mTransformLevelFlag;
u8 mDarkClearLevelFlag;
u8 unk10;
u8 unk11;
float time_of_day;
float mTimeOfDay;
u16 unk16;
u8 unk18[3];
u8 padding61[3];
u8 padding[3];
};
// move to SComponent later
@ -417,8 +417,8 @@ class dSv_horse_place_c {
void set(const char*, const cXyz&, short, s8);
private:
cXyz position;
u16 angle;
cXyz mPosition;
u16 mXRotation;
char current_stage[8];
u8 spawn_id;
u8 room_id;
@ -440,13 +440,13 @@ class dSv_player_return_place_c {
class dSv_player_field_last_stay_info_c {
public:
void init(void);
bool isRegionBit(int unk) const;
BOOL isRegionBit(int unk) const;
void onRegionBit(int unk);
void set(const char*, const cXyz&, short, s8, u8);
private:
cXyz last_position;
u16 last_angle;
short last_angle;
char last_stage[8];
u8 last_spawn_id;
u8 last_room_id;
@ -462,7 +462,7 @@ class dSv_player_last_mark_info_c {
private:
cXyz ooccoo_position;
u16 ooccoo_angle;
s16 ooccoo_angle;
char ooccoo_stage[8];
u8 ooccoo_spawn_id;
u8 ooccoo_room_id;
@ -552,11 +552,11 @@ class dSv_player_collect_c {
public:
void init(void);
void setCollect(int, u8);
bool isCollect(int, u8) const;
BOOL isCollect(int, u8) const;
void onCollectCrystal(u8);
bool isCollectCrystal(u8) const;
BOOL isCollectCrystal(u8) const;
void onCollectMirror(u8);
bool isCollectMirror(u8) const;
BOOL isCollectMirror(u8) const;
u8 getPoeCount() { return poe_count; }
@ -585,7 +585,7 @@ class dSv_light_drop_c {
void setLightDropNum(u8, u8);
u8 getLightDropNum(u8) const;
void onLightDropGetFlag(u8);
bool isLightDropGetFlag(u8) const;
BOOL isLightDropGetFlag(u8) const;
private:
u8 light_drop_counts[4];
@ -597,7 +597,7 @@ class dSv_letter_info_c {
public:
void init(void);
void onLetterGetFlag(int);
bool isLetterGetFlag(int) const;
BOOL isLetterGetFlag(int) const;
void onLetterReadFlag(int);
int isLetterReadFlag(int) const;
@ -703,13 +703,13 @@ class dSv_memBit_c {
void init(void);
void onTbox(int);
void offTbox(int);
bool isTbox(int) const;
BOOL isTbox(int) const;
void onSwitch(int);
void offSwitch(int);
bool isSwitch(int) const;
BOOL isSwitch(int) const;
u8 revSwitch(int);
void onItem(int);
bool isItem(int) const;
BOOL isItem(int) const;
void onDungeonItem(int);
bool isDungeonItem(int) const;
@ -770,7 +770,7 @@ class dSv_memory2_c {
void init(void);
void onVisitedRoom(int);
void offVisitedRoom(int);
bool isVisitedRoom(int);
BOOL isVisitedRoom(int);
private:
u32 unk0[2];
@ -781,10 +781,10 @@ class dSv_danBit_c {
bool init(s8);
void onSwitch(int);
void offSwitch(int);
bool isSwitch(int) const;
BOOL isSwitch(int) const;
bool revSwitch(int);
void onItem(int);
bool isItem(int) const;
BOOL isItem(int) const;
private:
s8 mStageNum;
@ -802,16 +802,16 @@ class dSv_zoneBit_c {
void clearRoomItem(void);
void onSwitch(int);
void offSwitch(int);
bool isSwitch(int) const;
BOOL isSwitch(int) const;
bool revSwitch(int);
void onOneSwitch(int);
void offOneSwitch(int);
bool isOneSwitch(int) const;
BOOL isOneSwitch(int) const;
bool revOneSwitch(int);
void onItem(int);
bool isItem(int) const;
BOOL isItem(int) const;
void onOneItem(int);
bool isOneItem(int) const;
BOOL isOneItem(int) const;
private:
u16 switch_bitfield[2];
@ -826,7 +826,7 @@ class dSv_zoneActor_c {
void init(void);
void on(int);
void off(int);
bool is(int) const;
BOOL is(int) const;
static const int ACTOR_MAX = 0xFFFF;
@ -857,8 +857,8 @@ class dSv_restart_c {
private:
u8 unk0;
u8 unk1[5];
short angle;
cXyz position;
short mXRotation;
cXyz mPosition;
u8 padding20[16];
};
@ -867,9 +867,9 @@ class dSv_turnRestart_c {
void set(const cXyz&, short, s8, u32);
private:
cXyz position;
cXyz mPosition;
u32 unk12;
short angle;
short mXRotation;
s8 unk18;
};
@ -906,13 +906,13 @@ class dSv_info_c {
u32 createZone(int);
void onSwitch(int, int);
void offSwitch(int, int);
bool isSwitch(int, int) const;
BOOL isSwitch(int, int) const;
u8 revSwitch(int, int);
void onItem(int, int);
bool isItem(int, int) const;
BOOL isItem(int, int) const;
void onActor(int, int);
void offActor(int, int);
bool isActor(int, int) const;
BOOL isActor(int, int) const;
void memory_to_card(char*, int);
void card_to_memory(char*, int);
void initdata_to_card(char*, int);

View File

@ -17,32 +17,32 @@ u8 dSv_item_rename(u8 item_id) {
}
void dSv_player_status_a_c::init() {
this->max_health = 15;
this->current_health = 12;
this->current_rupees = 0;
this->max_lantern_oil = 0;
this->current_lantern_oil = 0;
this->mMaxHealth = 15;
this->mCurrentHealth = 12;
this->mCurrentRupees = 0;
this->mMaxLanternOil = 0;
this->mCurrentLanternOil = 0;
this->unk10 = 0;
for (int i = 0; i < 4; i++) {
this->select_item[i] = NO_ITEM;
this->mix_item[i + 1] = NO_ITEM;
this->mSelectItem[i] = NO_ITEM;
this->mMixItem[i + 1] = NO_ITEM;
dComIfGp_setSelectItem(i);
}
for (int i = 0; i < 6; i++) {
this->equipment[i] = 0;
this->mEquipment[i] = 0;
}
this->equipment[0] = WEARS_CASUAL;
this->equipment[1] = NO_ITEM;
this->equipment[2] = NO_ITEM;
this->equipment[3] = NO_ITEM;
this->equipment[4] = NO_ITEM;
this->current_wallet = WALLET;
this->mEquipment[0] = WEARS_CASUAL;
this->mEquipment[1] = NO_ITEM;
this->mEquipment[2] = NO_ITEM;
this->mEquipment[3] = NO_ITEM;
this->mEquipment[4] = NO_ITEM;
this->mCurrentWallet = WALLET;
this->unk26 = 0;
this->unk27 = 0;
this->magic_flag = 0;
this->mMagicFlag = 0;
this->unk29 = 0;
this->unk30 = 0;
@ -53,33 +53,33 @@ void dSv_player_status_a_c::init() {
void dSv_player_status_a_c::setSelectItemIndex(signed int i_no, u8 item_index) {
if (i_no < ITEM_XY_MAX_DUMMY / 2) {
this->select_item[i_no] = item_index;
this->mSelectItem[i_no] = item_index;
}
}
u8 dSv_player_status_a_c::getSelectItemIndex(signed int i_no) const {
if (i_no < ITEM_XY_MAX_DUMMY / 2) {
return this->select_item[i_no];
return this->mSelectItem[i_no];
}
return 0;
}
void dSv_player_status_a_c::setMixItemIndex(signed int i_no, u8 item_index) {
if (i_no < ITEM_XY_MAX_DUMMY / 2) {
this->mix_item[i_no + 1] = item_index;
this->mMixItem[i_no + 1] = item_index;
}
}
u8 dSv_player_status_a_c::getMixItemIndex(signed int i_no) const {
if (i_no < ITEM_XY_MAX_DUMMY / 2) {
return this->mix_item[i_no + 1];
return this->mMixItem[i_no + 1];
}
return 0;
}
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) {
if (mCurrentWallet < 3) { // if you make this a default, it wont match. Compiler, pls.
switch (mCurrentWallet) {
case WALLET:
return 300;
case BIG_WALLET:
@ -91,20 +91,20 @@ u16 dSv_player_status_a_c::getRupeeMax(void) const {
return 0;
}
int dSv_player_status_a_c::isMagicFlag(u8 i_magic) const {
BOOL dSv_player_status_a_c::isMagicFlag(u8 i_magic) const {
if (i_magic == 0) {
return g_dComIfG_gameInfo.save_file.getEventFlags().isEventBit(0x2304);
}
return (this->magic_flag & (u8)(1 << i_magic)) ? 1 : 0;
return (this->mMagicFlag & (u8)(1 << i_magic)) ? TRUE : FALSE;
}
void dSv_player_status_b_c::init() {
this->unk4 = 0;
this->unk0 = 0;
this->transform_level_flag = 0;
this->dark_clear_level_flag = 0;
this->mTransformLevelFlag = 0;
this->mDarkClearLevelFlag = 0;
this->unk10 = 0;
this->time_of_day = lbl_80451D58;
this->mTimeOfDay = lbl_80451D58;
this->unk16 = 0;
for (int i = 0; i < 3; i++) {
@ -113,41 +113,41 @@ void dSv_player_status_b_c::init() {
}
void dSv_player_status_b_c::onDarkClearLV(int flagOnOff) {
this->dark_clear_level_flag |= (u8)(1 << flagOnOff);
this->mDarkClearLevelFlag |= (u8)(1 << flagOnOff);
}
bool dSv_player_status_b_c::isDarkClearLV(int unk) const {
return this->dark_clear_level_flag & (u8)(1 << unk) ? true : false;
BOOL dSv_player_status_b_c::isDarkClearLV(int unk) const {
return this->mDarkClearLevelFlag & (u8)(1 << unk) ? TRUE : FALSE;
}
void dSv_player_status_b_c::onTransformLV(int flagOnOff) {
this->transform_level_flag |= (u8)(1 << flagOnOff);
this->mTransformLevelFlag |= (u8)(1 << flagOnOff);
}
bool dSv_player_status_b_c::isTransformLV(int unk) const {
return this->transform_level_flag & (u8)(1 << unk) ? true : false;
BOOL dSv_player_status_b_c::isTransformLV(int unk) const {
return this->mTransformLevelFlag & (u8)(1 << unk) ? TRUE : FALSE;
}
//extern u8 lbl_80379234[16];
void dSv_horse_place_c::init(void) {
float position_val;
f32 position_val;
char* default_stage;
default_stage = strcpy((char*)current_stage, (char*)lbl_80379234);
position_val = lbl_80451D5C;
this->position.x = lbl_80451D5C;
this->position.y = position_val;
this->position.z = position_val;
this->angle = 0;
this->mPosition.x = lbl_80451D5C;
this->mPosition.y = position_val;
this->mPosition.z = position_val;
this->mXRotation = 0;
this->spawn_id = 0;
this->room_id = 0;
}
void dSv_horse_place_c::set(const char* i_name, const cXyz& i_position, short i_angle, signed char i_room_id) {
void dSv_horse_place_c::set(const char* i_name, const cXyz& i_position, s16 i_x_rot, signed char i_room_id) {
strcpy(current_stage, i_name);
this->position.x = i_position.x;
this->position.y = i_position.y;
this->position.z = i_position.z;
this->angle = i_angle;
this->mPosition.x = i_position.x;
this->mPosition.y = i_position.y;
this->mPosition.z = i_position.z;
this->mXRotation = i_x_rot;
this->room_id = i_room_id;
}
@ -166,7 +166,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;
f32 position_val;
strcpy(last_stage, (char*)lbl_80379234);
position_val = lbl_80451D5C;
@ -185,7 +185,7 @@ 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) {
void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_last_position, s16 i_last_angle, signed char i_last_spawn_id, u8 i_last_room_id) {
strcpy(last_stage, i_name);
this->last_position = i_last_position;
@ -204,15 +204,15 @@ void dSv_player_field_last_stay_info_c::onRegionBit(int i_region_bit) {
this->last_region |= (u8)(1 << i_region_bit);
}
bool dSv_player_field_last_stay_info_c::isRegionBit(int param_1) const {
BOOL dSv_player_field_last_stay_info_c::isRegionBit(int param_1) const {
if ((param_1 >= 0) && (param_1 < 8)) {
return (last_region & (u8)(1 << param_1)) ? true : false;
return (last_region & (u8)(1 << param_1)) ? TRUE : FALSE;
}
return false;
}
void dSv_player_last_mark_info_c::init(void) {
float position;
f32 position;
strcpy(ooccoo_stage, (char*)lbl_80379234);
position = lbl_80451D5C;
@ -229,7 +229,7 @@ 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) {
void dSv_player_last_mark_info_c::setWarpItemData(const char* i_ooccoo_stage, const cXyz& i_ooccoo_position, s16 i_ooccoo_angle, s8 i_ooccoo_room_id, u8 unk1, u8 unk2) {
strcpy(ooccoo_stage, i_ooccoo_stage);
this->ooccoo_position = i_ooccoo_position;
this->ooccoo_angle = i_ooccoo_angle;
@ -594,7 +594,7 @@ asm void dSv_player_get_item_c::offFirstBit(u8) {
#include "d/d_save/d_save/asm/func_80033E94.s"
}
asm int dSv_player_get_item_c::isFirstBit(u8) const {
asm BOOL dSv_player_get_item_c::isFirstBit(u8) const {
nofralloc
#include "d/d_save/d_save/asm/func_80033EC8.s"
}
@ -629,7 +629,7 @@ void dSv_player_item_record_c::setBottleNum(u8 i_bottleIdx, u8 bottle_num) {
this->bottles[i_bottleIdx] = bottle_num;
}
u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, short param_2) {
u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, s16 param_2) {
int iVar3 = this->bottles[i_bottleIdx] + param_2;
g_dComIfG_gameInfo.save_file.getPlayerItem().getItem((u8)(i_bottleIdx + 0xB), true);
@ -708,24 +708,24 @@ void dSv_player_collect_c::setCollect(int param_1, u8 i_item) {
this->unk0[param_1] |= (u8)(1 << i_item);
}
bool dSv_player_collect_c::isCollect(int param_1, u8 i_item) const {
return this->unk0[param_1] & (u8)(1 << i_item) ? true : false;
BOOL dSv_player_collect_c::isCollect(int param_1, u8 i_item) const {
return this->unk0[param_1] & (u8)(1 << i_item) ? TRUE : FALSE;
}
void dSv_player_collect_c::onCollectCrystal(u8 i_item) {
this->crystal |= (u8)(1 << i_item);
}
bool dSv_player_collect_c::isCollectCrystal(u8 i_item) const {
return this->crystal & (u8)(1 << i_item) ? true : false;
BOOL dSv_player_collect_c::isCollectCrystal(u8 i_item) const {
return this->crystal & (u8)(1 << i_item) ? TRUE : FALSE;
}
void dSv_player_collect_c::onCollectMirror(u8 i_item) {
this->mirror |= (u8)(1 << i_item);
}
bool dSv_player_collect_c::isCollectMirror(u8 i_item) const {
return this->mirror & (u8)(1 << i_item) ? true : false;
BOOL dSv_player_collect_c::isCollectMirror(u8 i_item) const {
return this->mirror & (u8)(1 << i_item) ? TRUE : FALSE;
}
void dSv_player_wolf_c::init(void) {
@ -767,11 +767,11 @@ void dSv_light_drop_c::onLightDropGetFlag(u8 i_nowLevel) {
}
}
bool dSv_light_drop_c::isLightDropGetFlag(u8 i_nowLevel) const {
BOOL dSv_light_drop_c::isLightDropGetFlag(u8 i_nowLevel) const {
if ((i_nowLevel >= LIGHT_DROP_STAGE) && (i_nowLevel <= 6)) {
return 0;
}
return this->light_drop_get_flag & (u8)(1 << i_nowLevel) ? true : false;
return this->light_drop_get_flag & (u8)(1 << i_nowLevel) ? TRUE : FALSE;
}
void dSv_letter_info_c::init(void) {
@ -789,16 +789,16 @@ void dSv_letter_info_c::onLetterGetFlag(int i_no) {
this->letter_get_bitfields[i_no >> 0x5] |= 0x1 << (i_no & 0x1F);
}
bool dSv_letter_info_c::isLetterGetFlag(int i_no) const {
return this->letter_get_bitfields[i_no >> 0x5] & (1 << (i_no & 0x1F)) ? true : false;
BOOL dSv_letter_info_c::isLetterGetFlag(int i_no) const {
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_bitfields[i_no >> 0x5] |= 0x1 << (i_no & 0x1F);
}
int dSv_letter_info_c::isLetterReadFlag(int i_no) const {
return this->letter_read_bitfields[i_no >> 5] & 1 << (i_no & 0x1F) ? 1 : 0;
BOOL dSv_letter_info_c::isLetterReadFlag(int i_no) const {
return this->letter_read_bitfields[i_no >> 5] & 1 << (i_no & 0x1F) ? TRUE : FALSE;
}
void dSv_fishing_info_c::init(void) {
@ -948,8 +948,8 @@ void dSv_memBit_c::offTbox(int i_no) {
this->area_flags_bitfields1[i_no >> 5] &= ~(1 << (i_no & 0x1F));
}
bool dSv_memBit_c::isTbox(int i_no) const {
return 1 << (i_no & 0x1f) & this->area_flags_bitfields1[i_no >> 0x5] ? true : false;
BOOL dSv_memBit_c::isTbox(int i_no) const {
return 1 << (i_no & 0x1f) & this->area_flags_bitfields1[i_no >> 0x5] ? TRUE : FALSE;
}
void dSv_memBit_c::onSwitch(int i_no) {
@ -959,8 +959,8 @@ void dSv_memBit_c::offSwitch(int i_no) {
(this->area_flags_bitfields1 + (i_no >> 0x5))[0x2] &= ~(0x1 << (i_no & 0x1F));
}
bool dSv_memBit_c::isSwitch(int i_no) const {
return (this->area_flags_bitfields2[i_no >> 0x5] & 0x1 << (i_no & 0x1F)) ? true : false;
BOOL dSv_memBit_c::isSwitch(int i_no) const {
return (this->area_flags_bitfields2[i_no >> 0x5] & 0x1 << (i_no & 0x1F)) ? TRUE : FALSE;
}
// instruction in wrong place
@ -981,8 +981,8 @@ void dSv_memBit_c::onItem(int i_no) {
(this->area_flags_bitfields1 + (i_no >> 0x5))[0x6] |= 0x1 << (i_no & 0x1F);
}
bool dSv_memBit_c::isItem(int i_no) const {
return (&this->rupee_flags_bitfields)[i_no >> 0x5] & 0x1 << (i_no & 0x1F) ? true : false;
BOOL dSv_memBit_c::isItem(int i_no) const {
return (&this->rupee_flags_bitfields)[i_no >> 0x5] & 0x1 << (i_no & 0x1F) ? TRUE : FALSE;
}
void dSv_memBit_c::onDungeonItem(int i_no) {
@ -1009,8 +1009,8 @@ void dSv_event_c::offEventBit(u16 i_no) {
}
// (u8) cast doesn't work here, thank u metrowerks
int dSv_event_c::isEventBit(u16 i_no) const {
return this->events[(i_no >> 8)] & (i_no & 0xFF) ? 1 : 0;
BOOL dSv_event_c::isEventBit(u16 i_no) const {
return this->events[(i_no >> 8)] & (i_no & 0xFF) ? TRUE : FALSE;
}
void dSv_event_c::setEventReg(u16 param_1, u8 param_2) {
@ -1053,8 +1053,8 @@ void dSv_memory2_c::offVisitedRoom(int i_no) {
this->unk0[i_no >> 5] &= ~(1 << (i_no & 0x1F));
}
bool dSv_memory2_c::isVisitedRoom(int param_1) {
return (1 << (param_1 & 0x1F) & this->unk0[param_1 >> 5]) ? true : false;
BOOL dSv_memory2_c::isVisitedRoom(int param_1) {
return (1 << (param_1 & 0x1F) & this->unk0[param_1 >> 5]) ? TRUE : FALSE;
}
bool dSv_danBit_c::init(s8 i_stage) {
@ -1089,8 +1089,8 @@ void dSv_danBit_c::offSwitch(int i_no) {
this->switch_bitfield[i_no >> 5] &= ~(1 << (i_no & 0x1F));
}
bool dSv_danBit_c::isSwitch(int i_no) const {
return this->switch_bitfield[i_no >> 0x5] & (0x1 << (i_no & 0x1F)) ? true : false;
BOOL dSv_danBit_c::isSwitch(int i_no) const {
return this->switch_bitfield[i_no >> 0x5] & (0x1 << (i_no & 0x1F)) ? TRUE : FALSE;
}
bool dSv_danBit_c::revSwitch(int i_no) {
@ -1103,8 +1103,8 @@ void dSv_danBit_c::onItem(int i_no) {
this->item_bitfield[i_no >> 5] |= 1 << (i_no & 0x1F);
}
bool dSv_danBit_c::isItem(int i_no) const {
return this->item_bitfield[i_no >> 5] & 1 << (i_no & 0x1F) ? true : false;
BOOL dSv_danBit_c::isItem(int i_no) const {
return this->item_bitfield[i_no >> 5] & 1 << (i_no & 0x1F) ? TRUE : FALSE;
}
void dSv_zoneBit_c::init(void) {
@ -1136,8 +1136,8 @@ void dSv_zoneBit_c::offSwitch(int i_no) {
this->switch_bitfield[i_no >> 4] &= ~(1 << (i_no & 0xF));
}
bool dSv_zoneBit_c::isSwitch(int i_no) const {
return this->switch_bitfield[i_no >> 4] & 1 << (i_no & 0xF) ? true : false;
BOOL dSv_zoneBit_c::isSwitch(int i_no) const {
return this->switch_bitfield[i_no >> 4] & 1 << (i_no & 0xF) ? TRUE : FALSE;
}
// instruction in wrong place
@ -1162,8 +1162,8 @@ void dSv_zoneBit_c::offOneSwitch(int i_no) {
this->room_switch &= ~(1 << i_no);
}
bool dSv_zoneBit_c::isOneSwitch(int i_no) const {
return this->room_switch & 1 << i_no ? true : false;
BOOL dSv_zoneBit_c::isOneSwitch(int i_no) const {
return this->room_switch & 1 << i_no ? TRUE : FALSE;
}
bool dSv_zoneBit_c::revOneSwitch(int i_no) {
@ -1176,16 +1176,16 @@ void dSv_zoneBit_c::onItem(int i_no) {
this->item_bitfield[i_no >> 4] |= (u16)(1 << (i_no & 0xF));
}
bool dSv_zoneBit_c::isItem(int i_no) const {
return this->item_bitfield[i_no >> 4] & 1 << (i_no & 0xF) ? true : false;
BOOL dSv_zoneBit_c::isItem(int i_no) const {
return this->item_bitfield[i_no >> 4] & 1 << (i_no & 0xF) ? TRUE : FALSE;
}
void dSv_zoneBit_c::onOneItem(int i_no) {
this->room_item |= (u16)(1 << i_no);
}
bool dSv_zoneBit_c::isOneItem(int i_no) const {
return this->room_item & 1 << i_no ? true : false;
BOOL dSv_zoneBit_c::isOneItem(int i_no) const {
return this->room_item & 1 << i_no ? TRUE : FALSE;
}
void dSv_zoneActor_c::init(void) {
@ -1202,8 +1202,8 @@ void dSv_zoneActor_c::off(int i_id) {
this->actor_bitfield[i_id >> 5] &= ~(1 << (i_id & 0x1F));
}
bool dSv_zoneActor_c::is(int i_id) const {
return this->actor_bitfield[i_id >> 5] & 1 << (i_id & 0x1F) ? true : false;
BOOL dSv_zoneActor_c::is(int i_id) const {
return this->actor_bitfield[i_id >> 5] & 1 << (i_id & 0x1F) ? TRUE : FALSE;
}
void dSv_zone_c::init(int param_1) {
@ -1212,15 +1212,15 @@ void dSv_zone_c::init(int param_1) {
zone_actor.init();
}
void dSv_restart_c::setRoom(const cXyz& i_position, short i_angle, s8 param_3) {
void dSv_restart_c::setRoom(const cXyz& i_position, s16 i_x_rotation, s8 param_3) {
this->unk0 = param_3;
this->position = i_position;
this->angle = i_angle;
this->mPosition = i_position;
this->mXRotation = i_x_rotation;
}
void dSv_turnRestart_c::set(const cXyz& i_position, short i_angle, s8 param_3, u32 param_4) {
this->position = i_position;
this->angle = i_angle;
void dSv_turnRestart_c::set(const cXyz& i_position, s16 i_x_rotation, s8 param_3, u32 param_4) {
this->mPosition = i_position;
this->mXRotation = i_x_rotation;
this->unk18 = param_3;
this->unk12 = param_4;
}
@ -1335,7 +1335,7 @@ void dSv_info_c::offSwitch(int i_no, int i_roomNo) {
// doesn't like getZoneBit() returning a reference
#ifdef NONMATCHING
bool dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
BOOL dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
if ((i_no == -1) || (i_no == 0xFF)) {
return false;
}
@ -1354,7 +1354,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 {
asm BOOL dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
nofralloc
#include "d/d_save/d_save/asm/func_80035360.s"
}
@ -1379,7 +1379,7 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) {
}
}
asm bool dSv_info_c::isItem(int i_no, int i_roomNo) const {
asm BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const {
nofralloc
#include "d/d_save/d_save/asm/func_80035590.s"
}
@ -1402,7 +1402,7 @@ void dSv_info_c::offActor(int i_id, int i_roomNo) {
this->zones[zoneNo].getZoneActor().off(i_id);
}
asm bool dSv_info_c::isActor(int i_id, int i_roomNo) const {
asm BOOL dSv_info_c::isActor(int i_id, int i_roomNo) const {
nofralloc
#include "d/d_save/d_save/asm/func_80035724.s"
}