diff options
Diffstat (limited to 'src/whale.h')
-rw-r--r-- | src/whale.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/whale.h b/src/whale.h new file mode 100644 index 0000000..8e2f482 --- /dev/null +++ b/src/whale.h @@ -0,0 +1,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 |