Files
HackerOoT/template_files/z_actor.c

56 lines
1.3 KiB
C

/*
* File: {actorFileName}.c
* Overlay: ovl_{actorSpec}
* Description: Custom Actor
*/
#include "{actorFileName}.h"
#include "play_state.h"
{includeObject}
#define FLAGS (0)
void {actorSpec}_Init(Actor* thisx, PlayState* play);
void {actorSpec}_Destroy(Actor* thisx, PlayState* play);
void {actorSpec}_Update(Actor* thisx, PlayState* play);
void {actorSpec}_Draw(Actor* thisx, PlayState* play);
void {actorSpec}_DoNothing({actorSpec}* this, PlayState* play);
{actorVar} {actorSpec}_{actorInitVar} = {
{actorDefine},
ACTORCAT_PROP,
FLAGS,
{objectDefine},
sizeof({actorSpec}),
(ActorFunc){actorSpec}_Init,
(ActorFunc){actorSpec}_Destroy,
(ActorFunc){actorSpec}_Update,
(ActorFunc){actorSpec}_Draw,
};
void {actorSpec}_Init(Actor* thisx, PlayState* play) {
{actorSpec}* this = ({actorSpec}*)thisx;
this->actionFunc = {actorSpec}_DoNothing;
}
void {actorSpec}_Destroy(Actor* thisx, PlayState* play) {
{actorSpec}* this = ({actorSpec}*)thisx;
}
void {actorSpec}_Update(Actor* thisx, PlayState* play) {
{actorSpec}* this = ({actorSpec}*)thisx;
this->actionFunc(this, play);
}
void {actorSpec}_Draw(Actor* thisx, PlayState* play) {
{actorSpec}* this = ({actorSpec}*)thisx;
}
void {actorSpec}_DoNothing({actorSpec}* this, PlayState* play) {
}