diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-26 00:04:45 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-04-26 00:04:45 +0000 |
commit | 8b0e30d3798cd5bdce2c3a34a3c384e90dceac99 (patch) | |
tree | 3fdca13a0cc138ed65b72de8cd3747cc79916818 /src/resources/resourcemanager.cpp | |
parent | a31ba215a3043ebd62d415a7d855a531239fb630 (diff) | |
download | mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.gz mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.bz2 mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.xz mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.zip |
Changed keyboard control to integrate better with mouse walk, changed location
of packet.list and chatlog.txt and removed name from player chat "balloon".
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index b26aeb5d..8606816e 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -286,16 +286,19 @@ void *ResourceManager::loadFile(const std::string &fileName, int &fileSize) PHYSFS_file* file = PHYSFS_openRead(fileName.c_str()); // If the handler is an invalid pointer indicate failure - if (file == NULL) return NULL; + if (file == NULL) { + logger.log("Warning: %s failed to load!", fileName.c_str()); + return NULL; + } - // Print file information message + // Get the size of the file fileSize = PHYSFS_fileLength(file); - // Allocate memory in the buffer and load the file + // Allocate memory and load the file void *buffer = malloc(fileSize); PHYSFS_read(file, buffer, 1, fileSize); - // Close the file and let the user deallocate the memory (safe?) + // Close the file and let the user deallocate the memory PHYSFS_close(file); return buffer; |