Change project structure for cross build
This commit is contained in:
parent
117ad322d3
commit
80b3e83d4d
17 changed files with 44 additions and 43 deletions
19
src/desktop/main.odin
Normal file
19
src/desktop/main.odin
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#+build !wasm32, !wasm64p32
|
||||
|
||||
package main
|
||||
|
||||
import game ".."
|
||||
import "core:os"
|
||||
import "core:path/filepath"
|
||||
|
||||
main :: proc() {
|
||||
exe_path := os.args[0]
|
||||
exe_dir := filepath.dir(string(exe_path))
|
||||
os.set_working_directory(exe_dir)
|
||||
|
||||
game.init()
|
||||
for game.should_run() {
|
||||
game.update()
|
||||
}
|
||||
game.shutdown()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue