mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-05 01:24:19 +01:00
58 lines
831 B
C
58 lines
831 B
C
|
/*
|
||
|
* Copyright (c) 2002, 2003, 2004, 2005, 2007 by Christian Nowak <chnowak@web.de>
|
||
|
* Last update: 20th October, 2007
|
||
|
*/
|
||
|
|
||
|
#ifndef __ENVELOPE_H__
|
||
|
#define __ENVELOPE_H__
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
|
||
|
#include "defines.h"
|
||
|
|
||
|
#define ENV_WIDTH 65536
|
||
|
#define ENV_HEIGHT 65536
|
||
|
|
||
|
typedef struct EnvPoint {
|
||
|
|
||
|
u16 x,y;
|
||
|
} EnvPoint;
|
||
|
|
||
|
typedef struct EnvelopeConfig {
|
||
|
|
||
|
BOOL enabled;
|
||
|
u8 numPoints; /* # of envelope points */
|
||
|
u8 loop_start;
|
||
|
u8 loop_end;
|
||
|
u8 sustain;
|
||
|
|
||
|
EnvPoint *envPoints;
|
||
|
} EnvelopeConfig;
|
||
|
|
||
|
typedef struct Envelope {
|
||
|
|
||
|
EnvelopeConfig *envConfig;
|
||
|
|
||
|
BOOL triggered;
|
||
|
BOOL hold;
|
||
|
u8 curPoint;
|
||
|
u16 value;
|
||
|
u16 position;
|
||
|
} Envelope;
|
||
|
|
||
|
|
||
|
void EnvReset(Envelope *env);
|
||
|
void EnvTrigger(Envelope *env);
|
||
|
BOOL EnvProcess(Envelope *env);
|
||
|
void EnvRelease(Envelope *env);
|
||
|
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|