Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Data Structures | |
struct | param_moveto |
struct | teleport_params |
Functions | |
static void | animate (void) |
static void | animate_one (CFanimation *animation, long int milliseconds) |
CF_PLUGIN void * | cfanim_globalEventListener (int *type,...) |
CF_PLUGIN anim_move_result | cfanim_runPluginCommand (object *op, char *params) |
CF_PLUGIN int | closePlugin (void) |
static int | compareAnims (const void *a, const void *b) |
static CFanimation * | create_animation (void) |
static int | equality_split (char *buffer, char **variable, char **value) |
CF_PLUGIN void * | eventListener (int *type,...) |
static object * | find_by_name (object *origin, const char *name) |
static int | get_boolean (const char *strg, int *bl) |
static CFanimationHook * | get_command (char *command) |
static int | get_dir_from_name (const char *name) |
CF_PLUGIN void * | getPluginProperty (int *type,...) |
static long int | initapply (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initapplyobject (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initcamera (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initdropobject (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initfire (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initghosted (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initmessage (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initmovement (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initmoveto (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initnotice (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initpickup (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initpickupobject (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
CF_PLUGIN int | initPlugin (const char *iversion, f_plug_api gethooksptr) |
static long int | initsay (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initstop (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initteleport (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initturn (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initvisible (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static long int | initwizard (const char *name, char *parameters, struct CFmovement_struct *move_entity) |
static int | is_animated_player (object *pl) |
static CFmovement * | parse_animation_block (char *buffer, size_t buffer_size, FILE *fichier, CFanimation *parent) |
CF_PLUGIN int | postInitPlugin (void) |
static void | prepare_commands (void) |
static anim_move_result | runapply (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runapplyobject (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runcamera (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | rundropobject (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runfire (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runghosted (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runmessage (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runmovement (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runmoveto (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runnotice (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runpickup (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runpickupobject (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runsay (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runstop (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runteleport (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runturn (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runvisible (struct CFanimation_struct *animation, long int id, void *parameters) |
static anim_move_result | runwizard (struct CFanimation_struct *animation, long int id, void *parameters) |
static int | start_animation (object *who, object *activator, object *event, const char *file, const char *message) |
Variables | |
CFanimationHook | animationbox [] |
int | animationcount = sizeof(animationbox)/sizeof(CFanimationHook) |
static CFanimation * | first_animation = NULL |
static int | ordered_commands = 0 |
|
static |
Animates all currently running animations.
Definition at line 1020 of file cfanim.c.
References animate_one(), first_animation, GETTIMEOFDAY, CFanimation_struct::name, CFanimation_struct::nextanimation, CFanimation_struct::nextmovement, CFanimation_struct::paralyze, obj::speed, obj::speed_left, and CFanimation_struct::victim.
Referenced by cfanim_globalEventListener().
|
static |
Checks if an animation can execute one or more moves, and if so does them.
animation | animation to check |
milliseconds | time elapsed since the last time this function was called. |
Definition at line 967 of file cfanim.c.
References cf_log(), cf_object_set_flag(), cf_object_update(), FLAG_WIZ, FLAG_WIZCAST, FLAG_WIZPASS, CFmovement_struct::func, CFmovement_struct::id, CFanimation_struct::invisible, obj::invisible, llevDebug, mr_again, CFanimation_struct::name, obj::name, CFmovement_struct::next, CFanimation_struct::nextmovement, CFanimation_struct::paralyze, CFmovement_struct::parameters, PLAYER, obj::speed_left, CFmovement_struct::tick, CFanimation_struct::tick_left, CFanimation_struct::time_representation, time_second, obj::type, UP_OBJ_CHANGE, CFanimation_struct::verbose, CFanimation_struct::victim, and CFanimation_struct::wizard.
Referenced by animate().
CF_PLUGIN void* cfanim_globalEventListener | ( | int * | type, |
... | |||
) |
Definition at line 1113 of file cfanim.c.
References animate(), and EVENT_CLOCK.
Referenced by postInitPlugin().
CF_PLUGIN anim_move_result cfanim_runPluginCommand | ( | object * | op, |
char * | params | ||
) |
|
static |
Definition at line 514 of file cfanim.c.
Referenced by get_command(), and prepare_commands().
|
static |
Create a new animation.
Definition at line 696 of file cfanim.c.
References CFanimation_struct::name, and CFanimation_struct::nextanimation.
Referenced by start_animation().
|
static |
This function take buffer with a value like "blabla= things" and extracts some things.
buffer | where equality is written | |
[out] | variable | will be positionned to where in buffer the variable name starts. leading spaces will be converted to \0 |
[out] | value | same as above but for the value part |
Definition at line 626 of file cfanim.c.
Referenced by start_animation().
CF_PLUGIN void* eventListener | ( | int * | type, |
... | |||
) |
Definition at line 716 of file cfanim.c.
References obj::above, cf_find_string(), cf_map_get_height(), cf_map_get_width(), obj::env, GET_MAP_OB, obj::map, and obj::name.
Referenced by start_animation().
|
static |
This function gets a string containing [Y/y](es)/[N/n](o), 1/0 and set bl according to what's read if return value is true, strg was set successfully else, an error occured and bl was not touched
strg | string to process. |
bl | value strg meant. |
Definition at line 657 of file cfanim.c.
Referenced by initghosted(), initvisible(), initwizard(), and start_animation().
|
static |
Definition at line 523 of file cfanim.c.
References animationcount, compareAnims(), CFanimationHook::name, and prepare_commands().
Referenced by parse_animation_block().
|
static |
Returns the direction from its name.
name | direction's name |
Definition at line 45 of file cfanim.c.
Referenced by initcamera(), initfire(), initmovement(), and initturn().
|
static |
|
static |
Definition at line 208 of file cfanim.c.
References cf_add_string(), and CFmovement_struct::parameters.
|
static |
Definition at line 121 of file cfanim.c.
References get_dir_from_name(), and CFmovement_struct::parameters.
|
static |
Definition at line 236 of file cfanim.c.
References cf_strdup_local(), and CFmovement_struct::parameters.
|
static |
Definition at line 86 of file cfanim.c.
References get_dir_from_name(), and CFmovement_struct::parameters.
|
static |
Definition at line 282 of file cfanim.c.
References cf_log(), get_boolean(), and llevDebug.
|
static |
Definition at line 443 of file cfanim.c.
References CFmovement_struct::parameters.
|
static |
Definition at line 65 of file cfanim.c.
References get_dir_from_name(), and CFmovement_struct::parameters.
|
static |
Definition at line 408 of file cfanim.c.
References CFmovement_struct::parameters, param_moveto::x, and param_moveto::y.
|
static |
Definition at line 379 of file cfanim.c.
References cf_strdup_local(), and CFmovement_struct::parameters.
|
static |
|
static |
Definition at line 263 of file cfanim.c.
References cf_add_string(), and CFmovement_struct::parameters.
CF_PLUGIN int initPlugin | ( | const char * | iversion, |
f_plug_api | gethooksptr | ||
) |
|
static |
Definition at line 173 of file cfanim.c.
References cf_log(), cf_strdup_local(), llevDebug, CFmovement_struct::parameters, CFmovement_struct::parent, and CFanimation_struct::verbose.
|
static |
|
static |
Definition at line 327 of file cfanim.c.
References cf_log(), cf_strdup_local(), llevDebug, teleport_params::mapname, teleport_params::mapx, teleport_params::mapy, CFmovement_struct::parameters, and teleport().
|
static |
Definition at line 101 of file cfanim.c.
References get_dir_from_name(), and CFmovement_struct::parameters.
|
static |
Definition at line 141 of file cfanim.c.
References cf_log(), get_boolean(), and llevDebug.
|
static |
Definition at line 157 of file cfanim.c.
References cf_log(), get_boolean(), and llevDebug.
|
static |
Is specified player currently victim of a paralysing animation?
pl | player to search for. |
Definition at line 680 of file cfanim.c.
References cf_log(), llevDebug, obj::name, CFanimation_struct::paralyze, CFanimation_struct::verbose, and CFanimation_struct::victim.
|
static |
Parse an animation block in the animation file.
buffer | buffer to read data info, will have been modified when function exits. |
buffer_size | size of buffer. |
fichier | file to read from. |
parent | animation we're reading the block for. |
Definition at line 540 of file cfanim.c.
References cf_log(), CFanimation_struct::errors_allowed, CFmovement_struct::func, CFanimationHook::funcinit, CFanimationHook::funcrun, get_command(), CFmovement_struct::id, llevDebug, CFmovement_struct::next, CFmovement_struct::parent, CFmovement_struct::tick, and CFanimation_struct::verbose.
Referenced by start_animation().
|
static |
Definition at line 518 of file cfanim.c.
References animationcount, and compareAnims().
Referenced by get_command().
|
static |
Definition at line 196 of file cfanim.c.
References cf_object_apply_below(), obj::container, mr_finished, PLAYER, obj::type, and CFanimation_struct::victim.
|
static |
Definition at line 213 of file cfanim.c.
References AP_APPLY, obj::below, cf_free_string(), cf_object_apply(), obj::inv, mr_finished, obj::name, and CFanimation_struct::victim.
|
static |
Definition at line 130 of file cfanim.c.
References cf_log(), llevDebug, mr_finished, and CFanimation_struct::verbose.
|
static |
Definition at line 241 of file cfanim.c.
References cf_free_string(), cf_object_drop(), mr_finished, and CFanimation_struct::victim.
|
static |
Definition at line 95 of file cfanim.c.
References cf_log(), llevDebug, mr_finished, and CFanimation_struct::verbose.
|
static |
Definition at line 291 of file cfanim.c.
References cf_map_insert_object_there(), cf_object_clone(), cf_object_free(), cf_object_remove(), cf_player_move(), CLEAR_FLAG, obj::contr, CFanimation_struct::corpse, FLAG_WIZ, CFanimation_struct::ghosted, CFanimation_struct::invisible, obj::invisible, obj::map, mr_finished, obj::type, CFanimation_struct::victim, CFanimation_struct::wizard, obj::x, and obj::y.
|
static |
Definition at line 451 of file cfanim.c.
References cf_map_message(), obj::map, mr_finished, NDI_GREEN, NDI_UNIQUE, and CFanimation_struct::victim.
|
static |
Definition at line 73 of file cfanim.c.
References cf_log(), cf_object_move(), cf_player_move(), obj::contr, llevDebug, mr_finished, PLAYER, obj::type, CFanimation_struct::verbose, and CFanimation_struct::victim.
|
static |
Definition at line 423 of file cfanim.c.
References cf_object_move_to(), mr_again, mr_finished, CFanimation_struct::victim, obj::x, param_moveto::x, obj::y, and param_moveto::y.
|
static |
Definition at line 383 of file cfanim.c.
References cf_player_message(), mr_finished, NDI_NAVY, NDI_UNIQUE, and CFanimation_struct::victim.
|
static |
Definition at line 253 of file cfanim.c.
References obj::below, cf_object_pickup(), mr_finished, and CFanimation_struct::victim.
|
static |
Definition at line 268 of file cfanim.c.
References obj::below, cf_free_string(), cf_object_pickup(), mr_finished, obj::name, and CFanimation_struct::victim.
|
static |
Definition at line 183 of file cfanim.c.
References cf_log(), cf_object_say(), llevDebug, mr_finished, and CFanimation_struct::victim.
|
static |
Definition at line 397 of file cfanim.c.
References cf_log(), llevDebug, mr_finished, and CFanimation_struct::verbose.
|
static |
Definition at line 369 of file cfanim.c.
References cf_map_get_map(), cf_object_teleport(), teleport_params::mapname, teleport_params::mapx, teleport_params::mapy, mr_finished, teleport(), and CFanimation_struct::victim.
|
static |
Definition at line 109 of file cfanim.c.
References cf_log(), cf_object_set_int_property(), CFAPI_OBJECT_PROP_ANIMATION, obj::facing, llevDebug, mr_finished, CFanimation_struct::verbose, and CFanimation_struct::victim.
|
static |
Definition at line 150 of file cfanim.c.
References CFanimation_struct::invisible, and mr_finished.
|
static |
Definition at line 166 of file cfanim.c.
References mr_finished, and CFanimation_struct::wizard.
|
static |
Create a new animation object according to file, option and activator (who)
who | object that raised the event leading to the plugin. |
activator | object that caused who to get an event. |
event | actual event object linking who and this plugin. Can be removed. |
file | file name to read from, should be accessible from the current path. |
message | if non empty, will be the name of the used animation instead of the one specified in the file. |
Definition at line 760 of file cfanim.c.
References cf_add_string(), cf_free_string(), cf_log(), cf_object_remove(), cf_strdup_local(), CFanimation_struct::corpse, create_animation(), obj::env, equality_split(), CFanimation_struct::errors_allowed, find_by_name(), get_boolean(), CFanimation_struct::ghosted, HUGE_BUF, CFanimation_struct::invisible, llevDebug, CFanimation_struct::name, CFanimation_struct::nextmovement, CFanimation_struct::paralyze, parse_animation_block(), PLAYER, CFanimation_struct::tick_left, CFanimation_struct::time_representation, time_second, time_tick, obj::type, CFanimation_struct::unique, CFanimation_struct::verbose, CFanimation_struct::victim, and CFanimation_struct::wizard.
Referenced by eventListener().
CFanimationHook animationbox[] |
int animationcount = sizeof(animationbox)/sizeof(CFanimationHook) |
Definition at line 510 of file cfanim.c.
Referenced by get_command(), and prepare_commands().
|
static |