Mercurial > mm7
diff mm7_3.cpp @ 89:98cd93e14777
pointer fixes
author | zipi |
---|---|
date | Wed, 06 Feb 2013 21:19:42 +0000 |
parents | 170259c8c71f |
children | 909822c91d47 |
line wrap: on
line diff
--- a/mm7_3.cpp Mon Feb 04 17:21:02 2013 +0600 +++ b/mm7_3.cpp Wed Feb 06 21:19:42 2013 +0000 @@ -18616,7 +18616,7 @@ signed int v29; // edx@66 char *v30; // ecx@67 unsigned __int16 v31; // ax@70 - char *v32; // eax@80 + Player *v32; // eax@80 unsigned __int16 v33; // si@85 int v34; // eax@96 int v35; // eax@97 @@ -18965,14 +18965,14 @@ } } levela = 1; - v32 = (char *)&pParty->pPlayers[0].pConditions[1]; + v32 = pParty->pPlayers;//[0].pConditions[1]; do { - if ( *(_QWORD *)v32 ) + if ( v32->pConditions[1] ) levela = 0; - v32 += 6972; - } - while ( (signed int)v32 < (signed int)&pParty->pHirelings[0].uFlags ); + ++v32; + } + while ( v32 <= &pParty->pPlayers[3] ); if ( !levela ) return; pParty->pPartyBuffs[8].Apply( @@ -21116,7 +21116,8 @@ int v33; // [sp+60h] [bp-14h]@10 int *v34; // [sp+64h] [bp-10h]@6 int v35; // [sp+68h] [bp-Ch]@5 - int v40; // [sp+6Ch] [bp-8h]@1 + Player *v40; // [sp+6Ch] [bp-8h]@1 + int v40b; unsigned int v37; // [sp+70h] [bp-4h]@7 pTurnEngine->field_18 &= 0xFFFFFFFDu; @@ -21125,7 +21126,7 @@ pAudioPlayer->StopChannels(-1, -1); v2 = 0; pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0); - v40 = (int)pParty->pPlayers; + v40 = pParty->pPlayers; dword_50C998_turnbased_icon_1A = 8 * pIconsFrameTable->pIcons[uIconID_TurnStart].uAnimLength; dword_50C994 = 0; v1->field_10 = 100; @@ -21136,21 +21137,21 @@ v3 = 0; do { - if ( ((Player *)v40)->CanAct() ) + if ( v40->CanAct() ) { *(&v1->field_0 + 4 * (v1->uActorQueueSize + 2)) = 8 * v3 | OBJECT_Player; v1->pQueue[v1->uActorQueueSize].field_C = 2; v1->pQueue[v1->uActorQueueSize].uActionLength = 0; pParty->pTurnBasedPlayerRecoveryTimes[v1->uActorQueueSize++] = 0; } - v40 += 6972; + ++v40; ++v3; } - while ( v40 < (signed int)pParty->pHirelings ); + while ( v40 <=&pParty->pPlayers[3] ); v35 = v1->uActorQueueSize; v4 = v35; - v40 = v35; - if ( v40 < v40 + ai_arrays_size ) + v40b = v35; + if ( v40b < v40b + ai_arrays_size ) { v34 = (int *)ai_array_4F7DB0_actor_ids; do @@ -21179,17 +21180,17 @@ } v4 = v35; } - ++v40; + ++v40b; ++v34; } - while ( v40 < v4 + ai_arrays_size ); + while ( v40b < v4 + ai_arrays_size ); v2 = 0; } v11 = __OFSUB__(v1->uActorQueueSize, v2); v9 = v1->uActorQueueSize == v2; v10 = ((v1->uActorQueueSize - v2) & 0x80000000u) != 0; v37 = v2; - v40 = v2; + v40b = v2; if ( !((unsigned __int8)(v10 ^ v11) | v9) ) { v12 = (char *)&v1->pQueue[0].field_4; @@ -21208,11 +21209,11 @@ goto LABEL_26; } v15 = v37++; - *(&a3.uDistance + v15) = v40; + *(&a3.uDistance + v15) = v40b; LABEL_26: - ++v40; + ++v40b; v12 += 16; - if ( v40 >= v1->uActorQueueSize ) + if ( v40b >= v1->uActorQueueSize ) goto LABEL_27; } if ( v13 != 3 ) @@ -21248,15 +21249,15 @@ v34 = (int *)1; do { - v40 = (int)v34; + v40b = (int)v34; if ( (signed int)v34 < (signed int)v37 ) { v19 = (char *)&v31.uDistance + v35; do { v20 = *(int *)v19; - v33 = 4 * v40; - v21 = (char *)(&v31.uDistance + v40); + v33 = 4 * v40b; + v21 = (char *)(&v31.uDistance + v40b); v22 = *(int *)v21; if ( *(int *)v21 < v20 ) { @@ -21270,9 +21271,9 @@ *(int *)v25 = v26; v2 = 0; } - ++v40; - } - while ( v40 < (signed int)v37 ); + ++v40b; + } + while ( v40b < (signed int)v37 ); } v34 = (int *)((char *)v34 + 1); v35 += 4;