diff --git a/include/ZE_Macros.h b/include/ZE_Macros.h new file mode 100755 index 0000000..ce253e4 --- /dev/null +++ b/include/ZE_Macros.h @@ -0,0 +1,46 @@ +/******************************************************************************* + This file is Part of the ZEngine Library for SDL Game Development. + Copyright (C) 2002 ConceptOfZero.net + + Licensed under the BSD License, see licensing.txt. + + The maintainer of this library is James Turk (jturk@conceptofzero.net) + and the home of this Library is http://www.conceptofzero.net/ +*******************************************************************************/ + +/*! +\par File Header: +File: ZE_Macros.h
+Description: Header file for ZEngine Macros.
+Author(s): James Turk
+$Id: ZE_Macros.h,v 1.1 2002/12/01 08:01:11 cozman Exp $
+ + \file ZE_Macros.h + \brief Definition file for ZEngine Macros + + Definition file for ZEngine Macros which are used throughout the engine. +**/ + +#ifndef __ze_macros_h__ +#define __ze_macros_h__ + +#include "ZE_Includes.h" + +namespace ZE +{ + +#define FreeImage(image) if(image){SDL_FreeSurface(image); image = NULL;} + +#ifdef USE_SDL_MIXER +#define FreeSound(sound) if(sound){Mix_FreeChunk(sound); sound = NULL;} +#define FreeMusic(music) if(music){Mix_FreeMusic(music); music = NULL;} +#endif + +#ifdef USE_SDL_TTF +#define FreeFont(font) if(font){TTF_CloseFont(font); font = NULL;} +#endif + + +} + +#endif //__ze_macros_h__ \ No newline at end of file