diff --git a/include/ZE_ZConfigFile.h b/include/ZE_ZConfigFile.h
index e0a1e09..18e4201 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.5 2002/12/29 06:50:19 cozman Exp $
+$Id: ZE_ZConfigFile.h,v 1.6 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZConfigFile.h
\brief Definition file for ZConfigFile.
@@ -84,7 +84,7 @@ class ZConfigFile : public ZObject
\param str The string to get a clean version of.
\return Cleaned string.
**/
- string CleanString(string str);
+ string CleanString(string str) const;
/*!
\brief Check if a section exists.
@@ -93,7 +93,7 @@ class ZConfigFile : public ZObject
\param sec Section to check for.
\return bool, true if section exists in file.
**/
- bool Exists(string sec);
+ bool Exists(string sec) const;
/*!
\brief Check if a variable exists.
@@ -103,7 +103,7 @@ class ZConfigFile : public ZObject
\param var Variable to check for.
\return bool, true if section exists in file.
**/
- bool Exists(string sec, string var);
+ bool Exists(string sec, string var) const;
/*!
\brief Internal function to set variables.
@@ -124,7 +124,7 @@ class ZConfigFile : public ZObject
\param defVal Value to return if variable doesnt exist.
\return Value of variable.
**/
- string GetVariable(string sec, string var, string defVal);
+ string GetVariable(string sec, string var, string defVal) const;
public:
@@ -167,7 +167,7 @@ class ZConfigFile : public ZObject
\param defVal Value to return if var does not exist within section.
\return Contents of the variable in integer format.
**/
- int GetInt(string section, string var, int defVal);
+ int GetInt(string section, string var, int defVal) const;
/*!
\brief Get value in boolean format from file.
@@ -179,7 +179,7 @@ class ZConfigFile : public ZObject
\param defVal Value to return if var does not exist within section.
\return Contents of the variable in boolean format.
**/
- bool GetBool(string section, string var, bool defVal);
+ bool GetBool(string section, string var, bool defVal) const;
/*!
\brief Get value in string format from file.
@@ -190,7 +190,7 @@ class ZConfigFile : public ZObject
\param defVal Value to return if var does not exist within section.
\return Contents of the variable in string format.
**/
- string GetString(string section, string var, string defVal);
+ string GetString(string section, string var, string defVal) const;
/*!
\brief Set value in integer format in file.
diff --git a/include/ZE_ZError.h b/include/ZE_ZError.h
index f188552..b11cb49 100755
--- a/include/ZE_ZError.h
+++ b/include/ZE_ZError.h
@@ -13,7 +13,7 @@
File: ZE_ZError.h
Description: Header file for ZEngine Error Object.
Author(s): James Turk
-$Id: ZE_ZError.h,v 1.3 2003/01/16 05:06:54 cozman Exp $
+$Id: ZE_ZError.h,v 1.4 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZError.h
\brief Definition file for ZError.
@@ -109,14 +109,14 @@ class ZError
Access ZErrorCode of the ZError object.
\return The error ZErrorCode.
**/
- ZErrorCode Code();
+ ZErrorCode Code() const;
/*!
\brief Get formatted string for log file.
Return the string to be written to the logfile. Called by ZEngine in LogError.
**/
- string LogString();
+ string LogString() const;
};
}
diff --git a/include/ZE_ZFont.h b/include/ZE_ZFont.h
index 0606af9..1ae234d 100644
--- a/include/ZE_ZFont.h
+++ b/include/ZE_ZFont.h
@@ -13,7 +13,7 @@
File: ZE_ZFont.h
Description: Header file for core ZEngine Font Object.
Author(s): James Turk
-$Id: ZE_ZFont.h,v 1.3 2002/12/29 06:50:19 cozman Exp $
+$Id: ZE_ZFont.h,v 1.4 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZFont.h
\brief Definition file for ZFont.
@@ -105,7 +105,7 @@ class ZFont : public ZObject
\param text String to write.
\param image ZImage to draw to.
**/
- void DrawText(string text, ZImage &image);
+ void DrawText(string text, ZImage &image) const;
/*!
\brief Draws a string with a colored background to a ZImage.
@@ -114,7 +114,7 @@ class ZFont : public ZObject
\param text String to write.
\param image ZImage to draw to.
**/
- void DrawShadedText(string text, ZImage &image);
+ void DrawShadedText(string text, ZImage &image) const;
/*!
\brief Set Text rColor.
@@ -164,7 +164,7 @@ class ZFont : public ZObject
Check if file is loaded and pointer to data is non-NULL.
\return Loaded or Unloaded state of data.
**/
- bool IsLoaded();
+ bool IsLoaded() const;
/*!
\brief Get Bold Setting.
@@ -172,7 +172,7 @@ class ZFont : public ZObject
Check if font output is currently bold.
\return True or False state of bold.
**/
- bool IsBold();
+ bool IsBold() const;
/*!
\brief Get Italic Setting.
@@ -180,7 +180,7 @@ class ZFont : public ZObject
Check if font output is currently italic.
\return True or False state of italic.
**/
- bool IsItalic();
+ bool IsItalic() const;
/*!
\brief Get Underlined Setting.
@@ -188,7 +188,7 @@ class ZFont : public ZObject
Check if font output is currently underline.
\return True or False state of underline.
**/
- bool IsUnderlined();
+ bool IsUnderlined() const;
/*!
\brief Get Height of Font.
@@ -196,7 +196,7 @@ class ZFont : public ZObject
Check font height as reported by SDL_ttf.
\return Height of font.
**/
- int Height();
+ int Height() const;
/*!
\brief Get Line Skip for Font.
@@ -204,7 +204,7 @@ class ZFont : public ZObject
Check font line skip as reported by SDL_ttf.
\return Recommended Line Skip of font.
**/
- int LineSkip();
+ int LineSkip() const;
/*!
\brief Get String Width.
@@ -213,7 +213,7 @@ class ZFont : public ZObject
\param text String to get width of.
\return Width of String in Current font.
**/
- int StringWidth(string text);
+ int StringWidth(string text) const;
/*!
\brief Get String Height.
@@ -222,7 +222,7 @@ class ZFont : public ZObject
\param text String to get height of.
\return Height of String in Current font.
**/
- int StringHeight(string text);
+ int StringHeight(string text) const;
};
}
diff --git a/include/ZE_ZImage.h b/include/ZE_ZImage.h
index 1cd78c5..0b5d7fd 100644
--- a/include/ZE_ZImage.h
+++ b/include/ZE_ZImage.h
@@ -13,7 +13,7 @@
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.7 2002/12/29 07:22:02 cozman Exp $
+$Id: ZE_ZImage.h,v 1.8 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZImage.h
\brief Definition file for ZImage.
@@ -193,7 +193,7 @@ class ZImage : public ZObject
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();
+ void Bind() const;
/*!
\brief Draw Image to Screen.
@@ -202,7 +202,7 @@ class ZImage : public ZObject
\param x X coord to draw Image to.
\param y Y coord to draw Image to.
**/
- void Draw(float x, float y);
+ void Draw(float x, float y) const;
/*!
\brief Draw Image rotated to screen.
@@ -212,7 +212,7 @@ class ZImage : public ZObject
\param y Y coord to draw Image to.
\param angle Angle in degrees to rotate image.
**/
- void DrawRotated(int x, int y, float angle);
+ void DrawRotated(int x, int y, float angle) const;
/////////////
//Accessors//
@@ -224,14 +224,14 @@ class ZImage : public ZObject
Check if surface is a valid GL texture. (does not detect surface loss)
\return Loaded or Unloaded state of data.
**/
- bool IsLoaded();
+ bool IsLoaded() const;
/*!
\brief Get SDL_Surface.
Get SDL_Surface pointer to actual image data.
\return SDL_Surface* of rImage.
**/
- SDL_Surface *Surface();
+ SDL_Surface *Surface() const;
/*!
\brief Get Width.
@@ -239,7 +239,7 @@ class ZImage : public ZObject
Get Current Width of Image.
\return Image Width.
**/
- int Width();
+ int Width() const;
/*!
\brief Get Height.
@@ -247,7 +247,7 @@ class ZImage : public ZObject
Get Current Height of Image.
\return Image Height.
**/
- int Height();
+ int Height() const;
};
}
diff --git a/include/ZE_ZMusic.h b/include/ZE_ZMusic.h
index 1483944..f701292 100644
--- a/include/ZE_ZMusic.h
+++ b/include/ZE_ZMusic.h
@@ -13,7 +13,7 @@
File: ZE_ZMusic.h
Description: Header file for core ZEngine Music Wrapper Object.
Author(s): James Turk
-$Id: ZE_ZMusic.h,v 1.3 2002/12/29 06:50:19 cozman Exp $
+$Id: ZE_ZMusic.h,v 1.4 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZMusic.h
\brief Definition file for ZMusic.
@@ -99,28 +99,28 @@ class ZMusic : public ZObject
\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);
+ void Play(int loopNum=0, int fadeTime=0) const;
/*!
\brief Pause music.
Pause currently playing music.
**/
- void Pause();
+ void Pause() const;
/*!
\brief Unpause music.
Unpause currently paused music.
**/
- void Unpause();
+ void Unpause() const;
/*!
\brief Rewind music.
Rewind music to beginning.
**/
- void Rewind();
+ void Rewind() const;
/*!
\brief Stop music.
@@ -128,7 +128,7 @@ class ZMusic : public ZObject
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);
+ void Stop(int fadeTime=0) const;
/*!
\brief Change Volume.
@@ -148,7 +148,7 @@ class ZMusic : public ZObject
Check if file is loaded and pointer to data is non-NULL.
\return Loaded or Unloaded state of data.
**/
- bool IsLoaded();
+ bool IsLoaded() const;
/*!
\brief Check if music is Playing.
@@ -156,7 +156,7 @@ class ZMusic : public ZObject
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();
+ bool IsPlaying() const;
/*!
\brief Check if music is Paused.
@@ -164,7 +164,7 @@ class ZMusic : public ZObject
Check if music is "playing" but currently paused.
\return Paused / Not Paused State of Music.
**/
- bool IsPaused();
+ bool IsPaused() const;
/*!
\brief Find Current Volume of Music.
@@ -172,7 +172,7 @@ class ZMusic : public ZObject
Get current volume of music represented as a value from 0-128.
\return Volume of music, 0-128.
**/
- int Volume();
+ int Volume() const;
};
diff --git a/include/ZE_ZRect.h b/include/ZE_ZRect.h
index 6a93d3d..7322638 100644
--- a/include/ZE_ZRect.h
+++ b/include/ZE_ZRect.h
@@ -13,7 +13,7 @@
File: ZE_ZRect.h
Description: Header file for core ZEngine Rectangle Object.
Author(s): James Turk
-$Id: ZE_ZRect.h,v 1.4 2002/12/29 06:50:19 cozman Exp $
+$Id: ZE_ZRect.h,v 1.5 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZRect.h
\brief Definition file for ZRect.
@@ -102,7 +102,7 @@ class ZRect
\param blue Blue component of color (0-255).
\param alpha Alpha component of color (0-255).
**/
- void Draw(Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha=255);
+ void Draw(Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha=255) const;
/*!
\brief Changes the location of the rectangle.
diff --git a/include/ZE_ZSound.h b/include/ZE_ZSound.h
index aa377a9..bf8e2ab 100644
--- a/include/ZE_ZSound.h
+++ b/include/ZE_ZSound.h
@@ -13,7 +13,7 @@
File: ZE_ZSound.h
Description: Header file for core ZEngine Sound Wrapper Object.
Author(s): James Turk
-$Id: ZE_ZSound.h,v 1.3 2002/12/29 06:50:19 cozman Exp $
+$Id: ZE_ZSound.h,v 1.4 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZSound.h
\brief Definition file for ZSound.
@@ -108,14 +108,14 @@ class ZSound : public ZObject
Pause currently playing sound.
**/
- void Pause();
+ void Pause() const;
/*!
\brief Unpause sound.
Unpause currently playing sound.
**/
- void Unpause();
+ void Unpause() const;
/*!
\brief Stop sound.
@@ -123,7 +123,7 @@ class ZSound : public ZObject
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);
+ void Stop(int fadeTime=0) const;
/*!
\brief Change Volume.
@@ -143,7 +143,7 @@ class ZSound : public ZObject
Check if file is loaded and pointer to data is non-NULL.
\return Loaded or Unloaded state of data.
**/
- bool IsLoaded();
+ bool IsLoaded() const;
/*!
\brief Check if sound is Playing.
@@ -151,7 +151,7 @@ class ZSound : public ZObject
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();
+ bool IsPlaying() const;
/*!
\brief Check if sound is Paused.
@@ -159,7 +159,7 @@ class ZSound : public ZObject
Check if sound is "playing" but currently paused.
\return Paused / Not Paused State of Sound.
**/
- bool IsPaused();
+ bool IsPaused() const;
/*!
\brief Find Current Volume of Sound Channel.
@@ -167,7 +167,7 @@ class ZSound : public ZObject
Get current volume of sound channel represented as a value from 0-128.
\return Volume of sound channel, 0-128.
**/
- int Volume();
+ int Volume() const;
};
diff --git a/include/ZE_ZTimer.h b/include/ZE_ZTimer.h
index a0b934b..f212ecd 100644
--- a/include/ZE_ZTimer.h
+++ b/include/ZE_ZTimer.h
@@ -13,7 +13,7 @@
File: ZE_ZTimer.h
Description: Header file for core ZEngine Timer Object.
Author(s): James Turk
-$Id: ZE_ZTimer.h,v 1.3 2002/12/29 06:50:19 cozman Exp $
+$Id: ZE_ZTimer.h,v 1.4 2003/01/16 05:46:39 cozman Exp $
\file ZE_ZTimer.h
\brief Definition file for ZTimer.
@@ -52,7 +52,7 @@ class ZTimer : public ZObject
Protected method to get time from whichever timer is parent.
\return Time on parent timer.
**/
- Uint32 GetParentTime();
+ Uint32 GetParentTime() const;
public:
@@ -91,7 +91,7 @@ class ZTimer : public ZObject
Get current time accounting for time paused.
\return Current Timer Time.
**/
- Uint32 GetTime();
+ Uint32 GetTime() const;
/*!
\brief Get paused state.
@@ -99,7 +99,7 @@ class ZTimer : public ZObject
Find out paused state of timer.
\return Paused state for timer.
**/
- bool IsPaused();
+ bool IsPaused() const;
};
}
diff --git a/src/ZE_ZConfigFile.cpp b/src/ZE_ZConfigFile.cpp
index 941a268..9c14afb 100644
--- a/src/ZE_ZConfigFile.cpp
+++ b/src/ZE_ZConfigFile.cpp
@@ -13,7 +13,7 @@
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.3 2002/12/29 06:52:07 cozman Exp $
+$Id: ZE_ZConfigFile.cpp,v 1.4 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZConfigFile.cpp
\brief Source file for ZConfigFile.
@@ -26,7 +26,7 @@ $Id: ZE_ZConfigFile.cpp,v 1.3 2002/12/29 06:52:07 cozman Exp $
namespace ZE
{
-string ZConfigFile::CleanString(string str)
+string ZConfigFile::CleanString(string str) const
{
string tmpStr;
bool inQuotes = false;
@@ -46,9 +46,9 @@ string ZConfigFile::CleanString(string str)
return tmpStr;
}
-bool ZConfigFile::Exists(string sec)
+bool ZConfigFile::Exists(string sec) const
{
- list::iterator secIter;
+ list::const_iterator secIter;
sec = CleanString(sec);
@@ -60,10 +60,10 @@ bool ZConfigFile::Exists(string sec)
return false;
}
-bool ZConfigFile::Exists(string sec, string var)
+bool ZConfigFile::Exists(string sec, string var) const
{
- list::iterator secIter;
- list::iterator varIter;
+ list::const_iterator secIter;
+ list::const_iterator varIter;
sec = CleanString(sec);
var = CleanString(var);
@@ -126,10 +126,10 @@ void ZConfigFile::SetVariable(string sec, string var, string val)
}
}
-string ZConfigFile::GetVariable(string sec, string var, string defVal)
+string ZConfigFile::GetVariable(string sec, string var, string defVal) const
{
- list::iterator secIter;
- list::iterator varIter;
+ list::const_iterator secIter;
+ list::const_iterator varIter;
sec = CleanString(sec);
var = CleanString(var);
@@ -199,7 +199,7 @@ void ZConfigFile::Process(string filename)
cfile.close();
}
-int ZConfigFile::GetInt(string section, string var, int defVal)
+int ZConfigFile::GetInt(string section, string var, int defVal) const
{
string val;
char tmp[20];
@@ -218,7 +218,7 @@ int ZConfigFile::GetInt(string section, string var, int defVal)
return atoi(val.c_str());
}
-bool ZConfigFile::GetBool(string section, string var, bool defVal)
+bool ZConfigFile::GetBool(string section, string var, bool defVal) const
{
string val,tmp;
@@ -238,7 +238,7 @@ bool ZConfigFile::GetBool(string section, string var, bool defVal)
return defVal;
}
-string ZConfigFile::GetString(string section, string var, string defVal)
+string ZConfigFile::GetString(string section, string var, string defVal) const
{
string val;
diff --git a/src/ZE_ZError.cpp b/src/ZE_ZError.cpp
index e6c70b5..6e1cd49 100755
--- a/src/ZE_ZError.cpp
+++ b/src/ZE_ZError.cpp
@@ -13,7 +13,7 @@
File: ZE_ZError.cpp
Description: Implementation source file for core ZEngine Error Object.
Author(s): James Turk
-$Id: ZE_ZError.cpp,v 1.1 2003/01/15 05:40:09 cozman Exp $
+$Id: ZE_ZError.cpp,v 1.2 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZError.cpp
\brief Source file for ZError.
@@ -53,12 +53,12 @@ void ZError::Create(ZErrorCode code, string desc, string file, int line)
rLine = line;
}
-ZErrorCode ZError::Code()
+ZErrorCode ZError::Code() const
{
return rCode;
}
-string ZError::LogString()
+string ZError::LogString() const
{
string msg;
diff --git a/src/ZE_ZFont.cpp b/src/ZE_ZFont.cpp
index 0cec38b..ca740e1 100644
--- a/src/ZE_ZFont.cpp
+++ b/src/ZE_ZFont.cpp
@@ -13,7 +13,7 @@
File: ZE_ZFont.cpp
Description: Implementation source file for core ZEngine Font Object.
Author(s): James Turk
-$Id: ZE_ZFont.cpp,v 1.4 2003/01/13 06:00:38 cozman Exp $
+$Id: ZE_ZFont.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZFont.cpp
\brief Source file for ZFont.
@@ -60,12 +60,12 @@ void ZFont::Release()
FreeFont(rFont);
}
-void ZFont::DrawText(string text, ZImage &image)
+void ZFont::DrawText(string text, ZImage &image) const
{
image.Attach(TTF_RenderText_Solid(rFont, text.c_str(), rColor));
}
-void ZFont::DrawShadedText(string text, ZImage &image)
+void ZFont::DrawShadedText(string text, ZImage &image) const
{
image.Attach(TTF_RenderText_Shaded(rFont, text.c_str(), rColor, rBGColor));
}
@@ -108,12 +108,12 @@ void ZFont::Resize(int size)
Open(rFilename,size);
}
-bool ZFont::IsLoaded()
+bool ZFont::IsLoaded() const
{
return rFont != NULL;
}
-bool ZFont::IsBold()
+bool ZFont::IsBold() const
{
if(rFont)
return (TTF_GetFontStyle(rFont) & TTF_STYLE_BOLD) > 0;
@@ -124,7 +124,7 @@ bool ZFont::IsBold()
}
}
-bool ZFont::IsItalic()
+bool ZFont::IsItalic() const
{
if(rFont)
return (TTF_GetFontStyle(rFont) & TTF_STYLE_ITALIC) > 0;
@@ -135,7 +135,7 @@ bool ZFont::IsItalic()
}
}
-bool ZFont::IsUnderlined()
+bool ZFont::IsUnderlined() const
{
if(rFont)
return (TTF_GetFontStyle(rFont) & TTF_STYLE_UNDERLINE) > 0;
@@ -146,7 +146,7 @@ bool ZFont::IsUnderlined()
}
}
-int ZFont::Height()
+int ZFont::Height() const
{
if(rFont)
return TTF_FontHeight(rFont);
@@ -157,7 +157,7 @@ int ZFont::Height()
}
}
-int ZFont::LineSkip()
+int ZFont::LineSkip() const
{
if(rFont)
return TTF_FontLineSkip(rFont);
@@ -168,7 +168,7 @@ int ZFont::LineSkip()
}
}
-int ZFont::StringWidth(string text)
+int ZFont::StringWidth(string text) const
{
int w,h;
@@ -184,7 +184,7 @@ int ZFont::StringWidth(string text)
}
}
-int ZFont::StringHeight(string text)
+int ZFont::StringHeight(string text) const
{
int w,h;
diff --git a/src/ZE_ZImage.cpp b/src/ZE_ZImage.cpp
index 380c4a8..b44aff2 100644
--- a/src/ZE_ZImage.cpp
+++ b/src/ZE_ZImage.cpp
@@ -13,7 +13,7 @@
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.14 2003/01/13 06:00:38 cozman Exp $
+$Id: ZE_ZImage.cpp,v 1.15 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZImage.cpp
\brief Source file for ZImage.
@@ -189,7 +189,7 @@ void ZImage::Resize(unsigned int width, unsigned int height)
rHeight = height;
}
-void ZImage::Bind()
+void ZImage::Bind() const
{
if(!rTexID)
rEngine->ReportError(ZERR_NOIMAGE,"Bind");
@@ -197,7 +197,7 @@ void ZImage::Bind()
glBindTexture(GL_TEXTURE_2D, rTexID);
}
-void ZImage::Draw(float x, float y)
+void ZImage::Draw(float x, float y) const
{
Bind();
@@ -209,7 +209,7 @@ void ZImage::Draw(float x, float y)
glEnd();
}
-void ZImage::DrawRotated(int x, int y, float angle)
+void ZImage::DrawRotated(int x, int y, float angle) const
{
float cX,cY; //center variables
@@ -229,22 +229,22 @@ void ZImage::DrawRotated(int x, int y, float angle)
glPopMatrix();
}
-bool ZImage::IsLoaded()
+bool ZImage::IsLoaded() const
{
return glIsTexture(rTexID) == GL_TRUE;
}
-SDL_Surface* ZImage::Surface()
+SDL_Surface* ZImage::Surface() const
{
return rImage;
}
-int ZImage::Width()
+int ZImage::Width() const
{
return rWidth;
}
-int ZImage::Height()
+int ZImage::Height() const
{
return rHeight;
}
diff --git a/src/ZE_ZMusic.cpp b/src/ZE_ZMusic.cpp
index 6d36683..d92aed2 100644
--- a/src/ZE_ZMusic.cpp
+++ b/src/ZE_ZMusic.cpp
@@ -13,7 +13,7 @@
File: ZE_ZMusic.cpp
Description: Implementation source file for core ZEngine Music Object.
Author(s): James Turk
-$Id: ZE_ZMusic.cpp,v 1.4 2003/01/13 06:00:38 cozman Exp $
+$Id: ZE_ZMusic.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZMusic.cpp
\brief Source file for ZMusic.
@@ -58,7 +58,7 @@ void ZMusic::Release()
FreeMusic(rMusic);
}
-void ZMusic::Play(int loopNum, int fadeTime)
+void ZMusic::Play(int loopNum, int fadeTime) const
{
if(Mix_PlayingMusic()) //stop currently playing music
Mix_HaltMusic();
@@ -74,7 +74,7 @@ void ZMusic::Play(int loopNum, int fadeTime)
rEngine->ReportError(ZERR_NOMUSIC, "Play");
}
-void ZMusic::Pause()
+void ZMusic::Pause() const
{
if(rMusic)
Mix_PauseMusic();
@@ -82,7 +82,7 @@ void ZMusic::Pause()
rEngine->ReportError(ZERR_NOMUSIC, "Pause");
}
-void ZMusic::Unpause()
+void ZMusic::Unpause() const
{
if(rMusic)
Mix_ResumeMusic();
@@ -90,7 +90,7 @@ void ZMusic::Unpause()
rEngine->ReportError(ZERR_NOMUSIC, "Unpause");
}
-void ZMusic::Rewind()
+void ZMusic::Rewind() const
{
if(rMusic)
Mix_RewindMusic();
@@ -98,7 +98,7 @@ void ZMusic::Rewind()
rEngine->ReportError(ZERR_NOMUSIC, "Rewind");
}
-void ZMusic::Stop(int fadeTime)
+void ZMusic::Stop(int fadeTime) const
{
if(rMusic)
{
@@ -119,12 +119,12 @@ void ZMusic::SetVolume(int volume)
rEngine->ReportError(ZERR_NOMUSIC, "SetVolume");
}
-bool ZMusic::IsLoaded()
+bool ZMusic::IsLoaded() const
{
return rMusic != NULL;
}
-bool ZMusic::IsPlaying()
+bool ZMusic::IsPlaying() const
{
if(rMusic)
return Mix_PlayingMusic() > 0;
@@ -135,7 +135,7 @@ bool ZMusic::IsPlaying()
}
}
-bool ZMusic::IsPaused()
+bool ZMusic::IsPaused() const
{
if(rMusic)
return Mix_PausedMusic() > 0;
@@ -146,7 +146,7 @@ bool ZMusic::IsPaused()
}
}
-int ZMusic::Volume()
+int ZMusic::Volume() const
{
if(rMusic)
return Mix_VolumeMusic(-1);
diff --git a/src/ZE_ZRect.cpp b/src/ZE_ZRect.cpp
index 0d1f9f8..4aff8c4 100644
--- a/src/ZE_ZRect.cpp
+++ b/src/ZE_ZRect.cpp
@@ -13,7 +13,7 @@
File: ZE_ZRect.cpp
Description: Implementation source file for core ZEngine Rectangle Object.
Author(s): James Turk
-$Id: ZE_ZRect.cpp,v 1.6 2003/01/08 06:07:07 cozman Exp $
+$Id: ZE_ZRect.cpp,v 1.7 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZRect.cpp
\brief Source file for ZRect.
@@ -86,7 +86,7 @@ bool ZRect::operator<(const ZRect &rhs) const
}
}
-void ZRect::Draw(Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha)
+void ZRect::Draw(Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha) const
{
glBindTexture(GL_TEXTURE_2D,0); //reset to blank texture
glColor4ub(red,green,blue,alpha);
diff --git a/src/ZE_ZSound.cpp b/src/ZE_ZSound.cpp
index 19acae1..2968b52 100644
--- a/src/ZE_ZSound.cpp
+++ b/src/ZE_ZSound.cpp
@@ -13,7 +13,7 @@
File: ZE_ZSound.cpp
Description: Implementation source file for core ZEngine Sound Object.
Author(s): James Turk
-$Id: ZE_ZSound.cpp,v 1.4 2003/01/13 06:00:38 cozman Exp $
+$Id: ZE_ZSound.cpp,v 1.5 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZSound.cpp
\brief Source file for ZSound.
@@ -77,7 +77,7 @@ void ZSound::Play(int loopNum, int fadeTime)
rEngine->ReportError(ZERR_NOSOUND, "Play");
}
-void ZSound::Pause()
+void ZSound::Pause() const
{
if(rSound && rChannelID >= 0)
Mix_Pause(rChannelID);
@@ -85,7 +85,7 @@ void ZSound::Pause()
rEngine->ReportError(ZERR_NOSOUND, "Pause");
}
-void ZSound::Unpause()
+void ZSound::Unpause() const
{
if(rSound && rChannelID >= 0)
Mix_Resume(rChannelID);
@@ -93,7 +93,7 @@ void ZSound::Unpause()
rEngine->ReportError(ZERR_NOSOUND, "Unpause");
}
-void ZSound::Stop(int fadeTime)
+void ZSound::Stop(int fadeTime) const
{
if(rSound && rChannelID >= 0)
{
@@ -114,12 +114,12 @@ void ZSound::SetVolume(int volume)
rEngine->ReportError(ZERR_NOSOUND, "SetVolume");
}
-bool ZSound::IsLoaded()
+bool ZSound::IsLoaded() const
{
return rSound != NULL;
}
-bool ZSound::IsPlaying()
+bool ZSound::IsPlaying() const
{
if(rSound && rChannelID >= 0)
return Mix_Playing(rChannelID) > 0;
@@ -131,7 +131,7 @@ bool ZSound::IsPlaying()
}
}
-bool ZSound::IsPaused()
+bool ZSound::IsPaused() const
{
if(rSound && rChannelID >= 0)
return Mix_Paused(rChannelID) > 0;
@@ -142,7 +142,7 @@ bool ZSound::IsPaused()
}
}
-int ZSound::Volume()
+int ZSound::Volume() const
{
if(rSound)
return Mix_VolumeChunk(rSound,-1);
diff --git a/src/ZE_ZTimer.cpp b/src/ZE_ZTimer.cpp
index d23e072..d1e36d1 100644
--- a/src/ZE_ZTimer.cpp
+++ b/src/ZE_ZTimer.cpp
@@ -13,7 +13,7 @@
File: ZE_ZTimer.cpp
Description: Implementation source file for core ZEngine Timer Object.
Author(s): James Turk
-$Id: ZE_ZTimer.cpp,v 1.3 2002/12/29 06:52:07 cozman Exp $
+$Id: ZE_ZTimer.cpp,v 1.4 2003/01/16 05:45:58 cozman Exp $
\file ZE_ZTimer.cpp
\brief Source file for ZTimer.
@@ -26,7 +26,7 @@ $Id: ZE_ZTimer.cpp,v 1.3 2002/12/29 06:52:07 cozman Exp $
namespace ZE
{
-Uint32 ZTimer::GetParentTime()
+Uint32 ZTimer::GetParentTime() const
{
if(rUseZEngine)
return rEngine->GetTime();
@@ -65,7 +65,7 @@ void ZTimer::Unpause()
}
}
-Uint32 ZTimer::GetTime()
+Uint32 ZTimer::GetTime() const
{
if(rPaused)
return GetParentTime() - (rPausedTime + (GetParentTime() - rLastPause));
@@ -73,7 +73,7 @@ Uint32 ZTimer::GetTime()
return GetParentTime() - rPausedTime;
}
-bool ZTimer::IsPaused()
+bool ZTimer::IsPaused() const
{
return rPaused;
}