[Scummvm-cvs-logs] SF.net SVN: scummvm:[39567] scummvm/trunk/engines/scumm

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Mar 20 17:33:58 CET 2009


Revision: 39567
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39567&view=rev
Author:   fingolfin
Date:     2009-03-20 16:33:58 +0000 (Fri, 20 Mar 2009)

Log Message:
-----------
SCUMM: Split intern.h into multiple headers

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/actor.cpp
    scummvm/trunk/engines/scumm/akos.cpp
    scummvm/trunk/engines/scumm/boxes.cpp
    scummvm/trunk/engines/scumm/camera.cpp
    scummvm/trunk/engines/scumm/cursor.cpp
    scummvm/trunk/engines/scumm/detection.cpp
    scummvm/trunk/engines/scumm/detection_tables.h
    scummvm/trunk/engines/scumm/gfx.cpp
    scummvm/trunk/engines/scumm/he/intern_he.h
    scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp
    scummvm/trunk/engines/scumm/imuse_digi/dimuse_script.cpp
    scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp
    scummvm/trunk/engines/scumm/input.cpp
    scummvm/trunk/engines/scumm/insane/insane.cpp
    scummvm/trunk/engines/scumm/insane/insane.h
    scummvm/trunk/engines/scumm/insane/insane_ben.cpp
    scummvm/trunk/engines/scumm/insane/insane_enemy.cpp
    scummvm/trunk/engines/scumm/insane/insane_iact.cpp
    scummvm/trunk/engines/scumm/insane/insane_scenes.cpp
    scummvm/trunk/engines/scumm/intern.h
    scummvm/trunk/engines/scumm/object.cpp
    scummvm/trunk/engines/scumm/palette.cpp
    scummvm/trunk/engines/scumm/resource.cpp
    scummvm/trunk/engines/scumm/resource_v2.cpp
    scummvm/trunk/engines/scumm/resource_v3.cpp
    scummvm/trunk/engines/scumm/resource_v4.cpp
    scummvm/trunk/engines/scumm/room.cpp
    scummvm/trunk/engines/scumm/saveload.cpp
    scummvm/trunk/engines/scumm/script.cpp
    scummvm/trunk/engines/scumm/script_v0.cpp
    scummvm/trunk/engines/scumm/script_v2.cpp
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/script_v6.cpp
    scummvm/trunk/engines/scumm/script_v8.cpp
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/scumm/smush/smush_player.cpp
    scummvm/trunk/engines/scumm/string.cpp
    scummvm/trunk/engines/scumm/vars.cpp
    scummvm/trunk/engines/scumm/verbs.cpp

Added Paths:
-----------
    scummvm/trunk/engines/scumm/scumm_v0.h
    scummvm/trunk/engines/scumm/scumm_v2.h
    scummvm/trunk/engines/scumm/scumm_v3.h
    scummvm/trunk/engines/scumm/scumm_v4.h
    scummvm/trunk/engines/scumm/scumm_v5.h
    scummvm/trunk/engines/scumm/scumm_v6.h
    scummvm/trunk/engines/scumm/scumm_v7.h
    scummvm/trunk/engines/scumm/scumm_v8.h

Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/actor.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,7 +23,6 @@
  *
  */
 
-
 #include "common/system.h"	// for setFocusRectangle/clearFocusRectangle
 #include "scumm/scumm.h"
 #include "scumm/actor.h"
@@ -31,11 +30,11 @@
 #include "scumm/boxes.h"
 #include "scumm/charset.h"
 #include "scumm/costume.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
 #include "scumm/saveload.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/he/sound_he.h"
 #include "scumm/he/sprite_he.h"
 #include "scumm/usage_bits.h"

Modified: scummvm/trunk/engines/scumm/akos.cpp
===================================================================
--- scummvm/trunk/engines/scumm/akos.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/akos.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,15 +23,14 @@
  *
  */
 
-
 #include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/akos.h"
 #include "scumm/bomp.h"
 #include "scumm/imuse/imuse.h"
 #include "scumm/imuse_digi/dimuse.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 #include "scumm/he/wiz_he.h"

Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/boxes.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,11 +23,10 @@
  *
  */
 
-
 #include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/boxes.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v6.h"
 #include "scumm/util.h"
 
 #include "common/util.h"

Modified: scummvm/trunk/engines/scumm/camera.cpp
===================================================================
--- scummvm/trunk/engines/scumm/camera.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/camera.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -22,11 +22,10 @@
  *
  */
 
-
 #include "scumm/scumm.h"
-#include "scumm/intern.h"
 #include "scumm/actor.h"
 #include "scumm/charset.h"
