October 25, 2026, 12:10:00 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Recent posts

Pages 1 ... 3 4 5 6 7 ... 10
41
General Questions / Re: Graphics problem
Last post by Egil - December 06, 2024, 03:51:22 AM
Never used BitBlt myself, but the best place to find information on how to use the various APIs can be found at Microsoft,
and here is a link to their explanation of BitBlt: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-bitblt .

A slightly different approach can be found here: https://vbden.tripod.com/articles/invmask.htm


Good luck!

Egil
42
General Questions / Re: Graphics problem
Last post by basicgames - December 05, 2024, 10:29:31 AM
Thank you, Brian.

That makes sense to me, but I'm having trouble figuring out how you got it to mask the white. What does the hex 0x00BB0226 represent? Is that a raster code?

Either way, it looks like I'd best import bitblt as a function. Still, if you get a chance, could you please provide an example of how you masked the white?

I'm not sure about IWB documentation, but in EB there's virtually nothing other than a mention of bitblit flags in SHOWIMAGE. The only other source I could find was this thread.
43
General Questions / Re: Graphics problem
Last post by Brian - December 05, 2024, 03:30:52 AM
basicgames,

Bitmaps (and JPGs) do not support transparent pixels. My bitmap image in that line of code was of some black text surrounded by white, and the BitBlt flag was to mask the white out

If you need transparent pixels in IWB, use a GIF image

Brian
44
General Questions / Re: Graphics problem
Last post by basicgames - December 04, 2024, 11:19:40 PM
I am having no luck getting SHOWIMAGE to work with bitblt flags as you show above. What else is needed? May you please provide an example or elaborate?

In other words, how do I display a bitmap with a transparent color using SHOWIMAGE?
45
User Offerings / Re: League Tables program
Last post by Brian - October 01, 2024, 04:54:24 AM
I recently re-visited this program, thinking that my last version ran okay. I was surprised to find that it wasn't saving a table correctly, and was falling over when saving

I was using a method where the opened table filename was being injected into the Save edit control. I have re-jigged that part, using different code, and it seems to work okay now

Brian
46
Games and Graphics / Re: Marblez game
Last post by Brian - September 21, 2024, 06:22:25 AM
OK, I think I have cracked it - seems to work for me, anyway

It is now a Project, which means the icon, bitmaps and wave files are embedded into the exe, so the program is self contained. I've also added a Ctrl+N to play a new game, rather than use the menu item

Brian
47
Games and Graphics / Re: Marblez game
Last post by Brian - September 17, 2024, 05:38:26 AM
Well, I've managed to create a running version, but the mouse clicks are not being interpreted correctly, as clicking on a stone seems to react wrongly with adjacent stones

I found another wave file for when the game is over, which is included (I missed it out, really)

Just needs the mouse position sorting out . . .

Brian

Egil: When I get this version finally sorted, the exe will be portable, as all the bitmaps, sounds and icon are embedded

48
Games and Graphics / Re: Marblez game
Last post by Egil - September 16, 2024, 01:38:22 PM
Brian,
At the moment none of the EB/IWB versions I have donloaded will load source files into the editor.
But since you also posted the original IBA file, I made a copy of the original and renamed it marble.cba.
Then CB loads it whithout problems, and run it both from whithin the CB editor and as an exe made with CB.

So I think the reason for your problems is a flaw or two done during the conversion.
Studying the source does not give any immediate clues, but for those wanting to study the original code, it works perfectly in CB. And for those not having CB, there is a free version posted on this forum. Should not be difficult to find.

I had not seen this game before, but it is most certainly addictive! My great-granddaughter, age eight, have been playing for a while now, and I had to promise her a copy of the program....

Good luck!

Egil
49
Games and Graphics / Re: Marblez game
Last post by Brian - September 16, 2024, 09:03:54 AM
Well, I've tried all sorts today to get the bitmaps to show. I know they are loading, and the wav files, as well. But they don't show
I've ended up, as Larry suggested, putting all the bitmaps, icon and wav files into a resource folder, and making a Project, which resulted in the same outcome. The wav files are loading and working
Tightened the code up a bit, and removed the opening dialog, which was not really needed
At least now the program loads up without crashing!
I've even tried loading a bitmap separately and placing it on the screen - nothing shows
I am surely missing something . . .

Brian
50
Games and Graphics / Re: Marblez game
Last post by billhsln - September 15, 2024, 09:40:25 PM
My copy was in C:\Users\Public\Documents\IWBasic\Brian Pugh\Marblez\Marblez moved the files down to C:\Users\Public\Documents\IWBasic\Brian Pugh\Marblez and it compiles and kind of runs.  It starts up, I close the start screen and then it just disappears in a few seconds.

Before I moved it, it wanted to create a directory, which made no sense to me.

Bill
Pages 1 ... 3 4 5 6 7 ... 10