diff options
author | Torbjörn Andersson | 2004-01-11 15:47:41 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-01-11 15:47:41 +0000 |
commit | cf0a73f913174599c7c28d910ecd87229fd62afd (patch) | |
tree | 7eabb5c16878d42f35d811ed13af5ed20b763f92 /sword1/objectman.cpp | |
parent | 563d95c576c817a63ec64302e67b2ee5daa97c6e (diff) | |
download | scummvm-rg350-cf0a73f913174599c7c28d910ecd87229fd62afd.tar.gz scummvm-rg350-cf0a73f913174599c7c28d910ecd87229fd62afd.tar.bz2 scummvm-rg350-cf0a73f913174599c7c28d910ecd87229fd62afd.zip |
Introduced new namespace, Sword1, removing the "Sword" and "Bs" prefixes in
the process, except for SwordEngine.
Some minor cleanups along the wa, e.g. stdafx.h already includes <stdio.h>,
<stdlib.h> and <math.h> so there shouldn't be any need to do it elsewhere.
svn-id: r12320
Diffstat (limited to 'sword1/objectman.cpp')
-rw-r--r-- | sword1/objectman.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sword1/objectman.cpp b/sword1/objectman.cpp index a5c8a453cf..aa46b2d132 100644 --- a/sword1/objectman.cpp +++ b/sword1/objectman.cpp @@ -27,6 +27,8 @@ #include "swordres.h" #include "sword1.h" +namespace Sword1 { + ObjectMan::ObjectMan(ResMan *pResourceMan) { _resMan = pResourceMan; } @@ -117,13 +119,13 @@ uint32 ObjectMan::lastTextNumber(int section) { return result; } -BsObject *ObjectMan::fetchObject(uint32 id) { +Object *ObjectMan::fetchObject(uint32 id) { uint8 *addr = _cptData[id / ITM_PER_SEC]; if (!addr) error("fetchObject: section %d is not open!", id / ITM_PER_SEC); id &= ITM_ID; // DON'T do endian conversion here. it's already done. - return (BsObject*)(addr + *(uint32*)(addr + (id + 1)*4)); + return (Object*)(addr + *(uint32*)(addr + (id + 1)*4)); } uint32 ObjectMan::fetchNoObjects(int section) { @@ -152,3 +154,5 @@ void ObjectMan::loadLiveList(uint16 *src) { void ObjectMan::saveLiveList(uint16 *dest) { memcpy(dest, _liveList, TOTAL_SECTIONS * sizeof(uint16)); } + +} // End of namespace Sword1 |