Mercurial > mm7
diff UIHouses.cpp @ 948:5a2dbb00c399
Code cleaning.
author | Nomad |
---|---|
date | Wed, 01 May 2013 17:31:10 +0200 |
parents | 34ed2d5e7cfb |
children | c0d0656aa662 |
line wrap: on
line diff
--- a/UIHouses.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIHouses.cpp Wed May 01 17:31:10 2013 +0200 @@ -2109,8 +2109,8 @@ v9 = pFontCreate->CalcTextHeight(current_npc_text, &w, 13, 0) + 7; } - auto pTex = (uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0); - pRenderer->_4A6A68(8u, 352 - v9, pTex, (pTex ? pTex->uTextureHeight : 26) - v9); + auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather); + pRenderer->_4A6A68(8u, 352 - v9, pTex, pTex->uTextureHeight - v9); pRenderer->DrawTextureIndexed(8u, 347 - v9, pTexture_591428); v10 = FitTextInAWindow(current_npc_text, pOutString, &w, 0xDu, 0); a1.DrawText(pOutString, 13, 354 - v9, 0, v10, 0, 0, 0); @@ -2550,8 +2550,8 @@ pOutString = pFontCreate; pTextHeight = pFontCreate->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0) + 7; } - auto pTex = (uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0); - pRenderer->_4A6A68(8, 352 - pTextHeight, pTex, (pTex ? pTex->uTextureHeight : 26) - pTextHeight); + auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather); + pRenderer->_4A6A68(8, 352 - pTextHeight, pTex, pTex->uTextureHeight - pTextHeight); pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); v63 = FitTextInAWindow(pTmpBuf, pOutString, &dialog_window, 0xCu, 0); window_SpeakInHouse->DrawText(pOutString, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); @@ -2564,8 +2564,8 @@ dialog_window.uFrameZ = 452; v61 = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0); pTextHeight = v61 + 7; - auto pTex = (uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : nullptr); - pRenderer->_4A6A68(8, 352 - (v61 + 7), pTex, (pTex ? pTex->uTextureHeight : 26) - (v61 + 7)); + auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather); + pRenderer->_4A6A68(8, 352 - (v61 + 7), pTex, pTex->uTextureHeight - (v61 + 7)); pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); v63 = FitTextInAWindow(pTmpBuf, pFontArrus, &dialog_window, 0xCu, 0); window_SpeakInHouse->DrawText(pFontArrus, 12, 354 - pTextHeight, 0, v63, 0, 0, 0);