Index: Daodan/src/Daodan.c
===================================================================
--- Daodan/src/Daodan.c	(revision 472)
+++ Daodan/src/Daodan.c	(revision 473)
@@ -47,9 +47,11 @@
 bool patch_usegettickcount = true;
 bool patch_cheatsenabled = true;
-bool patch_usedaodangl = false;
-bool patch_windowhack = true;
+bool patch_usedaodangl = true;
+bool patch_windowhack = false;
 bool patch_daodaninit = true;
 bool patch_bsl = true;
 bool patch_cheater = true;
+
+bool patch_newweapon = true;
 
 bool opt_usedaodanbsl = true;
@@ -174,4 +176,9 @@
 		DDrPatch_Byte  (OniExe + 0x00135af4, 0x0B);
 	}
+
+	//Test newweap patch
+//	if (patch_newweapon) {
+//		DDrPatch_NOOP( OniExe + 0x000E4DF8, 2);
+//	}
 	
 	// Disable loading the vtuneapi.dll
Index: Daodan/src/Daodan_Cheater.c
===================================================================
--- Daodan/src/Daodan_Cheater.c	(revision 472)
+++ Daodan/src/Daodan_Cheater.c	(revision 473)
@@ -40,5 +40,5 @@
 	{ "x",              "Developer Access Enabled",        "Developer Access Disabled",  cheat_x              },
 	{ "testcheat",      "Testing...",                      "",                           cheat_testcheat      },
-	{ "tellmetheversion","Daodan Version ???",			   "",							 cheat_tellmetheversion},
+	{ "tellmetheversion","Daodan v.3.0",			   "",									cheat_tellmetheversion},
 	{0}
 };
@@ -218,4 +218,5 @@
 				player->MaxHealth = cheat_oldmaxhealth;
 				player->Flags = player->Flags & ~(chr_bossshield | chr_weaponimmune);
+				ai2_deaf = 0;
 				return 0;
 			}
@@ -227,4 +228,5 @@
 				player->MaxHealth = 1;
 				player->Flags = player->Flags | chr_bossshield | chr_weaponimmune;
+				ai2_deaf = 1;
 				return 1;
 			}
Index: Daodan/src/Oni.h
===================================================================
--- Daodan/src/Oni.h	(revision 472)
+++ Daodan/src/Oni.h	(revision 473)
@@ -7,4 +7,6 @@
 #include <stdint.h>
 #include <windows.h>
+
+typedef unsigned char onibool;
 
 typedef struct
@@ -24,4 +26,5 @@
 
 extern void* ONgGameState;
+extern onibool ai2_deaf;
 
 extern char M3gResolutionSwitch;
Index: Daodan/src/Oni_Character.h
===================================================================
--- Daodan/src/Oni_Character.h	(revision 472)
+++ Daodan/src/Oni_Character.h	(revision 473)
@@ -3,5 +3,5 @@
 #define ONI_CHARACTER_H
 
-#include "Daodan.h"
+#include "Oni.h"
 #include <stdint.h>
 #include <stdbool.h>
@@ -301,6 +301,6 @@
 	int32_t Executor_HasFacingOverride; //a bool...
 	float	Executor_AimingSpeed; 
-	bool	field_1AB8; //actually a bitset...
-	bool	Executor_HasMoveOverride;
+	onibool	field_1AB8; //actually a bitset...
+	onibool	Executor_HasMoveOverride;
 	int16_t	field_1ABA;
 	int32_t	field_1ABC;
@@ -363,6 +363,6 @@
 	AttachedParticle AnimationAttachedParticles[16];
 	int32_t TRAMParticles;
-	bool FixedParticlesAttached;
-	bool FixedParticlesStarted;
+	onibool FixedParticlesAttached;
+	onibool FixedParticlesStarted;
 	int16_t NumFixedParticles;
 	AttachedParticle FixedParticles[16];
@@ -400,20 +400,20 @@
 	int32_t field_21D0;
 	int32_t field_21D4;
