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
)
prolly windows messing up
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'
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:
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