-
Notifications
You must be signed in to change notification settings - Fork 1
/
sfx.h~
54 lines (42 loc) · 1.45 KB
/
sfx.h~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
sfx.h
Copyright 2007 Sebastien Delestaing
This file is part of "the_cube".
"the_cube" is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
"the_cube" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SFX_H_
#define _SFX_H_
typedef enum
{
SFX_LINEAR
}SFX_FUNCTION_T;
typedef struct s_sfx
{
float start;
float stop;
int nb_of_steps;
int current_step;
int completed;
void *user_data;
SFX_FUNCTION_T function;
void (*process_callback)(struct s_sfx *, float);
void (*complete_callback)(struct s_sfx *);
}sfx_t;
sfx_t *sfxNew (void);
void sfxSet (sfx_t *, float, float, float, SFX_FUNCTION_T, void (*)(sfx_t *, float), void (*)(sfx_t *), void *);
void sfxProcess (sfx_t *);
sfx_t * sfxFree (sfx_t *);
void sfxCompleteSetIntTrue (sfx_t *);
void sfxProcessSetInt (sfx_t *, float);
void sfxProcessSetFloat (sfx_t *, float);
void sfxProcessFade (sfx_t *, float);
#endif //#ifndef _SFX_H_