Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
0.5.1
Browse files Browse the repository at this point in the history
- Fixed an input bug on GLFW
- Chunk update bugfix
- UI text formatting
- Made input configurable
- Added gamepad support on GLFW
- Added the mouse scroll wheel code
- Use `clock_gettime(CLOCK_MONOTONIC...` or `QueryPerformanceCounter` instead of `gettimeofday`
- Getting input now uses a pointer instead of returning a large struct
  • Loading branch information
PQCraft committed Nov 27, 2022
1 parent 22e1af7 commit 2c9e7a9
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 18 deletions.
3 changes: 2 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
- Made input configurable
- Added gamepad support on GLFW
- Added the mouse scroll wheel code
- Use `clock_gettime` with `CLOCK_MONOTONIC` instead of `gettimeofday` on platforms other than Windows and MacOS
- Use `clock_gettime(CLOCK_MONOTONIC...` or `QueryPerformanceCounter` instead of `gettimeofday`
- Getting input now uses a pointer instead of returning a large struct
56 changes: 40 additions & 16 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ NJOBS="$(nproc)"
rm -rf cavecube*.tar.gz cavecube*.zip
buildrel() {
local TYPE="${1}"
local OS="${2}"
inf "Building ${TYPE} for ${OS}..."
local PLATFORM="${2}"
inf "Building ${TYPE} for ${PLATFORM}..."
make ${@:3} clean 1> /dev/null || _exit
RESPONSE=""
while ! make ${@:3} "-j${NJOBS}" 1> /dev/null; do
Expand Down Expand Up @@ -44,29 +44,53 @@ buildrel() {
make ${@:3} clean 1> /dev/null || _exit
[[ ! "${RESPONSE}" == "n" ]] || _exit 1
}
# Game: Linux x86_64
pkgrel() { _tar "cavecube_game_linux_x86_64.tar.gz" cavecube; }
buildrel "game" "Linux x86_64"
# Game: Linux i686
pkgrel() { _tar "cavecube_game_linux_i686.tar.gz" cavecube; }
buildrel "game" "Linux i686" M32=y
# Game: Windows x86_64
pkgrel() { _zip "cavecube_game_windows_x86_64.zip" cavecube.exe; }
buildrel "game" "Windows x86_64" WINCROSS=y
# Game: Windows i686
pkgrel() { _zip "cavecube_game_windows_i686.zip" cavecube.exe; }
buildrel "game" "Windows i686" M32=y WINCROSS=y

#######################
## GAME USING GLFW ##
#######################
# Game: Linux x86_64 GLFW
pkgrel() { _tar "cavecube_game_glfw_linux_x86_64.tar.gz" cavecube; }
buildrel "game" "Linux x86_64 using GLFW"
# Game: Linux i686 GLFW
pkgrel() { _tar "cavecube_game_glfw_linux_i686.tar.gz" cavecube; }
buildrel "game" "Linux i686 using GLFW" M32=y
# Game: Windows x86_64 GLFW
pkgrel() { _zip "cavecube_game_glfw_windows_x86_64.zip" cavecube.exe; }
buildrel "game" "Windows x86_64 using GLFW" WINCROSS=y
# Game: Windows i686 GLFW
pkgrel() { _zip "cavecube_game_glfw_windows_i686.zip" cavecube.exe; }
buildrel "game" "Windows i686 using GLFW" WINCROSS=y M32=y

#######################
## GAME USING SDL2 ##
#######################
# Game: Linux x86_64 SDL2
pkgrel() { _tar "cavecube_game_sdl2_linux_x86_64.tar.gz" cavecube; }
buildrel "game" "Linux x86_64 using SDL2" USESDL2=y
# Game: Linux i686 SDL2
pkgrel() { _tar "cavecube_game_sdl2_linux_i686.tar.gz" cavecube; }
buildrel "game" "Linux i686 using SDL2" USESDL2=y M32=y
# Game: Windows x86_64 SDL2
pkgrel() { _zip "cavecube_game_sdl2_windows_x86_64.zip" cavecube.exe; }
buildrel "game" "Windows x86_64 using SDL2" WINCROSS=y USESDL2=y
# Game: Windows i686 SDL2
pkgrel() { _zip "cavecube_game_sdl2_windows_i686.zip" cavecube.exe; }
buildrel "game" "Windows i686 using SDL2" WINCROSS=y USESDL2=y M32=y

##############
## SERVER ##
##############
# Server: Linux x86_64
pkgrel() { _tar "cavecube_server_linux_x86_64.tar.gz" ccserver; }
buildrel "server" "Linux x86_64" MODULE=server
# Server: Linux i686
pkgrel() { _tar "cavecube_server_linux_i686.tar.gz" ccserver; }
buildrel "server" "Linux i686" M32=y MODULE=server
buildrel "server" "Linux i686" MODULE=server M32=y
# Server: Windows x86_64
pkgrel() { _zip "cavecube_server_windows_x86_64.zip" ccserver.exe; }
buildrel "server" "Windows x86_64" MODULE=server WINCROSS=y
# Server: Windows i686
pkgrel() { _zip "cavecube_server_windows_i686.zip" ccserver.exe; }
buildrel "server" "Windows i686" M32=y MODULE=server WINCROSS=y
buildrel "server" "Windows i686" MODULE=server WINCROSS=y M32=y

}
29 changes: 29 additions & 0 deletions extras/docs/gamepad config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[Input]
xSen = 8
ySen = 4

[GLFW Keybinds]
move.forward = \0,\0,0;\0,\0,0
move.backward = g,a,1;\0,\0,0
move.left = \0,\0,0;\0,\0,0
move.right = g,a,0;\0,\0,0
move.lookUp = g,a,3;\0,\0,0
move.lookDown = \0,\0,0;\0,\0,0
move.lookLeft = g,a,2;\0,\0,0
move.lookRight = \0,\0,0;\0,\0,0
multi.place = g,a,5;\0,\0,0
multi.destroy = g,a,4;\0,\0,0
multi.zoom = g,b,10;\0,\0,0
multi.jump = g,b,0;\0,\0,0
multi.crouch = g,b,9;\0,\0,0
multi.run = g,b,5;\0,\0,0
multi.playerlist = g,b,6;\0,\0,0
single.escape = g,b,7;\0,\0,0
single.inventory = g,b,4;\0,\0,0
single.invNext = g,b,12;\0,\0,0
single.invPrev = g,b,14;\0,\0,0
single.invShiftUp = g,b,11;\0,\0,0
single.invShiftDown = g,b,13;\0,\0,0
single.rotBlockX = g,b,2;\0,\0,0
single.rotBlockY = g,b,3;\0,\0,0
single.rotBlockZ = g,b,1;\0,\0,0
2 changes: 2 additions & 0 deletions mkrelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ updatepkg() {
}
updatepkg cavecube
updatepkg cavecube-bin
updatepkg cavecube-sdl2
updatepkg cavecube-sdl2-bin

tsk "Cleaning up..."
rm -rf cavecube*.tar.gz cavecube*.zip
Expand Down
2 changes: 1 addition & 1 deletion src/main/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define VER_MAJOR 0
#define VER_MINOR 5
#define VER_PATCH 0
#define VER_PATCH 1

#define _STR(x) #x
#define STR(x) _STR(x)
Expand Down

0 comments on commit 2c9e7a9

Please sign in to comment.