comparison Game.cpp @ 981:a6ef7125f6e4

Autonotes & GameState
author Nomad
date Sat, 11 May 2013 01:28:06 +0200
parents 9334a8c59c8d
children 08fd1436ef35
comparison
equal deleted inserted replaced
980:a079c489118d 981:a6ef7125f6e4
254 //Render *v2; // edi@7 254 //Render *v2; // edi@7
255 //signed int v3; // esi@7 255 //signed int v3; // esi@7
256 signed int pNewNPCsCount; // ecx@58 256 signed int pNewNPCsCount; // ecx@58
257 char *pFlags; // eax@59 257 char *pFlags; // eax@59
258 Player *pPlayer; // esi@65 258 Player *pPlayer; // esi@65
259 OtherOverlay *pOtherOverlay; // esi@67 259 //OtherOverlay *pOtherOverlay; // esi@67
260 signed int v8; // edi@67 260 //signed int v8; // edi@67
261 int pPlayerNum; // edi@69 261 int pPlayerNum; // edi@69
262 int *pHealth; // esi@71 262 int *pHealth; // esi@71
263 signed int v11; // esi@78 263 signed int v11; // esi@78
264 int v12; // eax@83 264 int v12; // eax@83
265 const char *pLocationName; // [sp-4h] [bp-68h]@74 265 const char *pLocationName; // [sp-4h] [bp-68h]@74
371 GameUI_StatusBar_UpdateTimedString(0); 371 GameUI_StatusBar_UpdateTimedString(0);
372 if ( pMiscTimer->bPaused && !pEventTimer->bPaused ) 372 if ( pMiscTimer->bPaused && !pEventTimer->bPaused )
373 pMiscTimer->Resume(); 373 pMiscTimer->Resume();
374 if ( pEventTimer->bTackGameTime && !pParty->bTurnBasedModeOn ) 374 if ( pEventTimer->bTackGameTime && !pParty->bTurnBasedModeOn )
375 pEventTimer->bTackGameTime = 0; 375 pEventTimer->bTackGameTime = 0;
376 if ( !pEventTimer->bPaused && !uGameState ) 376 if ( !pEventTimer->bPaused && uGameState == GAME_STATE_0)
377 { 377 {
378 if ( !pEventTimer->bTackGameTime ) 378 if ( !pEventTimer->bTackGameTime )
379 _494035_timed_effects__water_walking_damage__etc(); 379 _494035_timed_effects__water_walking_damage__etc();
380 if ( dword_6BE364_game_settings_1 & 1 ) 380 if ( dword_6BE364_game_settings_1 & 1 )
381 { 381 {
416 { 416 {
417 //LABEL_96: 417 //LABEL_96:
418 bLoadinga = 1; 418 bLoadinga = 1;
419 continue; 419 continue;
420 } 420 }
421 if ( uGameState != GAME_STATE_8 ) 421 if ( uGameState != GAME_STATE_PARTY_DIED )
422 { 422 {
423 if ( uGameState != GAME_STATE_FINAL_WINDOW ) 423 if ( uGameState != GAME_STATE_FINAL_WINDOW )
424 { 424 {
425 //LABEL_85: 425 //LABEL_85:
426 pGame->Draw(); 426 pGame->Draw();
427 continue;
428 } 427 }
429 pRenderer->BeginScene(); 428 else
430 GUI_UpdateWindows(); 429 {
431 pRenderer->EndScene(); 430 pRenderer->BeginScene();
432 //goto LABEL_89; 431 GUI_UpdateWindows();
433 pRenderer->Present(); 432 pRenderer->EndScene();
433 //goto LABEL_89;
434 pRenderer->Present();
435 }
434 continue; 436 continue;
435 } 437 }
436 pAudioPlayer->StopChannels(-1, -1);//далее в случае смерти группы 438 pAudioPlayer->StopChannels(-1, -1);//далее в случае смерти группы
437 memset(&pParty->pHirelings[0], 0, 0x4Cu); 439 memset(&pParty->pHirelings[0], 0, 0x4Cu);
438 memset(&pParty->pHirelings[1], 0, 0x4Cu); 440 memset(&pParty->pHirelings[1], 0, 0x4Cu);
463 while ( (signed int)pPlayer < (signed int)pParty->pHirelings ); 465 while ( (signed int)pPlayer < (signed int)pParty->pHirelings );
464 pParty->days_played_without_rest = 0; 466 pParty->days_played_without_rest = 0;
465 pParty->uTimePlayed += 0x276000ui64; 467 pParty->uTimePlayed += 0x276000ui64;
466 LOWORD(pParty->uFlags) &= ~0x204; 468 LOWORD(pParty->uFlags) &= ~0x204;
467 pParty->SetGold(0); 469 pParty->SetGold(0);
468 pOtherOverlay = pOtherOverlayList->pOverlays; 470
469 v8 = 50; 471 pOtherOverlayList->Reset();
470 do 472
471 {
472 pOtherOverlay->Reset();
473 ++pOtherOverlay;
474 --v8;
475 }
476 while ( v8 );
477 memset(pParty->pPartyBuffs, 0, 0x140u); 473 memset(pParty->pPartyBuffs, 0, 0x140u);
478 pPlayerNum = 1; 474 pPlayerNum = 1;
479 if ( pParty->bTurnBasedModeOn == 1 ) 475 if ( pParty->bTurnBasedModeOn == 1 )
480 { 476 {
481 pTurnEngine->End(1); 477 pTurnEngine->End(1);
491 pParty->pPlayers[i].sHealth=1; 487 pParty->pPlayers[i].sHealth=1;
492 //pHealth += 1743; //6CF 488 //pHealth += 1743; //6CF
493 uActiveCharacter = 1; 489 uActiveCharacter = 1;
494 } 490 }
495 // while ( (signed int)pHealth < (signed int)&pParty->field_871C[567] ); 491 // while ( (signed int)pHealth < (signed int)&pParty->field_871C[567] );
496 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 136) ) 492 if (_449B57_test_bit(pParty->_quest_bits, PARTY_QUEST_FINISHED_EMERALD_ISLE))
497 { 493 {
498 pParty->vPosition.x = -17331; // respawn in harmondale 494 pParty->vPosition.x = -17331; // respawn in harmondale
499 pParty->vPosition.y = 12547; 495 pParty->vPosition.y = 12547;
500 pParty->vPosition.z = 465; 496 pParty->vPosition.z = 465;
501 pParty->sRotationY = 0; 497 pParty->sRotationY = 0;