Mercurial > might-and-magic-trilogy
comparison mm7_5.cpp @ 84:b39bdc150e90
Some inventory stuff
author | Nomad |
---|---|
date | Mon, 29 Oct 2012 01:36:20 +0200 |
parents | f9a33f75bae3 |
children | 51a5b0dc3f30 |
comparison
equal
deleted
inserted
replaced
83:2d5d13376e91 | 84:b39bdc150e90 |
---|---|
6349 v15->field_8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6349 v15->field_8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6350 _43C91D_FormItemTextureFilename(pContainer, 532, v14, 0); | 6350 _43C91D_FormItemTextureFilename(pContainer, 532, v14, 0); |
6351 v15->field_C = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6351 v15->field_C = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6352 _43C91D_FormItemTextureFilename(pContainer, 544, v14, 0); | 6352 _43C91D_FormItemTextureFilename(pContainer, 544, v14, 0); |
6353 v15->field_10 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 6353 v15->field_10 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); |
6354 if ( sub_43ED6F_get_some_race_sex_relation(1u) ) | 6354 if ( _43ED6F_check_party_races(true) ) |
6355 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); | 6355 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); |
6356 v35 += 28; | 6356 v35 += 28; |
6357 ++v14; | 6357 ++v14; |
6358 ++v15; | 6358 ++v15; |
6359 } | 6359 } |
6506 const char *v6; // [sp-Ch] [bp-18h]@88 | 6506 const char *v6; // [sp-Ch] [bp-18h]@88 |
6507 signed int v7; // [sp-8h] [bp-14h]@61 | 6507 signed int v7; // [sp-8h] [bp-14h]@61 |
6508 int v8; // [sp-4h] [bp-10h]@61 | 6508 int v8; // [sp-4h] [bp-10h]@61 |
6509 signed int v9; // [sp-4h] [bp-10h]@69 | 6509 signed int v9; // [sp-4h] [bp-10h]@69 |
6510 | 6510 |
6511 result = 0; //BUG fn is void | |
6511 if ( a2 <= 500 ) | 6512 if ( a2 <= 500 ) |
6512 { | 6513 { |
6513 v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0; | 6514 //v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0; |
6515 v5 = byte_5111C0[(a2 - 100) + 32 + 2] == 0; | |
6514 LABEL_21: | 6516 LABEL_21: |
6515 if ( v5 ) | 6517 if ( v5 ) |
6516 return result; | 6518 return result; |
6517 result = 516; | 6519 result = 516; |
6518 if ( a2 < 66 || a2 > 78 ) | 6520 if ( a2 < 66 || a2 > 78 ) |
8642 255); | 8644 255); |
8643 } | 8645 } |
8644 | 8646 |
8645 | 8647 |
8646 //----- (0043ED6F) -------------------------------------------------------- | 8648 //----- (0043ED6F) -------------------------------------------------------- |
8647 bool __thiscall sub_43ED6F_get_some_race_sex_relation(unsigned int a1) | 8649 bool _43ED6F_check_party_races(bool a1) |
8648 { | 8650 { |
8649 unsigned int v1; // ebp@1 | 8651 bool v6; // zf@5 |
8650 Player **v2; // ebx@1 | 8652 |
8651 Player *v3; // esi@2 | 8653 for (uint i = 0; i < 4; ++i) |
8652 enum CHARACTER_RACE v4; // edi@2 | 8654 { |
8653 bool result; // eax@2 | 8655 auto player = pParty->pPlayers + i; |
8654 char v6; // zf@5 | 8656 auto race = player->GetRace(); |
8655 | 8657 |
8656 v1 = a1; | 8658 if (race != CHARACTER_RACE_HUMAN && |
8657 v2 = &pPlayers[1]; | 8659 race != CHARACTER_RACE_ELF && |
8658 while ( 1 ) | 8660 race != CHARACTER_RACE_GOBLIN) |
8659 { | 8661 v6 = a1 == 1; |
8660 v3 = *v2; | |
8661 v4 = v3->GetRace(); | |
8662 result = v3->GetSexByVoice(); | |
8663 if ( v4 && v4 != CHARACTER_RACE_ELF && v4 != CHARACTER_RACE_GOBLIN ) | |
8664 v6 = v1 == 1; | |
8665 else | 8662 else |
8666 v6 = v1 == 0; | 8663 v6 = !a1; |
8667 if ( v6 ) | 8664 |
8668 break; | 8665 if (v6) |
8669 ++v2; | 8666 return true; |
8670 if ( (signed int)v2 >= (signed int)&qword_A750D8 ) | 8667 } |
8671 { | 8668 return false; |
8672 LOBYTE(result) = 0; | |
8673 return result; | |
8674 } | |
8675 } | |
8676 LOBYTE(result) = 1; | |
8677 return result; | |
8678 } | 8669 } |
8679 // A750D8: using guessed type __int64 qword_A750D8; | 8670 // A750D8: using guessed type __int64 qword_A750D8; |
8680 | 8671 |
8681 //----- (0043EDB9) -------------------------------------------------------- | 8672 //----- (0043EDB9) -------------------------------------------------------- |
8682 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this) | 8673 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this) |
12998 } | 12989 } |
12999 | 12990 |
13000 //----- (00411473) -------------------------------------------------------- | 12991 //----- (00411473) -------------------------------------------------------- |
13001 void __cdecl sub_411473() | 12992 void __cdecl sub_411473() |
13002 { | 12993 { |
13003 char *v0; // esi@1 | 12994 Texture **v0; // esi@1 |
13004 Texture **v1; // edi@1 | 12995 Texture **v1; // edi@1 |
13005 Texture *v2; // ecx@2 | 12996 Texture *v2; // ecx@2 |
13006 Texture *v3; // ecx@2 | 12997 Texture *v3; // ecx@2 |
13007 | 12998 |
13008 pTexture_pagemask->Release(); | 12999 pTexture_pagemask->Release(); |
13009 pTexture_506448->Release(); | 13000 pTexture_506448->Release(); |
13010 pTexture_50643C->Release(); | 13001 pTexture_50643C->Release(); |
13011 v0 = &pTextures_tabs[0][0].pName[4]; | 13002 v0 = &pTextures_tabs[0][1]; |
13012 v1 = pTextures_5064A0; | 13003 v1 = pTextures_5064A0; |
13013 do | 13004 do |
13014 { | 13005 { |
13015 (*v1)->Release(); | 13006 (*v1)->Release(); |
13016 v2 = (Texture *)*((int *)v0 - 1); | 13007 v2 = (Texture *)*((int *)v0 - 1); |
13165 { | 13156 { |
13166 if ( *(short *)a2.x ) | 13157 if ( *(short *)a2.x ) |
13167 { | 13158 { |
13168 if ( v0->pNumSpellBookPage == v13 ) | 13159 if ( v0->pNumSpellBookPage == v13 ) |
13169 { | 13160 { |
13170 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13 + 4]; | 13161 v16 = pTextures_tabs[v13][1]; |
13171 switch ( v13 ) | 13162 switch ( v13 ) |
13172 { | 13163 { |
13173 case 0: | 13164 case 0: |
13174 v14 = 406; | 13165 v14 = 406; |
13175 v22 = 9; | 13166 v22 = 9; |
13205 break; | 13196 break; |
13206 } | 13197 } |
13207 } | 13198 } |
13208 else | 13199 else |
13209 { | 13200 { |
13210 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13]; | 13201 v16 = pTextures_tabs[v13][0]; |
13211 switch ( v13 ) | 13202 switch ( v13 ) |
13212 { | 13203 { |
13213 case 0: | 13204 case 0: |
13214 v14 = 415; | 13205 v14 = 415; |
13215 v22 = 10; | 13206 v22 = 10; |