changeset 1872:661ea35def76

Merge
author Grumpy7
date Thu, 17 Oct 2013 03:47:31 +0200
parents e26d8d15ef30 (diff) eb580660bbbb (current diff)
children a53bd0511de2
files
diffstat 4 files changed, 190 insertions(+), 209 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Wed Oct 16 13:34:49 2013 +0200
+++ b/Actor.cpp	Thu Oct 17 03:47:31 2013 +0200
@@ -342,9 +342,9 @@
       else if (masteryLevel == 4)
         v23 = 14;
       spellnumb = 0;
+      v28 = 0;
       for ( int i = 0; i < v23; i++)
       {
-        v28 = spellnumb;
         v30 = rand() % 1000;
         spellnumc = v30 - 2500;
         v120 = v28 * v28;
@@ -396,6 +396,7 @@
           pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[9], PID(OBJECT_Item, v36), 0, -1, 0, 0, 0, 0);
         }
         spellnumb = rand() % 1024 - 512;
+        v28 = rand() % 1024 - 512;
       }
       return;
       break;
@@ -1219,34 +1220,18 @@
 void Actor::AI_MeleeAttack(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0)
 {
   Actor *v3; // ebx@1
-  char v4; // zf@1
-  //unsigned int result; // eax@3
-  AIDirection *v6; // esi@6
-  AIDirection *v7; // edi@6
+  int16_t v6; // esi@6
+  int16_t v7; // edi@6
   signed int v8; // eax@7
-  double v9; // st7@9
   Vec3_int_ v10; // ST04_12@9
-  //int v11; // eax@10
   AIDirection *v12; // eax@11
-  unsigned int v13; // esi@11
-  AIDirection *v14; // esi@12
-  SpriteFrame *v15; // ecx@13
-  __int16 v16; // ax@13
-  unsigned int v17; // ecx@13
-  signed __int64 v18; // qax@13
   AIDirection a3; // [sp+Ch] [bp-48h]@12
   AIDirection v20; // [sp+28h] [bp-2Ch]@12
-  unsigned int v21; // [sp+44h] [bp-10h]@9
-  //signed int a2; // [sp+48h] [bp-Ch]@1
   int v23; // [sp+4Ch] [bp-8h]@6
-  unsigned int v24; // [sp+50h] [bp-4h]@1
   unsigned int v25; // [sp+5Ch] [bp+8h]@13
 
   v3 = &pActors[uActorID];
-  //a2 = edx0;
-  v4 = v3->pMonsterInfo.uMovementType == MONSTER_MOVEMENT_TYPE_STAIONARY;
-  v24 = uActorID;
-  if ( v4 && v3->pMonsterInfo.uAIType == 1 )
+  if ( v3->pMonsterInfo.uMovementType == MONSTER_MOVEMENT_TYPE_STAIONARY && v3->pMonsterInfo.uAIType == 1 )
   {
     Actor::AI_Stand(uActorID, sTargetPid, 0, arg0);
     return;
@@ -1254,65 +1239,61 @@
 
   if ( PID_TYPE(sTargetPid) == OBJECT_Actor)
   {
-	v8 = PID_ID(sTargetPid);
-    v6 = (AIDirection *)pActors[v8].vPosition.x;
-    v7 = (AIDirection *)pActors[v8].vPosition.y;
-    v23 = (signed __int64)((double)pActors[v8].uActorHeight * 0.75 + (double)pActors[v8].vPosition.z);
+	  v8 = PID_ID(sTargetPid);
+    v6 = pActors[v8].vPosition.x;
+    v7 = pActors[v8].vPosition.y;
+    v23 = (int)(pActors[v8].uActorHeight * 0.75 + pActors[v8].vPosition.z);
   }
   else if ( PID_TYPE(sTargetPid) == OBJECT_Player)
   {
-	v6 = (AIDirection *)pParty->vPosition.x;
-    v7 = (AIDirection *)pParty->vPosition.y;
+	  v6 = pParty->vPosition.x;
+    v7 = pParty->vPosition.y;
     v23 = pParty->vPosition.z + pParty->sEyelevel;
   }
   else
   {
-    v6 = arg0;
-	v7 = arg0;
+    Error("Should not get here");
+    return;
   }
-  v21 = v3->uActorHeight;
-  v9 = (double)(signed int)v21 * 0.75;
-  v21 = v3->vPosition.z;
-  v10.z = (signed __int64)(v9 + (double)(signed int)v21);
+  v10.z = (int32_t)(v3->uActorHeight * 0.75 + v3->vPosition.z);
   v10.y = v3->vPosition.y;
   v10.x = v3->vPosition.x;
+
   if ( sub_407A1C((int)v6, (int)v7, v23, v10) )
   {
-	v12 = arg0;
-    v13 = 0;
-    if ( !arg0 )
+    if (arg0 != nullptr)
+    {
+      v12 = arg0;
+    }
+    else
     {
-		v14 = Actor::GetDirectionInfo(PID(OBJECT_Actor, v24), sTargetPid, &a3, 0);
-        v12 = &v20;
-        memcpy(&v20, v14, sizeof(v20));
-        v13 = 0;
+		  v12 = Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), sTargetPid, &a3, 0);
     }
-    v15 = pSpriteFrameTable->pSpriteSFrames;
     v3->uYawAngle = LOWORD(v12->uYawAngle);
-    v16 = v15[v3->pSpriteIDs[ANIM_AtkMelee]].uAnimLength;
-    v17 = v24;
-    v3->uCurrentActionLength = 8 * v16;
-    v3->uCurrentActionTime = v13;
+    v3->uCurrentActionLength = pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[ANIM_AtkMelee]].uAnimLength * 8;
+    v3->uCurrentActionTime = 0;
     v3->uAIState = AttackingMelee;
