| 1 |
/** |
| 2 |
* System initialization, common to FreeDink and FreeDinkEdit |
| 3 |
|
| 4 |
* Copyright (C) 2007, 2008 Sylvain Beucler |
| 5 |
|
| 6 |
* This file is part of GNU FreeDink |
| 7 |
|
| 8 |
* GNU FreeDink is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU General Public License as |
| 10 |
* published by the Free Software Foundation; either version 3 of the |
| 11 |
* License, or (at your option) any later version. |
| 12 |
|
| 13 |
* GNU FreeDink is distributed in the hope that it will be useful, but |
| 14 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* General Public License for more details. |
| 17 |
|
| 18 |
* You should have received a copy of the GNU General Public License |
| 19 |
* along with this program. If not, see |
| 20 |
* <http://www.gnu.org/licenses/>. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef _INIT_H |
| 24 |
#define _INIT_H |
| 25 |
|
| 26 |
#include "SDL.h" |
| 27 |
#include <string> |
| 28 |
|
| 29 |
class App { |
| 30 |
public: |
| 31 |
std::string description; |
| 32 |
char* splash_path; |
| 33 |
|
| 34 |
int run = 1; |
| 35 |
|
| 36 |
int g_b_no_write_ini; // -noini passed to command line? |
| 37 |
int opt_version; |
| 38 |
bool dinkini_playmidi; |
| 39 |
bool dinkgl; |
| 40 |
bool windowed; |
| 41 |
|
| 42 |
App(); |
| 43 |
virtual ~App(); |
| 44 |
|
| 45 |
virtual void init() = 0; |
| 46 |
virtual void input(SDL_Event* ev) = 0; |
| 47 |
virtual void logic() = 0; |
| 48 |
|
| 49 |
int main(int argc, char* argv[]); |
| 50 |
void loop(); |
| 51 |
void one_iter(); |
| 52 |
|
| 53 |
void print_version(); |
| 54 |
void print_help(int argc, char *argv[]); |
| 55 |
bool check_arg(int argc, char *argv[]); |
| 56 |
}; |
| 57 |
|
| 58 |
#endif |