2009-04-18 19:00:33 +02:00
|
|
|
/* Copyright (C) 2009 Wildfire Games.
|
|
|
|
* This file is part of 0 A.D.
|
|
|
|
*
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 0 A.D. 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 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2004-09-17 19:49:12 +02:00
|
|
|
#ifndef NDEBUG
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <hash_map>
|
|
|
|
#include <string>
|
|
|
|
#include <sstream>
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
/*
|
|
|
|
#include <crtdbg.h>
|
|
|
|
#define new new(_NORMAL_BLOCK ,__FILE__, __LINE__)
|
|
|
|
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
|
|
|
#define free(p) _free_dbg(p, _NORMAL_BLOCK)
|
|
|
|
*/
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Random stuff:
|
|
|
|
|
|
|
|
#define SDL_LIL_ENDIAN 1234
|
|
|
|
#define SDL_BIG_ENDIAN 4321
|
|
|
|
|
2006-12-16 02:01:15 +01:00
|
|
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
2004-09-17 19:49:12 +02:00
|
|
|
|
2005-07-26 23:13:52 +02:00
|
|
|
#include <cassert>
|
2004-09-17 19:49:12 +02:00
|
|
|
#define cassert(x) extern char cassert__##__LINE__ [x]
|
|
|
|
#define debug_warn(x) assert(0&&x)
|
2005-07-26 23:13:52 +02:00
|
|
|
#define debug_assert assert
|
2004-09-17 19:49:12 +02:00
|
|
|
|
|
|
|
#define XP_WIN
|
2005-08-09 23:26:40 +02:00
|
|
|
#define MSC_VERSION _MSC_VER
|
|
|
|
#define UNUSED(x)
|
2004-09-17 19:49:12 +02:00
|
|
|
|
2005-07-26 23:13:52 +02:00
|
|
|
#include "ps/Errors.h"
|
2004-09-17 19:49:12 +02:00
|
|
|
|
2005-07-26 23:13:52 +02:00
|
|
|
#include <cstdio>
|
|
|
|
#define swprintf _snwprintf
|