Pixel art style coarser: 270 world rows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
807a124a0b
commit
76f3b3c7b2
4 files changed
+10
-10
No files matched your search
+1
-1
@@ -118,7 +118,7 @@ painted mission whose triggers switch each other on. **Block 4 is done.**
|
||||
|
||||
## 5. Next (agreed 2026-11-06)
|
||||
|
||||
Done: the pixel look (the world 360 rows on every device, graphics style "pixel art" 360 rows or "high-res" 1080 rows with 32x32 sprites, first the imp; the interface on the same
|
||||
Done: the pixel look (the world the same rows on every device, graphics style "pixel art" 270 rows or "high-res" 1080 rows with 32x32 sprites, first the imp; the interface on the same
|
||||
grid), guard and attack markers (shields and swords), savegames with the game state only.
|
||||
|
||||
1. **Real AI masters** (done, v202611-00052) - rivals, AI seats and the co-op partner play by the player's rules: imps dig,
|
||||
|
||||
+1
-1
@@ -987,7 +987,7 @@ async fn main() {
|
||||
// pixel look: the interface on a virtual screen whose pixels are whole parts of the world's
|
||||
let rows = settings::pixel_rows(app.settings.pixel_rows);
|
||||
// the interface needs room: the smallest whole multiple of the world's rows with at least
|
||||
// 900 rows (360 -> 1080), on a desktop and on a touch screen alike (a phone has about
|
||||
// 900 rows (270 -> 1080), on a desktop and on a touch screen alike (a phone has about
|
||||
// 1080 device rows in landscape; a smaller screen draws in device pixels)
|
||||
let need: u32 = 900;
|
||||
// measured on the shorter side: upright (portrait) the width gets those pixels and the
|
||||
|
||||
+1
-1
@@ -1252,7 +1252,7 @@ fn chunk_sig(map: &Map, cx: i32, cz: i32) -> u64 {
|
||||
|
||||
impl R3d {
|
||||
pub fn new() -> R3d {
|
||||
R3d { lit: lit_material(), glow: glow_material(), opaque: opaque_material(), chunks: Vec::new(), ncx: 0, ncz: 0, outlines: true, wall_sub: 3, max_lights: MAX_LIGHTS, pixel_rows: 360, target: None, lava: Vec::new() }
|
||||
R3d { lit: lit_material(), glow: glow_material(), opaque: opaque_material(), chunks: Vec::new(), ncx: 0, ncz: 0, outlines: true, wall_sub: 3, max_lights: MAX_LIGHTS, pixel_rows: crate::settings::PIXEL_ART_ROWS as u32, target: None, lava: Vec::new() }
|
||||
}
|
||||
|
||||
// Changing the wall detail rebuilds all chunks
|
||||
|
||||
+7
-7
@@ -151,7 +151,7 @@ pub struct Settings {
|
||||
pub ui_factor: u8, // old interface size (2 large, 3 medium, 4 small; only read to carry old settings over)
|
||||
pub ui_size: u16, // interface size in percent of the standard (100 = 1080 interface rows), 0 = automatic
|
||||
pub render_scale: u8, // old pixel-look divisor (no longer used, kept for old settings files)
|
||||
pub pixel_rows: u16, // graphics style: rows of the world on every screen (360 pixel art, 1080 high-res)
|
||||
pub pixel_rows: u16, // graphics style: rows of the world on every screen (270 pixel art, 1080 high-res)
|
||||
pub touch_ui: u8, // touch interface: 0 = automatic (after the first touch), 1 = on, 2 = off
|
||||
pub debug_fps: bool, // show FPS and rendering backend
|
||||
pub debug_frame_time: bool, // show the frame-time line and graph
|
||||
@@ -192,7 +192,7 @@ impl Default for Settings {
|
||||
ui_factor: 0,
|
||||
ui_size: 0,
|
||||
render_scale: 1,
|
||||
pixel_rows: 360,
|
||||
pixel_rows: PIXEL_ART_ROWS,
|
||||
touch_ui: 0,
|
||||
debug_fps: false,
|
||||
debug_frame_time: false,
|
||||
@@ -264,10 +264,10 @@ impl Settings {
|
||||
}
|
||||
}
|
||||
|
||||
// the graphics styles of the settings menu as the world's pixel rows: pixel art (360 rows, the
|
||||
// the graphics styles of the settings menu as the world's pixel rows: pixel art (270 rows, the
|
||||
// small hand-made sprites) and high-res (1080 rows, detailed sprites; other values from older
|
||||
// settings files count as pixel art)
|
||||
pub const PIXEL_ART_ROWS: u16 = 360;
|
||||
pub const PIXEL_ART_ROWS: u16 = 270;
|
||||
pub const HIGH_RES_ROWS: u16 = 1080;
|
||||
pub const STYLES: [u16; 2] = [PIXEL_ART_ROWS, HIGH_RES_ROWS];
|
||||
|
||||
@@ -326,10 +326,10 @@ mod tests {
|
||||
#[test]
|
||||
fn graphics_styles() {
|
||||
assert_eq!(pixel_rows(1080), 1080);
|
||||
assert_eq!(pixel_rows(360), 360);
|
||||
assert_eq!(pixel_rows(270), 270);
|
||||
// older pixel-look values count as pixel art
|
||||
for old in [270u16, 480, 540, 0] {
|
||||
assert_eq!(pixel_rows(old), 360);
|
||||
for old in [360u16, 480, 540, 0] {
|
||||
assert_eq!(pixel_rows(old), 270);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user