+#include "scumm/scumm_v7.h"
 
 namespace Scumm {
 

Modified: scummvm/trunk/engines/scumm/cursor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/cursor.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/cursor.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -27,12 +27,13 @@
 #include "graphics/cursorman.h"
 #include "scumm/bomp.h"
 #include "scumm/charset.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/object.h"
 #include "scumm/he/resource_he.h"
 #include "scumm/saveload.h"
 #include "scumm/scumm.h"
+#include "scumm/scumm_v2.h"
+#include "scumm/scumm_v5.h"
 
 namespace Scumm {
 

Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/detection.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -35,9 +35,9 @@
 
 #include "scumm/detection.h"
 #include "scumm/detection_tables.h"
-#include "scumm/scumm.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v8.h"
 
 #include "engines/metaengine.h"
 

Modified: scummvm/trunk/engines/scumm/detection_tables.h
===================================================================
--- scummvm/trunk/engines/scumm/detection_tables.h	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/detection_tables.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -32,8 +32,6 @@
 
 #include "scumm/detection.h"
 #include "scumm/scumm.h"
-//#include "scumm/intern.h"
-//#include "scumm/he/intern_he.h"
 
 #include "scumm/scumm-md5.h"
 

Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/gfx.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,14 +23,14 @@
  */
 
 #include "common/system.h"
-#include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/charset.h"
-#include "scumm/intern.h"
 #ifdef ENABLE_HE
 #include "scumm/he/intern_he.h"
 #endif
 #include "scumm/resource.h"
+#include "scumm/scumm_v5.h"
+#include "scumm/scumm_v6.h"
 #include "scumm/usage_bits.h"
 #include "scumm/he/wiz_he.h"
 #include "scumm/util.h"

Modified: scummvm/trunk/engines/scumm/he/intern_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/intern_he.h	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/he/intern_he.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -27,6 +27,7 @@
 #define SCUMM_HE_INTERN_HE_H
 
 #include "scumm/intern.h"
+#include "scumm/scumm_v6.h"
 #ifdef ENABLE_HE
 #include "scumm/he/floodfill_he.h"
 #include "scumm/he/wiz_he.h"

Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -22,13 +22,13 @@
  * $Id$
  */
 
-
 #include "common/system.h"
 #include "common/timer.h"
 
 #include "scumm/actor.h"
+#include "scumm/intern.h"
 #include "scumm/saveload.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 #include "scumm/imuse_digi/dimuse.h"
 #include "scumm/imuse_digi/dimuse_bndmgr.h"

Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_script.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_script.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -27,7 +27,7 @@
 #include "common/timer.h"
 
 #include "scumm/actor.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 #include "scumm/imuse_digi/dimuse.h"
 #include "scumm/imuse_digi/dimuse_bndmgr.h"

Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -22,11 +22,10 @@
  * $Id$
  */
 
-
 #include "common/timer.h"
 
 #include "scumm/actor.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 #include "scumm/imuse_digi/dimuse.h"
 #include "scumm/imuse_digi/dimuse_bndmgr.h"

Modified: scummvm/trunk/engines/scumm/input.cpp
===================================================================
--- scummvm/trunk/engines/scumm/input.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/input.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -38,9 +38,9 @@
 #include "scumm/he/intern_he.h"
 #include "scumm/he/logic_he.h"
 #endif
-#include "scumm/scumm.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/sound.h"
-#include "scumm/intern.h"
 
 
 #ifdef _WIN32_WCE

Modified: scummvm/trunk/engines/scumm/insane/insane.cpp
===================================================================
--- scummvm/trunk/engines/scumm/insane/insane.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/insane/insane.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -29,9 +29,9 @@
 
 #include "common/system.h"
 
-#include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/file.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 
 #include "scumm/imuse/imuse.h"

Modified: scummvm/trunk/engines/scumm/insane/insane.h
===================================================================
--- scummvm/trunk/engines/scumm/insane/insane.h	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/insane/insane.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -26,8 +26,6 @@
 #if !defined(SCUMM_INSANE_H) && defined(ENABLE_SCUMM_7_8)
 #define SCUMM_INSANE_H
 
-#include "engines/engine.h"
-#include "scumm/intern.h"
 #include "scumm/nut_renderer.h"
 
 #include "scumm/smush/smush_player.h"

Modified: scummvm/trunk/engines/scumm/insane/insane_ben.cpp
===================================================================
--- scummvm/trunk/engines/scumm/insane/insane_ben.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/insane/insane_ben.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -28,6 +28,7 @@
 #include "engines/engine.h"
 
 #include "scumm/insane/insane.h"
+#include "scumm/scumm_v7.h"
 
 namespace Scumm {
 

Modified: scummvm/trunk/engines/scumm/insane/insane_enemy.cpp
===================================================================
--- scummvm/trunk/engines/scumm/insane/insane_enemy.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/insane/insane_enemy.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -28,6 +28,7 @@
 #include "engines/engine.h"
 
 #include "scumm/insane/insane.h"
+#include "scumm/scumm_v7.h"
 
 namespace Scumm {
 

Modified: scummvm/trunk/engines/scumm/insane/insane_iact.cpp
===================================================================
--- scummvm/trunk/engines/scumm/insane/insane_iact.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/insane/insane_iact.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,14 +23,8 @@
  *
  */
 
-
-
-#include "engines/engine.h"
-
-#include "scumm/scumm.h"
-
+#include "scumm/scumm_v7.h"
 #include "scumm/smush/smush_player.h"
-
 #include "scumm/insane/insane.h"
 
 namespace Scumm {

Modified: scummvm/trunk/engines/scumm/insane/insane_scenes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/insane/insane_scenes.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/insane/insane_scenes.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -29,7 +29,7 @@
 
 #include "common/config-manager.h"
 
-#include "scumm/scumm.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 
 #include "scumm/insane/insane.h"

Modified: scummvm/trunk/engines/scumm/intern.h
===================================================================
--- scummvm/trunk/engines/scumm/intern.h	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/intern.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -30,10 +30,6 @@
 
 namespace Scumm {
 
-class Insane;
-class SmushMixer;
-class SmushPlayer;
-
 // This is to help devices with small memory (PDA, smartphones, ...)
 // to save abit of memory used by opcode names in the Scumm engine.
 #ifndef REDUCE_MEMORY_USAGE
@@ -42,1021 +38,6 @@
 #	define _OPCODE(ver, x)	{ &ver::x, "" }
 #endif
 
-class ScummEngine_v5 : public ScummEngine {
-protected:
-	typedef void (ScummEngine_v5::*OpcodeProcV5)();
-	struct OpcodeEntryV5 {
-		OpcodeProcV5 proc;
-		const char *desc;
-	};
-
-	const OpcodeEntryV5 *_opcodesV5;
-
-	uint16 _cursorImages[4][17];
-	byte _cursorHotspots[2 * 4];
-
-	struct {
-		int x, y, w, h;
-		byte *buffer;
-		uint16 xStrips, yStrips;
-		bool isDrawn;
-	} _flashlight;
-
-	char _saveLoadVarsFilename[256];
-
-public:
-	ScummEngine_v5(OSystem *syst, const DetectorResult &dr);
-
-	void clearFlashlight();
-
-	virtual void resetCursors();
-
-protected:
-	virtual void setupOpcodes();
-	virtual void executeOpcode(byte i);
-	virtual const char *getOpcodeDesc(byte i);
-
-	virtual void scummLoop_handleActors();
-
-	virtual void setupScummVars();
-	virtual void resetScummVars();
-	virtual void decodeParseString();
-
-	virtual void saveOrLoad(Serializer *s);
-
-	virtual void readMAXS(int blockSize);
-
-	int getWordVararg(int *ptr);
-	void saveVars();
-	void loadVars();
-	void saveIQPoints();
-	void loadIQPoints();
-
-	virtual int getVar();
-	virtual int getVarOrDirectByte(byte mask);
-	virtual int getVarOrDirectWord(byte mask);
-
-	virtual void animateCursor();
-
-	virtual void setBuiltinCursor(int index);
-	void redefineBuiltinCursorFromChar(int index, int chr);
-	void redefineBuiltinCursorHotspot(int index, int x, int y);
-
-	void drawFlashlight();
-
-	/* Version 5 script opcodes */
-	void o5_actorFollowCamera();
-	void o5_actorFromPos();
-	void o5_actorOps();
-	void o5_add();
-	void o5_and();
-	void o5_animateActor();
-	void o5_breakHere();
-	void o5_chainScript();
-	void o5_cursorCommand();
-	void o5_cutscene();
-	void o5_debug();
-	void o5_decrement();
-	void o5_delay();
-	void o5_delayVariable();
-	void o5_divide();
-	void o5_doSentence();
-	void o5_drawBox();
-	void o5_drawObject();
-	void o5_endCutscene();
-	void o5_equalZero();
-	void o5_expression();
-	void o5_faceActor();
-	void o5_findInventory();
-	void o5_findObject();
-	void o5_freezeScripts();
-	void o5_getActorCostume();
-	void o5_getActorElevation();
-	void o5_getActorFacing();
-	void o5_getActorMoving();
-	void o5_getActorRoom();
-	void o5_getActorScale();
-	void o5_getActorWalkBox();
-	void o5_getActorWidth();
-	void o5_getActorX();
-	void o5_getActorY();
-	void o5_getAnimCounter();
-	void o5_getClosestObjActor();
-	void o5_getDist();
-	void o5_getInventoryCount();
-	void o5_getObjectOwner();
-	void o5_getObjectState();
-	void o5_getRandomNr();
-	void o5_getStringWidth();
-	void o5_getVerbEntrypoint();
-	void o5_ifClassOfIs();
-	void o5_ifNotState();
-	void o5_ifState();
-	void o5_increment();
-	void o5_isActorInBox();
-	void o5_isEqual();
-	void o5_isGreater();
-	void o5_isGreaterEqual();
-	void o5_isLess();
-	void o5_isNotEqual();
-	void o5_isScriptRunning();
-	void o5_isSoundRunning();
-	void o5_jumpRelative();
-	void o5_lessOrEqual();
-	void o5_lights();
-	void o5_loadRoom();
-	void o5_loadRoomWithEgo();
-	void o5_matrixOps();
-	void o5_move();
-	void o5_multiply();
-	void o5_notEqualZero();
-	void o5_oldRoomEffect();
-	void o5_or();
-	void o5_beginOverride();
-	void o5_panCameraTo();
-	void o5_pickupObject();
-	void o5_pickupObjectOld();
-	void o5_print();
-	void o5_printEgo();
-	void o5_pseudoRoom();
-	void o5_putActor();
-	void o5_putActorAtObject();
-	void o5_putActorInRoom();
-	void o5_systemOps();
-	void o5_resourceRoutines();
-	void o5_roomOps();
-	void o5_saveLoadGame();
-	void o5_saveLoadVars();
-	void o5_saveRestoreVerbs();
-	void o5_setCameraAt();
-	void o5_setClass();
-	void o5_setObjectName();
-	void o5_setOwnerOf();
-	void o5_setState();
-	void o5_setVarRange();
-	void o5_soundKludge();
-	void o5_startMusic();
-	void o5_startObject();
-	void o5_startScript();
-	void o5_startSound();
-	void o5_stopMusic();
-	void o5_stopObjectCode();
-	void o5_stopObjectScript();
-	void o5_stopScript();
-	void o5_stopSound();
-	void o5_stringOps();
-	void o5_subtract();
-	void o5_verbOps();
-	void o5_wait();
-	void o5_walkActorTo();
-	void o5_walkActorToActor();
-	void o5_walkActorToObject();
-};
-
-/**
- * Engine for version 4 SCUMM games; GF_SMALL_HEADER is always set for these.
- */
-class ScummEngine_v4 : public ScummEngine_v5 {
-public:
-	ScummEngine_v4(OSystem *syst, const DetectorResult &dr);
-
-	virtual void resetScumm();
-
-protected:
-	virtual void readResTypeList(int id);
-	virtual void readIndexFile();
-	virtual void loadCharset(int no);
-	virtual void resetRoomObjects();
-	virtual void readMAXS(int blockSize);
-	virtual void readGlobalObjects();
-
-	virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
-};
-
-/**
- * Engine for version 3 SCUMM games; GF_SMALL_NAMES is always set for these.
- */
-class ScummEngine_v3 : public ScummEngine_v4 {
-public:
-
-	/**
-	 * Prepared savegame used by the orginal save/load dialog.
-	 * Must be valid as long as the savescreen is active. As we are not
-	 * notified when the savescreen is closed, memory is only freed on a game
-	 * reset, at the destruction of the engine or when the original save/load
-	 * dialog is entered the next time.
-	 */
-	Common::SeekableReadStream *_savePreparedSavegame;
-
-	void prepareSavegame();
-	bool savePreparedSavegame(int slot, char *desc);
-
-
-public:
-	ScummEngine_v3(OSystem *syst, const DetectorResult &dr);
-	~ScummEngine_v3();
-
-	virtual void resetScumm();
-
-protected:
-	virtual void readRoomsOffsets();
-	virtual void loadCharset(int no);
-
-	virtual void processKeyboard(Common::KeyState lastKeyHit);
-};
-
-/**
- * Engine for old format version 3 SCUMM games; GF_OLD_BUNDLE is always set for these.
- */
-class ScummEngine_v3old : public ScummEngine_v3 {
-public:
-	ScummEngine_v3old(OSystem *syst, const DetectorResult &dr);
-
-protected:
-	virtual void readResTypeList(int id);
-	virtual void readIndexFile();
-	virtual void setupRoomSubBlocks();
-	virtual void resetRoomSubBlocks();
-	virtual void resetRoomObjects();
-};
-
-/**
- * Engine for version 2 SCUMM games.
- */
-class ScummEngine_v2 : public ScummEngine_v3old {
-protected:
-	typedef void (ScummEngine_v2::*OpcodeProcV2)();
-	struct OpcodeEntryV2 {
-		OpcodeProcV2 proc;
-		const char *desc;
-	};
-
-	const OpcodeEntryV2 *_opcodesV2;
-
-	struct V2MouseoverBox {
-		Common::Rect rect;
-		byte color;
-		byte hicolor;
-	};
-
-	V2MouseoverBox _mouseOverBoxesV2[7];
-	int8 _mouseOverBoxV2;
-
-	char _sentenceBuf[256];
-
-	int _activeInventory;
-	int _activeObject;
-	int _activeVerb;
-
-public:
-	ScummEngine_v2(OSystem *syst, const DetectorResult &dr);
-
-	virtual void resetScumm();
-
-	void checkV2MouseOver(Common::Point pos);
-	void checkV2Inventory(int x, int y);
-	void redrawV2Inventory();
-
-protected:
-	virtual void setupOpcodes();
-	virtual void executeOpcode(byte i);
-	virtual const char *getOpcodeDesc(byte i);
-
-	virtual void setupScummVars();
-	virtual void resetScummVars();
-	virtual void decodeParseString();
-
-	virtual void processKeyboard(Common::KeyState lastKeyHit);
-
-	virtual void readIndexFile();
-	void readClassicIndexFile();	// V1
-	void readEnhancedIndexFile();	// V2
-	virtual void readGlobalObjects();
-	virtual void loadCharset(int no);
-
-	virtual void runInputScript(int clickArea, int val, int mode);
-	virtual void runInventoryScript(int i);
-
-	virtual int getVar();
-
-	void getResultPosIndirect();
-	virtual void getResultPos();
-	virtual int readVar(uint var);
-	virtual void writeVar(uint var, int value);
-
-	virtual void ifStateCommon(byte type);
-	virtual void ifNotStateCommon(byte type);
-	virtual void setStateCommon(byte type);
-	virtual void clearStateCommon(byte type);
-
-	virtual void resetSentence();
-	void setUserState(byte state);
-
-	virtual void handleMouseOver(bool updateInventory);
-	virtual void checkExecVerbs();
-	void initV2MouseOver();
-	void initNESMouseOver();
-
-	virtual void setBuiltinCursor(int index);
-
-	void runObject(int obj, int entry);
-
-	/* Version 2 script opcodes */
-	void o2_actorFromPos();
-	void o2_actorOps();
-	void o2_add();
-	void o2_addIndirect();
-	void o2_assignVarByte();
-	void o2_assignVarWordIndirect();
-	void o2_beginOverride();
-	void o2_chainScript();
-	void o2_clearState01();
-	void o2_clearState02();
-	void o2_clearState04();
-	void o2_clearState08();
-	void o2_cursorCommand();
-	void o2_cutscene();
-	void o2_delay();
-	void o2_doSentence();
-	void o2_drawObject();
-	void o2_drawSentence();
-	void o2_dummy();
-	void o2_endCutscene();
-	void o2_findObject();
-	void o2_getActorWalkBox();
-	void o2_getActorX();
-	void o2_getActorY();
-	void o2_getBitVar();
-	void o2_getObjPreposition();
-	void o2_ifClassOfIs();
-	void o2_ifNotState01();
-	void o2_ifNotState02();
-	void o2_ifNotState04();
-	void o2_ifNotState08();
-	void o2_ifState01();
-	void o2_ifState02();
-	void o2_ifState04();
-	void o2_ifState08();
-	void o2_isGreater();
-	void o2_isGreaterEqual();
-	void o2_isLess();
-	void o2_isLessEqual();
-	void o2_lights();
-	void o2_loadRoomWithEgo();
-	void o2_setBoxFlags();
-	void o2_panCameraTo();
-	void o2_pickupObject();
-	void o2_putActor();
-	void o2_putActorAtObject();
-	void o2_putActorInRoom();
-	void o2_resourceRoutines();
-	void o2_restart();
-	void o2_roomOps();
-	void o2_getActorElevation();
-	void o2_setActorElevation();
-	void o2_setBitVar();
-	void o2_setCameraAt();
-	void o2_setObjPreposition();
-	void o2_setOwnerOf();
-	void o2_setState01();
-	void o2_setState02();
-	void o2_setState04();
-	void o2_setState08();
-	void o2_startScript();
-	void o2_stopScript();
-	void o2_subtract();
-	void o2_subIndirect();
-	void o2_switchCostumeSet();
-	void o2_verbOps();
-	void o2_waitForActor();
-	void o2_waitForMessage();
-	void o2_waitForSentence();
-	void o2_walkActorTo();
-	void o2_walkActorToObject();
-
-	byte VAR_SENTENCE_VERB;
-	byte VAR_SENTENCE_OBJECT1;
-	byte VAR_SENTENCE_OBJECT2;
-	byte VAR_SENTENCE_PREPOSITION;
-	byte VAR_BACKUP_VERB;
-
-	byte VAR_CLICK_AREA;
-	byte VAR_CLICK_VERB;
-	byte VAR_CLICK_OBJECT;
-};
-
-/**
- * Engine for Apple II and Commodore 64 versions of Maniac Mansion
- */
-class ScummEngine_v0 : public ScummEngine_v2 {
-protected:
-	typedef void (ScummEngine_v0::*OpcodeProcC64)();
-	struct OpcodeEntryC64 {
-		OpcodeProcC64 proc;
-		const char *desc;
-	};
-
-	const OpcodeEntryC64 *_opcodesC64;
-
-	int _currentMode;
-public:
-	ScummEngine_v0(OSystem *syst, const DetectorResult &dr);
-
-	virtual void resetScumm();
-
-protected:
-	virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
-
-	virtual void setupOpcodes();
-	virtual void executeOpcode(byte i);
-	virtual const char *getOpcodeDesc(byte i);
-
-	virtual void setupScummVars();
-	virtual void resetScummVars();
-	virtual void decodeParseString();
-
-	virtual void processInput();
-
-	virtual void saveOrLoad(Serializer *s);
-
-	virtual void checkExecVerbs();
-	virtual void handleMouseOver(bool updateInventory);
-	void resetVerbs();
-	void setNewKidVerbs();
-	void drawSentence();
-
-	void switchActor(int slot);
-
-	virtual int getVarOrDirectWord(byte mask);
-	virtual uint fetchScriptWord();
-
-	virtual void ifStateCommon(byte type);
-	virtual void ifNotStateCommon(byte type);
-	virtual void setStateCommon(byte type);
-	virtual void clearStateCommon(byte type);
-
-	virtual void resetSentence();
-
-	int getObjectFlag();
-
-	/* Version C64 script opcodes */
-	void o_setState08();
-	void o_clearState08();
-	void o_stopCurrentScript();
-	void o_loadSound();
-	void o_getActorMoving();
-	void o_animateActor();
-	void o_putActorAtObject();
-	void o_pickupObject();
-	void o_setObjectName();
-	void o_lockSound();
-	void o_lockCostume();
-	void o_loadCostume();
-	void o_loadRoom();
-	void o_loadRoomWithEgo();
-	void o_lockScript();
-	void o_loadScript();
-	void o_lockRoom();
-	void o_cursorCommand();
-	void o_lights();
-	void o_unlockCostume();
-	void o_unlockScript();
-	void o_decrement();
-	void o_nop();
-	void o_getActorBitVar();
-	void o_setActorBitVar();
-	void o_getBitVar();
-	void o_setBitVar();
-	void o_doSentence();
-	void o_unknown2();
-	void o_ifActiveObject();
-	void o_getClosestObjActor();
-	void o_printEgo_c64();
-	void o_print_c64();
-	void o_unlockRoom();
-	void o_unlockSound();
-	void o_cutscene();
-	void o_endCutscene();
-	void o_beginOverride();
-	void o_isEqual();
-	void o_isGreater();
-	void o_isGreaterEqual();
-	void o_isLess();
-	void o_isLessEqual();
-	void o_isNotEqual();
-	void o_notEqualZero();
-	void o_equalZero();
-	void o_jumpRelative();
-	void o_setOwnerOf();
-};
-
-class ScummEngine_v6 : public ScummEngine {
-	friend class Insane;
-
-protected:
-	typedef void (ScummEngine_v6::*OpcodeProcV6)();
-	struct OpcodeEntryV6 {
-		OpcodeProcV6 proc;
-		const char *desc;
-	};
-
-	enum ArrayType {
-		kBitArray = 1,
-		kNibbleArray = 2,
-		kByteArray = 3,
-		kStringArray = 4,
-		kIntArray = 5,
-		kDwordArray = 6
-	};
-
-#include "common/pack-start.h"	// START STRUCT PACKING
-
-	struct ArrayHeader {
-		int16 dim1;
-		int16 type;
-		int16 dim2;
-		byte data[1];
-	} PACKED_STRUCT;
-
-#include "common/pack-end.h"	// END STRUCT PACKING
-
-	const OpcodeEntryV6 *_opcodesV6;
-
-	struct TextObject {
-		int16 xpos, ypos;
-		byte color;
-		byte charset;
-		byte text[256];
-	};
-
-	/** BlastObjects to draw */
-	struct BlastObject {
-		uint16 number;
-		Common::Rect rect;
-		uint16 scaleX, scaleY;
-		uint16 image;
-		uint16 mode;
-	};
-
-	int _blastObjectQueuePos;
-	BlastObject _blastObjectQueue[200];
-
-	struct BlastText : TextObject {
-		Common::Rect rect;
-		bool center;
-	};
-
-	int _blastTextQueuePos;
-	BlastText _blastTextQueue[50];
-
-	// Akos Class
-	struct {
-		int16 cmd;
-		int16 actor;
-		int16 param1;
-		int16 param2;
-	} _akosQueue[32];
-	int16 _akosQueuePos;
-
-	byte _curActor;
-	int _curVerb;
-	int _curVerbSlot;
-
-	bool _forcedWaitForMessage;
-
-public:
-	ScummEngine_v6(OSystem *syst, const DetectorResult &dr);
-
-	virtual void resetScumm();
-
-protected:
-	virtual void setupOpcodes();
-	virtual void executeOpcode(byte i);
-	virtual const char *getOpcodeDesc(byte i);
-
-	virtual void scummLoop_handleActors();
-	virtual void processKeyboard(Common::KeyState lastKeyHit);
-
-	virtual void setupScummVars();
-	virtual void decodeParseString(int a, int b);
-	virtual void readArrayFromIndexFile();
-
-	virtual byte *getStringAddress(int i);
-	virtual void readMAXS(int blockSize);
-
-	virtual void palManipulateInit(int resID, int start, int end, int time);
-	virtual void drawDirtyScreenParts();
-
-	int getStackList(int *args, uint maxnum);
-	int popRoomAndObj(int *room);
-
-	ArrayHeader *getArray(int array);
-	byte *defineArray(int array, int type, int dim2, int dim1);
-	int findFreeArrayId();
-	void nukeArray(int array);
-	virtual int readArray(int array, int index, int base);
-	virtual void writeArray(int array, int index, int base, int value);
-	void shuffleArray(int num, int minIdx, int maxIdx);
-
-	virtual void setDefaultCursor();
-	void setCursorTransparency(int a);
-	void setCursorHotspot(int x, int y);
-
-	virtual void setCursorFromImg(uint img, uint room, uint imgindex);
-	void useIm01Cursor(const byte *im, int w, int h);
-	void useBompCursor(const byte *im, int w, int h);
-	void grabCursor(int x, int y, int w, int h);
-
-	void enqueueText(const byte *text, int x, int y, byte color, byte charset, bool center);
-	void drawBlastTexts();
-	void removeBlastTexts();
-
-	void enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth,
-	                   int objectHeight, int scaleX, int scaleY, int image, int mode);
-	void drawBlastObjects();
-	void drawBlastObject(BlastObject *eo);
-	void removeBlastObjects();
-	void removeBlastObject(BlastObject *eo);
-
-	virtual void clearDrawQueues();
-
-public:
-	bool akos_increaseAnims(const byte *akos, Actor *a);
-	bool akos_increaseAnim(Actor *a, int i, const byte *aksq, const uint16 *akfo, int numakfo);
-protected:
-	void akos_queCommand(byte cmd, Actor *a, int param_1, int param_2);
-	virtual void akos_processQueue();
-
-	virtual void processActors();
-
-	int getSpecialBox(int x, int y);
-
-	int getDistanceBetween(bool is_obj_1, int b, int c, bool is_obj_2, int e, int f);
-
-	/* Version 6 script opcodes */
-	void o6_setBlastObjectWindow();
-	void o6_pushByte();
-	void o6_pushWord();
-	void o6_pushByteVar();
-	void o6_pushWordVar();
-	void o6_invalid();
-	void o6_byteArrayRead();
-	void o6_wordArrayRead();
-	void o6_byteArrayIndexedRead();
-	void o6_wordArrayIndexedRead();
-	void o6_dup();
-	void o6_pop();
-	void o6_not();
-	void o6_eq();
-	void o6_neq();
-	void o6_gt();
-	void o6_lt();
-	void o6_le();
-	void o6_ge();
-	void o6_add();
-	void o6_sub();
-	void o6_mul();
-	void o6_div();
-	void o6_land();
-	void o6_lor();
-	void o6_writeByteVar();
-	void o6_writeWordVar();
-	void o6_byteArrayWrite();
-	void o6_wordArrayWrite();
-	void o6_byteArrayIndexedWrite();
-	void o6_wordArrayIndexedWrite();
-	void o6_byteVarInc();
-	void o6_wordVarInc();
-	void o6_byteArrayInc();
-	void o6_wordArrayInc();
-	void o6_byteVarDec();
-	void o6_wordVarDec();
-	void o6_byteArrayDec();
-	void o6_wordArrayDec();
-	void o6_if();
-	void o6_ifNot();
-	void o6_jump();
-	void o6_startScript();
-	void o6_startScriptQuick();
-	void o6_startObject();
-	void o6_drawObject();
-	void o6_drawObjectAt();
-	void o6_stopObjectCode();
-	void o6_endCutscene();
-	void o6_cutscene();
-	void o6_stopMusic();
-	void o6_freezeUnfreeze();
-	void o6_cursorCommand();
-	void o6_breakHere();
-	void o6_ifClassOfIs();
-	void o6_setClass();
-	void o6_getState();
-	void o6_setState();
-	void o6_setOwner();
-	void o6_getOwner();
-	void o6_startSound();
-	void o6_stopSound();
-	void o6_startMusic();
-	void o6_stopObjectScript();
-	void o6_panCameraTo();
-	void o6_actorFollowCamera();
-	void o6_setCameraAt();
-	void o6_loadRoom();
-	void o6_stopScript();
-	void o6_walkActorToObj();
-	void o6_walkActorTo();
-	void o6_putActorAtXY();
-	void o6_putActorAtObject();
-	void o6_faceActor();
-	void o6_animateActor();
-	void o6_doSentence();
-	void o6_pickupObject();
-	void o6_loadRoomWithEgo();
-	void o6_getRandomNumber();
-	void o6_getRandomNumberRange();
-	void o6_getActorMoving();
-	void o6_isScriptRunning();
-	void o6_getActorRoom();
-	void o6_getObjectX();
-	void o6_getObjectY();
-	void o6_getObjectOldDir();
-	void o6_getObjectNewDir();
-	void o6_getActorWalkBox();
-	void o6_getActorCostume();
-	void o6_findInventory();
-	void o6_getInventoryCount();
-	void o6_getVerbFromXY();
-	void o6_beginOverride();
-	void o6_endOverride();
-	void o6_setObjectName();
-	void o6_isSoundRunning();
-	void o6_setBoxFlags();
-	void o6_createBoxMatrix();
-	void o6_resourceRoutines();
-	void o6_roomOps();
-	void o6_actorOps();
-	void o6_verbOps();
-	void o6_getActorFromXY();
-	void o6_findObject();
-	void o6_pseudoRoom();
-	void o6_getActorElevation();
-	void o6_getVerbEntrypoint();
-	void o6_arrayOps();
-	void o6_saveRestoreVerbs();
-	void o6_drawBox();
-	void o6_getActorWidth();
-	void o6_wait();
-	void o6_getActorScaleX();
-	void o6_getActorAnimCounter();
-	void o6_soundKludge();
-	void o6_isAnyOf();
-	void o6_systemOps();
-	void o6_isActorInBox();
-	void o6_delay();
-	void o6_delaySeconds();
-	void o6_delayMinutes();
-	void o6_stopSentence();
-	void o6_printLine();
-	void o6_printText();
-	void o6_printDebug();
-	void o6_printSystem();
-	void o6_printActor();
-	void o6_printEgo();
-	void o6_talkActor();
-	void o6_talkEgo();
-	void o6_dimArray();
-	void o6_dummy();
-	void o6_startObjectQuick();
-	void o6_startScriptQuick2();
-	void o6_dim2dimArray();
-	void o6_abs();
-	void o6_distObjectObject();
-	void o6_distObjectPt();
-	void o6_distPtPt();
-	virtual void o6_kernelSetFunctions();
-	void o6_delayFrames();
-	void o6_pickOneOf();
-	void o6_pickOneOfDefault();
-	void o6_jumpToScript();
-	void o6_isRoomScriptRunning();
-	void o6_kernelGetFunctions();
-	void o6_getAnimateVariable();
-	void o6_drawBlastObject();
-	void o6_getActorLayer();
-	void o6_stampObject();
-	void o6_bor();
-	void o6_band();
-	void o6_stopTalking();
-	void o6_findAllObjects();
-	void o6_pickVarRandom();
-	void o6_getDateTime();
-	void o6_getPixel();
-	void o6_setBoxSet();
-	void o6_shuffle();
-
-	byte VAR_VIDEONAME;
-	byte VAR_RANDOM_NR;
-	byte VAR_STRING2DRAW;
-
-	byte VAR_TIMEDATE_YEAR;
-	byte VAR_TIMEDATE_MONTH;
-	byte VAR_TIMEDATE_DAY;
-	byte VAR_TIMEDATE_HOUR;
-	byte VAR_TIMEDATE_MINUTE;
-	byte VAR_TIMEDATE_SECOND;
-};
-
-#ifdef ENABLE_SCUMM_7_8
-class ScummEngine_v7 : public ScummEngine_v6 {
-	friend class SmushPlayer;
-	friend class Insane;
-public:
-	ScummEngine_v7(OSystem *syst, const DetectorResult &dr);
-	~ScummEngine_v7();
-
-
-protected:
-	int _smushFrameRate;
-
-	/**
-	 * Flag which signals that the SMUSH video playback should end now
-	 * (e.g. because it was aborted by the user or it's simply finished).
-	 */
-	bool _smushVideoShouldFinish;
-
-	bool _smushActive;
-
-	Insane *_insane;
-
-public:
-	SmushMixer *_smixer;
-	SmushPlayer *_splayer;
-
-
-	struct LangIndexNode {
-		char tag[12+1];
-		int32 offset;
-	};
-
-protected:
-	int _verbLineSpacing;
-	bool _existLanguageFile;
-	char *_languageBuffer;
-	LangIndexNode *_languageIndex;
-	int _languageIndexSize;
-	char _lastStringTag[12+1];
-
-#if defined(__SYMBIAN32__) || defined (_WIN32_WCE) // for some reason VC6 cannot find the base class TextObject
-	struct SubtitleText {
-		int16 xpos, ypos;
-		byte color;
-		byte charset;
-		byte text[256];
-		bool actorSpeechMsg;
-	};
-#else
-	struct SubtitleText : TextObject {
-		bool actorSpeechMsg;
-	};
-#endif
-
-	int _subtitleQueuePos;
-	SubtitleText _subtitleQueue[20];
-
-public:
-	void processSubtitleQueue();
-	void addSubtitleToQueue(const byte *text, const Common::Point &pos, byte color, byte charset);
-	void clearSubtitleQueue();
-	virtual void CHARSET_1();
-
-protected:
-	virtual int runDialog(Dialog &dialog);
-
-	virtual void scummLoop_handleSound();
-	virtual void scummLoop_handleDrawing();
-	virtual void processKeyboard(Common::KeyState lastKeyHit);
-
-	virtual void setupScumm();
-
-	virtual void setupScummVars();
-	virtual void resetScummVars();
-
-	virtual void akos_processQueue();
-
-	virtual void saveOrLoad(Serializer *s);
-
-	virtual void readMAXS(int blockSize);
-	virtual void readGlobalObjects();
-	virtual void readIndexBlock(uint32 blocktype, uint32 itemsize);
-
-	virtual void setCameraAt(int pos_x, int pos_y);
-	virtual void setCameraFollows(Actor *a, bool setCamera = false);
-	virtual void moveCamera();
-	virtual void panCameraTo(int x, int y);
-
-	virtual int getObjectIdFromOBIM(const byte *obim);
-
-	virtual void actorTalk(const byte *msg);
-	virtual void translateText(const byte *text, byte *trans_buff);
-	virtual void loadLanguageBundle();
-	void playSpeech(const byte *ptr);
-
-	virtual void drawVerb(int verb, int mode);
-
-
-	virtual void o6_kernelSetFunctions();
-};
-
-class ScummEngine_v8 : public ScummEngine_v7 {
-protected:
-	typedef void (ScummEngine_v8::*OpcodeProcV8)();
-	struct OpcodeEntryV8 {
-		OpcodeProcV8 proc;
-		const char *desc;
-	};
-
-	const OpcodeEntryV8 *_opcodesV8;
-
-	struct ObjectNameId {
-		char name[40];
-		int id;
-	};
-	int _objectIDMapSize;
-	ObjectNameId *_objectIDMap;
-
-	int _keyScriptKey, _keyScriptNo;
-
-public:
-	ScummEngine_v8(OSystem *syst, const DetectorResult &dr);
-	~ScummEngine_v8();
-
-protected:
-	virtual void setupOpcodes();
-	virtual void executeOpcode(byte i);
-	virtual const char *getOpcodeDesc(byte i);
-
-	virtual void printString(int m, const byte *msg);
-
-	virtual void scummLoop_handleSaveLoad();
-
-	virtual void setupScummVars();
-	virtual void resetScummVars();
-	virtual void decodeParseString(int m, int n);
-	virtual void readArrayFromIndexFile();
-
-	virtual void readMAXS(int blockSize);
-	virtual void readGlobalObjects();
-
-	virtual uint fetchScriptWord();
-	virtual int fetchScriptWordSigned();
-
-	virtual int readVar(uint var);
-	virtual void writeVar(uint var, int value);
-
-	virtual int getObjectIdFromOBIM(const byte *obim);
-
-	virtual void processKeyboard(Common::KeyState lastKeyHit);
-
-	void desaturatePalette(int hueScale, int satScale, int lightScale, int startColor, int endColor);
-
-
-	/* Version 8 script opcodes */
-	void o8_mod();
-	void o8_wait();
-
-	void o8_dimArray();
-	void o8_dim2dimArray();
-	void o8_arrayOps();
-	void o8_blastText();
-
-	void o8_cursorCommand();
-	void o8_resourceRoutines();
-	void o8_roomOps();
-	void o8_actorOps();
-	void o8_cameraOps();
-	void o8_verbOps();
-
-	void o8_systemOps();
-	void o8_startVideo();
-	void o8_kernelSetFunctions();
-	void o8_kernelGetFunctions();
-
-	void o8_getActorChore();
-	void o8_getActorZPlane();
-
-	void o8_drawObject();
-	void o8_getObjectImageX();
-	void o8_getObjectImageY();
-	void o8_getObjectImageWidth();
-	void o8_getObjectImageHeight();
-
-	void o8_getStringWidth();
-
-	byte VAR_LANGUAGE;
-};
-
-#endif
-
 } // End of namespace Scumm
 
 #endif

Modified: scummvm/trunk/engines/scumm/object.cpp
===================================================================
--- scummvm/trunk/engines/scumm/object.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/object.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,13 +23,13 @@
  *
  */
 
-#include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/bomp.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/usage_bits.h"
 #include "scumm/util.h"
 

Modified: scummvm/trunk/engines/scumm/palette.cpp
===================================================================
--- scummvm/trunk/engines/scumm/palette.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/palette.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -22,13 +22,12 @@
  *
  */
 
-
 #include "common/system.h"
 #include "common/util.h"
 
-#include "scumm/scumm.h"
-#include "scumm/intern.h"
 #include "scumm/resource.h"
+#include "scumm/scumm.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/util.h"
 
 namespace Scumm {

Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/resource.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,7 +23,6 @@
  *
  */
 
-
 #include "common/str.h"
 
 #include "scumm/charset.h"
@@ -31,11 +30,12 @@
 #include "scumm/file.h"
 #include "scumm/imuse/imuse.h"
 #include "scumm/imuse_digi/dimuse.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
 #include "scumm/scumm.h"
+#include "scumm/scumm_v5.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 #include "scumm/verbs.h"

Modified: scummvm/trunk/engines/scumm/resource_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v2.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/resource_v2.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -26,8 +26,7 @@
 
 
 #include "scumm/file.h"
-#include "scumm/scumm.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v2.h"
 #include "scumm/resource.h"
 
 namespace Scumm {

Modified: scummvm/trunk/engines/scumm/resource_v3.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v3.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/resource_v3.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -24,8 +24,7 @@
  */
 
 
-#include "scumm/scumm.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v3.h"
 #include "scumm/file.h"
 #include "scumm/util.h"
 

Modified: scummvm/trunk/engines/scumm/resource_v4.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource_v4.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/resource_v4.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -24,8 +24,7 @@
  */
 
 
-#include "scumm/scumm.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v4.h"
 #include "scumm/file.h"
 #include "scumm/resource.h"
 #include "scumm/util.h"

Modified: scummvm/trunk/engines/scumm/room.cpp
===================================================================
--- scummvm/trunk/engines/scumm/room.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/room.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -27,13 +27,12 @@
 #include "common/system.h"
 #include "scumm/actor.h"
 #include "scumm/boxes.h"
-#include "scumm/intern.h"
 #ifdef ENABLE_HE
 #include "scumm/he/intern_he.h"
 #endif
 #include "scumm/object.h"
 #include "scumm/resource.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v3.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 

Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/saveload.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -34,12 +34,12 @@
 #include "scumm/charset.h"
 #include "scumm/imuse_digi/dimuse.h"
 #include "scumm/imuse/imuse.h"
-#include "scumm/intern.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
 #include "scumm/saveload.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 #include "scumm/he/sprite_he.h"
 #include "scumm/verbs.h"

Modified: scummvm/trunk/engines/scumm/script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/script.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -29,11 +29,10 @@
 #include "common/util.h"
 
 #include "scumm/actor.h"
-#include "scumm/intern.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
 #include "scumm/util.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v2.h"
 #include "scumm/verbs.h"
 
 namespace Scumm {

Modified: scummvm/trunk/engines/scumm/script_v0.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v0.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/script_v0.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -28,7 +28,7 @@
 #include "scumm/charset.h"
 #include "scumm/intern.h"
 #include "scumm/object.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v0.h"
 #include "scumm/verbs.h"
 
 namespace Scumm {

Modified: scummvm/trunk/engines/scumm/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v2.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/script_v2.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -28,7 +28,7 @@
 #include "scumm/charset.h"
 #include "scumm/intern.h"
 #include "scumm/object.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v2.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 #include "scumm/verbs.h"

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -28,7 +28,8 @@
 #include "scumm/charset.h"
 #include "scumm/intern.h"
 #include "scumm/object.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v3.h"
+#include "scumm/scumm_v5.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 #include "scumm/verbs.h"

Modified: scummvm/trunk/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v6.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/script_v6.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -38,6 +38,8 @@
 #include "scumm/object.h"
 #include "scumm/resource.h"
 #include "scumm/scumm.h"
+#include "scumm/scumm_v6.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/smush/smush_player.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"

Modified: scummvm/trunk/engines/scumm/script_v8.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v8.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/script_v8.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,7 +23,6 @@
  *
  */
 
-
 #include "common/config-manager.h"
 #include "common/system.h"
 
@@ -35,7 +34,7 @@
 #include "scumm/intern.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 #include "scumm/verbs.h"

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,7 +23,6 @@
  *
  */
 
-
 #include "common/config-manager.h"
 #include "common/md5.h"
 #include "common/events.h"
@@ -46,7 +45,6 @@
 #include "scumm/smush/smush_mixer.h"
 #include "scumm/smush/smush_player.h"
 #include "scumm/insane/insane.h"
-#include "scumm/intern.h"
 #include "scumm/he/animation_he.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/he/logic_he.h"
@@ -58,7 +56,8 @@
 #include "scumm/player_v2a.h"
 #include "scumm/player_v3a.h"
 #include "scumm/he/resource_he.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/sound.h"
 #include "scumm/imuse/sysex.h"
 #include "scumm/he/sprite_he.h"

Added: scummvm/trunk/engines/scumm/scumm_v0.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v0.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v0.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,141 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V0_H
+#define SCUMM_SCRIPT_V0_H
+
+#include "scumm/scumm_v2.h"
+
+namespace Scumm {
+
+/**
+ * Engine for Apple II and Commodore 64 versions of Maniac Mansion
+ */
+class ScummEngine_v0 : public ScummEngine_v2 {
+protected:
+	typedef void (ScummEngine_v0::*OpcodeProcC64)();
+	struct OpcodeEntryC64 {
+		OpcodeProcC64 proc;
+		const char *desc;
+	};
+
+	const OpcodeEntryC64 *_opcodesC64;
+
+	int _currentMode;
+public:
+	ScummEngine_v0(OSystem *syst, const DetectorResult &dr);
+
+	virtual void resetScumm();
+
+protected:
+	virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
+
+	virtual void setupOpcodes();
+	virtual void executeOpcode(byte i);
+	virtual const char *getOpcodeDesc(byte i);
+
+	virtual void setupScummVars();
+	virtual void resetScummVars();
+	virtual void decodeParseString();
+
+	virtual void processInput();
+
+	virtual void saveOrLoad(Serializer *s);
+
+	virtual void checkExecVerbs();
+	virtual void handleMouseOver(bool updateInventory);
+	void resetVerbs();
+	void setNewKidVerbs();
+	void drawSentence();
+
+	void switchActor(int slot);
+
+	virtual int getVarOrDirectWord(byte mask);
+	virtual uint fetchScriptWord();
+
+	virtual void ifStateCommon(byte type);
+	virtual void ifNotStateCommon(byte type);
+	virtual void setStateCommon(byte type);
+	virtual void clearStateCommon(byte type);
+
+	virtual void resetSentence();
+
+	int getObjectFlag();
+
+	/* Version C64 script opcodes */
+	void o_setState08();
+	void o_clearState08();
+	void o_stopCurrentScript();
+	void o_loadSound();
+	void o_getActorMoving();
+	void o_animateActor();
+	void o_putActorAtObject();
+	void o_pickupObject();
+	void o_setObjectName();
+	void o_lockSound();
+	void o_lockCostume();
+	void o_loadCostume();
+	void o_loadRoom();
+	void o_loadRoomWithEgo();
+	void o_lockScript();
+	void o_loadScript();
+	void o_lockRoom();
+	void o_cursorCommand();
+	void o_lights();
+	void o_unlockCostume();
+	void o_unlockScript();
+	void o_decrement();
+	void o_nop();
+	void o_getActorBitVar();
+	void o_setActorBitVar();
+	void o_getBitVar();
+	void o_setBitVar();
+	void o_doSentence();
+	void o_unknown2();
+	void o_ifActiveObject();
+	void o_getClosestObjActor();
+	void o_printEgo_c64();
+	void o_print_c64();
+	void o_unlockRoom();
+	void o_unlockSound();
+	void o_cutscene();
+	void o_endCutscene();
+	void o_beginOverride();
+	void o_isEqual();
+	void o_isGreater();
+	void o_isGreaterEqual();
+	void o_isLess();
+	void o_isLessEqual();
+	void o_isNotEqual();
+	void o_notEqualZero();
+	void o_equalZero();
+	void o_jumpRelative();
+	void o_setOwnerOf();
+};
+
+
+} // End of namespace Scumm
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v0.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v2.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v2.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v2.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,201 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V2_H
+#define SCUMM_SCRIPT_V2_H
+
+#include "scumm/scumm_v3.h"
+
+namespace Scumm {
+
+/**
+ * Engine for version 2 SCUMM games.
+ */
+class ScummEngine_v2 : public ScummEngine_v3old {
+protected:
+	typedef void (ScummEngine_v2::*OpcodeProcV2)();
+	struct OpcodeEntryV2 {
+		OpcodeProcV2 proc;
+		const char *desc;
+	};
+
+	const OpcodeEntryV2 *_opcodesV2;
+
+	struct V2MouseoverBox {
+		Common::Rect rect;
+		byte color;
+		byte hicolor;
+	};
+
+	V2MouseoverBox _mouseOverBoxesV2[7];
+	int8 _mouseOverBoxV2;
+
+	char _sentenceBuf[256];
+
+	int _activeInventory;
+	int _activeObject;
+	int _activeVerb;
+
+public:
+	ScummEngine_v2(OSystem *syst, const DetectorResult &dr);
+
+	virtual void resetScumm();
+
+	void checkV2MouseOver(Common::Point pos);
+	void checkV2Inventory(int x, int y);
+	void redrawV2Inventory();
+
+protected:
+	virtual void setupOpcodes();
+	virtual void executeOpcode(byte i);
+	virtual const char *getOpcodeDesc(byte i);
+
+	virtual void setupScummVars();
+	virtual void resetScummVars();
+	virtual void decodeParseString();
+
+	virtual void processKeyboard(Common::KeyState lastKeyHit);
+
+	virtual void readIndexFile();
+	void readClassicIndexFile();	// V1
+	void readEnhancedIndexFile();	// V2
+	virtual void readGlobalObjects();
+	virtual void loadCharset(int no);
+
+	virtual void runInputScript(int clickArea, int val, int mode);
+	virtual void runInventoryScript(int i);
+
+	virtual int getVar();
+
+	void getResultPosIndirect();
+	virtual void getResultPos();
+	virtual int readVar(uint var);
+	virtual void writeVar(uint var, int value);
+
+	virtual void ifStateCommon(byte type);
+	virtual void ifNotStateCommon(byte type);
+	virtual void setStateCommon(byte type);
+	virtual void clearStateCommon(byte type);
+
+	virtual void resetSentence();
+	void setUserState(byte state);
+
+	virtual void handleMouseOver(bool updateInventory);
+	virtual void checkExecVerbs();
+	void initV2MouseOver();
+	void initNESMouseOver();
+
+	virtual void setBuiltinCursor(int index);
+
+	void runObject(int obj, int entry);
+
+	/* Version 2 script opcodes */
+	void o2_actorFromPos();
+	void o2_actorOps();
+	void o2_add();
+	void o2_addIndirect();
+	void o2_assignVarByte();
+	void o2_assignVarWordIndirect();
+	void o2_beginOverride();
+	void o2_chainScript();
+	void o2_clearState01();
+	void o2_clearState02();
+	void o2_clearState04();
+	void o2_clearState08();
+	void o2_cursorCommand();
+	void o2_cutscene();
+	void o2_delay();
+	void o2_doSentence();
+	void o2_drawObject();
+	void o2_drawSentence();
+	void o2_dummy();
+	void o2_endCutscene();
+	void o2_findObject();
+	void o2_getActorWalkBox();
+	void o2_getActorX();
+	void o2_getActorY();
+	void o2_getBitVar();
+	void o2_getObjPreposition();
+	void o2_ifClassOfIs();
+	void o2_ifNotState01();
+	void o2_ifNotState02();
+	void o2_ifNotState04();
+	void o2_ifNotState08();
+	void o2_ifState01();
+	void o2_ifState02();
+	void o2_ifState04();
+	void o2_ifState08();
+	void o2_isGreater();
+	void o2_isGreaterEqual();
+	void o2_isLess();
+	void o2_isLessEqual();
+	void o2_lights();
+	void o2_loadRoomWithEgo();
+	void o2_setBoxFlags();
+	void o2_panCameraTo();
+	void o2_pickupObject();
+	void o2_putActor();
+	void o2_putActorAtObject();
+	void o2_putActorInRoom();
+	void o2_resourceRoutines();
+	void o2_restart();
+	void o2_roomOps();
+	void o2_getActorElevation();
+	void o2_setActorElevation();
+	void o2_setBitVar();
+	void o2_setCameraAt();
+	void o2_setObjPreposition();
+	void o2_setOwnerOf();
+	void o2_setState01();
+	void o2_setState02();
+	void o2_setState04();
+	void o2_setState08();
+	void o2_startScript();
+	void o2_stopScript();
+	void o2_subtract();
+	void o2_subIndirect();
+	void o2_switchCostumeSet();
+	void o2_verbOps();
+	void o2_waitForActor();
+	void o2_waitForMessage();
+	void o2_waitForSentence();
+	void o2_walkActorTo();
+	void o2_walkActorToObject();
+
+	byte VAR_SENTENCE_VERB;
+	byte VAR_SENTENCE_OBJECT1;
+	byte VAR_SENTENCE_OBJECT2;
+	byte VAR_SENTENCE_PREPOSITION;
+	byte VAR_BACKUP_VERB;
+
+	byte VAR_CLICK_AREA;
+	byte VAR_CLICK_VERB;
+	byte VAR_CLICK_OBJECT;
+};
+
+
+} // End of namespace Scumm
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v2.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v3.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v3.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v3.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,83 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V3_H
+#define SCUMM_SCRIPT_V3_H
+
+#include "scumm/scumm_v4.h"
+
+namespace Scumm {
+
+/**
+ * Engine for version 3 SCUMM games; GF_SMALL_NAMES is always set for these.
+ */
+class ScummEngine_v3 : public ScummEngine_v4 {
+public:
+
+	/**
+	 * Prepared savegame used by the orginal save/load dialog.
+	 * Must be valid as long as the savescreen is active. As we are not
+	 * notified when the savescreen is closed, memory is only freed on a game
+	 * reset, at the destruction of the engine or when the original save/load
+	 * dialog is entered the next time.
+	 */
+	Common::SeekableReadStream *_savePreparedSavegame;
+
+	void prepareSavegame();
+	bool savePreparedSavegame(int slot, char *desc);
+
+
+public:
+	ScummEngine_v3(OSystem *syst, const DetectorResult &dr);
+	~ScummEngine_v3();
+
+	virtual void resetScumm();
+
+protected:
+	virtual void readRoomsOffsets();
+	virtual void loadCharset(int no);
+
+	virtual void processKeyboard(Common::KeyState lastKeyHit);
+};
+
+/**
+ * Engine for old format version 3 SCUMM games; GF_OLD_BUNDLE is always set for these.
+ */
+class ScummEngine_v3old : public ScummEngine_v3 {
+public:
+	ScummEngine_v3old(OSystem *syst, const DetectorResult &dr);
+
+protected:
+	virtual void readResTypeList(int id);
+	virtual void readIndexFile();
+	virtual void setupRoomSubBlocks();
+	virtual void resetRoomSubBlocks();
+	virtual void resetRoomObjects();
+};
+
+
+} // End of namespace Scumm
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v3.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v4.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v4.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v4.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,56 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V4_H
+#define SCUMM_SCRIPT_V4_H
+
+#include "scumm/scumm_v5.h"
+
+namespace Scumm {
+
+/**
+ * Engine for version 4 SCUMM games; GF_SMALL_HEADER is always set for these.
+ */
+class ScummEngine_v4 : public ScummEngine_v5 {
+public:
+	ScummEngine_v4(OSystem *syst, const DetectorResult &dr);
+
+	virtual void resetScumm();
+
+protected:
+	virtual void readResTypeList(int id);
+	virtual void readIndexFile();
+	virtual void loadCharset(int no);
+	virtual void resetRoomObjects();
+	virtual void readMAXS(int blockSize);
+	virtual void readGlobalObjects();
+
+	virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
+};
+
+
+} // End of namespace Scumm
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v4.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v5.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v5.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,207 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V5_H
+#define SCUMM_SCRIPT_V5_H
+
+#include "scumm/scumm.h"
+
+namespace Scumm {
+
+class ScummEngine_v5 : public ScummEngine {
+protected:
+	typedef void (ScummEngine_v5::*OpcodeProcV5)();
+	struct OpcodeEntryV5 {
+		OpcodeProcV5 proc;
+		const char *desc;
+	};
+
+	const OpcodeEntryV5 *_opcodesV5;
+
+	uint16 _cursorImages[4][17];
+	byte _cursorHotspots[2 * 4];
+
+	struct {
+		int x, y, w, h;
+		byte *buffer;
+		uint16 xStrips, yStrips;
+		bool isDrawn;
+	} _flashlight;
+
+	char _saveLoadVarsFilename[256];
+
+public:
+	ScummEngine_v5(OSystem *syst, const DetectorResult &dr);
+
+	void clearFlashlight();
+
+	virtual void resetCursors();
+
+protected:
+	virtual void setupOpcodes();
+	virtual void executeOpcode(byte i);
+	virtual const char *getOpcodeDesc(byte i);
+
+	virtual void scummLoop_handleActors();
+
+	virtual void setupScummVars();
+	virtual void resetScummVars();
+	virtual void decodeParseString();
+
+	virtual void saveOrLoad(Serializer *s);
+
+	virtual void readMAXS(int blockSize);
+
+	int getWordVararg(int *ptr);
+	void saveVars();
+	void loadVars();
+	void saveIQPoints();
+	void loadIQPoints();
+
+	virtual int getVar();
+	virtual int getVarOrDirectByte(byte mask);
+	virtual int getVarOrDirectWord(byte mask);
+
+	virtual void animateCursor();
+
+	virtual void setBuiltinCursor(int index);
+	void redefineBuiltinCursorFromChar(int index, int chr);
+	void redefineBuiltinCursorHotspot(int index, int x, int y);
+
+	void drawFlashlight();
+
+	/* Version 5 script opcodes */
+	void o5_actorFollowCamera();
+	void o5_actorFromPos();
+	void o5_actorOps();
+	void o5_add();
+	void o5_and();
+	void o5_animateActor();
+	void o5_breakHere();
+	void o5_chainScript();
+	void o5_cursorCommand();
+	void o5_cutscene();
+	void o5_debug();
+	void o5_decrement();
+	void o5_delay();
+	void o5_delayVariable();
+	void o5_divide();
+	void o5_doSentence();
+	void o5_drawBox();
+	void o5_drawObject();
+	void o5_endCutscene();
+	void o5_equalZero();
+	void o5_expression();
+	void o5_faceActor();
+	void o5_findInventory();
+	void o5_findObject();
+	void o5_freezeScripts();
+	void o5_getActorCostume();
+	void o5_getActorElevation();
+	void o5_getActorFacing();
+	void o5_getActorMoving();
+	void o5_getActorRoom();
+	void o5_getActorScale();
+	void o5_getActorWalkBox();
+	void o5_getActorWidth();
+	void o5_getActorX();
+	void o5_getActorY();
+	void o5_getAnimCounter();
+	void o5_getClosestObjActor();
+	void o5_getDist();
+	void o5_getInventoryCount();
+	void o5_getObjectOwner();
+	void o5_getObjectState();
+	void o5_getRandomNr();
+	void o5_getStringWidth();
+	void o5_getVerbEntrypoint();
+	void o5_ifClassOfIs();
+	void o5_ifNotState();
+	void o5_ifState();
+	void o5_increment();
+	void o5_isActorInBox();
+	void o5_isEqual();
+	void o5_isGreater();
+	void o5_isGreaterEqual();
+	void o5_isLess();
+	void o5_isNotEqual();
+	void o5_isScriptRunning();
+	void o5_isSoundRunning();
+	void o5_jumpRelative();
+	void o5_lessOrEqual();
+	void o5_lights();
+	void o5_loadRoom();
+	void o5_loadRoomWithEgo();
+	void o5_matrixOps();
+	void o5_move();
+	void o5_multiply();
+	void o5_notEqualZero();
+	void o5_oldRoomEffect();
+	void o5_or();
+	void o5_beginOverride();
+	void o5_panCameraTo();
+	void o5_pickupObject();
+	void o5_pickupObjectOld();
+	void o5_print();
+	void o5_printEgo();
+	void o5_pseudoRoom();
+	void o5_putActor();
+	void o5_putActorAtObject();
+	void o5_putActorInRoom();
+	void o5_systemOps();
+	void o5_resourceRoutines();
+	void o5_roomOps();
+	void o5_saveLoadGame();
+	void o5_saveLoadVars();
+	void o5_saveRestoreVerbs();
+	void o5_setCameraAt();
+	void o5_setClass();
+	void o5_setObjectName();
+	void o5_setOwnerOf();
+	void o5_setState();
+	void o5_setVarRange();
+	void o5_soundKludge();
+	void o5_startMusic();
+	void o5_startObject();
+	void o5_startScript();
+	void o5_startSound();
+	void o5_stopMusic();
+	void o5_stopObjectCode();
+	void o5_stopObjectScript();
+	void o5_stopScript();
+	void o5_stopSound();
+	void o5_stringOps();
+	void o5_subtract();
+	void o5_verbOps();
+	void o5_wait();
+	void o5_walkActorTo();
+	void o5_walkActorToActor();
+	void o5_walkActorToObject();
+};
+
+
+} // End of namespace Scumm
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v5.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v6.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v6.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v6.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,350 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V6_H
+#define SCUMM_SCRIPT_V6_H
+
+#include "scumm/scumm.h"
+
+namespace Scumm {
+
+class ScummEngine_v6 : public ScummEngine {
+protected:
+	typedef void (ScummEngine_v6::*OpcodeProcV6)();
+	struct OpcodeEntryV6 {
+		OpcodeProcV6 proc;
+		const char *desc;
+	};
+
+	enum ArrayType {
+		kBitArray = 1,
+		kNibbleArray = 2,
+		kByteArray = 3,
+		kStringArray = 4,
+		kIntArray = 5,
+		kDwordArray = 6
+	};
+
+#include "common/pack-start.h"	// START STRUCT PACKING
+
+	struct ArrayHeader {
+		int16 dim1;
+		int16 type;
+		int16 dim2;
+		byte data[1];
+	} PACKED_STRUCT;
+
+#include "common/pack-end.h"	// END STRUCT PACKING
+
+	const OpcodeEntryV6 *_opcodesV6;
+
+	struct TextObject {
+		int16 xpos, ypos;
+		byte color;
+		byte charset;
+		byte text[256];
+	};
+
+	/** BlastObjects to draw */
+	struct BlastObject {
+		uint16 number;
+		Common::Rect rect;
+		uint16 scaleX, scaleY;
+		uint16 image;
+		uint16 mode;
+	};
+
+	int _blastObjectQueuePos;
+	BlastObject _blastObjectQueue[200];
+
+	struct BlastText : TextObject {
+		Common::Rect rect;
+		bool center;
+	};
+
+	int _blastTextQueuePos;
+	BlastText _blastTextQueue[50];
+
+	// Akos Class
+	struct {
+		int16 cmd;
+		int16 actor;
+		int16 param1;
+		int16 param2;
+	} _akosQueue[32];
+	int16 _akosQueuePos;
+
+	byte _curActor;
+	int _curVerb;
+	int _curVerbSlot;
+
+	bool _forcedWaitForMessage;
+
+public:
+	ScummEngine_v6(OSystem *syst, const DetectorResult &dr);
+
+	virtual void resetScumm();
+
+protected:
+	virtual void setupOpcodes();
+	virtual void executeOpcode(byte i);
+	virtual const char *getOpcodeDesc(byte i);
+
+	virtual void scummLoop_handleActors();
+	virtual void processKeyboard(Common::KeyState lastKeyHit);
+
+	virtual void setupScummVars();
+	virtual void decodeParseString(int a, int b);
+	virtual void readArrayFromIndexFile();
+
+	virtual byte *getStringAddress(int i);
+	virtual void readMAXS(int blockSize);
+
+	virtual void palManipulateInit(int resID, int start, int end, int time);
+	virtual void drawDirtyScreenParts();
+
+	int getStackList(int *args, uint maxnum);
+	int popRoomAndObj(int *room);
+
+	ArrayHeader *getArray(int array);
+	byte *defineArray(int array, int type, int dim2, int dim1);
+	int findFreeArrayId();
+	void nukeArray(int array);
+	virtual int readArray(int array, int index, int base);
+	virtual void writeArray(int array, int index, int base, int value);
+	void shuffleArray(int num, int minIdx, int maxIdx);
+
+	virtual void setDefaultCursor();
+	void setCursorTransparency(int a);
+	void setCursorHotspot(int x, int y);
+
+	virtual void setCursorFromImg(uint img, uint room, uint imgindex);
+	void useIm01Cursor(const byte *im, int w, int h);
+	void useBompCursor(const byte *im, int w, int h);
+	void grabCursor(int x, int y, int w, int h);
+
+	void enqueueText(const byte *text, int x, int y, byte color, byte charset, bool center);
+	void drawBlastTexts();
+	void removeBlastTexts();
+
+	void enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth,
+	                   int objectHeight, int scaleX, int scaleY, int image, int mode);
+	void drawBlastObjects();
+	void drawBlastObject(BlastObject *eo);
+	void removeBlastObjects();
+	void removeBlastObject(BlastObject *eo);
+
+	virtual void clearDrawQueues();
+
+public:
+	bool akos_increaseAnims(const byte *akos, Actor *a);
+	bool akos_increaseAnim(Actor *a, int i, const byte *aksq, const uint16 *akfo, int numakfo);
+protected:
+	void akos_queCommand(byte cmd, Actor *a, int param_1, int param_2);
+	virtual void akos_processQueue();
+
+	virtual void processActors();
+
+	int getSpecialBox(int x, int y);
+
+	int getDistanceBetween(bool is_obj_1, int b, int c, bool is_obj_2, int e, int f);
+
+	/* Version 6 script opcodes */
+	void o6_setBlastObjectWindow();
+	void o6_pushByte();
+	void o6_pushWord();
+	void o6_pushByteVar();
+	void o6_pushWordVar();
+	void o6_invalid();
+	void o6_byteArrayRead();
+	void o6_wordArrayRead();
+	void o6_byteArrayIndexedRead();
+	void o6_wordArrayIndexedRead();
+	void o6_dup();
+	void o6_pop();
+	void o6_not();
+	void o6_eq();
+	void o6_neq();
+	void o6_gt();
+	void o6_lt();
+	void o6_le();
+	void o6_ge();
+	void o6_add();
+	void o6_sub();
+	void o6_mul();
+	void o6_div();
+	void o6_land();
+	void o6_lor();
+	void o6_writeByteVar();
+	void o6_writeWordVar();
+	void o6_byteArrayWrite();
+	void o6_wordArrayWrite();
+	void o6_byteArrayIndexedWrite();
+	void o6_wordArrayIndexedWrite();
+	void o6_byteVarInc();
+	void o6_wordVarInc();
+	void o6_byteArrayInc();
+	void o6_wordArrayInc();
+	void o6_byteVarDec();
+	void o6_wordVarDec();
+	void o6_byteArrayDec();
+	void o6_wordArrayDec();
+	void o6_if();
+	void o6_ifNot();
+	void o6_jump();
+	void o6_startScript();
+	void o6_startScriptQuick();
+	void o6_startObject();
+	void o6_drawObject();
+	void o6_drawObjectAt();
+	void o6_stopObjectCode();
+	void o6_endCutscene();
+	void o6_cutscene();
+	void o6_stopMusic();
+	void o6_freezeUnfreeze();
+	void o6_cursorCommand();
+	void o6_breakHere();
+	void o6_ifClassOfIs();
+	void o6_setClass();
+	void o6_getState();
+	void o6_setState();
+	void o6_setOwner();
+	void o6_getOwner();
+	void o6_startSound();
+	void o6_stopSound();
+	void o6_startMusic();
+	void o6_stopObjectScript();
+	void o6_panCameraTo();
+	void o6_actorFollowCamera();
+	void o6_setCameraAt();
+	void o6_loadRoom();
+	void o6_stopScript();
+	void o6_walkActorToObj();
+	void o6_walkActorTo();
+	void o6_putActorAtXY();
+	void o6_putActorAtObject();
+	void o6_faceActor();
+	void o6_animateActor();
+	void o6_doSentence();
+	void o6_pickupObject();
+	void o6_loadRoomWithEgo();
+	void o6_getRandomNumber();
+	void o6_getRandomNumberRange();
+	void o6_getActorMoving();
+	void o6_isScriptRunning();
+	void o6_getActorRoom();
+	void o6_getObjectX();
+	void o6_getObjectY();
+	void o6_getObjectOldDir();
+	void o6_getObjectNewDir();
+	void o6_getActorWalkBox();
+	void o6_getActorCostume();
+	void o6_findInventory();
+	void o6_getInventoryCount();
+	void o6_getVerbFromXY();
+	void o6_beginOverride();
+	void o6_endOverride();
+	void o6_setObjectName();
+	void o6_isSoundRunning();
+	void o6_setBoxFlags();
+	void o6_createBoxMatrix();
+	void o6_resourceRoutines();
+	void o6_roomOps();
+	void o6_actorOps();
+	void o6_verbOps();
+	void o6_getActorFromXY();
+	void o6_findObject();
+	void o6_pseudoRoom();
+	void o6_getActorElevation();
+	void o6_getVerbEntrypoint();
+	void o6_arrayOps();
+	void o6_saveRestoreVerbs();
+	void o6_drawBox();
+	void o6_getActorWidth();
+	void o6_wait();
+	void o6_getActorScaleX();
+	void o6_getActorAnimCounter();
+	void o6_soundKludge();
+	void o6_isAnyOf();
+	void o6_systemOps();
+	void o6_isActorInBox();
+	void o6_delay();
+	void o6_delaySeconds();
+	void o6_delayMinutes();
+	void o6_stopSentence();
+	void o6_printLine();
+	void o6_printText();
+	void o6_printDebug();
+	void o6_printSystem();
+	void o6_printActor();
+	void o6_printEgo();
+	void o6_talkActor();
+	void o6_talkEgo();
+	void o6_dimArray();
+	void o6_dummy();
+	void o6_startObjectQuick();
+	void o6_startScriptQuick2();
+	void o6_dim2dimArray();
+	void o6_abs();
+	void o6_distObjectObject();
+	void o6_distObjectPt();
+	void o6_distPtPt();
+	virtual void o6_kernelSetFunctions();
+	void o6_delayFrames();
+	void o6_pickOneOf();
+	void o6_pickOneOfDefault();
+	void o6_jumpToScript();
+	void o6_isRoomScriptRunning();
+	void o6_kernelGetFunctions();
+	void o6_getAnimateVariable();
+	void o6_drawBlastObject();
+	void o6_getActorLayer();
+	void o6_stampObject();
+	void o6_bor();
+	void o6_band();
+	void o6_stopTalking();
+	void o6_findAllObjects();
+	void o6_pickVarRandom();
+	void o6_getDateTime();
+	void o6_getPixel();
+	void o6_setBoxSet();
+	void o6_shuffle();
+
+	byte VAR_VIDEONAME;
+	byte VAR_RANDOM_NR;
+	byte VAR_STRING2DRAW;
+
+	byte VAR_TIMEDATE_YEAR;
+	byte VAR_TIMEDATE_MONTH;
+	byte VAR_TIMEDATE_DAY;
+	byte VAR_TIMEDATE_HOUR;
+	byte VAR_TIMEDATE_MINUTE;
+	byte VAR_TIMEDATE_SECOND;
+};
+
+
+} // End of namespace Scumm
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v6.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v7.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v7.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v7.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,144 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V7_H
+#define SCUMM_SCRIPT_V7_H
+
+#ifdef ENABLE_SCUMM_7_8
+
+#include "scumm/scumm_v6.h"
+
+namespace Scumm {
+
+class Insane;
+class SmushMixer;
+class SmushPlayer;
+
+class ScummEngine_v7 : public ScummEngine_v6 {
+	friend class SmushPlayer;
+	friend class Insane;
+public:
+	ScummEngine_v7(OSystem *syst, const DetectorResult &dr);
+	~ScummEngine_v7();
+
+
+protected:
+	int _smushFrameRate;
+
+	/**
+	 * Flag which signals that the SMUSH video playback should end now
+	 * (e.g. because it was aborted by the user or it's simply finished).
+	 */
+	bool _smushVideoShouldFinish;
+
+	bool _smushActive;
+
+	Insane *_insane;
+
+public:
+	SmushMixer *_smixer;
+	SmushPlayer *_splayer;
+
+
+	struct LangIndexNode {
+		char tag[12+1];
+		int32 offset;
+	};
+
+protected:
+	int _verbLineSpacing;
+	bool _existLanguageFile;
+	char *_languageBuffer;
+	LangIndexNode *_languageIndex;
+	int _languageIndexSize;
+	char _lastStringTag[12+1];
+
+#if defined(__SYMBIAN32__) || defined (_WIN32_WCE) // for some reason VC6 cannot find the base class TextObject
+	struct SubtitleText {
+		int16 xpos, ypos;
+		byte color;
+		byte charset;
+		byte text[256];
+		bool actorSpeechMsg;
+	};
+#else
+	struct SubtitleText : TextObject {
+		bool actorSpeechMsg;
+	};
+#endif
+
+	int _subtitleQueuePos;
+	SubtitleText _subtitleQueue[20];
+
+public:
+	void processSubtitleQueue();
+	void addSubtitleToQueue(const byte *text, const Common::Point &pos, byte color, byte charset);
+	void clearSubtitleQueue();
+	virtual void CHARSET_1();
+
+protected:
+	virtual int runDialog(Dialog &dialog);
+
+	virtual void scummLoop_handleSound();
+	virtual void scummLoop_handleDrawing();
+	virtual void processKeyboard(Common::KeyState lastKeyHit);
+
+	virtual void setupScumm();
+
+	virtual void setupScummVars();
+	virtual void resetScummVars();
+
+	virtual void akos_processQueue();
+
+	virtual void saveOrLoad(Serializer *s);
+
+	virtual void readMAXS(int blockSize);
+	virtual void readGlobalObjects();
+	virtual void readIndexBlock(uint32 blocktype, uint32 itemsize);
+
+	virtual void setCameraAt(int pos_x, int pos_y);
+	virtual void setCameraFollows(Actor *a, bool setCamera = false);
+	virtual void moveCamera();
+	virtual void panCameraTo(int x, int y);
+
+	virtual int getObjectIdFromOBIM(const byte *obim);
+
+	virtual void actorTalk(const byte *msg);
+	virtual void translateText(const byte *text, byte *trans_buff);
+	virtual void loadLanguageBundle();
+	void playSpeech(const byte *ptr);
+
+	virtual void drawVerb(int verb, int mode);
+
+
+	virtual void o6_kernelSetFunctions();
+};
+
+
+} // End of namespace Scumm
+
+#endif // ENABLE_SCUMM_7_8
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v7.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/scumm/scumm_v8.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v8.h	                        (rev 0)
+++ scummvm/trunk/engines/scumm/scumm_v8.h	2009-03-20 16:33:58 UTC (rev 39567)
@@ -0,0 +1,127 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef SCUMM_SCRIPT_V8_H
+#define SCUMM_SCRIPT_V8_H
+
+#ifdef ENABLE_SCUMM_7_8
+
+#include "scumm/scumm_v7.h"
+
+namespace Scumm {
+
+class ScummEngine_v8 : public ScummEngine_v7 {
+protected:
+	typedef void (ScummEngine_v8::*OpcodeProcV8)();
+	struct OpcodeEntryV8 {
+		OpcodeProcV8 proc;
+		const char *desc;
+	};
+
+	const OpcodeEntryV8 *_opcodesV8;
+
+	struct ObjectNameId {
+		char name[40];
+		int id;
+	};
+	int _objectIDMapSize;
+	ObjectNameId *_objectIDMap;
+
+	int _keyScriptKey, _keyScriptNo;
+
+public:
+	ScummEngine_v8(OSystem *syst, const DetectorResult &dr);
+	~ScummEngine_v8();
+
+protected:
+	virtual void setupOpcodes();
+	virtual void executeOpcode(byte i);
+	virtual const char *getOpcodeDesc(byte i);
+
+	virtual void printString(int m, const byte *msg);
+
+	virtual void scummLoop_handleSaveLoad();
+
+	virtual void setupScummVars();
+	virtual void resetScummVars();
+	virtual void decodeParseString(int m, int n);
+	virtual void readArrayFromIndexFile();
+
+	virtual void readMAXS(int blockSize);
+	virtual void readGlobalObjects();
+
+	virtual uint fetchScriptWord();
+	virtual int fetchScriptWordSigned();
+
+	virtual int readVar(uint var);
+	virtual void writeVar(uint var, int value);
+
+	virtual int getObjectIdFromOBIM(const byte *obim);
+
+	virtual void processKeyboard(Common::KeyState lastKeyHit);
+
+	void desaturatePalette(int hueScale, int satScale, int lightScale, int startColor, int endColor);
+
+
+	/* Version 8 script opcodes */
+	void o8_mod();
+	void o8_wait();
+
+	void o8_dimArray();
+	void o8_dim2dimArray();
+	void o8_arrayOps();
+	void o8_blastText();
+
+	void o8_cursorCommand();
+	void o8_resourceRoutines();
+	void o8_roomOps();
+	void o8_actorOps();
+	void o8_cameraOps();
+	void o8_verbOps();
+
+	void o8_systemOps();
+	void o8_startVideo();
+	void o8_kernelSetFunctions();
+	void o8_kernelGetFunctions();
+
+	void o8_getActorChore();
+	void o8_getActorZPlane();
+
+	void o8_drawObject();
+	void o8_getObjectImageX();
+	void o8_getObjectImageY();
+	void o8_getObjectImageWidth();
+	void o8_getObjectImageHeight();
+
+	void o8_getStringWidth();
+
+	byte VAR_LANGUAGE;
+};
+
+} // End of namespace Scumm
+
+#endif // ENABLE_SCUMM_7_8
+
+#endif


Property changes on: scummvm/trunk/engines/scumm/scumm_v8.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/trunk/engines/scumm/smush/smush_player.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_player.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/smush/smush_player.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -37,6 +37,7 @@
 #include "scumm/imuse_digi/dimuse.h"
 #include "scumm/imuse/imuse.h"
 #include "scumm/scumm.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/sound.h"
 #include "scumm/util.h"
 #include "scumm/smush/channel.h"

Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/string.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -27,16 +27,16 @@
 
 #include "common/config-manager.h"
 
-#include "scumm/scumm.h"
 #include "scumm/actor.h"
 #include "scumm/charset.h"
 #include "scumm/dialogs.h"
 #include "scumm/file.h"
 #include "scumm/imuse_digi/dimuse.h"
-#include "scumm/intern.h"
 #ifdef ENABLE_HE
 #include "scumm/he/intern_he.h"
 #endif
+#include "scumm/scumm.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/verbs.h"
 #include "scumm/he/sound_he.h"
 

Modified: scummvm/trunk/engines/scumm/vars.cpp
===================================================================
--- scummvm/trunk/engines/scumm/vars.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/vars.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -26,7 +26,8 @@
 
 #include "common/config-manager.h"
 #include "scumm/scumm.h"
-#include "scumm/intern.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v8.h"
 #include "scumm/he/intern_he.h"
 #include "scumm/he/logic_he.h"
 #include "sound/mididrv.h"

Modified: scummvm/trunk/engines/scumm/verbs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/verbs.cpp	2009-03-20 13:30:10 UTC (rev 39566)
+++ scummvm/trunk/engines/scumm/verbs.cpp	2009-03-20 16:33:58 UTC (rev 39567)
@@ -23,14 +23,13 @@
  *
  */
 
-
 #include "scumm/actor.h"
 #include "scumm/charset.h"
 #include "scumm/he/intern_he.h"
-#include "scumm/intern.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
-#include "scumm/scumm.h"
+#include "scumm/scumm_v0.h"
+#include "scumm/scumm_v7.h"
 #include "scumm/verbs.h"
 
 namespace Scumm {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list