mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 06:58:07 +00:00
automatic archive builder now functional and enabled.
- allocators.cpp: fix: make sure all pool fields are reset in pool_free_all; correct matrix self-test - lib: fix self-test - lib_error: give "informational" return codes values > 100 (allows multiplexing with percent indicator) - archive: add clarification to afile_enum; use vfs_load when building archive (fixes caching problem); add support for progressive archive creation - file: allow pp_set_dir's path to end in slash (simplifies other code); add file_exists - file_cache: add stats+sanity checks to allocator; improve ExtantBufMgr find(); add ExactBufOracle to translate padded address returned by Cache to what was actually allocated; relax infinite-loop check; fix file_cache_reset - file_io: refactor callback logic so it can be used by vfs (needed for vfs_load) - vfs: vfs_load now supports calling back (required for archive builder) - vfs_mount: optimize path caching in afile_cb: due to atom_fn system, string compare can be done via pointer compare - vfs_optimizer: support auto-build of archive (progressive); improve should-build-archive check (WIP) - vfs_path: add util functions (also used in screenshot code) - vfs_tree: simplify pathname storage - wposix: mmap bugfix - main: call progressive archive builder; skip reload when doing so (documented) - JSInterface_VFS+scriptglue: add archiveBuilderCancel - ps/Util: use new vfs_path helper function for cleverer screenshot naming (correctly handles some being deleted) This was SVN commit r3578.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/VFSUtil.h"
|
||||
#include "lib/res/res.h"
|
||||
#include "lib/res/file/vfs_optimizer.h" // ArchiveBuilderCancel
|
||||
#include "scripting/ScriptingHost.h"
|
||||
#include "scripting/JSConversions.h"
|
||||
#include "scripting/JSInterface_VFS.h"
|
||||
@@ -209,3 +210,13 @@ JSBool JSI_VFS::ReadFileLines( JSContext* cx, JSObject* UNUSED(obj), uintN argc,
|
||||
*rval = OBJECT_TO_JSVAL( line_array );
|
||||
return( JS_TRUE );
|
||||
}
|
||||
|
||||
|
||||
// vfs_optimizer
|
||||
|
||||
JSBool JSI_VFS::ArchiveBuilderCancel(JSContext* cx, JSObject* UNUSED(obj), uintN argc, jsval* argv, jsval* rval )
|
||||
{
|
||||
debug_assert( argc == 0 );
|
||||
vfs_opt_cancel();
|
||||
return( JS_TRUE );
|
||||
}
|
||||
Reference in New Issue
Block a user