Mercurial > mm7
comparison mm7_4.cpp @ 428:24936a5ff8ca
level hints
author | Gloval |
---|---|
date | Sun, 24 Feb 2013 00:48:41 +0400 |
parents | b663aca70246 |
children | 8c45cac1c5e1 |
comparison
equal
deleted
inserted
replaced
425:b663aca70246 | 428:24936a5ff8ca |
---|---|
14567 | 14567 |
14568 | 14568 |
14569 | 14569 |
14570 | 14570 |
14571 //----- (00444732) -------------------------------------------------------- | 14571 //----- (00444732) -------------------------------------------------------- |
14572 char *_444732_GetEventHintString(unsigned int uEventID) | 14572 char *GetEventHintString(unsigned int uEventID) |
14573 { | 14573 { |
14574 signed int v1; // edx@1 | 14574 signed int event_index; // edx@1 |
14575 char *v2; // eax@2 | 14575 int event_pos; // esi@4 |
14576 int v3; // ebx@4 | |
14577 int v4; // esi@4 | |
14578 char *result; // eax@6 | 14576 char *result; // eax@6 |
14579 int v6; // eax@9 | 14577 unsigned int str_index; // eax@9 |
14580 char *i; // esi@11 | 14578 int i; // esi@11 |
14581 int v8; // edx@12 | 14579 _evt_raw* test_evt; |
14582 | 14580 _evt_raw* last_evt; |
14583 v1 = 0; | 14581 |
14584 if ( (signed int)uLevelEVT_NumEvents <= 0 ) | 14582 event_index = 0; |
14585 { | 14583 if ( uLevelEVT_NumEvents <= 0 ) |
14586 LABEL_6: | 14584 return NULL; |
14587 result = 0; | 14585 |
14588 } | 14586 //v2 = (char *)&pLevelEVT_Index[0].uEventOffsetInEVT; |
14589 else | |
14590 { | |
14591 v2 = (char *)&pLevelEVT_Index[0].uEventOffsetInEVT; | |
14592 while ( 1 ) | 14587 while ( 1 ) |
14593 { | 14588 { |
14594 if ( *((int *)v2 - 2) == uEventID ) | 14589 if ( pLevelEVT_Index[event_index].uEventID == uEventID ) |
14595 { | 14590 { |
14596 v3 = *(int *)v2; | 14591 test_evt=(_evt_raw*)&pLevelEVT[pLevelEVT_Index[event_index].uEventOffsetInEVT]; |
14597 v4 = *((int *)v2 + 3); | 14592 last_evt=test_evt; |
14598 if ( pLevelEVT[*(int *)v2 + 4] == 4 ) | 14593 event_pos = pLevelEVT_Index[event_index+1].uEventOffsetInEVT; |
14594 if ( test_evt->_e_type == EVENT_MouseOver ) | |
14599 break; | 14595 break; |
14600 } | 14596 } |
14601 ++v1; | 14597 ++event_index; |
14602 v2 += 12; | 14598 if ( event_index >= uLevelEVT_NumEvents ) |
14603 if ( v1 >= (signed int)uLevelEVT_NumEvents ) | 14599 return NULL; |
14604 goto LABEL_6; | 14600 } |
14605 } | 14601 test_evt=(_evt_raw*)&pLevelEVT[event_pos]; |
14606 if ( pLevelEVT[v4 + 4] == 2 ) | 14602 if ( test_evt->_e_type== EVENT_SpeakInHouse ) |
14607 { | 14603 { |
14608 v6 = (unsigned __int8)pLevelEVT[v4 + 5] | 14604 str_index = EVT_DWORD(test_evt->v5); |
14609 + (((unsigned __int8)pLevelEVT[v4 + 6] | 14605 result = (char *)p2DEvents[str_index - 1].pName; |
14610 + (((unsigned __int8)pLevelEVT[v4 + 7] + ((unsigned __int8)pLevelEVT[v4 + 8] << 8)) << 8)) << 8); | |
14611 LABEL_10: | |
14612 //result = (char *)p2DEvents_minus1_::04[13 * v6]; | |
14613 result = (char *)p2DEvents[v6 - 1].pName; | |
14614 } | 14606 } |
14615 else | 14607 else |
14616 { | 14608 { |
14617 for ( i = (char *)pLevelEVT_Index + 4 * (3 * v1 + 3); *(int *)i == uEventID; i += 12 ) | 14609 for ( i = event_index+1; pLevelEVT_Index[i].uEventID == uEventID; ++i ) |
14618 { | 14610 { |
14619 v8 = *((int *)i + 2); | 14611 event_pos = pLevelEVT_Index[i].uEventOffsetInEVT; |
14620 if ( pLevelEVT[v8 + 4] == 2 ) | 14612 test_evt=(_evt_raw*)&pLevelEVT[event_pos]; |
14621 { | 14613 if ( test_evt->_e_type == EVENT_SpeakInHouse ) |
14622 v6 = (unsigned __int8)pLevelEVT[v8 + 5] | 14614 { |
14623 + (((unsigned __int8)pLevelEVT[v8 + 6] | 14615 str_index = EVT_DWORD(test_evt->v5); |
14624 + (((unsigned __int8)pLevelEVT[v8 + 7] + ((unsigned __int8)pLevelEVT[v8 + 8] << 8)) << 8)) << 8); | 14616 if ( str_index < 600 ) |
14625 if ( (unsigned int)v6 < 0x258 ) | 14617 return (char *)p2DEvents[str_index - 1].pName; |
14626 goto LABEL_10; | 14618 } |
14627 } | 14619 } |
14628 } | 14620 result = &pLevelStr[pLevelStrOffsets[EVT_BYTE(last_evt->v5)]]; |
14629 result = &pLevelStr[pLevelStrOffsets[(unsigned __int8)pLevelEVT[v3 + 5]]]; | 14621 } |
14630 } | 14622 |
14631 } | |
14632 return result; | 14623 return result; |
14633 } | 14624 } |
14634 | 14625 |
14635 | 14626 |
14636 | 14627 |