comparison Party.cpp @ 23:509744251c8e

Player-related members
author Nomad
date Sun, 14 Oct 2012 00:27:38 +0200
parents 540178ef9b18
children 2bbf33898c6b
comparison
equal deleted inserted replaced
22:e7ee737cd473 23:509744251c8e
168 if ( v9 - 1 < 4 ) 168 if ( v9 - 1 < 4 )
169 continue; 169 continue;
170 return v12; 170 return v12;
171 } 171 }
172 } 172 }
173 // AE3369: using guessed type char byte_AE3369;
174 // AE336A: using guessed type char byte_AE336A;
175 // AE336B: using guessed type char byte_AE336B;
176 173
177 174
178 //----- (00493244) -------------------------------------------------------- 175 //----- (00493244) --------------------------------------------------------
179 bool Party::HasItem(unsigned int uItemID) 176 bool Party::HasItem(unsigned int uItemID)
180 { 177 {
484 v11 = __OFSUB__(v18 + 1, 36); 481 v11 = __OFSUB__(v18 + 1, 36);
485 v9 = v18 == 35; 482 v9 = v18 == 35;
486 v10 = v18++ - 35 < 0; 483 v10 = v18++ - 35 < 0;
487 } 484 }
488 while ( (unsigned __int8)(v10 ^ v11) | v9 ); 485 while ( (unsigned __int8)(v10 ^ v11) | v9 );
489 v12 = (char *)&v5->pInventoryItems[0].uAttributtes; 486 v12 = (char *)&v5->pInventoryItems[0].uAttributes;
490 v13 = 138; 487 v13 = 138;
491 do 488 do
492 { 489 {
493 if ( *((int *)v12 - 5) ) 490 if ( *((int *)v12 - 5) )
494 *(int *)v12 |= 1u; 491 *(int *)v12 |= 1u;
511 508
512 //----- (004917CE) -------------------------------------------------------- 509 //----- (004917CE) --------------------------------------------------------
513 int Party::Reset() 510 int Party::Reset()
514 { 511 {
515 //Party *v1; // esi@1 512 //Party *v1; // esi@1
516 unsigned __int64 *pTimePlayed; // edi@1 513 //unsigned __int64 *pTimePlayed; // edi@1
517 bool v3; // edx@1 514 //bool v3; // edx@1
518 Player **v4; // eax@1 515 //Player **v4; // eax@1
519 Player *v5; // ecx@1 516 //Player *v5; // ecx@1
520 char v6; // cl@3 517 char v6; // cl@3
521 char v7; // al@6 518 char v7; // al@6
522 char v8; // al@9 519 char v8; // al@9
523 char v9; // cl@12 520 char v9; // cl@12
524 Player **v10; // ebx@15 521 Player **v10; // ebx@15
530 char *v16; // esi@23 527 char *v16; // esi@23
531 Player **v17; // esi@23 528 Player **v17; // esi@23
532 int v18; // edx@24 529 int v18; // edx@24
533 Player *v19; // eax@24 530 Player *v19; // eax@24
534 531
535 //v1 = this;
536 pTimePlayed = &uTimePlayed;
537 //memset(&this->uTimePlayed, 0, 0x1620Cu);
538 field_708 = 15; 532 field_708 = 15;
539 sEyelevel = 160; 533 sEyelevel = 160;
540 LOBYTE(v3) = 1;
541 uFlags2 = 0; 534 uFlags2 = 0;
542 uNumGold = 200; 535 uNumGold = 200;
543 uNumGoldInBank = 0; 536 uNumGoldInBank = 0;
544 uNumFoodRations = 7; 537 uNumFoodRations = 7;
545 uAlignment = 1; 538 uAlignment = 1;
546 SetUserInterface(1, v3); 539
547 *((int *)pTimePlayed + 1) = 0; 540 SetUserInterface(uAlignment, true);
548 *(int *)pTimePlayed = 0x21C00u; 541
549 LODWORD(uLastRegenerationTime) = 0x21C00; 542 uTimePlayed = 0x21C00u;
550 HIDWORD(uLastRegenerationTime) = 0; 543 uLastRegenerationTime = 0x21C00;
551 bTurnBasedModeOn = 0; 544
545 bTurnBasedModeOn = false;
546
552 uActiveCharacter = 1; 547 uActiveCharacter = 1;
553 ::pPlayers[0] = pPlayers; 548 ::pPlayers[0] = pPlayers;
554 v4 = &::pPlayers[1]; 549 for (uint i = 0; i < 4; ++i)
555 v5 = pPlayers; 550 ::pPlayers[i + 1] = &pPlayers[i];
556 do 551
557 {
558 *v4 = v5;
559 ++v4;
560 ++v5;
561 }
562 while ( (signed int)v4 < (signed int)&qword_A750D8 );
563 pPlayers[0].Reset(0); 552 pPlayers[0].Reset(0);
564 pPlayers[0].Reset(4u); 553 pPlayers[0].Reset(4);
565 pPlayers[0].Reset(0x18u); 554 pPlayers[0].Reset(24);
566 pPlayers[0].Reset(0x20u); 555 pPlayers[0].Reset(32);
567 pPlayers[0].uFace = 17; 556 pPlayers[0].uFace = 17;
568 pPlayers[0].field_1924 = 17; 557 pPlayers[0].field_1924 = 17;
569 pPlayers[0].uVoiceID = 17; 558 pPlayers[0].uVoiceID = 17;
570 pPlayers[0].SetInitialStats(); 559 pPlayers[0].SetInitialStats();
571 v6 = 0; 560 v6 = 0;
902 dword_A75070 = stru_51076C.field_8; 891 dword_A75070 = stru_51076C.field_8;
903 v1 = (char *)&this->pPlayers[0].uExpressionID; 892 v1 = (char *)&this->pPlayers[0].uExpressionID;
904 v11 = 4; 893 v11 = 4;
905 do 894 do
906 { 895 {
907 v2 = ((Player *)(v1 - 6812))->GetMajorConditionrIdx(); 896 v2 = ((Player *)(v1 - 6812))->GetMajorConditionIdx();
908 if ( v2 == 18 || v2 == 17 ) 897 if ( v2 == 18 || v2 == 17 )
909 { 898 {
910 *((short *)v1 + 1) += LOWORD(pMiscTimer->uTimeElapsed); 899 *((short *)v1 + 1) += LOWORD(pMiscTimer->uTimeElapsed);
911 if ( *((short *)v1 + 1) >= *((short *)v1 + 2) ) 900 if ( *((short *)v1 + 1) >= *((short *)v1 + 2) )
912 { 901 {