04-08-2023, 09:51 PM
(04-08-2023, 06:46 PM)SMcNeill Wrote: LOCATE works just fine in graphic screens. Why mnrvovrfc would tell people not to use it is completely beyond me. Might as well not use PRINT or COLOR or CLS or any of the other simple and common to use commands in that case. After all, each of them is slightly different than when used in text screens!
It was only for consistency between old and new but anyway... you're right as always.
But it's not as pretty to use monospaced fonts in a game which has three-dimensional graphics live action going on! Why offer _PRINTSTRING at all then? It was supposed to draw those vector fonts at one time...
<--- wanted to make use of a feature of M$ QuickC but those FON files were unwieldy. The BGI fonts that came with Turbo Pascal and Turbo C++ were more advanced than that but the statements to use them were clunky. We wanted to use "gotoxy()" to locate text in text mode and in graphics mode back then!
Anyway, the following code gives me an illegal function call. Try explaining that, which was what I was trying to say above. Use _PRINTSTRING instead for this! (Trying hard not to be like that privileged user from Galleon's forum who liked using exclamation points...)
Code: (Select All)
screen _newimage(800, 600, 32)
$IF WIN THEN
'DK if this file exists
h& = _loadfont("C:\Windows\Fonts\DejaVuSerif.ttf", 18)
$ELSE
h& = _loadfont("/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf", 18)
$END IF
if h& <= 0 then end
_font h&
locate 400, 300
print "Hello"
end
But you guys go ahead and use whatever you want if you're comfortable with it.