From c0b439bc30a26f5facec6ed2a705458e8aacddcf Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 6 Jan 2025 01:20:27 -0500 Subject: [PATCH] Update readme and build script --- Readme.md | 1 + code/sectr/ui/core/base.odin | 2 +- scripts/build.ps1 | 16 +++++++++++----- toolchain/Odin | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Readme.md b/Readme.md index 55fa850..a6863da 100644 --- a/Readme.md +++ b/Readme.md @@ -18,6 +18,7 @@ The dependencies are: * Odin Compiler (Slightly custom [fork](https://github.com/Ed94/Odin)) * Added #region, #endregion directives support for editors * I added support for 'monlithic packages' or 'uniform-across-subdirectories packages'. It allows me to organize the main package with sub-directories. + * Added the ability to debug using statements on structs (fields get dumped to the stack as ptr refs) * Odin repo's base, core, and vendor(raylib) libaries * An ini parser * backtrace (not used yet) diff --git a/code/sectr/ui/core/base.odin b/code/sectr/ui/core/base.odin index 860d692..12cafe9 100644 --- a/code/sectr/ui/core/base.odin +++ b/code/sectr/ui/core/base.odin @@ -293,7 +293,7 @@ ui_graph_build_end :: proc( ui : ^UI_State ) // over_sample : f32 = f32(get_state().config.font_size_canvas_scalar) - current.computed.text_shape = shape_text_cached_latin( current.text.str, current.style.font, current.layout.font_size, 1.0 ) + current.computed.text_shape = shape_text_cached( current.text.str, current.style.font, current.layout.font_size, 1.0 ) } ui_box_compute_layout( current ) } diff --git a/scripts/build.ps1 b/scripts/build.ps1 index ec895c5..55626ee 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -94,6 +94,7 @@ $flag_sanitize_address = '-sanitize:address' $flag_sanitize_memory = '-sanitize:memory' $flag_sanitize_thread = '-sanitize:thread' $flag_subsystem = '-subsystem:' +$flag_show_debug_messages = '-show-debug-messages' $flag_show_timings = '-show-timings' $flag_show_more_timings = '-show-more-timings' $flag_show_system_calls = '-show-system-calls' @@ -140,17 +141,20 @@ push-location $path_root $path_font = join-path $path_code 'font' + $module_scripts = $PSScriptRoot $package_grime = join-path $path_code 'grime' $package_VEFontCache = join-path $path_font 'VEFontCache' $module_host = join-path $path_code 'host' $module_sectr = join-path $path_code 'sectr' if ($force){ + mark-ModuleDirty $module_scripts mark-ModuleDirty $package_VEFontCache mark-ModuleDirty $package_grime mark-ModuleDirty $module_sectr mark-ModuleDirty $module_host } + $module_scripts_dirty = check-ModuleForChanges $module_scripts $pkg_VEFontCache_dirty = check-ModuleForChanges $package_VEFontCache $pkg_grime_dirty = check-ModuleForChanges $package_grime @@ -170,7 +174,7 @@ push-location $path_root function build-sectr { - $should_build = (check-ModuleForChanges $module_sectr) -or $pkg_grime_dirty -or $pkg_VEFontCache_dirty + $should_build = (check-ModuleForChanges $module_sectr) -or $pkg_grime_dirty -or $pkg_VEFontCache_dirty -or $module_scripts_dirty if ( -not( $should_build)) { write-host 'Skipping sectr build, module up to date' return $module_unchanged @@ -201,10 +205,10 @@ push-location $path_root # $build_args += $flag_micro_architecture_native $build_args += $flag_use_separate_modules $build_args += $flag_thread_count + $CoreCount_Physical - # $build_args += $flag_optimize_none + $build_args += $flag_optimize_none # $build_args += $flag_optimize_minimal # $build_args += $flag_optimize_speed - $build_args += $falg_optimize_aggressive + # $build_args += $falg_optimize_aggressive $build_args += $flag_debug $build_args += $flag_pdb_name + $pdb $build_args += $flag_subsystem + 'windows' @@ -217,6 +221,8 @@ push-location $path_root $build_args += ($flag_max_error_count + '10') # $build_args += $flag_sanitize_address # $build_args += $flag_sanitize_memory + # $build_args += $flag_show_debug_messages + write-host $build_args if ( Test-Path $module_dll) { $module_dll_pre_build_hash = get-filehash -path $module_dll -Algorithm MD5 @@ -277,8 +283,8 @@ push-location $path_root # $build_args += $flag_micro_architecture_native $build_args += $flag_use_separate_modules $build_args += $flag_thread_count + $CoreCount_Physical - # $build_args += $flag_optimize_none - $build_args += $flag_optimize_minimal + $build_args += $flag_optimize_none + # $build_args += $flag_optimize_minimal # $build_args += $flag_optimize_speed # $build_args += $falg_optimize_aggressive $build_args += $flag_debug diff --git a/toolchain/Odin b/toolchain/Odin index aa8bc79..3b7833b 160000 --- a/toolchain/Odin +++ b/toolchain/Odin @@ -1 +1 @@ -Subproject commit aa8bc79d342b5de5ad597577db8bb65a46119114 +Subproject commit 3b7833ba65c0889d13e0d3b0d88b2ed8babdbc00