00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PENT_INCLUDE_H
00022 #define PENT_INCLUDE_H
00023
00024 #define PENTAGRAM_NEW
00025
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include <config.h>
00029 #endif
00030
00031
00032 #if defined(_MSC_VER) && !defined(UNDER_CE)
00033 # include "system/msvc/msvc_include.h"
00034 #endif
00035
00036
00037 #if defined(_MSC_VER) && defined(UNDER_CE)
00038 # include "wince_include.h"
00039 #endif
00040
00041 #ifdef __APPLE__
00042 # include "macosx_include.h"
00043 #endif
00044
00045
00046
00047
00048 #include "common_types.h"
00049
00050
00051
00052
00053
00054 #include "p_dynamic_cast.h"
00055
00056
00057
00058
00059
00060 #include <cassert>
00061
00062
00063
00064
00065
00066 #include <string>
00067 #include <cstring>
00068 #include "istring.h"
00069
00070
00071 extern const std::string c_empty_string;
00072
00073
00074
00075
00076
00077
00078 #include "Errors.h"
00079
00080
00081
00082
00083
00084
00085 #include "Console.h"
00086
00087
00088
00089
00090
00091 #ifdef DEBUG
00092 # define POUT(x) do { pout << x << std::endl; pout.flush(); } while (0)
00093 # define PERR(x) do { perr << x << std::endl; perr.flush(); } while (0)
00094 #else
00095 # define POUT(x) do { } while(0)
00096 # define PERR(x) do { } while(0)
00097 #endif
00098
00099
00100
00101
00102 #define FORGET_OBJECT(x) do { delete x; x = 0; } while(0)
00103 #define FORGET_ARRAY(x) do { delete [] x; x = 0; } while(0)
00104
00105
00106
00107
00108
00109
00110 #define CANT_HAPPEN() do { assert(false); } while(0)
00111
00112
00113
00114
00115
00116
00117 #define CANT_HAPPEN_RETURN() do { assert(false); return 0; } while(0)
00118
00119
00120
00121
00122
00123
00124
00125 #define CANT_HAPPEN_MSG(msg) do { assert(msg && false); } while(0)
00126
00127
00128
00129 #include "pent_valgrind.h"
00130
00131
00132
00133 typedef void * (*allocFunc)(size_t size);
00134 typedef void (*deallocFunc)(void * ptr);
00135
00136 namespace Pentagram
00137 {
00138 extern allocFunc palloc;
00139 extern deallocFunc pfree;
00140 void setAllocationFunctions(allocFunc a, deallocFunc d);
00141 }
00142
00143 #define ENABLE_CUSTOM_MEMORY_ALLOCATION() \
00144 static void * operator new(size_t size); \
00145 static void operator delete(void * ptr);
00146
00147 #define DEFINE_CUSTOM_MEMORY_ALLOCATION(Classname) \
00148 void * Classname::operator new(size_t size) { \
00149 return Pentagram::palloc(size); \
00150 } \
00151 \
00152 void Classname::operator delete(void * ptr) { \
00153 Pentagram::pfree(ptr); \
00154 }
00155
00156
00157
00158
00159 #ifdef USE_PRECOMPILED_HEADER
00160
00161
00162 #include <fstream>
00163 #include <cstdio>
00164 #include <list>
00165 #include <vector>
00166
00167
00168 #include "getObject.h"
00169 #include "Kernel.h"
00170 #include "intrinsics.h"
00171 #include "Process.h"
00172 #include "Object.h"
00173 #include "Item.h"
00174 #include "Container.h"
00175 #include "Actor.h"
00176 #include "MainActor.h"
00177 #include "Gump.h"
00178 #include "FileSystem.h"
00179 #include "IDataSource.h"
00180 #include "ODataSource.h"
00181 #include "ShapeArchive.h"
00182 #include "Shape.h"
00183 #include "ShapeFrame.h"
00184 #include "RenderSurface.h"
00185 #include "World.h"
00186 #include "CurrentMap.h"
00187 #include "ObjectManager.h"
00188 #include "GUIApp.h"
00189 #include "Usecode.h"
00190 #include "UCList.h"
00191 #include "UCMachine.h"
00192 #include "UCProcess.h"
00193 #endif
00194
00195 #endif //PENT_INCLUDE_H