From d5822afe9ebdd22cd97650a58b4afbf763f0842e Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Wed, 20 Jun 2007 23:18:24 +0000 Subject: Add AGI256 picture resource loading using AGI command unknown170. Uses parts of patch #1728713. svn-id: r27569 --- engines/agi/op_cmd.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'engines/agi') diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index a51f536b49..c51514f237 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -515,7 +515,24 @@ cmd(obj_status_f) { * unk_181: Deactivate keypressed control (default control of ego) */ cmd(set_simple) { - game.simpleSave = true; + if (!(g_agi->getFeatures() & (GF_AGI256 | GF_AGI256_2))) { + game.simpleSave = true; + } else { // AGI256 and AGI256-2 use this unknown170 command to load 256 color pictures. + // Load the picture. Similar to cmd(load_pic). + g_sprites->eraseBoth(); + g_agi->agiLoadResource(rPICTURE, _v[p0]); + + // Draw the picture. Similar to cmd(draw_pic). + g_picture->decodePicture(_v[p0], false, true); + g_sprites->blitBoth(); + game.pictureShown = 0; + + // Show the picture. Similar to cmd(show_pic). + g_agi->setflag(fOutputMode, false); + cmd_close_window(NULL); + g_picture->showPic(); + game.pictureShown = 1; + } } cmd(pop_script) { -- cgit v1.2.3