#!/bin/sh

NASM=nasm
DESTDIR=../fonts
VER_1914880_DEST=${DESTDIR}/s1914880
VER_1974272_DEST=${DESTDIR}/s1974272
VER_NFLFEVERUS_DEST=${DESTDIR}/nfl-fever-2003-us-s1916928

compile() {
    ${NASM} -d${2} -o ${1}/bert-generic.xtf bert-generic.asm

    for i in ${3} ; do
	${NASM} -d${2} -dMS_${i}_01 -o ${1}/bert-${i}-01.xtf bert-specific.asm
    done
}

mkdir -p $VER_1914880_DEST
mkdir -p $VER_1974272_DEST
mkdir -p $VER_NFLFEVERUS_DEST

${NASM} -o ${DESTDIR}/ernie.xtf ernie.asm
compile $VER_1914880_DEST VER_1914880 "3944 4034 4627 4817 5101 5530"
compile $VER_1974272_DEST VER_1974272 "3944 4034 4627 4817 5101 5530"
compile $VER_NFLFEVERUS_DEST VER_NFLFEVERUS "3944 4034 4627 4817 5101 5530 5713 5838"
