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
Resource Files
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
> 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
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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)
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)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm