Lumenarium/src/animation/foldhaus_animation.h

40 lines
775 B
C
Raw Normal View History

2020-01-02 02:41:43 +00:00
//
// File: foldhaus_animation.h
// Author: Peter Slattery
// Creation Date: 2020-01-01
//
#ifndef FOLDHAUS_ANIMATION
#define ANIMATION_PROC(name) void name(assembly* Assembly, r32 Time)
typedef ANIMATION_PROC(animation_proc);
struct animation_block
{
2019-12-28 19:31:21 +00:00
// TODO(Peter): Should we change this to frames??
r32 StartTime;
r32 EndTime;
u32 AnimationProcHandle;
u32 Layer;
};
#define ANIMATION_SYSTEM_LAYERS_MAX 128
#define ANIMATION_SYSTEM_BLOCKS_MAX 128
struct animation_system
{
gs_list<animation_block> Blocks;
r32 Time;
s32 LastUpdatedFrame;
r32 SecondsPerFrame;
2019-12-28 19:31:21 +00:00
b32 TimelineShouldAdvance;
// :Temporary
r32 AnimationStart;
2019-12-28 19:31:21 +00:00
r32 AnimationEnd;
};
2020-01-02 02:41:43 +00:00
#define FOLDHAUS_ANIMATION
#endif // FOLDHAUS_ANIMATION