echo off

rem "lev_set" sets up some environment variables ready for
rem grabbing a level

rem "LONGDIR1" is the level's long directory name on the CD (eg - fear,ootw)
rem "LONGDIR2" is the level's long directory name on X (eg - fortress,space)
rem "DESTFILE" is the name of the BFF file

set LEVNAME=%1
set MMESH_ARGS=""
set CCONV_ARGS=""


if "%LEVNAME%"=="AT1" goto at1
if "%LEVNAME%"=="AT2" goto at2
if "%LEVNAME%"=="AT3" goto at3
if "%LEVNAME%"=="ATBOSS" goto atboss
if "%LEVNAME%"=="ATBONUS" goto atbonus
if "%LEVNAME%"=="ATTEST" goto attest
if "%LEVNAME%"=="at1" goto at1
if "%LEVNAME%"=="at2" goto at2
if "%LEVNAME%"=="at3" goto at3
if "%LEVNAME%"=="atboss" goto atboss
if "%LEVNAME%"=="atbonus" goto atbonus
if "%LEVNAME%"=="attest" goto attest

if "%LEVNAME%"=="CA1" goto ca1
if "%LEVNAME%"=="CA2" goto ca2
if "%LEVNAME%"=="CA3" goto ca3
if "%LEVNAME%"=="CABOSS" goto caboss
if "%LEVNAME%"=="CABONUS" goto cabonus
if "%LEVNAME%"=="CATEST" goto catest
if "%LEVNAME%"=="ca1" goto ca1
if "%LEVNAME%"=="ca2" goto ca2
if "%LEVNAME%"=="ca3" goto ca3
if "%LEVNAME%"=="caboss" goto caboss
if "%LEVNAME%"=="cabonus" goto cabonus
if "%LEVNAME%"=="catest" goto catest

if "%LEVNAME%"=="FF1" goto ff1
if "%LEVNAME%"=="FF2" goto ff2
if "%LEVNAME%"=="FF3" goto ff3
if "%LEVNAME%"=="FFBOSS" goto ffboss
if "%LEVNAME%"=="FFBONUS" goto ffbonus
if "%LEVNAME%"=="FFTEST" goto fftest
if "%LEVNAME%"=="ff1" goto ff1
if "%LEVNAME%"=="ff2" goto ff2
if "%LEVNAME%"=="ff3" goto ff3
if "%LEVNAME%"=="ffboss" goto ffboss
if "%LEVNAME%"=="ffbonus" goto ffbonus
if "%LEVNAME%"=="fftest" goto fftest




if "%LEVNAME%"=="PI1" goto pi1
if "%LEVNAME%"=="PI2" goto pi2
if "%LEVNAME%"=="PI3" goto pi3
if "%LEVNAME%"=="PIBOSS" goto piboss
if "%LEVNAME%"=="PIBONUS" goto pibonus
if "%LEVNAME%"=="PITEST" goto pitest
if "%LEVNAME%"=="pi1" goto pi1
if "%LEVNAME%"=="pi2" goto pi2
if "%LEVNAME%"=="pi3" goto pi3
if "%LEVNAME%"=="piboss" goto piboss
if "%LEVNAME%"=="pibonus" goto pibonus
if "%LEVNAME%"=="pitest" goto pitest

if "%LEVNAME%"=="SP1" goto sp1
if "%LEVNAME%"=="SP2" goto sp2
if "%LEVNAME%"=="SP3" goto sp3
if "%LEVNAME%"=="SPBOSS" goto spboss
if "%LEVNAME%"=="SPBONUS" goto spbonus
if "%LEVNAME%"=="SPTEST" goto sptest
if "%LEVNAME%"=="sp1" goto sp1
if "%LEVNAME%"=="sp2" goto sp2
if "%LEVNAME%"=="sp3" goto sp3
if "%LEVNAME%"=="spboss" goto spboss
if "%LEVNAME%"=="spbonus" goto spbonus
if "%LEVNAME%"=="sptest" goto sptest

