Crossfire Server, Trunk  1.75.0
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++) {
23  }
25 }
Face::name
sstring name
Face name, as used by archetypes and such.
Definition: face.h:19
stringbuffer_append_printf
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Append a formatted string to a string buffer instance.
Definition: stringbuffer.cpp:138
buf
StringBuffer * buf
Definition: readable.cpp:1565
AnimationWriter.h
Animations::facings
uint8_t facings
How many facings (1,2,4,8).
Definition: face.h:28
stringbuffer_append_string
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
Definition: stringbuffer.cpp:95
Animations::num_animations
uint8_t num_animations
How many different faces to animate, size of the faces array.
Definition: face.h:27
StringBuffer
A buffer that will be expanded as content is added to it.
Definition: stringbuffer.cpp:25
Animations::faces
const Face ** faces
The actual faces for the animation.
Definition: face.h:30
Animations
This represents one animation.
Definition: face.h:25
AnimationWriter::write
virtual void write(const Animations *anim, StringBuffer *buf)
Write the specified asset to the StringBuffer.
Definition: AnimationWriter.cpp:15
Animations::name
sstring name
Name of the animation sequence.
Definition: face.h:26
face
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn though Notes on Specific and settings file datadir Usually usr share crossfire Contains data that the server does not need to modify while such as the etc A default install will pack the and treasurelist definitions into a single or trs file and the graphics into a face(metadata) and .tar(bitmaps) file