comparison Game.cpp @ 1542:7d986a396092

Merge
author Nomad
date Sat, 07 Sep 2013 13:03:18 +0200
parents a109bb203e28
children c4ab816fcc5e
comparison
equal deleted inserted replaced
1541:86cb7398d2a8 1542:7d986a396092
210 render_framerate = true; 210 render_framerate = true;
211 } 211 }
212 212
213 ++frames_this_second; 213 ++frames_this_second;
214 214
215 215 extern bool debug_information;
216 if (render_framerate) 216 if ( debug_information )
217 { 217 {
218 sprintf(pTmpBuf.data(), "FPS: % .4f", framerate); 218 if (render_framerate)
219 pPrimaryWindow->DrawText(pFontArrus, 494, 0, TargetColor(0, 0, 0), pTmpBuf.data(), 0, 0, 0); 219 {
220 } 220 sprintf(pTmpBuf.data(), "FPS: % .4f", framerate);
221 221 pPrimaryWindow->DrawText(pFontArrus, 494, 0, TargetColor(0, 0, 0), pTmpBuf.data(), 0, 0, 0);
222 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) 222 }
223 { 223
224 auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); 224 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
225 sprintf(pTmpBuf.data(), "Party Sector ID: %u/%u\n", sector_id, pIndoor->uNumSectors); 225 {
226 pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); 226 auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
227 } 227 sprintf(pTmpBuf.data(), "Party Sector ID: %u/%u\n", sector_id, pIndoor->uNumSectors);
228 sprintf(pTmpBuf.data(), "Party Position: % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); 228 pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
229 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); 229 }
230 sprintf(pTmpBuf.data(), "Party Position: % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
231 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
230 232
231 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) 233 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
232 { 234 {
233 uint uFaceID; 235 uint uFaceID;
234 auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z); 236 auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
235 auto floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + 40, sector_id, &uFaceID); 237 auto floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + 40, sector_id, &uFaceID);
236 sprintf(pTmpBuf.data(), "BLV_GetFloorLevel: %d face_id %d\n", floor_level, uFaceID); 238 sprintf(pTmpBuf.data(), "BLV_GetFloorLevel: %d face_id %d\n", floor_level, uFaceID);
237 } 239 }
238 else 240 else
239 { 241 {
240 int on_water, _a6; 242 int on_water, _a6;
241 auto floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false); 243 auto floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false);
242 sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6); 244 sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d on_water: %s a6 = %d\n", floor_level, on_water ? "true" : "false", _a6);
243 } 245 }
244 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF); 246 pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
247 }
245 248
246 GUI_UpdateWindows(); 249 GUI_UpdateWindows();
247 pParty->UpdatePlayersAndHirelingsEmotions(); 250 pParty->UpdatePlayersAndHirelingsEmotions();
248 251
249 _unused_5B5924_is_travel_ui_drawn = false; 252 _unused_5B5924_is_travel_ui_drawn = false;