How do you use incbin on both images and text files? I'm really confused what you're meant to do with it.
And how do you use incbin for text files? The below example is obviousily wrong, but the document and manual does not give any instructions or sample code on how to use it.
The text file just has three names, each on a seperate line (e.g. Tom, @#!*, Harry)
Any chance someone can put up a short tutorial or explain how to use incbin?
Many thanks!
' This code uses inc-bin to get a small red image (5x5) in size and is meant to show the image on the screen. Import brl.ramstream Incbin "stars.png" Global stars=LoadImage( "incbin::stars.png" ) Graphics 800, 600 While Not KeyHit(KEY_ESCAPE) ' Clear the screen... Cls ' Store mouse position in these global variables... mx = MouseX () my = MouseY () DrawImage stars, mx, my Wend
And how do you use incbin for text files? The below example is obviousily wrong, but the document and manual does not give any instructions or sample code on how to use it.
The text file just has three names, each on a seperate line (e.g. Tom, @#!*, Harry)
Import brl.ramstream Incbin "names.txt" Global names=ReadFile( "incbin::names.txt" ) Graphics 800, 600 While Not KeyHit(KEY_ESCAPE) ' Clear the screen... Cls ' Store mouse position in these global variables... mx = MouseX () my = MouseY () DrawText names, mx, my Wend End
Any chance someone can put up a short tutorial or explain how to use incbin?
Many thanks!