diff Party.cpp @ 23:509744251c8e

Player-related members
author Nomad
date Sun, 14 Oct 2012 00:27:38 +0200
parents 540178ef9b18
children 2bbf33898c6b
line wrap: on
line diff
--- a/Party.cpp	Sat Oct 13 20:18:28 2012 +0200
+++ b/Party.cpp	Sun Oct 14 00:27:38 2012 +0200
@@ -170,9 +170,6 @@
     return v12;
   }
 }
-// AE3369: using guessed type char byte_AE3369;
-// AE336A: using guessed type char byte_AE336A;
-// AE336B: using guessed type char byte_AE336B;
 
 
 //----- (00493244) --------------------------------------------------------
@@ -486,7 +483,7 @@
         v10 = v18++ - 35 < 0;
       }
       while ( (unsigned __int8)(v10 ^ v11) | v9 );
-      v12 = (char *)&v5->pInventoryItems[0].uAttributtes;
+      v12 = (char *)&v5->pInventoryItems[0].uAttributes;
       v13 = 138;
       do
       {
@@ -513,10 +510,10 @@
 int Party::Reset()
 {
   //Party *v1; // esi@1
-  unsigned __int64 *pTimePlayed; // edi@1
-  bool v3; // edx@1
-  Player **v4; // eax@1
-  Player *v5; // ecx@1
+  //unsigned __int64 *pTimePlayed; // edi@1
+  //bool v3; // edx@1
+  //Player **v4; // eax@1
+  //Player *v5; // ecx@1
   char v6; // cl@3
   char v7; // al@6
   char v8; // al@9
@@ -532,38 +529,30 @@
   int v18; // edx@24
   Player *v19; // eax@24
 
-  //v1 = this;
-  pTimePlayed = &uTimePlayed;
-  //memset(&this->uTimePlayed, 0, 0x1620Cu);
   field_708 = 15;
   sEyelevel = 160;
-  LOBYTE(v3) = 1;
   uFlags2 = 0;
   uNumGold = 200;
   uNumGoldInBank = 0;
   uNumFoodRations = 7;
   uAlignment = 1;
-  SetUserInterface(1, v3);
-  *((int *)pTimePlayed + 1) = 0;
-  *(int *)pTimePlayed = 0x21C00u;
-  LODWORD(uLastRegenerationTime) = 0x21C00;
-  HIDWORD(uLastRegenerationTime) = 0;
-  bTurnBasedModeOn = 0;
+
+  SetUserInterface(uAlignment, true);
+
+  uTimePlayed = 0x21C00u;
+  uLastRegenerationTime = 0x21C00;
+
+  bTurnBasedModeOn = false;
+
   uActiveCharacter = 1;
   ::pPlayers[0] = pPlayers;
-  v4 = &::pPlayers[1];
-  v5 = pPlayers;
-  do
-  {
-    *v4 = v5;
-    ++v4;
-    ++v5;
-  }
-  while ( (signed int)v4 < (signed int)&qword_A750D8 );
+  for (uint i = 0; i < 4; ++i)
+    ::pPlayers[i + 1] = &pPlayers[i];
+
   pPlayers[0].Reset(0);
-  pPlayers[0].Reset(4u);
-  pPlayers[0].Reset(0x18u);
-  pPlayers[0].Reset(0x20u);
+  pPlayers[0].Reset(4);
+  pPlayers[0].Reset(24);
+  pPlayers[0].Reset(32);
   pPlayers[0].uFace = 17;
   pPlayers[0].field_1924 = 17;
   pPlayers[0].uVoiceID = 17;
@@ -904,7 +893,7 @@
     v11 = 4;
     do
     {
-      v2 = ((Player *)(v1 - 6812))->GetMajorConditionrIdx();
+      v2 = ((Player *)(v1 - 6812))->GetMajorConditionIdx();
       if ( v2 == 18 || v2 == 17 )
       {
         *((short *)v1 + 1) += LOWORD(pMiscTimer->uTimeElapsed);