From 106c8aab48d1cb8579fcc57ab38a1e5d6edb22c9 Mon Sep 17 00:00:00 2001 From: James Turk Date: Sun, 1 Dec 2002 07:56:17 +0000 Subject: [PATCH] Major 0.7.7 Update. All OpenGL Work was done offline. --- authors.txt | 2 +- changelog.txt | 224 ++++--- doc/ZEngine.linux.doxygen | 2 +- doc/ZEngine.log | 10 - doc/ZEngine.win32.doxygen | 2 +- doc/html/ZE__Defines_8h-source.html | 12 +- doc/html/ZE__Defines_8h.html | 21 +- doc/html/ZE__Error_8cpp.html | 15 +- doc/html/ZE__Error_8h-source.html | 14 +- doc/html/ZE__Error_8h.html | 15 +- doc/html/ZE__Includes_8h-source.html | 62 +- doc/html/ZE__Includes_8h.html | 17 +- doc/html/ZE__ZConfigFile_8cpp.html | 15 +- doc/html/ZE__ZConfigFile_8h-source.html | 127 ++-- doc/html/ZE__ZConfigFile_8h.html | 15 +- doc/html/ZE__ZEngine_8cpp.html | 15 +- doc/html/ZE__ZEngine_8h-source.html | 293 ++++----- doc/html/ZE__ZEngine_8h.html | 17 +- doc/html/ZE__ZFont_8cpp.html | 15 +- doc/html/ZE__ZFont_8h-source.html | 123 ++-- doc/html/ZE__ZFont_8h.html | 15 +- doc/html/ZE__ZImage_8cpp.html | 22 +- doc/html/ZE__ZImage_8h-source.html | 111 ++-- doc/html/ZE__ZImage_8h.html | 22 +- doc/html/ZE__ZMusic_8cpp.html | 15 +- doc/html/ZE__ZMusic_8h-source.html | 56 +- doc/html/ZE__ZMusic_8h.html | 15 +- doc/html/ZE__ZObject_8h-source.html | 22 +- doc/html/ZE__ZObject_8h.html | 15 +- doc/html/ZE__ZRect_8cpp.html | 15 +- doc/html/ZE__ZRect_8h-source.html | 70 +- doc/html/ZE__ZRect_8h.html | 15 +- doc/html/ZE__ZSound_8cpp.html | 15 +- doc/html/ZE__ZSound_8h-source.html | 56 +- doc/html/ZE__ZSound_8h.html | 15 +- doc/html/ZE__ZTimer_8cpp.html | 15 +- doc/html/ZE__ZTimer_8h-source.html | 38 +- doc/html/ZE__ZTimer_8h.html | 15 +- doc/html/ZEngine_8h-source.html | 35 +- doc/html/ZEngine_8h.html | 18 +- doc/html/annotated.html | 12 +- doc/html/classZE_1_1ZConfigFile-members.html | 6 +- doc/html/classZE_1_1ZConfigFile.html | 170 ++--- doc/html/classZE_1_1ZEngine-members.html | 40 +- doc/html/classZE_1_1ZEngine.html | 610 +++++++---------- doc/html/classZE_1_1ZFont-members.html | 19 +- doc/html/classZE_1_1ZFont.html | 225 ++++--- doc/html/classZE_1_1ZImage-members.html | 26 +- doc/html/classZE_1_1ZImage.html | 324 ++++----- doc/html/classZE_1_1ZMusic-members.html | 8 +- doc/html/classZE_1_1ZMusic.html | 97 +-- doc/html/classZE_1_1ZObject-members.html | 6 +- doc/html/classZE_1_1ZObject.html | 8 +- doc/html/classZE_1_1ZRect-members.html | 6 +- doc/html/classZE_1_1ZRect.html | 242 +++---- doc/html/classZE_1_1ZSound-members.html | 8 +- doc/html/classZE_1_1ZSound.html | 97 +-- doc/html/classZE_1_1ZTimer-members.html | 6 +- doc/html/classZE_1_1ZTimer.html | 32 +- doc/html/files.html | 55 +- doc/html/functions.html | 133 ++-- doc/html/globals.html | 6 +- doc/html/hierarchy.html | 14 +- doc/html/index.html | 39 +- doc/html/namespaceZE.html | 77 ++- doc/html/namespacemembers.html | 6 +- doc/html/namespaces.html | 6 +- doc/html/physfsrwops_8h-source.html | 10 +- include/ZE_Defines.h | 6 +- include/ZE_Error.h | 162 ++--- include/ZE_Includes.h | 5 +- include/ZE_ZConfigFile.h | 22 +- include/ZE_ZEngine.h | 84 +-- include/ZE_ZFont.h | 462 ++++++------- include/ZE_ZImage.h | 408 ++++++------ include/ZE_ZMusic.h | 366 +++++------ include/ZE_ZObject.h | 116 ++-- include/ZE_ZSound.h | 356 +++++----- include/ZE_ZTimer.h | 214 +++--- include/ZEngine.h | 10 +- include/external/SDLGL_Util.h | 12 + licensing.txt | 17 +- src/ZE_Error.cpp | 106 +-- src/ZE_ZConfigFile.cpp | 652 +++++++++---------- src/ZE_ZEngine.cpp | 224 +++---- src/ZE_ZFont.cpp | 408 ++++++------ src/ZE_ZImage.cpp | 405 ++++++------ src/ZE_ZMusic.cpp | 322 ++++----- src/ZE_ZSound.cpp | 314 ++++----- src/ZE_ZTimer.cpp | 162 ++--- src/external/SDLGL_Util.cpp | 89 +++ test/ZImageTest.cpp | 10 +- test/ZMouseTest.cpp | 6 +- test/ZMusicTest.cpp | 6 +- test/ZRectTest.cpp | 178 ++--- test/ZSoundTest.cpp | 6 +- test/bin/tests.zcf | 10 +- thanks.txt | 2 +- todo.txt | 5 +- vc7/ZEngine.sln | 2 - vc7/ZEngine.vcproj | 18 +- vc7/ZFontTest.vcproj | 1 + vc7/ZImageTest.vcproj | 1 + vc7/ZMouseTest.vcproj | 1 + vc7/ZMusicTest.vcproj | 1 + vc7/ZRectTest.vcproj | 1 + vc7/ZSoundTest.vcproj | 1 + vc7/ZTimerTest.vcproj | 1 + 108 files changed, 4506 insertions(+), 4570 deletions(-) create mode 100755 include/external/SDLGL_Util.h create mode 100755 src/external/SDLGL_Util.cpp diff --git a/authors.txt b/authors.txt index 95a15a5..5bb322c 100644 --- a/authors.txt +++ b/authors.txt @@ -1 +1 @@ -James Turk james@conceptofzero.net - Core Engine and Classes for Data Types +James Turk james@conceptofzero.net - Core Engine and Classes for Data Types diff --git a/changelog.txt b/changelog.txt index f1941c6..c0df03d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,102 +1,122 @@ -ZEngine Version Log for Version 0.7.5 -$Id: changelog.txt,v 1.2 2002/11/28 23:15:52 cozman Exp $ - -0.7.5 - -Converted all tabs to spaces. - -Added CVS lines to files for date tracking. - -Fixed file layout for CVS and reuploaded files to CVS. - -Major API changes (removed "Get" before accessors and changed some functions in ZEngine) - -Added Beginnings of OpenGL Render targets - -0.7.4 - -Modified behavior of ZImage::Attach and changed ZImageTest to use it. - -Added makefile for Linux build support. - -Renamed old makefile to makefile.mingw32 - -Fixed problem in ZImage::SetAlpha when failure occured. - -Added warnings in ZImage for when the display format fails. - -Completely rewrote ZConfigFile to avoid problems with STL map. - -Fixed problem in ZImage with transparency. - -Added doxygen script for linux, and renamed old doxygen script. - -0.7.3 - -Globally evised source variable naming standards. - -Fixed Error Logging in ZImage. - -Added SDL_DisplaySurface and SDL_DisplaySurfaceAlpha calls to speed up blitting in ZImage. - -Fixed bug in ZConfigFile that caused a NULL file to be closed. - -Several Documentation errors corrected. - -Added ZRect class, and ZRectTest. - -0.7.2 - -Fixed small source problem in PhysFS handling of non-supported types. - -Added makefile for Cygwin and Mingw32 - -Removed AFL license, and switched to BSD-style license. - -0.7.1 - -Changed directory layout. - -Changed source files to compile without PhysicsFS. - -Added newline to end of all source files. - -0.7.0 - -Changed slash direction in example programs (fixed non-windows problems). - -Added support for PhysicsFS. - -Added ZConfigFile. - -Updated all examples to be cleaner style and use more features. - -Addes ZConfigFile for test programs. - -0.6.3 - -Fixed directory issues in distribution. - -Updated to specify SDL 1.2.5 compatibility. - -Added IsLoaded method to ZSound,ZMusic,ZImage and ZFont - -Added music.ogg warning to ZMusicTest. - -Minor fixes in Doxygen settings. - -Fixed issues compiling the ZObject Inherited Wrapper types caused by changes in documentation. - -Added file-level documentation for doxygen in src directory. - -0.6.2 - -Updated License to APL 1.1 and all files with it. - -0.6.1 - -Added Mouse Example - -Changed Email Address to james@conceptofzero.net - -Added more test data and information on where data came from - -Removed Ogg file from distribution. - -Changed names of the libraries. - -0.6.0 - -Updated all documentation (including doxygen docs). - -Rewrote Licensing.txt - -Added Authors.txt and Credits.txt - -Added VC7 Non-Debug Projects. - -Removed LGPL.txt (legacy) and Added APL.txt - -Fixed a bug occuring in ZSound and ZFont test programs. - -Proofread and fixed some documentation errors. - -0.5.0 - -Added APL Notice to source files. - -Updated source guidelines file for APL licensing. - -Added ZSound and test program. - -Updated examples to have similar coding guidelines. - -0.4.0 - -Added Source Guidelines file. - -Added ZMusic and test program. - -Fixed a small keypress checking error in fullscreen mode. - -Redesigned entire data storage system (aka ZDataPtr classes) - -Fixed USE_SDL_MIXER and USE_SDL_TTF bugs in ZEngine. - -Removed LGPL licensing messages from source. - -Rewrote buggy ZImage::Attach code that was affecting the test program. - -0.3.0 - -Added ZTimer and ZFont classes and test programs. - -Fixed major hardware setting bugs in ZImage and ZEngine. - -Added alpha blending to tests. - -Reorganized Directory Structure and VC7 Project Files - -0.2.0 - -Doxygen Documentation and LGPL license addition - -Added ZImage, and test program. - -Fixed bugs throughout core of ZEngine and changed methods used to keep static vectors of data. - -Designed ZObject class with virtual destructor. - -0.1.0 - -Initial ZEngine Proof of Concept, core ZEngine class. +ZEngine Version Log for Version 0.7.7 +$Id: changelog.txt,v 1.3 2002/12/01 07:56:17 cozman Exp $ + + +0.7.7 + -Changed behavior of core ZEngine class methods to reflect new OpenGL behavior. + -Eliminated certain SDL specific functions, no longer needed with OpenGL render target. + -Completely removed old SDL_Image.h and replaced with what had been SDL_ImageGL.h. + -Documented new ZImage class as well as ZConfigFile's ZCF_Variable and ZCF_Section. + -Fixed memory leak and general failure in new ZImage::OpenFromImage. + -Simplified SDL_GL Initialization. + -Shortened most lines to reasonable screen width. + -Added notice to licensing explaining license choice. + +0.7.6 + -Added ZImageGL, still in testing phase. + -Followed up major API changes from 0.7.5 with whole new series of changes: + (API from 0.7.x at least 25% rewritten) + -Added new /external files for SDL_GL* extensions + -Added Macros in ZE_Macros.h + -Removed ZE_DataPtr.h + -Rewrote warnings in Sound,Music,Font and Image classes. + +0.7.5 + -Converted all tabs to spaces. + -Added CVS lines to files for date tracking. + -Fixed file layout for CVS and reuploaded files to CVS. + -Major API changes (removed "Get" before accessors and changed some functions in ZEngine) + -Added Beginnings of OpenGL Render target + +0.7.4 + -Modified behavior of ZImage::Attach and changed ZImageTest to use it. + -Added makefile for Linux build support. + -Renamed old makefile to makefile.mingw32 + -Fixed problem in ZImage::SetAlpha when failure occured. + -Added warnings in ZImage for when the display format fails. + -Completely rewrote ZConfigFile to avoid problems with STL map. + -Fixed problem in ZImage with transparency. + -Added doxygen script for linux, and renamed old doxygen script. + +0.7.3 + -Globally evised source variable naming standards. + -Fixed Error Logging in ZImage. + -Added SDL_DisplaySurface and SDL_DisplaySurfaceAlpha calls to speed up blitting in ZImage. + -Fixed bug in ZConfigFile that caused a NULL file to be closed. + -Several Documentation errors corrected. + -Added ZRect class, and ZRectTest. + +0.7.2 + -Fixed small source problem in PhysFS handling of non-supported types. + -Added makefile for Cygwin and Mingw32 + -Removed AFL license, and switched to BSD-style license. + +0.7.1 + -Changed directory layout. + -Changed source files to compile without PhysicsFS. + -Added newline to end of all source files. + +0.7.0 + -Changed slash direction in example programs (fixed non-windows problems). + -Added support for PhysicsFS. + -Added ZConfigFile. + -Updated all examples to be cleaner style and use more features. + -Addes ZConfigFile for test programs. + +0.6.3 + -Fixed directory issues in distribution. + -Updated to specify SDL 1.2.5 compatibility. + -Added IsLoaded method to ZSound,ZMusic,ZImage and ZFont + -Added music.ogg warning to ZMusicTest. + -Minor fixes in Doxygen settings. + -Fixed issues compiling the ZObject Inherited Wrapper types caused by changes in documentation. + -Added file-level documentation for doxygen in src directory. + +0.6.2 + -Updated License to APL 1.1 and all files with it. + +0.6.1 + -Added Mouse Example + -Changed Email Address to james@conceptofzero.net + -Added more test data and information on where data came from + -Removed Ogg file from distribution. + -Changed names of the libraries. + +0.6.0 + -Updated all documentation (including doxygen docs). + -Rewrote Licensing.txt + -Added Authors.txt and Credits.txt + -Added VC7 Non-Debug Projects. + -Removed LGPL.txt (legacy) and Added APL.txt + -Fixed a bug occuring in ZSound and ZFont test programs. + -Proofread and fixed some documentation errors. + +0.5.0 + -Added APL Notice to source files. + -Updated source guidelines file for APL licensing. + -Added ZSound and test program. + -Updated examples to have similar coding guidelines. + +0.4.0 + -Added Source Guidelines file. + -Added ZMusic and test program. + -Fixed a small keypress checking error in fullscreen mode. + -Redesigned entire data storage system (aka ZDataPtr classes) + -Fixed USE_SDL_MIXER and USE_SDL_TTF bugs in ZEngine. + -Removed LGPL licensing messages from source. + -Rewrote buggy ZImage::Attach code that was affecting the test program. + +0.3.0 + -Added ZTimer and ZFont classes and test programs. + -Fixed major hardware setting bugs in ZImage and ZEngine. + -Added alpha blending to tests. + -Reorganized Directory Structure and VC7 Project Files + +0.2.0 + -Doxygen Documentation and LGPL license addition + -Added ZImage, and test program. + -Fixed bugs throughout core of ZEngine and changed methods used to keep static vectors of data. + -Designed ZObject class with virtual destructor. + +0.1.0 + -Initial ZEngine Proof of Concept, core ZEngine class. diff --git a/doc/ZEngine.linux.doxygen b/doc/ZEngine.linux.doxygen index 8d892ca..2ab1ed4 100644 --- a/doc/ZEngine.linux.doxygen +++ b/doc/ZEngine.linux.doxygen @@ -4,7 +4,7 @@ # General configuration options #--------------------------------------------------------------------------- PROJECT_NAME = ZEngine -PROJECT_NUMBER = 0.7.5 +PROJECT_NUMBER = 0.7.7 OUTPUT_DIRECTORY = /home/James/ZEngine-dev/doc OUTPUT_LANGUAGE = English EXTRACT_ALL = NO diff --git a/doc/ZEngine.log b/doc/ZEngine.log index 8d7ff92..e69de29 100644 --- a/doc/ZEngine.log +++ b/doc/ZEngine.log @@ -1,10 +0,0 @@ -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h:49: Warning: Compound ZE::ZConfigFile::ZCF_Section is not documented. -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h:43: Warning: Compound ZE::ZConfigFile::ZCF_Variable is not documented. -/home/James/ZEngine-dev/include/ZEngine.h:35: Error: end of paragraph without end of style command -/home/James/ZEngine-dev/include/ZEngine.h:37: Error: Found unknown command `\conceptofzero' -/home/James/ZEngine-dev/include/ZEngine.h:39: Error: found tag without matching in the same paragraph -/home/James/ZEngine-dev/include/ZE_Error.h:58: Error: Unsupported html tag found -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h:70: Warning: Member Exists of class ZE::ZConfigFile is not documented. -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h:71: Warning: Member Exists of class ZE::ZConfigFile is not documented. -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h:72: Warning: Member SetVariable of class ZE::ZConfigFile is not documented. -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h:73: Warning: Member GetVariable of class ZE::ZConfigFile is not documented. diff --git a/doc/ZEngine.win32.doxygen b/doc/ZEngine.win32.doxygen index 305a050..9698e62 100644 --- a/doc/ZEngine.win32.doxygen +++ b/doc/ZEngine.win32.doxygen @@ -4,7 +4,7 @@ # General configuration options #--------------------------------------------------------------------------- PROJECT_NAME = ZEngine -PROJECT_NUMBER = 0.7.5 +PROJECT_NUMBER = 0.7.7 OUTPUT_DIRECTORY = F:\libs\ZEngine-dev\doc\ OUTPUT_LANGUAGE = English EXTRACT_ALL = NO diff --git a/doc/html/ZE__Defines_8h-source.html b/doc/html/ZE__Defines_8h-source.html index 1a94d14..7f73842 100644 --- a/doc/html/ZE__Defines_8h-source.html +++ b/doc/html/ZE__Defines_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_Defines.h Source File +/include/ZE_Defines.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_Defines.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_Defines.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -25,12 +25,12 @@
 00033 #define USE_SDL_MIXER
 00035 //#define USE_PHYSFS
 00037 #define DEBUG_STREAM
-00039 #define VERSION "0.7.3"
+00039 #define VERSION "0.7.6"
 00040 
 00041 #endif //__ze_defines_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__Defines_8h.html b/doc/html/ZE__Defines_8h.html index 15f90b0..c1b0b5e 100644 --- a/doc/html/ZE__Defines_8h.html +++ b/doc/html/ZE__Defines_8h.html @@ -3,18 +3,19 @@ ZE_Defines.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_Defines.h File Reference


Detailed Description

-
File Header:
File: ZE_Defines.h
- Description: Defines header file for ZEngine class, where all #define statements to control compilation options are placed.
+

/include/ZE_Defines.h File Reference


Detailed Description

+
File Header:
+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
- Last Updated: 11/07/02
-
+
Id:
+ ZE_Defines.h,v 1.2 2002/11/28 23:18:54 cozman Exp

-Definition file, holds #define statements describing optional features of ZEngine. +Definition file, holds define statements describing optional features of ZEngine.

@@ -34,12 +35,12 @@ Definition file, holds #define statements describing optional features of ZEngin #define DEBUG_STREAM  Undefine to disable debug streams for Error Handler.

-#define VERSION   "0.7.3" +#define VERSION   "0.7.6"  Version number.

-


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__Error_8cpp.html b/doc/html/ZE__Error_8cpp.html index 8c5f12e..06d2d44 100644 --- a/doc/html/ZE__Error_8cpp.html +++ b/doc/html/ZE__Error_8cpp.html @@ -3,15 +3,16 @@ ZE_Error.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_Error.cpp File Reference


Detailed Description

-
File Header:
File: Util/ZE_Error.cpp
+

/src/ZE_Error.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_Error.cpp
Description: Implementation source file for ZEngine error logging utility functions.
Author(s): James Turk
- Last Updated: 10/8/02
-
+
Id:
+ ZE_Error.cpp,v 1.1.1.1 2002/11/21 05:41:12 cozman Exp

Error logging utilities for ZEngine and programs making use of ZEngine. @@ -22,9 +23,9 @@ Error logging utilities for ZEngine and programs making use of ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__Error_8h-source.html b/doc/html/ZE__Error_8h-source.html index c337a68..f4bf9f4 100644 --- a/doc/html/ZE__Error_8h-source.html +++ b/doc/html/ZE__Error_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_Error.h Source File +/include/ZE_Error.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_Error.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_Error.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -33,16 +33,16 @@
 00057 
 00067 string FormatStr(const char *fmtstr, ...);
 00068 
-00072 #define GetError(str) _GetError(__LINE__,__FILE__,str)
+00072 #define GetError(str) _GetError(__LINE__,__FILE__,str)
 00073 
-00077 #define LogError(str) _LogError(__LINE__,__FILE__,str)
+00077 #define LogError(str) _LogError(__LINE__,__FILE__,str)
 00078 
 00079 }
 00080 
 00081 #endif //__ze_error_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__Error_8h.html b/doc/html/ZE__Error_8h.html index 9cd2ad1..47f7fc8 100644 --- a/doc/html/ZE__Error_8h.html +++ b/doc/html/ZE__Error_8h.html @@ -3,15 +3,16 @@ ZE_Error.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_Error.h File Reference


Detailed Description

-
File Header:
File: Util/ZE_Error.h
+

/include/ZE_Error.h File Reference


Detailed Description

+
File Header:
+File: ZE_Error.h
Description: Header file for ZEngine Error Handling Functions.
Author(s): James Turk
- Last Updated: 9/8/02
-
+
Id:
+ ZE_Error.h,v 1.1.1.1 2002/11/21 05:41:10 cozman Exp

Definition file for ZEngine Error Logging + Formatting functions which are used for internal and external errors. @@ -82,9 +83,9 @@ Creates a string about an error, telling what file it occured in and where, and Logs a string about an error, telling what file it occured in and where, and gives a user defined string as well. -


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__Includes_8h-source.html b/doc/html/ZE__Includes_8h-source.html index 9111dcd..0a9a160 100644 --- a/doc/html/ZE__Includes_8h-source.html +++ b/doc/html/ZE__Includes_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_Includes.h Source File +/include/ZE_Includes.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_Includes.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_Includes.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -22,34 +22,36 @@
 00028 #include "ZE_Defines.h"
 00029 
 00030 #include "SDL.h"
-00031 #ifdef USE_SDL_IMAGE
-00032 #include "SDL_image.h"
-00033 #endif
-00034 #ifdef USE_SDL_TTF
-00035 #include "SDL_ttf.h"
-00036 #endif
-00037 #ifdef USE_SDL_MIXER
-00038 #include "SDL_mixer.h"
-00039 #endif
-00040 #ifdef USE_PHYSFS
-00041 #include "physfs.h"
-00042 #include "external/physfsrwops.h"
-00043 #endif
-00044 
-00045 #include <string>
-00046 #include <vector>
-00047 #include <fstream>
-00048 #include <list>
-00049 #include <cstdio>
-00050 #include <cstdlib>
-00051 #include <cstdarg>
-00052 #include <cctype>
-00053 using namespace std;
-00054 
-00055 #endif //__ze_includes_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +00031 #include "SDL_opengl.h" +00032 #include "external/SDLGL_Util.h" +00033 #ifdef USE_SDL_IMAGE +00034 #include "SDL_image.h" +00035 #endif +00036 #ifdef USE_SDL_TTF +00037 #include "SDL_ttf.h" +00038 #endif +00039 #ifdef USE_SDL_MIXER +00040 #include "SDL_mixer.h" +00041 #endif +00042 #ifdef USE_PHYSFS +00043 #include "physfs.h" +00044 #include "external/physfsrwops.h" +00045 #endif +00046 +00047 #include <string> +00048 #include <vector> +00049 #include <fstream> +00050 #include <list> +00051 #include <cstdio> +00052 #include <cstdlib> +00053 #include <cstdarg> +00054 #include <cctype> +00055 using namespace std; +00056 +00057 #endif //__ze_includes_h__ +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__Includes_8h.html b/doc/html/ZE__Includes_8h.html index 4266161..b8f32c1 100644 --- a/doc/html/ZE__Includes_8h.html +++ b/doc/html/ZE__Includes_8h.html @@ -3,21 +3,24 @@ ZE_Includes.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_Includes.h File Reference


Detailed Description

-
File Header:
File: ZE_Includes.h
+

/include/ZE_Includes.h File Reference


Detailed Description

+
File Header:
+File: ZE_Includes.h
Description: Header file for ZEngine universal includes.
Author(s): James Turk
- Last Updated: 11/01/02
-
+
Id:
+ ZE_Includes.h,v 1.2 2002/11/28 23:18:54 cozman Exp

ZE_*.h files should only include this file and any other ZE_*.h files that they need, External Library or C/C++ Standard Library files should be included from within this file.

#include "ZE_Defines.h"
#include "SDL.h"
+#include "SDL_opengl.h"
+#include "external/SDLGL_Util.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include "SDL_mixer.h"
@@ -36,9 +39,9 @@ ZE_*.h files should only include this file and any other ZE_*.h files that they

Namespaces

namespace  std -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZConfigFile_8cpp.html b/doc/html/ZE__ZConfigFile_8cpp.html index 41ec606..55d05cb 100644 --- a/doc/html/ZE__ZConfigFile_8cpp.html +++ b/doc/html/ZE__ZConfigFile_8cpp.html @@ -3,15 +3,16 @@ ZE_ZConfigFile.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZConfigFile.cpp File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZConfigFile.cpp
+

/src/ZE_ZConfigFile.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZConfigFile.cpp
Description: Implementation source file for ZConfigFile, the ZEngine INI-Style Config File.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZConfigFile.cpp,v 1.1.1.1 2002/11/21 05:41:12 cozman Exp

Implementation of ZConfigFile, the ZEngine INI-Style Config File. @@ -22,9 +23,9 @@ Implementation of ZConfigFile, the ZEngine INI-Style Config File.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZConfigFile_8h-source.html b/doc/html/ZE__ZConfigFile_8h-source.html index 09c0d70..27d4e87 100644 --- a/doc/html/ZE__ZConfigFile_8h-source.html +++ b/doc/html/ZE__ZConfigFile_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZConfigFile.h Source File +/include/ZE_ZConfigFile.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZConfigFile.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZConfigFile.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -19,73 +19,76 @@
 00025 #ifndef __ze_zconfigfile_h__
 00026 #define __ze_zconfigfile_h__
 00027 
-00028 #include "ZE_ZObject.h"         //included even though ZCF isn't derived (to obtain all other needed headers)
+00028 #include "ZE_ZObject.h"        //included even though ZCF isn't derived (to obtain all other needed headers)
 00029 
 00030 namespace ZE
 00031 {
 00032 
-00038 class ZConfigFile : public ZObject
+00038 class ZConfigFile : public ZObject
 00039 {
-00040         private:
+00040     private:
 00041 
-00042                 /*Private Types*/
-00043                 class ZCF_Variable
-00044                 {
-00045                         public:
-00046                                 string var;
-00047                                 string val;
-00048                 };
-00049                 class ZCF_Section
-00050                 {
-00051                         public:
-00052                                 string section;
-00053                                 list<ZCF_Variable> varList;
-00054                 };
-00055 
-00057                 list<ZCF_Section> mFileLayout;
-00058 
-00060                 string mFilename;
-00061 
-00069                 string CleanString(string str);
-00070                 
-00071                 bool Exists(string sec);
-00072                 bool Exists(string sec, string var);
-00073                 void SetVariable(string sec, string var, string val);
-00074                 string GetVariable(string sec, string var, string defVal);
-00075 
-00076         public:
-00077 
-00083                 ZConfigFile();
-00084 
-00091                 ZConfigFile(string filename);
-00092 
-00098                 ~ZConfigFile();
-00099 
-00106                 void Process(string filename);
-00107 
-00117                 int GetInt(string section, string var, int defVal);
-00118 
-00129                 bool GetBool(string section, string var, bool defVal);
-00130 
-00140                 string GetString(string section, string var, string defVal);
-00141 
-00151                 void SetInt(string section, string var, int val);
-00152 
-00162                 void SetBool(string section, string var, bool val);
-00163 
-00173                 void SetString(string section, string var, string val);
-00174                 
-00180                 void Flush();
+00042         //Private Types//
+00043 
+00044 
+00051         class ZCF_Variable
+00052         {
+00053             public:
+00055                 string var;
+00057                 string val;
+00058         };
+00059 
+00065         class ZCF_Section
+00066         {
+00067             public:
+00069                 string section;
+00071                 list<ZCF_Variable> varList;
+00072         };
+00073 
+00075         list<ZCF_Section> mFileLayout;
+00076 
+00078         string mFilename;
+00079 
+00087         string CleanString(string str);
+00088         
+00089         bool Exists(string sec);
+00090         bool Exists(string sec, string var);
+00091         void SetVariable(string sec, string var, string val);
+00092         string GetVariable(string sec, string var, string defVal);
+00093 
+00094     public:
+00095 
+00101         ZConfigFile();
+00102 
+00109         ZConfigFile(string filename);
+00110 
+00116         ~ZConfigFile();
+00117 
+00124         void Process(string filename);
+00125 
+00135         int GetInt(string section, string var, int defVal);
+00136 
+00147         bool GetBool(string section, string var, bool defVal);
+00148 
+00158         string GetString(string section, string var, string defVal);
+00159 
+00169         void SetInt(string section, string var, int val);
+00170 
+00180         void SetBool(string section, string var, bool val);
 00181 
-00187                 void Close();
-00188 };
-00189 
-00190 }
-00191 
-00192 #endif //__ze_zconfigfile_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +00191 void SetString(string section, string var, string val); +00192 +00198 void Flush(); +00199 +00205 void Close(); +00206 }; +00207 +00208 } +00209 +00210 #endif //__ze_zconfigfile_h__ +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZConfigFile_8h.html b/doc/html/ZE__ZConfigFile_8h.html index d37d0d1..438f52b 100644 --- a/doc/html/ZE__ZConfigFile_8h.html +++ b/doc/html/ZE__ZConfigFile_8h.html @@ -3,15 +3,16 @@ ZE_ZConfigFile.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZConfigFile.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZConfigFile.h
+

/include/ZE_ZConfigFile.h File Reference


Detailed Description

+
File Header:
+File: Types/ZE_ZConfigFile.h
Description: Header file for ZEngine INI-Style Config Files.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZConfigFile.h,v 1.1.1.1 2002/11/21 05:41:10 cozman Exp

Definition file for ZConfigFile, an INI-style Config format. @@ -24,9 +25,9 @@ Definition file for ZConfigFile, an INI-style Config format.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZEngine_8cpp.html b/doc/html/ZE__ZEngine_8cpp.html index e3f623a..9282644 100644 --- a/doc/html/ZE__ZEngine_8cpp.html +++ b/doc/html/ZE__ZEngine_8cpp.html @@ -3,15 +3,16 @@ ZE_ZEngine.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZEngine.cpp File Reference


Detailed Description

-
File Header:
File: ZE_ZEngine.cpp
+

/src/ZE_ZEngine.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZEngine.cpp
Description: Implementation source file for ZEngine library main singleton class.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZEngine.cpp,v 1.2 2002/11/28 23:19:55 cozman Exp

Actual implementation of ZEngine singleton class at heart of ZEngine. @@ -22,9 +23,9 @@ Actual implementation of ZEngine singleton class at heart of ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZEngine_8h-source.html b/doc/html/ZE__ZEngine_8h-source.html index 9fc1c9b..a9ebc45 100644 --- a/doc/html/ZE__ZEngine_8h-source.html +++ b/doc/html/ZE__ZEngine_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZEngine.h Source File +/include/ZE_ZEngine.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZEngine.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZEngine.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -19,185 +19,180 @@
 00024 #ifndef __ze_zengine_h__
 00025 #define __ze_zengine_h__
 00026 
