00001 #ifndef HEADER_DEFINE
00002 #define HEADER_DEFINE
00003
00009
00010
00012 static const char PRGNAME[] = "SMLabyrinth";
00013
00015 static const char PRGVERS[] = "9.10.26";
00016
00018 static const char PRGAUTH[] =
00019 "<private>\n"\
00020 "Email: <info[AT@]pietris[DOT.]net>\n"\
00021 "\n"\
00022 "MrC\n"\
00023 "Email: <info[AT@]pietris[DOT.]net>";
00024
00026 static const char PRGLICS[] =
00027 "This program is free software:\n"\
00028 "you can redistribute it and/or modify it\n"\
00029 "not until you have contacted and received an authorization"\
00030 " replies from the authors\nand under the terms of the GNU"\
00031 " General Public License as published by\n"\
00032 "the Free Software Foundation, either version 3 of the"\
00033 " License.\nThis program is distributed in the hope that it"\
00034 " will be useful,\nbut WITHOUT ANY WARRANTY; without even the"\
00035 " implied warranty of\nMERCHANTABILITY or FITNESS FOR"\
00036 " A PARTICULAR PURPOSE. See the\nGNU General Public"\
00037 " License for more details.\nYou should have received a copy"\
00038 " of the GNU General Public License\nalong with this program."\
00039 " If not, see <http://www.gnu.org/licenses/>.";
00040
00042 static const char PRGCPYR[] = "Copyright 2009 © MrC";
00043
00045 static const char PRGAIMS[] =
00046 "Simple game of labyrinth.\n"\
00047 "<private>";
00048
00050 static const char PRGWBLK[] =
00051 "https://www.pietris.net/software/smlabyrinth/";
00052
00054 static const char PRGLOGO[] = "../img/SMLabyrinth.png";
00055
00057 static const char NULLCHAR = '\0';
00058
00059
00060
00061
00063 static const unsigned short int MAXR = 100;
00065 static const unsigned short int MAXC = 100;
00067 static const unsigned short int MINR = 5;
00069 static const unsigned short int MINC = 5;
00070
00071
00072
00073
00074
00076 static const char FREE = '.';
00078 static const char CLOSE = 'X';
00080 static const char DOOR = 'D';
00082 static const char START = 'S';
00083
00084
00085
00087 static const unsigned short int UNVISITED = 0;
00089 static const unsigned short int VISIT1 = 1;
00091 static const unsigned short int VISIT2 = 2;
00092
00093
00094
00095
00096
00097
00098
00099
00101 static const unsigned short int LOWERCASE = 1;
00103 static const unsigned short int UPPERCASE = 2;
00105 static const unsigned short int DIGITS = 4;
00106
00107
00109 static const char RECORD_FILE_NAME[] = "record.txt";
00111 static const char GAMES_DIR[] = "games";
00113 static const char GAMES_LEVEL_DIR[] = "level";
00114
00115
00116
00117
00119 static const unsigned short int GIVE_BONUS_PERC = 100;
00121 static const unsigned short int NEW_GAME_ROUND = 10;
00123 static const unsigned short int BONUS_POINTS = 10;
00125 static const unsigned short int NO_BONUS_POINTS = 0;
00127 static const unsigned short int SEC_PER_LEVEL = 9;
00128
00130
00131 static const unsigned short int MIN_DIFFICULT = 1;
00133 static const unsigned short int MAX_DIFFICULT = 10;
00134
00135
00136
00137
00139 static const char COMMENT = '#';
00141 static const char ENDLINE = '\n';
00142
00143
00144
00145
00147 static const unsigned int MAX_ERR_BUFFER_LEN = 1000;
00149 static const unsigned int MAX_OTH_BUFFER_LEN = 250;
00150
00152 #define MAX_RECORDNAME_LEN 15
00153
00154 #define MAX_RECORD_SHOW 20
00155
00156
00157
00158 #ifdef DEBUG
00159
00160
00161 extern unsigned int MASK;
00162
00168 static const unsigned int BITMASK_MAX = 255;
00169
00171 #define DBG(A, B) { if((A & MASK) != 0){B;} }
00172
00173 #else
00174
00175 #define DBG(A, B)
00176
00177 #define NDEBUG
00178
00179 #endif
00180
00182 #define ID1 "Trace execution"
00183
00184 #define D1(a) DBG(1, a)
00185
00187 #define ID2 "High-level info"
00188
00189 #define D2(a) DBG(2, a)
00190
00192 #define ID3 "Main cycles info"
00193
00194 #define D3(a) DBG(4, a)
00195
00197 #define ID4 "Medium-level info"
00198
00199 #define D4(a) DBG(8, a)
00200
00202 #define ID5 "Low-level info"
00203
00204 #define D5(a) DBG(16, a)
00205
00207 #define ID6 "Programmers details - 1"
00208
00209 #define D6(a) DBG(32, a)
00210
00212 #define ID7 "Programmers details - 2"
00213
00214 #define D7(a) DBG(64, a)
00215
00217 #define ID8 "Programmers details - 3"
00218
00219 #define D8(a) DBG(128,a)
00220
00221
00222
00223 #endif