line endings!
This commit is contained in:
parent
615591cce9
commit
829705a30d
@ -1,41 +1,41 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
This file is Part of the ZEngine Library for 2D game development.
|
This file is Part of the ZEngine Library for 2D game development.
|
||||||
Copyright (C) 2002, 2003 James Turk
|
Copyright (C) 2002, 2003 James Turk
|
||||||
|
|
||||||
Licensed under a BSD-style license.
|
Licensed under a BSD-style license.
|
||||||
|
|
||||||
The maintainer of this library is James Turk (james@conceptofzero.net)
|
The maintainer of this library is James Turk (james@conceptofzero.net)
|
||||||
and the home of this Library is http://www.zengine.sourceforge.net
|
and the home of this Library is http://www.zengine.sourceforge.net
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file ZE_Defines.h
|
\file ZE_Defines.h
|
||||||
\brief Define file for ZEngine where all #define statements to control compilation options are placed.
|
\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.
|
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>
|
<br>$Id: ZE_Defines.h,v 1.25 2003/11/23 19:31:24 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __ze_defines_h__
|
#ifndef __ze_defines_h__
|
||||||
#define __ze_defines_h__
|
#define __ze_defines_h__
|
||||||
|
|
||||||
//Defines- undefine any of these if you dont have the indicated SDL extension//
|
//Defines- undefine any of these if you dont have the indicated SDL extension//
|
||||||
|
|
||||||
//! OpenGL 2D Rendering Target.
|
//! OpenGL 2D Rendering Target.
|
||||||
#define ZE_OGL (1)
|
#define ZE_OGL (1)
|
||||||
//! SDL Rendering Target.
|
//! SDL Rendering Target.
|
||||||
#define ZE_SDL (2)
|
#define ZE_SDL (2)
|
||||||
//! Define the graphics backend for ZEngine to use. (Options are ZE_OGL,ZE_SDL,ZE_D3D)
|
//! Define the graphics backend for ZEngine to use. (Options are ZE_OGL,ZE_SDL,ZE_D3D)
|
||||||
#define GFX_BACKEND (ZE_OGL)
|
#define GFX_BACKEND (ZE_OGL)
|
||||||
|
|
||||||
//! Define to include font support.
|
//! Define to include font support.
|
||||||
#define USE_SDL_TTF
|
#define USE_SDL_TTF
|
||||||
//! Define to include non-bmp image file support.
|
//! Define to include non-bmp image file support.
|
||||||
#define USE_SDL_IMAGE
|
#define USE_SDL_IMAGE
|
||||||
//! Define to include sound support.
|
//! Define to include sound support.
|
||||||
#define USE_SDL_MIXER
|
#define USE_SDL_MIXER
|
||||||
//! Define to use depreciated code that has not been entirely removed.
|
//! Define to use depreciated code that has not been entirely removed.
|
||||||
//#define DEPRECIATED
|
//#define DEPRECIATED
|
||||||
|
|
||||||
#endif //__ze_defines_h__
|
#endif //__ze_defines_h__
|
||||||
|
@ -1,185 +1,185 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
This file is Part of the ZEngine Library for 2D game development.
|
This file is Part of the ZEngine Library for 2D game development.
|
||||||
Copyright (C) 2002, 2003 James Turk
|
Copyright (C) 2002, 2003 James Turk
|
||||||
|
|
||||||
Licensed under a BSD-style license.
|
Licensed under a BSD-style license.
|
||||||
|
|
||||||
The maintainer of this library is James Turk (james@conceptofzero.net)
|
The maintainer of this library is James Turk (james@conceptofzero.net)
|
||||||
and the home of this Library is http://www.zengine.sourceforge.net
|
and the home of this Library is http://www.zengine.sourceforge.net
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file ZE_ZSound.h
|
\file ZE_ZSound.h
|
||||||
\brief Definition file for ZSound.
|
\brief Definition file for ZSound.
|
||||||
|
|
||||||
Definition file for ZSound, the Sound Effect wrapper for ZEngine.
|
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>
|
<br>$Id: ZE_ZSound.h,v 1.11 2003/11/23 19:27:41 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __ze_zsound_h__
|
#ifndef __ze_zsound_h__
|
||||||
#define __ze_zsound_h__
|
#define __ze_zsound_h__
|
||||||
|
|
||||||
#include "ZE_ZEngine.h"
|
#include "ZE_ZEngine.h"
|
||||||
|
|
||||||
#ifdef USE_SDL_MIXER
|
#ifdef USE_SDL_MIXER
|
||||||
|
|
||||||
namespace ZE
|
namespace ZE
|
||||||
{
|
{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief ZSound class for playing sound effects. (WAV)
|
\brief ZSound class for playing sound effects. (WAV)
|
||||||
|
|
||||||
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
|
class ZSound
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
//! Pointer to ZEngine Object
|
//! Pointer to ZEngine Object
|
||||||
ZEngine* rEngine;
|
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.
|
||||||
int rChannelID;
|
int rChannelID;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! Static Variable For Infinite loop of sound. (Defined as -1)
|
//! Static Variable For Infinite loop of sound. (Defined as -1)
|
||||||
static const int LoopInfinite;
|
static const int LoopInfinite;
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
//Opening and Closing//
|
//Opening and Closing//
|
||||||
///////////////////////
|
///////////////////////
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Default Constructor.
|
\brief Default Constructor.
|
||||||
|
|
||||||
Default Constructor, does nothing.
|
Default Constructor, does nothing.
|
||||||
**/
|
**/
|
||||||
ZSound();
|
ZSound();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Constructor that opens a sound effect file.
|
\brief Constructor that opens a sound effect file.
|
||||||
|
|
||||||
Constructor simply calls ZSound::Open() with same filename. (WAV,MOD,MID,OGG)
|
Constructor simply calls ZSound::Open() with same filename. (WAV,MOD,MID,OGG)
|
||||||
\param filename Sound effect to open.
|
\param filename Sound effect to open.
|
||||||
**/
|
**/
|
||||||
ZSound(std::string filename);
|
ZSound(std::string filename);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Destructor, frees memory.
|
\brief Destructor, frees memory.
|
||||||
|
|
||||||
Destructor calls ZSound::Release().
|
Destructor calls ZSound::Release().
|
||||||
**/
|
**/
|
||||||
virtual ~ZSound();
|
virtual ~ZSound();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Opens a sound effect file.
|
\brief Opens a sound effect file.
|
||||||
|
|
||||||
Open a music file to be used.
|
Open a music file to be used.
|
||||||
\param filename Music to open.
|
\param filename Music to open.
|
||||||
**/
|
**/
|
||||||
void Open(std::string filename);
|
void Open(std::string filename);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Opens a sound effect file from within a zip archive.
|
\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.
|
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 zipname Zip file to open sound effect from.
|
||||||
\param filename File to open as new sound effect.
|
\param filename File to open as new sound effect.
|
||||||
**/
|
**/
|
||||||
void OpenFromZip(std::string zipname, std::string filename);
|
void OpenFromZip(std::string zipname, std::string filename);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Release sound effect.
|
\brief Release sound effect.
|
||||||
|
|
||||||
Release memory held by sample data.
|
Release memory held by sample data.
|
||||||
**/
|
**/
|
||||||
void Release();
|
void Release();
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
//Play Controls//
|
//Play Controls//
|
||||||
/////////////////
|
/////////////////
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Play currently loaded sound effect.
|
\brief Play currently loaded sound effect.
|
||||||
|
|
||||||
Play sound effect, looping loopNum times. (use ZSound::LoopInfinite to loop forever.)
|
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.
|
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 loopNum Number of times to loop song, defaults to zero.
|
||||||
\param fadeTime Milliseconds to fade to full volume, defaults to zero for no fade.
|
\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);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Pause sound.
|
\brief Pause sound.
|
||||||
|
|
||||||
Pause currently playing sound.
|
Pause currently playing sound.
|
||||||
**/
|
**/
|
||||||
void Pause() const;
|
void Pause() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Unpause sound.
|
\brief Unpause sound.
|
||||||
|
|
||||||
Unpause currently playing sound.
|
Unpause currently playing sound.
|
||||||
**/
|
**/
|
||||||
void Unpause() const;
|
void Unpause() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Stop sound.
|
\brief Stop sound.
|
||||||
|
|
||||||
Stop currently playing sound, if fadeTime is not zero, fade out over specified time.
|
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.
|
\param fadeTime Milliseconds to fade out over, defaults to zero for immediate stop.
|
||||||
**/
|
**/
|
||||||
void Stop(int fadeTime=0) const;
|
void Stop(int fadeTime=0) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Change Volume.
|
\brief Change Volume.
|
||||||
|
|
||||||
Change volume of currently playing sample.
|
Change volume of currently playing sample.
|
||||||
\param volume Volume to change to, can be in a range from 0 to 128.
|
\param volume Volume to change to, can be in a range from 0 to 128.
|
||||||
**/
|
**/
|
||||||
void SetVolume(int volume);
|
void SetVolume(int volume);
|
||||||
|
|
||||||
/////////////
|
/////////////
|
||||||
//Accessors//
|
//Accessors//
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Check if file is loaded.
|
\brief Check if file is loaded.
|
||||||
|
|
||||||
Check if file is loaded and pointer to data is non-NULL.
|
Check if file is loaded and pointer to data is non-NULL.
|
||||||
\return Loaded or Unloaded state of data.
|
\return Loaded or Unloaded state of data.
|
||||||
**/
|
**/
|
||||||
bool IsLoaded() const;
|
bool IsLoaded() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Check if sound is Playing.
|
\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)
|
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.
|
\return Playing / Not Playing State of sound.
|
||||||
**/
|
**/
|
||||||
bool IsPlaying() const;
|
bool IsPlaying() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Check if sound is Paused.
|
\brief Check if sound is Paused.
|
||||||
|
|
||||||
Check if sound is "playing" but currently paused.
|
Check if sound is "playing" but currently paused.
|
||||||
\return Paused / Not Paused State of Sound.
|
\return Paused / Not Paused State of Sound.
|
||||||
**/
|
**/
|
||||||
bool IsPaused() const;
|
bool IsPaused() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Find Current Volume of Sound Channel.
|
\brief Find Current Volume of Sound Channel.
|
||||||
|
|
||||||
Get current volume of sound channel represented as a value from 0-128.
|
Get current volume of sound channel represented as a value from 0-128.
|
||||||
\return Volume of sound channel, 0-128.
|
\return Volume of sound channel, 0-128.
|
||||||
**/
|
**/
|
||||||
int Volume() const;
|
int Volume() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //USE_SDL_MIXER
|
#endif //USE_SDL_MIXER
|
||||||
|
|
||||||
#endif //__ze_zsound_h__
|
#endif //__ze_zsound_h__
|
||||||
|
@ -1,70 +1,71 @@
|
|||||||
/*!
|
/*!
|
||||||
\file ZEngine.h
|
\file ZEngine.h
|
||||||
\brief Header file for ZEngine.
|
\brief Header file for ZEngine.
|
||||||
|
|
||||||
Public header file for ZEngine, this is the file that programs that wish to utilize ZEngine should include.
|
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>
|
<br>$Id: ZEngine.h,v 1.36 2003/11/23 19:29:01 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\mainpage ZEngine Documentation
|
\mainpage ZEngine Documentation
|
||||||
|
|
||||||
\author James Turk
|
\author James Turk
|
||||||
\version 0.8.5
|
\version 0.8.5
|
||||||
\date October 5th, 2003
|
\date October 5th, 2003
|
||||||
|
|
||||||
\section ZEngine About ZEngine
|
\section ZEngine About ZEngine
|
||||||
<br>
|
<br>
|
||||||
-ZEngine is designed to provide a powerful yet easy to use 2D game engine in a well designed
|
-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,
|
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>
|
and SDL_mixer all of which are cross platform as well as Open Source.)<br>
|
||||||
-It is licensed under a BSD-style license, and anyone is free to suggest or implement changes
|
-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>
|
to be added to the Engine, as well as modify the engine to their own needs or use it however they like.<br>
|
||||||
-ZEngine now uses OpenGL rather than SDL to do 2D drawing, thus increasing the uses of the engine
|
-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
|
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>
|
to have no leaks.<br>
|
||||||
-The ZEngine website : http://zengine.sourceforge.net/.<br>
|
-The ZEngine website : http://zengine.sourceforge.net/.<br>
|
||||||
-The ZEngine tutorials : http://zengine.sourceforge.net/tutorials/.<br>
|
-The ZEngine tutorials : http://zengine.sourceforge.net/tutorials/.<br>
|
||||||
|
|
||||||
\section Licensing Licensing
|
\section Licensing Licensing
|
||||||
<br>
|
<br>
|
||||||
<pre> This file is Part of the ZEngine Library for 2D game development.
|
<pre> This file is Part of the ZEngine Library for 2D game development.
|
||||||
Copyright (C) 2002, 2003 James Turk
|
Copyright (C) 2002, 2003 James Turk
|
||||||
|
|
||||||
Licensed under a BSD-style license.
|
Licensed under a BSD-style license.
|
||||||
|
|
||||||
The maintainer of this library is James Turk (james@conceptofzero.net)
|
The maintainer of this library is James Turk (james@conceptofzero.net)
|
||||||
and the home of this Library is http://zengine.sourceforge.net
|
and the home of this Library is http://zengine.sourceforge.net
|
||||||
</pre>
|
</pre>
|
||||||
\section Authors Contributing Authors
|
\section Authors Contributing Authors
|
||||||
<br>
|
<br>
|
||||||
James Turk <a href="mailto:james@conceptofzero.net">james@conceptofzero.net</a> - Core Engine, Design, Docs, and Classes <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>
|
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>
|
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>
|
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>
|
Atani <a href="mailto:atani@atani-software.net">atani@atani-software.net</a> - Revised Linux Build System <br>
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __zengine_h__
|
#ifndef __zengine_h__
|
||||||
#define __zengine_h__
|
#define __zengine_h__
|
||||||
|
|
||||||
#include "ZE_Defines.h"
|
#include "ZE_Defines.h"
|
||||||
#include "ZE_ZEngine.h"
|
#include "ZE_ZEngine.h"
|
||||||
#include "ZE_Utility.h"
|
#include "ZE_Utility.h"
|
||||||
#include "ZE_ZImage.h"
|
#include "ZE_ZImage.h"
|
||||||
#include "ZE_ZTimer.h"
|
#include "ZE_ZTimer.h"
|
||||||
#include "ZE_ZConfigFile.h"
|
#include "ZE_ZConfigFile.h"
|
||||||
#include "ZE_ZRect.h"
|
#include "ZE_ZRect.h"
|
||||||
#include "ZE_ZRandGen.h"
|
#include "ZE_ZRandGen.h"
|
||||||
#include "ZE_ZBaseParticleSystem.h"
|
#include "ZE_ZBaseParticleSystem.h"
|
||||||
#include "ZE_ZSimpleParticleSystem.h"
|
#include "ZE_ZSimpleParticleSystem.h"
|
||||||
#ifdef USE_SDL_TTF
|
#include "ZE_ZAnimation.h"
|
||||||
#include "ZE_ZFont.h"
|
#ifdef USE_SDL_TTF
|
||||||
#endif
|
#include "ZE_ZFont.h"
|
||||||
#ifdef USE_SDL_MIXER
|
#endif
|
||||||
#include "ZE_ZSound.h"
|
#ifdef USE_SDL_MIXER
|
||||||
#include "ZE_ZMusic.h"
|
#include "ZE_ZSound.h"
|
||||||
#endif
|
#include "ZE_ZMusic.h"
|
||||||
|
#endif
|
||||||
#endif //__zengine_h__
|
|
||||||
|
#endif //__zengine_h__
|
||||||
|
Loading…
Reference in New Issue
Block a user