C# Класс TiledMapper.Map

The main class holding the map and handling editing
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Click ( int x, int y, TileMode mode ) : bool

Handler for the mouse clicking and painting a tile or wall.

ClickConvert ( ) : void

Handler for mode changing.

Compile ( string fileName, MapHeader header ) : void

Compile the map instance.

FullRedraw ( ) : void

Resize the drawing box associated with the map and invalidate the contents, forcing a full redraw.

GetTileCorridorHash ( Tile tile ) : int
GetTileHash ( Tile tile ) : int
LoadMap ( string fileName, System dbox, ValueSetterDelegate undo, ValueSetterDelegate redo, ValueSetterDelegate postMode ) : Map

Load a map instance from a file.

MouseToTile ( int h ) : int

Translation of mouse coordinates.

NewMap ( int width, int height, System dbox, ValueSetterDelegate undo, ValueSetterDelegate redo, ValueSetterDelegate postMode ) : Map

Create a new map instance and associate the form controls.

OneClick ( int x, int y, TileMode mode, bool left ) : void

Handler for a single click on a tile.

Redo ( ) : void

Handler for action redoing.

Redraw ( Graphics g ) : void

Redraw the map.

Resize ( int n, int e, int s, int w ) : void

Resize the map instance.

Save ( string fileName ) : void

Save the map instance.

StopClick ( ) : void

Handler for the stopping of painting with the mouse.

Undo ( ) : void

Handler for action undoing.

Приватные методы

