blob: 8e2f482db19407b179c851836c63018d1ca53136 (
plain)
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
|
/*
* Copyright (C) 2018 Vito Caputo - <vcaputo@pengaru.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* This program 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 _WHALE_H
#define _WHALE_H
#include <SDL.h>
typedef enum whale_context_t {
WHALE_CONTEXT_INTRO,
WHALE_CONTEXT_GAME,
WHALE_CONTEXT_CREDITS
} whale_context_t;
typedef enum whale_ticks_t {
WHALE_TICKS_TIMER,
WHALE_TICKS_MUSIC
} whale_ticks_t;
#define WHALE_MUSIC_FLAG_LOOP (1L)
#define WHALE_MUSIC_FLAG_FADEIN (1L << 1)
typedef struct whale_t whale_t;
typedef struct stage_t stage_t;
stage_t * whale_get_stage(const whale_t *whale);
void whale_set_music(whale_t *whale, const char *file, unsigned flags);
void whale_set_context(whale_t *whale, whale_context_t context);
unsigned whale_ticks(whale_t *whale, whale_ticks_t type);
void whale_ticks_reset(whale_t *whale, whale_ticks_t type);
#endif
|