[metadata]
name=voxel-shooter
description=Ace Of Spades style shooter game
-url=
author=Brendan Hansen
version=0.0.1
[config]
lib_source_directory=./lib
lib_bin_directory=./run_tree/lib
-run_cmd=
-debug_cmd=
-test_cmd=
[native_library]
-build_cmd=
-library=
[dependencies]
git://onyxlang.io/repo/onyx-net=0.0.7
case "$1" in
- build) onyx build -V build -I ../src/client -o game.wasm $@ ;;
+ build) onyx build -V build -I ../src/client -o game.wasm --tag $@ ;;
watch) onyx watch build.onyx -I ../src/client ;;
debug) onyx run --debug game.wasm ;;
*) onyx run game.wasm ;;
#library_path "./lib"
// Primary source files
-#load "./../src/config"
+#load "./../config"
#load_all "./."
#load_all "./gfx"
#load_all "./../shared"
// Onyx modules
-#load "./../lib/packages"
+#load "./../../lib/packages"
#local handle_packet :: (packet_data: [] u8) {
packet := cast(^packets.Packet_Base) packet_data.data;
- if packet_handles[~~ packet.type] != null_proc {
- packet_handles[~~ packet.type](packet);
+ handler := packet_handles[~~ packet.type] ?? null_proc;
+ if handler != null_proc {
+ handler(packet);
}
}