comparison Render.cpp @ 2463:0f17a30149ec

cleaning project part 1
author zipi
date Sun, 17 Aug 2014 15:13:18 +0100
parents 1d04e48651d4
children 104fdbea0386
comparison
equal deleted inserted replaced
2462:1d04e48651d4 2463:0f17a30149ec
6 #include "mm7_unsorted_subs.h" 6 #include "mm7_unsorted_subs.h"
7 #include "ZlibWrapper.h" 7 #include "ZlibWrapper.h"
8 #include "ErrorHandling.h" 8 #include "ErrorHandling.h"
9 9
10 #include "Render.h" 10 #include "Render.h"
11 #include "Outdoor_stuff.h"
12 #include "MediaPlayer.h" 11 #include "MediaPlayer.h"
13 #include "Sprites.h" 12 #include "Sprites.h"
14 #include "Mouse.h" 13 #include "Mouse.h"
15 #include "GammaControl.h" 14 #include "GammaControl.h"
16 #include "stru6.h" 15 #include "stru6.h"
8391 v22 = (int)&v19[2 * v20]; 8390 v22 = (int)&v19[2 * v20];
8392 LOWORD(v20) = *(unsigned short *)(v21 + 2); 8391 LOWORD(v20) = *(unsigned short *)(v21 + 2);
8393 LOWORD(v21) = *(unsigned short *)v21; 8392 LOWORD(v21) = *(unsigned short *)v21;
8394 v23 = pDestb + v18; 8393 v23 = pDestb + v18;
8395 pDestb++; 8394 pDestb++;
8396 extern unsigned int __fastcall _452442_color_cvt(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4); 8395
8397 v26[v23] = _452442_color_cvt(*(unsigned short *)v22, *(unsigned short *)(v22 + 2), v21, v20); 8396 v26[v23] = _452442_color_cvt(*(unsigned short *)v22, *(unsigned short *)(v22 + 2), v21, v20);
8398 v16 = pTex->uWidth; 8397 v16 = pTex->uWidth;
8399 } 8398 }
8400 while (pDestb < pTex->uWidth); 8399 while (pDestb < pTex->uWidth);
8401 } 8400 }
9488 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, FALSE)); 9487 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, FALSE));
9489 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, TRUE)); 9488 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, TRUE));
9490 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE)); 9489 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE));
9491 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZFUNC, D3DCMP_LESS)); 9490 ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZFUNC, D3DCMP_LESS));
9492 } 9491 }
9492
9493 //----- (00452442) --------------------------------------------------------
9494 unsigned int __fastcall _452442_color_cvt(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4)
9495 {
9496 int v4; // ebx@0
9497 __int16 v5; // ST14_2@1
9498 __int16 v6; // dx@1
9499 int v7; // ecx@1
9500 __int16 v8; // ST10_2@1
9501 int v9; // edi@1
9502 unsigned __int16 v10; // dh@1@1
9503 int v11; // ebx@1
9504 int v12; // ebx@1
9505 __int16 a3a; // [sp+1Ch] [bp+8h]@1
9506
9507 v5 = a2 >> 2;
9508 v6 = (unsigned __int16)a4 >> 2;
9509 v8 = a1 >> 2;
9510 a3a = (unsigned __int16)a3 >> 2;
9511 LOWORD(v7) = a3a;
9512 v9 = v7;
9513 LOWORD(v4) = ((unsigned __int16)a4 >> 2) & 0xE0;
9514 LOWORD(v7) = a3a & 0xE0;
9515 LOWORD(v9) = v9 & 0x1C00;
9516 v11 = v7 + v4;
9517 LOWORD(v7) = v5 & 0xE0;
9518 v12 = v7 + v11;
9519 LOWORD(v7) = v8 & 0xE0;
9520 __debugbreak(); // warning C4700: uninitialized local variable 'v10' used
9521 return (PID_TYPE(v8) + PID_TYPE(v5) + PID_TYPE(a3a) + PID_TYPE(v6)) | (v7 + v12) | ((v8 & 0x1C00)
9522 + (v5 & 0x1C00)
9523 + v9
9524 + (__PAIR__(v10, (unsigned __int16)a4 >> 2) & 0x1C00));
9525 }
9526