Factor out CollectHeartVessel (#1216)

This commit is contained in:
sozud 2024-05-30 15:27:00 -07:00 committed by GitHub
parent 385ad23949
commit 4ba815e4ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 15 deletions

View File

@ -3,7 +3,7 @@ void CollectHeartVessel(void) {
g_api.PlaySfx(NA_SE_PL_COLLECT_HEART);
g_Status.hearts += HEART_VESSEL_RICHTER;
if (g_Status.heartsMax < g_Status.hearts) {
if (g_Status.hearts > g_Status.heartsMax) {
g_Status.hearts = g_Status.heartsMax;
}
} else {

View File

@ -121,20 +121,7 @@ void CollectSubweapon(u16 subWeaponIdx) {
DestroyEntity(g_CurrentEntity);
}
void CollectHeartVessel(void) {
if (g_PlayableCharacter != PLAYER_ALUCARD) {
g_api.PlaySfx(NA_SE_PL_COLLECT_HEART);
g_Status.hearts += HEART_VESSEL_RICHTER;
if (g_Status.hearts > g_Status.heartsMax) {
g_Status.hearts = g_Status.heartsMax;
}
} else {
g_api.PlaySfx(NA_SE_PL_COLLECT_HEART);
g_api.func_800FE044(HEART_VESSEL_INCREASE, 0x4000);
}
DestroyEntity(g_CurrentEntity);
}
#include "../collect_heart_vessel.h"
void CollectLifeVessel(void) {
g_api.PlaySfx(NA_SE_PL_COLLECT_HEART);