DemoGame::main()
by Ben Woodhead · in Torque Game Engine · 04/06/2004 (6:31 am) · 3 replies
Hello Everybody,
I hope this is the correct place to post this. I have been reading through the engine/game/main.cc file and I came across a section of code that I am wondering about.
As far as I can tell this should never be sent to the linker at all. So the question has this actually been moved to the platform class like it suggests and can this be removed.
Thanks, Ben
I hope this is the correct place to post this. I have been reading through the engine/game/main.cc file and I came across a section of code that I am wondering about.
#if 0
// tg: Argh! This OS version check should be part of Platform, not here...
//
// check os
OSVERSIONINFO osInfo;
dMemset(&osInfo, 0, sizeof(OSVERSIONINFO));
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
// see if osversioninfoex fails
if(!GetVersionEx((OSVERSIONINFO*)&osInfo))
{
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if(!GetVersionEx((OSVERSIONINFO*)&osInfo))
return 0;
}
// terminate the process if win95 only!
if((osInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) && // 95, 98, ME
(osInfo.dwMajorVersion == 4) && // 95, 98, ME, NT
(osInfo.dwMinorVersion == 0)) // 95
{
AssertWarn(0, "Forcing termination of app (Win95)! Upgrade your OS now!");
TerminateProcess(GetCurrentProcess(), 0xffffffff);
}
#endifAs far as I can tell this should never be sent to the linker at all. So the question has this actually been moved to the platform class like it suggests and can this be removed.
Thanks, Ben
About the author
#2
As for TextureManager, it's in dgl/gTexManager(.h,.cc)
hth
04/06/2004 (7:56 am)
It isn't sent to the linker, #if 0 being always false, it never get compiled. it's a programmer's trick to disable code you're not ready to take out as of yet (there are a few little "gems" like that one sprinkled around the TGE codebase ;))As for TextureManager, it's in dgl/gTexManager(.h,.cc)
hth
Torque Owner Ben Woodhead
Since I am here and I can't seem to find it. Where is the texture manager. I looked in all the directories and I am dieing to know what this command does. Sounds a little scary to me. :)
Ben