Skip to content

Commit b69625a

Browse files
committed
Updated docs and SDK for custom zone sprites and tiles (engine not updated)
1 parent 643e75f commit b69625a

15 files changed

+4994
-66
lines changed

README.md

Lines changed: 47 additions & 35 deletions
Large diffs are not rendered by default.

XCI_SYNTAX.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Skip to [Inventory File](README.md#inventory-file) keys:
6969

7070
Skip to [Zone File](README.md#zone-files) key:
7171

72-
[**level**](#level)
72+
| [**level**](#level) | [**tiles_hex**](#tiles_hex) | [**sprites_hex**](#sprites_hex) |
7373

7474
Skip to [Level File](README.md#level-files) keys:
7575

@@ -146,6 +146,7 @@ tiles_hex filename
146146

147147
Found in:
148148
* [Main File](README.md#main-file)
149+
* [Zone Files](README.md#zone-files)
149150

150151
### sprites_hex
151152

@@ -162,6 +163,7 @@ sprites_hex filename
162163

163164
Found in:
164165
* [Main File](README.md#main-file)
166+
* [Zone Files](README.md#zone-files)
165167

166168
### menu_xci
167169

@@ -271,7 +273,7 @@ menu_lc tile
271273

272274
| Argument | Type | Range | Meaning |
273275
|--|--|--|--|
274-
| tile | Tile | Any | Tile for left corner of the menu bar |
276+
| tile | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for left corner of the menu bar |
275277

276278
Found in:
277279
* [Menu File](README.md#menu-file)
@@ -287,7 +289,7 @@ menu_sp tile
287289

288290
| Argument | Type | Range | Meaning |
289291
|--|--|--|--|
290-
| tile | Tile | Any | Tile for blank spaces in the menu. |
292+
| tile | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for blank spaces in the menu. |
291293

292294
Found in:
293295
* [Menu File](README.md#menu-file)
@@ -303,7 +305,7 @@ menu_rc tile
303305

304306
| Argument | Type | Range | Meaning |
305307
|--|--|--|--|
306-
| tile | Tile | Any | Tile for right corner of the menu bar |
308+
| tile | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for right corner of the menu bar |
307309

308310
Found in:
309311
* [Menu File](README.md#menu-file)
@@ -319,7 +321,7 @@ menu_div tile
319321

320322
| Argument | Type | Range | Meaning |
321323
|--|--|--|--|
322-
| tile | Tile | Any | Tile for dividers in the menu. |
324+
| tile | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for dividers in the menu. |
323325

324326
Found in:
325327
* [Menu File](README.md#menu-file)
@@ -335,7 +337,7 @@ menu_check tile
335337

336338
| Argument | Type | Range | Meaning |
337339
|--|--|--|--|
338-
| tile | Tile | Any | Tile for checked checkboxes in the menu. |
340+
| tile | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for checked checkboxes in the menu. |
339341

340342
Found in:
341343
* [Menu File](README.md#menu-file)
@@ -351,7 +353,7 @@ menu_uncheck tile
351353

352354
| Argument | Type | Range | Meaning |
353355
|--|--|--|--|
354-
| tile | Tile | Any | Tile for unchecked checkboxes in the menu. |
356+
| tile | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for unchecked checkboxes in the menu. |
355357

356358
Found in:
357359
* [Menu File](README.md#menu-file)
@@ -560,7 +562,7 @@ tool_tiles [tiles]
560562

561563
| Argument | Type | Range | Meaning |
562564
|--|--|--|--|
563-
| tiles | Tile | 1-160 tiles | Tile map for toolbar button |
565+
| tiles | Tile | 1-160 tiles[<sup>\[1\]</sup>](#note-1) | Tile map for toolbar button |
564566

565567
Found in:
566568
* [Menu File](README.md#menu-file)
@@ -592,7 +594,7 @@ walk index
592594

593595
| Argument | Type | Range | Meaning |
594596
|--|--|--|--|
595-
| index | Integer | 0-511 | Sprite frame index for mouse cursor |
597+
| index | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Sprite frame index for mouse cursor |
596598

597599
Found in:
598600
* [Menu File](README.md#menu-file)
@@ -608,7 +610,7 @@ run index
608610

609611
| Argument | Type | Range | Meaning |
610612
|--|--|--|--|
611-
| index | Integer | 0-511 | Sprite frame index for mouse cursor |
613+
| index | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Sprite frame index for mouse cursor |
612614

613615
Found in:
614616
* [Menu File](README.md#menu-file)
@@ -624,7 +626,7 @@ look index
624626

625627
| Argument | Type | Range | Meaning |
626628
|--|--|--|--|
627-
| index | Integer | 0-511 | Sprite frame index for mouse cursor |
629+
| index | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Sprite frame index for mouse cursor |
628630

629631
Found in:
630632
* [Menu File](README.md#menu-file)
@@ -640,7 +642,7 @@ use index
640642

641643
| Argument | Type | Range | Meaning |
642644
|--|--|--|--|
643-
| index | Integer | 0-511 | Sprite frame index for mouse cursor |
645+
| index | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Sprite frame index for mouse cursor |
644646

645647
Found in:
646648
* [Menu File](README.md#menu-file)
@@ -656,7 +658,7 @@ talk index
656658

657659
| Argument | Type | Range | Meaning |
658660
|--|--|--|--|
659-
| index | Integer | 0-511 | Sprite frame index for mouse cursor |
661+
| index | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Sprite frame index for mouse cursor |
660662

661663
Found in:
662664
* [Menu File](README.md#menu-file)
@@ -672,7 +674,7 @@ strike index
672674

673675
| Argument | Type | Range | Meaning |
674676
|--|--|--|--|
675-
| index | Integer | 0-511 | Sprite frame index for mouse cursor |
677+
| index | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Sprite frame index for mouse cursor |
676678

677679
Found in:
678680
* [Menu File](README.md#menu-file)
@@ -869,7 +871,7 @@ inv_empty [tiles]
869871

870872
| Argument | Type | Range | Meaning |
871873
|--|--|--|--|
872-
| tiles | Tile | Number of tiles specified by [**inv_item_dim**](#inv_item_dim) | Tilemap for empty item button, rows going down |
874+
| tiles | Tile | Number of tiles specified by [**inv_item_dim**](#inv_item_dim)[<sup>\[1\]</sup>](#note-1) | Tilemap for empty item button, rows going down |
873875

874876
Found in:
875877
* [Inventory File](README.md#inventory-file)
@@ -885,7 +887,7 @@ inv_empty [tiles]
885887

886888
| Argument | Type | Range | Meaning |
887889
|--|--|--|--|
888-
| tiles | Tile | 1-38 | Tiles to display, from left to right |
890+
| tiles | Tile | 1-38[<sup>\[1\]</sup>](#note-1) | Tiles to display, from left to right |
889891

890892
Found in:
891893
* [Inventory File](README.md#inventory-file)
@@ -901,7 +903,7 @@ inv_empty [tiles]
901903

902904
| Argument | Type | Range | Meaning |
903905
|--|--|--|--|
904-
| tiles | Tile | 1-38 tiles | Tiles to display, from left to right |
906+
| tiles | Tile | 1-38 tiles[<sup>\[1\]</sup>](#note-1) | Tiles to display, from left to right |
905907

906908
Found in:
907909
* [Inventory File](README.md#inventory-file)
@@ -934,7 +936,7 @@ inv_quant_margin [tiles]
934936

935937
| Argument | Type | Range | Meaning |
936938
|--|--|--|--|
937-
| tiles | Tile | 1-5 tiles | Tiles to display, from left to right |
939+
| tiles | Tile | 1-5 tiles[<sup>\[1\]</sup>](#note-1) | Tiles to display, from left to right |
938940

939941
Found in:
940942
* [Inventory File](README.md#inventory-file)
@@ -950,9 +952,9 @@ inv_scroll up middle down
950952

951953
| Argument | Type | Range | Meaning |
952954
|--|--|--|--|
953-
| up | Tile | Any | Tile for scroll-up button |
954-
| middle | Tile | Any | Tile to fill in column between scroll buttons |
955-
| down | Tile | Any | Tile for scroll-down button |
955+
| up | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for scroll-up button |
956+
| middle | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile to fill in column between scroll buttons |
957+
| down | Tile | Any [<sup>\[1\]</sup>](#note-1) | Tile for scroll-down button |
956958

957959
Found in:
958960
* [Inventory File](README.md#inventory-file)
@@ -968,7 +970,7 @@ inv_scroll_margin [tiles]
968970

969971
| Argument | Type | Range | Meaning |
970972
|--|--|--|--|
971-
| tiles | Tile | 1-38 tiles | Tiles to display, from left to right |
973+
| tiles | Tile | 1-38 tiles[<sup>\[1\]</sup>](#note-1) | Tiles to display, from left to right |
972974

973975
Found in:
974976
* [Inventory File](README.md#inventory-file)
@@ -987,8 +989,8 @@ inv_item name init max cursor [tiles]
987989
| name | Identifier | Unique item name | Name of item to be used in [**item_trigger**](#item_trigger) and [**get_item**](#get_item) arguments |
988990
| init | Integer | 0-65535 | Initial quantity of item |
989991
| max | Integer | 1-65535 | Maximum quantity of item |
990-
| cursor | Integer | 0-511 | Item cursor frame |
991-
| tiles | Tile | Number of tiles specified by [**inv_item_dim**](#inv_item_dim) | Tilemap for item button, rows going down |
992+
| cursor | Integer | 0-255[<sup>\[1\]</sup>](#note-1) | Item cursor frame |
993+
| tiles | Tile | Number of tiles specified by [**inv_item_dim**](#inv_item_dim)[<sup>\[1\]</sup>](#note-1) | Tilemap for item button, rows going down |
992994

993995

994996
Found in:
@@ -1316,3 +1318,8 @@ play id
13161318

13171319
Found in:
13181320
* [Level Files](README.md#level-files)
1321+
1322+
## Notes
1323+
1324+
### Note 1
1325+
Tile and sprite indices higher than 255 are not guaranteed to be the same in every zone, so it is strongly recommended to use only indices 0 to 255 for any of these values. However, higher indices may be used (up to 703 for tiles or 498 for sprites) if the elements are interchangeable between zones, either by being identical or cleanly replaced (perhaps defining a user interface "theme" for a zone).

example/mygame.xci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tiles_hex mygame_tiles.hex
66
sprites_hex mygame_sprites.hex
77
menu_xci mygame_menu.xci
88
title_screen mygame_start.xci
9-
init_cursor 0 # sprite frame index
9+
init_cursor 256 # sprite frame index
1010
zone mygame_zone0.xci # the first zone defined will be loaded first,
1111
# with its first level the start of the game
1212
zone mygame_zone1.xci

example/mygame_menu.xci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Menu bar definition
22
menu_bg 1 # background color = white
33
menu_fg 0 # foreground color = black
4-
menu_lc 2H
4+
menu_lc 256
55
menu_sp 1
66
menu_rc 2
77
menu_div 4

0 commit comments

Comments
 (0)