diff options
author | Travis Howell | 2005-10-19 08:44:14 +0000 |
---|---|---|
committer | Travis Howell | 2005-10-19 08:44:14 +0000 |
commit | c6a9f614453b51839653507aac60dfe17fb4d1de (patch) | |
tree | cfeb697e125354dce1ac73f9fae527813fec472d /scumm | |
parent | 64b5f32e81240dec7153cbe28091267cf49b6bf9 (diff) | |
download | scummvm-rg350-c6a9f614453b51839653507aac60dfe17fb4d1de.tar.gz scummvm-rg350-c6a9f614453b51839653507aac60dfe17fb4d1de.tar.bz2 scummvm-rg350-c6a9f614453b51839653507aac60dfe17fb4d1de.zip |
Add HE100 version of floodFill.
svn-id: r19172
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v100he.cpp | 38 |
2 files changed, 38 insertions, 1 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 2c02a8da78..96caa2a105 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1282,6 +1282,7 @@ protected: void o100_dimArray(); void o100_drawLine(); void o100_drawObject(); + void o100_floodFill(); void o100_setSpriteGroupInfo(); void o100_resourceRoutines(); void o100_wizImageOps(); diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 3e4fc7e83a..48ba52a338 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -96,7 +96,7 @@ void ScummEngine_v100he::setupOpcodes() { /* 2C */ OPCODE(o6_stopObjectCode), OPCODE(o6_eq), - OPCODE(o6_invalid), + OPCODE(o100_floodFill), OPCODE(o6_freezeUnfreeze), /* 30 */ OPCODE(o6_ge), @@ -864,6 +864,42 @@ void ScummEngine_v100he::o100_drawObject() { } } +void ScummEngine_v100he::o100_floodFill() { + byte subOp = fetchScriptByte(); + subOp -= 54; + + switch (subOp) { + case 0: + memset(&_floodFillParams, 0, sizeof(_floodFillParams)); + _floodFillParams.box.left = 0; + _floodFillParams.box.top = 0; + _floodFillParams.box.right = 639; + _floodFillParams.box.bottom = 479; + break; + case 6: + _floodFillParams.y = pop(); + _floodFillParams.x = pop(); + break; + case 18: + _floodFillParams.box.bottom = pop(); + _floodFillParams.box.right = pop(); + _floodFillParams.box.top = pop(); + _floodFillParams.box.left = pop(); + break; + case 20: + _floodFillParams.flags = pop(); + break; + case 67: + _floodFillParams.unk1C = pop(); + break; + case 92: + floodFill(&_floodFillParams, this); + break; + default: + error("o100_floodFill: Unknown case %d", subOp); + } +} + void ScummEngine_v100he::o100_setSpriteGroupInfo() { byte string[260]; int type, value1, value2, value3, value4; |