ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfanim/cfanim.c
(Generate patch)

Comparing deliantra/server/plugins/cfanim/cfanim.c (file contents):
Revision 1.2 by root, Thu Feb 9 02:29:31 2006 UTC vs.
Revision 1.3 by elmex, Wed Feb 22 18:53:55 2006 UTC

436{ 436{
437 qsort (animationbox,animationcount,sizeof (CFanimationHook),compareAnims); 437 qsort (animationbox,animationcount,sizeof (CFanimationHook),compareAnims);
438 ordered_commands=1; 438 ordered_commands=1;
439} 439}
440 440
441CFanimationHook* get_command (char* command) 441static CFanimationHook *get_command(char *command)
442{ 442{
443 CFanimationHook dummy; 443 CFanimationHook dummy;
444 dummy.name=command; 444 dummy.name=command;
445 if (!ordered_commands) 445 if (!ordered_commands)
446 prepare_commands(); 446 prepare_commands();
447 return (CFanimationHook*) 447 return (CFanimationHook*)
448 bsearch (&dummy,animationbox,animationcount, 448 bsearch (&dummy,animationbox,animationcount,
449 sizeof(CFanimationHook), compareAnims); 449 sizeof(CFanimationHook), compareAnims);
450} 450}
451 451
452CFmovement* parse_animation_block (char* buffer, size_t buffer_size,FILE* fichier, CFanimation* parent) 452static CFmovement *parse_animation_block(char *buffer, size_t buffer_size, FILE *fichier, CFanimation *parent)
453{ 453{
454 CFmovement* first=NULL; 454 CFmovement* first=NULL;
455 CFmovement* current=NULL; 455 CFmovement* current=NULL;
456 CFmovement* next; 456 CFmovement* next;
457 char* time; 457 char* time;
589} 589}
590 590
591/* 591/*
592 * return a new animation pointer inserted in the list of animations 592 * return a new animation pointer inserted in the list of animations
593 */ 593 */
594CFanimation* create_animation(void) 594static CFanimation *create_animation(void)
595{ 595{
596 CFanimation* new; 596 CFanimation* new;
597 CFanimation* current; 597 CFanimation* current;
598 new=(CFanimation*) malloc (sizeof (CFanimation)); 598 new=(CFanimation*) malloc (sizeof (CFanimation));
599 if (!new) return NULL; 599 if (!new) return NULL;
830 if (current_anim->nextmovement) break; 830 if (current_anim->nextmovement) break;
831 } 831 }
832 fclose (fichier); 832 fclose (fichier);
833 return 1; 833 return 1;
834} 834}
835void animate_one(CFanimation* animation, long int milliseconds) 835static void animate_one(CFanimation *animation, long int milliseconds)
836{ 836{
837 CFmovement* current; 837 CFmovement* current;
838 838
839 if (animation->time_representation==time_second) 839 if (animation->time_representation==time_second)
840 animation->tick_left+=milliseconds; 840 animation->tick_left+=milliseconds;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines