[comp.sources.games] v12i049: pc-xbd - Boulder Dash for PC-VGA, Patch2b

billr@saab.tek.com (Bill Randle) (03/09/91)

Submitted-by: soulard@fantasio.inria.fr (Herve Soulard)
Posting-number: Volume 12, Issue 49
Archive-name: pc-xbd/Patch2b
Patch-To: pc-xbd: Volume 11, Issue 81-83
Environment: PC, MS-DOS


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 2 (of 4)."
# Contents:  bitmaps/xbdlv100 patches02 sound.c sound.h sound_as.asm
# Wrapped by billr@saab on Fri Mar  8 16:13:13 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'bitmaps/xbdlv100' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bitmaps/xbdlv100'\"
else
echo shar: Extracting \"'bitmaps/xbdlv100'\" \(966 characters\)
sed "s/^X//" >'bitmaps/xbdlv100' <<'END_OF_FILE'
X25 35 10 122 10 100 200 230 1250 Cruise_Eater by lotridge@bnl.gov
XSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
XSgggSSgggSSgggSSgggSWgbbbbbbbbbbbbS
XSgggSSgggSSgggSSgggSWgwbbbbbbbbbbbS
XSgggggggggggggggggggggSgbbbbbbbbbbS
XSSSgSSSSgSSSSgSSSSgSSSSgbdbbwwwwwwS
XSglglgglglgglglgglglglglgggg gggdgS
XSlg gngg gngg gngg gnSSgggtg gggWgS
XSgg dgbg dgbg dgbg dgSgggggg gggggS
XSllgbgglgbgglgbgglgbgSWggggg gggggS
XSbglgggglgggglgggglggSgggggg     gS
XSggggbdgggbdgggbdggggSWgtggWwwWg gS
XSgglgglblgglblgglblggSgggggggggw gS
XSgggglgggglgggglgggggSgggggggWgwlgS
XSblgggblgggblgggblgggSWgWgtggWggggS
XSggb gggb gggb gggbglSggggggggwwggS
XElglglgglglgglglggglgSgggggggggWggS
XSgggnggggnggggnggggnbSWgWgWgtggWggS
XSSSSSSSSSSSSSSSSSSSSSSgggggggggwggS
XSdddddddddddddddddd eSggggggggggggS
XSddddddddddddddddddd SWgWgWgWgtgggS
XSSSSSSSSSSSSSSSSSSdSdSggggggggggggS
XSdddddddddddddddddddgSWpWgWgWgggggS
XSdSdSSSSSSSSSSSSSSSSSSggggggggggggS
XSgddddddddddddddddddddggggggggggggS
XSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
END_OF_FILE
if test 966 -ne `wc -c <'bitmaps/xbdlv100'`; then
    echo shar: \"'bitmaps/xbdlv100'\" unpacked with wrong size!
