Index: Daodan/src/BFW_Utility.h
===================================================================
--- Daodan/src/BFW_Utility.h	(revision 689)
+++ Daodan/src/BFW_Utility.h	(revision 690)
@@ -25,10 +25,3 @@
 //int __cdecl AUrMessageBox(int Buttons, char *Message, ...);
 
-extern uint32_t COgConsoleLines;
-extern uint32_t COgFadeTimeValue;
-extern uint32_t COgDefaultTextShade;
-extern uint32_t COgDefaultTextShadow;
-
-extern FILE* ONgFileStartup;
-
 #endif
Index: Daodan/src/Daodan.c
===================================================================
--- Daodan/src/Daodan.c	(revision 689)
+++ Daodan/src/Daodan.c	(revision 690)
@@ -55,5 +55,4 @@
 bool opt_usedaodanbsl = true;
 bool opt_border = true;
-bool opt_shadow = false;
 bool opt_topmost = false;
 
@@ -144,4 +143,5 @@
 	if (patch_alttab)
 	{
+		// 0xC3 = ret, so makes those functions just have a "ret" instruction at their start
 		DDrPatch_Byte  ((char*)UUrPlatform_Initialize, 0xC3);
 		DDrPatch_Byte  ((char*)UUrPlatform_Terminate, 0xC3);
@@ -313,6 +313,4 @@
 			else if (!_stricmp(name, "border"))
 				opt_border = !_stricmp(inifile_cleanstr(value), "true");
-			else if (!_stricmp(name, "shadow"))
-				opt_shadow = !_stricmp(inifile_cleanstr(value), "true");
 			else if (!_stricmp(name, "topmost"))
 				opt_topmost = !_stricmp(inifile_cleanstr(value), "true");
@@ -589,5 +587,8 @@
 	DDrStartupMessage("daodan attached!");
 	
+	// Tell Oni to not load non levelX_final-files by default:
 	opt_ignore_private_data = false;
+
+	// Enable sound by default:
 	opt_sound = true;
 	
Index: Daodan/src/Daodan.h
===================================================================
--- Daodan/src/Daodan.h	(revision 689)
+++ Daodan/src/Daodan.h	(revision 690)
@@ -12,5 +12,4 @@
 
 extern bool opt_border;
-extern bool opt_shadow;
 extern bool opt_topmost;
 
Index: Daodan/src/Daodan_Cheater.c
===================================================================
--- Daodan/src/Daodan_Cheater.c	(revision 689)
+++ Daodan/src/Daodan_Cheater.c	(revision 690)
@@ -104,6 +104,4 @@
 		case cheat_bigbadboss:
 		{
-			GameState* GameState = ONgGameState;
-
 			Character* player = ONgGameState->PlayerCharacter;
 			//char* player = *((char**)(ONgGameState + GSA_player));
Index: Daodan/src/Daodan_WindowHack.c
===================================================================
--- Daodan/src/Daodan_WindowHack.c	(revision 689)
+++ Daodan/src/Daodan_WindowHack.c	(revision 690)
@@ -7,6 +7,4 @@
 #include "BFW_Motoko_Draw.h"
 #include "oni_gl.h"
-
-#define DD_CS_DROPSHADOW 0x20000
 
 volatile HWND onihwnd, boxhwnd = NULL;
@@ -65,5 +63,5 @@
 	
 	wc.cbSize = sizeof(WNDCLASSEX);
-	wc.style = (opt_border ? 0 : (opt_shadow ? DD_CS_DROPSHADOW : 0));
+	wc.style = 0;
 	wc.lpfnWndProc = DDrHack_WndProc;
 	wc.cbClsExtra = 0;
Index: Daodan/src/Oni.h
===================================================================
--- Daodan/src/Oni.h	(revision 689)
+++ Daodan/src/Oni.h	(revision 690)
@@ -15,15 +15,6 @@
 	HWND Window;
 } ONtPlatformData;
-/*
-void __cdecl ONiMain(int ArgCount, char *ArgList[]);
-short ONICALL ONrPlatform_Initialize(ONtPlatformData *PlatformData);
-LRESULT CALLBACK ONrPlatform_WindowProc(HWND Window, UINT Message, WPARAM WParam, LPARAM LParam);
-*/
-//uint8_t ONICALL ONrCheater(uint32_t cheat);
 
-//char* ONICALL SSrMessage_Find(char* message_key); //Returns a prompt message from a message key
-//void ONICALL ONiGameState_FindAutoPromptMessage(char* Note, void* ptr);
 
-//
 void ONICALL TMrInstance_GetDataPtr_List( 
 	char Tag[4],		//as in 'ONWC'
Index: Daodan/src/Oni_Symbols.h
===================================================================
--- Daodan/src/Oni_Symbols.h	(revision 689)
+++ Daodan/src/Oni_Symbols.h	(revision 690)
@@ -8,79 +8,97 @@
 #include "BFW_ScriptLang.h"
 
-#define DefVar(type, name, address) static type* _##name = (type*)address
-DefVar( onibool,		ai2_deaf,				0x005ec0c1 );
 
-DefVar(	HINSTANCE,		g_Instance,				0x0061F9E4 );
+//Define variables of Oni: #define VARNAME (*((TYPE*)ADDRESS))
 
-DefVar( gl_api_t*,		gl_api,					0x00560604 );
-DefVar( gl_engine_t*,	gl_eng,					0x00560600 );
-DefVar( WORD*,			gl_gamma_ramp,			0x0055fdfc );
-DefVar( int,			gl_gamma_ramp_valid,	0x005603fc );
+// AIs are deaf (ger: "taub")
+#define ai2_deaf			(*((onibool*)0x005ec0c1))
 
-DefVar(	char,			opt_ignore_private_data,0x006370f0 );
-DefVar( char,			opt_sound,				0x006370fc ); 
+// Option "debug" ... but what does it do?
+#define AKgDebug_DebugMaps	(*((char*)0x002b2204))
 
-DefVar( char,			AKgDebug_DebugMaps,		0x002b2204 );
+// Option "debugfiles" ... but what does it do?
+#define BFgDebugFileEnable	(*((bool*)0x0055c8d0))
 
-DefVar( bool,			BFgDebugFileEnable,		0x0055c8d0 );
+// Parameter 1 to COrTextArea_Print. Context pointer?
+#define COgConsoleLines		(*((uint32_t*)0x005cb468))
 
-DefVar( uint32_t,		COgConsoleLines,		0x005cb468 );
-DefVar( uint32_t,		COgDefaultTextShade,	0x00533f70 );
-DefVar( uint32_t,		COgDefaultTextShadow,	0x00533f74 );
-DefVar( uint32_t,		COgFadeTimeValue,		0x00533f68 );
+// Default console text color
+#define COgDefaultTextShade	(*((uint32_t*)0x00533f70))
 
-DefVar( FILE*,			ONgFileStartup,			0x005711b8 );
-DefVar( GameState*,		ONgGameState,			0x005ece7c );
-DefVar( ONtPlatformData,ONgPlatformData,		0x0053100c );
+// Default console text shadow color
+#define COgDefaultTextShadow	(*((uint32_t*)0x00533f74))
 
-DefVar( char,			M3gResolutionSwitch,	0x00531634 );
+// Console text fade timeout
+#define COgFadeTimeValue	(*((uint32_t*)0x00533f68))
 
-DefVar( bool,			SSgSearchOnDisk,		0x005eb758 );
-#undef DefVar
-//Yes, I'm aware that there are a few ways this could go wrong
-//but in the interests of neatness and not having to go through and rename all the variables
-//and use annoying dereferencing, this will do.
+// Some kind of graphics context?
+#define g_Instance			(*((HINSTANCE*)0x0061F9E4))
 
-//...too bad there is no way to nest #defines...
-#define AKgDebug_DebugMaps (*_AKgDebug_DebugMaps)
-#define ai2_deaf (*_ai2_deaf)
-#define g_Instance (*_g_Instance)
-#define M3gResolutionSwitch (*_M3gResolutionSwitch)
-#define ONgGameState (*_ONgGameState)
-#define ONgPlatformData (*_ONgPlatformData)
-#define opt_ignore_private_data (*_opt_ignore_private_data)
-#define opt_sound (*_opt_sound)
-#define BFgDebugFileEnable (*_BFgDebugFileEnable)
-#define SSgSearchOnDisk (*_SSgSearchOnDisk)
-#define gl_gamma_ramp (*_gl_gamma_ramp)
-#define gl_gamma_ramp_valid (*_gl_gamma_ramp_valid)
-#define gl_api (*_gl_api)
-#define gl_eng (*_gl_eng)
-#define COgConsoleLines (*_COgConsoleLines)
-#define COgFadeTimeValue (*_COgFadeTimeValue)
-#define COgDefaultTextShade (*_COgDefaultTextShade)
-#define COgDefaultTextShadow (*_COgDefaultTextShadow)
-#define ONgFileStartup (*_ONgFileStartup)
+// OpenGL Gamma related
+#define gl_gamma_ramp		(*((WORD**)0x0055fdfc))
+
+// OpenGL Gamma related
+#define gl_gamma_ramp_valid	(*((int*)0x005603fc))
+
+// OpenGL whatev?
+#define gl_api				(*((gl_api_t**)0x00560604))
+
+// OpenGL whatev?
+#define gl_eng				(*((gl_engine_t**)0x00560600))
+
+// Value of -switch/-noswitch?
+#define M3gResolutionSwitch	(*((char*)0x00531634))
+
+// Startup.txt file handle
+#define ONgFileStartup		(*((FILE**)0x005711b8))
+
+// Current GameState
+#define ONgGameState		(*((GameState**)0x005ece7c))
+
+// Current ONtPlatformData
+#define ONgPlatformData		(*((ONtPlatformData*)0x0053100c))
+
+// Load non levelX_final-files yes/no
+#define opt_ignore_private_data	(*((char*)0x006370f0))
+
+// Play sound yes/no
+#define opt_sound			(*((char*)0x006370fc))
+
+// Option "findsounds" ... but what does it do?
+#define SSgSearchOnDisk		(*((bool*)0x005eb758))
 
 
+// Method signature for script (BSL) functions
 typedef uint16_t	( ONICALL *sl_func)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret);
+
+// Used by function definition below: OBJrObjectType_EnumerateObjects
 typedef char		( ONICALL *OBJtEnumCallback_Object)(void *inObject, int inUserData);
 
 
-#undef DefFunc
+
 #define DefFunc( type, name, callingconvention, args, address) typedef type ( callingconvention * _##name ) args; static _##name name = (_##name)address
+
+// Orig timing functions, replaced by DDrMachineTime_* if option "usegettickcount" is enabled
 DefFunc(int64_t, UUrMachineTime_High, ONICALL, (), 0x04026480);
 DefFunc(double, UUrMachineTime_High_Frequency, ONICALL, (), 0x040264b0);
 DefFunc(int64_t, UUrMachineTime_Sixtieths, ONICALL, (), 0x040263e0);
+
+// Code to initialize platform stuff (like disabling system key combination Alt+Tab)
 DefFunc(void, UUrPlatform_Initialize, ONICALL, (), 0x04026010);
 DefFunc(void, UUrPlatform_Terminate, ONICALL, (), 0x04026310);
 
+// Oni's file access methods
 DefFunc(FILE*, oni_fopen, __cdecl, (const char*, const char*), 0x0051ea9f);
 DefFunc(int, oni_fprintf, __cdecl, (FILE*, const char*, ...), 0x0051ebbf);
 DefFunc(int, oni_fflush, __cdecl, (FILE*), 0x0051eab2);
 
+// Oni's main method?
 DefFunc(void, ONiMain, __cdecl, (int ArgCount, char *ArgList[]), 0x004d3280);
+
+// Initialization code, used to hook in windowed modes
 DefFunc(short, ONrPlatform_Initialize, ONICALL, (ONtPlatformData *PlatformData), 0x0050f670);
 DefFunc(LRESULT, ONrPlatform_WindowProc, CALLBACK, (HWND Window, UINT Message, WPARAM WParam, LPARAM LParam), 0x0050f7a0);
+
+// Retrieves a list of resolutions, replaced by "daodan_enumerate_valid_display_modes"
 DefFunc(unsigned int, gl_enumerate_valid_display_modes, ONICALL, (M3tDisplayMode modes[16]), 0x004083a0);
 DefFunc(int, gl_platform_set_pixel_format, ONICALL, (HDC hdc), 0x00407b50);
Index: Daodan/src/daodan_gl.c
===================================================================
--- Daodan/src/daodan_gl.c	(revision 689)
+++ Daodan/src/daodan_gl.c	(revision 690)
@@ -235,5 +235,5 @@
 		DDrStartupMessage("Using standard Windows gamma adjustment");
 
-		if (GetDeviceGammaRamp(gl_eng->HDC, gl_gamma_ramp))
+//WINE CRASH!		if (GetDeviceGammaRamp(gl_eng->HDC, gl_gamma_ramp))
 			gl_gamma_ramp_valid = 1;
 	}
