mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
marble and mac ci
This commit is contained in:
parent
9bba226104
commit
08d2099e39
2 changed files with 18 additions and 1 deletions
|
|
@ -202,6 +202,17 @@ jobs:
|
||||||
cmake --build build --config Release -j$NPROC
|
cmake --build build --config Release -j$NPROC
|
||||||
sudo cmake --install build
|
sudo cmake --install build
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Compile hxDatachannel
|
||||||
|
command: |
|
||||||
|
mkdir -p ~/deps
|
||||||
|
cd ~/deps
|
||||||
|
git clone https://github.com/RandomityGuy/hxDatachannel
|
||||||
|
cd hxDatachannel/cpp
|
||||||
|
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_MACOSX_RPATH=TRUE -DHASHLINK_INCLUDE_DIR="~/deps/hashlink/src" -DHASHLINK_LIBRARY_DIR="/usr/local/lib/"
|
||||||
|
cmake --build build --config Release -j$NPROC
|
||||||
|
sudo cmake --install build
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Install haxe dependencies
|
name: Install haxe dependencies
|
||||||
command: |
|
command: |
|
||||||
|
|
@ -210,6 +221,7 @@ jobs:
|
||||||
haxelib git heaps https://github.com/RandomityGuy/heaps
|
haxelib git heaps https://github.com/RandomityGuy/heaps
|
||||||
haxelib dev hlopenal ~/deps/hashlink/libs/openal
|
haxelib dev hlopenal ~/deps/hashlink/libs/openal
|
||||||
haxelib dev hlsdl ~/deps/hashlink/libs/sdl
|
haxelib dev hlsdl ~/deps/hashlink/libs/sdl
|
||||||
|
haxelib dev datachannel ~/deps/hxDatachannel
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: mbhaxe-deps-v1
|
key: mbhaxe-deps-v1
|
||||||
|
|
@ -228,6 +240,7 @@ jobs:
|
||||||
- /usr/local/lib/libvorbisfile.3.3.8.dylib
|
- /usr/local/lib/libvorbisfile.3.3.8.dylib
|
||||||
- /usr/local/lib/libvorbisenc.2.0.12.dylib
|
- /usr/local/lib/libvorbisenc.2.0.12.dylib
|
||||||
- /usr/local/lib/libz.1.3.dylib
|
- /usr/local/lib/libz.1.3.dylib
|
||||||
|
- /usr/local/lib/hxdatachannel.hdll
|
||||||
|
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
|
|
@ -239,7 +252,7 @@ jobs:
|
||||||
haxe compile-macos.hxml
|
haxe compile-macos.hxml
|
||||||
cd native
|
cd native
|
||||||
cp ~/deps/hashlink/src/hlc_main.c .
|
cp ~/deps/hashlink/src/hlc_main.c .
|
||||||
clang -mmacosx-version-min=10.15 -arch x86_64 -arch arm64 -o marblegame -I . -L /usr/local/lib/ -std=c11 marblegame.c /usr/local/lib/{ui.hdll,openal.hdll,fmt.hdll,sdl.hdll,uv.hdll,ssl.hdll} -lsdl2 -lhl -luv
|
clang -mmacosx-version-min=10.15 -arch x86_64 -arch arm64 -o marblegame -I . -L /usr/local/lib/ -std=c11 marblegame.c /usr/local/lib/{ui.hdll,openal.hdll,fmt.hdll,sdl.hdll,uv.hdll,ssl.hdll,hxdatachannel.hdll} -lsdl2 -lhl -luv
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Package app bundle
|
name: Package app bundle
|
||||||
|
|
|
||||||
|
|
@ -1803,6 +1803,10 @@ class Marble extends GameObject {
|
||||||
} else if (Net.isHost) {
|
} else if (Net.isHost) {
|
||||||
var axis = getMarbleAxis()[1];
|
var axis = getMarbleAxis()[1];
|
||||||
var innerMove = recordMove();
|
var innerMove = recordMove();
|
||||||
|
var qx = Std.int((innerMove.d.x * 16) + 16);
|
||||||
|
var qy = Std.int((innerMove.d.y * 16) + 16);
|
||||||
|
innerMove.d.x = (qx - 16) / 16.0;
|
||||||
|
innerMove.d.y = (qy - 16) / 16.0;
|
||||||
move = new NetMove(innerMove, axis, timeState, recvServerTick, 65535);
|
move = new NetMove(innerMove, axis, timeState, recvServerTick, 65535);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue