Super Derpy: Muffin Attack
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Macros
src
timeline.h
Go to the documentation of this file.
1
4
/*
5
* Copyright (c) Sebastian Krzyszkowiak <dos@dosowisko.net>
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20
*/
21
#ifndef TIMELINE_H
22
#define TIMELINE_H
23
24
#include "
main.h
"
25
27
enum
TM_ActionState
{
28
TM_ACTIONSTATE_INIT,
29
TM_ACTIONSTATE_RUNNING,
30
TM_ACTIONSTATE_DESTROY
31
};
32
34
struct
TM_Arguments
{
35
void
*
value
;
36
struct
TM_Arguments
*
next
;
37
};
38
40
struct
TM_Action
{
41
bool (*
function
)(
struct
Game
*,
struct
TM_Action
*,
enum
TM_ActionState
);
42
struct
TM_Arguments
*
arguments
;
43
ALLEGRO_TIMER *
timer
;
44
bool
active
;
45
int
delay
;
46
struct
TM_Action
*
next
;
47
unsigned
int
id
;
48
char
*
name
;
49
};
50
52
void
TM_Init
(
struct
Game
* game);
54
void
TM_Process
();
56
void
TM_HandleEvent
(ALLEGRO_EVENT *ev);
58
struct
TM_Action
*
TM_AddAction
(
bool
(*func)(
struct
Game
*,
struct
TM_Action
*,
enum
TM_ActionState
),
struct
TM_Arguments
* args,
char
*
name
);
60
struct
TM_Action
*
TM_AddBackgroundAction
(
bool
(*func)(
struct
Game
*,
struct
TM_Action
*,
enum
TM_ActionState
),
struct
TM_Arguments
* args,
float
delay
,
char
*
name
);
62
struct
TM_Action
*
TM_AddQueuedBackgroundAction
(
bool
(*func)(
struct
Game
*,
struct
TM_Action
*,
enum
TM_ActionState
),
struct
TM_Arguments
* args,
float
delay
,
char
*
name
);
64
void
TM_AddDelay
(
float
delay
);
66
void
TM_Pause
(
bool
pause);
68
void
TM_Destroy
();
70
struct
TM_Arguments
*
TM_AddToArgs
(
struct
TM_Arguments
* args,
void
* arg);
72
void
TM_DestroyArgs
(
struct
TM_Arguments
* args);
74
bool
TM_Initialized
();
75
76
#endif
Generated on Thu Jul 12 2012 19:00:53 for Super Derpy: Muffin Attack by
1.8.1.1