changeset 39:e19e48280ca0

Слияние
author Ritor1
date Thu, 18 Oct 2012 09:12:00 +0600
parents 431e26f265a0 (diff) e62134245ab0 (current diff)
children 001b45e84aaa
files Render.cpp mm7_5.cpp
diffstat 3 files changed, 22 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/Render.cpp	Thu Oct 18 03:18:04 2012 +0200
+++ b/Render.cpp	Thu Oct 18 09:12:00 2012 +0600
@@ -6915,7 +6915,7 @@
   IDirectDrawSurface **v1; // esi@2
 
   if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT
-    || (v1 = (IDirectDrawSurface **)&this->pFrontBuffer2, pVersion->pVersionInfo.dwMajorVersion != 4) )
+    || (v1 = (IDirectDrawSurface **)&this->pFrontBuffer2, pVersion->pVersionInfo.dwMajorVersion >= 5u) )
     v1 = (IDirectDrawSurface **)&this->pFrontBuffer4;
   if ( (*v1)->IsLost() == DDERR_SURFACELOST )
     (*v1)->Restore();
--- a/Texture.cpp	Thu Oct 18 03:18:04 2012 +0200
+++ b/Texture.cpp	Thu Oct 18 09:12:00 2012 +0600
@@ -641,24 +641,22 @@
  uNumPixels=uWidth*uHeight;		  // dword @ 000010
  
  memset(pOutPixels, 0, uNumPixels * sizeof(__int16));
-
-  for (short i=1; i<=15; i++)
-	  {
-	  if ((1<<i)==uWidth)
-		  {
-		  field_18=i;
-		  break;
-		  }
-	  }
-
-  for (short i=1; i<=15; i++)
-	  {
-	  if ((1<<i)==uHeight)
-		  {
-		  field_1A=i;
-		  break;
-		  }
-	  }
+  short i=1;
+  while ( (1<<i) !=uWidth)
+  {
+	  ++i;
+      if (i >= 15)
+	  break;
+  }
+  field_18=i;
+  short i_=1;
+  while ( (1<<i_) !=uHeight)
+  {
+	  ++i_;
+      if (i_ >= 15)
+	  break;
+  }
+  field_1A=i_;
   switch (field_18)
 	  {
   case 2:   field_1C = 3;    break;
@@ -692,9 +690,9 @@
  
  read_offset = 128;
  if (psx_head2.planes != 3)
- 	  return 3;
+ 	  return 0;
   current_line = 0;
-  if ( uWidth > 0 )
+  if ( uHeight > 0 )
   {
    dec_position = pOutPixels;
    do
@@ -706,11 +704,11 @@
     {
      do
      {
-      test_byte = *(pPcx + read_offset);
+      test_byte = pPcx[read_offset];
       ++read_offset;
       if ((test_byte & 0xC0) == 0xC0)
       {	
-	    value = *(pPcx + read_offset);
+	    value = pPcx[read_offset];
        	++read_offset; 
       
        if ((test_byte & 0x3F) > 0)
--- a/mm7_5.cpp	Thu Oct 18 03:18:04 2012 +0200
+++ b/mm7_5.cpp	Thu Oct 18 09:12:00 2012 +0600
@@ -3553,7 +3553,7 @@
               (int)pCreationUI_BtnPressLeft[v25],
               1);
             //v0 = pAudioPlayer;
-            pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
+            pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0);
             v22 = (Player *)v23;
             goto LABEL_117;
           }