Mercurial > mm7
changeset 709:af08fc9e29c8
Items (blue dots) on minimap fixed
author | Nomad |
---|---|
date | Thu, 21 Mar 2013 12:37:49 +0200 |
parents | af5771589d22 |
children | 735dab8d3c9a a5e587c8e30e 737d7fec67f0 |
files | GUIProgressBar.cpp Render.cpp Render.h UIBooks.cpp UIPopup.cpp UiGame.cpp mm7_2.cpp mm7_5.cpp |
diffstat | 8 files changed, 138 insertions(+), 133 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIProgressBar.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/GUIProgressBar.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -214,7 +214,7 @@ goto LABEL_6; pRenderer->DrawTextureRGB(0, 0, &pLoadingBg); - pRenderer->Clip_v2(0, 0, 0x27Fu, 0x1DFu); + pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu); pRenderer->Clip(0xACu, 0x1CBu, 15 * (signed int)(signed __int64)((double)(300 * uProgressCurrent) / (double)uProgressMax) / 15 + 172, 0x1D7u);
--- a/Render.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/Render.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -4749,10 +4749,10 @@ v1->field_4002C = 0; v1->pActiveZBuffer = 0; v1->pDefaultZBuffer = 0; - v1->field_20_clipy = 0; - v1->field_1C_clipx = 0; - v1->field_24_width = 639; - v1->field_28_height = 479; + v1->raster_clip_y = 0; + v1->raster_clip_x = 0; + v1->raster_clip_z = 639; + v1->raster_clip_w = 479; v1->field_4003C = (int)&unk_4EED80; v1->field_40040 = dword_4EED78; v1->uClipZ = 640; @@ -6294,7 +6294,7 @@ //----- (004A0BEE) -------------------------------------------------------- -char Render::Line2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor) +char Render::RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor) { int v6; // edi@1 int v7; // edx@5 @@ -6333,18 +6333,18 @@ int uZa; // [sp+2Ch] [bp+10h]@38 v36 = 0i64; - v6 = this->field_1C_clipx; + v6 = this->raster_clip_x; v35 = this; if ( (signed int)uX < v6 ) HIDWORD(v36) = 8; - v34 = this->field_24_width; - if ( (signed int)uX > this->field_24_width ) + v34 = this->raster_clip_z; + if ( (signed int)uX > this->raster_clip_z ) HIDWORD(v36) |= 4u; - v7 = this->field_20_clipy; + v7 = this->raster_clip_y; v8 = uY; if ( (signed int)uY < v7 ) HIDWORD(v36) |= 2u; - v9 = this->field_28_height; + v9 = this->raster_clip_w; if ( (signed int)uY > v9 ) HIDWORD(v36) |= 1u; v10 = uZ; @@ -6447,7 +6447,7 @@ v13 = (signed int)((uW - uY) * (v6 - uX)) / (signed int)(uZ - uX); v14 = v35; v8 = v13 + uY; - uX = v35->field_1C_clipx; + uX = v35->raster_clip_x; goto LABEL_24; } v10 = v6; @@ -6457,26 +6457,26 @@ LABEL_24: if ( (BYTE4(v36) ^ (unsigned __int8)v36) & 4 ) { - v15 = v14->field_24_width; + v15 = v14->raster_clip_z; if ( BYTE4(v36) & 4 ) { v14 = v35; v8 += (signed int)((v11 - v8) * (v15 - uX)) / (signed int)(v10 - uX); - uX = v35->field_24_width; + uX = v35->raster_clip_z; } else { v16 = (signed int)((v8 - v11) * (v15 - v10)) / (signed int)(uX - v10); - v10 = v14->field_24_width; + v10 = v14->raster_clip_z; v11 += v16; } } - v17 = v14->field_20_clipy; + v17 = v14->raster_clip_y; v37 = 0; - uYa = v14->field_20_clipy; + uYa = v14->raster_clip_y; if ( (signed int)v8 < v17 ) v37 = 2; - v18 = v14->field_28_height; + v18 = v14->raster_clip_w; if ( (signed int)v8 > v18 ) v37 |= 1u; if ( (signed int)v11 >= v17 ) @@ -6495,7 +6495,7 @@ { uX += (signed int)((v10 - uX) * (uYa - v8)) / (signed int)(v11 - v8); LOBYTE(v12) = (char)v35; - v8 = v35->field_20_clipy; + v8 = v35->raster_clip_y; } else { @@ -6510,14 +6510,14 @@ { if ( v37 & 1 ) { - uX += (signed int)((v10 - uX) * (v35->field_28_height - v8)) / (signed int)(v11 - v8); + uX += (signed int)((v10 - uX) * (v35->raster_clip_w - v8)) / (signed int)(v11 - v8); LOBYTE(v12) = (char)v35; - v8 = v35->field_28_height; + v8 = v35->raster_clip_w; } else { - v12 = (signed int)((uX - v10) * (v35->field_28_height - v11)) / (signed int)(v8 - v11); - v11 = v35->field_28_height; + v12 = (signed int)((uX - v10) * (v35->raster_clip_w - v11)) / (signed int)(v8 - v11); + v11 = v35->raster_clip_w; v10 += v12; } } @@ -6537,12 +6537,12 @@ //----- (004A0E97) -------------------------------------------------------- -void Render::Clip_v2(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW) -{ - this->field_1C_clipx = uX; - this->field_20_clipy = uY; - this->field_24_width = uZ; - this->field_28_height = uW; +void Render::SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW) +{ + this->raster_clip_x = uX; + this->raster_clip_y = uY; + this->raster_clip_z = uZ; + this->raster_clip_w = uW; }
--- a/Render.h Thu Mar 21 10:35:13 2013 +0200 +++ b/Render.h Thu Mar 21 12:37:49 2013 +0200 @@ -290,9 +290,9 @@ void CreateSomeTexture(); bool InitializeFullscreen(HWND hWnd); bool SwitchToWindow(HWND hWnd); - char Line2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor); + char RasterLine2D(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned __int16 uColor); void ClearZBuffer(int a2, int a3); - void Clip_v2(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); + void SetRasterClipRect(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW); void ParseTargetPixelFormat(); bool LockSurface_DDraw4(IDirectDrawSurface4 *pSurface, DDSURFACEDESC2 *pDesc, unsigned int uLockFlags); bool LockSurface_DDraw2(IDirectDrawSurface2 *pSurface, DDSURFACEDESC *pDesc, unsigned int uLockFlags); @@ -380,10 +380,10 @@ int field_10; int field_14; int field_18_locked_pitch; - int field_1C_clipx; - int field_20_clipy; - int field_24_width; - int field_28_height; + int raster_clip_x; + int raster_clip_y; // clipping rect for raster ops + int raster_clip_z; // like RasterLine2D for (mini)map + int raster_clip_w; __int16 field_2C[65536]; __int16 field_2002C[65536]; int field_4002C;
--- a/UIBooks.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/UIBooks.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -1131,7 +1131,7 @@ screenCenter_X = (signed int)(tl_x + br_x) >> 1; screenCenterY = (signed int)(tl_y + br_y) >> 1; surfPitch = pRenderer->uTargetSurfacePitch; - pRenderer->Clip_v2(tl_x, tl_y, br_x, br_y); + pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y); v5 = viewparams->field_2C; v6 = viewparams->sViewCenterX; v86 = viewparams->sViewCenterX; @@ -1248,7 +1248,7 @@ v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)v5) >> 16; v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16); screenHeight = (unsigned __int64)(v20 * (signed __int64)v5) >> 16; - pRenderer->Line2D( + pRenderer->RasterLine2D( screenCenter_X + v88, screenCenterY - v87, screenCenter_X + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16), @@ -1283,7 +1283,7 @@ v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16; i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16; v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16; - pRenderer->Line2D( + pRenderer->RasterLine2D( screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16), screenCenterY - v88, screenCenter_X + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16), @@ -1401,17 +1401,17 @@ v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X; v97 = (const void *)((unsigned __int64)(v53 * (signed __int64)v5) >> 16); v55 = screenCenterY - (int)v97; - if ( v54 >= pRenderer->field_1C_clipx ) + if ( v54 >= pRenderer->raster_clip_x ) { - if ( v54 <= pRenderer->field_24_width && v55 >= pRenderer->field_20_clipy && v55 <= pRenderer->field_28_height ) + if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w ) { v74 = v86; if ( v5 > 512 ) { v96 = v55 + 1; black = v55 - 1; - pRenderer->Line2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, v86); - pRenderer->Line2D(v54, black, v54, v96, v86); + pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, v86); + pRenderer->RasterLine2D(v54, black, v54, v96, v86); ++v54; v74 = v86; v72 = v96; @@ -1424,7 +1424,7 @@ v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X; v70 = screenCenterY - (int)v97; } - pRenderer->Line2D(v54, v70, v71, v72, v74); + pRenderer->RasterLine2D(v54, v70, v71, v72, v74); } } }
--- a/UIPopup.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/UIPopup.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -820,11 +820,11 @@ v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1); v106.sZValue = 0; v106.uFlags = 0; - pRenderer->Clip_v2(0, 0, 0x27Fu, 0x1DFu); - pRenderer->Line2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, a5); - pRenderer->Line2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, a5); - pRenderer->Line2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, a5); - pRenderer->Line2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, a5); + pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu); + pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, a5); + pRenderer->RasterLine2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, a5); + pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, a5); + pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, a5); if ( pRenderer->pRenderD3D ) { v13 = &pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]];
--- a/UiGame.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/UiGame.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -1493,7 +1493,7 @@ } } - //----- (00441D38) -------------------------------------------------------- +//----- (00441D38) -------------------------------------------------------- void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap) { int uHeight; // ebx@6 @@ -1526,14 +1526,14 @@ int v47; // eax@108 unsigned int v48; // ebx@114 unsigned int v49; // ST64_4@114 - unsigned int v51; // [sp-10h] [bp-64h]@79 + //unsigned int v51; // [sp-10h] [bp-64h]@79 unsigned int v52; // [sp-10h] [bp-64h]@100 - unsigned int v53; // [sp-Ch] [bp-60h]@79 + //unsigned int v53; // [sp-Ch] [bp-60h]@79 unsigned int v54; // [sp-Ch] [bp-60h]@100 - unsigned int v55; // [sp-8h] [bp-5Ch]@77 + //unsigned int v55; // [sp-8h] [bp-5Ch]@77 unsigned int v56; // [sp-8h] [bp-5Ch]@100 //signed int v57; // [sp-4h] [bp-58h]@54 - unsigned __int16 v58; // [sp-4h] [bp-58h]@77 + //unsigned __int16 v58; // [sp-4h] [bp-58h]@77 unsigned __int16 v59; // [sp-4h] [bp-58h]@100 unsigned __int16 v60; // [sp+10h] [bp-44h]@66 unsigned int v61; // [sp+10h] [bp-44h]@85 @@ -1549,12 +1549,12 @@ int v73; // [sp+2Ch] [bp-28h]@30 int v76; // [sp+34h] [bp-20h]@91 int v77; // [sp+34h] [bp-20h]@108 - int v79; // [sp+38h] [bp-1Ch]@72 - char *a2c; // [sp+40h] [bp-14h]@68 + //int v79; // [sp+38h] [bp-1Ch]@72 + //char *a2c; // [sp+40h] [bp-14h]@68 signed int uCenterY; // [sp+48h] [bp-Ch]@1 signed int uCenterX; // [sp+4Ch] [bp-8h]@1 signed int uWidth; // [sp+5Ch] [bp+8h]@30 - signed int uZe; // [sp+5Ch] [bp+8h]@67 + //signed int uZe; // [sp+5Ch] [bp+8h]@67 signed int uZf; // [sp+5Ch] [bp+8h]@85 signed int uZg; // [sp+5Ch] [bp+8h]@105 unsigned int uWa; // [sp+60h] [bp+Ch]@23 @@ -1577,7 +1577,9 @@ bWizardEyeActive = true; uWizardEyeSkillLevel = 2; } - pRenderer->Clip_v2(uX, uY, uZ - 1, uW - 1); + bWizardEyeActive = true; + uWizardEyeSkillLevel = 3; + pRenderer->SetRasterClipRect(uX, uY, uZ - 1, uW - 1); uHeight = uW - uY; uWidth = uZ - uX; @@ -1712,7 +1714,7 @@ v15 = abs(pOutline->sZ - pParty->vPosition.z) / 8; if ( v15 > 100 ) v15 = 100; - pRenderer->Line2D(v69, lPitcha, uWa, v14, viewparams->pPalette[-v15 + 200]); + pRenderer->RasterLine2D(v69, lPitcha, uWa, v14, viewparams->pPalette[-v15 + 200]); } } @@ -1721,7 +1723,7 @@ { //v16 = (uint *)&pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[uZb]]; auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]]; - pRenderer->Line2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom + pRenderer->RasterLine2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16), uCenterY @@ -1748,64 +1750,65 @@ uint arrow_idx = floorf(0.5f + 7 * angle); pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx])); - flagsb = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0xFFu); - v60 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); + flagsb = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 255); + v60 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 0, 0); if (bWizardEyeActive) { - uZe = 0; - //for (uint i = 0; i < uNumSpriteObjects; ++i) - if (uNumSpriteObjects > 0) - { - a2c = (char *)&pSpriteObjects[0].uObjectDescID; - while ( 1 ) + //uZe = 0; + if (uWizardEyeSkillLevel >= 2) + for (uint i = 0; i < uNumSpriteObjects; ++i) + //if (uNumSpriteObjects > 0) + { + auto object = pSpriteObjects + i; + + //a2c = (char *)&pSpriteObjects[0].uObjectDescID; + //while ( 1 ) + //{ + if (!object->uType || !object->uObjectDescID) + continue; + //if (uWizardEyeSkillLevel == 1 + v37 = uCenterX + ((unsigned __int64)((object->vPosition.x - pParty->vPosition.x) * (signed __int64)uZoom) >> 16); + //v79 = (unsigned __int64)((object->vPosition.y - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16; + //v38 = uCenterY - v79; + v38 = uCenterY - ((signed __int64)((object->vPosition.y - pParty->vPosition.y) * (signed __int64)uZoom) >> 16); + if (v37 < pRenderer->raster_clip_x || v37 > pRenderer->raster_clip_z || + v38 < pRenderer->raster_clip_y || v38 > pRenderer->raster_clip_w) + continue; + + assert(uZoom >= 512); + if (pObjectList->pObjects[object->uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE) { - if ( !*((short *)a2c - 1) - || !*(short *)a2c - || uWizardEyeSkillLevel == 1 - || (v37 = ((unsigned __int64)((*(int *)(a2c + 2) - pParty->vPosition.x) * (signed __int64)(signed int)uZoom) >> 16) - + uCenterX, - v79 = (unsigned __int64)((*(int *)(a2c + 6) - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16, - v38 = uCenterY - v79, - v37 < pRenderer->field_1C_clipx) - || v37 > pRenderer->field_24_width - || v38 < pRenderer->field_20_clipy - || v38 > pRenderer->field_28_height ) - goto LABEL_83; - if ( pObjectList->pObjects[*(short *)a2c].uFlags & 0x10 ) - break; - if ( (signed int)uZoom > 512 ) - { - pRenderer->Line2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, flagsb); - pRenderer->Line2D(v37, v38 - 2, v37, v38 + 1, flagsb); - pRenderer->Line2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, flagsb); - pRenderer->Line2D(v37 - 2, v38, v37 - 2, v38 + 1, flagsb); - v37 += 2; - v58 = flagsb; - v55 = v38 + 1; - goto LABEL_81; - } - pRenderer->Line2D(v37 - 1, v38 - 1, v37 - 1, uCenterY - v79, flagsb); - v58 = flagsb; - v55 = uCenterY - v79; - v53 = v37; - v51 = v38 - 1; -LABEL_82: - pRenderer->Line2D(v37, v51, v53, v55, v58); -LABEL_83: - ++uZe; - a2c += 112; - if ( uZe >= (signed int)uNumSpriteObjects ) - { - goto LABEL_85; - } + pRenderer->RasterLine2D(v37, v38, + v37, v38, v60); + } + else if (uZoom > 512) + { + pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, flagsb); + pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, flagsb); + pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, flagsb); + pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, flagsb); + pRenderer->RasterLine2D(v37 + 2, v38, + v37 + 2, v38 + 1, flagsb); } - v58 = v60; - v55 = uCenterY - v79; -LABEL_81: - v53 = v37; - v51 = uCenterY - v79; - goto LABEL_82; + else + { + pRenderer->RasterLine2D(v37 - 1, v38 - 1, + v37 - 1, v38, flagsb); + pRenderer->RasterLine2D(v37, v38 - 1, + v37, v38, flagsb); + } +//LABEL_82: +//LABEL_83: + //++uZe; + //a2c += 112; + //if ( uZe >= (signed int)uNumSpriteObjects ) + //{ + //goto LABEL_85; + //} + //} } + + LABEL_85: v63 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 0, 0); v61 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 255, 0); @@ -1825,9 +1828,9 @@ v76 = (unsigned __int64)(( flagsc->vPosition.y - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16; v41 = uCenterY - v76; - if ( v40 >= pRenderer->field_1C_clipx ) + if ( v40 >= pRenderer->raster_clip_x ) { - if ( v40 <= pRenderer->field_24_width && v41 >= pRenderer->field_20_clipy && v41 <= pRenderer->field_28_height ) + if ( v40 <= pRenderer->raster_clip_z && v41 >= pRenderer->raster_clip_y && v41 <= pRenderer->raster_clip_w ) { uWd = v61; if ( BYTE3(flagsc->uAttributes) & 1 ) @@ -1836,13 +1839,13 @@ uWd = v65; if ( (signed int)uZoom > 1024 ) { - pRenderer->Line2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd); - pRenderer->Line2D(v40, v41 - 2, v40, v41 + 2, uWd); - pRenderer->Line2D(v40 + 1, v41 - 2, v40 + 1, v41 + 2, uWd); + pRenderer->RasterLine2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd); + pRenderer->RasterLine2D(v40, v41 - 2, v40, v41 + 2, uWd); + pRenderer->RasterLine2D(v40 + 1, v41 - 2, v40 + 1, v41 + 2, uWd); v42 = v41 + 1; v43 = v41 - 1; v44 = v42; - pRenderer->Line2D(v40 - 2, v43, v40 - 2, v42, uWd); + pRenderer->RasterLine2D(v40 - 2, v43, v40 - 2, v42, uWd); v40 += 2; v59 = uWd; v56 = v44; @@ -1851,13 +1854,13 @@ } else { - pRenderer->Line2D(v40 - 1, v41 - 1, v40 - 1, uCenterY - v76, uWd); + pRenderer->RasterLine2D(v40 - 1, v41 - 1, v40 - 1, uCenterY - v76, uWd); v59 = uWd; v56 = uCenterY - v76; v54 = v40; v52 = v41 - 1; } - pRenderer->Line2D(v40, v52, v54, v56, v59); + pRenderer->RasterLine2D(v40, v52, v54, v56, v59); } } } @@ -1867,6 +1870,8 @@ while ( uZf < (signed int)uNumActors ); } } + + flagsd = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 255); uZg = 0; if ( (signed int)uNumLevelDecorations > 0 ) @@ -1881,22 +1886,22 @@ + uCenterX; v77 = (unsigned __int64)((*((int *)v45 + 1) - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16; v47 = uCenterY - v77; - if ( v46 >= pRenderer->field_1C_clipx ) + if ( v46 >= pRenderer->raster_clip_x ) { - if ( v46 <= pRenderer->field_24_width && v47 >= pRenderer->field_20_clipy && v47 <= pRenderer->field_28_height ) + if ( v46 <= pRenderer->raster_clip_z && v47 >= pRenderer->raster_clip_y && v47 <= pRenderer->raster_clip_w ) { if ( (signed int)uZoom > 512 ) { v48 = v47 + 1; v49 = v47 - 1; - pRenderer->Line2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, flagsd); - pRenderer->Line2D(v46, v49, v46, v48, flagsd); - pRenderer->Line2D(v46 + 1, v49, v46 + 1, v48, flagsd); + pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, flagsd); + pRenderer->RasterLine2D(v46, v49, v46, v48, flagsd); + pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, flagsd); v45 = lPitchb; } else { - pRenderer->Line2D(v46, uCenterY - v77, v46, uCenterY - v77, flagsd); + pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, flagsd); } } }
--- a/mm7_2.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/mm7_2.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -10093,7 +10093,7 @@ dword_6BE364_game_settings_1 |= 0x4000; pGame->InitializeGammaController(); SecondaryInitialization(); - pRenderer->Clip_v2(0, 0, 639u, 479u); + pRenderer->SetRasterClipRect(0, 0, 639u, 479u); FinalInitialization(); Log::Warning(L"MM: entering main loop");
--- a/mm7_5.cpp Thu Mar 21 10:35:13 2013 +0200 +++ b/mm7_5.cpp Thu Mar 21 12:37:49 2013 +0200 @@ -9830,18 +9830,18 @@ v3 = pXYZW; v4 = uColor; pRenderer->BeginScene(); - pRenderer->Clip_v2(0, 0, 639u, 479u); + pRenderer->SetRasterClipRect(0, 0, 639u, 479u); if ( bSolidFill ) { for ( i = v3->y; (signed int)i <= v3->w; ++i ) - pRenderer->Line2D(v3->x, i, v3->z, i, v4); + pRenderer->RasterLine2D(v3->x, i, v3->z, i, v4); } else { - pRenderer->Line2D(v3->x, v3->y, v3->z, v3->y, v4); - pRenderer->Line2D(v3->z, v3->y, v3->z, v3->w, v4); - pRenderer->Line2D(v3->z, v3->w, v3->x, v3->w, v4); - pRenderer->Line2D(v3->x, v3->w, v3->x, v3->y, v4); + pRenderer->RasterLine2D(v3->x, v3->y, v3->z, v3->y, v4); + pRenderer->RasterLine2D(v3->z, v3->y, v3->z, v3->w, v4); + pRenderer->RasterLine2D(v3->z, v3->w, v3->x, v3->w, v4); + pRenderer->RasterLine2D(v3->x, v3->w, v3->x, v3->y, v4); } pRenderer->EndScene(); }