moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / game / ivancommon.cpp
blob4b8f26fe321be90cf3e37288bba6a5a8411b8c34
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 #include <cstdio>
13 #include <cstring>
15 #include <cstdlib>
16 #include <exception> // for std::bad_alloc
17 #include <new>
19 /*#include "ivancommon.h"*/
22 void *operator new (std::size_t size) throw (std::bad_alloc) {
23 void *p = malloc(size+1);
24 if (!p) throw std::bad_alloc(); // ANSI/ISO compliant behavior
25 memset(p, 0, size+1);
26 //fprintf(stderr, "GLOBAL NEW!\n");
27 return p;
31 void operator delete (void *p) throw () {
32 if (p) {
33 //fprintf(stderr, "GLOBAL DELETE!\n");
34 free(p);