summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPheenoh <pheenoh@gmail.com>2022-12-22 13:51:31 -0700
committerPheenoh <pheenoh@gmail.com>2022-12-22 13:51:31 -0700
commitb1f302c0bdf4a519ba9321ecae50b9dc33cb680f (patch)
treedab1d3bbd3dc359af1ee81bbdd7af44fd675ab22 /src
parent9e4944c4333936eac36dcc2d45b3018cc15601f4 (diff)
fixes from taka/lunarsoap
Diffstat (limited to 'src')
-rw-r--r--src/d/a/d_a_player.cpp37
1 files changed, 3 insertions, 34 deletions
diff --git a/src/d/a/d_a_player.cpp b/src/d/a/d_a_player.cpp
index 899850c247..3f4012ccce 100644
--- a/src/d/a/d_a_player.cpp
+++ b/src/d/a/d_a_player.cpp
@@ -303,24 +303,9 @@ BOOL daPy_py_c::checkFishingRodItem(int i_itemNo) {
}
/* 8015EA48-8015EA88 159388 0040+00 0/0 3/3 0/0 .text checkBombItem__9daPy_py_cFi */
-#ifdef NONMATCHING
BOOL daPy_py_c::checkBombItem(int param_0) {
- bool ret = true;
- if (param_0 != NORMAL_BOMB || param_0 != WATER_BOMB) {
- ret = false;
- }
- return ret;
+ return param_0 == NORMAL_BOMB || param_0 == WATER_BOMB || param_0 == POKE_BOMB;
}
-#else
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm BOOL daPy_py_c::checkBombItem(int param_0) {
- nofralloc
-#include "asm/d/a/d_a_player/checkBombItem__9daPy_py_cFi.s"
-}
-#pragma pop
-#endif
/* 8015EA88-8015EAD8 1593C8 0050+00 0/0 5/5 0/0 .text checkBottleItem__9daPy_py_cFi */
// is there a way to write this with a switch?
@@ -644,27 +629,11 @@ BOOL daPy_py_c::checkMasterSwordEquip() {
/* 8015F3C4-8015F3FC 159D04 0038+00 0/0 4/4 0/0 .text checkWoodShieldEquip__9daPy_py_cFv
*/
-#ifdef NONMATCHING
BOOL daPy_py_c::checkWoodShieldEquip() {
- int equipShield = dComIfGs_getSelectEquipShield();
- bool isWoodShield = true;
-
- if (equipShield == SHIELD) {
- isWoodShield = false;
- }
+ u16 equipShield = dComIfGs_getSelectEquipShield();
- return isWoodShield;
+ return equipShield == WOOD_SHIELD || equipShield == SHIELD;
}
-#else
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm BOOL daPy_py_c::checkWoodShieldEquip() {
- nofralloc
-#include "asm/d/a/d_a_player/checkWoodShieldEquip__9daPy_py_cFv.s"
-}
-#pragma pop
-#endif
BOOL daPy_py_c::checkNowWolf() {
return dComIfGp_getLinkPlayer()->i_checkWolf();