diff -ru bod-src-4/Makefile /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/Makefile --- bod-src-4/Makefile Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/Makefile Thu Feb 26 00:18:17 2004 @@ -1,10 +1,10 @@ -# BOD#4 +# BOD#4a CC=cc CFLAGS=-O -I/usr/include/SDL -I. LFLAGS= LIBS=-lpthread -lSDL -VERS=4 +VERS=4a TARGETS=virtri virsun virdev vir303 TARGETSWIN=virtri.exe virsun.exe virdev.exe vir303.exe diff -ru bod-src-4/bod.c /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/bod.c --- bod-src-4/bod.c Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/bod.c Thu Feb 26 00:18:17 2004 @@ -166,7 +166,7 @@ }; static void MD5Init (struct MD5Context *context); -static void MD5Update (struct MD5Context *context, unsigned char *buf, +static void MD5Update (struct MD5Context *context, unsigned char *buf, unsigned long len); static void MD5Final (unsigned char *digest, struct MD5Context *ctx); static void MD5Transform (uint32 *buf, uint32 *in); @@ -251,7 +251,7 @@ } /* - * Final wrapup - pad to 64-byte boundary with the bit pattern + * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ static void MD5Final(unsigned char *digest, struct MD5Context *ctx) @@ -526,7 +526,7 @@ data=(char*)calloc_(datasize); #endif - + for (i=0; idigest, digest, 16)) break; diff -ru bod-src-4/links.html /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/links.html --- bod-src-4/links.html Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/links.html Thu Feb 26 00:18:17 2004 @@ -1,7 +1,6 @@
 Tribes final
-
 Tribes party
 
 Sunflower
@@ -10,4 +9,5 @@
 
 303
 303 fix though i doubt it really does much good
+
diff -ru bod-src-4/vir303.c /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/vir303.c --- bod-src-4/vir303.c Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/vir303.c Thu Feb 26 00:18:17 2004 @@ -493,7 +493,7 @@ playCount = playTmrCount; NextTimer(); - + oldPlayCount = playTmrCount; PollMIDAS(); @@ -879,12 +879,12 @@ static void help () { - printf ("Virtual 303 v0.90\n%s\n", bodby); + printf ("Virtual 303 v0.90a\n%s\n", bodby); printf ("Portions Copyright 1996 Petteri Kangaslampi and Jarno Paananen\n\n" "Usage: vir303 [options]\nOptions are:\n" " -h Show this screen\n" " -mute Do not output sound\n" - " -f fullscreen\n" + " -f Run in fullscreen\n" "Keys: q, esc - quit, f - toggle fullscreen\n\n"); exit (0); } diff -ru bod-src-4/virdev.c /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/virdev.c --- bod-src-4/virdev.c Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/virdev.c Thu Feb 26 00:18:17 2004 @@ -339,7 +339,7 @@ static void setup_midas () { dword *sd = (dword *)LOC_SB; - + DLOC (MIDASSOUNDDEVICES) = LOC_SB; DLOC (MIDASSOUNDDEVICES + 4) = LOC_NOSOUND; @@ -513,12 +513,12 @@ static void help () { - printf ("Virtual Devotion v0.91\n%s\n", bodby); + printf ("Virtual Devotion v0.91a\n%s\n", bodby); printf ("Portions Copyright 1996 Petteri Kangaslampi and Jarno Paananen\n\n" "Usage: virdev [options]\nOptions are:\n" " -h Show this screen\n" " -mute Do not output sound\n" - " -f fullscreen\n" + " -f Run in fullscreen\n" "Keys: q, esc - quit, f - toggle fullscreen\n\n"); exit (0); } @@ -557,7 +557,7 @@ i = load_image (exename, infotab); objtab = infotab[i]->objtab; inject_trampolines (infotab[i]); - + setup_midas (); apply_patches (); return start (); diff -ru bod-src-4/virsun.c /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/virsun.c --- bod-src-4/virsun.c Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/virsun.c Thu Feb 26 00:18:17 2004 @@ -104,7 +104,10 @@ static int mute = 0; static int escape, quit; static int first_mode = 2; -static char exename[] = "sunflower.exe"; +static int audio_format = AUDIO_S16LSB; +static char exename1[] = "sunflow.exe"; +static char exename2[] = "sunflower.exe"; +static char *exename; static void USS_SDL_Play (void *udata, Uint8 *stream, int len) { @@ -140,7 +143,7 @@ if (mute) return 0; wanted.freq = 44100; - wanted.format = AUDIO_U16; + wanted.format = audio_format; wanted.channels = 2; wanted.samples = 4096; wanted.callback = USS_SDL_Play; @@ -229,7 +232,7 @@ Uint32 ticks = SDL_GetTicks (); for (i = 0; i < (ticks - timers[n].ticks) / timers[n].speed; i++) lcall (1193180/FACTOR, timers[n].proc); - + timers[n].ticks = ticks - ((ticks - timers[n].ticks) % timers[n].speed); return interval; } @@ -368,7 +371,7 @@ si[5] = 2; *(short **)(si + 0xe) = m; *(short *)(si + 0x12) = 0x2000; - + for (i = first_mode; i < sizeof (modes) / sizeof (struct mode_desc); i++) *m++ = i + MODEBIAS; @@ -390,7 +393,7 @@ case 0x4f01: setupModeInfo (PECX (Pr), DLOC (MODE_INFO_LINEAR)); - + PCFL (Pr) = 0; PEAX (Pr) = 0x4f; WCFL (Or) = 0; @@ -719,7 +722,7 @@ bb[0x6548] = 0xeb; bb[0x6549] = 0x4; - + bb[0x6558] = 0xeb; bb[0x6559] = 0x01; @@ -737,7 +740,7 @@ bb[0x6f5a] = 0x00; bb[0x6f5b] = 0x00; bb[0x6f5c] = 0x00; - + bb[0x6f5d] = 0xeb; bb[0x6f5e] = 0x1a-8; @@ -783,7 +786,8 @@ static int start () { - static char *argv[] = {exename, 0}; + static char *argv[] = {NULL, 0}; + argv[0] = exename; lcall (255, LOC___INITRTNS); return ((int (*)(int, char**))LOC_ENTRY) (sizeof (argv) / 4 - 1, argv); } @@ -809,11 +813,12 @@ static void help () { - printf ("Virtual Sunflower v0.92\n%s\n", bodby); + printf ("Virtual Sunflower v0.92a\n%s\n", bodby); printf ("Bits by Freddy 'FreddyV' Vetele and Jurjen 'Nix' Katsman\n\n" "Usage: virsun [options]\nOptions are:\n" " -h Show this screen\n" - " -f fullscreen\n" + " -f Run in fullscreen\n" + " -a Try alternate audio mode\n" " -mute Do not output sound\n" " -m0 640x480\n" " -m1 640x400\n" @@ -871,6 +876,7 @@ int main (int argc, char **argv) { int i; + FILE *tf; #ifdef DEBUG chdir ("data"); @@ -880,6 +886,7 @@ mute |= !strcmp (argv[i], "-mute"); if (!strcmp (argv[i], "-f")) vid_flags |= SDL_FULLSCREEN; if (!strcmp (argv[i], "-h")) help (); + if (!strcmp (argv[i], "-a")) audio_format = AUDIO_U16LSB; if (!strcmp (argv[i], "-m0")) first_mode = 0; if (!strcmp (argv[i], "-m1")) first_mode = 2; if (!strcmp (argv[i], "-m2")) first_mode = 4; @@ -900,10 +907,17 @@ signal (SIGTRAP, sigtrap); #endif + tf = fopen (exename1, "rb"); + if (tf) { + exename = exename1; + fclose (tf); + } else { + exename = exename2; + } i = load_image (exename, infotab); objtab = infotab[i]->objtab; inject_trampolines (infotab[i]); - + apply_patches (); return start (); diff -ru bod-src-4/virtri.c /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/virtri.c --- bod-src-4/virtri.c Tue Jan 28 05:34:52 2003 +++ /mnt/big/npf/code/src/bod/bod/rel/bod-src-4/bod-src-4/bod-src-4a/virtri.c Thu Feb 26 00:18:17 2004 @@ -46,6 +46,7 @@ static Uint8 vid_buf[640*480*2]; static SDL_Surface *surface; static int mute, final; +static int audio_format = AUDIO_S16LSB; static char exename[] = "tribes.exe"; static int escape, quit; @@ -121,7 +122,7 @@ if (mute) return 0; wanted.freq = 44100; - wanted.format = AUDIO_U16; + wanted.format = audio_format; wanted.channels = 2; wanted.samples = 2048; wanted.callback = USS_SDL_Play; @@ -210,7 +211,7 @@ for (i = 0; i < (ticks - timers[n].ticks) / timers[n].speed; i++) lcall (1193180/100, timers[n].proc); - + timers[n].ticks = ticks - ((ticks - timers[n].ticks) % timers[n].speed); return interval; } @@ -653,13 +654,14 @@ static void help () { - printf ("Tribes 5th aniversary edition 0.93\n%s\n", bodby); + printf ("Tribes 5th aniversary edition 0.93a\n%s\n", bodby); printf ("Bits by " "Freddy 'FreddyV' Vetele, Jurjen 'Nix' Katsman," " Glenn 'Gaffer' Fiedler\n\n" "Usage: virtri [options]\nOptions are:\n" " -h Show this screen\n" - " -f fullscreen\n" + " -f Run in fullscreen\n" + " -au Try alternate audio mode\n" " -mute Do not output sound\n" "Keys: q - quit, f - toggle fullscreen, " "esc - skip part(party version only)\n\n"); @@ -702,6 +704,7 @@ mute |= !strcmp (argv[i], "-mute"); if (!strcmp (argv[i], "-h")) help (); if (!strcmp (argv[i], "-f")) vid_flags |= SDL_FULLSCREEN; + if (!strcmp (argv[i], "-a")) audio_format = AUDIO_U16LSB; } SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO