mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 23:05:36 -04:00
more d_item / d_a_horse_static done (#32)
* more d_item funcs done / add dSv_info_c to gameinfo * checkWait ok / remove asm
This commit is contained in:
@@ -1,20 +1,12 @@
|
||||
#include "d/d_a/d_a_horse_static/d_a_horse_static.h"
|
||||
#include "global.h"
|
||||
|
||||
// 1 instruction off
|
||||
#ifdef NONMATCHING
|
||||
u32 e_wb_class::checkWait(void){
|
||||
u32 temp;
|
||||
|
||||
temp = (0x2a - (this->unk1460)); // missing a cntlzw
|
||||
return temp >> 5 & 0xff;
|
||||
temp = __cntlzw(0x2a - this->unk1460);
|
||||
return (u8)(temp >> 5);
|
||||
}
|
||||
#else
|
||||
asm u32 e_wb_class::checkWait(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_horse_static/asm/func_80037C7C.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
void e_wb_class::setPlayerRideNow(void){
|
||||
this->unk1680 = 0x67;
|
||||
@@ -29,7 +21,7 @@ void e_wb_class::setPlayerRide(void){
|
||||
this->unk1460 = 0;
|
||||
this->unk1726 |= 3;
|
||||
|
||||
setLinkRiding(true); // needs something else here
|
||||
setLinkRiding(true); // needs to call Z2CreatureRide
|
||||
}
|
||||
#else
|
||||
asm void e_wb_class::setPlayerRide(void) {
|
||||
|
||||
+326
-362
File diff suppressed because it is too large
Load Diff
@@ -93,7 +93,7 @@ u16 dSv_player_status_a_c::getRupeeMax(void) const {
|
||||
|
||||
int dSv_player_status_a_c::isMagicFlag(u8 i_magic) const {
|
||||
if (i_magic == 0) {
|
||||
return g_dComIfG_gameInfo.save_file.getEventFlags().isEventBit(0x2304);
|
||||
return g_dComIfG_gameInfo.info.getSaveFile().getEventFlags().isEventBit(0x2304);
|
||||
}
|
||||
return (this->magic_flag & (u8)(1 << i_magic)) ? 1 : 0;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ void dSv_player_item_c::setItem(int current_items_index, u8 new_items_index) {
|
||||
int select_item_index = DEFAULT_SELECT_ITEM_INDEX;
|
||||
|
||||
do {
|
||||
if (current_items_index == g_dComIfG_gameInfo.save_file.getPlayerStatusA().getSelectItemIndex(select_item_index)) {
|
||||
if (current_items_index == g_dComIfG_gameInfo.info.getSaveFile().getPlayerStatusA().getSelectItemIndex(select_item_index)) {
|
||||
dComIfGp_setSelectItem(select_item_index);
|
||||
}
|
||||
select_item_index++;
|
||||
@@ -632,7 +632,7 @@ void dSv_player_item_record_c::setBottleNum(u8 i_bottleIdx, u8 bottle_num) {
|
||||
u8 dSv_player_item_record_c::addBottleNum(u8 i_bottleIdx, short param_2) {
|
||||
int iVar3 = this->bottles[i_bottleIdx] + param_2;
|
||||
|
||||
g_dComIfG_gameInfo.save_file.getPlayerItem().getItem((u8)(i_bottleIdx + 0xB), true);
|
||||
g_dComIfG_gameInfo.info.getSaveFile().getPlayerItem().getItem((u8)(i_bottleIdx + 0xB), true);
|
||||
|
||||
if (iVar3 < 0) {
|
||||
this->bottles[i_bottleIdx] = 0;
|
||||
@@ -676,7 +676,7 @@ u8 dSv_player_item_max_c::getBombNum(u8 param_1) const {
|
||||
u8 iVar3;
|
||||
|
||||
iVar3 = 0x1;
|
||||
if (g_dComIfG_gameInfo.save_file.getPlayerGetItem().isFirstBit(BOMB_BAG_LV2)) {
|
||||
if (g_dComIfG_gameInfo.info.getSaveFile().getPlayerGetItem().isFirstBit(BOMB_BAG_LV2)) {
|
||||
iVar3 = 0x2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user