if "%LEVNAME%"=="PR1" goto pr1
if "%LEVNAME%"=="PR2" goto pr2
if "%LEVNAME%"=="PR3" goto pr3
if "%LEVNAME%"=="PRBOSS" goto prboss
if "%LEVNAME%"=="PRBONUS" goto prbonus
if "%LEVNAME%"=="PRTEST" goto prtest
if "%LEVNAME%"=="pr1" goto pr1
if "%LEVNAME%"=="pr2" goto pr2
if "%LEVNAME%"=="pr3" goto pr3
if "%LEVNAME%"=="prboss" goto prboss
if "%LEVNAME%"=="prbonus" goto prbonus
if "%LEVNAME%"=="prtest" goto prtest

if "%LEVNAME%"=="GENERIC" goto generic
if "%LEVNAME%"=="generic" goto generic

if "%LEVNAME%"=="HUB1" goto hub1
if "%LEVNAME%"=="HUB2" goto hub2
if "%LEVNAME%"=="HUB3" goto hub3
if "%LEVNAME%"=="HUB4" goto hub4
if "%LEVNAME%"=="HUB5" goto hub5
if "%LEVNAME%"=="HUB6" goto hub6
if "%LEVNAME%"=="HUB7" goto hub7
if "%LEVNAME%"=="HUB8" goto hub8
if "%LEVNAME%"=="WAYROOM" goto wayroom
if "%LEVNAME%"=="CAVE" goto cave
if "%LEVNAME%"=="hub1" goto hub1
if "%LEVNAME%"=="hub2" goto hub2
if "%LEVNAME%"=="hub3" goto hub3
if "%LEVNAME%"=="hub4" goto hub4
if "%LEVNAME%"=="hub5" goto hub5
if "%LEVNAME%"=="hub6" goto hub6
if "%LEVNAME%"=="hub7" goto hub7
if "%LEVNAME%"=="hub8" goto hub8
if "%LEVNAME%"=="wayroom" goto wayroom
if "%LEVNAME%"=="cave" goto cave


if "%LEVNAME%"=="TESTMESH" goto testmesh
if "%LEVNAME%"=="testmesh" goto testmesh


echo *** unrecognised level name %1 ***
pause

goto ending

:at1
set LEVNAME=AT1
set SUBDIR=L1
goto atlantis
:at2
set LEVNAME=AT2
set SUBDIR=L2
goto atlantis
:at3
set LEVNAME=AT3
set SUBDIR=L3
goto atlantis
:atboss
set LEVNAME=ATBOSS
set SUBDIR=BOSS
goto atlantis
:atbonus
set LEVNAME=ATBONUS
set SUBDIR=BONUS
set MMESH_ARGS=480
goto atlantis
:attest
set LEVNAME=ATTEST
set SUBDIR=TEST
goto atlantis


:ca1
set LEVNAME=CA1
set SUBDIR=L1
goto carnival
:ca2
set LEVNAME=CA2
set SUBDIR=L2
goto carnival
:ca3
set LEVNAME=CA3
set SUBDIR=L3
goto carnival
:caboss
set LEVNAME=CABOSS
set SUBDIR=BOSS
goto carnival
:cabonus
set LEVNAME=CABONUS
set SUBDIR=BONUS
goto carnival
:catest
set SUBDIR=TEST
goto carnival


:ff1
set LEVNAME=FF1
set SUBDIR=L1
goto fear
:ff2
set LEVNAME=FF2
set SUBDIR=L2
goto fear
:ff3
set LEVNAME=FF3
set SUBDIR=L3
goto fear
:ffboss
set LEVNAME=FFBOSS
set SUBDIR=BOSS
goto fear
:ffbonus
set LEVNAME=FFBONUS
set SUBDIR=BONUS
goto fear
:fftest
set LEVNAME=FFTEST
set SUBDIR=TEST
goto fear


