line endings!

This commit is contained in:
James Turk 2003-11-23 19:27:41 +00:00
parent 615591cce9
commit 829705a30d
3 changed files with 297 additions and 296 deletions

View File

@ -1,41 +1,41 @@
/*******************************************************************************
This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*!
\file ZE_Defines.h
\brief Define file for ZEngine where all #define statements to control compilation options are placed.
Definition file, holds #define statements describing optional features of ZEngine.
<br>$Id: ZE_Defines.h,v 1.24 2003/10/03 22:03:29 cozman Exp $<br>
\author James Turk
**/
#ifndef __ze_defines_h__
#define __ze_defines_h__
//Defines- undefine any of these if you dont have the indicated SDL extension//
//! OpenGL 2D Rendering Target.
#define ZE_OGL (1)
//! SDL Rendering Target.
#define ZE_SDL (2)
//! Define the graphics backend for ZEngine to use. (Options are ZE_OGL,ZE_SDL,ZE_D3D)
#define GFX_BACKEND (ZE_OGL)
//! Define to include font support.
#define USE_SDL_TTF
//! Define to include non-bmp image file support.
#define USE_SDL_IMAGE
//! Define to include sound support.
#define USE_SDL_MIXER
//! Define to use depreciated code that has not been entirely removed.
//#define DEPRECIATED
#endif //__ze_defines_h__
/*******************************************************************************
This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*!
\file ZE_Defines.h
\brief Define file for ZEngine where all #define statements to control compilation options are placed.
Definition file, holds #define statements describing optional features of ZEngine.
<br>$Id: ZE_Defines.h,v 1.25 2003/11/23 19:31:24 cozman Exp $<br>
\author James Turk
**/
#ifndef __ze_defines_h__
#define __ze_defines_h__
//Defines- undefine any of these if you dont have the indicated SDL extension//
//! OpenGL 2D Rendering Target.
#define ZE_OGL (1)
//! SDL Rendering Target.
#define ZE_SDL (2)
//! Define the graphics backend for ZEngine to use. (Options are ZE_OGL,ZE_SDL,ZE_D3D)
#define GFX_BACKEND (ZE_OGL)
//! Define to include font support.
#define USE_SDL_TTF
//! Define to include non-bmp image file support.
#define USE_SDL_IMAGE
//! Define to include sound support.
#define USE_SDL_MIXER
//! Define to use depreciated code that has not been entirely removed.
//#define DEPRECIATED
#endif //__ze_defines_h__

View File

