Skip to content

Commit

Permalink
Merge pull request #59 from porschemad911/doom3-demo-d3xp
Browse files Browse the repository at this point in the history
Doom 3 - add support for demo and Resurrection of Evil expansion pack files
  • Loading branch information
kloptops authored Feb 6, 2024
2 parents 03d7b0c + ae52758 commit e24b450
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 19 deletions.
41 changes: 34 additions & 7 deletions ports/doom3/Doom 3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,47 @@ source $controlfolder/control.txt
source $controlfolder/device_info.txt
get_controls

GAMEDIR="/$directory/ports/doom3"

cd $GAMEDIR
PORTS_DIR="/$directory/ports"
GAME_DIR="${PORTS_DIR}/doom3"
LOG_FILE="${GAME_DIR}/log.txt"
cd $GAME_DIR

# Decide which game to launch - demo / full / expansion pack.
# You are able to override by setting a value here as follows:
# - demo (Doom 3 demo version)
# - base (Doom 3 full version)
# - d3xp (Resurrection of Evil expansion pack)
GAME=

# If no override set, check which PK4 files exist
if [[ -z "${GAME}" ]]; then
if [[ -f "${GAME_DIR}/d3xp/pak000.pk4" ]] &&
[[ -f "${GAME_DIR}/d3xp/pak001.pk4" ]]; then
GAME="d3xp"
elif [[ -f "${GAME_DIR}/base/pak001.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak002.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak003.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak004.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak005.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak006.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak007.pk4" ]] &&
[[ -f "${GAME_DIR}/base/pak008.pk4" ]]; then
GAME="base"
elif [[ -f "${GAME_DIR}/demo/demo00.pk4" ]]; then
GAME="demo"
fi
fi

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

$ESUDO chmod 666 /dev/uinput

export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

$GPTOKEYB "dhewm3" -c "./dhewm3.gptk" &
./dhewm3 +set r_mode "-1" +set r_customWidth "$DISPLAY_WIDTH" +set r_customHeight "$DISPLAY_HEIGHT"
./dhewm3 +set r_mode "-1" +set r_customWidth "$DISPLAY_WIDTH" +set r_customHeight "$DISPLAY_HEIGHT" +set fs_game "$GAME"

$ESUDO kill -9 $(pidof gptokeyb)
unset SDL_GAMECONTROLLERCONFIG
$ESUDO systemctl restart oga_events &
printf "\033c" >> /dev/tty0
printf "\033c" > /dev/tty0
34 changes: 22 additions & 12 deletions ports/doom3/doom3/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,26 @@ Doom 3 Portmaster ReadMe
*Built at commit ref: 4f35e6ad2acafb936b784a9d33c8383864ce91a8
*This requires Portmaster to be installed to work
*This will not run on rk3326 devices
*Place your pk4 files in base/
They should read as follows:
base/
pak000.pk4
pak001.pk4
pak002.pk4
pak003.pk4
pak004.pk4
pak005.pk4
pak006.pk4
pak007.pk4
pak008.pk4

The demo version of Doom 3, retail version of Doom3 as well as the Doom 3 Resurrection of Evil expansion pack are supported.

To add files for the demo version of Doom 3, place your pk4 files in demo/ as folows:
demo/
demo00.pk4

To add files for the full retail version of Doom 3, place your pk4 files in base/ as follows:
base/
pak000.pk4
pak001.pk4
pak002.pk4
pak003.pk4
pak004.pk4
pak005.pk4
pak006.pk4
pak007.pk4
pak008.pk4

To add files for the Doom 3 Resurrection of Evil expansion pack, place your pk4 files in d3xp/ as follows:
d3xp/
pak000.pk4
pak001.pk4
2 changes: 2 additions & 0 deletions ports/doom3/doom3/base/autoexec.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
seta com_showFPS "0"

unbindall
bind "ESCAPE" "togglemenu"
bind "SPACE" "_moveDown"
Expand Down
25 changes: 25 additions & 0 deletions ports/doom3/doom3/d3xp/autoexec.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
seta com_showFPS "0"

unbindall
bind "ESCAPE" "togglemenu"
bind "SPACE" "_moveDown"
bind "a" "_moveLeft"
bind "b" "_moveUp"
bind "d" "_moveRight"
bind "g" "_speed"
bind "h" "_moveDown"
bind "m" "loadgame quick"
bind "n" "savegame quick"
bind "s" "_back"
bind "w" "_forward"
bind "x" "_impulse11"
bind "y" "_impulse13"
bind "UPARROW" "_impulse2"
bind "DOWNARROW" "_impulse19"
bind "LEFTARROW" "_impulse15"
bind "RIGHTARROW" "_impulse14"
bind "MOUSE1" "_attack"
bind "MOUSE2" "_zoom"
bind "MOUSE2" "_zoom"

seta sensitivity "16.000000"
25 changes: 25 additions & 0 deletions ports/doom3/doom3/demo/autoexec.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
seta com_showFPS "0"

unbindall
bind "ESCAPE" "togglemenu"
bind "SPACE" "_moveDown"
bind "a" "_moveLeft"
bind "b" "_moveUp"
bind "d" "_moveRight"
bind "g" "_speed"
bind "h" "_moveDown"
bind "m" "loadgame quick"
bind "n" "savegame quick"
bind "s" "_back"
bind "w" "_forward"
bind "x" "_impulse11"
bind "y" "_impulse13"
bind "UPARROW" "_impulse2"
bind "DOWNARROW" "_impulse19"
bind "LEFTARROW" "_impulse15"
bind "RIGHTARROW" "_impulse14"
bind "MOUSE1" "_attack"
bind "MOUSE2" "_zoom"
bind "MOUSE2" "_zoom"

seta sensitivity "16.000000"
Binary file removed ports/doom3/doom3/libs/libEGL.so.1
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libGL.so.1
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libSDL2-2.0.so.0.16.0
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libX11.so.6
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libXau.so.6
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libXdmcp.so.6
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libjpeg.so.62
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libogg.so.0
Binary file not shown.
Binary file removed ports/doom3/doom3/libs/libxcb.so.1
Binary file not shown.

0 comments on commit e24b450

Please sign in to comment.