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:
Christoph Oelckers 2023-12-13 16:56:47 +01:00
commit df3e82d94c
10 changed files with 31 additions and 17 deletions

View file

@ -4009,3 +4009,14 @@ CCMD(fs_dir)
Printf(PRINT_HIGH | PRINT_NONOTIFY, "%s%-64s %-15s (%5d) %10d %s %s\n", hidden ? TEXTCOLOR_RED : TEXTCOLOR_UNTRANSLATED, fn1, fns, fnid, length, container, hidden ? "(h)" : "");
}
}
CCMD(type)
{
if (argv.argc() < 2) return;
int lump = fileSystem.CheckNumForFullName(argv[1]);
if (lump >= 0)
{
auto data = fileSystem.ReadFile(lump);
Printf("%.*s\n", data.size(), data.string());
}
}