diff --git a/include/ZE_Defines.h b/include/ZE_Defines.h
index bc16755..062bee5 100644
--- a/include/ZE_Defines.h
+++ b/include/ZE_Defines.h
@@ -13,7 +13,7 @@
File: ZE_Defines.h
Description: Defines header file for ZEngine class, where all #define statements to control compilation options are placed.
Author(s): James Turk
-$Id: ZE_Defines.h,v 1.7 2003/01/19 05:43:40 cozman Exp $
+$Id: ZE_Defines.h,v 1.8 2003/02/16 21:38:49 cozman Exp $
\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 $
#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.
diff --git a/include/ZE_Includes.h b/include/ZE_Includes.h
index c1fb0d7..065193e 100644
--- a/include/ZE_Includes.h
+++ b/include/ZE_Includes.h
@@ -13,7 +13,7 @@
File: ZE_Includes.h
Description: Header file for ZEngine universal includes.
Author(s): James Turk
-$Id: ZE_Includes.h,v 1.5 2003/01/13 05:53:47 cozman Exp $
+$Id: ZE_Includes.h,v 1.6 2003/02/16 21:38:50 cozman Exp $
\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 $
#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"
diff --git a/src/ZE_ZEngine.cpp b/src/ZE_ZEngine.cpp
index f122809..6a618e1 100644
--- a/src/ZE_ZEngine.cpp
+++ b/src/ZE_ZEngine.cpp
@@ -13,7 +13,7 @@
File: ZE_ZEngine.cpp
Description: Implementation source file for ZEngine library main singleton class.
Author(s): James Turk
-$Id: ZE_ZEngine.cpp,v 1.27 2003/02/02 23:30:15 cozman Exp $
+$Id: ZE_ZEngine.cpp,v 1.28 2003/02/16 21:38:50 cozman Exp $
\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)