Reorganize assets; switch the HUD to the Micro Chat font
Source packs move to assets/packs (untouched), maps to assets/maps, and the palette/sketch leftovers from the 8-bit era go. tools/mkfont.py repacks VEXED's Micro Chat sheet (8-column grid, 8x10 cells) into the CP437 atlas layout the font loader already reads, cropped to 8x9 so the HUD can use an 8 px line height. The CGA atlas is dropped in its favor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -58,7 +58,7 @@ const SPRITE_FOX: u16 = 2;
|
||||
const HUD_X: i32 = VIEW_PX;
|
||||
const HUD_W: i32 = 320 - VIEW_PX;
|
||||
const HUD_PAD: i32 = 3;
|
||||
const LINE_H: i32 = 9;
|
||||
const LINE_H: i32 = 8;
|
||||
const HUD_BG: u16 = pbio::rgb565(16, 12, 24);
|
||||
const HUD_FRAME: u16 = pbio::rgb565(120, 100, 140);
|
||||
const HUD_TEXT: u16 = pbio::rgb565(235, 235, 255);
|
||||
@@ -108,7 +108,7 @@ impl Game {
|
||||
pub fn start(map_path: &str) -> Self {
|
||||
let tileset = Image::from_png("assets/tilesets/overworld.png").to_tileset();
|
||||
let entity_tileset = Image::from_png("assets/tilesets/entities.png").to_tileset();
|
||||
let font = Font::from_png("assets/fonts/cga-8x8.png", 8, 8);
|
||||
let font = Font::from_png("assets/fonts/micro-chat-8x9.png", 8, 9);
|
||||
|
||||
let t0 = std::time::Instant::now();
|
||||
let map = TileMap::from_csv(map_path);
|
||||
@@ -568,7 +568,7 @@ mod snapshot {
|
||||
fn population() {
|
||||
std::env::set_current_dir("..").unwrap();
|
||||
let secs: usize = std::env::var("SECONDS").ok().and_then(|s| s.parse().ok()).unwrap_or(60);
|
||||
let mut g = super::Game::start("assets/map_test");
|
||||
let mut g = super::Game::start("assets/maps/map_test");
|
||||
let input = crate::input::InputState::new();
|
||||
let mut frame = vec![0u16; 320 * 240];
|
||||
for _ in 0..secs * 60 {
|
||||
@@ -585,7 +585,7 @@ mod snapshot {
|
||||
#[ignore]
|
||||
fn dump_frame() {
|
||||
std::env::set_current_dir("..").unwrap();
|
||||
let map = std::env::var("SNAPSHOT_MAP").unwrap_or_else(|_| "assets/map_test".into());
|
||||
let map = std::env::var("SNAPSHOT_MAP").unwrap_or_else(|_| "assets/maps/map_test".into());
|
||||
let mut g = super::Game::start(&map);
|
||||
let input = crate::input::InputState::new();
|
||||
let mut frame = vec![0u16; 320 * 240];
|
||||
|
||||
Reference in New Issue
Block a user