-    Actor::PlaySound(v17, 0);
-    LODWORD(v18) = pMonsterStats->pInfos[v3->pMonsterInfo.uID].uRecoveryTime;
+    Actor::PlaySound(uActorID, 0);
     v25 = pMonsterStats->pInfos[v3->pMonsterInfo.uID].uRecoveryTime;
-    if ( SHIDWORD(v3->pActorBuffs[7].uExpireTime) >= (signed int)v13
-      && (SHIDWORD(v3->pActorBuffs[7].uExpireTime) > (signed int)v13 || LODWORD(v3->pActorBuffs[7].uExpireTime) > v13) )
+    if ( pParty->bTurnBasedModeOn != 1 )
+    {
+      v3->pMonsterInfo.uRecoveryTime = (int)(flt_6BE3A8_debug_recmod2 * v25 * 2.133333333333333);
+    }
+    else if ( v3->pActorBuffs[7].uExpireTime > 0 )
     {
-		LODWORD(v18) = 2 * v18;
-        v25 = v18;
+      v3->pMonsterInfo.uRecoveryTime = v25 * 2;
     }
-    if ( pParty->bTurnBasedModeOn != 1 )
-        v18 = (signed __int64)(flt_6BE3A8_debug_recmod2 * (double)(signed int)v25 * 2.133333333333333);
-    v3->pMonsterInfo.uRecoveryTime = v18;
-    v3->vVelocity.z = v13;
-    v3->vVelocity.y = v13;
-    v3->vVelocity.x = v13;
+    else
+    {
+      v3->pMonsterInfo.uRecoveryTime = v25;
+    }
+    v3->vVelocity.z = 0;
+    v3->vVelocity.y = 0;
+    v3->vVelocity.x = 0;
     v3->UpdateAnimation();
   }
   else
-	Actor::AI_Pursue1(v24, sTargetPid, rand() % 2, 64, arg0);
+	Actor::AI_Pursue1(uActorID, sTargetPid, rand() % 2, 64, arg0);
 }
 
 //----- (00438CF3) --------------------------------------------------------
--- a/Party.cpp	Wed Oct 16 13:34:49 2013 +0200
+++ b/Party.cpp	Thu Oct 17 03:47:31 2013 +0200
@@ -99,10 +99,10 @@
     uNumDeaths = 0;
     uNumPrisonTerms = 0;
     uNumBountiesCollected = 0;
-    memset(monster_for_hunting_killed.data(), 5, sizeof(__int16));
-    memset(monster_id_for_hunting.data(), 5, sizeof(__int16));
-    memset(_quest_bits, 64, sizeof(__int8));
-    memset(pArcomageWins.data(), 16, sizeof(__int8));
+    monster_for_hunting_killed.fill(0);
+    monster_id_for_hunting.fill(0);
+    memset(_quest_bits, 0, sizeof(_quest_bits));
+    pArcomageWins.fill(0);
     uNumArenaPageWins = 0;
     uNumArenaSquireWins = 0;
     uNumArenaKnightWins = 0;
