[net.sources.games] larn on MSDOS problems

michael@pbinfo.UUCP (09/26/86)

I am trying to get 'larn' on my MSDOS 2.11 PC with MicroSoft C 3.0.

After eliminating some minor bugs, I am ended with at least three
hard bugs:

	- Repainting the bottom lines. I didn't investigate it,
	can't be too hard.

	- Restoring a saved game. I always die a death, killed by
	an old save file.

	- And here it is: Always I meet a monster the micro dies!!!

Has anybody a suggestion, where to look. Where are these guys, who
got 'larn' working with MSDOS ? 

	Michael

UUCP:  ...!seismo!unido!pbinfo!michael     |  Post: Michael Schmidt
       or michael@pbinfo.UUCP              |        Universitaet-GH Paderborn
                                           |        FB 17 - Informatik
CSNET: michael%pbinfo.uucp@Germany.CSNET   |        Warburger Str. 100
                                           |        D-4790 Paderborn
ARPA:  michael%pbinfo.uucp@seismo.css.gov  |        West Germany

kneller@ucsfcgl.UUCP (Don Kneller%Langridge) (09/30/86)

In article <40200001@pbinfo.UUCP> michael@pbinfo.UUCP writes:
>
>I am trying to get 'larn' on my MSDOS 2.11 PC with MicroSoft C 3.0.
>
>After eliminating some minor bugs, I am ended with at least three
>hard bugs:
>
>	- Repainting the bottom lines. I didn't investigate it,
>	can't be too hard.

The macro that packs each bottom line value into one number (for
whatever reason) does a left bit shift of 16, which results in
0 for 16-bit ints on the PC.  Cast the integer being shifted to
a long before doing the shift.

>
>	- Restoring a saved game. I always die a death, killed by
>	an old save file.

Make sure you set the mode to binary when you open *all* files.  One
easy way is to add a setmode() call to lcreat, lopen, and lappend.

>
>	- And here it is: Always I meet a monster the micro dies!!!
>
>Has anybody a suggestion, where to look. Where are these guys, who
>got 'larn' working with MSDOS ? 

There is one major problem with the malloc to get memory for the
dungeon.  It asks for > 64K of memory, which is too much for the MSC
v3.0 malloc.  Unless you've already accounted for this, you're bashing
memory somewhere.  You have to use halloc of v4.0 or static storage or
some other scheme to manage the "cell" array.  It's only used for
storage, and there's no need for it to be contiguous.  You could keep
an array of pointers to a cell array for each level which is mallocked
independently.  I use a "virtual memory" scheme which reduces the
memory required to < 220K and uses all of available memory then a disk
file.  This makes it playable on a 256K machine.
-- 
	Don Kneller
UUCP:	...ucbvax!ucsfcgl!kneller
ARPA:	kneller@cgl.ucsf.edu
BITNET:	kneller@ucsfcgl.BITNET