fi
# end of 'bitmaps/xbdlv100'
fi
if test -f 'patches02' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patches02'\"
else
echo shar: Extracting \"'patches02'\" \(40831 characters\)
sed "s/^X//" >'patches02' <<'END_OF_FILE'
X*** Makefile	Sat Dec  1 13:16:56 1990
X--- ../todo/pc-xbd2/Makefile	Fri Mar  8 15:58:08 1991
X***************
X*** 4,11 ****
X  BITMAP		= bitmap.exe
X  GAME            = xbd.exe
X  EDITOR          = xbde.exe
X  
X! PROGRAMS        = ${BITMAP} ${GAME} ${EDITOR}
X  
X  #CFLAGS  	= /AS /Zi /Gs 
X  #LDFLAGS	= /Stack:8192 /CO /NOE /NOI
X--- 4,12 ----
X  BITMAP		= bitmap.exe
X  GAME            = xbd.exe
X  EDITOR          = xbde.exe
X+ CONVERT         = convert.exe
X  
X! PROGRAMS        = ${BITMAP} ${GAME} ${EDITOR} ${CONVERT}
X  
X  #CFLAGS  	= /AS /Zi /Gs 
X  #LDFLAGS	= /Stack:8192 /CO /NOE /NOI
X***************
X*** 14,39 ****
X  CFLAGS 		= /AS /Ot /Gs
X  LDFLAGS		= /Stack:8192 /NOE /NOI
X  ASFLAGS		= /Mx
X  
X! LEVELS          = xbdlev001 xbdlev002 xbdlev003 xbdlev004 xbdlev005 \
X!                   xbdlev006 xbdlev007 xbdlev008 xbdlev009 xbdlev010 \
X!                   xbdlev011 xbdlev012 xbdlev013 xbdlev014 xbdlev015 \
X!                   xbdlev016 xbdlev017 xbdlev018 xbdlev019 xbdlev020 \
X!                   xbdlev021 xbdlev022 xbdlev023 xbdlev024 xbdlev025 \
X!                   xbdlev026 xbdlev027 xbdlev028 xbdlev029 xbdlev030 \
X!                   xbdlev031 xbdlev032 xbdlev033 xbdlev034 xbdlev035 \
X!                   xbdlev036 xbdlev037 xbdlev038
X! 
X! OBJS1   = xbd.obj shared.obj field.obj scores.obj graph.obj
X  OBJS2   = xbde.obj shared.obj graph.obj
X  OBJS3   = bitmap.obj graph.obj
X  
X! SRCS1   = xbd.obj shared.obj field.obj scores.obj graph.obj
X  SRCS2   = xbde.obj shared.obj graph.obj
X  SRCS3   = bitmap.obj graph.obj
X  
X  
X- 
X  all:: ${PROGRAMS}
X  
X  ${GAME}: ${OBJS1}
X--- 15,43 ----
X  CFLAGS 		= /AS /Ot /Gs
X  LDFLAGS		= /Stack:8192 /NOE /NOI
X  ASFLAGS		= /Mx
X+    
X+ LEVELS          = xbdlv001 xbdlv002 xbdlv003 xbdlv004 xbdlv005 \
X+                   xbdlv006 xbdlv007 xbdlv008 xbdlv009 xbdlv010 \
X+                   xbdlv011 xbdlv012 xbdlv013 xbdlv014 xbdlv015 \
X+                   xbdlv016 xbdlv017 xbdlv018 xbdlv019 xbdlv020 \
X+                   xbdlv021 xbdlv022 xbdlv023 xbdlv024 xbdlv025 \
X+                   xbdlv026 xbdlv027 xbdlv028 xbdlv029 xbdlv030 \
X+                   xbdlv031 xbdlv032 xbdlv033 xbdlv034 xbdlv035 \
X+                   xbdlv036 xbdlv037 xbdlv038 xbdlv100
X  
X! OBJS1   = xbd.obj shared.obj field.obj scores.obj graph.obj sound.obj \
X! 	  sound_as.obj
X  OBJS2   = xbde.obj shared.obj graph.obj
X  OBJS3   = bitmap.obj graph.obj
X+ OBJS4   = convert.obj
X  
X! SRCS1   = xbd.obj shared.obj field.obj scores.obj graph.obj sound.obj \
X! 	  sound_as.obj
X  SRCS2   = xbde.obj shared.obj graph.obj
X  SRCS3   = bitmap.obj graph.obj
X+ SRCS4	= convert.obj
X  
X  
X  all:: ${PROGRAMS}
X  
X  ${GAME}: ${OBJS1}
X***************
X*** 54,58 ****
X  clean::
X  	$(RM) ${EDITOR}
X  
X  
X! 
X--- 58,65 ----
X  clean::
X  	$(RM) ${EDITOR}
X  
X+ ${CONVERT}: ${OBJS4}
X+ 	$(LINK) $(LDFLAGS) ${OBJS4};
X  
X! clean::
X! 	$(RM) ${CONVERT}
X*** bitmap.c	Sat Dec  1 13:08:26 1990
X--- ../todo/pc-xbd2/bitmap.c	Fri Mar  8 15:58:24 1991
X***************
X*** 108,120 ****
X  	ptrBitmap = bitmap[num];
X  	makePgm(ptrBitmap,pgms[num]);
X  	
X! 	drawPgm(num * 3,8,pgms[num],_GPSET);
X  
X! 	_settextposition(3,0);
X  	_outtext("                                                                               ");
X- 	_settextposition(3,1 + (num * 3));
X- 	_outtext("^");
X  	
X  	_settextposition(5,50);
X  	_outtext("                    ");
X  	_settextposition(5,50);
X--- 108,121 ----
X  	ptrBitmap = bitmap[num];
X  	makePgm(ptrBitmap,pgms[num]);
X  	
X! 	drawPgm(num, 1, pgms[num], _GPSET);
X  
X! 	_settextposition(3, 0);
X  	_outtext("                                                                               ");
X  	
X+ 	_setcolor(15);
X+ 	_rectangle(_GFILLINTERIOR, 7 + (16 * num), 36, 9 + (16 * num), 41);
X+ 	
X  	_settextposition(5,50);
X  	_outtext("                    ");
X  	_settextposition(5,50);
X***************
X*** 282,288 ****
X  	makePgms();
X  	
X  	for (aux=0;aux < MAXPGM; aux++)
X! 		drawPgm(aux * 3,8,pgms[aux],_GPSET);
X  
X  	drawBitmap(num);
X  
X--- 283,289 ----
X  	makePgms();
X  	
X  	for (aux=0;aux < MAXPGM; aux++)
X! 		drawPgm(aux, 1, pgms[aux], _GPSET);
X  
X  	drawBitmap(num);
X  
X*** field.c	Wed Nov 28 21:03:12 1990
X--- ../todo/pc-xbd2/field.c	Fri Mar  8 15:58:52 1991
X***************
X*** 15,27 ****
X  #include <signal.h>
X  #include <time.h>
X  #include <sys/timeb.h>
X  #include "xbd.h"
X  
X! void blink(i, j)
X! int	i, j;
X! {
X! 	field[i][j].changed = TRUE;
X! }
X  
X  
X  void move_cell(i, j, ii, jj)
X--- 15,24 ----
X  #include <signal.h>
X  #include <time.h>
X  #include <sys/timeb.h>
X+ 
X  #include "xbd.h"
X  
X! #define blink(i,j)	field[i][j].changed = TRUE;
X  
X  
X  void move_cell(i, j, ii, jj)
X***************
X*** 380,385 ****
X--- 377,383 ----
X  								case GRASS:
X  								case DIAMOND:
X  									if (field[ii][jj].content == DIAMOND) {
X+ 										playSound(sndWhizz);
X  										if (curorder == UP && field[ii][jj].speed)
X  											break;
X  										score += diapoints;
X***************
X*** 411,416 ****
X--- 409,415 ----
X  										else
X  											set_cell(ii, jj, SPACE);
X  										if (!levincreased) {
X+ 											playSound(sndYahoo);
X  											levelnum++;
X  											lives++;
X  											levincreased = TRUE;
X***************
X*** 508,513 ****
X--- 507,513 ----
X  							jjj++;
X  						break;
X  					case EXPLOSION:
X+ 						playSound(sndExplode);
X  						jjj = field[i][j].stage;
X  						if (!(jjj % 5)) {
X  							jjj++;		/* use jjj for setting new stage */
X***************
X*** 622,630 ****
X  		tgc = (tgc == tgc1) ? tgc2 : tgc1;
X  	if (!diareq) {
X  		Egc = (Egc == Egc1) ? Egc2 : Egc1;
X! 	if (diareq == 0) {
X! 		diapoints = extradiapoints;
X! 		scoreobs = TRUE;
X  	}
X- }
X  }
X--- 622,630 ----
X  		tgc = (tgc == tgc1) ? tgc2 : tgc1;
X  	if (!diareq) {
X  		Egc = (Egc == Egc1) ? Egc2 : Egc1;
X! 		if (diareq == 0) {
X! 			diapoints = extradiapoints;
X! 			scoreobs = TRUE;
X! 		}
X  	}
X  }
X*** graph.asm	Tue Nov 27 21:10:38 1990
X--- ../todo/pc-xbd2/graph.asm	Fri Mar  8 15:59:04 1991
X***************
X*** 6,11 ****
X--- 6,53 ----
X  
X  
X  
X+ ;-----	Appel d'une fonction DOS.
X+ ;
X+ WRITE_BM	MACRO	
X+ 
X+ 	movsw				; 16 words to write for
X+ 	add	di, cx			; drawing the bitmap in 
X+ 	movsw				; the active plan
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 	movsw
X+ 	add	di, cx
X+ 
X+ 
X+ 		ENDM
X+ 
X+ 
X+ 
X  	.MODEL	SMALL
X  
X  
X***************
X*** 32,42 ****
X  	mov	es, ax
X  
X  	mov	ax, word ptr [BP+06h]	; y
X! 	mov	bx, 80
X! 	mul	bx
X! 	add	ax, word ptr [BP+04h]	; x
X! 	mov	di, ax
X  
X  	mov	si, word ptr [BP+08h]	; pgm
X  	add	si, 4
X  
X--- 74,91 ----
X  	mov	es, ax
X  
X  	mov	ax, word ptr [BP+06h]	; y
X! 	mov	bx, ax
X! 	mov	cl, 10
X! 	shl	bx, cl			; y * 64 * 16
X! 	mov	cl, 8
X! 	shl	ax, cl			; y * 16 * 16
X  
X+ 	add	bx, ax			; y * 80 = (y * 64) + (y * 16) 
X+ 
X+ 	mov	ax, word ptr [BP+04h]	; x
X+ 	shl	ax, 1
X+ 	add	bx, ax
X+ 
X  	mov	si, word ptr [BP+08h]	; pgm
X  	add	si, 4
X  
X***************
X*** 57,115 ****
X  
X  
X  	mov	dx, 03C4h
X! 	mov	bx, 78
X  
X  
X! 	push	di
X! 	mov	cx, 16	
X  	mov	ax, 0102h		; Enable PLAN 0
X  	out	dx, ax
X! l1:
X! 	movsw
X! 	add	di, bx
X! 	loop	l1
X! 	pop	di
X  
X! 
X! 	push	di
X! 	mov	cx, 16
X  	shl	ah, 1			; Enable PLAN 1
X  	out	dx, ax
X! l2:
X! 	movsw
X! 	add	di, bx
X! 	loop	l2
X! 	pop	di
X  
X! 
X! 	push	di
X! 	mov	cx, 16
X  	shl	ah, 1			; Enable PLAN 2
X  	out	dx, ax
X! l3:
X! 	movsw
X! 	add	di, bx
X! 	loop	l3
X! 	pop	di
X  
X! 
X! 	mov	cx, 16
X  	shl	ah, 1			; Enable PLAN 3
X  	out	dx, ax
X! l4:
X! 	movsw
X! 	add	di, bx
X! 	loop	l4
X! 
X  	
X  	mov	ax, 0F02h
X  	out	dx, ax
X  
X  	mov	dx, 03CEh
X! 	
X! 	mov	ax, 0000h
X  	out	dx, ax
X! 	mov	ax, 0001h
X  	out	dx, ax
X  	mov	ax, 0FF08h
X  	out	dx, ax
X--- 106,142 ----
X  
X  
X  	mov	dx, 03C4h
X! 	mov	cx, 78
X  
X  
X! 	mov	di, bx
X  	mov	ax, 0102h		; Enable PLAN 0
X  	out	dx, ax
X! 	WRITE_BM
X  
X! 	mov	di, bx
X  	shl	ah, 1			; Enable PLAN 1
X  	out	dx, ax
X! 	WRITE_BM
X  
X! 	mov	di, bx
X  	shl	ah, 1			; Enable PLAN 2
X  	out	dx, ax
X! 	WRITE_BM
X  
X! 	mov	di, bx
X  	shl	ah, 1			; Enable PLAN 3
X  	out	dx, ax
X! 	WRITE_BM
X  	
X  	mov	ax, 0F02h
X  	out	dx, ax
X  
X  	mov	dx, 03CEh
X! 
X! 	xor	ax, ax			; ax = 0000h
X  	out	dx, ax
X! 	inc	ax			; ax = 0001h
X  	out	dx, ax
X  	mov	ax, 0FF08h
X  	out	dx, ax
X*** patchlev.h	Mon Nov  5 02:46:22 1990
X--- ../todo/pc-xbd2/patchlev.h	Fri Mar  8 15:59:11 1991
X***************
X*** 1 ****
X! #define PATCHLEVEL 0
X--- 1 ----
X! #define PATCHLEVEL 2
X*** readme.pc	Sat Dec  1 13:14:54 1990
X--- ../todo/pc-xbd2/readme.pc	Fri Mar  8 15:59:19 1991
X***************
X*** 36,41 ****
X--- 36,42 ----
X  	- XBD.EXE, the game,
X  	- XBDE.EXE, level editor for XBD.EXE,
X  	- BITMAP.EXE, bitmap editor for XBD.EXE.
X+ 	- CONVERT.EXE, convert raw sound file to my format.
X  
X  
X  
X***************
X*** 47,53 ****
X  
X  	You also need to copied some files to the play directory or
X  	another one. This later one can be set in the file XBD.H
X! 	with the LIB define, or with the XBDLIB environment variable.
X  		
X  	Those files are :
X  		- xbdlv*, levels for the game,
X--- 48,55 ----
X  
X  	You also need to copied some files to the play directory or
X  	another one. This later one can be set in the file XBD.H
X! 	with the LIB define, or with the XBDLIB environment variable
X! 	(default to .\lib).
X  		
X  	Those files are :
X  		- xbdlv*, levels for the game,
X***************
X*** 55,61 ****
X  		- bitmaps.dat, all bitmaps used by the game,
X  		- scores, all scores.
X  
X! 	You find those files in the BITMAPS directory.
X  
X  
X  	If you want your real name in the score file, you must set
X--- 57,63 ----
X  		- bitmaps.dat, all bitmaps used by the game,
X  		- scores, all scores.
X  
X! 	You find those files in the LIB directory.
X  
X  
X  	If you want your real name in the score file, you must set
X***************
X*** 67,73 ****
X  -----------
X  
X  	The Makefile is writen for GMAKE (GNU make) and use the
X! 	Microsoft C compiler and Assembler. 
X  
X  
X  
X--- 69,75 ----
X  -----------
X  
X  	The Makefile is writen for GMAKE (GNU make) and use the
X! 	Microsoft C compiler (6.0) and Assembler (5.0).
X  
X  
X  
X***************
X*** 74,81 ****
X  XBD.EXE
X  -------
X  
X! 	Usage : XBD [-l level]
X  
X  	The goal is to collect the more of diamonds, the exit to next
X  	level will blink when you will get enough diamond. New level
X  	gives you one life more. For each level you have a limited
X--- 76,87 ----
X  XBD.EXE
X  -------
X  
X! 	Usage : XBD [-l level] [-s]
X  
X+ 		-l -> starting level.
X+ 		-s -> disable digitized sounds.
X+ 
X+ 
X  	The goal is to collect the more of diamonds, the exit to next
X  	level will blink when you will get enough diamond. New level
X  	gives you one life more. For each level you have a limited
X***************
X*** 85,90 ****
X--- 91,97 ----
X  	Keys used within the game :
X  
X  		- ARROWS, move the guy,
X+ 		- CTRL-ARROWS, dig around the guy,
X  		- 'R' or 'r', redraw the screen,
X  		- 'D' or 'd', kill the guy,
X  		- SPACE, pauses the game,
X***************
X*** 96,101 ****
X--- 103,113 ----
X  
X  	Usage : XBDE [-h heigth] [-w width] -l level
X  
X+ 		-h -> heigth of the level screen.
X+ 		-w -> width of the level screen.
X+ 		-l -> level to be editied.
X+ 
X+ 
X  	With XBDE you can edit the level files for XBD. Those files
X  	must be in the current directory, or in the directory
X  	precised by XBDLIB.
X***************
X*** 123,128 ****
X--- 135,141 ----
X  
X  	Usage : BITMAP
X  
X+ 
X  	This program allows you to edit all bitmaps available in the
X  	BITMAPS.DAT file. This file must be in the current directory,
X  	and after editing you must copy it in the play directory or
X***************
X*** 148,151 ****
X  
X  	On the left of all colors a square indicates the current
X  	color, and on the right another square gives the color of the
X! 	current pixel.
X--- 161,191 ----
X  
X  	On the left of all colors a square indicates the current
X  	color, and on the right another square gives the color of the
X! 	current pixel.
X! 
X! 
X! 
X! CONVERT.EXE
X! -----------
X! 
X! 	Usage : CONVERT  <InFile> <Hertz> <OutFile> <Comment>
X! 
X! 		InFile  -> name of raw sound file.
X! 		Hertz   -> digitize frequency of InFile.
X! 		OutFile -> name of my format file.
X! 		Comment -> comment to add to the OutFile.
X! 
X! 
X! 	This program convert a raw sampled sound file to my own format.
X! 	Each sampled is supposed to be a 8 bits value with the middle
X! 	value to 128. You have to give the frequency this file is 
X! 	digitized with.
X! 
X! 	The OutFile is composed of the datas from the InFile with an 
X! 	header describing the sound. I recommend to use the '.PSF' 
X! 	extension for this file.
X! 
X! 	You can add a comment to the file, like the title of the sound, 
X! 	up to 250 characters.
X! 
X! 	
X*** scores	Thu Nov 29 23:38:22 1990
X--- ../todo/pc-xbd2/scores	Fri Mar  8 15:59:46 1991
X***************
X*** 15,20 ****
X  1160 37 37 houttuin 
X  1120 77 78 houttuin 
X  1110 2 3 houttuin 
X  1020 77 77 houttuin 
X  972 2 3 (null) 
X- 960 25 25 houttuin 
X--- 15,20 ----
X  1160 37 37 houttuin 
X  1120 77 78 houttuin 
X  1110 2 3 houttuin 
X+ 1062 2 3 Herv 
X  1020 77 77 houttuin 
X  972 2 3 (null) 
X*** scores.c	Wed Nov 28 21:03:36 1990
X--- ../todo/pc-xbd2/scores.c	Fri Mar  8 15:59:55 1991
X***************
X*** 105,111 ****
X  			next.desc, next.elev, next.slev, next.score);
X  	}
X  	/* Save new high score list to score file */
X! 	sprintf(buf, "%s/scores", LIB);
X  	sfile = fopen(buf, "w");
X  	if (sfile == NULL) {
X  		perror(buf);
X--- 105,115 ----
X  			next.desc, next.elev, next.slev, next.score);
X  	}
X  	/* Save new high score list to score file */
X! 	if (aux = getenv("XBDLIB"))
X! 		sprintf(buf, "%s/scores", aux);
X! 	else
X! 		sprintf(buf, "%s/scores", LIB);
X! 	
X  	sfile = fopen(buf, "w");
X  	if (sfile == NULL) {
X  		perror(buf);
X*** shared.c	Thu Nov 29 11:46:54 1990
X--- ../todo/pc-xbd2/shared.c	Fri Mar  8 16:00:09 1991
X***************
X*** 120,131 ****
X  
X  void load()
X  {
X! 	FILE *map;
X! 	int i,j,k;
X! 	char buf[300];
X! 	int *ptr;
X  	char *aux;
X! 	int color[WIDTH];
X  	
X  	if (aux = getenv("XBDLIB"))
X  		strcpy(buf, aux);
X--- 120,131 ----
X  
X  void load()
X  {
X! 	FILE	*map;
X! 	int	i, j, k;
X! 	char	buf[300];
X! 	int	*ptr;
X  	char *aux;
X! 	int	color[WIDTH];
X  	
X  	if (aux = getenv("XBDLIB"))
X  		strcpy(buf, aux);
X***************
X*** 163,170 ****
X  int levelnum;
X  {
X  
X! 	FILE           *levelfile;
X! 	char           buf[300], *ptr;
X  
X  	Egc = Egc1;			/* don't blink EXIT */
X  	blobcollapse = FALSE;
X--- 163,170 ----
X  int levelnum;
X  {
X  
X! 	FILE	*levelfile;
X! 	char	buf[300], *ptr;
X  
X  	Egc = Egc1;			/* don't blink EXIT */
X  	blobcollapse = FALSE;
X***************
X*** 269,275 ****
X  /* Draw the score and level number */
X  void	draw_score()
X  {
X! 	char            buf[200];
X  	
X  	/* Build the output string */
X  	sprintf(buf, "sc:%d lv:%d ls:%d ds:%d dp:%d ti:%d %s", score, levelnum,
X--- 269,275 ----
X  /* Draw the score and level number */
X  void	draw_score()
X  {
X! 	char	buf[200];
X  	
X  	/* Build the output string */
X  	sprintf(buf, "sc:%d lv:%d ls:%d ds:%d dp:%d ti:%d %s", score, levelnum,
X***************
X*** 301,363 ****
X  void	draw_field(redrawall)
X  Bool	redrawall;
X  {
X- 	char            c;
X- 	
X  	/* Iterate through each horizontal line */
X  	for (i = y - 1; i >= 0; --i) {
X  		for (j = 0; j < x; ++j) {
X  			if (field[i][j].changed || redrawall) {	
X! 				c = field[i][j].content;
X! 				switch (c) {
X  					case GRASS:
X! 						drawPgm((j << 1), (i << 4), ggc, _GPSET);
X  						break;
X  					case SPACE:
X! 						drawPgm((j << 1), (i << 4), sgc, _GPSET);
X  						break;
X  					case PLAYER:
X! 						drawPgm((j << 1), (i << 4), pgc, _GPSET);
X  						break;
X  					case WALL:
X! 						drawPgm((j << 1), (i << 4), wgc, _GPSET);
X  						break;
X  					case MAGICWALL:
X! 						drawPgm((j << 1), (i << 4), Wgc, _GPSET);
X  						break;
X  					case DIAMOND:
X! 						drawPgm((j << 1), (i << 4), dgc, _GPSET);
X  						break;
X  					case BOULDER:
X! 						drawPgm((j << 1), (i << 4), bgc, _GPSET);
X  						break;
X  					case EXPLOSION:
X! 						drawPgm((j << 1), (i << 4), xgc, _GAND);
X  						break;
X  					case LMONSTER:
X! 						drawPgm((j << 1), (i << 4), lgc, _GPSET);
X  						break;
X  					case RMONSTER:
X! 						drawPgm((j << 1), (i << 4), rgc, _GPSET);
X  						break;
X  					case NUCBAL:
X! 						drawPgm((j << 1), (i << 4), ngc, _GPSET);
X  						break;
X  					case BLOB:
X! 						drawPgm((j << 1), (i << 4), Bgc, _GPSET);
X  						break;
X  					case TINKLE:
X! 						drawPgm((j << 1), (i << 4), tgc, _GPSET);
X  						break;
X  					case EATER:
X! 						drawPgm((j << 1), (i << 4), egc, _GPSET);
X  						break;
X  					case EXIT:
X! 						drawPgm((j << 1), (i << 4), Egc, _GPSET);
X  						break;
X  					case STEEL:
X  					default:
X  						field[i][j].content = STEEL;
X! 						drawPgm((j << 1), (i << 4), Sgc, _GPSET);
X  						break;
X  				}
X  				field[i][j].changed = FALSE;
X--- 301,360 ----
X  void	draw_field(redrawall)
X  Bool	redrawall;
X  {
X  	/* Iterate through each horizontal line */
X  	for (i = y - 1; i >= 0; --i) {
X  		for (j = 0; j < x; ++j) {
X  			if (field[i][j].changed || redrawall) {	
X! 				switch (field[i][j].content) {
X  					case GRASS:
X! 						drawPgm(j, i, ggc, _GPSET);
X  						break;
X  					case SPACE:
X! 						drawPgm(j, i, sgc, _GPSET);
X  						break;
X  					case PLAYER:
X! 						drawPgm(j, i, pgc, _GPSET);
X  						break;
X  					case WALL:
X! 						drawPgm(j, i, wgc, _GPSET);
X  						break;
X  					case MAGICWALL:
X! 						drawPgm(j, i, Wgc, _GPSET);
X  						break;
X  					case DIAMOND:
X! 						drawPgm(j, i, dgc, _GPSET);
X  						break;
X  					case BOULDER:
X! 						drawPgm(j, i, bgc, _GPSET);
X  						break;
X  					case EXPLOSION:
X! 						drawPgm(j, i, xgc, _GAND);
X  						break;
X  					case LMONSTER:
X! 						drawPgm(j, i, lgc, _GPSET);
X  						break;
X  					case RMONSTER:
X! 						drawPgm(j, i, rgc, _GPSET);
X  						break;
X  					case NUCBAL:
X! 						drawPgm(j, i, ngc, _GPSET);
X  						break;
X  					case BLOB:
X! 						drawPgm(j, i, Bgc, _GPSET);
X  						break;
X  					case TINKLE:
X! 						drawPgm(j, i, tgc, _GPSET);
X  						break;
X  					case EATER:
X! 						drawPgm(j, i, egc, _GPSET);
X  						break;
X  					case EXIT:
X! 						drawPgm(j, i, Egc, _GPSET);
X  						break;
X  					case STEEL:
X  					default:
X  						field[i][j].content = STEEL;
X! 						drawPgm(j, i, Sgc, _GPSET);
X  						break;
X  				}
X  				field[i][j].changed = FALSE;
X***************
X*** 375,382 ****
X  {
X  	field[i][j].content = content;
X  	field[i][j].speed = 0;
X- 	field[i][j].changed = TRUE;
X  	field[i][j].stage = 0;
X- 	field[i][j].caught = TRUE;
X  	field[i][j].checked = FALSE;
X  }
X--- 372,379 ----
X  {
X  	field[i][j].content = content;
X  	field[i][j].speed = 0;
X  	field[i][j].stage = 0;
X  	field[i][j].checked = FALSE;
X+ 	field[i][j].changed = TRUE;
X+ 	field[i][j].caught = TRUE;
X  }
X*** xbd.c	Thu Nov 29 11:52:24 1990
X--- ../todo/pc-xbd2/xbd.c	Fri Mar  8 16:01:16 1991
X***************
X*** 12,17 ****
X--- 12,24 ----
X  /*********************************************/
X  
X  #include <stdio.h>
X+ #include <fcntl.h>
X+ #include <io.h>
X+ #include <sys\types.h>
X+ #include <sys\stat.h>
X+ #include <malloc.h>
X+ #include <string.h>
X+ #include <memory.h>
X  #include <conio.h>
X  #include <ctype.h>
X  #include <dos.h>
X***************
X*** 20,26 ****
X  #include "xbd.h"
X  
X  
X! 
X  void (interrupt far *oldVect)();
X  
X  int count = 0;
X--- 27,33 ----
X  #include "xbd.h"
X  
X  
X! char	*getenv();
X  void (interrupt far *oldVect)();
X  
X  int count = 0;
X***************
X*** 27,33 ****
X--- 34,42 ----
X  Bool startCount = FALSE;
X  Bool newLevel = FALSE;
X  
X+ Bool noSound = FALSE;
X  
X+ 
X  void far interrupt newClock()
X  {
X  	if (startCount && count)
X***************
X*** 108,128 ****
X--- 117,161 ----
X  	else {
X  		switch (keyhit) {
X  			case K_LEFT:
X+ 				steal = FALSE;
X  				curorder = LEFT;
X  				gamestop = FALSE;
X  				break;
X  			case K_UP:
X+ 				steal = FALSE;
X  				curorder = UP;
X  				gamestop = FALSE;
X  				break;
X  			case K_DOWN:
X+ 				steal = FALSE;
X  				curorder = DOWN;
X  				gamestop = FALSE;
X  				break;
X  			case K_RIGHT:
X+ 				steal = FALSE;
X  				curorder = RIGHT;
X  				gamestop = FALSE;
X  				break;
X+ 			case K_CTL_LEFT:
X+ 				steal = TRUE;
X+ 				curorder = LEFT;
X+ 				gamestop = FALSE;
X+ 				break;
X+ 			case K_CTL_UP:
X+ 				steal = TRUE;
X+ 				curorder = UP;
X+ 				gamestop = FALSE;
X+ 				break;
X+ 			case K_CTL_DOWN:
X+ 				steal = TRUE;
X+ 				curorder = DOWN;
X+ 				gamestop = FALSE;
X+ 				break;
X+ 			case K_CTL_RIGHT:
X+ 				steal = TRUE;
X+ 				curorder = RIGHT;
X+ 				gamestop = FALSE;
X+ 				break;
X  		}
X  	}
X  }
X***************
X*** 168,200 ****
X  	long		period;
X  	char		buf[50];
X  	int		i;
X  
X  	byte	keyhit;
X  	byte	keytype;
X  	
X  	init_vars();
X  
X  	/* scan the command line for executing parameters and flags */
X  	for (i = 1; i < argc; ++i) {
X  		if (argv[i][0] == '-') {
X! 			if (argv[i][1] == 'l') {
X! 				if (argv[i][2] == '\0' && i + 1 < argc) {
X! 					sscanf(argv[i + 1], "%d", &levelnum);
X! 					i++;	
X! 				} 
X! 				else
X! 					sscanf(argv[i] + 2, "%d", &levelnum);
X! 			} 
X! 			else {
X! 				printf("usage: xbd [-l <level>] \n");
X! 				exit(1);
X  			}
X  		}
X  	}
X  
X  	levelstart = levelnum;
X  	init_level(levelnum);
X  
X  	oldVect = _dos_getvect(0x1C);
X  	xstart();
X  
X--- 201,269 ----
X  	long		period;
X  	char		buf[50];
X  	int		i;
X+ 	char		*tmp;
X+ 	char		aux[200];
X+ 	char		soundName[255];
X  
X  	byte	keyhit;
X  	byte	keytype;
X  	
X+ 	
X+ 	if (tmp = getenv("XBDLIB"))
X+ 		strcpy(aux, tmp);
X+ 	else
X+ 		strcpy(aux, LIB);
X+ 
X  	init_vars();
X  
X  	/* scan the command line for executing parameters and flags */
X  	for (i = 1; i < argc; ++i) {
X  		if (argv[i][0] == '-') {
X! 			switch (argv[i][1]) {
X! 				case 'l' :
X! 					if (argv[i][2] == '\0' && i + 1 < argc) {
X! 						sscanf(argv[i + 1], "%d", &levelnum);
X! 						i++;	
X! 					}
X! 					else
X! 						sscanf(argv[i] + 2, "%d", &levelnum);
X! 					break;
X! 				case 's' :
X! 					noSound = TRUE;
X! 					soundDone = FALSE;
X! 					break;
X  			}
X  		}
X+ 		else {
X+ 			printf("usage: xbd [-l <level>] [-s] \n");
X+ 			printf("                              \n");
X+ 			printf("       -l = starting level    \n");
X+ 			printf("       -s = no digitized sound\n");
X+ 			exit(1);
X+ 		}
X  	}
X  
X  	levelstart = levelnum;
X  	init_level(levelnum);
X  
X+ 	if (!noSound) {
X+ 		strcpy(soundName,aux);
X+ 		strcat(soundName,"\\explode");
X+ 		readSound(soundName, &sndExplode);
X+ 
X+ 		strcpy(soundName,aux);
X+ 		strcat(soundName,"\\whizz");
X+ 		readSound(soundName, &sndWhizz);
X+ 
X+ 		strcpy(soundName,aux);
X+ 		strcat(soundName,"\\gameover");
X+ 		readSound(soundName, &sndOver);
X+ 
X+ 		strcpy(soundName,aux);
X+ 		strcat(soundName,"\\yahoo");
X+ 		readSound(soundName, &sndYahoo);
X+ 	}
X+ 
X  	oldVect = _dos_getvect(0x1C);
X  	xstart();
X  
X***************
X*** 219,227 ****
X--- 288,306 ----
X  			if (keytype == 'T') {
X  				switch (keyhit) {
X  					case K_ESC:
X+ 						if (!noSound) {
X+ 							playSound(sndOver);
X+ 							while (!soundDone);
X+ 						}
X  						xend();
X  						_dos_setvect(0x1C,oldVect);
X  						add_score();
X+ 						if (!noSound) {
X+ 							closeSound(&sndExplode);
X+ 							closeSound(&sndWhizz);
X+ 							closeSound(&sndOver);
X+ 							closeSound(&sndYahoo);
X+ 						}
X  						exit(-1);
X  						break;
X  					case K_D:
X***************
X*** 238,273 ****
X  						break;
X  				}
X  			}
X- 			/*
X- 				Handle of CTRL key is to be done
X- 				
X- 			if ((*kbdStatus & 0x0F) == CTL_SHIFT) {
X- 				steal = TRUE;
X- 				if (keytype == 'T') {
X- 					switch (keyhit) {
X- 						case K_C:
X- 						case K_U:
X- 						case K_c:
X- 						case K_u:
X- 							xend();
X- 							_dos_setvect(0x1C,oldVect);
X- 							add_score();
X- 							exit(-1);
X- 							break;
X- 						case K_D:
X- 						case K_d:
X- 							curorder = KILL;
X- 						case K_R:
X- 						case	K_r:
X- 							draw_field(TRUE);
X- 							break;
X- 						default:
X- 							handle_key(keytype,keyhit);
X- 							break;
X- 					}
X- 				}
X- 			}
X- 			*/
X  			else
X  				handle_key(keytype,keyhit);
X  		}
X--- 317,322 ----
X***************
X*** 274,283 ****
X  		if (!gamestop)
X  			startCount = TRUE;
X  	}
X  	xend();
X  	_dos_setvect(0x1C,oldVect);
X  	add_score();
X  	exit(-1);
X  }
X- 
X  
X--- 323,344 ----
X  		if (!gamestop)
X  			startCount = TRUE;
X  	}
X+ 
X+ 	if (!noSound) {
X+ 		playSound(sndOver);
X+ 		while (!soundDone);
X+ 	}
X+ 
X  	xend();
X  	_dos_setvect(0x1C,oldVect);
X  	add_score();
X+ 
X+ 	if (!noSound) {
X+ 		closeSound(&sndExplode);
X+ 		closeSound(&sndWhizz);
X+ 		closeSound(&sndOver);
X+ 		closeSound(&sndYahoo);
X+ 	}
X  	exit(-1);
X  }
X  
X*** xbd.h	Wed Dec 12 10:41:57 1990
X--- ../todo/pc-xbd2/xbd.h	Fri Mar  8 16:01:25 1991
X***************
X*** 3,45 ****
X  /*           BOULDER        DASH             */
X  /*                                           */
X  /*     Jeroen Houttuin, ETH Zurich, 1990     */
X  /*********************************************/
X  
X- #define w 35
X- #define h 26
X- #define LEVELPREFIX "xbdlv"
X  
X! #define SCORESIZE 18
X! #define LIB		"c:\\usr\\local\\games\\xbd"
X  
X  /* direction masks */
X! #define N 0
X! #define E 1
X! #define S 2
X! #define W 3
X! #define NODIR 4
X  
X! #define SPACEEXPLO	0
X! #define BOULDEXPLO	10
X! #define DIAEXPLO	20
X! #define PROPAGATED	10
X  
X! #define PLAYER              'p'
X! #define SPACE               ' '
X! #define LMONSTER            'l'	/* Right turning monster */
X! #define RMONSTER            'r'
X! #define GRASS               'g'
X! #define WALL                'w'
X! #define MAGICWALL           'W'	/* Expanding wall */
X! #define DIAMOND             'd'
X! #define STEEL               'S'
X! #define BOULDER             'b'
X! #define EXPLOSION           'x'
X! #define EXIT                'E'
X! #define EATER               'e'
X! #define NUCBAL              'n'	/* Nuclear ballon */
X! #define BLOB                'B'	/* lava */
X! #define TINKLE              't'	/* Tinkle wall */
X  
X  #define NB_EDIT_PGM		16
X  
X--- 3,59 ----
X  /*           BOULDER        DASH             */
X  /*                                           */
X  /*     Jeroen Houttuin, ETH Zurich, 1990     */
X+ /*                                           */
X+ /*                                           */
X+ /*	  PC-VGA version from :				*/
X+ /*                                           */
X+ /*		Herve SOULARD, Paris, 1990		*/
X+ /*                                           */
X  /*********************************************/
X  
X  
X! #include "sound.h"
X  
X+ 
X+ #ifndef _XBD_H_
X+ 
X+ #define _XBD_H_
X+ 
X+ #define w				35
X+ #define h				26
X+ #define LEVELPREFIX		"xbdlv"
X+ 
X+ #define SCORESIZE		18
X+ #define LIB			".\\lib"
X+ 
X  /* direction masks */
X! #define N				 0
X! #define E				 1
X! #define S				 2
X! #define W				 3
X! #define NODIR			 4
X  
X! #define SPACEEXPLO		 0
X! #define BOULDEXPLO		10
X! #define DIAEXPLO		20
X! #define PROPAGATED		10
X  
X! #define PLAYER			'p'
X! #define SPACE			' '
X! #define LMONSTER		'l'	/* Right turning monster */
X! #define RMONSTER		'r'
X! #define GRASS			'g'
X! #define WALL			'w'
X! #define MAGICWALL		'W'	/* Expanding wall */
X! #define DIAMOND		'd'
X! #define STEEL			'S'
X! #define BOULDER		'b'
X! #define EXPLOSION		'x'
X! #define EXIT			'E'
X! #define EATER			'e'
X! #define NUCBAL			'n'	/* Nuclear ballon */
X! #define BLOB			'B'	/* lava */
X! #define TINKLE			't'	/* Tinkle wall */
X  
X  #define NB_EDIT_PGM		16
X  
X***************
X*** 47,86 ****
X  #define K_slash		'/'
X  
X  #ifndef byte
X! #define byte unsigned char
X  #endif
X  
X! #define ALT_SHIFT		8
X! #define CTL_SHIFT		4
X! #define LEFT_SHIFT		2
X! #define RIGHT_SHIFT		1
X  
X! #define K_HOME            71
X! #define K_END             79
X! #define K_UP              72
X! #define K_DOWN            80
X! #define K_PGUP            73
X! #define K_PGDOWN          81
X! #define K_LEFT            75
X! #define K_RIGHT           77
X! #define K_INS             82
X! #define K_DEL             83
X! #define K_BACKSPACE        8
X! #define K_RETURN          13
X! #define K_ESC             27
X! #define K_SPACE           32
X  
X! #define K_F1              59
X! #define K_F2              60
X! #define K_F3              61
X! #define K_F4              62
X! #define K_F5              63
X! #define K_F6              64
X! #define K_F7              65
X! #define K_F8              66
X! #define K_F9              67
X! #define K_F10             68
X  
X  #define K_C			'C'
X  #define K_U			'U'
X  #define K_c			'c'
X--- 61,106 ----
X  #define K_slash		'/'
X  
X  #ifndef byte
X! #define byte	unsigned char
X  #endif
X  
X! #define ALT_SHIFT		 8
X! #define CTL_SHIFT		 4
X! #define LEFT_SHIFT		 2
X! #define RIGHT_SHIFT		 1
X  
X! #define K_HOME			71
X! #define K_END			79
X! #define K_UP			72
X! #define K_DOWN			80
X! #define K_PGUP			73
X! #define K_PGDOWN		81
X! #define K_LEFT			75
X! #define K_RIGHT		77
X! #define K_INS			82
X! #define K_DEL			83
X! #define K_BACKSPACE		 8
X! #define K_RETURN		13
X! #define K_ESC			27
X! #define K_SPACE		32
X  
X! #define K_CTL_UP		141
X! #define K_CTL_DOWN		145
X! #define K_CTL_LEFT		115
X! #define K_CTL_RIGHT		116
X  
X+ 
X+ #define K_F1			59
X+ #define K_F2			60
X+ #define K_F3			61
X+ #define K_F4			62
X+ #define K_F5			63
X+ #define K_F6			64
X+ #define K_F7			65
X+ #define K_F8			66
X+ #define K_F9			67
X+ #define K_F10			68
X+ 
X  #define K_C			'C'
X  #define K_U			'U'
X  #define K_c			'c'
X***************
X*** 96,102 ****
X  static int  far *kbdStatus   = (int  far *)0x00000417;  /* Etat du clavier */
X  static byte far *kbdBuffer   = (byte far *)0x00000400;  /* Tampon clavier  */
X  static int  far *kbdPtrRead  = (int  far *)0x0000041A;  /* Ptr lecture     */
X! static int  far *kbdPtrWrite = (int  far *)0x0000041C;  /* Ptr criture    */
X  
X  
X  #define Bool			enum Boolean
X--- 116,122 ----
X  static int  far *kbdStatus   = (int  far *)0x00000417;  /* Etat du clavier */
X  static byte far *kbdBuffer   = (byte far *)0x00000400;  /* Tampon clavier  */
X  static int  far *kbdPtrRead  = (int  far *)0x0000041A;  /* Ptr lecture     */
X! static int  far *kbdPtrWrite = (int  far *)0x0000041C;  /* Ptr criture    */
X  
X  
X  #define Bool			enum Boolean
X***************
X*** 106,154 ****
X  
X  
X  
X! char			*whitegc, *scoregc, *gc, *Bgc, *Bgc1, *Bgc2, *ngc, *egc, 
X! 			*egc1, *egc2, *Egc1, *Wgc, *Wgc2, *Egc2, *Egc, *lgc, *lgc1,
X! 			*lgc2, *rgc, *rgc1, *rgc2, *xgc, *Sgc, *bgc, *dgc, *dgc1, 
X! 			*dgc2, *wgc, *pgc, *pgc1, *pgc2, *sgc, *ggc, *tgc, *tgc1,
X!                *tgc2, *tgc3;
X  
X! char            filename[300];	/* Current file name of this level */
X! char            levname[64];	/* Levelname */
X! int             i, j, ii, jj, jjj;
X! int             blobbreak;
X! int             critical;
X! int             curtime;		/* Current clock tick number */
X! int             blobcells;
X! int             tinkdur;	/* Tinkle duration */
X! Bool            tinkact;	/* Tinkle active   */
X! Bool            levincreased;
X! int             x, y, xin, yin, players, lives, levelnum, levelstart, speed,
X!                 diareq, diapoints, extradiapoints;
X! Bool            steal;		/* steal instead of go */
X! Bool            stoplevel, blobcollapse;
X  enum directs {
X  	STAND, UP, DOWN, LEFT, RIGHT, KILL
X  };
X  
X  enum directs    curorder;	/* Current order which player has */
X! /* typed at the keyboard. */
X  
X  struct cell {
X!   char            content;
X!   Bool            changed;	/* has cell changed since last drawing */
X!   Bool            caught;	/* for BLOB */
X!   Bool            checked;	/* for BLOB algorithm */
X!   char            dir;
X!   short           speed;
X!   short           stage;	/* painting stage for blinking etc. */
X! }               field[h][w];
X  
X! Bool            gamestop;
X! Bool            scoreobs;	/* is score line obsolete ? */
X! int             levelnum;	/* Current level number */
X! int             lives;		/* Current number of lives */
X! int             score;		/* Total score */
X! int             speed;		/* Speed of game.  1 is slowest, 15 is
X  						 * default */
X  
X  
X--- 126,179 ----
X  
X  
X  
X! char		*gc, *Bgc, *Bgc1, *Bgc2, *ngc, *egc, *egc1, *egc2, *Egc1, *Wgc,
X! 		*Wgc2, *Egc2, *Egc, *lgc, *lgc1, *lgc2, *rgc, *rgc1, *rgc2, *xgc,
X! 		*Sgc, *bgc, *dgc, *dgc1, *dgc2, *wgc, *pgc, *pgc1, *pgc2, *sgc,
X! 		*ggc, *tgc, *tgc1, *tgc2, *tgc3;
X  
X! char		filename[300];	/* Current file name of this level */
X! char		levname[64];	/* Levelname */
X! int		i, j, ii, jj, jjj;
X! int		blobbreak;
X! int		critical;
X! int		curtime;		/* Current clock tick number */
X! int		blobcells;
X! int		tinkdur;		/* Tinkle duration */
X! Bool		tinkact;		/* Tinkle active   */
X! Bool		levincreased;
X! int		x, y, xin, yin, players, lives, levelnum, levelstart, speed,
X! 		diareq, diapoints, extradiapoints;
X! Bool		steal;		/* steal instead of go */
X! Bool		stoplevel, blobcollapse;
X! 
X  enum directs {
X  	STAND, UP, DOWN, LEFT, RIGHT, KILL
X  };
X  
X  enum directs    curorder;	/* Current order which player has */
X! 						/* typed at the keyboard. */
X  
X  struct cell {
X!   char	content;
X!   Bool	changed;			/* has cell changed since last drawing */
X!   Bool	caught;			/* for BLOB */
X!   Bool	checked;			/* for BLOB algorithm */
X!   char	dir;
X!   short	speed;
X!   short	stage;			/* painting stage for blinking etc. */
X! } field[h][w];
X  
X! Bool		gamestop;
X! Bool		scoreobs;			/* is score line obsolete ? */
X! int		levelnum;			/* Current level number */
X! int		lives;			/* Current number of lives */
X! int		score;			/* Total score */
X! int		speed;			/* Speed of game.  1 is slowest, 15 is
X  						 * default */
X  
X+ struct sound	sndExplode;
X+ struct sound	sndWhizz;
X+ struct sound	sndOver;
X+ struct sound	sndYahoo;
X  
X+ #endif
X*** xbde.c	Sat Dec  1 12:55:38 1990
X--- ../todo/pc-xbd2/xbde.c	Fri Mar  8 16:01:35 1991
X***************
X*** 129,180 ****
X  {
X  	switch (field[yC][xC].content) {
X  		case GRASS:
X! 			drawPgm((xC << 1), (yC << 4), ggc, _GPSET);
X  			break;
X  		case	SPACE:
X! 			drawPgm((xC << 1), (yC << 4), sgc, _GPSET);
X  			break;
X  		case PLAYER:
X! 			drawPgm((xC << 1), (yC << 4), pgc, _GPSET);
X  			break;
X  		case WALL:
X! 			drawPgm((xC << 1), (yC << 4), wgc, _GPSET);
X  			break;
X  		case MAGICWALL:
X! 			drawPgm((xC << 1), (yC << 4), Wgc, _GPSET);
X  			break;
X  		case DIAMOND:
X! 			drawPgm((xC << 1), (yC << 4), dgc, _GPSET);
X  			break;
X  		case BOULDER:
X! 			drawPgm((xC << 1), (yC << 4), bgc, _GPSET);
X  			break;
X  		case EXPLOSION:
X! 			drawPgm((xC << 1), (yC << 4), xgc, _GPSET);
X  			break;
X  		case LMONSTER:
X! 			drawPgm((xC << 1), (yC << 4), lgc, _GPSET);
X  			break;
X  		case RMONSTER:
X! 			drawPgm((xC << 1), (yC << 4), rgc, _GPSET);
X  			break;
X  		case NUCBAL:
X! 			drawPgm((xC << 1), (yC << 4), ngc, _GPSET);
X  			break;
X  		case BLOB:
X! 			drawPgm((xC << 1), (yC << 4), Bgc, _GPSET);
X  			break;
X  		case TINKLE:
X! 			drawPgm((xC << 1), (yC << 4), tgc, _GPSET);
X  			break;
X  		case EATER:
X! 			drawPgm((xC << 1), (yC << 4), egc, _GPSET);
X  			break;
X  		case EXIT:
X! 			drawPgm((xC << 1), (yC << 4), Egc, _GPSET);
X  			break;
X  		case STEEL:
X! 			drawPgm((xC << 1), (yC << 4), Sgc, _GPSET);
X  			break;
X  	}
X  }
X--- 129,180 ----
X  {
X  	switch (field[yC][xC].content) {
X  		case GRASS:
X! 			drawPgm(xC, yC, ggc, _GPSET);
X  			break;
X  		case	SPACE:
X! 			drawPgm(xC, yC, sgc, _GPSET);
X  			break;
X  		case PLAYER:
X! 			drawPgm(xC, yC, pgc, _GPSET);
X  			break;
X  		case WALL:
X! 			drawPgm(xC, yC, wgc, _GPSET);
X  			break;
X  		case MAGICWALL:
X! 			drawPgm(xC, yC, Wgc, _GPSET);
X  			break;
X  		case DIAMOND:
X! 			drawPgm(xC, yC, dgc, _GPSET);
X  			break;
X  		case BOULDER:
X! 			drawPgm(xC, yC, bgc, _GPSET);
X  			break;
X  		case EXPLOSION:
X! 			drawPgm(xC, yC, xgc, _GPSET);
X  			break;
X  		case LMONSTER:
X! 			drawPgm(xC, yC, lgc, _GPSET);
X  			break;
X  		case RMONSTER:
X! 			drawPgm(xC, yC, rgc, _GPSET);
X  			break;
X  		case NUCBAL:
X! 			drawPgm(xC, yC, ngc, _GPSET);
X  			break;
X  		case BLOB:
X! 			drawPgm(xC, yC, Bgc, _GPSET);
X  			break;
X  		case TINKLE:
X! 			drawPgm(xC, yC, tgc, _GPSET);
X  			break;
X  		case EATER:
X! 			drawPgm(xC, yC, egc, _GPSET);
X  			break;
X  		case EXIT:
X! 			drawPgm(xC, yC, Egc, _GPSET);
X  			break;
X  		case STEEL:
X! 			drawPgm(xC, yC, Sgc, _GPSET);
X  			break;
X  	}
X  }
X***************
X*** 187,193 ****
X  	c = field[yC][xC].content;
X  	i = getIndex(c);
X  	_setcolor(15);
X! 	_rectangle(_GFILLINTERIOR, 625, 22+(i*20), 635, 26+(i*20));
X  }
X  
X  void unShowLocPgm(int xC, int yC)
X--- 187,193 ----
X  	c = field[yC][xC].content;
X  	i = getIndex(c);
X  	_setcolor(15);
X! 	_rectangle(_GFILLINTERIOR, 615, 22+(i*16), 625, 26+(i*16));
X  }
X  
X  void unShowLocPgm(int xC, int yC)
X***************
X*** 198,224 ****
X  	c = field[yC][xC].content;
X  	i = getIndex(c);
X  	_setcolor(0);
X! 	_rectangle(_GFILLINTERIOR, 625, 22+(i*20), 635, 26+(i*20));
X  }
X  
X  void drawAllPgm()
X  {
X! 	drawPgm(75, 16, pgc, _GPSET); allPgms[0] = PLAYER;
X! 	drawPgm(75, 36, sgc, _GPSET); allPgms[1] = SPACE;
X! 	drawPgm(75, 56, lgc, _GPSET); allPgms[2] = LMONSTER;
X! 	drawPgm(75, 76, rgc, _GPSET); allPgms[3] = RMONSTER;
X! 	drawPgm(75, 96, ggc, _GPSET); allPgms[4] = GRASS;
X! 	drawPgm(75,116, wgc, _GPSET);	allPgms[5] = WALL;
X! 	drawPgm(75,136, Wgc, _GPSET);	allPgms[6] = MAGICWALL;
X! 	drawPgm(75,156, dgc, _GPSET);	allPgms[7] = DIAMOND;
X! 	drawPgm(75,176, Sgc, _GPSET);	allPgms[8] = STEEL;
X! 	drawPgm(75,196, bgc, _GPSET);	allPgms[9] = BOULDER;
X! 	drawPgm(75,216, xgc, _GPSET);	allPgms[10] = EXPLOSION;
X! 	drawPgm(75,236, Egc, _GPSET);	allPgms[11] = EXIT;
X! 	drawPgm(75,256, egc, _GPSET);	allPgms[12] = EATER;
X! 	drawPgm(75,276, ngc, _GPSET);	allPgms[13] = NUCBAL;
X! 	drawPgm(75,296, Bgc, _GPSET);	allPgms[14] = BLOB;
X! 	drawPgm(75,316, tgc, _GPSET);	allPgms[15] = TINKLE;
X  }
X  
X  
X--- 198,224 ----
X  	c = field[yC][xC].content;
X  	i = getIndex(c);
X  	_setcolor(0);
X! 	_rectangle(_GFILLINTERIOR, 615, 22+(i*16), 625, 26+(i*16));
X  }
X  
X  void drawAllPgm()
X  {
X! 	drawPgm(37,  1, pgc, _GPSET); allPgms[0] = PLAYER;
X! 	drawPgm(37,  2, sgc, _GPSET); allPgms[1] = SPACE;
X! 	drawPgm(37,  3, lgc, _GPSET); allPgms[2] = LMONSTER;
X! 	drawPgm(37,  4, rgc, _GPSET); allPgms[3] = RMONSTER;
X! 	drawPgm(37,  5, ggc, _GPSET); allPgms[4] = GRASS;
X! 	drawPgm(37,  6, wgc, _GPSET);	allPgms[5] = WALL;
X! 	drawPgm(37,  7, Wgc, _GPSET);	allPgms[6] = MAGICWALL;
X! 	drawPgm(37,  8, dgc, _GPSET);	allPgms[7] = DIAMOND;
X! 	drawPgm(37,  9, Sgc, _GPSET);	allPgms[8] = STEEL;
X! 	drawPgm(37, 10, bgc, _GPSET);	allPgms[9] = BOULDER;
X! 	drawPgm(37, 11, xgc, _GPSET);	allPgms[10] = EXPLOSION;
X! 	drawPgm(37, 12, Egc, _GPSET);	allPgms[11] = EXIT;
X! 	drawPgm(37, 13, egc, _GPSET);	allPgms[12] = EATER;
X! 	drawPgm(37, 14, ngc, _GPSET);	allPgms[13] = NUCBAL;
X! 	drawPgm(37, 15, Bgc, _GPSET);	allPgms[14] = BLOB;
X! 	drawPgm(37, 16, tgc, _GPSET);	allPgms[15] = TINKLE;
X  }
X  
X  
X***************
X*** 307,313 ****
X  
X  	drawAllPgm();
X  	_setcolor(15);
X! 	_rectangle(_GFILLINTERIOR, 580, 22+(curPgm*20), 590, 26+(curPgm*20));
X  	showLocPgm(pX,pY);
X  
X  	
X--- 307,313 ----
X  
X  	drawAllPgm();
X  	_setcolor(15);
X! 	_rectangle(_GFILLINTERIOR, 570, 22+(curPgm*16), 580, 26+(curPgm*16));
X  	showLocPgm(pX,pY);
X  
X  	
X***************
X*** 358,381 ****
X  				switch (keyhit) {
X  					case K_PGUP :
X  						_setcolor(0);
X! 						_rectangle(_GFILLINTERIOR, 580, 22+(curPgm*20),
X! 							      590, 26+(curPgm*20));
X  						if (--curPgm < 0)
X  							curPgm = NB_EDIT_PGM - 1;
X  						_setcolor(15);
X! 						_rectangle(_GFILLINTERIOR, 580, 22+(curPgm*20),
X! 							      590, 26+(curPgm*20));
X  						break;
X  
X  					case K_PGDOWN :
X  						_setcolor(0);
X! 						_rectangle(_GFILLINTERIOR, 580, 22+(curPgm*20),
X! 							      590, 26+(curPgm*20));
X  						if (++curPgm >= NB_EDIT_PGM)
X  							curPgm = 0;
X  						_setcolor(15);
X! 						_rectangle(_GFILLINTERIOR, 580, 22+(curPgm*20),
X! 							      590, 26+(curPgm*20));
X  						break;
X  
X  					case K_LEFT :
X--- 358,381 ----
X  				switch (keyhit) {
X  					case K_PGUP :
X  						_setcolor(0);
X! 						_rectangle(_GFILLINTERIOR, 570, 22+(curPgm*16),
X! 							      580, 26+(curPgm*16));
X  						if (--curPgm < 0)
X  							curPgm = NB_EDIT_PGM - 1;
X  						_setcolor(15);
X! 						_rectangle(_GFILLINTERIOR, 570, 22+(curPgm*16),
X! 							      580, 26+(curPgm*16));
X  						break;
X  
X  					case K_PGDOWN :
X  						_setcolor(0);
X! 						_rectangle(_GFILLINTERIOR, 570, 22+(curPgm*16),
X! 							      580, 26+(curPgm*16));
X  						if (++curPgm >= NB_EDIT_PGM)
X  							curPgm = 0;
X  						_setcolor(15);
X! 						_rectangle(_GFILLINTERIOR, 570, 22+(curPgm*16),
X! 							      580, 26+(curPgm*16));
X  						break;
X  
X  					case K_LEFT :
X***************
X*** 418,447 ****
X  		}
X  		unsetCursor(pX, pY);
X  			
X- 		/* If the mouse moves with the button pressed, or the button is */
X- 		/* pressed, draw the current block at that position */
X- 		
X- 		/*
X- 		else 
X- 			if (xev.type == MotionNotify) {
X- 				if (xev.xmotion.state & Button3Mask)
X- 					set_cell(xev.xmotion.y >> 5, xev.xmotion.x >> 5, SPACE);
X- 				else 
X- 					if (xev.xmotion.state & Button1Mask)
X- 						set_cell(xev.xmotion.y >> 5, xev.xmotion.x >> 5, curchar);
X- 			} 
X- 			else 
X- 				if (xev.type == ButtonPress) {
X- 					if (xev.xbutton.button == Button3)
X- 						set_cell(xev.xbutton.y >> 5, xev.xbutton.x >> 5, SPACE);
X- 					else
X- 						set_cell(xev.xbutton.y >> 5, xev.xbutton.x >> 5, curchar);
X- 				}
X- 			draw_field(FALSE);
X- 			XFlush(disp);
X- 			
X- 		*/
X- 		
X  	} 
X  	  
X  	xend();
X--- 418,423 ----
END_OF_FILE
if test 40831 -ne `wc -c <'patches02'`; then
    echo shar: \"'patches02'\" unpacked with wrong size!
fi
# end of 'patches02'
fi
if test -f 'sound.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sound.c'\"
else
echo shar: Extracting \"'sound.c'\" \(1943 characters\)
sed "s/^X//" >'sound.c' <<'END_OF_FILE'
X/****************************************************************************/
X/*                                                                          */
X/*	SOUND.C : C functions for digitized sound.                             */
X/*                                                                          */
X/*                                                                          */
X/*	(c) Herv Soulard, Version 1.0 - 10/01/1991                            */
X/*	                   Version 1.1 - 01/02/1991                            */
X/*                                                                          */
X/****************************************************************************/
X
X
X#include <fcntl.h>
X#include <sys\types.h>
X#include <sys\stat.h>
X#include <io.h>
X#include <stdlib.h>
X#include <stdio.h>
X#include <string.h>
X#include <dos.h>
X#include <process.h>
X#include <malloc.h>
X
X#include "sound.h"
X
X#define SIZE	16384
X
Xstatic byte	convTab[256];
X
Xint readSound(char *fSound, struct sound *sSound)
X{
X	int			fd;
X	byte _huge	*ptr;
X	unsigned int	part;
X	unsigned long	i;
X	char			fName[255];
X	
X	strcpy(fName, fSound);
X	strcat(fName, ".psf");
X
X	if (_dos_open(fName, O_RDONLY, &fd) != 0) {
X		perror(fSound);
X		exit(1);
X	}
X	
X	lseek(fd, SEEK_SET, 0);
X	_dos_read(fd, sSound, sizeof(struct sound), &part);
X	
X	if (!strcmp(sSound->ident, IDENT)) {
X		for (i = 0; i < 256; i++) 
X			convTab[i] = (char)(((i * sSound->timer) / 256 ) + 1);
X
X		ptr = sSound->buffer = (byte _huge *)halloc(sSound->nbValues+1, 1);
X		if (ptr == NULL) {
X			perror("Can't allocate memory");
X			exit(1);
X		}
X
X		do {
X			_dos_read(fd, ptr, SIZE, &part);
X			ptr += part;
X		}
X		while (part == SIZE);
X	
X		ptr = sSound->buffer;
X
X		for (i = 0; i < sSound->nbValues; i++, ptr++)
X			*ptr = convTab[*ptr];
X		*ptr = '\0';
X		
X		_dos_close(fd);
X		return (1);
X	}
X	else {
X		_dos_close(fd);
X		return (0);
X	}
X}
X
X
Xvoid closeSound(struct sound *sSound)
X{
X	hfree(sSound->buffer);
X}
END_OF_FILE
if test 1943 -ne `wc -c <'sound.c'`; then
    echo shar: \"'sound.c'\" unpacked with wrong size!
fi
# end of 'sound.c'
fi
if test -f 'sound.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sound.h'\"
else
echo shar: Extracting \"'sound.h'\" \(1277 characters\)
sed "s/^X//" >'sound.h' <<'END_OF_FILE'
X/****************************************************************************/
X/*                                                                          */
X/*	SOUND.H : header for sound functions.                                  */
X/*                                                                          */
X/*			declare all structures for a sound sample                    */
X/*			declare all availabled functions                             */
X/*                                                                          */
X/*	(c) Herv Soulard, Version 1.0 - 10/01/1991                            */
X/*	                   Version 1.1 - 01/02/1991                            */
X/*                                                                          */
X/****************************************************************************/
X
X
X#ifndef	byte
X#define	byte		unsigned char
X#endif
X
X#ifndef _SOUND_H_
X
X#define _SOUND_H_
X
X
X#define IDENT		"HS PC-Sound file format (V 1.0)"
X
Xstruct sound {
X	char			ident[32];
X	byte _huge	*buffer;
X	unsigned long	nbValues;
X	unsigned int	hertz;
X	byte			timer;
X	byte			mult;
X	char			memo[255];
X};
X
Xint readSound(char *, struct sound *);
Xvoid closeSound(struct sound *);
X
Xextern int playSound(struct sound);
Xextern byte soundDone;
X
X#endif
X	
END_OF_FILE
if test 1277 -ne `wc -c <'sound.h'`; then
    echo shar: \"'sound.h'\" unpacked with wrong size!
fi
# end of 'sound.h'
fi
if test -f 'sound_as.asm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sound_as.asm'\"
else
echo shar: Extracting \"'sound_as.asm'\" \(5076 characters\)
sed "s/^X//" >'sound_as.asm' <<'END_OF_FILE'
X	TITLE	SOUND.ASM
X
X
X	PAGE   ,132
X
X
X
X;***************************************************************************
X;*									   *
X;*	SOUND_AS.ASM : assembly functions for digitized sound		   *
X;*									   *
X;*	(c) Herv Soulard, Version 1.0 - 10/01/1991                        *
X;*	                   Version 1.1 - 01/02/1991                        *
X;*									   *
X;***************************************************************************
X
X
X
X	.MODEL	SMALL
X
X
X;---------------------------------------------------------------------------
X;
X;	Definition des constantes.
X;
X;---------------------------------------------------------------------------
X
X
XEOI		EQU	20h		; Commande de fin d'interruption
X
XPIT_CTRL	EQU	43h		; Port de controle du PIT
XPIT_HP		EQU	42h		; Port de donnees du canal HP
XPIT_CLOCK	EQU	40h		; Port de donnees du canal CLOCK
X
XPPI_CTRL	EQU	61h		; Port de controle du PPI
X
XCTRL_HP_1	EQU	090h		; Valeur de controle debut son
XCTRL_HP_2	EQU	0B6h		; Valeur de controle fin son
X
XDATA_HP		EQU	0533h		; Donnee pour fin son
X
XCTRL_CLK	EQU	34h		; Valeur de controle CLOCK
X
XHP_ON		EQU	03h		; Donnee pour HP actif
XHP_OFF		EQU	0FCh		; Donnee pour HP inactif
X
X
Xsound		STRUC			; Sound structure
Xident		DB	32 DUP (?)	; identificator of sound file
Xbuffer		DD	?		; buffer for sampled values
XnbValues	DD	?		; nb of sampled values
Xhertz		DW	?		; 
Xtimer		DB	?		; value for It timer
Xmult		DB	?		; value of mult. freq.
Xmemo		DB	255 DUP (?)	; comment for sound
Xsound		ENDS
X
X
X
X	.DATA
X
X
X		PUBLIC	_soundDone
X_soundDone	DB	1		; le son est termine ?
X
Xvalues		DD	?		
X
XmultMain	DB	?
XmultAux		DB	?
X
X
X	.CODE
X
X
XoldInt08	DD	?
X
XnormClk		DW	?		; appeler l'ancienne int 08
Xtmp		DW	?		; tout les combien ?
X
X
X
X
X;---------------------------------------------------------------------------
X;
X;	Le son est joue par l'interruption horloge (frequence = hertz).
X;
X;---------------------------------------------------------------------------
X
X
X
X;------ Interruption horloge.
X;
X;
X
XNew_08	PROC	FAR
X
X	pushf
X	push	ax
X	push	bx
X	push	cx
X	push	si
X	push	ds
X	push	es
X
X	mov	al, 20h
X	out	20h, al
X
X	mov	ax, DGROUP
X	mov	ds, ax
X
X	les	si, dword ptr values	; Pointeur sur les donnees
X	mov	al, byte ptr es:[si]	; al = nouvelle donnee
X	or	al, al
X	jz	n1			; Fin des donnees ?
X
Xn4:
X	dec	byte ptr multAux
X	jnz	n3
X
X	mov	ah, byte ptr multMain
X	mov	byte ptr multAux, ah
X
X	inc	si			; prochaine donnee
X
Xn3:
X	out	PIT_HP, al
X
X	jnz	n2			; fin des premiers 64Ko ?
X
X	mov	ax, 1000h
X	add	word ptr values + 2, ax	; segment suivant
X
Xn2:
X	mov	word ptr values, si	; Mise a jour pointeur
X	jmp	fin
X	
Xn1:
X	cli				; Fini de jouer, on remet tout
X
X	mov	al, CTRL_HP_2		; Initialisation du son a 0
X	out	PIT_CTRL, al
X	mov	ax, DATA_HP
X	out	PIT_HP, al
X	mov	al, ah
X	out	PIT_HP, al
X
X	mov	al, CTRL_CLK		; Initialisation de la frequence
X	out	PIT_CTRL, al		; d'horloge
X	mov	al, 0
X	out	PIT_CLOCK, al
X	out	PIT_CLOCK, al
X
X	in	al, PPI_CTRL		; HP inactif
X	and	al, HP_OFF
X	out	PPI_CTRL, al
X
X	mov	byte ptr _soundDone, 1	; fin du son
X
X	les	bx, dword ptr cs:oldInt08
X	xor	ax, ax
X	mov	ds, ax
X	mov	word ptr ds:[20h], bx	; remet l'interruption 08
X	mov	word ptr ds:[22h], es
X	
Xfin:
X	pop	es
X	pop	ds
X	pop	si
X	pop	cx
X	pop	bx
X
X	dec	word ptr cs:tmp
X	jnz	fin1
X	
X	mov	ax, word ptr cs:normClk
X	mov	word ptr cs:tmp, ax
X	pop	ax
X	popf
X	jmp	dword ptr cs:oldInt08
X
Xfin1:
X	pop	ax
X	popf
X
X	iret
X
X
XNew_08	ENDP
X
X
X
X;---------------------------------------------------------------------------
X;
X;	Fonctions. 
X;
X;---------------------------------------------------------------------------
X
X
X;---------------------------------------------------------------------------
X;
X;	playSound :
X;
X;		plays the sound contains in the buffer precised
X;		by the parameter.
X;
X;		initializes the interrupt 8 to the New_08 function
X;		and prepares HP port to receive digitized sound.
X;
X;
X;	interface :
X;
X;		int playSound(struct sound sSound)
X;
X
X
X	PUBLIC	_playSound
X
X_playSound	PROC
X
X	push	bp
X	mov	bp, sp
X
Xarg	EQU	<[BP+04h]>
X
X	push	di
X	push	es
X
X	cmp	byte ptr _soundDone, 1
X	jz	e2
X	
X	mov	ax, 0
X	jmp	e1
X
Xe2:
X	mov	byte ptr _soundDone, 0
X
X	les	di, arg.buffer
X	mov	word ptr values, di
X	mov	ax, es
X	mov	word ptr values+2, ax
X
X	mov	ax, 10
X	mul	arg.hertz
X	mov	cx, 182
X	div	cx
X	mov	word ptr cs:normClk, ax
X	mov	word ptr cs:tmp, ax
X
X	mov	al, arg.mult
X	mov	byte ptr multMain, al
X	mov	byte ptr multAux, al
X
X
X	push	ds
X	pop	es
X
X	cli
X
X	xor	ax, ax
X	mov	es, ax
X	les	bx, dword ptr es:[20h]	; Sauvegarde le vecteur It CLK
X	mov	word ptr cs:oldInt08, bx
X	mov	word ptr cs:oldInt08 + 2, es
X
X	mov	es, ax
X	mov	ax, OFFSET New_08	; Nouvelle interruption CLK
X	mov	word ptr es:[20h], ax
X	mov	ax, cs
X	mov	word ptr es:[22h], ax
X	
X	mov	al, CTRL_HP_2		; Initialisation du son a 0
X	out	PIT_CTRL, al
X	mov	al, 0
X	out	PIT_HP, al
X	out	PIT_HP, al
X
X	mov	al, CTRL_CLK		; Initialisation de la frequence
X	out	PIT_CTRL, al		; d'horloge
X	mov	al, arg.timer
X	out	PIT_CLOCK, al
X	mov	al, 0
X	out	PIT_CLOCK, al
X
X	mov	al, CTRL_HP_1		; Prepare le canal HP a recevoir
X	out	PIT_CTRL, al    	; de nouvelles frequence
X
X	in	al, PPI_CTRL		; HP actif
X	or	al, HP_ON
X	out	PPI_CTRL, al
X	
X	sti
X
X	mov	ax, 1
Xe1:
X	pop	es
X	pop	di
X
X	mov	sp, bp
X	pop	bp
X
X	ret
X
X
X_playSound	ENDP
X
X
X	END
END_OF_FILE
if test 5076 -ne `wc -c <'sound_as.asm'`; then
    echo shar: \"'sound_as.asm'\" unpacked with wrong size!
fi
# end of 'sound_as.asm'
fi
echo shar: End of archive 2 \(of 4\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 4 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0