/* DO NOT EDIT THIS FILE - it is machine generated (JCGO_116) */

#ifdef JCGO_SEPARATED
#define JCGO_116
#include "jcgortl.h"
#include "Main.h"
#endif

#ifdef JCGO_116

#ifdef CHKALL_World
#include "jcgobchk.h"
#endif

JCGO_NOSEP_INLINE void CFASTCALL
package_World__void( package_World This )
{
 JCGO_FIELD_NZACCESS(This, regionWidth)= (jint)96;
 JCGO_FIELD_NZACCESS(This, regionHeight)= (jint)96;
 JCGO_FIELD_NZACCESS(This, anInt585)= (jint)128;
}

JCGO_NOSEP_INLINE void CFASTCALL
package_World__reset__( package_World This )
{
 {
  if (JCGO_FIELD_NZACCESS(This, worldInitialised))
  {
   jObject jcgo_rcvrL1;
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
    package_Scene__dispose__(
    (package_Scene)jcgo_rcvrL1));
  }
  {
   jint i;
   i= 0;
   for (; i < (jint)64; i++)
   {
    *(package_GameModel*)&JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     terrainModels), i)= (package_GameModel)jnull;
    {
     jint j;
     j= 0;
     for (; j < (jint)4; j++)
     {
      *(package_GameModel*)&JCGO_ARRAY_LACCESS(((jObjectArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
       wallModels), j)), i)= (package_GameModel)jnull;
     }
    }
    {
     jint k;
     k= 0;
     for (; k < (jint)4; k++)
     {
      *(package_GameModel*)&JCGO_ARRAY_LACCESS(((jObjectArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
       roofModels), k)), i)= (package_GameModel)jnull;
     }
    }
   }
  }
  (java_lang_System__gc__());
 }
}

JCGO_NOSEP_INLINE void CFASTCALL
package_World__setObjectAdjacency__III( package_World This, jint i,
 jint j, jint k )
{
 {
  JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   objectAdjacency), i)), j)|= k;
 }
}

JCGO_NOSEP_INLINE void CFASTCALL
package_World__method407__III( package_World This, jint i, jint j,
 jint k )
{
 {
  JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   objectAdjacency), i)), j)&= (jint)65535L - k;
 }
}

JCGO_NOSEP_INLINE jint CFASTCALL
package_World__getTerrainColour__II( package_World This, jint x, jint
 y )
{
 {
  jbyte byte0;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  byte0= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   byte0= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    byte0= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     byte0= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return (jint)((unsigned char)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainColour), byte0)), x * (jint)48 + y)));
 }
}

JCGO_NOSEP_INLINE package_World CFASTCALL
package_World__this__L03ibmL0s0x4( package_World This, package_Scene
 scene, package_Surface surface )
{
 {
  ;
  package_World__void(This);
  JCGO_FIELD_NZACCESS(This, worldInitialised)= (jboolean)jtrue;
  JCGO_FIELD_NZACCESS(This, objectAdjacency)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jint),
   2, 0, (jint)96, (jint)96, 0, 0));
  JCGO_FIELD_NZACCESS(This, tileDirection)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, wallModels)= (jcgo_new4DArray(JCGO_CLASSREF_OF(package_GameModel__class),
   2, 0, (jint)4, (jint)64, 0, 0));
  JCGO_FIELD_NZACCESS(This, terrainColours)= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
   0, (jint)256);
  JCGO_FIELD_NZACCESS(This, wallsNorthsouth)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, wallsRoof)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, terrainHeight)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, roofModels)= (jcgo_new4DArray(JCGO_CLASSREF_OF(package_GameModel__class),
   2, 0, (jint)4, (jint)64, 0, 0));
  JCGO_FIELD_NZACCESS(This, terrainColour)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, localY)= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
   0, (jint)18432);
  JCGO_FIELD_NZACCESS(This, tileDecoration)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, routeVia)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jint),
   2, 0, (jint)96, (jint)96, 0, 0));
  JCGO_FIELD_NZACCESS(This, wallsDiagonal)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jint),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, wallsEastwest)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
   2, 0, (jint)4, (jint)2304, 0, 0));
  JCGO_FIELD_NZACCESS(This, aBoolean592)= (jboolean)jfalse;
  JCGO_FIELD_NZACCESS(This, playerAlive)= (jboolean)jfalse;
  JCGO_FIELD_NZACCESS(This, terrainHeightLocal)= (jcgo_new4DArray(JCGO_CORECLASS_FOR(OBJT_jint),
   2, 0, (jint)96, (jint)96, 0, 0));
  JCGO_FIELD_NZACCESS(This, terrainModels)= (jObjectArr)jcgo_newArray(JCGO_CLASSREF_OF(package_GameModel__class),
   0, (jint)64);
  JCGO_FIELD_NZACCESS(This, localX)= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
   0, (jint)18432);
  JCGO_FIELD_NZACCESS(This, baseMediaSprite)= (jint)750;
  JCGO_FIELD_NZACCESS(This, scene)= scene;
  JCGO_FIELD_NZACCESS(This, surface)= surface;
  {
   jint i;
   i= 0;
   for (; i < (jint)64; i++)
   {
    jObject jcgo_rcvrL1;
    jint jcgo_rcvrI1;
    jint jcgo_rcvrI2;
    (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, terrainColours),
     jcgo_rcvrI1= i, jcgo_rcvrI2= (package_Scene__rgb__III(
     (jint)255 - i * (jint)4, (jint)255 - JCGO_JDOUBLE_TOJINT(((jdouble)i *
     (jdouble)1.75)), (jint)255 - i * (jint)4)), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
     jcgo_rcvrI1)= jcgo_rcvrI2);
   }
  }
  {
   jint j;
   j= 0;
   for (; j < (jint)64; j++)
   {
    jObject jcgo_rcvrL1;
    jint jcgo_rcvrI1;
    jint jcgo_rcvrI2;
    (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, terrainColours),
     jcgo_rcvrI1= j + (jint)64, jcgo_rcvrI2= (package_Scene__rgb__III(
     j * (jint)3, (jint)144, 0)), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
     jcgo_rcvrI1)= jcgo_rcvrI2);
   }
  }
  {
   jint k;
   k= 0;
   for (; k < (jint)64; k++)
   {
    jObject jcgo_rcvrL1;
    jint jcgo_rcvrI1;
    jint jcgo_rcvrI2;
    (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, terrainColours),
     jcgo_rcvrI1= k + (jint)128, jcgo_rcvrI2= (package_Scene__rgb__III(
     (jint)192 - JCGO_JDOUBLE_TOJINT(((jdouble)k * (jdouble)1.5)),
     (jint)144 - JCGO_JDOUBLE_TOJINT(((jdouble)k * (jdouble)1.5)),
     0)), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1, jcgo_rcvrI1)= jcgo_rcvrI2);
   }
  }
  {
   jint l;
   l= 0;
   for (; l < (jint)64; l++)
   {
    jObject jcgo_rcvrL1;
    jint jcgo_rcvrI1;
    jint jcgo_rcvrI2;
    (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, terrainColours),
     jcgo_rcvrI1= l + (jint)192, jcgo_rcvrI2= (package_Scene__rgb__III(
     (jint)96 - JCGO_JDOUBLE_TOJINT(((jdouble)l * (jdouble)1.5)), JCGO_JDOUBLE_TOJINT(((jdouble)l *
     (jdouble)1.5)) + (jint)48, 0)), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
     jcgo_rcvrI1)= jcgo_rcvrI2);
   }
  }
 }
 return This;
}

