![]() |
|
Can anyone tell me why this won't compile? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Can anyone tell me why this won't compile? (/showthread.php?tid=3601) Pages:
1
2
|
Can anyone tell me why this won't compile? - CMR - 04-09-2025 Code: (Select All)
I have no idea why this won't compile. I don't get any error codes or anything. Maybe a linker issue? I running this on Linux Mint 64bit. Just testing some quick and dirty animation.
blue1.bmp (Size: 12.05 KB / Downloads: 212)
blue2.bmp (Size: 12.05 KB / Downloads: 201)
blue3.bmp (Size: 12.05 KB / Downloads: 195)
RE: Can anyone tell me why this won't compile? - SMcNeill - 04-09-2025 Line 16 is the issue. Animate(frames&()) You can't pass an array to a sub via parenthesis like that. Change the line to: Animate frames&() OR change it to: CALL Animate(frames&()) RE: Can anyone tell me why this won't compile? - CMR - 04-09-2025 Well that was dumb. Thanks. Now I just have to get my dumb sub to work.
RE: Can anyone tell me why this won't compile? - bplus - 04-09-2025 @CMR Dumber not to ask. Welcome! RE: Can anyone tell me why this won't compile? - Pete - 04-09-2025 Oh, you mean the saying that goes... There are no such things as dumb questions, only dumb people who ask them? Oops, I meant the mean saying that goes... Kidding aside, if you need any help getting it working from this point forward, just post the code. Pete RE: Can anyone tell me why this won't compile? - CMR - 04-09-2025 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. RE: Can anyone tell me why this won't compile? - PhilOfPerth - 04-09-2025 (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. You're trespassing! The "dumb questions" domain is mine! Luckily, it wasn't that dumb, so I'll let it ride... this time.
RE: Can anyone tell me why this won't compile? - SMcNeill - 04-09-2025 (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. ![]() 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.
RE: Can anyone tell me why this won't compile? - bplus - 04-09-2025 (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. Yes graphics don't work without the screen up. Do you know about setup with Sceeen _Newimage(workWidth, workHeight, 32) ? 32 for _rgb stuff including alpha transparency. Dang Steve did is again, sneeks his post in before I get mine typed. RE: Can anyone tell me why this won't compile? - CMR - 04-10-2025 I figured everyone else already knew that. I had just spent a good half hour trying to figure out why my images transparent color wasn't working. The thing that confused me was that I somehow got it working that way by setting _Source, and reading a point off the image instead of using _RGB(). I managed to recreate it. I'm storing the images in an array because that's how I did it last time. Don't know if that matters. Code: (Select All)
It even shows the BG colors as being different, but they still work in a 32bit screen. Of course, this would be a non issue if I had just setup my Screen first like a normal human being. I feel like I should apologize for this rabbit hole I'm dragging you all down.
|