public static void DrawSymTile(NWGameSpace space, NWField field, int px, int py, BaseScreen screen, ExtRect mapRect, ExtRect viewRect, ImageList symImages)
        {
            NWTile place = (NWTile)field.GetTile(px, py);
            int    sx    = viewRect.Left + 8 * (px + 1);
            int    sy    = viewRect.Top + 10 * (py + 1);

            if (place != null && !place.EmptyStates)
            {
                ushort bg = place.Background;
                ushort fg = place.Foreground;

                fg = PtTransDoor(place);
                short op = space.GetTileBrightness(field, place, true);
                symImages.DrawImage(screen, sx, sy, GetSymImageIndex(bg), op);

                int fog = place.FogID;
                if (fog != PlaceID.pid_Undefined)
                {
                    symImages.DrawImage(screen, sx, sy, GetSymImageIndex((ushort)PlaceID.pid_Fog), op);
                }
                else
                {
                    if (fg != PlaceID.pid_Undefined)
                    {
                        bool trap = field.IsTrap(px, py);
                        if (!trap || (trap && (place.Trap_Discovered || GlobalVars.Debug_Divinity)))
                        {
                            symImages.DrawImage(screen, sx, sy, GetSymImageIndex(fg), op);
                        }
                    }
                }

                if (!field.IsBarrier(px, py) && mapRect.IsBorder(px, py))
                {
                    symImages.DrawImage(screen, sx, sy, StaticData.dbSymbols[(int)GetBorderSymbol(px, py)].ImageIndex, op);
                }
            }
        }
        public static void DrawLocTile(NWGameSpace space, NWField field, int px, int py, BaseScreen screen, Player player, ExtRect mapRect, ExtRect viewRect, ImageList resImages)
        {
            NWTile place = (NWTile)field.GetTile(px, py);
            int    xx    = viewRect.Left + 32 * (px - mapRect.Left);
            int    yy    = viewRect.Top + 30 * (py - mapRect.Top);

            if (place != null && !place.EmptyStates)
            {
                int bg     = (int)place.Background;
                int fg     = (int)place.Foreground;
                int bgExt  = (int)place.BackgroundExt;
                int fgExt  = (int)place.ForegroundExt;
                int fog    = place.FogID;
                int fogExt = place.FogExtID;

                fg = PtTransDoor(place);
                short op = space.GetTileBrightness(field, place, false);
                resImages.DrawImage(screen, xx, yy, GetTileImageIndex((ushort)bg), op);
                if (bgExt != PlaceID.pid_Undefined)
                {
                    resImages.DrawImage(screen, xx, yy, GetTileImageIndex((ushort)bgExt), op);
                }
                if (fog != PlaceID.pid_Undefined)
                {
                    resImages.DrawImage(screen, xx, yy, GetTileImageIndex((ushort)fogExt), op);
                }
                else
                {
                    if (fg != PlaceID.pid_Undefined)
                    {
                        bool trap = field.IsTrap(px, py);
                        if (!trap || (trap && (place.Trap_Discovered || GlobalVars.Debug_Divinity)))
                        {
                            resImages.DrawImage(screen, xx, yy, GetTileImageIndex((ushort)fg), op);
                            if (fgExt != PlaceID.pid_Undefined)
                            {
                                resImages.DrawImage(screen, xx, yy, GetTileImageIndex((ushort)fgExt), op);
                            }
                        }
                    }
                    if (fogExt != PlaceID.pid_Undefined)
                    {
                        resImages.DrawImage(screen, xx, yy, GetTileImageIndex((ushort)fogExt), op);
                    }
                }

                SymbolID sid = GetBorderSymbol(px, py);
                if (sid != SymbolID.sid_None && player.CanMove(field, px, py))
                {
                    switch (sid)
                    {
                    case SymbolID.sid_Left:
                        resImages.DrawImage(screen, xx, yy, StaticData.dbItfElements[(int)ItfElement.id_Left].ImageIndex, op);
                        break;

                    case SymbolID.sid_Up:
                        resImages.DrawImage(screen, xx, yy, StaticData.dbItfElements[(int)ItfElement.id_Up].ImageIndex, op);
                        break;

                    case SymbolID.sid_Right:
                        resImages.DrawImage(screen, xx, yy, StaticData.dbItfElements[(int)ItfElement.id_Right].ImageIndex, op);
                        break;

                    case SymbolID.sid_Down:
                        resImages.DrawImage(screen, xx, yy, StaticData.dbItfElements[(int)ItfElement.id_Down].ImageIndex, op);
                        break;
                    }
                }
            }
        }