ZE_main and library reordering

This commit is contained in:
James Turk 2003-09-09 02:45:58 +00:00
parent f6790a4a46
commit ff26c4414e
18 changed files with 78 additions and 85 deletions

View File

@ -1,7 +1,7 @@
[Project]
FileName=ZEngine.dev
Name=ZEngine
UnitCount=33
UnitCount=34
Type=2
Ver=1
ObjFiles=
@ -375,3 +375,13 @@ ProductName=
ProductVersion=
AutoIncBuildNr=0
[Unit34]
FileName=..\src\ZE_main.cpp
CompileCpp=1
Folder=Source
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

View File

@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=
Linker=-lmingw32_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDLmain_@@_-lSDL_@@_-lOpenGL32_@@_
Linker=-lmingw32_@@_-lSDLmain_@@_-lZEngineS_@@_-lSDL_mixer_@@_-lSDL_image_@@_-lSDL_ttf_@@_-lSDL_@@_-lOpenGL32_@@_
IsCpp=1
Icon=
ExeOutput=..\test\bin

39
src/ZE_main.cpp Executable file
View File

@ -0,0 +1,39 @@
/*******************************************************************************
This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/**
\file ZE_main.cpp
\brief Source file which defines default ZEngine entry point.
The entry point 'main' defined in this file simply does the initial creation and freeing of ZEngine.
An application that defines main overrides this main, so backwards compatibility is not broken, however as of 0.8.5 ZE_main is the
expected entry point of ZEngine applications.
<br>$Id: ZE_main.cpp,v 1.1 2003/09/09 02:45:58 cozman Exp $<br>
\author James Turk
**/
#include "ZEngine.h"
extern int ZE_main(int argc, char *argv[]);
int main(int argc, char *argv[])
{
ZE::ZEngine *engine = ZE::ZEngine::GetInstance();
int ret;
#ifdef USE_PHYSFS
engine->InitPhysFS(argv[0]);
#endif
ret = ZE_main(argc,argv);
ZE::ZEngine::ReleaseInstance(); //release engine instance
return ret;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZFontTest.cpp,v 1.14 2003/08/02 01:18:45 cozman Exp $*/
/*$Id: ZFontTest.cpp,v 1.15 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -77,16 +77,9 @@ void Test()
} while(!engine->QuitRequested()); //quit only when engine has encountered a quit request
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZImageTest.cpp,v 1.23 2003/09/05 19:44:13 cozman Exp $*/
/*$Id: ZImageTest.cpp,v 1.24 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -134,16 +134,9 @@ void Test()
} while(!engine->QuitRequested()); //quit only when engine has encountered a quit request
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZMouseTest.cpp,v 1.15 2003/07/10 20:45:39 cozman Exp $*/
/*$Id: ZMouseTest.cpp,v 1.16 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -87,16 +87,9 @@ void Test()
} while(!engine->QuitRequested()); //quit only when engine has encountered a quit request
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZMusicTest.cpp,v 1.16 2003/07/10 20:45:39 cozman Exp $*/
/*$Id: ZMusicTest.cpp,v 1.17 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -103,16 +103,9 @@ void Test()
}
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZParticleTest.cpp,v 1.4 2003/08/02 01:32:46 cozman Exp $*/
/*$Id: ZParticleTest.cpp,v 1.5 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -147,16 +147,9 @@ void Test()
} while(!engine->QuitRequested()); //quit only when engine has encountered a quit request
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZRectTest.cpp,v 1.17 2003/07/10 20:45:39 cozman Exp $*/
/*$Id: ZRectTest.cpp,v 1.18 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -82,16 +82,9 @@ void Test()
} while(!engine->QuitRequested());
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZSoundTest.cpp,v 1.15 2003/07/10 23:30:07 cozman Exp $*/
/*$Id: ZSoundTest.cpp,v 1.16 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -99,16 +99,9 @@ void Test()
} while(!engine->QuitRequested()); //quit only when engine has encountered a quit request
}
int main(int argc, char *argv[])
int ZE_main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
}

View File

@ -9,7 +9,7 @@ This example file is in the public domain, it may be used with no restrictions.
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*$Id: ZTimerTest.cpp,v 1.15 2003/07/12 01:25:42 cozman Exp $*/
/*$Id: ZTimerTest.cpp,v 1.16 2003/09/09 02:45:58 cozman Exp $*/
#include <ZEngine.h>
#include <string>
@ -117,16 +117,9 @@ void Test()
} while(!engine->QuitRequested()); //quit only when engine has encountered a quit request
}
int main(int argc, char *argv[])
{
ZEngine *engine = ZEngine::GetInstance();
if(Initialize())
{
//engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available
Test();
}
ZEngine::ReleaseInstance(); //release engine instance
return 0;
int ZE_main(int argc, char *argv[])
{
if(Initialize())
Test();
return 0;
}