![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
00001 /* 00002 Copyright 2005-2010 Intel Corporation. All Rights Reserved. 00003 00004 This file is part of Threading Building Blocks. 00005 00006 Threading Building Blocks is free software; you can redistribute it 00007 and/or modify it under the terms of the GNU General Public License 00008 version 2 as published by the Free Software Foundation. 00009 00010 Threading Building Blocks is distributed in the hope that it will be 00011 useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00012 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with Threading Building Blocks; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 As a special exception, you may use this file as part of a free software 00020 library without restriction. Specifically, if other files instantiate 00021 templates or use macros or inline functions from this file, or you compile 00022 this file and link it with other files to produce an executable, this 00023 file does not by itself cause the resulting executable to be covered by 00024 the GNU General Public License. This exception does not however 00025 invalidate any other reasons why the executable file might be covered by 00026 the GNU General Public License. 00027 */ 00028 00029 // 00030 // pover_global.h 00031 // 00032 #ifndef _POVER_GLOBAL_H_ 00033 #define _POVER_GLOBAL_H_ 00034 00035 #ifdef _MAIN_C_ 00036 #define DEFINE // nothing 00037 #define STATIC static 00038 #define INIT(n) = n 00039 #else // not in main file 00040 #define DEFINE extern 00041 #define STATIC // nothing 00042 #define INIT(n) // nothing 00043 #endif // _MAIN_C_ 00044 00045 #include <iostream> 00046 #include <fstream> 00047 00048 #ifdef _WINDOWS 00049 #include <windows.h> 00050 #endif 00051 00052 // this Polygon class only supports rectangles 00053 DEFINE int gDrawXOffset INIT(0); // used for drawing polygons 00054 DEFINE int gDrawYOffset INIT(0); 00055 DEFINE int gPolyXBoxSize INIT(0); // number of pixels orresponding to one "square" (x) 00056 DEFINE int gPolyYBoxSize INIT(0); // number of pixels orresponding to one "square" (y) 00057 DEFINE bool gDoDraw INIT(false); // render the boxes 00058 00059 #define THREADS_UNSET 0 00060 DEFINE int gThreadsLow INIT(THREADS_UNSET); 00061 DEFINE int gThreadsHigh INIT(THREADS_UNSET); 00062 00063 DEFINE std::ofstream gCsvFile; 00064 DEFINE double gSerialTime; 00065 DEFINE char *gCsvFilename INIT(NULL); 00066 00067 #define BORDER_SIZE 10 // number of pixels between maps 00068 00069 // The map size and the number of polygons depends on the version we are compiling. 00070 // If DEBUG then it is small; else it is large. 00071 00072 #ifdef _DEBUG 00073 DEFINE int gNPolygons INIT(30); // default number of polygons in map 00074 DEFINE int gMapXSize INIT(30); 00075 DEFINE int gMapYSize INIT(30); 00076 DEFINE int gGrainSize INIT(5); 00077 #else 00078 DEFINE int gNPolygons INIT(50000); // default number of polygons in map 00079 DEFINE int gMapXSize INIT(1000); 00080 DEFINE int gMapYSize INIT(1000); 00081 DEFINE int gGrainSize INIT(20); 00082 #endif 00083 DEFINE int gMyRandomSeed INIT(2453185); 00084 00085 DEFINE bool gIsGraphicalVersion INIT(false); 00086 00087 typedef enum { 00088 NORTH_SIDE, 00089 EAST_SIDE, 00090 SOUTH_SIDE, 00091 WEST_SIDE 00092 } allSides; 00093 00094 #if _DEBUG 00095 #define PRINT_DEBUG(x) (cout << x << std::endl) 00096 #else 00097 #define PRINT_DEBUG(x) 00098 #endif 00099 00100 00101 #endif // _POVER_GLOBAL_H_
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.