Index: Daodan/src/BFW_Motoko_Draw.h
===================================================================
--- Daodan/src/BFW_Motoko_Draw.h	(revision 688)
+++ Daodan/src/BFW_Motoko_Draw.h	(revision 689)
@@ -7,8 +7,8 @@
 typedef struct
 {
-	short Width;
-	short Height;
-	short Depth;
-	short __unused;
+	unsigned short Width;
+	unsigned short Height;
+	unsigned short Depth;
+	unsigned short __unused;
 } M3tDisplayMode;
 
Index: Daodan/src/Daodan.c
===================================================================
--- Daodan/src/Daodan.c	(revision 688)
+++ Daodan/src/Daodan.c	(revision 689)
@@ -67,25 +67,25 @@
 	if (patch_fonttexturecache)
 	{
-		DDrPatch_Byte(OniExe + 0x00020ea7, 0x20);
-		DDrPatch_Byte(OniExe + 0x00020f4a, 0x40);
+		DDrPatch_Byte((char*)(OniExe + 0x00020ea7), 0x20);
+		DDrPatch_Byte((char*)(OniExe + 0x00020f4a), 0x40);
 	}
 	
 	// Now supports textures up to 512x512
 	if (patch_largetextures)
-		DDrPatch_Byte  (OniExe + 0x00005251, 0x10);
+		DDrPatch_Byte  ((char*)(OniExe + 0x00005251), 0x10);
 	
 	// Non-"_Final" levels are now valid
 	if (patch_levelplugins)
-		DDrPatch_Byte  (OniExe + 0x000206a8, 0x01);
+		DDrPatch_Byte  ((char*)(OniExe + 0x000206a8), 0x01);
 	
 	// Pathfinding grid cache size x8
 	if (patch_pathfinding)
 	{
-		const char pathfinding[2] = {0x90 , 0xE9 };
-		DDrPatch_Byte  (OniExe + 0x0010b03b, 0x20);
-		DDrPatch_Byte  (OniExe + 0x0010b04c, 0x20);
+		const unsigned char pathfinding[2] = {0x90 , 0xE9 };
+		DDrPatch_Byte  ((char*)(OniExe + 0x0010b03b), 0x20);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0010b04c), 0x20);
 
 		//other stuff
-		DDrPatch_Const(0x440789, pathfinding);
+		DDrPatch_Const((char*)(OniExe + 0x00040789), pathfinding);
 	}
 	
@@ -93,23 +93,23 @@
 	if (patch_projaware)
 	{
-		DDrPatch_Byte  (OniExe + 0x0009c07c, 0x6c);
-		DDrPatch_Byte  (OniExe + 0x0009c080, 0x70);
-		DDrPatch_Byte  (OniExe + 0x0009c084, 0x74);
-		DDrPatch_Byte  (OniExe + 0x0009c110, 0x6c);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0009c07c), 0x6c);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0009c080), 0x70);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0009c084), 0x74);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0009c110), 0x6c);
 	}
 	
 	// Forced DirectInput (for Windows NT)
 	if (patch_directinput)
-		DDrPatch_Byte  (OniExe + 0x00002e6d, 0xeb);
+		DDrPatch_Byte((char*)(OniExe + 0x00002e6d), 0xeb);
 
 	if (patch_wpfadetime)
 	{
 		// Makes wp_fadetime actually have a function
-		const char fadetime_patch[] = { 0x66, 0x8B, 0x1D, 0xC4, 0x7D, 0x62, 0x00, 0x66, 0x89, 0x5E, 0x46, 0x5B, 0x5E, 0x83, 0xC4, 0x14, 0xC3 };
-		DDrPatch_Const (OniExe + 0x0011a889, fadetime_patch);
-		DDrPatch_Byte  (OniExe + 0x0011a560, 0x31);
+		const unsigned char fadetime_patch[] = { 0x66, 0x8B, 0x1D, 0xC4, 0x7D, 0x62, 0x00, 0x66, 0x89, 0x5E, 0x46, 0x5B, 0x5E, 0x83, 0xC4, 0x14, 0xC3 };
+		DDrPatch_Const ((char*)(OniExe + 0x0011a889), fadetime_patch);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0011a560), 0x31);
 		
 		// Sets the fadetime to 4800 by default
