DDSurface file?
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement