[feat]: initial commit
This commit is contained in:
commit
7b48f34e94
24 changed files with 1354 additions and 0 deletions
16
source/utils_default.odin
Normal file
16
source/utils_default.odin
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#+build !wasm32
|
||||
#+build !wasm64p32
|
||||
|
||||
package game
|
||||
|
||||
import "core:os"
|
||||
|
||||
_read_entire_file :: proc(name: string, allocator := context.allocator, loc := #caller_location) -> (data: []byte, success: bool) {
|
||||
err: os.Error
|
||||
data, err = os.read_entire_file(name, allocator, loc)
|
||||
return data, err == nil
|
||||
}
|
||||
|
||||
_write_entire_file :: proc(name: string, data: []byte, truncate := true) -> (err: bool) {
|
||||
return os.write_entire_file(name, data, truncate = truncate) == nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue