Permalink
Browse files

Remove stuff from Config.h that doesn't belong

  • Loading branch information...
wolfy1339 authored and jacob1 committed Nov 16, 2017
1 parent 6cfaed0 commit 87f3ada7b0d623757ca7e487ef315c5aacf5aea8
@@ -163,10 +163,6 @@
#define GLASS_IOR 1.9
#define GLASS_DISP 0.07

//some compatibility stuff for non-standard compilers
#if defined(WIN) && !defined(strcasecmp)
#define strcasecmp stricmp
#endif
#if defined(_MSC_VER)
#if _MSC_VER < 1800
#define fmin min
@@ -178,21 +174,6 @@
#endif
#endif

#if defined(_MSC_VER)
#define TPT_INLINE _inline
#else
#define TPT_INLINE inline
#endif

// old Platform.h stuff, maybe we should have a file for these kinds of things
typedef unsigned short Uint16;

#ifndef NULL
# define NULL 0
#endif

#include <climits>

#define SDEUT
//#define REALHEAT

@@ -3,6 +3,7 @@
#include <map>
#include <string>
#include <ctime>
#include <climits>
#ifdef WIN
#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later
#include <direct.h>
@@ -34,7 +35,7 @@
#include <ApplicationServices/ApplicationServices.h>
extern "C" {
char * readClipboard();
void writeClipboard(const char * clipboardData);
void writeClipboard(const char * clipboardData);
}
#endif

@@ -779,7 +780,7 @@ void EngineProcess()

engine->Tick();
engine->Draw();

if(scale != engine->Scale || fullscreen != engine->Fullscreen)
{
sdl_scrn = SDLSetScreen(engine->Scale, engine->Fullscreen);
@@ -844,7 +845,7 @@ bool LoadWindowPosition(int scale)

int savedWindowX = Client::Ref().GetPrefInteger("WindowX", INT_MAX);
int savedWindowY = Client::Ref().GetPrefInteger("WindowY", INT_MAX);

// Center the window on the primary desktop by default
int newWindowX = (desktopWidth - windowW) / 2;
int newWindowY = (desktopHeight - windowH) / 2;
@@ -878,7 +879,7 @@ bool LoadWindowPosition(int scale)
}
}
}

SetWindowPos(sysInfo.window, 0, newWindowX, newWindowY, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);

// True if we didn't use the default, i.e. the position was valid
@@ -921,7 +922,7 @@ void BlueScreen(const char * detailMessage){
int currentY = 0, width, height;
int errorWidth = 0;
Graphics::textsize(errorHelp.c_str(), errorWidth, height);

engine->g->drawtext((engine->GetWidth()/2)-(errorWidth/2), ((engine->GetHeight()/2)-100) + currentY, errorTitle.c_str(), 255, 255, 255, 255);
Graphics::textsize(errorTitle.c_str(), width, height);
currentY += height + 4;
@@ -933,9 +934,9 @@ void BlueScreen(const char * detailMessage){
engine->g->drawtext((engine->GetWidth()/2)-(errorWidth/2), ((engine->GetHeight()/2)-100) + currentY, errorHelp.c_str(), 255, 255, 255, 255);
Graphics::textsize(errorTitle.c_str(), width, height);
currentY += height + 4;

//Death loop
SDL_Event event;
SDL_Event event;
while(true)
{
while (SDL_PollEvent(&event))
@@ -975,7 +976,7 @@ int main(int argc, char * argv[])
#if defined(_DEBUG) && defined(_MSC_VER)
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
#endif
currentWidth = WINDOWW;
currentWidth = WINDOWW;
currentHeight = WINDOWH;


@@ -1013,7 +1014,7 @@ int main(int argc, char * argv[])
if(arguments["proxy"] == "false")
{
proxyString = "";
Client::Ref().SetPref("Proxy", "");
Client::Ref().SetPref("Proxy", "");
}
else
{
@@ -1065,7 +1066,7 @@ int main(int argc, char * argv[])
XA_TARGETS = XInternAtom(sdl_wminfo.info.x11.display, "TARGETS", 1);
XA_UTF8_STRING = XInternAtom(sdl_wminfo.info.x11.display, "UTF8_STRING", 1);
sdl_wminfo.info.x11.unlock_func();
}
}
else
{
fprintf(stderr, "X11 setup failed, X11 window info not found");
@@ -1203,7 +1204,7 @@ int main(int argc, char * argv[])
SDL_GetMouseState(&sdl_x, &sdl_y);
engine->onMouseMove(sdl_x*inputScale, sdl_y*inputScale);
EngineProcess();

#ifdef WIN
SaveWindowPosition();
#endif
@@ -1215,7 +1216,7 @@ int main(int argc, char * argv[])
BlueScreen(e.what());
}
#endif

Client::Ref().SetPref("Scale", ui::Engine::Ref().GetScale());
ui::Engine::Ref().CloseWindow();
delete gameController;
@@ -26,7 +26,8 @@
#include <cstring>
#include <cstdio>
#include <cstdarg>
#include "Config.h"
#include <climits>
#include "common/tpt-inline.h"

#if defined(LIN) || defined(USE_STDINT)
#include <sys/types.h>
@@ -647,13 +648,13 @@ int bson_init_data( bson *b , char *data );


/**
* Initialize a BSON object, point its data pointer
* Initialize a BSON object, point its data pointer
* to the provided char*, and initialize the size
*
* @param b the BSON object to initialize.
* @param data the raw BSON data.
* @param size the size of the BSON data.
*
*
* @return BSON_OK or BSON_ERROR.
*/
int bson_init_data_size( bson *b , char *data , int size );
@@ -0,0 +1,30 @@
/*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TPT_COMPAT_H
#define TPT_COMPAT_H

//some compatibility stuff for non-standard compilers
#if defined(WIN) && !defined(strcasecmp)
#define strcasecmp stricmp
#endif

typedef unsigned short Uint16;

#ifndef NULL
# define NULL 0
#endif

#endif
@@ -0,0 +1,25 @@
/*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TPT_INLINE_H
#define TPT_INLINE_H

#if defined(_MSC_VER)
#define TPT_INLINE _inline
#else
#define TPT_INLINE inline
#endif

#endif
@@ -1,7 +1,7 @@
#pragma once

#include "gui/interface/Point.h"
#include "Config.h"
#include "common/tpt-compat.h"

class DebugInfo
{
@@ -9,6 +9,7 @@
#include "OpenGLHeaders.h"
#endif
#include "Config.h"
#include "common/tpt-inline.h"
#include "Pixel.h"
#include "Icons.h"

Oops, something went wrong.

0 comments on commit 87f3ada

Please sign in to comment.