JCGO_NOSEP_FRWINL package_World CFASTCALL
package_World__new__L03ibmL0s0x4( package_Scene scene, package_Surface
 surface )
{
 return package_World__this__L03ibmL0s0x4(
  (package_World)jcgo_newObject((jvtable)&package_World_methods), scene,
  surface);
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getWallEastwest__II( package_World This, jint x, jint
 y )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return (jint)((unsigned char)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   wallsEastwest), h)), x * (jint)48 + y)));
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__setTerrainAmbience__IIIII( package_World This, jint
 x, jint y, jint x2, jint y2, jint ambience )
{
 {
  package_GameModel gameModel;
  gameModel= ((package_GameModel)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainModels), x + y * (jint)8));
  {
   jint j1;
   j1= 0;
   for (; j1 < JCGO_FIELD_ACCESS(package_GameModel, gameModel, numVertices);
    j1++)
   {
    if (JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, vertexX),
     j1) == x2 * (jint)128 && JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel,
     vertexZ), j1) == y2 * (jint)128)
    {
     (package_GameModel__setVertexAmbience__II(
      gameModel, j1, ambience));
     return;
    }
   }
  }
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getWallRoof__II( package_World This, jint x, jint y
 )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return (jint)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   wallsRoof), h)), x * (jint)48 + y));
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getElevation__II( package_World This, jint x, jint
 y )
{
 {
  jint sX;
  jint sY;
  jint aX;
  jint aY;
  jint h;
  jint hx;
  jint hy;
  jint elevation;
  sX= JCGO_SHR_F(x, (jint)7);
  sY= JCGO_SHR_F(y, (jint)7);
  aX= x & (jint)127;
  aY= y & (jint)127;
  if (sX < 0 || sY < 0 || sX >= (jint)95 || sY >= (jint)95)
  {
   return 0;
  }
  ;
  if (aX <= (jint)128 - aY)
  {
   h= (package_World__getTerrainHeight__II(
    This, sX, sY));
   hx= (package_World__getTerrainHeight__II(
    This, sX + (jint)1, sY)) - h;
   hy= (package_World__getTerrainHeight__II(
    This, sX, sY + (jint)1)) - h;
  }
  else
  {
   h= (package_World__getTerrainHeight__II(
    This, sX + (jint)1, sY + (jint)1));
   hx= (package_World__getTerrainHeight__II(
    This, sX, sY + (jint)1)) - h;
   hy= (package_World__getTerrainHeight__II(
    This, sX + (jint)1, sY)) - h;
   aX= (jint)128 - aX;
   aY= (jint)128 - aY;
  }
  elevation= h + (hx * aX) / (jint)128 + (hy * aY) / (jint)128;
  return elevation;
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getWallDiagonal__II( package_World This, jint x, jint
 y )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   wallsDiagonal), h)), x * (jint)48 + y);
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__removeObject2__III( package_World This, jint x, jint
 y, jint id )
{
 {
  if (x < 0 || y < 0 || x >= (jint)95 || y >= (jint)95)
  {
   return;
  }
  if (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__objectType), id) == (jint)1 || JCGO_ARRAY_IACCESS(package_GameData__objectType,
   id) == (jint)2)
  {
   jint tileDir;
   jint modelWidth;
   jint modelHeight;
   tileDir= (package_World__getTileDirection__II(
    This, x, y));
   if (tileDir == 0 || tileDir == (jint)4)
   {
    modelWidth= JCGO_ARRAY_IACCESS(package_GameData__objectWidth, id);
    modelHeight= JCGO_ARRAY_IACCESS(package_GameData__objectHeight,
     id);
   }
   else
   {
    modelHeight= JCGO_ARRAY_IACCESS(package_GameData__objectWidth,
     id);
    modelWidth= JCGO_ARRAY_IACCESS(package_GameData__objectHeight,
     id);
   }
   {
    jint mx;
    mx= x;
    for (; mx < x + modelWidth; mx++)
    {
     {
      jint my;
      my= y;
      for (; my < y + modelHeight; my++)
      {
       if (JCGO_ARRAY_IACCESS(package_GameData__objectType, id) ==
        (jint)1)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         objectAdjacency), mx)), my)|= (jint)64;
       }
       else
       {
        if (tileDir == 0)
        {
         JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          objectAdjacency), mx)), my)|= (jint)2;
         if (mx > 0)
         {
          (package_World__setObjectAdjacency__III(
           This, mx - (jint)1, my, (jint)8));
         }
        }
        else
        {
         if (tileDir == (jint)2)
         {
          JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           objectAdjacency), mx)), my)|= (jint)4;
          if (my < (jint)95)
          {
           (package_World__setObjectAdjacency__III(
            This, mx, my + (jint)1, (jint)1));
          }
         }
         else
         {
          if (tileDir == (jint)4)
          {
           JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
            objectAdjacency), mx)), my)|= (jint)8;
           if (mx < (jint)95)
           {
            (package_World__setObjectAdjacency__III(
             This, mx + (jint)1, my, (jint)2));
           }
          }
          else
          {
           if (tileDir == (jint)6)
           {
            JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
             objectAdjacency), mx)), my)|= (jint)1;
            if (my > 0)
            {
             (package_World__setObjectAdjacency__III(
              This, mx, my - (jint)1, (jint)4));
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
   (package_World__method404__IIII(
    This, x, y, modelWidth, modelHeight));
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__removeWallObject__IIII( package_World This, jint x,
 jint y, jint k, jint id )
{
 {
  if (x < 0 || y < 0 || x >= (jint)95 || y >= (jint)95)
  {
   return;
  }
  if (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__wallObjectAdjacent), id) == (jint)1)
  {
   if (k == 0)
   {
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     objectAdjacency), x)), y)&= (jint)65534L;
    if (y > 0)
    {
     (package_World__method407__III(
      This, x, y - (jint)1, (jint)4));
    }
   }
   else
   {
    if (k == (jint)1)
    {
     JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
      objectAdjacency), x)), y)&= (jint)65533L;
     if (x > 0)
     {
      (package_World__method407__III(
       This, x - (jint)1, y, (jint)8));
     }
    }
    else
    {
     if (k == (jint)2)
     {
      JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
       objectAdjacency), x)), y)&= (jint)65519L;
     }
     else
     {
      if (k == (jint)3)
      {
       JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        objectAdjacency), x)), y)&= (jint)65503L;
      }
     }
    }
   }
   (package_World__method404__IIII(
    This, x, y, (jint)1, (jint)1));
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__method402__IIIII( package_World This, jint i, jint
 j, jint k, jint l, jint i1 )
{
 {
  jint j1;
  jint k1;
  jint l1;
  jint i2;
  jObject jcgo_rcvrL1;
  j1= i * (jint)3;
  k1= j * (jint)3;
  l1= (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
   package_Scene__method302__I(
   (package_Scene)jcgo_rcvrL1, l));
  i2= (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
   package_Scene__method302__I(
   (package_Scene)jcgo_rcvrL1, i1));
  l1= JCGO_SHR_F(l1, (jint)1) & (jint)8355711L;
  i2= JCGO_SHR_F(i2, (jint)1) & (jint)8355711L;
  if (k == 0)
  {
   jObject jcgo_rcvrL1;
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1, k1, (jint)3, l1));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1, k1 + (jint)1, (jint)2, l1));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1, k1 + (jint)2, (jint)1, l1));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1 + (jint)2, k1 + (jint)1, (jint)1,
    i2));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1 + (jint)1, k1 + (jint)2, (jint)2,
    i2));
   return;
  }
  if (k == (jint)1)
  {
   jObject jcgo_rcvrL1;
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1, k1, (jint)3, i2));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1 + (jint)1, k1 + (jint)1, (jint)2,
    i2));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1 + (jint)2, k1 + (jint)2, (jint)1,
    i2));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1, k1 + (jint)1, (jint)1, l1));
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawLineHoriz__IIII(
    (package_Surface)jcgo_rcvrL1, j1, k1 + (jint)2, (jint)2, l1));
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__loadSection__IIII( package_World This, jint x, jint
 y, jint plane, jint chunk )
{
 {
  java_lang_String mapname;
  jObject jcgo_rcvrL1;
  struct java_lang_StringBuilder_s jcgo_stackobj1;
  struct java_lang_String_s jcgo_stackobj2;
  struct java_lang_String_s jcgo_stackobj3;
  struct java_lang_String_s jcgo_stackobj4;
  struct java_lang_String_s jcgo_stackobj5;
  struct java_lang_String_s jcgo_stackobj6;
  struct java_lang_String_s jcgo_stackobj7;
  mapname= (jcgo_rcvrL1= (jObject)(jcgo_rcvrL1= (jObject)(jcgo_rcvrL1=
   (jObject)(jcgo_rcvrL1= (jObject)java_lang_StringBuilder__append__Ls(
   java_lang_StringBuilder__append__Ls(
   java_lang_StringBuilder__this__(
   JCGO_STACKOBJ_NEW(jcgo_stackobj1, java_lang_StringBuilder_methods)),
   JCGO_STRREF_OF(jcgo_string2_World)), (java_lang_String__valueOf__IX(
   plane, JCGO_STACKOBJ_NEW(jcgo_stackobj2, java_lang_String_methods)))),
   java_lang_StringBuilder__append__Ls(
   (java_lang_StringBuilder)jcgo_rcvrL1, (java_lang_String__valueOf__IX(
   x / (jint)10, JCGO_STACKOBJ_NEW(jcgo_stackobj3, java_lang_String_methods))))),
   java_lang_StringBuilder__append__Ls(
   (java_lang_StringBuilder)jcgo_rcvrL1, (java_lang_String__valueOf__IX(
   x % (jint)10, JCGO_STACKOBJ_NEW(jcgo_stackobj4, java_lang_String_methods))))),
   java_lang_StringBuilder__append__Ls(
   (java_lang_StringBuilder)jcgo_rcvrL1, (java_lang_String__valueOf__IX(
   y / (jint)10, JCGO_STACKOBJ_NEW(jcgo_stackobj5, java_lang_String_methods))))),
   java_lang_String__this__L5dy9e(
   JCGO_STACKOBJ_NEW(jcgo_stackobj6, java_lang_String_methods), java_lang_StringBuilder__append__Ls(
   (java_lang_StringBuilder)jcgo_rcvrL1, (java_lang_String__valueOf__IX(
   y % (jint)10, JCGO_STACKOBJ_NEW(jcgo_stackobj7, java_lang_String_methods))))));
  {
   JCGO_TRY_BLOCK
   {
    if (JCGO_FIELD_NZACCESS(This, landscapePack) != jnull)
    {
     jbyteArr mapData;
     jint off;
     jint lastVal;
     mapData= (package_Utility__loadData__LsIBA(
      java_lang_VMSystem__concat0X__LsLs(
      mapname, JCGO_STRREF_OF(jcgo_string3_World)), JCGO_FIELD_NZACCESS(This,
      landscapePack), 0));
     if (mapData == jnull && JCGO_FIELD_NZACCESS(This, memberLandscapePack) !=
      jnull)
     {
      mapData= (package_Utility__loadData__LsIBA(
       java_lang_VMSystem__concat0X__LsLs(
       mapname, JCGO_STRREF_OF(jcgo_string3_World)), JCGO_FIELD_NZACCESS(This,
       memberLandscapePack), 0));
     }
     if (mapData != jnull && JCGO_ARRAY_NZLENGTH(mapData) > 0)
     {
      jint off;
      jint lastVal;
      off= 0;
      lastVal= 0;
      {
       jint tile;
       tile= 0;
       for (; tile < (jint)2304;)
       {
        jint val;
        val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
        if (val < (jint)128)
        {
         jObject jcgo_rcvrL1;
         jint jcgo_rcvrI1;
         (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          terrainHeight), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
          jcgo_rcvrI1)= ((jbyte)val));
         lastVal= val;
        }
        if (val >= (jint)128)
        {
         {
          jint i;
          i= 0;
          for (; i < val - (jint)128; i++)
          {
           jObject jcgo_rcvrL1;
           jint jcgo_rcvrI1;
           (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
            terrainHeight), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
            jcgo_rcvrI1)= ((jbyte)lastVal));
          }
         }
        }
       }
      }
      lastVal= (jint)64;
      {
       jint tileY;
       tileY= 0;
       for (; tileY < (jint)48; tileY++)
       {
        {
         jint tileX;
         tileX= 0;
         for (; tileX < (jint)48; tileX++)
         {
          lastVal= (JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           terrainHeight), chunk)), tileX * (jint)48 + tileY) + lastVal) &
           (jint)127;
          JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           terrainHeight), chunk)), tileX * (jint)48 + tileY)= ((jbyte)(lastVal *
           (jint)2));
         }
        }
       }
      }
      lastVal= 0;
      {
       jint tile;
       tile= 0;
       for (; tile < (jint)2304;)
       {
        jint val;
        val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
        if (val < (jint)128)
        {
         jObject jcgo_rcvrL1;
         jint jcgo_rcvrI1;
         (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          terrainColour), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
          jcgo_rcvrI1)= ((jbyte)val));
         lastVal= val;
        }
        if (val >= (jint)128)
        {
         {
          jint i;
          i= 0;
          for (; i < val - (jint)128; i++)
          {
           jObject jcgo_rcvrL1;
           jint jcgo_rcvrI1;
           (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
            terrainColour), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
            jcgo_rcvrI1)= ((jbyte)lastVal));
          }
         }
        }
       }
      }
      lastVal= (jint)35;
      {
       jint tileY;
       tileY= 0;
       for (; tileY < (jint)48; tileY++)
       {
        {
         jint tileX;
         tileX= 0;
         for (; tileX < (jint)48; tileX++)
         {
          lastVal= (JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           terrainColour), chunk)), tileX * (jint)48 + tileY) + lastVal) &
           (jint)127;
          JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           terrainColour), chunk)), tileX * (jint)48 + tileY)= ((jbyte)(lastVal *
           (jint)2));
         }
        }
       }
      }
     }
     else
     {
      {
       jint tile;
       tile= 0;
       for (; tile < (jint)2304; tile++)
       {
        JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeight), chunk)), tile)= (jbyte)0;
        JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainColour), chunk)), tile)= (jbyte)0;
       }
      }
     }
     mapData= (package_Utility__loadData__LsIBA(
      java_lang_VMSystem__concat0X__LsLs(
      mapname, JCGO_STRREF_OF(jcgo_string116_Mdclnt)), JCGO_FIELD_NZACCESS(This,
      mapPack), 0));
     if (mapData == jnull && JCGO_FIELD_NZACCESS(This, memberMapPack) !=
      jnull)
     {
      mapData= (package_Utility__loadData__LsIBA(
       java_lang_VMSystem__concat0X__LsLs(
       mapname, JCGO_STRREF_OF(jcgo_string116_Mdclnt)), JCGO_FIELD_NZACCESS(This,
       memberMapPack), 0));
     }
     if (mapData == jnull || JCGO_ARRAY_NZLENGTH(mapData) == 0)
     {
      JCGO_THROW_EXC(java_io_IOException__new__());
     }
     off= 0;
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsNorthsouth), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1=
        JCGO_ARRAY_NZBACCESS(mapData, off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
        jcgo_rcvrI1)= jcgo_rcvrB1);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsEastwest), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(mapData,
        off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrB1);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jint jcgo_rcvrI2;
       (jcgo_rcvrL1= (jObject)((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsDiagonal), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrI2= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData,
        off++))), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrI2);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jint val;
       val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
       if (val > 0)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         wallsDiagonal), chunk)), tile)= (val + (jint)12000);
       }
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304;)
      {
       jint val;
       val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
       if (val < (jint)128)
       {
        jObject jcgo_rcvrL1;
        jint jcgo_rcvrI1;
        (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         wallsRoof), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
         jcgo_rcvrI1)= ((jbyte)val));
       }
       else
       {
        {
         jint i;
         i= 0;
         for (; i < val - (jint)128; i++)
         {
          jObject jcgo_rcvrL1;
          (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           wallsRoof), chunk)), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
           tile++)= (jbyte)0);
         }
        }
       }
      }
     }
     lastVal= 0;
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304;)
      {
       jint val;
       val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
       if (val < (jint)128)
       {
        jObject jcgo_rcvrL1;
        jint jcgo_rcvrI1;
        (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         tileDecoration), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
         jcgo_rcvrI1)= ((jbyte)val));
        lastVal= val;
       }
       else
       {
        {
         jint i;
         i= 0;
         for (; i < val - (jint)128; i++)
         {
          jObject jcgo_rcvrL1;
          jint jcgo_rcvrI1;
          (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           tileDecoration), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
           jcgo_rcvrI1)= ((jbyte)lastVal));
         }
        }
       }
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304;)
      {
       jint val;
       val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
       if (val < (jint)128)
       {
        jObject jcgo_rcvrL1;
        jint jcgo_rcvrI1;
        (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         tileDirection), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
         jcgo_rcvrI1)= ((jbyte)val));
       }
       else
       {
        {
         jint i;
         i= 0;
         for (; i < val - (jint)128; i++)
         {
          jObject jcgo_rcvrL1;
          (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           tileDirection), chunk)), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
           tile++)= (jbyte)0);
         }
        }
       }
      }
     }
     mapData= (package_Utility__loadData__LsIBA(
      java_lang_VMSystem__concat0X__LsLs(
      mapname, JCGO_STRREF_OF(jcgo_string4_World)), JCGO_FIELD_NZACCESS(This,
      mapPack), 0));
     if (mapData != jnull && JCGO_ARRAY_NZLENGTH(mapData) > 0)
     {
      off= 0;
      {
       jint tile;
       tile= 0;
       for (; tile < (jint)2304;)
       {
        jint val;
        val= (jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData, off++)));
        if (val < (jint)128)
        {
         jObject jcgo_rcvrL1;
         jint jcgo_rcvrI1;
         (jcgo_rcvrL1= (jObject)((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          wallsDiagonal), chunk)), jcgo_rcvrI1= tile++, JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
          jcgo_rcvrI1)= (val + (jint)48000L));
        }
        else
        {
         tile+= val - (jint)128;
        }
       }
      }
#ifndef JCGO_SEHTRY
      jcgo_tryLeave();
