diff options
author | Ludvig Strigeus | 2002-04-11 15:22:02 +0000 |
---|---|---|
committer | Ludvig Strigeus | 2002-04-11 15:22:02 +0000 |
commit | 34747b792a42e8129af60371541e9b7321d4d55f (patch) | |
tree | ab7ef91a2f72fca6d873978b3a95caf86922e5f1 /script_v1.cpp | |
parent | e28ae164a9567f8b2dd8444070f6e9b42f89d22e (diff) | |
download | scummvm-rg350-34747b792a42e8129af60371541e9b7321d4d55f.tar.gz scummvm-rg350-34747b792a42e8129af60371541e9b7321d4d55f.tar.bz2 scummvm-rg350-34747b792a42e8129af60371541e9b7321d4d55f.zip |
various code cleanups
svn-id: r3907
Diffstat (limited to 'script_v1.cpp')
-rw-r--r-- | script_v1.cpp | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/script_v1.cpp b/script_v1.cpp index 5cde3ce9a0..5e7d8c7547 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -690,7 +690,7 @@ void Scumm::o5_actorFromPos() { } void Scumm::o5_actorSet() { - byte convertTable[20] = {1,0,0,2,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20}; + static const byte convertTable[20] = {1,0,0,2,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20}; int act = getVarOrDirectByte(0x80); Actor *a; int i,j; @@ -815,7 +815,6 @@ FixRoom: void Scumm::o5_actorSetClass() { int act = getVarOrDirectWord(0x80); int newClass; - byte *oldClassData; while ( (_opcode=fetchScriptByte()) != 0xFF) { newClass = getVarOrDirectWord(0x80); @@ -824,18 +823,10 @@ void Scumm::o5_actorSetClass() { continue; } - if(_features & GF_SMALL_HEADER) { - oldClassData=(byte*)&_classData[act]; - if (newClass&0x80) - oldClassData[((newClass-1)&0x7f)/8] |= bit_table[((newClass-1)&0x07)]; - else - oldClassData[((newClass-1)&0x7f)/8] &= bit_table[((newClass-1)&0x07)]^0xff; - } else { - if (newClass&0x80) - putClass(act, newClass, 1); - else - putClass(act, newClass, 0); - } + if (newClass&0x80) + putClass(act, newClass, 1); + else + putClass(act, newClass, 0); } } @@ -1349,18 +1340,12 @@ void Scumm::o5_getVerbEntrypoint() { void Scumm::o5_ifClassOfIs() { int act,cls, b; bool cond = true; - byte *oldClass; act = getVarOrDirectWord(0x80); while ( (_opcode = fetchScriptByte()) != 0xFF) { cls = getVarOrDirectWord(0x80); - oldClass = (byte*)&_classData[act]; - - if(_features & GF_SMALL_HEADER) - b = oldClass[((cls-1)&0x7f)/8] & bit_table[((cls-1)&0x07)]; - else - b = getClass(act, cls); + b = getClass(act, cls); if (cls&0x80 && !b || !(cls&0x80) && b) cond = false; |