mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-27 16:20:34 +00:00
EnFr (#494)
* all matching * implement feedback * feedback * feedback * cleanup param macros
This commit is contained in:
parent
5b7df3f1ca
commit
64ecb146ae
3
spec
3
spec
@ -1329,8 +1329,7 @@ beginseg
|
||||
name "ovl_En_Fr"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fr/z_en_fr.o"
|
||||
include "build/data/ovl_En_Fr/ovl_En_Fr.data.o"
|
||||
include "build/data/ovl_En_Fr/ovl_En_Fr.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -14,7 +14,6 @@ void EnFr_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFr_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFr_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
#if 0
|
||||
const ActorInit En_Fr_InitVars = {
|
||||
ACTOR_EN_FR,
|
||||
ACTORCAT_ITEMACTION,
|
||||
@ -27,10 +26,27 @@ const ActorInit En_Fr_InitVars = {
|
||||
(ActorFunc)NULL,
|
||||
};
|
||||
|
||||
#endif
|
||||
void EnFr_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnFr* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fr/EnFr_Init.s")
|
||||
if (Flags_GetSwitch(globalCtx, ENFR_GET_SWITCHFLAG(&this->actor))) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else {
|
||||
this->actor.targetMode = ENFR_GET_TARGETMODE(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fr/EnFr_Destroy.s")
|
||||
void EnFr_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Fr/EnFr_Update.s")
|
||||
void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnFr* this = THIS;
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, ENFR_GET_SWITCHFLAG(&this->actor))) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else if (this->actor.xyzDistToPlayerSq < SQ(IREG(29))) {
|
||||
this->actor.flags &= ~0x40000000;
|
||||
} else {
|
||||
this->actor.flags |= 0x40000000;
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,9 @@
|
||||
|
||||
struct EnFr;
|
||||
|
||||
#define ENFR_GET_SWITCHFLAG(thisx) ((thisx)->params & 0x7F)
|
||||
#define ENFR_GET_TARGETMODE(thisx) (((thisx)->params >> 7) & 0xF)
|
||||
|
||||
typedef struct EnFr {
|
||||
/* 0x000 */ Actor actor;
|
||||
} EnFr; // size = 0x144
|
||||
|
Loading…
Reference in New Issue
Block a user