#endif
      return;
     }
    }
    else
    {
     jbyteArr mapData;
     jint val;
     jint off;
     struct java_lang_StringBuilder_s jcgo_stackobj8;
     mapData= (jbyteArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jbyte),
      0, (jint)20736);
     (package_Utility__readFully__LsBAI(
      java_lang_String__new__L5dy9e(
      java_lang_StringBuilder__append__Ls(
      java_lang_StringBuilder__append__Ls(
      java_lang_StringBuilder__append__Ls(
      java_lang_StringBuilder__this__(
      JCGO_STACKOBJ_NEW(jcgo_stackobj8, java_lang_StringBuilder_methods)),
      JCGO_STRREF_OF(jcgo_string5_World)), mapname), JCGO_STRREF_OF(jcgo_string6_World))),
      mapData, (jint)20736));
     val= 0;
     off= 0;
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       val= (val + JCGO_ARRAY_NZBACCESS(mapData, off++)) & (jint)255;
       JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeight), chunk)), tile)= ((jbyte)val);
      }
     }
     val= 0;
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       val= (val + JCGO_ARRAY_NZBACCESS(mapData, off++)) & (jint)255;
       JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainColour), chunk)), tile)= ((jbyte)val);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsNorthsouth), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1=
        JCGO_ARRAY_NZBACCESS(mapData, off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1,
        jcgo_rcvrI1)= jcgo_rcvrB1);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsEastwest), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(mapData,
        off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrB1);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jint jcgo_rcvrI1;
       jint jcgo_rcvrI2;
       (jcgo_rcvrI1= (jcgo_rcvrI2= ((jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData,
        off)))) * (jint)256, jcgo_rcvrI2 + ((jint)((unsigned char)(JCGO_ARRAY_NZBACCESS(mapData,
        off + (jint)1))))), JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsDiagonal), chunk)), tile)= jcgo_rcvrI1);
       off+= (jint)2;
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        wallsRoof), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(mapData,
        off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrB1);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        tileDecoration), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(mapData,
        off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrB1);
      }
     }
     {
      jint tile;
      tile= 0;
      for (; tile < (jint)2304; tile++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jbyte jcgo_rcvrB1;
       (jcgo_rcvrL1= (jObject)((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        tileDirection), chunk)), jcgo_rcvrI1= tile, jcgo_rcvrB1= JCGO_ARRAY_NZBACCESS(mapData,
        off++), JCGO_ARRAY_BACCESS((jbyteArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrB1);
      }
     }
    }
#ifndef JCGO_SEHTRY
    jcgo_tryLeave();
#endif
    return;
   }
   JCGO_TRY_LEAVE
   JCGO_TRY_CATCHES(1)
   JCGO_TRY_CATCH(OBJT_java_io_IOException, MAXT_java_io_IOException)
   {
   }
   JCGO_TRY_RETHROW(1)
  }
  {
   jint tile;
   tile= 0;
   for (; tile < (jint)2304; tile++)
   {
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     terrainHeight), chunk)), tile)= (jbyte)0;
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     terrainColour), chunk)), tile)= (jbyte)0;
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     wallsNorthsouth), chunk)), tile)= (jbyte)0;
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     wallsEastwest), chunk)), tile)= (jbyte)0;
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     wallsDiagonal), chunk)), tile)= 0;
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     wallsRoof), chunk)), tile)= (jbyte)0;
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     tileDecoration), chunk)), tile)= (jbyte)0;
    if (plane == 0)
    {
     JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
      tileDecoration), chunk)), tile)= (jbyte)(-(jint)6);
    }
    if (plane == (jint)3)
    {
     JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
      tileDecoration), chunk)), tile)= (jbyte)(jint)8;
    }
    JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     tileDirection), chunk)), tile)= (jbyte)0;
   }
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__method404__IIII( package_World This, jint x, jint y,
 jint k, jint l )
{
 {
  if (x < (jint)1 || y < (jint)1 || x + k >= (jint)96 || y + l >= (jint)96)
  {
   return;
  }
  {
   jint xx;
   xx= x;
   for (; xx <= x + k; xx++)
   {
    {
     jint yy;
     yy= y;
     for (; yy <= y + l; yy++)
     {
      if (((package_World__getObjectAdjacency__II(
       This, xx, yy)) & (jint)99) != 0 || ((package_World__getObjectAdjacency__II(
       This, xx - (jint)1, yy)) & (jint)89) != 0 || ((package_World__getObjectAdjacency__II(
       This, xx, yy - (jint)1)) & (jint)86) != 0 || ((package_World__getObjectAdjacency__II(
       This, xx - (jint)1, yy - (jint)1)) & (jint)108) != 0)
      {
       (package_World__method425__III(
        This, xx, yy, (jint)35));
      }
      else
      {
       (package_World__method425__III(
        This, xx, yy, 0));
      }
     }
    }
   }
  }
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getObjectAdjacency__II( package_World This, jint x,
 jint y )
{
 {
  if (x < 0 || y < 0 || x >= (jint)96 || y >= (jint)96)
  {
   return 0;
  }
  else
  {
   return JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y);
  }
 }
}

JCGO_NOSEP_STATIC jboolean CFASTCALL
package_World__hasRoof__II( package_World This, jint x, jint y )
{
 {
  return (jboolean)((package_World__getWallRoof__II(
   This, x, y)) > 0 && (package_World__getWallRoof__II(
   This, x - (jint)1, y)) > 0 && (package_World__getWallRoof__II(
   This, x - (jint)1, y - (jint)1)) > 0 && (package_World__getWallRoof__II(
   This, x, y - (jint)1)) > 0);
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__setTiles__( package_World This )
{
 {
  {
   jint x;
   x= 0;
   for (; x < (jint)96; x++)
   {
    {
     jint y;
     y= 0;
     for (; y < (jint)96; y++)
     {
      if ((package_World__getTileDecoration__III(
       This, x, y, 0)) == (jint)250)
      {
       if (x == (jint)47 && (package_World__getTileDecoration__III(
        This, x + (jint)1, y, 0)) != (jint)250 && (package_World__getTileDecoration__III(
        This, x + (jint)1, y, 0)) != (jint)2)
       {
        (package_World__setTileDecoration__III(
         This, x, y, (jint)9));
       }
       else
       {
        if (y == (jint)47 && (package_World__getTileDecoration__III(
         This, x, y + (jint)1, 0)) != (jint)250 && (package_World__getTileDecoration__III(
         This, x, y + (jint)1, 0)) != (jint)2)
        {
         (package_World__setTileDecoration__III(
          This, x, y, (jint)9));
        }
        else
        {
         (package_World__setTileDecoration__III(
          This, x, y, (jint)2));
        }
       }
      }
     }
    }
   }
  }
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getWallNorthsouth__II( package_World This, jint x,
 jint y )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return (jint)((unsigned char)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   wallsNorthsouth), h)), x * (jint)48 + y)));
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getTileDirection__II( package_World This, jint x, jint
 y )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return (jint)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   tileDirection), h)), x * (jint)48 + y));
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getTileDecoration__IIII( package_World This, jint x,
 jint y, jint unused, jint def )
{
 {
  jint deco;
  deco= (package_World__getTileDecoration__III(
   This, x, y, unused));
  if (deco == 0)
  {
   return def;
  }
  else
  {
   return JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
    package_GameData__tileDecoration), deco - (jint)1);
  }
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getTileDecoration__III( package_World This, jint x,
 jint y, jint unused )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return (jint)((unsigned char)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   tileDecoration), h)), x * (jint)48 + y)));
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__setTileDecoration__III( package_World This, jint x,
 jint y, jint v )
{
 {
  jbyte h;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return;
  }
  h= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   h= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    h= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     h= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   tileDecoration), h)), x * (jint)48 + y)= ((jbyte)v);
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__route__IIIIIIIAIAZ( package_World This, jintArr routeX,
 jintArr routeY, jint startX, jint startY, jint endX1, jint endY1,
 jint endX2, jint endY2, jboolean objects )
{
 {
  jint writePtr;
  jint readPtr;
  jint x;
  jint y;
  jint size;
  jint stride;
  jboolean reached;
  {
   jint x;
   x= 0;
   for (; x < (jint)96; x++)
   {
    {
     jint y;
     y= 0;
     for (; y < (jint)96; y++)
     {
      JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
       routeVia), x)), y)= 0;
     }
    }
   }
  }
  writePtr= 0;
  readPtr= 0;
  x= startX;
  y= startY;
  JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   routeVia), startX)), startY)= (jint)99;
  JCGO_ARRAY_IACCESS(routeX, writePtr)= startX;
  JCGO_ARRAY_IACCESS(routeY, writePtr++)= startY;
  size= JCGO_ARRAY_NZLENGTH(routeX);
  reached= jfalse;
  while (readPtr != writePtr)
  {
   x= JCGO_ARRAY_NZIACCESS(routeX, readPtr);
   y= JCGO_ARRAY_NZIACCESS(routeY, readPtr);
   readPtr= jcgo_mod((readPtr + (jint)1), size);
   if (x >= endX1 && x <= endX2 && y >= endY1 && y <= endY2)
   {
    reached= (jboolean)jtrue;
    break;
   }
   if (objects)
   {
    if (x > 0 && x - (jint)1 >= endX1 && x - (jint)1 <= endX2 && y >=
     endY1 && y <= endY2 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     objectAdjacency), x - (jint)1)), y) & (jint)8) == 0)
    {
     reached= (jboolean)jtrue;
     break;
    }
    if (x < (jint)95 && x + (jint)1 >= endX1 && x + (jint)1 <= endX2 &&
     y >= endY1 && y <= endY2 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     objectAdjacency), x + (jint)1)), y) & (jint)2) == 0)
    {
     reached= (jboolean)jtrue;
     break;
    }
    if (y > 0 && x >= endX1 && x <= endX2 && y - (jint)1 >= endY1 &&
     y - (jint)1 <= endY2 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     objectAdjacency), x)), y - (jint)1) & (jint)4) == 0)
    {
     reached= (jboolean)jtrue;
     break;
    }
    if (y < (jint)95 && x >= endX1 && x <= endX2 && y + (jint)1 >=
     endY1 && y + (jint)1 <= endY2 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     objectAdjacency), x)), y + (jint)1) & (jint)1) == 0)
    {
     reached= (jboolean)jtrue;
     break;
    }
   }
   if (x > 0 && JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x - (jint)1)), y) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x - (jint)1)), y) & (jint)120) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= (x - (jint)1);
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= y;
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x - (jint)1)), y)= (jint)2;
   }
   if (x < (jint)95 && JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x + (jint)1)), y) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x + (jint)1)), y) & (jint)114) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= (x + (jint)1);
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= y;
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x + (jint)1)), y)= (jint)8;
   }
   if (y > 0 && JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x)), y - (jint)1) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y - (jint)1) & (jint)116) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= x;
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= (y - (jint)1);
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x)), y - (jint)1)= (jint)1;
   }
   if (y < (jint)95 && JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x)), y + (jint)1) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y + (jint)1) & (jint)113) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= x;
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= (y + (jint)1);
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x)), y + (jint)1)= (jint)4;
   }
   if (x > 0 && y > 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y - (jint)1) & (jint)116) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x - (jint)1)), y) & (jint)120) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x - (jint)1)), y - (jint)1) & (jint)124) == 0 &&
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x - (jint)1)), y - (jint)1) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= (x - (jint)1);
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= (y - (jint)1);
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x - (jint)1)), y - (jint)1)= (jint)3;
   }
   if (x < (jint)95 && y > 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y - (jint)1) & (jint)116) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x + (jint)1)), y) & (jint)114) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x + (jint)1)), y - (jint)1) & (jint)118) == 0 &&
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x + (jint)1)), y - (jint)1) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= (x + (jint)1);
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= (y - (jint)1);
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x + (jint)1)), y - (jint)1)= (jint)9;
   }
   if (x > 0 && y < (jint)95 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y + (jint)1) & (jint)113) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x - (jint)1)), y) & (jint)120) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x - (jint)1)), y + (jint)1) & (jint)121) == 0 &&
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x - (jint)1)), y + (jint)1) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= (x - (jint)1);
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= (y + (jint)1);
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x - (jint)1)), y + (jint)1)= (jint)6;
   }
   if (x < (jint)95 && y < (jint)95 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x)), y + (jint)1) & (jint)113) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x + (jint)1)), y) & (jint)114) == 0 && (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    objectAdjacency), x + (jint)1)), y + (jint)1) & (jint)115) == 0 &&
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x + (jint)1)), y + (jint)1) == 0)
   {
    JCGO_ARRAY_NZIACCESS(routeX, writePtr)= (x + (jint)1);
    JCGO_ARRAY_NZIACCESS(routeY, writePtr)= (y + (jint)1);
    writePtr= jcgo_mod((writePtr + (jint)1), size);
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     routeVia), x + (jint)1)), y + (jint)1)= (jint)12;
   }
  }
  if (!reached)
  {
   return (-(jint)1);
  }
  readPtr= 0;
  JCGO_ARRAY_NZIACCESS(routeX, readPtr)= x;
  JCGO_ARRAY_NZIACCESS(routeY, readPtr++)= y;
  {
   jint step;
   step= stride= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x)), y);
   for (; x != startX || y != startY; step= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    routeVia), x)), y))
   {
    if (step != stride)
    {
     stride= step;
     JCGO_ARRAY_NZIACCESS(routeX, readPtr)= x;
     JCGO_ARRAY_NZIACCESS(routeY, readPtr++)= y;
    }
    if ((step & (jint)2) != 0)
    {
     x++;
    }
    else
    {
     if ((step & (jint)8) != 0)
     {
      x--;
     }
    }
    if ((step & (jint)1) != 0)
    {
     y++;
    }
    else
    {
     if ((step & (jint)4) != 0)
     {
      y--;
     }
    }
   }
  }
  return readPtr;
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__setObjectAdjacency__IIII( package_World This, jint
 x, jint y, jint dir, jint id )
{
 {
  if (x < 0 || y < 0 || x >= (jint)95 || y >= (jint)95)
  {
   return;
  }
  if (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__wallObjectAdjacent), id) == (jint)1)
  {
   if (dir == 0)
   {
    JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     objectAdjacency), x)), y)|= (jint)1;
    if (y > 0)
    {
     (package_World__setObjectAdjacency__III(
      This, x, y - (jint)1, (jint)4));
    }
   }
   else
   {
    if (dir == (jint)1)
    {
     JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
      objectAdjacency), x)), y)|= (jint)2;
     if (x > 0)
     {
      (package_World__setObjectAdjacency__III(
       This, x - (jint)1, y, (jint)8));
     }
    }
    else
    {
     if (dir == (jint)2)
     {
      JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
       objectAdjacency), x)), y)|= (jint)16;
     }
     else
     {
      if (dir == (jint)3)
      {
       JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        objectAdjacency), x)), y)|= (jint)32;
      }
     }
    }
   }
   (package_World__method404__IIII(
    This, x, y, (jint)1, (jint)1));
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__loadSection__IIIZ( package_World This, jint x, jint
 y, jint plane, jboolean flag )
{
 {
  jint l;
  jint i1;
  jint k1;
  jObject jcgo_rcvrL1;
  jObject jcgo_rcvrL2;
  jObject jcgo_rcvrL3;
  jint jcgo_rcvrI1;
  l= (x + (jint)24) / (jint)48;
  i1= (y + (jint)24) / (jint)48;
  (package_World__loadSection__IIII(
   This, l - (jint)1, i1 - (jint)1, plane, 0));
  (package_World__loadSection__IIII(
   This, l, i1 - (jint)1, plane, (jint)1));
  (package_World__loadSection__IIII(
   This, l - (jint)1, i1, plane, (jint)2));
  (package_World__loadSection__IIII(
   This, l, i1, plane, (jint)3));
  (package_World__setTiles__(
   This));
  if (JCGO_FIELD_NZACCESS(This, parentModel) == jnull)
  {
   JCGO_FIELD_NZACCESS(This, parentModel)= (package_GameModel__new__IIZZZZZ(
    (jint)18688, (jint)18688, (jboolean)jtrue, (jboolean)jtrue, (jboolean)jfalse,
    (jboolean)jfalse, (jboolean)jtrue));
  }
  if (flag)
  {
   package_GameModel gameModel;
   jObject jcgo_rcvrL1;
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__blackScreen__(
    (package_Surface)jcgo_rcvrL1));
   {
    jint j1;
    j1= 0;
    for (; j1 < (jint)96; j1++)
    {
     {
      jint l1;
      l1= 0;
      for (; l1 < (jint)96; l1++)
      {
       JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        objectAdjacency), j1)), l1)= 0;
      }
     }
    }
   }
   gameModel= JCGO_FIELD_NZACCESS(This, parentModel);
   (JCGO_CALL_FINALF(gameModel) package_GameModel__clear__(
    gameModel));
   {
    jint j2;
    j2= 0;
    for (; j2 < (jint)96; j2++)
    {
     {
      jint i3;
      i3= 0;
      for (; i3 < (jint)96; i3++)
      {
       jint i4;
       jint j5;
       jint j7;
       jObject jcgo_rcvrL1;
       i4= (-(package_World__getTerrainHeight__II(
        This, j2, i3)));
       if ((package_World__getTileDecoration__III(
        This, j2, i3, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
        (package_World__getTileDecoration__III(
        This, j2, i3, plane)) - (jint)1)) == (jint)4)
       {
        i4= 0;
       }
       if ((package_World__getTileDecoration__III(
        This, j2 - (jint)1, i3, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
        (package_World__getTileDecoration__III(
        This, j2 - (jint)1, i3, plane)) - (jint)1)) == (jint)4)
       {
        i4= 0;
       }
       if ((package_World__getTileDecoration__III(
        This, j2, i3 - (jint)1, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
        (package_World__getTileDecoration__III(
        This, j2, i3 - (jint)1, plane)) - (jint)1)) == (jint)4)
       {
        i4= 0;
       }
       if ((package_World__getTileDecoration__III(
        This, j2 - (jint)1, i3 - (jint)1, plane)) > 0 && (jcgo_rcvrL1=
        (jObject)JCGO_CLINIT_VARACC(package_GameData__class, package_GameData__tileType),
        JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1, (package_World__getTileDecoration__III(
        This, j2 - (jint)1, i3 - (jint)1, plane)) - (jint)1)) == (jint)4)
       {
        i4= 0;
       }
       j5= (package_GameModel__vertexAt__III(
        gameModel, j2 * (jint)128, i4, i3 * (jint)128));
       j7= JCGO_JDOUBLE_TOJINT(((java_lang_Math__random__()) * (jdouble)10.0)) -
        (jint)5;
       (package_GameModel__setVertexAmbience__II(
        gameModel, j5, j7));
      }
     }
    }
   }
   {
    jint lx;
    lx= 0;
    for (; lx < (jint)95; lx++)
    {
     {
      jint ly;
      ly= 0;
      for (; ly < (jint)95; ly++)
      {
       jint colourindex;
       jint colour;
       jint colour_1;
       jint colour_2;
       jint l14;
       jint i17;
       jint jcgo_rcvrI1;
       colourindex= (package_World__getTerrainColour__II(
        This, lx, ly));
       colour= JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, terrainColours),
        colourindex);
       colour_1= colour;
       colour_2= colour;
       l14= 0;
       if (plane == (jint)1 || plane == (jint)2)
       {
        colour= package_World__colourTransparent;
        colour_1= package_World__colourTransparent;
        colour_2= package_World__colourTransparent;
       }
       if ((package_World__getTileDecoration__III(
        This, lx, ly, plane)) > 0)
       {
        jint decoration_type;
        jint decoration_tile_type;
        jint tile_type;
        decoration_type= (package_World__getTileDecoration__III(
         This, lx, ly, plane));
        decoration_tile_type= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
         package_GameData__tileType), decoration_type - (jint)1);
        tile_type= (package_World__getTileType__III(
         This, lx, ly, plane));
        colour= colour_1= JCGO_ARRAY_IACCESS(package_GameData__tileDecoration,
         decoration_type - (jint)1);
        if (decoration_tile_type == (jint)4)
        {
         colour= (jint)1;
         colour_1= (jint)1;
         if (decoration_type == (jint)12)
         {
          colour= (jint)31;
          colour_1= (jint)31;
         }
        }
        if (decoration_tile_type == (jint)5)
        {
         if ((package_World__getWallDiagonal__II(
          This, lx, ly)) > 0 && (package_World__getWallDiagonal__II(
          This, lx, ly)) < (jint)24000)
         {
          if ((package_World__getTileDecoration__IIII(
           This, lx - (jint)1, ly, plane, colour_2)) != package_World__colourTransparent &&
           (package_World__getTileDecoration__IIII(
           This, lx, ly - (jint)1, plane, colour_2)) != package_World__colourTransparent)
          {
           colour= (package_World__getTileDecoration__IIII(
            This, lx - (jint)1, ly, plane, colour_2));
           l14= 0;
          }
          else
          {
           if ((package_World__getTileDecoration__IIII(
            This, lx + (jint)1, ly, plane, colour_2)) != package_World__colourTransparent &&
            (package_World__getTileDecoration__IIII(
            This, lx, ly + (jint)1, plane, colour_2)) != package_World__colourTransparent)
           {
            colour_1= (package_World__getTileDecoration__IIII(
             This, lx + (jint)1, ly, plane, colour_2));
            l14= 0;
           }
           else
           {
            if ((package_World__getTileDecoration__IIII(
             This, lx + (jint)1, ly, plane, colour_2)) != package_World__colourTransparent &&
             (package_World__getTileDecoration__IIII(
             This, lx, ly - (jint)1, plane, colour_2)) != package_World__colourTransparent)
            {
             colour_1= (package_World__getTileDecoration__IIII(
              This, lx + (jint)1, ly, plane, colour_2));
             l14= (jint)1;
            }
            else
            {
             if ((package_World__getTileDecoration__IIII(
              This, lx - (jint)1, ly, plane, colour_2)) != package_World__colourTransparent &&
              (package_World__getTileDecoration__IIII(
              This, lx, ly + (jint)1, plane, colour_2)) != package_World__colourTransparent)
             {
              colour= (package_World__getTileDecoration__IIII(
               This, lx - (jint)1, ly, plane, colour_2));
              l14= (jint)1;
             }
            }
           }
          }
         }
        }
        else
        {
         if (decoration_tile_type != (jint)2 || ((package_World__getWallDiagonal__II(
          This, lx, ly)) > 0 && (package_World__getWallDiagonal__II(
          This, lx, ly)) < (jint)24000))
         {
          if ((package_World__getTileType__III(
           This, lx - (jint)1, ly, plane)) != tile_type && (package_World__getTileType__III(
           This, lx, ly - (jint)1, plane)) != tile_type)
          {
           colour= colour_2;
           l14= 0;
          }
          else
          {
           if ((package_World__getTileType__III(
            This, lx + (jint)1, ly, plane)) != tile_type && (package_World__getTileType__III(
            This, lx, ly + (jint)1, plane)) != tile_type)
           {
            colour_1= colour_2;
            l14= 0;
           }
           else
           {
            if ((package_World__getTileType__III(
             This, lx + (jint)1, ly, plane)) != tile_type && (package_World__getTileType__III(
             This, lx, ly - (jint)1, plane)) != tile_type)
            {
             colour_1= colour_2;
             l14= (jint)1;
            }
            else
            {
             if ((package_World__getTileType__III(
              This, lx - (jint)1, ly, plane)) != tile_type && (package_World__getTileType__III(
              This, lx, ly + (jint)1, plane)) != tile_type)
             {
              colour= colour_2;
              l14= (jint)1;
             }
            }
           }
          }
         }
        }
        if (JCGO_ARRAY_IACCESS(package_GameData__tileAdjacent, decoration_type -
         (jint)1) != 0)
        {
         JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          objectAdjacency), lx)), ly)|= (jint)64;
        }
        if (JCGO_ARRAY_IACCESS(package_GameData__tileType, decoration_type -
         (jint)1) == (jint)2)
        {
         JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          objectAdjacency), lx)), ly)|= (jint)128;
        }
       }
       (package_World__method402__IIIII(
        This, lx, ly, l14, colour, colour_1));
       i17= (jcgo_rcvrI1= (jcgo_rcvrI1= (jcgo_rcvrI1= (package_World__getTerrainHeight__II(
        This, lx + (jint)1, ly + (jint)1)), jcgo_rcvrI1 - (package_World__getTerrainHeight__II(
        This, lx + (jint)1, ly))), jcgo_rcvrI1 + (package_World__getTerrainHeight__II(
        This, lx, ly + (jint)1))), jcgo_rcvrI1 - (package_World__getTerrainHeight__II(
        This, lx, ly)));
       if (colour != colour_1 || i17 != 0)
       {
        jintArr ai;
        jintArr ai7;
        ai= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint), 0,
         (jint)3);
        ai7= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
         0, (jint)3);
        if (l14 == 0)
        {
         if (colour != package_World__colourTransparent)
         {
          jint l21;
          JCGO_ARRAY_NZIACCESS(ai, 0)= (ly + lx * (jint)96 + (jint)96);
          JCGO_ARRAY_NZIACCESS(ai, (jint)1)= (ly + lx * (jint)96);
          JCGO_ARRAY_NZIACCESS(ai, (jint)2)= (ly + lx * (jint)96 +
           (jint)1);
          l21= (package_GameModel__createFace__IIAII(
           gameModel, ai, (jint)3, package_World__colourTransparent,
           colour));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), l21)=
           lx;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), l21)=
           ly;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           l21)= (l21 + (jint)200000L);
         }
         if (colour_1 != package_World__colourTransparent)
         {
          jint i22;
          JCGO_ARRAY_NZIACCESS(ai7, 0)= (ly + lx * (jint)96 + (jint)1);
          JCGO_ARRAY_NZIACCESS(ai7, (jint)1)= (ly + lx * (jint)96 +
           (jint)96 + (jint)1);
          JCGO_ARRAY_NZIACCESS(ai7, (jint)2)= (ly + lx * (jint)96 +
           (jint)96);
          i22= (package_GameModel__createFace__IIAII(
           gameModel, ai7, (jint)3, package_World__colourTransparent,
           colour_1));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), i22)=
           lx;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), i22)=
           ly;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           i22)= (i22 + (jint)200000L);
         }
        }
        else
        {
         if (colour != package_World__colourTransparent)
         {
          jint j22;
          JCGO_ARRAY_NZIACCESS(ai, 0)= (ly + lx * (jint)96 + (jint)1);
          JCGO_ARRAY_NZIACCESS(ai, (jint)1)= (ly + lx * (jint)96 +
           (jint)96 + (jint)1);
          JCGO_ARRAY_NZIACCESS(ai, (jint)2)= (ly + lx * (jint)96);
          j22= (package_GameModel__createFace__IIAII(
           gameModel, ai, (jint)3, package_World__colourTransparent,
           colour));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), j22)=
           lx;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), j22)=
           ly;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           j22)= (j22 + (jint)200000L);
         }
         if (colour_1 != package_World__colourTransparent)
         {
          jint k22;
          JCGO_ARRAY_NZIACCESS(ai7, 0)= (ly + lx * (jint)96 + (jint)96);
          JCGO_ARRAY_NZIACCESS(ai7, (jint)1)= (ly + lx * (jint)96);
          JCGO_ARRAY_NZIACCESS(ai7, (jint)2)= (ly + lx * (jint)96 +
           (jint)96 + (jint)1);
          k22= (package_GameModel__createFace__IIAII(
           gameModel, ai7, (jint)3, package_World__colourTransparent,
           colour_1));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), k22)=
           lx;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), k22)=
           ly;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           k22)= (k22 + (jint)200000L);
         }
        }
       }
       else
       {
        if (colour != package_World__colourTransparent)
        {
         jintArr ai1;
         jint l19;
         ai1= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
          0, (jint)4);
         JCGO_ARRAY_NZIACCESS(ai1, 0)= (ly + lx * (jint)96 + (jint)96);
         JCGO_ARRAY_NZIACCESS(ai1, (jint)1)= (ly + lx * (jint)96);
         JCGO_ARRAY_NZIACCESS(ai1, (jint)2)= (ly + lx * (jint)96 +
          (jint)1);
         JCGO_ARRAY_NZIACCESS(ai1, (jint)3)= (ly + lx * (jint)96 +
          (jint)96 + (jint)1);
         l19= (package_GameModel__createFace__IIAII(
          gameModel, ai1, (jint)4, package_World__colourTransparent,
          colour));
         JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), l19)=
          lx;
         JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), l19)=
          ly;
         JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
          l19)= (l19 + (jint)200000L);
        }
       }
      }
     }
    }
   }
   {
    jint k4;
    k4= (jint)1;
    for (; k4 < (jint)95; k4++)
    {
     {
      jint i6;
      i6= (jint)1;
      for (; i6 < (jint)95; i6++)
      {
       jObject jcgo_rcvrL1;
       if ((package_World__getTileDecoration__III(
        This, k4, i6, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
        (package_World__getTileDecoration__III(
        This, k4, i6, plane)) - (jint)1)) == (jint)4)
       {
        jintArr ai2;
        jint l7;
        jint j10;
        jint l12;
        jint i15;
        jint j17;
        jint i20;
        jObject jcgo_rcvrL1;
        l7= (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
         package_GameData__tileDecoration), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
         (package_World__getTileDecoration__III(
         This, k4, i6, plane)) - (jint)1));
        j10= (package_GameModel__vertexAt__III(
         gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
         This, k4, i6))), i6 * (jint)128));
        l12= (package_GameModel__vertexAt__III(
         gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
         This, k4 + (jint)1, i6))), i6 * (jint)128));
        i15= (package_GameModel__vertexAt__III(
         gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
         This, k4 + (jint)1, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
        j17= (package_GameModel__vertexAt__III(
         gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
         This, k4, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
        ai2= (jcgo_rcvrL1= jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
         0, 4),
         JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 0)= j10,
         JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 1)= l12,
         JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 2)= i15,
         JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 3)= j17,
         (jintArr)jcgo_rcvrL1);
        i20= (package_GameModel__createFace__IIAII(
         gameModel, ai2, (jint)4, l7, package_World__colourTransparent));
        JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), i20)=
         k4;
        JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), i20)=
         i6;
        JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
         i20)= (i20 + (jint)200000L);
        (package_World__method402__IIIII(
         This, k4, i6, 0, l7, l7));
       }
       else
       {
        jObject jcgo_rcvrL1;
        if ((package_World__getTileDecoration__III(
         This, k4, i6, plane)) == 0 || (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
         package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
         (package_World__getTileDecoration__III(
         This, k4, i6, plane)) - (jint)1)) != (jint)3)
        {
         jObject jcgo_rcvrL1;
         if ((package_World__getTileDecoration__III(
          This, k4, i6 + (jint)1, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
          package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
          (package_World__getTileDecoration__III(
          This, k4, i6 + (jint)1, plane)) - (jint)1)) == (jint)4)
         {
          jintArr ai3;
          jint i8;
          jint k10;
          jint i13;
          jint j15;
          jint k17;
          jint j20;
          jObject jcgo_rcvrL1;
          i8= (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
           package_GameData__tileDecoration), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
           (package_World__getTileDecoration__III(
           This, k4, i6 + (jint)1, plane)) - (jint)1));
          k10= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6))), i6 * (jint)128));
          i13= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6))), i6 * (jint)128));
          j15= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          k17= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          ai3= (jcgo_rcvrL1= jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
           0, 4),
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 0)= k10,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 1)= i13,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 2)= j15,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 3)= k17,
           (jintArr)jcgo_rcvrL1);
          j20= (package_GameModel__createFace__IIAII(
           gameModel, ai3, (jint)4, i8, package_World__colourTransparent));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), j20)=
           k4;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), j20)=
           i6;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           j20)= (j20 + (jint)200000L);
          (package_World__method402__IIIII(
           This, k4, i6, 0, i8, i8));
         }
         if ((package_World__getTileDecoration__III(
          This, k4, i6 - (jint)1, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
          package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
          (package_World__getTileDecoration__III(
          This, k4, i6 - (jint)1, plane)) - (jint)1)) == (jint)4)
         {
          jintArr ai4;
          jint j8;
          jint l10;
          jint j13;
          jint k15;
          jint l17;
          jint k20;
          jObject jcgo_rcvrL1;
          j8= (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
           package_GameData__tileDecoration), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
           (package_World__getTileDecoration__III(
           This, k4, i6 - (jint)1, plane)) - (jint)1));
          l10= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6))), i6 * (jint)128));
          j13= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6))), i6 * (jint)128));
          k15= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          l17= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          ai4= (jcgo_rcvrL1= jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
           0, 4),
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 0)= l10,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 1)= j13,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 2)= k15,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 3)= l17,
           (jintArr)jcgo_rcvrL1);
          k20= (package_GameModel__createFace__IIAII(
           gameModel, ai4, (jint)4, j8, package_World__colourTransparent));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), k20)=
           k4;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), k20)=
           i6;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           k20)= (k20 + (jint)200000L);
          (package_World__method402__IIIII(
           This, k4, i6, 0, j8, j8));
         }
         if ((package_World__getTileDecoration__III(
          This, k4 + (jint)1, i6, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
          package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
          (package_World__getTileDecoration__III(
          This, k4 + (jint)1, i6, plane)) - (jint)1)) == (jint)4)
         {
          jintArr ai5;
          jint k8;
          jint i11;
          jint k13;
          jint l15;
          jint i18;
          jint l20;
          jObject jcgo_rcvrL1;
          k8= (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
           package_GameData__tileDecoration), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
           (package_World__getTileDecoration__III(
           This, k4 + (jint)1, i6, plane)) - (jint)1));
          i11= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6))), i6 * (jint)128));
          k13= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6))), i6 * (jint)128));
          l15= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          i18= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          ai5= (jcgo_rcvrL1= jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
           0, 4),
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 0)= i11,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 1)= k13,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 2)= l15,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 3)= i18,
           (jintArr)jcgo_rcvrL1);
          l20= (package_GameModel__createFace__IIAII(
           gameModel, ai5, (jint)4, k8, package_World__colourTransparent));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), l20)=
           k4;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), l20)=
           i6;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           l20)= (l20 + (jint)200000L);
          (package_World__method402__IIIII(
           This, k4, i6, 0, k8, k8));
         }
         if ((package_World__getTileDecoration__III(
          This, k4 - (jint)1, i6, plane)) > 0 && (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
          package_GameData__tileType), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
          (package_World__getTileDecoration__III(
          This, k4 - (jint)1, i6, plane)) - (jint)1)) == (jint)4)
         {
          jintArr ai6;
          jint l8;
          jint j11;
          jint l13;
          jint i16;
          jint j18;
          jint i21;
          jObject jcgo_rcvrL1;
          l8= (jcgo_rcvrL1= (jObject)JCGO_CLINIT_VARACC(package_GameData__class,
           package_GameData__tileDecoration), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1,
           (package_World__getTileDecoration__III(
           This, k4 - (jint)1, i6, plane)) - (jint)1));
          j11= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6))), i6 * (jint)128));
          l13= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6))), i6 * (jint)128));
          i16= (package_GameModel__vertexAt__III(
           gameModel, (k4 + (jint)1) * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4 + (jint)1, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          j18= (package_GameModel__vertexAt__III(
           gameModel, k4 * (jint)128, (-(package_World__getTerrainHeight__II(
           This, k4, i6 + (jint)1))), (i6 + (jint)1) * (jint)128));
          ai6= (jcgo_rcvrL1= jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
           0, 4),
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 0)= j11,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 1)= l13,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 2)= i16,
           JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 3)= j18,
           (jintArr)jcgo_rcvrL1);
          i21= (package_GameModel__createFace__IIAII(
           gameModel, ai6, (jint)4, l8, package_World__colourTransparent));
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localX), i21)=
           k4;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(This, localY), i21)=
           i6;
          JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag),
           i21)= (i21 + (jint)200000L);
          (package_World__method402__IIIII(
           This, k4, i6, 0, l8, l8));
         }
        }
       }
      }
     }
    }
   }
   (package_GameModel__setLight__ZIIIII(
    gameModel, (jint)40, (jint)48, (-(jint)50), (-(jint)10), (-(jint)50),
    (jboolean)jtrue));
   JCGO_FIELD_NZACCESS(This, terrainModels)= (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This,
    parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1)
    package_GameModel__split__IIIIIIIZ(
    (package_GameModel)jcgo_rcvrL1, 0, 0, (jint)1536, (jint)1536, (jint)8,
    (jint)64, (jint)233, (jboolean)jfalse));
   {
    jint j6;
    j6= 0;
    for (; j6 < (jint)64; j6++)
    {
     jObject jcgo_rcvrL1;
     (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
      package_Scene__addModel__L98u34(
      (package_Scene)jcgo_rcvrL1, ((package_GameModel)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
      terrainModels), j6))));
    }
   }
   {
    jint X;
    X= 0;
    for (; X < (jint)96; X++)
    {
     {
      jint Y;
      Y= 0;
      for (; Y < (jint)96; Y++)
      {
       jObject jcgo_rcvrL1;
       jint jcgo_rcvrI1;
       jint jcgo_rcvrI2;
       (jcgo_rcvrL1= (jObject)((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), X)), jcgo_rcvrI1= Y, jcgo_rcvrI2= (package_World__getTerrainHeight__II(
        This, X, Y)), JCGO_ARRAY_IACCESS((jintArr)jcgo_rcvrL1, jcgo_rcvrI1)=
        jcgo_rcvrI2);
      }
     }
    }
   }
  }
  (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1)
   package_GameModel__clear__(
   (package_GameModel)jcgo_rcvrL1));
  k1= (jint)6316128L;
  {
   jint i2;
   i2= 0;
   for (; i2 < (jint)95; i2++)
   {
    {
     jint k2;
     k2= 0;
     for (; k2 < (jint)95; k2++)
     {
      jint k3;
      k3= (package_World__getWallEastwest__II(
       This, i2, k2));
      if (k3 > 0 && (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
       package_GameData__wallObjectInvisible), k3 - (jint)1) == 0 ||
       JCGO_FIELD_NZACCESS(This, aBoolean592)))
      {
       (package_World__method422__L98u34IIIII(
        This, JCGO_FIELD_NZACCESS(This, parentModel), k3 - (jint)1,
        i2, k2, i2 + (jint)1, k2));
       if (flag && JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__wallObjectAdjacent), k3 - (jint)1) != 0)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         objectAdjacency), i2)), k2)|= (jint)1;
        if (k2 > 0)
        {
         (package_World__setObjectAdjacency__III(
          This, i2, k2 - (jint)1, (jint)4));
        }
       }
       if (flag)
       {
        jObject jcgo_rcvrL1;
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__drawLineHoriz__IIII(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3, k2 * (jint)3,
         (jint)3, k1));
       }
      }
      k3= (package_World__getWallNorthsouth__II(
       This, i2, k2));
      if (k3 > 0 && (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
       package_GameData__wallObjectInvisible), k3 - (jint)1) == 0 ||
       JCGO_FIELD_NZACCESS(This, aBoolean592)))
      {
       (package_World__method422__L98u34IIIII(
        This, JCGO_FIELD_NZACCESS(This, parentModel), k3 - (jint)1,
        i2, k2, i2, k2 + (jint)1));
       if (flag && JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__wallObjectAdjacent), k3 - (jint)1) != 0)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         objectAdjacency), i2)), k2)|= (jint)2;
        if (i2 > 0)
        {
         (package_World__setObjectAdjacency__III(
          This, i2 - (jint)1, k2, (jint)8));
        }
       }
       if (flag)
       {
        jObject jcgo_rcvrL1;
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__drawLineVert__IIII(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3, k2 * (jint)3,
         (jint)3, k1));
       }
      }
      k3= (package_World__getWallDiagonal__II(
       This, i2, k2));
      if (k3 > 0 && k3 < (jint)12000 && (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
       package_GameData__wallObjectInvisible), k3 - (jint)1) == 0 ||
       JCGO_FIELD_NZACCESS(This, aBoolean592)))
      {
       (package_World__method422__L98u34IIIII(
        This, JCGO_FIELD_NZACCESS(This, parentModel), k3 - (jint)1,
        i2, k2, i2 + (jint)1, k2 + (jint)1));
       if (flag && JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__wallObjectAdjacent), k3 - (jint)1) != 0)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         objectAdjacency), i2)), k2)|= (jint)32;
       }
       if (flag)
       {
        jObject jcgo_rcvrL1;
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__setPixel__III(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3, k2 * (jint)3,
         k1));
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__setPixel__III(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3 + (jint)1, k2 *
         (jint)3 + (jint)1, k1));
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__setPixel__III(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3 + (jint)2, k2 *
         (jint)3 + (jint)2, k1));
       }
      }
      if (k3 > (jint)12000 && k3 < (jint)24000 && (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
       package_GameData__wallObjectInvisible), k3 - (jint)12001) ==
       0 || JCGO_FIELD_NZACCESS(This, aBoolean592)))
      {
       (package_World__method422__L98u34IIIII(
        This, JCGO_FIELD_NZACCESS(This, parentModel), k3 - (jint)12001,
        i2 + (jint)1, k2, i2, k2 + (jint)1));
       if (flag && JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__wallObjectAdjacent), k3 - (jint)12001) !=
        0)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         objectAdjacency), i2)), k2)|= (jint)16;
       }
       if (flag)
       {
        jObject jcgo_rcvrL1;
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__setPixel__III(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3 + (jint)2, k2 *
         (jint)3, k1));
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__setPixel__III(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3 + (jint)1, k2 *
         (jint)3 + (jint)1, k1));
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface),
         JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1) package_Surface__setPixel__III(
         (package_Surface)jcgo_rcvrL1, i2 * (jint)3, k2 * (jint)3 +
         (jint)2, k1));
       }
      }
     }
    }
   }
  }
  if (flag)
  {
   jObject jcgo_rcvrL1;
   (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, surface), JCGO_CALL_FINALF((package_Surface)jcgo_rcvrL1)
    package_Surface__drawSpriteMinimap__IIIII(
    (package_Surface)jcgo_rcvrL1, JCGO_FIELD_NZACCESS(This, baseMediaSprite) -
    (jint)1, 0, 0, (jint)285, (jint)285));
  }
  (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1)
   package_GameModel__setLight__ZIIIII(
   (package_GameModel)jcgo_rcvrL1, (jint)60, (jint)24, (-(jint)50),
   (-(jint)10), (-(jint)50), (jboolean)jfalse));
  (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, wallModels), jcgo_rcvrI1=
   plane, jcgo_rcvrL2= (jObject)(jcgo_rcvrL3= (jObject)JCGO_FIELD_NZACCESS(This,
   parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL3) package_GameModel__split__IIIIIIIZ(
   (package_GameModel)jcgo_rcvrL3, 0, 0, (jint)1536, (jint)1536, (jint)8,
   (jint)64, (jint)338, (jboolean)jtrue)), *(jObjectArr*)&JCGO_ARRAY_LACCESS((jObjectArr)jcgo_rcvrL1,
   jcgo_rcvrI1)= (jObjectArr)jcgo_rcvrL2);
  {
   jint l2;
   l2= 0;
   for (; l2 < (jint)64; l2++)
   {
    jObject jcgo_rcvrL1;
    (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
     package_Scene__addModel__L98u34(
     (package_Scene)jcgo_rcvrL1, ((package_GameModel)JCGO_ARRAY_LACCESS(((jObjectArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     wallModels), plane)), l2))));
   }
  }
  {
   jint l3;
   l3= 0;
   for (; l3 < (jint)95; l3++)
   {
    {
     jint l4;
     l4= 0;
     for (; l4 < (jint)95; l4++)
     {
      jint k6;
      k6= (package_World__getWallEastwest__II(
       This, l3, l4));
      if (k6 > 0)
      {
       (package_World__method428__IIIII(
        This, k6 - (jint)1, l3, l4, l3 + (jint)1, l4));
      }
      k6= (package_World__getWallNorthsouth__II(
       This, l3, l4));
      if (k6 > 0)
      {
       (package_World__method428__IIIII(
        This, k6 - (jint)1, l3, l4, l3, l4 + (jint)1));
      }
      k6= (package_World__getWallDiagonal__II(
       This, l3, l4));
      if (k6 > 0 && k6 < (jint)12000)
      {
       (package_World__method428__IIIII(
        This, k6 - (jint)1, l3, l4, l3 + (jint)1, l4 + (jint)1));
      }
      if (k6 > (jint)12000 && k6 < (jint)24000)
      {
       (package_World__method428__IIIII(
        This, k6 - (jint)12001, l3 + (jint)1, l4, l3, l4 + (jint)1));
      }
     }
    }
   }
  }
  {
   jint i5;
   i5= (jint)1;
   for (; i5 < (jint)95; i5++)
   {
    {
     jint l6;
     l6= (jint)1;
     for (; l6 < (jint)95; l6++)
     {
      jint j9;
      j9= (package_World__getWallRoof__II(
       This, i5, l6));
      if (j9 > 0)
      {
       jint l11;
       jint i14;
       jint j16;
       jint k18;
       jint j19;
       jint j21;
       jint l22;
       jint j23;
       jint l23;
       jint j24;
       jint l24;
       jint j25;
       jint l25;
       l11= i5;
       i14= l6;
       j16= i5 + (jint)1;
       k18= l6;
       j19= i5 + (jint)1;
       j21= l6 + (jint)1;
       l22= i5;
       j23= l6 + (jint)1;
       l23= 0;
       j24= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), l11)), i14);
       l24= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), j16)), k18);
       j25= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), j19)), j21);
       l25= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), l22)), j23);
       if (j24 > (jint)80000L)
       {
        j24-= (jint)80000L;
       }
       if (l24 > (jint)80000L)
       {
        l24-= (jint)80000L;
       }
       if (j25 > (jint)80000L)
       {
        j25-= (jint)80000L;
       }
       if (l25 > (jint)80000L)
       {
        l25-= (jint)80000L;
       }
       if (j24 > l23)
       {
        l23= j24;
       }
       if (l24 > l23)
       {
        l23= l24;
       }
       if (j25 > l23)
       {
        l23= j25;
       }
       if (l25 > l23)
       {
        l23= l25;
       }
       if (l23 >= (jint)80000L)
       {
        l23-= (jint)80000L;
       }
       if (j24 < (jint)80000L)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), l11)), i14)= l23;
       }
       else
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), l11)), i14)-= (jint)80000L;
       }
       if (l24 < (jint)80000L)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), j16)), k18)= l23;
       }
       else
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), j16)), k18)-= (jint)80000L;
       }
       if (j25 < (jint)80000L)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), j19)), j21)= l23;
       }
       else
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), j19)), j21)-= (jint)80000L;
       }
       if (l25 < (jint)80000L)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), l22)), j23)= l23;
       }
       else
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), l22)), j23)-= (jint)80000L;
       }
      }
     }
    }
   }
  }
  (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1)
   package_GameModel__clear__(
   (package_GameModel)jcgo_rcvrL1));
  {
   jint i7;
   i7= (jint)1;
   for (; i7 < (jint)95; i7++)
   {
    {
     jint k9;
     k9= (jint)1;
     for (; k9 < (jint)95; k9++)
     {
      jint roof_nvs;
      roof_nvs= (package_World__getWallRoof__II(
       This, i7, k9));
      if (roof_nvs > 0)
      {
       jint j14;
       jint k16;
       jint l18;
       jint k19;
       jint k21;
       jint i23;
       jint k23;
       jint i24;
       jint k24;
       jint i25;
       jint k25;
       jint i26;
       jint j26;
       jint k26;
       jint l26;
       jint i27;
       jint j27;
       jint k27;
       jint l27;
       jint i28;
       jint unknown;
       jbyte byte0;
       j14= i7;
       k16= k9;
       l18= i7 + (jint)1;
       k19= k9;
       k21= i7 + (jint)1;
       i23= k9 + (jint)1;
       k23= i7;
       i24= k9 + (jint)1;
       k24= i7 * (jint)128;
       i25= k9 * (jint)128;
       k25= k24 + (jint)128;
       i26= i25 + (jint)128;
       j26= k24;
       k26= i25;
       l26= k25;
       i27= i26;
       j27= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), j14)), k16);
       k27= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), l18)), k19);
       l27= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), k21)), i23);
       i28= JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), k23)), i24);
       unknown= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
        package_GameData__roofHeight), roof_nvs - (jint)1);
       if ((package_World__hasRoof__II(
        This, j14, k16)) && j27 < (jint)80000L)
       {
        j27+= unknown + (jint)80000L;
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), j14)), k16)= j27;
       }
       if ((package_World__hasRoof__II(
        This, l18, k19)) && k27 < (jint)80000L)
       {
        k27+= unknown + (jint)80000L;
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), l18)), k19)= k27;
       }
       if ((package_World__hasRoof__II(
        This, k21, i23)) && l27 < (jint)80000L)
       {
        l27+= unknown + (jint)80000L;
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), k21)), i23)= l27;
       }
       if ((package_World__hasRoof__II(
        This, k23, i24)) && i28 < (jint)80000L)
       {
        i28+= unknown + (jint)80000L;
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         terrainHeightLocal), k23)), i24)= i28;
       }
       if (j27 >= (jint)80000L)
       {
        j27-= (jint)80000L;
       }
       if (k27 >= (jint)80000L)
       {
        k27-= (jint)80000L;
       }
       if (l27 >= (jint)80000L)
       {
        l27-= (jint)80000L;
       }
       if (i28 >= (jint)80000L)
       {
        i28-= (jint)80000L;
       }
       byte0= (jbyte)(jint)16;
       if (!(package_World__method427__II(
        This, j14 - (jint)1, k16)))
       {
        k24-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, j14 + (jint)1, k16)))
       {
        k24+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, j14, k16 - (jint)1)))
       {
        i25-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, j14, k16 + (jint)1)))
       {
        i25+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, l18 - (jint)1, k19)))
       {
        k25-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, l18 + (jint)1, k19)))
       {
        k25+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, l18, k19 - (jint)1)))
       {
        k26-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, l18, k19 + (jint)1)))
       {
        k26+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k21 - (jint)1, i23)))
       {
        l26-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k21 + (jint)1, i23)))
       {
        l26+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k21, i23 - (jint)1)))
       {
        i26-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k21, i23 + (jint)1)))
       {
        i26+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k23 - (jint)1, i24)))
       {
        j26-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k23 + (jint)1, i24)))
       {
        j26+= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k23, i24 - (jint)1)))
       {
        i27-= (jint)byte0;
       }
       if (!(package_World__method427__II(
        This, k23, i24 + (jint)1)))
       {
        i27+= (jint)byte0;
       }
       roof_nvs= JCGO_ARRAY_IACCESS(package_GameData__roofNumVertices,
        roof_nvs - (jint)1);
       j27= (-j27);
       k27= (-k27);
       l27= (-l27);
       i28= (-i28);
       if ((package_World__getWallDiagonal__II(
        This, i7, k9)) > (jint)12000 && (package_World__getWallDiagonal__II(
        This, i7, k9)) < (jint)24000 && (package_World__getWallRoof__II(
        This, i7 - (jint)1, k9 - (jint)1)) == 0)
       {
        jintArr ai8;
        jObject jcgo_rcvrL1;
        jObject jcgo_rcvrL2;
        jint jcgo_rcvrI1;
        ai8= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
         0, (jint)3);
        (jcgo_rcvrL1= (jObject)ai8, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
         parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
         package_GameModel__vertexAt__III(
         (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
         0)= jcgo_rcvrI1);
        (jcgo_rcvrL1= (jObject)ai8, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
         parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
         package_GameModel__vertexAt__III(
         (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
         (jint)1)= jcgo_rcvrI1);
        (jcgo_rcvrL1= (jObject)ai8, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
         parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
         package_GameModel__vertexAt__III(
         (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
         (jint)2)= jcgo_rcvrI1);
        (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
         JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
         (package_GameModel)jcgo_rcvrL1, ai8, (jint)3, roof_nvs, package_World__colourTransparent));
       }
       else
       {
        if ((package_World__getWallDiagonal__II(
         This, i7, k9)) > (jint)12000 && (package_World__getWallDiagonal__II(
         This, i7, k9)) < (jint)24000 && (package_World__getWallRoof__II(
         This, i7 + (jint)1, k9 + (jint)1)) == 0)
        {
         jintArr ai9;
         jObject jcgo_rcvrL1;
         jObject jcgo_rcvrL2;
         jint jcgo_rcvrI1;
         ai9= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
          0, (jint)3);
         (jcgo_rcvrL1= (jObject)ai9, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
          parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
          package_GameModel__vertexAt__III(
          (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
          0)= jcgo_rcvrI1);
         (jcgo_rcvrL1= (jObject)ai9, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
          parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
          package_GameModel__vertexAt__III(
          (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
          (jint)1)= jcgo_rcvrI1);
         (jcgo_rcvrL1= (jObject)ai9, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
          parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
          package_GameModel__vertexAt__III(
          (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
          (jint)2)= jcgo_rcvrI1);
         (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
          JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
          (package_GameModel)jcgo_rcvrL1, ai9, (jint)3, roof_nvs, package_World__colourTransparent));
        }
        else
        {
         if ((package_World__getWallDiagonal__II(
          This, i7, k9)) > 0 && (package_World__getWallDiagonal__II(
          This, i7, k9)) < (jint)12000 && (package_World__getWallRoof__II(
          This, i7 + (jint)1, k9 - (jint)1)) == 0)
         {
          jintArr ai10;
          jObject jcgo_rcvrL1;
          jObject jcgo_rcvrL2;
          jint jcgo_rcvrI1;
          ai10= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
           0, (jint)3);
          (jcgo_rcvrL1= (jObject)ai10, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
           parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
           package_GameModel__vertexAt__III(
           (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
           0)= jcgo_rcvrI1);
          (jcgo_rcvrL1= (jObject)ai10, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
           parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
           package_GameModel__vertexAt__III(
           (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
           (jint)1)= jcgo_rcvrI1);
          (jcgo_rcvrL1= (jObject)ai10, jcgo_rcvrI1= (jcgo_rcvrL2= (jObject)JCGO_FIELD_NZACCESS(This,
           parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
           package_GameModel__vertexAt__III(
           (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
           (jint)2)= jcgo_rcvrI1);
          (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
           JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
           (package_GameModel)jcgo_rcvrL1, ai10, (jint)3, roof_nvs,
           package_World__colourTransparent));
         }
         else
         {
          if ((package_World__getWallDiagonal__II(
           This, i7, k9)) > 0 && (package_World__getWallDiagonal__II(
           This, i7, k9)) < (jint)12000 && (package_World__getWallRoof__II(
           This, i7 - (jint)1, k9 + (jint)1)) == 0)
          {
           jintArr ai11;
           jObject jcgo_rcvrL1;
           jObject jcgo_rcvrL2;
           jint jcgo_rcvrI1;
           ai11= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
            0, (jint)3);
           (jcgo_rcvrL1= (jObject)ai11, jcgo_rcvrI1= (jcgo_rcvrL2=
            (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
            package_GameModel__vertexAt__III(
            (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
            0)= jcgo_rcvrI1);
           (jcgo_rcvrL1= (jObject)ai11, jcgo_rcvrI1= (jcgo_rcvrL2=
            (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
            package_GameModel__vertexAt__III(
            (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
            (jint)1)= jcgo_rcvrI1);
           (jcgo_rcvrL1= (jObject)ai11, jcgo_rcvrI1= (jcgo_rcvrL2=
            (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
            package_GameModel__vertexAt__III(
            (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
            (jint)2)= jcgo_rcvrI1);
           (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
            JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
            (package_GameModel)jcgo_rcvrL1, ai11, (jint)3, roof_nvs,
            package_World__colourTransparent));
          }
          else
          {
           if (j27 == k27 && l27 == i28)
           {
            jintArr ai12;
            jObject jcgo_rcvrL1;
            jObject jcgo_rcvrL2;
            jint jcgo_rcvrI1;
            ai12= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
             0, (jint)4);
            (jcgo_rcvrL1= (jObject)ai12, jcgo_rcvrI1= (jcgo_rcvrL2=
             (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
             package_GameModel__vertexAt__III(
             (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
             0)= jcgo_rcvrI1);
            (jcgo_rcvrL1= (jObject)ai12, jcgo_rcvrI1= (jcgo_rcvrL2=
             (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
             package_GameModel__vertexAt__III(
             (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
             (jint)1)= jcgo_rcvrI1);
            (jcgo_rcvrL1= (jObject)ai12, jcgo_rcvrI1= (jcgo_rcvrL2=
             (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
             package_GameModel__vertexAt__III(
             (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
             (jint)2)= jcgo_rcvrI1);
            (jcgo_rcvrL1= (jObject)ai12, jcgo_rcvrI1= (jcgo_rcvrL2=
             (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
             package_GameModel__vertexAt__III(
             (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
             (jint)3)= jcgo_rcvrI1);
            (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
             JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
             (package_GameModel)jcgo_rcvrL1, ai12, (jint)4, roof_nvs,
             package_World__colourTransparent));
           }
           else
           {
            if (j27 == i28 && k27 == l27)
            {
             jintArr ai13;
             jObject jcgo_rcvrL1;
             jObject jcgo_rcvrL2;
             jint jcgo_rcvrI1;
             ai13= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
              0, (jint)4);
             (jcgo_rcvrL1= (jObject)ai13, jcgo_rcvrI1= (jcgo_rcvrL2=
              (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
              package_GameModel__vertexAt__III(
              (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
              0)= jcgo_rcvrI1);
             (jcgo_rcvrL1= (jObject)ai13, jcgo_rcvrI1= (jcgo_rcvrL2=
              (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
              package_GameModel__vertexAt__III(
              (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
              (jint)1)= jcgo_rcvrI1);
             (jcgo_rcvrL1= (jObject)ai13, jcgo_rcvrI1= (jcgo_rcvrL2=
              (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
              package_GameModel__vertexAt__III(
              (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
              (jint)2)= jcgo_rcvrI1);
             (jcgo_rcvrL1= (jObject)ai13, jcgo_rcvrI1= (jcgo_rcvrL2=
              (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
              package_GameModel__vertexAt__III(
              (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
              (jint)3)= jcgo_rcvrI1);
             (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
              JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
              (package_GameModel)jcgo_rcvrL1, ai13, (jint)4, roof_nvs,
              package_World__colourTransparent));
            }
            else
            {
             jboolean flag1;
             flag1= jtrue;
             if ((package_World__getWallRoof__II(
              This, i7 - (jint)1, k9 - (jint)1)) > 0)
             {
              flag1= (jboolean)jfalse;
             }
             if ((package_World__getWallRoof__II(
              This, i7 + (jint)1, k9 + (jint)1)) > 0)
             {
              flag1= (jboolean)jfalse;
             }
             if (!flag1)
             {
              jintArr ai14;
              jintArr ai16;
              jObject jcgo_rcvrL1;
              jObject jcgo_rcvrL2;
              jint jcgo_rcvrI1;
              ai14= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
               0, (jint)3);
              (jcgo_rcvrL1= (jObject)ai14, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               0)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai14, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)1)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai14, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)2)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
               JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
               (package_GameModel)jcgo_rcvrL1, ai14, (jint)3, roof_nvs,
               package_World__colourTransparent));
              ai16= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
               0, (jint)3);
              (jcgo_rcvrL1= (jObject)ai16, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               0)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai16, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)1)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai16, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)2)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
               JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
               (package_GameModel)jcgo_rcvrL1, ai16, (jint)3, roof_nvs,
               package_World__colourTransparent));
             }
             else
             {
              jintArr ai15;
              jintArr ai17;
              jObject jcgo_rcvrL1;
              jObject jcgo_rcvrL2;
              jint jcgo_rcvrI1;
              ai15= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
               0, (jint)3);
              (jcgo_rcvrL1= (jObject)ai15, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, k24, j27, i25)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               0)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai15, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)1)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai15, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)2)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
               JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
               (package_GameModel)jcgo_rcvrL1, ai15, (jint)3, roof_nvs,
               package_World__colourTransparent));
              ai17= (jintArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint),
               0, (jint)3);
              (jcgo_rcvrL1= (jObject)ai17, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, l26, l27, i26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               0)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai17, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, j26, i28, i27)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)1)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)ai17, jcgo_rcvrI1= (jcgo_rcvrL2=
               (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL2)
               package_GameModel__vertexAt__III(
               (package_GameModel)jcgo_rcvrL2, k25, k27, k26)), JCGO_ARRAY_NZIACCESS((jintArr)jcgo_rcvrL1,
               (jint)2)= jcgo_rcvrI1);
              (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel),
               JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__createFace__IIAII(
               (package_GameModel)jcgo_rcvrL1, ai17, (jint)3, roof_nvs,
               package_World__colourTransparent));
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
  (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1)
   package_GameModel__setLight__ZIIIII(
   (package_GameModel)jcgo_rcvrL1, (jint)50, (jint)50, (-(jint)50),
   (-(jint)10), (-(jint)50), (jboolean)jtrue));
  (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, roofModels), jcgo_rcvrI1=
   plane, jcgo_rcvrL2= (jObject)(jcgo_rcvrL3= (jObject)JCGO_FIELD_NZACCESS(This,
   parentModel), JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL3) package_GameModel__split__IIIIIIIZ(
   (package_GameModel)jcgo_rcvrL3, 0, 0, (jint)1536, (jint)1536, (jint)8,
   (jint)64, (jint)169, (jboolean)jtrue)), *(jObjectArr*)&JCGO_ARRAY_LACCESS((jObjectArr)jcgo_rcvrL1,
   jcgo_rcvrI1)= (jObjectArr)jcgo_rcvrL2);
  {
   jint l9;
   l9= 0;
   for (; l9 < (jint)64; l9++)
   {
    jObject jcgo_rcvrL1;
    (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
     package_Scene__addModel__L98u34(
     (package_Scene)jcgo_rcvrL1, ((package_GameModel)JCGO_ARRAY_LACCESS(((jObjectArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
     roofModels), plane)), l9))));
   }
  }
  if (((package_GameModel)JCGO_ARRAY_LACCESS(((jObjectArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   roofModels), plane)), 0)) == jnull)
  {
   JCGO_THROW_EXC((java_lang_RuntimeException__new__Ls(
    JCGO_STRREF_OF(jcgo_string7_World))));
  }
  {
   jint j12;
   j12= 0;
   for (; j12 < (jint)96; j12++)
   {
    {
     jint k14;
     k14= 0;
     for (; k14 < (jint)96; k14++)
     {
      if (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
       terrainHeightLocal), j12)), k14) >= (jint)80000L)
      {
       JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
        terrainHeightLocal), j12)), k14)-= (jint)80000L;
      }
     }
    }
   }
  }
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getTileType__III( package_World This, jint i, jint
 j, jint k )
{
 {
  jint l;
  jint i1;
  l= (package_World__getTileDecoration__III(
   This, i, j, k));
  if (l == 0)
  {
   return (-(jint)1);
  }
  i1= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__tileType), l - (jint)1);
  return i1 != (jint)2? 0 : (jint)1;
 }
}

