diff Indoor.cpp @ 428:24936a5ff8ca

level hints
author Gloval
date Sun, 24 Feb 2013 00:48:41 +0400
parents d8b3056df4e2
children 137c59c3dbc4
line wrap: on
line diff
--- a/Indoor.cpp	Sat Feb 23 23:23:57 2013 +0400
+++ b/Indoor.cpp	Sun Feb 24 00:48:41 2013 +0400
@@ -3458,32 +3458,27 @@
 }
 
 //----- (0044C23B) --------------------------------------------------------
-int BLVFaceExtra::HasEventint()
-{
-  signed int v1; // eax@1
-  EventIndex *v2; // esi@2
-  signed int result; // eax@5
-  signed int v4; // eax@6
-
-  v1 = 0;
-  if ( (signed int)(uLevelEVT_NumEvents - 1) <= 0 )
-    goto LABEL_5;
-  v2 = pLevelEVT_Index;
-  while ( v2->uEventID != this->uEventID )
+bool BLVFaceExtra::HasEventint()
+	{
+   signed int event_index; // eax@1
+  _evt_raw* start_evt;
+  _evt_raw* end_evt;
+
+  event_index = 0;
+  if ( (uLevelEVT_NumEvents - 1) <= 0 )
+    return false;
+  while ( pLevelEVT_Index[event_index].uEventID != this->uEventID )
   {
-    ++v1;
-    ++v2;
-    if ( v1 >= (signed int)(uLevelEVT_NumEvents - 1) )
-      goto LABEL_5;
+    ++event_index;
+    if ( event_index >= (signed int)(uLevelEVT_NumEvents - 1) )
+      return false;
   }
-  v4 = v1;
-  if ( pLevelEVT[pLevelEVT_Index[v4 + 1].uEventOffsetInEVT + 4] != 1
-    || pLevelEVT[pLevelEVT_Index[v4].uEventOffsetInEVT + 4] != 4 )
-LABEL_5:
-    result = 0;
+  end_evt=(_evt_raw*)&pLevelEVT[pLevelEVT_Index[event_index+1].uEventOffsetInEVT];
+  start_evt=(_evt_raw*)&pLevelEVT[pLevelEVT_Index[event_index].uEventOffsetInEVT];
+  if ( (end_evt->_e_type != EVENT_Exit) || (start_evt->_e_type!= EVENT_MouseOver) )
+    return false;
   else
-    result = 1;
-  return result;
+    return true;
 }