Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0c0dee6
Stop a long launch argument overrunning the obfuscation buffer
ZivDero Aug 29, 2026
98dc4f4
Keep a file opened for writing out of the search folders
ZivDero Aug 29, 2026
20dc791
Add the deployment's game data and user directories
ZivDero Aug 29, 2026
66efd03
Read the game's files through the configured directories
ZivDero Aug 29, 2026
49cc4fa
Write the player's own files to the user directory
ZivDero Aug 29, 2026
6210c43
Cover the game directories with a contract test
ZivDero Aug 29, 2026
667de5e
Document the directory options and the deployment file
ZivDero Aug 29, 2026
398671e
Carry new file-layer prose in ordinary comment form
ZivDero Aug 29, 2026
17ea7f7
Resolve a written or deleted file to the user directory
ZivDero Aug 29, 2026
55a5946
Read a player's own copy before the game's own directory
ZivDero Aug 29, 2026
a492256
Install the user directory in the file layer
ZivDero Aug 29, 2026
f64879b
Let the file classes place the player's own files
ZivDero Aug 29, 2026
20c5c98
Scan for saved games where the game reads and writes them
ZivDero Aug 29, 2026
7daf1b1
Cover the file layer's directory rules with the contract test
ZivDero Aug 29, 2026
7dd4591
Record where the file layer keeps a player's own files
ZivDero Aug 29, 2026
854917e
Prove a hotkey reset keeps the shipped default
ZivDero Aug 29, 2026
691a31b
Retire the -CD launch option
ZivDero Aug 29, 2026
84144b9
Carry the file layer's new prose in ordinary comment form
ZivDero Aug 29, 2026
5c298f6
Document the new file layer functions as XML documentation
ZivDero Aug 29, 2026
b5b0e06
Merge branch 'main' into custom-dirs
ZivDero Aug 29, 2026
8152a56
Name every path the retired -CD option is replaced by
ZivDero Aug 29, 2026
5696af9
Own the user directory with a string instead of by hand
ZivDero Aug 29, 2026
cf12535
State what the file layer does, not what it stopped doing
ZivDero Aug 29, 2026
e657b2e
Search a Maps folder without configuration
ZivDero Aug 29, 2026
ebd3c0f
Delete the file object's copy operations outright
ZivDero Aug 29, 2026
c1fe596
Attach the storage note to the line it explains
ZivDero Aug 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions code/ccfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,25 @@ void CCFileClass::Close(void)
}


/// <summary>
/// Assigns a name to this file object and opens it in one operation.
/// </summary>
/// <param name="filename">The name of the file to open.</param>
/// <param name="rights">The access rights to open the file with.</param>
/// <returns>int; Was the file opened successfully?</returns>
int CCFileClass::Open(char const * filename, int rights)
{
// A file being written is looked for in the current directory alone, and never in a
// mixfile, since nothing can be written into one.
if ((rights & WRITE) != 0) {
return(CDFileClass::Open(filename, rights));
}

Set_Name(filename);
return(Open(rights));
}


/***********************************************************************************************
* CCFileClass::Open -- Opens a file from either the mixfile system or the rawfile system. *
* *
Expand Down
2 changes: 1 addition & 1 deletion code/ccfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CCFileClass : public CDFileClass
bool Is_Resident(void) const {return(Data.Get_Buffer() != NULL);}
virtual bool Is_Available(int forced=false) override;
virtual bool Is_Open(void) const override;
virtual int Open(char const * filename, int rights=READ) override {Set_Name(filename);return(Open(rights));};
virtual int Open(char const * filename, int rights=READ) override;
virtual int Open(int rights=READ) override;
virtual int Read(void * buffer, int size) override;
virtual int Seek(int pos, int dir=SEEK_CUR) override;
Expand Down
Loading
Loading