JCGO_NOSEP_FRWINL void CFASTCALL
package_World__addModels__L98u34A( package_World This, jObjectArr
 aclass5 )
{
 {
  {
   jint i;
   i= 0;
   for (; i < (jint)94; i++)
   {
    {
     jint j;
     j= 0;
     for (; j < (jint)94; j++)
     {
      if ((package_World__getWallDiagonal__II(
       This, i, j)) > (jint)48000L && (package_World__getWallDiagonal__II(
       This, i, j)) < (jint)60000L)
      {
       package_GameModel gameModel;
       jint k;
       jint l;
       jint i1;
       jint j1;
       jint k1;
       jint i2;
       jObject jcgo_rcvrL1;
       k= (package_World__getWallDiagonal__II(
        This, i, j)) - (jint)48001L;
       l= (package_World__getTileDirection__II(
        This, i, j));
       if (l == 0 || l == (jint)4)
       {
        i1= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
         package_GameData__objectWidth), k);
        j1= JCGO_ARRAY_IACCESS(package_GameData__objectHeight, k);
       }
       else
       {
        j1= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
         package_GameData__objectWidth), k);
        i1= JCGO_ARRAY_IACCESS(package_GameData__objectHeight, k);
       }
       (package_World__removeObject2__III(
        This, i, j, k));
       gameModel= (jcgo_rcvrL1= (jObject)((package_GameModel)JCGO_ARRAY_LACCESS(aclass5,
        JCGO_ARRAY_IACCESS(package_GameData__objectModelIndex, k))),
        JCGO_CALL_FINALF((package_GameModel)jcgo_rcvrL1) package_GameModel__copy__ZZZZ(
        (package_GameModel)jcgo_rcvrL1, (jboolean)jfalse, (jboolean)jtrue,
        (jboolean)jfalse, (jboolean)jfalse));
       k1= ((i + i + i1) * (jint)128) / (jint)2;
       i2= ((j + j + j1) * (jint)128) / (jint)2;
       (JCGO_CALL_FINALF(gameModel) package_GameModel__translate__III(
        gameModel, k1, (-(package_World__getElevation__II(
        This, k1, i2))), i2));
       (package_GameModel__orient__III(
        gameModel, 0, (package_World__getTileDirection__II(
        This, i, j)) * (jint)32, 0));
       (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, scene), JCGO_CALL_FINALF((package_Scene)jcgo_rcvrL1)
        package_Scene__addModel__L98u34(
        (package_Scene)jcgo_rcvrL1, gameModel));
       (package_GameModel__setLight__IIIII(
        gameModel, (jint)48, (jint)48, (-(jint)50), (-(jint)10), (-(jint)50)));
       if (i1 > (jint)1 || j1 > (jint)1)
       {
        {
         jint k2;
         k2= i;
         for (; k2 < i + i1; k2++)
         {
          {
           jint l2;
           l2= j;
           for (; l2 < j + j1; l2++)
           {
            if ((k2 > i || l2 > j) && (package_World__getWallDiagonal__II(
             This, k2, l2)) - (jint)48001L == k)
            {
             jint l1;
             jint j2;
             jbyte byte0;
             l1= k2;
             j2= l2;
             byte0= (jbyte)0;
             if (l1 >= (jint)48 && j2 < (jint)48)
             {
              byte0= (jbyte)(jint)1;
              l1-= (jint)48;
             }
             else
             {
              if (l1 < (jint)48 && j2 >= (jint)48)
              {
               byte0= (jbyte)(jint)2;
               j2-= (jint)48;
              }
              else
              {
               if (l1 >= (jint)48 && j2 >= (jint)48)
               {
                byte0= (jbyte)(jint)3;
                l1-= (jint)48;
                j2-= (jint)48;
               }
              }
             }
             JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
              wallsDiagonal), byte0)), l1 * (jint)48 + j2)= 0;
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__method422__L98u34IIIII( package_World This, package_GameModel
 gameModel, jint i, jint j, jint k, jint l, jint i1 )
{
 {
  jintArr ai;
  jint h;
  jint front;
  jint back;
  jint i2;
  jint j2;
  jint k2;
  jint l2;
  jint i3;
  jint j3;
  jint k3;
  jint l3;
  jint i4;
  jObject jcgo_rcvrL1;
  (package_World__method425__III(
   This, j, k, (jint)40));
  (package_World__method425__III(
   This, l, i1, (jint)40));
  h= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__wallObjectHeight), i);
  front= JCGO_ARRAY_IACCESS(package_GameData__wallObjectTextureFront,
   i);
  back= JCGO_ARRAY_IACCESS(package_GameData__wallObjectTextureBack,
   i);
  i2= j * (jint)128;
  j2= k * (jint)128;
  k2= l * (jint)128;
  l2= i1 * (jint)128;
  i3= (JCGO_CALL_FINALF(gameModel) package_GameModel__vertexAt__III(
   gameModel, i2, (-(JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeightLocal), j)), k))), j2));
  j3= (package_GameModel__vertexAt__III(
   gameModel, i2, (-(JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeightLocal), j)), k))) - h, j2));
  k3= (package_GameModel__vertexAt__III(
   gameModel, k2, (-(JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeightLocal), l)), i1))) - h, l2));
  l3= (package_GameModel__vertexAt__III(
   gameModel, k2, (-(JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeightLocal), l)), i1))), l2));
  ai= (jcgo_rcvrL1= jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jint), 0,
   4),
   JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 0)= i3,
   JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 1)= j3,
   JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 2)= k3,
   JCGO_ARR_INTERNALACC(jint, (jintArr)jcgo_rcvrL1, 3)= l3,
   (jintArr)jcgo_rcvrL1);
  i4= (package_GameModel__createFace__IIAII(
   gameModel, ai, (jint)4, front, back));
  if (JCGO_ARRAY_IACCESS(package_GameData__wallObjectInvisible, i) ==
   (jint)5)
  {
   JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag), i4)=
    (i + (jint)30000L);
   return;
  }
  else
  {
   JCGO_ARRAY_IACCESS(JCGO_FIELD_NZACCESS(gameModel, faceTag), i4)=
    0;
   return;
  }
 }
}