-		DDrPatch_Int16 ((OniExe + 0x0011ab0e), 0x12c0);
+		DDrPatch_Int16 ((short*)(OniExe + 0x0011ab0e), 0x12c0);
 	}
 	
@@ -124,6 +124,6 @@
 	if (patch_kickguns)
 	{
-		const char kickgun_patch[] = { 0x00, 0x05, 0x00, 0x00, 0x00, 0xC7, 0x05, 0x1C, 0xC9, 0x5E, 0x00, 0x70, 0xB8, 0x43, 0x00, 0xC7, 0x05, 0x20, 0xC9, 0x5E, 0x00, 0x20, 0xBE, 0x43 };
-		DDrPatch_Const (OniExe + 0x000dc420, kickgun_patch);
+		const unsigned char kickgun_patch[] = { 0x00, 0x05, 0x00, 0x00, 0x00, 0xC7, 0x05, 0x1C, 0xC9, 0x5E, 0x00, 0x70, 0xB8, 0x43, 0x00, 0xC7, 0x05, 0x20, 0xC9, 0x5E, 0x00, 0x20, 0xBE, 0x43 };
+		DDrPatch_Const ((char*)(OniExe + 0x000dc420), kickgun_patch);
 	}
 	
@@ -131,12 +131,12 @@
 	if (patch_cooldowntimer)
 	{
-		const char cooldown_patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
-		DDrPatch_Const (OniExe + 0x0011a825, cooldown_patch);
+		const unsigned char cooldown_patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
+		DDrPatch_Const ((char*)(OniExe + 0x0011a825), cooldown_patch);
 	}
 	
 	if (patch_throwtest)
 	{
-		const char throwtest_patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
-		DDrPatch_Const(OniExe + 0x000dc190, throwtest_patch);
+		const unsigned char throwtest_patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
+		DDrPatch_Const((char*)(OniExe + 0x000dc190), throwtest_patch);
 	}
 	
@@ -144,31 +144,31 @@
 	if (patch_alttab)
 	{
-		DDrPatch_Byte  ((void*)UUrPlatform_Initialize, 0xC3);
-		DDrPatch_Byte  ((void*)UUrPlatform_Terminate, 0xC3);
+		DDrPatch_Byte  ((char*)UUrPlatform_Initialize, 0xC3);
+		DDrPatch_Byte  ((char*)UUrPlatform_Terminate, 0xC3);
 	}
 	
 	// Unlocks particle action disabling/enabling bits for all events. (Will be controlled by a command line switch when I figure out how to do that without Win32 hacks.)
 	if (patch_particledisablebit)
-		DDrPatch_Int16 (OniExe + 0x001b184, 0x9090);
+		DDrPatch_Int16 ((short*)(OniExe + 0x001b184), 0x9090);
 	
 	// Multi-byte patch (multiple language support)
 	if (!patch_multibyte)
 	{
-		DDrPatch_Byte  (OniExe + 0x0002d8f8, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002d9ad, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002dbe2, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002dec3, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e2ab, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e2c4, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e379, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e48c, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e4d0, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e4f4, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e646, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e695, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e944, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e95d, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e98e, 0xeb);
-		DDrPatch_Byte  (OniExe + 0x0002e9dc, 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002d8f8), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002d9ad), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002dbe2), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002dec3), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e2ab), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e2c4), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e379), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e48c), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e4d0), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e4f4), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e646), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e695), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e944), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e95d), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e98e), 0xeb);
+		DDrPatch_Byte  ((char*)(OniExe + 0x0002e9dc), 0xeb);
 	}
 	
@@ -176,6 +176,6 @@
 	if (patch_cheattable)
 	{
-		DDrPatch_Int32 (0x004f616b, (int)&DDr_CheatTable[0].name);
-		DDrPatch_Int32 (OniExe + 0x000f617a, (int)&DDr_CheatTable[0].message_on);
+		DDrPatch_Int32 ((int*)(OniExe + 0x000f616b), (int)&DDr_CheatTable[0].name);
+		DDrPatch_Int32 ((int*)(OniExe + 0x000f617a), (int)&DDr_CheatTable[0].message_on);
 	}
 	