-00027 #include "ZE_DataPtr.h"
-00028 #include "ZE_Error.h"
-00029 #include "ZE_Defines.h"
+00027 #include "ZE_Error.h"
+00028 #include "ZE_Defines.h"
+00029 #include "ZE_Macros.h"
 00030 #include "ZE_Includes.h"
 00031 
 00037 namespace ZE
 00038 {
 00039 
-00046 class ZEngine
+00046 class ZEngine
 00047 {
-00049         //Singleton + Memory Management//
+00049     //Singleton + Memory Management//
 00051 
-00052         private:
-00054                 static ZEngine *sInstance;
+00052     private:
+00054         static ZEngine *sInstance;
 00055 
-00061                 ZEngine();
+00061         ZEngine();
 00062 
-00063         public:
+00063     public:
 00064 
-00071                 static ZEngine* GetInstance();
+00071         static ZEngine* GetInstance();
 00072 
-00078                 static void ReleaseInstance();
+00078         static void ReleaseInstance();
 00079 
-00086                 static string GetVersion();
+00086         static string GetVersion();
 00087 
-00089         //Initialization//
+00089     //Initialization//
 00091 
-00092         private:
-00094                 int mWidth;
-00096                 int mHeight;
-00098                 int mBPP;
-00100                 bool mFullscreen;
+00092     private:
+00094         int mWidth;
+00096         int mHeight;
+00098         int mBPP;
+00100         bool mFullscreen;
 00101 
 00102 #ifdef USE_SDL_MIXER 
-00103 
-00104                 int mRate;
-00106                 bool mStereo;
+00103 
+00104         int mRate;
+00106         bool mStereo;
 00107 #endif 
 00108 
 00109 
-00110         public:
-00111                 //add initialization
+00110     public:
+00111         //add initialization
 00112 
-00123                 void SetupDisplay(int width, int height, int bpp, bool fullscreen);
+00123         void SetupDisplay(int width, int height, int bpp, bool fullscreen);
 00124 
 00125 #ifdef USE_SDL_MIXER
 00126 
-00134                 void SetupSound(int rate, bool stereo);
+00134         void SetupSound(int rate, bool stereo);
 00135 #endif 
 00136 
-00146                 void CreateWindow(string title, string icon="");
+00146         void CreateDisplay(string title, string icon="");
 00147 
-00153                 void CloseWindow();
+00153         void CloseDisplay();
 00154 
-00156         //Screen Access//
+00156     //Screen Access//
 00158 
-00159         private:
-00161                 SDL_Surface *mScreen;
+00159     private:
+00161         SDL_Surface *mScreen;
 00162 
-00163         public:
-00170                 SDL_Surface *GetDisplay();
+00163     public:
+00170         SDL_Surface *Display();
 00171 
-00177                 void UpdateScreen();
+00177         void UpdateScreen();
 00178 
-00190                 Uint32 MapColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a=255);
-00191 
-00199                 void Clear(Uint32 color=0, SDL_Rect *rect=NULL);
-00200 
-00202         //Timer and Framerate Independent Movement//
-00204         
-00205         private:
-00207                 bool mPaused;
-00209                 bool mUnpauseOnActive;
-00211                 Uint32 mLastPause;
-00213                 Uint32 mPausedTime;
-00215                 Uint32 mLastTime;
-00217                 double mSecPerFrame;
-00218 
-00219         public:
-00226                 void Sleep(Uint32 milliseconds);
-00227 
-00234                 Uint32 GetTime();
-00235 
-00241                 void PauseTimer();
-00242 
-00248                 void UnpauseTimer();
-00249 
-00256                 double GetFrameTime();
-00257 
-00264                 bool IsPaused();
-00265 
-00267         //Event and Input Handling//
-00269 
-00270         private:
-00272                 bool mActive;
-00274                 bool mQuit;
-00276                 Uint8 *mKeyPressed;
-00278                 int mMouseX;
-00280                 int mMouseY;
-00282                 Uint8 mMouseB;
-00283 
-00284         public:
-00291                 bool IsActive();
-00292 
-00299                 void RequestQuit();
-00300 
-00308                 bool QuitRequested();
-00309                 
-00317                 bool KeyIsPressed(SDLKey key);
-00318 
-00324                 void HideCursor();
-00325 
-00331                 void ShowCursor();
-00332 
-00339                 int GetMouseX();
-00340 
-00347                 int GetMouseY();
-00348 
-00355                 bool LButtonPressed();
-00356 
-00363                 bool RButtonPressed();
-00364 
-00372                 bool MouseInRect(SDL_Rect *rect);
-00373 
-00379                 void CheckEvents();
-00380 
-00381 #ifdef USE_PHYSFS
-00382 
-00383         //Physfs Utilities//
-00385         public:
-00392                 void InitPhysFS(string argv);
-00393 
-00400                 void AddPhysFSDir(string dir);
-00401 
-00402 #endif  //USE_PHYSFS
-00403 
-00404 
-00406         //Data Loading + Unloading//
-00408         public:
-00416                 ImageData LoadImage(string filename);
-00417 
-00424                 void FreeImage(ImageData &image);
-00425 
-00426 #ifdef USE_SDL_MIXER
-00427 
-00434                 SoundData LoadSound(string filename);
-00435 
-00442                 void FreeSound(SoundData &sound);
-00443 
-00451                 MusicData LoadMusic(string filename);
-00452 
-00459                 void FreeMusic(MusicData &music);
-00460 #endif
-00461 
-00462 #ifdef USE_SDL_TTF
-00463 
-00471                 FontData LoadFont(string filename, int size);
+00188         void Clear(float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=1.0f);
+00189 
+00191     //OpenGL Specific Functions//
+00193     public:
+00194 
+00201         void SetGL2D();
+00202 
+00204     //Timer and Framerate Independent Movement//
+00206     
+00207     private:
+00209         bool mPaused;
+00211         bool mUnpauseOnActive;
+00213         Uint32 mLastPause;
+00215         Uint32 mPausedTime;
+00217         Uint32 mLastTime;
+00219         double mSecPerFrame;
+00220 
+00221     public:
+00228         void Delay(Uint32 milliseconds);
+00229 
+00236         Uint32 GetTime();
+00237 
+00243         void PauseTimer();
+00244 
+00250         void UnpauseTimer();
+00251 
+00258         double GetFrameTime();
+00259 
+00266         bool IsPaused();
+00267 
+00269     //Event and Input Handling//
+00271 
+00272     private:
+00274         bool mActive;
+00276         bool mQuit;
+00278         Uint8 *mKeyPressed;
+00280         int mMouseX;
+00282         int mMouseY;
+00284         Uint8 mMouseB;
+00285 
+00286     public:
+00293         bool IsActive();
+00294 
+00301         void RequestQuit();
+00302 
+00310         bool QuitRequested();
+00311         
+00319         bool KeyIsPressed(SDLKey key);
+00320 
+00326         void HideCursor();
+00327 
+00333         void ShowCursor();
+00334 
+00341         int MouseX();
+00342 
+00349         int MouseY();
+00350 
+00357         bool LButtonPressed();
+00358 
+00365         bool RButtonPressed();
+00366 
+00374         bool MouseInRect(SDL_Rect *rect);
+00375 
+00381         void CheckEvents();
+00382 
+00383 #ifdef USE_PHYSFS
+00384 
+00385     //Physfs Utilities//
+00387     public:
+00394         void InitPhysFS(string argv);
+00395 
+00402         void AddPhysFSDir(string dir);
+00403 
+00404 #endif    //USE_PHYSFS
+00405 
+00406 
+00408     //Data Loading + Unloading//
+00410     public:
+00418         SDL_Surface* LoadImage(string filename);
+00419 
+00420 #ifdef USE_SDL_MIXER
+00421 
+00428         Mix_Chunk* LoadSound(string filename);
+00429 
+00437         Mix_Music* LoadMusic(string filename);
+00438 #endif
+00439 
+00440 #ifdef USE_SDL_TTF
+00441 
+00449         TTF_Font* LoadFont(string filename, int size);
+00450 #endif 
+00451 
+00453     //Accessors//
+00455 
+00456     public:    
+00463         int Width();
+00464 
+00471         int Height();
 00472 
-00479                 void FreeFont(FontData &font);
-00480 #endif 
-00481 
-00483         //Accessors//
-00485         
-00486         public: 
-00493                 int GetWidth();
-00494 
-00501                 int GetHeight();
-00502 
-00509                 int GetBPP();
-00510 
-00517                 bool IsFullscreen();
-00518 };
-00519 
-00520 }
-00521 
-00522 #endif //__ze_zengine_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +00479 int BPP(); +00480 +00487 bool IsFullscreen(); +00488 }; +00489 +00490 } +00491 +00492 #endif //__ze_zengine_h__ +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZEngine_8h.html b/doc/html/ZE__ZEngine_8h.html index ba52078..034b48d 100644 --- a/doc/html/ZE__ZEngine_8h.html +++ b/doc/html/ZE__ZEngine_8h.html @@ -3,22 +3,23 @@ ZE_ZEngine.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZEngine.h File Reference


Detailed Description

-
File Header:
File: ZE_ZEngine.h
+

/include/ZE_ZEngine.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZEngine.h
Description: Header file for ZEngine class, the core of the ZEngine.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp

ZEngine Game Engine core Engine definition.

-#include "ZE_DataPtr.h"
#include "ZE_Error.h"
#include "ZE_Defines.h"
+#include "ZE_Macros.h"
#include "ZE_Includes.h"

@@ -27,9 +28,9 @@ ZEngine Game Engine core Engine definition.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZFont_8cpp.html b/doc/html/ZE__ZFont_8cpp.html index ba1c922..b334d62 100644 --- a/doc/html/ZE__ZFont_8cpp.html +++ b/doc/html/ZE__ZFont_8cpp.html @@ -3,15 +3,16 @@ ZE_ZFont.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZFont.cpp File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZFont.cpp
+

/src/ZE_ZFont.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZFont.cpp
Description: Implementation source file for core ZEngine Font Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZFont.cpp,v 1.1.1.1 2002/11/21 05:41:13 cozman Exp

Implementation of ZFont, the basic Font class for ZEngine. @@ -20,9 +21,9 @@ Implementation of ZFont, the basic Font class for ZEngine.
-


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZFont_8h-source.html b/doc/html/ZE__ZFont_8h-source.html index 808359e..0bb36db 100644 --- a/doc/html/ZE__ZFont_8h-source.html +++ b/doc/html/ZE__ZFont_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZFont.h Source File +/include/ZE_ZFont.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZFont.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZFont.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -27,68 +27,69 @@
 00032 namespace ZE
 00033 {
 00034 
-00040 class ZFont : public ZObject
+00040 class ZFont : public ZObject
 00041 {
-00042         protected:
-00044                 FontData rFont;
-00046                 SDL_Color rColor;
-00048                 SDL_Color rBGColor;
-00049 
-00050         public:
+00042     protected:
+00044         TTF_Font *rFont;
+00046         string rFilename;
+00048         SDL_Color rColor;
+00050         SDL_Color rBGColor;
 00051 
-00053                 //Opening and Closing//
-00055 
-00061                 ZFont();
-00062 
-00070                 ZFont(string filename, int size);
-00071 
-00077                 ~ZFont();
-00078 
-00086                 void Open(string filename, int size);
-00087 
-00093                 void Release();
-00094 
-00096                 //Settings and Drawing//
-00098 
-00106                 void DrawText(string text, ZImage &image);
-00107 
-00115                 void DrawShadedText(string text, ZImage &image);
-00116 
-00125                 void SetColor(Uint8 r, Uint8 g, Uint8 b);
-00126 
-00135                 void SetBGColor(Uint8 r, Uint8 g, Uint8 b);
-00136 
-00145                 void SetStyle(bool bold, bool italic, bool underline);
-00146 
-00153                 void Resize(int size);
-00154 
-00156                 //Accessors//
-00158 
-00165                 bool IsLoaded();
-00166 
-00173                 bool IsBold();
-00174 
-00181                 bool IsItalic();
-00182 
-00189                 bool IsUnderlined();
-00190 
-00197                 int GetHeight();
-00198 
-00205                 int GetLineSkip();
-00206 
-00214                 int GetStringWidth(string text);
-00215 
-00223                 int GetStringHeight(string text);
-00224 };
-00225 
-00226 }
+00052     public:
+00053 
+00055         //Opening and Closing//
+00057 
+00063         ZFont();
+00064 
+00072         ZFont(string filename, int size);
+00073 
+00079         ~ZFont();
+00080 
+00088         void Open(string filename, int size);
+00089 
+00095         void Release();
+00096 
+00098         //Settings and Drawing//
+00100 
+00108         void DrawText(string text, ZImage &image);
+00109 
+00117         void DrawShadedText(string text, ZImage &image);
+00118 
+00127         void SetColor(Uint8 r, Uint8 g, Uint8 b);
+00128 
+00137         void SetBGColor(Uint8 r, Uint8 g, Uint8 b);
+00138 
+00147         void SetStyle(bool bold, bool italic, bool underline);
+00148 
+00155         void Resize(int size);
+00156 
+00158         //Accessors//
+00160 
+00167         bool IsLoaded();
+00168 
+00175         bool IsBold();
+00176 
+00183         bool IsItalic();
+00184 
+00191         bool IsUnderlined();
+00192 
+00199         int Height();
+00200 
+00207         int LineSkip();
+00208 
+00216         int StringWidth(string text);
+00217 
+00225         int StringHeight(string text);
+00226 };
 00227 
-00228 #endif //USE_SDL_TTF
-00229 
-00230 #endif //__ze_zfont_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +00228 } +00229 +00230 #endif //USE_SDL_TTF +00231 +00232 #endif //__ze_zfont_h__ +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZFont_8h.html b/doc/html/ZE__ZFont_8h.html index 71abe65..eb63123 100644 --- a/doc/html/ZE__ZFont_8h.html +++ b/doc/html/ZE__ZFont_8h.html @@ -3,15 +3,16 @@ ZE_ZFont.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZFont.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZFont.h
+

/include/ZE_ZFont.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZFont.h
Description: Header file for core ZEngine Font Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZFont.h,v 1.1.1.1 2002/11/21 05:41:10 cozman Exp

Definition file for ZFont, the basic Font class for ZEngine. @@ -25,9 +26,9 @@ Definition file for ZFont, the basic Font class for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZImage_8cpp.html b/doc/html/ZE__ZImage_8cpp.html index e491df2..516b3e8 100644 --- a/doc/html/ZE__ZImage_8cpp.html +++ b/doc/html/ZE__ZImage_8cpp.html @@ -3,18 +3,16 @@ ZE_ZImage.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZImage.cpp File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZImage.cpp
- Description: Implementation source file for core ZEngine Image Object.
- Author(s): James Turk
- Last Updated: 11/07/02
-
- -

-Implementation of ZImage, the basic Image class for ZEngine. +


/src/ZE_ZImage.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZImage.cpp
+ Description: Implementation source file for core ZEngine Image or Texture Object.
+ Author(s): James Turk, Gamer Tazar
+ $Id: ZE__ZImage_8cpp.html,v 1.2 2002/12/01 07:56:17 cozman Exp $
+
Implementation of ZImage, the Image class for ZEngine.

#include "ZE_ZImage.h"
@@ -22,9 +20,9 @@ Implementation of ZImage, the basic Image class for ZEngine.

Namespaces

namespace  ZE
-


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZImage_8h-source.html b/doc/html/ZE__ZImage_8h-source.html index 325f628..97dd5db 100644 --- a/doc/html/ZE__ZImage_8h-source.html +++ b/doc/html/ZE__ZImage_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZImage.h Source File +/include/ZE_ZImage.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZImage.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZImage.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -24,58 +24,63 @@
 00029 namespace ZE
 00030 {
 00031 
-00037 class ZImage : public ZObject
+00037 class ZImage : public ZObject
 00038 {
-00039         protected:
-00041                 ImageData rImage;
-00042         public:
-00043 
-00049                 ZImage();
-00050 
-00057                 ZImage(string filename);
-00058 
-00065                 ZImage(SDL_Surface *surface);
-00066 
-00078                 ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
-00079 
-00085                 ~ZImage();
-00086 
-00088                 //Opening and Closing//
-00090 
-00097                 void Open(string filename);
-00098 
-00110                 void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
-00111 
-00118                 void Attach(SDL_Surface *surface);
-00119 
-00125                 void Release();
-00126 
-00128                 //Graphics//
-00130 
-00137                 void SetAlpha(Uint8 alpha);
-00138 
-00145                 void SetColorKey(Uint32 color);
-00146 
-00154                 void Draw(Sint16 x, Sint16 y);
-00155 
-00157                 //Accessors//
-00159 
-00166                 bool IsLoaded();
-00167 
-00173                 SDL_Surface *GetImage();
-00174 
-00181                 int GetWidth();
-00182 
-00189                 int GetHeight();
-00190 
-00197                 string GetFilename();
-00198 };
-00199 }
-00200 
-00201 #endif //__ze_zimage_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +00039 protected: +00041 GLfloat rTexMaxX; +00043 GLfloat rTexMaxY; +00045 SDL_Surface *rImage; +00047 unsigned int rTexID; +00049 unsigned int rWidth; +00051 unsigned int rHeight; +00052 +00053 public: +00054 +00060 ZImage(); +00061 +00068 ZImage(string filename); +00069 +00076 ZImage(SDL_Surface *surface); +00077 +00089 ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h); +00090 +00096 ~ZImage(); +00097 +00099 //Opening and Closing// +00101 +00108 void Open(string filename); +00109 +00121 void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h); +00122 +00129 void Attach(SDL_Surface *surface); +00130 +00136 void Release(); +00137 +00139 //Graphics// +00141 +00150 void SetColorKey(Uint8 red, Uint8 green, Uint8 blue); +00151 +00158 void Bind(); +00159 +00167 void Draw(int x, int y); +00168 +00170 //Accessors// +00172 +00179 bool IsLoaded(); +00180 +00186 SDL_Surface *Surface(); +00187 +00194 int Width(); +00195 +00202 int Height(); +00203 }; +00204 +00205 } +00206 +00207 #endif +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZImage_8h.html b/doc/html/ZE__ZImage_8h.html index 508b131..14d94ce 100644 --- a/doc/html/ZE__ZImage_8h.html +++ b/doc/html/ZE__ZImage_8h.html @@ -3,18 +3,16 @@ ZE_ZImage.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZImage.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZImage.h
- Description: Header file for core ZEngine Image Object.
- Author(s): James Turk
- Last Updated: 11/08/02
-
- -

-Definition file for ZImage, the basic Image class for ZEngine. +


/include/ZE_ZImage.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZImage.h
+ Description: Header file for core ZEngine Image and Texture Object.
+ Author(s): James Turk, Gamer Tazar
+ $Id: ZE__ZImage_8h.html,v 1.2 2002/12/01 07:56:17 cozman Exp $
+
Definition file for ZImage, the OpenGL version of the ZImage class for ZEngine.

#include "ZE_ZObject.h"
@@ -24,9 +22,9 @@ Definition file for ZImage, the basic Image class for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZMusic_8cpp.html b/doc/html/ZE__ZMusic_8cpp.html index 7ed367f..8089276 100644 --- a/doc/html/ZE__ZMusic_8cpp.html +++ b/doc/html/ZE__ZMusic_8cpp.html @@ -3,15 +3,16 @@ ZE_ZMusic.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZMusic.cpp File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZMusic.cpp
+

/src/ZE_ZMusic.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZMusic.cpp
Description: Implementation source file for core ZEngine Music Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZMusic.cpp,v 1.1.1.1 2002/11/21 05:41:13 cozman Exp

