Mercurial > mm7
diff mm7_1.cpp @ 649:0e368c04acfb
Sleeping in a tavern
author | Nomad |
---|---|
date | Mon, 11 Mar 2013 23:43:52 +0200 |
parents | 8a0ec99a5177 |
children | 1ff57450f090 |
line wrap: on
line diff
--- a/mm7_1.cpp Mon Mar 11 23:32:27 2013 +0200 +++ b/mm7_1.cpp Mon Mar 11 23:43:52 2013 +0200 @@ -3698,7 +3698,7 @@ Player **ppPlayers; // ecx@1 Player *pPlayer; // eax@2 unsigned int v3; // eax@15 - char v4; // al@17 + //char v4; // al@17 bool v5; // eax@21 GUIButton Dst; // [sp+8h] [bp-DCh]@19 //double v7; // [sp+C4h] [bp-20h]@17 @@ -3751,18 +3751,18 @@ _507CD4_RestUI_hourglass_anim_controller = 0; } v9 = v3; - v8 = (double)v3 * 0.001953125 * 120.0; + v8 = (double)v3 / 512.0 * 120.0; //v7 = v8 + 6.7553994e15; HIDWORD(v9) = floorf(v8 + 0.5f);//LODWORD(v7); - v4 = (int)floorf(v8 + 0.5f) % 256 + 1;//LOBYTE(v7) + 1; - byte_4E2BC8 = v4; - if ( (unsigned __int8)(v4) >= 0x78u ) + hourglass_icon_idx = (int)floorf(v8 + 0.5f) % 256 + 1;//LOBYTE(v7) + 1; + //hourglass_icon_idx = v4; + if (hourglass_icon_idx >= 120 ) { - v4 = 1; - byte_4E2BC8 = 1; + //v4 = 1; + hourglass_icon_idx = 1; } - sprintf(pTmpBuf, "hglas%03d", (unsigned __int8)v4); - pTexture_RestUI_CurrentHourglassFrame = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; + sprintf(pTmpBuf, "hglas%03d", hourglass_icon_idx); + pTexture_RestUI_CurrentHourglassFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); pRenderer->DrawTextureIndexed(0x10Bu, 0x9Fu, pTexture_RestUI_CurrentHourglassFrame); memset(&Dst, 0, 0xBCu); Dst.uX = 24;