Alchemy
Loading...
Searching...
No Matches

animspr.h File Reference

Animated sprites: their layers, frames and colour modes, and the resource slots they draw from. More...

Go to the source code of this file.

Data Structures

struct  AnimationEntry
 One animation layer of a sprite: its animation id, frames, running script and timer. More...
struct  ResourceSlot
 A resource slot: the tag of the animation loaded into it (slot number and animation id) and the buffer holding its frames. More...
struct  ObjectSystemWork
 The object system's work: the flag that suspends sprite projection, the outline's edge and fill colours, and the resource slots. More...
struct  AnimationSpritePart
 The hardware sprite attributes one part of an animated sprite (its image or its shadow) is drawn with. More...
struct  AnimationObject
 An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers. More...

Enumerations

enum  SpriteColorMode {
  SPRITE_COLOR_NORMAL = 0 , SPRITE_COLOR_GRB = 1 , SPRITE_COLOR_RBG = 2 , SPRITE_COLOR_BGR = 3 ,
  SPRITE_COLOR_GBR = 4 , SPRITE_COLOR_BRG = 5 , SPRITE_COLOR_GREY = 6 , SPRITE_COLOR_WHITE = 7 ,
  SPRITE_COLOR_BLUE_TINT = 9 , SPRITE_COLOR_RED_TINT = 10 , SPRITE_COLOR_GREEN_TINT = 11 , SPRITE_COLOR_FILL = 13 ,
  SPRITE_COLOR_BLACK = 14 , SPRITE_COLOR_HIDDEN = 15
}
 AnimationEntry.param: how Render_DecodeFrame colours a layer's pixels. More...

Functions

 STATIC_ASSERT (offsetof(struct ObjectSystemWork, suspended)==4)
 STATIC_ASSERT (offsetof(struct ObjectSystemWork, count)==0x18)
 STATIC_ASSERT (offsetof(struct ObjectSystemWork, slots)==0x1c)
 STATIC_ASSERT (sizeof(struct ObjectSystemWork)==0x5c)
 STATIC_ASSERT (sizeof(struct AnimationEntry)==0x18)
 STATIC_ASSERT (sizeof(struct AnimationSpritePart)==0x0c)
 STATIC_ASSERT (offsetof(struct AnimationObject, scale)==0x18)
 STATIC_ASSERT (offsetof(struct AnimationObject, rotation)==0x1e)
 STATIC_ASSERT (offsetof(struct AnimationObject, width)==0x20)
 STATIC_ASSERT (sizeof(struct AnimationObject)==0x38)
 STATIC_ASSERT (offsetof(struct AnimationObject, entries)==0x28)

Detailed Description

Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.

Definition in file animspr.h.

Enumeration Type Documentation

◆ SpriteColorMode

AnimationEntry.param: how Render_DecodeFrame colours a layer's pixels.

Modes 1 to 6 and 9 to 11 run them through a 256-byte table (the five gResourceSlot_ConversionTables, then the four gRuntime_ByteRemapTable ones); the solid modes paint every drawn pixel one colour of the basic sprite palette. Mode 8 is a second white and mode 12 reads past the tables.

Enumerator
SPRITE_COLOR_NORMAL 
SPRITE_COLOR_GRB 

red and green swapped

SPRITE_COLOR_RBG 

green and blue swapped

SPRITE_COLOR_BGR 

red and blue swapped

SPRITE_COLOR_GBR 

red to blue, green to red, blue to green

SPRITE_COLOR_BRG 

red to green, green to blue, blue to red

SPRITE_COLOR_GREY 

greyscale

SPRITE_COLOR_WHITE 

solid colour 15, white

SPRITE_COLOR_BLUE_TINT 

blue raised to full

SPRITE_COLOR_RED_TINT 

red raised to full

SPRITE_COLOR_GREEN_TINT 

green raised to full

SPRITE_COLOR_FILL 

solid gDecodeFillByte

SPRITE_COLOR_BLACK 

solid colour 1, black

SPRITE_COLOR_HIDDEN 

solid colour 0, transparent

Definition at line 18 of file animspr.h.

Function Documentation

◆ STATIC_ASSERT() [1/11]

STATIC_ASSERT ( offsetof(struct ObjectSystemWork, suspended) = =4)

◆ STATIC_ASSERT() [2/11]

STATIC_ASSERT ( offsetof(struct ObjectSystemWork, count) = =0x18)

◆ STATIC_ASSERT() [3/11]

STATIC_ASSERT ( offsetof(struct ObjectSystemWork, slots) = =0x1c)

◆ STATIC_ASSERT() [4/11]

STATIC_ASSERT ( sizeof(struct ObjectSystemWork) = =0x5c)

◆ STATIC_ASSERT() [5/11]

STATIC_ASSERT ( sizeof(struct AnimationEntry) = =0x18)

◆ STATIC_ASSERT() [6/11]

STATIC_ASSERT ( sizeof(struct AnimationSpritePart) = =0x0c)

◆ STATIC_ASSERT() [7/11]

STATIC_ASSERT ( offsetof(struct AnimationObject, scale) = =0x18)

◆ STATIC_ASSERT() [8/11]

STATIC_ASSERT ( offsetof(struct AnimationObject, rotation) = =0x1e)

◆ STATIC_ASSERT() [9/11]

STATIC_ASSERT ( offsetof(struct AnimationObject, width) = =0x20)

◆ STATIC_ASSERT() [10/11]

STATIC_ASSERT ( sizeof(struct AnimationObject) = =0x38)

◆ STATIC_ASSERT() [11/11]

STATIC_ASSERT ( offsetof(struct AnimationObject, entries) = =0x28)