timage as function parameter
BlitzMax Forums/BlitzMax Beginners Area/timage as function parameter
| ||
I have a program that is like a simple image creator for 16x16 images the only colors available in my program are black or white i call the program tango just fyi i save this as a file using the write/read byte as i am only using 0 or 1 which cuts down file size. i know much easier and simpler way of doing this, i just want to know if it is possible this way. i made a function: function loadtango (path$,name:timage) and then use: name = CreateImage(16,16,1,DYNAMICIMAGE|MASKEDIMAGE) then use: GrabImage name,0,0 to grab the image after i put it to the screen. i am getting an error: (pseudo error) attempt to access Null object when I use: LoadTango ("man.T",dude) DrawImage dude,10,10 in my while loop i can post all my code if i didnt explain it good enough. |
| ||
Try :function loadtango (path$,name:timage var) |
| ||
worked like a charm. thanks Brucey! didnt know about that cmd. :) |