Open pleumann opened 4 years ago
Reals should work for the game logic... Do we need inc/dec at all?
If you can change to real, please do it. Regarding Inc/Dec I was not sure if they have some special behavior on overflow/underflow that you rely on or if you just found them cooler than +/-. ;)
Actually Integer might be fine in most cases. We only have 1000 Planets and the maximum coordinates are 1000/1000, too. The rest is IDs of players etc. Even with Integer there's still plenty of buffer for a really large game, if we wanted to.
It will break the save files, though, so whatever you conquered so far will be lost. ;)
All ship counts and travel times are Real now. Rest is Integer.
For the fun of it I split the source into several parts tonight and added dummy definitions and procedures until it would compile with Turbo Pascal 3.0 under cp/m. There are some problems beyond the obvious terminal stuff. Some may actually be a dealbreaker.
1) All string mentions need a maximum length. This can easily be fixed by defining a type and using it everywhere.
2) Neither Word nor LongInt do exist. While the following does make the program compile it will probably kill the game logic:
I can try to isolate and work around the cases where LongInt is needed for date/time/milliseconds and even add cp/m BIOS calls to get this data. But it's also used in the game, for instance for coordinates in the galaxy. Would you mind thinking about a solution? Real, maybe?
3) The rest can be added or worked around, but it would make sense to change all occurrences of inc/dec with only a single parameter to inc/dec(x, 1) because Turbo Pascal cannot have two procedures with the same name.