/* * Copyright (C) 2018 Vito Caputo - * * 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 . */ #ifndef _WHALE_H #define _WHALE_H #include 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