 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
103 if (op->
state >= max_state) {
167 for (; head != NULL; head = head->
more) {
181 fprintf(stderr,
"id name faces\n");
183 anim->num_animations, anim->has_blank ?
" (with blank)" :
""); });
#define UP_OBJ_FACE
Only thing that changed was the face.
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
#define QUERY_FLAG(xyz, p)
#define FLAG_IS_TURNABLE
Object can change face with direction.
struct archetype * arch
Pointer to archetype.
StringBuffer * stringbuffer_new(void)
Create a new string buffer.
int16_t invisible
How much longer the object will be invis.
AllAnimations * animations()
Get animations.
#define SET_ANIMATION(ob, newanim)
int8_t direction
Means the object is moving that way.
const Face * blank_face
Following can just as easily be pointers, but it is easier to keep them like this.
AssetsManager * getManager()
#define FLAG_ALIVE
Object can fight (or be fought)
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
void object_update(object *op, int action)
object_update() updates the array which represents the map.
uint8_t temp_anim_speed
Ticks between temporary animation-frames.
uint16_t number
This is the image unique identifier.
object clone
An object from which to do object_copy()
void object_dump(const object *op, StringBuffer *sb)
Dumps an object.
void apply_anim_suffix(object *who, const char *suffix)
Applies a compound animation to an object.
#define HEAD(op)
Returns the head part of an object.
const Face * face
Face with colors.
uint8_t last_anim
Last sequence used to draw face.
uint8_t type
PLAYER, BULLET, etc.
uint8_t facings
How many facings (1,2,4,8).
void each(std::function< void(T *)> op)
Apply a function to each asset.
int8_t facing
Object is oriented/facing that way.
const Animations * animation
Animation of this item, NULL if not animated.
uint8_t num_animations
How many different faces to animate, size of the faces array.
#define MAX_BUF
Used for all kinds of things.
object * head
Points to the main object of a large body.
Animations * try_find_animation(const char *name)
A buffer that will be expanded as content is added to it.
bool has_blank
If this animation contains a blank face or not, used for invisibility.
This represents one animation.
void animate_object(object *op, int dir)
Updates the face-variable of an object.
#define CLEAR_FLAG(xyz, p)
#define NUM_ANIMATIONS(ob)
void dump_animations(void)
Dump all animations to stderr, for debugging purposes.
uint8_t state
How the object was last drawn (animation)
object * more
Pointer to the rest of a large body of objects.
const Animations * temp_animation
A temporary animation.
sstring name
Name of the animation sequence.