adventskalender-2009/src/config.h
Aaron Mueller 01147c0d35 Adding game states and menu
* Implement a simple state machine to simulate different game stats
 * Create a generic menu to display different menus
 * Update the Makefile for TTF support
 * Draw a simple diagram to show the stats
2009-12-16 15:37:24 +01:00

37 lines
851 B
C

#include <stdbool.h>
#include "SDL.h"
#include "SDL_ttf.h"
// In this file we define all global variables for the whole project. All
// variables definied here can be accessed from all other source files.
// Constants
#ifndef CONFIG_H
#define CONFIG_H
enum states {
STATE_MAINMENU,
STATE_NUMPLAYERS,
STATE_CREDITS,
STATE_RUNNINGGAME,
STATE_RLYQUIT,
STATE_EXIT,
MAX_STATES
};
// Screen size
static const int SCREEN_WIDTH = 800;
static const int SCREEN_HEIGHT = 600;
#endif
// Global variables and definitions
extern SDL_Surface *screen; // Screen to paint on
extern SDL_Event event; // Event storage
extern TTF_Font *menuFont; // The font for the menu
extern int *terrain; // Game terrain
extern enum states currentState; // The current game state
extern int currentMenuActionState; // The current selected action state in a menu