mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 20:12:30 +01:00
victory!
This commit is contained in:
parent
13e47dbc33
commit
f8343fa522
@ -50,7 +50,7 @@ OBJCOPY = $(CROSS)objcopy
|
|||||||
CPPFLAGS = -Iinclude -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2
|
CPPFLAGS = -Iinclude -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2
|
||||||
ASFLAGS = -EB -march=vr4300 -mtune=vr4300 -Iinclude
|
ASFLAGS = -EB -march=vr4300 -mtune=vr4300 -Iinclude
|
||||||
OLDASFLAGS= -EB -Iinclude
|
OLDASFLAGS= -EB -Iinclude
|
||||||
CFLAGS = -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300
|
CFLAGS = -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32
|
||||||
LDFLAGS = -T undefined_syms.txt -T $(LD_SCRIPT) -Map $(BUILD_DIR)/papermario.map --no-check-sections
|
LDFLAGS = -T undefined_syms.txt -T $(LD_SCRIPT) -Map $(BUILD_DIR)/papermario.map --no-check-sections
|
||||||
|
|
||||||
######################## Targets #############################
|
######################## Targets #############################
|
||||||
|
@ -130,7 +130,18 @@ INCLUDE_ASM(code_80850_len_3060, recover_fp);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_80850_len_3060, recover_hp);
|
INCLUDE_ASM(code_80850_len_3060, recover_hp);
|
||||||
|
|
||||||
INCLUDE_ASM(code_80850_len_3060, subtract_hp);
|
void subtract_hp(s32 amt) {
|
||||||
|
player_data* playerData = &gPlayerData;
|
||||||
|
s32 newHP = gPlayerData.curHP;
|
||||||
|
|
||||||
|
if (amt > 0) {
|
||||||
|
newHP -= amt;
|
||||||
|
}
|
||||||
|
if (amt < 0 || newHP < 1) {
|
||||||
|
newHP = 1;
|
||||||
|
}
|
||||||
|
playerData->curHP = newHP;
|
||||||
|
}
|
||||||
|
|
||||||
s8 has_full_hp(void) {
|
s8 has_full_hp(void) {
|
||||||
player_data* playerData = &gPlayerData;
|
player_data* playerData = &gPlayerData;
|
||||||
@ -166,4 +177,3 @@ s8 subtract_fortress_keys(s8 amt) {
|
|||||||
s8 get_fortress_key_count(void) {
|
s8 get_fortress_key_count(void) {
|
||||||
return gPlayerData.fortressKeyCount;
|
return gPlayerData.fortressKeyCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user