// BlinkGame - Hunt for the Lost Pixels
// an SDL game in honor of the BlinkenArea crew
//
// (C) 2005-06 Rene Schickbauer
//
// See LICENSE for licensing information

// This file defines the globals as external variables
// The globals are declared and initialized in their respective program parts
//
#ifdef NOP_CODE
/*--------------------------------------------------------------------
					CVS AUTO-GENERATED INFO
$Author: cavac $
$Date: 2006/03/16 10:23:12 $
$Name: rel-0-3-patches $
$Revision: 1.31 $
$State: Exp $

$Log: globals.h,v $
Revision 1.31  2006/03/16 10:23:12  cavac
Updated Windows port

Revision 1.30  2006/03/02 13:03:42  cavac
Re-formatted all .cpp and .h files a bit to get rid of the TAB/SPACE mess
that makes troubles with XCode's "re-format" feature

Revision 1.29  2006/02/27 10:48:30  cavac
Adapted VC6 Workspace and INNO-Setup install script for upcomming 0.3-Release

Revision 1.28  2006/02/26 18:08:00  cavac
Added Neon sign "Hunting season" (with 5 switches) to testlevel

Revision 1.27  2006/02/26 14:06:05  cavac
Added menu support

Revision 1.26  2006/02/24 20:25:39  cavac
Added sound-support to scripting engine

Revision 1.25  2006/02/24 18:48:26  cavac
Finally added real scripting support
Added Testlevel (level0) which can be enabled from globals.h

Revision 1.24  2006/02/19 17:33:36  dauti
The number of Levels is now computed (using file-globbing for "level*.conf" in
the RESPATH) - no need to increment a #define in globals.h for each new level...

Revision 1.23  2006/02/19 12:13:11  dauti
Added level 7

Revision 1.22  2006/02/18 12:08:07  cavac
Changed default: Enable ActionCapture as default during development
to check for cross-plattform problems

Revision 1.21  2006/02/17 19:07:59  cavac
Added rudimentary sound effects (FX) support

Revision 1.20  2006/02/13 09:53:51  cavac
Added BOSS-Key (ESC is instant exit)

Revision 1.19  2006/02/12 15:54:11  cavac
Added a new monster: The Buggy
This monster patrols a tight space except when the player is in sight

Revision 1.18  2006/02/12 13:17:49  dauti
Fixed 64Bit problems. Now it works, when compiled as 64 and as 32 Bit binary
(Tested on AMD64)

Revision 1.17  2006/02/10 18:56:17  cavac
Code Audit: Fixed many 64Bit based problems (mostly untested)

Revision 1.16  2006/02/10 17:50:26  cavac
Added ActionCapture feature (define ALLOW_ACTIONCAPTURE to allow this
resource-hungry extra)

Revision 1.15  2006/02/05 19:07:57  dauti
Added command line option support.

Revision 1.14  2006/02/03 15:53:18  cavac
Updated VC6 Workspace

Revision 1.13  2006/02/02 08:58:05  cavac
Added Level 6 (previous level6 was only a test-level)

Revision 1.12  2006/01/29 18:06:24  dauti
Minor bugfixes,
created a "make uninstall" target

Revision 1.11  2006/01/28 14:39:57  dauti
Improved build system, the version (for the targets rpm, tar.gz, tar.bz2,...)  is now queried directly from the source - no need to write it in 3 different places (Makefile, Spec-file, globals.h)

Revision 1.10  2006/01/27 17:04:02  cavac
Updated VC6 workspace to current release
Added ogg/vorbis support for Win32
Added SDL_Image and SDL_ttf support
Changed build- and installer-system for easier maintenance

Revision 1.9  2006/01/23 23:29:06  cavac
Added define to disable sound
Changed "VERSION" to LONGVERSION"
Added new VERSION which is numeric for RPM and such

Revision 1.8  2006/01/23 19:19:45  cavac
Added define ENABLE_FULLSCREEN to enable/disable the availability
of the full-screen mode
Added define START_WITH_FULLSCREEN to set default screen mode when
ENABLE_FULLSCREEN is defined
User can now switch between windowed and fullscreen with the "f"-key

Revision 1.7  2006/01/23 18:47:55  cavac
Patches for unix make system for building on Linux  and other
   Unix systems (thanks to: Dauti)
Tests for new colission detection (default: Use old one)
Added Joystick/Gamepad support (only tested with a cheap logitech gamepad)
Fixed some warnings on linux/gcc3
Added true-type fonts for planned menu system
Added library SDL_ttf in xcode for planned menu-system

Revision 1.6  2006/01/19 19:19:15  cavac
Various bugfixes and performance tunings

Revision 1.5  2006/01/18 01:22:39  cavac
Added SDL_Image to load additional graphics formats
Updated osdef* and xcode-project to to add SDL_Image
Updated all image-loader functions to use SDL_Image
Added level6 as temporary testlevel
Added code to display start- and goal-points with an animation (needs some fixing)
Removed temporary "marker"-tiles from level-definitions, as we have now an
animated display for that.

Revision 1.4  2006/01/09 13:00:29  cavac
Added Project-files for VisualC++ 6 (VC6)
Added needed SDL libraries for WIN32
Ported Code to compile on Win32 (some problems remain)
TODO: Add OGG-Support for Win32 (libogg + libvorbis)
Added Installer-Script for Inno-Setup (Win32)

Revision 1.3  2006/01/09 00:50:34  cavac
Bugfixed CVS autogenerated entries in background.cpp
Added CVS autogenerated entries to remaining .cpp and .h files
Updated copyright from "2005 Rene Schickbauer" to "2005-06 Rene Schickbauer"


--------------------------------------------------------------------*/
#endif //NOP_CODE