JCGO_NOSEP_STATIC jint CFASTCALL
package_World__getTerrainHeight__II( package_World This, jint x, jint
 y )
{
 {
  jbyte d;
  if (x < 0 || x >= (jint)96 || y < 0 || y >= (jint)96)
  {
   return 0;
  }
  d= (jbyte)0;
  if (x >= (jint)48 && y < (jint)48)
  {
   d= (jbyte)(jint)1;
   x-= (jint)48;
  }
  else
  {
   if (x < (jint)48 && y >= (jint)48)
   {
    d= (jbyte)(jint)2;
    y-= (jint)48;
   }
   else
   {
    if (x >= (jint)48 && y >= (jint)48)
    {
     d= (jbyte)(jint)3;
     x-= (jint)48;
     y-= (jint)48;
    }
   }
  }
  return ((jint)((unsigned char)(JCGO_ARRAY_BACCESS(((jbyteArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeight), d)), x * (jint)48 + y)))) * (jint)3;
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__loadSection__III( package_World This, jint x, jint
 y, jint plane )
{
 {
  jint l;
  jint i1;
  (package_World__reset__(
   This));
  l= (x + (jint)24) / (jint)48;
  i1= (y + (jint)24) / (jint)48;
  (package_World__loadSection__IIIZ(
   This, x, y, plane, (jboolean)jtrue));
  if (plane == 0)
  {
   (package_World__loadSection__IIIZ(
    This, x, y, (jint)1, (jboolean)jfalse));
   (package_World__loadSection__IIIZ(
    This, x, y, (jint)2, (jboolean)jfalse));
   (package_World__loadSection__IIII(
    This, l - (jint)1, i1 - (jint)1, plane, 0));
   (package_World__loadSection__IIII(
    This, l, i1 - (jint)1, plane, (jint)1));
   (package_World__loadSection__IIII(
    This, l - (jint)1, i1, plane, (jint)2));
   (package_World__loadSection__IIII(
    This, l, i1, plane, (jint)3));
   (package_World__setTiles__(
    This));
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__method425__III( package_World This, jint i, jint j,
 jint k )
{
 {
  jint l;
  jint i1;
  jint j1;
  jint k1;
  l= i / (jint)12;
  i1= j / (jint)12;
  j1= (i - (jint)1) / (jint)12;
  k1= (j - (jint)1) / (jint)12;
  (package_World__setTerrainAmbience__IIIII(
   This, l, i1, i, j, k));
  if (l != j1)
  {
   (package_World__setTerrainAmbience__IIIII(
    This, j1, i1, i, j, k));
  }
  if (i1 != k1)
  {
   (package_World__setTerrainAmbience__IIIII(
    This, l, k1, i, j, k));
  }
  if (l != j1 && i1 != k1)
  {
   (package_World__setTerrainAmbience__IIIII(
    This, j1, k1, i, j, k));
  }
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__removeObject__III( package_World This, jint x, jint
 y, jint id )
{
 {
  if (x < 0 || y < 0 || x >= (jint)95 || y >= (jint)95)
  {
   return;
  }
  if (JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__objectType), id) == (jint)1 || JCGO_ARRAY_IACCESS(package_GameData__objectType,
   id) == (jint)2)
  {
   jint l;
   jint i1;
   jint j1;
   l= (package_World__getTileDirection__II(
    This, x, y));
   if (l == 0 || l == (jint)4)
   {
    i1= JCGO_ARRAY_IACCESS(package_GameData__objectWidth, id);
    j1= JCGO_ARRAY_IACCESS(package_GameData__objectHeight, id);
   }
   else
   {
    j1= JCGO_ARRAY_IACCESS(package_GameData__objectWidth, id);
    i1= JCGO_ARRAY_IACCESS(package_GameData__objectHeight, id);
   }
   {
    jint k1;
    k1= x;
    for (; k1 < x + i1; k1++)
    {
     {
      jint l1;
      l1= y;
      for (; l1 < y + j1; l1++)
      {
       if (JCGO_ARRAY_IACCESS(package_GameData__objectType, id) ==
        (jint)1)
       {
        JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
         objectAdjacency), k1)), l1)&= (jint)65471L;
       }
       else
       {
        if (l == 0)
        {
         JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
          objectAdjacency), k1)), l1)&= (jint)65533L;
         if (k1 > 0)
         {
          (package_World__method407__III(
           This, k1 - (jint)1, l1, (jint)8));
         }
        }
        else
        {
         if (l == (jint)2)
         {
          JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
           objectAdjacency), k1)), l1)&= (jint)65531L;
          if (l1 < (jint)95)
          {
           (package_World__method407__III(
            This, k1, l1 + (jint)1, (jint)1));
          }
         }
         else
         {
          if (l == (jint)4)
          {
           JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
            objectAdjacency), k1)), l1)&= (jint)65527L;
           if (k1 < (jint)95)
           {
            (package_World__method407__III(
             This, k1 + (jint)1, l1, (jint)2));
           }
          }
          else
          {
           if (l == (jint)6)
           {
            JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
             objectAdjacency), k1)), l1)&= (jint)65534L;
            if (l1 > 0)
            {
             (package_World__method407__III(
              This, k1, l1 - (jint)1, (jint)4));
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
   (package_World__method404__IIII(
    This, x, y, i1, j1));
  }
 }
}

