diff options
author | Torbjörn Andersson | 2003-11-27 07:34:19 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-11-27 07:34:19 +0000 |
commit | 6f23e2c2117925aa743155c3fd515144177efbbf (patch) | |
tree | 1e52b4cd7bf97e608fc029b4f26577c8cce2c8a1 /sword2/resman.cpp | |
parent | e72a17c67823d088a6bf139e49f25db745f005de (diff) | |
download | scummvm-rg350-6f23e2c2117925aa743155c3fd515144177efbbf.tar.gz scummvm-rg350-6f23e2c2117925aa743155c3fd515144177efbbf.tar.bz2 scummvm-rg350-6f23e2c2117925aa743155c3fd515144177efbbf.zip |
Mostly whitespace changes, but also a few modifications to the still
experimental resource dumping code.
svn-id: r11382
Diffstat (limited to 'sword2/resman.cpp')
-rw-r--r-- | sword2/resman.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp index 3b7a05f383..e1d49c9472 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -253,7 +253,7 @@ void convertEndian(uint8 *file, uint32 len) { SWAP32(mscreenHeader->maskOffset); // screenHeader - _screenHeader *screenHeader = (_screenHeader*) (file + mscreenHeader->screen); + _screenHeader *screenHeader = (_screenHeader *) (file + mscreenHeader->screen); SWAP16(screenHeader->width); SWAP16(screenHeader->height); @@ -312,7 +312,7 @@ void convertEndian(uint8 *file, uint32 len) { break; } case GAME_OBJECT: { - _object_hub *objectHub = (_object_hub *)file; + _object_hub *objectHub = (_object_hub *) file; objectHub->type = (int)SWAP_BYTES_32(objectHub->type); SWAP32(objectHub->logic_level); @@ -325,7 +325,7 @@ void convertEndian(uint8 *file, uint32 len) { break; } case WALK_GRID_FILE: { - _walkGridHeader *walkGridHeader = (_walkGridHeader *)file; + _walkGridHeader *walkGridHeader = (_walkGridHeader *) file; SWAP32(walkGridHeader->numBars); SWAP32(walkGridHeader->numNodes); @@ -499,18 +499,24 @@ uint8 *ResourceManager::openResource(uint32 res, bool dump) { case MOUSE_FILE: strcpy(tag, "mouse"); break; + case WAV_FILE: + strcpy(tag, "wav"); + break; case ICON_FILE: strcpy(tag, "icon"); break; + case PALETTE_FILE: + strcpy(tag, "palette"); + break; default: strcpy(tag, "unknown"); break; } #if defined(MACOS_CARBON) - sprintf(buf, ":dumps:%s-%d", tag, res); + sprintf(buf, ":dumps:%s-%d.dmp", tag, res); #else - sprintf(buf, "dumps/%s-%d", tag, res); + sprintf(buf, "dumps/%s-%d.dmp", tag, res); #endif out.open(buf, ""); @@ -909,7 +915,7 @@ void ResourceManager::killAllObjects(bool wantInfo) { //not the global vars which are assumed to be open in // memory & not the player object! if (res != 1 && res != CUR_PLAYER_ID) { - header = (_standardHeader*) openResource(res); + header = (_standardHeader *) openResource(res); closeResource(res); if (header->fileType == GAME_OBJECT) { |