diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/predictive.cpp | 2 | ||||
-rw-r--r-- | engines/agi/sound.cpp | 1 | ||||
-rw-r--r-- | engines/cine/msg.cpp | 2 | ||||
-rw-r--r-- | engines/cine/msg.h | 4 | ||||
-rw-r--r-- | engines/groovie/cursor.h | 1 | ||||
-rw-r--r-- | engines/m4/mads_anim.h | 4 | ||||
-rw-r--r-- | engines/made/sound.h | 2 | ||||
-rw-r--r-- | engines/mohawk/riven_scripts.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/riven_scripts.h | 6 | ||||
-rw-r--r-- | engines/mohawk/video/qdm2.h | 1 | ||||
-rw-r--r-- | engines/queen/credits.h | 4 | ||||
-rw-r--r-- | engines/queen/logic.h | 4 | ||||
-rw-r--r-- | engines/queen/resource.h | 3 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 7 | ||||
-rw-r--r-- | engines/sci/engine/state.h | 5 | ||||
-rw-r--r-- | engines/sky/control.h | 7 | ||||
-rw-r--r-- | engines/sword1/control.h | 3 | ||||
-rw-r--r-- | engines/teenagent/music.h | 1 | ||||
-rw-r--r-- | engines/teenagent/scene.h | 6 |
19 files changed, 42 insertions, 25 deletions
diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp index c4b6649563..153fec641a 100644 --- a/engines/agi/predictive.cpp +++ b/engines/agi/predictive.cpp @@ -67,7 +67,7 @@ void bringWordtoTop(char *str, int wordnum) { // This function reorders the words on the given pred.dic line // by moving the word at position 'wordnum' to the front (that is, right behind // right behind the numerical code word at the start of the line). - Common::StringList words; + Common::Array<Common::String> words; char buf[MAXLINELEN]; if (!str) diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index 760dfd3320..24abf88c0e 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -26,6 +26,7 @@ #include "common/md5.h" #include "common/config-manager.h" #include "common/random.h" +#include "common/str-array.h" #include "agi/agi.h" diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp index a7cccf03c7..eb7167c6a3 100644 --- a/engines/cine/msg.cpp +++ b/engines/cine/msg.cpp @@ -31,6 +31,8 @@ namespace Cine { +// FIXME: Global C++ objects affect portability negatively. +// Turn this into a class member instead. Common::StringList messageTable; void loadMsg(char *pMsgName) { diff --git a/engines/cine/msg.h b/engines/cine/msg.h index ddf8ade8c2..cf51cdb48f 100644 --- a/engines/cine/msg.h +++ b/engines/cine/msg.h @@ -26,13 +26,13 @@ #ifndef CINE_MSG_H #define CINE_MSG_H -#include "common/str.h" +#include "common/str-array.h" namespace Cine { #define NUM_MAX_MESSAGE 255 -extern Common::StringList messageTable; +extern Common::StringArray messageTable; void loadMsg(char *pMsgName); diff --git a/engines/groovie/cursor.h b/engines/groovie/cursor.h index b37384bee5..6df7860e23 100644 --- a/engines/groovie/cursor.h +++ b/engines/groovie/cursor.h @@ -27,6 +27,7 @@ #define GROOVIE_CURSOR_H #include "common/system.h" +#include "common/array.h" #include "common/file.h" namespace Groovie { diff --git a/engines/m4/mads_anim.h b/engines/m4/mads_anim.h index e4732f25b2..680c5ff901 100644 --- a/engines/m4/mads_anim.h +++ b/engines/m4/mads_anim.h @@ -29,6 +29,8 @@ #include "m4/viewmgr.h" #include "m4/compression.h" +#include "common/str-array.h" + namespace M4 { enum SceneTransition { @@ -97,7 +99,7 @@ public: uint8 flags; uint16 roomNumber; uint16 frameTicks; - Common::StringList filenames; + Common::StringArray filenames; Common::String lbmFilename; Common::String spritesFilename; Common::String soundName; diff --git a/engines/made/sound.h b/engines/made/sound.h index eb2157bd42..0766c1040c 100644 --- a/engines/made/sound.h +++ b/engines/made/sound.h @@ -26,9 +26,9 @@ #ifndef MADE_SOUND_H #define MADE_SOUND_H +#include "common/array.h" #include "common/util.h" #include "common/file.h" -#include "common/list.h" #include "common/stream.h" namespace Made { diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp index 911ee16028..e809ad9642 100644 --- a/engines/mohawk/riven_scripts.cpp +++ b/engines/mohawk/riven_scripts.cpp @@ -172,7 +172,7 @@ static void printTabs(byte tabs) { printf ("\t"); } -void RivenScript::dumpScript(Common::StringList varNames, Common::StringList xNames, byte tabs) { +void RivenScript::dumpScript(Common::StringArray varNames, Common::StringArray xNames, byte tabs) { if (_stream->pos() != 0) _stream->seek(0); @@ -180,7 +180,7 @@ void RivenScript::dumpScript(Common::StringList varNames, Common::StringList xNa dumpCommands(varNames, xNames, tabs + 1); } -void RivenScript::dumpCommands(Common::StringList varNames, Common::StringList xNames, byte tabs) { +void RivenScript::dumpCommands(Common::StringArray varNames, Common::StringArray xNames, byte tabs) { uint16 commandCount = _stream->readUint16BE(); for (uint16 i = 0; i < commandCount; i++) { diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h index 2879fa014d..f61abee36b 100644 --- a/engines/mohawk/riven_scripts.h +++ b/engines/mohawk/riven_scripts.h @@ -26,6 +26,8 @@ #ifndef RIVEN_SCRIPTS_H #define RIVEN_SCRIPTS_H +#include "common/str-array.h" + class MohawkEngine_Riven; #define DECLARE_OPCODE(x) void x(uint16 op, uint16 argc, uint16 *argv) @@ -55,7 +57,7 @@ public: ~RivenScript(); void runScript(); - void dumpScript(Common::StringList varNames, Common::StringList xNames, byte tabs); + void dumpScript(Common::StringArray varNames, Common::StringArray xNames, byte tabs); uint16 getScriptType() { return _scriptType; } // Read in an array of script objects from a stream @@ -74,7 +76,7 @@ private: Common::SeekableReadStream *_stream; uint16 _scriptType; - void dumpCommands(Common::StringList varNames, Common::StringList xNames, byte tabs); + void dumpCommands(Common::StringArray varNames, Common::StringArray xNames, byte tabs); void processCommands(bool runCommands); static uint32 calculateCommandSize(Common::SeekableReadStream* script); diff --git a/engines/mohawk/video/qdm2.h b/engines/mohawk/video/qdm2.h index a2f55a10ac..ffa5f77030 100644 --- a/engines/mohawk/video/qdm2.h +++ b/engines/mohawk/video/qdm2.h @@ -27,6 +27,7 @@ #define MOHAWK_VIDEO_QDM2_H #include "sound/audiostream.h" +#include "common/array.h" #include "common/stream.h" namespace Mohawk { diff --git a/engines/queen/credits.h b/engines/queen/credits.h index 0aafe010f4..059c651ca7 100644 --- a/engines/queen/credits.h +++ b/engines/queen/credits.h @@ -26,7 +26,7 @@ #ifndef QUEEN_CREDITS_H #define QUEEN_CREDITS_H -#include "common/util.h" +#include "common/str-array.h" #include "queen/defs.h" namespace Queen { @@ -82,7 +82,7 @@ private: uint _lineNum; //! contains the credits description - Common::StringList _credits; + Common::StringArray _credits; QueenEngine *_vm; }; diff --git a/engines/queen/logic.h b/engines/queen/logic.h index ee0a4f2270..e6924b3e41 100644 --- a/engines/queen/logic.h +++ b/engines/queen/logic.h @@ -26,7 +26,7 @@ #ifndef QUEEN_LOGIC_H #define QUEEN_LOGIC_H -#include "common/str.h" +#include "common/str-array.h" #include "common/util.h" #include "queen/structs.h" @@ -337,7 +337,7 @@ protected: //! actor initial position in room is _walkOffData[_entryObj] int16 _entryObj; - Common::StringList _jasStringList; + Common::StringArray _jasStringList; int _jasStringOffset[JSO_COUNT]; uint16 _numDescriptions; diff --git a/engines/queen/resource.h b/engines/queen/resource.h index b057827dcd..63720a0755 100644 --- a/engines/queen/resource.h +++ b/engines/queen/resource.h @@ -27,6 +27,7 @@ #define QUEEN_RESOURCE_H #include "common/file.h" +#include "common/str-array.h" #include "common/util.h" #include "queen/defs.h" @@ -74,7 +75,7 @@ public: uint8 *loadFile(const char *filename, uint32 skipBytes = 0, uint32 *size = NULL); //! loads a text file - void loadTextFile(const char *filename, Common::StringList &stringList); + void loadTextFile(const char *filename, Common::StringArray &stringList); //! returns true if the file is present in the resource bool fileExists(const char *filename) const { return resourceEntry(filename) != NULL; } diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 542612113d..a8915f4860 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -29,6 +29,7 @@ #include "common/scummsys.h" #include "common/debug.h" #include "common/rect.h" +#include "common/str-array.h" #include "sci/sci.h" // for USE_OLD_MUSIC_FUNCTIONS #include "sci/engine/vm_types.h" // for reg_t @@ -175,7 +176,7 @@ private: * Check for any hardcoded selector table we might have that can be used * if a game is missing the selector names. */ - Common::StringList checkStaticSelectorNames(); + Common::StringArray checkStaticSelectorNames(); /** * Maps special selectors @@ -191,8 +192,8 @@ private: uint32 features; // Kernel-related lists - Common::StringList _selectorNames; - Common::StringList _kernelNames; + Common::StringArray _selectorNames; + Common::StringArray _kernelNames; }; /******************** Text functionality ********************/ diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index f638f78d03..4f36ae00c4 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -29,6 +29,7 @@ #include "common/scummsys.h" #include "common/array.h" #include "common/serializer.h" +#include "common/str-array.h" namespace Common { class SeekableReadStream; @@ -54,8 +55,8 @@ class SoundCommandParser; class DirSeeker { protected: reg_t _outbuffer; - Common::StringList _savefiles; - Common::StringList::const_iterator _iter; + Common::StringArray _savefiles; + Common::StringArray::const_iterator _iter; public: DirSeeker() { diff --git a/engines/sky/control.h b/engines/sky/control.h index 9c0e3c3cac..a0024ce73b 100644 --- a/engines/sky/control.h +++ b/engines/sky/control.h @@ -29,6 +29,7 @@ #include "common/events.h" #include "common/scummsys.h" +#include "common/str-array.h" class OSystem; namespace Common { @@ -194,8 +195,8 @@ public: uint16 _selectedGame; uint16 saveGameToFile(); - void loadDescriptions(Common::StringList &list); - void saveDescriptions(const Common::StringList &list); + void loadDescriptions(Common::StringArray &list); + void saveDescriptions(const Common::StringArray &list); private: int displayMessage(const char *altButton, const char *message, ...) GCC_PRINTF(3, 4); @@ -222,7 +223,7 @@ private: void drawCross(uint16 x, uint16 y); uint16 saveRestorePanel(bool allowSave); - void setUpGameSprites(const Common::StringList &saveGameNames, DataFileHeader **nameSprites, uint16 firstNum, uint16 selectedGame); + void setUpGameSprites(const Common::StringArray &saveGameNames, DataFileHeader **nameSprites, uint16 firstNum, uint16 selectedGame); void showSprites(DataFileHeader **nameSprites, bool allowSave); void handleKeyPress(Common::KeyState kbd, Common::String &textBuf); diff --git a/engines/sword1/control.h b/engines/sword1/control.h index 6741b3dd79..a6ccb09a04 100644 --- a/engines/sword1/control.h +++ b/engines/sword1/control.h @@ -28,6 +28,7 @@ #include "common/scummsys.h" #include "common/events.h" +#include "common/str-array.h" #include "sword1/sworddefs.h" class OSystem; @@ -111,7 +112,7 @@ private: uint8 _numSaves; uint8 _saveScrollPos; uint8 _selectedSavegame; - Common::StringList _saveNames; + Common::StringArray _saveNames; Common::String _oldName; uint8 _cursorTick; bool _cursorVisible; diff --git a/engines/teenagent/music.h b/engines/teenagent/music.h index 9c518b58e0..c1f5765a55 100644 --- a/engines/teenagent/music.h +++ b/engines/teenagent/music.h @@ -27,6 +27,7 @@ #define TEEN_MUSIC_H #include "sound/mods/paula.h" +#include "common/array.h" namespace TeenAgent { diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h index bf01e211ef..92e5e05c04 100644 --- a/engines/teenagent/scene.h +++ b/engines/teenagent/scene.h @@ -27,12 +27,14 @@ #include "teenagent/surface.h" #include "teenagent/actor.h" -#include "common/system.h" -#include "common/list.h" #include "teenagent/objects.h" #include "teenagent/surface.h" #include "teenagent/surface_list.h" +#include "common/system.h" +#include "common/array.h" +#include "common/list.h" + namespace TeenAgent { class TeenAgentEngine; |