FS2_Open
Open source remastering of the Freespace 2 engine
modelanim.h File Reference
#include <limits.h>

Go to the source code of this file.

Classes

struct  queued_animation
 
class  triggered_rotation
 
struct  stack_item
 

Macros

#define MAX_TRIGGERED_ANIMATIONS   15
 
#define TRIGGER_TYPE_NONE   -1
 
#define TRIGGER_TYPE_INITIAL   0
 
#define TRIGGER_TYPE_DOCKING_STAGE_1   1
 
#define TRIGGER_TYPE_DOCKING_STAGE_2   2
 
#define TRIGGER_TYPE_DOCKING_STAGE_3   3
 
#define TRIGGER_TYPE_DOCKED   4
 
#define TRIGGER_TYPE_PRIMARY_BANK   5
 
#define TRIGGER_TYPE_SECONDARY_BANK   6
 
#define TRIGGER_TYPE_DOCK_BAY_DOOR   7
 
#define TRIGGER_TYPE_AFTERBURNER   8
 
#define TRIGGER_TYPE_TURRET_FIRING   9
 
#define TRIGGER_TYPE_SCRIPTED   10
 
#define TRIGGER_TYPE_TURRET_FIRED   11
 
#define MAX_TRIGGER_ANIMATION_TYPES   12
 
#define ANIMATION_SUBTYPE_ALL   INT_MAX
 

Typedefs

typedef struct stack_item stack_item
 
typedef SCP_vector< stack_itemanimation_stack
 

Enumerations

enum  EModelAnimationPosition { MA_POS_NOT_SET = 0, MA_POS_SET = 1, MA_POS_READY = 2 }
 

Functions

void queued_animation_init (queued_animation *qa)
 
void queued_animation_correct (queued_animation *qa)
 
void model_anim_submodel_trigger_rotate (model_subsystem *psub, ship_subsys *ss)
 
void model_anim_set_initial_states (ship *shipp)
 
void model_anim_fix_reverse_times (ship_info *sip)
 
int model_anim_match_type (char *p)
 
bool model_anim_start_type (ship_subsys *pss, int animation_type, int subtype, int direction, bool instant=false)
 
bool model_anim_start_type (ship *shipp, int animation_type, int subtype, int direction, bool instant=false)
 
int model_anim_get_time_type (ship_subsys *pss, int animation_type, int subtype)
 
int model_anim_get_time_type (ship *shipp, int animation_type, int subtype)
 How long an animation is going to take to complete. More...
 
void model_anim_handle_multiplayer (ship *shipp)
 
bool model_anim_push_and_start_type (int stack_unique_id, ship *shipp, int animation_type, int subtype, int direction, bool instant=false)
 
bool model_anim_pop_and_start_type (int stack_unique_id)
 

Variables

char * Animation_type_names [MAX_TRIGGER_ANIMATION_TYPES]
 
SCP_vector< triggered_rotationTriggered_rotations
 
SCP_map< int, animation_stackAnimation_map
 

Macro Definition Documentation

#define ANIMATION_SUBTYPE_ALL   INT_MAX

Definition at line 52 of file modelanim.h.

#define MAX_TRIGGER_ANIMATION_TYPES   12

Definition at line 40 of file modelanim.h.

#define MAX_TRIGGERED_ANIMATIONS   15

Definition at line 17 of file modelanim.h.

#define TRIGGER_TYPE_AFTERBURNER   8

Definition at line 35 of file modelanim.h.

#define TRIGGER_TYPE_DOCK_BAY_DOOR   7

Definition at line 34 of file modelanim.h.

#define TRIGGER_TYPE_DOCKED   4

Definition at line 31 of file modelanim.h.

#define TRIGGER_TYPE_DOCKING_STAGE_1   1

Definition at line 28 of file modelanim.h.

#define TRIGGER_TYPE_DOCKING_STAGE_2   2

Definition at line 29 of file modelanim.h.

#define TRIGGER_TYPE_DOCKING_STAGE_3   3

Definition at line 30 of file modelanim.h.

#define TRIGGER_TYPE_INITIAL   0

Definition at line 27 of file modelanim.h.

#define TRIGGER_TYPE_NONE   -1

Definition at line 26 of file modelanim.h.

#define TRIGGER_TYPE_PRIMARY_BANK   5

Definition at line 32 of file modelanim.h.

#define TRIGGER_TYPE_SCRIPTED   10

Definition at line 37 of file modelanim.h.

#define TRIGGER_TYPE_SECONDARY_BANK   6

Definition at line 33 of file modelanim.h.

#define TRIGGER_TYPE_TURRET_FIRED   11

Definition at line 38 of file modelanim.h.

#define TRIGGER_TYPE_TURRET_FIRING   9

Definition at line 36 of file modelanim.h.

Typedef Documentation

Definition at line 176 of file modelanim.h.

typedef struct stack_item stack_item

Enumeration Type Documentation

Enumerator
MA_POS_NOT_SET 
MA_POS_SET 
MA_POS_READY 

Definition at line 46 of file modelanim.h.

Function Documentation

void model_anim_fix_reverse_times ( ship_info sip)

Definition at line 705 of file modelanim.cpp.

int model_anim_get_time_type ( ship_subsys pss,
int  animation_type,
int  subtype 
)

Needs to always return a valid timestamp, even if it's just the current one

Definition at line 740 of file modelanim.cpp.

int model_anim_get_time_type ( ship shipp,
int  animation_type,
int  subtype 
)

How long an animation is going to take to complete.

For things that can't happen until animations are done this is for gameplay purposes, this isn't the actual time

Parameters
shipp
animation_type
subtype
Returns
Should already be a valid timestamp

Definition at line 807 of file modelanim.cpp.

void model_anim_handle_multiplayer ( ship shipp)

Handles multiplayer-safe, client-side, animations

Definition at line 863 of file modelanim.cpp.

int model_anim_match_type ( char *  p)

Definition at line 38 of file modelanim.cpp.

bool model_anim_pop_and_start_type ( int  stack_unique_id)

Definition at line 928 of file modelanim.cpp.

bool model_anim_push_and_start_type ( int  stack_unique_id,
ship shipp,
int  animation_type,
int  subtype,
int  direction,
bool  instant = false 
)

Definition at line 914 of file modelanim.cpp.

void model_anim_set_initial_states ( ship shipp)

Definition at line 823 of file modelanim.cpp.

bool model_anim_start_type ( ship_subsys pss,
int  animation_type,
int  subtype,
int  direction,
bool  instant = false 
)

Definition at line 566 of file modelanim.cpp.

bool model_anim_start_type ( ship shipp,
int  animation_type,
int  subtype,
int  direction,
bool  instant = false 
)

Definition at line 603 of file modelanim.cpp.

void model_anim_submodel_trigger_rotate ( model_subsystem psub,
ship_subsys ss 
)

Definition at line 403 of file modelanim.cpp.

void queued_animation_correct ( queued_animation qa)

Definition at line 372 of file modelanim.cpp.

void queued_animation_init ( queued_animation qa)

Definition at line 350 of file modelanim.cpp.

Variable Documentation

SCP_map<int, animation_stack> Animation_map

Definition at line 912 of file modelanim.cpp.

char* Animation_type_names[MAX_TRIGGER_ANIMATION_TYPES]

Definition at line 22 of file modelanim.cpp.

SCP_vector<triggered_rotation> Triggered_rotations

Definition at line 20 of file modelanim.cpp.