@@ -183,6 +183,6 @@
 	if (patch_argb8888)
 	{
-		DDrPatch_Byte  (OniExe + 0x00135af0, 0x07);
-		DDrPatch_Byte  (OniExe + 0x00135af4, 0x0B);
+		DDrPatch_Byte  ((char*)(OniExe + 0x00135af0), 0x07);
+		DDrPatch_Byte  ((char*)(OniExe + 0x00135af4), 0x0B);
 	}
 
@@ -192,27 +192,27 @@
 		//Makes it always say "Recieved weapon_name."
 		//Needs check for loc_4DFC66
-		//DDrPatch_NOOP( OniExe + 0x000E4DF8,2);
+		//DDrPatch_NOOP((char*)(OniExe + 0x000E4DF8),2);
 
 		//Adds Weapon name and ammo meter to pickup autoprompt
-		DDrPatch_NOOP( OniExe + 0x000FAC73, 9);
-		DDrPatch_NOOP( OniExe + 0x000FAC80, 5);
-		DDrPatch_MakeCall( OniExe + 0xFAC85, DDrWeapon2Message);
+		DDrPatch_NOOP((char*)(OniExe + 0x000FAC73), 9);
+		DDrPatch_NOOP((char*)(OniExe + 0x000FAC80), 5);
+		DDrPatch_MakeCall((void*)(OniExe + 0xFAC85), (void*)DDrWeapon2Message);
 		
 		//Moves location of colors
-		//DDrPatch_Int32( 0x0042E3D5, (int)&DDrDSayColors );
-		//DDrPatch_Int32( 0x0042E3DA, (int)&DDrDSayColors );
+		//DDrPatch_Int32((int*)(OniExe + 0x0002E3D5), (int)&DDrDSayColors );
+		//DDrPatch_Int32((int*)(OniExe + 0x0002E3DA), (int)&DDrDSayColors );
 	}
 	
 	// Disable loading the vtuneapi.dll
 	//if (patch_killvtune)
-		//DDrPatch_Byte  (OniExe + 0x00026340, 0xC3);
+		//DDrPatch_Byte  ((char*)(OniExe + 0x00026340), 0xC3);
 	
 	// Disable Oni's internal CLrGetCommandLine function (to eventually replace it with our own)
 	if (patch_getcmdline)
-		DDrPatch_NOOP  (OniExe + 0x000d3280, 51);
+		DDrPatch_NOOP  ((char*)(OniExe + 0x000d3280), 51);
 	
 	// Disable Oni's command line parser so it doesn't interfere with ours
 	if (patch_disablecmdline)
-		DDrPatch_Int32 (OniExe + 0x000d3570, 0xc3c03366);
+		DDrPatch_Int32 ((int*)(OniExe + 0x000d3570), 0xc3c03366);
 	
 	if (patch_bsl)
@@ -223,5 +223,5 @@
 		Character * Chr = 0;
 		int NoPath = (int)&(Chr[0].RegenHax) & 0x000000FF;
-		const char regen_patch[] =
+		const unsigned char regen_patch[] =
 		{0x90, 0x90, 0x90, 0x90, 0x90,				// mov    al, _WPgRegenerationCheat	-> NOOP
 		0x90, 0x90,									// test   al, al					-> NOOP
@@ -232,5 +232,5 @@
 		0x74, 0x21									// jnz 0x21 -> jz 0x21
 		};	
-		DDrPatch_Const(0x0051BB64, regen_patch);
+		DDrPatch_Const((char*)(OniExe + 0x0011BB64), regen_patch);
 	}
 	