JCGO_NOSEP_STATIC jboolean CFASTCALL
package_World__method427__II( package_World This, jint i, jint j )
{
 {
  return (jboolean)((package_World__getWallRoof__II(
   This, i, j)) > 0 || (package_World__getWallRoof__II(
   This, i - (jint)1, j)) > 0 || (package_World__getWallRoof__II(
   This, i - (jint)1, j - (jint)1)) > 0 || (package_World__getWallRoof__II(
   This, i, j - (jint)1)) > 0);
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
package_World__method428__IIIII( package_World This, jint i, jint
 j, jint k, jint l, jint i1 )
{
 {
  jint j1;
  j1= JCGO_ARRAY_IACCESS(JCGO_CLINIT_VARACC(package_GameData__class,
   package_GameData__wallObjectHeight), i);
  if (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeightLocal), j)), k) < (jint)80000L)
  {
   JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    terrainHeightLocal), j)), k)+= j1 + (jint)80000L;
  }
  if (JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
   terrainHeightLocal), l)), i1) < (jint)80000L)
  {
   JCGO_ARRAY_IACCESS(((jintArr)JCGO_ARRAY_LACCESS(JCGO_FIELD_NZACCESS(This,
    terrainHeightLocal), l)), i1)+= j1 + (jint)80000L;
  }
 }
}

JCGO_NOSEP_DATA CONST struct package_World_methods_s package_World_methods=
{
 JCGO_CLASSREF_OF(package_World__class),
 JCGO_GCJDESCR_INIT(package_World_s, memberMapPack)
 OBJT_package_World,
 (JCGO_OBJSIZE_T)sizeof(struct package_World_s),
 NULL,
 JCGO_CLINIT_INIT(0)
 0,
 java_lang_Object__equals__Lo,
 java_lang_Object__hashCode__,
 java_lang_Object__toString__,
 java_lang_Object__finalize__
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct package_World_class_s package_World__class
 JCGO_THRD_ATTRNONGC=
{
 {
  &java_lang_Class_methods,
  JCGO_MON_INIT
  JCGO_OBJREF_OF(*(java_lang_Object)&package_World_methods),
  JCGO_STRREF_OF(jcgo_string1_World),
  JCGO_CLASSREF_OF(java_lang_Object__class),
  ((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
  0x1
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype30_Object jcgo_array8_World=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 5,
 {
  (jbyte)(jchar)87/*'W'*/, (jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)114/*'r'*/,
   (jbyte)(jchar)108/*'l'*/, (jbyte)(jchar)100/*'d'*/
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype4_IntAddrs jcgo_array9_World=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 4,
 {
  (jbyte)(jchar)46/*'.'*/, (jbyte)(jchar)104/*'h'*/, (jbyte)(jchar)101/*'e'*/,
   (jbyte)(jchar)105/*'i'*/
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype4_IntAddrs jcgo_array10_World=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 4,
 {
  (jbyte)(jchar)46/*'.'*/, (jbyte)(jchar)108/*'l'*/, (jbyte)(jchar)111/*'o'*/,
   (jbyte)(jchar)99/*'c'*/
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype640_Mdclnt jcgo_array11_World=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 3,
 {
  (jbyte)(jchar)46/*'.'*/, (jbyte)(jchar)106/*'j'*/, (jbyte)(jchar)109/*'m'*/
 }
};

JCGO_NOSEP_DATA CONST jcgo_arrtype32_GameShll jcgo_array12_World=
{
 (jvtable)&jbyteArr_methods,
 JCGO_MON_INIT
 10,
 {
  (jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)117/*'u'*/, (jbyte)(jchar)108/*'l'*/,
   (jbyte)(jchar)108/*'l'*/, (jbyte)(jchar)32/*' '*/, (jbyte)(jchar)114/*'r'*/,
   (jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)102/*'f'*/,
   (jbyte)(jchar)33/*'!'*/
 }
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array8_World),
 0, 5, (jint)0x4fe2b72L
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string2_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array569_VMSstmPr),
 1, 1, (jint)0x6dL
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string3_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array9_World),
 0, 4, (jint)0x167c1eL
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string4_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array10_World),
 0, 4, (jint)0x168c52L
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string5_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array608_Mdclnt),
 0, 17, (jint)0xd9086374L
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string6_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array11_World),
 0, 3, (jint)0xb9f1L
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string7_World
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array12_World),
 0, 10, (jint)0x1c0af1f4L
};

#ifdef CHKALL_World
#include "jcgochke.h"
#endif

#endif
