diff --git a/.gitea/workflows/autobuild.yaml b/.gitea/workflows/autobuild.yaml index fe4102a..cbe75b3 100644 --- a/.gitea/workflows/autobuild.yaml +++ b/.gitea/workflows/autobuild.yaml @@ -12,7 +12,7 @@ jobs: - name: Install build tools run: | sudo apt update - sudo apt install -y build-essential cmake zip unzip make + sudo apt install -y build-essential cmake zip unzip make libxrandr - name: Build makeheaders run: | @@ -25,7 +25,10 @@ jobs: cd ${{ gitea.workspace }}/src/libraries git clone https://github.com/lsalzman/enet.git git clone https://github.com/walterschell/Lua.git - git clone https://github.com/raysan5/raylib.git + git clone --filter=blob:none --sparse https://github.com/raysan5/raylib.git + cd raylib + git sparse-checkout set src include src/raylib.h CMakeLists.txt + cd .. git clone https://github.com/jbeder/yaml-cpp.git cd ../.. @@ -34,4 +37,12 @@ jobs: chmod +x ${{ gitea.workspace }}/compile.sh sh ${{ gitea.workspace }}/compile.sh zip -r release-linux.zip OUTPUT-Linux || true - zip -r release-w64.zip OUTPUT-w64 || true \ No newline at end of file + zip -r release-w64.zip OUTPUT-w64 || true + + - name: Upload artifacts + uses: actions/upload-artifact@v7 + with: + name: build-artifacts + path: | + release-linux.zip + release-w64.zip diff --git a/.gitignore b/.gitignore index c61793f..7598fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ libraries/* .vscode android __UTILS__ -snapshots \ No newline at end of file +snapshots +OUTPUT-Linux +OUTPUT-w64 \ No newline at end of file diff --git a/compile.sh b/compile.sh index d702b9d..d610ded 100644 --- a/compile.sh +++ b/compile.sh @@ -2,20 +2,26 @@ ./makeheaders/makeheaders -h src/helpers/vars.hpp src/helpers/chunks.cpp src/helpers/debug.cpp src/helpers/entities.cpp src/helpers/input.cpp src/helpers/menu.cpp src/helpers/mesher.cpp src/helpers/networking.cpp src/helpers/utils.cpp src/helpers/inlines.hpp src/helpers/inventory.cpp src/helpers/locale.cpp src/helpers/recipes.cpp src/helpers/particles.cpp src/helpers/player.cpp src/helpers/multisound.cpp src/helpers/svlib.cpp -v > src/helpers/common.hpp -#rm -r build +rm -r build echo Building Linux... cmake -B build -DUNIX=ON -DUNIX=true cd build make -j12 cd .. -cp build/src/RCRAFT* OUTPUT -#cp build/src/dedicated_server/RDS* OUTPUT +mkdir OUTPUT-Linux +cp build/src/RCRAFT OUTPUT-Linux +cp -r data/resources OUTPUT-Linux +mkdir OUTPUT-Linux/user +mkdir OUTPUT-Linux/user/worlds -#rm -r build -#echo Building Windows... -#cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/mingw-w64.cmake -DWIN32=ON -DWIN32=true -B build -#cd build -#make -j12 -#cd .. -#cp build/src/RCRAFT.exe OUTPUT -#cp build/src/dedicated_server/RDS.exe OUTPUT +rm -r build +echo Building Windows... +cmake -DCMAKE_TOOLCHAIN_FILE=toolchains/mingw-w64.cmake -DWIN32=ON -DWIN32=true -B build +cd build +make -j12 +cd .. +mkdir OUTPUT-w64 +cp build/src/RCRAFT.exe OUTPUT-w64 +cp -r data/resources OUTPUT-w64 +mkdir OUTPUT-w64/user +mkdir OUTPUT-w64/user/worlds \ No newline at end of file diff --git a/data/resources/archimedes-64.hex b/data/resources/archimedes-64.hex new file mode 100644 index 0000000..8b5017c --- /dev/null +++ b/data/resources/archimedes-64.hex @@ -0,0 +1,64 @@ +211d25 +413d42 +5c5b63 +7c808b +a5b0b6 +d6dede +ffffff +dcded1 +aab1a1 +7b8375 +585f57 +3c3c3c +635d5a +8d837d +b4aea4 +dedcd1 +eadedf +bcacb1 +8f8189 +685d66 +643747 +b2434d +e55858 +fa8971 +ffb999 +ffe0b7 +ffbdc1 +ef93b5 +c971a2 +944e89 +4c3d57 +5d558f +777dc4 +96b1e7 +bedef6 +aae3db +5ac5ce +4694a8 +346376 +2a3b4a +29684a +379648 +79b547 +b8cf61 +f3db6f +f4ba7a +e79055 +ce6442 +944940 +91555d +b76f6b +cd9383 +e1ba9e +facafb +d49ce5 +9f76b8 +725689 +edb762 +fcfbc9 +de9463 +b66a4d +333f29 +4e5c2c +708939 diff --git a/data/resources/bomb.png b/data/resources/bomb.png new file mode 100644 index 0000000..0ac13d6 Binary files /dev/null and b/data/resources/bomb.png differ diff --git a/data/resources/cubemap.png b/data/resources/cubemap.png new file mode 100644 index 0000000..c711798 Binary files /dev/null and b/data/resources/cubemap.png differ diff --git a/data/resources/font.ttf b/data/resources/font.ttf new file mode 100644 index 0000000..0a3a84e Binary files /dev/null and b/data/resources/font.ttf differ diff --git a/data/resources/items.png b/data/resources/items.png new file mode 100644 index 0000000..372091a Binary files /dev/null and b/data/resources/items.png differ diff --git a/data/resources/locale.yaml b/data/resources/locale.yaml new file mode 100644 index 0000000..a9e04f6 --- /dev/null +++ b/data/resources/locale.yaml @@ -0,0 +1,75 @@ +# en_US locale +# By: milkwx3 + +locale_code: en_US +locale_name: English +# Controls +forward: Walk forward +left: Walk left +back: Walk backward +right: Walk right +jump: Jump / fly up +shift: Descend +speed_up: Fly faster +fly: Toggle flying +chat: Open chat +swap_mouse: Swap LMB/RMB +# Menu +select_level: Singleplayer +multiplayer: Multiplayer +join: Join +exit: Exit +options: Options +# Multiplayer errors +error_notfound: Host not found! +error_internal: Internal enet error! +error_unknown: Connection failed for unknown reason! +# Chat +send: Send +# World creation status +step_0: Building world... +step_1: Generating features... +step_2: Rebuilding presence masks... +step_3: Preparing... +chunk_status: Chunk %3d / %3d +# Items +# Blocks +item.air: "Air" +item.stone: "Stone" +item.grass: "Grass Block" +item.dirt: "Dirt" +item.sand: "Sand" +item.water: "Water" +item.planks: "Wooden Planks" +item.gray_bricks: "Gray Bricks" +item.red_bricks: "Red Bricks" +item.blue_bricks: "Blue Bricks" +item.green_bricks: "Green Bricks" +item.glass: "Glass" +item.log: "Log" +item.spruce_planks: "Spruce Planks" +item.red_block: "Red Block" +item.green_block: "Green Block" +item.blue_block: "Blue Block" +item.yellow_block: "Yellow Block" +item.cyan_block: "Cyan Block" +item.magenta_block: "Magenta Block" +item.white_block: "White Block" +item.black_block: "Black Block" +item.leaves: "Leaves" +item.copper_ore: "Copper Ore" +item.silver_ore: "Silver Ore" +item.gold_ore: "Gold Ore" +item.coal_ore: "Coal Ore" +item.unobtainium: "Unobtainium" +# Generic items +item.block: "Block" +item.apple: "Apple" +item.stick: "Stick" +item.stone_pickaxe: "Stone Pickaxe" +item.copper_pickaxe: "Copper Pickaxe" +item.silver_pickaxe: "Silver Pickaxe" +item.gold_pickaxe: "Gold Pickaxe" +item.copper_ingot: "Copper Ingot" +item.silver_ingot: "Silver Ingot" +item.gold_ingot: "Gold Ingot" \ No newline at end of file diff --git a/data/resources/player.png b/data/resources/player.png new file mode 100644 index 0000000..baa44a5 Binary files /dev/null and b/data/resources/player.png differ diff --git a/data/resources/recipes/blue_bricks.yaml b/data/resources/recipes/blue_bricks.yaml new file mode 100644 index 0000000..29d5eaf --- /dev/null +++ b/data/resources/recipes/blue_bricks.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["item:silver_ingot"] +outputs: ["block:blue_bricks"] \ No newline at end of file diff --git a/data/resources/recipes/copper_ingot.yaml b/data/resources/recipes/copper_ingot.yaml new file mode 100644 index 0000000..87e6fa1 --- /dev/null +++ b/data/resources/recipes/copper_ingot.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:copper_ore*2"] +outputs: ["item:copper_ingot"] \ No newline at end of file diff --git a/data/resources/recipes/copper_pickaxe.yaml b/data/resources/recipes/copper_pickaxe.yaml new file mode 100644 index 0000000..0c485fc --- /dev/null +++ b/data/resources/recipes/copper_pickaxe.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["item:copper_ingot*3","item:stick*2"] +outputs: ["item:copper_pickaxe"] \ No newline at end of file diff --git a/data/resources/recipes/gold_ingot.yaml b/data/resources/recipes/gold_ingot.yaml new file mode 100644 index 0000000..215f91f --- /dev/null +++ b/data/resources/recipes/gold_ingot.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:gold_ore*2"] +outputs: ["item:gold_ingot"] \ No newline at end of file diff --git a/data/resources/recipes/gold_pickaxe.yaml b/data/resources/recipes/gold_pickaxe.yaml new file mode 100644 index 0000000..f2596ff --- /dev/null +++ b/data/resources/recipes/gold_pickaxe.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["item:gold_ingot*3","item:stick*2"] +outputs: ["item:gold_pickaxe"] \ No newline at end of file diff --git a/data/resources/recipes/gray_bricks.yaml b/data/resources/recipes/gray_bricks.yaml new file mode 100644 index 0000000..735c12c --- /dev/null +++ b/data/resources/recipes/gray_bricks.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:stone*2"] +outputs: ["block:gray_bricks"] \ No newline at end of file diff --git a/data/resources/recipes/planks.yaml b/data/resources/recipes/planks.yaml new file mode 100644 index 0000000..d6bfa69 --- /dev/null +++ b/data/resources/recipes/planks.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:log"] +outputs: ["block:planks*2"] \ No newline at end of file diff --git a/data/resources/recipes/red_bricks.yaml b/data/resources/recipes/red_bricks.yaml new file mode 100644 index 0000000..0e7ceba --- /dev/null +++ b/data/resources/recipes/red_bricks.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["item:copper_ingot"] +outputs: ["block:red_bricks"] \ No newline at end of file diff --git a/data/resources/recipes/silver_ingot.yaml b/data/resources/recipes/silver_ingot.yaml new file mode 100644 index 0000000..4e4366d --- /dev/null +++ b/data/resources/recipes/silver_ingot.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:silver_ore*2"] +outputs: ["item:silver_ingot"] \ No newline at end of file diff --git a/data/resources/recipes/silver_pickaxe.yaml b/data/resources/recipes/silver_pickaxe.yaml new file mode 100644 index 0000000..562b73e --- /dev/null +++ b/data/resources/recipes/silver_pickaxe.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["item:silver_ingot*3","item:stick*2"] +outputs: ["item:silver_pickaxe"] \ No newline at end of file diff --git a/data/resources/recipes/spruce_planks.yaml b/data/resources/recipes/spruce_planks.yaml new file mode 100644 index 0000000..0af71df --- /dev/null +++ b/data/resources/recipes/spruce_planks.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:spruce_log"] +outputs: ["block:spruce_planks*2"] \ No newline at end of file diff --git a/data/resources/recipes/stick.yaml b/data/resources/recipes/stick.yaml new file mode 100644 index 0000000..99fb64f --- /dev/null +++ b/data/resources/recipes/stick.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["tag:planks"] +outputs: ["item:stick*4"] \ No newline at end of file diff --git a/data/resources/recipes/stone_pickaxe.yaml b/data/resources/recipes/stone_pickaxe.yaml new file mode 100644 index 0000000..bff8fe6 --- /dev/null +++ b/data/resources/recipes/stone_pickaxe.yaml @@ -0,0 +1,3 @@ +station: hands +inputs: ["block:stone*3","item:stick*2"] +outputs: ["item:stone_pickaxe"] \ No newline at end of file diff --git a/data/resources/sound/block_dirt.wav b/data/resources/sound/block_dirt.wav new file mode 100644 index 0000000..7b66cc3 Binary files /dev/null and b/data/resources/sound/block_dirt.wav differ diff --git a/data/resources/sound/block_grass.wav b/data/resources/sound/block_grass.wav new file mode 100644 index 0000000..8c75a38 Binary files /dev/null and b/data/resources/sound/block_grass.wav differ diff --git a/data/resources/sound/block_stone.wav b/data/resources/sound/block_stone.wav new file mode 100644 index 0000000..790756d Binary files /dev/null and b/data/resources/sound/block_stone.wav differ diff --git a/data/resources/sound/block_wood.wav b/data/resources/sound/block_wood.wav new file mode 100644 index 0000000..8ab2c9f Binary files /dev/null and b/data/resources/sound/block_wood.wav differ diff --git a/data/resources/sound/hover.wav b/data/resources/sound/hover.wav new file mode 100644 index 0000000..1c3a1d8 Binary files /dev/null and b/data/resources/sound/hover.wav differ diff --git a/data/resources/sound/nekit/hurt.ogg b/data/resources/sound/nekit/hurt.ogg new file mode 100755 index 0000000..6aa3683 Binary files /dev/null and b/data/resources/sound/nekit/hurt.ogg differ diff --git a/data/resources/sound/nekit/idle.ogg b/data/resources/sound/nekit/idle.ogg new file mode 100755 index 0000000..7572219 Binary files /dev/null and b/data/resources/sound/nekit/idle.ogg differ diff --git a/data/resources/sound/select.wav b/data/resources/sound/select.wav new file mode 100644 index 0000000..3053fff Binary files /dev/null and b/data/resources/sound/select.wav differ diff --git a/data/resources/terrain.png b/data/resources/terrain.png new file mode 100644 index 0000000..b95140c Binary files /dev/null and b/data/resources/terrain.png differ