Improve command system, add HELP command,

This commit is contained in:
Li 2022-11-26 22:57:46 +13:00
parent a2782fd35e
commit 9e69492e46
39 changed files with 1865 additions and 1620 deletions

View file

@ -12,7 +12,14 @@ namespace HISP.Game
public string Type;
}
public static int[] OverlayTileDepth;
public struct TileDepth
{
public bool ShowPlayer;
public bool Passable;
}
public static TileDepth[] OverlayTileDepth;
public static TerrainTile[] TerrainTiles;
public static int Width;
public static int Height;
@ -20,8 +27,6 @@ namespace HISP.Game
public static byte[] MapData;
public static byte[] oMapData;
public static TerrainTile[] TerrainTiles;
public static int NewUserStartX;
public static int NewUserStartY;
@ -75,19 +80,9 @@ namespace HISP.Game
if (World.InIsle(x, y))
tileset = World.GetIsle(x, y).Tileset;
otileId = otileId + 64 * tileset;
}
int tileDepth = OverlayTileDepth[otileId];
bool overlayPassable = false;
if (tileDepth == 0)
overlayPassable = false;
if (tileDepth == 1)
overlayPassable = false;
if (tileDepth == 2)
overlayPassable = true;
if (tileDepth == 3)
overlayPassable = true;
}
bool overlayPassable = OverlayTileDepth[otileId].Passable;
if ((!terrainPassable && overlayPassable) && otileId == 0)
return false;