Метод Описание
Map ( int width, int height, System dbox, ValueSetterDelegate undo, ValueSetterDelegate redo, ValueSetterDelegate postMode ) : System
apply ( BaseChange change ) : void
b ( int i ) : int
bit ( int hash, int f ) : bool
bsize ( int h ) : int
clearChanges ( ) : void
clickBlocks ( int x, int y ) : bool
clickScrollPlace ( int x, int y ) : void
clickTileVariant ( int x, int y, bool left ) : void
clickTiles ( int x, int y ) : bool
clickToggleWidth ( int x, int y ) : void
compileAdapter ( FOMap m, TiledMapper.Preset p, int tx, int ty, int dir ) : void
compileEmpty ( FOMap m, TiledMapper.Preset p, int tx, int ty ) : void
compileNormalCorridor ( FOMap m, TiledMapper.Preset p, int tx, int ty ) : void
compileTile ( FOMap m, TiledMapper.Preset p, int tx, int ty ) : void
compileWide ( FOMap m, TiledMapper.Preset p, int tx, int ty ) : void
ctest ( int hash, int m, int value ) : int
ctest2 ( int hash, int m, int n, int value ) : int
drawAdapter ( int tx, int ty, int dir, Graphics g, Pen pen ) : void
drawBlock ( int tx, int ty, int dir, Graphics g, Pen pen ) : void
drawNormalCorridor ( int tx, int ty, Graphics g, Pen pen ) : void
drawTile ( int tx, int ty, Graphics g, Brush brush, Pen pen, Brush variantFontBrush, Brush scrollblockerFontBrush ) : void
drawWideCross ( int tx, int ty, Graphics g, Pen pen ) : void
drawWideEW ( int tx, int ty, Graphics g, Pen pen ) : void
drawWideNS ( int tx, int ty, Graphics g, Pen pen ) : void
fixScrollblockers ( int offsX, int offsY ) : void
getBlockPen ( ) : Pen
getFont ( ) : Font
getLinePen ( ) : Pen
getScrollblockerFontBrush ( ) : SolidBrush
getTileBrush ( bool filled ) : SolidBrush
getVariantFontBrush ( ) : SolidBrush
getWallPen ( ) : Pen
joinTiles ( Tile tiles, int width, int height ) : void
makeTiles ( int width, int height ) : ].Tile[
parseBools ( string s ) : bool[]
placeBigTile ( FOMap m, TiledMapper.BigTile bt, int tx, int ty ) : void
reattachScrollBlockers ( ) : void
redo ( bool step ) : void
redoEastResize ( ChangeInternalResize ch ) : void
redoNorthResize ( ChangeInternalResize ch ) : void
redoSouthResize ( ChangeInternalResize ch ) : void
redoWestResize ( ChangeInternalResize ch ) : void
redrawBlocks ( Graphics g ) : void
redrawGrid ( Graphics g ) : void
redrawTiles ( Graphics g ) : void
test ( Tile tile, int dir, int value ) : int
test2 ( Tile tile, int dir1, int dir2, int value ) : int
truncateChanges ( ) : void
undoEastResize ( ChangeInternalResize ch ) : void
undoNorthResize ( ChangeInternalResize ch ) : void
undoSouthResize ( ChangeInternalResize ch ) : void
undoWestResize ( ChangeInternalResize ch ) : void
updateBlock ( int tx, int ty, int dir ) : void
updateTile ( int tx, int ty ) : void

Описание методов

Click() публичный Метод

Handler for the mouse clicking and painting a tile or wall.
public Click ( int x, int y, TileMode mode ) : bool
x int
y int
mode TileMode
Результат bool

ClickConvert() публичный Метод

Handler for mode changing.
public ClickConvert ( ) : void
Результат void

Compile() публичный Метод

Compile the map instance.
public Compile ( string fileName, MapHeader header ) : void
fileName string Output file name
header MapHeader Map header to be included
Результат void

FullRedraw() публичный Метод

Resize the drawing box associated with the map and invalidate the contents, forcing a full redraw.
public FullRedraw ( ) : void
Результат void

GetTileCorridorHash() публичный Метод

public GetTileCorridorHash ( Tile tile ) : int
tile Tile
Результат int

GetTileHash() публичный Метод

public GetTileHash ( Tile tile ) : int
tile Tile
Результат int

LoadMap() публичный статический Метод

Load a map instance from a file.
public static LoadMap ( string fileName, System dbox, ValueSetterDelegate undo, ValueSetterDelegate redo, ValueSetterDelegate postMode ) : Map
fileName string Path for the file
dbox System Drawing box for the map representation
undo ValueSetterDelegate Delegate disabling and enabling the 'undo' action
redo ValueSetterDelegate Delegate disabling and enabling the 'redo' action
postMode ValueSetterDelegate Delegate changing edit mode on the interface
Результат Map

MouseToTile() публичный статический Метод

Translation of mouse coordinates.
public static MouseToTile ( int h ) : int
h int A single mouse coordinate on the map.
Результат int

NewMap() публичный статический Метод

Create a new map instance and associate the form controls.
public static NewMap ( int width, int height, System dbox, ValueSetterDelegate undo, ValueSetterDelegate redo, ValueSetterDelegate postMode ) : Map
width int Width of the map in tiles
height int Height of the map in tiles
dbox System Drawing box for the map representation
undo ValueSetterDelegate Delegate disabling and enabling the 'undo' action
redo ValueSetterDelegate Delegate disabling and enabling the 'redo' action
postMode ValueSetterDelegate Delegate changing edit mode on the interface
Результат Map

OneClick() публичный Метод

Handler for a single click on a tile.
public OneClick ( int x, int y, TileMode mode, bool left ) : void
x int
y int
mode TileMode
left bool
Результат void

Redo() публичный Метод

Handler for action redoing.
public Redo ( ) : void
Результат void

Redraw() публичный Метод

Redraw the map.
public Redraw ( Graphics g ) : void
g System.Drawing.Graphics Graphics object to redraw on
Результат void

Resize() публичный Метод

Resize the map instance.
public Resize ( int n, int e, int s, int w ) : void
n int Number or rows to be added to or removed from the north side
e int Number or columns to be added to or removed from the east side
s int Number or rows to be added to or removed from the south side
w int Number or columns to be added to or removed from the west side
Результат void

Save() публичный Метод

Save the map instance.
public Save ( string fileName ) : void
fileName string File name for the saved map
Результат void

StopClick() публичный Метод

Handler for the stopping of painting with the mouse.
public StopClick ( ) : void
Результат void

Undo() публичный Метод

Handler for action undoing.
public Undo ( ) : void
Результат void