Changed: Renamed a few classes

Changed: Moved most sensible objects into the OpenArena namespace
~g2k
This commit is contained in:
2005-06-29 11:33:11 -04:00
parent f6a191d21d
commit c16a0dae6d
17 changed files with 1818 additions and 1781 deletions

View File

@@ -30,78 +30,81 @@
#include "keys.h"
using namespace std;
using OpenArena::Triangle;
const float piover180 = 0.0174532925f;
const string DEFAULT_TEXTURE_NAME = "oa/textures/default.bmp";
const unsigned int MAX_CONSOLE_LINES = 30; //The max number of lines to be displayed in the console
const unsigned int MAX_CONSOLE_HISTORY_LINES = MAX_CONSOLE_LINES + 20; //The max number of console lines to store in the history
const unsigned int MAX_CONSOLE_OUTPUT_LINES = MAX_CONSOLE_LINES;
const unsigned int MAX_OUTPUT_TEXT_LINES = 4; //The max number of output lines to be displayed on the screen
enum {GL_MY_TEXTURE_CONSOLEBACKGROUND=0, NUM_MENU_TEXTURES};
class LEVEL
namespace OpenArena
{
public:
LEVEL();
~LEVEL();
bool LoadMap(string mapname);
bool LoadMap();
void SaveMap(string mapname);
bool LoadConfig(string cfgname);
void LoadConfig();
void SaveConfig(string cfgname);
void Execute(string cmd);
void LoadGLTextures();
void Render();
void UnloadMap();
void UpdateConsole(char);
uint32 FPS();
void ParseCmds(const char*);
void Print(int x, int y, const char* string, unsigned int set);
/*Not Yet Implemented
void PlayerConnect(); // implement later
void PlayerDisconnect(); // implement later
*/
SCREEN screen;
GLFontClass glFont;
string nextLevel;
PLAYER* defaultPlayer;
uint32 numTextures;
string* textureNames;
const float piover180 = 0.0174532925f;
const string DEFAULT_TEXTURE_NAME = "oa/textures/default.bmp";
const unsigned int MAX_CONSOLE_LINES = 30; //The max number of lines to be displayed in the console
const unsigned int MAX_CONSOLE_HISTORY_LINES = MAX_CONSOLE_LINES + 20; //The max number of console lines to store in the history
const unsigned int MAX_CONSOLE_OUTPUT_LINES = MAX_CONSOLE_LINES;
const unsigned int MAX_OUTPUT_TEXT_LINES = 4; //The max number of output lines to be displayed on the screen
string bgm;
#ifdef WIN32
HSTREAM bgmStream;
#endif
unsigned char bgmCDA;
string gamedir;
float gravity;
bool mlook;
bool showFPS;
bool showConsole;
bool sound;
float turnSpeed;
float moveSpeed;
float mouseSpeed;
unsigned char maxFPS;
//Map
TRIANGLE* triangles;
uint32 numTriangles;
list<PLAYER> players;
list<ENTITY> ents;
//list<GL_MY_TEXTURE> textures;
GL_MY_TEXTURE* textures;
GL_MY_TEXTURE menuTextures[NUM_MENU_TEXTURES];
enum {GL_MY_TEXTURE_CONSOLEBACKGROUND=0, NUM_MENU_TEXTURES};
private:
void ConsolePrint(string);
string consoleHistory[MAX_CONSOLE_HISTORY_LINES];
string consoleOutput[MAX_CONSOLE_OUTPUT_LINES];
string outputText[MAX_OUTPUT_TEXT_LINES];
};
class Level
{
public:
Level();
~Level();
bool LoadMap(string mapname);
bool LoadMap();
void SaveMap(string mapname);
bool LoadConfig(string cfgname);
void LoadConfig();
void SaveConfig(string cfgname);
void Execute(string cmd);
void LoadGLTextures();
void Render();
void UnloadMap();
void UpdateConsole(char);
uint32 FPS();
void ParseCmds(const char*);
void Print(int x, int y, const char* string, unsigned int set);
/*Not Yet Implemented
void PlayerConnect(); // implement later
void PlayerDisconnect(); // implement later
*/
Screen screen;
Font glFont;
string nextLevel;
Player* defaultPlayer;
uint32 numTextures;
string* textureNames;
string bgm;
#ifdef WIN32
HSTREAM bgmStream;
#endif
unsigned char bgmCDA;
string gamedir;
float gravity;
bool mlook;
bool showFPS;
bool showConsole;
bool sound;
float turnSpeed;
float moveSpeed;
float mouseSpeed;
unsigned char maxFPS;
//Map
Triangle* triangles;
uint32 numTriangles;
list<Player> players;
list<ENTITY> ents;
//list<GL_MY_TEXTURE> textures;
Texture* textures;
Texture menuTextures[NUM_MENU_TEXTURES];
private:
void ConsolePrint(string);
string consoleHistory[MAX_CONSOLE_HISTORY_LINES];
string consoleOutput[MAX_CONSOLE_OUTPUT_LINES];
string outputText[MAX_OUTPUT_TEXT_LINES];
};
};
#endif