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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! # Game Skunk Advance
//! Game development library modelled after an imaginary console
//!
//! [Changelog](https://git.danitheskunk.com/DaniTheSkunk/gsa/src/branch/master/CHANGLOG.md)
//!
//! ## Specs
//! - Resolution: 304x176 (19x11 tiles)
//! - Colors: 256 (indexed out of a possible 24-bit)
//! - Tilesize: 16x16 (or 8x8 for half-tiles)
//! - Tileset: 65536 tiles, indexed via 0xYYXX
//! - rectangle(not id range) of 0x7000 to 0x7F7F semi-reserved
//! - Sprites: 256 of size 16x16 (pondering allowing larger sprites)
//! - Backgrounds: 4 of size 1024x1024, scrollable
//!
//! ## Getting started
//! `cargo install gsa`
//!
//! `gsa new my_project`
//!
//! `cd my_project`
//!
//! `cargo run`
//!
//! ## Features not yet implemented
//! - Background effects
//! - Rotation? Scaling?
//! - Mosaic?
//! - Mode7?
//! - Sprite Effects
//! - Rotation? Scaling?
//! - Mosaic?
//! - Sound (no samples)
//! - Synth
//! - Speech
//! - Savegames
//! - Helpers
//! - Gamepad text keyboard input
//! - Menus
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use craterun;
pub use crate*;
/// Amount of sprites in [Gsa::sprites]
pub const MAX_SPRITES: usize = 0xff;
/// Screen Width in pixels
pub const SCREEN_WIDTH: usize = 304;
/// Screen Height in pixels
pub const SCREEN_HEIGHT: usize = 176;
/// X and y dimensions of maps in [Gsa::bgs]
pub const BACKGROUND_MAX_SIZE: usize = 1024;
/// Tile considered empty (never drawn even if has contents)
pub const EMPTY_TILE: u16 = 0xffff;
/// Tile id of bold default font
pub const FONT_BOLD: u16 = 0xf000;
/// Tile id of thin default font
pub const FONT_THIN: u16 = 0xe000;
/// Width and height (in tiles) of tileset
pub const TILESET_SIZE: usize = 0x100;
/// Width and height of a tile
pub const TILE_SIZE: usize = 16;
/// Palette index which is treated as transparent
pub const TRANSPARENT: u8 = 0xff;
/// Width and height of a tile in half-tile mode
pub const HALF_TILE_SIZE: usize = 8;
/// Amount of tile maps in [Gsa::bgs]
pub const MAX_BACKGROUNDS: usize = 4;