File: face.h

package info (click to toggle)
crossfire 1.75.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,168 kB
  • sloc: ansic: 83,169; sh: 4,659; perl: 1,736; lex: 1,443; makefile: 1,199; python: 43
file content (33 lines) | stat: -rw-r--r-- 1,149 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 * @file
 * Face-related structures.
 */

#ifndef FACE_H
#define FACE_H

/**
 * New face structure - this enforces the notion that data is face by
 * face only - you can not change the color of an item - you need to instead
 * create a new face with that color.
 */
typedef struct Face {
    uint16_t number;              /**< This is the image unique identifier. */
    uint8_t visibility;
    uint8_t magicmap;             /**< Color to show this in magic map */
    struct Face *smoothface;  /**< Smoothed face for this, NULL for none. */
    const char *name;             /**< Face name, as used by archetypes and such. */
} Face;

/**
 * This represents one animation. It points to different faces.
 */
typedef struct animations_struct {
    const char *name;       /**< Name of the animation sequence. */
    uint8_t num_animations;   /**< How many different faces to animate, size of the faces array. */
    uint8_t facings;          /**< How many facings (1,2,4,8). */
    uint16_t num;             /**< Where we are in the array. */
    const Face **faces; /**< The actual faces for the animation. */
} Animations;

#endif /* FACE_H */