Embedding data files

Started by
6 comments, last by BSXrider 22 years, 2 months ago
My project uses a bitmap for textures. How can I make this become part of the .exe instead of a separate file? - seb
Advertisement
resource files

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Thank you, quite useful.

At the moment I have:

Texs[0]=auxDIBImageLoad("data/font.bmp");

I (very hopefully) tried:

Texs[0]=auxDIBImageLoad(MAKEINTRESOURCE(IDB_FONTTEXTURE));

But as suspected it didn''t work. How do I do this?

- seb
Yeh, but that makes the exe longer to ling and a bit slower.

<table border="1" cellspacing="0" nostyle="border-collapse: collapse; color: #000000; font-family: Courier New; font-size: 8pt" id="AutoNumber1" bgcolor="#FF9933" bordercolorlight="#808080" bordercolordark="#C0C0C0" cellpadding="0">
<tr>
<td width="78" height="1">[ Website
]</td>
</tr>
<tr>
<td width="78" height="4">

[ Email ]</td>
</tr>
</table>

Rate me up.
Does it? Why?
because it puts the bitmaps/icons/whatever directly into the EXE file (at the end i think, i don''t really know the details though).
so, you get a bigger .EXE, but no extra files to cart around, and it is [very slightly] harder for someone to edit your graphics.

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Granted. But it''s no slower than loading the bitmap off of a file on the disk...

- seb
Why not make a seperate resource file with all your bmps, wavs etc in, then you can compress it, streamline it, do whatever you want with it etc....

If speed is a problem you can also then load from this in another thread (provided you can predict just before they are needed else there may be no real benefit)

There are tutorials on this site on making you rown resource file managers.

Bp.

This topic is closed to new replies.

Advertisement