From 0daa246e6d1108b57b5687476aaabac4c3165b92 Mon Sep 17 00:00:00 2001 From: Josh Simmons Date: Mon, 20 May 2024 23:41:57 +0200 Subject: [PATCH] shark: Turn up the difficulty --- .../shaders/primitive_2d_constants.h | 2 +- title/shark/src/main.rs | 28 +++++++++++++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/title/shark-shaders/shaders/primitive_2d_constants.h b/title/shark-shaders/shaders/primitive_2d_constants.h index a4fb13f..5830e6f 100644 --- a/title/shark-shaders/shaders/primitive_2d_constants.h +++ b/title/shark-shaders/shaders/primitive_2d_constants.h @@ -1,4 +1,4 @@ -#define MAX_PRIMS 0x8000u +#define MAX_PRIMS 0x10000u #define TILE_SIZE 16 #define TILE_STRIDE (MAX_PRIMS / 32u) #define MAX_TILES_X 180 diff --git a/title/shark/src/main.rs b/title/shark/src/main.rs index a519092..a3f68fd 100644 --- a/title/shark/src/main.rs +++ b/title/shark/src/main.rs @@ -873,7 +873,7 @@ impl<'gpu> DrawState<'gpu> { let models = Models::load(gpu); let images = Images::load(gpu, thread_token); - const MAX_PRIMS: usize = 0x8000; + const MAX_PRIMS: usize = 0x10000; const TILE_STRIDE: usize = MAX_PRIMS / 32; const MAX_TILES_X: usize = 180; const MAX_TILES_Y: usize = 113; @@ -1639,19 +1639,29 @@ pub fn main() { let i = i as f32; ui_state.text_fmt( 5.0, - i * 20.0, + i * 15.0 * scale, FontFamily::RobotoRegular, 40.0, format_args!("tick: {:?}", tick_duration), ); + } - ui_state.text_fmt( - 200.0, - i * 20.0, - FontFamily::NotoSansJapanese, - 40.0, - format_args!("お握り The Quick Brown Fox Jumped Over The Lazy Dog. ████████"), - ); + for i in 0..80 { + for j in 0..11 { + let i = i as f32; + let j = j as f32; + let x = 200.0 + j * 200.0; + let y = 100.0 + j * 100.0; + ui_state.text_fmt( + x * scale, + (y + i * 15.0) * scale, + FontFamily::NotoSansJapanese, + 15.0, + format_args!( + "お握り The Quick Brown Fox Jumped Over The Lazy Dog. ████████" + ), + ); + } } draw_state.draw( -- 2.49.0