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