mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-23 00:29:50 -04:00
Replace Actor_MarkForDeath with Actor_Kill (#1118)
* Replace `Actor_MarkForDeath` with `Actor_Kill` * Replace if-else with early returns, as per hensldm's review * Respond to Elliptic's review * Redundant spelling
This commit is contained in:
+5
-5
@@ -1026,7 +1026,7 @@ void* func_800B6680(PlayState* play, s16 id) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Actor_MarkForDeath(Actor* actor) {
|
||||
void Actor_Kill(Actor* actor) {
|
||||
actor->draw = NULL;
|
||||
actor->update = NULL;
|
||||
actor->flags &= ~ACTOR_FLAG_1;
|
||||
@@ -2346,7 +2346,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
|
||||
}
|
||||
} else {
|
||||
if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
Actor_MarkForDeath(actor);
|
||||
Actor_Kill(actor);
|
||||
} else {
|
||||
s32 tmp = (params->unk_08 == 0);
|
||||
|
||||
@@ -2872,7 +2872,7 @@ void func_800BA6FC(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
while (actor != NULL) {
|
||||
if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
Actor_MarkForDeath(actor);
|
||||
Actor_Kill(actor);
|
||||
}
|
||||
|
||||
actor = actor->next;
|
||||
@@ -2896,7 +2896,7 @@ void func_800BA798(PlayState* play, ActorContext* actorCtx) {
|
||||
if (!actor->isDrawn) {
|
||||
actor = Actor_Delete(actorCtx, actor, play);
|
||||
} else {
|
||||
Actor_MarkForDeath(actor);
|
||||
Actor_Kill(actor);
|
||||
Actor_Destroy(actor, play);
|
||||
actor = actor->next;
|
||||
}
|
||||
@@ -2925,7 +2925,7 @@ void func_800BA8B8(PlayState* play, ActorContext* actorCtx) {
|
||||
if (!actor->isDrawn) {
|
||||
actor = Actor_Delete(actorCtx, actor, play);
|
||||
} else {
|
||||
Actor_MarkForDeath(actor);
|
||||
Actor_Kill(actor);
|
||||
Actor_Destroy(actor, play);
|
||||
actor = actor->next;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
||||
this->collectibleFlag = 0;
|
||||
this->actor.params = ITEM00_RECOVERY_HEART;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -358,7 +358,7 @@ void func_800A640C(EnItem00* this, PlayState* play) {
|
||||
if (this->unk152 == 0) {
|
||||
if ((this->actor.params != ITEM00_SMALL_KEY) && (this->actor.params != ITEM00_HEART_PIECE) &&
|
||||
(this->actor.params != ITEM00_HEART_CONTAINER)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->unk152 == 0) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D);
|
||||
|
||||
if (this->actor.floorHeight <= BGCHECK_Y_MIN) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -659,7 +659,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
case ITEM00_COMPASS:
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
Flags_SetCollectible(play, this->collectibleFlag);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -672,7 +672,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
} else if (getItemId != GI_NONE) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
Flags_SetCollectible(play, this->collectibleFlag);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user