Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I want to get back into coding...FB starter's help please?
#28
Quote:Next question...
Code:
dim pic(26*36*4) as byte
screen 19,24
paint (10,10),200
bload "c:\man.bmp",@pic(0)
put (100,100),@pic(0),trans
sleep
man.bmp is just a little 25*35 24-bit bmp with an rgb(255,0,255) background.
Why does it only do what I want when it has the "@" symbol before any reference to the pic array? If I leave it out, it loads the bitmap straight to the screen at (0,0) and the pink background is shown, instead of making it invisible.
Because FB now use pointers instead of pure arrays.
When you pass the array, FB interpret it as 0, if you bload without adding a pointer, or when adding a 0, the bitmap is loaded to screen, top left.

bload "c:\man.bmp"


Also, get rid of the fixed paths. Now.
Fixed path: "c:\man.bmp"
Relative path: "man.bmp"
Reply


Messages In This Thread
I want to get back into coding...FB starter's help please? - by Z!re - 12-16-2005, 12:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)