diff Events.cpp @ 538:1d876589a030

Слияние
author Ritor1
date Sat, 02 Mar 2013 09:01:48 +0600
parents f0eff7c35a2b 35f28d4c0ff9
children d6711da258f1
line wrap: on
line diff
--- a/Events.cpp	Sat Mar 02 08:59:10 2013 +0600
+++ b/Events.cpp	Sat Mar 02 09:01:48 2013 +0600
@@ -298,7 +298,7 @@
 		}
 	player_choose = (uActiveCharacter == 0)?6:4;  //4 - active or  6 - random player if active =0
 	curr_seq_num = start_event_seq_number;
-	if ( GlobalEventInfo )
+	if ( activeLevelDecoration )
 		{
 		uSomeEVT_NumEvents = uGlobalEVT_NumEvents;
 		pSomeEVT = pGlobalEVT;
@@ -524,15 +524,15 @@
 				//v7 = "";
 				break;
 			case EVENT_ChangeEvent:
-				v25 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8);
+				v25 = EVT_DWORD(_evt->v5);
 				if ( v25 )
 					{
-					stru_5E4C90._decor_events[GlobalEventInfo + 28] = _evt->v5 - 124;
+					stru_5E4C90._decor_events[activeLevelDecoration->_idx_in_stru123] = _evt->v5 - 124;
 					}
 				else
 					{
-					v26 = (LevelDecoration *)GlobalEventInfo;
-					stru_5E4C90._decor_events[GlobalEventInfo + 28] = 0;
+					v26 = (LevelDecoration *)activeLevelDecoration;
+					stru_5E4C90._decor_events[activeLevelDecoration ->_idx_in_stru123] = 0;
 					LOBYTE(v26->field_2) |= 0x20u;
 					}
 				++curr_seq_num;
@@ -722,7 +722,7 @@
 						pVideoPlayer->Unload();
 						window_SpeakInHouse->Release();
 						pParty->uFlags &= 0xFFFFFFFDu;
-						GlobalEventInfo = 1;
+						activeLevelDecoration = (LevelDecoration*)1;
 						if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) )
 							{
 							pAudioPlayer->PlaySound((SoundID)0, 0, 0, -1, 0, 0, 0, 0);
@@ -1241,9 +1241,9 @@
 				break;
 			case EVENT_StatusText:
 				v90 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8);
-				if ( GlobalEventInfo )
+				if ( activeLevelDecoration )
 					{
-					if ( GlobalEventInfo == 1 )
+					if ( activeLevelDecoration == (void*)1 )
 						{
 						ptr_F8B1E8 = pNPCTopics[v90-1].pText;//(&dword_721664)[8 * v90];
 						++curr_seq_num;
@@ -1288,7 +1288,7 @@
 				break;
 			case EVENT_ShowMessage:
 				v92 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8);
-				if ( GlobalEventInfo )
+				if ( activeLevelDecoration )
 					{
 					v93 = (char *)pNPCTopics[v92-1].pText;//(&dword_721664)[8 * v92];
 					byte_5B0938[0] = 0;
@@ -1441,7 +1441,7 @@
 					}
 				else
 					{
-					pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((GlobalEventInfo == 0) + 1);
+					pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((activeLevelDecoration == NULL) + 1);
 					sub_44987B(v99, 0);
 					v133 = 1;
 					if ( pCurrentScreen == SCREEN_HOUSE )