comparison Game.cpp @ 791:346f7069676a

Indoor::GetSector and various stuff
author Nomad
date Mon, 25 Mar 2013 05:27:18 +0200
parents b27dd658ea77
children 4a00901e063c d2deab4991fa
comparison
equal deleted inserted replaced
790:1e2be0f5eb30 791:346f7069676a
20 #include "Bink_Smacker.h" 20 #include "Bink_Smacker.h"
21 #include "Events.h" 21 #include "Events.h"
22 #include "Arcomage.h" 22 #include "Arcomage.h"
23 #include "texts.h" 23 #include "texts.h"
24 #include "Actor.h" 24 #include "Actor.h"
25 #include "GUIFont.h"
25 #include "Log.h" 26 #include "Log.h"
26 27
27 //#include "MM7.h" 28 //#include "MM7.h"
28 29
29 30
117 } 118 }
118 } 119 }
119 } 120 }
120 pRenderer->DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene(); 121 pRenderer->DrawBillboards_And_MaybeRenderSpecialEffects_And_EndScene();
121 LABEL_22: 122 LABEL_22:
123
124 //DEBUG: force redraw gui
125 viewparams->bRedrawGameUI = true;
126
127
122 pRenderer->BeginScene(); 128 pRenderer->BeginScene();
123 if (pRenderer->pRenderD3D) 129 if (pRenderer->pRenderD3D)
124 pMouse->DrawCursorToTarget(); 130 pMouse->DrawCursorToTarget();
125 if (pOtherOverlayList->bRedraw) 131 if (pOtherOverlayList->bRedraw)
126 viewparams->bRedrawGameUI = true; 132 viewparams->bRedrawGameUI = true;
164 { 170 {
165 pStru6Instance->DrawPlayerBuffAnims(); 171 pStru6Instance->DrawPlayerBuffAnims();
166 pOtherOverlayList->DrawTurnBasedIcon(v4); 172 pOtherOverlayList->DrawTurnBasedIcon(v4);
167 GameUI_DrawTorchlightAndWizardEye(); 173 GameUI_DrawTorchlightAndWizardEye();
168 } 174 }
175
176 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
177 {
178 sprintf(pTmpBuf, "Party Sector ID: %u/%u\n", pBLVRenderParams->uPartySectorID, pIndoor->uNumSectors);
179 pPrimaryWindow->DrawText(pFontArrus, 16, 16, GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 255), pTmpBuf, 0, 0, 0xFFFFFFFF);
180 }
181 sprintf(pTmpBuf, "Party Position: % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
182 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 255), pTmpBuf, 0, 0, 0xFFFFFFFF);
183
184 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
185 {
186 uint uFaceID;
187 auto floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, pBLVRenderParams->uPartySectorID, &uFaceID);
188 sprintf(pTmpBuf, "BLV_GetFloorLevel: %d face_id %d\n", floor_level, uFaceID);
189 }
190 else
191 {
192 int on_water, _a6;
193 auto floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false);
194 sprintf(pTmpBuf, "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6);
195 }
196 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(255, 255, 255), pTmpBuf, 0, 0, 0xFFFFFFFF);
197
169 GUI_UpdateWindows(); 198 GUI_UpdateWindows();
170 pParty->UpdatePlayersAndHirelingsEmotions(); 199 pParty->UpdatePlayersAndHirelingsEmotions();
171 ++stru_51076C.field_8; 200 ++stru_51076C.field_8;
172 _unused_5B5924_is_travel_ui_drawn = false; 201 _unused_5B5924_is_travel_ui_drawn = false;
173 if (v4) 202 if (v4)
174 pMouse->field_14 = 1; 203 pMouse->bRedraw = true;
175 pMouse->_469EA4(); 204 pMouse->_469EA4();
176 pMouse->DrawCursor(); 205 pMouse->DrawCursor();
177 pMouse->_469E1C(); 206 pMouse->_469E1C();
178 pRenderer->EndScene(); 207 pRenderer->EndScene();
179 pRenderer->Present(); 208 pRenderer->Present();