Add constructor that takes a stream.
This commit is contained in:
parent
5ac76b68c9
commit
ae744f88e6
@ -778,6 +778,15 @@ DirectDrawSurface::DirectDrawSurface(const char * name) : stream(new StdInputStr
|
||||
}
|
||||
}
|
||||
|
||||
DirectDrawSurface::DirectDrawSurface(Stream * s) : stream(s)
|
||||
{
|
||||
if (!stream->isError())
|
||||
{
|
||||
(*stream) << header;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DirectDrawSurface::~DirectDrawSurface()
|
||||
{
|
||||
delete stream;
|
||||
|
@ -112,6 +112,7 @@ namespace nv
|
||||
{
|
||||
public:
|
||||
DirectDrawSurface(const char * file);
|
||||
DirectDrawSurface(Stream * stream);
|
||||
~DirectDrawSurface();
|
||||
|
||||
bool isValid() const;
|
||||
|
Loading…
Reference in New Issue
Block a user