07-09-2023, 02:49 AM
(07-08-2023, 10:44 PM)mnrvovrfc Wrote:(07-08-2023, 09:30 PM)TempodiBasic Wrote: your same code without an unuseful pause (sleep 1) and an unuseful clearscreen (CLS) plus a better output settings (;" " for PRINT statement you get this output
I was going to point that out earlier but perhaps Phil wanted to see each character alone. A better idea was to switch to a graphics screen and find a way to cause a character to dominate the screen, by printing it much larger.
Code: (Select All)
DIM AS LONG thiscr, charscr
DIM AS INTEGER wx, hy, tx, ty, scale, i, j
wx = 8
hy = 14
tx = 100
ty = 100
scale = 10
SCREEN 12
thiscr = _COPYIMAGE(0)
SCREEN thiscr
_TITLE "Press [ESC] to quit."
charscr = _NEWIMAGE(wx, hy, 12)
COLOR 15
FOR i = 129 TO 255
_DEST charscr
LOCATE 1, 1
PRINT CHR$(i);
_PUTIMAGE (tx, ty)-(tx + wx * scale - 1, ty + hy * scale - 1), charscr, thiscr, (0, 0)-(wx - 1, hy - 1)
FOR j = 1 TO 10
_DELAY 0.1
IF _KEYDOWN(27) THEN EXIT FOR
NEXT
CLS
IF _KEYDOWN(27) THEN EXIT FOR
NEXT
_DEST 0
SYSTEM
Thanks Minerva, yes, that was why I had the Sleep and Cls in there. I had intended to tell TB this, but you beat me to it.
There was an error in my original code that stopped it working, but I had precis-ed it for my question. It worked as intended when that was fixed.
I had also formatted the print for better display, but your larger characters method was a good way to see the characters more clearly.
Thanks both.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/