changeset 131:d2ca891da89f

Слияние
author Ritor1
date Wed, 07 Nov 2012 22:10:04 +0600
parents 7b12505a23c0 (current diff) 8feb2dfd2f89 (diff)
children 8981a63bb559
files Indoor.cpp LOD.cpp Outdoor.cpp mm7_2.cpp
diffstat 22 files changed, 829 insertions(+), 2321 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/Game.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -449,7 +449,7 @@
         dword_5B65C0 = 1;
         PrepareWorld(1u);
       }
-      UpdateActors();
+      InitializeActors();
       v11 = 0;
       do
       {
--- a/Indoor.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/Indoor.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -4493,8 +4493,8 @@
     Abortf("Out of memory loading indoor level");
   if ( !(dword_6BE364_game_settings_1 & 0x2000) )
   {
-    UpdateActors();
-    UpdateLayingItems();
+    InitializeActors();
+    InitializeLayingItems();
   }
   BYTE1(dword_6BE364_game_settings_1) &= 0xDFu;
   if ( !v39 )
@@ -4653,8 +4653,8 @@
           if ( v35 < 124 )
           {
             v21 = v35 + 1;
-            pDecortaion->field_1C = v35 + 75;
-            v22 = stru_5E4C90.field_0[v21 + 74];
+            pDecortaion->_idx_in_stru123 = v35 + 75;
+            v22 = stru_5E4C90._decor_events[v21 + 74 - 75];
             v35 = v21;
             if ( !v22 )
               pDecortaion->field_2 |= 0x20;
--- a/Indoor.h	Wed Nov 07 22:09:43 2012 +0600
+++ b/Indoor.h	Wed Nov 07 22:10:04 2012 +0600
@@ -36,7 +36,7 @@
   __int16 field_16_event_id;
   __int16 field_18;
   __int16 field_1A;
-  __int16 field_1C;
+  __int16 _idx_in_stru123;
   __int16 field_1E;
 };
 #pragma pack(pop)
--- a/LOD.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/LOD.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -1019,8 +1019,8 @@
   v4->pFile = v6;
   if ( !v6 )
     return 3;
-  fwrite(pHeader, 0x100u, 1u, v6);
-  fwrite(pDir, 0x20u, 1u, v4->pFile);
+  fwrite(pHeader, 0x100, 1, v6);
+  fwrite(pDir, 0x20, 1, v4->pFile);
   fclose(v4->pFile);
   v4->pFile = 0;
   return 0;
@@ -1518,7 +1518,7 @@
   v13 = v12;
   if ( v12 )
   {
-    fwrite(&v1->header, 0x100u, 1u, v12);
+    fwrite(&v1->header, 0x100, 1, v12);
 
     LOD::Directory v0; // [sp+20Ch] [bp-28h]@11
     //LOD::Directory::LOD::Directory(&v0);
@@ -1530,8 +1530,8 @@
     v0.word_00001E = 0;
     v0.uDataSize = v21;
     v0.uNumSubIndices = LOWORD(v1->uNumSubIndices);
-    fwrite(&v0, 0x20u, 1u, v13);
-    fwrite(v1->pSubIndices, 0x20u, v1->uNumSubIndices, v13);
+    fwrite(&v0, 0x20, 1, v13);
+    fwrite(v1->pSubIndices, 0x20, v1->uNumSubIndices, v13);
     v16 = v1->pOutputFileHandle;
     v22 = v2;
     fseek(v16, 0, 0);
@@ -1542,8 +1542,8 @@
         v17 = v1->uIOBufferSize;
         if ( v22 <= (signed int)v17 )
           v17 = v22;
-        fread(v1->pIOBuffer, 1u, v17, v1->pOutputFileHandle);
-        fwrite(v1->pIOBuffer, 1u, v17, v13);
+        fread(v1->pIOBuffer, 1, v17, v1->pOutputFileHandle);
+        fwrite(v1->pIOBuffer, 1, v17, v13);
         v22 -= v17;
       }
       while ( v22 > 0 );
@@ -1645,6 +1645,193 @@
 // 6A0CA8: using guessed type int 6A0CA8_lod_unused;
 
 //----- (00461B48) --------------------------------------------------------
+/*unsigned int LODWriteableFile::Write(const LOD::Directory *pDir, const void *pDirData, int a4)
+{
+  LODWriteableFile *v4; // ebx@1
+  int v5; // esi@1
+  unsigned __int8 v7; // zf@7
+  unsigned __int8 v8; // sf@7
+  const LOD::Directory *v9; // edi@9
+  int v10; // eax@9
+  unsigned __int8 v11; // of@15
+  unsigned __int16 v12; // dx@17
+  LOD::Directory *v13; // eax@17
+  unsigned __int16 v14; // cx@17
+  int v15; // edi@27
+  unsigned int v16; // eax@27
+  int v17; // eax@29
+  int v18; // edx@31
+  int v19; // eax@31
+  void *v20; // edi@32
+  LOD::Directory *v21; // edi@34
+  signed int v22; // esi@34
+  int v23; // eax@34
+  LOD::Directory *v24; // ecx@35
+  int v25; // edx@35
+  __int32 v26; // eax@37
+  int i; // esi@39
+  __int32 v28; // esi@46
+  char pFilename[256]; // [sp+Ch] [bp-230h]@22
+  char NewFilename[256]; // [sp+10Ch] [bp-130h]@51
+  //LOD::Directory Str; // [sp+20Ch] [bp-30h]@27
+  size_t v33; // [sp+22Ch] [bp-10h]@27
+  int v34; // [sp+230h] [bp-Ch]@7
+  __int32 v35; // [sp+234h] [bp-8h]@8
+  int v36; // [sp+238h] [bp-4h]@7
+  size_t Count; // [sp+244h] [bp+8h]@40
+  __int32 Countc; // [sp+244h] [bp+8h]@46
+  size_t Countb; // [sp+244h] [bp+8h]@47
+  FILE *pFile; // [sp+24Ch] [bp+10h]@22
+
+  v4 = this;
+  v5 = 0;
+  if ( !this->isFileOpened )
+    return 1;
+  if ( !this->pSubIndices )
+    return 2;
+  if ( !this->pIOBuffer || !this->uIOBufferSize )
+    return 3;
+  v7 = this->uNumSubIndices == 0;
+  v8 = (this->uNumSubIndices & 0x80000000u) != 0;
+  v36 = 0;
+  v34 = 0;
+  if ( v8 | v7 )
+  {
+    v9 = pDir;
+    goto LABEL_22;
+  }
+  v35 = 0;
+  while ( 1 )
+  {
+    v9 = pDir;
+    v10 = _strcmpi((const char *)v4->pSubIndices + v35, (const char *)pDir);
+    if ( v10 )
+    {
+      if ( v10 > 0 )
+        goto LABEL_22;
+      goto LABEL_15;
+    }
+    if ( !a4 )
+      goto LABEL_20;
+    if ( a4 == 1 )
+      break;
+    if ( a4 == 2 )
+      return 4;
+LABEL_15:
+    v35 += 32;
+    ++v5;
+    v11 = __OFSUB__(v5, v4->uNumSubIndices);
+    v8 = ((v5 - v4->uNumSubIndices) & 0x80000000u) != 0;
+    v34 = v5;
+    if ( !(v8 ^ v11) )
+      goto LABEL_22;
+  }
+  v12 = pDir->uNumSubIndices;
+  v13 = &v4->pSubIndices[v5];
+  v14 = v13->uNumSubIndices;
+  if ( v14 >= v12 && (v14 != v12 || (unsigned __int16)v13->word_00001E >= pDir->word_00001E) )
+    return 4;
+LABEL_20:
+  v36 = 1;
+LABEL_22:
+  strcpy(pFilename, "lod.tmp");
+  pFile = fopen(pFilename, "wb+");
+  if ( !pFile )
+    return 5;
+  if ( v36 )
+    v35 = v4->pSubIndices[v5].uDataSize;
+  else
+    v35 = 0;
+  v33 = v9->uDataSize;
+  v15 = v33 - v35;
+
+  LOD::Directory Str; // [sp+20Ch] [bp-30h]@27
+  //LOD::Directory::LOD::Directory(&Str);
+
+  strcpy((char *)&Str, "chapter");
+  v16 = v4->uLODDataSize;
+  Str.uNumSubIndices = LOWORD(v4->uNumSubIndices);
+  Str.dword_000018 = 0;
+  Str.word_00001E = 0;
+  if ( !v36 )
+  {
+    ++Str.uNumSubIndices;
+    v15 += 32;
+  }
+  v7 = v36 == 0;
+  Str.uDataSize = v15 + v16;
+  Str.uOfsetFromSubindicesStart = 288;
+  v17 = (signed __int16)Str.uNumSubIndices;
+  v4->uNumSubIndices = (signed __int16)Str.uNumSubIndices;
+  if ( v7 && v17 > v5 )
+  {
+    v18 = v17;
+    v19 = v17 - v5;
+    do
+    {
+      v20 = &v4->pSubIndices[v18];
+      --v18;
+      --v19;
+      memcpy(v20, (char *)v20 - 32, 0x20u);
+    }
+    while ( v19 );
+    v5 = v34;
+  }
+  v34 = 32 * v5;
+  memcpy(&v4->pSubIndices[v5], pDir, sizeof(v4->pSubIndices[v5]));
+  v23 = 32 * v4->uNumSubIndices;
+  if ( (signed int)v4->uNumSubIndices > 0 )
+  {
+    for (int i =  0; i < (signed int)v4->uNumSubIndices; ++i)
+    {
+      v4->pSubIndices[i].uOfsetFromSubindicesStart = v23;
+      v23 += v4->pSubIndices[i].uDataSize;
+    }
+  }
+  fwrite(&v4->header, 0x100, 1, pFile);
+  fwrite(&Str, 0x20, 1, pFile);
+  fseek(v4->pFile, Str.uOfsetFromSubindicesStart, 0);
+  fwrite(v4->pSubIndices, 0x20u, v4->uNumSubIndices, pFile);
+  v26 = 32 * v4->uNumSubIndices;
+  if ( !v36 )
+    v26 -= 32;
+  fseek(v4->pFile, v26, 1);
+  for ( i = *(unsigned int *)((char *)&v4->pSubIndices->uOfsetFromSubindicesStart + v34)
+          - v4->pSubIndices->uOfsetFromSubindicesStart; i > 0; i -= Count )
+  {
+    Count = v4->uIOBufferSize;
+    if ( i <= (signed int)v4->uIOBufferSize )
+      Count = i;
+    fread(v4->pIOBuffer, 1u, Count, v4->pFile);
+    fwrite(v4->pIOBuffer, 1u, Count, pFile);
+  }
+  fwrite(pDirData, 1u, v33, pFile);
+  if ( v36 )
+    fseek(v4->pFile, v35, 1);
+  Countc = ftell(v4->pFile);
+  fseek(v4->pFile, 0, 2);
+  v28 = ftell(v4->pFile) - Countc;
+  fseek(v4->pFile, Countc, 0);
+  while ( v28 > 0 )
+  {
+    Countb = v4->uIOBufferSize;
+    if ( v28 <= (signed int)v4->uIOBufferSize )
+      Countb = v28;
+    fread(v4->pIOBuffer, 1u, Countb, v4->pFile);
+    fwrite(v4->pIOBuffer, 1u, Countb, pFile);
+    v28 -= Countb;
+  }
+  strcpy(NewFilename, (const char *)v4->pLODName);
+  fclose(pFile);
+  v4->CloseWriteFile();
+  remove(NewFilename);
+  rename(pFilename, NewFilename);
+  v4->CloseWriteFile();
+  v4->LoadFile(v4->pLODName, 0);
+  return 0;
+}
+*/
+
 unsigned int LODWriteableFile::Write(const LOD::Directory *pDir, const void *pDirData, int a4)
 {
   LODWriteableFile *v4; // ebx@1
@@ -1777,27 +1964,19 @@
     while ( v19 );
     v5 = v34;
   }
-  v21 = v4->pSubIndices;
   v34 = 32 * v5;
-  memcpy(&v21[v5], pDir, sizeof(v21[v5]));
-  v22 = 0;
+  memcpy(&v4->pSubIndices[v5], pDir, sizeof(v4->pSubIndices[v5]));
   v23 = 32 * v4->uNumSubIndices;
   if ( (signed int)v4->uNumSubIndices > 0 )
   {
-    v24 = v4->pSubIndices;
-    v25 = 0;
-    do
+    for (int i =  0; i < (signed int)v4->uNumSubIndices; ++i)
     {
-      v24[v25].uOfsetFromSubindicesStart = v23;
-      v24 = v4->pSubIndices;
-      v23 += v24[v25].uDataSize;
-      ++v22;
-      ++v25;
+      v4->pSubIndices[i].uOfsetFromSubindicesStart = v23;
+      v23 += v4->pSubIndices[i].uDataSize;
     }
-    while ( v22 < (signed int)v4->uNumSubIndices );
   }
-  fwrite(&v4->header, 0x100u, 1u, pFile);
-  fwrite(&Str, 0x20u, 1u, pFile);
+  fwrite(&v4->header, 0x100, 1, pFile);
+  fwrite(&Str, 0x20, 1, pFile);
   fseek(v4->pFile, Str.uOfsetFromSubindicesStart, 0);
   fwrite(v4->pSubIndices, 0x20u, v4->uNumSubIndices, pFile);
   v26 = 32 * v4->uNumSubIndices;
--- a/LOD.h	Wed Nov 07 22:09:43 2012 +0600
+++ b/LOD.h	Wed Nov 07 22:10:04 2012 +0600
@@ -1,7 +1,7 @@
 #pragma once
 #include <stdio.h>
 #include "Texture.h"
-
+#include <memory.h>
 
 
 /*  354 */
@@ -20,6 +20,12 @@
   #pragma pack(push, 1)
   struct FileHeader
   {
+    inline FileHeader()
+    {
+      memset(array_0000B0, 0, 28);
+      memset(array_0000CC, 0, 52);
+    }
+
     void Reset();
 
     unsigned __int8 pSignature[4];
--- a/LayingItem.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/LayingItem.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -114,6 +114,8 @@
   unsigned __int16 *pAttributes; // ecx@2
   unsigned __int16 v3; // ax@2
 
+  __debugbreak(); // find out what's going on
+
   v1 = uLayingItemID;
   pLayingItems[v1].uObjectDescID = 0;
   if ( pParty->bTurnBasedModeOn == 1 )
--- a/Monsters.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/Monsters.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -1432,7 +1432,7 @@
                                                 }
                                                 else
                                                 {
-                                                  if ( strstr((const char *)v2, off_4E8910) )
+                                                  if ( strstr((const char *)v2, "age") )
                                                   {
                                                     v44->uSpecialAttack = 21;
                                                   }
--- a/Outdoor.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/Outdoor.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -1281,8 +1281,8 @@
   int v108; // [sp+0h] [bp-B80h]@10
   char Src[968]; // [sp+10h] [bp-B70h]@110
   char Dst[968]; // [sp+3D8h] [bp-7A8h]@50
-  /*char Str[256]; // [sp+7A0h] [bp-3E0h]@50
-  char DstBuf; // [sp+8A0h] [bp-2E0h]@10
+  char Str[256]; // [sp+7A0h] [bp-3E0h]@50
+  /*char DstBuf; // [sp+8A0h] [bp-2E0h]@10
   __int32 Offset; // [sp+8A4h] [bp-2DCh]@10
   __int32 v114; // [sp+8B0h] [bp-2D0h]@10
   __int32 v115; // [sp+8BCh] [bp-2C4h]@10
@@ -2666,11 +2666,9 @@
 }
 
 //----- (0047F138) --------------------------------------------------------
-int OutdoorLocation::PrepareDecorations()
+bool OutdoorLocation::PrepareDecorations()
 {
   signed int v1; // ebx@1
-  signed int v2; // edi@3
-  LevelDecoration *v3; // esi@4
   __int16 v4; // ax@5
   int v5; // eax@7
   __int16 v6; // ax@14
@@ -2680,42 +2678,38 @@
   v8 = 0;
   if ( !_strcmpi(pCurrentMapName, "out09.odm") )
     v8 = 1;
-  v2 = 0;
-  if ( (signed int)uNumLevelDecorations > 0 )
+
+  for (uint i = 0; i < uNumLevelDecorations; ++i)
   {
-    v3 = pLevelDecorations;
-    do
-    {
-      pDecorationList->InitializeDecorationSprite(v3->uDecorationDescID);
-      v4 = pDecorationList->pDecorations[v3->uDecorationDescID].uSoundID;
+    auto decor = pLevelDecorations + i;
+
+      pDecorationList->InitializeDecorationSprite(decor->uDecorationDescID);
+      v4 = pDecorationList->pDecorations[decor->uDecorationDescID].uSoundID;
       if ( v4 && _6807E0_num_decorations_with_sounds_6807B8 < 9 )
       {
         pSoundList->_4A9A67(v4, 0);
         v5 = _6807E0_num_decorations_with_sounds_6807B8++;
-        _6807B8_level_decorations_ids[v5] = v2;
+        _6807B8_level_decorations_ids[v5] = i;
       }
-      if ( v8 && v3->uCog == 20 )
-        LOBYTE(v3->field_2) |= 0x40u;
-      if ( !v3->field_16_event_id )
+      if ( v8 && decor->uCog == 20 )
+        LOBYTE(decor->field_2) |= 0x40u;
+      if ( !decor->field_16_event_id )
       {
-        if ( v3->IsInteractive() )
+        if ( decor->IsInteractive() )
         {
           if ( v1 < 124 )
           {
-            v6 = v1++ + 75;
-            v3->field_1C = v6;
-            if ( !stru_5E4C90.field_0[v1 + 74] )
-              LOBYTE(v3->field_2) |= 0x20u;
+            v6 = v1 + 75;
+            decor->_idx_in_stru123 = v6;
+            if ( !stru_5E4C90._decor_events[v1++] )
+              LOBYTE(decor->field_2) |= 0x20u;
           }
         }
       }
-      ++v2;
-      ++v3;
-    }
-    while ( v2 < (signed int)uNumLevelDecorations );
   }
+
   pGameLoadingUI_ProgressBar->Progress();
-  return 1;
+  return true;
 }
 // 6807E0: using guessed type int _6807E0_num_decorations_6807B8;
 
--- a/Outdoor.h	Wed Nov 07 22:09:43 2012 +0600
+++ b/Outdoor.h	Wed Nov 07 22:10:04 2012 +0600
@@ -154,7 +154,7 @@
   bool _47F04C(signed int a2, signed int a3);
   bool _47F097(signed int a2, signed int a3);
   bool _47F0E2();
-  int PrepareDecorations();
+  bool PrepareDecorations();
   int _47F223_LooksLikeGenerateMonsterLoot();
   bool InitalizeActors(int a1);
   bool _47F3EA();
--- a/Player.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/Player.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -3183,7 +3183,7 @@
   else
   {
     v5 = player__getrangeddamagestring_static_buff;
-    strcpy(player__getrangeddamagestring_static_buff, off_4EE75C);
+    strcpy(player__getrangeddamagestring_static_buff, "N/A");
   }
   v8 = v1->pEquipment.uMainHand;
   if ( v8 )
--- a/SaveLoad.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/SaveLoad.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -228,7 +228,7 @@
 int __fastcall SaveGame(int a1, __int16 *a2)
 {
   int result; // eax@1
-  void *v3; // edi@5
+  void *pScreenshot; // edi@5
   int v4; // eax@6
   int v5; // eax@6
   int v6; // eax@6
@@ -264,20 +264,19 @@
   const char *v36; // [sp-10h] [bp-280h]@6
   const char *v37; // [sp-Ch] [bp-27Ch]@6
   const char *v38; // [sp-8h] [bp-278h]@8
-  int v39; // [sp-4h] [bp-274h]@8
   CHAR Buffer; // [sp+Ch] [bp-264h]@59
   char Dir; // [sp+8Ch] [bp-1E4h]@51
   char Drive; // [sp+ACh] [bp-1C4h]@51
   int v43; // [sp+CCh] [bp-1A4h]@10
   char Dest[20]; // [sp+E0h] [bp-190h]@10
-  unsigned __int64 v45; // [sp+F4h] [bp-17Ch]@10
+  unsigned __int64 pTimePlayed; // [sp+F4h] [bp-17Ch]@10
   char Filename; // [sp+130h] [bp-140h]@51
   char Ext; // [sp+150h] [bp-120h]@51
   char v48; // [sp+151h] [bp-11Fh]@51
   char Source[32]; // [sp+170h] [bp-100h]@51
   char Str[120]; // [sp+190h] [bp-E0h]@8
   int v51; // [sp+208h] [bp-68h]@2
-  int v52; // [sp+20Ch] [bp-64h]@2
+  int pPositionX; // [sp+20Ch] [bp-64h]@2
   int v53; // [sp+210h] [bp-60h]@2
   int v54; // [sp+214h] [bp-5Ch]@2
   int Src; // [sp+218h] [bp-58h]@30
@@ -289,7 +288,6 @@
   int v61; // [sp+224h] [bp-4Ch]@30
   int v62; // [sp+228h] [bp-48h]@2
   LOD::Directory pDir; // [sp+22Ch] [bp-44h]@2
-  //std::string *v64; // [sp+24Ch] [bp-24h]@1
   size_t Size; // [sp+250h] [bp-20h]@26
   __int16 *v66; // [sp+254h] [bp-1Ch]@1
   void *DstBuf; // [sp+258h] [bp-18h]@2
@@ -298,359 +296,300 @@
   int v70; // [sp+264h] [bp-Ch]@22
   std::string *v71; // [sp+268h] [bp-8h]@8
   int a3; // [sp+26Fh] [bp-1h]@8
-
+  
   v66 = a2;
-  //v64 = (std::string *)a1;
-
   strcpy(byte_6BE3B0, pCurrentMapName);
   if (!_strcmpi(pCurrentMapName, "d05.blv"))
     return false;
-
-  DstBuf = malloc(0xF4240u);
+  DstBuf = malloc(0xF4240);
   pDir.Reset();
-    v52 = pParty->vPosition.x;
-    v51 = pParty->vPosition.y;
-    v62 = pParty->vPosition.z;
-    v53 = pParty->sRotationY;
-    v54 = pParty->sRotationX;
+  pPositionX = pParty->vPosition.x;
+  v51 = pParty->vPosition.y;
+  v62 = pParty->vPosition.z;
+  v53 = pParty->sRotationY;
+  v54 = pParty->sRotationX;
   pParty->vPosition.x = pParty->vPrevPosition.x;
   pParty->vPosition.y = pParty->vPrevPosition.z;
   pParty->vPosition.z = pParty->vPrevPosition.y;
   pParty->uFallStartY = pParty->vPrevPosition.y;
   pParty->sRotationY = pParty->sPrevRotationY;
   pParty->sRotationX = pParty->sPrevRotationX;
-
   if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
     pIndoor->stru1.uLastVisitDay = pParty->uTimePlayed;
   else
     pOutdoor->uLastVisitDay = pParty->uTimePlayed;
-
-  v3 = MakeScreenshot(150, 112);
+  pScreenshot = MakeScreenshot(150, 112);
+  strcpy(pDir.pFilename, "image.pcx");
+  pRenderer->_49F5A2((int)pScreenshot, 150, 112, DstBuf, 1000000, (int)&pDir.uDataSize);
+  free(pScreenshot);
+  if ( pCurrentScreen == 11 )//SaveScreen
+  {
+    pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0));
+    pRenderer->DrawTextureIndexed(0x12, 0x8D, (Texture *)(uTextureID_save_up != -1 ? &pIcons_LOD->pTextures[uTextureID_save_up] : 0));
+    v4 = pFontSmallnum->AlignText_Center(0xBA, pGlobalTXT_LocalizationStrings[190]);
+    pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, v4 + 25, 219, 0, pGlobalTXT_LocalizationStrings[190], 0, 0, 0); //
+    v5 = pFontSmallnum->AlignText_Center(0xBA, (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot);
+    pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, v5 + 25, 0x103u, 0, (const char *)(&pSavegameHeader + uLoadGameUI_SelectedSlot), 185, 0);
+    v6 = pFontSmallnum->AlignText_Center(0xBA, pGlobalTXT_LocalizationStrings[165]);
+    pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, v6 + 25, 299, 0, pGlobalTXT_LocalizationStrings[165], 0, 0, 0); //, 
+    pRenderer->Present();
+   }
+  if ( pNew_LOD->Write(&pDir, DstBuf, 0) )
+  {
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 200); //  ! Code=%d
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:773", 0);
+  }
+  strcpy(Dest, pCurrentMapName);
+  pTimePlayed = pParty->uTimePlayed;
+  strcpy((char *)&pDir, "header.bin");
+  pDir.uDataSize = 100;
+  if ( pNew_LOD->Write(&pDir, &v43, 0) )
+  {
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 201);
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:784", 0);
+  }
+  strcpy((char *)&pDir, "party.bin");
+  pDir.uDataSize = 90680;
+  if ( pNew_LOD->Write(&pDir, &pParty, 0) )
   {
-    strcpy(pDir.pFilename, "image.pcx");
-
-    pRenderer->_49F5A2((int)v3, 150, 112, DstBuf, 1000000, (int)&pDir.uDataSize);
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 202);
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:793", 0);
+  }
+  strcpy((char *)&pDir, "clock.bin");
+  pDir.uDataSize = 40;
+  if ( pNew_LOD->Write(&pDir, &pEventTimer, 0) )
+  {
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 203);
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:802", 0);
+  }
+  strcpy((char *)&pDir, "overlay.bin");
+  pDir.uDataSize = 1008;
+  if ( pNew_LOD->Write(&pDir, &pOtherOverlayList, 0) )
+  {
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 204);
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:811", 0);
   }
-  free(v3);
-
-    if ( pCurrentScreen == 11 )
+  strcpy((char *)&pDir, "npcdata.bin");
+  pDir.uDataSize = 38076;
+  if ( pNew_LOD->Write(&pDir, pNPCStats->pNewNPCData, 0) )
+  {
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 205);
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:820", 0);
+  }
+  strcpy((char *)&pDir, "npcgroup.bin");
+  pDir.uDataSize = 102;
+  if ( pNew_LOD->Write(&pDir, pNPCStats->pGroups_copy, 0) )
+  {
+    sprintf(Str, pGlobalTXT_LocalizationStrings[612], 206);
+    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:829", 0);
+  }
+  for (int i =  1; i <= 4; ++i) // 4 - players
+  {
+    for (int j =  1; j <= 5; ++j) // 5 - images
     {
-      pRenderer->DrawTextureIndexed(
-        8u,
-        8u,
-        (Texture *)(uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0));
-      pRenderer->DrawTextureIndexed(
-        0x12u,
-        0x8Du,
-        (Texture *)(uTextureID_save_up != -1 ? &pIcons_LOD->pTextures[uTextureID_save_up] : 0));
-      v36 = pGlobalTXT_LocalizationStrings[190];
-      v4 = pFontSmallnum->AlignText_Center(0xBAu, pGlobalTXT_LocalizationStrings[190]);
-      pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, v4 + 25, 219, 0, v36, 0, 0, 0);
-      v37 = (const char *)(&pSavegameHeader + uLoadGameUI_SelectedSlot);
-      v5 = pFontSmallnum->AlignText_Center(0xBAu,
-             (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot);
-      pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, v5 + 25, 0x103u, 0, v37, 185, 0);
-      v36 = pGlobalTXT_LocalizationStrings[165];
-      v6 = pFontSmallnum->AlignText_Center(0xBAu, pGlobalTXT_LocalizationStrings[165]);
-      pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, v6 + 25, 299, 0, v36, 0, 0, 0);
-      pRenderer->Present();
-    }
-    if ( pNew_LOD->Write(&pDir, DstBuf, 0) )
+      sprintf(Str, "data\\lloyd%d%d.pcx", i, j);
+      v8 = fopen(Str, "rb");
+      if ( v8 )
+      {
+        sprintf(Str, "lloyd%d%d.pcx", i, j);
+        fseek(v8, 0, 2);
+        pDir.uDataSize = ftell(v8);
+        rewind(v8);
+        fread(DstBuf, pDir.uDataSize, 1, v8);
+        strcpy((char *)&pDir, Str);
+        fclose(v8);
+        remove(Str);
+        if ( pNew_LOD->Write(&pDir, DstBuf, 0) )
+        {
+          sprintf(Str, pGlobalTXT_LocalizationStrings[612], 207);
+          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:857", 0);
+          Size = 5080748;
+        }
+      }
+	}
+  }
+  if ( !a2 )
+  {
+    sub_42FA22_mess_with_laying_item_list();
+    v9 = (int)malloc(0xF4240);
+    v71 = (std::string *)v9;
+    Src = 91969;
+    v56 = 109;
+    v57 = 118;
+    v58 = 105;
+    v59 = 105;
+    v60 = 0;
+    v61 = 0;
+    memcpy((void *)v9, &Src, 0x10);
+    if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
     {
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 200);
-    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:773", 0);
+      pIndoor->dlv.uNumFacesInBModels = pIndoor->uNumFaces;
+      pIndoor->dlv.uNumBModels = 0;
+      pIndoor->dlv.uNumDecorations = uNumLevelDecorations;
+      memcpy(DstBuf, &pIndoor->dlv, 0x28);
+      v10 = (char *)DstBuf + 40;
+      memcpy(v10, pIndoor->_visible_outlines, 0x36B);
+      v11 = (char *)v10 + 875;
+      if ( (signed int)pIndoor->uNumFaces > 0 )
+      {
+        v68 = 0;
+        for (int i =  0; i <= (signed int)pIndoor->uNumFaces; ++i)
+        {
+          v38 = (char *)v68 + (unsigned int)pIndoor->pFaces + 44;
+          memcpy(v11, v38, 4);
+          v68 += 48;
+          v11 = (char *)v11 + 4;
+        }
+      }
+      if ( (signed int)uNumLevelDecorations > 0 )
+      {
+        v68 = &pLevelDecorations[0].field_2;
+        for (int i =  0; i <= (signed int)uNumLevelDecorations; ++i)
+        {
+          memcpy(v11, v68, 2);
+          v68 += 16;
+          v11 = (char *)v11 + 2;
+        }
+      }
+      memcpy(v11, &uNumActors, 4);
+      v12 = (char *)v11 + 4;
+      memcpy(v12, pActors, 836 * uNumActors);
+      v13 = (char *)v12 + 836 * uNumActors;
+      memcpy(v13, &uNumLayingItems, 4);
+      v13 = (char *)v13 + 4;
+      memcpy(v13, pLayingItems, 112 * uNumLayingItems);
+      v14 = (char *)v13 + 112 * uNumLayingItems;
+      memcpy(v14, &uNumChests, 4);
+      v14 = (char *)v14 + 4;
+      memcpy(v14, pChests, 5324 * uNumChests);
+      v15 = (char *)v14 + 5324 * uNumChests;
+      memcpy(v15, pIndoor->pDoors, 0x3E80);
+      v15 = (char *)v15 + 16000;
+      memcpy(v15, pIndoor->ptr_0002B4_doors_ddata, pIndoor->blv.uDoors_ddata_Size);
+      v16 = (char *)v15 + pIndoor->blv.uDoors_ddata_Size;
+      memcpy(v16, &stru_5E4C90, 0xC8);
+      v17 = (int)((char *)v16 + 200);
+      memcpy((void *)v17, &pIndoor->stru1, 0x38);
     }
     else
     {
-      v7 = "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp";
-    }
-    strcpy(Dest, pCurrentMapName);
-    v45 = pParty->uTimePlayed;
-    strcpy((char *)&pDir, "header.bin");
-    pDir.uDataSize = 100;
-    if ( pNew_LOD->Write(&pDir, &v43, 0) )
-    {
-      v39 = 201;
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 201);
-    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:784", 0);
-    }
-    strcpy((char *)&pDir, "party.bin");
-    pDir.uDataSize = 90680;
-    if ( pNew_LOD->Write(&pDir, &pParty, 0) )
-    {
-      v39 = 202;
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 202);
-    MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:793", 0);
-    }
-    strcpy((char *)&pDir, "Timer.bin");
-    pDir.uDataSize = 40;
-    if ( pNew_LOD->Write(&pDir, &pEventTimer, 0) )
-    {
-      v39 = 203;
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 203);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:802", 0);
-    }
-    strcpy((char *)&pDir, "overlay.bin");
-    pDir.uDataSize = 1008;
-    if ( pNew_LOD->Write(&pDir, &pOtherOverlayList, 0) )
-    {
-      v39 = 204;
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 204);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:811", 0);
-    }
-    strcpy((char *)&pDir, "npcdata.bin");
-    pDir.uDataSize = 38076;
-    if ( pNew_LOD->Write(&pDir, pNPCStats->pNewNPCData, 0) )
-    {
-      v39 = 205;
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 205);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:820", 0);
-    }
-    strcpy((char *)&pDir, "npcgroup.bin");
-    pDir.uDataSize = 102;
-    if ( pNew_LOD->Write(&pDir, pNPCStats->pGroups_copy, 0) )
-    {
-      v39 = 206;
-      sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 206);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:829", 0);
-    }
-    v70 = 1;
-    do
-    {
-      v69 = 1;
-      do
+      v18 = 0;
+      pOutdoor->ddm.uNumFacesInBModels = 0;
+      if ( (signed int)pOutdoor->uNumBModels > 0 )
       {
-        v39 = v69;
-        v38 = (const char *)v70;
-        sprintf(Str, "data\\lloyd%d%d.pcx", v70, v69);
-        v8 = fopen(Str, "rb");
-        if ( v8 )
+        v19 = pOutdoor->uNumBModels;
+        v20 = (char *)&pOutdoor->pBModels->uNumFaces;
+        do
         {
-          v39 = v69;
-          v38 = (const char *)v70;
-          sprintf(Str, "lloyd%d%d.pcx", v70, v69);
-          fseek(v8, 0, 2);
-          pDir.uDataSize = ftell(v8);
-          rewind(v8);
-          fread(DstBuf, pDir.uDataSize, 1u, v8);
-          strcpy((char *)&pDir, Str);
-          fclose(v8);
-          remove(Str);
-          if ( pNew_LOD->Write(&pDir, DstBuf, 0) )
-          {
-            v39 = 207;
-            sprintf(Str, pGlobalTXT_LocalizationStrings[612], 207);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:857", 0);
-            Size = 5080748;
-          }
+          v18 += *(int *)v20;
+          v20 += 188;
+          --v19;
+          pOutdoor->ddm.uNumFacesInBModels = v18;
         }
-        ++v69;
+        while ( v19 );
       }
-      while ( (signed int)v69 <= 5 );
-      ++v70;
-    }
-    while ( v70 <= 4 );
-    if ( !a2 )
-    {
-      sub_42FA22_mess_with_laying_item_list();
-      v9 = (int)malloc(0xF4240u);
-      v71 = (std::string *)v9;
-      Src = 91969;
-      v56 = 109;
-      v57 = 118;
-      v58 = 105;
-      v59 = 105;
-      v60 = 0;
-      v61 = 0;
-      memcpy((void *)v9, &Src, 0x10u);
-      if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
+      v21 = DstBuf;
+      pOutdoor->ddm.uNumBModels = pOutdoor->uNumBModels;
+      pOutdoor->ddm.uNumDecorations = uNumLevelDecorations;
+      memcpy(DstBuf, &pOutdoor->ddm, 0x28);
+      v21 = (char *)v21 + 40;
+      memcpy(v21, pOutdoor->array_528, 0x3C8);
+      v21 = (char *)v21 + 968;
+      memcpy(v21, pOutdoor->array_8F0, 0x3C8);
+      v22 = (char *)v21 + 968;
+      if ( (signed int)pOutdoor->uNumBModels > 0 )
       {
-        v10 = DstBuf;
-        pIndoor->dlv.uNumFacesInBModels = pIndoor->uNumFaces;
-        pIndoor->dlv.uNumBModels = 0;
-        pIndoor->dlv.uNumDecorations = uNumLevelDecorations;
-        memcpy(DstBuf, &pIndoor->dlv, 0x28u);
-        v10 = (char *)v10 + 40;
-        memcpy(v10, pIndoor->_visible_outlines, 0x36Bu);
-        v11 = (char *)v10 + 875;
-        v70 = 0;
-        if ( (signed int)pIndoor->uNumFaces > 0 )
+        v23 = pOutdoor->pBModels;
+        v24 = 76;
+        for (int i =  0; i <= (signed int)pOutdoor->uNumBModels ; ++i)
         {
-          v68 = 0;
-          do
+          v25 = *(int *)&v23->pModelName[v24] == 0;
+          v26 = *(int *)&v23->pModelName[v24] < 0;
+          if ( !(v26 | v25) )
           {
-            v38 = (char *)v68 + (unsigned int)pIndoor->pFaces + 44;
-            memcpy(v11, v38, 4u);
-            v68 += 48;
-            v11 = (char *)v11 + 4;
-            ++v70;
-          }
-          while ( v70 < (signed int)pIndoor->uNumFaces );
+            v68 = 0;
+            for (int j =  0; j <= *(int *)&pOutdoor->pBModels->pModelName[v24]; ++j)
+            {
+              v38 = (char *)v68 + *(int *)&v23->pModelName[v24 + 8] + 28;
+              memcpy(v22, v38, 4);
+              v23 = pOutdoor->pBModels;
+              v68 += 154;
+              v22 = (char *)v22 + 4;
+            }
+           }
+          v24 += 188;
         }
-        v70 = 0;
-        if ( (signed int)uNumLevelDecorations > 0 )
+      }
+      if ( (signed int)uNumLevelDecorations > 0 )
+      {
+        v66 = &pLevelDecorations[0].field_2;
+        for (int i =  0; i <= (signed int)uNumLevelDecorations; ++i)
         {
-          v68 = &pLevelDecorations[0].field_2;
-          do
-          {
-            memcpy(v11, v68, 2u);
-            v68 += 16;
-            v11 = (char *)v11 + 2;
-            ++v70;
-          }
-          while ( v70 < (signed int)uNumLevelDecorations );
+          memcpy(v22, v66, 2);
+          v66 += 16;
+          v22 = (char *)v22 + 2;
         }
-        memcpy(v11, &uNumActors, 4u);
-        v12 = (char *)v11 + 4;
-        memcpy(v12, pActors, 836 * uNumActors);
-        v13 = (char *)v12 + 836 * uNumActors;
-        memcpy(v13, &uNumLayingItems, 4u);
-        v13 = (char *)v13 + 4;
-        memcpy(v13, pLayingItems, 112 * uNumLayingItems);
-        v14 = (char *)v13 + 112 * uNumLayingItems;
-        memcpy(v14, &uNumChests, 4u);
-        v14 = (char *)v14 + 4;
-        memcpy(v14, pChests, 5324 * uNumChests);
-        v15 = (char *)v14 + 5324 * uNumChests;
-        memcpy(v15, pIndoor->pDoors, 0x3E80u);
-        v15 = (char *)v15 + 16000;
-        memcpy(v15, pIndoor->ptr_0002B4_doors_ddata, pIndoor->blv.uDoors_ddata_Size);
-        v16 = (char *)v15 + pIndoor->blv.uDoors_ddata_Size;
-        memcpy(v16, &stru_5E4C90, 0xC8u);
-        v17 = (int)((char *)v16 + 200);
-        memcpy((void *)v17, &pIndoor->stru1, 0x38u);
       }
-      else
-      {
-        v18 = 0;
-        pOutdoor->ddm.uNumFacesInBModels = 0;
-        if ( (signed int)pOutdoor->uNumBModels > 0 )
-        {
-          v19 = pOutdoor->uNumBModels;
-          v20 = (char *)&pOutdoor->pBModels->uNumFaces;
-          do
-          {
-            v18 += *(int *)v20;
-            v20 += 188;
-            --v19;
-            pOutdoor->ddm.uNumFacesInBModels = v18;
-          }
-          while ( v19 );
-        }
-        v21 = DstBuf;
-        pOutdoor->ddm.uNumBModels = pOutdoor->uNumBModels;
-        pOutdoor->ddm.uNumDecorations = uNumLevelDecorations;
-        memcpy(DstBuf, &pOutdoor->ddm, 0x28u);
-        v21 = (char *)v21 + 40;
-        memcpy(v21, pOutdoor->array_528, 0x3C8u);
-        v21 = (char *)v21 + 968;
-        memcpy(v21, pOutdoor->array_8F0, 0x3C8u);
-        v22 = (char *)v21 + 968;
-        v70 = 0;
-        if ( (signed int)pOutdoor->uNumBModels > 0 )
-        {
-          v23 = pOutdoor->pBModels;
-          v24 = 76;
-          do
-          {
-            v25 = *(int *)&v23->pModelName[v24] == 0;
-            v26 = *(int *)&v23->pModelName[v24] < 0;
-            v66 = 0;
-            if ( !(v26 | v25) )
-            {
-              v68 = 0;
-              do
-              {
-                v38 = (char *)v68 + *(int *)&v23->pModelName[v24 + 8] + 28;
-                memcpy(v22, v38, 4u);
-                v23 = pOutdoor->pBModels;
-                v68 += 154;
-                v22 = (char *)v22 + 4;
-                v66 = (__int16 *)((char *)v66 + 1);
-              }
-              while ( (signed int)v66 < *(int *)&pOutdoor->pBModels->pModelName[v24] );
-            }
-            ++v70;
-            v24 += 188;
-          }
-          while ( v70 < (signed int)pOutdoor->uNumBModels );
-        }
-        v27 = 0;
-        if ( (signed int)uNumLevelDecorations > 0 )
-        {
-          v66 = &pLevelDecorations[0].field_2;
-          do
-          {
-            memcpy(v22, v66, 2u);
-            v66 += 16;
-            v22 = (char *)v22 + 2;
-            ++v27;
-          }
-          while ( v27 < (signed int)uNumLevelDecorations );
-        }
-        memcpy(v22, &uNumActors, 4u);
-        v28 = (char *)v22 + 4;
-        memcpy(v28, pActors, 836 * uNumActors);
-        v29 = (char *)v28 + 836 * uNumActors;
-        memcpy(v29, &uNumLayingItems, 4u);
-        v29 = (char *)v29 + 4;
-        memcpy(v29, pLayingItems, 112 * uNumLayingItems);
-        v30 = (char *)v29 + 112 * uNumLayingItems;
-        memcpy(v30, &uNumChests, 4u);
-        v30 = (char *)v30 + 4;
-        memcpy(v30, pChests, 5324 * uNumChests);
-        v31 = (char *)v30 + 5324 * uNumChests;
-        memcpy(v31, &stru_5E4C90, 0xC8u);
-        v17 = (int)((char *)v31 + 200);
-        memcpy((void *)v17, &pOutdoor->uLastVisitDay, 0x38u);
-        v9 = (int)v71;
-      }
-      v32 = v17 + 56;
-      strcpy(Source, pCurrentMapName);
-      _splitpath(Source, &Drive, &Dir, &Filename, &Ext);
-      v48 = 100;
-      Size = v32 - (int)DstBuf;
-      v69 = 999984;
-      LOBYTE(v33) = zlib::MemZip((char *)v9 + 16, (unsigned int *)&v69, DstBuf, v32 - (int)DstBuf);
-      if ( v33 || (signed int)v69 > (signed int)Size )
-      {
-        memcpy((void *)(v9 + 16), DstBuf, Size);
-        v69 = Size;
-      }
-      v69 += 16;
-      memcpy((void *)(v9 + 8), &v69, 4u);
-      memcpy((void *)(v9 + 12), &Size, 4u);
-      sprintfex(Source, "%s%s", &Filename, &Ext);
-      strcpy((char *)&pDir, Source);
-      pDir.uDataSize = v69;
-      if ( pNew_LOD->Write(&pDir, (const void *)v9, 0) )
-      {
-        v39 = 208;
-        sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 208);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:1071", 0);
-      }
-      free((void *)v9);
+      memcpy(v22, &uNumActors, 4);
+      v28 = (char *)v22 + 4;
+      memcpy(v28, pActors, 836 * uNumActors);
+      v29 = (char *)v28 + 836 * uNumActors;
+      memcpy(v29, &uNumLayingItems, 4);
+      v29 = (char *)v29 + 4;
+      memcpy(v29, pLayingItems, 112 * uNumLayingItems);
+      v30 = (char *)v29 + 112 * uNumLayingItems;
+      memcpy(v30, &uNumChests, 4);
+      v30 = (char *)v30 + 4;
+      memcpy(v30, pChests, 5324 * uNumChests);
+      v31 = (char *)v30 + 5324 * uNumChests;
+      memcpy(v31, &stru_5E4C90, 0xC8);
+      v17 = (int)((char *)v31 + 200);
+      memcpy((void *)v17, &pOutdoor->uLastVisitDay, 0x38);
+      v9 = (int)v71;
+    }
+    v32 = v17 + 56;
+    strcpy(Source, pCurrentMapName);
+    _splitpath(Source, &Drive, &Dir, &Filename, &Ext);
+    v48 = 100;
+    Size = v32 - (int)DstBuf;
+    v69 = 999984;
+    LOBYTE(v33) = zlib::MemZip((char *)v9 + 16, (unsigned int *)&v69, DstBuf, v32 - (int)DstBuf);
+    if ( v33 || (signed int)v69 > (signed int)Size )
+    {
+      memcpy((void *)(v9 + 16), DstBuf, Size);
+      v69 = Size;
     }
-    free(DstBuf);
-    if ( a1 )
+    v69 += 16;
+    memcpy((void *)(v9 + 8), &v69, 4);
+    memcpy((void *)(v9 + 12), &Size, 4);
+    sprintf(Source, "%s%s", &Filename, &Ext);
+    strcpy((char *)&pDir, Source);
+    pDir.uDataSize = v69;
+    if ( pNew_LOD->Write(&pDir, (const void *)v9, 0) )
     {
-      if ( !CopyFileA("data\\new.lod", "saves\\autosave.mm7", 0) )
-      {
-        v34 = GetLastError();
-        FormatMessageA(0x1000u, 0, v34, 0x400u, &Buffer, 0x80u, 0);
-        v39 = 300;
-        sprintfex(Str, pGlobalTXT_LocalizationStrings[612], 300);
-          MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:1097", 0);
-      }
+      sprintf(Str, pGlobalTXT_LocalizationStrings[612], 208);
+      MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:1071", 0);
     }
-    pParty->vPosition.x = v52;
-    pParty->vPosition.y = v51;
-    pParty->vPosition.z = v62;
-    pParty->uFallStartY = v62;
-    pParty->sRotationY = v53;
-    result = v54;
-    pParty->sRotationX = v54;
-
+    free((void *)v9);
+  }
+  free(DstBuf);
+  if ( a1 )
+  {
+    if ( !CopyFileA("data\\new.lod", "saves\\autosave.mm7", 0) )
+    {
+      v34 = GetLastError();
+      FormatMessageA(0x1000, 0, v34, 0x400, &Buffer, 0x80, 0);
+      sprintf(Str, pGlobalTXT_LocalizationStrings[612], 300);
+      MessageBoxA(nullptr, Str, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\LoadSave.cpp:1097", 0);
+    }
+  }
+  pParty->vPosition.x = pPositionX;
+  pParty->vPosition.y = v51;
+  pParty->vPosition.z = v62;
+  pParty->uFallStartY = v62;
+  pParty->sRotationY = v53;
+  result = v54;
+  pParty->sRotationX = v54;
   return result;
 }
 
@@ -678,7 +617,7 @@
     strcpy((char *)&pDir, "header.bin");
     pDir.uDataSize = 100;
     pNew_LOD->Write(&pDir, (char *)&pSavegameHeader + v2, 0);
-    sprintfex(pTmpBuf, "saves\\save%03d.mm7", v6);
+    sprintf(pTmpBuf, "saves\\save%03d.mm7", v6);
     pNew_LOD->CloseWriteFile();
     CopyFileA("data\\new.lod", pTmpBuf, 0);
   }
--- a/Spells.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/Spells.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -50,7 +50,7 @@
   this->uFlags = 0;
   if ( v2 )
   {
-    ((OtherOverlay *)&stru_5E4C90.field_4B[20 * v2 + 105])->Reset();
+    ((OtherOverlay *)&stru_5E4C90._decor_events[20 * v2 + 105])->Reset();
     pOtherOverlayList->field_3EC = 1;
     v1->uOverlayID = 0;
   }
@@ -99,7 +99,7 @@
       v8 = (unsigned __int16)v8;
       if ( (unsigned __int16)v8 != a5 )
       {
-        ((OtherOverlay *)&stru_5E4C90.field_4B[20 * v8 + 105])->Reset();
+        ((OtherOverlay *)&stru_5E4C90._decor_events[20 * v8 + 105])->Reset();
         pOtherOverlayList->field_3EC = 1;
         v6->uOverlayID = 0;
       }
--- a/mm7_1.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_1.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -5080,7 +5080,7 @@
           if ( !v25 )
           {
             if ( v23->IsInteractive() )
-              v26 = pNPCTopics[stru_5E4C90.field_0[v24->field_1C] + 379].pTopic;
+              v26 = pNPCTopics[stru_5E4C90._decor_events[v24->_idx_in_stru123 - 75] + 379].pTopic;
             else
               v26 = pDecorationList->pDecorations[v24->uDecorationDescID].field_20;
             goto LABEL_87;
@@ -5876,7 +5876,7 @@
       {
         if ( pLevelDecorations[(signed int)(unsigned __int16)v0 >> 3].IsInteractive() )
         {
-          v15 = stru_5E4C90.field_0[v13->field_1C] + 380;
+          v15 = stru_5E4C90._decor_events[v13->_idx_in_stru123 - 75] + 380;
           _5C3420_pDecoration = &pLevelDecorations[(signed int)(unsigned __int16)v0 >> 3];
           EventProcessor(v15, 0, 1);
           _5C3420_pDecoration = 0;
--- a/mm7_2.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_2.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -1,5 +1,6 @@
 #include <io.h>
 #include <direct.h>
+#include <assert.h>
 
 #include "MapInfo.h"
 #include "Game.h"
@@ -952,7 +953,9 @@
         v7 = v6 + 2 * v2 - 30;
         v2 = (signed int)v0->ptr_1C;
         v4 = word_4F0498[5 * v7];
-        v5 = *(short *)&aTooManyStation[2 * (5 * (v6 + 2 * v2) + rand() % 4) + 10];
+        __debugbreak();
+        //things happen around word_4F0400 actually
+        //v5 = *(short *)&aTooManyStation[2 * (5 * (v6 + 2 * v2) + rand() % 4) + 10];
         goto LABEL_13;
       }
       if ( v2 <= 41 )
@@ -3838,7 +3841,7 @@
   dword_F8B19C = v55;
   if ( v3 < 19 )
   {
-    v9 = pIcons_LOD->LoadTexture((&off_4F03B8)[4 * v3], TEXTURE_16BIT_PALETTE);
+    v9 = pIcons_LOD->LoadTexture(off_4F03B8[v3], TEXTURE_16BIT_PALETTE);
     v3 = dword_F8B198;
     dword_F8B164 = &pIcons_LOD->pTextures[v9];
 LABEL_13:
@@ -7501,11 +7504,11 @@
 
 
 //----- (0044F57C) --------------------------------------------------------
-void *__fastcall SpawnEncounter(MapInfo *pMapInfo, SpawnPointMM7 *a2, int a3, int a4, int a5)
-{
-  MapInfo *v5; // esi@1
-  SpawnPointMM7 *v6; // ebx@1
-  void *result; // eax@2
+void SpawnEncounter(MapInfo *pMapInfo, SpawnPointMM7 *spawn, int a3, int a4, int a5)
+{
+  //MapInfo *v5; // esi@1
+  //SpawnPointMM7 *v6; // ebx@1
+  int v7; // eax@2
   char v8; // zf@5
   int v9; // edi@9
   int v10; // eax@9
@@ -7540,123 +7543,139 @@
   int v39; // edi@52
   std::string v40; // [sp-18h] [bp-100h]@60
   void *v41; // [sp-14h] [bp-FCh]@50
-  void *v42; // [sp-10h] [bp-F8h]@50
-  size_t v43; // [sp-Ch] [bp-F4h]@50
+  //void *v42; // [sp-10h] [bp-F8h]@50
+  //size_t v43; // [sp-Ch] [bp-F4h]@50
   const char *v44; // [sp-8h] [bp-F0h]@13
   char *v45; // [sp-4h] [bp-ECh]@9
-  char Str; // [sp+Ch] [bp-DCh]@60
-  char Str2; // [sp+2Ch] [bp-BCh]@29
+  char Str[32]; // [sp+Ch] [bp-DCh]@60
+  char Str2[120]; // [sp+2Ch] [bp-BCh]@29
   unsigned int uFaceID; // [sp+A4h] [bp-44h]@52
-  void *Src; // [sp+A8h] [bp-40h]@50
+  MonsterInfo *Src; // [sp+A8h] [bp-40h]@50
   int v50; // [sp+ACh] [bp-3Ch]@47
-  char Source; // [sp+B0h] [bp-38h]@20
+  char Source[32]; // [sp+B0h] [bp-38h]@20
   int v52; // [sp+D0h] [bp-18h]@34
-  void *v53; // [sp+D4h] [bp-14h]@34
+  int v53; // [sp+D4h] [bp-14h]@34
   int v54; // [sp+D8h] [bp-10h]@32
   int v55; // [sp+DCh] [bp-Ch]@32
   int v56; // [sp+E0h] [bp-8h]@8
   int v57; // [sp+E4h] [bp-4h]@1
 
+  //auto a2 = spawn;
+
   v57 = 0;
-  v5 = pMapInfo;
-  v6 = a2;
+  //v5 = pMapInfo;
+  //v6 = spawn;
   if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
-    result = (void *)pOutdoor->ddm.field_C_alert;
-  else
-    result = (void *)(uCurrentlyLoadedLevelType == LEVEL_Outdoor ? pIndoor->dlv.field_C_alert : 0);
-  if ( result )
-  {
-    v8 = (a2->uAttributes & 1) == 0;
-  }
-  else
-  {
-    result = (void *)(a2->uAttributes & 1);
-    v8 = (char)result == 1;
-  }
-  if ( !v8 )
-  {
-    result = (void *)(a2->uIndex - 1);
-    v56 = 1;
-    switch ( (int)result )
-    {
-      case 0u:
+    v7 = pOutdoor->ddm.field_C_alert;
+  else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
+    v7 = pIndoor->dlv.field_C_alert;
+  else
+    v7 = 0;
+
+  if (v7)
+    v8 = (spawn->uAttributes & 1) == 0;
+  else
+    v8 = (spawn->uAttributes & 1) == 1;
+
+  if (v8)
+    return;
+
+    //result = (void *)(spawn->uIndex - 1);
+  v56 = 1;
+  switch (spawn->uIndex - 1)
+  {
+    case 0u:
         v9 = pMapInfo->uEncounterMonster1AtLeast;
         v10 = rand();
-        v11 = v5->uEncounterMonster1AtMost;
-        v45 = v5->pEncounterMonster1Texture;
-        v12 = v10 % (v11 - v9 + 1);
-        v13 = v5->field_34;
-        goto LABEL_20;
-      case 3u:
+        v11 = pMapInfo->uEncounterMonster1AtMost;
         v45 = pMapInfo->pEncounterMonster1Texture;
-        goto LABEL_13;
-      case 4u:
-        v45 = pMapInfo->pEncounterMonster2Texture;
-        goto LABEL_13;
-      case 5u:
-        v45 = pMapInfo->pEncounterMonster3Texture;
-LABEL_13:
+        v12 = v10 % (v11 - v9 + 1);
+        v13 = pMapInfo->field_34;
+        goto LABEL_20;
+
+    case 3u:
+        v45 = pMapInfo->pEncounterMonster1Texture;
         v44 = "%s A";
         goto LABEL_25;
-      case 1u:
+
+    case 4u:
+        v45 = pMapInfo->pEncounterMonster2Texture;
+        v44 = "%s A";
+        goto LABEL_25;
+
+    case 5u:
+        v45 = pMapInfo->pEncounterMonster3Texture;
+        v44 = "%s A";
+        goto LABEL_25;
+
+    case 1u:
         v9 = pMapInfo->uEncounterMonster2AtLeast;
         v14 = rand();
-        v15 = v5->uEncounterMonster2AtMost;
-        v45 = v5->pEncounterMonster2Texture;
+        v15 = pMapInfo->uEncounterMonster2AtMost;
+        v45 = pMapInfo->pEncounterMonster2Texture;
         v12 = v14 % (v15 - v9 + 1);
-        v13 = v5->field_37;
+        v13 = pMapInfo->field_37;
         goto LABEL_20;
-      case 6u:
+
+    case 6u:
         v45 = pMapInfo->pEncounterMonster1Texture;
-        goto LABEL_18;
-      case 7u:
-        v45 = pMapInfo->pEncounterMonster2Texture;
-        goto LABEL_18;
-      case 8u:
-        v45 = pMapInfo->pEncounterMonster3Texture;
-LABEL_18:
         v44 = "%s B";
         goto LABEL_25;
-      case 2u:
+
+    case 7u:
+        v45 = pMapInfo->pEncounterMonster2Texture;
+        v44 = "%s B";
+        goto LABEL_25;
+
+    case 8u:
+        v45 = pMapInfo->pEncounterMonster3Texture;
+        v44 = "%s B";
+        goto LABEL_25;
+
+    case 2u:
         v9 = pMapInfo->uEncounterMonster3AtLeast;
         v16 = rand();
-        v17 = v5->uEncounterMonster3AtMost;
-        v45 = v5->pEncounterMonster3Texture;
+        v17 = pMapInfo->uEncounterMonster3AtMost;
+        v45 = pMapInfo->pEncounterMonster3Texture;
         v12 = v16 % (v17 - v9 + 1);
-        v13 = v5->field_3A;
+        v13 = pMapInfo->field_3A;
 LABEL_20:
         v57 = v13;
         v56 = v9 + v12;
-        result = strcpy(&Source, v45);
+        strcpy(Source, v45);
         goto LABEL_26;
-      case 9u:
+
+    case 9u:
         v45 = pMapInfo->pEncounterMonster1Texture;
-        goto LABEL_24;
-      case 0xAu:
+        v44 = "%s C";
+        goto LABEL_25;
+
+    case 0xAu:
         v45 = pMapInfo->pEncounterMonster2Texture;
-        goto LABEL_24;
-      case 0xBu:
+        v44 = "%s C";
+        goto LABEL_25;
+
+    case 0xBu:
         v45 = pMapInfo->pEncounterMonster3Texture;
-LABEL_24:
         v44 = "%s C";
 LABEL_25:
-        result = (void *)sprintfex(&Source, v44, v45);
+        sprintf(Source, v44, v45);
 LABEL_26:
-        if ( Source == 48 )
-          return result;
+        if (Source[0] == '0')
+          return;
+
         v57 += a3;
         if ( v57 > 4 )
           v57 = 4;
-        strcpy(&Str2, &Source);
+        strcpy(Str2, Source);
         if ( a4 )
           v56 = a4;
         v18 = v56;
-        result = (void *)(v56 + uNumActors);
         if ( (signed int)(v56 + uNumActors) >= 500 )
-          return result;
-        v19 = v6->vPosition.x;
-        v20 = v6->vPosition.y;
-        v21 = v6->vPosition.z;
+          return;
+        v19 = spawn->vPosition.x;
+        v20 = spawn->vPosition.y;
+        v21 = spawn->vPosition.z;
         v54 = 0;
         v55 = v19;
         a4 = v20;
@@ -7664,16 +7683,16 @@
         if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
           v54 = pIndoor->GetSector(v19, v20, v21);
         v53 = 0;
-        result = (void *)((((uCurrentlyLoadedLevelType != LEVEL_Outdoor) - 1) & 0x40) + 64);
         v52 = (((uCurrentlyLoadedLevelType != LEVEL_Outdoor) - 1) & 0x40) + 64;
         if ( v18 <= 0 )
-          return result;
+          return;
         break;
       default:
-        return result;
-    }
-    do
-    {
+        return;
+  }
+
+  for (uint i = v53; i < v56; ++i)
+  {
       v22 = &pActors[uNumActors];
       pActors[uNumActors].Reset();
       if ( v57 )
@@ -7692,47 +7711,48 @@
         }
         if ( v24 == 1 )
         {
-          v45 = &Source;
+          v45 = Source;
           v44 = "%s A";
         }
         else
         {
           if ( v24 == 2 )
           {
-            v45 = &Source;
+            v45 = Source;
             v44 = "%s B";
           }
           else
           {
             if ( v24 != 3 )
               goto LABEL_58;
-            v45 = &Source;
+            v45 = Source;
             v44 = "%s C";
           }
         }
-        sprintfex(&Str2, v44, v45);
-      }
-      v26 = pMonsterList->GetMonsterByName(&Str2);
+        sprintf(Str2, v44, v45);
+      }
+      v26 = pMonsterList->GetMonsterByName(Str2);
       v50 = (signed __int16)v26;
-      v45 = &Str2;
+      v45 = Str2;
       if ( (signed __int16)v26 == -1 )
       {
-        sprintfex(&Str, "Can't create random monster: '%s'! See MapStats.txt and Monsters.txt!", v45);
-        MessageBoxA(nullptr, &Str, nullptr, 0);
+        sprintfex(Str, "Can't create random monster: '%s'! See MapStats.txt and Monsters.txt!", v45);
+        MessageBoxA(nullptr, Str, nullptr, 0);
         ExitProcess(0);
       }
       v27 = &pMonsterList->pMonsters[(signed __int16)v26];
       v28 = pMonsterStats->_4563FF(v45);
       if ( !v28 )
         v28 = 1;
-      Src = (char *)&pMonsterStats + 88 * v28;
-      strcpy(v22->pActorName, *(const char **)Src);
-      v43 = 88;
-      v42 = Src;
-      v29 = *((short *)Src + 32);
+      Src = &pMonsterStats->pInfos[v28];
+      strcpy(v22->pActorName, Src->pName);
+      //v43 = 88;
+      //v42 = Src;
+      v29 = Src->uHP;
       v41 = &v22->pMonsterInfo;
       v22->sCurrentHP = v29;
-      memcpy(v41, v42, v43);
+      assert(sizeof(MonsterInfo) == 88);
+      memcpy(v41, Src, sizeof(MonsterInfo));
       v22->word_000086_some_monster_id = v50 + 1;
       v22->uActorRadius = v27->uMonsterRadius;
       v22->uActorHeight = v27->uMonsterHeight;
@@ -7748,7 +7768,7 @@
       v22->vInitialPosition.z = a3;
       v22->vPosition.z = a3;
       v22->uSectorID = v54;
-      v22->uGroup = v6->uGroup;
+      v22->uGroup = spawn->uGroup;
       v22->PrepareSprites((char)v45);
       v22->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
       v32 = rand();
@@ -7756,13 +7776,13 @@
       v34 = stru_5C6E00->SinCos(v32 % 2048);
       a4 = v34;
       a3 = (unsigned __int64)(v34 * (signed __int64)v52) >> 16;
-      v55 = a3 + v6->vPosition.x;
+      v55 = a3 + spawn->vPosition.x;
       v35 = stru_5C6E00->SinCos(v33 - stru_5C6E00->uIntegerHalfPi);
       a4 = v35;
       a3 = (unsigned __int64)(v35 * (signed __int64)v52) >> 16;
-      a4 = a3 + v6->vPosition.y;
-      v36 = v6->vPosition.z;
-      a3 = v6->vPosition.z;
+      a4 = a3 + spawn->vPosition.y;
+      v36 = spawn->vPosition.z;
+      a3 = spawn->vPosition.z;
       if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor )
         goto LABEL_55;
       v37 = pIndoor->GetSector(v55, a4, v36);
@@ -7784,12 +7804,11 @@
         }
       }
 LABEL_58:
-      v53 = (char *)v53 + 1;
-      result = v53;
-    }
-    while ( (signed int)v53 < v56 );
-  }
-  return result;
+      ;
+      //v53 = (char *)v53 + 1;
+      //result = v53;
+    }
+    //while ( (signed int)v53 < v56 );
 }
 
 
@@ -7955,6 +7974,8 @@
   int v33; // [sp+80h] [bp-8h]@1
   int v34; // [sp+84h] [bp-4h]@1
 
+  __debugbreak();
+
   auto a1 = this;
 
   v2 = a1;
@@ -8619,39 +8640,27 @@
 }
 
 //----- (00450AAA) --------------------------------------------------------
-void *__cdecl RespawnGlobalDecorations()
-{
-  signed int v0; // edi@1
-  void *result; // eax@1
-  signed int v2; // ebx@1
-  LevelDecoration *v3; // esi@2
-
-  v0 = 0;
-  result = memset(stru_5E4C90.field_4B, 0, 0x7Du);
-  v2 = 0;
-  if ( (signed int)uNumLevelDecorations > 0 )
-  {
-    v3 = pLevelDecorations;
-    do
-    {
-      if ( !v3->field_16_event_id )
-      {
-        result = (void *)v3->IsInteractive();
-        if ( result )
-        {
-          if ( v0 < 124 )
-          {
-            v3->field_1C = v0 + 75;
-            stru_5E4C90.field_4B[v0++] = v3->GetGlobalEvent();
-          }
-        }
-      }
-      ++v2;
-      ++v3;
-    }
-    while ( v2 < (signed int)uNumLevelDecorations );
-  }
-  return result;
+void RespawnGlobalDecorations()
+{
+  memset(stru_5E4C90._decor_events, 0, 125);
+
+  uint decorEventIdx = 0;
+  for (uint i = 0; i < uNumLevelDecorations; ++i)
+  {
+    auto decor = pLevelDecorations + i;
+
+    if (!decor->field_16_event_id)
+    {
+      if (decor->IsInteractive())
+      {
+        if (decorEventIdx < 124)
+        {
+          decor->_idx_in_stru123 = decorEventIdx + 75;
+          stru_5E4C90._decor_events[decorEventIdx++] = decor->GetGlobalEvent();
+        }
+      }
+    }
+  }
 }
 
 //----- (00450B0A) --------------------------------------------------------
@@ -10288,7 +10297,7 @@
                             v7 = 44;
                             goto LABEL_71;
                           }
-                          if ( !_strcmpi(*(const char **)(v2 + 4), off_4E876C) )
+                          if ( !_strcmpi(*(const char **)(v2 + 4), "Ice") )
                           {
                             v7 = 26;
                             goto LABEL_71;
@@ -10541,7 +10550,7 @@
     {
       if ( _strcmpi(v1, "FIRE") )
       {
-        if ( _strcmpi(v1, off_4E887C) )
+        if ( _strcmpi(v1, "AIR") )
         {
           if ( _strcmpi(v1, "WATER") )
           {
@@ -10933,7 +10942,7 @@
         for ( j = 0; j < v41.field_0; ++j )
         {
           v27 = v41.pProperties[j];
-          if ( _strcmpi(v41.pProperties[j], off_4E8CB8) )
+          if ( _strcmpi(v41.pProperties[j], "NBM") )
           {
             if ( _strcmpi(v27, "Invisible") )
             {
@@ -11718,16 +11727,12 @@
 bool Autosave()
 {
   int flag; // esi@3
-  int i; // eax@4
-  //int v2; // edx@5
   FILE *v3; // eax@7
   LOD::FileHeader this_; // [sp+Ch] [bp-16Ch]@3
   LOD::Directory pDir; // [sp+10Ch] [bp-6Ch]@4
   LOD::Directory v7; // [sp+12Ch] [bp-4Ch]@9
   LOD::Directory a3; // [sp+14Ch] [bp-2Ch]@3
-  unsigned int v9; // [sp+16Ch] [bp-Ch]@5
   void *pSave; // [sp+170h] [bp-8h]@3
-  unsigned int v11; // [sp+174h] [bp-4h]@5
 
   if ( pVideoPlayer->AnyMovieLoaded() )
     pVideoPlayer->Unload();
@@ -11750,25 +11755,25 @@
     pNew_LOD->uNumSubIndices = 0;
     pDir.Reset();
 	for (int i =  pGames_LOD->uNumSubIndices / 2; i < pGames_LOD->uNumSubIndices; ++i)
-    {
-     memcpy(&pDir, (char *)&pGames_LOD->pSubIndices[i], sizeof(pDir));
-     v3 = pGames_LOD->FindContainer((const char *)&pGames_LOD->pSubIndices[i], 1);
-     fread(pSave, pGames_LOD->pSubIndices[i].uDataSize, 1, v3);
-     pNew_LOD->AppendDirectory(&pDir, pSave);
-    }
+   {
+    memcpy(&pDir, (char *)&pGames_LOD->pSubIndices[i], sizeof(pDir));
+    v3 = pGames_LOD->FindContainer((const char *)&pGames_LOD->pSubIndices[i], 1);
+    fread(pSave, pGames_LOD->pSubIndices[i].uDataSize, 1, v3);
+    pNew_LOD->AppendDirectory(&pDir, pSave);
+   }
     v7.Reset();
     strcpy(pSavegameHeader->pLocationName, "out01.odm");
     strcpy((char *)&v7, "header.bin");
     v7.uDataSize = 100;
     pNew_LOD->AppendDirectory(&v7, &pSavegameHeader);
     pNew_LOD->Save();
-    pParty->vPrevPosition.y = flag;
+    pParty->vPrevPosition.y = 0;
     pParty->vPrevPosition.x = 12552;
     pParty->vPosition.x = 12552;
-    pParty->vPosition.z = flag;
-    pParty->uFallStartY = flag;
-    pParty->sPrevRotationX = flag;
-    pParty->sRotationX = flag;
+    pParty->vPosition.z = 0;
+    pParty->uFallStartY = 0;
+    pParty->sPrevRotationX = 0;
+    pParty->sRotationX = 0;
     pParty->vPrevPosition.z = 1816;
     pParty->vPosition.y = 1816;
     flag = 1;
@@ -13916,9 +13921,9 @@
   pBitmaps_LOD->SetupPalettes(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits);
   pIcons_LOD->SetupPalettes(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits);
   pPaletteManager->SetColorChannelInfo(pRenderer->uTargetRBits, pRenderer->uTargetGBits, pRenderer->uTargetBBits);
-  pPaletteManager->pPalette_tintColor[0] = 128;
-  pPaletteManager->pPalette_tintColor[1] = 128;
-  pPaletteManager->pPalette_tintColor[2] = 128;
+  pPaletteManager->pPalette_mistColor[0] = 128;
+  pPaletteManager->pPalette_mistColor[1] = 128;
+  pPaletteManager->pPalette_mistColor[2] = 128;
   pPaletteManager->RecalculateAll();
   pSprites_LOD->field_ECAC = 1;
   pObjectList->InitializeSprites();
@@ -15911,9 +15916,9 @@
       {
         if ( !pLevelDecorations[a1 >> 3].IsInteractive() )
           return 1;
-        v10 = v8->field_1C;
+        v10 = v8->_idx_in_stru123;
         v24 = 1;
-        v11 = stru_5E4C90.field_0[v10] + 380;
+        v11 = stru_5E4C90._decor_events[v10 - 75] + 380;
         _5C3420_pDecoration = v8;
         EventProcessor(v11, 0, 1);
         _5C3420_pDecoration = 0;
@@ -16383,7 +16388,7 @@
     goto LABEL_36;
   }
   if ( v25->IsInteractive() )
-    v24 = pNPCTopics[stru_5E4C90.field_0[v26->field_1C] + 379].pTopic;
+    v24 = pNPCTopics[stru_5E4C90._decor_events[v26->_idx_in_stru123 - 75] + 379].pTopic;
   else
     v24 = pDecorationList->pDecorations[v26->uDecorationDescID].field_20;
 LABEL_51:
--- a/mm7_3.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_3.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -2443,7 +2443,7 @@
     pParty->bFlying = 0;
     __debugbreak();
     if (pParty->FlyActive())
-      stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;// 005E4D58 pOtherOverlayList [negindexing]
+      stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;// 005E4D58 pOtherOverlayList [negindexing]
   }
   if ( v80 == -30000 )
   {
@@ -3162,7 +3162,7 @@
   {
     LOBYTE(pParty->uFlags) &= 0x7Fu;
     bWaterWalk = 1;
-    *(short *)&stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
+    *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
     if ( !(pParty->pPartyBuffs[18].uFlags & 1)
       && *(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 )
       bWaterWalk = 0;
@@ -3553,7 +3553,7 @@
         v123 = v113;
       if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0
         && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) )
-        stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu;
+        stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu;
       pParty->uFallStartY = v123;
       goto LABEL_141;
     }
@@ -3568,7 +3568,7 @@
   v113 = v123;
   if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0
     && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) )
-    stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;
+    stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;
 LABEL_141:
   v32 = 0;
   if ( bJumping && !pParty->bFlying )
@@ -4052,7 +4052,7 @@
     {
       LOBYTE(pParty->uFlags) &= 0x7Fu;
       v79 = 20 * pParty->pPartyBuffs[18].uOverlayID + 6180178;
-      *(short *)&stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
+      *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u;
       if ( !v122 || !v69 )
       {
         if ( !v76 )
@@ -8313,15 +8313,15 @@
   int v2; // ebx@3
   unsigned int v3; // eax@3
   MapInfo *v4; // edi@4
-  int v5; // eax@8
-  SpawnPointMM7 *v6; // edx@14
+  //int v5; // eax@8
+  //SpawnPointMM7 *v6; // edx@14
   size_t v7; // eax@19
   char *v8; // eax@19
   char *v9; // eax@21
   char Source[120]; // [sp+Ch] [bp-84h]@19
   const char *pFilename; // [sp+84h] [bp-Ch]@1
-  unsigned int v12; // [sp+88h] [bp-8h]@12
-  int v13; // [sp+8Ch] [bp-4h]@11
+  //unsigned int v12; // [sp+88h] [bp-8h]@12
+  //int v13; // [sp+8Ch] [bp-4h]@11
 
   pFilename = pLevelFilename;
   thisa->AllocSoftwareDrawBuffers();
@@ -8352,32 +8352,33 @@
     (int)&thisa);
   if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x20) )
   {
-    UpdateActors();
-    UpdateLayingItems();
+    InitializeActors();
+    InitializeLayingItems();
   }
   BYTE1(dword_6BE364_game_settings_1) &= 0xDFu;
-  v5 = 0;
+  //v5 = 0;
   if ( !v2 )
     thisa = 0;
   if ( thisa == (OutdoorCamera *)1 )
   {
-    v13 = 0;
-    if ( (signed int)pOutdoor->uNumSpawnPoints > 0 )
-    {
-      v12 = 0;
-      while ( 1 )
-      {
-        v6 = &pOutdoor->pSpawnPoints[v12 / 0x18];
-        if ( pOutdoor->pSpawnPoints[v12 / 0x18].uKind == 3 )
-          SpawnEncounter(v4, v6, v5, v5, v5);
-        else
-          v4->SpawnRandomTreasure(v6);
-        ++v13;
-        v12 += 24;
-        if ( v13 >= (signed int)pOutdoor->uNumSpawnPoints )
-          break;
-        v5 = 0;
-      }
+    //v13 = 0;
+    for (uint i = 0; i < pOutdoor->uNumSpawnPoints; ++i)
+    {
+      //v12 = 0;
+      //while ( 1 )
+      //{
+      auto spawn = pOutdoor->pSpawnPoints + i;
+        //v6 = &pOutdoor->pSpawnPoints[v12 / 0x18];
+      if (spawn->uKind == 3 )
+        SpawnEncounter(v4, spawn, 0, 0, 0);
+      else
+        v4->SpawnRandomTreasure(spawn);
+        //++v13;
+        //v12 += 24;
+        //if ( v13 >= (signed int)pOutdoor->uNumSpawnPoints )
+        //  break;
+        //v5 = 0;
+      //}
     }
     RespawnGlobalDecorations();
   }
@@ -12906,8 +12907,6 @@
 //----- (0043F9E1) --------------------------------------------------------
 void stru170_stru2::_43F9E1(__int16 x, int y, __int16 z, int w)
 {
-  __debugbreak();
-
   _viewport_space_y = y;
   _viewport_space_w = w;
 
@@ -15223,7 +15222,7 @@
   memset(&DstBuf, 0, 0x48u);
   if ( (signed int)v5 >= (signed int)uBufferSize )
   {
-    sprintfex(&Args, "File %s Size %lu - Buffer size %lu", v3, v5, uBufferSize);
+    sprintf(&Args, "File %s Size %lu - Buffer size %lu", v3, v5, uBufferSize);
     Abortf(&Args);
   }
   memcpy(Dst, ptr, v5);
@@ -15300,7 +15299,7 @@
   uLevelStrNumStrings = (signed __int16)v2 - 1;
   if ( v0 > 800 )
   {
-    sprintfex(Args, "MAX_EVENT_TEXT_LENGTH needs to be increased to %lu", v0 + 1);
+    sprintf(Args, "MAX_EVENT_TEXT_LENGTH needs to be increased to %lu", v0 + 1);
     Abortf(Args);
   }
   v6 = 0;
@@ -15826,7 +15825,7 @@
   {
     if ( v10 )
     {
-      sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[409], v0->pName);// "Do you wish to leave %s?"
+      sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[409], v0->pName);// "Do you wish to leave %s?"
       v1 = pTmpBuf;
       goto LABEL_12;
     }
@@ -15859,7 +15858,7 @@
 
   pEventTimer->Pause();
   v0 = const_2();
-  sprintfex(pContainer, "evt%02d", v0);
+  sprintf(pContainer, "evt%02d", v0);
   if ( pParty->uAlignment )
   {
     if ( pParty->uAlignment != 2 )
@@ -15876,7 +15875,7 @@
   pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)];
   v1 = pMapStats->GetMapInfo(pCurrentMapName);
   if ( v1 )
-    sprintfex(byte_591098, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s"
+    sprintf(byte_591098, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s"
   else
     strcpy(byte_591098, pGlobalTXT_LocalizationStrings[79]);// "Exit"
   result = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)17, 0, (int)byte_591098);
@@ -15952,9 +15951,9 @@
       v6 = v3;
       v5 = pGlobalTXT_LocalizationStrings[128]; // "It will take %d days to travel to %s."
     }
-    sprintfex(pTmpBuf, v5, v6, v1->pName);
+    sprintf(pTmpBuf, v5, v6, v1->pName);
     strcat(pTmpBuf, "\n \n");
-    sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName);
+    sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[126], pMapStats->pInfos[v9].pName);
     strcat(pTmpBuf, pTmpBuf2);
     v4 = pFontCreate->CalcTextHeight(pTmpBuf, &v7, 0, 0);
     v7.DrawText2(pFontCreate, 0, (212 - v4) / 2 + 101, 0, pTmpBuf, 3u);
@@ -16014,7 +16013,7 @@
   }
   if ( pGUIWindow2->ptr_1C == (void *)26 )
   {
-    sprintfex(Str, "%s %s", GameUI_StatusBar_TimedString, pKeyActionMap->pPressedKeysBuffer);
+    sprintf(Str, "%s %s", GameUI_StatusBar_TimedString, pKeyActionMap->pPressedKeysBuffer);
     v3 = pFontLucida->GetLineWidth(Str);
     pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, Str, 0, 0, 0);
     pGUIWindow2->DrawFlashingInputCursor(v3 + 13, 357, pFontLucida);
@@ -16175,7 +16174,7 @@
   if ( v3 )
   {
     v4 = pTmpBuf;
-    sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v0->pName, aNPCProfessionNames[v3]);
+    sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v0->pName, aNPCProfessionNames[v3]);
   }
   else
   {
@@ -16193,7 +16192,7 @@
     }
     if ( uDialogueType == 91 )
     {
-      sprintfex(v4, pGlobalTXT_LocalizationStrings[576], dword_F8B1B4);// "Congratulations on your win: here's your stuff: %u gold."
+      sprintf(v4, pGlobalTXT_LocalizationStrings[576], dword_F8B1B4);// "Congratulations on your win: here's your stuff: %u gold."
       pInString = v4;
       v8 = 0;
       goto LABEL_39;
@@ -16358,7 +16357,7 @@
         if ( v0->uFlags & 0x80 )
         {
 LABEL_59:
-          sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v0->pName);
+          sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v0->pName);
           v24 = pTmpBuf;
           goto LABEL_79;
         }
@@ -17271,12 +17270,12 @@
             v25 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8);
             if ( v25 )
             {
-              stru_5E4C90.field_0[_5C3420_pDecoration->field_1C] = _evt->v5 - 124;
+              stru_5E4C90._decor_events[_5C3420_pDecoration->_idx_in_stru123 - 75] = _evt->v5 - 124;
             }
             else
             {
               v26 = _5C3420_pDecoration;
-              stru_5E4C90.field_0[_5C3420_pDecoration->field_1C] = 0;
+              stru_5E4C90._decor_events[_5C3420_pDecoration->_idx_in_stru123 - 75] = 0;
               LOBYTE(v26->field_2) |= 0x20u;
             }
             goto LABEL_291;
@@ -19445,7 +19444,7 @@
   while ( v4 < 200 );
   if ( v4 >= 200 )
   {
-    sprintfex(&Args, "Unable to find Door ID: %i!", uDoorID);
+    sprintf(&Args, "Unable to find Door ID: %i!", uDoorID);
     Abortf(&Args);
   }
   v6 = &pIndoor->pDoors[v4];
--- a/mm7_4.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_4.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -2943,7 +2943,7 @@
   do
   {
     v5 = result + 1;
-    sprintfex(pTmpBuf, "%s%02d", *v3, result + 1);
+    sprintf(pTmpBuf, "%s%02d", *v3, result + 1);
     pIcons_LOD->ReloadTexture(*v4, pTmpBuf, 2);
     result = v5;
     ++v4;
@@ -3357,7 +3357,7 @@
 
   v1 = uHoursToSleep;
   if ( uHoursToSleep > 240 )
-    UpdateActors();
+    InitializeActors();
   v2 = (double)(7680 * v1) * 0.033333335;
   pParty->uTimePlayed += (signed __int64)v2;
   v3 = &pPlayers[1];
@@ -5126,7 +5126,7 @@
         if ( v16 + 10 * (unsigned __int8)*v15 == 552 )
         {
           v46 = v13->GetDisplayName();
-          sprintfex(a1, format_4E2D80, v59, v46);
+          sprintf(a1, format_4E2D80, v59, v46);
 LABEL_117:
           v11 = a1;
           goto LABEL_118;
@@ -5172,7 +5172,7 @@
 LABEL_108:
           strncpy(a1, v15, 2u);
           v51 = atoi(a1);
-          sprintfex(a1, "%lu", v51);
+          sprintf(a1, "%lu", v51);
           goto LABEL_117;
         }
         v26 = &p2DEvents[(signed int)a4 - 1].fPriceMultiplier;
@@ -5216,7 +5216,7 @@
             }
           }
 LABEL_98:
-          sprintfex(a1, "%lu", v29);
+          sprintf(a1, "%lu", v29);
           goto LABEL_117;
         }
         v34 = *v26;
@@ -5252,7 +5252,7 @@
             v53 = v56.field_C + 1;
             v50 = v56.field_14;
 LABEL_116:
-            sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54);
+            sprintf(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v50], v53, v54);
             goto LABEL_117;
           }
           v52 = pPlayers[4];
@@ -5387,6 +5387,7 @@
   int uX; // [sp+160h] [bp-10h]@18
   unsigned int v133; // [sp+164h] [bp-Ch]@25
   int v134; // [sp+168h] [bp-8h]@14
+  char *Str; // [sp+16Ch] [bp-4h]@18
   Player *pPlayer;
   const char *pSkillName;
 
@@ -5474,6 +5475,8 @@
   v119 = 6 * v6 + 169;
   do
   {
+    Str = pPlayer->pName;
+
     pGUIWindow_CurrentMenu->DrawText(
       pFontCreate,
       v134 + 73,
@@ -5844,32 +5847,8 @@
     ++uControlParama;
   }
   while ( (signed int)uXa < 640 );
-  pCreationUI_BtnPressLeft[0] = pGUIWindow_CurrentMenu->CreateButton(
-                                  10u,
-                                  32u,
-                                  11u,
-                                  13u,
-                                  1,
-                                  0,
-                                  0xABu,
-                                  0,
-                                  0,
-                                  "",
-                                  pTexture_presleft,
-                                  0);
-  pCreationUI_BtnPressLeft[1] = pGUIWindow_CurrentMenu->CreateButton(
-                                  169u,
-                                  32u,
-                                  11u,
-                                  13u,
-                                  1,
-                                  0,
-                                  0xABu,
-                                  1u,
-                                  0,
-                                  "",
-                                  pTexture_presleft,
-                                  0);
+  pCreationUI_BtnPressLeft[0] = pGUIWindow_CurrentMenu->CreateButton(10u, 32u, 11u, 13u, 1, 0, 0xABu, 0, 0, "", pTexture_presleft, 0);
+  pCreationUI_BtnPressLeft[1] = pGUIWindow_CurrentMenu->CreateButton(169u, 32u, 11u, 13u, 1, 0, 0xABu, 1u, 0, "", pTexture_presleft, 0);
   pCreationUI_BtnPressLeft[2] = pGUIWindow_CurrentMenu->CreateButton(
                                   327u,
                                   32u,
@@ -9513,7 +9492,7 @@
   v1 = *_this - 399;
   v2 = (*_this - 400) % 11 + 1;
   v11 = 4 * (*_this - 400) / 11;
-  sprintfex(pTmpBuf, "%s%03d", spellbook_texture_filename_suffices[v11 / 4], v2);
+  sprintf(pTmpBuf, "%s%03d", spellbook_texture_filename_suffices[v11 / 4], v2);
   if ( pMouse->GetCursorPos(&a2)->y <= 320 )
     v3 = pMouse->GetCursorPos(&a2)->y + 30;
   else
@@ -9536,7 +9515,7 @@
     v5 = v13;
   if ( v4 > v5 )
     v5 = v4;
-  sprintfex(
+  sprintf(
     pTmpBuf2,
     "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s",
     pSpellStats->pInfos[v1].pDescription,
@@ -9573,7 +9552,7 @@
   a1.uFrameZ = a1.uFrameX + 107;
   a1.uFrameWidth = 108;
   a1.DrawText2(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u);
-  sprintfex(pTmpBuf, "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * v1));
+  sprintf(pTmpBuf, "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * v1));
   return a1.DrawText2(
            pFontComic,
            0xCu,
@@ -9606,7 +9585,7 @@
     v4.uFrameX = 483;
     v4.uFrameWidth = 148;
     v4.uFrameZ = 334;
-    sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[427], pPlayer->pName, pGlobalTXT_LocalizationStrings[562]);// 
+    sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427], pPlayer->pName, pGlobalTXT_LocalizationStrings[562]);// 
                                                 // "%s is in no condition to %s"
                                                 // "do anything"
     v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
@@ -10333,7 +10312,7 @@
       {
         if ( v31 == v14 )
         {
-          sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[634], pClassNames[v10 + 2], pClassNames[v10 + 3]);
+          sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[634], pClassNames[v10 + 2], pClassNames[v10 + 3]);
           return pTmpBuf;
         }
         v25 = pClassNames[v10 + 2];
@@ -10351,7 +10330,7 @@
     }
     v22 = pGlobalTXT_LocalizationStrings[633];
 LABEL_23:
-    sprintfex(pTmpBuf, v22, v25);
+    sprintf(pTmpBuf, v22, v25);
     return pTmpBuf;
   }
   if ( !v1->CanAct() )
@@ -10550,7 +10529,7 @@
     v24 = pSkillNames[v17];
     v21 = pGlobalTXT_LocalizationStrings[225];
 LABEL_90:
-    sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], v21, v24, v27);
+    sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], v21, v24, v27);
   }
   return pTmpBuf2;
 }
@@ -10675,7 +10654,7 @@
     v2 = (&off_4EB080)[4 * uHouse_ExitPic];
     if ( !v2 )
     {
-      sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[411], v0);
+      sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[411], v0);
       v2 = pTmpBuf;
     }
     v3 = v2;
@@ -10691,7 +10670,7 @@
   v7 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u);
   v8 = v6->uProfession;
   if ( v8 )
-    sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]);
+    sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]);
   else
     strcpy(pTmpBuf, v6->pName);
   a1.DrawText2(pFontCreate, 0x1E3u, 0x71u, v7, pTmpBuf, 3u);
@@ -10770,8 +10749,8 @@
           v30 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
           v31 = *(int *)v29;
           v32 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
-          sprintfex(pTmpBuf, &byte_4F0F98, v32, v31, v30);
-          sprintfex(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]);
+          sprintf(pTmpBuf, &byte_4F0F98, v32, v31, v30);
+          sprintf(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]);
           ptr_F8B1E8 = pTmpBuf2;
           v15 = "";
           goto LABEL_45;
@@ -10813,8 +10792,8 @@
             }
             if ( uDialogueType != 84 )
               goto LABEL_49;
-            sprintfex(pTmpBuf, format_4E2D80, v55, pItemsTable->pItems[dword_F8B1A8].pUnidentifiedName);
-            sprintfex(pTmpBuf2, ptr_F8B1E8, pTmpBuf);
+            sprintf(pTmpBuf, format_4E2D80, v55, pItemsTable->pItems[dword_F8B1A8].pUnidentifiedName);
+            sprintf(pTmpBuf2, ptr_F8B1E8, pTmpBuf);
             ptr_F8B1E8 = pTmpBuf2;
             goto LABEL_45;
           }
@@ -11800,7 +11779,7 @@
   {
     pDialogueWindow->Release();
     pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0);
-    sprintfex(byte_591098, pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[uHouse_ExitPic].pName);
+    sprintf(byte_591098, pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[uHouse_ExitPic].pName);
     ptr_5076F4 = pDialogueWindow->CreateButton(
                    0x236u,
                    0x1BDu,
@@ -12194,7 +12173,7 @@
             while ( (signed int)v15 < v13->pNumPresenceButton + v13->pStartingPosActiveItem );
             if ( v72 )
             {
-              sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v73);// "Skill Cost: %lu"
+              sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v73);// "Skill Cost: %lu"
               v65.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
               v73 = (signed int)(149 - i) / v72;
               if ( v73 > 32 )
@@ -12244,7 +12223,7 @@
             else
             {
 LABEL_76:
-              sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->uClass]);// 
+              sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v0->pName, pClassNames[v0->uClass]);// 
                                                 // "Seek knowledge elsewhere %s the %s"
               strcat(pTmpBuf, "\n \n");
               strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);// "I can offer you nothing further."
@@ -12302,7 +12281,7 @@
                 pOutdoor->SetFog();
             }
             v0->PlaySound(87, 0);
-            sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[430], v0->pName, v0->uLevel, v0->uLevel / 10 + 5);// 
+            sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[430], v0->pName, v0->uLevel, v0->uLevel / 10 + 5);// 
                                                 // "%s is now Level %lu and has earned %lu Skill Points!"
             ShowStatusBarString(pTmpBuf, 2u);
             goto LABEL_56;
@@ -12323,7 +12302,7 @@
           }
           return result;
         }
-        sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[538], v5 - LODWORD(v0->uExperience), v34 + 1);// 
+        sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[538], v5 - LODWORD(v0->uExperience), v34 + 1);// 
                                                 // "You need %d more experience to train to level %d"
         v35 = 0;
         v62 = 3;
@@ -12333,7 +12312,7 @@
       }
       else
       {
-        sprintfex(pTmpBuf, "%s\n \n%s", pGlobalTXT_LocalizationStrings[536], pGlobalTXT_LocalizationStrings[529]);// 
+        sprintf(pTmpBuf, "%s\n \n%s", pGlobalTXT_LocalizationStrings[536], pGlobalTXT_LocalizationStrings[529]);// 
                                                 // ""With your skills, you should be working here as a teacher.""
                                                 // ""Sorry, but we are unable to train you.""
         v35 = 0;
@@ -12384,7 +12363,7 @@
               v61 = pGlobalTXT_LocalizationStrings[536];// ""With your skills, you should be working here as a teacher.""
               v59 = "%s\n \n%s";
             }
-            sprintfex(*v45, v59, v61, v64);
+            sprintf(*v45, v59, v61, v64);
           }
           v47 = pFontArrus->CalcTextHeight(*v45, &v65, 0, 0);
           v43 = pDialogueWindow;
@@ -12666,7 +12645,7 @@
           if ( !v122 )
           {
 LABEL_140:
-            sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]);// 
+            sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], _this->pName, pClassNames[_this->uClass]);// 
                                                 // "Seek knowledge elsewhere %s the %s"
             strcat(pTmpBuf, "\n \n");
             strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);// "I can offer you nothing further."
@@ -12679,7 +12658,7 @@
             v88 = &v112;
             goto LABEL_61;
           }
-          sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v119);// "Skill Cost: %lu"
+          sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v119);// "Skill Cost: %lu"
           v112.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
           v119 = (const char **)((149 - v118) / v122);
           if ( (149 - v118) / v122 > 32 )
@@ -13535,7 +13514,7 @@
         v3 = (int)(&v1->uIntelligence + dword_F8B19C);
         if ( *(short *)v3 )
         {
-          sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[403], pClassNames[dword_F8B19C + 20]);
+          sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[403], pClassNames[dword_F8B19C + 20]);
           ShowStatusBarString(pTmpBuf, 2u);
           pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
         }
@@ -13707,7 +13686,7 @@
   if ( !v61 )
   {
 LABEL_64:
-    sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v58->pName, pClassNames[v58->uClass]);
+    sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v58->pName, pClassNames[v58->uClass]);
     strcat(pTmpBuf, "\n \n");
     strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
     v18 = pTmpBuf;
@@ -13721,7 +13700,7 @@
   }
   if ( Str )
   {
-    sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v63);
+    sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v63);
     v52.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
   }
   v63 = (signed int)(149 - v62) / v61;
@@ -13911,7 +13890,7 @@
             while ( (signed int)v62 < v4->pNumPresenceButton + v11 );
             if ( v65 )
             {
-              sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v64);
+              sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v64);
               v57.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
               v64 = (149 - (signed int)v66) / (signed int)v65;
               if ( v64 > 32 )
@@ -13963,7 +13942,7 @@
             else
             {
 LABEL_78:
-              sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->uClass]);
+              sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->uClass]);
               strcat(pTmpBuf, "\n \n");
               strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
               v22 = WORD2(v59);
@@ -14117,7 +14096,7 @@
   v41->uY = 0;
   if ( v1->_4B6FF9() )
   {
-    sprintfex(a1, "%s %d %s", pGlobalTXT_LocalizationStrings[104], HIDWORD(v60), pGlobalTXT_LocalizationStrings[97]);
+    sprintf(a1, "%s %d %s", pGlobalTXT_LocalizationStrings[104], HIDWORD(v60), pGlobalTXT_LocalizationStrings[97]);
     v63 = 0;
   }
   strcpy(&Dest, pGlobalTXT_LocalizationStrings[68]);
@@ -14412,14 +14391,14 @@
   if ( !v34 )
   {
 LABEL_40:
-    sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->uClass]);
+    sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->uClass]);
     strcat(pTmpBuf, "\n \n");
     strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]);
     v22 = v31;
     v23 = pFontArrus->CalcTextHeight(pTmpBuf, &v28, 0, 0);
     return (int)v28.DrawText2(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf, 3u);
   }
-  sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v32);
+  sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v32);
   v28.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
   v32 = (149 - v33) / v34;
   if ( (149 - v33) / v34 > 32 )
@@ -14574,7 +14553,7 @@
       v59 = pDialogueWindow;
       v54 = v17;
       strcpy(&Dest, "");
-      sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[405], s1);
+      sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[405], s1);
       v18 = pFontArrus->CalcTextHeight(pTmpBuf2, &v53, 0, 0);
       v19 = v16->pNumPresenceButton;
       v20 = v18 + v17 + 146;
@@ -14605,7 +14584,7 @@
           if ( pDialogueWindow->pCurrentPosActiveItem != s1 )
             v27 = *(const char **)v57;
           v47[1] = v27;
-          sprintfex(a1, format_4E2DC8, v27);
+          sprintf(a1, format_4E2DC8, v27);
           v66 = (unsigned __int8)byte_4F09B8[v26 * 4];
           if ( (signed int)ptr_507BC0->ptr_1C >= 63 )
           {
@@ -14628,7 +14607,7 @@
           if ( v61 != (Player *)v2 )
           {
             memcpy(&v32, (char *)&pMapStats + 68 * (unsigned __int8)byte_4F09B0[v26 * 4], 0x44u);
-            sprintfex(
+            sprintf(
               pTmpBuf,
               pGlobalTXT_LocalizationStrings[404],
               v66,
@@ -14690,7 +14669,7 @@
         v45 = (unsigned int)&v49;
         v44 = &v48;
         v43 = pTmpBuf2;
-        sprintfex(pTmpBuf, "%s\n \n%s%s%s%s%s", pTmpBuf2, &v48, &v49, &v50, &v51, &Dest);
+        sprintf(pTmpBuf, "%s\n \n%s%s%s%s%s", pTmpBuf2, &v48, &v49, &v50, &v51, &Dest);
         v53.DrawText2(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u);
       }
       else
@@ -15379,7 +15358,7 @@
   pEventTimer->Pause();
   pAudioPlayer->StopChannels(-1, -1);
   v11 = const_2();
-  sprintfex(pContainer, "evt%02d", v11);
+  sprintf(pContainer, "evt%02d", v11);
   if ( pParty->uAlignment )
   {
     if ( pParty->uAlignment != 2 )
@@ -15412,7 +15391,7 @@
         v20 = pMapStats->pInfos[v14].pName;
         v18 = pGlobalTXT_LocalizationStrings[410];
 LABEL_10:
-        sprintfex(byte_591098, v18, v20);
+        sprintf(byte_591098, v18, v20);
         goto LABEL_20;
       }
       v21 = pGlobalTXT_LocalizationStrings[79];
@@ -15535,7 +15514,7 @@
     do
     {
       v8 = v19;
-      sprintfex(pContainer, "npc%03u", Dst[v19]);
+      sprintf(pContainer, "npc%03u", Dst[v19]);
       v9 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
       ++v19;
       pDialogueNPCPortraits[v8] = &pIcons_LOD->pTextures[v9];
@@ -15641,7 +15620,7 @@
         v9 -= 12;
         v8 = 1;
       }
-      sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[414], v6, aAMPMNames[v7], v9, aAMPMNames[v8]);
+      sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[414], v6, aAMPMNames[v7], v9, aAMPMNames[v8]);
       ShowStatusBarString(pTmpBuf, 2u);
       if ( uActiveCharacter )
         pPlayers[uActiveCharacter]->PlaySound(3, 0);
@@ -15698,7 +15677,7 @@
     if ( !pIcons_LOD->uNumPrevLoadedFiles )
       pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
     v16 = const_2();
-    sprintfex(pContainer, "evt%02d", v16);
+    sprintf(pContainer, "evt%02d", v16);
     if ( pParty->uAlignment )
     {
       if ( pParty->uAlignment != 2 )
--- a/mm7_5.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_5.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -2229,7 +2229,7 @@
                     v66 = stru_4ECBB8[uMessageParam].rot_x;
                     _5B65B4_npcdata_loword_house_or_other = stru_4ECBB8[uMessageParam].rot_y;
                     _5B65B8_npcdata_hiword_house_or_other = v66;
-                    UpdateActors();
+                    InitializeActors();
                   }
                   v67 = pGUIWindow_CurrentMenu->Hint;
                   if ( v67 )
@@ -11721,18 +11721,13 @@
 
 
 //----- (00408768) --------------------------------------------------------
-char __cdecl UpdateActors()
-{
-  unsigned int v0; // edi@1
-  __int16 v1; // ax@7
-  char *v2; // esi@10
-  char v3; // zf@13
+void InitializeActors()
+{
   signed int v5; // [sp+Ch] [bp-10h]@1
   signed int v6; // [sp+10h] [bp-Ch]@1
   signed int v7; // [sp+14h] [bp-8h]@1
   signed int v8; // [sp+18h] [bp-4h]@1
 
-  v0 = 0;
   v8 = 0;
   v6 = 0;
   v7 = 0;
@@ -11741,65 +11736,48 @@
     v8 = 1;
   if ( !_strcmpi(pCurrentMapName, "d26.blv") )
     v6 = 1;
-  if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 99) )
+  if (_449B57_test_bit(pParty->_award_bits, 99))
     v7 = 1;
-  v1 = _449B57_test_bit(pParty->_award_bits, 100);
-  if ( v1 )
+  if (_449B57_test_bit(pParty->_award_bits, 100))
     v5 = 1;
-  if ( (signed int)uNumActors > 0 )
-  {
-    v2 = (char *)&pActors[0].vPosition;
-    do
-    {
-      if ( ((Actor *)(v2 - 142))->CanAct() || *((short *)v2 + 17) == 19 )
-      {
-        v3 = *((short *)v2 + 17) == 19;
-        *(short *)v2 = *((short *)v2 + 10);
-        *((short *)v2 + 1) = *((short *)v2 + 11);
-        *((short *)v2 + 2) = *((short *)v2 + 12);
-        *((short *)v2 - 51) = *((short *)v2 - 17);
-        if ( !v3 )
-          Actor::_403EB6(v0, dword_4F6E08[v0], *(int *)(v2 - 18), 0);
-      }
-      *(v2 - 81) = 0;
-      LOBYTE(v1) = 0;
-      if ( !v8 || v7 )
-      {
-        if ( !v6 || v5 )
-        {
-          LOBYTE(v1) = ((Actor *)(v2 - 142))->_438B9B();
-          if ( (char)v1 )
-            *(v2 - 104) &= 0xF7u;
-        }
-      }
-      *(v2 - 104) &= 0x7Fu;
-      if ( *(v2 - 104) & 0x40 )
-        LOBYTE(v1) = Actor::_4031C1_update_job(v0, pParty->uCurrentHour, 1);
-      ++v0;
-      v2 += 836;
-    }
-    while ( (signed int)v0 < (signed int)uNumActors );
-  }
-  return v1;
+  for (uint i = 0; i < uNumActors; ++i)
+  {
+    auto actor = pActors + i;
+
+    if (actor->CanAct() || actor->uAIState == Disabled)
+    {
+      actor->vPosition.x = actor->vInitialPosition.x;
+      actor->vPosition.y = actor->vInitialPosition.y;
+      actor->vPosition.z = actor->vInitialPosition.z;
+      actor->sCurrentHP = actor->pMonsterInfo.uHP;
+      if (actor->uAIState != Disabled)
+        Actor::_403EB6(i, dword_4F6E08[i], actor->pMonsterInfo.uRecoveryTime, 0);
+    }
+
+    actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
+
+    if (!v8 || v7)
+      if (!v6 || v5)
+        if (actor->_438B9B())
+          BYTE2(actor->uAttributes) &= 0xF7u;
+
+    BYTE2(actor->uAttributes) &= 0x7Fu;
+    if (BYTE2(actor->uAttributes) & 0x40)
+        Actor::_4031C1_update_job(i, pParty->uCurrentHour, 1);
+  }
 }
 
 //----- (00408896) --------------------------------------------------------
-void UpdateLayingItems()
-{
-  unsigned int v0; // edi@1
-  char *v1; // esi@1
-  char *result; // eax@7
-
-  v0 = 0;
-  v1 = (char *)&pLayingItems[0].uObjectDescID;
-  do
-  {
-    if ( *(short *)v1 && (v1[24] & 8 || pObjectList->pObjects[*(short *)v1].uFlags & 0x10) )
-      LayingItem::_42F933(v0);
-    v1 += 112;
-    ++v0;
-  }
-  while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) );
+void InitializeLayingItems()
+{
+  for (uint i = 0; i < uNumLayingItems; ++i)
+  {
+    auto item = pLayingItems + i;
+
+    if (item->uItemType &&
+        (item->uSoundID & 8 || pObjectList->pObjects[item->uItemType].uFlags & 0x10))
+      LayingItem::_42F933(i);
+  }
 
   for (uint i = 0; i < 100; ++i)
     array_5118E8.pElements[i].field_C_time_left = 0;
--- a/mm7_6.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_6.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -6499,7 +6499,7 @@
             if ( v447->IsInteractive() )
             {
               _5C3420_pDecoration = v447;
-              EventProcessor(stru_5E4C90.field_0[v447->field_1C] + 380, 0, 1);
+              EventProcessor(stru_5E4C90._decor_events[v447->_idx_in_stru123 - 75] + 380, 0, 1);
               _5C3420_pDecoration = (LevelDecoration *)v1;
             }
           }
--- a/mm7_data.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_data.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -803,7 +803,7 @@
 char aUndefinedCobje[777]; // idb
 char aEWorkMsdevMm_7[777]; // idb
 char aGammaControlNo[777]; // idb
-__int16 word_4E8152[11];
+__int16 word_4E8152[11] = {0, 0, 0, 90, 8, 2, 70, 20, 10, 50, 30};
 char byte_4E8168[116];
 char aD3dTextureName[777]; // idb
 char aLogd3d_txt[777]; // idb
@@ -821,324 +821,6 @@
 };
 stru355 stru_4E82A4 = {0x20, 0x41, 0, 0x20, 0xFF0000, 0xFF00, 0xFF, 0xFF000000};
 stru355 stru_4EFCBC = {0x20, 0x41, 0, 0x10, 0x7C00, 0x3E0, 0x1F, 0x8000};
-char aGlobal_txt[777]; // idb
-char aMagic[777]; // idb
-char aDark_0[777]; // idb
-char aLight_1[777]; // idb
-char aBody_0[777]; // idb
-char aMind_1[777]; // idb
-char aSpirit_1[777]; // idb
-char aEarth_0[777]; // idb
-char aWater_0[777]; // idb
-char aFire_1[777]; // idb
-char aSpells_txt[777]; // idb
-char aParsingError[777]; // idb
-char aErrorParsingPo[777]; // idb
-char Text[777]; // idb
-char Caption[777]; // idb
-char asc_4E8530[777]; // idb
-char a222[777]; // idb
-char asc_4E8538[777]; // idb
-char aPotion_txt[777]; // idb
-char aErrorParsing_0[777]; // idb
-char aPotnotes_txt[777]; // idb
-char aHistory_txt[777]; // idb
-char aPsychotic[777]; // idb
-char aDizzy[777]; // idb
-char aDrugged[777]; // idb
-char aUnderwater[777]; // idb
-char aSewerpipe[777]; // idb
-char aParkinglot[777]; // idb
-char aPlain[777]; // idb
-char aQuarry[777]; // idb
-char aMountains[777]; // idb
-char aCity[777]; // idb
-char aForest[777]; // idb
-char aAlley[777]; // idb
-char aStonecorridor[777]; // idb
-char aHallway[777]; // idb
-char aCarpetedhallwa[777]; // idb
-char aHangar[777]; // idb
-char aArena[777]; // idb
-char aCave[777]; // idb
-char aConcerthall[777]; // idb
-char aAuditorium[777]; // idb
-char aStoneroom[777]; // idb
-char aLivingroom[777]; // idb
-char aBathroom[777]; // idb
-char aRoom[777]; // idb
-char aPaddedcell[777]; // idb
-char aGeneric[777]; // idb
-char aMapstats_txt[777]; // idb
-char aHostile_txt[777]; // idb
-char aEWorkMsdevMm_9[777]; // idb
-char aUnknownMonster[777]; // idb
-char aHammerhands[777]; // idb
-char aPsychic[777]; // idb
-char aBlades[777]; // idb
-char aMind[777]; // idb
-char aHarm[777]; // idb
-char aFate[777]; // idb
-char aSummon[777]; // idb
-char aReanimate[777]; // idb
-char aDragon[777]; // idb
-char aBless[777]; // idb
-char aAcid[777]; // idb
-char off_4E876C[777]; // idb
-char aMass[777]; // idb
-char aRock[777]; // idb
-char aFire[777]; // idb
-char aIncinerate[777]; // idb
-char aFireball[777]; // idb
-char aParalyze[777]; // idb
-char aShrapmetal[777]; // idb
-char aToxic[777]; // idb
-char aLight[777]; // idb
-char aSparks[777]; // idb
-char aPain[777]; // idb
-char aHeroism[777]; // idb
-char aHaste[777]; // idb
-char aStone[777]; // idb
-char aImplosion[777]; // idb
-char aLightning[777]; // idb
-char aMeteor[777]; // idb
-char aPower[777]; // idb
-char aSpirit[777]; // idb
-char aShield[777]; // idb
-char aHour[777]; // idb
-char aDay[777]; // idb
-char aDispel[777]; // idb
-char aEner[777]; // idb
-char aDark[777]; // idb
-char aLight_0[777]; // idb
-char aBody[777]; // idb
-char aMind_0[777]; // idb
-char aSpirit_0[777]; // idb
-char aEarth[777]; // idb
-char aWater[777]; // idb
-char off_4E887C[777]; // idb
-char aFire_0[777]; // idb
-char aArrowf[777]; // idb
-char aArrow[777]; // idb
-char aPlacemon_txt[777]; // idb
-char aExplode[777]; // idb
-char aGround[777]; // idb
-char aCanTCreateRa_0[777]; // idb
-char asc_4E88E8[777]; // idb
-char aSummon_0[777]; // idb
-char aShot[777]; // idb
-char aG[777]; // idb
-char aM[777]; // idb
-char aE_0[2]; // weak
-char aDrainsp[777]; // idb
-char off_4E8910[777]; // idb
-char aSteal[777]; // idb
-char aBrkweapon[777]; // idb
-char aBrkarmor[777]; // idb
-char aBrkitem[777]; // idb
-char aErrad[777]; // idb
-char aStone_0[777]; // idb
-char aDead[777]; // idb
-char aUncon[777]; // idb
-char aParalyze_0[777]; // idb
-char aDisease3[777]; // idb
-char aDisease2[777]; // idb
-char aDisease1[777]; // idb
-char aPoison3[777]; // idb
-char aPoison2[777]; // idb
-char aPoison1[777]; // idb
-char aInsane[777]; // idb
-char aDrunk[777]; // idb
-char aAfraid[777]; // idb
-char aAsleep[777]; // idb
-char SubStr[777]; // idb
-char aCurse[6]; // weak
-char aN[777]; // idb
-char aGem[777]; // idb
-char aScroll[777]; // idb
-char aWand[777]; // idb
-char aAmulet[777]; // idb
-char aRing[777]; // idb
-char aBoots[777]; // idb
-char aGauntlets[777]; // idb
-char aCape[777]; // idb
-char aBelt[777]; // idb
-char aHelm[777]; // idb
-char aShield_0[777]; // idb
-char aPlate[777]; // idb
-char aChain[777]; // idb
-char aStaff[777]; // idb
-char aClub[777]; // idb
-char aMace[777]; // idb
-char aBow[777]; // idb
-char aSpear[777]; // idb
-char aAxe[777]; // idb
-char aDagger[777]; // idb
-char aSword[777]; // idb
-char aMisc[777]; // idb
-char aArmor[777]; // idb
-char aWeapon[777]; // idb
-char aMonsters_txt[777]; // idb
-char aNewitemgen[777]; // idb
-char aClass_txt[777]; // idb
-char aStats_txt[777]; // idb
-char aSkilldes_txt[777]; // idb
-char aRnditems_txt[777]; // idb
-char aSpecial[777]; // idb
-char aRelic[777]; // idb
-char aArtifact[777]; // idb
-char aClub_0[777]; // idb
-char aPlate_0[777]; // idb
-char aChain_0[777]; // idb
-char aLeather_0[777]; // idb
-char aBlaster[777]; // idb
-char aMace_0[777]; // idb
-char aSpear_0[777]; // idb
-char aAxe_0[777]; // idb
-char aDagger_0[777]; // idb
-char aSword_0[777]; // idb
-char aStaff_0[777]; // idb
-char aGem_0[777]; // idb
-char aGold[777]; // idb
-char aMscroll[777]; // idb
-char aSscroll[777]; // idb
-char aBottle[777]; // idb
-char aReagent[777]; // idb
-char aHerb[777]; // idb
-char aWeaponw[777]; // idb
-char aAmulet_0[777]; // idb
-char aRing_0[777]; // idb
-char aBoots_0[777]; // idb
-char aGauntlets_0[777]; // idb
-char aCloak[777]; // idb
-char aBelt_0[777]; // idb
-char aHelm_0[777]; // idb
-char aShield_1[777]; // idb
-char aArmor_0[777]; // idb
-char aBow_0[777]; // idb
-char aMissile[777]; // idb
-char aWeapon1or2[777]; // idb
-char aWeapon2[777]; // idb
-char aWeapon_0[777]; // idb
-char aItems_txt[777]; // idb
-char aSpcitems_txt[777]; // idb
-char aStditems_txt[777]; // idb
-char aUnableToSaveDd[777]; // idb
-char aDataDdeclist_b[777]; // idb
-char aDecDescrip[777]; // idb
-char aDusk[777]; // idb
-char aDawn[777]; // idb
-char aEmitfire[777]; // idb
-char aLoopslow[777]; // idb
-char aMarker[777]; // idb
-char aFf[777]; // idb
-char aFm[3]; // idb
-char aFs[3]; // idb
-char aInvisible[777]; // idb
-char off_4E8CB8[777]; // idb
-char aDecorationde_0[777]; // idb
-char aDecorationdesc[777]; // idb
-char aUnableToSaveDc[777]; // idb
-char aDataDchest_bin[777]; // idb
-char aChestDescrip[777]; // idb
-char aChestdescrip_0[777]; // idb
-char aChestdescripti[777]; // idb
-char aUnableToSave_0[777]; // idb
-char aDataDoverlay_b[777]; // idb
-char aOvlDes_[777]; // idb
-char aTransparent[777]; // idb
-char aCenter[7]; // weak
-char aOverlaydescrip[777]; // idb
-char aObjectdescript[777]; // idb
-char aUnableToSaveDo[777]; // idb
-char aDataDobjlist_b[777]; // idb
-char aObjDescrip[777]; // idb
-char aLines[777]; // idb
-char aBounce[777]; // idb
-char aFlagonintercep[777]; // idb
-char aNogravity[777]; // idb
-char aNopickup[777]; // idb
-char aFtlifetime[777]; // idb
-char aLifetime[777]; // idb
-char aNodraw[777]; // idb
-char aObjectdescri_0[777]; // idb
-char aBits[777]; // idb
-char aUnableToSaveDm[777]; // idb
-char aDataDmonlist_b[777]; // idb
-char aMonRace[777]; // idb
-char aMonsterracel_0[777]; // idb
-char aMonsterracelis[777]; // idb
-char a__10[777]; // idb
-char aKey_stepright[777]; // idb
-char aKey_stepleft[777]; // idb
-char aKey_alwaysrun[777]; // idb
-char aKey_land[777]; // idb
-char aKey_flydown[777]; // idb
-char aKey_flyup[777]; // idb
-char aKey_zoomout[777]; // idb
-char aKey_zoomin[777]; // idb
-char aKey_centerview[777]; // idb
-char aKey_lookdown[777]; // idb
-char aKey_lookup[777]; // idb
-char aKey_mapbook[777]; // idb
-char aKey_autonotes[777]; // idb
-char aKey_timecal[777]; // idb
-char aKey_rest[777]; // idb
-char aKey_quickref[777]; // idb
-char aKey_quest[777]; // idb
-char aKey_charcycle[777]; // idb
-char aKey_pass[777]; // idb
-char aKey_cast[777]; // idb
-char aKey_eventtrigg[777]; // idb
-char aKey_combat[777]; // idb
-char aKey_jump[777]; // idb
-char aKey_yell[777]; // idb
-char aKey_castready[777]; // idb
-char aKey_attack[777]; // idb
-char aKey_right[777]; // idb
-char aKey_left[777]; // idb
-char aKey_backward[777]; // idb
-char pKeyName[777]; // idb
-char aDefault[777]; // idb
-char aControl[777]; // idb
-char aBackspace[777]; // idb
-char aBackslash[777]; // idb
-char aSquote[777]; // idb
-char aSlash[777]; // idb
-char aPeriod[777]; // idb
-char aSemicolon[777]; // idb
-char aDecimal[777]; // idb
-char aComma[777]; // idb
-char aInsert[777]; // idb
-char aHome[777]; // idb
-char aDelete[777]; // idb
-char aEnd[777]; // idb
-char aAdd[777]; // idb
-char aSubtract[777]; // idb
-char aTab[777]; // idb
-char aPage_up[777]; // idb
-char aPage_down[777]; // idb
-char aSpace[777]; // idb
-char aReturn[777]; // idb
-char aDown[777]; // idb
-char aUp[777]; // idb
-char asc_4E925C[777]; // idb
-char aCouldNotInitia[49]; // weak
-char aInvalidDi_keyb[777]; // idb
-char aEWorkMsdevM_10[45]; // weak
-char aInvalidDi_ke_0[777]; // idb
-char aInvalidDi_ke_1[777]; // idb
-char aUknownKeyDetec[777]; // idb
-char aEffpar03[777]; // idb
-char aErrorFailedToB[777]; // idb
-char aErrorFailedToG[777]; // idb
-char aEWorkMsdevM_11[777]; // idb
-char aLightpolyBuild[777]; // idb
-char aUndefinedClipF[30]; // weak
-char aInvalidLightTy[777]; // idb
-char aInvalidLight_0[777]; // idb
-char aUknownStripTyp[777]; // idb
-char aInvalidLightma[777]; // idb
 char byte_4E94D0 = 5; // weak
 char byte_4E94D1 = 9; // weak
 char _4E94D2_light_type = 6; // weak
@@ -1147,369 +829,7 @@
 unsigned int saveload_dlg_ys[2] = {60, 0};
 unsigned int saveload_dlg_zs[2] = {460, 640};
 unsigned int saveload_dlg_ws[2] = {344, 480};
-char aEWorkMsdevM_12[777]; // idb
-char a___0[777]; // idb
-char aSave03d_mm7[777]; // idb
-char Name[777]; // idb
-char aAr_dn_dn_0[777]; // idb
-char aAr_up_dn_0[777]; // idb
-char aLs_saved[777]; // idb
-char aLs_loadd[777]; // idb
-char aX_d[777]; // idb
-char aImage_pcx[777]; // idb
-char aHeader_bin[777]; // idb
-char aSavesS[777]; // idb
-char aX_u[777]; // idb
-char aLs_saveu[777]; // idb
-char aLs_loadu[777]; // idb
-char aSave_up[777]; // idb
-char aLoad_up[777]; // idb
-char aLoadsave[777]; // idb
-char a1_mm7[6]; // weak
-char aUnableToFindS[777]; // idb
-char aLevelsS[777]; // idb
-char aNpcgroup_bin[777]; // idb
-char aNpcdata_bin[777]; // idb
-char aOverlay_bin[777]; // idb
-char aClock_bin[777]; // idb
-char aParty_bin[777]; // idb
-char ExistingFileName[777]; // idb
-char NewFileName[777]; // idb
-char aSS_2[777]; // idb
-char aSavesSave03d_m[777]; // idb
-char aSD02dSDSD[777]; // idb
-char aLevellod[777]; // idb
-char aLevelsSS[777]; // idb
-char a_lod[5]; // weak
-char aDataGames_lod[777]; // idb
-char Default[777]; // idb
-char aCurrent[777]; // idb
-char aNewmapsForMmvi[777]; // idb
-char aMmvii[777]; // idb
-char aOutOfMemoryLoa[777]; // idb
-char aAttemptToOpenN[777]; // idb
-char aFileSIsNotABlv[777]; // idb
-char aD23_blv[777]; // idb
-char aEventTrigger[777]; // idb
-char aLodapp_tmp[777]; // idb
-char aWb[777]; // idb
-char aLod_tmp[777]; // idb
-char aLodIndex[777]; // idb
-char aLod[777]; // idb
-char aLodCarray[777]; // idb
-char aRb_0[777]; // idb
-char aLodio[777]; // idb
-char aAttemptToRes_0[777]; // idb
-char aLodsub[777]; // idb
-char aAttemptToReset[777]; // idb
-char aMm6[777]; // idb
-char aLodchapterpage[777]; // idb
-char aLODFile[777]; // idb
-char aChapter[777]; // idb
-char aUnableToAppend[777]; // idb
-char aIndoorBlvFiles[26]; // weak
 int dword_4E98BC_bApplicationActive; // weak
-char aBlv[777]; // idb
-char aMightAndMagico[41]; // weak
-char aLevels[7]; // weak
-char aLsave640_pcx[13]; // weak
-char aTitle_exit[777]; // idb
-char aTitle_cred[777]; // idb
-char aTitle_load[777]; // idb
-char aTitle_new[777]; // idb
-char a___1[777]; // idb
-char aRanOnce[777]; // idb
-char aNoanim[777]; // idb
-char aNosound[777]; // idb
-char aWindow[777]; // idb
-char aUsedefs[777]; // idb
-char ClassName[777]; // idb
-char aOut02_odm[10]; // weak
-char aYouMustBeRunni[777]; // idb
-char aDebugFlags[777]; // idb
-char aWindowY[777]; // idb
-char aWindowX[777]; // idb
-char aStartinwindow[777]; // idb
-char aD10_blv[777]; // idb
-char aD11_blv[777]; // idb
-char a1_0[777]; // idb
-char aMightAndMagicV[777]; // idb
-char aNewWorldComput[777]; // idb
-char SubKey[777]; // idb
-char aCloseCd[777]; // idb
-char aInfoCdUpcWait[777]; // idb
-char aOpenCTypeCdaud[777]; // idb
-char aXAnimsMagic7_v[20]; // weak
-char aAbbrechen[777]; // idb
-char aBitteCd2VonMig[777]; // idb
-char aBitteCd2Einleg[777]; // idb
-char aCancelar[9]; // weak
-char aPorFavorInse_0[777]; // idb
-char aPorFavorInsert[777]; // idb
-char aSupprimer[10]; // weak
-char aInssrezMightMa[777]; // idb
-char aInssrezLeCd2[777]; // idb
-char aAnnulla[8]; // weak
-char aInserireIlSe_0[777]; // idb
-char aInserireIlSeco[777]; // idb
-char aOdwolaj[8]; // weak
-char aWlozCdRomNum_0[777]; // idb
-char String[777]; // idb
-char TemplateName[777]; // idb
-char ValueName[777]; // idb
-char a2dacceloff[777]; // idb
-char aDsounds_bin[777]; // idb
-char aDoverlay_bin[777]; // idb
-char aDchest_bin[777]; // idb
-char aDmonlist_bin[777]; // idb
-char aDobjlist_bin[777]; // idb
-char aDdeclist_bin[777]; // idb
-char aDift_bin[777]; // idb
-char aDpft_bin[777]; // idb
-char aDtile_bin[777]; // idb
-char aDtft_bin[777]; // idb
-char aDsft_bin[777]; // idb
-char aUnableToOpenSo[777]; // idb
-char aDataSounds_def[777]; // idb
-char aUnableToOpenOv[777]; // idb
-char aDataOverlay_de[777]; // idb
-char aUnableToOpenCh[777]; // idb
-char aDataChest_def[777]; // idb
-char aUnableToOpenPf[777]; // idb
-char Args[777]; // idb
-char aUnableToOpenTi[777]; // idb
-char aDataTile_def[777]; // idb
-char aUnableToOpenTf[777]; // idb
-char aDataTft_def[777]; // idb
-char aUnableToOpenIf[777]; // idb
-char aDataIft_txt[777]; // idb
-char aUnableToOpenMo[777]; // idb
-char aDataMonlist_tx[777]; // idb
-char aUnableToOpenOb[777]; // idb
-char aDataObjlist_tx[777]; // idb
-char aUnableToOpenDe[777]; // idb
-char aDataDeclist_tx[777]; // idb
-char aUnableToOpenSf[777]; // idb
-char aDataSft_txt[777]; // idb
-char aDataSprites_lo[777]; // idb
-char aDataSpritelo_l[18]; // weak
-char aResolution[777]; // idb
-char aRegistry[777]; // idb
-char aDataBitmaps_lo[777]; // idb
-char aDataEvents_lod[777]; // idb
-char aSomeFilesAreMi[42]; // weak
-char aFilesMissing[14]; // weak
-char pFilename[777]; // idb
-char AppName[777]; // idb
-char KeyName[777]; // idb
-char aUnableToAllo_0[31]; // weak
-char aUnableToAlloca[31]; // weak
-char aMoreRamMemoryR[25]; // weak
-char WindowName[777]; // idb
-char IconName[777]; // idb
-char aMoreHardDriveS[31]; // weak
-char aDueToWindowVir[777]; // idb
-char PathName[777]; // idb
-char aHdwtr03u[777]; // idb
-char aHeight[777]; // idb
-char aEyelevel[777]; // idb
-char aParty[777]; // idb
-char aBuilding_sub_0[777]; // idb
-char aBuilding_subdi[777]; // idb
-char aTerrain_subd_0[777]; // idb
-char aTerrain_subdiv[777]; // idb
-char aTexmapping[777]; // idb
-char aRecmod2[777]; // idb
-char aRecmod1[777]; // idb
-char aDefault_0[777]; // idb
-char aDirt[777]; // idb
-char aTextures[777]; // idb
-char off_4EA208[777]; // idb
-char aPlansky1[777]; // idb
-char aDist_mist[777]; // idb
-char aDist_shademist[777]; // idb
-char aDist_shade[777]; // idb
-char aShading[777]; // idb
-char aBld_mm3[777]; // idb
-char aBld_mm2[777]; // idb
-char aBld_mm1[777]; // idb
-char aTer_mm3[777]; // idb
-char aTer_mm2[777]; // idb
-char aTer_mm1[777]; // idb
-char aMipmapping[777]; // idb
-char aBld_gamma[777]; // idb
-char aTer_gamma[777]; // idb
-char aGridband3[777]; // idb
-char aGridband2[777]; // idb
-char aGridband1[777]; // idb
-char aNowavywater[777]; // idb
-char aRender[777]; // idb
-char aNodecorations[777]; // idb
-char aNosky[777]; // idb
-char aNomist[777]; // idb
-char aRgbnightbott_1[777]; // idb
-char aRgbnightbott_0[777]; // idb
-char aRgbnightbottom[777]; // idb
-char aRgbnighttop_b[777]; // idb
-char aRgbnighttop_g[777]; // idb
-char aRgbnighttop_r[777]; // idb
-char aRgbdaybottom_b[777]; // idb
-char aRgbdaybottom_g[777]; // idb
-char aRgbdaybottom_r[777]; // idb
-char aRgbdaytop_b[777]; // idb
-char aRgbdaytop_g[777]; // idb
-char aRgbdaytop_r[777]; // idb
-char aOutdoor[777]; // idb
-char aFile[777]; // idb
-char aStartmap[777]; // idb
-char aWalkspeed[777]; // idb
-char aNodecoration[777]; // idb
-char aNodamage[777]; // idb
-char aShowfr[777]; // idb
-char aNomonster[777]; // idb
-char aDebug[777]; // idb
-char aNologo[777]; // idb
-char aNowalksound[777]; // idb
-char aNosound_0[777]; // idb
-char aNointro[777]; // idb
-char aMixerchannels[777]; // idb
-char aVy2[777]; // idb
-char aVx2[777]; // idb
-char aVy1[777]; // idb
-char aVx1[777]; // idb
-char aScreen[777]; // idb
-char aMakeme_pcx[11]; // weak
-char aError[777]; // idb
-char aFatalException[777]; // idb
-char aDirectDrawErro[777]; // idb
-char aUnknownDirectd[777]; // idb
-char aDderr_devicedo[29]; // weak
-char aDderr_videonot[21]; // weak
-char aDderr_expired[14]; // weak
-char aDderr_moredata[15]; // weak
-char aDderr_notpagel[20]; // weak
-char aDderr_cantpa_0[21]; // weak
-char aDderr_cantpage[19]; // weak
-char aDderr_nononloc[23]; // weak
-char aDderr_dcalread[23]; // weak
-char aDderr_nofocusw[20]; // weak
-char aDderr_notloade[16]; // weak
-char aDderr_nooptimi[19]; // weak
-char aDderr_invali_3[25]; // weak
-char aDderr_nomipmap[17]; // weak
-char aDderr_unsupp_2[22]; // weak
-char aDderr_notpalet[20]; // weak
-char aDderr_implicit[24]; // weak
-char aDderr_wrongmod[16]; // weak
-char aDderr_nodc[11]; // weak
-char aDderr_cantcrea[19]; // weak
-char aDderr_cantdupl[20]; // weak
-char aDderr_notflipp[19]; // weak
-char aDderr_exclusiv[30]; // weak
-char aDderr_notaover[25]; // weak
-char aDderr_invali_2[22]; // weak
-char aDderr_noover_0[20]; // weak
-char aDderr_overlayn[24]; // weak
-char aDderr_noddrops[17]; // weak
-char aDderr_noblthw[14]; // weak
-char aDderr_bltfastc[22]; // weak
-char aDderr_nopale_0[18]; // weak
-char aDderr_nopalett[24]; // weak
-char aDderr_hwndalre[21]; // weak
-char aDderr_hwndsubc[21]; // weak
-char aDderr_nohwnd[13]; // weak
-char aDderr_noclippe[24]; // weak
-char aDderr_clipperi[25]; // weak
-char aDderr_regionto[21]; // weak
-char aDderr_noemulat[18]; // weak
-char aDderr_primarys[34]; // weak
-char aDderr_nodire_0[21]; // weak
-char aDderr_directdr[31]; // weak
-char aDderr_invalidd[28]; // weak
-char aDderr_xalign[13]; // weak
-char aDderr_wasstill[22]; // weak
-char aDderr_vertical[30]; // weak
-char aDderr_invalids[20]; // weak
-char aDderr_unsupp_1[22]; // weak
-char aDderr_unsupp_0[24]; // weak
-char aDderr_toobigwi[18]; // weak
-char aDderr_toobigsi[17]; // weak
-char aDderr_toobighe[19]; // weak
-char aDderr_surfacen[25]; // weak
-char aDderr_colorkey[21]; // weak
-char aDderr_surfac_0[29]; // weak
-char aDderr_surfacea[30]; // weak
-char aDderr_cantlock[22]; // weak
-char aDderr_surfacei[24]; // weak
-char aDderr_paletteb[18]; // weak
-char aDderr_nozbuffe[18]; // weak
-char aDderr_nozoverl[19]; // weak
-char aDderr_outofcap[16]; // weak
-char aDderr_outofvid[23]; // weak
-char aDderr_overla_0[22]; // weak
-char aDderr_overlayc[35]; // weak
-char aDderr_novsynch[16]; // weak
-char aDderr_norotati[19]; // weak
-char aDderr_nostretc[18]; // weak
-char aDderr_not4bi_0[19]; // weak
-char aDderr_not4bitc[24]; // weak
-char aDderr_not8bitc[19]; // weak
-char aDderr_notextur[18]; // weak
-char aDderr_noraster[19]; // weak
-char aDderr_nofliphw[15]; // weak
-char aDderr_nogdi[12]; // weak
-char aDderr_nomirror[17]; // weak
-char aDderr_notfound[15]; // weak
-char aDderr_nooverla[18]; // weak
-char aDderr_overlapp[23]; // weak
-char aDderr_noexclus[22]; // weak
-char aDderr_noclipli[17]; // weak
-char aDderr_nocolorc[20]; // weak
-char aDderr_nocooper[28]; // weak
-char aDderr_nocolo_0[17]; // weak
-char aDderr_nocolork[19]; // weak
-char aDderr_nodirect[26]; // weak
-char aDderr_noalphah[16]; // weak
-char aDderr_invalidm[18]; // weak
-char aDderr_invalido[20]; // weak
-char aDderr_invali_1[25]; // weak
-char aDderr_lockedsu[21]; // weak
-char aDderr_no3d[11]; // weak
-char aDderr_invali_0[22]; // weak
-char aDderr_cannotde[26]; // weak
-char aDderr_currentl[24]; // weak
-char aDderr_exceptio[16]; // weak
-char aDderr_heightal[18]; // weak
-char aDderr_incompat[26]; // weak
-char aDderr_invalidc[18]; // weak
-char aDderr_cannotat[26]; // weak
-char aDderr_unsuppor[18]; // weak
-char aDderr_generic[14]; // weak
-char aDderr_notiniti[21]; // weak
-char aDderr_outofmem[18]; // weak
-char aDderr_invalidp[20]; // weak
-char Str[777]; // idb
-char aDirectInputErr[777]; // idb
-char aUnknownDirectI[777]; // idb
-char aAtLineNumber[777]; // idb
-char aInFile[777]; // idb
-char aTooManyMobileL[777]; // idb
-char aEWorkMsdevM_13[48]; // weak
-char aUSS[777]; // idb
-char aUS[777]; // idb
-char aMicon3[777]; // idb
-char aTarget[777]; // idb
-char CursorName[777]; // idb
-char aWarningInvalid[777]; // idb
-char aEWorkMsdevM_14[37]; // weak
-char aMicon1_0[777]; // idb
-char aCouldNotInit_0[40]; // weak
-char aEWorkMsdevM_15[777]; // idb
-char aCouldNotLoadAs[777]; // idb
-char aDi_mousePointe[777]; // idb
-char aDi_mousePoin_0[777]; // idb
-char aCouldNotClipCu[777]; // idb
-char aDoorErrorDoorI[777]; // idb
 char *off_4EB080; // idb
 char *pTransitionStrings[464];
 char aAwards_txt[777]; // idb
@@ -1768,122 +1088,20 @@
   47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 60
 };
 
-char aDD[777]; // idb
-char off_4EE75C[777]; // idb
 int dword_4EED78; // weak
 _UNKNOWN unk_4EED80; // weak
 int dword_4EFA80; // weak
 int dword_4EFA84; // weak
-char aDataD3dsprite_[777]; // idb
-char aDataD3dbitmap_[777]; // idb
-char aDetailLevel[777]; // idb
-char aD3dDevice[777]; // idb
-char aUseD3d[777]; // idb
-char aEWorkMsdevM_22[777]; // idb
-char aScreen0_2i_pcx[777]; // idb
-char aZBuf_[777]; // idb
-char aThereArenTAnyD[777]; // idb
-char aDirect3dRend_1[777]; // idb
-char aDirect3dRend_0[777]; // idb
-char aDirect3dRender[777]; // idb
-char aD3drendInitFai[777]; // idb
-char aThereArenTAn_0[777]; // idb
-char aErrorExecuting[777]; // idb
-char aEWorkMsdevM_23[777]; // idb
-char aHiscreen16Load[777]; // idb
 void *off_4EFDB0; // weak
-char aEWorkMsdevM_24[777]; // idb
-char aEffpar02[777]; // idb
-char aSp18h1[7]; // weak
-char aSpell75[777]; // idb
-char aSpell73[777]; // idb
-char aSpell71[777]; // idb
-char aSpell69[777]; // idb
-char aSpell58[777]; // idb
-char aSpell55[777]; // idb
-char aSpell51[777]; // idb
-char aSpell46[777]; // idb
-char aSpell38[777]; // idb
-char aSpell36[777]; // idb
-char aSpell25[777]; // idb
-char aSpell17[777]; // idb
-char aSpell14[777]; // idb
-char aSpell05[777]; // idb
-char aSpell03[777]; // idb
-char aSpheal3[777]; // idb
-char aSpheal2[777]; // idb
-char aSpheal1[777]; // idb
-char aSpboost3[777]; // idb
-char aSpboost2[777]; // idb
-char aSpboost1[777]; // idb
-char aZapp[777]; // idb
-char aSpell84[777]; // idb
-char aEWorkMsdevM_25[777]; // idb
-char aSpell97c[777]; // idb
-char aSpell97[777]; // idb
-char aSpell93[777]; // idb
-char aSpell92[777]; // idb
-char aSpell90[777]; // idb
-char aSpell76[777]; // idb
-char aSpell70[777]; // idb
-char aSpell66[777]; // idb
-char aSpell65[777]; // idb
-char aSpell62[777]; // idb
-char aSpell57c[777]; // idb
-char aSpell41[777]; // idb
-char aSpell39c[777]; // idb
-char aSpell39[777]; // idb
-char aSpell29[777]; // idb
-char aSpell26[777]; // idb
-char aSpell22[777]; // idb
-char aSpell18[777]; // idb
-char aSpell09[777]; // idb
-char aSpell02[777]; // idb
-char aSpell01[777]; // idb
-char aSp57c[777]; // idb
-char aInvalidMovieRe[777]; // idb
-char aEnd_seq1[9]; // weak
-char aLosegame[9]; // weak
-char aIntroPost[11]; // weak
-char aIntro[6]; // weak
-char aJvc[4]; // weak
-char aNewWorldLogo[15]; // weak
-char a3dologo[8]; // weak
-char aNoMovie[777]; // idb
-char aEWorkMsdevM_26[777]; // idb
-char aCanTLoadSoundF[777]; // idb
-char aEWorkMsdevM_27[777]; // idb
-char aSoundSIsSizeIB[777]; // idb
-char aUnableToSave_2[777]; // idb
-char aDataDsounds_bi[777]; // idb
-char aSndDes_[777]; // idb
-char a3d[777]; // idb
-char aLock[777]; // idb
-char aSwap[777]; // idb
-char aSystem[777]; // idb
-char aSoundlistcla_0[777]; // idb
-char aSoundlistclass[777]; // idb
-char aSoundFileError[777]; // idb
-char aCanTOpenFileS[777]; // idb
-char aSoundsAudio_sn[777]; // idb
-char aDisable3dsound[777]; // idb
-char aEaxEnvironment[26]; // weak
-char a3dsoundprovide[777]; // idb
-char aNone[777]; // idb
-char aEmulated[777]; // idb
-char aDevice[777]; // idb
-char aSplashscreen[777]; // idb
-char aSplashaudio[777]; // idb
-char aSoftwareAureal[777]; // idb
-char aEaxDamping[12]; // weak
-char aEaxEffectVolum[18]; // weak
-char aMaximumSupport[26]; // weak
 int dword_4F031C[777]; // weak
-char aSprites08[777]; // idb
-char aHardsprites[777]; // idb
-char aTooManyStation[777]; // idb
-char aEWorkMsdevM_28[52]; // weak
-char *off_4F03B8; // idb
+const char *off_4F03B8[] =
+{
+  "",         "WEPNTABL", "ARMORY",   "MAGSHELF",
+  "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF",
+  "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF",
+  "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF",
+  "MAGSHELF"
+};
 __int16 word_4F03FE[777]; // weak
 __int16 word_4F0400[777]; // weak
 __int16 word_4F0498[777]; // weak
--- a/mm7_data.h	Wed Nov 07 22:09:43 2012 +0600
+++ b/mm7_data.h	Wed Nov 07 22:10:04 2012 +0600
@@ -797,324 +797,6 @@
 #include "Texture.h"
 extern stru355 stru_4E82A4;// = {0x20, 0x41, 0, 0x20, 0xFF0000, 0xFF00, 0xFF, 0xFF000000};
 extern stru355 stru_4EFCBC;// = {0x20, 0x41, 0, 0x10, 0x7C00, 0x3E0, 0x1F, 0x8000};
-extern char aGlobal_txt[]; // idb
-extern char aMagic[]; // idb
-extern char aDark_0[]; // idb
-extern char aLight_1[]; // idb
-extern char aBody_0[]; // idb
-extern char aMind_1[]; // idb
-extern char aSpirit_1[]; // idb
-extern char aEarth_0[]; // idb
-extern char aWater_0[]; // idb
-extern char aFire_1[]; // idb
-extern char aSpells_txt[]; // idb
-extern char aParsingError[]; // idb
-extern char aErrorParsingPo[]; // idb
-extern char Text[]; // idb
-extern char Caption[]; // idb
-extern char asc_4E8530[]; // idb
-extern char a222[]; // idb
-extern char asc_4E8538[]; // idb
-extern char aPotion_txt[]; // idb
-extern char aErrorParsing_0[]; // idb
-extern char aPotnotes_txt[]; // idb
-extern char aHistory_txt[]; // idb
-extern char aPsychotic[]; // idb
-extern char aDizzy[]; // idb
-extern char aDrugged[]; // idb
-extern char aUnderwater[]; // idb
-extern char aSewerpipe[]; // idb
-extern char aParkinglot[]; // idb
-extern char aPlain[]; // idb
-extern char aQuarry[]; // idb
-extern char aMountains[]; // idb
-extern char aCity[]; // idb
-extern char aForest[]; // idb
-extern char aAlley[]; // idb
-extern char aStonecorridor[]; // idb
-extern char aHallway[]; // idb
-extern char aCarpetedhallwa[]; // idb
-extern char aHangar[]; // idb
-extern char aArena[]; // idb
-extern char aCave[]; // idb
-extern char aConcerthall[]; // idb
-extern char aAuditorium[]; // idb
-extern char aStoneroom[]; // idb
-extern char aLivingroom[]; // idb
-extern char aBathroom[]; // idb
-extern char aRoom[]; // idb
-extern char aPaddedcell[]; // idb
-extern char aGeneric[]; // idb
-extern char aMapstats_txt[]; // idb
-extern char aHostile_txt[]; // idb
-extern char aEWorkMsdevMm_9[]; // idb
-extern char aUnknownMonster[]; // idb
-extern char aHammerhands[]; // idb
-extern char aPsychic[]; // idb
-extern char aBlades[]; // idb
-extern char aMind[]; // idb
-extern char aHarm[]; // idb
-extern char aFate[]; // idb
-extern char aSummon[]; // idb
-extern char aReanimate[]; // idb
-extern char aDragon[]; // idb
-extern char aBless[]; // idb
-extern char aAcid[]; // idb
-extern char off_4E876C[]; // idb
-extern char aMass[]; // idb
-extern char aRock[]; // idb
-extern char aFire[]; // idb
-extern char aIncinerate[]; // idb
-extern char aFireball[]; // idb
-extern char aParalyze[]; // idb
-extern char aShrapmetal[]; // idb
-extern char aToxic[]; // idb
-extern char aLight[]; // idb
-extern char aSparks[]; // idb
-extern char aPain[]; // idb
-extern char aHeroism[]; // idb
-extern char aHaste[]; // idb
-extern char aStone[]; // idb
-extern char aImplosion[]; // idb
-extern char aLightning[]; // idb
-extern char aMeteor[]; // idb
-extern char aPower[]; // idb
-extern char aSpirit[]; // idb
-extern char aShield[]; // idb
-extern char aHour[]; // idb
-extern char aDay[]; // idb
-extern char aDispel[]; // idb
-extern char aEner[]; // idb
-extern char aDark[]; // idb
-extern char aLight_0[]; // idb
-extern char aBody[]; // idb
-extern char aMind_0[]; // idb
-extern char aSpirit_0[]; // idb
-extern char aEarth[]; // idb
-extern char aWater[]; // idb
-extern char off_4E887C[]; // idb
-extern char aFire_0[]; // idb
-extern char aArrowf[]; // idb
-extern char aArrow[]; // idb
-extern char aPlacemon_txt[]; // idb
-extern char aExplode[]; // idb
-extern char aGround[]; // idb
-extern char aCanTCreateRa_0[]; // idb
-extern char asc_4E88E8[]; // idb
-extern char aSummon_0[]; // idb
-extern char aShot[]; // idb
-extern char aG[]; // idb
-extern char aM[]; // idb
-extern char aE_0[2]; // weak
-extern char aDrainsp[]; // idb
-extern char off_4E8910[]; // idb
-extern char aSteal[]; // idb
-extern char aBrkweapon[]; // idb
-extern char aBrkarmor[]; // idb
-extern char aBrkitem[]; // idb
-extern char aErrad[]; // idb
-extern char aStone_0[]; // idb
-extern char aDead[]; // idb
-extern char aUncon[]; // idb
-extern char aParalyze_0[]; // idb
-extern char aDisease3[]; // idb
-extern char aDisease2[]; // idb
-extern char aDisease1[]; // idb
-extern char aPoison3[]; // idb
-extern char aPoison2[]; // idb
-extern char aPoison1[]; // idb
-extern char aInsane[]; // idb
-extern char aDrunk[]; // idb
-extern char aAfraid[]; // idb
-extern char aAsleep[]; // idb
-extern char SubStr[]; // idb
-extern char aCurse[6]; // weak
-extern char aN[]; // idb
-extern char aGem[]; // idb
-extern char aScroll[]; // idb
-extern char aWand[]; // idb
-extern char aAmulet[]; // idb
-extern char aRing[]; // idb
-extern char aBoots[]; // idb
-extern char aGauntlets[]; // idb
-extern char aCape[]; // idb
-extern char aBelt[]; // idb
-extern char aHelm[]; // idb
-extern char aShield_0[]; // idb
-extern char aPlate[]; // idb
-extern char aChain[]; // idb
-extern char aStaff[]; // idb
-extern char aClub[]; // idb
-extern char aMace[]; // idb
-extern char aBow[]; // idb
-extern char aSpear[]; // idb
-extern char aAxe[]; // idb
-extern char aDagger[]; // idb
-extern char aSword[]; // idb
-extern char aMisc[]; // idb
-extern char aArmor[]; // idb
-extern char aWeapon[]; // idb
-extern char aMonsters_txt[]; // idb
-extern char aNewitemgen[]; // idb
-extern char aClass_txt[]; // idb
-extern char aStats_txt[]; // idb
-extern char aSkilldes_txt[]; // idb
-extern char aRnditems_txt[]; // idb
-extern char aSpecial[]; // idb
-extern char aRelic[]; // idb
-extern char aArtifact[]; // idb
-extern char aClub_0[]; // idb
-extern char aPlate_0[]; // idb
-extern char aChain_0[]; // idb
-extern char aLeather_0[]; // idb
-extern char aBlaster[]; // idb
-extern char aMace_0[]; // idb
-extern char aSpear_0[]; // idb
-extern char aAxe_0[]; // idb
-extern char aDagger_0[]; // idb
-extern char aSword_0[]; // idb
-extern char aStaff_0[]; // idb
-extern char aGem_0[]; // idb
-extern char aGold[]; // idb
-extern char aMscroll[]; // idb
-extern char aSscroll[]; // idb
-extern char aBottle[]; // idb
-extern char aReagent[]; // idb
-extern char aHerb[]; // idb
-extern char aWeaponw[]; // idb
-extern char aAmulet_0[]; // idb
-extern char aRing_0[]; // idb
-extern char aBoots_0[]; // idb
-extern char aGauntlets_0[]; // idb
-extern char aCloak[]; // idb
-extern char aBelt_0[]; // idb
-extern char aHelm_0[]; // idb
-extern char aShield_1[]; // idb
-extern char aArmor_0[]; // idb
-extern char aBow_0[]; // idb
-extern char aMissile[]; // idb
-extern char aWeapon1or2[]; // idb
-extern char aWeapon2[]; // idb
-extern char aWeapon_0[]; // idb
-extern char aItems_txt[]; // idb
-extern char aSpcitems_txt[]; // idb
-extern char aStditems_txt[]; // idb
-extern char aUnableToSaveDd[]; // idb
-extern char aDataDdeclist_b[]; // idb
-extern char aDecDescrip[]; // idb
-extern char aDusk[]; // idb
-extern char aDawn[]; // idb
-extern char aEmitfire[]; // idb
-extern char aLoopslow[]; // idb
-extern char aMarker[]; // idb
-extern char aFf[]; // idb
-extern char aFm[3]; // idb
-extern char aFs[3]; // idb
-extern char aInvisible[]; // idb
-extern char off_4E8CB8[]; // idb
-extern char aDecorationde_0[]; // idb
-extern char aDecorationdesc[]; // idb
-extern char aUnableToSaveDc[]; // idb
-extern char aDataDchest_bin[]; // idb
-extern char aChestDescrip[]; // idb
-extern char aChestdescrip_0[]; // idb
-extern char aChestdescripti[]; // idb
-extern char aUnableToSave_0[]; // idb
-extern char aDataDoverlay_b[]; // idb
-extern char aOvlDes_[]; // idb
-extern char aTransparent[]; // idb
-extern char aCenter[7]; // weak
-extern char aOverlaydescrip[]; // idb
-extern char aObjectdescript[]; // idb
-extern char aUnableToSaveDo[]; // idb
-extern char aDataDobjlist_b[]; // idb
-extern char aObjDescrip[]; // idb
-extern char aLines[]; // idb
-extern char aBounce[]; // idb
-extern char aFlagonintercep[]; // idb
-extern char aNogravity[]; // idb
-extern char aNopickup[]; // idb
-extern char aFtlifetime[]; // idb
-extern char aLifetime[]; // idb
-extern char aNodraw[]; // idb
-extern char aObjectdescri_0[]; // idb
-extern char aBits[]; // idb
-extern char aUnableToSaveDm[]; // idb
-extern char aDataDmonlist_b[]; // idb
-extern char aMonRace[]; // idb
-extern char aMonsterracel_0[]; // idb
-extern char aMonsterracelis[]; // idb
-extern char a__10[]; // idb
-extern char aKey_stepright[]; // idb
-extern char aKey_stepleft[]; // idb
-extern char aKey_alwaysrun[]; // idb
-extern char aKey_land[]; // idb
-extern char aKey_flydown[]; // idb
-extern char aKey_flyup[]; // idb
-extern char aKey_zoomout[]; // idb
-extern char aKey_zoomin[]; // idb
-extern char aKey_centerview[]; // idb
-extern char aKey_lookdown[]; // idb
-extern char aKey_lookup[]; // idb
-extern char aKey_mapbook[]; // idb
-extern char aKey_autonotes[]; // idb
-extern char aKey_timecal[]; // idb
-extern char aKey_rest[]; // idb
-extern char aKey_quickref[]; // idb
-extern char aKey_quest[]; // idb
-extern char aKey_charcycle[]; // idb
-extern char aKey_pass[]; // idb
-extern char aKey_cast[]; // idb
-extern char aKey_eventtrigg[]; // idb
-extern char aKey_combat[]; // idb
-extern char aKey_jump[]; // idb
-extern char aKey_yell[]; // idb
-extern char aKey_castready[]; // idb
-extern char aKey_attack[]; // idb
-extern char aKey_right[]; // idb
-extern char aKey_left[]; // idb
-extern char aKey_backward[]; // idb
-extern char pKeyName[]; // idb
-extern char aDefault[]; // idb
-extern char aControl[]; // idb
-extern char aBackspace[]; // idb
-extern char aBackslash[]; // idb
-extern char aSquote[]; // idb
-extern char aSlash[]; // idb
-extern char aPeriod[]; // idb
-extern char aSemicolon[]; // idb
-extern char aDecimal[]; // idb
-extern char aComma[]; // idb
-extern char aInsert[]; // idb
-extern char aHome[]; // idb
-extern char aDelete[]; // idb
-extern char aEnd[]; // idb
-extern char aAdd[]; // idb
-extern char aSubtract[]; // idb
-extern char aTab[]; // idb
-extern char aPage_up[]; // idb
-extern char aPage_down[]; // idb
-extern char aSpace[]; // idb
-extern char aReturn[]; // idb
-extern char aDown[]; // idb
-extern char aUp[]; // idb
-extern char asc_4E925C[]; // idb
-extern char aCouldNotInitia[49]; // weak
-extern char aInvalidDi_keyb[]; // idb
-extern char aEWorkMsdevM_10[45]; // weak
-extern char aInvalidDi_ke_0[]; // idb
-extern char aInvalidDi_ke_1[]; // idb
-extern char aUknownKeyDetec[]; // idb
-extern char aEffpar03[]; // idb
-extern char aErrorFailedToB[]; // idb
-extern char aErrorFailedToG[]; // idb
-extern char aEWorkMsdevM_11[]; // idb
-extern char aLightpolyBuild[]; // idb
-extern char aUndefinedClipF[30]; // weak
-extern char aInvalidLightTy[]; // idb
-extern char aInvalidLight_0[]; // idb
-extern char aUknownStripTyp[]; // idb
-extern char aInvalidLightma[]; // idb
 extern char byte_4E94D0; // weak
 extern char _4E94D2_light_type; // weak
 extern char byte_4E94D3; // weak
@@ -1122,369 +804,7 @@
 extern unsigned int saveload_dlg_ys[2];
 extern unsigned int saveload_dlg_zs[2];
 extern unsigned int saveload_dlg_ws[2];
-extern char aEWorkMsdevM_12[]; // idb
-extern char a___0[]; // idb
-extern char aSave03d_mm7[]; // idb
-extern char Name[]; // idb
-extern char aAr_dn_dn_0[]; // idb
-extern char aAr_up_dn_0[]; // idb
-extern char aLs_saved[]; // idb
-extern char aLs_loadd[]; // idb
-extern char aX_d[]; // idb
-extern char aImage_pcx[]; // idb
-extern char aHeader_bin[]; // idb
-extern char aSavesS[]; // idb
-extern char aX_u[]; // idb
-extern char aLs_saveu[]; // idb
-extern char aLs_loadu[]; // idb
-extern char aSave_up[]; // idb
-extern char aLoad_up[]; // idb
-extern char aLoadsave[]; // idb
-extern char a1_mm7[6]; // weak
-extern char aUnableToFindS[]; // idb
-extern char aLevelsS[]; // idb
-extern char aNpcgroup_bin[]; // idb
-extern char aNpcdata_bin[]; // idb
-extern char aOverlay_bin[]; // idb
-extern char aClock_bin[]; // idb
-extern char aParty_bin[]; // idb
-extern char ExistingFileName[]; // idb
-extern char NewFileName[]; // idb
-extern char aSS_2[]; // idb
-extern char aSavesSave03d_m[]; // idb
-extern char aSD02dSDSD[]; // idb
-extern char aLevellod[]; // idb
-extern char aLevelsSS[]; // idb
-extern char a_lod[5]; // weak
-extern char aDataGames_lod[]; // idb
-extern char Default[]; // idb
-extern char aCurrent[]; // idb
-extern char aNewmapsForMmvi[]; // idb
-extern char aMmvii[]; // idb
-extern char aOutOfMemoryLoa[]; // idb
-extern char aAttemptToOpenN[]; // idb
-extern char aFileSIsNotABlv[]; // idb
-extern char aD23_blv[]; // idb
-extern char aEventTrigger[]; // idb
-extern char aLodapp_tmp[]; // idb
-extern char aWb[]; // idb
-extern char aLod_tmp[]; // idb
-extern char aLodIndex[]; // idb
-extern char aLod[]; // idb
-extern char aLodCarray[]; // idb
-extern char aRb_0[]; // idb
-extern char aLodio[]; // idb
-extern char aAttemptToRes_0[]; // idb
-extern char aLodsub[]; // idb
-extern char aAttemptToReset[]; // idb
-extern char aMm6[]; // idb
-extern char aLodchapterpage[]; // idb
-extern char aLODFile[]; // idb
-extern char aChapter[]; // idb
-extern char aUnableToAppend[]; // idb
-extern char aIndoorBlvFiles[26]; // weak
 extern int dword_4E98BC_bApplicationActive; // weak
-extern char aBlv[]; // idb
-extern char aMightAndMagico[41]; // weak
-extern char aLevels[7]; // weak
-extern char aLsave640_pcx[13]; // weak
-extern char aTitle_exit[]; // idb
-extern char aTitle_cred[]; // idb
-extern char aTitle_load[]; // idb
-extern char aTitle_new[]; // idb
-extern char a___1[]; // idb
-extern char aRanOnce[]; // idb
-extern char aNoanim[]; // idb
-extern char aNosound[]; // idb
-extern char aWindow[]; // idb
-extern char aUsedefs[]; // idb
-extern char ClassName[]; // idb
-extern char aOut02_odm[10]; // weak
-extern char aYouMustBeRunni[]; // idb
-extern char aDebugFlags[]; // idb
-extern char aWindowY[]; // idb
-extern char aWindowX[]; // idb
-extern char aStartinwindow[]; // idb
-extern char aD10_blv[]; // idb
-extern char aD11_blv[]; // idb
-extern char a1_0[]; // idb
-extern char aMightAndMagicV[]; // idb
-extern char aNewWorldComput[]; // idb
-extern char SubKey[]; // idb
-extern char aCloseCd[]; // idb
-extern char aInfoCdUpcWait[]; // idb
-extern char aOpenCTypeCdaud[]; // idb
-extern char aXAnimsMagic7_v[20]; // weak
-extern char aAbbrechen[]; // idb
-extern char aBitteCd2VonMig[]; // idb
-extern char aBitteCd2Einleg[]; // idb
-extern char aCancelar[9]; // weak
-extern char aPorFavorInse_0[]; // idb
-extern char aPorFavorInsert[]; // idb
-extern char aSupprimer[10]; // weak
-extern char aInssrezMightMa[]; // idb
-extern char aInssrezLeCd2[]; // idb
-extern char aAnnulla[8]; // weak
-extern char aInserireIlSe_0[]; // idb
-extern char aInserireIlSeco[]; // idb
-extern char aOdwolaj[8]; // weak
-extern char aWlozCdRomNum_0[]; // idb
-extern char String[]; // idb
-extern char TemplateName[]; // idb
-extern char ValueName[]; // idb
-extern char a2dacceloff[]; // idb
-extern char aDsounds_bin[]; // idb
-extern char aDoverlay_bin[]; // idb
-extern char aDchest_bin[]; // idb
-extern char aDmonlist_bin[]; // idb
-extern char aDobjlist_bin[]; // idb
-extern char aDdeclist_bin[]; // idb
-extern char aDift_bin[]; // idb
-extern char aDpft_bin[]; // idb
-extern char aDtile_bin[]; // idb
-extern char aDtft_bin[]; // idb
-extern char aDsft_bin[]; // idb
-extern char aUnableToOpenSo[]; // idb
-extern char aDataSounds_def[]; // idb
-extern char aUnableToOpenOv[]; // idb
-extern char aDataOverlay_de[]; // idb
-extern char aUnableToOpenCh[]; // idb
-extern char aDataChest_def[]; // idb
-extern char aUnableToOpenPf[]; // idb
-extern char Args[]; // idb
-extern char aUnableToOpenTi[]; // idb
-extern char aDataTile_def[]; // idb
-extern char aUnableToOpenTf[]; // idb
-extern char aDataTft_def[]; // idb
-extern char aUnableToOpenIf[]; // idb
-extern char aDataIft_txt[]; // idb
-extern char aUnableToOpenMo[]; // idb
-extern char aDataMonlist_tx[]; // idb
-extern char aUnableToOpenOb[]; // idb
-extern char aDataObjlist_tx[]; // idb
-extern char aUnableToOpenDe[]; // idb
-extern char aDataDeclist_tx[]; // idb
-extern char aUnableToOpenSf[]; // idb
-extern char aDataSft_txt[]; // idb
-extern char aDataSprites_lo[]; // idb
-extern char aDataSpritelo_l[18]; // weak
-extern char aResolution[]; // idb
-extern char aRegistry[]; // idb
-extern char aDataBitmaps_lo[]; // idb
-extern char aDataEvents_lod[]; // idb
-extern char aSomeFilesAreMi[42]; // weak
-extern char aFilesMissing[14]; // weak
-extern char pFilename[]; // idb
-extern char AppName[]; // idb
-extern char KeyName[]; // idb
-extern char aUnableToAllo_0[31]; // weak
-extern char aUnableToAlloca[31]; // weak
-extern char aMoreRamMemoryR[25]; // weak
-extern char WindowName[]; // idb
-extern char IconName[]; // idb
-extern char aMoreHardDriveS[31]; // weak
-extern char aDueToWindowVir[]; // idb
-extern char PathName[]; // idb
-extern char aHdwtr03u[]; // idb
-extern char aHeight[]; // idb
-extern char aEyelevel[]; // idb
-extern char aParty[]; // idb
-extern char aBuilding_sub_0[]; // idb
-extern char aBuilding_subdi[]; // idb
-extern char aTerrain_subd_0[]; // idb
-extern char aTerrain_subdiv[]; // idb
-extern char aTexmapping[]; // idb
-extern char aRecmod2[]; // idb
-extern char aRecmod1[]; // idb
-extern char aDefault_0[]; // idb
-extern char aDirt[]; // idb
-extern char aTextures[]; // idb
-extern char off_4EA208[]; // idb
-extern char aPlansky1[]; // idb
-extern char aDist_mist[]; // idb
-extern char aDist_shademist[]; // idb
-extern char aDist_shade[]; // idb
-extern char aShading[]; // idb
-extern char aBld_mm3[]; // idb
-extern char aBld_mm2[]; // idb
-extern char aBld_mm1[]; // idb
-extern char aTer_mm3[]; // idb
-extern char aTer_mm2[]; // idb
-extern char aTer_mm1[]; // idb
-extern char aMipmapping[]; // idb
-extern char aBld_gamma[]; // idb
-extern char aTer_gamma[]; // idb
-extern char aGridband3[]; // idb
-extern char aGridband2[]; // idb
-extern char aGridband1[]; // idb
-extern char aNowavywater[]; // idb
-extern char aRender[]; // idb
-extern char aNodecorations[]; // idb
-extern char aNosky[]; // idb
-extern char aNomist[]; // idb
-extern char aRgbnightbott_1[]; // idb
-extern char aRgbnightbott_0[]; // idb
-extern char aRgbnightbottom[]; // idb
-extern char aRgbnighttop_b[]; // idb
-extern char aRgbnighttop_g[]; // idb
-extern char aRgbnighttop_r[]; // idb
-extern char aRgbdaybottom_b[]; // idb
-extern char aRgbdaybottom_g[]; // idb
-extern char aRgbdaybottom_r[]; // idb
-extern char aRgbdaytop_b[]; // idb
-extern char aRgbdaytop_g[]; // idb
-extern char aRgbdaytop_r[]; // idb
-extern char aOutdoor[]; // idb
-extern char aFile[]; // idb
-extern char aStartmap[]; // idb
-extern char aWalkspeed[]; // idb
-extern char aNodecoration[]; // idb
-extern char aNodamage[]; // idb
-extern char aShowfr[]; // idb
-extern char aNomonster[]; // idb
-extern char aDebug[]; // idb
-extern char aNologo[]; // idb
-extern char aNowalksound[]; // idb
-extern char aNosound_0[]; // idb
-extern char aNointro[]; // idb
-extern char aMixerchannels[]; // idb
-extern char aVy2[]; // idb
-extern char aVx2[]; // idb
-extern char aVy1[]; // idb
-extern char aVx1[]; // idb
-extern char aScreen[]; // idb
-extern char aMakeme_pcx[11]; // weak
-extern char aError[]; // idb
-extern char aFatalException[]; // idb
-extern char aDirectDrawErro[]; // idb
-extern char aUnknownDirectd[]; // idb
-extern char aDderr_devicedo[29]; // weak
-extern char aDderr_videonot[21]; // weak
-extern char aDderr_expired[14]; // weak
-extern char aDderr_moredata[15]; // weak
-extern char aDderr_notpagel[20]; // weak
-extern char aDderr_cantpa_0[21]; // weak
-extern char aDderr_cantpage[19]; // weak
-extern char aDderr_nononloc[23]; // weak
-extern char aDderr_dcalread[23]; // weak
-extern char aDderr_nofocusw[20]; // weak
-extern char aDderr_notloade[16]; // weak
-extern char aDderr_nooptimi[19]; // weak
-extern char aDderr_invali_3[25]; // weak
-extern char aDderr_nomipmap[17]; // weak
-extern char aDderr_unsupp_2[22]; // weak
-extern char aDderr_notpalet[20]; // weak
-extern char aDderr_implicit[24]; // weak
-extern char aDderr_wrongmod[16]; // weak
-extern char aDderr_nodc[11]; // weak
-extern char aDderr_cantcrea[19]; // weak
-extern char aDderr_cantdupl[20]; // weak
-extern char aDderr_notflipp[19]; // weak
-extern char aDderr_exclusiv[30]; // weak
-extern char aDderr_notaover[25]; // weak
-extern char aDderr_invali_2[22]; // weak
-extern char aDderr_noover_0[20]; // weak
-extern char aDderr_overlayn[24]; // weak
-extern char aDderr_noddrops[17]; // weak
-extern char aDderr_noblthw[14]; // weak
-extern char aDderr_bltfastc[22]; // weak
-extern char aDderr_nopale_0[18]; // weak
-extern char aDderr_nopalett[24]; // weak
-extern char aDderr_hwndalre[21]; // weak
-extern char aDderr_hwndsubc[21]; // weak
-extern char aDderr_nohwnd[13]; // weak
-extern char aDderr_noclippe[24]; // weak
-extern char aDderr_clipperi[25]; // weak
-extern char aDderr_regionto[21]; // weak
-extern char aDderr_noemulat[18]; // weak
-extern char aDderr_primarys[34]; // weak
-extern char aDderr_nodire_0[21]; // weak
-extern char aDderr_directdr[31]; // weak
-extern char aDderr_invalidd[28]; // weak
-extern char aDderr_xalign[13]; // weak
-extern char aDderr_wasstill[22]; // weak
-extern char aDderr_vertical[30]; // weak
-extern char aDderr_invalids[20]; // weak
-extern char aDderr_unsupp_1[22]; // weak
-extern char aDderr_unsupp_0[24]; // weak
-extern char aDderr_toobigwi[18]; // weak
-extern char aDderr_toobigsi[17]; // weak
-extern char aDderr_toobighe[19]; // weak
-extern char aDderr_surfacen[25]; // weak
-extern char aDderr_colorkey[21]; // weak
-extern char aDderr_surfac_0[29]; // weak
-extern char aDderr_surfacea[30]; // weak
-extern char aDderr_cantlock[22]; // weak
-extern char aDderr_surfacei[24]; // weak
-extern char aDderr_paletteb[18]; // weak
-extern char aDderr_nozbuffe[18]; // weak
-extern char aDderr_nozoverl[19]; // weak
-extern char aDderr_outofcap[16]; // weak
-extern char aDderr_outofvid[23]; // weak
-extern char aDderr_overla_0[22]; // weak
-extern char aDderr_overlayc[35]; // weak
-extern char aDderr_novsynch[16]; // weak
-extern char aDderr_norotati[19]; // weak
-extern char aDderr_nostretc[18]; // weak
-extern char aDderr_not4bi_0[19]; // weak
-extern char aDderr_not4bitc[24]; // weak
-extern char aDderr_not8bitc[19]; // weak
-extern char aDderr_notextur[18]; // weak
-extern char aDderr_noraster[19]; // weak
-extern char aDderr_nofliphw[15]; // weak
-extern char aDderr_nogdi[12]; // weak
-extern char aDderr_nomirror[17]; // weak
-extern char aDderr_notfound[15]; // weak
-extern char aDderr_nooverla[18]; // weak
-extern char aDderr_overlapp[23]; // weak
-extern char aDderr_noexclus[22]; // weak
-extern char aDderr_noclipli[17]; // weak
-extern char aDderr_nocolorc[20]; // weak
-extern char aDderr_nocooper[28]; // weak
-extern char aDderr_nocolo_0[17]; // weak
-extern char aDderr_nocolork[19]; // weak
-extern char aDderr_nodirect[26]; // weak
-extern char aDderr_noalphah[16]; // weak
-extern char aDderr_invalidm[18]; // weak
-extern char aDderr_invalido[20]; // weak
-extern char aDderr_invali_1[25]; // weak
-extern char aDderr_lockedsu[21]; // weak
-extern char aDderr_no3d[11]; // weak
-extern char aDderr_invali_0[22]; // weak
-extern char aDderr_cannotde[26]; // weak
-extern char aDderr_currentl[24]; // weak
-extern char aDderr_exceptio[16]; // weak
-extern char aDderr_heightal[18]; // weak
-extern char aDderr_incompat[26]; // weak
-extern char aDderr_invalidc[18]; // weak
-extern char aDderr_cannotat[26]; // weak
-extern char aDderr_unsuppor[18]; // weak
-extern char aDderr_generic[14]; // weak
-extern char aDderr_notiniti[21]; // weak
-extern char aDderr_outofmem[18]; // weak
-extern char aDderr_invalidp[20]; // weak
-extern char Str[]; // idb
-extern char aDirectInputErr[]; // idb
-extern char aUnknownDirectI[]; // idb
-extern char aAtLineNumber[]; // idb
-extern char aInFile[]; // idb
-extern char aTooManyMobileL[]; // idb
-extern char aEWorkMsdevM_13[48]; // weak
-extern char aUSS[]; // idb
-extern char aUS[]; // idb
-extern char aMicon3[]; // idb
-extern char aTarget[]; // idb
-extern char CursorName[]; // idb
-extern char aWarningInvalid[]; // idb
-extern char aEWorkMsdevM_14[37]; // weak
-extern char aMicon1_0[]; // idb
-extern char aCouldNotInit_0[40]; // weak
-extern char aEWorkMsdevM_15[]; // idb
-extern char aCouldNotLoadAs[]; // idb
-extern char aDi_mousePointe[]; // idb
-extern char aDi_mousePoin_0[]; // idb
-extern char aCouldNotClipCu[]; // idb
-extern char aDoorErrorDoorI[]; // idb
 extern char *off_4EB080; // idb
 extern char *pTransitionStrings[464];
 extern char aAwards_txt[]; // idb
@@ -1675,122 +995,13 @@
 extern _UNKNOWN unk_4EE084; // weak
 extern __int16 word_4EE088_sound_ids[]; // weak
 extern short word_4EE150[];
-extern char aDD[]; // idb
-extern char off_4EE75C[]; // idb
 extern int dword_4EED78; // weak
 extern _UNKNOWN unk_4EED80; // weak
 extern int dword_4EFA80; // weak
 extern int dword_4EFA84; // weak
-extern char aDataD3dsprite_[]; // idb
-extern char aDataD3dbitmap_[]; // idb
-extern char aDetailLevel[]; // idb
-extern char aD3dDevice[]; // idb
-extern char aUseD3d[]; // idb
-extern char aEWorkMsdevM_22[]; // idb
-extern char aScreen0_2i_pcx[]; // idb
-extern char aZBuf_[]; // idb
-extern char aThereArenTAnyD[]; // idb
-extern char aDirect3dRend_1[]; // idb
-extern char aDirect3dRend_0[]; // idb
-extern char aDirect3dRender[]; // idb
-extern char aD3drendInitFai[]; // idb
-extern char aThereArenTAn_0[]; // idb
-extern char aErrorExecuting[]; // idb
-extern char aEWorkMsdevM_23[]; // idb
-extern char aHiscreen16Load[]; // idb
 extern void *off_4EFDB0; // weak
-extern char aEWorkMsdevM_24[]; // idb
-extern char aEffpar02[]; // idb
-extern char aSp18h1[7]; // weak
-extern char aSpell75[]; // idb
-extern char aSpell73[]; // idb
-extern char aSpell71[]; // idb
-extern char aSpell69[]; // idb
-extern char aSpell58[]; // idb
-extern char aSpell55[]; // idb
-extern char aSpell51[]; // idb
-extern char aSpell46[]; // idb
-extern char aSpell38[]; // idb
-extern char aSpell36[]; // idb
-extern char aSpell25[]; // idb
-extern char aSpell17[]; // idb
-extern char aSpell14[]; // idb
-extern char aSpell05[]; // idb
-extern char aSpell03[]; // idb
-extern char aSpheal3[]; // idb
-extern char aSpheal2[]; // idb
-extern char aSpheal1[]; // idb
-extern char aSpboost3[]; // idb
-extern char aSpboost2[]; // idb
-extern char aSpboost1[]; // idb
-extern char aZapp[]; // idb
-extern char aSpell84[]; // idb
-extern char aEWorkMsdevM_25[]; // idb
-extern char aSpell97c[]; // idb
-extern char aSpell97[]; // idb
-extern char aSpell93[]; // idb
-extern char aSpell92[]; // idb
-extern char aSpell90[]; // idb
-extern char aSpell76[]; // idb
-extern char aSpell70[]; // idb
-extern char aSpell66[]; // idb
-extern char aSpell65[]; // idb
-extern char aSpell62[]; // idb
-extern char aSpell57c[]; // idb
-extern char aSpell41[]; // idb
-extern char aSpell39c[]; // idb
-extern char aSpell39[]; // idb
-extern char aSpell29[]; // idb
-extern char aSpell26[]; // idb
-extern char aSpell22[]; // idb
-extern char aSpell18[]; // idb
-extern char aSpell09[]; // idb
-extern char aSpell02[]; // idb
-extern char aSpell01[]; // idb
-extern char aSp57c[]; // idb
-extern char aInvalidMovieRe[]; // idb
-extern char aEnd_seq1[9]; // weak
-extern char aLosegame[9]; // weak
-extern char aIntroPost[11]; // weak
-extern char aIntro[6]; // weak
-extern char aJvc[4]; // weak
-extern char aNewWorldLogo[15]; // weak
-extern char a3dologo[8]; // weak
-extern char aNoMovie[]; // idb
-extern char aEWorkMsdevM_26[]; // idb
-extern char aCanTLoadSoundF[]; // idb
-extern char aEWorkMsdevM_27[]; // idb
-extern char aSoundSIsSizeIB[]; // idb
-extern char aUnableToSave_2[]; // idb
-extern char aDataDsounds_bi[]; // idb
-extern char aSndDes_[]; // idb
-extern char a3d[]; // idb
-extern char aLock[]; // idb
-extern char aSwap[]; // idb
-extern char aSystem[]; // idb
-extern char aSoundlistcla_0[]; // idb
-extern char aSoundlistclass[]; // idb
-extern char aSoundFileError[]; // idb
-extern char aCanTOpenFileS[]; // idb
-extern char aSoundsAudio_sn[]; // idb
-extern char aDisable3dsound[]; // idb
-extern char aEaxEnvironment[26]; // weak
-extern char a3dsoundprovide[]; // idb
-extern char aNone[]; // idb
-extern char aEmulated[]; // idb
-extern char aDevice[]; // idb
-extern char aSplashscreen[]; // idb
-extern char aSplashaudio[]; // idb
-extern char aSoftwareAureal[]; // idb
-extern char aEaxDamping[12]; // weak
-extern char aEaxEffectVolum[18]; // weak
-extern char aMaximumSupport[26]; // weak
 extern int dword_4F031C[]; // weak
-extern char aSprites08[]; // idb
-extern char aHardsprites[]; // idb
-extern char aTooManyStation[]; // idb
-extern char aEWorkMsdevM_28[52]; // weak
-extern char *off_4F03B8; // idb
+extern const char *off_4F03B8[]; // idb
 extern __int16 word_4F03FE[]; // weak
 extern __int16 word_4F0400[]; // weak
 extern __int16 word_4F0498[]; // weak
@@ -2536,8 +1747,8 @@
 bool __fastcall sub_4075DB(int a1, int a2, int a3, struct BLVFace *a4);
 bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *a4, struct BSPVertexBuffer *a5);
 bool __fastcall sub_407A1C(int x, int z, int y, struct Vec3_int_ v); // idb
-char UpdateActors();
-void UpdateLayingItems();
+void InitializeActors();
+void InitializeLayingItems();
 int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6);
 unsigned int __thiscall SearchAliveActors(unsigned int *pTotalActors);
 unsigned int __fastcall SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID);
@@ -2832,12 +2043,12 @@
 // int __cdecl crt_deconstruct_44C42C();
 struct GUIFont *LoadFont(const char *pFontFile, const char *pFontPalette, ...);
 char *__fastcall FitTextInAWindow(const char *pInString, GUIFont *pFont, GUIWindow *pWindow, unsigned int uX, int a5);
-void *__fastcall SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *a2, int a3, int a4, int a5);
+void SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn, int a3, int a4, int a5);
 int __fastcall sub_44FA4C_spawn_light_elemental(int a1, int a2, int a3);
 void __cdecl sub_450218_prolly_generate_chests_loot();
 signed int __fastcall sub_450521_ProllyDropItemAt(int ecx0, signed int a2, int a3, int a4, int a5, unsigned __int16 a6);
 int __fastcall sub_45063B(struct MapInfo *a1, int a2);
-void *__cdecl RespawnGlobalDecorations();
+void RespawnGlobalDecorations();
 bool __fastcall SpawnActor(unsigned int uMonsterID);
 int __cdecl GetAlertStatus();
 unsigned int __fastcall sub_452442(unsigned __int16 a1, unsigned __int16 a2, int a3, int a4);
--- a/stru123.h	Wed Nov 07 22:09:43 2012 +0600
+++ b/stru123.h	Wed Nov 07 22:10:04 2012 +0600
@@ -6,7 +6,7 @@
 struct stru123
 {
   char field_0[75];
-  char field_4B[125];
+  char _decor_events[125];
 };
 #pragma pack(pop)
 extern stru123 stru_5E4C90;
\ No newline at end of file
--- a/stru6.cpp	Wed Nov 07 22:09:43 2012 +0600
+++ b/stru6.cpp	Wed Nov 07 22:10:04 2012 +0600
@@ -1067,9 +1067,7 @@
           }
           if ( !pRenderer->pRenderD3D )
             goto LABEL_34;
-          *(int *)pContainer = *(int *)"sp18h1";
-          *(short *)&pContainer[4] = *(short *)"h1";
-          pContainer[6] = aSp18h1[6];
+          memcpy(pContainer, "sp18h1", 7);
           pRnd->SetRange(1, 6);
           pContainer[5] = pRnd->GetInRange() + '0';
           v35 = pBitmaps_LOD->LoadTexture(pContainer, TEXTURE_DEFAULT);