#ifndef GLOBALS_H
#define GLOBALS_H


/*
 * ATTENTION: The following #define is used for the version-numbers of RPMs, tar.gz's, ...
 * so it should only contain Numbers and dots.
 * I grep for that #define in the Makefile, so there should no other #define
 * which starts with "VERSION" (eg. "#define VERSION2" or similar) and there
 * should be exactly ONE Space between "define", "VERSION" and the version-number.
 */
#define VERSION 0.3
#define LONGVERSION "Version: 0.3 / 2006-03-16"

// RELEASEMODE = less debug info, show intro
#define CAVAC_RELEASEMODE

// Enable level0 (a non-release level for testing new features)
#define ENABLE_TESTLEVEL

// FULLSCREEN?
#define ENABLE_FULLSCREEN
#define START_WITH_FULLSCREEN

// SHOW FPS?
#define SHOWFRAMERATE

// Allow cheats?
#define ALLOW_CHEATCODES

// Allow ActionCapture
#define ALLOW_ACTIONCAPTURE
#ifdef ALLOW_ACTIONCAPTURE
#define ACTIONCAPTURE_MAX 200
#define ACTIONCAPTURE_DELAY 100
#define ACTIONCAPTURE_HEIGHT 192
#define ACTIONCAPTURE_WIDTH 256
#endif

// Allow Bosskey (ESC is instant quit)
#define ALLOW_BOSSKEY

// New colission detection?
//#define USE_NEWCOLDETECT

// Disable sound?
//#define DISABLE_SOUND

// Include SDL and helpers
#include <stdlib.h>
#include <math.h>
#include "osdef.h"

// PATH TO RESOURCES
#ifndef RESPATH
#ifdef CAVAC_RELEASEMODE
#define RESPATH ""
#else // NO RELEASE
#define RESPATH "/Users/cavac/src/xcode/BlinkGame/LostPixels/build/Development/LostPixels.app/Contents/Resources/"
#endif // RELEASEMODE
#endif // RESPATH

// Screen
#define SCR_WIDTH 640
#define SCR_HEIGHT 480
#define TILESIZE 32 // a tile is TILESIZE pixels wide and high

// Physics iterations per second
#define PHYSICSFPS 100
#define BLINKSPEED 2
#define SPECIALTILEDELAY 50

// Player movements
#define SPRITE_SWITCHWAIT 100
#define SPRITE_MAXSPEED 5
#define SPRITE_ACCEL 0.1
#define SPRITE_JUMPSPEED -4
#define SPRITE_GRAVITY 0.09
#define SPRITE_FALLSILENTTHRESHOLD 1.0

// Scores
#define PIXEL_SCORE 20

// Max. Players
#define MAX_PLAYERS 1

//main.cpp
extern SDL_Surface *gScreen;

// Last iteration's tick value
extern Uint32 gLastTick;

// Maximum length of RESPATH+filenames
#define MAX_FNAME_LENGTH 500

// Max. legth of all-purpose strings
#define MAX_STRING_LENGTH 1000

// Number of monster bitmaps
#define MAX_MONSTER_TYPES 5

// Speed dying monsters vanish
#define MONSTER_DIESPEED 5

// Move-types for player and monsters
typedef enum _MOVE_TYPE {
	MOVE_LEFT,
	MOVE_RIGHT,
	JUMP_LEFT,
	JUMP_RIGHT,
	NO_MOVE
} MOVE_TYPE;

// Input timeout for cheatcodes - in miliseconds
#define CHEATTIMEOUT 10000
extern char cheatCode[MAX_STRING_LENGTH];
extern bool enteringCheat;

#ifdef ENABLE_FULLSCREEN
extern bool isFullscreen;
#endif


// Foreground objects
//   Maximum number of objects
#define MAX_FGOBJECTS 100
//   Maximum number of GRAPHICS for the objects
#define MAX_FGOBJECTGFX 100

// Sound effects (FX)
//  Maximum number of effects
#define MAX_FX_SAMPLES 100

#endif // GLOBALS_H
