public static int GetSymImageIndex(ushort tid) { int result; int @base = AuxUtils.GetShortLo(tid); int @var = AuxUtils.GetShortHi(tid); SymbolID sym = StaticData.dbPlaces[@base].Symbol; SymbolRec symRec = StaticData.dbSymbols[(int)sym]; result = symRec.ImageIndex; if (@var > 0) { if (@var <= symRec.SubCount) { result += @var; } } return(result); }
public static int GetTileImageIndex(ushort tid) { int result = -1; int @base = AuxUtils.GetShortLo(tid); int @var = AuxUtils.GetShortHi(tid); if (@base >= PlaceID.pid_First && @base <= PlaceID.pid_Last) { result = StaticData.dbPlaces[@base].ImageIndex; } if (@var > 0) { if (@var < 1 || @var > StaticData.dbPlaces[@base].SubsLoaded) { @var = 0; } result = result + @var; } return(result); }
public override Movements GetTileMovements(ushort tileID) { int pd = AuxUtils.GetShortLo(tileID); return(StaticData.dbPlaces[pd].Moves); }