Implementation of ZMusic, the basic Music class for ZEngine. @@ -20,9 +21,9 @@ Implementation of ZMusic, the basic Music class for ZEngine.
-


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZMusic_8h-source.html b/doc/html/ZE__ZMusic_8h-source.html index 1609224..b0a24c3 100644 --- a/doc/html/ZE__ZMusic_8h-source.html +++ b/doc/html/ZE__ZMusic_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZMusic.h Source File +/include/ZE_ZMusic.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZMusic.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZMusic.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -26,49 +26,49 @@
 00031 namespace ZE
 00032 {
 00033 
-00039 class ZMusic : public ZObject 
+00039 class ZMusic : public ZObject 
 00040 {
-00041         protected:
-00043                 MusicData rMusic;
+00041     protected:
+00043         Mix_Music *rMusic;
 00044 
-00045         public:
-00047                 static const int LoopInfinite;
+00045     public:
+00047         static const int LoopInfinite;
 00048 
-00050                 //Opening and Closing//
+00050         //Opening and Closing//
 00052 
-00058                 ZMusic();
+00058         ZMusic();
 00059 
-00066                 ZMusic(string filename);
+00066         ZMusic(string filename);
 00067 
-00073                 ~ZMusic();
+00073         ~ZMusic();
 00074 
-00081                 void Open(string filename);
+00081         void Open(string filename);
 00082 
-00088                 void Release();
+00088         void Release();
 00089 
-00091                 //Play Controls//
+00091         //Play Controls//
 00093 
-00102                 void Play(int loopNum=0, int fadeTime=0);
+00102         void Play(int loopNum=0, int fadeTime=0);
 00103 
-00109                 void Pause();
+00109         void Pause();
 00110 
-00116                 void Unpause();
+00116         void Unpause();
 00117 
-00123                 void Rewind();
+00123         void Rewind();
 00124 
-00131                 void Stop(int fadeTime=0);
+00131         void Stop(int fadeTime=0);
 00132 
-00139                 void SetVolume(int volume);
+00139         void SetVolume(int volume);
 00140 
-00142                 //Accessors//
+00142         //Accessors//
 00144 
-00151                 bool IsLoaded();
+00151         bool IsLoaded();
 00152 
-00159                 bool IsPlaying();
+00159         bool IsPlaying();
 00160 
-00167                 bool IsPaused();
+00167         bool IsPaused();
 00168 
-00175                 int GetVolume();
+00175         int Volume();
 00176 };
 00177 
 00178 
@@ -77,9 +77,9 @@
 00181 #endif //USE_SDL_MIXER
 00182 
 00183 #endif //__ze_zmusic_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZMusic_8h.html b/doc/html/ZE__ZMusic_8h.html index 32652bc..2012630 100644 --- a/doc/html/ZE__ZMusic_8h.html +++ b/doc/html/ZE__ZMusic_8h.html @@ -3,15 +3,16 @@ ZE_ZMusic.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZMusic.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZMusic.h
+

/include/ZE_ZMusic.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZMusic.h
Description: Header file for core ZEngine Music Wrapper Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZMusic.h,v 1.1.1.1 2002/11/21 05:41:11 cozman Exp

Definition file for ZMusic, the Music file wrapper for ZEngine. @@ -24,9 +25,9 @@ Definition file for ZMusic, the Music file wrapper for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZObject_8h-source.html b/doc/html/ZE__ZObject_8h-source.html index b5acf5a..148ee27 100644 --- a/doc/html/ZE__ZObject_8h-source.html +++ b/doc/html/ZE__ZObject_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZObject.h Source File +/include/ZE_ZObject.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZObject.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZObject.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -23,21 +23,21 @@
 00028 
 00029 namespace ZE
 00030 {
-00036 class ZObject
+00036 class ZObject
 00037 {
-00038         protected:
-00040                 ZEngine* rEngine;
-00041         public:
-00047                 ZObject() { rEngine = ZEngine::GetInstance(); };
+00038     protected:
+00040         ZEngine* rEngine;
+00041     public:
+00047         ZObject() { rEngine = ZEngine::GetInstance(); };
 00048 
-00054                 virtual ~ZObject() {};
+00054         virtual ~ZObject() {};
 00055 };
 00056 }
 00057 
 00058 #endif //__ze_zobject_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZObject_8h.html b/doc/html/ZE__ZObject_8h.html index 10c8aaa..6046d72 100644 --- a/doc/html/ZE__ZObject_8h.html +++ b/doc/html/ZE__ZObject_8h.html @@ -3,15 +3,16 @@ ZE_ZObject.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZObject.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZObject.h
+

/include/ZE_ZObject.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZObject.h
Description: Header file for ZEngine core Object ZObject, base of most ZEngine objects.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZObject.h,v 1.1.1.1 2002/11/21 05:41:11 cozman Exp

Definition file for ZObject the Virtual Base Class for majority of the ZEngine Objects. @@ -24,9 +25,9 @@ Definition file for ZObject the Virtual Base Class for majority of the ZEngine O

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZRect_8cpp.html b/doc/html/ZE__ZRect_8cpp.html index 08a0325..71c164e 100644 --- a/doc/html/ZE__ZRect_8cpp.html +++ b/doc/html/ZE__ZRect_8cpp.html @@ -3,15 +3,16 @@ ZE_ZRect.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZRect.cpp File Reference


Detailed Description

-
File Header:
File: ZE_ZRect.cpp
+

/src/ZE_ZRect.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZRect.cpp
Description: Implementation source file for core ZEngine Rectangle Object.
Author(s): James Turk
- Last Updated: 11/08/02
-
+
Id:
+ ZE_ZRect.cpp,v 1.1.1.1 2002/11/21 05:41:13 cozman Exp

Implementation of ZRect, the Rectangle class for ZEngine. @@ -22,9 +23,9 @@ Implementation of ZRect, the Rectangle class for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZRect_8h-source.html b/doc/html/ZE__ZRect_8h-source.html index edd3cd0..af13f38 100644 --- a/doc/html/ZE__ZRect_8h-source.html +++ b/doc/html/ZE__ZRect_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZRect.h Source File +/include/ZE_ZRect.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZRect.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZRect.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -19,72 +19,72 @@
 00024 #ifndef __ze_zrect_h__
 00025 #define __ze_zrect_h__
 00026 
-00027 #include "ZE_ZObject.h"         //included even though ZRect isn't derived (to obtain all other needed headers)
+00027 #include "ZE_ZObject.h"        //included even though ZRect isn't derived (to obtain all other needed headers)
 00028 
 00029 namespace ZE
 00030 {
 00031 
-00037 class ZRect
+00037 class ZRect
 00038 {
-00039         private:
-00041                 int mX;
-00043                 int mY;
-00045                 int mWidth;
-00047                 int mHeight;
+00039     private:
+00041         int mX;
+00043         int mY;
+00045         int mWidth;
+00047         int mHeight;
 00048 
-00049         public:
+00049     public:
 00050 
-00056                 ZRect();
+00056         ZRect();
 00057 
-00067                 ZRect(int x, int y, int width, int height);
+00067         ZRect(int x, int y, int width, int height);
 00068 
-00075                 ZRect(const ZRect &rhs);
+00075         ZRect(const ZRect &rhs);
 00076 
-00084                 const ZRect& operator=(const ZRect &rhs);
+00084         const ZRect& operator=(const ZRect &rhs);
 00085 
-00094                 bool operator<(const ZRect &rhs) const;
+00094         bool operator<(const ZRect &rhs) const;
 00095 
-00103                 void Move(int x, int y);
+00103         void Move(int x, int y);
 00104 
-00112                 void MoveRel(int xMove, int yMove);
+00112         void MoveRel(int xMove, int yMove);
 00113 
-00121                 void Resize(int width, int height);
+00121         void Resize(int width, int height);
 00122 
-00130                 void ResizeRel(int widthChange, int heightChange);
+00130         void ResizeRel(int widthChange, int heightChange);
 00131 
-00139                 bool Intersects(const ZRect &rect) const;
+00139         bool Intersects(const ZRect &rect) const;
 00140 
-00149                 bool Contains(int x, int y) const;
+00149         bool Contains(int x, int y) const;
 00150 
-00158                 bool Contains(const ZRect &rect) const;
+00158         bool Contains(const ZRect &rect) const;
 00159 
-00167                 ZRect Intersection(const ZRect &rect) const;
+00167         ZRect Intersection(const ZRect &rect) const;
 00168 
-00175                 SDL_Rect SDLrect() const;
+00175         SDL_Rect SDLrect() const;
 00176 
-00183                 int X() const;
+00183         int X() const;
 00184 
-00191                 int Y() const;
+00191         int Y() const;
 00192 
-00199                 int Left() const;
+00199         int Left() const;
 00200 
-00207                 int Right() const;
+00207         int Right() const;
 00208 
-00215                 int Top() const;
+00215         int Top() const;
 00216 
-00223                 int Bottom() const;
+00223         int Bottom() const;
 00224 
-00231                 int Width() const;
+00231         int Width() const;
 00232 
-00239                 int Height() const;
+00239         int Height() const;
 00240 };
 00241 
 00242 } //namspace ZE
 00243 
 00244 #endif //__ze_zrect_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZRect_8h.html b/doc/html/ZE__ZRect_8h.html index 2db4fab..a4be356 100644 --- a/doc/html/ZE__ZRect_8h.html +++ b/doc/html/ZE__ZRect_8h.html @@ -3,15 +3,16 @@ ZE_ZRect.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZRect.h File Reference


Detailed Description

-
File Header:
File: ZE_ZRect.h
+

/include/ZE_ZRect.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZRect.h
Description: Header file for core ZEngine Rectangle Object.
Author(s): James Turk
- Last Updated: 11/08/02
-
+
Id:
+ ZE_ZRect.h,v 1.1.1.1 2002/11/21 05:41:11 cozman Exp

Definition file for ZRect, the Rectangle class for ZEngine. @@ -24,9 +25,9 @@ Definition file for ZRect, the Rectangle class for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZSound_8cpp.html b/doc/html/ZE__ZSound_8cpp.html index 4813c83..afea4ab 100644 --- a/doc/html/ZE__ZSound_8cpp.html +++ b/doc/html/ZE__ZSound_8cpp.html @@ -3,15 +3,16 @@ ZE_ZSound.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZSound.cpp File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZSound.cpp
+

/src/ZE_ZSound.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZSound.cpp
Description: Implementation source file for core ZEngine Sound Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZSound.cpp,v 1.1.1.1 2002/11/21 05:41:13 cozman Exp

Implementation of ZSound, the basic Sound class for ZEngine. @@ -20,9 +21,9 @@ Implementation of ZSound, the basic Sound class for ZEngine.
-


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZSound_8h-source.html b/doc/html/ZE__ZSound_8h-source.html index 1c24441..f860386 100644 --- a/doc/html/ZE__ZSound_8h-source.html +++ b/doc/html/ZE__ZSound_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZSound.h Source File +/include/ZE_ZSound.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZSound.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZSound.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -26,48 +26,48 @@
 00031 namespace ZE
 00032 {
 00033 
-00039 class ZSound : public ZObject 
+00039 class ZSound : public ZObject 
 00040 {
-00041         protected:
-00043                 SoundData rSound;
-00045                 int rChannelID;
+00041     protected:
+00043         Mix_Chunk* rSound;
+00045         int rChannelID;
 00046 
-00047         public:
-00049                 static const int LoopInfinite;
+00047     public:
+00049         static const int LoopInfinite;
 00050 
-00052                 //Opening and Closing//
+00052         //Opening and Closing//
 00054 
-00060                 ZSound();
+00060         ZSound();
 00061 
-00068                 ZSound(string filename);
+00068         ZSound(string filename);
 00069 
-00075                 ~ZSound();
+00075         ~ZSound();
 00076 
-00083                 void Open(string filename);
+00083         void Open(string filename);
 00084 
-00090                 void Release();
+00090         void Release();
 00091 
-00093                 //Play Controls//
+00093         //Play Controls//
 00095 
-00104                 void Play(int loopNum=0, int fadeTime=0);
+00104         void Play(int loopNum=0, int fadeTime=0);
 00105 
-00111                 void Pause();
+00111         void Pause();
 00112 
-00118                 void Unpause();
+00118         void Unpause();
 00119 
-00126                 void Stop(int fadeTime=0);
+00126         void Stop(int fadeTime=0);
 00127 
-00134                 void SetVolume(int volume);
+00134         void SetVolume(int volume);
 00135 
-00137                 //Accessors//
+00137         //Accessors//
 00139 
-00146                 bool IsLoaded();
+00146         bool IsLoaded();
 00147 
-00154                 bool IsPlaying();
+00154         bool IsPlaying();
 00155 
-00162                 bool IsPaused();
+00162         bool IsPaused();
 00163 
-00170                 int GetVolume();
+00170         int Volume();
 00171 };
 00172 
 00173 
@@ -76,9 +76,9 @@
 00176 #endif //USE_SDL_MIXER
 00177 
 00178 #endif //__ze_zsound_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZSound_8h.html b/doc/html/ZE__ZSound_8h.html index c312b84..ff9bf8a 100644 --- a/doc/html/ZE__ZSound_8h.html +++ b/doc/html/ZE__ZSound_8h.html @@ -3,15 +3,16 @@ ZE_ZSound.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZSound.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZSound.h
+

/include/ZE_ZSound.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZSound.h
Description: Header file for core ZEngine Sound Wrapper Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZSound.h,v 1.1.1.1 2002/11/21 05:41:12 cozman Exp

Definition file for ZSound, the Sound Effect wrapper for ZEngine. @@ -24,9 +25,9 @@ Definition file for ZSound, the Sound Effect wrapper for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZTimer_8cpp.html b/doc/html/ZE__ZTimer_8cpp.html index 1b4056f..5cf3f51 100644 --- a/doc/html/ZE__ZTimer_8cpp.html +++ b/doc/html/ZE__ZTimer_8cpp.html @@ -3,15 +3,16 @@ ZE_ZTimer.cpp File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/src/ZE_ZTimer.cpp File Reference


Detailed Description

-
File Header:
File: ZE_ZTimer.cpp
+

/src/ZE_ZTimer.cpp File Reference


Detailed Description

+
File Header:
+File: ZE_ZTimer.cpp
Description: Implementation source file for core ZEngine Timer Object.
Author(s): James Turk
- Last Updated: 11/08/02
-
+
Id:
+ ZE_ZTimer.cpp,v 1.1.1.1 2002/11/21 05:41:13 cozman Exp

Implementation of ZTimer, the basic Timer class for ZEngine. @@ -22,9 +23,9 @@ Implementation of ZTimer, the basic Timer class for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZE__ZTimer_8h-source.html b/doc/html/ZE__ZTimer_8h-source.html index 85472bc..332f286 100644 --- a/doc/html/ZE__ZTimer_8h-source.html +++ b/doc/html/ZE__ZTimer_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/ZE_ZTimer.h Source File +/include/ZE_ZTimer.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZTimer.h

Go to the documentation of this file.
00001 /*******************************************************************************
+

/include/ZE_ZTimer.h

Go to the documentation of this file.
00001 /*******************************************************************************
 00002          This file is Part of the ZEngine Library for SDL Game Development.
 00003                       Copyright (C) 2002 ConceptOfZero.net
 00004 
@@ -24,37 +24,37 @@
 00029 namespace ZE
 00030 {
 00031 
-00037 class ZTimer : public ZObject 
+00037 class ZTimer : public ZObject 
 00038 {
-00039         protected:
-00041                 bool rPaused;
-00043                 bool rUseZEngine;
-00045                 Uint32 rPausedTime;
-00047                 Uint32 rLastPause;
+00039     protected:
+00041         bool rPaused;
+00043         bool rUseZEngine;
+00045         Uint32 rPausedTime;
+00047         Uint32 rLastPause;
 00048 
-00055                 Uint32 GetParentTime();
+00055         Uint32 GetParentTime();
 00056 
-00057         public:
+00057     public:
 00058 
-00065                 ZTimer(bool useZEngine=true);
+00065         ZTimer(bool useZEngine=true);
 00066 
-00072                 void Reset();
+00072         void Reset();
 00073 
-00079                 void Pause();
+00079         void Pause();
 00080 
-00086                 void Unpause();
+00086         void Unpause();
 00087 
-00094                 Uint32 GetTime();
+00094         Uint32 GetTime();
 00095 
-00102                 bool IsPaused();
+00102         bool IsPaused();
 00103 };
 00104 
 00105 }
 00106 
 00107 #endif //__ze_ztimer_h__
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18 diff --git a/doc/html/ZE__ZTimer_8h.html b/doc/html/ZE__ZTimer_8h.html index feda7ba..a966aa3 100644 --- a/doc/html/ZE__ZTimer_8h.html +++ b/doc/html/ZE__ZTimer_8h.html @@ -3,15 +3,16 @@ ZE_ZTimer.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZE_ZTimer.h File Reference


Detailed Description

-
File Header:
File: Types/ZE_ZTimer.h
+

/include/ZE_ZTimer.h File Reference


Detailed Description

+
File Header:
+File: ZE_ZTimer.h
Description: Header file for core ZEngine Timer Object.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZE_ZTimer.h,v 1.1.1.1 2002/11/21 05:41:12 cozman Exp

Definition file for ZTimer, the Timer class for ZEngine. @@ -24,9 +25,9 @@ Definition file for ZTimer, the Timer class for ZEngine.

Namespaces

namespace  ZE -
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZEngine_8h-source.html b/doc/html/ZEngine_8h-source.html index 3cc0afb..a9196fc 100644 --- a/doc/html/ZEngine_8h-source.html +++ b/doc/html/ZEngine_8h-source.html @@ -1,27 +1,28 @@ -/home/James/ZEngine-dev/include/ZEngine.h Source File +/include/ZEngine.h Source File - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZEngine.h

Go to the documentation of this file.
00001 
-00043 #include "ZE_ZEngine.h"
-00044 #include "ZE_ZImage.h"
-00045 #include "ZE_ZTimer.h"
-00046 #include "ZE_ZConfigFile.h"
-00047 #include "ZE_ZRect.h"
-00048 #ifdef USE_SDL_TTF
-00049 #include "ZE_ZFont.h"
-00050 #endif
-00051 #ifdef USE_SDL_MIXER
-00052 #include "ZE_ZSound.h"
-00053 #include "ZE_ZMusic.h"
-00054 #endif
-

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

/include/ZEngine.h

Go to the documentation of this file.
00001 
+00044 #include "ZE_ZEngine.h"
+00045 #include "ZE_Macros.h"
+00046 #include "ZE_ZImage.h"
+00047 #include "ZE_ZTimer.h"
+00048 #include "ZE_ZConfigFile.h"
+00049 #include "ZE_ZRect.h"
+00050 #ifdef USE_SDL_TTF
+00051 #include "ZE_ZFont.h"
+00052 #endif
+00053 #ifdef USE_SDL_MIXER
+00054 #include "ZE_ZSound.h"
+00055 #include "ZE_ZMusic.h"
+00056 #endif
+

Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/ZEngine_8h.html b/doc/html/ZEngine_8h.html index 5bb7b41..39a9354 100644 --- a/doc/html/ZEngine_8h.html +++ b/doc/html/ZEngine_8h.html @@ -3,20 +3,22 @@ ZEngine.h File Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
-

/home/James/ZEngine-dev/include/ZEngine.h File Reference


Detailed Description

-
File Header:
File: ZEngine.h
+

/include/ZEngine.h File Reference


Detailed Description

+
File Header:
+File: ZEngine.h
Description: Public Header File for ZEngine.
Author(s): James Turk
- Last Updated: 11/07/02
-
+
Id:
+ ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp

-Header file for ZEngine Game Engine from Concept of Zero, this is the file that programs that wish to utilize ZEngine should include. +Header file for ZEngine Game Engine from Concept of Zero, this is the file that programs that wish to utilize ZEngine should include.

#include "ZE_ZEngine.h"
+#include "ZE_Macros.h"
#include "ZE_ZImage.h"
#include "ZE_ZTimer.h"
#include "ZE_ZConfigFile.h"
@@ -29,9 +31,9 @@ Header file for ZEngine Game Engine from Concept of Zero, this is the file that Go to the source code of this file.
-


Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 691175d..a3bf839 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -3,15 +3,13 @@ Annotated Index - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZEngine Compound List

Here are the classes, structs, unions and interfaces with brief descriptions: - - - - + + @@ -21,9 +19,9 @@
ZE::FontDataClass to wrap TTF_Font pointers
ZE::ImageDataClass to wrap SDL_Surface pointers
ZE::MusicDataClass to wrap Mix_Music pointers
ZE::SoundDataClass to wrap Mix_Chunk pointers
ZE::ZConfigFileZConfigFile Class for use in ZEngine
ZE::ZConfigFile::ZCF_SectionZConfigFile Section class
ZE::ZConfigFile::ZCF_VariableZConfigFile Variable class
ZE::ZEngineMain ZEngine Singleton Class
ZE::ZFontZFont class for basic Font use
ZE::ZImageZImage class for basic Image use
ZE::ZSoundZSound class for playing sound effects. (WAV)
ZE::ZTimerZTimer class for Timer use
-
Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/classZE_1_1ZConfigFile-members.html b/doc/html/classZE_1_1ZConfigFile-members.html index c8cdf03..31e883f 100644 --- a/doc/html/classZE_1_1ZConfigFile-members.html +++ b/doc/html/classZE_1_1ZConfigFile-members.html @@ -3,7 +3,7 @@ Member List - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZE::ZConfigFile Member List

This is the complete list of members for ZE::ZConfigFile, including all inherited members. @@ -29,9 +29,9 @@ -
ZObject()ZE::ZObject [inline]
~ZConfigFile()ZE::ZConfigFile
~ZObject()ZE::ZObject [inline, virtual]

Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
+width=110 height=53>1.2.18
diff --git a/doc/html/classZE_1_1ZConfigFile.html b/doc/html/classZE_1_1ZConfigFile.html index 427e10a..2c80b00 100644 --- a/doc/html/classZE_1_1ZConfigFile.html +++ b/doc/html/classZE_1_1ZConfigFile.html @@ -3,7 +3,7 @@ ZE::ZConfigFile class Reference - +
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZE::ZConfigFile Class Reference

#include <ZE_ZConfigFile.h> @@ -43,17 +43,9 @@ Inherits ZE::ZObject.

Private Methods

string CleanString (string str)  Reformat a string in a form more suitable to parsing.

- -bool Exists (string sec) - -bool Exists (string sec, string var) - -void SetVariable (string sec, string var, string val) - -string GetVariable (string sec, string var, string defVal)

Private Attributes

-list< ZCF_Section > mFileLayout +list< ZCF_SectionmFileLayout  List of sections of internal type.

string mFilename @@ -114,12 +106,12 @@ A no-op default constructor.

-Constructor takes filename, and calls process on it.

Parameters:
- - -
filename File to load as ZConfigFile.
-
- +Constructor takes filename, and calls process on it.
Parameters:
+ + +
filename  +File to load as ZConfigFile.
+

@@ -177,13 +169,13 @@ Flushes the file, ensures a flush if the file is left open.

-Removes whitespace from a string and makes all characters lowercase.

Parameters:
- - -
str The string to get a clean version of.
-
-
Returns:
Cleaned string.
- +Removes whitespace from a string and makes all characters lowercase.
Parameters:
+ + +
str  +The string to get a clean version of.
+
Returns:
+Cleaned string.

@@ -212,12 +204,12 @@ Removes whitespace from a string and makes all characters lowercase.

-Parses the file, reading the contents into the fileLayout map.

Parameters:
- - -
filename File to parse and attach this ZDataFile to.
-
- +Parses the file, reading the contents into the fileLayout map.
Parameters:
+ + +
filename  +File to parse and attach this ZDataFile to.
+

@@ -261,15 +253,17 @@ Parses the file, reading the contents into the fileLayout map.

<

-Get the current value of a variable in the file, or defVal if not found in file.

Parameters:
- - - - -
section Name of section to seek variable under.
var Name of variable to seek value for.
defVal Value to return if var does not exist within section.
-
-
Returns:
Contents of the variable in integer format.
- +Get the current value of a variable in the file, or defVal if not found in file.
Parameters:
+ + + + +
section  +Name of section to seek variable under.
var  +Name of variable to seek value for.
defVal  +Value to return if var does not exist within section.
+
Returns:
+Contents of the variable in integer format.

@@ -313,15 +307,17 @@ Get the current value of a variable in the file, or defVal if not found in file.

-Get the current value of a variable in the file, or defVal if not found in file. (Valid values are "0","1","true" and "false")

Parameters:
- - - - -
section Name of section to seek variable under.
var Name of variable to seek value for.
defVal Value to return if var does not exist within section.
-
-
Returns:
Contents of the variable in boolean format.
- +Get the current value of a variable in the file, or defVal if not found in file. (Valid values are "0","1","true" and "false")
Parameters:
+ + + + +
section  +Name of section to seek variable under.
var  +Name of variable to seek value for.
defVal  +Value to return if var does not exist within section.
+
Returns:
+Contents of the variable in boolean format.

@@ -365,15 +361,17 @@ Get the current value of a variable in the file, or defVal if not found in file.

-Get the current value of a variable in the file, or defVal if not found in file.

Parameters:
- - - - -
section Name of section to seek variable under.
var Name of variable to seek value for.
defVal Value to return if var does not exist within section.
-
-
Returns:
Contents of the variable in string format.
- +Get the current value of a variable in the file, or defVal if not found in file.
Parameters:
+ + + + +
section  +Name of section to seek variable under.
var  +Name of variable to seek value for.
defVal  +Value to return if var does not exist within section.
+
Returns:
+Contents of the variable in string format.

@@ -417,14 +415,16 @@ Get the current value of a variable in the file, or defVal if not found in file.

-Set the new value of a variable in the file to val, creating the section and variable if not already found in file.

Parameters:
- - - - -
section Name of section to edit variable under.
var Name of variable to set value for.
val Integer value to set variable to in file.
-
- +Set the new value of a variable in the file to val, creating the section and variable if not already found in file.
Parameters:
+ + + + +
section  +Name of section to edit variable under.
var  +Name of variable to set value for.
val  +Integer value to set variable to in file.
+

@@ -468,14 +468,16 @@ Set the new value of a variable in the file to val, creating the section and var

-Set the new value of a variable in the file to val, creating the section and variable if not already found in file.

Parameters:
- - - - -
section Name of section to edit variable under.
var Name of variable to set value for.
val Boolean value to set variable to in file.
-
- +Set the new value of a variable in the file to val, creating the section and variable if not already found in file.
Parameters:
+ + + + +
section  +Name of section to edit variable under.
var  +Name of variable to set value for.
val  +Boolean value to set variable to in file.
+

@@ -519,14 +521,16 @@ Set the new value of a variable in the file to val, creating the section and var

-Set the new value of a variable in the file to val, creating the section and variable if not already found in file.

Parameters:
- - - - -
section Name of section to edit variable under.
var Name of variable to set value for.
val String value to set variable to in file.
-
- +Set the new value of a variable in the file to val, creating the section and variable if not already found in file.
Parameters:
+ + + + +
section  +Name of section to edit variable under.
var  +Name of variable to set value for.
val  +String value to set variable to in file.
+

@@ -586,10 +590,10 @@ Flush the file and clear the filename.


The documentation for this class was generated from the following files: -
Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZConfigFile.h
  • /src/ZE_ZConfigFile.cpp +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZEngine-members.html b/doc/html/classZE_1_1ZEngine-members.html index 3462ac3..262981b 100644 --- a/doc/html/classZE_1_1ZEngine-members.html +++ b/doc/html/classZE_1_1ZEngine-members.html @@ -3,40 +3,33 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZEngine Member List

    This is the complete list of members for ZE::ZEngine, including all inherited members. + - - - - - - - - - + + + + + - - - - + - + - + - - + + - @@ -47,6 +40,8 @@ + + @@ -61,17 +56,18 @@ + - + -
    BPP()ZE::ZEngine
    CheckEvents()ZE::ZEngine
    Clear(Uint32 color=0, SDL_Rect *rect=NULL)ZE::ZEngine
    CloseWindow()ZE::ZEngine
    CreateWindow(string title, string icon="")ZE::ZEngine
    FreeFont(FontData &font)ZE::ZEngine
    FreeImage(ImageData &image)ZE::ZEngine
    FreeMusic(MusicData &music)ZE::ZEngine
    FreeSound(SoundData &sound)ZE::ZEngine
    GetBPP()ZE::ZEngine
    GetDisplay()ZE::ZEngine
    Clear(float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=1.0f)ZE::ZEngine
    CloseDisplay()ZE::ZEngine
    CreateDisplay(string title, string icon="")ZE::ZEngine
    Delay(Uint32 milliseconds)ZE::ZEngine
    Display()ZE::ZEngine
    GetFrameTime()ZE::ZEngine
    GetHeight()ZE::ZEngine
    GetInstance()ZE::ZEngine [static]
    GetMouseX()ZE::ZEngine
    GetMouseY()ZE::ZEngine
    GetTime()ZE::ZEngine
    GetVersion()ZE::ZEngine [static]
    GetWidth()ZE::ZEngine
    Height()ZE::ZEngine
    HideCursor()ZE::ZEngine
    IsActive()ZE::ZEngine
    IsFullscreen()ZE::ZEngine
    IsFullscreen()ZE::ZEngine
    IsPaused()ZE::ZEngine
    KeyIsPressed(SDLKey key)ZE::ZEngine
    LButtonPressed()ZE::ZEngine
    LoadFont(string filename, int size)ZE::ZEngine
    LoadFont(string filename, int size)ZE::ZEngine
    LoadImage(string filename)ZE::ZEngine
    LoadMusic(string filename)ZE::ZEngine
    LoadSound(string filename)ZE::ZEngine
    LoadMusic(string filename)ZE::ZEngine
    LoadSound(string filename)ZE::ZEngine
    mActiveZE::ZEngine [private]
    MapColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a=255)ZE::ZEngine
    mBPPZE::ZEngine [private]
    mFullscreenZE::ZEngine [private]
    mHeightZE::ZEngine [private]
    mMouseXZE::ZEngine [private]
    mMouseYZE::ZEngine [private]
    MouseInRect(SDL_Rect *rect)ZE::ZEngine
    MouseX()ZE::ZEngine
    MouseY()ZE::ZEngine
    mPausedZE::ZEngine [private]
    mPausedTimeZE::ZEngine [private]
    mQuitZE::ZEngine [private]
    RButtonPressed()ZE::ZEngine
    ReleaseInstance()ZE::ZEngine [static]
    RequestQuit()ZE::ZEngine
    SetGL2D()ZE::ZEngine
    SetupDisplay(int width, int height, int bpp, bool fullscreen)ZE::ZEngine
    SetupSound(int rate, bool stereo)ZE::ZEngine
    ShowCursor()ZE::ZEngine
    sInstanceZE::ZEngine [private, static]
    Sleep(Uint32 milliseconds)ZE::ZEngine
    UnpauseTimer()ZE::ZEngine
    UpdateScreen()ZE::ZEngine
    Width()ZE::ZEngine
    ZEngine()ZE::ZEngine [private]

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/classZE_1_1ZEngine.html b/doc/html/classZE_1_1ZEngine.html index c6de3cf..231c098 100644 --- a/doc/html/classZE_1_1ZEngine.html +++ b/doc/html/classZE_1_1ZEngine.html @@ -3,13 +3,13 @@ ZE::ZEngine class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZEngine Class Reference

    #include <ZE_ZEngine.h>

    List of all members.


    Detailed Description

    -ZEngine Singleton Class, accessible from anywhere in a ZEngine-based program by nature. Controls core elements of program and does majority of SDL wrapping. Also keeps track of loaded data and helps programs avoid memory leaks and dangling pointers. +ZEngine Singleton Class, accessible from anywhere in a ZEngine-based program by nature. Controls core elements of program and does majority of SDL wrapping. Also keeps track of loaded data and helps programs avoid memory leaks and dangling pointers.

    @@ -18,19 +18,19 @@ - - - + + + - + - - - - - + + + + + @@ -54,9 +54,9 @@ - + - + @@ -66,30 +66,22 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -218,8 +210,8 @@ Initialize ZEngine values to de +Static function, returns pointer to instance of ZEngine, creating an instance if none exist.
    Returns:
    +Instance to the ZEngine.
     Setup Display for SDL.

    void SetupSound (int rate, bool stereo)
     Initialize Sound for SDL.

    void CreateWindow (string title, string icon="")
     Create Window with predefined settings.

    void CloseWindow ()
    void CreateDisplay (string title, string icon="")
     Create Display with predefined settings.

    void CloseDisplay ()
     Quit SDL and any Subsystems.

    SDL_Surface * GetDisplay ()
    SDL_Surface * Display ()
     Allow access to Screen Surface.

    void UpdateScreen ()
     Update screen contents.

    Uint32 MapColor (Uint8 r, Uint8 g, Uint8 b, Uint8 a=255)
     Create Color in SDL Uint32 Format.

    void Clear (Uint32 color=0, SDL_Rect *rect=NULL)
     Clear screen or portion of screen to a color.

    void Sleep (Uint32 milliseconds)
    void Clear (float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=1.0f)
     Clear screen to a certain color (Black by default).

    void SetGL2D ()
     Setup OpenGL ortho mode.

    void Delay (Uint32 milliseconds)
     Sleep for a certain amount of time.

    Uint32 GetTime ()
     Get Global ZEngine time.

     Hide mouse cursor.

    void ShowCursor ()
     Show mouse cursor.

    int GetMouseX ()
    int MouseX ()
     Get X Position of Mouse.

    int GetMouseY ()
    int MouseY ()
     Get Y Position of Mouse.

    bool LButtonPressed ()
     Get Status of Left Button.

     Check if mouse is in given rectangle.

    void CheckEvents ()
     Check for Activation, Window Manager, and Quit Events.

    ImageData LoadImage (string filename)
    SDL_Surface * LoadImage (string filename)
     Load an Image.

    void FreeImage (ImageData &image)
     Free an Image.

    SoundData LoadSound (string filename)
     Load a Sound.

    void FreeSound (SoundData &sound)
     Free a Sound.

    MusicData LoadMusic (string filename)
     Load a Music File.

    void FreeMusic (MusicData &music)
     Free a Music Sample.

    FontData LoadFont (string filename, int size)
     Load a Font.

    void FreeFont (FontData &font)
     Free a Font.

    int GetWidth ()
     Get Current Display Width.

    int GetHeight ()
     Get Current Display Height.

    int GetBPP ()
     Get Current Display BPP.

    bool IsFullscreen ()
     Get Fullscreen setting.

    Mix_Chunk * LoadSound (string filename)
     Load a Sound.

    Mix_Music * LoadMusic (string filename)
     Load a Music File.

    TTF_Font * LoadFont (string filename, int size)
     Load a Font.

    int Width ()
     Get Current Display Width.

    int Height ()
     Get Current Display Height.

    int BPP ()
     Get Current Display BPP.

    bool IsFullscreen ()
     Get Fullscreen setting.


    Static Public Methods

    ZEngine * GetInstance ()
     Get Instance.

    -Static function, returns pointer to instance of ZEngine, creating an instance if none exist.

    Returns:
    Instance to the ZEngine.
    -

    @@ -275,8 +267,8 @@ Release memory held by instance of engine and closes window.

    -Get Version Number of ZEngine. (Major.Minor.Extension#)

    Returns:
    string containing version number
    - +Get Version Number of ZEngine. (Major.Minor.Extension#)
    Returns:
    +string containing version number

    @@ -326,17 +318,18 @@ Get Version Number of ZEngine.

    -Sets display parameters to specified parameters. (called before CreateDisplay) -

    -

    Parameters:
    - - - - - -
    width Desired width of screen or window.
    height Desired height of screen or window.
    bpp Desired BPP for screen (only works in fullscreen).
    fullscreen A bool for fullscreen setting.
    -
    - +Sets display parameters to specified parameters. (called before CreateDisplay)
    Parameters:
    + + + + + +
    width  +Desired width of screen or window.
    height  +Desired height of screen or window.
    bpp  +Desired BPP for screen (only works in fullscreen).
    fullscreen  +A bool for fullscreen setting.
    +

    @@ -374,24 +367,23 @@ Sets display parameters to specified parameters. (called before CreateDisplay)

    -Set sound settings to specified parameters. (called before CreateDisplay) -

    -

    Parameters:
    - - - -
    rate Desired sound bitrate.
    stereo A bool for stereo setting.
    -
    - +Set sound settings to specified parameters. (called before CreateDisplay)
    Parameters:
    + + + +
    rate  +Desired sound bitrate.
    stereo  +A bool for stereo setting.
    +
    -

    +

    - + @@ -420,24 +412,23 @@ Set sound settings to specified parameters. (called before CreateDisplay) +SetupDisplay and SetupSound should be called prior to this to change settings, settings from those do not go into effect until this function is called. Specify no icon file to use default OS icon.
    Parameters:
    +
    void ZE::ZEngine::CreateWindow void ZE::ZEngine::CreateDisplay string    title,

    -SetupDisplay and SetupSound should be called prior to this to change settings, settings from those do not go into effect until this function is called. Specify no icon file to use default OS icon. -

    -

    Parameters:
    - - - -
    title Window Title.
    icon Path to Icon File.
    -
    -
    + + +
    title  +Window Title.
    icon  +Path to Icon File.
    +
    -

    +

    - + @@ -459,13 +450,13 @@ SetupDisplay and SetupSound should be called prior to this to change settings, s Shut down SDL (and SDL_ttf,SDL_mixer if necessary).
    void ZE::ZEngine::CloseWindow void ZE::ZEngine::CloseDisplay  
    -

    +

    - + @@ -484,8 +475,8 @@ Shut down SDL (and SDL_ttf,SDL_mixer if necessary). +Get pointer to screen SDL_Surface, allowing direct screen manipulation using SDL.
    Returns:
    +Pointer to Display Surface.
    SDL_Surface * ZE::ZEngine::GetDisplay SDL_Surface * ZE::ZEngine::Display  

    -Get pointer to screen SDL_Surface, allowing direct screen manipulation using SDL.

    Returns:
    Pointer to Display Surface.
    -

    @@ -516,68 +507,7 @@ Get pointer to screen SDL_Surface, allowing direct screen manipulation using SDL Flip double buffer in SDL if double buffered, otherwise tell video to refresh entire screen.

    -

    - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Uint32 ZE::ZEngine::MapColor Uint8   r,
    Uint8   g,
    Uint8   b,
    Uint8   a = 255
    -
    - - - - - -
    -   - - -

    -Turn RGBA values into SDL Uint32 color. (Alpha value will be ignored if not in use) -

    -

    Parameters:
    - - - - - -
    r Red component of color (0-255).
    g Green component of color (0-255).
    b Blue component of color (0-255).
    a Alpha (translucency) component of color (0-255). [Default 255]
    -
    -
    Returns:
    Uint32 of color requested.
    -
    -

    +

    - - + + - - + + + + + + + + + + + + + + @@ -612,22 +554,55 @@ Turn RGBA values into SDL Uint32 color. (Alpha value will be ignored if not in u +Clears a rectangle on screen to a color, defaults to solid black.
    Parameters:
    +
    @@ -585,14 +515,26 @@ Turn RGBA values into SDL Uint32 color. (Alpha value will be ignored if not in u
    void ZE::ZEngine::Clear Uint32   color = 0, float   red = 0.0f,
    SDL_Rect *   rect = NULLfloat   green = 0.0f,
    float   blue = 0.0f,
    float   alpha = 1.0f

    -Clears a rectangle on screen to a color.

    Parameters:
    - - - -
    color Color to clear surface to, defaults to black.
    rect Rectangle of screen to clear or NULL for entire surface.
    -
    -
    + + + + +
    red  +Red component (0.0-1.0) of new color.
    green  +Green component (0.0-1.0) of new color.
    blue  +Blue component (0.0-1.0) of new color.
    alpha  +Alpha component (0.0-1.0) of new color.
    +

    -

    +

    + +
    - + + + + + + + +
    void ZE::ZEngine::Sleep void ZE::ZEngine::SetGL2D  
    +
    + + + + + +
    +   + + +

    +Sets the OpenGL scaled orthographic mode, called once at beginning, no need to call unless you change the OpenGL mode manually.

    +

    + + +
    + + + @@ -647,12 +622,12 @@ Clears a rectangle on screen to a color.
    Parameters:
    +Freeze everything for given number of milliseconds.
    Parameters:
    +
    void ZE::ZEngine::Delay Uint32    milliseconds

    -Freeze everything for given number of milliseconds.

    Parameters:
    - - -
    milliseconds Number of milliseconds to freeze.
    -
    -
    + +
    milliseconds  +Number of milliseconds to freeze.
    +

    @@ -680,8 +655,8 @@ Freeze everything for given number of milliseconds.

    Parameter

    -Get active time since ZEngine initialization in milliseconds, paused time doesn't count.

    Returns:
    Number of active milliseconds since initialization.
    - +Get active time since ZEngine initialization in milliseconds, paused time doesn't count.
    Returns:
    +Number of active milliseconds since initialization.

    @@ -765,8 +740,8 @@ Unpause ZEngine timer and all <

    -Get double that describes the time passed between screen updates. (used for Framerate Independant Movement)

    Returns:
    Time between screen updates.
    - +Get double that describes the time passed between screen updates. (used for Framerate Independant Movement)
    Returns:
    +Time between screen updates.

    @@ -794,8 +769,8 @@ Get double that describes the time passed between screen updates. (used for Fram

    -Find out if engine timer is paused.

    Returns:
    Paused State of engine.
    - +Find out if engine timer is paused.
    Returns:
    +Paused State of engine.

    @@ -823,8 +798,8 @@ Find out if engine timer is paused.

    Returns:
    Paus

    -Function to find out if application currently has focus.

    Returns:
    bool telling active/inactive state of application.
    - +Function to find out if application currently has focus.
    Returns:
    +bool telling active/inactive state of application.

    @@ -852,7 +827,7 @@ Function to find out if application currently has focus.

    Retu

    -Tell the engine that it should behave as if a Quit was requested, does not call any shutdown functions. +Tell the engine that it should behave as if a Quit was requested, does not call any shutdown functions.

    @@ -880,8 +855,8 @@ Tell the engine that it should behave as if a Quit was requested, does not call

    -Function to find out if user or operating system has requested program cease execution, can be set by Alt-F4, SDL_Quit event or ZEngine::RequestQuit().

    Returns:
    bool telling if quit has been requested.
    - +Function to find out if user or operating system has requested program cease execution, can be set by Alt-F4, SDL_Quit event or ZEngine::RequestQuit().
    Returns:
    +bool telling if quit has been requested.

    @@ -910,13 +885,13 @@ Function to find out if user or operating system has requested program cease exe

    -Function returns true/false based on if key is pressed or not.

    Parameters:
    - - -
    key code of key to find status of.
    -
    -
    Returns:
    bool state of requested key.
    - +Function returns true/false based on if key is <u>currently</u> pressed or not.
    Parameters:
    + + +
    key  +code of key to find status of.
    +
    Returns:
    +bool state of requested key.

    @@ -975,13 +950,13 @@ Hide the system mouse cursor. Show the system mouse cursor. -

    +

    +Get pressed status of right button of mouse.
    Returns:
    +true if right button is pressed, false otherwise.
    - + @@ -1000,17 +975,17 @@ Show the system mouse cursor. +Find X Position of Mouse on screen.
    Returns:
    +X Position of Mouse.
    int ZE::ZEngine::GetMouseX int ZE::ZEngine::MouseX  

    -Find X Position of Mouse on screen.

    Returns:
    X Position of Mouse.
    -
    -

    +

    +Get pressed status of left button of mouse.
    Returns:
    +true if left button is pressed, false otherwise.
    - + @@ -1029,8 +1004,8 @@ Find X Position of Mouse on screen.
    Returns:
    X Po
    +Find Y Position of Mouse on screen.
    Returns:
    +Y Position of Mouse.
    int ZE::ZEngine::GetMouseY int ZE::ZEngine::MouseY  

    -Find Y Position of Mouse on screen.

    Returns:
    Y Position of Mouse.
    -

    @@ -1058,8 +1033,8 @@ Find Y Position of Mouse on screen.

    Returns:
    Y Po

    -Get pressed status of left button of mouse.

    Returns:
    true if left button is pressed, false otherwise.
    -

    @@ -1087,8 +1062,8 @@ Get pressed status of left button of mouse.

    Returns:

    -Get pressed status of right button of mouse.

    Returns:
    true if right button is pressed, false otherwise.
    -

    @@ -1117,13 +1092,13 @@ Get pressed status of right button of mouse.

    Returns:

    -Return status of mouse in current rectangle (used for buttons)

    Parameters:
    - - -
    rect Rectangle to check if mouse is in.
    -
    -
    Returns:
    true if mouse is in rectangle, false otherwise
    - +Return status of mouse in current rectangle (used for buttons)
    Parameters:
    + + +
    rect  +Rectangle to check if mouse is in.
    +
    Returns:
    +true if mouse is in rectangle, false otherwise

    @@ -1160,7 +1135,7 @@ Cycle through event queue, processing events, updating all Event Related variabl - + @@ -1180,56 +1155,22 @@ Cycle through event queue, processing events, updating all Event Related variabl +Loads an Image to an ImageData class which keeps vital information on the Image.
    Parameters:
    +
    ImageData ZE::ZEngine::LoadImage SDL_Surface * ZE::ZEngine::LoadImage string    filename

    -Loads an Image to an ImageData class which keeps vital information on the Image.

    Parameters:
    - - -
    filename path to file to load.
    -
    -
    Returns:
    A ImageData class containing filename and pointer to data.
    -
    + +
    filename  +path to file to load.
    +

    Returns:
    +A SDL_Surface pointer to data.
    -

    +

    - -
    - - - - - - - - -
    void ZE::ZEngine::FreeImage ImageData  image
    -
    - - - - - -
    -   - - -

    -Free memory of an Image in an ImageData class.

    Parameters:
    - - -
    image ImageData structure of image to free.
    -
    -
    -

    - - -
    - - - + @@ -1249,56 +1190,22 @@ Free memory of an Image in an Ima +Loads a Sound to a SoundData class which keeps vital information on the Sound
    Parameters:
    +
    SoundData ZE::ZEngine::LoadSound Mix_Chunk* ZE::ZEngine::LoadSound string    filename

    -Loads a Sound to a SoundData class which keeps vital information on the Sound

    Parameters:
    - - -
    filename path to file to load.
    -
    -
    Returns:
    A SoundData class containing filename and pointer to data.
    -
    + +
    filename  +path to file to load.
    +
    Returns:
    +A Mix_Chunk pointer to data.
    -

    +

    - -
    - - - - - - - - -
    void ZE::ZEngine::FreeSound SoundData  sound
    -
    - - - - - -
    -   - - -

    -Free memory of a Sound in a SoundData class.

    Parameters:
    - - -
    sound SoundData structure of sound to free.
    -
    -
    -

    - - -
    - - - + @@ -1318,56 +1225,22 @@ Free memory of a Sound in a Sound +Loads a Music Clip to a MusicData class which keeps vital information on the Music Data
    Parameters:
    +
    MusicData ZE::ZEngine::LoadMusic Mix_Music* ZE::ZEngine::LoadMusic string    filename

    -Loads a Music Clip to a MusicData class which keeps vital information on the Music Data

    Parameters:
    - - -
    filename path to file to load.
    -
    -
    Returns:
    A MusicData class containing filename and pointer to data.
    -
    + +
    filename  +path to file to load.
    +
    Returns:
    +A Mix_Music pointer to data.
    -

    +

    - -
    - - - - - - - - -
    void ZE::ZEngine::FreeMusic MusicData  music
    -
    - - - - - -
    -   - - -

    -Free memory of Music in a MusicData class.

    Parameters:
    - - -
    music MusicData structure of music to free.
    -
    -
    -

    - - -
    - - - + @@ -1396,57 +1269,24 @@ Free memory of Music in a MusicDa +Loads a Font to a FontData class which keeps vital information on the Font
    Parameters:
    +
    FontData ZE::ZEngine::LoadFont TTF_Font* ZE::ZEngine::LoadFont string    filename,

    -Loads a Font to a FontData class which keeps vital information on the Font

    Parameters:
    - - - -
    filename path to file to load.
    size point size of font
    -
    -
    Returns:
    A FontData class containing filename and pointer to data.
    -
    + + +
    filename  +path to file to load.
    size  +point size of font
    +
    Returns:
    +A TTF_Font pointer to data.
    -

    +

    - -
    - - - - - - - - -
    void ZE::ZEngine::FreeFont FontData  font
    -
    - - - - - -
    -   - - -

    -Free memory of a Font in a FontData class.

    Parameters:
    - - -
    font FontData structure of font to free.
    -
    -
    -

    - - - +Constructor simply calls ZFont::Open() with same parameters.
    Parameters:
    +
    - - - + @@ -1465,17 +1305,17 @@ Free memory of a Font in a FontDat +Get Width of Window or Fullscreen mode.
    Returns:
    +Width of Display.
    int ZE::ZEngine::GetWidth int ZE::ZEngine::Width  

    -Get Width of Window or Fullscreen mode.

    Returns:
    Width of Display.
    -
    -

    +

    - + - + - + - + - - +TTF_Font *  + + + + - +
    - + @@ -1494,17 +1334,17 @@ Get Width of Window or Fullscreen mode.
    Returns:
    +Get Height of Window or Fullscreen mode.
    Returns:
    +Height of Display.
    int ZE::ZEngine::GetHeight int ZE::ZEngine::Height  

    -Get Height of Window or Fullscreen mode.

    Returns:
    Height of Display.
    -
    -

    +

    - + @@ -1523,11 +1363,11 @@ Get Height of Window or Fullscreen mode.
    Returns:

    -Get BPP of Window or Fullscreen mode.

    Returns:
    BPP of Display.
    - +Get BPP of Window or Fullscreen mode.
    Returns:
    +BPP of Display.
    int ZE::ZEngine::GetBPP int ZE::ZEngine::BPP  
    -

    +

    +Get Fullscreen setting of Display.
    Returns:
    +True if Fullscreen, False if Windowed
    @@ -1552,15 +1392,15 @@ Get BPP of Window or Fullscreen mode.
    Returns:
    BP

    -Get Fullscreen setting of Display.

    Returns:
    True if Fullscreen, False if Windowed
    -


    The documentation for this class was generated from the following files: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZEngine.h
  • /src/ZE_ZEngine.cpp +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZFont-members.html b/doc/html/classZE_1_1ZFont-members.html index b45e5f0..64becf5 100644 --- a/doc/html/classZE_1_1ZFont-members.html +++ b/doc/html/classZE_1_1ZFont-members.html @@ -3,38 +3,39 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZFont Member List

    This is the complete list of members for ZE::ZFont, including all inherited members. - - - - + + - - + + + + + -
    DrawShadedText(string text, ZImage &image)ZE::ZFont
    DrawText(string text, ZImage &image)ZE::ZFont
    GetHeight()ZE::ZFont
    GetLineSkip()ZE::ZFont
    GetStringHeight(string text)ZE::ZFont
    GetStringWidth(string text)ZE::ZFont
    Height()ZE::ZFont
    IsBold()ZE::ZFont
    IsItalic()ZE::ZFont
    IsLoaded()ZE::ZFont
    IsUnderlined()ZE::ZFont
    LineSkip()ZE::ZFont
    Open(string filename, int size)ZE::ZFont
    rBGColorZE::ZFont [protected]
    rColorZE::ZFont [protected]
    rBGColorZE::ZFont [protected]
    rColorZE::ZFont [protected]
    Release()ZE::ZFont
    rEngineZE::ZObject [protected]
    Resize(int size)ZE::ZFont
    rFilenameZE::ZFont [protected]
    rFontZE::ZFont [protected]
    SetBGColor(Uint8 r, Uint8 g, Uint8 b)ZE::ZFont
    SetColor(Uint8 r, Uint8 g, Uint8 b)ZE::ZFont
    SetStyle(bool bold, bool italic, bool underline)ZE::ZFont
    StringHeight(string text)ZE::ZFont
    StringWidth(string text)ZE::ZFont
    ZFont()ZE::ZFont
    ZFont(string filename, int size)ZE::ZFont
    ZObject()ZE::ZObject [inline]
    ~ZFont()ZE::ZFont
    ~ZObject()ZE::ZObject [inline, virtual]

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +


    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18 diff --git a/doc/html/classZE_1_1ZFont.html b/doc/html/classZE_1_1ZFont.html index 083fab0..bb32610 100644 --- a/doc/html/classZE_1_1ZFont.html +++ b/doc/html/classZE_1_1ZFont.html @@ -3,7 +3,7 @@ ZE::ZFont class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZFont Class Reference

    #include <ZE_ZFont.h> @@ -46,23 +46,26 @@ Inherits ZE::ZObject.
     Get Italic Setting.

    bool IsUnderlined ()
     Get Underlined Setting.

    int GetHeight ()
    int Height ()
     Get Height of Font.

    int GetLineSkip ()
    int LineSkip ()
     Get Line Skip for Font.

    int GetStringWidth (string text)
    int StringWidth (string text)
     Get String Width.

    int GetStringHeight (string text)
    int StringHeight (string text)
     Get String Height.


    Protected Attributes

    -FontData rFont
     Class containing font and filename.

    -SDL_Color rColor
    rFont
     Pointer to font data.

    +string rFilename
     Filename, for resizing.

    +SDL_Color rColor
     SDL_Color for current text color.

    -SDL_Color rBGColor
    +SDL_Color rBGColor
     SDL_Color for background color to be used in shaded draws.


    Constructor & Destructor Documentation

    @@ -129,13 +132,14 @@ Default Constructor, does nothing.

    -Constructor simply calls ZFont::Open() with same parameters.

    Parameters:
    - - - -
    filename Font to open.
    size Size to use for font.
    -
    -
    + + +
    filename  +Font to open.
    size  +Size to use for font.
    +

    @@ -202,13 +206,14 @@ Destructor calls ZFont::Release()<

    -Opens a font given a filename and a point size.

    Parameters:
    - - - -
    filename Font to open.
    size Size to use for font.
    -
    - +Opens a font given a filename and a point size.
    Parameters:
    + + + +
    filename  +Font to open.
    size  +Size to use for font.
    +

    @@ -274,13 +279,14 @@ Release memory held by font.

    -Draw to a surface in specified color and associate that surface with a ZImage.

    Parameters:
    - - - -
    text String to write.
    image ZImage to draw to.
    -
    - +Draw to a surface in specified color and associate that surface with a ZImage.
    Parameters:
    + + + +
    text  +String to write.
    image  +ZImage to draw to.
    +

    @@ -318,13 +324,14 @@ Draw to a surface in specified color and associate that surface with a

    -Draw to a surface a string with a background of rBGColor and lettering in the normal color and associate that surface with a ZImage.

    Parameters:
    - - - -
    text String to write.
    image ZImage to draw to.
    -
    - +Draw to a surface a string with a background of rBGColor and lettering in the normal color and associate that surface with a ZImage.
    Parameters:
    + + + +
    text  +String to write.
    image  +ZImage to draw to.
    +

    @@ -368,14 +375,16 @@ Draw to a surface a string with a background of rBGColor and lettering in the no

    -Set rColor of Text Output.

    Parameters:
    - - - - -
    r Red component of color (0-255).
    g Green component of color (0-255).
    b Blue component of color (0-255).
    -
    - +Set rColor of Text Output.
    Parameters:
    + + + + +
    r  +Red component of color (0-255).
    g  +Green component of color (0-255).
    b  +Blue component of color (0-255).
    +

    @@ -419,14 +428,16 @@ Set rColor of Text Output.

    Parameters:

    -Set rColor of Background for Shaded Draw.

    Parameters:
    - - - - -
    r Red component of color (0-255).
    g Green component of color (0-255).
    b Blue component of color (0-255).
    -
    - +Set rColor of Background for Shaded Draw.
    Parameters:
    + + + + +
    r  +Red component of color (0-255).
    g  +Green component of color (0-255).
    b  +Blue component of color (0-255).
    +

    @@ -470,14 +481,16 @@ Set rColor of Background for Shaded Draw.

    Parameters:

    -Set display format (bold, italic, underline).

    Parameters:
    - - - - -
    bold Decides bold setting of font.
    italic Decides italic setting of font.
    underline Decides underline setting of font.
    -
    - +Set display format (bold, italic, underline).
    Parameters:
    + + + + +
    bold  +Decides bold setting of font.
    italic  +Decides italic setting of font.
    underline  +Decides underline setting of font.
    +

    @@ -506,12 +519,12 @@ Set display format (bold, italic, underline).

    Parameters:

    -Release and Reopen font in new size.

    Parameters:
    - - -
    size New size for font.
    -
    - +Release and Reopen font in new size.
    Parameters:
    + + +
    size  +New size for font.
    +

    @@ -539,8 +552,8 @@ Release and Reopen font in new size.

    Parameters:

    -Check if file is loaded and pointer to data is non-NULL.

    Returns:
    Loaded or Unloaded state of data.
    - +Check if file is loaded and pointer to data is non-NULL.
    Returns:
    +Loaded or Unloaded state of data.

    @@ -568,8 +581,8 @@ Check if file is loaded and pointer to data is non-NULL.

    Retu

    -Check if font output is currently bold.

    Returns:
    True or False state of bold.
    - +Check if font output is currently bold.
    Returns:
    +True or False state of bold.

    @@ -597,8 +610,8 @@ Check if font output is currently bold.

    Returns:

    -Check if font output is currently italic.

    Returns:
    True or False state of italic.
    - +Check if font output is currently italic.
    Returns:
    +True or False state of italic.

    @@ -626,17 +639,17 @@ Check if font output is currently italic.

    Returns:

    -Check if font output is currently underline.

    Returns:
    True or False state of underline.
    - +Check if font output is currently underline.
    Returns:
    +True or False state of underline.
    -

    +

    - + @@ -655,17 +668,17 @@ Check if font output is currently underline.
    Returns:

    -Check font height as reported by SDL_ttf.

    Returns:
    Height of font.
    - +Check font height as reported by SDL_ttf.
    Returns:
    +Height of font.
    int ZE::ZFont::GetHeight int ZE::ZFont::Height  
    -

    +

    - + @@ -684,17 +697,17 @@ Check font height as reported by SDL_ttf.
    Returns:

    -Check font line skip as reported by SDL_ttf.

    Returns:
    Recommended Line Skip of font.
    - +Check font line skip as reported by SDL_ttf.
    Returns:
    +Recommended Line Skip of font.
    int ZE::ZFont::GetLineSkip int ZE::ZFont::LineSkip  
    -

    +

    +Get Width of String in Current Font in Pixels.
    Parameters:
    +
    - + @@ -714,22 +727,22 @@ Check font line skip as reported by SDL_ttf.
    Returns:

    -Get Width of String in Current Font in Pixels.

    Parameters:
    -
    int ZE::ZFont::GetStringWidth int ZE::ZFont::StringWidth string    text
    - -
    text String to get width of.
    - -
    Returns:
    Width of String in Current font.
    -
    + +
    text  +String to get width of.
    +

    Returns:
    +Width of String in Current font.
    -

    +

    +Get Height of String in Current Font in Pixels.
    Parameters:
    +
    - + @@ -749,20 +762,20 @@ Get Width of String in Current Font in Pixels.
    Parameters:

    -Get Height of String in Current Font in Pixels.

    Parameters:
    -
    int ZE::ZFont::GetStringHeight int ZE::ZFont::StringHeight string    text
    - -
    text String to get height of.
    - -
    Returns:
    Height of String in Current font.
    -
    + +
    text  +String to get height of.
    +

    Returns:
    +Height of String in Current font.


    The documentation for this class was generated from the following file: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZFont.h +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZImage-members.html b/doc/html/classZE_1_1ZImage-members.html index 393fafa..cc0451a 100644 --- a/doc/html/classZE_1_1ZImage-members.html +++ b/doc/html/classZE_1_1ZImage-members.html @@ -3,24 +3,28 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZImage Member List

    This is the complete list of members for ZE::ZImage, including all inherited members. - - - - - + + + - - - + + + + + + + + + @@ -28,9 +32,9 @@ -
    Attach(SDL_Surface *surface)ZE::ZImage
    Draw(Sint16 x, Sint16 y)ZE::ZImage
    GetFilename()ZE::ZImage
    GetHeight()ZE::ZImage
    GetImage()ZE::ZImage
    GetWidth()ZE::ZImage
    Bind()ZE::ZImage
    Draw(int x, int y)ZE::ZImage
    Height()ZE::ZImage
    IsLoaded()ZE::ZImage
    Open(string filename)ZE::ZImage
    OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h)ZE::ZImage
    Release()ZE::ZImage
    rEngineZE::ZObject [protected]
    rImageZE::ZImage [protected]
    SetAlpha(Uint8 alpha)ZE::ZImage
    SetColorKey(Uint32 color)ZE::ZImage
    rHeightZE::ZImage [protected]
    rImageZE::ZImage [protected]
    rTexIDZE::ZImage [protected]
    rTexMaxXZE::ZImage [protected]
    rTexMaxYZE::ZImage [protected]
    rWidthZE::ZImage [protected]
    SetColorKey(Uint8 red, Uint8 green, Uint8 blue)ZE::ZImage
    Surface()ZE::ZImage
    Width()ZE::ZImage
    ZImage()ZE::ZImage
    ZImage(string filename)ZE::ZImage
    ZImage(SDL_Surface *surface)ZE::ZImage
    ZObject()ZE::ZObject [inline]
    ~ZImage()ZE::ZImage
    ~ZObject()ZE::ZObject [inline, virtual]

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/classZE_1_1ZImage.html b/doc/html/classZE_1_1ZImage.html index f0f44db..a692e31 100644 --- a/doc/html/classZE_1_1ZImage.html +++ b/doc/html/classZE_1_1ZImage.html @@ -3,7 +3,7 @@ ZE::ZImage class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZImage Class Reference

    #include <ZE_ZImage.h> @@ -34,26 +34,39 @@ Inherits ZE::ZObject.  Attach an existing surface to class.

    void Release ()  Releases image.

    -void SetAlpha (Uint8 alpha) - Sets Alpha (transparency) value of Image.

    -void SetColorKey (Uint32 color) - Set Color Key (transparent color) of Image.

    -void Draw (Sint16 x, Sint16 y) +void SetColorKey (Uint8 red, Uint8 green, Uint8 blue) + Set Color Key (transparent color) of Image.

    +void Bind () + OpenGL related bind call.

    +void Draw (int x, int y)  Draw Image to Screen.

    bool IsLoaded ()  Check if file is loaded.

    -SDL_Surface * GetImage () +SDL_Surface * Surface ()  Get SDL_Surface. Get SDL_Surface pointer to actual image data.

    -int GetWidth () +int Width ()  Get Width.

    -int GetHeight () +int Height ()  Get Height.

    -string GetFilename () - Get filename of image.


    Protected Attributes

    - -ImageData rImageClass containing image and filename.

    + +GLfloat rTexMaxXTexture X width ratio, used internally by OpenGL.

    + +GLfloat rTexMaxYTexture Y width ratio, used internally by OpenGL.

    + +SDL_Surface * rImageStored texture for future use.

    + +unsigned int rTexIDTexture ID for OpenGL.

    + +unsigned int rWidthCurrent draw width of Texture.

    + +unsigned int rHeightCurrent draw height of Texture.


    Constructor & Destructor Documentation

    @@ -81,7 +94,7 @@ Inherits ZE::ZObject.

    -Default Constructor, does nothing. +Default Constructor, initializes variables.

    @@ -110,12 +123,12 @@ Default Constructor, does nothing.

    -Constructor is same as calling ZImage::Open() on passed filename.

    Parameters:
    - - -
    filename File to open as rImage.
    -
    - +Constructor is same as calling ZImage::Open() on passed filename.
    Parameters:
    + + +
    filename  +File to open as rImage.
    +

    @@ -144,12 +157,12 @@ Constructor is same as calling ZI

    -Constructor is same as calling ZImage::Attach() on passed SDL_Surface*.

    Parameters:
    - - -
    surface SDL_Surface* to use as rImage.
    -
    - +Constructor is same as calling ZImage::Attach() on passed SDL_Surface*.
    Parameters:
    + + +
    surface  +SDL_Surface* to use as rImage.
    +

    @@ -205,18 +218,20 @@ Constructor is same as calling ZI

    -Constructor is same as calling ZImage::OpenFromImage. -

    -

    Parameters:
    - - - - - - -
    img Image to take new image from.
    x X Coordinate in source of top left corner.
    y Y Coordinate in source of top left corner.
    w Width of new image.
    h Height of new image.
    -
    - +Constructor is same as calling ZImage::OpenFromImage.
    Parameters:
    + + + + + + +
    img  +Image to take new image from.
    x  +X Coordinate in source of top left corner.
    y  +Y Coordinate in source of top left corner.
    w  +Width of new image.
    h  +Height of new image.
    +

    @@ -274,12 +289,12 @@ Destructor calls ZImage::Release(

    -Open a file using ZEngine. Loads into rImage member of class.

    Parameters:
    - - -
    filename File to open as rImage.
    -
    - +Open a file using ZEngine. Loads into rImage member of class.
    Parameters:
    + + +
    filename  +File to open as rImage.
    +

    @@ -335,18 +350,20 @@ Open a file using ZEngine. Load

    -Cut part of an SDL_Surface to create a new Image. -

    -

    Parameters:
    - - - - - - -
    img Image to take new image from.
    x X Coordinate in source of top left corner.
    y Y Coordinate in source of top left corner.
    w Width of new image.
    h Height of new image.
    -
    - +Cut part of an SDL_Surface to create a new Image.
    Parameters:
    + + + + + + +
    img  +Image to take new image from.
    x  +X Coordinate in source of top left corner.
    y  +Y Coordinate in source of top left corner.
    w  +Width of new image.
    h  +Height of new image.
    +

    @@ -375,12 +392,12 @@ Cut part of an SDL_Surface to create a new Image.

    -Attach a pointer to instance of ZImage. (NOTE: Should not be used on a surface that is owned elsewhere.)

    Parameters:
    - - -
    surface SDL_Surface* to use as rImage.
    -
    - +Attach a pointer to instance of ZImage. (NOTE: Should not be used on a surface that is owned elsewhere.)
    Parameters:
    + + +
    surface  +SDL_Surface* to use as rImage.
    +

    @@ -411,41 +428,7 @@ Attach a pointer to instance of ZIma Frees memory via call to SDL_FreeSurface for the image. -

    - - - - -
    - - - - - - - - - - -
    void ZE::ZImage::SetAlpha Uint8   alpha
    -
    - - - - - -
    -   - - -

    -Set Alpha channel of an Image, only used in 32 bit mode.

    Parameters:
    - - -
    alpha Number 0-255 describing translucency of image. (0 = transparent, 255 = opaque)
    -
    -
    -

    +

    - - + + + + + + + + + + + + + + + + + + + + + +
    @@ -453,8 +436,60 @@ Set Alpha channel of an Image, only used in 32 bit mode.
    Para
    void ZE::ZImage::SetColorKey Uint32   color Uint8   red,
    Uint8   green,
    Uint8   blue
    + + + + + + + + +
    +   + + +

    +Set color which will not be drawn in image.

    Parameters:
    + + + + +
    red  +Red component of colorkey (0-255).
    green  +Green component of colorkey (0-255).
    blue  +Blue component of colorkey (0-255).
    +
    +

    + + + - + - + @@ -514,13 +544,14 @@ Set color which will not be drawn in image.
    Parameters:

    -Draw Image to screen at specified location.

    Parameters:
    -
    + + + + + @@ -471,12 +506,7 @@ Set Alpha channel of an Image, only used in 32 bit mode.
    Para
    +OpenGL related bind call, only available in case you want to bind image in 3D. Draw uses this but the average user should never need to call this.
    void ZE::ZImage::Bind  

    -Set color which will not be drawn in image.

    Parameters:
    - - -
    color Uint32 color describing color to use as transparent.
    -
    -

    @@ -487,13 +517,13 @@ Set color which will not be drawn in image.

    Parameters:
    void ZE::ZImage::Draw Sint16 int    x,
    Sint16 int    y
    - - -
    x X coord to draw Image to.
    y Y coord to draw Image to.
    -

    - +Draw Image to screen at specified location.
    Parameters:
    + + + +
    x  +X coord to draw Image to.
    y  +Y coord to draw Image to.
    +

    @@ -548,17 +579,17 @@ Draw Image to screen at specified location.

    Parameters:

    -Check if file is loaded and pointer to data is non-NULL.

    Returns:
    Loaded or Unloaded state of data.
    - +Check if file is loaded and pointer to data is non-NULL.
    Returns:
    +Loaded or Unloaded state of data.
    -

    +

    +Constructor simply calls ZMusic::Open() with same filename. (WAV,MOD,MID,OGG)
    Parameters:
    +
    - + @@ -577,17 +608,17 @@ Check if file is loaded and pointer to data is non-NULL.
    Retu
    +
    Returns:
    +SDL_Surface* of rImage.
    SDL_Surface * ZE::ZImage::GetImage SDL_Surface * ZE::ZImage::Surface  

    -

    Returns:
    SDL_Surface* of rImage.
    -
    -

    +

    - + - +Mix_Music *  +
    - + @@ -606,17 +637,17 @@ Check if file is loaded and pointer to data is non-NULL.
    Retu
    +Get Current Width of Image.
    Returns:
    +Image Width.
    int ZE::ZImage::GetWidth int ZE::ZImage::Width  

    -Get Width of Image.

    Returns:
    Image Width.
    -
    -

    +

    - + @@ -635,44 +666,15 @@ Get Width of Image.
    Returns:
    Image Width.

    -Get Height of Image.

    Returns:
    Image Height.
    - -
    -
    int ZE::ZImage::GetHeight int ZE::ZImage::Height  
    -

    - - - - -
    - - - - - - - - - -
    string ZE::ZImage::GetFilename  
    -
    - - - - +Get Current Height of Image.
    Returns:
    +Image Height.
    -   - - -

    -Get filename of image or if Image doesn't have a specific filename string describing origin of image.

    Returns:
    Image Filename.
    -


    The documentation for this class was generated from the following files: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZImage.h
  • /src/ZE_ZImage.cpp +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZMusic-members.html b/doc/html/classZE_1_1ZMusic-members.html index 752e0fb..1c9eeba 100644 --- a/doc/html/classZE_1_1ZMusic-members.html +++ b/doc/html/classZE_1_1ZMusic-members.html @@ -3,11 +3,10 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZMusic Member List

    This is the complete list of members for ZE::ZMusic, including all inherited members. - @@ -22,14 +21,15 @@ + -
    GetVolume()ZE::ZMusic
    IsLoaded()ZE::ZMusic
    IsPaused()ZE::ZMusic
    IsPlaying()ZE::ZMusic
    SetVolume(int volume)ZE::ZMusic
    Stop(int fadeTime=0)ZE::ZMusic
    Unpause()ZE::ZMusic
    Volume()ZE::ZMusic
    ZMusic()ZE::ZMusic
    ZMusic(string filename)ZE::ZMusic
    ZObject()ZE::ZObject [inline]
    ~ZMusic()ZE::ZMusic
    ~ZObject()ZE::ZObject [inline, virtual]

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +


    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18 diff --git a/doc/html/classZE_1_1ZMusic.html b/doc/html/classZE_1_1ZMusic.html index df80789..e092085 100644 --- a/doc/html/classZE_1_1ZMusic.html +++ b/doc/html/classZE_1_1ZMusic.html @@ -3,7 +3,7 @@ ZE::ZMusic class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZMusic Class Reference

    #include <ZE_ZMusic.h> @@ -44,7 +44,7 @@ Inherits ZE::ZObject.
     Check if music is Playing.

    bool IsPaused ()
     Check if music is Paused.

    int GetVolume ()
    int Volume ()
     Find Current Volume of Music.


    Static Public Attributes

    @@ -52,8 +52,8 @@ const int  -MusicData rMusic
     Class containing music data and music filename.

    rMusic
     Pointer to music data.


    Constructor & Destructor Documentation

    @@ -110,12 +110,12 @@ Default Constructor, does nothing.

    -Constructor simply calls ZMusic::Open() with same filename. (WAV,MOD,MID,OGG)

    Parameters:
    - - -
    filename Music to open.
    -
    -
    + +
    filename  +Music to open.
    +

    @@ -173,12 +173,12 @@ Destructor calls ZMusic::Release(

    -Open a music file to be used.

    Parameters:
    - - -
    filename Music to open.
    -
    - +Open a music file to be used.
    Parameters:
    + + +
    filename  +Music to open.
    +

    @@ -244,13 +244,14 @@ Release memory held by music data.

    -Play music currently loaded in ZMusic, looping loopNum times. (use ZMusic::LoopInfinite to loop forever.) If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds.

    Parameters:
    - - - -
    loopNum Number of times to loop song, defaults to zero.
    fadeTime Milliseconds to fade to full volume, defaults to zero for no fade.
    -
    - +Play music currently loaded in ZMusic, looping loopNum times. (use ZMusic::LoopInfinite to loop forever.) If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds.
    Parameters:
    + + + +
    loopNum  +Number of times to loop song, defaults to zero.
    fadeTime  +Milliseconds to fade to full volume, defaults to zero for no fade.
    +

    @@ -363,12 +364,12 @@ Rewind music to beginning.

    -Stop currently playing music, if fadeTime is not zero, fade out over specified time.

    Parameters:
    - - -
    fadeTime Milliseconds to fade out over, defaults to zero for immediate stop.
    -
    - +Stop currently playing music, if fadeTime is not zero, fade out over specified time.
    Parameters:
    + + +
    fadeTime  +Milliseconds to fade out over, defaults to zero for immediate stop.
    +

    @@ -397,12 +398,12 @@ Stop currently playing music, if fadeTime is not zero, fade out over specified t

    -Change volume of currently playing music.

    Parameters:
    - - -
    volume Volume to change to, can be in a range from 0 to 128
    -
    - +Change volume of currently playing music.
    Parameters:
    + + +
    volume  +Volume to change to, can be in a range from 0 to 128
    +

    @@ -430,8 +431,8 @@ Change volume of currently playing music.

    Parameters:

    -Check if file is loaded and pointer to data is non-NULL.

    Returns:
    Loaded or Unloaded state of data.
    - +Check if file is loaded and pointer to data is non-NULL.
    Returns:
    +Loaded or Unloaded state of data.

    @@ -459,8 +460,8 @@ Check if file is loaded and pointer to data is non-NULL.

    Retu

    -Check if music is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused)

    Returns:
    Playing / Not Playing State of Music.
    - +Check if music is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused)
    Returns:
    +Playing / Not Playing State of Music.

    @@ -488,17 +489,17 @@ Check if music is playing, specifically if it is not stopped. (Paused state shou

    -Check if music is "playing" but currently paused.

    Returns:
    Paused / Not Paused State of Music.
    - +Check if music is "playing" but currently paused.
    Returns:
    +Paused / Not Paused State of Music.
    -

    +

    - + @@ -517,15 +518,15 @@ Check if music is "playing" but currently paused.
    Returns:

    -Get current volume of music represented as a value from 0-128.

    Returns:
    Volume of music, 0-128.
    - +Get current volume of music represented as a value from 0-128.
    Returns:
    +Volume of music, 0-128.
    int ZE::ZMusic::GetVolume int ZE::ZMusic::Volume  

    The documentation for this class was generated from the following file: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZMusic.h +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZObject-members.html b/doc/html/classZE_1_1ZObject-members.html index a10b432..b05f9f8 100644 --- a/doc/html/classZE_1_1ZObject-members.html +++ b/doc/html/classZE_1_1ZObject-members.html @@ -3,16 +3,16 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZObject Member List

    This is the complete list of members for ZE::ZObject, including all inherited members. -
    rEngineZE::ZObject [protected]
    ZObject()ZE::ZObject [inline]
    ~ZObject()ZE::ZObject [inline, virtual]

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +


    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18 diff --git a/doc/html/classZE_1_1ZObject.html b/doc/html/classZE_1_1ZObject.html index 848fc69..ba3c4df 100644 --- a/doc/html/classZE_1_1ZObject.html +++ b/doc/html/classZE_1_1ZObject.html @@ -3,7 +3,7 @@ ZE::ZObject class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZObject Class Reference

    #include <ZE_ZObject.h> @@ -83,10 +83,10 @@ This is the base class from which all ZE_ZObject.h -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZObject.h +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZRect-members.html b/doc/html/classZE_1_1ZRect-members.html index 1e9c938..8d31bd8 100644 --- a/doc/html/classZE_1_1ZRect-members.html +++ b/doc/html/classZE_1_1ZRect-members.html @@ -3,7 +3,7 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZRect Member List

    This is the complete list of members for ZE::ZRect, including all inherited members. @@ -33,9 +33,9 @@ -
    ZRect()ZE::ZRect
    ZRect(int x, int y, int width, int height)ZE::ZRect
    ZRect(const ZRect &rhs)ZE::ZRect

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/classZE_1_1ZRect.html b/doc/html/classZE_1_1ZRect.html index d3baaed..b3fe5f9 100644 --- a/doc/html/classZE_1_1ZRect.html +++ b/doc/html/classZE_1_1ZRect.html @@ -3,7 +3,7 @@ ZE::ZRect class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZRect Class Reference

    #include <ZE_ZRect.h> @@ -148,15 +148,18 @@ Default constructor, initializes all values to zero.

    -Constructor for ZRect that takes inital values for all four members.

    Parameters:
    - - - - - -
    x Value for x position.
    y Value for y position.
    width Value for width.
    height Value for height.
    -
    - +Constructor for ZRect that takes inital values for all four members.
    Parameters:
    + + + + + +
    x  +Value for x position.
    y  +Value for y position.
    width  +Value for width.
    height  +Value for height.
    +

    @@ -185,12 +188,12 @@ Constructor for ZRect that takes

    -Takes a ZRect and constructs a new identical rectangle.

    Parameters:
    - - -
    rhs Rectangle to construct from.
    -
    - +Takes a ZRect and constructs a new identical rectangle.
    Parameters:
    + + +
    rhs  +Rectangle to construct from.
    +

    Member Function Documentation

    @@ -220,13 +223,13 @@ Takes a ZRect and constructs a ne

    -Copies all values from one ZRect into another.

    Parameters:
    - - -
    rhs Rectangle to copy values from.
    -
    -
    Returns:
    New value of the ZRect.
    - +Copies all values from one ZRect into another.
    Parameters:
    + + +
    rhs  +Rectangle to copy values from.
    +
    Returns:
    +New value of the ZRect.

    @@ -255,13 +258,13 @@ Copies all values from one ZRect

    -Rectangles are sorted by y value, followed by x value, if they start at the same place, the smaller of the two is deemed less than the other.

    Parameters:
    - - -
    rhs Rectangle to compare.
    -
    -
    Returns:
    True if this rectangle is smaller than the rhs rectangle, false otherwise.
    - +Rectangles are sorted by y value, followed by x value, if they start at the same place, the smaller of the two is deemed less than the other.
    Parameters:
    + + +
    rhs  +Rectangle to compare.
    +
    Returns:
    +True if this rectangle is smaller than the rhs rectangle, false otherwise.

    @@ -299,13 +302,14 @@ Rectangles are sorted by y value, followed by x value, if they start at the same

    -Changes the current x,y position of the rectangle.

    Parameters:
    - - - -
    x New x position for rectangle.
    y New y position for rectangle.
    -
    - +Changes the current x,y position of the rectangle.
    Parameters:
    + + + +
    x  +New x position for rectangle.
    y  +New y position for rectangle.
    +

    @@ -343,13 +347,14 @@ Changes the current x,y position of the rectangle.

    Parameters

    -Changes the current x,y position of the rectangle relative to the current location.

    Parameters:
    - - - -
    xMove Offset for new x position from current.
    yMove Offset for new y position from current.
    -
    - +Changes the current x,y position of the rectangle relative to the current location.
    Parameters:
    + + + +
    xMove  +Offset for new x position from current.
    yMove  +Offset for new y position from current.
    +

    @@ -387,13 +392,14 @@ Changes the current x,y position of the rectangle relative to the current locati

    -Changes the current width and height of the rectangle.

    Parameters:
    - - - -
    width New width for rectangle.
    height New height for rectangle.
    -
    - +Changes the current width and height of the rectangle.
    Parameters:
    + + + +
    width  +New width for rectangle.
    height  +New height for rectangle.
    +

    @@ -431,13 +437,14 @@ Changes the current width and height of the rectangle.

    Parame

    -Changes the current width and height of the rectangle based upon current values.

    Parameters:
    - - - -
    widthChange Amount to add or subtract from width.
    heightChange Amount to add or subtract from height.
    -
    - +Changes the current width and height of the rectangle based upon current values.
    Parameters:
    + + + +
    widthChange  +Amount to add or subtract from width.
    heightChange  +Amount to add or subtract from height.
    +

    @@ -466,13 +473,13 @@ Changes the current width and height of the rectangle based upon current values.

    -Checks for overlap and returns boolean value based on if overlap exists.

    Parameters:
    - - -
    rect Rectangle to check for intersection with.
    -
    -
    Returns:
    True if intersection occured, false otherwise.
    - +Checks for overlap and returns boolean value based on if overlap exists.
    Parameters:
    + + +
    rect  +Rectangle to check for intersection with.
    +
    Returns:
    +True if intersection occured, false otherwise.

    @@ -510,14 +517,15 @@ Checks for overlap and returns boolean value based on if overlap exists.

    -Checks point against boundaries of rectangle and returns result.

    Parameters:
    - - - -
    x X value of point to check.
    y Y value of poitn to check.
    -
    -
    Returns:
    Boolean variable, true if point is inside rectangle, false otherwise.
    - +Checks point against boundaries of rectangle and returns result.
    Parameters:
    + + + +
    x  +X value of point to check.
    y  +Y value of poitn to check.
    +
    Returns:
    +Boolean variable, true if point is inside rectangle, false otherwise.

    @@ -546,13 +554,13 @@ Checks point against boundaries of rectangle and returns result.

    -Checks point against boundaries of rectangle and returns result.

    Parameters:
    - - -
    rect Rectangle to check for point.
    -
    -
    Returns:
    Boolean variable, true if point is inside rectangle, false otherwise.
    - +Checks point against boundaries of rectangle and returns result.
    Parameters:
    + + +
    rect  +Rectangle to check for point.
    +
    Returns:
    +Boolean variable, true if point is inside rectangle, false otherwise.

    @@ -581,13 +589,13 @@ Checks point against boundaries of rectangle and returns result.

    -Checks for intersection, and returns rectangle where the two rectangles intersect.

    Parameters:
    - - -
    rect Rectangle to check intersection with.
    -
    -
    Returns:
    ZRect describing intersection area.
    - +Checks for intersection, and returns rectangle where the two rectangles intersect.
    Parameters:
    + + +
    rect  +Rectangle to check intersection with.
    +
    Returns:
    +ZRect describing intersection area.

    @@ -600,7 +608,7 @@ Checks for intersection, and returns rectangle where the two rectangles intersec (    )  - const + @@ -615,8 +623,8 @@ Checks for intersection, and returns rectangle where the two rectangles intersec

    -Makes a SDL_Rect representing the rectangle, for use where functions require an SDL_Rect.

    Returns:
    SDL_Rect representing the ZRect.
    - +Makes a SDL_Rect representing the rectangle, for use where functions require an SDL_Rect.
    Returns:
    +SDL_Rect representing the ZRect.

    @@ -629,7 +637,7 @@ Makes a SDL_Rect representing the rectangle, for use where functions require an (    )  - const + @@ -644,8 +652,8 @@ Makes a SDL_Rect representing the rectangle, for use where functions require an

    -Access private X location member.

    Returns:
    Value of mX.
    - +Access private X location member.
    Returns:
    +Value of mX.

    @@ -658,7 +666,7 @@ Access private X location member.

    Returns:
    Value (    )  - const + @@ -673,8 +681,8 @@ Access private X location member.
    Returns:
    Value

    -Access private Y location member.

    Returns:
    Value of mY.
    - +Access private Y location member.
    Returns:
    +Value of mY.

    @@ -687,7 +695,7 @@ Access private Y location member.

    Returns:
    Value (    )  - const + @@ -702,8 +710,8 @@ Access private Y location member.
    Returns:
    Value

    -Find X position of left side of rectangle.

    Returns:
    X position of left side.
    - +Find X position of left side of rectangle.
    Returns:
    +X position of left side.

    @@ -716,7 +724,7 @@ Find X position of left side of rectangle.

    Returns:
    < (    )  - const + @@ -731,8 +739,8 @@ Find X position of left side of rectangle.
    Returns:
    <

    -Find X position of right side of rectangle.

    Returns:
    X position of right side.
    - +Find X position of right side of rectangle.
    Returns:
    +X position of right side.

    @@ -745,7 +753,7 @@ Find X position of right side of rectangle.

    Returns:
    (    )  - const + @@ -760,8 +768,8 @@ Find X position of right side of rectangle.
    Returns:

    -Find Y position of top side of rectangle.

    Returns:
    Y position of top side.
    - +Find Y position of top side of rectangle.
    Returns:
    +Y position of top side.

    @@ -774,7 +782,7 @@ Find Y position of top side of rectangle.

    Returns:
    (    )  - const + @@ -789,8 +797,8 @@ Find Y position of top side of rectangle.
    Returns:

    -Find Y position of left side of rectangle.

    Returns:
    Y position of bottom side.
    - +Find Y position of left side of rectangle.
    Returns:
    +Y position of bottom side.

    @@ -803,7 +811,7 @@ Find Y position of left side of rectangle.

    Returns:
    < (    )  - const + @@ -818,8 +826,8 @@ Find Y position of left side of rectangle.
    Returns:
    <

    -Access private width member.

    Returns:
    Value of mWidth.
    - +Access private width member.
    Returns:
    +Value of mWidth.

    @@ -832,7 +840,7 @@ Access private width member.

    Returns:
    Value of mW (    )  - const + @@ -847,15 +855,15 @@ Access private width member.
    Returns:
    Value of mW

    -Access private height member.

    Returns:
    Value of mHeight.
    - +Access private height member.
    Returns:
    +Value of mHeight.

    The documentation for this class was generated from the following files: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZRect.h
  • /src/ZE_ZRect.cpp +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZSound-members.html b/doc/html/classZE_1_1ZSound-members.html index 3715fb1..3f5ca5d 100644 --- a/doc/html/classZE_1_1ZSound-members.html +++ b/doc/html/classZE_1_1ZSound-members.html @@ -3,11 +3,10 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZSound Member List

    This is the complete list of members for ZE::ZSound, including all inherited members. - @@ -22,14 +21,15 @@ + -
    GetVolume()ZE::ZSound
    IsLoaded()ZE::ZSound
    IsPaused()ZE::ZSound
    IsPlaying()ZE::ZSound
    SetVolume(int volume)ZE::ZSound
    Stop(int fadeTime=0)ZE::ZSound
    Unpause()ZE::ZSound
    Volume()ZE::ZSound
    ZObject()ZE::ZObject [inline]
    ZSound()ZE::ZSound
    ZSound(string filename)ZE::ZSound
    ~ZObject()ZE::ZObject [inline, virtual]
    ~ZSound()ZE::ZSound

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/classZE_1_1ZSound.html b/doc/html/classZE_1_1ZSound.html index afc5287..a662ef8 100644 --- a/doc/html/classZE_1_1ZSound.html +++ b/doc/html/classZE_1_1ZSound.html @@ -3,7 +3,7 @@ ZE::ZSound class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZSound Class Reference

    #include <ZE_ZSound.h> @@ -42,7 +42,7 @@ Inherits ZE::ZObject.  Check if sound is Playing.

    bool IsPaused ()  Check if sound is Paused.

    -int GetVolume () +int Volume ()  Find Current Volume of Sound Channel.


    Static Public Attributes

    @@ -50,8 +50,8 @@ const int  -SoundData rSoundClass containing music data and music filename.

    +Mix_Chunk * rSoundPointer to music data.

    int rChannelID  Channel ID Number from SDL_Mixer.

    @@ -111,12 +111,12 @@ Default Constructor, does nothing.

    -Constructor simply calls ZSound::Open() with same filename. (WAV,MOD,MID,OGG)

    Parameters:
    - - -
    filename Sound effect to open.
    -
    - +Constructor simply calls ZSound::Open() with same filename. (WAV,MOD,MID,OGG)
    Parameters:
    + + +
    filename  +Sound effect to open.
    +

    @@ -174,12 +174,12 @@ Destructor calls ZSound::Release(

    -Open a music file to be used.

    Parameters:
    - - -
    filename Music to open.
    -
    - +Open a music file to be used.
    Parameters:
    + + +
    filename  +Music to open.
    +

    @@ -245,13 +245,14 @@ Release memory held by sample data.

    -Play sound effect, looping loopNum times. (use ZSound::LoopInfinite to loop forever.) If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds.

    Parameters:
    - - - -
    loopNum Number of times to loop song, defaults to zero.
    fadeTime Milliseconds to fade to full volume, defaults to zero for no fade.
    -
    - +Play sound effect, looping loopNum times. (use ZSound::LoopInfinite to loop forever.) If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds.
    Parameters:
    + + + +
    loopNum  +Number of times to loop song, defaults to zero.
    fadeTime  +Milliseconds to fade to full volume, defaults to zero for no fade.
    +

    @@ -336,12 +337,12 @@ Unpause currently playing sound.

    -Stop currently playing sound, if fadeTime is not zero, fade out over specified time.

    Parameters:
    - - -
    fadeTime Milliseconds to fade out over, defaults to zero for immediate stop.
    -
    - +Stop currently playing sound, if fadeTime is not zero, fade out over specified time.
    Parameters:
    + + +
    fadeTime  +Milliseconds to fade out over, defaults to zero for immediate stop.
    +

    @@ -370,12 +371,12 @@ Stop currently playing sound, if fadeTime is not zero, fade out over specified t

    -Change volume of currently playing sample.

    Parameters:
    - - -
    volume Volume to change to, can be in a range from 0 to 128.
    -
    - +Change volume of currently playing sample.
    Parameters:
    + + +
    volume  +Volume to change to, can be in a range from 0 to 128.
    +

    @@ -403,8 +404,8 @@ Change volume of currently playing sample.

    Parameters:

    -Check if file is loaded and pointer to data is non-NULL.

    Returns:
    Loaded or Unloaded state of data.
    - +Check if file is loaded and pointer to data is non-NULL.
    Returns:
    +Loaded or Unloaded state of data.

    @@ -432,8 +433,8 @@ Check if file is loaded and pointer to data is non-NULL.

    Retu

    -Check if sound is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused)

    Returns:
    Playing / Not Playing State of sound.
    - +Check if sound is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused)
    Returns:
    +Playing / Not Playing State of sound.

    @@ -461,17 +462,17 @@ Check if sound is playing, specifically if it is not stopped. (Paused state shou

    -Check if sound is "playing" but currently paused.

    Returns:
    Paused / Not Paused State of Sound.
    - +Check if sound is "playing" but currently paused.
    Returns:
    +Paused / Not Paused State of Sound.
    -

    +

    - + @@ -490,15 +491,15 @@ Check if sound is "playing" but currently paused.
    Returns:

    -Get current volume of sound channel represented as a value from 0-128.

    Returns:
    Volume of sound channel, 0-128.
    - +Get current volume of sound channel represented as a value from 0-128.
    Returns:
    +Volume of sound channel, 0-128.
    int ZE::ZSound::GetVolume int ZE::ZSound::Volume  

    The documentation for this class was generated from the following file: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZSound.h +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/classZE_1_1ZTimer-members.html b/doc/html/classZE_1_1ZTimer-members.html index 572d972..e7ac6f6 100644 --- a/doc/html/classZE_1_1ZTimer-members.html +++ b/doc/html/classZE_1_1ZTimer-members.html @@ -3,7 +3,7 @@ Member List - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZTimer Member List

    This is the complete list of members for ZE::ZTimer, including all inherited members. @@ -21,9 +21,9 @@ -
    ZObject()ZE::ZObject [inline]
    ZTimer(bool useZEngine=true)ZE::ZTimer
    ~ZObject()ZE::ZObject [inline, virtual]

    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +


    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18 diff --git a/doc/html/classZE_1_1ZTimer.html b/doc/html/classZE_1_1ZTimer.html index a73e213..282f10a 100644 --- a/doc/html/classZE_1_1ZTimer.html +++ b/doc/html/classZE_1_1ZTimer.html @@ -3,7 +3,7 @@ ZE::ZTimer class Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE::ZTimer Class Reference

    #include <ZE_ZTimer.h> @@ -72,12 +72,12 @@ Uint32 ZEngine time if useZEngine is true, otherwise uses SDL timer.
    Parameters:
    - - -
    useZEngine Tells if timer should use ZEngine or SDL.
    -
    - +Sets TimePaused to current ZEngine time if useZEngine is true, otherwise uses SDL timer.
    Parameters:
    + + +
    useZEngine  +Tells if timer should use ZEngine or SDL.
    +

    Member Function Documentation

    @@ -106,8 +106,8 @@ Sets TimePaused to current ZEngine<

    -Protected method to get time from whichever timer is parent.

    Returns:
    Time on parent timer.
    - +Protected method to get time from whichever timer is parent.
    Returns:
    +Time on parent timer.

    @@ -219,8 +219,8 @@ Unpause the timer if it is paused.

    -Get current time accounting for time paused.

    Returns:
    Current Timer Time.
    - +Get current time accounting for time paused.
    Returns:
    +Current Timer Time.

    @@ -248,15 +248,15 @@ Get current time accounting for time paused.

    Returns:

    -Find out paused state of timer.

    Returns:
    Paused state for timer.
    - +Find out paused state of timer.
    Returns:
    +Paused state for timer.

    The documentation for this class was generated from the following files: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
  • /include/ZE_ZTimer.h
  • /src/ZE_ZTimer.cpp +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
  • diff --git a/doc/html/files.html b/doc/html/files.html index 5efc28e..ce28bdd 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -3,38 +3,39 @@ File Index - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine File List

    Here is a list of all documented files with brief descriptions: - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
    /home/James/ZEngine-dev/include/ZE_DataPtr.h [code]Definition file for ZEngine Data/Pointer Classes. ([Image,Font,Sound,Music]Data/Ptr)
    /home/James/ZEngine-dev/include/ZE_Defines.h [code]Define file for ZEngine
    /home/James/ZEngine-dev/include/ZE_Error.h [code]Definition file for ZEngine Error Handling Functions
    /home/James/ZEngine-dev/include/ZE_Includes.h [code]Include file for SDL and C++ Includes that many ZEngine files need
    /home/James/ZEngine-dev/include/ZE_ZConfigFile.h [code]Definition file for ZConfigFile
    /home/James/ZEngine-dev/include/ZE_ZEngine.h [code]Definition file for core ZEngine class
    /home/James/ZEngine-dev/include/ZE_ZFont.h [code]Definition file for ZFont
    /home/James/ZEngine-dev/include/ZE_ZImage.h [code]Definition file for ZImage
    /home/James/ZEngine-dev/include/ZE_ZMusic.h [code]Definition file for ZMusic
    /home/James/ZEngine-dev/include/ZE_ZObject.h [code]Definition file for ZObject Base Class
    /home/James/ZEngine-dev/include/ZE_ZRect.h [code]Definition file for ZRect
    /home/James/ZEngine-dev/include/ZE_ZSound.h [code]Definition file for ZSound
    /home/James/ZEngine-dev/include/ZE_ZTimer.h [code]Definition file for ZTimer
    /home/James/ZEngine-dev/include/ZEngine.h [code]Header file for ZEngine
    /home/James/ZEngine-dev/include/external/physfsrwops.h [code]
    /home/James/ZEngine-dev/src/ZE_Error.cppSource file for error logging utilities
    /home/James/ZEngine-dev/src/ZE_ZConfigFile.cppSource file for ZConfigFile
    /home/James/ZEngine-dev/src/ZE_ZEngine.cppCentral source file for ZEngine
    /home/James/ZEngine-dev/src/ZE_ZFont.cppSource file for ZFont
    /home/James/ZEngine-dev/src/ZE_ZImage.cppSource file for ZImage
    /home/James/ZEngine-dev/src/ZE_ZMusic.cppSource file for ZMusic
    /home/James/ZEngine-dev/src/ZE_ZRect.cppSource file for ZRect
    /home/James/ZEngine-dev/src/ZE_ZSound.cppSource file for ZSound
    /home/James/ZEngine-dev/src/ZE_ZTimer.cppSource file for ZTimer
    /include/ZE_Defines.h [code]Define file for ZEngine
    /include/ZE_Error.h [code]Definition file for ZEngine Error Handling Functions
    /include/ZE_Includes.h [code]Include file for SDL and C++ Includes that many ZEngine files need
    /include/ZE_Macros.h [code]Definition file for ZEngine Macros
    /include/ZE_ZConfigFile.h [code]Definition file for ZConfigFile
    /include/ZE_ZEngine.h [code]Definition file for core ZEngine class
    /include/ZE_ZFont.h [code]Definition file for ZFont
    /include/ZE_ZImage.h [code]Definition file for ZImage
    /include/ZE_ZMusic.h [code]Definition file for ZMusic
    /include/ZE_ZObject.h [code]Definition file for ZObject Base Class
    /include/ZE_ZRect.h [code]Definition file for ZRect
    /include/ZE_ZSound.h [code]Definition file for ZSound
    /include/ZE_ZTimer.h [code]Definition file for ZTimer
    /include/ZEngine.h [code]Header file for ZEngine
    /include/external/physfsrwops.h [code]
    /include/external/SDLGL_Util.h [code]
    /src/ZE_Error.cppSource file for error logging utilities
    /src/ZE_ZConfigFile.cppSource file for ZConfigFile
    /src/ZE_ZEngine.cppCentral source file for ZEngine
    /src/ZE_ZFont.cppSource file for ZFont
    /src/ZE_ZImage.cppSource file for ZImage
    /src/ZE_ZMusic.cppSource file for ZMusic
    /src/ZE_ZRect.cppSource file for ZRect
    /src/ZE_ZSound.cppSource file for ZSound
    /src/ZE_ZTimer.cppSource file for ZTimer
    -
    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/functions.html b/doc/html/functions.html index 1156f14..e27f536 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -3,86 +3,69 @@ Compound Member Index - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine Compound Members

    -a | b | c | d | f | g | h | i | k | l | m | o | p | q | r | s | t | u | w | x | y | z | ~
    +a | b | c | d | f | g | h | i | k | l | m | o | p | q | r | s | t | u | v | w | x | y | z | ~

    -Here is a list of all documented class members with links to the class documentation for each member:

    - a - +Here is a list of all documented class members with links to the classes they belong to:

    - a -

    - b -

    +
  • Bind() +: ZE::ZImage
  • Bottom() +: ZE::ZRect
  • BPP() +: ZE::ZEngine

    - c -

    - d -

    - f -

    +
  • Flush() +: ZE::ZConfigFile

    - g -

    +: ZE::ZEngine

    - h -

    - i -

    - s -

    +: ZE::ZEngine
  • Stop() +: ZE::ZSound, ZE::ZMusic
  • StringHeight() +: ZE::ZFont
  • StringWidth() +: ZE::ZFont
  • Surface() +: ZE::ZImage

    - t -

    +

    - v - +

    - w -

    +: ZE::ZRect, ZE::ZImage, ZE::ZEngine

    - x -

    • X() @@ -240,9 +237,9 @@ Here is a list of all documented class members with links to the class documenta : ZE::ZMusic
    • ~ZObject() : ZE::ZObject
    • ~ZSound() : ZE::ZSound
    -
    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/globals.html b/doc/html/globals.html index 973e73f..4a20652 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -3,7 +3,7 @@ File Member Index - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine File Members

    @@ -32,9 +32,9 @@ Here is a list of all documented file members with links to the documentation: -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html index 231b099..21e9c10 100644 --- a/doc/html/hierarchy.html +++ b/doc/html/hierarchy.html @@ -3,15 +3,13 @@ Hierarchical Index - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine Class Hierarchy

    This inheritance list is sorted roughly, but not completely, alphabetically: -
    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/index.html b/doc/html/index.html index c6154e1..1c46bb6 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,33 +3,36 @@ ZEngine Documentation - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine Documentation

    -

    0.7.0

    Author:
    James Turk
    -
    Version:
    0.7.3
    -
    Date:
    07 November, 2002
    -

    -About ZEngine

    -
    - ZEngine is designed to wrap common interfaces of the SDL API in an Object Oriented manner. It is licensed under the Academic Free License, and anyone is free to suggest or implement changes to be added to the Engine. In addition ZEngine hopes to provide a core engine which can be used to develop a game without having to rewrite large amounts of code.

    -Licensing

    -
    +

    0.7.7

    +

    +

    Author:
    +James Turk
    Version:
    +0.7.7
    Date:
    +1 December, 2002

    About ZEngine +


    + ZEngine is designed to wrap common interfaces of the SDL API in an Object Oriented manner. It is licensed under a very liberal BSD-style license, and anyone is free to suggest or implement changes to be added to the Engine. In addition ZEngine hopes to provide a core engine which can be used to develop a game without having to rewrite large amounts of code. As of version 0.7.7 ZEngine uses OpenGL rather than SDL to do 2D drawing, thus increasing the use of the engine and making the engine much faster in most test cases. +

    +

    Licensing +


    -
              This file is Part of the ZEngine Library for SDL Game Development.
    -                      Copyright (C) 2002 ConceptOfZero.net
    + Copyright (C) 2002 ConceptOfZero.net + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +

    Contributing Authors +

    James Turk james@conceptofzero.net - Core Engine and Classes for Data Types

    -Licensed under the BSD License, see licensing.txt. -

    -The maintainer of this library is James Turk (james.net) and the home of this Library is http://www.conceptofzero.net/

    -Contributing Authors

    -James Turk james@conceptofzero.net - Core Engine and Classes for Data Types
    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/namespaceZE.html b/doc/html/namespaceZE.html index b201f28..943b549 100644 --- a/doc/html/namespaceZE.html +++ b/doc/html/namespaceZE.html @@ -3,31 +3,23 @@ ZE Namespace Reference - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZE Namespace Reference


    Detailed Description

    Namespace for ZEngine classes and utility functions.

    -

    -

    - - - - - - - - - - + + + + @@ -94,15 +86,17 @@ Namespace for ZEngine classes a +Get string describing error given appropriate details.
    Parameters:
    +

    Compounds

    class  ImageData
     Class to wrap SDL_Surface pointers. More...

    class  FontData
     Class to wrap TTF_Font pointers. More...

    class  SoundData
     Class to wrap Mix_Chunk pointers. More...

    class  MusicData
     Class to wrap Mix_Music pointers. More...

    class  ZConfigFile
     ZConfigFile Class for use in ZEngine. More...

    class  ZCF_Variable
    class  ZCF_Section
    class  ZCF_Variable
     ZConfigFile Variable class. More...

    class  ZCF_Section
     ZConfigFile Section class. More...

    class  ZEngine
     Main ZEngine Singleton Class. More...

    class  ZFont

    -Get string describing error given appropriate details.

    Parameters:
    - - - - -
    line Line error occured on.
    file Name of file error occured in.
    str More detail on error.
    -
    -
    Returns:
    String describing error.
    -
    + + + +
    line  +Line error occured on.
    file  +Name of file error occured in.
    str  +More detail on error.
    +

  • Returns:
    +String describing error.

    @@ -146,14 +140,16 @@ Get string describing error given appropriate details.

    Parame

    -Log error to stderr, describing error given appropriate details.

    Parameters:
    - - - - -
    line Line error occured on.
    file Name of file error occured in.
    str More detail on error.
    -
    - +Log error to stderr, describing error given appropriate details.
    Parameters:
    + + + + +
    line  +Line error occured on.
    file  +Name of file error occured in.
    str  +More detail on error.
    +

    @@ -191,19 +187,20 @@ Log error to stderr, describing error given appropriate details.

    -Takes identifiers out of fmtstr and parses them, replacing them with cooresponding values in the variable arguments list. For more detail view documentation.

    Parameters:
    - - - -
    fmtstr defines format of resulting string
    ... variable number of arguments after fmtstr
    -
    -
    Returns:
    string of parsed and combined string
    - +Takes % identifiers out of fmtstr and parses them, replacing them with cooresponding values in the variable arguments list. For more detail view <cstdarg> documentation.
    Parameters:
    + + + +
    fmtstr  +defines format of resulting string
    ...  +variable number of arguments after fmtstr
    +
    Returns:
    +string of parsed and combined string
    -
    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/namespacemembers.html b/doc/html/namespacemembers.html index c9149ec..cedd2d7 100644 --- a/doc/html/namespacemembers.html +++ b/doc/html/namespacemembers.html @@ -3,7 +3,7 @@ Namespace Member Index - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine Namespace Members

    @@ -19,9 +19,9 @@ Here is a list of all documented namespace members with links to the namespaces
    • FormatStr() : ZE
    -
    Generated on Wed Nov 20 01:18:06 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html index 70ec724..4d1b200 100644 --- a/doc/html/namespaces.html +++ b/doc/html/namespaces.html @@ -3,15 +3,15 @@ Namespace Index - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

    ZEngine Namespace List

    Here is a list of all documented namespaces with brief descriptions:
    ZEZEngine Namespace
    -
    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +
    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18
    diff --git a/doc/html/physfsrwops_8h-source.html b/doc/html/physfsrwops_8h-source.html index 74340b6..94ba988 100644 --- a/doc/html/physfsrwops_8h-source.html +++ b/doc/html/physfsrwops_8h-source.html @@ -1,12 +1,12 @@ -/home/James/ZEngine-dev/include/external/physfsrwops.h Source File +/include/external/physfsrwops.h Source File - +
    Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  
    -

    /home/James/ZEngine-dev/include/external/physfsrwops.h

    00001 /*
    +

    /include/external/physfsrwops.h

    00001 /*
     00002  * This code provides a glue layer between PhysicsFS and Simple Directmedia
     00003  *  Layer's (SDL) RWops i/o abstraction.
     00004  *
    @@ -46,9 +46,9 @@
     00078 
     00079 /* end of physfsrwops.h ... */
     00080 
    -

    Generated on Wed Nov 20 01:18:05 2002 for ZEngine by +

    Generated on Sun Dec 1 02:44:14 2002 for ZEngine by doxygen1.3-rc1
    +width=110 height=53>1.2.18 diff --git a/include/ZE_Defines.h b/include/ZE_Defines.h index debc563..85bc7f7 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.2 2002/11/28 23:18:54 cozman Exp $
    +$Id: ZE_Defines.h,v 1.3 2002/12/01 07:56:17 cozman Exp $
    \file ZE_Defines.h \brief Define file for ZEngine. @@ -33,11 +33,9 @@ $Id: ZE_Defines.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    #define USE_SDL_MIXER //! Define to use the Physfs file system. //#define USE_PHYSFS -//! Define to use OpenGL for 2D blits. -#define USE_OPENGL_2D //! Undefine to disable debug streams for Error Handler. #define DEBUG_STREAM //! Version number. -#define VERSION "0.7.3" +#define VERSION "0.7.6" #endif //__ze_defines_h__ diff --git a/include/ZE_Error.h b/include/ZE_Error.h index ec9540f..1a3dd6b 100644 --- a/include/ZE_Error.h +++ b/include/ZE_Error.h @@ -1,81 +1,81 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_Error.h
    -Description: Header file for ZEngine Error Handling Functions.
    -Author(s): James Turk
    -$Id: ZE_Error.h,v 1.1 2002/11/21 05:41:10 cozman Exp $
    - - \file ZE_Error.h - \brief Definition file for ZEngine Error Handling Functions. - - Definition file for ZEngine Error Logging + Formatting functions which are used for internal and external errors. -**/ - -#ifndef __ze_error_h__ -#define __ze_error_h__ - -#include "ZE_Includes.h" - -namespace ZE -{ - - -////////////////////////////// -//Error Logging + Formatting// -////////////////////////////// - -/*! - \brief Error handling Utiltity function. - - Get string describing error given appropriate details. - \param line Line error occured on. - \param file Name of file error occured in. - \param str More detail on error. - \return String describing error. -**/ -string _GetError(int line, string file, string str); - -/*! - \brief Error handling Utiltity function. - - Log error to stderr, describing error given appropriate details. - \param line Line error occured on. - \param file Name of file error occured in. - \param str More detail on error. -**/ -void _LogError(int line, string file, string str); - -/*! - \brief Parses a string and interprets variable arguments, similar to sprintf. - - Takes % identifiers out of fmtstr and parses them, replacing them with cooresponding values - in the variable arguments list. For more detail view documentation. - \param fmtstr defines format of resulting string - \param ... variable number of arguments after fmtstr - \return string of parsed and combined string -**/ -string FormatStr(const char *fmtstr, ...); - -/*! - Creates a string about an error, telling what file it occured in and where, and gives a user defined string as well. -**/ -#define GetError(str) _GetError(__LINE__,__FILE__,str) - -/*! - Logs a string about an error, telling what file it occured in and where, and gives a user defined string as well. -**/ -#define LogError(str) _LogError(__LINE__,__FILE__,str) - -} - -#endif //__ze_error_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_Error.h
    +Description: Header file for ZEngine Error Handling Functions.
    +Author(s): James Turk
    +$Id: ZE_Error.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_Error.h + \brief Definition file for ZEngine Error Handling Functions. + + Definition file for ZEngine Error Logging + Formatting functions which are used for internal and external errors. +**/ + +#ifndef __ze_error_h__ +#define __ze_error_h__ + +#include "ZE_Includes.h" + +namespace ZE +{ + + +////////////////////////////// +//Error Logging + Formatting// +////////////////////////////// + +/*! + \brief Error handling Utiltity function. + + Get string describing error given appropriate details. + \param line Line error occured on. + \param file Name of file error occured in. + \param str More detail on error. + \return String describing error. +**/ +string _GetError(int line, string file, string str); + +/*! + \brief Error handling Utiltity function. + + Log error to stderr, describing error given appropriate details. + \param line Line error occured on. + \param file Name of file error occured in. + \param str More detail on error. +**/ +void _LogError(int line, string file, string str); + +/*! + \brief Parses a string and interprets variable arguments, similar to sprintf. + + Takes % identifiers out of fmtstr and parses them, replacing them with cooresponding values + in the variable arguments list. For more detail view documentation. + \param fmtstr defines format of resulting string + \param ... variable number of arguments after fmtstr + \return string of parsed and combined string +**/ +string FormatStr(const char *fmtstr, ...); + +/*! + Creates a string about an error, telling what file it occured in and where, and gives a user defined string as well. +**/ +#define GetError(str) _GetError(__LINE__,__FILE__,str) + +/*! + Logs a string about an error, telling what file it occured in and where, and gives a user defined string as well. +**/ +#define LogError(str) _LogError(__LINE__,__FILE__,str) + +} + +#endif //__ze_error_h__ diff --git a/include/ZE_Includes.h b/include/ZE_Includes.h index 5363868..e2927f1 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.2 2002/11/28 23:18:54 cozman Exp $
    +$Id: ZE_Includes.h,v 1.3 2002/12/01 07:56:17 cozman Exp $
    \file ZE_Includes.h \brief Include file for SDL and C++ Includes that many ZEngine files need. @@ -28,9 +28,8 @@ $Id: ZE_Includes.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    #include "ZE_Defines.h" #include "SDL.h" -#ifdef USE_OPENGL_2D #include "SDL_opengl.h" -#endif +#include "external/SDLGL_Util.h" #ifdef USE_SDL_IMAGE #include "SDL_image.h" #endif diff --git a/include/ZE_ZConfigFile.h b/include/ZE_ZConfigFile.h index c0da5da..946b982 100644 --- a/include/ZE_ZConfigFile.h +++ b/include/ZE_ZConfigFile.h @@ -13,7 +13,7 @@ File: Types/ZE_ZConfigFile.h
    Description: Header file for ZEngine INI-Style Config Files.
    Author(s): James Turk
    -$Id: ZE_ZConfigFile.h,v 1.1 2002/11/21 05:41:10 cozman Exp $
    +$Id: ZE_ZConfigFile.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    \file ZE_ZConfigFile.h \brief Definition file for ZConfigFile. @@ -39,17 +39,35 @@ class ZConfigFile : public ZObject { private: - /*Private Types*/ + //Private Types// + + + /*! + \brief ZConfigFile Variable class. + + ZConfigFile class for mapping a variable name to it's value, stored in string form (later converted to + bool or int if needed). + **/ class ZCF_Variable { public: + //! Variable name. string var; + //! Value associated with variable. string val; }; + + /*! + \brief ZConfigFile Section class. + + ZConfigFile class for mapping a section name to a list of variables in that section. + **/ class ZCF_Section { public: + //! Section name. string section; + //! STL list of variables. list varList; }; diff --git a/include/ZE_ZEngine.h b/include/ZE_ZEngine.h index 754d8d2..1d0d958 100644 --- a/include/ZE_ZEngine.h +++ b/include/ZE_ZEngine.h @@ -13,7 +13,7 @@ File: ZE_ZEngine.h
    Description: Header file for ZEngine class, the core of the ZEngine.
    Author(s): James Turk
    -$Id: ZE_ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    +$Id: ZE_ZEngine.h,v 1.3 2002/12/01 07:56:17 cozman Exp $
    \file ZE_ZEngine.h \brief Definition file for core ZEngine class. @@ -24,9 +24,9 @@ $Id: ZE_ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    #ifndef __ze_zengine_h__ #define __ze_zengine_h__ -#include "ZE_DataPtr.h" #include "ZE_Error.h" #include "ZE_Defines.h" +#include "ZE_Macros.h" #include "ZE_Includes.h" /*! @@ -177,26 +177,28 @@ class ZEngine void UpdateScreen(); /*! - \brief Create Color in SDL Uint32 Format + \brief Clear screen to a certain color (Black by default). - Turn RGBA values into SDL Uint32 color. (Alpha value will be ignored if not in use) - - \param r Red component of color (0-255). - \param g Green component of color (0-255). - \param b Blue component of color (0-255). - \param a Alpha (translucency) component of color (0-255). [Default 255] - \return Uint32 of color requested. + Clears a rectangle on screen to a color, defaults to solid black. + \param red Red component (0.0-1.0) of new color. + \param green Green component (0.0-1.0) of new color. + \param blue Blue component (0.0-1.0) of new color. + \param alpha Alpha component (0.0-1.0) of new color. **/ - Uint32 MapColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a=255); + void Clear(float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=1.0f); + + ///////////////////////////// + //OpenGL Specific Functions// + ///////////////////////////// + public: /*! - \brief Clear screen or portion of screen to a color. + \brief Setup OpenGL ortho mode. - Clears a rectangle on screen to a color. - \param color Color to clear surface to, defaults to black. - \param rect Rectangle of screen to clear or NULL for entire surface. + Sets the OpenGL scaled orthographic mode, called once at beginning, no need to call + unless you change the OpenGL mode manually. **/ - void Clear(Uint32 color=0, SDL_Rect *rect=NULL); + void SetGL2D(); //////////////////////////////////////////// //Timer and Framerate Independent Movement// @@ -411,17 +413,9 @@ class ZEngine Loads an Image to an ImageData class which keeps vital information on the Image. \param filename path to file to load. - \return A ImageData class containing filename and pointer to data. + \return A SDL_Surface pointer to data. **/ - ImageData LoadImage(string filename); - - /*! - \brief Free an Image. - - Free memory of an Image in an ImageData class. - \param image ImageData structure of image to free. - **/ - void FreeImage(ImageData &image); + SDL_Surface* LoadImage(string filename); #ifdef USE_SDL_MIXER /*! @@ -429,34 +423,18 @@ class ZEngine Loads a Sound to a SoundData class which keeps vital information on the Sound \param filename path to file to load. - \return A SoundData class containing filename and pointer to data. + \return A Mix_Chunk pointer to data. **/ - SoundData LoadSound(string filename); - - /*! - \brief Free a Sound. - - Free memory of a Sound in a SoundData class. - \param sound SoundData structure of sound to free. - **/ - void FreeSound(SoundData &sound); + Mix_Chunk* LoadSound(string filename); /*! \brief Load a Music File Loads a Music Clip to a MusicData class which keeps vital information on the Music Data \param filename path to file to load. - \return A MusicData class containing filename and pointer to data. + \return A Mix_Music pointer to data. **/ - MusicData LoadMusic(string filename); - - /*! - \brief Free a Music Sample. - - Free memory of Music in a MusicData class. - \param music MusicData structure of music to free. - **/ - void FreeMusic(MusicData &music); + Mix_Music* LoadMusic(string filename); #endif #ifdef USE_SDL_TTF @@ -466,23 +444,15 @@ class ZEngine Loads a Font to a FontData class which keeps vital information on the Font \param filename path to file to load. \param size point size of font - \return A FontData class containing filename and pointer to data. + \return A TTF_Font pointer to data. **/ - FontData LoadFont(string filename, int size); - - /*! - \brief Free a Font. - - Free memory of a Font in a FontData class. - \param font FontData structure of font to free. - **/ - void FreeFont(FontData &font); + TTF_Font* LoadFont(string filename, int size); #endif ///////////// //Accessors// ///////////// - + public: /*! \brief Get Current Display Width. diff --git a/include/ZE_ZFont.h b/include/ZE_ZFont.h index dd1458c..649c48a 100644 --- a/include/ZE_ZFont.h +++ b/include/ZE_ZFont.h @@ -1,230 +1,232 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZFont.h
    -Description: Header file for core ZEngine Font Object.
    -Author(s): James Turk
    -$Id: ZE_ZFont.h,v 1.1 2002/11/21 05:41:10 cozman Exp $
    - - \file ZE_ZFont.h - \brief Definition file for ZFont. - - Definition file for ZFont, the basic Font class for ZEngine. -**/ - -#ifndef __ze_zfont_h__ -#define __ze_zfont_h__ - -#include "ZE_ZObject.h" -#include "ZE_ZImage.h" - -#ifdef USE_SDL_TTF - -namespace ZE -{ - -/*! - \brief ZFont class for basic Font use. - - ZFont font container class, class wraps common features of SDL_TTF. Inherited from ZObject. -**/ -class ZFont : public ZObject -{ - protected: - //! Class containing font and filename. - FontData rFont; - //! SDL_Color for current text color. - SDL_Color rColor; - //! SDL_Color for background color to be used in shaded draws. - SDL_Color rBGColor; - - public: - - /////////////////////// - //Opening and Closing// - /////////////////////// - - /*! - \brief Default Constructor. - - Default Constructor, does nothing. - **/ - ZFont(); - - /*! - \brief Constructor that opens a font with a certain size. - - Constructor simply calls ZFont::Open() with same parameters. - \param filename Font to open. - \param size Size to use for font. - **/ - ZFont(string filename, int size); - - /*! - \brief Destructor, frees memory. - - Destructor calls ZFont::Release(). - **/ - ~ZFont(); - - /*! - \brief Opens a font with a certain size. - - Opens a font given a filename and a point size. - \param filename Font to open. - \param size Size to use for font. - **/ - void Open(string filename, int size); - - /*! - \brief Release font. - - Release memory held by font. - **/ - void Release(); - - //////////////////////// - //Settings and Drawing// - //////////////////////// - - /*! - \brief Draws a string in a color to a ZImage. - - Draw to a surface in specified color and associate that surface with a ZImage. - \param text String to write. - \param image ZImage to draw to. - **/ - void DrawText(string text, ZImage &image); - - /*! - \brief Draws a string with a colored background to a ZImage. - - Draw to a surface a string with a background of rBGColor and lettering in the normal color and associate that surface with a ZImage. - \param text String to write. - \param image ZImage to draw to. - **/ - void DrawShadedText(string text, ZImage &image); - - /*! - \brief Set Text rColor. - - Set rColor of Text Output. - \param r Red component of color (0-255). - \param g Green component of color (0-255). - \param b Blue component of color (0-255). - **/ - void SetColor(Uint8 r, Uint8 g, Uint8 b); - - /*! - \brief Set Background rColor. - - Set rColor of Background for Shaded Draw. - \param r Red component of color (0-255). - \param g Green component of color (0-255). - \param b Blue component of color (0-255). - **/ - void SetBGColor(Uint8 r, Uint8 g, Uint8 b); - - /*! - \brief Set display format. - - Set display format (bold, italic, underline). - \param bold Decides bold setting of font. - \param italic Decides italic setting of font. - \param underline Decides underline setting of font. - **/ - void SetStyle(bool bold, bool italic, bool underline); - - /*! - \brief Resize Font. - - Release and Reopen font in new size. - \param size New size for font. - **/ - void Resize(int size); - - ///////////// - //Accessors// - ///////////// - - /*! - \brief Check if file is loaded. - - Check if file is loaded and pointer to data is non-NULL. - \return Loaded or Unloaded state of data. - **/ - bool IsLoaded(); - - /*! - \brief Get Bold Setting. - - Check if font output is currently bold. - \return True or False state of bold. - **/ - bool IsBold(); - - /*! - \brief Get Italic Setting. - - Check if font output is currently italic. - \return True or False state of italic. - **/ - bool IsItalic(); - - /*! - \brief Get Underlined Setting. - - Check if font output is currently underline. - \return True or False state of underline. - **/ - bool IsUnderlined(); - - /*! - \brief Get Height of Font. - - Check font height as reported by SDL_ttf. - \return Height of font. - **/ - int GetHeight(); - - /*! - \brief Get Line Skip for Font. - - Check font line skip as reported by SDL_ttf. - \return Recommended Line Skip of font. - **/ - int GetLineSkip(); - - /*! - \brief Get String Width. - - Get Width of String in Current Font in Pixels. - \param text String to get width of. - \return Width of String in Current font. - **/ - int GetStringWidth(string text); - - /*! - \brief Get String Height. - - Get Height of String in Current Font in Pixels. - \param text String to get height of. - \return Height of String in Current font. - **/ - int GetStringHeight(string text); -}; - -} - -#endif //USE_SDL_TTF - -#endif //__ze_zfont_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZFont.h
    +Description: Header file for core ZEngine Font Object.
    +Author(s): James Turk
    +$Id: ZE_ZFont.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZFont.h + \brief Definition file for ZFont. + + Definition file for ZFont, the basic Font class for ZEngine. +**/ + +#ifndef __ze_zfont_h__ +#define __ze_zfont_h__ + +#include "ZE_ZObject.h" +#include "ZE_ZImage.h" + +#ifdef USE_SDL_TTF + +namespace ZE +{ + +/*! + \brief ZFont class for basic Font use. + + ZFont font container class, class wraps common features of SDL_TTF. Inherited from ZObject. +**/ +class ZFont : public ZObject +{ + protected: + //! Pointer to font data. + TTF_Font *rFont; + //! Filename, for resizing. + string rFilename; + //! SDL_Color for current text color. + SDL_Color rColor; + //! SDL_Color for background color to be used in shaded draws. + SDL_Color rBGColor; + + public: + + /////////////////////// + //Opening and Closing// + /////////////////////// + + /*! + \brief Default Constructor. + + Default Constructor, does nothing. + **/ + ZFont(); + + /*! + \brief Constructor that opens a font with a certain size. + + Constructor simply calls ZFont::Open() with same parameters. + \param filename Font to open. + \param size Size to use for font. + **/ + ZFont(string filename, int size); + + /*! + \brief Destructor, frees memory. + + Destructor calls ZFont::Release(). + **/ + ~ZFont(); + + /*! + \brief Opens a font with a certain size. + + Opens a font given a filename and a point size. + \param filename Font to open. + \param size Size to use for font. + **/ + void Open(string filename, int size); + + /*! + \brief Release font. + + Release memory held by font. + **/ + void Release(); + + //////////////////////// + //Settings and Drawing// + //////////////////////// + + /*! + \brief Draws a string in a color to a ZImage. + + Draw to a surface in specified color and associate that surface with a ZImage. + \param text String to write. + \param image ZImage to draw to. + **/ + void DrawText(string text, ZImage &image); + + /*! + \brief Draws a string with a colored background to a ZImage. + + Draw to a surface a string with a background of rBGColor and lettering in the normal color and associate that surface with a ZImage. + \param text String to write. + \param image ZImage to draw to. + **/ + void DrawShadedText(string text, ZImage &image); + + /*! + \brief Set Text rColor. + + Set rColor of Text Output. + \param r Red component of color (0-255). + \param g Green component of color (0-255). + \param b Blue component of color (0-255). + **/ + void SetColor(Uint8 r, Uint8 g, Uint8 b); + + /*! + \brief Set Background rColor. + + Set rColor of Background for Shaded Draw. + \param r Red component of color (0-255). + \param g Green component of color (0-255). + \param b Blue component of color (0-255). + **/ + void SetBGColor(Uint8 r, Uint8 g, Uint8 b); + + /*! + \brief Set display format. + + Set display format (bold, italic, underline). + \param bold Decides bold setting of font. + \param italic Decides italic setting of font. + \param underline Decides underline setting of font. + **/ + void SetStyle(bool bold, bool italic, bool underline); + + /*! + \brief Resize Font. + + Release and Reopen font in new size. + \param size New size for font. + **/ + void Resize(int size); + + ///////////// + //Accessors// + ///////////// + + /*! + \brief Check if file is loaded. + + Check if file is loaded and pointer to data is non-NULL. + \return Loaded or Unloaded state of data. + **/ + bool IsLoaded(); + + /*! + \brief Get Bold Setting. + + Check if font output is currently bold. + \return True or False state of bold. + **/ + bool IsBold(); + + /*! + \brief Get Italic Setting. + + Check if font output is currently italic. + \return True or False state of italic. + **/ + bool IsItalic(); + + /*! + \brief Get Underlined Setting. + + Check if font output is currently underline. + \return True or False state of underline. + **/ + bool IsUnderlined(); + + /*! + \brief Get Height of Font. + + Check font height as reported by SDL_ttf. + \return Height of font. + **/ + int Height(); + + /*! + \brief Get Line Skip for Font. + + Check font line skip as reported by SDL_ttf. + \return Recommended Line Skip of font. + **/ + int LineSkip(); + + /*! + \brief Get String Width. + + Get Width of String in Current Font in Pixels. + \param text String to get width of. + \return Width of String in Current font. + **/ + int StringWidth(string text); + + /*! + \brief Get String Height. + + Get Height of String in Current Font in Pixels. + \param text String to get height of. + \return Height of String in Current font. + **/ + int StringHeight(string text); +}; + +} + +#endif //USE_SDL_TTF + +#endif //__ze_zfont_h__ diff --git a/include/ZE_ZImage.h b/include/ZE_ZImage.h index 378be7e..805b7a3 100644 --- a/include/ZE_ZImage.h +++ b/include/ZE_ZImage.h @@ -1,201 +1,207 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZImage.h
    -Description: Header file for core ZEngine Image Object.
    -Author(s): James Turk
    -$Id: ZE_ZImage.h,v 1.1 2002/11/21 05:41:10 cozman Exp $
    - - \file ZE_ZImage.h - \brief Definition file for ZImage. - - Definition file for ZImage, the basic Image class for ZEngine. -**/ - -#ifndef __ze_zimage_h__ -#define __ze_zimage_h__ - -#include "ZE_ZObject.h" - -namespace ZE -{ - -/*! - \brief ZImage class for basic Image use. - - ZImage image drawing class, class wraps common features of SDL_Surface. Inherited from ZObject. -**/ -class ZImage : public ZObject -{ - protected: - //! Class containing image and filename. - ImageData rImage; - public: - - /*! - \brief Default Constructor. - - Default Constructor, does nothing. - **/ - ZImage(); - - /*! - \brief Constructor to Construct from File. - - Constructor is same as calling ZImage::Open() on passed filename. - \param filename File to open as rImage. - **/ - ZImage(string filename); - - /*! - \brief Constructor to Construct from SDL_Surface*. - - Constructor is same as calling ZImage::Attach() on passed SDL_Surface*. - \param surface SDL_Surface* to use as rImage. - **/ - ZImage(SDL_Surface *surface); - - /*! - \brief Constructor to Construct from part of an SDL_Surface*. - - Constructor is same as calling ZImage::OpenFromImage. - - \param img Image to take new image from. - \param x X Coordinate in source of top left corner. - \param y Y Coordinate in source of top left corner. - \param w Width of new image. - \param h Height of new image. - **/ - ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h); - - /*! - \brief Destructor, frees memory. - - Destructor calls ZImage::Release(). - **/ - ~ZImage(); - - /////////////////////// - //Opening and Closing// - /////////////////////// - - /*! - \brief Opens a file. - - Open a file using ZEngine. Loads into rImage member of class. - \param filename File to open as rImage. - **/ - void Open(string filename); - - /*! - \brief Cuts part of an existing image to create the new image. - - Cut part of an SDL_Surface to create a new Image. - - \param img Image to take new image from. - \param x X Coordinate in source of top left corner. - \param y Y Coordinate in source of top left corner. - \param w Width of new image. - \param h Height of new image. - **/ - void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h); - - /*! - \brief Attach an existing surface to class. - - Attach a pointer to instance of ZImage. (NOTE: Should not be used on a surface that is owned elsewhere.) - \param surface SDL_Surface* to use as rImage. - **/ - void Attach(SDL_Surface *surface); - - /*! - \brief Releases image. - - Frees memory via call to SDL_FreeSurface for the image. - **/ - void Release(); - - //////////// - //Graphics// - //////////// - - /*! - \brief Sets Alpha (transparency) value of Image. - - Set Alpha channel of an Image, only used in 32 bit mode. - \param alpha Number 0-255 describing translucency of image. (0 = transparent, 255 = opaque) - **/ - void SetAlpha(Uint8 alpha); - - /*! - \brief Set Color Key (transparent color) of Image. - - Set color which will not be drawn in image. - \param color Uint32 color describing color to use as transparent. - **/ - void SetColorKey(Uint32 color); - - /*! - \brief Draw Image to Screen. - - Draw Image to screen at specified location. - \param x X coord to draw Image to. - \param y Y coord to draw Image to. - **/ - void Draw(Sint16 x, Sint16 y); - - ///////////// - //Accessors// - ///////////// - - /*! - \brief Check if file is loaded. - - Check if file is loaded and pointer to data is non-NULL. - \return Loaded or Unloaded state of data. - **/ - bool IsLoaded(); - - /*! - \brief Get SDL_Surface. - Get SDL_Surface pointer to actual image data. - \return SDL_Surface* of rImage. - **/ - SDL_Surface *GetImage(); - - /*! - \brief Get Width. - - Get Width of Image. - \return Image Width. - **/ - int GetWidth(); - - /*! - \brief Get Height. - - Get Height of Image. - \return Image Height. - **/ - int GetHeight(); - - /*! - \brief Get filename of image. - - Get filename of image or if Image doesn't have a specific filename string describing origin of image. - \return Image Filename. - **/ - string GetFilename(); -}; -} - -#endif //__ze_zimage_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZImage.h
    +Description: Header file for core ZEngine Image and Texture Object.
    +Author(s): James Turk, Gamer Tazar
    +$Id: ZE_ZImage.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZImage.h + \brief Definition file for ZImage. + + Definition file for ZImage, the OpenGL version of the ZImage class for ZEngine. +**/ + +#ifndef __ze_zimage_h__ +#define __ze_zimage_h__ + +#include "ZE_ZObject.h" + +namespace ZE +{ + +/*! + \brief ZImage class for basic Image use. + + ZImage image drawing class, class wraps common features of SDL_Surface. Inherited from ZObject. +**/ +class ZImage : public ZObject +{ + protected: + //! Texture X width ratio, used internally by OpenGL. + GLfloat rTexMaxX; + //! Texture Y width ratio, used internally by OpenGL. + GLfloat rTexMaxY; + //! Stored texture for future use. + SDL_Surface *rImage; + //! Texture ID for OpenGL. + unsigned int rTexID; + //! Current draw width of Texture. + unsigned int rWidth; + //! Current draw height of Texture. + unsigned int rHeight; + + public: + + /*! + \brief Default Constructor. + + Default Constructor, initializes variables. + **/ + ZImage(); + + /*! + \brief Constructor to Construct from File. + + Constructor is same as calling ZImage::Open() on passed filename. + \param filename File to open as rImage. + **/ + ZImage(string filename); + + /*! + \brief Constructor to Construct from SDL_Surface*. + + Constructor is same as calling ZImage::Attach() on passed SDL_Surface*. + \param surface SDL_Surface* to use as rImage. + **/ + ZImage(SDL_Surface *surface); + + /*! + \brief Constructor to Construct from part of an SDL_Surface*. + + Constructor is same as calling ZImage::OpenFromImage. + + \param img Image to take new image from. + \param x X Coordinate in source of top left corner. + \param y Y Coordinate in source of top left corner. + \param w Width of new image. + \param h Height of new image. + **/ + ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h); + + /*! + \brief Destructor, frees memory. + + Destructor calls ZImage::Release(). + **/ + ~ZImage(); + + /////////////////////// + //Opening and Closing// + /////////////////////// + + /*! + \brief Opens a file. + + Open a file using ZEngine. Loads into rImage member of class. + \param filename File to open as rImage. + **/ + void Open(string filename); + + /*! + \brief Cuts part of an existing image to create the new image. + + Cut part of an SDL_Surface to create a new Image. + + \param img Image to take new image from. + \param x X Coordinate in source of top left corner. + \param y Y Coordinate in source of top left corner. + \param w Width of new image. + \param h Height of new image. + **/ + void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h); + + /*! + \brief Attach an existing surface to class. + + Attach a pointer to instance of ZImage. (NOTE: Should not be used on a surface that is owned elsewhere.) + \param surface SDL_Surface* to use as rImage. + **/ + void Attach(SDL_Surface *surface); + + /*! + \brief Releases image. + + Frees memory via call to SDL_FreeSurface for the image. + **/ + void Release(); + + //////////// + //Graphics// + //////////// + + /*! + \brief Set Color Key (transparent color) of Image. + + Set color which will not be drawn in image. + \param red Red component of colorkey (0-255). + \param green Green component of colorkey (0-255). + \param blue Blue component of colorkey (0-255). + **/ + void SetColorKey(Uint8 red, Uint8 green, Uint8 blue); + + /*! + \brief OpenGL related bind call. + + OpenGL related bind call, only available in case you want to bind image in 3D. + Draw uses this but the average user should never need to call this. + **/ + void Bind(); + + /*! + \brief Draw Image to Screen. + + Draw Image to screen at specified location. + \param x X coord to draw Image to. + \param y Y coord to draw Image to. + **/ + void Draw(int x, int y); + + ///////////// + //Accessors// + ///////////// + + /*! + \brief Check if file is loaded. + + Check if file is loaded and pointer to data is non-NULL. + \return Loaded or Unloaded state of data. + **/ + bool IsLoaded(); + + /*! + \brief Get SDL_Surface. + Get SDL_Surface pointer to actual image data. + \return SDL_Surface* of rImage. + **/ + SDL_Surface *Surface(); + + /*! + \brief Get Width. + + Get Current Width of Image. + \return Image Width. + **/ + int Width(); + + /*! + \brief Get Height. + + Get Current Height of Image. + \return Image Height. + **/ + int Height(); +}; + +} + +#endif diff --git a/include/ZE_ZMusic.h b/include/ZE_ZMusic.h index ab5d87c..5884195 100644 --- a/include/ZE_ZMusic.h +++ b/include/ZE_ZMusic.h @@ -1,183 +1,183 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZMusic.h
    -Description: Header file for core ZEngine Music Wrapper Object.
    -Author(s): James Turk
    -$Id: ZE_ZMusic.h,v 1.1 2002/11/21 05:41:11 cozman Exp $
    - - \file ZE_ZMusic.h - \brief Definition file for ZMusic. - - Definition file for ZMusic, the Music file wrapper for ZEngine. -**/ - -#ifndef __ze_zmusic_h__ -#define __ze_zmusic_h__ - -#include "ZE_ZObject.h" - -#ifdef USE_SDL_MIXER - -namespace ZE -{ - -/*! - \brief ZMusic class for playing full length music (eg. ogg or wav). - - ZMusic music class, class wraps common features for SDL_Mixer's Mix_Music. Inherited from ZObject. -**/ -class ZMusic : public ZObject -{ - protected: - //! Class containing music data and music filename. - MusicData rMusic; - - public: - //! Static Variable For Infinite loop of sound. (Defined as -1) - static const int LoopInfinite; - - /////////////////////// - //Opening and Closing// - /////////////////////// - - /*! - \brief Default Constructor. - - Default Constructor, does nothing. - **/ - ZMusic(); - - /*! - \brief Constructor that opens a music file. - - Constructor simply calls ZMusic::Open() with same filename. (WAV,MOD,MID,OGG) - \param filename Music to open. - **/ - ZMusic(string filename); - - /*! - \brief Destructor, frees memory. - - Destructor calls ZMusic::Release(). - **/ - ~ZMusic(); - - /*! - \brief Opens a music file. - - Open a music file to be used. - \param filename Music to open. - **/ - void Open(string filename); - - /*! - \brief Release music. - - Release memory held by music data. - **/ - void Release(); - - ///////////////// - //Play Controls// - ///////////////// - - /*! - \brief Play currently loaded music. - - Play music currently loaded in ZMusic, looping loopNum times. (use ZMusic::LoopInfinite to loop forever.) - If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds. - \param loopNum Number of times to loop song, defaults to zero. - \param fadeTime Milliseconds to fade to full volume, defaults to zero for no fade. - **/ - void Play(int loopNum=0, int fadeTime=0); - - /*! - \brief Pause music. - - Pause currently playing music. - **/ - void Pause(); - - /*! - \brief Unpause music. - - Unpause currently paused music. - **/ - void Unpause(); - - /*! - \brief Rewind music. - - Rewind music to beginning. - **/ - void Rewind(); - - /*! - \brief Stop music. - - Stop currently playing music, if fadeTime is not zero, fade out over specified time. - \param fadeTime Milliseconds to fade out over, defaults to zero for immediate stop. - **/ - void Stop(int fadeTime=0); - - /*! - \brief Change Volume. - - Change volume of currently playing music. - \param volume Volume to change to, can be in a range from 0 to 128 - **/ - void SetVolume(int volume); - - ///////////// - //Accessors// - ///////////// - - /*! - \brief Check if file is loaded. - - Check if file is loaded and pointer to data is non-NULL. - \return Loaded or Unloaded state of data. - **/ - bool IsLoaded(); - - /*! - \brief Check if music is Playing. - - Check if music is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused) - \return Playing / Not Playing State of Music. - **/ - bool IsPlaying(); - - /*! - \brief Check if music is Paused. - - Check if music is "playing" but currently paused. - \return Paused / Not Paused State of Music. - **/ - bool IsPaused(); - - /*! - \brief Find Current Volume of Music. - - Get current volume of music represented as a value from 0-128. - \return Volume of music, 0-128. - **/ - int GetVolume(); -}; - - -} - -#endif //USE_SDL_MIXER - -#endif //__ze_zmusic_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZMusic.h
    +Description: Header file for core ZEngine Music Wrapper Object.
    +Author(s): James Turk
    +$Id: ZE_ZMusic.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZMusic.h + \brief Definition file for ZMusic. + + Definition file for ZMusic, the Music file wrapper for ZEngine. +**/ + +#ifndef __ze_zmusic_h__ +#define __ze_zmusic_h__ + +#include "ZE_ZObject.h" + +#ifdef USE_SDL_MIXER + +namespace ZE +{ + +/*! + \brief ZMusic class for playing full length music (eg. ogg or wav). + + ZMusic music class, class wraps common features for SDL_Mixer's Mix_Music. Inherited from ZObject. +**/ +class ZMusic : public ZObject +{ + protected: + //! Pointer to music data. + Mix_Music *rMusic; + + public: + //! Static Variable For Infinite loop of sound. (Defined as -1) + static const int LoopInfinite; + + /////////////////////// + //Opening and Closing// + /////////////////////// + + /*! + \brief Default Constructor. + + Default Constructor, does nothing. + **/ + ZMusic(); + + /*! + \brief Constructor that opens a music file. + + Constructor simply calls ZMusic::Open() with same filename. (WAV,MOD,MID,OGG) + \param filename Music to open. + **/ + ZMusic(string filename); + + /*! + \brief Destructor, frees memory. + + Destructor calls ZMusic::Release(). + **/ + ~ZMusic(); + + /*! + \brief Opens a music file. + + Open a music file to be used. + \param filename Music to open. + **/ + void Open(string filename); + + /*! + \brief Release music. + + Release memory held by music data. + **/ + void Release(); + + ///////////////// + //Play Controls// + ///////////////// + + /*! + \brief Play currently loaded music. + + Play music currently loaded in ZMusic, looping loopNum times. (use ZMusic::LoopInfinite to loop forever.) + If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds. + \param loopNum Number of times to loop song, defaults to zero. + \param fadeTime Milliseconds to fade to full volume, defaults to zero for no fade. + **/ + void Play(int loopNum=0, int fadeTime=0); + + /*! + \brief Pause music. + + Pause currently playing music. + **/ + void Pause(); + + /*! + \brief Unpause music. + + Unpause currently paused music. + **/ + void Unpause(); + + /*! + \brief Rewind music. + + Rewind music to beginning. + **/ + void Rewind(); + + /*! + \brief Stop music. + + Stop currently playing music, if fadeTime is not zero, fade out over specified time. + \param fadeTime Milliseconds to fade out over, defaults to zero for immediate stop. + **/ + void Stop(int fadeTime=0); + + /*! + \brief Change Volume. + + Change volume of currently playing music. + \param volume Volume to change to, can be in a range from 0 to 128 + **/ + void SetVolume(int volume); + + ///////////// + //Accessors// + ///////////// + + /*! + \brief Check if file is loaded. + + Check if file is loaded and pointer to data is non-NULL. + \return Loaded or Unloaded state of data. + **/ + bool IsLoaded(); + + /*! + \brief Check if music is Playing. + + Check if music is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused) + \return Playing / Not Playing State of Music. + **/ + bool IsPlaying(); + + /*! + \brief Check if music is Paused. + + Check if music is "playing" but currently paused. + \return Paused / Not Paused State of Music. + **/ + bool IsPaused(); + + /*! + \brief Find Current Volume of Music. + + Get current volume of music represented as a value from 0-128. + \return Volume of music, 0-128. + **/ + int Volume(); +}; + + +} + +#endif //USE_SDL_MIXER + +#endif //__ze_zmusic_h__ diff --git a/include/ZE_ZObject.h b/include/ZE_ZObject.h index 2b0c7b2..e03772f 100644 --- a/include/ZE_ZObject.h +++ b/include/ZE_ZObject.h @@ -1,58 +1,58 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZObject.h
    -Description: Header file for ZEngine core Object ZObject, base of most ZEngine objects.
    -Author(s): James Turk
    -$Id: ZE_ZObject.h,v 1.1 2002/11/21 05:41:11 cozman Exp $
    - - \file ZE_ZObject.h - \brief Definition file for ZObject Base Class. - - Definition file for ZObject the Virtual Base Class for majority of the ZEngine Objects. -**/ - -#ifndef __ze_zobject_h__ -#define __ze_zobject_h__ - -#include "ZE_ZEngine.h" - -namespace ZE -{ -/*! - \brief ZObject base class for other ZEngine objects. - - This is the base class from which all ZEngine internal objects are derived from. -**/ -class ZObject -{ - protected: - //! Pointer to ZEngine Object - ZEngine* rEngine; - public: - /*! - \brief ZEngine Constructor. - - ZEngine Constructor, gets Engine pointer for Object. - **/ - ZObject() { rEngine = ZEngine::GetInstance(); }; - - /*! - \brief ZEngine Virtual destructor. - - ZEngine destructor, provided to make class safely inheritable. - **/ - virtual ~ZObject() {}; -}; -} - -#endif //__ze_zobject_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZObject.h
    +Description: Header file for ZEngine core Object ZObject, base of most ZEngine objects.
    +Author(s): James Turk
    +$Id: ZE_ZObject.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZObject.h + \brief Definition file for ZObject Base Class. + + Definition file for ZObject the Virtual Base Class for majority of the ZEngine Objects. +**/ + +#ifndef __ze_zobject_h__ +#define __ze_zobject_h__ + +#include "ZE_ZEngine.h" + +namespace ZE +{ +/*! + \brief ZObject base class for other ZEngine objects. + + This is the base class from which all ZEngine internal objects are derived from. +**/ +class ZObject +{ + protected: + //! Pointer to ZEngine Object + ZEngine* rEngine; + public: + /*! + \brief ZEngine Constructor. + + ZEngine Constructor, gets Engine pointer for Object. + **/ + ZObject() { rEngine = ZEngine::GetInstance(); }; + + /*! + \brief ZEngine Virtual destructor. + + ZEngine destructor, provided to make class safely inheritable. + **/ + virtual ~ZObject() {}; +}; +} + +#endif //__ze_zobject_h__ diff --git a/include/ZE_ZSound.h b/include/ZE_ZSound.h index 654fef0..6382323 100644 --- a/include/ZE_ZSound.h +++ b/include/ZE_ZSound.h @@ -1,178 +1,178 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZSound.h
    -Description: Header file for core ZEngine Sound Wrapper Object.
    -Author(s): James Turk
    -$Id: ZE_ZSound.h,v 1.1 2002/11/21 05:41:12 cozman Exp $
    - - \file ZE_ZSound.h - \brief Definition file for ZSound. - - Definition file for ZSound, the Sound Effect wrapper for ZEngine. -**/ - -#ifndef __ze_zsound_h__ -#define __ze_zsound_h__ - -#include "ZE_ZObject.h" - -#ifdef USE_SDL_MIXER - -namespace ZE -{ - -/*! - \brief ZSound class for playing sound effects. (WAV) - - ZSound music class, class wraps common features for SDL_Mixer's Mix_Chunk. Inherited from ZObject. -**/ -class ZSound : public ZObject -{ - protected: - //! Class containing music data and music filename. - SoundData rSound; - //! Channel ID Number from SDL_Mixer. - int rChannelID; - - public: - //! Static Variable For Infinite loop of sound. (Defined as -1) - static const int LoopInfinite; - - /////////////////////// - //Opening and Closing// - /////////////////////// - - /*! - \brief Default Constructor. - - Default Constructor, does nothing. - **/ - ZSound(); - - /*! - \brief Constructor that opens a sound effect file. - - Constructor simply calls ZSound::Open() with same filename. (WAV,MOD,MID,OGG) - \param filename Sound effect to open. - **/ - ZSound(string filename); - - /*! - \brief Destructor, frees memory. - - Destructor calls ZSound::Release(). - **/ - ~ZSound(); - - /*! - \brief Opens a sound effect file. - - Open a music file to be used. - \param filename Music to open. - **/ - void Open(string filename); - - /*! - \brief Release sound effect. - - Release memory held by sample data. - **/ - void Release(); - - ///////////////// - //Play Controls// - ///////////////// - - /*! - \brief Play currently loaded sound effect. - - Play sound effect, looping loopNum times. (use ZSound::LoopInfinite to loop forever.) - If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds. - \param loopNum Number of times to loop song, defaults to zero. - \param fadeTime Milliseconds to fade to full volume, defaults to zero for no fade. - **/ - void Play(int loopNum=0, int fadeTime=0); - - /*! - \brief Pause sound. - - Pause currently playing sound. - **/ - void Pause(); - - /*! - \brief Unpause sound. - - Unpause currently playing sound. - **/ - void Unpause(); - - /*! - \brief Stop sound. - - Stop currently playing sound, if fadeTime is not zero, fade out over specified time. - \param fadeTime Milliseconds to fade out over, defaults to zero for immediate stop. - **/ - void Stop(int fadeTime=0); - - /*! - \brief Change Volume. - - Change volume of currently playing sample. - \param volume Volume to change to, can be in a range from 0 to 128. - **/ - void SetVolume(int volume); - - ///////////// - //Accessors// - ///////////// - - /*! - \brief Check if file is loaded. - - Check if file is loaded and pointer to data is non-NULL. - \return Loaded or Unloaded state of data. - **/ - bool IsLoaded(); - - /*! - \brief Check if sound is Playing. - - Check if sound is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused) - \return Playing / Not Playing State of sound. - **/ - bool IsPlaying(); - - /*! - \brief Check if sound is Paused. - - Check if sound is "playing" but currently paused. - \return Paused / Not Paused State of Sound. - **/ - bool IsPaused(); - - /*! - \brief Find Current Volume of Sound Channel. - - Get current volume of sound channel represented as a value from 0-128. - \return Volume of sound channel, 0-128. - **/ - int GetVolume(); -}; - - -} - -#endif //USE_SDL_MIXER - -#endif //__ze_zsound_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZSound.h
    +Description: Header file for core ZEngine Sound Wrapper Object.
    +Author(s): James Turk
    +$Id: ZE_ZSound.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZSound.h + \brief Definition file for ZSound. + + Definition file for ZSound, the Sound Effect wrapper for ZEngine. +**/ + +#ifndef __ze_zsound_h__ +#define __ze_zsound_h__ + +#include "ZE_ZObject.h" + +#ifdef USE_SDL_MIXER + +namespace ZE +{ + +/*! + \brief ZSound class for playing sound effects. (WAV) + + ZSound music class, class wraps common features for SDL_Mixer's Mix_Chunk. Inherited from ZObject. +**/ +class ZSound : public ZObject +{ + protected: + //! Pointer to music data. + Mix_Chunk* rSound; + //! Channel ID Number from SDL_Mixer. + int rChannelID; + + public: + //! Static Variable For Infinite loop of sound. (Defined as -1) + static const int LoopInfinite; + + /////////////////////// + //Opening and Closing// + /////////////////////// + + /*! + \brief Default Constructor. + + Default Constructor, does nothing. + **/ + ZSound(); + + /*! + \brief Constructor that opens a sound effect file. + + Constructor simply calls ZSound::Open() with same filename. (WAV,MOD,MID,OGG) + \param filename Sound effect to open. + **/ + ZSound(string filename); + + /*! + \brief Destructor, frees memory. + + Destructor calls ZSound::Release(). + **/ + ~ZSound(); + + /*! + \brief Opens a sound effect file. + + Open a music file to be used. + \param filename Music to open. + **/ + void Open(string filename); + + /*! + \brief Release sound effect. + + Release memory held by sample data. + **/ + void Release(); + + ///////////////// + //Play Controls// + ///////////////// + + /*! + \brief Play currently loaded sound effect. + + Play sound effect, looping loopNum times. (use ZSound::LoopInfinite to loop forever.) + If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds. + \param loopNum Number of times to loop song, defaults to zero. + \param fadeTime Milliseconds to fade to full volume, defaults to zero for no fade. + **/ + void Play(int loopNum=0, int fadeTime=0); + + /*! + \brief Pause sound. + + Pause currently playing sound. + **/ + void Pause(); + + /*! + \brief Unpause sound. + + Unpause currently playing sound. + **/ + void Unpause(); + + /*! + \brief Stop sound. + + Stop currently playing sound, if fadeTime is not zero, fade out over specified time. + \param fadeTime Milliseconds to fade out over, defaults to zero for immediate stop. + **/ + void Stop(int fadeTime=0); + + /*! + \brief Change Volume. + + Change volume of currently playing sample. + \param volume Volume to change to, can be in a range from 0 to 128. + **/ + void SetVolume(int volume); + + ///////////// + //Accessors// + ///////////// + + /*! + \brief Check if file is loaded. + + Check if file is loaded and pointer to data is non-NULL. + \return Loaded or Unloaded state of data. + **/ + bool IsLoaded(); + + /*! + \brief Check if sound is Playing. + + Check if sound is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused) + \return Playing / Not Playing State of sound. + **/ + bool IsPlaying(); + + /*! + \brief Check if sound is Paused. + + Check if sound is "playing" but currently paused. + \return Paused / Not Paused State of Sound. + **/ + bool IsPaused(); + + /*! + \brief Find Current Volume of Sound Channel. + + Get current volume of sound channel represented as a value from 0-128. + \return Volume of sound channel, 0-128. + **/ + int Volume(); +}; + + +} + +#endif //USE_SDL_MIXER + +#endif //__ze_zsound_h__ diff --git a/include/ZE_ZTimer.h b/include/ZE_ZTimer.h index 3602129..6f55f80 100644 --- a/include/ZE_ZTimer.h +++ b/include/ZE_ZTimer.h @@ -1,107 +1,107 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZTimer.h
    -Description: Header file for core ZEngine Timer Object.
    -Author(s): James Turk
    -$Id: ZE_ZTimer.h,v 1.1 2002/11/21 05:41:12 cozman Exp $
    - - \file ZE_ZTimer.h - \brief Definition file for ZTimer. - - Definition file for ZTimer, the Timer class for ZEngine. -**/ - -#ifndef __ze_ztimer_h__ -#define __ze_ztimer_h__ - -#include "ZE_ZObject.h" - -namespace ZE -{ - -/*! - \brief ZTimer class for Timer use. - - ZTimer timing class, class wraps common features of SDL timer. Inherited from ZObject and tied to ZEngine main timer. -**/ -class ZTimer : public ZObject -{ - protected: - //! Paused / Unpaused state of Timer - bool rPaused; - //! Using ZEngine timer or SDL global timer. - bool rUseZEngine; - //! Total time this timer has been paused. - Uint32 rPausedTime; - //! Time this Timer was paused. - Uint32 rLastPause; - - /*! - \brief Get time from parent timer. - - Protected method to get time from whichever timer is parent. - \return Time on parent timer. - **/ - Uint32 GetParentTime(); - - public: - - /*! - \brief Constructs a new Timer. - - Sets TimePaused to current ZEngine time if useZEngine is true, otherwise uses SDL timer. - \param useZEngine Tells if timer should use ZEngine or SDL. - **/ - ZTimer(bool useZEngine=true); - - /*! - \brief Reset Timer. - - Set Timer back to Zero, will also unpause timer if it was paused. - **/ - void Reset(); - - /*! - \brief Pause Timer. - - Pause the timer if it is unpaused. - **/ - void Pause(); - - /*! - \brief Unpause Timer. - - Unpause the timer if it is paused. - **/ - void Unpause(); - - /*! - \brief Get Time of Timer. - - Get current time accounting for time paused. - \return Current Timer Time. - **/ - Uint32 GetTime(); - - /*! - \brief Get paused state. - - Find out paused state of timer. - \return Paused state for timer. - **/ - bool IsPaused(); -}; - -} - -#endif //__ze_ztimer_h__ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZTimer.h
    +Description: Header file for core ZEngine Timer Object.
    +Author(s): James Turk
    +$Id: ZE_ZTimer.h,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZTimer.h + \brief Definition file for ZTimer. + + Definition file for ZTimer, the Timer class for ZEngine. +**/ + +#ifndef __ze_ztimer_h__ +#define __ze_ztimer_h__ + +#include "ZE_ZObject.h" + +namespace ZE +{ + +/*! + \brief ZTimer class for Timer use. + + ZTimer timing class, class wraps common features of SDL timer. Inherited from ZObject and tied to ZEngine main timer. +**/ +class ZTimer : public ZObject +{ + protected: + //! Paused / Unpaused state of Timer + bool rPaused; + //! Using ZEngine timer or SDL global timer. + bool rUseZEngine; + //! Total time this timer has been paused. + Uint32 rPausedTime; + //! Time this Timer was paused. + Uint32 rLastPause; + + /*! + \brief Get time from parent timer. + + Protected method to get time from whichever timer is parent. + \return Time on parent timer. + **/ + Uint32 GetParentTime(); + + public: + + /*! + \brief Constructs a new Timer. + + Sets TimePaused to current ZEngine time if useZEngine is true, otherwise uses SDL timer. + \param useZEngine Tells if timer should use ZEngine or SDL. + **/ + ZTimer(bool useZEngine=true); + + /*! + \brief Reset Timer. + + Set Timer back to Zero, will also unpause timer if it was paused. + **/ + void Reset(); + + /*! + \brief Pause Timer. + + Pause the timer if it is unpaused. + **/ + void Pause(); + + /*! + \brief Unpause Timer. + + Unpause the timer if it is paused. + **/ + void Unpause(); + + /*! + \brief Get Time of Timer. + + Get current time accounting for time paused. + \return Current Timer Time. + **/ + Uint32 GetTime(); + + /*! + \brief Get paused state. + + Find out paused state of timer. + \return Paused state for timer. + **/ + bool IsPaused(); +}; + +} + +#endif //__ze_ztimer_h__ diff --git a/include/ZEngine.h b/include/ZEngine.h index 9136128..54d3241 100644 --- a/include/ZEngine.h +++ b/include/ZEngine.h @@ -3,7 +3,7 @@ File: ZEngine.h
    Description: Public Header File for ZEngine.
    Author(s): James Turk
    -$Id: ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    +$Id: ZEngine.h,v 1.3 2002/12/01 07:56:17 cozman Exp $
    \file ZEngine.h \brief Header file for ZEngine. @@ -16,15 +16,16 @@ $Id: ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    \mainpage ZEngine Documentation \author James Turk - \version 0.7.5 - \date 28 November, 2002 + \version 0.7.7 + \date 1 December, 2002 \section ZEngine About ZEngine
    ZEngine is designed to wrap common interfaces of the SDL API in an Object Oriented manner. It is licensed under a very liberal BSD-style license, and anyone is free to suggest or implement changes to be added to the Engine. In addition ZEngine hopes to provide a core engine which can be used to develop a game without having to rewrite large amounts - of code. + of code. As of version 0.7.7 ZEngine uses OpenGL rather than SDL to do 2D drawing, thus increasing the use of the engine + and making the engine much faster in most test cases. \section Licensing Licensing
    @@ -41,6 +42,7 @@ $Id: ZEngine.h,v 1.2 2002/11/28 23:18:54 cozman Exp $
    **/ #include "ZE_ZEngine.h" +#include "ZE_Macros.h" #include "ZE_ZImage.h" #include "ZE_ZTimer.h" #include "ZE_ZConfigFile.h" diff --git a/include/external/SDLGL_Util.h b/include/external/SDLGL_Util.h new file mode 100755 index 0000000..0921df8 --- /dev/null +++ b/include/external/SDLGL_Util.h @@ -0,0 +1,12 @@ +/*This code comes from testgl.c which is part of the SDL source distribution. + Available at http://libsdl.org/ +*/ +#ifndef __sdlgl_h__ +#define __sdlgl_h__ + +#include "ZE_Includes.h" + +int power_of_two(int input); +GLuint SDL_GL_LoadTexture(SDL_Surface *surface, GLfloat *texcoord); + +#endif //__sdlgl_h__ diff --git a/licensing.txt b/licensing.txt index 4ea798b..ccf377f 100644 --- a/licensing.txt +++ b/licensing.txt @@ -1,3 +1,16 @@ +A Note From James: + I chose to license ZEngine under the most liberal license I could find. +I really didn't want to think that anybody would steal all the work put into +this engine and call it their own. I'd like to know if you're using it, but +I didn't choose a license that required it, and I'd also like to know what +you add to it or any problems you find in it, but I'm not going to require +any of that because there are people that will do that and people that +won't and I dont think the people that follow the rule follow it simply +because they have to and the people that violate open source licenses +aren't bright enough to have anything to contribute anyway. + +----------------------------------(begin license) + Copyright (c) James Turk, 2002 All rights reserved. @@ -24,6 +37,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--------------------------------------------(end license) + In this distribution all files which fall under the license are marked as such with the following notice: @@ -35,4 +50,4 @@ the following notice: The maintainer of this library is James Turk (james@conceptofzero.net) and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ \ No newline at end of file +*******************************************************************************/ diff --git a/src/ZE_Error.cpp b/src/ZE_Error.cpp index edc7793..9ac0139 100644 --- a/src/ZE_Error.cpp +++ b/src/ZE_Error.cpp @@ -1,53 +1,53 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_Error.cpp
    -Description: Implementation source file for ZEngine error logging utility functions.
    -Author(s): James Turk
    -$Id: ZE_Error.cpp,v 1.1 2002/11/21 05:41:12 cozman Exp $
    - - \file ZE_Error.cpp - \brief Source file for error logging utilities. - - Error logging utilities for ZEngine and programs making use of ZEngine. -**/ - -#include "ZE_Error.h" - -namespace ZE -{ - -string _GetError(int line, string file, string str) -{ - return FormatStr("%s (Line %d)\n Message Was: %s \n",file.c_str(),line,str.c_str()); -} - -void _LogError(int line, string file, string str) -{ - string errstr = _GetError(line,file,str); -#ifdef DEBUG_STREAM - fprintf(stderr,errstr.c_str()); //this line writes the actual debug info -#endif -} - -string FormatStr(const char *fmtstr, ...) -{ - char buf[512]; - va_list args; - - va_start(args,fmtstr); - vsprintf(buf, fmtstr, args); - va_end(args); - return buf; -} - -} +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_Error.cpp
    +Description: Implementation source file for ZEngine error logging utility functions.
    +Author(s): James Turk
    +$Id: ZE_Error.cpp,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_Error.cpp + \brief Source file for error logging utilities. + + Error logging utilities for ZEngine and programs making use of ZEngine. +**/ + +#include "ZE_Error.h" + +namespace ZE +{ + +string _GetError(int line, string file, string str) +{ + return FormatStr("%s (Line %d)\n Message Was: %s \n",file.c_str(),line,str.c_str()); +} + +void _LogError(int line, string file, string str) +{ + string errstr = _GetError(line,file,str); +#ifdef DEBUG_STREAM + fprintf(stderr,errstr.c_str()); //this line writes the actual debug info +#endif +} + +string FormatStr(const char *fmtstr, ...) +{ + char buf[512]; + va_list args; + + va_start(args,fmtstr); + vsprintf(buf, fmtstr, args); + va_end(args); + return buf; +} + +} diff --git a/src/ZE_ZConfigFile.cpp b/src/ZE_ZConfigFile.cpp index 022a672..1789a92 100644 --- a/src/ZE_ZConfigFile.cpp +++ b/src/ZE_ZConfigFile.cpp @@ -1,326 +1,326 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZConfigFile.cpp
    -Description: Implementation source file for ZConfigFile, the ZEngine INI-Style Config File.
    -Author(s): James Turk
    -$Id: ZE_ZConfigFile.cpp,v 1.1 2002/11/21 05:41:12 cozman Exp $
    - - \file ZE_ZConfigFile.cpp - \brief Source file for ZConfigFile. - - Implementation of ZConfigFile, the ZEngine INI-Style Config File. -**/ - -#include "ZE_ZConfigFile.h" - -namespace ZE -{ - -string ZConfigFile::CleanString(string str) -{ - string tmpStr; - bool inQuotes = false; - - //cycle through, only copy spaces and if a character is uppercase, convert it to lowercase - for(string::size_type i = 0; i < str.length(); i++) - { - if(!isspace(str[i]) || inQuotes) - { - if(str[i] == '\"') - inQuotes = !inQuotes; - if(isupper(str[i]) && !inQuotes) - str[i] = static_cast(tolower(str[i])); - tmpStr += str[i]; - } - } - return tmpStr; -} - -bool ZConfigFile::Exists(string sec) -{ - list::iterator secIter; - - sec = CleanString(sec); - - for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) - { - if(CleanString((*secIter).section) == sec) - return true; - } - return false; -} - -bool ZConfigFile::Exists(string sec, string var) -{ - list::iterator secIter; - list::iterator varIter; - - sec = CleanString(sec); - var = CleanString(var); - - for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) - { - if(CleanString((*secIter).section) == sec) - { - for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) - { - if(CleanString((*varIter).var) == var) - return true; - } - } - } - return false; -} - -void ZConfigFile::SetVariable(string sec, string var, string val) -{ - list::iterator secIter; - list::iterator varIter; - - if(Exists(CleanString(sec))) - { - sec = CleanString(sec); - for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) - { - if(CleanString((*secIter).section) == sec) //if this is the section - { - if(Exists(sec,var)) - { - var = CleanString(var); - for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) - { - if(CleanString((*varIter).var) == var) //if this is the variable - { - (*varIter).val = val; - break; //break from this loop - } - } - break; //done in the for loop, time to go - } - else - { - ZCF_Variable tempVar; - tempVar.var = var; - (*secIter).varList.push_back(tempVar); - SetVariable(sec,var,val); - } - } - } - } - else - { - ZCF_Section tempSec; - tempSec.section = sec; - mFileLayout.push_back(tempSec); - SetVariable(sec,var,val); - } -} - -string ZConfigFile::GetVariable(string sec, string var, string defVal) -{ - list::iterator secIter; - list::iterator varIter; - - sec = CleanString(sec); - var = CleanString(var); - - if(Exists(sec)) - { - for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) - { - if(CleanString((*secIter).section) == sec) //if this is the section - { - if(Exists(sec,var)) - { - for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) - { - if(CleanString((*varIter).var) == var) //if this is the variable - return (*varIter).val; //return now - } - break; //done in the for loop, time to go - } - else - { - return defVal; - break; - } - } - } - } - - return defVal; //if it gets to the end just return the default -} - -ZConfigFile::ZConfigFile() {} - -ZConfigFile::ZConfigFile(string mFilename) -{ - Process(mFilename); -} - -ZConfigFile::~ZConfigFile() -{ - Close(); -} - -void ZConfigFile::Process(string filename) -{ - mFilename = filename; - - ifstream cfile(mFilename.c_str()); - string section, str, var, tmp; - - mFileLayout.clear(); - - while(!cfile.eof() && cfile.is_open()) - { - getline(cfile,str); //read in a line - tmp = CleanString(str); //get a clean version - - //if string is bracketed it is a section, if it begins in a letter it is a variable - if(tmp[0] == '[' && tmp[tmp.length()-1] == ']') - section = str; - else if(isalpha(tmp[0])) - { - var = str.substr(0,str.find('=')); //split the string at the equals sign - SetVariable(section,var,str.substr(str.find('=')+1,str.length()-var.length()-1)); - } - } - cfile.close(); -} - -int ZConfigFile::GetInt(string section, string var, int defVal) -{ - string val; - char tmp[20]; - - section = CleanString(section); - var = CleanString(var); - - section = '[' + section + ']'; - - sprintf(tmp,"%d",defVal); - val = GetVariable(section,var,tmp); - - if(!atoi(val.c_str()) && val[0] !='0') //if it is zero but doesn't start with a zero - return defVal; - else - return atoi(val.c_str()); -} - -bool ZConfigFile::GetBool(string section, string var, bool defVal) -{ - string val,tmp; - - section = CleanString(section); - var = CleanString(var); - - section = '[' + section + ']'; - - tmp = defVal ? "true" : "false"; - val = CleanString(GetVariable(section,var,tmp)); - - if(val == "true" || val == "1") - return true; - else if(val == "false" || val == "0") - return false; - else - return defVal; -} - -string ZConfigFile::GetString(string section, string var, string defVal) -{ - string val; - - section = CleanString(section); - var = CleanString(var); - - section = '[' + section + ']'; - - val = CleanString(GetVariable(section,var,defVal)); - if(val == CleanString(defVal)) - val = defVal; - - - if(val[0] == '\"' && val[val.length()-1] == '\"') - return val.substr(1,val.length()-2); //chop off quotes - else - return val; -} - -void ZConfigFile::SetInt(string section, string var, int val) -{ - char buf[20]; - sprintf(buf,"%d",val); - - section = '[' + section + ']'; - SetVariable(section,var,buf); -} - -void ZConfigFile::SetBool(string section, string var, bool val) -{ - string tmp = val ? "true" : "false"; - - section = '[' + section + ']'; - SetVariable(section,var,tmp); -} - -void ZConfigFile::SetString(string section, string var, string val) -{ - section = '[' + section + ']'; - val = "\"" + val + "\""; - SetVariable(section,var,val); -} - -void ZConfigFile::Flush() -{ - list::iterator secIter; - list::iterator varIter; - string secName; - - //in case the filename is already cleared somehow - if(mFilename.length()) - { - ofstream cfile(mFilename.c_str(), ios::out|ios::trunc); - - if(cfile) - { - //iteration through sections - for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) - { - //ensure that section is valid - secName = CleanString((*secIter).section); - if(secName.length() && secName[0] == '[' && secName[secName.length()-1] == ']') - { - cfile << (*secIter).section << endl; //write out raw section title - - //for each variable in section, write out variable=value - for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) - { - if(CleanString((*varIter).var).length()) //ensures that variable is valid - cfile << (*varIter).var << '=' << (*varIter).val << endl; - } - } - } - cfile.close(); - } - } -} - -void ZConfigFile::Close() -{ - Flush(); - mFilename = ""; -} - -} +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZConfigFile.cpp
    +Description: Implementation source file for ZConfigFile, the ZEngine INI-Style Config File.
    +Author(s): James Turk
    +$Id: ZE_ZConfigFile.cpp,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZConfigFile.cpp + \brief Source file for ZConfigFile. + + Implementation of ZConfigFile, the ZEngine INI-Style Config File. +**/ + +#include "ZE_ZConfigFile.h" + +namespace ZE +{ + +string ZConfigFile::CleanString(string str) +{ + string tmpStr; + bool inQuotes = false; + + //cycle through, only copy spaces and if a character is uppercase, convert it to lowercase + for(string::size_type i = 0; i < str.length(); i++) + { + if(!isspace(str[i]) || inQuotes) + { + if(str[i] == '\"') + inQuotes = !inQuotes; + if(isupper(str[i]) && !inQuotes) + str[i] = static_cast(tolower(str[i])); + tmpStr += str[i]; + } + } + return tmpStr; +} + +bool ZConfigFile::Exists(string sec) +{ + list::iterator secIter; + + sec = CleanString(sec); + + for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) + { + if(CleanString((*secIter).section) == sec) + return true; + } + return false; +} + +bool ZConfigFile::Exists(string sec, string var) +{ + list::iterator secIter; + list::iterator varIter; + + sec = CleanString(sec); + var = CleanString(var); + + for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) + { + if(CleanString((*secIter).section) == sec) + { + for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) + { + if(CleanString((*varIter).var) == var) + return true; + } + } + } + return false; +} + +void ZConfigFile::SetVariable(string sec, string var, string val) +{ + list::iterator secIter; + list::iterator varIter; + + if(Exists(CleanString(sec))) + { + sec = CleanString(sec); + for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) + { + if(CleanString((*secIter).section) == sec) //if this is the section + { + if(Exists(sec,var)) + { + var = CleanString(var); + for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) + { + if(CleanString((*varIter).var) == var) //if this is the variable + { + (*varIter).val = val; + break; //break from this loop + } + } + break; //done in the for loop, time to go + } + else + { + ZCF_Variable tempVar; + tempVar.var = var; + (*secIter).varList.push_back(tempVar); + SetVariable(sec,var,val); + } + } + } + } + else + { + ZCF_Section tempSec; + tempSec.section = sec; + mFileLayout.push_back(tempSec); + SetVariable(sec,var,val); + } +} + +string ZConfigFile::GetVariable(string sec, string var, string defVal) +{ + list::iterator secIter; + list::iterator varIter; + + sec = CleanString(sec); + var = CleanString(var); + + if(Exists(sec)) + { + for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) + { + if(CleanString((*secIter).section) == sec) //if this is the section + { + if(Exists(sec,var)) + { + for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) + { + if(CleanString((*varIter).var) == var) //if this is the variable + return (*varIter).val; //return now + } + break; //done in the for loop, time to go + } + else + { + return defVal; + break; + } + } + } + } + + return defVal; //if it gets to the end just return the default +} + +ZConfigFile::ZConfigFile() {} + +ZConfigFile::ZConfigFile(string mFilename) +{ + Process(mFilename); +} + +ZConfigFile::~ZConfigFile() +{ + Close(); +} + +void ZConfigFile::Process(string filename) +{ + mFilename = filename; + + ifstream cfile(mFilename.c_str()); + string section, str, var, tmp; + + mFileLayout.clear(); + + while(!cfile.eof() && cfile.is_open()) + { + getline(cfile,str); //read in a line + tmp = CleanString(str); //get a clean version + + //if string is bracketed it is a section, if it begins in a letter it is a variable + if(tmp[0] == '[' && tmp[tmp.length()-1] == ']') + section = str; + else if(isalpha(tmp[0])) + { + var = str.substr(0,str.find('=')); //split the string at the equals sign + SetVariable(section,var,str.substr(str.find('=')+1,str.length()-var.length()-1)); + } + } + cfile.close(); +} + +int ZConfigFile::GetInt(string section, string var, int defVal) +{ + string val; + char tmp[20]; + + section = CleanString(section); + var = CleanString(var); + + section = '[' + section + ']'; + + sprintf(tmp,"%d",defVal); + val = GetVariable(section,var,tmp); + + if(!atoi(val.c_str()) && val[0] !='0') //if it is zero but doesn't start with a zero + return defVal; + else + return atoi(val.c_str()); +} + +bool ZConfigFile::GetBool(string section, string var, bool defVal) +{ + string val,tmp; + + section = CleanString(section); + var = CleanString(var); + + section = '[' + section + ']'; + + tmp = defVal ? "true" : "false"; + val = CleanString(GetVariable(section,var,tmp)); + + if(val == "true" || val == "1") + return true; + else if(val == "false" || val == "0") + return false; + else + return defVal; +} + +string ZConfigFile::GetString(string section, string var, string defVal) +{ + string val; + + section = CleanString(section); + var = CleanString(var); + + section = '[' + section + ']'; + + val = CleanString(GetVariable(section,var,defVal)); + if(val == CleanString(defVal)) + val = defVal; + + + if(val[0] == '\"' && val[val.length()-1] == '\"') + return val.substr(1,val.length()-2); //chop off quotes + else + return val; +} + +void ZConfigFile::SetInt(string section, string var, int val) +{ + char buf[20]; + sprintf(buf,"%d",val); + + section = '[' + section + ']'; + SetVariable(section,var,buf); +} + +void ZConfigFile::SetBool(string section, string var, bool val) +{ + string tmp = val ? "true" : "false"; + + section = '[' + section + ']'; + SetVariable(section,var,tmp); +} + +void ZConfigFile::SetString(string section, string var, string val) +{ + section = '[' + section + ']'; + val = "\"" + val + "\""; + SetVariable(section,var,val); +} + +void ZConfigFile::Flush() +{ + list::iterator secIter; + list::iterator varIter; + string secName; + + //in case the filename is already cleared somehow + if(mFilename.length()) + { + ofstream cfile(mFilename.c_str(), ios::out|ios::trunc); + + if(cfile) + { + //iteration through sections + for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++) + { + //ensure that section is valid + secName = CleanString((*secIter).section); + if(secName.length() && secName[0] == '[' && secName[secName.length()-1] == ']') + { + cfile << (*secIter).section << endl; //write out raw section title + + //for each variable in section, write out variable=value + for(varIter = (*secIter).varList.begin(); varIter != (*secIter).varList.end(); varIter++) + { + if(CleanString((*varIter).var).length()) //ensures that variable is valid + cfile << (*varIter).var << '=' << (*varIter).val << endl; + } + } + } + cfile.close(); + } + } +} + +void ZConfigFile::Close() +{ + Flush(); + mFilename = ""; +} + +} diff --git a/src/ZE_ZEngine.cpp b/src/ZE_ZEngine.cpp index 80a86d6..8c6956c 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.2 2002/11/28 23:19:55 cozman Exp $
    +$Id: ZE_ZEngine.cpp,v 1.3 2002/12/01 07:56:17 cozman Exp $
    \file ZE_ZEngine.cpp \brief Central source file for ZEngine. @@ -94,7 +94,8 @@ void ZEngine::SetupSound(int rate, bool stereo) void ZEngine::CreateDisplay(string title, string icon) { Uint32 flags; - ImageData iconImg; + SDL_Surface *iconImg; + int rgb_size[3]; if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO) < 0) { @@ -106,9 +107,6 @@ void ZEngine::CreateDisplay(string title, string icon) Mix_OpenAudio(mRate, AUDIO_S16SYS, mStereo?2:1, 4096); //Open Audio Stream (Stereo?2:1 is conditional for number of channels) #endif -#ifdef USE_OPENGL_2D - int rgb_size[3]; - switch (mBPP) { case 8: @@ -128,25 +126,18 @@ void ZEngine::CreateDisplay(string title, string icon) rgb_size[2] = 8; break; } - SDL_GL_SetAttribute( SDL_GL_RED_SIZE, rgb_size[0] ); - SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, rgb_size[1] ); - SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, rgb_size[2] ); - SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); + SDL_GL_SetAttribute(SDL_GL_RED_SIZE, rgb_size[0]); + SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, rgb_size[1]); + SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, rgb_size[2]); + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, mBPP); + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0); + SDL_GL_SetAttribute(SDL_GL_ACCUM_RED_SIZE, 0); + SDL_GL_SetAttribute(SDL_GL_ACCUM_GREEN_SIZE, 0); + SDL_GL_SetAttribute(SDL_GL_ACCUM_BLUE_SIZE, 0); + SDL_GL_SetAttribute(SDL_GL_ACCUM_ALPHA_SIZE, 0); flags = SDL_OPENGL; -#else //!USE_OPENGL_2D - SDL_VideoInfo *videoInfo = const_cast(SDL_GetVideoInfo()); - - flags = SDL_DOUBLEBUF|SDL_HWPALETTE; - //check capabilities and use what we can// - if(videoInfo->hw_available) - flags |= SDL_HWSURFACE; - else - flags |= SDL_SWSURFACE; - if(videoInfo->blit_hw) - flags |= SDL_HWACCEL; -#endif //USE_OPENGL_2D //Window Manager settings// if(!icon.length()) @@ -155,7 +146,7 @@ void ZEngine::CreateDisplay(string title, string icon) { SDL_WM_SetCaption(title.c_str(),icon.c_str()); iconImg = LoadImage(icon); - SDL_WM_SetIcon(iconImg.image,NULL); + SDL_WM_SetIcon(iconImg,NULL); FreeImage(iconImg); } @@ -163,46 +154,19 @@ void ZEngine::CreateDisplay(string title, string icon) if(mFullscreen) flags |= SDL_FULLSCREEN; mScreen = SDL_SetVideoMode(mWidth, mHeight, mBPP, flags); - - mWidth = mScreen->w; - mHeight = mScreen->h; - mBPP = mScreen->format->BitsPerPixel; - -#ifdef USE_OPENGL_2D - //OpenGL code from SDL project testgl.c// - glViewport(0,0,mWidth,mHeight); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glPushAttrib(GL_ENABLE_BIT); - glDisable(GL_DEPTH_TEST); - glDisable(GL_CULL_FACE); - glEnable(GL_TEXTURE_2D); - - /* This allows alpha blending of 2D textures with the scene*/ - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glViewport(0, 0, mWidth, mHeight); - - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - - glOrtho(0.0, (GLdouble)mWidth, (GLdouble)mHeight, 0.0, 0.0, 1.0); - - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); - - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); -#endif //USE_OPENGL_2D if(!mScreen) { LogError(FormatStr("Unable to set video mode %dx%d (%dBpp): %s",mWidth,mHeight,mBPP,SDL_GetError())); CloseDisplay(); } + + mWidth = mScreen->w; + mHeight = mScreen->h; + mBPP = mScreen->format->BitsPerPixel; + + SetGL2D(); + mKeyPressed = SDL_GetKeyState(NULL); #ifdef USE_SDL_TTF @@ -237,24 +201,41 @@ SDL_Surface *ZEngine::Display() void ZEngine::UpdateScreen() { -#ifdef USE_OPENGL_2D SDL_GL_SwapBuffers(); -#else //!USE_OPENGL_2D - SDL_Flip(mScreen); -#endif //USE_OPENGL_2D mSecPerFrame = (GetTime()-mLastTime)/1000.0; mLastTime = GetTime(); } -Uint32 ZEngine::MapColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a) +void ZEngine::Clear(float red, float green, float blue, float alpha) { - return SDL_MapRGBA(mScreen->format,r,g,b,a); + glClearColor(red,green,blue,alpha); + glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + glLoadIdentity(); } -void ZEngine::Clear(Uint32 color, SDL_Rect *rect) +void ZEngine::SetGL2D() { - SDL_FillRect(mScreen,rect,color); + glPushAttrib(GL_ENABLE_BIT); + glDisable(GL_DEPTH_TEST); + glDisable(GL_CULL_FACE); + glEnable(GL_TEXTURE_2D); + + /* This allows alpha blending of 2D textures with the scene*/ + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + + glViewport(0, 0, mWidth, mHeight); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + + glOrtho(0.0, (GLdouble)mWidth, (GLdouble)mHeight, 0.0, 0.0, 1.0); + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); } void ZEngine::Delay(Uint32 milliseconds) @@ -420,10 +401,9 @@ void ZEngine::AddPhysFSDir(string dir) #endif //USE_PHYSFS -ImageData ZEngine::LoadImage(string filename) +SDL_Surface* ZEngine::LoadImage(string filename) { - ImageData img; - + SDL_Surface *image; //using physfs// #ifdef USE_PHYSFS SDL_RWops *rw; @@ -431,9 +411,9 @@ ImageData ZEngine::LoadImage(string filename) if(!rw) LogError(FormatStr("PhysFS RWops failed: %s",SDL_GetError())); #ifdef USE_SDL_IMAGE - img.image = IMG_Load_RW(rw,0); + image = IMG_Load_RW(rw,0); #else - img.image = SDL_LoadBMP_RW(rw,0); + image = SDL_LoadBMP_RW(rw,0); #endif //USE_SDL_IMAGE SDL_FreeRW(rw); //end using physfs// @@ -441,72 +421,48 @@ ImageData ZEngine::LoadImage(string filename) //Just SDL// #else #ifdef USE_SDL_IMAGE - img.image = IMG_Load(filename.c_str()); + image = IMG_Load(filename.c_str()); #else - img.image = SDL_LoadBMP(filename.c_str()); + image = SDL_LoadBMP(filename.c_str()); #endif //USE_SDL_IMAGE #endif //USE_PHYSFS - if(!img.image) + if(!image) { - img.filename = FormatStr("LoadImage could not load %s.",filename.c_str()); - LogError(img.filename); + LogError(FormatStr("LoadImage could not load %s.",filename.c_str())); + return NULL; } else - img.filename = filename; - - return img; -} - -void ZEngine::FreeImage(ImageData &image) -{ - if(image.image) - { - SDL_FreeSurface(image.image); - image.image = NULL; - image.filename = "free"; - } + return image; } #ifdef USE_SDL_MIXER -SoundData ZEngine::LoadSound(string filename) +Mix_Chunk* ZEngine::LoadSound(string filename) { - SoundData snd; + Mix_Chunk *sound; #ifdef USE_PHYSFS SDL_RWops *rw; rw = PHYSFSRWOPS_openRead(filename.c_str()); - snd.sound = Mix_LoadWAV_RW(rw,0); + sound = Mix_LoadWAV_RW(rw,0); SDL_FreeRW(rw); #else - snd.sound = Mix_LoadWAV(filename.c_str()); + sound = Mix_LoadWAV(filename.c_str()); #endif //USE_PHYSFS - if(!snd.sound) + if(!sound) { - snd.filename = FormatStr("LoadSound could not load %s.",filename.c_str()); - LogError(snd.filename); + LogError(FormatStr("LoadImage could not load %s.",filename.c_str())); + return NULL; } else - snd.filename = filename; - - return snd; + return sound; } -void ZEngine::FreeSound(SoundData &sound) +Mix_Music* ZEngine::LoadMusic(string filename) { - if(sound.sound) - { - Mix_FreeChunk(sound.sound); - sound.sound = NULL; - sound.filename = "free"; - } -} - -MusicData ZEngine::LoadMusic(string filename) -{ - MusicData mus; + Mix_Music *music; //Currently SDL_Mixer doesn't support Music from a RW //#ifdef USE_PHYSFS @@ -515,37 +471,25 @@ MusicData ZEngine::LoadMusic(string filename) // mus.music = Mix_LoadMUS_RW(filename.c_str(),0); // SDL_FreeRW(rw); //#else - mus.music = Mix_LoadMUS(filename.c_str()); + music = Mix_LoadMUS(filename.c_str()); //#endif //USE_PHYSFS - if(!mus.music) + if(!music) { - mus.filename = FormatStr("LoadMusic could not load %s.",filename.c_str()); - LogError(mus.filename); + LogError(FormatStr("LoadMusic could not load %s.",filename.c_str())); + return NULL; } else - mus.filename = filename; - - return mus; -} - -void ZEngine::FreeMusic(MusicData &music) -{ - if(music.music) - { - Mix_FreeMusic(music.music); - music.music = NULL; - music.filename = "free"; - } + return music; } #endif #ifdef USE_SDL_TTF -FontData ZEngine::LoadFont(string filename, int size) +TTF_Font* ZEngine::LoadFont(string filename, int size) { - FontData fnt; + TTF_Font *font; //Currently SDL_ttf doesn't support Fonts from a RW //#ifdef USE_PHYSFS @@ -554,28 +498,16 @@ FontData ZEngine::LoadFont(string filename, int size) // fnt.font = TTF_OpenFontRW(rw,0); // SDL_FreeRW(rw); //#else - fnt.font = TTF_OpenFont(filename.c_str(),size); + font = TTF_OpenFont(filename.c_str(),size); //#endif //USE_PHYSFS - if(!fnt.font) + if(!font) { - fnt.filename = FormatStr("LoadFont could not load %s.",filename.c_str()); - LogError(fnt.filename); + LogError(FormatStr("LoadFont could not load %s.",filename.c_str())); + return NULL; } else - fnt.filename = filename; - - return fnt; -} - -void ZEngine::FreeFont(FontData &font) -{ - if(font.font) - { - TTF_CloseFont(font.font); - font.font = NULL; - font.filename = "free"; - } + return font; } diff --git a/src/ZE_ZFont.cpp b/src/ZE_ZFont.cpp index 69057a9..12d3e67 100644 --- a/src/ZE_ZFont.cpp +++ b/src/ZE_ZFont.cpp @@ -1,203 +1,205 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZFont.cpp
    -Description: Implementation source file for core ZEngine Font Object.
    -Author(s): James Turk
    -$Id: ZE_ZFont.cpp,v 1.1 2002/11/21 05:41:13 cozman Exp $
    - - \file ZE_ZFont.cpp - \brief Source file for ZFont. - - Implementation of ZFont, the basic Font class for ZEngine. -**/ - -#include "ZE_ZFont.h" - -#ifdef USE_SDL_TTF - -namespace ZE -{ - - -ZFont::ZFont() -{ - rColor.r = rColor.g = rColor.b = rColor.unused = 255; - rBGColor.r = rBGColor.g = rBGColor.b = rBGColor.unused = 0; -} - -ZFont::ZFont(string filename, int size) -{ - rColor.r = rColor.g = rColor.b = rColor.unused = 255; - rBGColor.r = rBGColor.g = rBGColor.b = rBGColor.unused = 0; - Open(filename,size); -} - -ZFont::~ZFont() -{ - Release(); -} - -void ZFont::Open(string filename, int size) -{ - Release(); - rFont = rEngine->LoadFont(filename,size); -} - -void ZFont::Release() -{ - rEngine->FreeFont(rFont); -} - -void ZFont::DrawText(string text, ZImage &image) -{ - image.Attach(TTF_RenderText_Solid(rFont.font, text.c_str(), rColor)); -} - -void ZFont::DrawShadedText(string text, ZImage &image) -{ - image.Attach(TTF_RenderText_Shaded(rFont.font, text.c_str(), rColor, rBGColor)); -} - -void ZFont::SetColor(Uint8 r, Uint8 g, Uint8 b) -{ - rColor.r = r; - rColor.g = g; - rColor.b = b; -} - -void ZFont::SetBGColor(Uint8 r, Uint8 g, Uint8 b) -{ - rBGColor.r = r; - rBGColor.g = g; - rBGColor.b = b; -} - -void ZFont::SetStyle(bool Bold, bool Italic, bool Underline) -{ - int flags=0; - - if(Bold) - flags |= TTF_STYLE_BOLD; - if(Italic) - flags |= TTF_STYLE_ITALIC; - if(Underline) - flags |= TTF_STYLE_UNDERLINE; - if(!flags) - flags = TTF_STYLE_NORMAL; - - if(rFont.font) - TTF_SetFontStyle(rFont.font,flags); - else - LogError(FormatStr("ZFont not initialized in ZFont::SetStyle(), filename: %s.",rFont.filename.c_str())); -} - -void ZFont::Resize(int size) -{ - Open(rFont.filename,size); -} - -bool ZFont::IsLoaded() -{ - return rFont.font != NULL; -} - -bool ZFont::IsBold() -{ - if(rFont.font) - return (TTF_GetFontStyle(rFont.font) & TTF_STYLE_BOLD) > 0; - else - { - LogError(FormatStr("ZFont not initialized in ZFont::IsBold(), filename: %s.",rFont.filename.c_str())); - return false; - } -} - -bool ZFont::IsItalic() -{ - if(rFont.font) - return (TTF_GetFontStyle(rFont.font) & TTF_STYLE_ITALIC) > 0; - else - { - LogError(FormatStr("ZFont not initialized in ZFont::IsItalic(), filename: %s.",rFont.filename.c_str())); - return false; - } -} - -bool ZFont::IsUnderlined() -{ - if(rFont.font) - return (TTF_GetFontStyle(rFont.font) & TTF_STYLE_UNDERLINE) > 0; - else - { - LogError(FormatStr("ZFont not initialized in ZFont::IsUnderlined(), filename: %s.",rFont.filename.c_str())); - return false; - } -} - -int ZFont::GetHeight() -{ - if(rFont.font) - return TTF_FontHeight(rFont.font); - else - { - LogError(FormatStr("ZFont not initialized in ZFont::GetHeight(), filename: %s.",rFont.filename.c_str())); - return 0; - } -} - -int ZFont::GetLineSkip() -{ - if(rFont.font) - return TTF_FontLineSkip(rFont.font); - else - { - LogError(FormatStr("ZFont not initialized in ZFont::GetLineSkip(), filename: %s.",rFont.filename.c_str())); - return 0; - } -} - -int ZFont::GetStringWidth(string text) -{ - int w,h; - - if(rFont.font) - { - TTF_SizeText(rFont.font,text.c_str(),&w,&h); - return w; - } - else - { - LogError(FormatStr("ZFont not initialized in ZFont::GetStringWidth(%s), filename: %s.",text.c_str(),rFont.filename.c_str())); - return 0; - } -} - -int ZFont::GetStringHeight(string text) -{ - int w,h; - - if(rFont.font) - { - TTF_SizeText(rFont.font,text.c_str(),&w,&h); - return h; - } - else - { - LogError(FormatStr("ZFont not initialized in ZFont::GetStringHeight(%s), filename: %s.",text.c_str(),rFont.filename.c_str())); - return 0; - } -} - -} - -#endif //USE_SDL_TTF +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZFont.cpp
    +Description: Implementation source file for core ZEngine Font Object.
    +Author(s): James Turk
    +$Id: ZE_ZFont.cpp,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZFont.cpp + \brief Source file for ZFont. + + Implementation of ZFont, the basic Font class for ZEngine. +**/ + +#include "ZE_ZFont.h" + +#ifdef USE_SDL_TTF + +namespace ZE +{ + + +ZFont::ZFont() +{ + rFont = NULL; + rColor.r = rColor.g = rColor.b = rColor.unused = 255; + rBGColor.r = rBGColor.g = rBGColor.b = rBGColor.unused = 0; +} + +ZFont::ZFont(string filename, int size) +{ + rFont = NULL; + rColor.r = rColor.g = rColor.b = rColor.unused = 255; + rBGColor.r = rBGColor.g = rBGColor.b = rBGColor.unused = 0; + Open(filename,size); +} + +ZFont::~ZFont() +{ + Release(); +} + +void ZFont::Open(string filename, int size) +{ + Release(); + rFont = rEngine->LoadFont(filename,size); +} + +void ZFont::Release() +{ + FreeFont(rFont); +} + +void ZFont::DrawText(string text, ZImage &image) +{ + image.Attach(TTF_RenderText_Solid(rFont, text.c_str(), rColor)); +} + +void ZFont::DrawShadedText(string text, ZImage &image) +{ + image.Attach(TTF_RenderText_Shaded(rFont, text.c_str(), rColor, rBGColor)); +} + +void ZFont::SetColor(Uint8 r, Uint8 g, Uint8 b) +{ + rColor.r = r; + rColor.g = g; + rColor.b = b; +} + +void ZFont::SetBGColor(Uint8 r, Uint8 g, Uint8 b) +{ + rBGColor.r = r; + rBGColor.g = g; + rBGColor.b = b; +} + +void ZFont::SetStyle(bool Bold, bool Italic, bool Underline) +{ + int flags=0; + + if(Bold) + flags |= TTF_STYLE_BOLD; + if(Italic) + flags |= TTF_STYLE_ITALIC; + if(Underline) + flags |= TTF_STYLE_UNDERLINE; + if(!flags) + flags = TTF_STYLE_NORMAL; + + if(rFont) + TTF_SetFontStyle(rFont,flags); + else + LogError("ZFont not initialized in ZFont::SetStyle."); +} + +void ZFont::Resize(int size) +{ + Open(rFilename,size); +} + +bool ZFont::IsLoaded() +{ + return rFont != NULL; +} + +bool ZFont::IsBold() +{ + if(rFont) + return (TTF_GetFontStyle(rFont) & TTF_STYLE_BOLD) > 0; + else + { + LogError("ZFont not initialized in ZFont::IsBold."); + return false; + } +} + +bool ZFont::IsItalic() +{ + if(rFont) + return (TTF_GetFontStyle(rFont) & TTF_STYLE_ITALIC) > 0; + else + { + LogError("ZFont not initialized in ZFont::IsItalic."); + return false; + } +} + +bool ZFont::IsUnderlined() +{ + if(rFont) + return (TTF_GetFontStyle(rFont) & TTF_STYLE_UNDERLINE) > 0; + else + { + LogError("ZFont not initialized in ZFont::IsUnderlined."); + return false; + } +} + +int ZFont::Height() +{ + if(rFont) + return TTF_FontHeight(rFont); + else + { + LogError("ZFont not initialized in ZFont::GetHeight."); + return 0; + } +} + +int ZFont::LineSkip() +{ + if(rFont) + return TTF_FontLineSkip(rFont); + else + { + LogError("ZFont not initialized in ZFont::GetLineSkip."); + return 0; + } +} + +int ZFont::StringWidth(string text) +{ + int w,h; + + if(rFont) + { + TTF_SizeText(rFont,text.c_str(),&w,&h); + return w; + } + else + { + LogError("ZFont not initialized in ZFont::GetStringWidth."); + return 0; + } +} + +int ZFont::StringHeight(string text) +{ + int w,h; + + if(rFont) + { + TTF_SizeText(rFont,text.c_str(),&w,&h); + return h; + } + else + { + LogError("ZFont not initialized in ZFont::GetStringHeight."); + return 0; + } +} + +} + +#endif //USE_SDL_TTF diff --git a/src/ZE_ZImage.cpp b/src/ZE_ZImage.cpp index 2d8ad24..fb6d16f 100644 --- a/src/ZE_ZImage.cpp +++ b/src/ZE_ZImage.cpp @@ -1,214 +1,191 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZImage.cpp
    -Description: Implementation source file for core ZEngine Image Object.
    -Author(s): James Turk
    -$Id: ZE_ZImage.cpp,v 1.2 2002/11/28 23:19:55 cozman Exp $
    - - \file ZE_ZImage.cpp - \brief Source file for ZImage. - - Implementation of ZImage, the basic Image class for ZEngine. -**/ - -#include "ZE_ZImage.h" - -namespace ZE -{ - -ZImage::ZImage() -{ -} - -ZImage::ZImage(string filename) -{ - Open(filename); -} - -ZImage::ZImage(SDL_Surface *surface) -{ - Attach(surface); -} - -ZImage::ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h) -{ - OpenFromImage(img,x,y,w,h); -} - -ZImage::~ZImage() -{ - Release(); -} - -void ZImage::Open(string filename) -{ - Release(); - rImage = rEngine->LoadImage(filename); -} - -void ZImage::OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h) -{ - Uint32 flags; - SDL_Surface *screen = rEngine->Display(); - SDL_Rect rect; - SDL_VideoInfo *videoInfo; - - Release(); - rImage.filename = "cut from image"; - - //either set hardware or software surface// - videoInfo = const_cast(SDL_GetVideoInfo()); - - if(videoInfo->hw_available) - flags = SDL_HWSURFACE; - else - flags = SDL_SWSURFACE; - - rect.x = x; - rect.y = y; - rect.w = w; - rect.h = h; - - if(!img) - LogError("Invalid Parameter to ZImage::OpenFromImage: img==NULL"); - - rImage.image = SDL_CreateRGBSurface(flags, rect.w, rect.h, rEngine->BPP(), - screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); - - if(!rImage.image) - LogError(FormatStr("SDL_CreateRGBSurface failed in ZImage::OpenFromImage: %s",SDL_GetError())); - - SDL_BlitSurface(img,&rect,rImage.image,NULL); -} - -void ZImage::Attach(SDL_Surface *surface) -{ - Release(); - rImage.filename = "attached"; - rImage.image = surface; -} - -void ZImage::Release() -{ - rEngine->FreeImage(rImage); -} - -void ZImage::SetAlpha(Uint8 alpha) -{ - SDL_Surface *temp=NULL; - - if(rImage.image) - { - if(SDL_SetAlpha(rImage.image, SDL_RLEACCEL|SDL_SRCALPHA, alpha) < 0) - LogError("Invalid Call to SDL_SetAlpha."); - else - { - //surface conversion// - temp = rImage.image; - rImage.image = SDL_DisplayFormat(temp); - if(rImage.image) - { - SDL_FreeSurface(temp); - temp = NULL; - } - else //can't convert (add error warning here?) - { - LogError("Alpha surface conversion failed."); - rImage.image = temp; - } - } - } - else - LogError("ZImage not initialized in ZImage::SetAlpha."); -} - -void ZImage::SetColorKey(Uint32 color) -{ - SDL_Surface *temp=NULL; - - if(rImage.image) - { - if(SDL_SetColorKey(rImage.image, SDL_RLEACCEL|SDL_SRCCOLORKEY, color) < 0) - LogError("Invalid Call to SDL_SetColorKey."); - else - { - //surface conversion// - temp = rImage.image; - rImage.image = SDL_DisplayFormat(temp); - if(rImage.image) - { - SDL_FreeSurface(temp); - temp = NULL; - } - else //can't convert (add error warning here?) - { - LogError("Surface conversion failed."); - rImage.image = temp; - } - } - } - else - LogError("ZImage not initialized in ZImage::SetColorKey."); -} - -void ZImage::Draw(Sint16 x, Sint16 y) -{ - SDL_Rect rect; - - rect.x = x; - rect.y = y; - - if(rImage.image) - SDL_BlitSurface(rImage.image,NULL,rEngine->Display(),&rect); - else - LogError("ZImage not initialized in ZImage::Draw."); -} - -bool ZImage::IsLoaded() -{ - return rImage.image != NULL; -} - -SDL_Surface *ZImage::GetImage() -{ - return rImage.image; -} - -int ZImage::GetWidth() -{ - if(rImage.image) - return rImage.image->w; - else - { - LogError("ZImage not initialized in ZImage::GetWidth."); - return 0; - } -} - -int ZImage::GetHeight() -{ - if(rImage.image) - return rImage.image->h; - else - { - LogError("ZImage not initialized in ZImage::GetHeight."); - return 0; - } -} - -string ZImage::GetFilename() -{ - return rImage.filename.c_str(); -} - -} +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZImage.cpp
    +Description: Implementation source file for core ZEngine Image or Texture Object.
    +Author(s): James Turk, Gamer Tazar
    +$Id: ZE_ZImage.cpp,v 1.3 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZImage.cpp + \brief Source file for ZImage. + + Implementation of ZImage, the Image class for ZEngine. +**/ + +#include "ZE_ZImage.h" + +namespace ZE +{ + +ZImage::ZImage() +{ + rImage = NULL; + Release(); +} + +ZImage::ZImage(string filename) +{ + rImage = NULL; + Open(filename); +} + +ZImage::ZImage(SDL_Surface *surface) +{ + rImage = NULL; + Attach(surface); +} + +ZImage::ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h) +{ + rImage = NULL; + OpenFromImage(img,x,y,w,h); +} + +ZImage::~ZImage() +{ + Release(); +} + +void ZImage::Open(string filename) +{ + SDL_Surface *image; + + Release(); + image = rEngine->LoadImage(filename.c_str()); + Attach(image); +} + +void ZImage::OpenFromImage(SDL_Surface *image, Sint16 x, Sint16 y, Sint16 w, Sint16 h) +{ + SDL_Surface *screen = rEngine->Display(); + SDL_Surface *cutImg = NULL; + SDL_Rect rect; + SDL_VideoInfo *videoInfo; + + Release(); + + //either set hardware or software surface// + videoInfo = const_cast(SDL_GetVideoInfo()); + + rect.x = x; + rect.y = y; + rect.w = w; + rect.h = h; + + if(!image) + LogError("Invalid Parameter to ZImage::OpenFromImage."); + + cutImg = SDL_CreateRGBSurface(0, rect.w, rect.h, rEngine->BPP(), + screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask); + + if(!cutImg) + LogError(FormatStr("SDL_CreateRGBSurface failed in ZImage::OpenFromImage.")); + + SDL_BlitSurface(image,&rect,cutImg,NULL); + Attach(cutImg); +} + +void ZImage::Attach(SDL_Surface *surface) +{ + GLfloat coord[4]; + + //Release(); + if(surface) + { + rWidth = surface->w; + rHeight = surface->h; + rTexID = SDL_GL_LoadTexture(surface,coord); + rTexMaxX = coord[2]; //ignore first coords because they are always 0.0f + rTexMaxY = coord[3]; + rImage = surface; + } + else + LogError("Invalid surface passed to ZImage::Attach."); +} + +void ZImage::Release() +{ + if(glIsTexture(rTexID)) + glDeleteTextures(1,&rTexID); + rTexMaxX = rTexMaxY = 0.0f; + rTexID = rWidth = rHeight = 0; + FreeImage(rImage); +} + +void ZImage::SetColorKey(Uint8 red, Uint8 green, Uint8 blue) +{ + SDL_Surface *temp=NULL; + Uint32 color = SDL_MapRGB(rEngine->Display()->format,red,green,blue); + + if(rImage) + { + if(SDL_SetColorKey(rImage, SDL_SRCCOLORKEY, color) < 0) + LogError("Invalid Call to SDL_SetColorKey."); + else + { + //surface conversion// + temp = rImage; + rImage = SDL_DisplayFormatAlpha(temp); + if(rImage) + { + FreeImage(temp); + Attach(rImage); //Rebind new image. + } + else //can't convert + { + LogError("Surface conversion failed."); + rImage = temp; + } + } + } + else + LogError("ZImage not initialized in ZImage::SetColorKey."); +} + +void ZImage::Bind() +{ + glBindTexture(GL_TEXTURE_2D, rTexID); +} + +void ZImage::Draw(int x, int y) +{ + Bind(); + + glBegin(GL_TRIANGLE_STRIP); + glTexCoord2f(0.0f,0.0f); glVertex2i(x, y); + glTexCoord2f(rTexMaxX,0.0f); glVertex2i(x+rWidth, y); + glTexCoord2f(0.0f,rTexMaxY); glVertex2i(x, y+rHeight); + glTexCoord2f(rTexMaxX,rTexMaxY); glVertex2i(x+rWidth, y+rHeight); + glEnd(); +} + +bool ZImage::IsLoaded() +{ + return glIsTexture(rTexID) == GL_TRUE; +} + +SDL_Surface* ZImage::Surface() +{ + return rImage; +} + +int ZImage::Width() +{ + return rWidth; +} + +int ZImage::Height() +{ + return rHeight; +} + +} diff --git a/src/ZE_ZMusic.cpp b/src/ZE_ZMusic.cpp index 6eb2746..385acd1 100644 --- a/src/ZE_ZMusic.cpp +++ b/src/ZE_ZMusic.cpp @@ -1,160 +1,162 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZMusic.cpp
    -Description: Implementation source file for core ZEngine Music Object.
    -Author(s): James Turk
    -$Id: ZE_ZMusic.cpp,v 1.1 2002/11/21 05:41:13 cozman Exp $
    - - \file ZE_ZMusic.cpp - \brief Source file for ZMusic. - - Implementation of ZMusic, the basic Music class for ZEngine. -**/ - -#include "ZE_ZMusic.h" - -#ifdef USE_SDL_MIXER - -namespace ZE -{ - -const int ZMusic::LoopInfinite = -1; - -ZMusic::ZMusic() -{ -} - -ZMusic::ZMusic(string filename) -{ - Open(filename); -} - -ZMusic::~ZMusic() -{ - Release(); -} - -void ZMusic::Open(string filename) -{ - Release(); - rMusic = rEngine->LoadMusic(filename); -} - -void ZMusic::Release() -{ - Mix_HaltMusic(); - rEngine->FreeMusic(rMusic); -} - -void ZMusic::Play(int loopNum, int fadeTime) -{ - if(Mix_PlayingMusic()) //stop currently playing music - Mix_HaltMusic(); - - if(rMusic.music) - { - if(fadeTime) - Mix_FadeInMusic(rMusic.music, loopNum, fadeTime); - else - Mix_PlayMusic(rMusic.music, loopNum); - } - else - LogError(FormatStr("ZMusic not initialized in ZMusic::Play(%d,%d), filename: %s.",loopNum,fadeTime,rMusic.filename.c_str())); -} - -void ZMusic::Pause() -{ - if(rMusic.music) - Mix_PauseMusic(); - else - LogError(FormatStr("ZMusic not initialized in ZMusic::Pause(), filename: %s.",rMusic.filename.c_str())); -} - -void ZMusic::Unpause() -{ - if(rMusic.music) - Mix_ResumeMusic(); - else - LogError(FormatStr("ZMusic not initialized in ZMusic::Unpause(), filename: %s.",rMusic.filename.c_str())); -} - -void ZMusic::Rewind() -{ - if(rMusic.music) - Mix_RewindMusic(); - else - LogError(FormatStr("ZMusic not initialized in ZMusic::Rewind(), filename: %s.",rMusic.filename.c_str())); -} - -void ZMusic::Stop(int fadeTime) -{ - if(rMusic.music) - { - if(fadeTime) - Mix_FadeOutMusic(fadeTime); - else - Mix_HaltMusic(); - } - else - LogError(FormatStr("ZMusic not initialized in ZMusic::Stop(%d), filename: %s.",fadeTime,rMusic.filename.c_str())); -} - -void ZMusic::SetVolume(int volume) -{ - if(rMusic.music) - Mix_VolumeMusic(volume); - else - LogError(FormatStr("ZMusic not initialized in ZMusic::SetVolume(%d), filename: %s.",volume,rMusic.filename.c_str())); -} - -bool ZMusic::IsLoaded() -{ - return rMusic.music != NULL; -} - -bool ZMusic::IsPlaying() -{ - if(rMusic.music) - return Mix_PlayingMusic() > 0; - else - { - LogError(FormatStr("ZMusic not initialized in ZMusic::IsPlaying(), filename: %s.",rMusic.filename.c_str())); - return false; - } -} - -bool ZMusic::IsPaused() -{ - if(rMusic.music) - return Mix_PausedMusic() > 0; - else - { - LogError(FormatStr("ZMusic not initialized in ZMusic::IsPaused(), filename: %s.",rMusic.filename.c_str())); - return false; - } -} - -int ZMusic::GetVolume() -{ - if(rMusic.music) - return Mix_VolumeMusic(-1); - else - { - LogError(FormatStr("ZMusic not initialized in ZMusic::GetVolume(), filename: %s.",rMusic.filename.c_str())); - return false; - } -} - -} - -#endif +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZMusic.cpp
    +Description: Implementation source file for core ZEngine Music Object.
    +Author(s): James Turk
    +$Id: ZE_ZMusic.cpp,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZMusic.cpp + \brief Source file for ZMusic. + + Implementation of ZMusic, the basic Music class for ZEngine. +**/ + +#include "ZE_ZMusic.h" + +#ifdef USE_SDL_MIXER + +namespace ZE +{ + +const int ZMusic::LoopInfinite = -1; + +ZMusic::ZMusic() +{ + rMusic = NULL; +} + +ZMusic::ZMusic(string filename) +{ + rMusic = NULL; + Open(filename); +} + +ZMusic::~ZMusic() +{ + Release(); +} + +void ZMusic::Open(string filename) +{ + Release(); + rMusic = rEngine->LoadMusic(filename); +} + +void ZMusic::Release() +{ + Mix_HaltMusic(); + FreeMusic(rMusic); +} + +void ZMusic::Play(int loopNum, int fadeTime) +{ + if(Mix_PlayingMusic()) //stop currently playing music + Mix_HaltMusic(); + + if(rMusic) + { + if(fadeTime) + Mix_FadeInMusic(rMusic, loopNum, fadeTime); + else + Mix_PlayMusic(rMusic, loopNum); + } + else + LogError("ZMusic not initialized in ZMusic::Play."); +} + +void ZMusic::Pause() +{ + if(rMusic) + Mix_PauseMusic(); + else + LogError("ZMusic not initialized in ZMusic::Pause."); +} + +void ZMusic::Unpause() +{ + if(rMusic) + Mix_ResumeMusic(); + else + LogError("ZMusic not initialized in ZMusic::Unpause."); +} + +void ZMusic::Rewind() +{ + if(rMusic) + Mix_RewindMusic(); + else + LogError("ZMusic not initialized in ZMusic::Rewind."); +} + +void ZMusic::Stop(int fadeTime) +{ + if(rMusic) + { + if(fadeTime) + Mix_FadeOutMusic(fadeTime); + else + Mix_HaltMusic(); + } + else + LogError("ZMusic not initialized in ZMusic::Stop."); +} + +void ZMusic::SetVolume(int volume) +{ + if(rMusic) + Mix_VolumeMusic(volume); + else + LogError("ZMusic not initialized in ZMusic::SetVolume."); +} + +bool ZMusic::IsLoaded() +{ + return rMusic != NULL; +} + +bool ZMusic::IsPlaying() +{ + if(rMusic) + return Mix_PlayingMusic() > 0; + else + { + LogError("ZMusic not initialized in ZMusic::IsPlaying."); + return false; + } +} + +bool ZMusic::IsPaused() +{ + if(rMusic) + return Mix_PausedMusic() > 0; + else + { + LogError("ZMusic not initialized in ZMusic::IsPaused."); + return false; + } +} + +int ZMusic::Volume() +{ + if(rMusic) + return Mix_VolumeMusic(-1); + else + { + LogError("ZMusic not initialized in ZMusic::GetVolume."); + return false; + } +} + +} + +#endif diff --git a/src/ZE_ZSound.cpp b/src/ZE_ZSound.cpp index 9b11c0b..be3e373 100644 --- a/src/ZE_ZSound.cpp +++ b/src/ZE_ZSound.cpp @@ -1,156 +1,158 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZSound.cpp
    -Description: Implementation source file for core ZEngine Sound Object.
    -Author(s): James Turk
    -$Id: ZE_ZSound.cpp,v 1.1 2002/11/21 05:41:13 cozman Exp $
    - - \file ZE_ZSound.cpp - \brief Source file for ZSound. - - Implementation of ZSound, the basic Sound class for ZEngine. -**/ - -#include "ZE_ZSound.h" - -#ifdef USE_SDL_MIXER - -namespace ZE -{ - -const int ZSound::LoopInfinite = -1; - -ZSound::ZSound() -{ - rChannelID = -1; //request channel ID -} - -ZSound::ZSound(string filename) -{ - rChannelID = -1; //request channel ID - Open(filename); -} - -ZSound::~ZSound() -{ - Release(); -} - -void ZSound::Open(string filename) -{ - Release(); - rSound = rEngine->LoadSound(filename); -} - -void ZSound::Release() -{ - if(rChannelID >= 0) - Mix_HaltChannel(rChannelID); - rEngine->FreeSound(rSound); -} - -void ZSound::Play(int loopNum, int fadeTime) -{ - if(rChannelID >= 0 && Mix_Playing(rChannelID)) //stop currently playing sound - Mix_HaltChannel(rChannelID); - - if(rSound.sound) - { - if(fadeTime) - rChannelID = Mix_FadeInChannel(rChannelID, rSound.sound, loopNum, fadeTime); - else - rChannelID = Mix_PlayChannel(rChannelID, rSound.sound, loopNum); - } - else if(!rSound.sound) - LogError(FormatStr("ZSound not initialized in ZSound::Play(%d,%d), filename: %s.",loopNum,fadeTime,rSound.filename.c_str())); -} - -void ZSound::Pause() -{ - if(rSound.sound && rChannelID >= 0) - Mix_Pause(rChannelID); - else if(!rSound.sound) - LogError(FormatStr("ZSound not initialized in ZSound::Pause(), filename: %s.",rSound.filename.c_str())); -} - -void ZSound::Unpause() -{ - if(rSound.sound && rChannelID >= 0) - Mix_Resume(rChannelID); - else if(!rSound.sound) - LogError(FormatStr("ZSound not initialized in ZSound::Unpause(), filename: %s.",rSound.filename.c_str())); -} - -void ZSound::Stop(int fadeTime) -{ - if(rSound.sound && rChannelID >= 0) - { - if(fadeTime) - Mix_FadeOutChannel(rChannelID,fadeTime); - else - Mix_HaltChannel(rChannelID); - } - else if(!rSound.sound) - LogError(FormatStr("ZSound not initialized in ZSound::Stop(%d), filename: %s.",fadeTime,rSound.filename.c_str())); -} - -void ZSound::SetVolume(int volume) -{ - if(rSound.sound) - Mix_VolumeChunk(rSound.sound,volume); - else - LogError(FormatStr("ZSound not initialized in ZSound::SetVolume(%d), filename: %s.",volume,rSound.filename.c_str())); -} - -bool ZSound::IsLoaded() -{ - return rSound.sound != NULL; -} - -bool ZSound::IsPlaying() -{ - if(rSound.sound && rChannelID >= 0) - return Mix_Playing(rChannelID) > 0; - else - { - if(rChannelID >= 0) - LogError(FormatStr("ZSound not initialized in ZSound::IsPlaying(), filename: %s.",rSound.filename.c_str())); - return false; - } -} - -bool ZSound::IsPaused() -{ - if(rSound.sound && rChannelID >= 0) - return Mix_Paused(rChannelID) > 0; - else - { - LogError(FormatStr("ZSound not initialized in ZSound::IsPaused(), filename: %s.",rSound.filename.c_str())); - return false; - } -} - -int ZSound::GetVolume() -{ - if(rSound.sound) - return Mix_VolumeChunk(rSound.sound,-1); - else - { - LogError(FormatStr("ZSound not initialized in ZSound::GetVolume(), filename: %s.",rSound.filename.c_str())); - return false; - } -} - -} - -#endif +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZSound.cpp
    +Description: Implementation source file for core ZEngine Sound Object.
    +Author(s): James Turk
    +$Id: ZE_ZSound.cpp,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZSound.cpp + \brief Source file for ZSound. + + Implementation of ZSound, the basic Sound class for ZEngine. +**/ + +#include "ZE_ZSound.h" + +#ifdef USE_SDL_MIXER + +namespace ZE +{ + +const int ZSound::LoopInfinite = -1; + +ZSound::ZSound() +{ + rSound = NULL; + rChannelID = -1; //request channel ID +} + +ZSound::ZSound(string filename) +{ + rSound = NULL; + rChannelID = -1; //request channel ID + Open(filename); +} + +ZSound::~ZSound() +{ + Release(); +} + +void ZSound::Open(string filename) +{ + Release(); + rSound = rEngine->LoadSound(filename); +} + +void ZSound::Release() +{ + if(rChannelID >= 0) + Mix_HaltChannel(rChannelID); + FreeSound(rSound); +} + +void ZSound::Play(int loopNum, int fadeTime) +{ + if(rChannelID >= 0 && Mix_Playing(rChannelID)) //stop currently playing sound + Mix_HaltChannel(rChannelID); + + if(rSound) + { + if(fadeTime) + rChannelID = Mix_FadeInChannel(rChannelID, rSound, loopNum, fadeTime); + else + rChannelID = Mix_PlayChannel(rChannelID, rSound, loopNum); + } + else if(!rSound) + LogError("ZSound not initialized in ZSound::Play."); +} + +void ZSound::Pause() +{ + if(rSound && rChannelID >= 0) + Mix_Pause(rChannelID); + else if(!rSound) + LogError("ZSound not initialized in ZSound::Pause."); +} + +void ZSound::Unpause() +{ + if(rSound && rChannelID >= 0) + Mix_Resume(rChannelID); + else if(!rSound) + LogError("ZSound not initialized in ZSound::Unpause."); +} + +void ZSound::Stop(int fadeTime) +{ + if(rSound && rChannelID >= 0) + { + if(fadeTime) + Mix_FadeOutChannel(rChannelID,fadeTime); + else + Mix_HaltChannel(rChannelID); + } + else if(!rSound) + LogError("ZSound not initialized in ZSound::Stop."); +} + +void ZSound::SetVolume(int volume) +{ + if(rSound) + Mix_VolumeChunk(rSound,volume); + else + LogError("ZSound not initialized in ZSound::SetVolume."); +} + +bool ZSound::IsLoaded() +{ + return rSound != NULL; +} + +bool ZSound::IsPlaying() +{ + if(rSound && rChannelID >= 0) + return Mix_Playing(rChannelID) > 0; + else + { + if(rChannelID >= 0) + LogError("ZSound not initialized in ZSound::IsPlaying()."); + return false; + } +} + +bool ZSound::IsPaused() +{ + if(rSound && rChannelID >= 0) + return Mix_Paused(rChannelID) > 0; + else + { + LogError("ZSound not initialized in ZSound::IsPaused()."); + return false; + } +} + +int ZSound::Volume() +{ + if(rSound) + return Mix_VolumeChunk(rSound,-1); + else + { + LogError("ZSound not initialized in ZSound::GetVolume()."); + return -1; + } +} + +} + +#endif diff --git a/src/ZE_ZTimer.cpp b/src/ZE_ZTimer.cpp index 944f24c..eaf5265 100644 --- a/src/ZE_ZTimer.cpp +++ b/src/ZE_ZTimer.cpp @@ -1,81 +1,81 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (james@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -/*! -\par File Header: -File: ZE_ZTimer.cpp
    -Description: Implementation source file for core ZEngine Timer Object.
    -Author(s): James Turk
    -$Id: ZE_ZTimer.cpp,v 1.1 2002/11/21 05:41:13 cozman Exp $
    - - \file ZE_ZTimer.cpp - \brief Source file for ZTimer. - - Implementation of ZTimer, the basic Timer class for ZEngine. -**/ - -#include "ZE_ZTimer.h" - -namespace ZE -{ - -Uint32 ZTimer::GetParentTime() -{ - if(rUseZEngine) - return rEngine->GetTime(); - else - return SDL_GetTicks(); -} - -ZTimer::ZTimer(bool useZEngine) -{ - rUseZEngine = useZEngine; - rPaused = false; - Reset(); -} - -void ZTimer::Reset() -{ - rLastPause = rPausedTime = GetParentTime(); - rPaused = false; -} - -void ZTimer::Pause() -{ - if(!rPaused) - { - rLastPause = GetParentTime(); - rPaused = true; - } -} - -void ZTimer::Unpause() -{ - if(rPaused) - { - rPausedTime += (GetParentTime()-rLastPause); - rPaused = false; - } -} - -Uint32 ZTimer::GetTime() -{ - if(rPaused) - return GetParentTime() - (rPausedTime + (GetParentTime() - rLastPause)); - else - return GetParentTime() - rPausedTime; -} - -bool ZTimer::IsPaused() -{ - return rPaused; -} - -} +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (james@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_ZTimer.cpp
    +Description: Implementation source file for core ZEngine Timer Object.
    +Author(s): James Turk
    +$Id: ZE_ZTimer.cpp,v 1.2 2002/12/01 07:56:17 cozman Exp $
    + + \file ZE_ZTimer.cpp + \brief Source file for ZTimer. + + Implementation of ZTimer, the basic Timer class for ZEngine. +**/ + +#include "ZE_ZTimer.h" + +namespace ZE +{ + +Uint32 ZTimer::GetParentTime() +{ + if(rUseZEngine) + return rEngine->GetTime(); + else + return SDL_GetTicks(); +} + +ZTimer::ZTimer(bool useZEngine) +{ + rUseZEngine = useZEngine; + rPaused = false; + Reset(); +} + +void ZTimer::Reset() +{ + rLastPause = rPausedTime = GetParentTime(); + rPaused = false; +} + +void ZTimer::Pause() +{ + if(!rPaused) + { + rLastPause = GetParentTime(); + rPaused = true; + } +} + +void ZTimer::Unpause() +{ + if(rPaused) + { + rPausedTime += (GetParentTime()-rLastPause); + rPaused = false; + } +} + +Uint32 ZTimer::GetTime() +{ + if(rPaused) + return GetParentTime() - (rPausedTime + (GetParentTime() - rLastPause)); + else + return GetParentTime() - rPausedTime; +} + +bool ZTimer::IsPaused() +{ + return rPaused; +} + +} diff --git a/src/external/SDLGL_Util.cpp b/src/external/SDLGL_Util.cpp new file mode 100755 index 0000000..2d364c5 --- /dev/null +++ b/src/external/SDLGL_Util.cpp @@ -0,0 +1,89 @@ +/*This code comes from testgl.c which is part of the SDL source distribution. + Available at http://libsdl.org/ +*/ + +#include "external/SDLGL_Util.h" + +int power_of_two(int input) +{ + int value = 1; + + while ( value < input ) { + value <<= 1; + } + return value; +} + +GLuint SDL_GL_LoadTexture(SDL_Surface *surface, GLfloat *texcoord) +{ + GLuint texture; + int w, h; + SDL_Surface *image; + SDL_Rect area; + Uint32 saved_flags; + Uint8 saved_alpha; + + /* Use the surface width and height expanded to powers of 2 */ + w = power_of_two(surface->w); + h = power_of_two(surface->h); + texcoord[0] = 0.0f; //min X + texcoord[1] = 0.0f; //min Y + texcoord[2] = (GLfloat)surface->w / w; //max X + texcoord[3] = (GLfloat)surface->h / h; //max Y + + image = SDL_CreateRGBSurface( + SDL_SWSURFACE, + w, h, + 32, +#if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */ + 0x000000FF, + 0x0000FF00, + 0x00FF0000, + 0xFF000000 +#else + 0xFF000000, + 0x00FF0000, + 0x0000FF00, + 0x000000FF +#endif + ); + if ( image == NULL ) { + return 0; + } + + /* Save the alpha blending attributes */ + saved_flags = surface->flags&(SDL_SRCALPHA|SDL_RLEACCELOK); + saved_alpha = surface->format->alpha; + if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) { + SDL_SetAlpha(surface, 0, 0); + } + + /* Copy the surface into the GL texture image */ + area.x = 0; + area.y = 0; + area.w = static_cast(surface->w); + area.h = static_cast(surface->h); + SDL_BlitSurface(surface, &area, image, &area); + + /* Restore the alpha blending attributes */ + if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) { + SDL_SetAlpha(surface, saved_flags, saved_alpha); + } + + /* Create an OpenGL texture for the image */ + glGenTextures(1, &texture); + glBindTexture(GL_TEXTURE_2D, texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, + 0, + GL_RGBA, + w, h, + 0, + GL_RGBA, + GL_UNSIGNED_BYTE, + image->pixels); + SDL_FreeSurface(image); /* No longer needed */ + + return texture; +} diff --git a/test/ZImageTest.cpp b/test/ZImageTest.cpp index bf71b09..0301c6b 100644 --- a/test/ZImageTest.cpp +++ b/test/ZImageTest.cpp @@ -37,15 +37,15 @@ void Test() //Open and Setup all the Images// SDL_Surface *temp; - ZImage image1, image2("data/test01.bmp"), image3(image2.GetImage(),20,20,20,20), textImage; + ZImage image1, image2("data/test01.bmp"), image3(image2.Surface(),20,20,20,20), textImage; ZFont font("data/almontew.ttf",30); - + temp = SDL_LoadBMP("data/test02.bmp"); //this is a separate surface image1.Attach(temp); //this attaches the surface into itself temp = NULL; //and temp will now be controlled and freed by image1 - image1.SetColorKey(engine->MapColor(255,0,255)); - image2.SetAlpha(75); - image2.SetColorKey(engine->MapColor(255,0,255)); + image1.SetColorKey(255,0,255); +// image2.SetAlpha(75); + image2.SetColorKey(255,0,255); font.SetColor(0,255,0); font.SetBGColor(0,0,255); font.DrawShadedText("ZImage Test.",textImage); diff --git a/test/ZMouseTest.cpp b/test/ZMouseTest.cpp index c4c64a9..8d1411e 100644 --- a/test/ZMouseTest.cpp +++ b/test/ZMouseTest.cpp @@ -41,15 +41,15 @@ void Test() SDL_Rect textRect; engine->HideCursor(); - cursor.SetColorKey(engine->MapColor(255,0,255)); + cursor.SetColorKey(255,0,255); font.SetColor(0,255,0); font.SetBGColor(0,0,255); font.DrawText("Mouse Test",text[0]); font.DrawShadedText("Mouse Test",text[1]); textRect.x = textRect.y = 100; - textRect.w = font.GetStringWidth("Mouse Test"); - textRect.h = font.GetStringHeight("Mouse Test"); + textRect.w = font.StringWidth("Mouse Test"); + textRect.h = font.StringHeight("Mouse Test"); do { diff --git a/test/ZMusicTest.cpp b/test/ZMusicTest.cpp index 00a0c73..13af83b 100644 --- a/test/ZMusicTest.cpp +++ b/test/ZMusicTest.cpp @@ -83,12 +83,12 @@ void Test() if(engine->KeyIsPressed(SDLK_SPACE)) song.Play(); if(engine->KeyIsPressed(SDLK_UP)) - song.SetVolume(song.GetVolume()+1); + song.SetVolume(song.Volume()+1); if(engine->KeyIsPressed(SDLK_DOWN)) - song.SetVolume(song.GetVolume()-1); + song.SetVolume(song.Volume()-1); - font.DrawText(FormatStr("Volume: %d",song.GetVolume()),text[3]); + font.DrawText(FormatStr("Volume: %d",song.Volume()),text[3]); engine->Clear(); //clear screen for(int i=0; i < 4; i++) diff --git a/test/ZRectTest.cpp b/test/ZRectTest.cpp index 66122d6..872679f 100644 --- a/test/ZRectTest.cpp +++ b/test/ZRectTest.cpp @@ -1,90 +1,90 @@ -/******************************************************************************* - This file is Part of the ZEngine Library for SDL Game Development. - Copyright (C) 2002 ConceptOfZero.net - - Licensed under the BSD License, see licensing.txt. - - The maintainer of this library is James Turk (jturk@conceptofzero.net) - and the home of this Library is http://www.conceptofzero.net/ -*******************************************************************************/ - -#include -#include -using namespace std; -using namespace ZE; - -void Initialize() -{ - ZEngine *engine = ZEngine::GetInstance(); - ZConfigFile cfg("tests.zcf"); - int w,h,bpp; - bool fs; - string title; - - w = cfg.GetInt("ZRectTest","Width",800); - h = cfg.GetInt("ZRectTest","height",600); - bpp = cfg.GetInt("ZRectTest","bpp",32); - fs = cfg.GetBool("ZRectTest","fullscreen",false); - title = cfg.GetString("ZRectTest","title","ZRect Test"); - - engine->SetupDisplay(w,h,bpp,fs); - engine->CreateDisplay(title); -} - -void Test() -{ - ZEngine *engine = ZEngine::GetInstance(); - ZRect moveRect(0,0,25,25),stillRect(100,100,100,100); - - do - { - //In the active loop, check events first// - engine->CheckEvents(); - if(engine->KeyIsPressed(SDLK_s)) - { - //code to toggle screen// +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +#include +#include +using namespace std; +using namespace ZE; + +void Initialize() +{ + ZEngine *engine = ZEngine::GetInstance(); + ZConfigFile cfg("tests.zcf"); + int w,h,bpp; + bool fs; + string title; + + w = cfg.GetInt("ZRectTest","Width",800); + h = cfg.GetInt("ZRectTest","height",600); + bpp = cfg.GetInt("ZRectTest","bpp",32); + fs = cfg.GetBool("ZRectTest","fullscreen",false); + title = cfg.GetString("ZRectTest","title","ZRect Test"); + + engine->SetupDisplay(w,h,bpp,fs); + engine->CreateDisplay(title); +} + +void Test() +{ + ZEngine *engine = ZEngine::GetInstance(); + ZRect moveRect(0,0,25,25),stillRect(100,100,100,100); + + do + { + //In the active loop, check events first// + engine->CheckEvents(); + if(engine->KeyIsPressed(SDLK_s)) + { + //code to toggle screen// engine->SetupDisplay(engine->Width(),engine->Height(),engine->BPP(),!engine->IsFullscreen()); - engine->CreateDisplay("ZRect Test"); - } - if(engine->KeyIsPressed(SDLK_ESCAPE)) - engine->RequestQuit(); - //movement// - if(engine->KeyIsPressed(SDLK_LEFT)) - moveRect.MoveRel(-3,0); - if(engine->KeyIsPressed(SDLK_RIGHT)) - moveRect.MoveRel(3,0); - if(engine->KeyIsPressed(SDLK_UP)) - moveRect.MoveRel(0,-3); - if(engine->KeyIsPressed(SDLK_DOWN)) - moveRect.MoveRel(0,3); - if(engine->KeyIsPressed(SDLK_EQUALS)) - { - moveRect.MoveRel(-1,-1); - moveRect.ResizeRel(2,2); - } - if(engine->KeyIsPressed(SDLK_MINUS)) - { - moveRect.MoveRel(1,1); - moveRect.ResizeRel(-2,-2); - } - - engine->Clear(); - engine->Clear(engine->MapColor(255,0,0,128),&moveRect.SDLrect()); - engine->Clear(engine->MapColor(0,0,255),&stillRect.SDLrect()); - engine->Clear(engine->MapColor(0,255,0),&moveRect.Intersection(stillRect).SDLrect()); - engine->UpdateScreen(); - - } while(!engine->QuitRequested()); -} - -int main(int argc, char *argv[]) -{ - ZEngine *engine = ZEngine::GetInstance(); - - Initialize(); - //engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available - Test(); - - ZEngine::ReleaseInstance(); //release engine instance - return 0; -} + engine->CreateDisplay("ZRect Test"); + } + if(engine->KeyIsPressed(SDLK_ESCAPE)) + engine->RequestQuit(); + //movement// + if(engine->KeyIsPressed(SDLK_LEFT)) + moveRect.MoveRel(-3,0); + if(engine->KeyIsPressed(SDLK_RIGHT)) + moveRect.MoveRel(3,0); + if(engine->KeyIsPressed(SDLK_UP)) + moveRect.MoveRel(0,-3); + if(engine->KeyIsPressed(SDLK_DOWN)) + moveRect.MoveRel(0,3); + if(engine->KeyIsPressed(SDLK_EQUALS)) + { + moveRect.MoveRel(-1,-1); + moveRect.ResizeRel(2,2); + } + if(engine->KeyIsPressed(SDLK_MINUS)) + { + moveRect.MoveRel(1,1); + moveRect.ResizeRel(-2,-2); + } + + engine->Clear(); + engine->Clear(engine->MapColor(255,0,0,128),&moveRect.SDLrect()); + engine->Clear(engine->MapColor(0,0,255),&stillRect.SDLrect()); + engine->Clear(engine->MapColor(0,255,0),&moveRect.Intersection(stillRect).SDLrect()); + engine->UpdateScreen(); + + } while(!engine->QuitRequested()); +} + +int main(int argc, char *argv[]) +{ + ZEngine *engine = ZEngine::GetInstance(); + + Initialize(); + //engine->InitPhysFS(argv[0]); //remove this line if PhysFS is not available + Test(); + + ZEngine::ReleaseInstance(); //release engine instance + return 0; +} diff --git a/test/ZSoundTest.cpp b/test/ZSoundTest.cpp index 55a9781..c07984e 100644 --- a/test/ZSoundTest.cpp +++ b/test/ZSoundTest.cpp @@ -81,12 +81,12 @@ void Test() if(engine->KeyIsPressed(SDLK_SPACE)) sample[sampleNum].Play(); if(engine->KeyIsPressed(SDLK_UP)) - sample[sampleNum].SetVolume(sample[sampleNum].GetVolume()+1); + sample[sampleNum].SetVolume(sample[sampleNum].Volume()+1); if(engine->KeyIsPressed(SDLK_DOWN)) - sample[sampleNum].SetVolume(sample[sampleNum].GetVolume()-1); + sample[sampleNum].SetVolume(sample[sampleNum].Volume()-1); - font.DrawText(FormatStr("Volume: %d",sample[sampleNum].GetVolume()),text[4]); + font.DrawText(FormatStr("Volume: %d",sample[sampleNum].Volume()),text[4]); font.DrawText(FormatStr("Sample: %s",name[sampleNum].c_str()),text[5]); engine->Clear(); //clear screen diff --git a/test/bin/tests.zcf b/test/bin/tests.zcf index bae3f5f..5cadfdd 100644 --- a/test/bin/tests.zcf +++ b/test/bin/tests.zcf @@ -1,5 +1,5 @@ -[ZRectTest] - Width = 1000 - Height = 400 - Fullscreen = FALSE - Title = "If we are out of grapes, who will sell us Apple Juice?" +[ZRectTest] + Width = 1000 + Height = 400 + Fullscreen = FALSE + Title = "If we are out of grapes, who will sell us Apple Juice?" diff --git a/thanks.txt b/thanks.txt index 476afd1..48123ed 100644 --- a/thanks.txt +++ b/thanks.txt @@ -9,7 +9,7 @@ Everybody Associated with ConceptOfZero.net - Keeping Me Working on ZEngine. People on the Opensource.org Mailing list - Helping me figure out what license to use. http://opensource.org The people at the Kahvi Collective - Providing tons of free Ogg music. - http://www.kahvi.org/ + http://www.kahvi.org Sourceforge.net - Providing hosting for the project and CVS. http://sourceforge.net diff --git a/todo.txt b/todo.txt index 6c9052f..a1d3d08 100644 --- a/todo.txt +++ b/todo.txt @@ -1,8 +1,7 @@ ZEngine Todo List --Add OpenGL 2D support for drawing. +-Add rotation-zooming support (using OpenGL) -Proofread, update, clarify documentation. -Add Support for PhysicsFS with SDL_ttf and SDL_mixer music. (Waiting on other libraries.) -Write simple games using the library as examples --Add common game objects, particle system, basic sprites, etc. --Add rotation-zooming support (SDL_rotozoom?) \ No newline at end of file +-Add common game objects, particle system, basic sprites, etc. \ No newline at end of file diff --git a/vc7/ZEngine.sln b/vc7/ZEngine.sln index 5347e86..33d7e22 100644 --- a/vc7/ZEngine.sln +++ b/vc7/ZEngine.sln @@ -62,8 +62,6 @@ Global {37D500C5-E6C4-4E56-BFAA-33F1303B147C}.Debug.Build.0 = Debug|Win32 {37D500C5-E6C4-4E56-BFAA-33F1303B147C}.Release.ActiveCfg = Release|Win32 {37D500C5-E6C4-4E56-BFAA-33F1303B147C}.Release.Build.0 = Release|Win32 - {110FE3E0-9B08-420A-BAF8-06FF3E77EEA1}.Debug.ActiveCfg = Debug|Win32 - {110FE3E0-9B08-420A-BAF8-06FF3E77EEA1}.Release.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/vc7/ZEngine.vcproj b/vc7/ZEngine.vcproj index 2a478c7..20b71a9 100644 --- a/vc7/ZEngine.vcproj +++ b/vc7/ZEngine.vcproj @@ -90,15 +90,15 @@ - - + + @@ -139,6 +139,9 @@ + + @@ -162,9 +165,6 @@ - - @@ -196,10 +196,16 @@ + + + + diff --git a/vc7/ZFontTest.vcproj b/vc7/ZFontTest.vcproj index 315812f..6457728 100644 --- a/vc7/ZFontTest.vcproj +++ b/vc7/ZFontTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib diff --git a/vc7/ZImageTest.vcproj b/vc7/ZImageTest.vcproj index 276b041..3c89053 100644 --- a/vc7/ZImageTest.vcproj +++ b/vc7/ZImageTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib diff --git a/vc7/ZMouseTest.vcproj b/vc7/ZMouseTest.vcproj index 3acc306..41f612c 100644 --- a/vc7/ZMouseTest.vcproj +++ b/vc7/ZMouseTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib diff --git a/vc7/ZMusicTest.vcproj b/vc7/ZMusicTest.vcproj index 17bb9c0..d4cf36c 100644 --- a/vc7/ZMusicTest.vcproj +++ b/vc7/ZMusicTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib diff --git a/vc7/ZRectTest.vcproj b/vc7/ZRectTest.vcproj index b853313..239e941 100644 --- a/vc7/ZRectTest.vcproj +++ b/vc7/ZRectTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib diff --git a/vc7/ZSoundTest.vcproj b/vc7/ZSoundTest.vcproj index 3812375..50bc3a6 100644 --- a/vc7/ZSoundTest.vcproj +++ b/vc7/ZSoundTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib diff --git a/vc7/ZTimerTest.vcproj b/vc7/ZTimerTest.vcproj index 752b717..7a399f2 100644 --- a/vc7/ZTimerTest.vcproj +++ b/vc7/ZTimerTest.vcproj @@ -33,6 +33,7 @@ Name="VCLinkerTool" AdditionalOptions="sdl.lib sdlmain.lib +opengl32.lib sdl_ttf.lib sdl_mixer.lib sdl_image.lib