Index: Daodan/build.bat
===================================================================
--- Daodan/build.bat	(revision 348)
+++ Daodan/build.bat	(revision 349)
@@ -1,1 +1,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 -lgdi32
+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
Index: Daodan/src/Daodan.c
===================================================================
--- Daodan/src/Daodan.c	(revision 348)
+++ Daodan/src/Daodan.c	(revision 349)
@@ -8,4 +8,6 @@
 #include "Daodan_Persistence.h"
 
+#include "Daodan_WindowHack.h"
+
 #include "Oni.h"
 #include "Oni_Persistence.h"
@@ -23,6 +25,6 @@
 bool patch_fonttexturecache = true;
 bool patch_largetextures = true;
+bool patch_levelplugins = true;
 bool patch_pathfinding = true;
-bool patch_levelplugins = true;
 bool patch_projaware = true;
 bool patch_directinput = true;
@@ -41,4 +43,5 @@
 bool patch_cheatsenabled = true;
 bool patch_usedaodangl = false;
+bool patch_windowhack = true;
 
 bool DDrPatch_Init()
@@ -179,10 +182,10 @@
 			else if (!stricmp(name, "largetextures"))
 				patch_largetextures = !stricmp(value, "true");
+			else if (!stricmp(name, "levelplugins"))
+				patch_levelplugins = !stricmp(value, "true");
 			else if (!stricmp(name, "pathfinding"))
 				patch_pathfinding = !stricmp(value, "true");
 			else if (!stricmp(name, "projaware"))
 				patch_projaware = !stricmp(value, "true");
-			else if (!stricmp(name, "levelplugins"))
-				patch_levelplugins = !stricmp(value, "true");
 			else if (!stricmp(name, "directinput"))
 				patch_directinput = !stricmp(value, "true");
@@ -213,4 +216,6 @@
 			else if (!stricmp(name, "usedaodangl"))
 				patch_usedaodangl = !stricmp(value, "true");
+			else if (!stricmp(name, "windowhack"))
+				patch_windowhack = !stricmp(value, "true");
 			else
 				DDrStartupMessage("unrecognised patch \"%s\"", name);
@@ -250,5 +255,75 @@
 				DDr_CheatTable[3].message_off = strdup(value);
 			else if (!stricmp(name, "fatloot_on"))
-				DDr_CheatTable[4].message_off = strdup(value);
+				DDr_CheatTable[4].message_on = strdup(value);
+			else if (!stricmp(name, "glassworld_on"))
+				DDr_CheatTable[5].message_on = strdup(value);
+			else if (!stricmp(name, "glassworld_off"))
+				DDr_CheatTable[5].message_off = strdup(value);
+			else if (!stricmp(name, "winlevel_on"))
+				DDr_CheatTable[6].message_on = strdup(value);
+			else if (!stricmp(name, "loselevel_on"))
+				DDr_CheatTable[7].message_on = strdup(value);
+			else if (!stricmp(name, "bighead_on"))
+				DDr_CheatTable[8].message_on = strdup(value);
+			else if (!stricmp(name, "bighead_off"))
+				DDr_CheatTable[8].message_off = strdup(value);
+			else if (!stricmp(name, "minime_on"))
+				DDr_CheatTable[9].message_on = strdup(value);
+			else if (!stricmp(name, "minime_off"))
+				DDr_CheatTable[9].message_off = strdup(value);
+			else if (!stricmp(name, "superammo_on"))
+				DDr_CheatTable[10].message_on = strdup(value);
+			else if (!stricmp(name, "superammo_off"))
+				DDr_CheatTable[10].message_off = strdup(value);
+			else if (!stricmp(name, "devmode_on"))
+			{
+				char* str = strdup(value);
+				DDr_CheatTable[11].message_on = str;
+				DDr_CheatTable[cheat_devmodex].message_on = str;
+			}
+			else if (!stricmp(name, "devmode_off"))
+			{
+				char* str = strdup(value);
+				DDr_CheatTable[11].message_off = str;
+				DDr_CheatTable[cheat_devmodex].message_off = str;
+			}
+			else if (!stricmp(name, "reservoirdogs_on"))
+				DDr_CheatTable[12].message_on = strdup(value);
+			else if (!stricmp(name, "reservoirdogs_off"))
+				DDr_CheatTable[12].message_off = strdup(value);
+			else if (!stricmp(name, "roughjustice_on"))
+				DDr_CheatTable[13].message_on = strdup(value);
+			else if (!stricmp(name, "roughjustice_off"))
+				DDr_CheatTable[13].message_off = strdup(value);
+			else if (!stricmp(name, "chenille_on"))
+				DDr_CheatTable[14].message_on = strdup(value);
+			else if (!stricmp(name, "chenille_off"))
+				DDr_CheatTable[14].message_off = strdup(value);
+			else if (!stricmp(name, "behemoth_on"))
+				DDr_CheatTable[15].message_on = strdup(value);
+			else if (!stricmp(name, "behemoth_off"))
+				DDr_CheatTable[15].message_off = strdup(value);
+			else if (!stricmp(name, "elderrune_on"))
+				DDr_CheatTable[16].message_on = strdup(value);
+			else if (!stricmp(name, "elderrune_off"))
+				DDr_CheatTable[16].message_off = strdup(value);
+			else if (!stricmp(name, "moonshadow_on"))
+				DDr_CheatTable[17].message_on = strdup(value);
+			else if (!stricmp(name, "moonshadow_off"))
+				DDr_CheatTable[17].message_off = strdup(value);
+			else if (!stricmp(name, "munitionfrenzy_on"))
+				DDr_CheatTable[18].message_on = strdup(value);
+			else if (!stricmp(name, "fistsoflegend_on"))
+				DDr_CheatTable[19].message_on = strdup(value);
+			else if (!stricmp(name, "fistsoflegend_off"))
+				DDr_CheatTable[19].message_off = strdup(value);
+			else if (!stricmp(name, "killmequick_on"))
+				DDr_CheatTable[20].message_on = strdup(value);
+			else if (!stricmp(name, "killmequick_off"))
+				DDr_CheatTable[20].message_off = strdup(value);
+			else if (!stricmp(name, "carousel_on"))
+				DDr_CheatTable[21].message_on = strdup(value);
+			else if (!stricmp(name, "carousel_off"))
+				DDr_CheatTable[21].message_off = strdup(value);
 			else
 				DDrStartupMessage("unrecognised language item \"%s\"", name);
