예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public override Movements GetTileMovements(ushort tileID)
        {
            int pd = AuxUtils.GetShortLo(tileID);

            return(StaticData.dbPlaces[pd].Moves);
        }