
December 4th, 2004, 05:58 PM
|
|
Contributing User
|
|
Join Date: Sep 2004
Posts: 37
Time spent in forums: 1 h 15 m 20 sec
Reputation Power: 4
|
|
|
DirectX: Help saving objects to files
I was wondering how I would go about saving an object in directx that has a bitmap for a data member aswell as other data.
For instance say I have a class Player:
class Player
{
public:
wstring name;
int level;
Bitmap portait;
};
Now I know I could store the name and level in a text file and I could even save the file path of the Bitmap, and have my application load the bitmap on creation(bitmap will be stored in a seperate directory). However I would like to save the file so all info is kept in the same file. I tried searching the mView tutorial from the Dx Sample Browser but that was all about saving meshes not bitmaps and text. Also tried searching msdn but only came up with saving text files with FileStream from the .NET SDK. Could someone tell me, or show me some code on saving bitmaps and text files together in DirectX?
|