diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-24 10:47:33 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-24 10:47:33 +0100 |
| commit | bbf40bf318df76041df86a72575ef880f0ffa6ab (patch) | |
| tree | 5051f19b617bc12cbb51f8aa291f6f401850e4ab /core/image/tga | |
| parent | 90c44c34a9fa7f07c45f7849c32e0058f66772fb (diff) | |
Rename `save_to_memory` for consistency.
Diffstat (limited to 'core/image/tga')
| -rw-r--r-- | core/image/tga/tga.odin | 2 | ||||
| -rw-r--r-- | core/image/tga/tga_js.odin | 2 | ||||
| -rw-r--r-- | core/image/tga/tga_os.odin | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/core/image/tga/tga.odin b/core/image/tga/tga.odin index 4adf426c7..9fc616804 100644 --- a/core/image/tga/tga.odin +++ b/core/image/tga/tga.odin @@ -27,7 +27,7 @@ GA_Pixel :: image.GA_Pixel RGB_Pixel :: image.RGB_Pixel RGBA_Pixel :: image.RGBA_Pixel -save_to_memory :: proc(output: ^bytes.Buffer, img: ^Image, options := Options{}, allocator := context.allocator) -> (err: Error) { +save_to_buffer :: proc(output: ^bytes.Buffer, img: ^Image, options := Options{}, allocator := context.allocator) -> (err: Error) { context.allocator = allocator if img == nil { diff --git a/core/image/tga/tga_js.odin b/core/image/tga/tga_js.odin index 0ba246041..d98b241a7 100644 --- a/core/image/tga/tga_js.odin +++ b/core/image/tga/tga_js.odin @@ -1,5 +1,5 @@ //+build js package tga -save :: proc{save_to_memory} +save :: proc{save_to_buffer} load :: proc{load_from_bytes, load_from_context} diff --git a/core/image/tga/tga_os.odin b/core/image/tga/tga_os.odin index e7e40cfe3..12747a684 100644 --- a/core/image/tga/tga_os.odin +++ b/core/image/tga/tga_os.odin @@ -4,7 +4,7 @@ package tga import "core:os" import "core:bytes" -save :: proc{save_to_memory, save_to_file} +save :: proc{save_to_buffer, save_to_file} save_to_file :: proc(output: string, img: ^Image, options := Options{}, allocator := context.allocator) -> (err: Error) { context.allocator = allocator @@ -12,7 +12,7 @@ save_to_file :: proc(output: string, img: ^Image, options := Options{}, allocato out := &bytes.Buffer{} defer bytes.buffer_destroy(out) - save_to_memory(out, img, options) or_return + save_to_buffer(out, img, options) or_return write_ok := os.write_entire_file(output, out.buf[:]) return nil if write_ok else .Unable_To_Write_File |