comparison Events.cpp @ 520:35f28d4c0ff9

GlobalEventInfo changed to LevelDecoration* activeLevelDecoration
author Gloval
date Fri, 01 Mar 2013 23:43:21 +0400
parents 968f4053da7f
children e7b3fa10d58d 1d876589a030
comparison
equal deleted inserted replaced
519:8f70e52646eb 520:35f28d4c0ff9
296 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here 296 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here
297 return; 297 return;
298 } 298 }
299 player_choose = (uActiveCharacter == 0)?6:4; //4 - active or 6 - random player if active =0 299 player_choose = (uActiveCharacter == 0)?6:4; //4 - active or 6 - random player if active =0
300 curr_seq_num = start_event_seq_number; 300 curr_seq_num = start_event_seq_number;
301 if ( GlobalEventInfo ) 301 if ( activeLevelDecoration )
302 { 302 {
303 uSomeEVT_NumEvents = uGlobalEVT_NumEvents; 303 uSomeEVT_NumEvents = uGlobalEVT_NumEvents;
304 pSomeEVT = pGlobalEVT; 304 pSomeEVT = pGlobalEVT;
305 memcpy(pSomeEVT_Events, pGlobalEVT_Index, sizeof(EventIndex)*4400); //4400 evts 305 memcpy(pSomeEVT_Events, pGlobalEVT_Index, sizeof(EventIndex)*4400); //4400 evts
306 } 306 }
522 522
523 //v6 = v123; 523 //v6 = v123;
524 //v7 = ""; 524 //v7 = "";
525 break; 525 break;
526 case EVENT_ChangeEvent: 526 case EVENT_ChangeEvent:
527 v25 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8); 527 v25 = EVT_DWORD(_evt->v5);
528 if ( v25 ) 528 if ( v25 )
529 { 529 {
530 stru_5E4C90._decor_events[GlobalEventInfo + 28] = _evt->v5 - 124; 530 stru_5E4C90._decor_events[activeLevelDecoration->_idx_in_stru123] = _evt->v5 - 124;
531 } 531 }
532 else 532 else
533 { 533 {
534 v26 = (LevelDecoration *)GlobalEventInfo; 534 v26 = (LevelDecoration *)activeLevelDecoration;
535 stru_5E4C90._decor_events[GlobalEventInfo + 28] = 0; 535 stru_5E4C90._decor_events[activeLevelDecoration ->_idx_in_stru123] = 0;
536 LOBYTE(v26->field_2) |= 0x20u; 536 LOBYTE(v26->field_2) |= 0x20u;
537 } 537 }
538 ++curr_seq_num; 538 ++curr_seq_num;
539 v4 = v124; 539 v4 = v124;
540 540
720 { 720 {
721 sub_4BD8B5(); 721 sub_4BD8B5();
722 pVideoPlayer->Unload(); 722 pVideoPlayer->Unload();
723 window_SpeakInHouse->Release(); 723 window_SpeakInHouse->Release();
724 pParty->uFlags &= 0xFFFFFFFDu; 724 pParty->uFlags &= 0xFFFFFFFDu;
725 GlobalEventInfo = 1; 725 activeLevelDecoration = (LevelDecoration*)1;
726 if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) ) 726 if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) )
727 { 727 {
728 pAudioPlayer->PlaySound((SoundID)0, 0, 0, -1, 0, 0, 0, 0); 728 pAudioPlayer->PlaySound((SoundID)0, 0, 0, -1, 0, 0, 0, 0);
729 v47 = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, 165, 0); 729 v47 = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, 165, 0);
730 window_SpeakInHouse = v47; 730 window_SpeakInHouse = v47;
1251 //v6 = v123; 1251 //v6 = v123;
1252 //v7 = ""; 1252 //v7 = "";
1253 break; 1253 break;
1254 case EVENT_StatusText: 1254 case EVENT_StatusText:
1255 v90 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); 1255 v90 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8);
1256 if ( GlobalEventInfo ) 1256 if ( activeLevelDecoration )
1257 { 1257 {
1258 if ( GlobalEventInfo == 1 ) 1258 if ( activeLevelDecoration == (void*)1 )
1259 { 1259 {
1260 ptr_F8B1E8 = pNPCTopics[v90-1].pText;//(&dword_721664)[8 * v90]; 1260 ptr_F8B1E8 = pNPCTopics[v90-1].pText;//(&dword_721664)[8 * v90];
1261 ++curr_seq_num; 1261 ++curr_seq_num;
1262 v4 = v124; 1262 v4 = v124;
1263 1263
1298 //v6 = v123; 1298 //v6 = v123;
1299 //v7 = ""; 1299 //v7 = "";
1300 break; 1300 break;
1301 case EVENT_ShowMessage: 1301 case EVENT_ShowMessage:
1302 v92 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); 1302 v92 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8);
1303 if ( GlobalEventInfo ) 1303 if ( activeLevelDecoration )
1304 { 1304 {
1305 v93 = (char *)pNPCTopics[v92-1].pText;//(&dword_721664)[8 * v92]; 1305 v93 = (char *)pNPCTopics[v92-1].pText;//(&dword_721664)[8 * v92];
1306 byte_5B0938[0] = 0; 1306 byte_5B0938[0] = 0;
1307 ptr_F8B1E8 = v93; 1307 ptr_F8B1E8 = v93;
1308 } 1308 }
1451 pAudioPlayer->PlaySound((SoundID)v106, v107, v108, v109, v110, v111, v116, v120); 1451 pAudioPlayer->PlaySound((SoundID)v106, v107, v108, v109, v110, v111, v116, v120);
1452 } 1452 }
1453 } 1453 }
1454 else 1454 else
1455 { 1455 {
1456 pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((GlobalEventInfo == 0) + 1); 1456 pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((activeLevelDecoration == NULL) + 1);
1457 sub_44987B(v99, 0); 1457 sub_44987B(v99, 0);
1458 v133 = 1; 1458 v133 = 1;
1459 if ( pCurrentScreen == SCREEN_HOUSE ) 1459 if ( pCurrentScreen == SCREEN_HOUSE )
1460 { 1460 {
1461 if ( uGameState == 2 ) 1461 if ( uGameState == 2 )