Changeset 349
- Timestamp:
- Jun 10, 2009, 2:40:16 PM (15 years ago)
- Location:
- Daodan
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/build.bat
r346 r349 1 gcc -O3 -s -Wall -shared -fomit-frame-pointer -o build\binkw32.dll src\Oni_Symbols.S src\Daodan.c src\Daodan_DLLStubs.c src\Daodan_Patch.c src\Daodan_Utility.c src\Daodan_Win32.c src\Daodan_Cheater.c src\Daodan_Persistence.c src\ daodan_gl.c src\inifile_reader.c -lgdi321 gcc -O3 -s -Wall -shared -fomit-frame-pointer -o build\binkw32.dll src\Oni_Symbols.S src\Daodan.c src\Daodan_DLLStubs.c src\Daodan_Patch.c src\Daodan_Utility.c src\Daodan_Win32.c src\Daodan_Cheater.c src\Daodan_Persistence.c src\Daodan_WindowHack.c src\daodan_gl.c src\inifile_reader.c -lgdi32 -
Daodan/src/Daodan.c
r348 r349 8 8 #include "Daodan_Persistence.h" 9 9 10 #include "Daodan_WindowHack.h" 11 10 12 #include "Oni.h" 11 13 #include "Oni_Persistence.h" … … 23 25 bool patch_fonttexturecache = true; 24 26 bool patch_largetextures = true; 27 bool patch_levelplugins = true; 25 28 bool patch_pathfinding = true; 26 bool patch_levelplugins = true;27 29 bool patch_projaware = true; 28 30 bool patch_directinput = true; … … 41 43 bool patch_cheatsenabled = true; 42 44 bool patch_usedaodangl = false; 45 bool patch_windowhack = true; 43 46 44 47 bool DDrPatch_Init() … … 179 182 else if (!stricmp(name, "largetextures")) 180 183 patch_largetextures = !stricmp(value, "true"); 184 else if (!stricmp(name, "levelplugins")) 185 patch_levelplugins = !stricmp(value, "true"); 181 186 else if (!stricmp(name, "pathfinding")) 182 187 patch_pathfinding = !stricmp(value, "true"); 183 188 else if (!stricmp(name, "projaware")) 184 189 patch_projaware = !stricmp(value, "true"); 185 else if (!stricmp(name, "levelplugins"))186 patch_levelplugins = !stricmp(value, "true");187 190 else if (!stricmp(name, "directinput")) 188 191 patch_directinput = !stricmp(value, "true"); … … 213 216 else if (!stricmp(name, "usedaodangl")) 214 217 patch_usedaodangl = !stricmp(value, "true"); 218 else if (!stricmp(name, "windowhack")) 219 patch_windowhack = !stricmp(value, "true"); 215 220 else 216 221 DDrStartupMessage("unrecognised patch \"%s\"", name); … … 250 255 DDr_CheatTable[3].message_off = strdup(value); 251 256 else if (!stricmp(name, "fatloot_on")) 252 DDr_CheatTable[4].message_off = strdup(value); 257 DDr_CheatTable[4].message_on = strdup(value); 258 else if (!stricmp(name, "glassworld_on")) 259 DDr_CheatTable[5].message_on = strdup(value); 260 else if (!stricmp(name, "glassworld_off")) 261 DDr_CheatTable[5].message_off = strdup(value); 262 else if (!stricmp(name, "winlevel_on")) 263 DDr_CheatTable[6].message_on = strdup(value); 264 else if (!stricmp(name, "loselevel_on")) 265 DDr_CheatTable[7].message_on = strdup(value); 266 else if (!stricmp(name, "bighead_on")) 267 DDr_CheatTable[8].message_on = strdup(value); 268 else if (!stricmp(name, "bighead_off")) 269 DDr_CheatTable[8].message_off = strdup(value); 270 else if (!stricmp(name, "minime_on")) 271 DDr_CheatTable[9].message_on = strdup(value); 272 else if (!stricmp(name, "minime_off")) 273 DDr_CheatTable[9].message_off = strdup(value); 274 else if (!stricmp(name, "superammo_on")) 275 DDr_CheatTable[10].message_on = strdup(value); 276 else if (!stricmp(name, "superammo_off")) 277 DDr_CheatTable[10].message_off = strdup(value); 278 else if (!stricmp(name, "devmode_on")) 279 { 280 char* str = strdup(value); 281 DDr_CheatTable[11].message_on = str; 282 DDr_CheatTable[cheat_devmodex].message_on = str; 283 } 284 else if (!stricmp(name, "devmode_off")) 285 { 286 char* str = strdup(value); 287 DDr_CheatTable[11].message_off = str; 288 DDr_CheatTable[cheat_devmodex].message_off = str; 289 } 290 else if (!stricmp(name, "reservoirdogs_on")) 291 DDr_CheatTable[12].message_on = strdup(value); 292 else if (!stricmp(name, "reservoirdogs_off")) 293 DDr_CheatTable[12].message_off = strdup(value); 294 else if (!stricmp(name, "roughjustice_on")) 295 DDr_CheatTable[13].message_on = strdup(value); 296 else if (!stricmp(name, "roughjustice_off")) 297 DDr_CheatTable[13].message_off = strdup(value); 298 else if (!stricmp(name, "chenille_on")) 299 DDr_CheatTable[14].message_on = strdup(value); 300 else if (!stricmp(name, "chenille_off")) 301 DDr_CheatTable[14].message_off = strdup(value); 302 else if (!stricmp(name, "behemoth_on")) 303 DDr_CheatTable[15].message_on = strdup(value); 304 else if (!stricmp(name, "behemoth_off")) 305 DDr_CheatTable[15].message_off = strdup(value); 306 else if (!stricmp(name, "elderrune_on")) 307 DDr_CheatTable[16].message_on = strdup(value); 308 else if (!stricmp(name, "elderrune_off")) 309 DDr_CheatTable[16].message_off = strdup(value); 310 else if (!stricmp(name, "moonshadow_on")) 311 DDr_CheatTable[17].message_on = strdup(value); 312 else if (!stricmp(name, "moonshadow_off")) 313 DDr_CheatTable[17].message_off = strdup(value); 314 else if (!stricmp(name, "munitionfrenzy_on")) 315 DDr_CheatTable[18].message_on = strdup(value); 316 else if (!stricmp(name, "fistsoflegend_on")) 317 DDr_CheatTable[19].message_on = strdup(value); 318 else if (!stricmp(name, "fistsoflegend_off")) 319 DDr_CheatTable[19].message_off = strdup(value); 320 else if (!stricmp(name, "killmequick_on")) 321 DDr_CheatTable[20].message_on = strdup(value); 322 else if (!stricmp(name, "killmequick_off")) 323 DDr_CheatTable[20].message_off = strdup(value); 324 else if (!stricmp(name, "carousel_on")) 325 DDr_CheatTable[21].message_on = strdup(value); 326 else if (!stricmp(name, "carousel_off")) 327 DDr_CheatTable[21].message_off = strdup(value); 253 328 else 254 329 DDrStartupMessage("unrecognised language item \"%s\"", name); … … 313 388 } 314 389 390 // Hacked windowed mode (for when daodangl isn't working properly) 391 if (patch_windowhack) 392 DDrWindowHack_Install(); 393 315 394 init_daodan_gl(); 316 395 -
Daodan/src/Daodan_Cheater.h
r339 r349 10 10 } oniCheatCode; 11 11 12 //enum { cheat_bigbadboss = 0x16, cheat_bulletproof, cheat_kangaroo, cheat_marypoppins, cheat_devmodex }; 13 14 #define cheat_devmodex (0x16) 15 12 16 extern oniCheatCode DDr_CheatTable[]; 13 17 -
Daodan/src/inifile_reader.c
r346 r349 6 6 7 7 #include "inifile.h" 8 8 /* 9 char* inifile_cleanstr(char* str) 10 { 11 while (isspace(*str)) 12 str++; 13 14 int i; 15 for (i = 0; str[i]; i ++) 16 { 17 if 18 } 19 20 return str; 21 } 22 */ 9 23 bool inifile_read(char* filename, inifile_callback callback) 10 24 { … … 43 57 if (inisection[0]) 44 58 free(inisection); 45 inisection = strdup(readptr + 1); 59 inisection = strdup(readptr + 1); // Skip the first [ 46 60 newsection = true; 47 61 } … … 57 71 readptr[i - 1] = '\0'; // Remove the trailing newline. 58 72 59 if (equals) // If there's no equals, crash with error.73 if (equals) 60 74 { 61 75 readptr[equals] = '\0'; … … 64 78 newsection = false; 65 79 } 66 else 80 else // If there's no equals, crash with error. 67 81 { 68 82 success = false;
Note:
See TracChangeset
for help on using the changeset viewer.