[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

aedefs.h

00001 /*
00002  *  AE Engine
00003  *
00004  *  Copyright (C) 2003 Riku "Rakkis" Nurminen
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __AE_AEDEFS_H__
00023 #define __AE_AEDEFS_H__
00024 
00025 #ifdef WIN32
00026 #  define WIN32_LEAN_AND_MEAN
00027 #  include <windows.h>
00028 #  undef WIN32_LEAN_AND_MEAN
00029 #  define ISWIN32 1
00030 #else
00031 #  define ISWIN32 0
00032 #endif
00033 
00034 #include <cstdio>
00035 #include <cstdarg>
00036 #include <cstdlib>
00037 #include <cstring>
00038 #include <cmath>
00039 #include <iomanip>
00040 #include <iostream>
00041 #include <vector>
00042 #include <map>
00043 
00044 // Define ONLY_INCLUDE_STD before including this file if you don't need the
00045 // video stuff included but only the std includes (and aetypes.h).
00046 #ifndef ONLY_INCLUDE_STD
00047 #include <GL/gl.h>
00048 #include <GL/glu.h>
00049 #include <glext.h>
00050 #include <SDL.h>
00051 #endif
00052 
00053 #include <aetypes.h>
00054 
00055 #if !defined(ONLY_INCLUDE_STD) && defined(WIN32) && defined(_MSC_VER)
00056 #pragma comment(lib, "OpenGL32.lib")
00057 #pragma comment(lib, "GLu32.lib")
00058 #pragma comment(lib, "SDLmain.lib")
00059 #pragma comment(lib, "SDL.lib")
00060 #endif
00061 
00062 #ifndef AE_APPLICATION
00063 #define AE_APPLICATION \
00064  aeMemoryManager memmgr(6, 128);
00065 #endif
00066 
00067 #define AECF_CN_MAXLEN 16
00068 #define AECF_CNDEF \
00069  protected: \
00070    aeInterface myInterfaceID;
00071    char _aemm_clname[AECF_CN_MAXLEN + 8]; \
00072 
00073 #define AECF_CNAME(cName) \
00074  char name[] = #cName; \
00075  int offset = 4; \
00076  int i = 0; \
00077  myInterfaceID = AE_INTERFACE_##cName; \
00078  _aemm_clname[0] = 0x51; \
00079  _aemm_clname[1] = 0x50; \
00080  _aemm_clname[2] = '<'; \
00081  _aemm_clname[3] = '<'; \
00082  while(name[i] != 0) { \
00083      _aemm_clname[offset] = name[i]; \
00084      i++; \
00085      offset++; \
00086  } \
00087  while(offset < AECF_CN_MAXLEN + 4) { \
00088      _aemm_clname[offset++] = '_'; \
00089  } \
00090  _aemm_clname[offset++] = '>'; \
00091  _aemm_clname[offset++] = '>'; \
00092  _aemm_clname[offset++] = 0x50; \
00093  _aemm_clname[offset++] = 0x51;
00094 
00100 
00101 
00105 void *operator new(size_t size, const char* filename, int line);
00107 
00111 void *operator new[](size_t size, const char* filename, int line);
00112 
00114 
00118 void operator delete(void *pblock);
00119 
00121 
00125 void operator delete[](void *pblock);
00126 
00129 // Conflict with the actual overriding-procedure (it'll insert this macro's
00130 // expansion into the source of overriding ... not working very well ;-)).
00131 // "Hacking" it this way it stays the same include-file for both, application
00132 // and the memorymanager objectfile.
00133 #ifndef __AE_MEMORYMANAGER_CPP__
00134 #define new new(__FILE__, __LINE__)
00135 #endif
00136 
00137 #define ASSERT(expr) \
00138  aeSystem::aeAssert(expr, #expr, __FILE__, __LINE__)
00139 
00140 #define aeReport \
00141  aeSystem::report
00142 
00143 #endif // __AE_AEDEFS_H__

AE Engine Public API Reference
Generated on Wed Apr 9 09:43:39 2003 by Doxygen.