Skip to content

Commit

Permalink
Merge pull request #595 from lunastudio-art/main
Browse files Browse the repository at this point in the history
  • Loading branch information
JeodC authored Aug 16, 2024
2 parents 0b32801 + 6d0567e commit b1d1680
Show file tree
Hide file tree
Showing 15 changed files with 886 additions and 0 deletions.
56 changes: 56 additions & 0 deletions ports/classicube/ClassiCube.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
controlfolder="$XDG_DATA_HOME/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR="/$directory/ports/classicube"
CONFDIR="$GAMEDIR/conf/"

$ESUDO chmod +x $GAMEDIR/ClassiCube

> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

mkdir -p "$GAMEDIR/conf"

cd $GAMEDIR
# Grab text output...
$ESUDO chmod 666 /dev/tty0
printf "\033c" > /dev/tty0
echo "Loading... Please Wait." > /dev/tty0


DEVICE_ARCH="${DEVICE_ARCH:-aarch64}"

if [ -f "${controlfolder}/libgl_${CFW_NAME}.txt" ]; then
source "${controlfolder}/libgl_${CFW_NAME}.txt"
else
source "${controlfolder}/libgl_default.txt"
fi

export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export TEXTINPUTINTERACTIVE="Y"
export XDG_DATA_HOME="$CONFDIR"

$GPTOKEYB "ClassiCube" -c "classicube.gptk" textinput &
$GAMEDIR/ClassiCube | cat # hai meow this keeps the program active by using pipe when you launch the game :3

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
37 changes: 37 additions & 0 deletions ports/classicube/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Notes

Thanks to UnknownShadow200 for making this client.

## Compile

```shell

git clone https://github.com/ClassiCube/ClassiCube.git

cd ClassiCube

make sdl2

```


## Controls

| Button | Action |
|--|--|
|Left Joystick|Move|
|Right Joystick|Look|
|A|Jump/Fly Up|
|B|Fly Down|
|X|Inventory|
|Y|Toggle Fly Mode|
|D-Pad|Navigate Menu|
|L1|Hotbar Selection Left|
|R1|Hotbar Selection Right|
|L2|Place Block|
|R2|Destroy Block|
|L3|10X Speed|
|Start|Menu Selection|
|Select|Pause Menu/Back|


Binary file added ports/classicube/classicube/ClassiCube
Binary file not shown.
20 changes: 20 additions & 0 deletions ports/classicube/classicube/LICENSE_gl4es
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2016-2018 Sebastien Chevalier
Copyright (c) 2013-2016 Ryan Hileman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit b1d1680

Please sign in to comment.