forked from 0ad/0ad
finally removing; it has no function
This was SVN commit r962.
This commit is contained in:
parent
56d798d52f
commit
77eb2d7db8
@ -176,6 +176,7 @@ int CGUI::HandleEvent(const SDL_Event* ev)
|
||||
catch (PS_RESULT e)
|
||||
{
|
||||
UNUSED(e);
|
||||
debug_warn("CGUI::HandleEvent error");
|
||||
// TODO Gee: Handle
|
||||
}
|
||||
// JW: what's the difference between mPress and mDown? what's the code below responsible for?
|
||||
@ -244,6 +245,7 @@ IGUIObject *CGUI::ConstructObject(const CStr& str)
|
||||
return (*m_ObjectTypes[str])();
|
||||
else
|
||||
{
|
||||
debug_warn("CGUI::ConstructObject error");
|
||||
// TODO Gee: Report in log
|
||||
return NULL;
|
||||
}
|
||||
@ -354,6 +356,7 @@ void CGUI::Draw()
|
||||
glPopMatrix();
|
||||
|
||||
// TODO Gee: Report error.
|
||||
debug_warn("CGUI::Draw error");
|
||||
return;
|
||||
}
|
||||
glPopMatrix();
|
||||
@ -376,6 +379,7 @@ void CGUI::DrawSprite(const CStr& SpriteName,
|
||||
// Fetch real sprite from name
|
||||
if (m_Sprites.count(SpriteName) == 0)
|
||||
{
|
||||
debug_warn("CGUI::DrawSprite error");
|
||||
// TODO Gee: Report error
|
||||
return;
|
||||
}
|
||||
@ -465,6 +469,7 @@ void CGUI::Destroy()
|
||||
catch (PS_RESULT e)
|
||||
{
|
||||
UNUSED(e);
|
||||
debug_warn("CGUI::Destroy error");
|
||||
// TODO Gee: Handle
|
||||
}
|
||||
|
||||
@ -943,6 +948,7 @@ void CGUI::LoadXMLFile(const string &Filename)
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_warn("CGUI::LoadXMLFile error");
|
||||
// TODO Gee: Output in log
|
||||
}
|
||||
}
|
||||
@ -1093,6 +1099,7 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
|
||||
// additional check
|
||||
if (m_Styles.count(argStyle) == 0)
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadObject error");
|
||||
// TODO Gee: Error
|
||||
}
|
||||
else object->LoadStyle(*this, argStyle);
|
||||
@ -1238,6 +1245,9 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
|
||||
|
||||
if (element_name == elmt_object)
|
||||
{
|
||||
//debug_warn("CGUI::Xeromyces_ReadObject error");
|
||||
// janwas: this happens but looks to be handled
|
||||
|
||||
// TODO Gee: REPORT ERROR
|
||||
|
||||
// Call this function on the child
|
||||
@ -1281,6 +1291,7 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
|
||||
// Set it automatically to 10 plus its parents
|
||||
if (pParent==NULL)
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadObject error");
|
||||
// TODO Gee: Report error
|
||||
}
|
||||
else
|
||||
@ -1437,6 +1448,7 @@ void CGUI::Xeromyces_ReadImage(XMBElement Element, CXeromyces* pFile, CGUISprite
|
||||
CClientArea ca;
|
||||
if (!GUI<CClientArea>::ParseString(attr_value, ca))
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadImage error");
|
||||
// TODO Gee: Error
|
||||
}
|
||||
else image.m_Size = ca;
|
||||
@ -1447,6 +1459,7 @@ void CGUI::Xeromyces_ReadImage(XMBElement Element, CXeromyces* pFile, CGUISprite
|
||||
CClientArea ca;
|
||||
if (!GUI<CClientArea>::ParseString(attr_value, ca))
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadImage error");
|
||||
// TODO Gee: Error
|
||||
}
|
||||
else image.m_TextureSize = ca;
|
||||
@ -1457,6 +1470,7 @@ void CGUI::Xeromyces_ReadImage(XMBElement Element, CXeromyces* pFile, CGUISprite
|
||||
int z_level;
|
||||
if (!GUI<int>::ParseString(attr_value, z_level))
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadImage error");
|
||||
// TODO Gee: Error
|
||||
}
|
||||
else image.m_DeltaZ = (float)z_level/100.f;
|
||||
@ -1467,12 +1481,14 @@ void CGUI::Xeromyces_ReadImage(XMBElement Element, CXeromyces* pFile, CGUISprite
|
||||
CColor color;
|
||||
if (!GUI<CColor>::ParseString(attr_value, color))
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadImage error");
|
||||
// TODO Gee: Error
|
||||
}
|
||||
else image.m_BackColor = color;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_warn("CGUI::Xeromyces_ReadImage error");
|
||||
// TODO Gee: Log
|
||||
//g_console.submit("echo Error attribute " + attr_name + " is not expected in <image>");
|
||||
return;
|
||||
|
@ -1,13 +1,36 @@
|
||||
#if defined(_WIN32)
|
||||
//
|
||||
// OS
|
||||
//
|
||||
|
||||
// Windows
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
# define OS_WIN
|
||||
#elif defined(linux)
|
||||
// Linux
|
||||
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||
# define OS_LINUX
|
||||
# define OS_UNIX
|
||||
#elif defined(macintosh)
|
||||
# define OS_MACOS
|
||||
#elif defined(__APPLE__) && defined(__MACH__)
|
||||
// Mac OS X
|
||||
#elif defined(MAC_OS_X
|
||||
# define OS_MACOSX
|
||||
# define OS_UNIX
|
||||
// Mac OS 9 or below
|
||||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
# define OS_MACOS
|
||||
// BSD
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# define OS_BSD
|
||||
// Solaris
|
||||
#elif defined(SOLARIS)
|
||||
# define OS_SOLARIS
|
||||
// BeOS
|
||||
#elif defined(__BEOS__)
|
||||
# define OS_BEOS
|
||||
// Amiga
|
||||
#elif defined(__amigaos__)
|
||||
# define OS_AMIGA
|
||||
// Unix-based
|
||||
#elif defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
|
||||
# define OS_UNIX
|
||||
#else
|
||||
# error "unknown OS - add define here"
|
||||
#endif
|
||||
@ -39,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(HAVE_PCH) && !( defined(NDEBUG) || defined(TESTING) )
|
||||
# define HAVE_DEBUGALLOC
|
||||
//# define HAVE_DEBUGALLOC
|
||||
#endif
|
||||
|
||||
#ifdef OS_UNIX
|
||||
|
@ -1,84 +0,0 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Matrix3D.h"
|
||||
#include "Renderer.h"
|
||||
#include "Terrain.h"
|
||||
#include "LightEnv.h"
|
||||
#include "HFTracer.h"
|
||||
#include "TextureManager.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "Prometheus.h"
|
||||
#include "Hotkey.h"
|
||||
#include "ConfigDB.h"
|
||||
|
||||
#include "sdl.h"
|
||||
#include "res/tex.h"
|
||||
#include "detect.h"
|
||||
#include "input.h"
|
||||
#include "lib.h"
|
||||
|
||||
void InitScene ();
|
||||
void InitResources ();
|
||||
|
||||
extern bool keys[512]; // SDL also defines non-ascii keys; 512 should be enough
|
||||
extern bool mouseButtons[5];
|
||||
extern int mouse_x, mouse_y;
|
||||
extern bool g_active;
|
||||
|
||||
|
||||
CMatrix3D g_WorldMat;
|
||||
CLightEnv g_LightEnv;
|
||||
|
||||
|
||||
/*void InitScene ()
|
||||
{
|
||||
// load terrain
|
||||
TexInfo ti;
|
||||
int err = tex_load("terrain.raw", &ti);
|
||||
if(err == 0)
|
||||
{
|
||||
int w = ti.w, h = ti.h;
|
||||
printf("terrain.raw: %dx%d\n", w, h);
|
||||
char* p = (char*)mem_get_ptr(ti.hm);
|
||||
|
||||
u16 *p16=new u16[w*h];
|
||||
u16 *p16p=p16;
|
||||
while (p16p < p16+(w*h))
|
||||
*p16p++ = (*p++) << 8;
|
||||
|
||||
g_Terrain.Resize(w/PATCH_SIZE);
|
||||
g_Terrain.SetHeightMap(p16);
|
||||
|
||||
delete[] p16;
|
||||
|
||||
tex_free(&ti);
|
||||
}
|
||||
|
||||
// get default texture to apply to terrain
|
||||
CTextureEntry* texture=0;
|
||||
for (uint ii=0;ii<g_TexMan.m_TerrainTextures.size();ii++) {
|
||||
if (g_TexMan.m_TerrainTextures[ii].m_Textures.size()) {
|
||||
texture=g_TexMan.m_TerrainTextures[ii].m_Textures[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// cover entire terrain with default texture
|
||||
u32 patchesPerSide=g_Terrain.GetPatchesPerSide();
|
||||
for (uint pj=0; pj<patchesPerSide; pj++) {
|
||||
for (uint pi=0; pi<patchesPerSide; pi++) {
|
||||
|
||||
CPatch* patch=g_Terrain.GetPatch(pi,pj);
|
||||
|
||||
for (int j=0;j<PATCH_SIZE;j++) {
|
||||
for (int i=0;i<PATCH_SIZE;i++) {
|
||||
patch->m_MiniPatches[j][i].Tex1=texture ? texture->GetHandle() :0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
Loading…
Reference in New Issue
Block a user