diff UI/UIMainMenu.cpp @ 2152:d44b7775fc06

Removed DirectDraw2 compatibility. 3D Sound enabled (change 3DSoundProvider registry entry to activate it). Moved all forward declarations to mm7_unsorted_subs.h (many cpp files do not need them anyweay).
author Nomad
date Thu, 09 Jan 2014 01:37:34 +0200
parents 259df09dfb50
children d28d3c006077
line wrap: on
line diff
--- a/UI/UIMainMenu.cpp	Wed Jan 08 22:29:11 2014 +0200
+++ b/UI/UIMainMenu.cpp	Thu Jan 09 01:37:34 2014 +0200
@@ -15,6 +15,7 @@
 #include "..\texts.h"
 
 #include "..\mm7_data.h"
+#include "..\mm7_unsorted_subs.h"
 
 
 //----- (0041B578) --------------------------------------------------------
@@ -193,6 +194,36 @@
   LoadPartyBuffIcons();
 }
 
+
+
+
+//----- (00452AF3) --------------------------------------------------------
+void __fastcall fill_pixels_fast(unsigned int a1, unsigned __int16 *pPixels, unsigned int uNumPixels)
+{
+  void *v3; // edi@1
+  unsigned int v4; // eax@1
+  unsigned __int16 *v5; // edi@3
+  unsigned int i; // ecx@3
+
+  __debugbreak(); // Nomad: sub operates on 16 bit pixels, we have 32 bits.
+
+  v3 = pPixels;
+  v4 = a1 | (a1 << 16);
+  if ( (unsigned __int8)pPixels & 2 )           // first 2 pixels
+  {
+    *pPixels = v4;
+    v3 = pPixels + 1;
+    --uNumPixels;
+  }
+  memset32(v3, v4, uNumPixels >> 1);            // 4 pixels at once
+  v5 = (unsigned __int16 *)((char *)v3 + 4 * (uNumPixels >> 1));
+  for ( i = uNumPixels & 1; i; --i )            // leftover pixels
+  {
+    *v5 = v4;
+    ++v5;
+  }
+}
+
 //----- (004979D2) --------------------------------------------------------
 MENU_STATE MainMenuUI_Credits_Loop()
 {