opt = -otexan
#opt = -od
-def = -dM_PI=3.141592653589793 -dUSE_HLT
-libs = imago.lib anim.lib midas.lib
+def = -dM_PI=3.141592653589793 -dUSE_HLT -dNO_SOUND
+libs = imago.lib anim.lib
+# midas.lib
AS = nasm
CC = wcc386
+#ifndef NO_SOUND
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void au_shutdown(void)
{
+ printf("au_shutdown\n");
if(curmod) {
au_stop_module(curmod);
}
#endif
}
}
+
+#else /* NO_SOUND */
+#include "audio.h"
+
+static int vol_master, vol_mus, vol_sfx;
+
+int au_init(void)
+{
+ vol_master = vol_mus = vol_sfx = 255;
+ return 0;
+}
+
+void au_shutdown(void)
+{
+ printf("au_shutdown\n");
+}
+
+struct au_module *au_load_module(const char *fname)
+{
+ return 0;
+}
+
+void au_free_module(struct au_module *mod)
+{
+}
+
+int au_play_module(struct au_module *mod)
+{
+ return -1;
+}
+
+void au_update(void)
+{
+}
+
+int au_stop_module(struct au_module *mod)
+{
+ return -1;
+}
+
+int au_module_state(struct au_module *mod)
+{
+ return AU_STOPPED;
+}
+
+int au_volume(int vol)
+{
+ AU_VOLADJ(vol_master, vol);
+ return vol_master;
+}
+
+int au_sfx_volume(int vol)
+{
+ AU_VOLADJ(vol_sfx, vol);
+ return vol_sfx;
+}
+
+
+int au_music_volume(int vol)
+{
+ AU_VOLADJ(vol_mus, vol);
+ return vol_mus;
+}
+#endif /* NO_SOUND */
return 1;
}
- if((vmidx = match_video_mode(640, 480, 16)) == -1) {
+ if((vmidx = match_video_mode(FB_WIDTH, FB_HEIGHT, FB_BPP)) == -1) {
return 1;
}
if(!(vmem = set_video_mode(vmidx, 1))) {
/* TODO hardcoding the 16bpp changes for now, generalize later
* and while we're at it, let's get rid of the mul too ...
*/
- "\tsection .text\n"
+ "\tsection .text USE32\n"
"\tglobal %s\n"
"\tglobal _%s\n"
"\tglobal %s_\n"
cp demo.exe $destdir
rm -f $destdir/data/*
cp data/* $destdir/data/
+ mkdir -p $destdir/libs/mikmod
+ cp libs/midas/midas.lib libs/midas/libmidas.a $destdir/libs/midas
fi
findsrc()
{
find . -name '*.c' -o -name '*.h' -o -name '*.asm' -o -name '*.inc' \
- -o -name '*.inl' -o -name Makefile.dj | sed 's/\.\///'
+ -o -name '*.inl' -o -name Makefile.dj -o -name Makefile | sed 's/\.\///'
}
for i in `findsrc`; do
dir=`dirname $i`
mntpt=/pcem_dos
do_umount=false
-if ! ( mount | grep pcem ); then
+if ! ( mount | grep pcem >/dev/null ); then
mount $mntpt || exit 1
do_umount=true
fi