diff options
| author | Alex Marshall <SquidMan72@gmail.com> | 2009-04-19 22:39:15 -0700 |
|---|---|---|
| committer | Alex Marshall <SquidMan72@gmail.com> | 2009-04-19 22:39:15 -0700 |
| commit | 8182882e78fec04d159ae979d365eeffe4915ce6 (patch) | |
| tree | 2cc5ef4adfd86b7e1c5e97035e394dafea978521 /laichzeit/brlan.h | |
| parent | ed79fc076c74ee2de4cc6ef626b545a5a03a7bef (diff) | |
Added Laichzeit. Everything should work, just gotta get compiling of BRLYTs and BRLANs added, then it should be COMPLETE =D
Diffstat (limited to '')
| -rw-r--r-- | laichzeit/brlan.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/laichzeit/brlan.h b/laichzeit/brlan.h new file mode 100644 index 0000000..30fe311 --- /dev/null +++ b/laichzeit/brlan.h @@ -0,0 +1,91 @@ +/*****************************************************************************/ +/* Laichzeit */ +/* Part of the Benzin Project */ +/* Copyright (c)2009 HACKERCHANNEL. Protected under the GNU GPLv2. */ +/* ------------------------------------------------------------------------- */ +/* brlan.h */ +/* The header file for all the BRLAN stuff. Include this! */ +/* ------------------------------------------------------------------------- */ +/* Most code contributed by: */ +/* SquidMan */ +/*****************************************************************************/ + +#ifndef BRLAN_H +#define BRLAN_H + +#include "types.h" + +#define USE_BRLAN + +typedef enum { + BRLAN_TAG_RLPA = 0, // Pane Animation (All the transforms) + BRLAN_TAG_RLVC = 1, // Vertex Color (Changes colors) + BRLAN_TAG_RLTP = 2, // Texture Picture (Changes TPL frame) + BRLAN_TAG_RLMC = 3, // Material Color + BRLAN_TAG_RLTS = 4, // Texture Shader (Defines RLTPs) + BRLAN_TAG_RLVI = 5 // Vertex (I?) + // TODO: Figure out the rest of the names. +} LANTagType; + +typedef enum { + BRLAN_RLPA_X_TRANSLATION = 0, + BRLAN_RLPA_Y_TRANSLATION = 1, + BRLAN_RLPA_Z_TRANSLATION = 2, + BRLAN_RLPA_ROTATE = 3, + BRLAN_RLPA_X_ZOOM = 4, + BRLAN_RLPA_Y_ZOOM = 5, + BRLAN_RLPA_WIDTH = 6, + BRLAN_RLPA_HEIGHT = 7, + BRLAN_RLVC_ALPHA = 8, + BRLAN_RLTS_RANGE = 9, + BRLAN_RLTP_CHANGE_FRAME = 10 + // TODO: Add moar. +} LANAnimType; + +typedef struct { + f32 frame; // The frame. + f32 value; // The value. + f32 interpolation; // The interpolation. +} LANTriplet; + +typedef struct { + LANAnimType type; // Type of animation. + int tripletcnt; // How many triplets. + LANTriplet* triplets; // The triplets. + int done; // Did we end it? (Security measure) +} LANAnim; + +typedef struct { + char name[20]; // Name of tag. + u32 flags; // Flags. + LANTagType type; // Type of tag. + int animcnt; // How many animations. + LANAnim* anims; // The animations. + int done; // Did we end it? (Security measure) +} LANTag; + +typedef struct { + char name[256]; // Name of texture. Using 256 because + // the actual size is arbitrary. +} LANTex; + +typedef struct { + int framesize; // How many frames to be displayed. + int tagcnt; // How many tags there are. + int texcnt; // How many textures there are. + LANTag* tags; // The tags. + LANTex* texs; // The textures. + int done; // Did we end it? (Security measure) +} BRLAN; + +BRLAN* LaichAnim_Start(); +void LaichAnim_AddTexture(BRLAN* brlan, char* name); +int LaichAnim_StartTag(BRLAN* brlan, char* name, LANTagType type); +int LaichAnim_StartAnim(BRLAN* brlan, int tag, LANAnimType type); +void LaichAnim_AddTriplet(BRLAN* brlan, int tag, int anim, \ + f32 frame, f32 value, f32 interpolation); +void LaichAnim_EndAnim(BRLAN* brlan, int tag, int anim); +void LaichAnim_EndTag(BRLAN* brlan, int tag); +u8* LaichAnim_Compile(BRLAN* brlan); + +#endif //BRLAN_H |
