Page 1 of 1
Posted: Mon Sep 09, 2002 1:02 pm
by BackupUser
Restored from previous forum. Originally posted by blueb.
A while ago, it seems to me someone mentioned that "resource files" were being considered/worked on for PureBasic.
It would be nice to include all bitmaps, etc. that your program needs.
Any progress in this area?
blueb
Posted: Mon Sep 09, 2002 2:54 pm
by BackupUser
Restored from previous forum. Originally posted by pusztry.
Yeh I would realy like to know if anything has been done. That would realy be sweet.
Thanks
- Ryan
WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
Posted: Mon Sep 09, 2002 3:03 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
> It would be nice to include all bitmaps, etc. that your program needs.
Why not use IncludeBinary to attach files to your exe, and then either
write them back to disk (as hidden + temp files) or use the CatchXXXXX
commands to access them?
PB - Registered PureBasic Coder
Posted: Mon Sep 09, 2002 5:59 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
You simply do
myLabel:
IncludeBinary "file.ext"
at the end of your source -
after the "End".
And within the source you use one
of the following commands with the
name of the Label:
CatchImage (1, ?myLabel) ; Load image 1
CatchSprite (2, ?mySprite) ; Load sprite 2
CatchJPEGSprite(3, ?myJPEG, JPEGlength) ; Load sprite 3 as JPEG
CatchSound (1, ?mySound) ; Load sound 1
You can get the length in memory
for JPEG files if you do your label like this:
length = ?myJPEGend - ?myJPEGstart
CatchJPEGsprite(1, ?myJPEGstart, length)
End
myJPEGstart:
IncludeBinary "cool.JPG"
myJPEGend:
cya,
...Danilo
(registered PureBasic user)
Posted: Tue Sep 10, 2002 2:04 am
by BackupUser
Restored from previous forum. Originally posted by blueb.
Hmmm... looks interesting Danilo.
I'll play with that for a while.
Thanks,
--blueb