Advertisement

DDSurface file?

Started by February 08, 2000 06:08 AM
1 comment, last by ZomeonE 25 years ago
Is it possible to save the entire struct of a surface to a file and then load it in the game (with some modification)? It would be easier to load than a .bmp file, or am I wrong? Just a idea, will it work?
Nope,

DDSurfaceDesc only encompasses information about the surface. The real pixeldata is hidden behind the DDSurface7 interface. The only way to get to this data is by locking the surface.

You can ofcourse write the DDSurfaceDesc to the file and the pixeldata and then initialize the surface again using the DDSurfaceDesc you get from the file and then write the pixeldata after that.

But you cannot write the contents of the interface pointer to a file or something like that.

Jaap Suter
____________________________Mmmm, I''ll have to think of one.
Advertisement
Try using GetLockedArray(array() As Byte) and write the DDDesc to the file, then the array. You can reload it later. I think I am going to use this idea.

This topic is closed to new replies.

Advertisement