mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-17 01:31:47 +00:00
Fix FS hashing for x86_64
This commit is contained in:
parent
a957b75bc3
commit
30850f8d9c
1 changed files with 7 additions and 7 deletions
|
@ -447,7 +447,7 @@ private:
|
|||
|
||||
private:
|
||||
void ReplaceSeparators( idStr &path, char sep = PATHSEPERATOR_CHAR );
|
||||
long HashFileName( const char *fname ) const;
|
||||
int HashFileName( const char *fname ) const;
|
||||
int ListOSFiles( const char *directory, const char *extension, idStrList &list );
|
||||
FILE * OpenOSFile( const char *name, const char *mode, idStr *caseSensitiveName = NULL );
|
||||
FILE * OpenOSFileCorrectName( idStr &path, const char *mode );
|
||||
|
@ -525,9 +525,9 @@ idFileSystemLocal::HashFileName
|
|||
return a hash value for the filename
|
||||
================
|
||||
*/
|
||||
long idFileSystemLocal::HashFileName( const char *fname ) const {
|
||||
int idFileSystemLocal::HashFileName( const char *fname ) const {
|
||||
int i;
|
||||
long hash;
|
||||
int hash;
|
||||
char letter;
|
||||
|
||||
hash = 0;
|
||||
|
@ -540,7 +540,7 @@ long idFileSystemLocal::HashFileName( const char *fname ) const {
|
|||
if ( letter == '\\' ) {
|
||||
letter = '/'; // damn path names
|
||||
}
|
||||
hash += (long)(letter) * (i+119);
|
||||
hash += (int)(letter) * (i+119);
|
||||
i++;
|
||||
}
|
||||
hash &= (FILE_HASH_SIZE-1);
|
||||
|
@ -974,7 +974,7 @@ bool idFileSystemLocal::FileIsInPAK( const char *relativePath ) {
|
|||
searchpath_t *search;
|
||||
pack_t *pak;
|
||||
fileInPack_t *pakFile;
|
||||
long hash;
|
||||
int hash;
|
||||
|
||||
if ( !searchPaths ) {
|
||||
common->FatalError( "Filesystem call made without initialization\n" );
|
||||
|
@ -1296,7 +1296,7 @@ pack_t *idFileSystemLocal::LoadZipFile( const char *zipfile ) {
|
|||
char filename_inzip[MAX_ZIPPED_FILE_NAME];
|
||||
unz_file_info file_info;
|
||||
int i;
|
||||
long hash;
|
||||
int hash;
|
||||
int fs_numHeaderLongs;
|
||||
int * fs_headerLongs;
|
||||
FILE *f;
|
||||
|
@ -3144,7 +3144,7 @@ idFile *idFileSystemLocal::OpenFileReadFlags( const char *relativePath, int sear
|
|||
pack_t * pak;
|
||||
fileInPack_t * pakFile;
|
||||
directory_t * dir;
|
||||
long hash;
|
||||
int hash;
|
||||
FILE * fp;
|
||||
|
||||
if ( !searchPaths ) {
|
||||
|
|
Loading…
Reference in a new issue