Index: /Daodan/src/BFW_Motoko_Draw.h
===================================================================
--- /Daodan/src/BFW_Motoko_Draw.h	(revision 893)
+++ /Daodan/src/BFW_Motoko_Draw.h	(revision 894)
@@ -82,4 +82,27 @@
 } M3tWin32GammaRamp;
 
+typedef struct
+{
+	float	x;
+	float	y;
+	float	z;
+	float	invW;
+} M3tPointScreen;
+
+typedef struct
+{
+	char pad[8];
+		
+	UUtUns16 width;
+	UUtUns16 height;
+	int texelType; // enum IMtPixelType
+		
+	UUtUns16 num_x;
+	UUtUns16 num_y;
+
+	UUtUns32 num_textures;
+	void* textures[1]; // struct M3tTextureMap
+} M3tTextureMap_Big;
+
 extern char M3gResolutionSwitch;
 
Index: /Daodan/src/Daodan.h
===================================================================
--- /Daodan/src/Daodan.h	(revision 893)
+++ /Daodan/src/Daodan.h	(revision 894)
@@ -18,4 +18,11 @@
 #define UUcError_None ((UUtError) 0)
 
+typedef unsigned char UUtUns8;
+typedef unsigned short UUtUns16;
+typedef unsigned int UUtUns32;
+typedef char UUtInt8;
+typedef short UUtInt16;
+typedef int UUtInt32;
+
 extern HMODULE DDrDLLModule;
 extern HMODULE DDrONiModule;
Index: /Daodan/src/Daodan_Config.c
===================================================================
--- /Daodan/src/Daodan_Config.c	(revision 893)
+++ /Daodan/src/Daodan_Config.c	(revision 894)
@@ -26,4 +26,5 @@
 bool patch_fonttexturecache = true;
 bool patch_getcmdline = true;
+bool patch_hdscreens_lowres = true;
 bool patch_kickguns = false;
 bool patch_killvtune = true;
@@ -131,4 +132,6 @@
 			else if (!_stricmp(name, "getcmdline"))
 				patch_getcmdline = !_stricmp(inifile_cleanstr(value), "true");
+			else if (!_stricmp(name, "hdscreens_lowres"))
+				patch_hdscreens_lowres = !_stricmp(inifile_cleanstr(value), "true");
 			else if (!_stricmp(name, "kickguns"))
 				patch_kickguns = !_stricmp(inifile_cleanstr(value), "true");
Index: /Daodan/src/Daodan_Config.h
===================================================================
--- /Daodan/src/Daodan_Config.h	(revision 893)
+++ /Daodan/src/Daodan_Config.h	(revision 894)
@@ -21,4 +21,5 @@
 extern bool patch_fonttexturecache;
 extern bool patch_getcmdline;
+extern bool patch_hdscreens_lowres;
 extern bool patch_kickguns;
 extern bool patch_killvtune;
Index: /Daodan/src/Oni_Symbols.h
===================================================================
--- /Daodan/src/Oni_Symbols.h	(revision 893)
+++ /Daodan/src/Oni_Symbols.h	(revision 894)
@@ -220,4 +220,6 @@
 DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0);
 DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x0041EB00);
+DefFunc(void, M3rDraw_BigBitmap, ONICALL, (M3tTextureMap_Big* inBigBitmap, const M3tPointScreen *inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f6e0);
+DefFunc(void, M3rDraw_Bitmap, ONICALL, (void* inBitmap, const M3tPointScreen* inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha), 0x0041f4a0);
 /*
 DefFunc(void, M3rGeom_Line_Light, ONICALL, (), 0x0041f440);
Index: /Daodan/src/_Version.h
===================================================================
--- /Daodan/src/_Version.h	(revision 893)
+++ /Daodan/src/_Version.h	(revision 894)
@@ -6,5 +6,5 @@
 
 #define DAODAN_VERSION_MAJOR 3
-#define DAODAN_VERSION_MINOR 4
+#define DAODAN_VERSION_MINOR 5
 #define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR)
 
Index: /Daodan/src/patches/Patches.c
===================================================================
--- /Daodan/src/patches/Patches.c	(revision 893)
+++ /Daodan/src/patches/Patches.c	(revision 894)
@@ -24,5 +24,45 @@
 	WMrSlider_SetRange(window, min_value, max_value);
 }
- 
+
+void ONICALL DD_M3rDraw_BigBitmap(M3tTextureMap_Big* inBigBitmap, const M3tPointScreen* inDestPoint, UUtUns16 inWidth, UUtUns16 inHeight, UUtUns32 inShade, UUtUns16 inAlpha) /* 0 - M3cMaxAlpha */
+{
+	UUtUns16 x;
+	UUtUns16 y;
+
+	for (y = 0; y < inBigBitmap->num_y; y++)
+	{
+		for (x = 0; x < inBigBitmap->num_x; x++)
+		{
+			UUtUns16 index;
+			void* texture; // M3tTextureMap
+			UUtUns16 width;
+			UUtUns16 height;
+			UUtInt16 temp;			
+			UUtInt32 x_times_maxwidth;
+			UUtInt32 y_times_maxheight;
+			
+			index = x + (y * inBigBitmap->num_x);
+			texture = inBigBitmap->textures[index];
+			
+			x_times_maxwidth = x * 256;
+			y_times_maxheight = y * 256;
+			
+			// Cast to Unsigned to get the 16 bit int representation and then to signed to get the actual value. Doing it in one step gives wrong results (at least with gcc)
+			dest_point.x = (UUtInt16)((UUtUns16)inDestPoint->x) + x_times_maxwidth;
+			dest_point.y = (UUtInt16)((UUtUns16)inDestPoint->y) + y_times_maxheight;
+			dest_point.z = inDestPoint->z;
+			dest_point.invW = inDestPoint->invW;
+
+			temp = (UUtInt16) ( ((UUtInt32)inWidth - x_times_maxwidth) > 0 ? ((UUtInt32)inWidth - x_times_maxwidth) : 0);
+			width = 256 < (UUtUns16)temp ? 256 : temp;
+			temp = (UUtInt16) ( ((UUtInt32)inHeight - y_times_maxheight) > 0 ? ((UUtInt32)inHeight - y_times_maxheight) : 0);
+			height = 256 < (UUtUns16)temp ? 256 : temp;
+            			
+			M3rDraw_Bitmap(texture, &dest_point, width, height, inShade, inAlpha);
+		}
+	}
+}
+
+
 void ONICALL DDrShowResumeButton(WMtWindow* window, int visibility)
 {
@@ -274,4 +314,10 @@
 }
 
+// Allow HD screens with resolution < 1024*768
+void DD_Patch_HDScreens_LowRes()
+{
+	DDrPatch_MakeJump((void*)M3rDraw_BigBitmap, (void*)DD_M3rDraw_BigBitmap);
+}
+
 // Hackish fix for Konoko not kicking guns
 // Don't use this, it breaks stairs.
@@ -545,4 +591,7 @@
 	if (patch_getcmdline)
 		DD_Patch_GetCmdLine();
+
+	if (patch_hdscreens_lowres)
+		DD_Patch_HDScreens_LowRes();
 	
 	if (patch_kickguns)
