@rem *** Remember to edit the haze and shade colors of your world so that the
@rem *** terrain's fog blends in with the sky!

@rem --- Set this to the name of your world (ex. mars)
@set WORLDNAME=%1

@rem --- Some parameters for picaNew
@set RENDERSTART=1
@set RENDEREND=239

@echo off

rem --- Make sure the temporary files doesn't already exist
 del temp.rsp

rem --- Write the parameters to a temporary file
 echo masterRenderRange(%RENDERSTART%, %RENDEREND%) >> temp.rsp
 echo masterChooseRange(%RENDERSTART%, %RENDEREND%) >> temp.rsp
 echo shadeHazeLevels(16,16) >> temp.rsp
 echo hazeColor(20, 35, 20, 1.0) >> temp.rsp
 echo shadeColor(0, 0, 0, 1.0) >> temp.rsp
 echo palOutputName(ppl\%WORLDNAME%.d.ppl) >> temp.rsp
 echo paletteListStart() >> temp.rsp
 echo palettes\ipl\worlds\%WORLDNAME%-terrain.ipl >> temp.rsp
 echo palettes\ipl\worlds\%WORLDNAME%-skyd.ipl >> temp.rsp
 echo palettes\ipl\originals\*.ipl >> temp.rsp

rem --- Begin merging the palettes into a .PPL
 mpMerger -v4 @temp.rsp

rem --- Cleanup
 del temp.rsp

rem --- Write the parameters to a temporary file
 echo masterRenderRange(%RENDERSTART%, %RENDEREND%) >> temp.rsp
 echo masterChooseRange(%RENDERSTART%, %RENDEREND%) >> temp.rsp
 echo shadeHazeLevels(16,16) >> temp.rsp
 echo hazeColor(20, 35, 20, 1.0) >> temp.rsp
 echo shadeColor(0, 0, 0, 1.0) >> temp.rsp
 echo palOutputName(ppl\%WORLDNAME%.t.ppl) >> temp.rsp
 echo paletteListStart() >> temp.rsp
 echo palettes\ipl\worlds\%WORLDNAME%-terrain.ipl >> temp.rsp
 echo palettes\ipl\worlds\%WORLDNAME%-skyt.ipl >> temp.rsp
 echo palettes\ipl\originals\*.ipl >> temp.rsp

rem --- Begin merging the palettes into a .PPL
 mpMerger -v4 @temp.rsp

rem --- Cleanup
 del temp.rsp

rem --- Write the parameters to a temporary file
 echo masterRenderRange(%RENDERSTART%, %RENDEREND%) >> temp.rsp
 echo masterChooseRange(%RENDERSTART%, %RENDEREND%) >> temp.rsp
 echo shadeHazeLevels(16,16) >> temp.rsp
 echo hazeColor(20, 35, 20, 1.0) >> temp.rsp
 echo shadeColor(0, 0, 0, 1.0) >> temp.rsp
 echo palOutputName(ppl\%WORLDNAME%.n.ppl) >> temp.rsp
 echo paletteListStart() >> temp.rsp
 echo palettes\ipl\worlds\%WORLDNAME%-terrain.ipl >> temp.rsp
 echo palettes\ipl\worlds\%WORLDNAME%-skyn.ipl >> temp.rsp
 echo palettes\ipl\originals\*.ipl >> temp.rsp

rem --- Begin merging the palettes into a .PPL
 mpMerger -v4 @temp.rsp

rem --- Cleanup
 del temp.rsp