forked from ACreTeam/ac-decomp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ACreTeam#131 from Cuyler36/ac_ev_dokutu
Implement & link ac_ev_dokutu.c, NPC_ACTOR framework
- Loading branch information
Showing
5 changed files
with
141 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#include "ac_ev_dokutu.h" | ||
|
||
#include "m_common_data.h" | ||
|
||
#include "../rel/ac_ev_dokutu_talk.c_inc" | ||
|
||
static void aEVD_actor_ct(ACTOR* actorx, GAME* game); | ||
static void aEVD_actor_dt(ACTOR* actorx, GAME* game); | ||
static void aEVD_actor_init(ACTOR* actorx, GAME* game); | ||
static void aEVD_actor_save(ACTOR* actorx, GAME* game); | ||
static void aEVD_actor_move(ACTOR* actorx, GAME* game); | ||
static void aEVD_actor_draw(ACTOR* actorx, GAME* game); | ||
|
||
ACTOR_PROFILE Ev_Dokutu_Profile = { | ||
mAc_PROFILE_EV_DOKUTU, | ||
ACTOR_PART_NPC, | ||
0, | ||
SP_NPC_EV_DOKUTU, | ||
ACTOR_OBJ_BANK_KEEP, | ||
sizeof(EVENT_DOKUTU_ACTOR), | ||
&aEVD_actor_ct, | ||
&aEVD_actor_dt, | ||
&aEVD_actor_init, | ||
mActor_NONE_PROC1, | ||
&aEVD_actor_save | ||
}; | ||
|
||
static aNPC_ct_data_c ct_data = { | ||
&aEVD_actor_move, | ||
&aEVD_actor_draw, | ||
3, | ||
&aEVD_talk_request, | ||
&aEVD_talk_init, | ||
&aEVD_talk_end_chk, | ||
0 | ||
}; | ||
|
||
static void aEVD_actor_ct(ACTOR* actorx, GAME* game) { | ||
if ((*Common_Get(clip).npc_clip->birth_check_proc)(actorx, game) == TRUE) { | ||
(*Common_Get(clip).npc_clip->ct_proc)(actorx, game, &ct_data); | ||
} | ||
} | ||
|
||
static void aEVD_actor_save(ACTOR* actorx, GAME* game) { | ||
mNpc_RenewalSetNpc(actorx); | ||
} | ||
|
||
static void aEVD_actor_dt(ACTOR* actorx, GAME* game) { | ||
(*Common_Get(clip).npc_clip->dt_proc)(actorx, game); | ||
} | ||
|
||
static void aEVD_actor_init(ACTOR* actorx, GAME* game) { | ||
(*Common_Get(clip).npc_clip->init_proc)(actorx, game); | ||
} | ||
|
||
static void aEVD_actor_move(ACTOR* actorx, GAME* game) { | ||
(*Common_Get(clip).npc_clip->move_proc)(actorx, game); | ||
} | ||
|
||
static void aEVD_actor_draw(ACTOR* actorx, GAME* game) { | ||
(*Common_Get(clip).npc_clip->draw_proc)(actorx, game); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
static void aEVD_set_talk_info(ACTOR* actorx) { | ||
mDemo_Set_msg_num(0x3146); | ||
} | ||
|
||
static void aEVD_talk_request(ACTOR* actorx, GAME* game) { | ||
mDemo_Request(mDemo_TYPE_TALK, actorx, &aEVD_set_talk_info); | ||
} | ||
|
||
static int aEVD_talk_init(ACTOR* actorx, GAME* game) { | ||
mDemo_Set_ListenAble(); | ||
return TRUE; | ||
} | ||
|
||
static int aEVD_talk_end_chk(ACTOR* actorx, GAME* game) { | ||
int res = FALSE; | ||
|
||
if (mDemo_Check(mDemo_TYPE_TALK, actorx) == FALSE) { | ||
res = TRUE; | ||
} | ||
|
||
return res; | ||
} |