cleaned up some redundant file reads and fixed file opening in the movie player.
As a streaming action this cannot borrow the one from the archive.
This commit is contained in:
parent
3e7ec9118f
commit
df3e82d94c
10 changed files with 31 additions and 17 deletions
|
|
@ -200,10 +200,10 @@ void FScanner :: OpenLumpNum (int lump)
|
|||
{
|
||||
Close ();
|
||||
{
|
||||
auto mem = fileSystem.OpenFileReader(lump);
|
||||
auto buff = ScriptBuffer.LockNewBuffer(mem.GetLength());
|
||||
mem.Read(buff, mem.GetLength());
|
||||
buff[mem.GetLength()] = 0;
|
||||
auto len = fileSystem.FileLength(lump);
|
||||
auto buff = ScriptBuffer.LockNewBuffer(len);
|
||||
fileSystem.ReadFile(lump, buff);
|
||||
buff[len] = 0;
|
||||
ScriptBuffer.UnlockBuffer();
|
||||
}
|
||||
ScriptName = fileSystem.GetFileFullPath(lump).c_str();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue