79 if ((fp = fopen(buf,
"r")) == NULL) {
83 while (fgets(buf,
MAX_BUF-1, fp) != NULL) {
89 buf[strlen(buf)-1] =
'\0';
90 if (!strncmp(buf,
"anim ", 5)) {
103 }
else if (!strncmp(buf,
"mina", 4)) {
105 for (i = 0; i < num_frames; i++)
109 LOG(
llevDebug,
"Animation %s frame numbers (%d) is not a multiple of facings (%d)\n",
113 }
else if (!strncmp(buf,
"facings", 7)) {
121 if (!(faces[num_frames++] =
find_face(buf, 0)))
122 LOG(
llevDebug,
"Could not find face %s for animation %s\n",
240 if (op->
state >= max_state) {
301 if (who->
head != NULL)
309 for (; head != NULL; head = head->
more) {
EXTERN int num_animations
StringBuffer * stringbuffer_new(void)
void free_string(sstring str)
#define SET_ANIMATION(ob, newanim)
void update_object(object *op, int action)
struct animations_struct Animations
void dump_object(object *op, StringBuffer *sb)
int find_animation(const char *name)
EXTERN Animations * animations
int try_find_animation(const char *name)
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
static int anim_compare(const Animations *a, const Animations *b)
void animate_object(object *op, int dir)
int snprintf(char *dest, int max, const char *format,...)
#define NUM_ANIMATIONS(ob)
EXTERN int animations_allocated
sstring add_string(const char *str)
void apply_anim_suffix(object *who, sstring suffix)
void LOG(LogLevel logLevel, const char *format,...)
char * strerror_local(int errnum, char *buf, size_t size)
unsigned find_face(const char *name, unsigned error)
char * stringbuffer_finish(StringBuffer *sb)