diff mm7_4.cpp @ 760:7f1487b74571

some outdoor cleaning
author Gloval
date Sat, 23 Mar 2013 17:02:14 +0400
parents f39fbeb65b28
children f24fb0d64a5c
line wrap: on
line diff
--- a/mm7_4.cpp	Sat Mar 23 00:18:02 2013 +0200
+++ b/mm7_4.cpp	Sat Mar 23 17:02:14 2013 +0400
@@ -1522,863 +1522,6 @@
 
 
 
-//----- (00487E1D) --------------------------------------------------------
-TileTable::~TileTable()
-{
-  if ( this->pTiles )
-  {
-    pAllocator->FreeChunk(this->pTiles);
-    pTiles = nullptr;
-  }
-  uNumTiles = 0;
-}
-
-//----- (00487E3B) --------------------------------------------------------
-TileDesc *TileTable::GetTileById(unsigned int uTileID)
-{
-  /*TileDesc *result; // eax@3
-
-  if ( (uTileID & 0x80000000u) != 0 || (signed int)uTileID > (signed int)(this->uNumTiles - 1) )
-    result = this->pTiles;
-  else
-    result = &this->pTiles[uTileID];
-  return result;*/
-
-  assert(uTileID < uNumTiles);
-  return &pTiles[uTileID];
-}
-
-//----- (00487E58) --------------------------------------------------------
-void TileTable::InitializeTileset(Tileset tileset)
-{
-  TileTable *v2; // edi@1
-  int v3; // ebx@1
-  TileDesc *v4; // eax@2
-  signed int i; // [sp+8h] [bp-4h]@1
-
-  v2 = this;
-  v3 = 0;
-  for ( i = 0; i < (signed int)v2->uNumTiles; ++v3 )
-  {
-    v4 = &v2->pTiles[v3];
-    if (v4->tileset == tileset && v4->pTileName[0] )
-    {
-      v2->pTiles[v3].uBitmapID = pBitmaps_LOD->LoadTexture(v4->pTileName);
-      if ( v2->pTiles[v3].uBitmapID != -1 )
-        pBitmaps_LOD->pTextures[v2->pTiles[v3].uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[v2->pTiles[v3].uBitmapID].palette_id1);
-    }
-    ++i;
-  }
-}
-
-//----- (00487ED6) --------------------------------------------------------
-int TileTable::method_487ED6(signed int a1, int a2)
-{
-  int v3; // esi@1
-  TileTable *v4; // edi@1
-  int v5; // edx@3
-  int v6; // edx@11
-  unsigned int v8; // [sp-4h] [bp-10h]@4
-
-  v3 = 0;
-  v4 = this;
-  if ( a1 > 8 )
-  {
-    v8 = 0;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( a2 || (v5 = rand() % 50, v5 < 20) )
-  {
-    v8 = 0;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v5 < 30 )
-  {
-    v8 = 1;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v5 < 40 )
-  {
-    v8 = 2;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v5 < 48 )
-  {
-    v8 = 3;
-    return v4->GetTileId(a1, v8);
-  }
-  v6 = rand() % 8;
-  if ( !v6 )
-  {
-    v8 = 4;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 1 )
-  {
-    v8 = 5;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 2 )
-  {
-    v8 = 6;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 3 )
-  {
-    v8 = 7;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 4 )
-  {
-    v8 = 8;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 5 )
-  {
-    v8 = 9;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 6 )
-  {
-    v8 = 10;
-    return v4->GetTileId(a1, v8);
-  }
-  if ( v6 == 7 )
-  {
-    v8 = 11;
-    return v4->GetTileId(a1, v8);
-  }
-  return v3;
-}
-
-//----- (00487F84) --------------------------------------------------------
-unsigned int TileTable::GetTileId(unsigned int uTerrainType, unsigned int uSection)
-{
-  unsigned int v3; // edx@1
-  unsigned int result; // eax@1
-  unsigned __int16 *v5; // ecx@2
-
-  v3 = this->uNumTiles;
-  result = 0;
-  if ( (signed int)this->uNumTiles <= 0 )
-  {
-LABEL_6:
-    result = 0;
-  }
-  else
-  {
-    v5 = &this->pTiles->uSection;
-    while ( (signed __int16)*(v5 - 1) != uTerrainType || (signed __int16)*v5 != uSection )
-    {
-      ++result;
-      v5 += 13;
-      if ( (signed int)result >= (signed int)v3 )
-        goto LABEL_6;
-    }
-  }
-  return result;
-}
-
-//----- (00487FB4) --------------------------------------------------------
-void TileTable::ToFile()
-{
-  TileTable *v1; // esi@1
-  FILE *v2; // eax@1
-  FILE *v3; // edi@1
-
-  auto Str = this;
-
-  v1 = Str;
-  v2 = fopen("data\\dtile.bin", "wb");
-  v3 = v2;
-  if ( !v2 )
-    Abortf("Unable to save dtile.bin!");
-  fwrite(v1, 4u, 1u, v2);
-  fwrite(v1->pTiles, 0x1Au, v1->uNumTiles, v3);
-  fclose(v3);
-}
-
-//----- (00488000) --------------------------------------------------------
-void TileTable::FromFile(void *pSerialized)
-{
-  uNumTiles = *(int *)pSerialized;
-  pTiles = (TileDesc *)pAllocator->AllocNamedChunk(pTiles, 26 * uNumTiles, "Tile Descrip");
-  memcpy(pTiles, (char *)pSerialized + 4, 26 * uNumTiles);
-}
-
-//----- (00488047) --------------------------------------------------------
-int TileTable::FromFileTxt(const char *pFilename)
-{
-  TileTable *v2; // ebp@1
-  FILE *v3; // eax@1
-  unsigned int v4; // ebx@3
-  void *v5; // eax@9
-  unsigned __int16 v6; // ax@14
-  const char *v7; // ST14_4@14
-  unsigned __int16 v8; // ax@14
-  const char *v9; // esi@14
-  int v10; // eax@17
-  int v11; // eax@20
-  int v12; // eax@22
-  int v13; // eax@24
-  int v14; // eax@26
-  int v15; // eax@28
-  int v16; // eax@30
-  int v17; // eax@32
-  int v18; // eax@34
-  int v19; // eax@36
-  int v20; // eax@38
-  int v21; // eax@40
-  int v22; // eax@42
-  int v23; // eax@44
-  int v24; // eax@46
-  int v25; // eax@48
-  int v26; // eax@50
-  int v27; // eax@52
-  int v28; // eax@54
-  int v29; // eax@56
-  int v30; // eax@58
-  int v31; // eax@60
-  int v32; // eax@62
-  int v33; // eax@64
-  int v34; // eax@66
-  const char *v35; // esi@67
-  int v36; // eax@70
-  int v37; // eax@73
-  int v38; // eax@75
-  int v39; // eax@77
-  int v40; // eax@79
-  int v41; // eax@81
-  int v42; // eax@83
-  int v43; // eax@85
-  int v44; // eax@87
-  int v45; // eax@89
-  int v46; // eax@91
-  int v47; // eax@93
-  int v48; // eax@108
-  int v49; // eax@110
-  int v50; // eax@112
-  int v51; // eax@114
-  int v52; // eax@116
-  int v53; // eax@118
-  int v54; // eax@120
-  int v55; // eax@122
-  int v56; // eax@124
-  int v57; // eax@126
-  int v58; // eax@128
-  int v59; // eax@130
-  int v60; // eax@132
-  int v61; // eax@134
-  int v62; // eax@136
-  int v63; // eax@138
-  int v64; // eax@140
-  int v65; // eax@142
-  int v66; // eax@144
-  int v67; // eax@146
-  int v68; // eax@148
-  int v69; // eax@150
-  int v70; // eax@151
-  int j; // edi@152
-  const char *v72; // esi@153
-  int v73; // eax@154
-  int v74; // eax@156
-  int v75; // eax@160
-  int v76; // eax@162
-  int v77; // eax@164
-  int v78; // eax@166
-  int v79; // eax@168
-  int v80; // eax@170
-  FILE *i; // [sp-10h] [bp-304h]@3
-  FILE *File; // [sp+4h] [bp-2F0h]@1
-  FrameTableTxtLine v84; // [sp+8h] [bp-2ECh]@4
-  FrameTableTxtLine v85; // [sp+84h] [bp-270h]@4
-  char Buf; // [sp+100h] [bp-1F4h]@4
-
-  v2 = this;
-  v3 = fopen(pFilename, "r");
-  File = v3;
-  if ( !v3 )
-    Abortf("TileTable::load - Unable to open file: %s.");
-  v4 = 0;
-  for ( i = v3; fgets(&Buf, 490, i); i = File )
-  {
-    *strchr(&Buf, 10) = 0;
-    memcpy(&v84, txt_file_frametable_parser(&Buf, &v85), sizeof(v84));
-    if ( v84.uPropCount && *v84.pProperties[0] != 47 )
-      ++v4;
-  }
-  v2->uNumTiles = v4;
-  v5 = pAllocator->AllocNamedChunk(v2->pTiles, 26 * v4, "Tile Descrip");
-  v2->pTiles = (TileDesc *)v5;
-  if ( !v5 )
-    Abortf("TileTable::Load - Out of Memory!");
-  memset(v5, 0, 26 * v2->uNumTiles);
-  v2->uNumTiles = 0;
-  fseek(File, 0, 0);
-  if ( fgets(&Buf, 490, File) )
-  {
-    while ( 1 )
-    {
-      *strchr(&Buf, 10) = 0;
-      memcpy(&v84, txt_file_frametable_parser(&Buf, &v85), sizeof(v84));
-      if ( v84.uPropCount )
-      {
-        if ( *v84.pProperties[0] != 47 )
-          break;
-      }
-LABEL_173:
-      if ( !fgets(&Buf, 490, File) )
-        goto LABEL_174;
-    }
-    strcpy(v2->pTiles[v2->uNumTiles].pTileName, v84.pProperties[0]);
-    v6 = atoi(v84.pProperties[1]);
-    v7 = v84.pProperties[2];
-    v2->pTiles[v2->uNumTiles].uTileID = v6;
-    v8 = atoi(v7);
-    v9 = v84.pProperties[3];
-    v2->pTiles[v2->uNumTiles].uBitmapID = v8;
-    v2->pTiles[v2->uNumTiles].tileset = Tileset_Grass;
-    if ( _strcmpi(v9, "TTtype_NULL") )
-    {
-      if ( _strcmpi(v9, "TTtype_Start") )
-      {
-        if ( _strcmpi(v9, "TTtype_Grass") )
-        {
-          if ( _strcmpi(v9, "TTtype_Cracked") )
-          {
-            if ( _strcmpi(v9, "TTtype_Snow") )
-            {
-              if ( _strcmpi(v9, "TTtype_Sand") )
-              {
-                if ( _strcmpi(v9, "TTtype_Volcano") )
-                {
-                  if ( _strcmpi(v9, "TTtype_Dirt") )
-                  {
-                    if ( _strcmpi(v9, "TTtype_Water") )
-                    {
-                      if ( _strcmpi(v9, "TTtype_Tropical") )
-                      {
-                        if ( _strcmpi(v9, "TTtype_Swamp") )
-                        {
-                          if ( _strcmpi(v9, "TTtype_City") )
-                          {
-                            if ( _strcmpi(v9, "TTtype_RoadGrassCobble") )
-                            {
-                              if ( _strcmpi(v9, "TTtype_RoadGrassDirt") )
-                              {
-                                if ( _strcmpi(v9, "TTtype_RoadCrackedCobble") )
-                                {
-                                  if ( _strcmpi(v9, "TTtype_RoadCrackedDirt") )
-                                  {
-                                    if ( _strcmpi(v9, "TTtype_RoadSandCobble") )
-                                    {
-                                      if ( _strcmpi(v9, "TTtype_RoadSandDirt") )
-                                      {
-                                        if ( _strcmpi(v9, "TTtype_RoadVolcanoCobble") )
-                                        {
-                                          if ( _strcmpi(v9, "TTtype_RoadVolcanoDirt") )
-                                          {
-                                            if ( _strcmpi(v9, "TTtype_RoadSwampCobble") )
-                                            {
-                                              if ( _strcmpi(v9, "TTtype_RoadSwampDirt") )
-                                              {
-                                                if ( _strcmpi(v9, "TTtype_RoadTropicalCobble") )
-                                                {
-                                                  if ( _strcmpi(v9, "TTtype_RoadTropicalDirt") )
-                                                  {
-                                                    if ( _strcmpi(v9, "TTtype_RoadSnowCobble") )
-                                                    {
-                                                      if ( _strcmpi(v9, "TTtype_RoadSnowDirt") )
-                                                      {
-                                                        if ( !_strcmpi(v9, "TTtype_RoadCityStone") )
-                                                        {
-                                                          v34 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                                          *(char *)v34 |= 0x1Cu;
-                                                        }
-                                                      }
-                                                      else
-                                                      {
-                                                        v33 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                                        *(char *)v33 |= 0xDu;
-                                                      }
-                                                    }
-                                                    else
-                                                    {
-                                                      v32 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                                      *(char *)v32 |= 0xCu;
-                                                    }
-                                                  }
-                                                  else
-                                                  {
-                                                    v31 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                                    *(char *)v31 |= 0x1Bu;
-                                                  }
-                                                }
-                                                else
-                                                {
-                                                  v30 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                                  *(char *)v30 |= 0x1Au;
-                                                }
-                                              }
-                                              else
-                                              {
-                                                v29 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                                *(char *)v29 |= 0x19u;
-                                              }
-                                            }
-                                            else
-                                            {
-                                              v28 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                              *(char *)v28 |= 0x18u;
-                                            }
-                                          }
-                                          else
-                                          {
-                                            v27 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                            *(char *)v27 |= 0x11u;
-                                          }
-                                        }
-                                        else
-                                        {
-                                          v26 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                          *(char *)v26 |= 0x10u;
-                                        }
-                                      }
-                                      else
-                                      {
-                                        v25 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                        *(char *)v25 |= 0xFu;
-                                      }
-                                    }
-                                    else
-                                    {
-                                      v24 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                      *(char *)v24 |= 0xEu;
-                                    }
-                                  }
-                                  else
-                                  {
-                                    v23 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                    *(char *)v23 |= 0x17u;
-                                  }
-                                }
-                                else
-                                {
-                                  v22 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                  *(char *)v22 |= 0x16u;
-                                }
-                              }
-                              else
-                              {
-                                v21 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                                *(char *)v21 |= 0xBu;
-                              }
-                            }
-                            else
-                            {
-                              v20 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                              *(char *)v20 |= 0xAu;
-                            }
-                          }
-                          else
-                          {
-                            v19 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                            *(char *)v19 |= 9u;
-                          }
-                        }
-                        else
-                        {
-                          v18 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                          *(char *)v18 |= 7u;
-                        }
-                      }
-                      else
-                      {
-                        v17 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                        *(char *)v17 |= 8u;
-                      }
-                    }
-                    else
-                    {
-                      v16 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                      *(char *)v16 |= 5u;
-                    }
-                  }
-                  else
-                  {
-                    v15 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                    *(char *)v15 |= 4u;
-                  }
-                }
-                else
-                {
-                  v14 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                  *(char *)v14 |= 3u;
-                }
-              }
-              else
-              {
-                v13 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-                *(char *)v13 |= 2u;
-              }
-            }
-            else
-            {
-              v12 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-              *(char *)v12 |= 1u;
-            }
-          }
-          else
-          {
-            v11 = (int)&v2->pTiles[v2->uNumTiles].tileset;
-            *(char *)v11 |= 6u;
-          }
-        }
-      }
-      else
-      {
-        v10 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-        *(char *)v10 |= 0xFEu;
-      }
-    }
-    else
-    {
-      LOBYTE(v2->pTiles[v2->uNumTiles].tileset) = -1;
-    }
-    v35 = v84.pProperties[4];
-    v2->pTiles[v2->uNumTiles].uSection = 0;
-    v2->pTiles[v2->uNumTiles].uAttributes = 0;
-    if ( !_strcmpi(v35, "TTsect_NULL") )
-    {
-      LOBYTE(v2->pTiles[v2->uNumTiles].uSection) = -1;
-LABEL_152:
-      for ( j = 5; j < v84.uPropCount; ++j )
-      {
-        v72 = v84.pProperties[j];
-        if ( _strcmpi(v84.pProperties[j], "TTattr_Burn") )
-        {
-          if ( _strcmpi(v72, "TTattr_Water") )
-          {
-            if ( _strcmpi(v72, "TTattr_Water2") )
-            {
-              if ( _strcmpi(v72, "TTattr_Block") )
-              {
-                if ( _strcmpi(v72, "TTattr_Repulse") )
-                {
-                  if ( _strcmpi(v72, "TTattr_Flat") )
-                  {
-                    if ( _strcmpi(v72, "TTattr_Wave") )
-                    {
-                      if ( _strcmpi(v72, "TTattr_NoDraw") )
-                      {
-                        if ( !_strcmpi(v72, "TTattr_Transition") )
-                        {
-                          v80 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-                          *(short *)v80 |= 0x200u;
-                        }
-                      }
-                      else
-                      {
-                        v79 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-                        *(char *)v79 |= 0x40u;
-                      }
-                    }
-                    else
-                    {
-                      v78 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-                      *(char *)v78 |= 0x20u;
-                    }
-                  }
-                  else
-                  {
-                    v77 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-                    *(char *)v77 |= 0x10u;
-                  }
-                }
-                else
-                {
-                  v76 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-                  *(char *)v76 |= 8u;
-                }
-              }
-              else
-              {
-                v75 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-                *(char *)v75 |= 4u;
-              }
-            }
-            else
-            {
-              HIBYTE(v2->pTiles[v2->uNumTiles].uAttributes) |= 1u;
-            }
-          }
-          else
-          {
-            v74 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-            *(char *)v74 |= 2u;
-          }
-        }
-        else
-        {
-          v73 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-          *(char *)v73 |= 1u;
-        }
-      }
-      ++v2->uNumTiles;
-      goto LABEL_173;
-    }
-    if ( !_strcmpi(v35, "TTsect_Start") )
-    {
-      v36 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v36 |= 0xFEu;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Base1") )
-      goto LABEL_152;
-    if ( !_strcmpi(v35, "TTsect_Base2") )
-    {
-      v37 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v37 |= 1u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Base3") )
-    {
-      v38 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v38 |= 2u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Base4") )
-    {
-      v39 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v39 |= 3u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special1") )
-    {
-      v40 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v40 |= 4u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special2") )
-    {
-      v41 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v41 |= 5u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special3") )
-    {
-      v42 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v42 |= 6u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special4") )
-    {
-      v43 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v43 |= 7u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special5") )
-    {
-      v44 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v44 |= 8u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special6") )
-    {
-      v45 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v45 |= 9u;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special7") )
-    {
-      v46 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v46 |= 0xAu;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_Special8") )
-    {
-      v47 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-      *(char *)v47 |= 0xBu;
-      goto LABEL_152;
-    }
-    if ( !_strcmpi(v35, "TTsect_NE1") )
-      goto LABEL_130;
-    if ( !_strcmpi(v35, "TTsect_NW1") )
-      goto LABEL_134;
-    if ( !_strcmpi(v35, "TTsect_SE1") )
-      goto LABEL_130;
-    if ( !_strcmpi(v35, "TTsect_SW1") )
-      goto LABEL_134;
-    if ( !_strcmpi(v35, "TTsect_E1") )
-      goto LABEL_138;
-    if ( !_strcmpi(v35, "TTsect_W1") )
-      goto LABEL_140;
-    if ( !_strcmpi(v35, "TTsect_N1") )
-      goto LABEL_142;
-    if ( !_strcmpi(v35, "TTsect_S1") )
-      goto LABEL_144;
-    if ( !_strcmpi(v35, "TTsect_XNE1") )
-      goto LABEL_146;
-    if ( _strcmpi(v35, "TTsect_XNW1") )
-    {
-      if ( !_strcmpi(v35, "TTsect_XSE1") )
-        goto LABEL_146;
-      if ( _strcmpi(v35, "TTsect_XSW1") )
-      {
-        if ( !_strcmpi(v35, "TTsect_CROS") )
-        {
-LABEL_151:
-          v70 = (int)&v2->pTiles[v2->uNumTiles].uAttributes;
-          *(short *)v70 |= 0x200u;
-          goto LABEL_152;
-        }
-        if ( !_strcmpi(v35, "TTsect_NS") )
-        {
-          v48 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v48 |= 1u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_EW") )
-        {
-          v49 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v49 |= 2u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_N_E") )
-        {
-          v50 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v50 |= 3u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_N_W") )
-        {
-          v51 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v51 |= 4u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_S_E") )
-        {
-          v52 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v52 |= 5u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_S_W") )
-        {
-          v53 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v53 |= 6u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_NS_E") )
-        {
-          v54 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v54 |= 7u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_NS_W") )
-        {
-          v55 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v55 |= 8u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_EW_N") )
-        {
-          v56 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v56 |= 9u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_EW_S") )
-        {
-          v57 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v57 |= 0xAu;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_NCAP") )
-        {
-          v58 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v58 |= 0xBu;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_ECAP") )
-        {
-LABEL_130:
-          v59 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v59 |= 0xCu;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_SCAP") )
-        {
-          v60 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v60 |= 0xDu;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_WCAP") )
-        {
-LABEL_134:
-          v61 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v61 |= 0xEu;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DN") )
-        {
-          v62 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v62 |= 0xFu;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DS") )
-        {
-LABEL_138:
-          v63 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v63 |= 0x10u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DW") )
-        {
-LABEL_140:
-          v64 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v64 |= 0x11u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DE") )
-        {
-LABEL_142:
-          v65 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v65 |= 0x12u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DSW") )
-        {
-LABEL_144:
-          v66 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v66 |= 0x13u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DNE") )
-        {
-LABEL_146:
-          v67 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v67 |= 0x14u;
-          goto LABEL_151;
-        }
-        if ( !_strcmpi(v35, "TTsect_DSE") )
-        {
-          v68 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-          *(char *)v68 |= 0x15u;
-          goto LABEL_151;
-        }
-        if ( _strcmpi(v35, "TTsect_DNW") )
-          goto LABEL_152;
-      }
-    }
-    v69 = (int)&v2->pTiles[v2->uNumTiles].uSection;
-    *(char *)v69 |= 0x16u;
-    goto LABEL_151;
-  }
-LABEL_174:
-  fclose(File);
-  return 1;
-}
-
-
 
 //----- (0048958E) --------------------------------------------------------
 stru12_MemoryBlock::stru12_MemoryBlock(int a2)