This commit is contained in:
James Turk 2003-02-16 21:38:49 +00:00
parent 1723f7b547
commit d2adde5d9f
3 changed files with 26 additions and 4 deletions

View File

@ -13,7 +13,7 @@
File: ZE_Defines.h <br>
Description: Defines header file for ZEngine class, where all #define statements to control compilation options are placed. <br>
Author(s): James Turk <br>
$Id: ZE_Defines.h,v 1.7 2003/01/19 05:43:40 cozman Exp $<br>
$Id: ZE_Defines.h,v 1.8 2003/02/16 21:38:49 cozman Exp $<br>
\file ZE_Defines.h
\brief Define file for ZEngine.
@ -31,6 +31,8 @@ $Id: ZE_Defines.h,v 1.7 2003/01/19 05:43:40 cozman Exp $<br>
#define USE_SDL_IMAGE
//! Define to include sound support.
#define USE_SDL_MIXER
//! Define to include net support.
#define USE_SDL_NET
//! Define to use the Physfs file system.
//#define USE_PHYSFS
//! Version number.

View File

@ -13,7 +13,7 @@
File: ZE_Includes.h <br>
Description: Header file for ZEngine universal includes. <br>
Author(s): James Turk <br>
$Id: ZE_Includes.h,v 1.5 2003/01/13 05:53:47 cozman Exp $<br>
$Id: ZE_Includes.h,v 1.6 2003/02/16 21:38:50 cozman Exp $<br>
\file ZE_Includes.h
\brief Include file for SDL and C++ Includes that many ZEngine files need.
@ -39,6 +39,9 @@ $Id: ZE_Includes.h,v 1.5 2003/01/13 05:53:47 cozman Exp $<br>
#ifdef USE_SDL_MIXER
#include "SDL_mixer.h"
#endif
#ifdef USE_SDL_NET
#include "SDL_net.h"
#endif
#ifdef USE_PHYSFS
#include "physfs.h"
#include "external/physfsrwops.h"

View File

@ -13,7 +13,7 @@
File: ZE_ZEngine.cpp <br>
Description: Implementation source file for ZEngine library main singleton class. <br>
Author(s): James Turk <br>
$Id: ZE_ZEngine.cpp,v 1.27 2003/02/02 23:30:15 cozman Exp $<br>
$Id: ZE_ZEngine.cpp,v 1.28 2003/02/16 21:38:50 cozman Exp $<br>
\file ZE_ZEngine.cpp
\brief Central source file for ZEngine.
@ -238,18 +238,34 @@ bool ZEngine::CreateDisplay(string title, string icon)
}
#endif //USE_SDL_TTF
#ifdef USE_SDL_NET
if(!mInitialized)
{
if(SDLNet_Init() < 0)
{
ReportError(ZERR_NET_INIT,SDLNet_GetError());
status = false; //possible to go on without SDL_Net
}
}
#endif //USE_SDL_NET
if(!mInitialized)
mLastTime = mPausedTime = SDL_GetTicks();
mActive = true;
mInitialized = true; //if it makes it to the end it has been initialized
return status; //return true (false will be returned if TTF or Mixer fail)
return status; //return true (false will be returned if TTF or Mixer or Net fail)
}
void ZEngine::CloseDisplay()
{
if(mInitialized)
{
#ifdef USE_SDL_NET
SDLNet_Quit();
#endif
#ifdef USE_SDL_TTF
TTF_Quit();
#endif
@ -595,6 +611,7 @@ ZErrorCode ZEngine::GetLastError()
void ZEngine::WriteLog(string str)
{
fprintf(mErrlog,str.c_str());
fprintf(mErrlog,"\n");
}
void ZEngine::LogError(ZError error)