@echo off
rem Launch btl4.exe against the bundled content tree.
rem The game requires its working directory to be the content dir (BTL4.RES,
rem VIDEO\, BTDPL.INI, *.EGG are all resolved relative to cwd).
rem
rem Usage:  run.cmd [EGG] [pod|dev]     (args order-independent)
rem   EGG          a mission descriptor in content\ (default DEV.EGG = grass/day)
rem   pod | dev    platform profile (default dev):
rem                  dev = single 800x600 window + keyboard (the dev test build)
rem                  pod = RIO cockpit input + (on real pod hardware) the
rem                        multi-surface gauges/MFDs.  On a dev box pod boots
rem                        single-window (the multi-surface needs the pod's 2
rem                        video cards); it still exercises the pod input/config.
rem   (Equivalent: set BT_PLATFORM=pod, or pass -platform pod straight to the exe.)
setlocal
set CFG=Debug
set EGG=
set PROF=dev

:parse
if "%~1"=="" goto done
if /i "%~1"=="pod" (set PROF=pod& shift& goto parse)
if /i "%~1"=="dev" (set PROF=dev& shift& goto parse)
set EGG=%~1
shift
goto parse
:done

if "%EGG%"=="" set EGG=DEV.EGG
if /i "%PROF%"=="pod" set BT_PLATFORM=pod

echo [run] egg=%EGG%  profile=%PROF%
cd /d "%~dp0..\content"
"%~dp0..\build\%CFG%\btl4.exe" -egg %EGG%
