#!/bin/sh
# AUTHOR Krusty/Benediction
# DATA 13 may 2009
#
# Extract windows from the file and convert them into displaying code

WINDOWS="LIVE2.WIN \
         LIVEN.WIN \
         LIVEE.WIN \
         LIVES.WIN \
         LIVEO.WIN \
         LIVENESO.WIN \
         LIVENESO2.WIN \
         LIVE3.WIN \
         LIVE4.WIN \
         LIVEDEAD.WIN \
         LIVENEO.WIN \
        LIVENE.WIN \
        LIVENO.WIN\
        LIVESE.WIN\
        LIVESO.WIN\
        LIVESO.WIN\
        LIVENES.WIN\
        LIVENEO.WIN\
        LIVENSO.WIN\
        LIVE.WIN\
        LIVENS.WIN\
        LIVENS2.WIN\
        LIVEEO.WIN\
         LIVEE2.WIN \
         LIVEEO2.WIN \
         LIVESO2.WIN \
         LIVEN2.WIN \
         LIVEN2.WIN \
         LIVENE2.WIN \
         LIVENEO2.WIN \
         LIVENES2.WIN \
         LIVENO2.WIN \
         LIVENSO2.WIN \
         LIVEO2.WIN \
         LIVES2.WIN \
         LIVESE2.WIN \
         LIVESO2.WIN \
         LIVEESO.WIN \
         LIVEESO2.WIN \
         CURSO16.WIN\
"
IDSK=iDSK
#DSK=gfx.dsk 
DSK=jeudelavie.dsk
CONVERT=./win2z80.py
$IDSK $DSK -g TITRE1.WIN || exit
$IDSK $DSK -g TITRE2.WIN || exit

$IDSK $DSK -g CURSO16M.WIN
$IDSK $DSK -g CURSO16M.PAL
$IDSK $DSK -g CURSO16.WIN
$IDSK $DSK -g CURSO16.PAL
$IDSK $DSK -g CURSOR.WIN
$IDSK $DSK -g CURSOR.PAL


for window in $WINDOWS
do
  #Get window file
  echo "$IDSK $DSK -g $window"
  $IDSK $DSK -g $window || exit

  #build code
  $CONVERT $window
done