@@ -252,34 +252,34 @@
 	{
 		//Set distance above head to 4.0
-		DDrPatch_Int32(0x0048C998, 0x005296C8);
+		DDrPatch_Int32((int*)(OniExe + 0x0008C998), 0x005296C8);
 		//texture height
-		DDrPatch_Byte( 0x0048C9DF, 0x3F );
+		DDrPatch_Byte((char*)(OniExe + 0x0008C9DF), 0x3F );
 		//texture	width
-		DDrPatch_NOOP( (char*)0x0048C9CA, 6 );
+		DDrPatch_NOOP((char*)(OniExe + 0x0008C9CA), 6 );
 		//Set the text color to whatever we like ;)
-		DDrPatch_NOOP( 0x0048C898, 6 );
-		DDrPatch_Byte( 0x0048C898, 0x8B );
-		DDrPatch_Byte( 0x0048C899, 0xCE );
-//FLATLINE?		DDrPatch_MakeCall( 0x0048C8A3, FLrHook_DebugNameShadeHack);
+		DDrPatch_NOOP((char*)(OniExe + 0x0008C898), 6 );
+		DDrPatch_Byte((char*)(OniExe + 0x0008C898), 0x8B );
+		DDrPatch_Byte((char*)(OniExe + 0x0008C899), 0xCE );
+//FLATLINE?		DDrPatch_MakeCall((void*)(OniExe + 0x0008C8A3), FLrHook_DebugNameShadeHack);
 		
 		//Make the background black for additive blending
-//FLATLINE?		DDrPatch_MakeCall( 0x0048C802, FLrHook_DebugNameTextureInit );
+//FLATLINE?		DDrPatch_MakeCall((void*)(OniExe + 0x0008C802), FLrHook_DebugNameTextureInit );
 	}
 
 	if(1)
 	{
-		//DDrPatch_NOOP( 0x004E1957, 6 );
-		//DDrPatch_MakeCall( 0x004E17F6, FLrHook_Lasers );
+		//DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 );
+		//DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers );
 	}
 
 	//Flatline related stuff
-//	DDrPatch_MakeCall(0x004FBCEA, DDrText_Hook);
-	
-//FLATLINE?	DDrPatch_Int32(	0x004B24D2, FLrSpawnHack);
-
-//FLATLINE?	DDrPatch_NOOP(0x004C26CB, 6);
-
-//FLATLINE?	DDrPatch_MakeCall( 0x004C26CB, FLrHook_DoorOpen); 
-//FLATLINE?	DDrPatch_MakeCall( 0x004EE3CF, FLrHook_ConsoleActivate);
+//	DDrPatch_MakeCall((void*)(OniExe + 0x000FBCEA), DDrText_Hook);
+	
+//FLATLINE?	DDrPatch_Int32((int*)(OniExe + 0x000B24D2), FLrSpawnHack);
+
+//FLATLINE?	DDrPatch_NOOP((char*)(OniExe + 0x000C26CB), 6);
+
+//FLATLINE?	DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen); 
+//FLATLINE?	DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate);
 	return true;
 }
@@ -402,17 +402,17 @@
 			{
 				char* str = _strdup(value);
-				DDrPatch_Int32(OniExe + 0x000fd730, (int)str);
-				DDrPatch_Int32(OniExe + 0x000fd738, (int)str);
+				DDrPatch_Int32((int*)(OniExe + 0x000fd730), (int)str);
+				DDrPatch_Int32((int*)(OniExe + 0x000fd738), (int)str);
 			}
 			else if (!_stricmp(name, "syndicatewarehouse"))
 			{
 				char* str = _strdup(value);
-				DDrPatch_Int32(OniExe + 0x000fd71a, (int)str);
-				DDrPatch_Int32(OniExe + 0x0010ef75, (int)str);
+				DDrPatch_Int32((int*)(OniExe + 0x000fd71a), (int)str);
+				DDrPatch_Int32((int*)(OniExe + 0x0010ef75), (int)str);
 			}
 			else if (!_stricmp(name, "damn"))
-				DDrPatch__strdup(OniExe + 0x0010fb6e, value);
+				DDrPatch__strdup((int*)(OniExe + 0x0010fb6e), value);
 			else if (!_stricmp(name, "blam"))
-				DDrPatch__strdup(OniExe + 0x0010fb73, value);
+				DDrPatch__strdup((int*)(OniExe + 0x0010fb73), value);
 			else if (!_stricmp(name, "shapeshifter_on"))
 				DDr_CheatTable[0].message_on = _strdup(value);
@@ -557,12 +557,12 @@
 	FILE* UUgError_WarningFile = *_UUgError_WarningFile;
 
