diff options
author | Max Horn | 2003-05-14 10:16:57 +0000 |
---|---|---|
committer | Max Horn | 2003-05-14 10:16:57 +0000 |
commit | feee7422687e5a0e3252b793cef383f78cd03808 (patch) | |
tree | 2dfc96d7bf7a6c77ca3e695414506385e760461b /scumm | |
parent | 86b916b76237e2787c822ed67f81a829c4307526 (diff) | |
download | scummvm-rg350-feee7422687e5a0e3252b793cef383f78cd03808.tar.gz scummvm-rg350-feee7422687e5a0e3252b793cef383f78cd03808.tar.bz2 scummvm-rg350-feee7422687e5a0e3252b793cef383f78cd03808.zip |
added opcode 0xf7 (getActorZPlane)
svn-id: r7497
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 18 |
2 files changed, 18 insertions, 1 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 2575d3342c..310006ae0b 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -557,6 +557,7 @@ protected: void o8_kernelGetFunctions(); void o8_getActorChore(); + void o8_getActorZPlane(); void o8_drawObject(); void o8_getObjectImageX(); diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 37645a124d..34d6174f19 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -345,7 +345,7 @@ void Scumm_v8::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o6_invalid), OPCODE(o8_getStringWidth), - OPCODE(o6_invalid), + OPCODE(o8_getActorZPlane), /* F8 */ OPCODE(o6_invalid), OPCODE(o6_invalid), @@ -1669,6 +1669,22 @@ void Scumm_v8::o8_getActorChore() { push(a->frame); } +void Scumm_v8::o8_getActorZPlane() { + int actnum = pop(); + Actor *a = derefActorSafe(actnum, "o8_getActorChore"); + assert(a); + + int z = a->forceClip; + if (z == 100) { + z = getMaskFromBox(a->walkbox); + if (z > gdi._numZBuffer) + z = gdi._numZBuffer; + } + + push(z); +} + + void Scumm_v8::o8_getObjectImageX() { int i = getObjectIndex(pop()); push(_objs[i].x_pos); |