forked from darklegion/tremulous
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New filesystem #76
Open
Chomenor
wants to merge
63
commits into
GrangerHub:master
Choose a base branch
from
Chomenor:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New filesystem #76
Changes from 7 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
f497335
new filesystem: Copy in initial filesystem files
Chomenor c462edc
new filesystem: Initial tremulous porting work
Chomenor 85ba05a
new filesystem: Refactor source dir definitions to avoid hardcoded so…
Chomenor cfaf833
new filesystem: Support reading from mac app bundle path
Chomenor 2334088
new filesystem: Fix FS_FOpenFile null handle ptr return values to be …
Chomenor 83f9701
new filesystem: Build with new filesystem ifdefs by default
Chomenor e352456
new filesystem: Run clang-format on everything in filesystem directory
Chomenor 61c7449
new filesystem: Initial base directory and hash precedence support
Chomenor 9cd31b3
new filesystem: Try to fix compile errors
Chomenor 843e850
new filesystem: Try again to fix the compile error
Chomenor 5100805
new filesystem: Mod dir handling work
Chomenor 7e34608
new filesystem: Improved download/pure list handling
Chomenor 2a2b09a
new filesystem: Rename 'system paks' to 'default paks'
Chomenor 57d4706
new filesystem: Prioritize pk3dirs over pk3s with same name
Chomenor 4edf2bb
Merge branch 'master' of https://github.com/GrangerHub/tremulous
Chomenor 2b02f2d
new filesystem: Add folder browse functions
Chomenor 3058a7b
new filesystem: Merge filesystem updates
Chomenor 5504900
new filesystem: FS_FOpenFile cleanup and improvements
Chomenor 35e8dab
new filesystem: Allow vms to read any files on disk when pure
Chomenor 50780ae
new filesystem: Improve tremulous base directory handling
Chomenor 5e0d768
new filesystem: Update tremulous core pk3 precedence
Chomenor 0fed5aa
new filesystem: Update default.cfg handling
Chomenor 9423942
new filesystem: Remove arch string from game dll search filename
Chomenor 4281c6d
new filesystem: Use original error handling behavior for non-pk3 curl…
Chomenor 55c6592
new filesystem: Fix ordering of duplicate pure list entries
Chomenor 8cef060
new filesystem: Don't redownload core pk3s to different base directories
Chomenor 813d60f
new filesystem: Simplify pk3_list_lookup function
Chomenor 024325e
new filesystem: Update precedence handling and move some functions to…
Chomenor 4f89e73
new filesystem: Rearrange some Tremulous defines
Chomenor 82821ff
new filesystem: Provisional core game dll support
Chomenor d0004db
new filesystem: Path generation tweaks
Chomenor f8a6bec
new filesystem: Fix browse folder function for directory names contai…
Chomenor f4f95da
Build system: Adjust the build system for the new file system.
dGr8LookinSparky 224e98e
Merge pull request #1 from dGr8LookinSparky/filesystem
Chomenor 091abc4
new filesystem: Use fs_basegame for engine writes regardless of curre…
Chomenor 65fc4a8
new filesystem: Fix old UI remaining loaded after demo playback finishes
Chomenor 272c80e
- change the naming of the core-cgame and core-ui dynamic libraries b…
dGr8LookinSparky 27fa4c3
Merge pull request #2 from dGr8LookinSparky/filesystem
Chomenor 81ee257
new filesystem: Allow browse folder commands to create missing direct…
Chomenor 0a21f7b
build system: fix zip errors.
dGr8LookinSparky 1d63b5f
Merge pull request #3 from dGr8LookinSparky/filesystem
Chomenor b2a0b56
build system:remove unnecessary files in the travis-ci release builds.
dGr8LookinSparky 1d7a696
build system: fix zip error for travis release build of macos.
dGr8LookinSparky cbeddac
build system: rename core-game to core_game.
dGr8LookinSparky 280a9aa
game module: set the default of vm_game to 0.
dGr8LookinSparky 87761ff
main menu: Add basemod/ as an option in the Browse Folders menu.
dGr8LookinSparky cc3ddbf
new filesystem: Allow parse functions to read files on disk when conn…
Chomenor 9da72c9
Revert "new filesystem: Allow parse functions to read files on disk w…
Chomenor 54917f8
new filesystem: Allow FS_FOpenFile to read files with specific extens…
Chomenor 9cd1b2d
Correct the directory paths in the vms pk3 files.
dGr8LookinSparky db111bf
Merge branch 'master' of https://github.com/GrangerHub/tremulous
Chomenor 539b722
git: change .gitattributes
dGr8LookinSparky cda5508
Merge branch 'master' into filesystem
dGr8LookinSparky 4a18039
assets: update the assets to v1.3.0-alpha.0.14.10
dGr8LookinSparky 81668c2
new filesystem: Support UI pk3 download progress stats
Chomenor 6e107c0
new filesystem: Fix UI pk3 download progress stats
Chomenor 706ee83
new filesystem: Merge pk3 manifest processing updates
Chomenor 9ae3c6d
Merge branch 'master' of https://github.com/GrangerHub/tremulous
Chomenor 62ba61a
new filesystem: Initial support for multi-version pk3 manifests
Chomenor 7b39045
renderer: make lightmap not cheat protected.
dGr8LookinSparky eeeb57f
default assets: Update the Trem 1.3 default assets to v1.3.0-alpha.0.…
dGr8LookinSparky 89ea9ea
Merge branch 'master' of https://github.com/GrangerHub/tremulous
Chomenor 798ad46
tremulous: fix the bucket system for QVMs.
dGr8LookinSparky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -384,6 +384,9 @@ void CL_ShutdownCGame( void ) { | |
return; | ||
} | ||
VM_Call( cls.cgame, CG_SHUTDOWN ); | ||
#ifdef NEW_FILESYSTEM | ||
fs_close_owner_handles(FS_HANDLEOWNER_CGAME); | ||
#endif | ||
VM_Free( cls.cgame ); | ||
cls.cgame = NULL; | ||
} | ||
|
@@ -459,17 +462,33 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) | |
Cmd_LiteralArgsBuffer( (char*)VMA(1), args[2] ); | ||
return 0; | ||
case CG_FS_FOPENFILE: | ||
#ifdef NEW_FILESYSTEM | ||
return FS_FOpenFileByModeOwner( (const char*)VMA(1), (fileHandle_t*)VMA(2), (FS_Mode)args[3], FS_HANDLEOWNER_CGAME ); | ||
#else | ||
return FS_FOpenFileByMode( (const char*)VMA(1), (fileHandle_t*)VMA(2), (FS_Mode)args[3] ); | ||
#endif | ||
case CG_FS_READ: | ||
#ifdef NEW_FILESYSTEM | ||
if(fs_handle_get_owner(args[3]) != FS_HANDLEOWNER_CGAME) return 0; | ||
#endif | ||
FS_Read( VMA(1), args[2], args[3] ); | ||
return 0; | ||
case CG_FS_WRITE: | ||
#ifdef NEW_FILESYSTEM | ||
if(fs_handle_get_owner(args[3]) != FS_HANDLEOWNER_CGAME) return 0; | ||
#endif | ||
FS_Write( VMA(1), args[2], args[3] ); | ||
return 0; | ||
case CG_FS_FCLOSEFILE: | ||
#ifdef NEW_FILESYSTEM | ||
if(fs_handle_get_owner(args[1]) != FS_HANDLEOWNER_CGAME) return 0; | ||
#endif | ||
FS_FCloseFile( args[1] ); | ||
return 0; | ||
case CG_FS_SEEK: | ||
#ifdef NEW_FILESYSTEM | ||
if(fs_handle_get_owner(args[1]) != FS_HANDLEOWNER_CGAME) return 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to fix the indenting throughout here |
||
#endif | ||
return FS_Seek( (fileHandle_t)args[1], args[2], (FS_Origin)args[3] ); | ||
case CG_FS_GETFILELIST: | ||
return FS_GetFileList( (const char*)VMA(1), (const char*)VMA(2), (char*)VMA(3), args[4] ); | ||
|
@@ -786,14 +805,22 @@ void CL_InitCGame( void ) { | |
mapname = Info_ValueForKey( info, "mapname" ); | ||
Com_sprintf( cl.mapname, sizeof( cl.mapname ), "maps/%s.bsp", mapname ); | ||
|
||
#ifdef NEW_FILESYSTEM | ||
// Give the map pk3 slightly higher precedence in the filesystem to help | ||
// load the correct textures and such | ||
fs_register_current_map(cl.mapname); | ||
#endif | ||
|
||
// load the dll or bytecode | ||
interpret = (vmInterpret_t)Cvar_VariableValue("vm_cgame"); | ||
#ifndef NEW_FILESYSTEM | ||
if(cl_connectedToPureServer) | ||
{ | ||
// if sv_pure is set we only allow qvms to be loaded | ||
if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE) | ||
interpret = VMI_COMPILED; | ||
} | ||
#endif | ||
|
||
cls.cgame = VM_Create( "cgame", CL_CgameSystemCalls, interpret ); | ||
if ( !cls.cgame ) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regrettably, It's not documented anywhere and some files (such as this one) have not yet been updated, but please try to follow a general style of
Notably