diff Render.cpp @ 200:c04d432611e1

2.12.13
author Ritor1
date Wed, 02 Jan 2013 23:17:44 +0600
parents 10ae648c8d20
children
line wrap: on
line diff
--- a/Render.cpp	Sat Dec 29 14:18:20 2012 +0600
+++ b/Render.cpp	Wed Jan 02 23:17:44 2013 +0600
@@ -907,8 +907,8 @@
 float Render::DrawBezierTerrain()
 {
  //__debugbreak();Ritor1: it's temporarily
-  return 0;
-  /*
+  //return 0;
+  
   unsigned int v0; // ebx@1
   unsigned int v1; // edi@1
   unsigned int v2; // eax@1
@@ -1694,7 +1694,7 @@
   }
   result = v126;
   pOutdoorCamera->field_40 = v126;
-  return result;*/
+  return result;
 }
 // 47FFC4: inconsistent fpu stack
 // 4D864C: using guessed type char byte_4D864C;
@@ -1824,8 +1824,8 @@
 
   v3 = a1;
   v82 = edx0;
-  v83 = *(short *)(a3 + 4);
-  X = abs(*(short *)(a3 + 6));
+  v83 = *(/*short **/_WORD *)(a3 + 4);
+  X = abs(*(/*short **/_WORD *)(a3 + 6));
   v4 = 0;
   v88 = 0;
   v84 = v3 - 1;
@@ -1836,8 +1836,8 @@
   {
     while ( 1 )
     {
-      v5 = abs(X);
-      v6 = abs(v83);
+      v5 = abs(X);//v5 = 13108
+      v6 = abs(v83);//v6 = 13108
       --X;
       v93 = &stru_76E5C8[(v5 << 7) + v6];
  	  if ( !v93->field_0 || ((v7 = 48 * v4, v8 = &pVerticesSR_806210[v4], a2 = v8, !v82) ? (v9 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7),
@@ -2419,11 +2419,11 @@
   Vec3_float_ *pNormalb; // [sp+C0h] [bp+8h]@77
 
   v3 = a1;
-  v4 = *(short *)(a3 + 4);
-  v5 = *(short *)(a3 + 6);
+  //v4 = *(short *)(a3 + 4);
+  //v5 = *(short *)(a3 + 6);
   v85 = a2;
-  v86 = v4;
-  X = abs(v5);
+  v86 = *(_WORD *)(a3 + 4); //v4;
+  X = abs(*(_WORD *)(a3 + 6)); //v5
   v6 = 0;
   v90 = 0;
   v81 = v3 - 1;
@@ -9205,7 +9205,7 @@
 
 
 //----- (004A5D33) --------------------------------------------------------
-void Render::_4A5D33(unsigned int a2, unsigned int a3, int a4, int a5, RGBTexture *pTexture)
+void Render::_4A5D33(unsigned int pX, unsigned int pY, int a4, int a5, RGBTexture *pTexture)
 {
   Render *v6; // esi@1
   unsigned __int16 *v7; // ebx@3
@@ -9227,7 +9227,7 @@
   int v23; // edi@23
   int v24; // [sp+Ch] [bp-4h]@3
   int a2a; // [sp+18h] [bp+8h]@21
-  unsigned int a3a; // [sp+1Ch] [bp+Ch]@20
+  unsigned int teal; // [sp+1Ch] [bp+Ch]@20
   int a4a; // [sp+20h] [bp+10h]@3
   int a4b; // [sp+20h] [bp+10h]@21
   unsigned __int16 *pTexturea; // [sp+28h] [bp+18h]@3
@@ -9235,7 +9235,7 @@
   v6 = this;
   if ( this->uNumSceneBegins && pTexture )
   {
-    v7 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch];
+    v7 = &this->pTargetSurface[pX + pY * this->uTargetSurfacePitch];
     v8 = pTexture->uWidth;
     v24 = pTexture->uWidth;
     v9 = a4 + a5 * v8;
@@ -9246,47 +9246,47 @@
     if ( v6->bClip )
     {
       v12 = v6->uClipX;
-      if ( (signed int)a2 < v12 )
-      {
-        v13 = 2 * (v12 - a2);
+      if ( (signed int)pX < v12 )
+      {
+        v13 = 2 * (v12 - pX);
         pTexturea = (unsigned __int16 *)((char *)pTexturea + v13);
-        v10 += a2 - v6->uClipX;
+        v10 += pX - v6->uClipX;
         v7 = (unsigned __int16 *)((char *)v7 + v13);
         a4a = v10;
       }
       v14 = v6->uClipY;
-      if ( (signed int)a3 < v14 )
-      {
-        v15 = v14 - a3;
+      if ( (signed int)pY < v14 )
+      {
+        v15 = v14 - pY;
         pTexturea += v24 * v15;
-        v11 += a3 - v6->uClipY;
+        v11 += pY - v6->uClipY;
         v10 = a4a;
         v7 += v6->uTargetSurfacePitch * v15;
       }
       v16 = v6->uClipX;
-      if ( (signed int)v16 < (signed int)a2 )
-        v16 = a2;
+      if ( (signed int)v16 < (signed int)pX )
+        v16 = pX;
       v17 = v6->uClipZ;
       if ( (signed int)(v10 + v16) > v17 )
       {
         v18 = v6->uClipX;
-        if ( (signed int)v18 < (signed int)a2 )
-          v18 = a2;
+        if ( (signed int)v18 < (signed int)pX )
+          v18 = pX;
         a4a = v17 - v18;
       }
       v19 = v6->uClipY;
-      if ( (signed int)v19 < (signed int)a3 )
-        v19 = a3;
+      if ( (signed int)v19 < (signed int)pY )
+        v19 = pY;
       v20 = v6->uClipW;
       if ( (signed int)(v11 + v19) > v20 )
       {
         v21 = v6->uClipY;
-        if ( (signed int)v21 < (signed int)a3 )
-          v21 = a3;
+        if ( (signed int)v21 < (signed int)pY )
+          v21 = pY;
         v11 = v20 - v21;
       }
     }
-    a3a = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu);
+    teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu);
     if ( v11 > 0 )
     {
       v22 = a4a;
@@ -9299,7 +9299,7 @@
           v23 = v22;
           do
           {
-            if ( *pTexturea != a3a )
+            if ( *pTexturea != teal )
               *v7 = *pTexturea;
             ++pTexturea;
             ++v7;