Removed ZObject.
This commit is contained in:
parent
1ee8e559c2
commit
2cc3e556e0
@ -13,7 +13,7 @@
|
||||
File: Types/ZE_ZConfigFile.h <br>
|
||||
Description: Header file for ZEngine INI-Style Config Files.<br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZConfigFile.h,v 1.7 2003/02/10 03:19:37 cozman Exp $<br>
|
||||
$Id: ZE_ZConfigFile.h,v 1.8 2003/02/10 04:07:04 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZConfigFile.h
|
||||
\brief Definition file for ZConfigFile.
|
||||
@ -25,7 +25,7 @@ $Id: ZE_ZConfigFile.h,v 1.7 2003/02/10 03:19:37 cozman Exp $<br>
|
||||
#ifndef __ze_zconfigfile_h__
|
||||
#define __ze_zconfigfile_h__
|
||||
|
||||
#include "ZE_ZObject.h" //included even though ZCF isn't derived (to obtain all other needed headers)
|
||||
#include "ZE_ZEngine.h"
|
||||
|
||||
namespace ZE
|
||||
{
|
||||
@ -35,13 +35,12 @@ namespace ZE
|
||||
|
||||
ZConfigFile class for INI-style configuration files for games or applications. Inherited from ZObject.
|
||||
**/
|
||||
class ZConfigFile : public ZObject
|
||||
class ZConfigFile
|
||||
{
|
||||
private:
|
||||
|
||||
//Private Types//
|
||||
|
||||
|
||||
/*!
|
||||
\brief ZConfigFile Variable class.
|
||||
|
||||
@ -71,11 +70,11 @@ class ZConfigFile : public ZObject
|
||||
list<ZCF_Variable> varList;
|
||||
};
|
||||
|
||||
protected:
|
||||
//! List of sections of internal type.
|
||||
list<ZCF_Section> mFileLayout;
|
||||
|
||||
list<ZCF_Section> rFileLayout;
|
||||
//! Filename of file currently open.
|
||||
string mFilename;
|
||||
string rFilename;
|
||||
|
||||
/*!
|
||||
\brief Reformat a string in a form more suitable to parsing.
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZFont.h <br>
|
||||
Description: Header file for core ZEngine Font Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZFont.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
$Id: ZE_ZFont.h,v 1.5 2003/02/10 04:07:04 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZFont.h
|
||||
\brief Definition file for ZFont.
|
||||
@ -24,7 +24,7 @@ $Id: ZE_ZFont.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
#ifndef __ze_zfont_h__
|
||||
#define __ze_zfont_h__
|
||||
|
||||
#include "ZE_ZObject.h"
|
||||
#include "ZE_ZEngine.h"
|
||||
#include "ZE_ZImage.h"
|
||||
|
||||
#ifdef USE_SDL_TTF
|
||||
@ -37,9 +37,11 @@ namespace ZE
|
||||
|
||||
ZFont font container class, class wraps common features of SDL_TTF. Inherited from ZObject.
|
||||
**/
|
||||
class ZFont : public ZObject
|
||||
class ZFont
|
||||
{
|
||||
protected:
|
||||
//! Pointer to ZEngine Object
|
||||
ZEngine* rEngine;
|
||||
//! Pointer to font data.
|
||||
TTF_Font *rFont;
|
||||
//! Filename, for resizing.
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZImage.h <br>
|
||||
Description: Header file for core ZEngine Image and Texture Object. <br>
|
||||
Author(s): James Turk, Gamer Tazar <br>
|
||||
$Id: ZE_ZImage.h,v 1.11 2003/01/25 19:56:05 cozman Exp $<br>
|
||||
$Id: ZE_ZImage.h,v 1.12 2003/02/10 04:07:05 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZImage.h
|
||||
\brief Definition file for ZImage.
|
||||
@ -24,7 +24,7 @@ $Id: ZE_ZImage.h,v 1.11 2003/01/25 19:56:05 cozman Exp $<br>
|
||||
#ifndef __ze_zimage_h__
|
||||
#define __ze_zimage_h__
|
||||
|
||||
#include "ZE_ZObject.h"
|
||||
#include "ZE_ZEngine.h"
|
||||
|
||||
namespace ZE
|
||||
{
|
||||
@ -34,9 +34,11 @@ namespace ZE
|
||||
|
||||
ZImage image drawing class, class wraps common features of SDL_Surface. Inherited from ZObject.
|
||||
**/
|
||||
class ZImage : public ZObject
|
||||
class ZImage
|
||||
{
|
||||
protected:
|
||||
//! Pointer to ZEngine Object
|
||||
ZEngine* rEngine;
|
||||
//! Texture lower X, used internally for flip.
|
||||
GLfloat rTexMinX;
|
||||
//! Texture lower Y, used internally for flip
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZMusic.h <br>
|
||||
Description: Header file for core ZEngine Music Wrapper Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZMusic.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
$Id: ZE_ZMusic.h,v 1.5 2003/02/10 04:07:05 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZMusic.h
|
||||
\brief Definition file for ZMusic.
|
||||
@ -24,7 +24,7 @@ $Id: ZE_ZMusic.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
#ifndef __ze_zmusic_h__
|
||||
#define __ze_zmusic_h__
|
||||
|
||||
#include "ZE_ZObject.h"
|
||||
#include "ZE_ZEngine.h"
|
||||
|
||||
#ifdef USE_SDL_MIXER
|
||||
|
||||
@ -36,9 +36,11 @@ namespace ZE
|
||||
|
||||
ZMusic music class, class wraps common features for SDL_Mixer's Mix_Music. Inherited from ZObject.
|
||||
**/
|
||||
class ZMusic : public ZObject
|
||||
class ZMusic
|
||||
{
|
||||
protected:
|
||||
//! Pointer to ZEngine Object
|
||||
ZEngine* rEngine;
|
||||
//! Pointer to music data.
|
||||
Mix_Music *rMusic;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZRect.h <br>
|
||||
Description: Header file for core ZEngine Rectangle Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZRect.h,v 1.5 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
$Id: ZE_ZRect.h,v 1.6 2003/02/10 04:07:05 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZRect.h
|
||||
\brief Definition file for ZRect.
|
||||
@ -24,7 +24,7 @@ $Id: ZE_ZRect.h,v 1.5 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
#ifndef __ze_zrect_h__
|
||||
#define __ze_zrect_h__
|
||||
|
||||
#include "ZE_ZObject.h" //included even though ZRect isn't derived (to obtain all other needed headers)
|
||||
#include "ZE_ZEngine.h"
|
||||
|
||||
namespace ZE
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZSound.h <br>
|
||||
Description: Header file for core ZEngine Sound Wrapper Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZSound.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
$Id: ZE_ZSound.h,v 1.5 2003/02/10 04:07:05 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZSound.h
|
||||
\brief Definition file for ZSound.
|
||||
@ -24,7 +24,7 @@ $Id: ZE_ZSound.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
#ifndef __ze_zsound_h__
|
||||
#define __ze_zsound_h__
|
||||
|
||||
#include "ZE_ZObject.h"
|
||||
#include "ZE_ZEngine.h"
|
||||
|
||||
#ifdef USE_SDL_MIXER
|
||||
|
||||
@ -36,9 +36,11 @@ namespace ZE
|
||||
|
||||
ZSound music class, class wraps common features for SDL_Mixer's Mix_Chunk. Inherited from ZObject.
|
||||
**/
|
||||
class ZSound : public ZObject
|
||||
class ZSound
|
||||
{
|
||||
protected:
|
||||
//! Pointer to ZEngine Object
|
||||
ZEngine* rEngine;
|
||||
//! Pointer to music data.
|
||||
Mix_Chunk* rSound;
|
||||
//! Channel ID Number from SDL_Mixer.
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZTimer.h <br>
|
||||
Description: Header file for core ZEngine Timer Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZTimer.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
$Id: ZE_ZTimer.h,v 1.5 2003/02/10 04:07:05 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZTimer.h
|
||||
\brief Definition file for ZTimer.
|
||||
@ -24,7 +24,7 @@ $Id: ZE_ZTimer.h,v 1.4 2003/01/16 05:46:39 cozman Exp $<br>
|
||||
#ifndef __ze_ztimer_h__
|
||||
#define __ze_ztimer_h__
|
||||
|
||||
#include "ZE_ZObject.h"
|
||||
#include "ZE_ZEngine.h"
|
||||
|
||||
namespace ZE
|
||||
{
|
||||
@ -34,9 +34,11 @@ namespace ZE
|
||||
|
||||
ZTimer timing class, class wraps common features of SDL timer. Inherited from ZObject and tied to ZEngine main timer.
|
||||
**/
|
||||
class ZTimer : public ZObject
|
||||
class ZTimer
|
||||
{
|
||||
protected:
|
||||
//! Pointer to ZEngine Object
|
||||
ZEngine* rEngine;
|
||||
//! Paused / Unpaused state of Timer
|
||||
bool rPaused;
|
||||
//! Using ZEngine timer or SDL global timer.
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZConfigFile.cpp <br>
|
||||
Description: Implementation source file for ZConfigFile, the ZEngine INI-Style Config File. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZConfigFile.cpp,v 1.5 2003/02/10 03:04:46 cozman Exp $<br>
|
||||
$Id: ZE_ZConfigFile.cpp,v 1.6 2003/02/10 04:02:38 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZConfigFile.cpp
|
||||
\brief Source file for ZConfigFile.
|
||||
@ -52,7 +52,7 @@ bool ZConfigFile::Exists(string sec) const
|
||||
|
||||
sec = CleanString(sec);
|
||||
|
||||
for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++)
|
||||
for(secIter = rFileLayout.begin(); secIter != rFileLayout.end(); secIter++)
|
||||
{
|
||||
if(CleanString((*secIter).section) == sec)
|
||||
return true;
|
||||
@ -68,7 +68,7 @@ bool ZConfigFile::Exists(string sec, string var) const
|
||||
sec = CleanString(sec);
|
||||
var = CleanString(var);
|
||||
|
||||
for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++)
|
||||
for(secIter = rFileLayout.begin(); secIter != rFileLayout.end(); secIter++)
|
||||
{
|
||||
if(CleanString((*secIter).section) == sec)
|
||||
{
|
||||
@ -90,7 +90,7 @@ void ZConfigFile::SetVariable(string sec, string var, string val)
|
||||
if(Exists(CleanString(sec)))
|
||||
{
|
||||
sec = CleanString(sec);
|
||||
for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++)
|
||||
for(secIter = rFileLayout.begin(); secIter != rFileLayout.end(); secIter++)
|
||||
{
|
||||
if(CleanString((*secIter).section) == sec) //if this is the section
|
||||
{
|
||||
@ -121,7 +121,7 @@ void ZConfigFile::SetVariable(string sec, string var, string val)
|
||||
{
|
||||
ZCF_Section tempSec;
|
||||
tempSec.section = sec;
|
||||
mFileLayout.push_back(tempSec);
|
||||
rFileLayout.push_back(tempSec);
|
||||
SetVariable(sec,var,val);
|
||||
}
|
||||
}
|
||||
@ -136,7 +136,7 @@ string ZConfigFile::GetVariable(string sec, string var, string defVal) const
|
||||
|
||||
if(Exists(sec))
|
||||
{
|
||||
for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++)
|
||||
for(secIter = rFileLayout.begin(); secIter != rFileLayout.end(); secIter++)
|
||||
{
|
||||
if(CleanString((*secIter).section) == sec) //if this is the section
|
||||
{
|
||||
@ -163,9 +163,9 @@ string ZConfigFile::GetVariable(string sec, string var, string defVal) const
|
||||
|
||||
ZConfigFile::ZConfigFile() {}
|
||||
|
||||
ZConfigFile::ZConfigFile(string mFilename)
|
||||
ZConfigFile::ZConfigFile(string rFilename)
|
||||
{
|
||||
Process(mFilename);
|
||||
Process(rFilename);
|
||||
}
|
||||
|
||||
ZConfigFile::~ZConfigFile()
|
||||
@ -175,12 +175,12 @@ ZConfigFile::~ZConfigFile()
|
||||
|
||||
void ZConfigFile::Process(string filename)
|
||||
{
|
||||
mFilename = filename;
|
||||
rFilename = filename;
|
||||
|
||||
ifstream cfile(mFilename.c_str());
|
||||
ifstream cfile(rFilename.c_str());
|
||||
string section, str, var, tmp;
|
||||
|
||||
mFileLayout.clear();
|
||||
rFileLayout.clear();
|
||||
|
||||
while(!cfile.eof() && cfile.is_open())
|
||||
{
|
||||
@ -317,14 +317,14 @@ void ZConfigFile::Flush()
|
||||
string secName;
|
||||
|
||||
//in case the filename is already cleared somehow
|
||||
if(mFilename.length())
|
||||
if(rFilename.length())
|
||||
{
|
||||
ofstream cfile(mFilename.c_str(), ios::out|ios::trunc);
|
||||
ofstream cfile(rFilename.c_str(), ios::out|ios::trunc);
|
||||
|
||||
if(cfile)
|
||||
{
|
||||
//iteration through sections
|
||||
for(secIter = mFileLayout.begin(); secIter != mFileLayout.end(); secIter++)
|
||||
for(secIter = rFileLayout.begin(); secIter != rFileLayout.end(); secIter++)
|
||||
{
|
||||
//ensure that section is valid
|
||||
secName = CleanString((*secIter).section);
|
||||
@ -348,7 +348,7 @@ void ZConfigFile::Flush()
|
||||
void ZConfigFile::Close()
|
||||
{
|
||||
Flush();
|
||||
mFilename = "";
|
||||
rFilename = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZFont.cpp <br>
|
||||
Description: Implementation source file for core ZEngine Font Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZFont.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $<br>
|
||||
$Id: ZE_ZFont.cpp,v 1.6 2003/02/10 04:02:38 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZFont.cpp
|
||||
\brief Source file for ZFont.
|
||||
@ -28,9 +28,9 @@ $Id: ZE_ZFont.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $<br>
|
||||
namespace ZE
|
||||
{
|
||||
|
||||
|
||||
ZFont::ZFont()
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rFont = NULL;
|
||||
rColor.r = rColor.g = rColor.b = rColor.unused = 255;
|
||||
rBGColor.r = rBGColor.g = rBGColor.b = rBGColor.unused = 0;
|
||||
@ -38,6 +38,7 @@ ZFont::ZFont()
|
||||
|
||||
ZFont::ZFont(string filename, int size)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rFont = NULL;
|
||||
rColor.r = rColor.g = rColor.b = rColor.unused = 255;
|
||||
rBGColor.r = rBGColor.g = rBGColor.b = rBGColor.unused = 0;
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZImage.cpp <br>
|
||||
Description: Implementation source file for core ZEngine Image or Texture Object. <br>
|
||||
Author(s): James Turk, Gamer Tazar <br>
|
||||
$Id: ZE_ZImage.cpp,v 1.23 2003/02/10 02:40:35 cozman Exp $<br>
|
||||
$Id: ZE_ZImage.cpp,v 1.24 2003/02/10 04:02:38 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZImage.cpp
|
||||
\brief Source file for ZImage.
|
||||
@ -28,14 +28,15 @@ namespace ZE
|
||||
|
||||
ZImage::ZImage()
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rImage = NULL;
|
||||
rAlpha = 255;
|
||||
Release();
|
||||
}
|
||||
|
||||
ZImage::ZImage(const ZImage &rhs) :
|
||||
ZObject()
|
||||
ZImage::ZImage(const ZImage &rhs)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rImage = NULL;
|
||||
rAlpha = rhs.Alpha();
|
||||
OpenFromImage(rhs.Surface(),0,0,(Sint16)rhs.Width(),(Sint16)rhs.Height());
|
||||
@ -43,6 +44,7 @@ ZImage::ZImage(const ZImage &rhs) :
|
||||
|
||||
ZImage::ZImage(string filename)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rImage = NULL;
|
||||
rAlpha = 255;
|
||||
Open(filename);
|
||||
@ -50,6 +52,7 @@ ZImage::ZImage(string filename)
|
||||
|
||||
ZImage::ZImage(SDL_Surface *surface)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rImage = NULL;
|
||||
rAlpha = 255;
|
||||
Attach(surface);
|
||||
@ -57,6 +60,7 @@ ZImage::ZImage(SDL_Surface *surface)
|
||||
|
||||
ZImage::ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rImage = NULL;
|
||||
rAlpha = 255;
|
||||
OpenFromImage(img,x,y,w,h);
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZMusic.cpp <br>
|
||||
Description: Implementation source file for core ZEngine Music Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZMusic.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $<br>
|
||||
$Id: ZE_ZMusic.cpp,v 1.6 2003/02/10 04:02:38 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZMusic.cpp
|
||||
\brief Source file for ZMusic.
|
||||
@ -32,11 +32,13 @@ const int ZMusic::LoopInfinite = -1;
|
||||
|
||||
ZMusic::ZMusic()
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rMusic = NULL;
|
||||
}
|
||||
|
||||
ZMusic::ZMusic(string filename)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rMusic = NULL;
|
||||
Open(filename);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZSound.cpp <br>
|
||||
Description: Implementation source file for core ZEngine Sound Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZSound.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $<br>
|
||||
$Id: ZE_ZSound.cpp,v 1.6 2003/02/10 04:02:39 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZSound.cpp
|
||||
\brief Source file for ZSound.
|
||||
@ -32,12 +32,14 @@ const int ZSound::LoopInfinite = -1;
|
||||
|
||||
ZSound::ZSound()
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rSound = NULL;
|
||||
rChannelID = -1; //request channel ID
|
||||
}
|
||||
|
||||
ZSound::ZSound(string filename)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rSound = NULL;
|
||||
rChannelID = -1; //request channel ID
|
||||
Open(filename);
|
||||
|
@ -13,7 +13,7 @@
|
||||
File: ZE_ZTimer.cpp <br>
|
||||
Description: Implementation source file for core ZEngine Timer Object. <br>
|
||||
Author(s): James Turk <br>
|
||||
$Id: ZE_ZTimer.cpp,v 1.4 2003/01/16 05:45:58 cozman Exp $<br>
|
||||
$Id: ZE_ZTimer.cpp,v 1.5 2003/02/10 04:02:39 cozman Exp $<br>
|
||||
|
||||
\file ZE_ZTimer.cpp
|
||||
\brief Source file for ZTimer.
|
||||
@ -36,6 +36,7 @@ Uint32 ZTimer::GetParentTime() const
|
||||
|
||||
ZTimer::ZTimer(bool useZEngine)
|
||||
{
|
||||
rEngine = ZEngine::GetInstance();
|
||||
rUseZEngine = useZEngine;
|
||||
rPaused = false;
|
||||
Reset();
|
||||
|
Loading…
Reference in New Issue
Block a user