Alchemy
Loading...
Searching...
No Matches

metadata_lookup.h

Go to the documentation of this file.
1#ifndef ALCHEMY_METADATA_LOOKUP_H
2#define ALCHEMY_METADATA_LOOKUP_H
3
4/// @file
5/// Animation metadata and its lookup by resource.
6
7#include "types.h"
8#include "static_assert.h"
9#include "edition.h"
10#include "farcall.h"
11
12/// An animation's metadata: the sprite's size, scale and offsets, how its
13/// frames are drawn and decoded, its frames and its animation scripts.
15 u8 width; ///< pixels
16 u8 height; ///< pixels
17 u16 scale; ///< 8.8 fixed point, 0x100 full size
20 s8 adjustX; ///< pixels
21 s8 adjustY; ///< pixels
25 void **frames;
27};
28
29STATIC_ASSERT(sizeof(struct AnimationMetadata) == 0x14);
31STATIC_ASSERT(offsetof(struct AnimationMetadata, animationCount) == 0x05);
34STATIC_ASSERT(offsetof(struct AnimationMetadata, frameCodec) == 0x0a);
35STATIC_ASSERT(offsetof(struct AnimationMetadata, frames) == 0x0c);
36STATIC_ASSERT(offsetof(struct AnimationMetadata, animation) == 0x10);
37
39
40#endif
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
Public interfaces to the engine's code banks.
struct AnimationMetadata * Resource_GetMetadataRecordFarFar(u32 number)
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
Definition stddef.h:19
An animation's metadata: the sprite's size, scale and offsets, how its frames are drawn and decoded,...
u16 scale
8.8 fixed point, 0x100 full size
The integer types, TRUE, UNUSED and the fixed-address macros.
unsigned int u32
Definition types.h:15
signed char s8
Definition types.h:10
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11