by rld » Wed Mar 04, 2009 11:43 am
So, I'm playing the Ultima game, and sailing my little ship around, and I think, hmmm, what does the sextant do anyway? So I try it, and I get a nice worldmap with my ship's position marked with a dot. Useful.
So then I get to thinking, how did Chris do that? Surely there aren't a bunch of different BMPs with circles marked in different places, right? So I pull up the ACK editor, open up the sextant. It runs a macro, so I pull up the macro and take a look.
In the macro, there are a bunch of calculations involving the X and Y variables (presumably to calculate where the dot should go) followed by a SHOWBMP command to show the map, and then we have:
DRAW X Y TO X Y OF 255 3
Which is presumably what draws the dot. Looks like a low-level line drawing command, with start and end coordinates. I'm guessing the two ending parameters are color and maybe line width?
At any rate, this command isn't documented in the manual. Is there anything else we need to know about it, or any reason we should avoid using it?
So, I'm playing the Ultima game, and sailing my little ship around, and I think, hmmm, what does the sextant do anyway? So I try it, and I get a nice worldmap with my ship's position marked with a dot. Useful.
So then I get to thinking, how did Chris do that? Surely there aren't a bunch of different BMPs with circles marked in different places, right? So I pull up the ACK editor, open up the sextant. It runs a macro, so I pull up the macro and take a look.
In the macro, there are a bunch of calculations involving the X and Y variables (presumably to calculate where the dot should go) followed by a SHOWBMP command to show the map, and then we have:
DRAW X Y TO X Y OF 255 3
Which is presumably what draws the dot. Looks like a low-level line drawing command, with start and end coordinates. I'm guessing the two ending parameters are color and maybe line width?
At any rate, this command isn't documented in the manual. Is there anything else we need to know about it, or any reason we should avoid using it?