blob: 1f229dc833cf70ffe878a5c1496ca969253f0089 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
@node Tilesets
@section Tilesets
In most 2D games, the game world is composed of many small,
rectangular pieces called tiles. In Guile-2D, tilesets are used to
encapsulate a group of uniformly sized texture regions that come from
a single parent texture.
@anchor{2d tileset make-tileset}@defun make-tileset texture width height [#:margin] [#:spacing]
Return a new tileset that is built by splitting TEXTURE into tiles.
@end defun
@anchor{2d tileset load-tileset}@defun load-tileset filename width height [#:margin] [#:spacing]
Return a new tileset that is built by loading the texture at FILENAME
and splitting the texture into tiles.
@end defun
@anchor{2d tileset tileset?}@defspec tileset?
@end defspec
@anchor{2d tileset tileset-tiles}@defspec tileset-tiles
@end defspec
@anchor{2d tileset tileset-width}@defspec tileset-width
@end defspec
@anchor{2d tileset tileset-height}@defspec tileset-height
@end defspec
@anchor{2d tileset tileset-margin}@defspec tileset-margin
@end defspec
@anchor{2d tileset tileset-spacing}@defspec tileset-spacing
@end defspec
@anchor{2d tileset tileset-ref}@defun tileset-ref tileset i
Return the tile texture of TILESET at index I.
@end defun
|