@@ -174,7 +174,7 @@
   }
 
   if ( playerAlreadyPicked[0] && playerAlreadyPicked[1] && playerAlreadyPicked[2] && playerAlreadyPicked[3] )
-    memset(playerAlreadyPicked.data(), 0, 4u);
+    playerAlreadyPicked.fill(false);
   for (int i = 0; i < 4; i++)
   {
     v6 = &this->pPlayers[i];
@@ -293,7 +293,7 @@
   pHireling1Name[0] = 0;
   pHireling2Name[0] = 0;
   this->hirelingScrollPosition = 0;
-  memset(pHirelings.data(), 0, 2 * sizeof(NPCData));
+  memset(&pHirelings, 0, sizeof(pHirelings));
 
   strcpy(this->pPlayers[0].pName, pGlobalTXT_LocalizationStrings[509]); //Zoltan
   this->pPlayers[0].uPrevFace = 17;
@@ -552,9 +552,9 @@
 
   pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100;  // default character ui - stats
   uFlags = 0;
-  memset(_autonote_bits, 0, 26);
-  memset(_quest_bits, 0, 64);
-  memset(pIsArtifactFound.data(), 0, 29);
+  memset(_autonote_bits, 0, sizeof(_autonote_bits));
+  memset(_quest_bits, 0, sizeof(_autonote_bits));
+  pIsArtifactFound.fill(0);
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_RED_POTION_ACTIVE, 1);
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_SEASHELL_ACTIVE, 1);
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LONGBOW_ACTIVE, 1);
@@ -562,7 +562,7 @@
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LUTE_ACTIVE, 1);
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_HAT_ACTIVE, 1);
 
-  memset(PartyTimes._shop_ban_times.data(),0,53*sizeof(__int64));
+  PartyTimes._shop_ban_times.fill(0);
 
   memcpy(pNPCStats->pNewNPCData, pNPCStats->pNPCData, 0x94BCu);
   memcpy(pNPCStats->pGroups_copy, pNPCStats->pGroups, 0x66u);
--- a/Player.cpp	Wed Oct 16 13:34:49 2013 +0200
+++ b/Player.cpp	Thu Oct 17 03:47:31 2013 +0200
@@ -750,7 +750,7 @@
     case Condition_Zombie:
       if ( classType == PLAYER_CLASS_LICH || IsEradicated() || IsZombie() || !IsDead())
         return;
-      memset(&pConditions[0], 0, sizeof(pConditions));
+      pConditions.fill(0);
       sHealth = GetMaxHealth();
       sMana = 0;
       player_sex = 0;
@@ -1240,7 +1240,7 @@
 Player::Player()
 {  
   memset(&pEquipment, 0, sizeof(PlayerEquipment));
-  memset(pInventoryMatrix.data(), 0, 126 * sizeof(int));
+  pInventoryMatrix.fill(0);
   for (uint i = 0; i < 126; ++i)
     pInventoryItemList[i].Reset();
   for (uint i = 0; i < 12; ++i)
@@ -1260,7 +1260,7 @@
   pName[0] = 0;
   uCurrentFace = 0;
   uVoiceID = 0;
-  memset(pConditions.data(), 0, 20 * sizeof(__int64));
+  pConditions.fill(0);
 
   field_BB = 0;
 
@@ -1327,8 +1327,8 @@
   uNumArmageddonCasts = 0;
   uNumFireSpikeCasts = 0;
 
-  memset(field_1988, 0, 49 * sizeof(int));
-  memset(playerEventBits, 0, 64 * sizeof(char));
+  memset(field_1988, 0, sizeof(field_1988));
+  memset(playerEventBits, 0, sizeof(playerEventBits));
 
   field_E0 = 0;
   field_E4 = 0;
@@ -3910,9 +3910,9 @@
   uLevel = 1;
   uExperience = 251 + rand() % 100;
   uBirthYear = 1147 - rand() % 6;
-  memset(pActiveSkills.data(), 0, sizeof(pActiveSkills));
-  memset(_achieved_awards_bits, 0, 64);
-  memset(&spellbook, 0, sizeof(PlayerSpells));
+  pActiveSkills.fill(0);
+  memset(_achieved_awards_bits, 0, sizeof(_achieved_awards_bits));
+  memset(&spellbook, 0, sizeof(spellbook));
 
   for (uint i = 0; i < 37; ++i)
   {
@@ -4491,7 +4491,7 @@
               v30 = playerAffected->pConditions[Condition_Dead];
               v32 = playerAffected->pConditions[Condition_Pertified];
               v34 = playerAffected->pConditions[Condition_Eradicated];    
-              memset(&playerAffected->pConditions,0,sizeof(pConditions));
+              pConditions.fill(0);
               playerAffected->pConditions[Condition_Dead] = v30;
               playerAffected->pConditions[Condition_Pertified] = v32;
               playerAffected->pConditions[Condition_Eradicated] = v34;
@@ -5737,7 +5737,7 @@
       PlayAwardSound_Anim();
       return;
     case VAR_MajorCondition:
-      memset(this, 0, 0xA0u);
+      pConditions.fill(0);
       PlayAwardSound_Anim();
       return;
     case VAR_AutoNotes:
@@ -6333,7 +6333,7 @@
       PlayAwardSound_Anim97();
       return;
     case VAR_MajorCondition :
-      memset(this, 0, 0xA0u);
+      pConditions.fill(0);
       PlayAwardSound_Anim97();
       return;
     case VAR_AutoNotes:
@@ -7026,7 +7026,7 @@
         }
       }
       if ( pParty->pHirelings[0].uProfession == pValue )
