map packs: Fs.mount / Fs.unmount at run time, and a map's bakes under assets/baked/maps/<map>/
Maps ship outside the game, each one a content-addressed pack (.lmap: the .lpak format) downloaded to the save root. The runtime already served reads from packs mounted at boot (packs.index); now one can come and go while the game runs: - Fs.mount(path) -> bool maps a pack over the ones mounted before it (searched first, as a later packs.index line is); Fs.unmount(path) -> bool gives the mapping back (munmap, UnmapViewOfFile on Windows) and closes the gap in the search order. Each slot keeps its length and path for it. A FILE* still open over one of its entries (a baked_open_range) is closed first. Still 8 packs at most. - baked_path(map, file) is assets/baked/maps/<map>/<file> for a map's bake - what its .lmap carries and the game's own pack never does - and assets/baked/<file> for the rest. The IR assembles for macOS and Windows (llvm-as). Compile-only: nothing mounted or run here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c883687ace
commit
e1585de9b6
6 changed files with 39541 additions and 39098 deletions
|
|
@ -62,6 +62,7 @@ function emit_win_prelude() -> void {
|
|||
emith("declare i32 @FindClose(ptr)\n")
|
||||
emith("declare ptr @CreateFileMappingA(ptr, ptr, i32, i32, i32, ptr)\n")
|
||||
emith("declare ptr @MapViewOfFile(ptr, i32, i32, i32, i64)\n")
|
||||
emith("declare i32 @UnmapViewOfFile(ptr)\n")
|
||||
emith("declare i32 @CloseHandle(ptr)\n")
|
||||
emith("declare i32 @GetModuleFileNameA(ptr, ptr, i32)\n")
|
||||
emith("declare i32 @GetTempPathA(i32, ptr)\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue