initial commit: llamamod 0.2.0 – reverse-engineered level formats (wad, map, trak, text, stpc), python tools and notes, java mod manager (iso install, mod pipeline with exe patching, save editor, wine/windows launcher) with mods (test world, debug wireframe, mirror, randomizer, fog, cheats, intro skip, practice, free camera, boot to level, level projects) and the 3d level editor (geometry, objects, cross-world import, environment, textures, play-test, manual)
This commit is contained in:
commit
b36a366240
826 files changed
+105304
No files matched your search
+99
@@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
# Startet "Ein Königreich für ein Lama" (Disney/Argonaut, 2000) unter Wine.
|
||||
#
|
||||
# Beim ersten Start wird ein eigenes 32-Bit-Wine-Prefix angelegt. Bei jedem
|
||||
# Start werden Laufwerk L: (Spiel-CD), Registry und Fenstergröße gesetzt.
|
||||
#
|
||||
# Einstellungen (optional) in ~/.config/ein-koenigreich-fuer-ein-lama.conf:
|
||||
# WIDTH=1920 # Fensterbreite (Standard: Breite des Hauptmonitors)
|
||||
# HEIGHT=1080 # Fensterhöhe (Standard: Arbeitsbereich - Titelleiste)
|
||||
# TITLEBAR=28 # Höhe der Fenster-Titelleiste in Pixeln
|
||||
# WINEPREFIX=... # anderes Prefix (Standard: ~/.wine-lama)
|
||||
set -e
|
||||
|
||||
DATA=/opt/ein-koenigreich-fuer-ein-lama
|
||||
CONF="${XDG_CONFIG_HOME:-$HOME/.config}/ein-koenigreich-fuer-ein-lama.conf"
|
||||
TITLEBAR=28
|
||||
WIDTH=
|
||||
HEIGHT=
|
||||
[ -f "$CONF" ] && . "$CONF"
|
||||
|
||||
export WINEPREFIX="${WINEPREFIX:-$HOME/.wine-lama}"
|
||||
export WINEARCH=win32
|
||||
export WINEDEBUG="${WINEDEBUG:--all}"
|
||||
|
||||
GAMEDIR="$WINEPREFIX/drive_c/Program Files/Disney Interactive/Ein Koenigreich fuer ein Lama"
|
||||
WINGAME='C:\Program Files\Disney Interactive\Ein Koenigreich fuer ein Lama'
|
||||
|
||||
# --- Prefix anlegen --------------------------------------------------------
|
||||
if [ ! -f "$WINEPREFIX/system.reg" ]; then
|
||||
echo "Lege Wine-Prefix in $WINEPREFIX an ..."
|
||||
wineboot -i >/dev/null 2>&1
|
||||
wineserver -w
|
||||
fi
|
||||
|
||||
# --- Programmdateien (Festplatten-Teil der Installation) -------------------
|
||||
# Programmdateien werden verlinkt; Spielstände (*.ksv) werden kopiert, da das
|
||||
# Spiel sie im Programmverzeichnis überschreibt.
|
||||
mkdir -p "$GAMEDIR/music"
|
||||
for f in "$DATA"/hd/* "$DATA"/hd/music/*; do
|
||||
[ -f "$f" ] || continue
|
||||
rel="${f#"$DATA"/hd/}"
|
||||
case "$f" in
|
||||
*.ksv) [ -e "$GAMEDIR/$rel" ] || { cp "$f" "$GAMEDIR/$rel"; chmod u+w "$GAMEDIR/$rel"; } ;;
|
||||
*) ln -sfn "$f" "$GAMEDIR/$rel" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# --- Spiel-CD als Laufwerk L: ----------------------------------------------
|
||||
# Mit aktiven Mods (lama-mod an) zeigt L: auf das Overlay.
|
||||
if [ -d "$WINEPREFIX/cd-overlay" ]; then
|
||||
ln -sfn "$WINEPREFIX/cd-overlay" "$WINEPREFIX/dosdevices/l:"
|
||||
else
|
||||
ln -sfn "$DATA/cd" "$WINEPREFIX/dosdevices/l:"
|
||||
fi
|
||||
|
||||
# --- Fenstergröße bestimmen ------------------------------------------------
|
||||
if [ -z "$WIDTH" ] || [ -z "$HEIGHT" ]; then
|
||||
geo=$(xrandr --current 2>/dev/null | awk '
|
||||
/ connected/ { for (i = 1; i <= NF; i++) if ($i ~ /^[0-9]+x[0-9]+\+/) {
|
||||
if ($0 ~ / primary /) { print $i; found = 1; exit }
|
||||
if (!first) first = $i } }
|
||||
END { if (!found && first) print first }')
|
||||
mw=${geo%%x*}
|
||||
mh=${geo#*x}; mh=${mh%%+*}
|
||||
wa=$(xprop -root _NET_WORKAREA 2>/dev/null | sed -n 's/.*= *//p' | cut -d, -f4 | tr -d ' ')
|
||||
case "$mw$mh" in ''|*[!0-9]*) mw=1024; mh=768 ;; esac
|
||||
h=$mh
|
||||
case "$wa" in ''|*[!0-9]*) ;; *) [ "$wa" -lt "$h" ] && h=$wa ;; esac
|
||||
h=$((h - TITLEBAR))
|
||||
: "${WIDTH:=$mw}"
|
||||
: "${HEIGHT:=$h}"
|
||||
fi
|
||||
|
||||
# --- Registry --------------------------------------------------------------
|
||||
REG=$(mktemp --suffix=.reg)
|
||||
trap 'rm -f "$REG"' EXIT
|
||||
cat > "$REG" <<EOF
|
||||
REGEDIT4
|
||||
|
||||
[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]
|
||||
"l:"="cdrom"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\\Software\\Disney Interactive\\Emperors New Groove\\1.0]
|
||||
"CDPath"="L:\\\\"
|
||||
"ScreenW"=dword:$(printf %08x "$WIDTH")
|
||||
"ScreenH"=dword:$(printf %08x "$HEIGHT")
|
||||
|
||||
[HKEY_CURRENT_USER\\Software\\Wine\\Explorer]
|
||||
"Desktop"="Lama"
|
||||
|
||||
[HKEY_CURRENT_USER\\Software\\Wine\\Explorer\\Desktops]
|
||||
"Lama"="${WIDTH}x${HEIGHT}"
|
||||
EOF
|
||||
wine regedit "$REG" >/dev/null 2>&1
|
||||
|
||||
# --- Start -----------------------------------------------------------------
|
||||
# Das Spiel legt Spielstände im aktuellen Verzeichnis an.
|
||||
cd "$GAMEDIR"
|
||||
wine "$WINGAME\\groove.exe" "$@"
|
||||
Reference in new issue
Block a user