@@ -313,4 +388,8 @@
 	}
 	
+	// Hacked windowed mode (for when daodangl isn't working properly)
+	if (patch_windowhack)
+		DDrWindowHack_Install();
+	
 	init_daodan_gl();
 	
Index: Daodan/src/Daodan_Cheater.h
===================================================================
--- Daodan/src/Daodan_Cheater.h	(revision 348)
+++ Daodan/src/Daodan_Cheater.h	(revision 349)
@@ -10,4 +10,8 @@
 } oniCheatCode;
 
+//enum { cheat_bigbadboss = 0x16, cheat_bulletproof, cheat_kangaroo, cheat_marypoppins, cheat_devmodex };
+
+#define cheat_devmodex (0x16)
+
 extern oniCheatCode DDr_CheatTable[];
 
Index: Daodan/src/Daodan_WindowHack.c
===================================================================
--- Daodan/src/Daodan_WindowHack.c	(revision 349)
+++ Daodan/src/Daodan_WindowHack.c	(revision 349)
@@ -0,0 +1,6 @@
+#include "Daodan_WindowHack.h"
+
+void DDrWindowHack_Install()
+{
+	
+}
Index: Daodan/src/Daodan_WindowHack.h
===================================================================
--- Daodan/src/Daodan_WindowHack.h	(revision 349)
+++ Daodan/src/Daodan_WindowHack.h	(revision 349)
@@ -0,0 +1,7 @@
+#pragma once
+#ifndef DAODAN_WINDOWHACK_H
+#define DAODAN_WINDOWHACK_H
+
+void DDrWindowHack_Install();
+
+#endif
Index: Daodan/src/inifile_reader.c
===================================================================
--- Daodan/src/inifile_reader.c	(revision 348)
+++ Daodan/src/inifile_reader.c	(revision 349)
@@ -6,5 +6,19 @@
 
 #include "inifile.h"
-
+/*
+char* inifile_cleanstr(char* str)
+{
+	while (isspace(*str))
+		str++;
+	
+	int i;
+	for (i = 0; str[i]; i ++)
+	{
+		if 
+	}
+	
+	return str;
+}
+*/
 bool inifile_read(char* filename, inifile_callback callback)
 {
@@ -43,5 +57,5 @@
 			if (inisection[0])
 				free(inisection);
-			inisection = strdup(readptr + 1);
+			inisection = strdup(readptr + 1); // Skip the first [
 			newsection = true;
 		}
@@ -57,5 +71,5 @@
 				readptr[i - 1] = '\0'; // Remove the trailing newline.
 			
-			if (equals) // If there's no equals, crash with error.
+			if (equals)
 			{
 				readptr[equals] = '\0';
@@ -64,5 +78,5 @@
 				newsection = false;
 			}
-			else
+			else // If there's no equals, crash with error.
 			{
 				success = false;