-	if (filename && message && (strlen(filename)+strlen(message))<420) {
+	if (filename && message && (strlen((const char*)filename)+strlen((const char*)message))<420) {
 		sprintf(
 			v6,
 			"Error %x reported from File: %s, Line: %d (message follows) \r\n%s",
 			errornum,
-			filename,
+			(const char*)filename,
 			linenumber,
-			message);
+			(const char*)message);
 
 		if ( UUgError_WarningFile 
@@ -630,32 +630,32 @@
 	// Safe startup message printer
 	if (patch_safeprintf)
-		DDrPatch_MakeJump(UUrStartupMessage, DDrStartupMessage);
+		DDrPatch_MakeJump((void*)UUrStartupMessage, (void*)DDrStartupMessage);
 	
 	// Daodan device mode enumeration function
 	if (patch_daodandisplayenum)
-		DDrPatch_MakeJump(gl_enumerate_valid_display_modes, daodan_enumerate_valid_display_modes);
+		DDrPatch_MakeJump((void*)gl_enumerate_valid_display_modes, (void*)daodan_enumerate_valid_display_modes);
 	
 	// Performance patch
 	if (patch_usegettickcount)
 	{
-		DDrPatch_MakeJump(UUrMachineTime_High, DDrMachineTime_High);
-		DDrPatch_MakeJump(UUrMachineTime_High_Frequency, DDrMachineTime_High_Frequency);
-		DDrPatch_MakeJump(UUrMachineTime_Sixtieths, DDrMachineTime_Sixtieths);
+		DDrPatch_MakeJump((void*)UUrMachineTime_High, (void*)DDrMachineTime_High);
+		DDrPatch_MakeJump((void*)UUrMachineTime_High_Frequency, (void*)DDrMachineTime_High_Frequency);
+		DDrPatch_MakeJump((void*)UUrMachineTime_Sixtieths, (void*)DDrMachineTime_Sixtieths);
 	}
 
 	// Cheats always enabled
 	if (patch_cheatsenabled)
-		DDrPatch_MakeJump(ONrPersist_GetWonGame, DDrPersist_GetWonGame);
+		DDrPatch_MakeJump((void*)ONrPersist_GetWonGame, (void*)DDrPersist_GetWonGame);
 
 	// Windowed mode
 	if (patch_usedaodangl)
 	{
-	DDrPatch_NOOP((char*)0x004032B7, 6);
-	DDrPatch_MakeCall((char*)0x004032B7, LIiP_SetCursorPosHook);
-	
-	DDrPatch_NOOP((char*)0x00403349, 6);
-	DDrPatch_MakeCall((char*)0x00403349, LIiP_SetCursorPosHook);
-		DDrPatch_MakeJump(ONrPlatform_Initialize, DDrPlatform_Initialize);
-		DDrPatch_MakeJump(gl_platform_initialize, daodangl_platform_initialize);
+		DDrPatch_NOOP((char*)(OniExe + 0x000032B7), 6);
+		DDrPatch_MakeCall((void*)(OniExe + 0x000032B7), (void*)LIiP_SetCursorPosHook);
+	
+		DDrPatch_NOOP((char*)(OniExe + 0x00003349), 6);
+		DDrPatch_MakeCall((void*)(OniExe + 0x00003349), (void*)LIiP_SetCursorPosHook);
+		DDrPatch_MakeJump((void*)ONrPlatform_Initialize, (void*)DDrPlatform_Initialize);
+		DDrPatch_MakeJump((void*)gl_platform_initialize, (void*)daodangl_platform_initialize);
 	}
 	// Hacked windowed mode (for when daodangl isn't working properly)
@@ -664,5 +664,5 @@
 	
 	if (patch_daodaninit)
-		DDrPatch_MakeCall(OniExe + 0x000d345a, DDrGame_Init);
+		DDrPatch_MakeCall((void*)(OniExe + 0x000d345a), (void*)DDrGame_Init);
 	
 	// Patches for existing BSL functions
@@ -672,14 +672,14 @@
 	if (patch_cheater)
 	{
-		DDrPatch_MakeCall(OniExe + 0x000f618f, DDrCheater);
-		DDrPatch_Int16(OniExe + 0x000deb45, 0x5590);
+		DDrPatch_MakeCall((void*)(OniExe + 0x000f618f), (void*)DDrCheater);
+		DDrPatch_Int16((short*)(OniExe + 0x000deb45), 0x5590);
 #if 1
-		DDrPatch_MakeCall(OniExe + 0x000deb47, FallingFrames);
+		DDrPatch_MakeCall((void*)(OniExe + 0x000deb47), (void*)FallingFrames);
 #endif
-		DDrPatch_MakeJump(OniExe + 0x0010f021, DDrCheater_LevelLoad);
-	}
-
-	//DDrPatch_MakeJump(0x004378c0, DDrException);
-	DDrPatch_MakeJump(0x004245A0, DDrPrintWarning);
+		DDrPatch_MakeJump((void*)(OniExe + 0x0010f021), (void*)DDrCheater_LevelLoad);
+	}
+
+	//DDrPatch_MakeJump((void*)(OniExe + 0x000378c0, (void*)DDrException);
+	DDrPatch_MakeJump((void*)(OniExe + 0x000245A0), (void*)DDrPrintWarning);
 	//init_daodan_gl();
 	
@@ -718,5 +718,5 @@
 			
 			if (*(uint32_t*)(OniExe + 0x0011acd0) == 0x09d36852)
-				DDrPatch_MakeCall(OniExe + 0x0010fb49, DDrMain);
+				DDrPatch_MakeCall((void*)(OniExe + 0x0010fb49), (void*)DDrMain);
 			else
 				ExitProcess(0);
Index: Daodan/src/Daodan_BSL.c
===================================================================
--- Daodan/src/Daodan_BSL.c	(revision 688)
+++ Daodan/src/Daodan_BSL.c	(revision 689)
@@ -367,5 +367,5 @@
 		return 0;
 	}
