mt-lang 0.3.30 → 0.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/std/sdl3/runtime.mt CHANGED
@@ -52,3 +52,14 @@ public function locale_string(locale: ptr[sdl.Locale]) -> string.String:
52
52
 
53
53
  public function debug_text_width(text_value: str) -> float:
54
54
  return float<-sdl.DEBUG_TEXT_FONT_CHARACTER_SIZE * float<-text_value.len
55
+
56
+
57
+ public function asset_path(relative: str) -> string.String:
58
+ let base = sdl.get_base_path() else:
59
+ fatal("could not resolve the application base path")
60
+
61
+ var path = string.String.with_capacity(relative.len + 64)
62
+ path.append(text.cstr_as_str(base))
63
+ path.append("../resources/")
64
+ path.append(relative)
65
+ return path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mt-lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.30
4
+ version: 0.3.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Long (Teefan) Tran
@@ -624,7 +624,7 @@ metadata:
624
624
  homepage_uri: https://teefan.github.io/mt-lang/
625
625
  source_code_uri: https://github.com/teefan/mt-lang
626
626
  post_install_message: |
627
- Milk Tea 0.3.30 installed!
627
+ Milk Tea 0.3.32 installed!
628
628
 
629
629
  System requirements:
630
630
  - A C compiler (gcc or clang) must be available on PATH