Qbasicnews.com

Full Version: FreeBasic forum and examples/previews quicklist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Nope, works flawlessly on win98SE Custom (with un-official SP2 Tongue )


prolly windows messing up Big Grin
Von: unlike SDL where you just can send a caption on the window, you have to make a font routine for that. I'll try to make one so that I could test implement an FPS counter.
Rel, you can change the window's title using tinyptc too, see that mandbrot example: SetWindowText hwnd, str$( (SCR_WIDTH * SCR_HEIGHT * frames) \ tottime ) + " kpixels p/ sec "

You find the window handle using: hwnd = GetActiveWindow

Both are at '$include: 'user32.bi'
Hey that's great!!!
BTW, new demos:

1. Julia animator

http://rel.betterwebber.com/junk.php?id=31

2. Strange attractor

http://rel.betterwebber.com/junk.php?id=32
Although noone probably cares now that FB is out;

Bumpmapping, Rotozoomer and Fractal rotozoomer.

All code by me.

http://quickhost.qbtk.com/download.php?id=354
While I appreciate the valiant effort to put all the examples in one place, maybe it needs to be put on a static site.

I think I've got to start on a FB community site. There have to be 30 examples or whatever now, and a game here and there.
Dark: Use pointers instead of the direct buffer addressing.

ie:
Buffer(y * 640 + x) = pixel

is slower than

*P = pixel
Quote:Dark: Use pointers instead of the direct buffer addressing.

ie:
Buffer(y * 640 + x) = pixel

is slower than

*P = pixel

Thanks for the advice, rel, although i dont know how to use pointers. Are they hard to learn, in fact, what are they?
A pointer is an address where some data lies.

For example, in QB:

Code:
p% = VARPTR (a%)

That's not exactly a pointer, but gives you an idea. p% contains now the address of a%.

Rel means that you create a pointer to the screen. *P means "the data pointed by P", so "*P = color" is assigning "color" to the memory address pointed by "P".

Pointers are not hard at all, it's just "hype". Everyone says pointers are difficult 'cause they never took the time to learn them, so don't trust them. Trust me: pointers are easy.
Thanks man. How do you set up pointers for direct interface with the gui though?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16