[feat]: initial commit
This commit is contained in:
commit
7b48f34e94
24 changed files with 1354 additions and 0 deletions
12
source/utils.odin
Normal file
12
source/utils.odin
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// Wraps os.read_entire_file and os.write_entire_file, but they also work with emscripten.
|
||||
|
||||
package game
|
||||
|
||||
@(require_results)
|
||||
read_entire_file :: proc(name: string, allocator := context.allocator, loc := #caller_location) -> (data: []byte, success: bool) {
|
||||
return _read_entire_file(name, allocator, loc)
|
||||
}
|
||||
|
||||
write_entire_file :: proc(name: string, data: []byte, truncate := true) -> (success: bool) {
|
||||
return _write_entire_file(name, data, truncate)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue