Mercurial > mm7
diff Render.cpp @ 2463:0f17a30149ec
cleaning project part 1
author | zipi |
---|---|
date | Sun, 17 Aug 2014 15:13:18 +0100 |
parents | 1d04e48651d4 |
children | 104fdbea0386 |
line wrap: on
line diff
--- a/Render.cpp Tue Aug 12 21:34:18 2014 +0300 +++ b/Render.cpp Sun Aug 17 15:13:18 2014 +0100 @@ -8,7 +8,6 @@ #include "ErrorHandling.h" #include "Render.h" -#include "Outdoor_stuff.h" #include "MediaPlayer.h" #include "Sprites.h" #include "Mouse.h" @@ -8393,7 +8392,7 @@ LOWORD(v21) = *(unsigned short *)v21; v23 = pDestb + v18; pDestb++; - extern unsigned int __fastcall _452442_color_cvt(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4); + v26[v23] = _452442_color_cvt(*(unsigned short *)v22, *(unsigned short *)(v22 + 2), v21, v20); v16 = pTex->uWidth; } @@ -9489,4 +9488,39 @@ ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, TRUE)); ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE)); ErrD3D(pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZFUNC, D3DCMP_LESS)); -} \ No newline at end of file +} + +//----- (00452442) -------------------------------------------------------- +unsigned int __fastcall _452442_color_cvt(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4) +{ + int v4; // ebx@0 + __int16 v5; // ST14_2@1 + __int16 v6; // dx@1 + int v7; // ecx@1 + __int16 v8; // ST10_2@1 + int v9; // edi@1 + unsigned __int16 v10; // dh@1@1 + int v11; // ebx@1 + int v12; // ebx@1 + __int16 a3a; // [sp+1Ch] [bp+8h]@1 + + v5 = a2 >> 2; + v6 = (unsigned __int16)a4 >> 2; + v8 = a1 >> 2; + a3a = (unsigned __int16)a3 >> 2; + LOWORD(v7) = a3a; + v9 = v7; + LOWORD(v4) = ((unsigned __int16)a4 >> 2) & 0xE0; + LOWORD(v7) = a3a & 0xE0; + LOWORD(v9) = v9 & 0x1C00; + v11 = v7 + v4; + LOWORD(v7) = v5 & 0xE0; + v12 = v7 + v11; + LOWORD(v7) = v8 & 0xE0; + __debugbreak(); // warning C4700: uninitialized local variable 'v10' used + return (PID_TYPE(v8) + PID_TYPE(v5) + PID_TYPE(a3a) + PID_TYPE(v6)) | (v7 + v12) | ((v8 & 0x1C00) + + (v5 & 0x1C00) + + v9 + + (__PAIR__(v10, (unsigned __int16)a4 >> 2) & 0x1C00)); +} +