:sp1
set LEVNAME=SP1
set SUBDIR=L1
goto space
:sp2
set LEVNAME=SP2
set SUBDIR=L2
goto space
:sp3
set LEVNAME=SP3
set SUBDIR=L3
goto space
:spboss
set LEVNAME=SPBOSS
set SUBDIR=BOSS
goto space
:spbonus
set LEVNAME=SPBONUS
set SUBDIR=BONUS
goto space
:sptest
set LEVNAME=SPTEST
set SUBDIR=TEST
goto space


:pr1
set LEVNAME=PR1
set SUBDIR=L1
goto prehist
:pr2
set LEVNAME=PR2
set SUBDIR=L2
goto prehist
:pr3
set LEVNAME=PR3
set SUBDIR=L3
goto prehist
:prboss
set LEVNAME=PRBOSS
set SUBDIR=BOSS
goto prehist
:prbonus
set LEVNAME=PRBONUS
set SUBDIR=BONUS
goto prehist
:prtest
set LEVNAME=PRTEST
set SUBDIR=TEST
goto prehist


:pi1
set LEVNAME=PI1
set SUBDIR=L1
goto pirates
:pi2
set LEVNAME=PI2
set SUBDIR=L2
goto pirates
:pi3
set LEVNAME=PI3
set SUBDIR=L3
goto pirates
:piboss
set LEVNAME=PIBOSS
set SUBDIR=BOSS
goto pirates
:pibonus
set LEVNAME=PIBONUS
set SUBDIR=BONUS
goto pirates
:pitest
set LEVNAME=PITEST
set SUBDIR=TEST
goto pirates




:hub1
set LEVNAME=HUB1
set SUBDIR=HUB1
goto hub
:hub2
set LEVNAME=HUB2
set SUBDIR=HUB2
goto hub
:hub3
set LEVNAME=HUB3
set SUBDIR=HUB3
goto hub
:hub4
set LEVNAME=HUB4
set SUBDIR=HUB4
goto hub
:hub5
set LEVNAME=HUB5
set SUBDIR=HUB5
goto hub
:hub6
set LEVNAME=HUB6
set SUBDIR=HUB6
goto hub
:hub7
set LEVNAME=HUB7
set SUBDIR=HUB7
goto hub
:hub8
set LEVNAME=HUB8
set SUBDIR=HUB8
goto hub
:wayroom
set LEVNAME=WAYROOM
set SUBDIR=WAYROOM
goto hub
:cave
set LEVNAME=CAVE
set SUBDIR=CAVE
goto hub




:atlantis
set LONGDIR1=ATLANTIS
set LONGDIR2=ATLANTIS
goto ending


:carnival
set LONGDIR1=CARNIVAL
set LONGDIR2=CARNIVAL
goto ending

:fear
set LONGDIR1=FEAR
set LONGDIR2=FORTRESS
goto ending

:space
set LONGDIR1=OOTW
set LONGDIR2=SPACE
goto ending

:prehist
set LONGDIR1=PREHIST
set LONGDIR2=PREHIST
goto ending

:pirates
set LONGDIR1=PIRATES
set LONGDIR2=PIRATES
goto ending

:hub
set LONGDIR1=HUB
set LONGDIR2=HUB
goto ending


:generic
set LEVNAME=GENERIC
set LONGDIR1=GENERIC
set LONGDIR2=GENERIC
set SUBDIR=
goto ending


:testmesh
set LEVNAME=TESTMESH
set LONGDIR1=TESTMESH
set LONGDIR2=TESTMESH
set SUBDIR=TESTMESH
goto ending



:ending

set GLOVWLD=c:\psx\whack\glovwld
set CWLDDIR=c:\psx\whack\glovwld\%LEVNAME%
set DESTDIR=c:\psx\whack\cd\worlds\%LONGDIR1%
set DESTFILE=c:\psx\whack\cd\worlds\%LONGDIR1%\%LEVNAME%.BFF
set XWORLD=x:\ateam\psx-glover99\worlds