-	name = &ONgGameState->CharacterStorage[index].Name;
+	name = (char*)(&ONgGameState->CharacterStorage[index].Name);
 	if (numargs == 2) {
 		strncpy(name, (char*)args[1].val.value_str32, 31);
@@ -620,5 +620,5 @@
 	char output[1024];
 	char buffer[1024];
-	int i;
+	unsigned int i;
 	char* placeinoutput = output;
 	char* placeininput = args[0].val.value_str32;
@@ -884,7 +884,7 @@
 	if(!TSrTest){
 		TMrInstance_GetDataPtr( 'TSFF', "Tahoma", &TSFFTahoma);
-	returnval = TSrContext_New( TSFFTahoma, 7, 1, 1,  0, &TSrTest);
-	}
-	DDrPatch_MakeCall(0x004FBCEA, DDrText_Hook);
+		returnval = TSrContext_New( TSFFTahoma, 7, 1, 1,  0, &TSrTest);
+	}
+	DDrPatch_MakeCall((void*)0x004FBCEA, (void*)DDrText_Hook);
 	
 	*dontuse2 = 1;
@@ -932,4 +932,4 @@
 void SLrDaodan_Patch()
 {
-	DDrPatch_Int32(OniExe + 0x000f3755, (int)cinematic_start_patch);
-}
+	DDrPatch_Int32((int*)(OniExe + 0x000f3755), (int)cinematic_start_patch);
+}
Index: Daodan/src/Daodan_Cheater.c
===================================================================
--- Daodan/src/Daodan_Cheater.c	(revision 688)
+++ Daodan/src/Daodan_Cheater.c	(revision 689)
@@ -15,5 +15,5 @@
 };
 static union MSVC_EVIL_FLOAT_HACK INFINITY_HACK = {{0x00, 0x00, 0x80, 0x7F}};
-#define INFINITY (INFINITY_HACK.Value)
+#define DD_INFINITY (INFINITY_HACK.Value)
 
 oniCheatCode DDr_CheatTable[] = {
@@ -50,5 +50,5 @@
 	{ "testcheat",        "Testing...",                      "",                           cheat_testcheat        },
 	{ "tellmetheversion", "Daodan v."DAODAN_VERSION_STRING"",                    "",                           cheat_tellmetheversion },
-	{0}
+	{0, 0, 0, 0}
 };
 
@@ -150,10 +150,10 @@
 				return 0;
 			}
-			else if (player->ONCC->JetpackTimer == 0xFFFF)
+			else if ((unsigned short)player->ONCC->JetpackTimer == 0xFFFF)
 			{
 				player->ONCC->JumpAcceleration = kangaroo_jp;
 				player->ONCC->JetpackTimer  = kangaroo_h;
-				player->ONCC->MaxFallingHeightWithoutDamage = INFINITY;
-				player->ONCC->MaxFallingHeightWithDamage  = INFINITY;
+				player->ONCC->MaxFallingHeightWithoutDamage = DD_INFINITY;
+				player->ONCC->MaxFallingHeightWithDamage  = DD_INFINITY;
 				return 1;
 			}
