Crossfire Server, Trunk
AnimationWriter.cpp
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2020 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #include "AnimationWriter.h"
14 
16  stringbuffer_append_printf(buf, "animation %s\n", anim->name);
17  if (anim->facings != 0) {
18  stringbuffer_append_printf(buf, "facings %d\n", anim->facings);
19  }
20  for (uint8_t face = 0; face < anim->num_animations; face++) {
21  stringbuffer_append_string(buf, anim->faces[face]->name);
23  }
25 }
stringbuffer_append_printf
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Definition: stringbuffer.cpp:138
buf
StringBuffer * buf
Definition: readable.cpp:1551
AnimationWriter.h
stringbuffer_append_string
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Definition: stringbuffer.cpp:95
animate.anim
string anim
Definition: animate.py:20
StringBuffer
Definition: stringbuffer.cpp:25
Animations
Definition: face.h:25
AnimationWriter::write
virtual void write(const Animations *anim, StringBuffer *buf)
Definition: AnimationWriter.cpp:15