diff options
author | Paul Gilbert | 2010-08-01 01:49:06 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:16:21 +0000 |
commit | 2d8e94e4ff71cefb9822732741bc7eb1a9116e07 (patch) | |
tree | 25d3e5c93e475ceb62f25869b25724270aef899c /engines/sword25/kernel/inputpersistenceblock.h | |
parent | ea29e41b86dd6efad5b044220505ded798b2503e (diff) | |
download | scummvm-rg350-2d8e94e4ff71cefb9822732741bc7eb1a9116e07.tar.gz scummvm-rg350-2d8e94e4ff71cefb9822732741bc7eb1a9116e07.tar.bz2 scummvm-rg350-2d8e94e4ff71cefb9822732741bc7eb1a9116e07.zip |
SWORD25: Converted Lua interface classes
svn-id: r53195
Diffstat (limited to 'engines/sword25/kernel/inputpersistenceblock.h')
-rw-r--r-- | engines/sword25/kernel/inputpersistenceblock.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/engines/sword25/kernel/inputpersistenceblock.h b/engines/sword25/kernel/inputpersistenceblock.h index a129f89b1d..6e1ec39943 100644 --- a/engines/sword25/kernel/inputpersistenceblock.h +++ b/engines/sword25/kernel/inputpersistenceblock.h @@ -45,30 +45,29 @@ #include <vector> #include "sword25/kernel/memlog_on.h" +namespace Sword25 { // ----------------------------------------------------------------------------- // Class declaration // ----------------------------------------------------------------------------- -class BS_InputPersistenceBlock : public BS_PersistenceBlock -{ +class BS_InputPersistenceBlock : public BS_PersistenceBlock { public: - enum ErrorState - { + enum ErrorState { NONE, END_OF_DATA, OUT_OF_SYNC }; - BS_InputPersistenceBlock(const void * Data, unsigned int DataLength); + BS_InputPersistenceBlock(const void *Data, unsigned int DataLength); virtual ~BS_InputPersistenceBlock(); - void Read(signed int & Value); - void Read(unsigned int & Value); - void Read(float & Value); - void Read(bool & Value); - void Read(std::string & Value); - void Read(std::vector<unsigned char> & Value); + void Read(signed int &Value); + void Read(unsigned int &Value); + void Read(float &Value); + void Read(bool &Value); + void Read(std::string &Value); + void Read(std::vector<unsigned char> &Value); bool IsGood() const { return m_ErrorState == NONE; } ErrorState GetErrorState() const { return m_ErrorState; } @@ -76,11 +75,13 @@ public: private: bool CheckMarker(unsigned char Marker); bool CheckBlockSize(int Size); - void RawRead(void * DestPtr, size_t Size); + void RawRead(void *DestPtr, size_t Size); - std::vector<unsigned char> m_Data; - std::vector<unsigned char>::const_iterator m_Iter; + Common::Array<unsigned char> m_Data; + Common::Array<unsigned char>::const_iterator m_Iter; ErrorState m_ErrorState; }; +} // End of namespace Sword25 + #endif |