-	bool field_21D8;
-	bool field_21D9;
-	bool field_21DA;
-	bool field_21DB;
-	bool field_21DC;
-	bool field_21DD;
-	bool field_21DE;
-	bool field_21DF;
-	bool field_21E0;
-	bool HasAlternateTrigger;
-	bool field_21E2;
-	bool ReleaseTrigger;
-	bool ReleaseAlternateTrigger;
-	bool TurningLeft;
-	bool TurningRight;
-	bool field_21E7;
+	onibool field_21D8;
+	onibool field_21D9;
+	onibool field_21DA;
+	onibool field_21DB;
+	onibool field_21DC;
+	onibool field_21DD;
+	onibool field_21DE;
+	onibool field_21DF;
+	onibool field_21E0;
+	onibool HasAlternateTrigger;
+	onibool field_21E2;
+	onibool ReleaseTrigger;
+	onibool ReleaseAlternateTrigger;
+	onibool TurningLeft;
+	onibool TurningRight;
+	onibool field_21E7;
 	int32_t field_21E8;
 	int32_t field_21EC;
@@ -427,8 +427,8 @@
 	int16_t field_27FE;
 	int16_t field_2780;
-	bool ShieldParts[19]; 
-	bool field_2815; //padding...
-	bool field_2816;
-	bool field_2817;
+	onibool ShieldParts[19]; 
+	onibool field_2815; //padding...
+	onibool field_2816;
+	onibool field_2817;
 	int32_t field_2818[8];
 } ActiveCharacter;
Index: Daodan/src/Oni_Symbols.S
===================================================================
--- Daodan/src/Oni_Symbols.S	(revision 472)
+++ Daodan/src/Oni_Symbols.S	(revision 473)
@@ -19,5 +19,5 @@
 symbol ( _ONgPlatformData                          , 0x0023100c )
 symbol ( _ONgGameState                             , 0x001ece7c )
-
+symbol ( _ai2_deaf								   , 0x001ec0c1 )
 symbol ( _AKgDebug_DebugMaps                       , 0x002b2204 )
 symbol ( _BFgDebugFileEnable                       , 0x0015c8d0 )
Index: Daodan/src/daodan_gl.c
===================================================================
--- Daodan/src/daodan_gl.c	(revision 472)
+++ Daodan/src/daodan_gl.c	(revision 473)
@@ -195,5 +195,5 @@
 void daodan_set_gamma(float gamma)
 {
-	WORD ramp[3 * 256];
+	WORD ramp[3][256];
 	int i;
 
@@ -203,5 +203,5 @@
 	gamma = (1.0f - gamma) * 1.2f + 0.4f;
 
-	for (i = 0; i < sizeof(ramp); i++) 
+	for (i = 0; i < 256; i++) 
 	{
 		int value = (int)(pow(gl_gamma_ramp[i] / 65535.0f, gamma) * 65535.0f);
@@ -212,5 +212,5 @@
 			value = 65535;
 
-		ramp[i] = value;
+		ramp[0][i] = ramp[1][i] = ramp[2][i] = value;
 	}
 	
@@ -242,5 +242,8 @@
 		Rect.right = Rect.left + gl->DisplayMode.Width;
 		Rect.bottom = Rect.top + gl->DisplayMode.Height;
-		AdjustWindowRect(&Rect, WS_OVERLAPPED | WS_MAXIMIZEBOX | WS_MINIMIZEBOX, FALSE);
+		//http://msdn.microsoft.com/en-us/library/ms632665(VS.85).aspx
+		//dwStyle
+		//[in] Specifies the window style of the window whose required size is to be calculated. Note that you cannot specify the WS_OVERLAPPED style.
+		AdjustWindowRect(&Rect, WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_CAPTION, TRUE);
 		
 		SetWindowPos(ONgPlatformData.Window, NULL, Rect.left, Rect.top, Rect.right - Rect.left, Rect.bottom - Rect.top, SWP_NOACTIVATE | SWP_NOZORDER);
@@ -266,7 +269,8 @@
 	}
 	
-//	if (gl_gamma_ramp_valid)
-//		daodan_set_gamma(ONrPersist_GetGamma());  Its not working :(
-//	else
+	if (gl_gamma_ramp_valid)
+		//Its working now
+		daodan_set_gamma(ONrPersist_GetGamma());  
+	else
 		DDrStartupMessage("gamma adjustment not supported");
 	
@@ -284,10 +288,9 @@
 	lastmode.Height = gl->DisplayMode.Height;
 	lastmode.Depth = gl->DisplayMode.Depth;
-	
-	return 0;
+	return 1;
 
 exit_err:
 	AUrMessageBox(1, "Failed to initialize OpenGL contexts; Oni will now exit.");
 	exit(0);
-	return 1;
-}
+	return 0;
+}
