Author Topic: Screen mode attributes  (Read 2212 times)

0 Members and 1 Guest are viewing this topic.

Offline Joshua

  • Newbie
  • Posts: 10
    • View Profile
Screen mode attributes
« on: December 30, 2018, 09:16:37 pm »
Is the max number of color attributes still 256 (Screen 13), or are there new screen modes with more?
I have some onscreen objects that I want to react to light sources by using PALETTE to change their color/brightness.  I'm using PALETTE because I assume this is faster than redrawing everything with new color values (using PSET, LINE, CIRCLE, etc).  Using PALETTE this way I'm limited to 256 individual objects on screen.

Or is there a newer better way to change the color of onscreen objects, without redrawing them?

I haven't fully explored all the new graphical offerings, or even the old ones for that matter.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Screen mode attributes
« Reply #1 on: December 30, 2018, 09:26:23 pm »
SCREEN _NEWIMAGE(width, height, 32)

Set width and height to your custom value, and that 32 says you’ll be using 32-bit color values, which are described with _RGBA32(Red, green, blue, alpha) values of 0 to 255.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Joshua

  • Newbie
  • Posts: 10
    • View Profile
Re: Screen mode attributes
« Reply #2 on: December 30, 2018, 09:54:02 pm »
I just noticed the _CLEARCOLOR statement, this could be a game changer