Mapper’s Map

I had run into a mental block with the map on Mapper, so I put it aside to mull it over.

I had the data in the map file and could read and write it without any problems.

In order to print the map in multiple columns, I had to load the data into a matrix. Then as I printed each line, I could access the data for each of three columns. The first part of the problem was reading the data into the array. If I load it three rooms at a time, how do I load the last three rooms if the number of rooms in not a multiple of three?

For example, lets say the map file held ten rooms. If I print the map at three columns, Then room number ten would be on a line by itself in the first column, but how do I load the other two columns?

A fairly simple, if not very elegant solution came to me. I zero the matrix before each map row and then only load valid rooms. Any columns after the last room get printed as a blank.

This lead me to the thought, I should add an option to print a blank map page, for use when actually mapping a game.

Now all I have left to do is pretty up the map and add that blank map option.

Posted in Apple //c, Apple IIe, Printers, Programming, Projects Tagged with: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*