Mercurial > mm7
diff UI/Books/UIMapBook.cpp @ 1720:5f2583a4fa7d
m
author | Ritor1 |
---|---|
date | Wed, 25 Sep 2013 08:59:01 +0600 |
parents | 75fafd8ced59 |
children | e1c451f4d5ba |
line wrap: on
line diff
--- a/UI/Books/UIMapBook.cpp Tue Sep 24 09:44:03 2013 +0600 +++ b/UI/Books/UIMapBook.cpp Wed Sep 25 08:59:01 2013 +0600 @@ -193,12 +193,12 @@ GUIWindow map_window; // [sp+84h] [bp-54h]@35 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12); - if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )//Button 1 + if ( BtnUp_flag || viewparams->uMapBookMapZoom / 128 >= 12 )//Button 1 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 2, pTex_book_button1_off); else pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_book_button1_on); - if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )//Button 2 + if ( BtnDown_flag || viewparams->uMapBookMapZoom / 128 <= 3 )//Button 2 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 38, pTex_book_button2_off); else pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_book_button2_on); @@ -353,12 +353,12 @@ pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y); pCenterX = viewparams->sViewCenterX; pCenterY = viewparams->sViewCenterY; - if ( viewparams->field_2C != 384 ) + if ( viewparams->uMapBookMapZoom != 384 ) { - if ( viewparams->field_2C == 768 ) + if ( viewparams->uMapBookMapZoom == 768 ) { if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) - viewparams->field_2C = 680; + viewparams->uMapBookMapZoom = 680; } } else @@ -367,7 +367,7 @@ pCenterX = viewparams->indoor_center_x; pCenterY = viewparams->indoor_center_y; if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) - viewparams->field_2C = viewparams->field_2C - 34; + viewparams->uMapBookMapZoom = viewparams->uMapBookMapZoom - 34; } if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) { @@ -376,18 +376,18 @@ render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * pRenderer->uTargetSurfacePitch]; texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask; pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16; - scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / viewparams->field_2C; + scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / viewparams->uMapBookMapZoom; v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2)); - teal = (unsigned int)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->field_2C / 384) + 32768) / v30) << 16; + teal = (unsigned int)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->uMapBookMapZoom / 384) + 32768) / v30) << 16; // v97 = (const void *)((unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16); // v32 = map_texture_16; textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth; - stepY_r = (int)(signed __int64)((double)(- pCenterY - 22528 / (viewparams->field_2C / 384)+ 32768) / v30) << 16; + stepY_r = (int)(signed __int64)((double)(- pCenterY - 22528 / (viewparams->uMapBookMapZoom / 384)+ 32768) / v30) << 16; // v81 = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30); - black = (signed __int16)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->field_2C / 384) + 32768) / v30); + black = (signed __int16)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->uMapBookMapZoom / 384) + 32768) / v30); // v76 = textr_width; scaled_posY = stepY_r >> 16; @@ -446,12 +446,12 @@ v20 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].y - pCenterY; v95 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX; v97 = (const void *)v20; - v88 = (unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16; - v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)viewparams->field_2C) >> 16; - v93 = (unsigned __int16 *)((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16); - screenHeight = (unsigned __int64)(v20 * (signed __int64)viewparams->field_2C) >> 16; + v88 = (unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16; + v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)viewparams->uMapBookMapZoom) >> 16; + v93 = (unsigned __int16 *)((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16); + screenHeight = (unsigned __int64)(v20 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; pRenderer->RasterLine2D(screenCenter_X + v88, screenCenterY - v87, - screenCenter_X + ((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16), screenCenterY - screenHeight, black); + screenCenter_X + ((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16), screenCenterY - screenHeight, black); } } } @@ -462,7 +462,7 @@ while ( 1 ) { v22 = pBlueFacesInBLVMinimapIDs[v21]; - v87 = viewparams->field_2C; + v87 = viewparams->uMapBookMapZoom; v23 = &pIndoor->pMapOutlines->pOutlines[v22]; v24 = &pIndoor->pVertices[v23->uVertex1ID]; v25 = &pIndoor->pVertices[v23->uVertex2ID]; @@ -473,12 +473,12 @@ v93 = v27; screenHeight = v28; v97 = (const void *)v29; - v87 = (unsigned __int64)((signed int)v27 * (signed __int64)viewparams->field_2C) >> 16; - v88 = (unsigned __int64)(v28 * (signed __int64)viewparams->field_2C) >> 16; - uint i = (unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->field_2C) >> 16; - v95 = (unsigned __int64)(v29 * (signed __int64)viewparams->field_2C) >> 16; - pRenderer->RasterLine2D(screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)viewparams->field_2C) >> 16), - screenCenterY - v88, screenCenter_X + ((unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->field_2C) >> 16), screenCenterY - v95, teal); + v87 = (unsigned __int64)((signed int)v27 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; + v88 = (unsigned __int64)(v28 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; + uint i = (unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16; + v95 = (unsigned __int64)(v29 * (signed __int64)viewparams->uMapBookMapZoom) >> 16; + pRenderer->RasterLine2D(screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)viewparams->uMapBookMapZoom) >> 16), + screenCenterY - v88, screenCenter_X + ((unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16), screenCenterY - v95, teal); ++v21; if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap ) break; @@ -486,23 +486,23 @@ viewparams->sViewCenterX = pCenterX; } } - v47 = ((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X - 3; + v47 = ((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X - 3; v81 = pParty->vPosition.y - pCenterY; - v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - pCenterY) * (signed __int64)viewparams->field_2C) >> 16); + v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - pCenterY) * (signed __int64)viewparams->uMapBookMapZoom) >> 16); v48 = 1; v49 = screenCenterY - (int)v97 - 3; if ( v47 >= (signed int)tl_x ) { if ( v47 > (signed int)br_x ) { - if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X - 6) > (signed int)br_x ) + if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X - 6) > (signed int)br_x ) v48 = 0; v47 = br_x; } } else { - if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X) < (signed int)tl_x ) + if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X) < (signed int)tl_x ) v48 = 0; v47 = tl_x; } @@ -552,14 +552,14 @@ { screenHeight = pLevelDecorations[i].vPosition.y - pCenterY; v93 = (unsigned __int16 *)(pLevelDecorations[i].vPosition.x - viewparams->sViewCenterX); - v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X; - v97 = (const void *)((unsigned __int64)(screenHeight * (signed __int64)viewparams->field_2C) >> 16); + v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X; + v97 = (const void *)((unsigned __int64)(screenHeight * (signed __int64)viewparams->uMapBookMapZoom) >> 16); v55 = screenCenterY - (int)v97; if ( v54 >= pRenderer->raster_clip_x ) { if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w ) { - if ( viewparams->field_2C > 512 ) + if ( viewparams->uMapBookMapZoom > 512 ) { pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, pCenterX); pRenderer->RasterLine2D(v54, v55 - 1, v54, v55 + 1, pCenterX); @@ -571,7 +571,7 @@ else { v72 = screenCenterY - (int)v97; - v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X; + v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->uMapBookMapZoom) >> 16) + screenCenter_X; v70 = screenCenterY - (int)v97; } pRenderer->RasterLine2D(v54, v70, v71, v72, pCenterX); @@ -586,9 +586,9 @@ v95 = br_y - tl_y + 1; v77 = &pRenderer->pTargetSurface[tl_x + tl_y * pRenderer->uTargetSurfacePitch]; v56 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2; - black = (1 << (v56 + 16)) / viewparams->field_2C; + black = (1 << (v56 + 16)) / viewparams->uMapBookMapZoom; v57 = (double)(1 << (16 - v56)); - v58 = 22528 / (viewparams->field_2C / 384); + v58 = 22528 / (viewparams->uMapBookMapZoom / 384); v59 = (signed __int64)((double)(viewparams->sViewCenterX - v58 + 32768) / v57); v60 = (int)v59 << 16; v97 = (const void *)((int)v59 << 16);