Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SCREEN Function
#2
The problem will be that 8-bit graphics modes have values in memory 0-255, so this corresponds to the values in the ASCII table.

But 32-bit screens use pixels, not codes from the ASCII table.

The solution is to keep both screens in memory and always copy the 8-bit one to the 32-bit one before displaying it and release it from memory after displaying it.

Ideas like "I'll compare pixels and determine the character number based on that" will fail. It's enough to have graphics under the text, different colors of the letters' pixels, or just change the font... Moreover, in 32-bit mode, the text can start anywhere, but on a text screen, it's strictly defined. Even if you place the text on an 8-bit screen outside the place where Locate would place it, even SCREEN won't read it.

Code: (Select All)

Screen _NewImage(640, 480, 256)
'Locate 10, 10: Print "TEST"
_PrintString (72, 144), "TEST" 'the same position as Locate 10, 10 <---- try use (73, 144)
'Line (50, 120)-(78, 160), , BF

For a = 1 To 4
    a$ = a$ + Chr$(Screen(10, 9 + a))
Next a
Locate 12, 10: Print a$ '<-- Output is, as expected, TEST.

change printstring position and try it...


Reply


Messages In This Thread
SCREEN Function - by CletusSnow - 11-15-2025, 11:30 AM
RE: SCREEN Function - by Petr - 11-15-2025, 01:09 PM
RE: SCREEN Function - by bplus - 11-15-2025, 02:20 PM
RE: SCREEN Function - by RhoSigma - 11-15-2025, 02:41 PM
RE: SCREEN Function - by bplus - 11-15-2025, 02:47 PM
RE: SCREEN Function - by SMcNeill - 11-15-2025, 06:53 PM
RE: SCREEN Function - by CletusSnow - 11-16-2025, 10:36 AM
RE: SCREEN Function - by bplus - 11-16-2025, 01:34 PM
RE: SCREEN Function - by TempodiBasic - 11-16-2025, 05:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Star Suggestion for new REPLACE$() function zaadstra 3 238 01-26-2026, 05:11 PM
Last Post: grymmjack
  Is there a menu function? Mad Axeman 17 1,019 12-17-2025, 04:43 AM
Last Post: SMcNeill
  Using the Screen function PhilOfPerth 19 3,046 04-16-2024, 05:23 PM
Last Post: bobalooie
  Problem with one function Kernelpanic 3 852 08-29-2023, 11:26 PM
Last Post: Kernelpanic
  No warning to mix screen 0 and screen graphic commands! TempodiBasic 8 1,794 06-16-2023, 11:36 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)