| version 1.2 | | version 1.3 |
|---|
| | |
| * Functions for accessing compressed files. | | * Functions for accessing compressed files. |
| * | | * |
| * $Log$ | | * $Log$ |
| | | * Revision 1.3 1999/09/05 11:22:31 sekmu |
| | | * windows mission and hudlog altdirs |
| | | * |
| * Revision 1.2 1999/06/14 23:44:11 donut | | * Revision 1.2 1999/06/14 23:44:11 donut |
| * Orulz' svgalib/ggi/noerror patches. | | * Orulz' svgalib/ggi/noerror patches. |
| * | | * |
| | |
| //added on 6/15/99 by Owen Evans | | //added on 6/15/99 by Owen Evans |
| #include "strutil.h" | | #include "strutil.h" |
| //end added - OE | | //end added - OE |
| | | //added on 9/4/99 by Victor Rachels |
| | | #include "d_slash.h" |
| | | //end addition -VR |
| typedef struct hogfile { | | typedef struct hogfile { |
| char name[13]; | | char name[13]; |
| int offset; | | int offset; |
| | |
| | | |
| void cfile_use_alternate_hogdir( char * path ) | | void cfile_use_alternate_hogdir( char * path ) |
| { | | { |
| char *p; | | // char *p; |
| | | |
| if ( path ) { | | if ( path ) { |
| | | strcpy( AltHogDir, path ); |
| // change backslashes to slashes, and terminate | | // change backslashes to slashes, and terminate |
| // AltHogDir with a slash without changing its meaning | | // AltHogDir with a slash without changing its meaning |
| strcpy( AltHogDir, path ); | | //added/edited by Victor Rachels on 9/4/99 for \ or / usage in path |
| for (p = AltHogDir; *p; p++) | | d_slash( AltHogDir ); |
| | | //-killed- for (p = AltHogDir; *p; p++) |
| | | //-killed- if (*p == NOTUSEDSLASH) |
| | | //-killed- *p = USEDSLASH; |
| | | //-killed- if (p == AltHogDir || p[-1] == ':') |
| | | //-killed- *(p++) = '.'; |
| | | //-killed- if (p[-1] != USEDSLASH) |
| | | //-killed- *(p++) = USEDSLASH; |
| | | //-killed- *p = 0; |
| | | |
| | | /* for (p = AltHogDir; *p; p++) |
| if (*p == '\\') | | if (*p == '\\') |
| *p = '/'; | | *p = '/'; |
| if (p == AltHogDir || p[-1] == ':') | | if (p == AltHogDir || p[-1] == ':') |
| *(p++) = '.'; | | *(p++) = '.'; |
| if (p[-1] != '/') | | if (p[-1] != '/') |
| *(p++) = '/'; | | *(p++) = '/'; |
| *p = 0; | | *p = 0;*/ |
| | | |
| | | //end this section edit - VR |
| AltHogdir_initialized = 1; | | AltHogdir_initialized = 1; |
| } else { | | } else { |
| AltHogdir_initialized = 0; | | AltHogdir_initialized = 0; |