diff options
author | Max Horn | 2006-02-04 12:11:10 +0000 |
---|---|---|
committer | Max Horn | 2006-02-04 12:11:10 +0000 |
commit | 26349e6f65fc629db3334c80f230c976fae4ef55 (patch) | |
tree | bbc05e419fa30e3b103e4652673bfec63777f02a /scumm | |
parent | 4e83bd307ad616e4b65d62db2995406941368a18 (diff) | |
download | scummvm-rg350-26349e6f65fc629db3334c80f230c976fae4ef55.tar.gz scummvm-rg350-26349e6f65fc629db3334c80f230c976fae4ef55.tar.bz2 scummvm-rg350-26349e6f65fc629db3334c80f230c976fae4ef55.zip |
Split intern.h and moved HE stuff into the new file intern_he.h
svn-id: r20372
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 1 | ||||
-rw-r--r-- | scumm/akos.cpp | 1 | ||||
-rw-r--r-- | scumm/cursor.cpp | 1 | ||||
-rw-r--r-- | scumm/floodfill_he.cpp | 2 | ||||
-rw-r--r-- | scumm/gfx.cpp | 3 | ||||
-rw-r--r-- | scumm/input.cpp | 3 | ||||
-rw-r--r-- | scumm/intern.h | 573 | ||||
-rw-r--r-- | scumm/intern_he.h | 604 | ||||
-rw-r--r-- | scumm/logic_he.cpp | 6 | ||||
-rw-r--r-- | scumm/logic_he.h | 6 | ||||
-rw-r--r-- | scumm/object.cpp | 3 | ||||
-rw-r--r-- | scumm/palette_he.cpp | 2 | ||||
-rw-r--r-- | scumm/resource.cpp | 5 | ||||
-rw-r--r-- | scumm/resource_v7he.cpp | 2 | ||||
-rw-r--r-- | scumm/resource_v7he.h | 2 | ||||
-rw-r--r-- | scumm/room.cpp | 3 | ||||
-rw-r--r-- | scumm/saveload.cpp | 1 | ||||
-rw-r--r-- | scumm/script_v100he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v6he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v80he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 1 | ||||
-rw-r--r-- | scumm/sprite_he.cpp | 2 | ||||
-rw-r--r-- | scumm/string.cpp | 3 | ||||
-rw-r--r-- | scumm/vars.cpp | 3 | ||||
-rw-r--r-- | scumm/wiz_he.cpp | 2 |
28 files changed, 655 insertions, 586 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 5646087e2c..fc8f07037b 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -28,6 +28,7 @@ #include "scumm/charset.h" #include "scumm/costume.h" #include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/saveload.h" diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 626177112b..65402901e5 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -28,6 +28,7 @@ #include "scumm/imuse.h" #include "scumm/imuse_digi/dimuse.h" #include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/sound.h" #include "scumm/util.h" #include "scumm/wiz_he.h" diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp index 51b14e0f90..f663cfb092 100644 --- a/scumm/cursor.cpp +++ b/scumm/cursor.cpp @@ -25,6 +25,7 @@ #include "scumm/bomp.h" #include "scumm/charset.h" #include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource_v7he.h" #include "scumm/saveload.h" diff --git a/scumm/floodfill_he.cpp b/scumm/floodfill_he.cpp index 54ad927cdd..930cca21ce 100644 --- a/scumm/floodfill_he.cpp +++ b/scumm/floodfill_he.cpp @@ -23,7 +23,7 @@ #include "common/stdafx.h" #include "scumm/floodfill_he.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/resource.h" #include "scumm/scumm.h" diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 6877e47cf6..ae6d6fdda8 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -25,6 +25,9 @@ #include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/resource.h" #include "scumm/usage_bits.h" #include "scumm/wiz_he.h" diff --git a/scumm/input.cpp b/scumm/input.cpp index 3ad1fe4e8b..5d6fcb47e6 100644 --- a/scumm/input.cpp +++ b/scumm/input.cpp @@ -32,6 +32,9 @@ #include "scumm/dialogs.h" #include "scumm/insane/insane.h" #include "scumm/imuse.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/logic_he.h" #include "scumm/scumm.h" #include "scumm/sound.h" diff --git a/scumm/intern.h b/scumm/intern.h index 4f7d4c4872..f3ab8a12a3 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -20,21 +20,13 @@ * */ -#ifndef INTERN_H -#define INTERN_H +#ifndef SCUMM_INTERN_H +#define SCUMM_INTERN_H #include "scumm/scumm.h" -#include "scumm/floodfill_he.h" -#include "scumm/wiz_he.h" namespace Scumm { -#ifndef DISABLE_HE -class ResExtractor; -class LogicHE; -class Sprite; -#endif - // 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 @@ -768,567 +760,6 @@ protected: byte VAR_TIMEDATE_SECOND; }; -class ScummEngine_v60he : public ScummEngine_v6 { -protected: - typedef void (ScummEngine_v60he::*OpcodeProcv60he)(); - struct OpcodeEntryv60he { - OpcodeProcv60he proc; - const char *desc; - }; - - const OpcodeEntryv60he *_opcodesv60he; - - Common::File _hFileTable[17]; - -public: - ScummEngine_v60he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex) : ScummEngine_v6(detector, syst, gs, md5sum, substResFileNameIndex) {} - - virtual void scummInit(); - -protected: - virtual void setupOpcodes(); - virtual void executeOpcode(byte i); - virtual const char *getOpcodeDesc(byte i); - - virtual void saveOrLoad(Serializer *s); - - void localizeArray(int slot, byte scriptSlot); - void redimArray(int arrayId, int newX, int newY, int d); - int readFileToArray(int slot, int32 size); - void writeFileFromArray(int slot, int resID); - int virtScreenSave(byte *dst, int x1, int y1, int x2, int y2); - void virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2); - virtual void decodeParseString(int a, int b); - void swapObjects(int object1, int object2); - - /* HE version 60 script opcodes */ - void o60_setState(); - void o60_roomOps(); - void o60_actorOps(); - void o60_wait(); - void o60_kernelSetFunctions(); - void o60_kernelGetFunctions(); - void o60_openFile(); - void o60_closeFile(); - void o60_deleteFile(); - void o60_readFile(); - void o60_rename(); - void o60_writeFile(); - void o60_soundOps(); - void o60_seekFilePos(); - void o60_localizeArrayToScript(); - void o60_redimArray(); - void o60_readFilePos(); -}; - -#ifndef DISABLE_HE -class ScummEngine_v70he : public ScummEngine_v60he { - friend class ResExtractor; - friend class Wiz; - -protected: - typedef void (ScummEngine_v70he::*OpcodeProcv70he)(); - struct OpcodeEntryv70he { - OpcodeProcv70he proc; - const char *desc; - }; - - const OpcodeEntryv70he *_opcodesv70he; - - ResExtractor *_resExtractor; - - byte *_heV7RoomOffsets; - - int32 _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags, _heSndSoundFreq; - - bool _skipProcessActors; - -public: - ScummEngine_v70he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); - ~ScummEngine_v70he(); - - Wiz *_wiz; - - byte *heFindResourceData(uint32 tag, byte *ptr); - byte *heFindResource(uint32 tag, byte *ptr); - byte *findWrappedBlock(uint32 tag, byte *ptr, int state, bool flagError); - -protected: - virtual void setupOpcodes(); - virtual void executeOpcode(byte i); - virtual const char *getOpcodeDesc(byte i); - - virtual void setupScummVars(); - virtual void initScummVars(); - - virtual void saveOrLoad(Serializer *s); - - virtual void readRoomsOffsets(); - virtual void readGlobalObjects(); - virtual void readIndexBlock(uint32 blocktype, uint32 itemsize); - - virtual int getActorFromPos(int x, int y); - - int getStringCharWidth(byte chr); - virtual int setupStringArray(int size); - void appendSubstring(int dst, int src, int len2, int len); - - virtual void setCursorFromImg(uint img, uint room, uint imgindex); - - virtual void clearDrawQueues(); - - void remapHEPalette(const uint8 *src, uint8 *dst); - - /* HE version 70 script opcodes */ - void o70_startSound(); - void o70_pickupObject(); - void o70_getActorRoom(); - void o70_resourceRoutines(); - void o70_systemOps(); - void o70_kernelSetFunctions(); - void o70_seekFilePos(); - void o70_copyString(); - void o70_getStringWidth(); - void o70_getStringLen(); - void o70_appendString(); - void o70_concatString(); - void o70_compareString(); - void o70_isResourceLoaded(); - void o70_readINI(); - void o70_writeINI(); - void o70_getStringLenForWidth(); - void o70_getCharIndexInString(); - void o70_setFilePath(); - void o70_setWindowCaption(); - void o70_polygonOps(); - void o70_polygonHit(); - - byte VAR_NUM_SOUND_CHANNELS; - byte VAR_WIZ_TCOLOR; -}; - -class ScummEngine_v71he : public ScummEngine_v70he { -public: - ScummEngine_v71he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); - -protected: - virtual void saveOrLoad(Serializer *s); - - virtual void redrawBGAreas(); - - virtual void processActors(); - void preProcessAuxQueue(); - void postProcessAuxQueue(); - -public: - /* Actor AuxQueue stuff (HE) */ - AuxBlock _auxBlocks[16]; - uint16 _auxBlocksNum; - AuxEntry _auxEntries[16]; - uint16 _auxEntriesNum; - - void queueAuxBlock(Actor *a); - void queueAuxEntry(int actorNum, int subIndex); -}; - -class ScummEngine_v72he : public ScummEngine_v71he { -protected: - typedef void (ScummEngine_v72he::*OpcodeProcV72he)(); - struct OpcodeEntryV72he { - OpcodeProcV72he proc; - const char *desc; - }; - -#if !defined(__GNUC__) - #pragma START_PACK_STRUCTS -#endif - - struct ArrayHeader { - int32 type; //0 - int32 dim1start; //4 - int32 dim1end; //8 - int32 dim2start; //0C - int32 dim2end; //10 - byte data[1]; //14 - } GCC_PACK; - -#if !defined(__GNUC__) - #pragma END_PACK_STRUCTS -#endif - - const OpcodeEntryV72he *_opcodesV72he; - - int _stringLength; - byte _stringBuffer[4096]; - - WizParameters _wizParams; - -public: - ScummEngine_v72he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); - - virtual void scummInit(); - -protected: - virtual void setupOpcodes(); - virtual void executeOpcode(byte i); - virtual const char *getOpcodeDesc(byte i); - - virtual void setupScummVars(); - virtual void initScummVars(); - virtual void readArrayFromIndexFile(); - - virtual byte *getStringAddress(int i); - virtual void readMAXS(int blockSize); - - virtual void redrawBGAreas(); - - ArrayHeader *defineArray(int array, int type, int dim2start, int dim2end, int dim1start, int dim1end); - virtual int readArray(int array, int idx2, int idx1); - virtual void writeArray(int array, int idx2, int idx1, int value); - void redimArray(int arrayId, int newDim2start, int newDim2end, - int newDim1start, int newDim1end, int type); - void checkArrayLimits(int array, int dim2start, int dim2end, int dim1start, int dim1end); - void copyArray(int array1, int a1_dim2start, int a1_dim2end, int a1_dim1start, int a1_dim1end, - int array2, int a2_dim2start, int a2_dim2end, int a2_dim1start, int a2_dim1end); - void copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int len1, byte **data, int *size, int *num); - virtual int setupStringArray(int size); - int readFileToArray(int slot, int32 size); - void writeFileFromArray(int slot, int resID); - - virtual void decodeParseString(int a, int b); - void decodeScriptString(byte *dst, bool scriptString = false); - void copyScriptString(byte *dst, int dstSize); - int convertFilePath(byte *dst, bool setFilePath = false); - - int findObject(int x, int y, int num, int *args); - int getSoundResourceSize(int id); - - virtual bool handleNextCharsetCode(Actor *a, int *c); - - /* HE version 72 script opcodes */ - void o72_pushDWord(); - void o72_getScriptString(); - void o72_isAnyOf(); - void o72_resetCutscene(); - void o72_findObjectWithClassOf(); - void o72_getObjectImageX(); - void o72_getObjectImageY(); - void o72_captureWizImage(); - void o72_getTimer(); - void o72_setTimer(); - void o72_getSoundPosition(); - void o72_startScript(); - void o72_startObject(); - void o72_drawObject(); - void o72_printWizImage(); - void o72_getArrayDimSize(); - void o72_getNumFreeArrays(); - void o72_roomOps(); - void o72_actorOps(); - void o72_verbOps(); - void o72_findObject(); - void o72_arrayOps(); - void o72_systemOps(); - void o72_talkActor(); - void o72_talkEgo(); - void o72_dimArray(); - void o72_dim2dimArray(); - void o72_traceStatus(); - void o72_debugInput(); - void o72_drawWizImage(); - void o72_kernelGetFunctions(); - void o72_jumpToScript(); - void o72_openFile(); - void o72_readFile(); - void o72_writeFile(); - void o72_findAllObjects(); - void o72_deleteFile(); - void o72_rename(); - void o72_getPixel(); - void o72_pickVarRandom(); - void o72_redimArray(); - void o72_readINI(); - void o72_writeINI(); - void o72_getResourceSize(); - void o72_setFilePath(); - void o72_setWindowCaption(); - - byte VAR_NUM_ROOMS; - byte VAR_NUM_SCRIPTS; - byte VAR_NUM_SOUNDS; - byte VAR_NUM_COSTUMES; - byte VAR_NUM_IMAGES; - byte VAR_NUM_CHARSETS; - - byte VAR_POLYGONS_ONLY; -}; - -class ScummEngine_v80he : public ScummEngine_v72he { -protected: - typedef void (ScummEngine_v80he::*OpcodeProcV80he)(); - struct OpcodeEntryV80he { - OpcodeProcV80he proc; - const char *desc; - }; - - const OpcodeEntryV80he *_opcodesV80he; - - int32 _heSndResId, _curSndId, _sndPtrOffs, _sndTmrOffs; - -public: - ScummEngine_v80he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); - -protected: - virtual void setupOpcodes(); - virtual void executeOpcode(byte i); - virtual const char *getOpcodeDesc(byte i); - - virtual void setupScummVars(); - virtual void initScummVars(); - - virtual void initCharset(int charset); - - virtual void clearDrawQueues(); - - void createSound(int snd1id, int snd2id); - - void drawLine(int x1, int y1, int x, int unk1, int unk2, int type, int id); - void drawPixel(int x, int y, int flags); - - /* HE version 80 script opcodes */ - void o80_createSound(); - void o80_getFileSize(); - void o80_stringToInt(); - void o80_getSoundVar(); - void o80_localizeArrayToRoom(); - void o80_readConfigFile(); - void o80_writeConfigFile(); - void o80_cursorCommand(); - void o80_setState(); - void o80_drawWizPolygon(); - void o80_drawLine(); - void o80_pickVarRandom(); - - byte VAR_PLATFORM; - byte VAR_WINDOWS_VERSION; - byte VAR_CURRENT_CHARSET; - byte VAR_COLOR_DEPTH; -}; - -class ScummEngine_v90he : public ScummEngine_v80he { - friend class LogicHE; - friend class Sprite; - -protected: - typedef void (ScummEngine_v90he::*OpcodeProcV90he)(); - struct OpcodeEntryV90he { - OpcodeProcV90he proc; - const char *desc; - }; - - const OpcodeEntryV90he *_opcodesV90he; - - FloodFillParameters _floodFillParams; - - struct VideoParameters { - byte filename[260]; - int32 status; - int32 flags; - int32 unk2; - int32 wizResNum; - }; - - VideoParameters _videoParams; - - int32 _heObject, _heObjectNum; - int32 _hePaletteNum; - - int32 _curMaxSpriteId; - int32 _curSpriteId; - int32 _curSpriteGroupId; - -public: - ScummEngine_v90he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); - ~ScummEngine_v90he(); - - virtual void scummInit(); - - LogicHE *_logicHE; - Sprite *_sprite; - -protected: - virtual void allocateArrays(); - virtual void setupOpcodes(); - virtual void executeOpcode(byte i); - virtual const char *getOpcodeDesc(byte i); - - virtual void setupScummVars(); - virtual void initScummVars(); - - virtual void saveOrLoad(Serializer *s); - - virtual void readMAXS(int blockSize); - - virtual void processActors(); - - int computeWizHistogram(int resnum, int state, int x, int y, int w, int h); - void getArrayDim(int array, int *dim2start, int *dim2end, int *dim1start, int *dim1end); - void sortArray(int array, int dim2start, int dim2end, int dim1start, int dim1end, int sortOrder); - -public: - int getGroupSpriteArray(int spriteGroupId); - -protected: - uint8 *getHEPaletteIndex(int palSlot); - int getHEPaletteColor(int palSlot, int color); - int getHEPaletteSimilarColor(int palSlot, int red, int green, int start, int end); - int getHEPaletteColorComponent(int palSlot, int color, int component); - void setHEPaletteColor(int palSlot, uint8 color, uint8 r, uint8 g, uint8 b); - void setHEPaletteFromPtr(int palSlot, const uint8 *palData); - void setHEPaletteFromCostume(int palSlot, int resId); - void setHEPaletteFromImage(int palSlot, int resId, int state); - void setHEPaletteFromRoom(int palSlot, int resId, int state); - void restoreHEPalette(int palSlot); - void copyHEPalette(int dstPalSlot, int srcPalSlot); - void copyHEPaletteColor(int palSlot, uint8 dstColor, uint8 srcColor); - - - void setDefaultCursor(); - -protected: - /* HE version 90 script opcodes */ - void o90_dup_n(); - void o90_min(); - void o90_max(); - void o90_sin(); - void o90_cos(); - void o90_sqrt(); - void o90_atan2(); - void o90_getSegmentAngle(); - void o90_getActorData(); - void o90_startScriptUnk(); - void o90_jumpToScriptUnk(); - void o90_videoOps(); - void o90_getVideoData(); - void o90_wizImageOps(); - void o90_getDistanceBetweenPoints(); - void o90_getSpriteInfo(); - void o90_setSpriteInfo(); - void o90_getSpriteGroupInfo(); - void o90_setSpriteGroupInfo(); - void o90_getWizData(); - void o90_floodFill(); - void o90_mod(); - void o90_shl(); - void o90_shr(); - void o90_xor(); - void o90_findAllObjectsWithClassOf(); - void o90_getPolygonOverlap(); - void o90_cond(); - void o90_dim2dim2Array(); - void o90_redim2dimArray(); - void o90_getLinesIntersectionPoint(); - void o90_sortArray(); - void o90_getObjectData(); - void o90_getPaletteData(); - void o90_paletteOps(); - void o90_fontUnk(); - void o90_getActorAnimProgress(); - void o90_kernelGetFunctions(); - void o90_kernelSetFunctions(); - - byte VAR_NUM_SPRITE_GROUPS; - byte VAR_NUM_SPRITES; - byte VAR_NUM_PALETTES; - byte VAR_NUM_UNK; - - byte VAR_U32_VERSION; - byte VAR_U32_ARRAY_UNK; -}; - -class ScummEngine_v99he : public ScummEngine_v90he { -public: - ScummEngine_v99he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex) : ScummEngine_v90he(detector, syst, gs, md5sum, substResFileNameIndex) {} - - virtual void scummInit(); - -protected: - virtual void initScummVars(); - - virtual void readMAXS(int blockSize); - - virtual void saveOrLoad(Serializer *s); - - virtual void copyPalColor(int dst, int src); - virtual void darkenPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor); - virtual void setPaletteFromPtr(const byte *ptr, int numcolor = -1); - virtual void setPalColor(int index, int r, int g, int b); - virtual void updatePalette(); -}; - -class ScummEngine_v100he : public ScummEngine_v99he { -protected: - typedef void (ScummEngine_v100he::*OpcodeProcV100he)(); - struct OpcodeEntryV100he { - OpcodeProcV100he proc; - const char *desc; - }; - - int32 _heResId, _heResType; - - const OpcodeEntryV100he *_opcodesV100he; - -public: - ScummEngine_v100he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex) : ScummEngine_v99he(detector, syst, gs, md5sum, substResFileNameIndex) {} - -protected: - virtual void setupOpcodes(); - virtual void executeOpcode(byte i); - virtual const char *getOpcodeDesc(byte i); - - virtual void saveOrLoad(Serializer *s); - - virtual void decodeParseString(int a, int b); - - /* HE version 100 script opcodes */ - void o100_actorOps(); - void o100_arrayOps(); - void o100_dim2dimArray(); - void o100_redim2dimArray(); - void o100_dimArray(); - void o100_drawLine(); - void o100_drawObject(); - void o100_floodFill(); - void o100_setSpriteGroupInfo(); - void o100_resourceRoutines(); - void o100_wizImageOps(); - void o100_jumpToScript(); - void o100_createSound(); - void o100_dim2dim2Array(); - void o100_paletteOps(); - void o100_jumpToScriptUnk(); - void o100_startScriptUnk(); - void o100_redimArray(); - void o100_roomOps(); - void o100_startSound(); - void o100_setSpriteInfo(); - void o100_startScript(); - void o100_systemOps(); - void o100_cursorCommand(); - void o100_videoOps(); - void o100_wait(); - void o100_writeFile(); - void o100_isResourceLoaded(); - void o100_getResourceSize(); - void o100_getSpriteGroupInfo(); - void o100_getPaletteData(); - void o100_readFile(); - void o100_getSpriteInfo(); - void o100_getWizData(); - void o100_getVideoData(); -}; -#endif - #ifndef DISABLE_SCUMM_7_8 class ScummEngine_v7 : public ScummEngine_v6 { public: diff --git a/scumm/intern_he.h b/scumm/intern_he.h new file mode 100644 index 0000000000..043c336746 --- /dev/null +++ b/scumm/intern_he.h @@ -0,0 +1,604 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2001 Ludvig Strigeus + * Copyright (C) 2001-2006 The ScummVM project + * + * 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. + * + * $Header$ + * + */ + +#ifndef SCUMM_INTERN_HE_H +#define SCUMM_INTERN_HE_H + +#include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/floodfill_he.h" +#include "scumm/wiz_he.h" +#endif + +namespace Scumm { + +#ifndef DISABLE_HE +class ResExtractor; +class LogicHE; +class Sprite; +#endif + +class ScummEngine_v60he : public ScummEngine_v6 { +protected: + typedef void (ScummEngine_v60he::*OpcodeProcv60he)(); + struct OpcodeEntryv60he { + OpcodeProcv60he proc; + const char *desc; + }; + + const OpcodeEntryv60he *_opcodesv60he; + + Common::File _hFileTable[17]; + +public: + ScummEngine_v60he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex) : ScummEngine_v6(detector, syst, gs, md5sum, substResFileNameIndex) {} + + virtual void scummInit(); + +protected: + virtual void setupOpcodes(); + virtual void executeOpcode(byte i); + virtual const char *getOpcodeDesc(byte i); + + virtual void saveOrLoad(Serializer *s); + + void localizeArray(int slot, byte scriptSlot); + void redimArray(int arrayId, int newX, int newY, int d); + int readFileToArray(int slot, int32 size); + void writeFileFromArray(int slot, int resID); + int virtScreenSave(byte *dst, int x1, int y1, int x2, int y2); + void virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2); + virtual void decodeParseString(int a, int b); + void swapObjects(int object1, int object2); + + /* HE version 60 script opcodes */ + void o60_setState(); + void o60_roomOps(); + void o60_actorOps(); + void o60_wait(); + void o60_kernelSetFunctions(); + void o60_kernelGetFunctions(); + void o60_openFile(); + void o60_closeFile(); + void o60_deleteFile(); + void o60_readFile(); + void o60_rename(); + void o60_writeFile(); + void o60_soundOps(); + void o60_seekFilePos(); + void o60_localizeArrayToScript(); + void o60_redimArray(); + void o60_readFilePos(); +}; + +#ifndef DISABLE_HE +class ScummEngine_v70he : public ScummEngine_v60he { + friend class ResExtractor; + friend class Wiz; + +protected: + typedef void (ScummEngine_v70he::*OpcodeProcv70he)(); + struct OpcodeEntryv70he { + OpcodeProcv70he proc; + const char *desc; + }; + + const OpcodeEntryv70he *_opcodesv70he; + + ResExtractor *_resExtractor; + + byte *_heV7RoomOffsets; + + int32 _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags, _heSndSoundFreq; + + bool _skipProcessActors; + +public: + ScummEngine_v70he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); + ~ScummEngine_v70he(); + + Wiz *_wiz; + + byte *heFindResourceData(uint32 tag, byte *ptr); + byte *heFindResource(uint32 tag, byte *ptr); + byte *findWrappedBlock(uint32 tag, byte *ptr, int state, bool flagError); + +protected: + virtual void setupOpcodes(); + virtual void executeOpcode(byte i); + virtual const char *getOpcodeDesc(byte i); + + virtual void setupScummVars(); + virtual void initScummVars(); + + virtual void saveOrLoad(Serializer *s); + + virtual void readRoomsOffsets(); + virtual void readGlobalObjects(); + virtual void readIndexBlock(uint32 blocktype, uint32 itemsize); + + virtual int getActorFromPos(int x, int y); + + int getStringCharWidth(byte chr); + virtual int setupStringArray(int size); + void appendSubstring(int dst, int src, int len2, int len); + + virtual void setCursorFromImg(uint img, uint room, uint imgindex); + + virtual void clearDrawQueues(); + + void remapHEPalette(const uint8 *src, uint8 *dst); + + /* HE version 70 script opcodes */ + void o70_startSound(); + void o70_pickupObject(); + void o70_getActorRoom(); + void o70_resourceRoutines(); + void o70_systemOps(); + void o70_kernelSetFunctions(); + void o70_seekFilePos(); + void o70_copyString(); + void o70_getStringWidth(); + void o70_getStringLen(); + void o70_appendString(); + void o70_concatString(); + void o70_compareString(); + void o70_isResourceLoaded(); + void o70_readINI(); + void o70_writeINI(); + void o70_getStringLenForWidth(); + void o70_getCharIndexInString(); + void o70_setFilePath(); + void o70_setWindowCaption(); + void o70_polygonOps(); + void o70_polygonHit(); + + byte VAR_NUM_SOUND_CHANNELS; + byte VAR_WIZ_TCOLOR; +}; + +class ScummEngine_v71he : public ScummEngine_v70he { +public: + ScummEngine_v71he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); + +protected: + virtual void saveOrLoad(Serializer *s); + + virtual void redrawBGAreas(); + + virtual void processActors(); + void preProcessAuxQueue(); + void postProcessAuxQueue(); + +public: + /* Actor AuxQueue stuff (HE) */ + AuxBlock _auxBlocks[16]; + uint16 _auxBlocksNum; + AuxEntry _auxEntries[16]; + uint16 _auxEntriesNum; + + void queueAuxBlock(Actor *a); + void queueAuxEntry(int actorNum, int subIndex); +}; + +class ScummEngine_v72he : public ScummEngine_v71he { +protected: + typedef void (ScummEngine_v72he::*OpcodeProcV72he)(); + struct OpcodeEntryV72he { + OpcodeProcV72he proc; + const char *desc; + }; + +#if !defined(__GNUC__) + #pragma START_PACK_STRUCTS +#endif + + struct ArrayHeader { + int32 type; //0 + int32 dim1start; //4 + int32 dim1end; //8 + int32 dim2start; //0C + int32 dim2end; //10 + byte data[1]; //14 + } GCC_PACK; + +#if !defined(__GNUC__) + #pragma END_PACK_STRUCTS +#endif + + const OpcodeEntryV72he *_opcodesV72he; + + int _stringLength; + byte _stringBuffer[4096]; + + WizParameters _wizParams; + +public: + ScummEngine_v72he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); + + virtual void scummInit(); + +protected: + virtual void setupOpcodes(); + virtual void executeOpcode(byte i); + virtual const char *getOpcodeDesc(byte i); + + virtual void setupScummVars(); + virtual void initScummVars(); + virtual void readArrayFromIndexFile(); + + virtual byte *getStringAddress(int i); + virtual void readMAXS(int blockSize); + + virtual void redrawBGAreas(); + + ArrayHeader *defineArray(int array, int type, int dim2start, int dim2end, int dim1start, int dim1end); + virtual int readArray(int array, int idx2, int idx1); + virtual void writeArray(int array, int idx2, int idx1, int value); + void redimArray(int arrayId, int newDim2start, int newDim2end, + int newDim1start, int newDim1end, int type); + void checkArrayLimits(int array, int dim2start, int dim2end, int dim1start, int dim1end); + void copyArray(int array1, int a1_dim2start, int a1_dim2end, int a1_dim1start, int a1_dim1end, + int array2, int a2_dim2start, int a2_dim2end, int a2_dim1start, int a2_dim1end); + void copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int len1, byte **data, int *size, int *num); + virtual int setupStringArray(int size); + int readFileToArray(int slot, int32 size); + void writeFileFromArray(int slot, int resID); + + virtual void decodeParseString(int a, int b); + void decodeScriptString(byte *dst, bool scriptString = false); + void copyScriptString(byte *dst, int dstSize); + int convertFilePath(byte *dst, bool setFilePath = false); + + int findObject(int x, int y, int num, int *args); + int getSoundResourceSize(int id); + + virtual bool handleNextCharsetCode(Actor *a, int *c); + + /* HE version 72 script opcodes */ + void o72_pushDWord(); + void o72_getScriptString(); + void o72_isAnyOf(); + void o72_resetCutscene(); + void o72_findObjectWithClassOf(); + void o72_getObjectImageX(); + void o72_getObjectImageY(); + void o72_captureWizImage(); + void o72_getTimer(); + void o72_setTimer(); + void o72_getSoundPosition(); + void o72_startScript(); + void o72_startObject(); + void o72_drawObject(); + void o72_printWizImage(); + void o72_getArrayDimSize(); + void o72_getNumFreeArrays(); + void o72_roomOps(); + void o72_actorOps(); + void o72_verbOps(); + void o72_findObject(); + void o72_arrayOps(); + void o72_systemOps(); + void o72_talkActor(); + void o72_talkEgo(); + void o72_dimArray(); + void o72_dim2dimArray(); + void o72_traceStatus(); + void o72_debugInput(); + void o72_drawWizImage(); + void o72_kernelGetFunctions(); + void o72_jumpToScript(); + void o72_openFile(); + void o72_readFile(); + void o72_writeFile(); + void o72_findAllObjects(); + void o72_deleteFile(); + void o72_rename(); + void o72_getPixel(); + void o72_pickVarRandom(); + void o72_redimArray(); + void o72_readINI(); + void o72_writeINI(); + void o72_getResourceSize(); + void o72_setFilePath(); + void o72_setWindowCaption(); + + byte VAR_NUM_ROOMS; + byte VAR_NUM_SCRIPTS; + byte VAR_NUM_SOUNDS; + byte VAR_NUM_COSTUMES; + byte VAR_NUM_IMAGES; + byte VAR_NUM_CHARSETS; + + byte VAR_POLYGONS_ONLY; +}; + +class ScummEngine_v80he : public ScummEngine_v72he { +protected: + typedef void (ScummEngine_v80he::*OpcodeProcV80he)(); + struct OpcodeEntryV80he { + OpcodeProcV80he proc; + const char *desc; + }; + + const OpcodeEntryV80he *_opcodesV80he; + + int32 _heSndResId, _curSndId, _sndPtrOffs, _sndTmrOffs; + +public: + ScummEngine_v80he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); + +protected: + virtual void setupOpcodes(); + virtual void executeOpcode(byte i); + virtual const char *getOpcodeDesc(byte i); + + virtual void setupScummVars(); + virtual void initScummVars(); + + virtual void initCharset(int charset); + + virtual void clearDrawQueues(); + + void createSound(int snd1id, int snd2id); + + void drawLine(int x1, int y1, int x, int unk1, int unk2, int type, int id); + void drawPixel(int x, int y, int flags); + + /* HE version 80 script opcodes */ + void o80_createSound(); + void o80_getFileSize(); + void o80_stringToInt(); + void o80_getSoundVar(); + void o80_localizeArrayToRoom(); + void o80_readConfigFile(); + void o80_writeConfigFile(); + void o80_cursorCommand(); + void o80_setState(); + void o80_drawWizPolygon(); + void o80_drawLine(); + void o80_pickVarRandom(); + + byte VAR_PLATFORM; + byte VAR_WINDOWS_VERSION; + byte VAR_CURRENT_CHARSET; + byte VAR_COLOR_DEPTH; +}; + +class ScummEngine_v90he : public ScummEngine_v80he { + friend class LogicHE; + friend class Sprite; + +protected: + typedef void (ScummEngine_v90he::*OpcodeProcV90he)(); + struct OpcodeEntryV90he { + OpcodeProcV90he proc; + const char *desc; + }; + + const OpcodeEntryV90he *_opcodesV90he; + + FloodFillParameters _floodFillParams; + + struct VideoParameters { + byte filename[260]; + int32 status; + int32 flags; + int32 unk2; + int32 wizResNum; + }; + + VideoParameters _videoParams; + + int32 _heObject, _heObjectNum; + int32 _hePaletteNum; + + int32 _curMaxSpriteId; + int32 _curSpriteId; + int32 _curSpriteGroupId; + +public: + ScummEngine_v90he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex); + ~ScummEngine_v90he(); + + virtual void scummInit(); + + LogicHE *_logicHE; + Sprite *_sprite; + +protected: + virtual void allocateArrays(); + virtual void setupOpcodes(); + virtual void executeOpcode(byte i); + virtual const char *getOpcodeDesc(byte i); + + virtual void setupScummVars(); + virtual void initScummVars(); + + virtual void saveOrLoad(Serializer *s); + + virtual void readMAXS(int blockSize); + + virtual void processActors(); + + int computeWizHistogram(int resnum, int state, int x, int y, int w, int h); + void getArrayDim(int array, int *dim2start, int *dim2end, int *dim1start, int *dim1end); + void sortArray(int array, int dim2start, int dim2end, int dim1start, int dim1end, int sortOrder); + +public: + int getGroupSpriteArray(int spriteGroupId); + +protected: + uint8 *getHEPaletteIndex(int palSlot); + int getHEPaletteColor(int palSlot, int color); + int getHEPaletteSimilarColor(int palSlot, int red, int green, int start, int end); + int getHEPaletteColorComponent(int palSlot, int color, int component); + void setHEPaletteColor(int palSlot, uint8 color, uint8 r, uint8 g, uint8 b); + void setHEPaletteFromPtr(int palSlot, const uint8 *palData); + void setHEPaletteFromCostume(int palSlot, int resId); + void setHEPaletteFromImage(int palSlot, int resId, int state); + void setHEPaletteFromRoom(int palSlot, int resId, int state); + void restoreHEPalette(int palSlot); + void copyHEPalette(int dstPalSlot, int srcPalSlot); + void copyHEPaletteColor(int palSlot, uint8 dstColor, uint8 srcColor); + + + void setDefaultCursor(); + +protected: + /* HE version 90 script opcodes */ + void o90_dup_n(); + void o90_min(); + void o90_max(); + void o90_sin(); + void o90_cos(); + void o90_sqrt(); + void o90_atan2(); + void o90_getSegmentAngle(); + void o90_getActorData(); + void o90_startScriptUnk(); + void o90_jumpToScriptUnk(); + void o90_videoOps(); + void o90_getVideoData(); + void o90_wizImageOps(); + void o90_getDistanceBetweenPoints(); + void o90_getSpriteInfo(); + void o90_setSpriteInfo(); + void o90_getSpriteGroupInfo(); + void o90_setSpriteGroupInfo(); + void o90_getWizData(); + void o90_floodFill(); + void o90_mod(); + void o90_shl(); + void o90_shr(); + void o90_xor(); + void o90_findAllObjectsWithClassOf(); + void o90_getPolygonOverlap(); + void o90_cond(); + void o90_dim2dim2Array(); + void o90_redim2dimArray(); + void o90_getLinesIntersectionPoint(); + void o90_sortArray(); + void o90_getObjectData(); + void o90_getPaletteData(); + void o90_paletteOps(); + void o90_fontUnk(); + void o90_getActorAnimProgress(); + void o90_kernelGetFunctions(); + void o90_kernelSetFunctions(); + + byte VAR_NUM_SPRITE_GROUPS; + byte VAR_NUM_SPRITES; + byte VAR_NUM_PALETTES; + byte VAR_NUM_UNK; + + byte VAR_U32_VERSION; + byte VAR_U32_ARRAY_UNK; +}; + +class ScummEngine_v99he : public ScummEngine_v90he { +public: + ScummEngine_v99he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex) : ScummEngine_v90he(detector, syst, gs, md5sum, substResFileNameIndex) {} + + virtual void scummInit(); + +protected: + virtual void initScummVars(); + + virtual void readMAXS(int blockSize); + + virtual void saveOrLoad(Serializer *s); + + virtual void copyPalColor(int dst, int src); + virtual void darkenPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor); + virtual void setPaletteFromPtr(const byte *ptr, int numcolor = -1); + virtual void setPalColor(int index, int r, int g, int b); + virtual void updatePalette(); +}; + +class ScummEngine_v100he : public ScummEngine_v99he { +protected: + typedef void (ScummEngine_v100he::*OpcodeProcV100he)(); + struct OpcodeEntryV100he { + OpcodeProcV100he proc; + const char *desc; + }; + + int32 _heResId, _heResType; + + const OpcodeEntryV100he *_opcodesV100he; + +public: + ScummEngine_v100he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex) : ScummEngine_v99he(detector, syst, gs, md5sum, substResFileNameIndex) {} + +protected: + virtual void setupOpcodes(); + virtual void executeOpcode(byte i); + virtual const char *getOpcodeDesc(byte i); + + virtual void saveOrLoad(Serializer *s); + + virtual void decodeParseString(int a, int b); + + /* HE version 100 script opcodes */ + void o100_actorOps(); + void o100_arrayOps(); + void o100_dim2dimArray(); + void o100_redim2dimArray(); + void o100_dimArray(); + void o100_drawLine(); + void o100_drawObject(); + void o100_floodFill(); + void o100_setSpriteGroupInfo(); + void o100_resourceRoutines(); + void o100_wizImageOps(); + void o100_jumpToScript(); + void o100_createSound(); + void o100_dim2dim2Array(); + void o100_paletteOps(); + void o100_jumpToScriptUnk(); + void o100_startScriptUnk(); + void o100_redimArray(); + void o100_roomOps(); + void o100_startSound(); + void o100_setSpriteInfo(); + void o100_startScript(); + void o100_systemOps(); + void o100_cursorCommand(); + void o100_videoOps(); + void o100_wait(); + void o100_writeFile(); + void o100_isResourceLoaded(); + void o100_getResourceSize(); + void o100_getSpriteGroupInfo(); + void o100_getPaletteData(); + void o100_readFile(); + void o100_getSpriteInfo(); + void o100_getWizData(); + void o100_getVideoData(); +}; +#endif + + +} // End of namespace Scumm + +#endif diff --git a/scumm/logic_he.cpp b/scumm/logic_he.cpp index e299f9720c..3707a16448 100644 --- a/scumm/logic_he.cpp +++ b/scumm/logic_he.cpp @@ -21,7 +21,7 @@ #include "common/stdafx.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/logic_he.h" namespace Scumm { @@ -37,6 +37,10 @@ LogicHE::~LogicHE() { free(_userDataD); } +void LogicHE::writeScummVar(int var, int32 value) { + _vm->writeVar(var, value); +} + static int32 scumm_round(double arg) { return (int32)(arg + 0.5); } diff --git a/scumm/logic_he.h b/scumm/logic_he.h index 903c749540..deb3ab1cd6 100644 --- a/scumm/logic_he.h +++ b/scumm/logic_he.h @@ -24,10 +24,10 @@ #include "common/stdafx.h" -#include "scumm/intern.h" - namespace Scumm { +class ScummEngine_v90he; + class LogicHE { public: float *_userData; @@ -37,7 +37,7 @@ public: LogicHE(ScummEngine_v90he *vm); virtual ~LogicHE(); - void writeScummVar(int var, int32 value) { _vm->writeVar(var, value); } + void writeScummVar(int var, int32 value); int getFromArray(int arg0, int idx2, int idx1); void putInArray(int arg0, int idx2, int idx1, int val); diff --git a/scumm/object.cpp b/scumm/object.cpp index 5dbdd95683..84be805f87 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -25,6 +25,9 @@ #include "scumm/actor.h" #include "scumm/bomp.h" #include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/usage_bits.h" diff --git a/scumm/palette_he.cpp b/scumm/palette_he.cpp index dadda1d69d..eb16847ee5 100644 --- a/scumm/palette_he.cpp +++ b/scumm/palette_he.cpp @@ -22,7 +22,7 @@ #include "common/stdafx.h" #include "common/system.h" #include "scumm/scumm.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/resource.h" #include "scumm/util.h" diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 15dd50fbfa..9091a3e958 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -28,6 +28,9 @@ #include "scumm/imuse.h" #include "scumm/imuse_digi/dimuse.h" #include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/scumm.h" @@ -52,7 +55,9 @@ extern const char *resTypeFromId(int id); static uint16 newTag2Old(uint32 newTag); static const byte *findResourceSmall(uint32 tag, const byte *searchin); +#ifndef DISABLE_HE static bool checkTryMedia(BaseScummFile *handle); +#endif /* Open a room */ diff --git a/scumm/resource_v7he.cpp b/scumm/resource_v7he.cpp index 3977140693..8c8ca2070a 100644 --- a/scumm/resource_v7he.cpp +++ b/scumm/resource_v7he.cpp @@ -25,7 +25,7 @@ #include "common/stdafx.h" #include "scumm/scumm.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/resource.h" #include "scumm/resource_v7he.h" #include "scumm/sound.h" diff --git a/scumm/resource_v7he.h b/scumm/resource_v7he.h index dd9e03e570..22f2c0a1ac 100644 --- a/scumm/resource_v7he.h +++ b/scumm/resource_v7he.h @@ -114,6 +114,8 @@ namespace Scumm { if (!check_offset(fi->memory, fi->total_size, fi->file->name(), x, s)) \ return (r); +class ScummEngine_v70he; + class ResExtractor { public: ResExtractor(ScummEngine_v70he *scumm); diff --git a/scumm/room.cpp b/scumm/room.cpp index f8432657ed..b7926346ca 100644 --- a/scumm/room.cpp +++ b/scumm/room.cpp @@ -25,6 +25,9 @@ #include "scumm/actor.h" #include "scumm/boxes.h" #include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/scumm.h" diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 98b6a2db62..74f8b7101a 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -31,6 +31,7 @@ #include "scumm/imuse_digi/dimuse.h" #include "scumm/imuse.h" #include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/saveload.h" diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 64ac36bd1c..db8a06c65a 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -24,7 +24,7 @@ #include "scumm/actor.h" #include "scumm/charset.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/resource_v7he.h" diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index 19959f81bb..a28c2b2ab0 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -26,7 +26,7 @@ #include "scumm/actor.h" #include "scumm/charset.h" #include "scumm/imuse.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/scumm.h" diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index adade6ac2b..b604569c29 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -28,7 +28,7 @@ #include "scumm/actor.h" #include "scumm/charset.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/resource_v7he.h" diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 5fa56605d1..8029341a04 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -26,7 +26,7 @@ #include "scumm/actor.h" #include "scumm/charset.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/resource_v7he.h" diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 393e03c57a..d69292b7c3 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -28,7 +28,7 @@ #include "scumm/actor.h" #include "scumm/charset.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/resource_v7he.h" diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index ed729deb4e..dbe6110080 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -24,7 +24,7 @@ #include "scumm/actor.h" #include "scumm/charset.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/logic_he.h" #include "scumm/object.h" #include "scumm/resource.h" diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 527d866d82..861be2cba9 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -43,6 +43,7 @@ #include "scumm/imuse_digi/dimuse.h" #include "scumm/insane/insane.h" #include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/logic_he.h" #include "scumm/player_nes.h" #include "scumm/player_v1.h" diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index f0ecc7b6be..eb47a0a01e 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -22,7 +22,7 @@ #include "common/stdafx.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/resource.h" #include "scumm/saveload.h" #include "scumm/scumm.h" diff --git a/scumm/string.cpp b/scumm/string.cpp index 5a83dbed77..9190d0e41e 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -30,6 +30,9 @@ #include "scumm/dialogs.h" #include "scumm/imuse_digi/dimuse.h" #include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/verbs.h" #include "scumm/sound.h" #include "scumm/util.h" diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 8fa8be6a06..052e180430 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -24,6 +24,9 @@ #include "common/config-manager.h" #include "scumm/scumm.h" #include "scumm/intern.h" +#ifndef DISABLE_HE +#include "scumm/intern_he.h" +#endif #include "scumm/logic_he.h" #include "sound/mididrv.h" diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index a77e9eac99..ef2d83f9b6 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -22,7 +22,7 @@ #include "common/stdafx.h" -#include "scumm/intern.h" +#include "scumm/intern_he.h" #include "scumm/resource.h" #include "scumm/scumm.h" #include "scumm/wiz_he.h" |