Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

/include/ZE_Utility.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002         This file is Part of the ZEngine Library for 2D game development.
00003                    Copyright (C) 2002, 2003 James Turk
00004 
00005                      Licensed under a BSD-style license.
00006 
00007     The maintainer of this library is James Turk (james@conceptofzero.net) 
00008      and the home of this Library is http://www.zengine.sourceforge.net
00009 *******************************************************************************/
00010 
00025 #ifndef __ze_utility_h__
00026 #define __ze_utility_h__
00027 
00028 #include "ZE_Includes.h"
00029 
00030 namespace ZE
00031 {
00032 
00042 string FormatStr(const char *fmtstr, ...);
00043 
00045 //Macros//
00047 
00051 #define FreeImage(image) if(image){SDL_FreeSurface(image); image = NULL;}
00052 
00053 #ifdef USE_SDL_MIXER
00054 
00057 #define FreeSound(sound) if(sound){Mix_FreeChunk(sound); sound = NULL;}
00058 
00061 #define FreeMusic(music) if(music){Mix_FreeMusic(music); music = NULL;}
00062 #endif
00063 
00064 #ifdef USE_SDL_TTF
00065 
00068 #define FreeFont(font) if(font){TTF_CloseFont(font); font = NULL;}
00069 #endif
00070 
00071 
00072 }
00073 
00074 #endif //__ze_utility_h__
00075 

Generated on Sun Apr 27 18:14:00 2003 for ZEngine by doxygen1.3-rc2