@ -1,185 +1,185 @@
/*******************************************************************************
This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*!
\file ZE_ZSound.h
\brief Definition file for ZSound.
Definition file for ZSound, the Sound Effect wrapper for ZEngine.
<br>$Id: ZE_ZSound.h,v 1.10 2003/09/24 01:49:52 cozman Exp $<br>
\author James Turk
**/
#ifndef __ze_zsound_h__
#define __ze_zsound_h__
#include "ZE_ZEngine.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
{
protected:
//! Pointer to ZEngine Object
ZEngine* rEngine;
//! 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(std::string filename);
/*!
\brief Destructor, frees memory.
Destructor calls ZSound::Release().
**/
virtual ~ZSound();
/*!
\brief Opens a sound effect file.
Open a music file to be used.
\param filename Music to open.
**/
void Open(std::string filename);
/*!
\brief Opens a sound effect file from within a zip archive.
Open a sound effect file from within a zip archive using zlib and SDL_RWops.
\param zipname Zip file to open sound effect from.
\param filename File to open as new sound effect.
**/
void OpenFromZip(std::string zipname, std::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() const;
/*!
\brief Unpause sound.
Unpause currently playing sound.
**/
void Unpause() const;
/*!
\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) const;
/*!
\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() const;
/*!
\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() const;
/*!
\brief Check if sound is Paused.
Check if sound is "playing" but currently paused.
\return Paused / Not Paused State of Sound.
**/
bool IsPaused() const;
/*!
\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() const;
};
}
#endif //USE_SDL_MIXER
#endif //__ze_zsound_h__
/*******************************************************************************
This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://www.zengine.sourceforge.net
*******************************************************************************/
/*!
\file ZE_ZSound.h
\brief Definition file for ZSound.
Definition file for ZSound, the Sound Effect wrapper for ZEngine.
<br>$Id: ZE_ZSound.h,v 1.11 2003/11/23 19:27:41 cozman Exp $<br>
\author James Turk
**/
#ifndef __ze_zsound_h__
#define __ze_zsound_h__
#include "ZE_ZEngine.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
{
protected:
//! Pointer to ZEngine Object
ZEngine* rEngine;
//! 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(std::string filename);
/*!
\brief Destructor, frees memory.
Destructor calls ZSound::Release().
**/
virtual ~ZSound();
/*!
\brief Opens a sound effect file.
Open a music file to be used.
\param filename Music to open.
**/
void Open(std::string filename);
/*!
\brief Opens a sound effect file from within a zip archive.
Open a sound effect file from within a zip archive using zlib and SDL_RWops.
\param zipname Zip file to open sound effect from.
\param filename File to open as new sound effect.
**/
void OpenFromZip(std::string zipname, std::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() const;
/*!
\brief Unpause sound.
Unpause currently playing sound.
**/
void Unpause() const;
/*!
\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) const;
/*!
\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() const;
/*!
\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() const;
/*!
\brief Check if sound is Paused.
Check if sound is "playing" but currently paused.
\return Paused / Not Paused State of Sound.
**/
bool IsPaused() const;
/*!
\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() const;
};
}
#endif //USE_SDL_MIXER
#endif //__ze_zsound_h__

View File

@ -1,70 +1,71 @@
/*!
\file ZEngine.h
\brief Header file for ZEngine.
Public header file for ZEngine, this is the file that programs that wish to utilize ZEngine should include.
<br>$Id: ZEngine.h,v 1.35 2003/10/20 00:11:58 cozman Exp $<br>
\author James Turk
**/
/*!
\mainpage ZEngine Documentation
\author James Turk
\version 0.8.5
\date October 5th, 2003
\section ZEngine About ZEngine
<br>
&nbsp;&nbsp;&nbsp;&nbsp;-ZEngine is designed to provide a powerful yet easy to use 2D game engine in a well designed
Object Oriented manner, and uses cross platform libraries such as SDL and OpenGL. (ZEngine can use SDL_ttf,SDL_image,
and SDL_mixer all of which are cross platform as well as Open Source.)<br>
&nbsp;&nbsp;&nbsp;&nbsp;-It is licensed under a BSD-style license, and anyone is free to suggest or implement changes
to be added to the Engine, as well as modify the engine to their own needs or use it however they like.<br>
&nbsp;&nbsp;&nbsp;&nbsp;-ZEngine now uses OpenGL rather than SDL to do 2D drawing, thus increasing the uses of the engine
and making the engine much faster in all test cases, and the engine was tested for memory leaks with MSVC and is known
to have no leaks.<br>
&nbsp;&nbsp;&nbsp;&nbsp;-The ZEngine website : http://zengine.sourceforge.net/.<br>
&nbsp;&nbsp;&nbsp;&nbsp;-The ZEngine tutorials : http://zengine.sourceforge.net/tutorials/.<br>
\section Licensing Licensing
<br>
<pre> This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://zengine.sourceforge.net
</pre>
\section Authors Contributing Authors
<br>
James Turk <a href="mailto:james@conceptofzero.net">james@conceptofzero.net</a> - Core Engine, Design, Docs, and Classes <br>
Gamer Tazar <a href="mailto:tazar@conceptofzero.net">tazar@conceptofzero.net</a> - OpenGL assistance <br>
Sean <a href="mailto:sean@conceptofzero.net">sean@conceptofzero.net</a> - MSVC++6 Project Files <br>
Kevin Watters <a href="mailto:kwatters@adelphia.net">kwatters@adelphia.net</a> - Fix to ZImage::SetColorKey <br>
Atani <a href="mailto:atani@atani-software.net">atani@atani-software.net</a> - Revised Linux Build System <br>
**/
#ifndef __zengine_h__
#define __zengine_h__
#include "ZE_Defines.h"
#include "ZE_ZEngine.h"
#include "ZE_Utility.h"
#include "ZE_ZImage.h"
#include "ZE_ZTimer.h"
#include "ZE_ZConfigFile.h"
#include "ZE_ZRect.h"
#include "ZE_ZRandGen.h"
#include "ZE_ZBaseParticleSystem.h"
#include "ZE_ZSimpleParticleSystem.h"
#ifdef USE_SDL_TTF
#include "ZE_ZFont.h"
#endif
#ifdef USE_SDL_MIXER
#include "ZE_ZSound.h"
#include "ZE_ZMusic.h"
#endif
#endif //__zengine_h__
/*!
\file ZEngine.h
\brief Header file for ZEngine.
Public header file for ZEngine, this is the file that programs that wish to utilize ZEngine should include.
<br>$Id: ZEngine.h,v 1.36 2003/11/23 19:29:01 cozman Exp $<br>
\author James Turk
**/
/*!
\mainpage ZEngine Documentation
\author James Turk
\version 0.8.5
\date October 5th, 2003
\section ZEngine About ZEngine
<br>
&nbsp;&nbsp;&nbsp;&nbsp;-ZEngine is designed to provide a powerful yet easy to use 2D game engine in a well designed
Object Oriented manner, and uses cross platform libraries such as SDL and OpenGL. (ZEngine can use SDL_ttf,SDL_image,
and SDL_mixer all of which are cross platform as well as Open Source.)<br>
&nbsp;&nbsp;&nbsp;&nbsp;-It is licensed under a BSD-style license, and anyone is free to suggest or implement changes
to be added to the Engine, as well as modify the engine to their own needs or use it however they like.<br>
&nbsp;&nbsp;&nbsp;&nbsp;-ZEngine now uses OpenGL rather than SDL to do 2D drawing, thus increasing the uses of the engine
and making the engine much faster in all test cases, and the engine was tested for memory leaks with MSVC and is known
to have no leaks.<br>
&nbsp;&nbsp;&nbsp;&nbsp;-The ZEngine website : http://zengine.sourceforge.net/.<br>
&nbsp;&nbsp;&nbsp;&nbsp;-The ZEngine tutorials : http://zengine.sourceforge.net/tutorials/.<br>
\section Licensing Licensing
<br>
<pre> This file is Part of the ZEngine Library for 2D game development.
Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license.
The maintainer of this library is James Turk (james@conceptofzero.net)
and the home of this Library is http://zengine.sourceforge.net
</pre>
\section Authors Contributing Authors
<br>
James Turk <a href="mailto:james@conceptofzero.net">james@conceptofzero.net</a> - Core Engine, Design, Docs, and Classes <br>
Gamer Tazar <a href="mailto:tazar@conceptofzero.net">tazar@conceptofzero.net</a> - OpenGL assistance <br>
Sean <a href="mailto:sean@conceptofzero.net">sean@conceptofzero.net</a> - MSVC++6 Project Files <br>
Kevin Watters <a href="mailto:kwatters@adelphia.net">kwatters@adelphia.net</a> - Fix to ZImage::SetColorKey <br>
Atani <a href="mailto:atani@atani-software.net">atani@atani-software.net</a> - Revised Linux Build System <br>
**/
#ifndef __zengine_h__
#define __zengine_h__
#include "ZE_Defines.h"
#include "ZE_ZEngine.h"
#include "ZE_Utility.h"
#include "ZE_ZImage.h"
#include "ZE_ZTimer.h"
#include "ZE_ZConfigFile.h"
#include "ZE_ZRect.h"
#include "ZE_ZRandGen.h"
#include "ZE_ZBaseParticleSystem.h"
#include "ZE_ZSimpleParticleSystem.h"
#include "ZE_ZAnimation.h"
#ifdef USE_SDL_TTF
#include "ZE_ZFont.h"
#endif
#ifdef USE_SDL_MIXER
#include "ZE_ZSound.h"
#include "ZE_ZMusic.h"
#endif
#endif //__zengine_h__