-        memset(pParty->pHirelings.data(), 0, sizeof(NPCData));
+        memset(&pParty->pHirelings[0], 0, sizeof(NPCData));
       if ( pParty->pHirelings[1].uProfession == pValue )
         memset(&pParty->pHirelings[1], 0, sizeof(NPCData));
       pParty->hirelingScrollPosition = 0;
--- a/mm7_2.cpp	Wed Oct 16 13:34:49 2013 +0200
+++ b/mm7_2.cpp	Thu Oct 17 03:47:31 2013 +0200
@@ -4128,136 +4128,136 @@
 
 void IntegrityTest()
 {
-  assert(sizeof(MovieHeader) == 44);
-  assert(sizeof(SoundDesc_mm6) == 112);
-  assert(sizeof(SoundDesc) == 120);
-  assert(sizeof(OverlayDesc) == 8);
-  assert(sizeof(ChestDesc) == 36);
-  assert(sizeof(ObjectDesc_mm6) == 52);
-  assert(sizeof(ObjectDesc) == 56);
-  assert(sizeof(DecorationDesc) == 84);
-  assert(sizeof(IconFrame) == 32);
-  assert(sizeof(PlayerFrame) == 10);
-  assert(sizeof(TextureFrame) == 20);
-  assert(sizeof(SpriteFrame) == 60);
-  assert(sizeof(RenderVertexSoft) == 0x30);
-  assert(sizeof(RenderBillboard) == 0x34);
-  assert(sizeof(Texture) == 0x48);
-  assert(sizeof(RGBTexture) == 0x28);
-  assert(sizeof(LODFile_IconsBitmaps) == 0x11BB8 + 4); // + virtual dtor ptr
-  assert(sizeof(AudioPlayer) == 0xC84);
-  assert(sizeof(SoundDesc) == 0x78);
-  assert(sizeof(stru339_spell_sound) == 0xAFD8);
-  assert(sizeof(VideoPlayer) == 0x108 + 4);
-  assert(sizeof(MovieHeader) == 0x2C);
-  assert(sizeof(DecorationDesc) == 0x54);
-  assert(sizeof(ObjectDesc) == 0x38);
-  assert(sizeof(OverlayDesc) == 0x8);
-  assert(sizeof(ChestDesc) == 0x24);
-  assert(sizeof(TileDesc) == 0x1A);
-  assert(sizeof(MonsterDesc_mm6) == 148);
-  assert(sizeof(MonsterDesc) == 152);
-  assert(sizeof(Timer) == 0x28);
-  assert(sizeof(OtherOverlay) == 0x14);
-  assert(sizeof(ItemGen) == 0x24);
-  assert(sizeof(SpriteObject) == 0x70);
-  assert(sizeof(ItemDesc) == 0x30);
-  assert(sizeof(ItemsTable) == 0x117A0);
-  assert(sizeof(Chest) == 0x14CC);
-  assert(sizeof(MapInfo) == 0x44);
-  assert(sizeof(SpellInfo) == 0x24);
-  assert(sizeof(SpellData) == 0x14);
-  assert(sizeof(SpellBuff) == 0x10);
-  assert(sizeof(AIDirection) == 0x1C);
-  assert(sizeof(ActorJob) == 0xC);
-  assert(sizeof(Actor) == 0x344);
-  assert(sizeof(LevelDecoration) == 0x20);
-  assert(sizeof(KeyboardActionMapping) == 0x20C);
-  assert(sizeof(UIAnimation) == 0xD);
-  assert(sizeof(SpawnPointMM7) == 0x18);
-  assert(sizeof(ODMFace) == 0x134);
-  assert(sizeof(BSPNode) == 0x8);
-  assert(sizeof(BSPModel) == 0xBC);
-  assert(sizeof(OutdoorLocation) == 0x1C28C);
-  assert(sizeof(BLVFace) == 0x60);
-  assert(sizeof(BLVFaceExtra) == 0x24);
-  assert(sizeof(BLVSector) == 0x74);
-  assert(sizeof(BLVLightMM7) == 0x10);
-  assert(sizeof(BLVDoor) == 0x50);
-  assert(sizeof(IndoorLocation) == 0x690);
-  //assert(sizeof(ODMRenderParams) == 0x74);
-  assert(sizeof(Mouse) == 0x114);
-  assert(sizeof(Particle_sw) == 0x68);
-  assert(sizeof(Particle) == 0x68);
-  assert(sizeof(ParticleEngine) == 0xE430);
-  assert(sizeof(Lightmap) == 0xC1C);
-  assert(sizeof(LightmapBuilder) == 0x3CBC38);
-  assert(sizeof(Vis_SelectionList) == 0x2008);
-  assert(sizeof(Vis) == 0x20D0);
-  assert(sizeof(PlayerBuffAnim) == 0x10);
-  assert(sizeof(ProjectileAnim) == 0x1C);
-  assert(sizeof(stru6) == 0x5F8);
-  assert(sizeof(IndoorCameraD3D_Vec3) == 0x10);
-  assert(sizeof(IndoorCameraD3D_Vec4) == 0x18); //should be 14 (10 vec3 + 4 vdtor)  but 18 coz of his +4 from own vdtor, but it is odd since vdtor already present from vec3
-  //assert(sizeof(IndoorCameraD3D) == 0x1A1384);
-  assert(sizeof(StationaryLight) == 0xC);
-  assert(sizeof(LightsStack_StationaryLight_) == 0x12C8);
-  assert(sizeof(MobileLight) == 0x12);
-  assert(sizeof(LightsStack_MobileLight_) == 0x1C28);
-  assert(sizeof(Game) == 0xE78);
-  assert(sizeof(stru141_actor_collision_object) == 0xA8);
-  assert(sizeof(ActionQueue) == 0x7C);
-  assert(sizeof(NPCData) == 0x4C);
-  assert(sizeof(NPCStats) == 0x17FFC);
-  assert(sizeof(BspRenderer) == 0x53740);
-  assert(sizeof(PaletteManager) == 0x267AF0);
-  assert(sizeof(ViewingParams) == 0x26C);
-  //assert(sizeof(IndoorCamera) == 0x50);
-  assert(sizeof(Bloodsplat) == 0x28);
-  assert(sizeof(BloodsplatContainer) == 0xA0C);
-  assert(sizeof(TrailParticle) == 0x18);
-  assert(sizeof(EventIndex) == 0xC);
-  assert(sizeof(_2devent) == 0x34);
-  assert(sizeof(stru176) == 0x20);
-  assert(sizeof(SavegameHeader) == 0x64);
-  assert(sizeof(SavegameList) == 0x3138);
-  assert(sizeof(StorylineText) == 0x160);
-  assert(sizeof(FactionTable) == 0x1EF1);
-  assert(sizeof(Decal) == 0xC20);
-  assert(sizeof(DecalBuilder) == 0x30C038);
-  assert(sizeof(MonsterInfo) == 0x58);
-  assert(sizeof(MonsterStats) == 0x5BA0);
-  assert(sizeof(RenderD3D) == 0x148);
-//  assert(sizeof(Render) == 0x129844);
-  assert(sizeof(Player) == 0x1B3C);
-  assert(sizeof(PartyTimeStruct) == 0x678);
-  assert(sizeof(Party) == 0x16238);
-  assert(sizeof(GUIButton) == 0xBC);
-  assert(sizeof(GUIWindow) == 0x54);
-  assert(sizeof(GUIProgressBar) == 0x1B8);
-  assert(sizeof(GUIFont) == 0x1020);
- // assert(sizeof(stru262_TurnBased) == 0x40);
-  assert(sizeof(ArcomageGame) == 0xFB);
-  assert(sizeof(CastSpellInfo) == 0x14);
-  assert(sizeof(ArcomageCard) == 0x6C);
-  assert(sizeof(stru320) == 0x3FC);
-  assert(sizeof(TravelInfo) == 0x20);
-  assert(sizeof(stru336) == 0x798);
-  assert(sizeof(Vec3_short_) == 6);
-  assert(sizeof(BLVFace) == 96);
-  assert(sizeof(BLVFaceExtra) == 36);
-  assert(sizeof(BLVSector) == 116);
-  assert(sizeof(LevelDecoration) == 32);
-  assert(sizeof(BLVLightMM7) == 16);
-  assert(sizeof(BSPNode) == 8);
-  assert(sizeof(SpawnPointMM7) == 24);
-  assert(sizeof(DDM_DLV_Header) == 40);
-  assert(sizeof(Actor) == 836);
-  assert(sizeof(SpriteObject) == 112);
-  assert(sizeof(Chest) == 5324);
-  assert(sizeof(stru123) == 0xC8);
-  assert(sizeof(BLVMapOutline) == 12);
-  assert(sizeof(LODSprite) == 0x28);
+  static_assert(sizeof(MovieHeader) == 44, "Wrong type size");
+  static_assert(sizeof(SoundDesc_mm6) == 112, "Wrong type size");
+  static_assert(sizeof(SoundDesc) == 120, "Wrong type size");
+  static_assert(sizeof(OverlayDesc) == 8, "Wrong type size");
+  static_assert(sizeof(ChestDesc) == 36, "Wrong type size");
+  static_assert(sizeof(ObjectDesc_mm6) == 52, "Wrong type size");
+  static_assert(sizeof(ObjectDesc) == 56, "Wrong type size");
+  static_assert(sizeof(DecorationDesc) == 84, "Wrong type size");
+  static_assert(sizeof(IconFrame) == 32, "Wrong type size");
+  static_assert(sizeof(PlayerFrame) == 10, "Wrong type size");
+  static_assert(sizeof(TextureFrame) == 20, "Wrong type size");
+  static_assert(sizeof(SpriteFrame) == 60, "Wrong type size");
+  static_assert(sizeof(RenderVertexSoft) == 0x30, "Wrong type size");
+  static_assert(sizeof(RenderBillboard) == 0x34, "Wrong type size");
+  static_assert(sizeof(Texture) == 0x48, "Wrong type size");
+  static_assert(sizeof(RGBTexture) == 0x28, "Wrong type size");
+  static_assert(sizeof(LODFile_IconsBitmaps) == 0x11BB8 + 4, "Wrong type size"); // + virtual dtor ptr
+  static_assert(sizeof(AudioPlayer) == 0xC84, "Wrong type size");
+  static_assert(sizeof(SoundDesc) == 0x78, "Wrong type size");
+  static_assert(sizeof(stru339_spell_sound) == 0xAFD8, "Wrong type size");
+  static_assert(sizeof(VideoPlayer) == 0x108 + 4, "Wrong type size");
+  static_assert(sizeof(MovieHeader) == 0x2C, "Wrong type size");
+  static_assert(sizeof(DecorationDesc) == 0x54, "Wrong type size");
+  static_assert(sizeof(ObjectDesc) == 0x38, "Wrong type size");
+  static_assert(sizeof(OverlayDesc) == 0x8, "Wrong type size");
+  static_assert(sizeof(ChestDesc) == 0x24, "Wrong type size");
+  static_assert(sizeof(TileDesc) == 0x1A, "Wrong type size");
+  static_assert(sizeof(MonsterDesc_mm6) == 148, "Wrong type size");
+  static_assert(sizeof(MonsterDesc) == 152, "Wrong type size");
+  static_assert(sizeof(Timer) == 0x28, "Wrong type size");
+  static_assert(sizeof(OtherOverlay) == 0x14, "Wrong type size");
+  static_assert(sizeof(ItemGen) == 0x24, "Wrong type size");
+  static_assert(sizeof(SpriteObject) == 0x70, "Wrong type size");
+  static_assert(sizeof(ItemDesc) == 0x30, "Wrong type size");
+  static_assert(sizeof(ItemsTable) == 0x117A0, "Wrong type size");
+  static_assert(sizeof(Chest) == 0x14CC, "Wrong type size");
+  static_assert(sizeof(MapInfo) == 0x44, "Wrong type size");
+  static_assert(sizeof(SpellInfo) == 0x24, "Wrong type size");
+  static_assert(sizeof(SpellData) == 0x14, "Wrong type size");
+  static_assert(sizeof(SpellBuff) == 0x10, "Wrong type size");
+  static_assert(sizeof(AIDirection) == 0x1C, "Wrong type size");
+  static_assert(sizeof(ActorJob) == 0xC, "Wrong type size");
+  static_assert(sizeof(Actor) == 0x344, "Wrong type size");
+  static_assert(sizeof(LevelDecoration) == 0x20, "Wrong type size");
+  static_assert(sizeof(KeyboardActionMapping) == 0x20C, "Wrong type size");
+  static_assert(sizeof(UIAnimation) == 0xD, "Wrong type size");
+  static_assert(sizeof(SpawnPointMM7) == 0x18, "Wrong type size");
+  static_assert(sizeof(ODMFace) == 0x134, "Wrong type size");
+  static_assert(sizeof(BSPNode) == 0x8, "Wrong type size");
+  static_assert(sizeof(BSPModel) == 0xBC, "Wrong type size");
+  static_assert(sizeof(OutdoorLocation) == 0x1C28C, "Wrong type size");
+  static_assert(sizeof(BLVFace) == 0x60, "Wrong type size");
+  static_assert(sizeof(BLVFaceExtra) == 0x24, "Wrong type size");
+  static_assert(sizeof(BLVSector) == 0x74, "Wrong type size");
+  static_assert(sizeof(BLVLightMM7) == 0x10, "Wrong type size");
+  static_assert(sizeof(BLVDoor) == 0x50, "Wrong type size");
+  static_assert(sizeof(IndoorLocation) == 0x690, "Wrong type size");
+  //static_assert(sizeof(ODMRenderParams) == 0x74, "Wrong type size");
+  static_assert(sizeof(Mouse) == 0x114, "Wrong type size");
+  static_assert(sizeof(Particle_sw) == 0x68, "Wrong type size");
+  static_assert(sizeof(Particle) == 0x68, "Wrong type size");
+  static_assert(sizeof(ParticleEngine) == 0xE430, "Wrong type size");
+  static_assert(sizeof(Lightmap) == 0xC1C, "Wrong type size");
+  static_assert(sizeof(LightmapBuilder) == 0x3CBC38, "Wrong type size");
+  static_assert(sizeof(Vis_SelectionList) == 0x2008, "Wrong type size");
+  static_assert(sizeof(Vis) == 0x20D0, "Wrong type size");
+  static_assert(sizeof(PlayerBuffAnim) == 0x10, "Wrong type size");
+  static_assert(sizeof(ProjectileAnim) == 0x1C, "Wrong type size");
+  static_assert(sizeof(stru6) == 0x5F8, "Wrong type size");
+  static_assert(sizeof(IndoorCameraD3D_Vec3) == 0x10, "Wrong type size");
+  static_assert(sizeof(IndoorCameraD3D_Vec4) == 0x18, "Wrong type size"); //should be 14 (10 vec3 + 4 vdtor)  but 18 coz of his +4 from own vdtor, but it is odd since vdtor already present from vec3
+  //static_assert(sizeof(IndoorCameraD3D) == 0x1A1384, "Wrong type size");
+  static_assert(sizeof(StationaryLight) == 0xC, "Wrong type size");
+  static_assert(sizeof(LightsStack_StationaryLight_) == 0x12C8, "Wrong type size");
+  static_assert(sizeof(MobileLight) == 0x12, "Wrong type size");
+  static_assert(sizeof(LightsStack_MobileLight_) == 0x1C28, "Wrong type size");
+  static_assert(sizeof(Game) == 0xE78, "Wrong type size");
+  static_assert(sizeof(stru141_actor_collision_object) == 0xA8, "Wrong type size");
+  static_assert(sizeof(ActionQueue) == 0x7C, "Wrong type size");
+  static_assert(sizeof(NPCData) == 0x4C, "Wrong type size");
+  static_assert(sizeof(NPCStats) == 0x17FFC, "Wrong type size");
+  static_assert(sizeof(BspRenderer) == 0x53740, "Wrong type size");
+  static_assert(sizeof(PaletteManager) == 0x267AF0, "Wrong type size");
+  static_assert(sizeof(ViewingParams) == 0x26C, "Wrong type size");
+  //static_assert(sizeof(IndoorCamera) == 0x50, "Wrong type size");
+  static_assert(sizeof(Bloodsplat) == 0x28, "Wrong type size");
+  static_assert(sizeof(BloodsplatContainer) == 0xA0C, "Wrong type size");
+  static_assert(sizeof(TrailParticle) == 0x18, "Wrong type size");
+  static_assert(sizeof(EventIndex) == 0xC, "Wrong type size");
+  static_assert(sizeof(_2devent) == 0x34, "Wrong type size");
+  static_assert(sizeof(stru176) == 0x20, "Wrong type size");
+  static_assert(sizeof(SavegameHeader) == 0x64, "Wrong type size");
+  static_assert(sizeof(SavegameList) == 0x3138, "Wrong type size");
+  static_assert(sizeof(StorylineText) == 0x160, "Wrong type size");
+  static_assert(sizeof(FactionTable) == 0x1EF1, "Wrong type size");
+  static_assert(sizeof(Decal) == 0xC20, "Wrong type size");
+  static_assert(sizeof(DecalBuilder) == 0x30C038, "Wrong type size");
+  static_assert(sizeof(MonsterInfo) == 0x58, "Wrong type size");
+  static_assert(sizeof(MonsterStats) == 0x5BA0, "Wrong type size");
+  static_assert(sizeof(RenderD3D) == 0x148, "Wrong type size");
+  //  static_assert(sizeof(Render) == 0x129844, "Wrong type size");
+  static_assert(sizeof(Player) == 0x1B3C, "Wrong type size");
+  static_assert(sizeof(PartyTimeStruct) == 0x678, "Wrong type size");
+  static_assert(sizeof(Party) == 0x16238, "Wrong type size");
+  static_assert(sizeof(GUIButton) == 0xBC, "Wrong type size");
+  static_assert(sizeof(GUIWindow) == 0x54, "Wrong type size");
+  static_assert(sizeof(GUIProgressBar) == 0x1B8, "Wrong type size");
+  static_assert(sizeof(GUIFont) == 0x1020, "Wrong type size");
+  // static_assert(sizeof(stru262_TurnBased) == 0x40, "Wrong type size");
+  static_assert(sizeof(ArcomageGame) == 0xFB, "Wrong type size");
+  static_assert(sizeof(CastSpellInfo) == 0x14, "Wrong type size");
+  static_assert(sizeof(ArcomageCard) == 0x6C, "Wrong type size");
+  static_assert(sizeof(stru320) == 0x3FC, "Wrong type size");
+  static_assert(sizeof(TravelInfo) == 0x20, "Wrong type size");
+  static_assert(sizeof(stru336) == 0x798, "Wrong type size");
+  static_assert(sizeof(Vec3_short_) == 6, "Wrong type size");
+  static_assert(sizeof(BLVFace) == 96, "Wrong type size");
+  static_assert(sizeof(BLVFaceExtra) == 36, "Wrong type size");
+  static_assert(sizeof(BLVSector) == 116, "Wrong type size");
+  static_assert(sizeof(LevelDecoration) == 32, "Wrong type size");
+  static_assert(sizeof(BLVLightMM7) == 16, "Wrong type size");
+  static_assert(sizeof(BSPNode) == 8, "Wrong type size");
+  static_assert(sizeof(SpawnPointMM7) == 24, "Wrong type size");
+  static_assert(sizeof(DDM_DLV_Header) == 40, "Wrong type size");
+  static_assert(sizeof(Actor) == 836, "Wrong type size");
+  static_assert(sizeof(SpriteObject) == 112, "Wrong type size");
+  static_assert(sizeof(Chest) == 5324, "Wrong type size");
+  static_assert(sizeof(stru123) == 0xC8, "Wrong type size");
+  static_assert(sizeof(BLVMapOutline) == 12, "Wrong type size");
+  static_assert(sizeof(LODSprite) == 0x28, "Wrong type size");
 }
 
 bool new_sky = false;