comparison mm7_3.cpp @ 787:3a77fbf7d0b8

GetSector
author Ritor1
date Mon, 25 Mar 2013 02:20:57 +0600
parents d170f23f70d1
children f004c7ceb7bd
comparison
equal deleted inserted replaced
786:da80bd2922df 787:3a77fbf7d0b8
13530 void __thiscall OnTimer(int a1) 13530 void __thiscall OnTimer(int a1)
13531 { 13531 {
13532 int v1; // ebp@1 13532 int v1; // ebp@1
13533 unsigned int v2; // ebx@4 13533 unsigned int v2; // ebx@4
13534 unsigned int v3; // edi@4 13534 unsigned int v3; // edi@4
13535 char *v4; // esi@6 13535 char *pField_C; // esi@6
13536 __int16 v5; // ax@8 13536 __int16 v5; // ax@8
13537 int v6; // ecx@10 13537 int v6; // ecx@10
13538 unsigned int v7; // ebp@12 13538 unsigned int v7; // ebp@12
13539 int v8; // eax@16 13539 int v8; // eax@16
13540 int v9; // eax@19 13540 int v9; // eax@19
13555 { 13555 {
13556 _5773B8_event_timer = pParty->uTimePlayed; 13556 _5773B8_event_timer = pParty->uTimePlayed;
13557 v12 = 0; 13557 v12 = 0;
13558 if ( dword_5B65C8_timers_count > 0 ) 13558 if ( dword_5B65C8_timers_count > 0 )
13559 { 13559 {
13560 v4 = (char *)&array_5B5928_timers[0].field_C; 13560 pField_C = (char *)&array_5B5928_timers[0].field_C;
13561 while ( 1 ) 13561 while ( 1 )
13562 { 13562 {
13563 v5 = *(short *)v4; 13563 v5 = *(short *)pField_C;
13564 if ( *(short *)v4 != (short)v1 ) 13564 if ( *(short *)pField_C != (short)v1 )
13565 break; 13565 break;
13566 v7 = *((int *)v4 - 2); 13566 v7 = *((int *)pField_C - 2);
13567 if ( v7 <= v3 && (v7 < v3 || *((int *)v4 - 3) <= v2) ) 13567 if ( v7 <= v3 && (v7 < v3 || *((int *)pField_C - 3) <= v2) )
13568 { 13568 {
13569 if ( *((short *)v4 + 2) ) 13569 if ( *((short *)pField_C + 2) )
13570 { 13570 {
13571 v8 = 29030400; 13571 v8 = 29030400;
13572 } 13572 }
13573 else 13573 else
13574 { 13574 {
13575 if ( *((short *)v4 + 3) ) 13575 if ( *((short *)pField_C + 3) )
13576 { 13576 {
13577 v8 = 2419200; 13577 v8 = 2419200;
13578 } 13578 }
13579 else 13579 else
13580 { 13580 {
13581 v9 = -(*((short *)v4 + 4) != 0); 13581 v9 = -(*((short *)pField_C + 4) != 0);
13582 v8 = (v9 & 0x7E900) + 86400; 13582 v8 = (v9 & 0x7E900) + 86400;
13583 } 13583 }
13584 } 13584 }
13585 v10 = v7 + *((int *)v4 - 3) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);//v10 = __PAIR__(v7, *((int *)v4 - 3)) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335); 13585 v10 = v7 + *((int *)pField_C - 3) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);//v10 = __PAIR__(v7, *((int *)v4 - 3)) + (signed __int64)((double)((signed __int64)v8 << 7) * 0.033333335);
13586 *((int *)v4 - 3) = v10; 13586 *((int *)pField_C - 3) = v10;
13587 *((int *)v4 - 2) = HIDWORD(v10); 13587 *((int *)pField_C - 2) = HIDWORD(v10);
13588 if ( HIDWORD(v10) <= v3 && (HIDWORD(v10) < v3 || *((int *)v4 - 3) < v2) ) 13588 if ( HIDWORD(v10) <= v3 && (HIDWORD(v10) < v3 || *((int *)pField_C - 3) < v2) )
13589 { 13589 {
13590 *((int *)v4 - 3) = v2; 13590 *((int *)pField_C - 3) = v2;
13591 *((int *)v4 - 2) = v3; 13591 *((int *)pField_C - 2) = v3;
13592 } 13592 }
13593 v11 = *((short *)v4 - 2); 13593 v11 = *((short *)pField_C - 2);
13594 start_event_seq_number = *((short *)v4 - 1); 13594 start_event_seq_number = *((short *)pField_C - 1);
13595 EventProcessor(v11, 0, 1); 13595 EventProcessor(v11, 0, 1);
13596 start_event_seq_number = 0; 13596 start_event_seq_number = 0;
13597 LABEL_25: 13597 LABEL_25:
13598 v3 = HIDWORD(pParty->uTimePlayed); 13598 v3 = HIDWORD(pParty->uTimePlayed);
13599 v2 = LODWORD(pParty->uTimePlayed); 13599 v2 = LODWORD(pParty->uTimePlayed);
13600 } 13600 }
13601 LABEL_26: 13601 LABEL_26:
13602 ++v12; 13602 ++v12;
13603 v4 += 32; 13603 pField_C += 32;
13604 if ( v12 >= dword_5B65C8_timers_count ) 13604 if ( v12 >= dword_5B65C8_timers_count )
13605 return; 13605 return;
13606 v1 = 0; 13606 v1 = 0;
13607 } 13607 }
13608 if ( v13 < v5 ) 13608 if ( v13 < v5 )
13609 { 13609 {
13610 *(short *)v4 = v5 - v13; 13610 *(short *)pField_C = v5 - v13;
13611 goto LABEL_26; 13611 goto LABEL_26;
13612 } 13612 }
13613 v6 = *((short *)v4 - 2); 13613 v6 = *((short *)pField_C - 2);
13614 *(short *)v4 = *((short *)v4 + 1); 13614 *(short *)pField_C = *((short *)pField_C + 1);
13615 start_event_seq_number = *((short *)v4 - 1); 13615 start_event_seq_number = *((short *)pField_C - 1);
13616 EventProcessor(v6, 0, 1); 13616 EventProcessor(v6, 0, 1);
13617 start_event_seq_number = v1; 13617 start_event_seq_number = v1;
13618 goto LABEL_25; 13618 goto LABEL_25;
13619 } 13619 }
13620 } 13620 }