diff --git a/Readme.md b/Readme.md index f0b8aa3..0298556 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,8 @@ # Sectr Prototype ![img](docs/assets/sectr_host_2024-03-09_04-30-27.png) + + This prototype aims to flesh out ideas I've wanted to explore futher when it came to code editing and tools for code in general. diff --git a/code/api.odin b/code/api.odin index 2d3c42b..b68461c 100644 --- a/code/api.odin +++ b/code/api.odin @@ -126,8 +126,8 @@ startup :: proc( prof : ^SpallProfiler, persistent_mem, frame_mem, transient_mem // Configuration Load { using config - resolution_width = 1000 - resolution_height = 600 + resolution_width = 1280 + resolution_height = 900 refresh_rate = 0 cam_min_zoom = 0.25 @@ -156,8 +156,8 @@ startup :: proc( prof : ^SpallProfiler, persistent_mem, frame_mem, transient_mem // rl.ConfigFlag.WINDOW_TOPMOST, }) - window_width : i32 = 1000 - window_height : i32 = 600 + window_width : i32 = cast(i32) config.resolution_width + window_height : i32 = cast(i32) config.resolution_height win_title : cstring = "Sectr Prototype" rl.InitWindow( window_width, window_height, win_title ) log( "Raylib initialized and window opened" ) diff --git a/code/font_provider.odin b/code/font_provider.odin index 9b3f26d..0751754 100644 --- a/code/font_provider.odin +++ b/code/font_provider.odin @@ -8,7 +8,7 @@ import "core:os" import rl "vendor:raylib" -Font_Largest_Px_Size :: 32 +Font_Largest_Px_Size :: 96 Font_Size_Interval :: 2 diff --git a/code/text.odin b/code/text.odin index b7b8809..85c63c6 100644 --- a/code/text.odin +++ b/code/text.odin @@ -56,12 +56,14 @@ draw_text_string :: proc( content : string, pos : Vec2, size : f32, color : rl.C zoom_adjust := px_size * project.workspace.cam.zoom rl_font := to_rl_Font(font, zoom_adjust ) + rl.SetTextureFilter(rl_font.texture, rl.TextureFilter.TRILINEAR) rl.DrawTextCodepoints( rl_font, raw_data(runes), cast(i32) len(runes), position = transmute(rl.Vector2) pos, fontSize = px_size, spacing = 0.0, tint = color ); + rl.SetTextureFilter(rl_font.texture, rl.TextureFilter.POINT) } draw_text_string_cached :: proc( content : StringCached, pos : Vec2, size : f32, color : rl.Color = rl.WHITE, font : FontID = Font_Default ) @@ -83,12 +85,14 @@ draw_text_string_cached :: proc( content : StringCached, pos : Vec2, size : f32, rl_font := to_rl_Font(font, zoom_adjust ) runes := content.runes + rl.SetTextureFilter(rl_font.texture, rl.TextureFilter.TRILINEAR) rl.DrawTextCodepoints( rl_font, raw_data(runes), cast(i32) len(runes), position = transmute(rl.Vector2) pos, fontSize = px_size, spacing = 0.0, tint = color ); + rl.SetTextureFilter(rl_font.texture, rl.TextureFilter.POINT) } // Raylib's equivalent doesn't take a length for the string (making it a pain in the ass) diff --git a/docs/assets/raddbg_2024-05-04_12-05-47.mp4 b/docs/assets/raddbg_2024-05-04_12-05-47.mp4 new file mode 100644 index 0000000..1fbdfc2 Binary files /dev/null and b/docs/assets/raddbg_2024-05-04_12-05-47.mp4 differ