comparison Game.cpp @ 142:8b8fd4d83fdc

Various things here and there
author Nomad
date Tue, 12 Feb 2013 06:28:08 +0200
parents a2ddaf0e4d8a
children d92c78ab54fe
comparison
equal deleted inserted replaced
141:cca78efb377e 142:8b8fd4d83fdc
48 } 48 }
49 49
50 //----- (0044103C) -------------------------------------------------------- 50 //----- (0044103C) --------------------------------------------------------
51 void Game::Draw() 51 void Game::Draw()
52 { 52 {
53 float v2; // ST24_4@11 53 //float v2; // ST24_4@11
54 //double v3; // ST28_8@11 54 //double v3; // ST28_8@11
55 int v4; // edi@26 55 int v4; // edi@26
56 int v5; // eax@35 56 //int v5; // eax@35
57 57
58 uFlags2 &= 0xFFFFFFFDu; 58 uFlags2 &= 0xFFFFFFFDu;
59 if ( pParty->_497FC5_check_party_perception_against_level() ) 59 if ( pParty->_497FC5_check_party_perception_against_level() )
60 uFlags2 |= 2u; 60 uFlags2 |= 2u;
61 pIndoorCamera->sRotationX = pParty->sRotationX; 61 pIndoorCamera->sRotationX = pParty->sRotationX;
94 pMouse->DrawCursorToTarget(); 94 pMouse->DrawCursorToTarget();
95 if ( !sub_4226C2() || viewparams->field_48 == 1 ) 95 if ( !sub_4226C2() || viewparams->field_48 == 1 )
96 { 96 {
97 if ( pRenderer->pRenderD3D ) 97 if ( pRenderer->pRenderD3D )
98 { 98 {
99 v2 = (double)(((signed int)pMiscTimer->uTotalGameTimeElapsed >> 2) & 0x1F) * 0.032258064 * 6.0; 99 float v2 = (double)(((signed int)pMiscTimer->uTotalGameTimeElapsed >> 2) & 0x1F) * 0.032258064 * 6.0;
100 //v3 = v2 + 6.7553994e15; 100 //v3 = v2 + 6.7553994e15;
101 //pRenderer->field_1036A8_bitmapid = LODWORD(v3); 101 //pRenderer->field_1036A8_bitmapid = LODWORD(v3);
102 pRenderer->field_1036A8_bitmapid = floorf(v2 + 0.5f); 102 pRenderer->field_1036A8_bitmapid = floorf(v2 + 0.5f);
103 } 103 }
104 104
119 pRenderer->DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene(); 119 pRenderer->DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene();
120 LABEL_22: 120 LABEL_22:
121 pRenderer->BeginScene(); 121 pRenderer->BeginScene();
122 if (pRenderer->pRenderD3D) 122 if (pRenderer->pRenderD3D)
123 pMouse->DrawCursorToTarget(); 123 pMouse->DrawCursorToTarget();
124 if (pOtherOverlayList->field_3EC) 124 if (pOtherOverlayList->bRedraw)
125 viewparams->bRedrawGameUI = 1; 125 viewparams->bRedrawGameUI = true;
126 v4 = viewparams->bRedrawGameUI; 126 v4 = viewparams->bRedrawGameUI;
127 GameUI_DrawStatusBar(); 127 GameUI_DrawStatusBar();
128 if (!viewparams->bRedrawGameUI) 128 if (!viewparams->bRedrawGameUI)
129 { 129 {
130 GameUI_DrawRightPanelItems(); 130 GameUI_DrawRightPanelItems();
138 if (!pVideoPlayer->pSmackerMovie) 138 if (!pVideoPlayer->pSmackerMovie)
139 { 139 {
140 GameUI_DrawMinimap(488, 16, 625, 133, viewparams->uMinimapZoom, pParty->uFlags & 2); 140 GameUI_DrawMinimap(488, 16, 625, 133, viewparams->uMinimapZoom, pParty->uFlags & 2);
141 if (v4) 141 if (v4)
142 { 142 {
143 if ( !sub_4226C2() && pRenderer->pRenderD3D) 143 if ( !sub_4226C2() && pRenderer->pRenderD3D) // clear game viewport with transparent color
144 pRenderer->FillRectFast(pViewport->uViewportX, pViewport->uViewportY, pViewport->uViewportZ - pViewport->uViewportX, 144 pRenderer->FillRectFast(pViewport->uViewportX, pViewport->uViewportY, pViewport->uViewportZ - pViewport->uViewportX,
145 pViewport->uViewportW - pViewport->uViewportY + 1, pRenderer->uTargetGMask | pRenderer->uTargetBMask);//0x0000FFFF/*pRenderer->uTargetGMask | pRenderer->uTargetBMask*/ - white window 145 pViewport->uViewportW - pViewport->uViewportY + 1,
146 pRenderer->uTargetGMask | pRenderer->uTargetBMask);
146 viewparams->field_48 = 0; 147 viewparams->field_48 = 0;
147 } 148 }
148 } 149 }
149 v5 = pOtherOverlayList->field_3EC; 150
150 pOtherOverlayList->field_3EC = 0; 151 viewparams->bRedrawGameUI = pOtherOverlayList->bRedraw;
151 viewparams->bRedrawGameUI = v5; 152 pOtherOverlayList->bRedraw = 0;
153
152 GameUI_DrawPartySpells(); 154 GameUI_DrawPartySpells();
153 if (v4 || pParty->pHirelings[0]._anim_end_time || pParty->pHirelings[1]._anim_end_time ) 155 if (v4 || pParty->pHirelings[0]._anim_end_time || pParty->pHirelings[1]._anim_end_time )
154 DrawHiredNPCs(); 156 DrawHiredNPCs();
155 GameUI_DrawPortraits(v4); 157 GameUI_DrawPortraits(v4);
156 GameUI_DrawLifeManaBars(); 158 GameUI_DrawLifeManaBars();