Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added state control functions setter;
- Loading branch information
Showing
6 changed files
with
34 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
#define ENTITY_H | ||
|
||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
struct room_sector_s; | ||
struct obb_s; | ||
|
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 @@ | ||
|
||
#include "../skeletal_model.h" | ||
#include "../entity.h" | ||
#include "../character_controller.h" | ||
#include "state_control.h" | ||
|
||
int StateControl_Lara(struct entity_s *ent, struct ss_animation_s *ss_anim); | ||
void StateControl_LaraSetIdleAnim(struct entity_s *ent, int anim_type, int move_type); | ||
|
||
|
||
void StateControl_SetStateFunctions(struct entity_s *ent, int functions_id) | ||
{ | ||
if(ent && ent->character) | ||
{ | ||
switch(functions_id) | ||
{ | ||
case STATE_FUNCTIONS_LARA: | ||
ent->character->state_func = StateControl_Lara; | ||
ent->character->set_idle_anim_func = StateControl_LaraSetIdleAnim; | ||
break; | ||
} | ||
} | ||
} |
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