@@ -166,6 +166,6 @@
 				player->ONCC->JumpAcceleration = kangaroo_jp;
 				player->ONCC->JetpackTimer = kangaroo_h;
-				player->ONCC->MaxFallingHeightWithoutDamage  = INFINITY;
-				player->ONCC->MaxFallingHeightWithDamage  = INFINITY;
+				player->ONCC->MaxFallingHeightWithoutDamage  = DD_INFINITY;
+				player->ONCC->MaxFallingHeightWithDamage  = DD_INFINITY;
 				return 1;
 			}
@@ -177,5 +177,5 @@
 			{
 				inc_fallingframes = true;
-				if (player->ONCC->JetpackTimer == 0xFFFF)
+				if ((unsigned short)player->ONCC->JetpackTimer == 0xFFFF)
 				{
 					player->ONCC->JumpAcceleration = cheat_oldjet_accel;
Index: Daodan/src/Daodan_Console.c
===================================================================
--- Daodan/src/Daodan_Console.c	(revision 688)
+++ Daodan/src/Daodan_Console.c	(revision 689)
@@ -49,5 +49,5 @@
 	{'e', 0, 0xFF505050},	//darkgrey
 	{'f', 0, 0xFFAAAAAA},	//grey
-	{0}							//POWER RANGERS GO!
+	{0, 0, 0}							//POWER RANGERS GO!
 };
 
Index: Daodan/src/Daodan_Patch.c
===================================================================
--- Daodan/src/Daodan_Patch.c	(revision 688)
+++ Daodan/src/Daodan_Patch.c	(revision 689)
@@ -10,5 +10,5 @@
 	if (VirtualProtect(from, 5, PAGE_EXECUTE_READWRITE, &oldp))
 	{
-		*((char*)from) = 0xe9; // jmp rel32
+		*((unsigned char*)from) = 0xe9; // jmp rel32
 		from = (char*)from + 1;
 		*(int*)from = (unsigned int)to - (unsigned int)from - 4;
@@ -26,5 +26,5 @@
 	if (VirtualProtect(from, 5, PAGE_EXECUTE_READWRITE, &oldp))
 	{
-		*((char*)from) = 0xe8; // call rel32
+		*((unsigned char*)from) = 0xe8; // call rel32
 		from = (char*)from + 1;
 		*(int*)from = (unsigned int)to - (unsigned int)from - 4;
@@ -36,5 +36,5 @@
 }
 
-bool DDrPatch_String(char* dest, const char* string, int length)
+bool DDrPatch_String(char* dest, const unsigned char* string, int length)
 {
 	DWORD oldp;
@@ -50,5 +50,5 @@
 }
 
-bool DDrPatch_Byte(char* dest, char value)
+bool DDrPatch_Byte(char* dest, unsigned char value)
 {
 	DWORD oldp;
@@ -64,5 +64,5 @@
 }
 
-bool DDrPatch_Int32(int* dest, int value)
+bool DDrPatch_Int32(int* dest, unsigned int value)
 {
 	DWORD oldp;
@@ -78,5 +78,5 @@
 }
 
-bool DDrPatch_Int16(short* dest, short value)
+bool DDrPatch_Int16(short* dest, unsigned short value)
 {
 	DWORD oldp;
Index: Daodan/src/Daodan_Patch.h
===================================================================
--- Daodan/src/Daodan_Patch.h	(revision 688)
+++ Daodan/src/Daodan_Patch.h	(revision 689)
@@ -11,8 +11,8 @@
 bool DDrPatch_MakeJump(void* from, void* to);
 bool DDrPatch_MakeCall(void* from, void* to);
-bool DDrPatch_String(char* dest, const char* string, int length);
-bool DDrPatch_Byte(char* dest, char value);
-bool DDrPatch_Int32(int* dest, int value);
-bool DDrPatch_Int16(short* dest, short value);
+bool DDrPatch_String(char* dest, const unsigned char* string, int length);
+bool DDrPatch_Byte(char* dest, unsigned char value);
+bool DDrPatch_Int32(int* dest, unsigned int value);
+bool DDrPatch_Int16(short* dest, unsigned short value);
 bool DDrPatch__strdup(int* dest, const char* value);
 bool DDrPatch_NOOP(char* dest, unsigned int length);
Index: Daodan/src/Daodan_WindowHack.c
===================================================================
--- Daodan/src/Daodan_WindowHack.c	(revision 688)
+++ Daodan/src/Daodan_WindowHack.c	(revision 689)
@@ -8,5 +8,5 @@
 #include "oni_gl.h"
 
-#define CS_DROPSHADOW 0x20000
+#define DD_CS_DROPSHADOW 0x20000
 
 volatile HWND onihwnd, boxhwnd = NULL;
@@ -65,5 +65,5 @@
 	
 	wc.cbSize = sizeof(WNDCLASSEX);
-	wc.style = (opt_border ? 0 : (opt_shadow ? CS_DROPSHADOW : 0));
+	wc.style = (opt_border ? 0 : (opt_shadow ? DD_CS_DROPSHADOW : 0));
 	wc.lpfnWndProc = DDrHack_WndProc;
 	wc.cbClsExtra = 0;
@@ -161,19 +161,19 @@
 {
 	DDrPatch_NOOP((char*)0x0050F764, 6);
-	DDrPatch_MakeCall((char*)0x0050F764, ONrPI_CreateWindowExHook);
+	DDrPatch_MakeCall((char*)0x0050F764, (void*)ONrPI_CreateWindowExHook);
 	
 	DDrPatch_NOOP((char*)0x00407E9F, 6);
-	DDrPatch_MakeCall((char*)0x00407E9F, glpi_SetWindowPosHook);
+	DDrPatch_MakeCall((char*)0x00407E9F, (void*)glpi_SetWindowPosHook);
 	
 	DDrPatch_NOOP((char*)0x004032CC, 6);
-	DDrPatch_MakeCall((char*)0x004032CC, LIiP_GetCursorPosHook);
+	DDrPatch_MakeCall((char*)0x004032CC, (void*)LIiP_GetCursorPosHook);
 	
 	DDrPatch_NOOP((char*)0x00402CC2, 6);
-	DDrPatch_MakeCall((char*)0x00402CC2, LIiP_GetCursorPosHook);
+	DDrPatch_MakeCall((char*)0x00402CC2, (void*)LIiP_GetCursorPosHook);
 	
 	DDrPatch_NOOP((char*)0x004032B7, 6);
-	DDrPatch_MakeCall((char*)0x004032B7, LIiP_SetCursorPosHook);
+	DDrPatch_MakeCall((char*)0x004032B7, (void*)LIiP_SetCursorPosHook);
 	
 	DDrPatch_NOOP((char*)0x00403349, 6);
-	DDrPatch_MakeCall((char*)0x00403349, LIiP_SetCursorPosHook);
+	DDrPatch_MakeCall((char*)0x00403349, (void*)LIiP_SetCursorPosHook);
 }
Index: Daodan/src/daodan_gl.c
===================================================================
--- Daodan/src/daodan_gl.c	(revision 688)
+++ Daodan/src/daodan_gl.c	(revision 689)
@@ -183,5 +183,5 @@
 		gl_eng->DisplayMode.Width = cur_devmode.dmPelsWidth;
 		gl_eng->DisplayMode.Height = cur_devmode.dmPelsHeight;
-		if (cur_devmode.dmBitsPerPel > depth)
+		if (cur_devmode.dmBitsPerPel > (unsigned short)depth)
 			gl_eng->DisplayMode.Depth = cur_devmode.dmBitsPerPel;
 	}
@@ -189,5 +189,5 @@
 	{
 		update_cdmode();
-		if (cur_devmode.dmBitsPerPel > depth)
+		if (cur_devmode.dmBitsPerPel > (unsigned short)depth)
 			gl_eng->DisplayMode.Depth = cur_devmode.dmBitsPerPel;
 	}
Index: Daodan/src/daodan_gl.h
===================================================================
--- Daodan/src/daodan_gl.h	(revision 688)
+++ Daodan/src/daodan_gl.h	(revision 689)
@@ -15,4 +15,3 @@
 void daodan_set_gamma(float gamma);
 int ONICALL daodangl_platform_initialize();
- daodan_init_msaa();
 #endif
