dSv_player_item_max_c::init ok dSv_player_item_max_c::setBombNum ok

This commit is contained in:
unknown
2020-11-23 00:31:50 -05:00
parent e956a55a26
commit 8b358fdf8d
17 changed files with 224 additions and 173 deletions
+63
View File
@@ -607,3 +607,66 @@ asm u8 dSv_player_item_record_c::addBottleNum(u8 param_1, short param_2) {
u8 dSv_player_item_record_c::getBottleNum(u8 bottle_index) const {
return bottles[bottle_index];
}
void dSv_player_item_max_c::init(void) {
for (int i = 0; i < 7; i++) {
this->unk0[i] = 30;
}
setBombNum(REGULAR_BOMBS,30);
setBombNum(WATER_BOMBS,15);
setBombNum(BOMBLINGS,10);
this->unk0[7] = 0;
}
void dSv_player_item_max_c::setBombNum(u8 bomb_id,u8 bomb_max) {
switch (bomb_id) {
case REGULAR_BOMBS: this->unk0[1] = bomb_max; return;
case WATER_BOMBS: this->unk0[2] = bomb_max; return;
case BOMBLINGS: this->unk0[6] = bomb_max; return;
}
}
// this is close, the isFirstBit keeps screwing everything up :(
// u8 dSv_player_item_max_c::getBombNum(u8 param_1) const {
// u8 uVar2;
// u8 iVar3;
// iVar3 = 0x1;
// if (isFirstBit(79)) {
// iVar3 = 0x2;
// }
// switch (param_1) {
// case WATER_BOMBS: return (u8)(this->bomb_bags_ammo_max[0x1] * iVar3); break;
// case REGULAR_BOMBS: return (u8)(this->bomb_bags_ammo_max[0x1] * iVar3); break;
// case BOMBLINGS: return (u8)(this->unk_ammo_max[0x2] * iVar3); break;
// default: uVar2 = 0;
// }
// return uVar2;
// }
asm u8 dSv_player_item_max_c::getBombNum(u8 param_1) const {
nofralloc
#include "func_800340F8.s"
}
// This is a match but the linker refuses to find it's reference. Thank u metrowerks
// void dSv_player_collect_c::init(void) {
// for (int i = 0; i < 8; i++) {
// this->unk0[i] = 0;
// }
// this->unk8 = 0;
// this->crystal = 0;
// this->mirror = 0;
// this->unk11 = 0xFF;
// this->poe_count = 0;
// }
asm void dSv_player_collect_c::init(void) {
nofralloc
#include "func_800341AC.s"
}