Talk:IFileSystem

From Valve Developer Community
Jump to: navigation, search

VC++ code colouring

How do you guys feel about having VC++ style coloring in code...or does it make it too hard to edit? it may be inconsistant but an overhaul can be done to fix it—ts2do 20:30, 4 May 2006 (PDT)

Can you be more specific? Like, where in the wiki you'd like to have this coloring, and how do you mean to accomplish it (manual html, which is pretty much impossible, or some kind of automation?). Jupix 08:59, 5 May 2006 (PDT)
VIEW THE LAST SECTION—ts2do 17:41, 5 May 2006 (PDT)
Well, that really does not answer any of my questions, but in case you mean manual adding of HTML amidst heaps and bounds of code, then I can tell you straight away it will never happen. Not in large scale anyway. PHP has a built-in syntax highlighter but unfortunately it's meant for PHP.. So it doesn't help us. On the other hand, if you mean highlighting just a few of the most common strings like operators (if?), you could make a template for it in color and run the piece of code through the replace function of your favourite editor (if -> {{if}}). But as I said, we aren't supposed to use HTML. I can tell you with absolute certainty that JeffLane won't approve of the last section in this article. Jupix 04:16, 6 May 2006 (PDT)
This question is presumably best asked of JeffLane, since he has expressed preferences before on the use of extra HTML in the Wiki, and its impact on things like backups and ease of page editing. --Giles 03:21, 6 May 2006 (PDT)

Filesystem Questions

Has anyone dealt with copying files? Is there a built-in method through source or should I use native C++ methods? --Daktor 18:54, 15 Aug 2006 (PDT)

Use ReadFile ("rb") and WriteFile in filesystem—ts2do 19:06, 15 Aug 2006 (PDT)


Mounting GCFs

I'm doing a HL2MP mod that uses the original content with modified client.dll & server.dll and I call this

if(filesystem->MountSteamContent(320)==FILESYSTEM_MOUNT_FAILED)
    return false;

to mount the GCFs for HL2MP. My problem is that it works ok if I start the game through Steam, but if I start it through Visual Studio (by using the guidelines from Installing_and_Debugging_the_Source_Code) it says Extra App id set to 320, but not SteamAppId , and I have my SteamAppId set to 215 in gameinfo.txt, and then it suddenly crashes.

My search paths are also like this

SearchPaths
{
	Game				hl2mp
	Game				|gameinfo_path|.
	Game				hl2
}

I know what you're thinking, that the order is wrong, but besides this method, there is no other way to make a mod that uses the original game content (HL2MP in this case) but to also use custom DLLs, or at least I haven't found one. --Cippyboy 03:13, 19 Feb 2008 (PST)