Mercurial > mm7
comparison mm7_4.cpp @ 655:6a2d29c21d09
Margaret disappear fixed
some mistakes fixed |= &
author | zipi |
---|---|
date | Tue, 12 Mar 2013 21:07:57 +0000 |
parents | 1ff57450f090 |
children | 6abf5b610585 |
comparison
equal
deleted
inserted
replaced
654:eb67721c5268 | 655:6a2d29c21d09 |
---|---|
3025 // 4ED498: using guessed type char byte_4ED498; | 3025 // 4ED498: using guessed type char byte_4ED498; |
3026 | 3026 |
3027 //----- (00491F87) -------------------------------------------------------- | 3027 //----- (00491F87) -------------------------------------------------------- |
3028 void __cdecl DrawHiredNPCs() | 3028 void __cdecl DrawHiredNPCs() |
3029 { | 3029 { |
3030 int v6; // eax@15 | 3030 //int v6; // eax@15 |
3031 char v7; // al@17 | 3031 char v7; // al@17 |
3032 unsigned int v8; // eax@18 | 3032 unsigned int v8; // eax@18 |
3033 int v9; // esi@18 | 3033 int v9; // esi@18 |
3034 int v10; // eax@18 | 3034 int v10; // eax@18 |
3035 unsigned int v11; // eax@19 | 3035 unsigned int v11; // eax@19 |
3038 IconFrame *v14; // eax@24 | 3038 IconFrame *v14; // eax@24 |
3039 unsigned int v15; // eax@26 | 3039 unsigned int v15; // eax@26 |
3040 char pContainer[20]; // [sp+Ch] [bp-30h]@18 | 3040 char pContainer[20]; // [sp+Ch] [bp-30h]@18 |
3041 unsigned int v17; // [sp+20h] [bp-1Ch]@19 | 3041 unsigned int v17; // [sp+20h] [bp-1Ch]@19 |
3042 signed int uFrameID; // [sp+24h] [bp-18h]@19 | 3042 signed int uFrameID; // [sp+24h] [bp-18h]@19 |
3043 int i; // [sp+28h] [bp-14h]@15 | 3043 //int i; // [sp+28h] [bp-14h]@15 |
3044 unsigned int v20; // [sp+2Ch] [bp-10h]@20 | 3044 unsigned int v20; // [sp+2Ch] [bp-10h]@20 |
3045 unsigned int v21; // [sp+30h] [bp-Ch]@19 | 3045 unsigned int v21; // [sp+30h] [bp-Ch]@19 |
3046 int v22; // [sp+34h] [bp-8h]@2 | 3046 int v22; // [sp+34h] [bp-8h]@2 |
3047 unsigned __int8 v23; // [sp+3Bh] [bp-1h]@2 | 3047 unsigned __int8 v23; // [sp+3Bh] [bp-1h]@2 |
3048 | 3048 |
3060 if (pParty->pHirelings[1].pName) | 3060 if (pParty->pHirelings[1].pName) |
3061 pTmpBuf[v22++] = 1; | 3061 pTmpBuf[v22++] = 1; |
3062 | 3062 |
3063 for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) | 3063 for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) |
3064 { | 3064 { |
3065 if (pNPCStats->pNewNPCData[i].uFlags == 128) | 3065 if (pNPCStats->pNewNPCData[i].uFlags & 128) |
3066 { | 3066 { |
3067 if (!pParty->pHirelings[0].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[0].pName)) | 3067 if (!pParty->pHirelings[0].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[0].pName)) |
3068 { | 3068 { |
3069 if (!pParty->pHirelings[1].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[1].pName)) | 3069 if (!pParty->pHirelings[1].pName || strcmp(pNPCStats->pNewNPCData[i].pName, pParty->pHirelings[1].pName)) |
3070 pTmpBuf[v22++] = i + 2; | 3070 pTmpBuf[v22++] = i + 2; |
3071 } | 3071 } |
3072 } | 3072 } |
3073 } | 3073 } |
3074 | 3074 |
3075 v6 = (unsigned __int8)pParty->field_709; | 3075 //v6 = (unsigned __int8)pParty->field_709; |
3076 for ( i = (unsigned __int8)pParty->field_709; i < v22; v6 = i++ + 1 ) | 3076 for ( int i = (unsigned __int8)pParty->field_709; i < v22 && v23 < 2; i++ ) |
3077 { | 3077 { |
3078 if ( v23 >= 2 ) | 3078 v7 = pTmpBuf[i]; |
3079 break; | |
3080 v7 = pTmpBuf[v6]; | |
3081 if ( (unsigned __int8)v7 >= 2 ) | 3079 if ( (unsigned __int8)v7 >= 2 ) |
3082 { | 3080 { |
3083 sprintf(pContainer, "NPC%03d", pNPCStats->pNPCData[(unsigned __int8)v7 + 499].uPortraitID); | 3081 sprintf(pContainer, "NPC%03d", pNPCStats->pNPCData[(unsigned __int8)v7 + 499].uPortraitID); |
3084 v15 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 3082 v15 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
3085 pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], (Texture *)(v15 != -1 ? &pIcons_LOD->pTextures[v15] : 0)); | 3083 pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], (Texture *)(v15 != -1 ? &pIcons_LOD->pTextures[v15] : 0)); |
9588 goto _return; | 9586 goto _return; |
9589 } | 9587 } |
9590 Party::TakeGold(pPrice); | 9588 Party::TakeGold(pPrice); |
9591 } | 9589 } |
9592 //LOBYTE(v2->uFlags) |= 0x80u; | 9590 //LOBYTE(v2->uFlags) |= 0x80u; |
9593 pCurrentNPCInfo->uFlags = 128; | 9591 pCurrentNPCInfo->uFlags |= 128; |
9594 pParty->field_709 = 0; | 9592 pParty->field_709 = 0; |
9595 sub_44A56A(); | 9593 sub_44A56A(); |
9596 if ( pParty->pHirelings[0].pName ) | 9594 if ( pParty->pHirelings[0].pName ) |
9597 { | 9595 { |
9598 memcpy(&pParty->pHirelings[1], pCurrentNPCInfo, sizeof(pParty->pHirelings[1])); | 9596 memcpy(&pParty->pHirelings[1], pCurrentNPCInfo, sizeof(pParty->pHirelings[1])); |