Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can anyone tell me why this won't compile?
#8
(04-09-2025, 09:55 PM)CMR Wrote: Thanks everyone.  I appreciate the welcome.  Be prepared.  I'm sure I'll have plenty more dumb questions.  Did you know you can't set the _ClearColor  _RGB() for an image before you setup your screen?  I just found that one out today!  It works when you grab a point from the background like the examples show, though.  I'm guessing it has something to do with the screens default bit depth before Screen _NewImage is called.

From the way this sounds to me, you were trying to do something like:

_CLEARCOLOR _RGB(r, g, b)
SCREEN _NEWIMAGE(x, y, 32)

The problem here is that you were clearing the color for the default, start up screen, SCREEN 0.  THEN you were swapping to a different SCREEN with the _NEWIMAGE.   

You can't clear colors on a screen that doesn't even exist yet.  Big Grin

What you could do is something like:

MyScreen = _NewImage(x, y, 32)
_ClearColor _RGB(r, g, b), MyScreen
Screen MyScreen

With the above, you make the screen, clear the color, then swap to that screen after it's all the way the you need it to be.  Wink
Reply


Messages In This Thread
RE: Can anyone tell me why this won't compile? - by SMcNeill - 04-09-2025, 11:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using gcc to compile C file aurel 22 4,189 04-22-2024, 03:48 PM
Last Post: aurel
  Can't compile .bas files PhilOfPerth 11 1,988 01-03-2023, 02:21 AM
Last Post: PhilOfPerth

Forum Jump:


Users browsing this thread: 1 Guest(s)