diff options
| author | dreammaster | 2018-11-10 18:25:20 +0000 | 
|---|---|---|
| committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 | 
| commit | 62315b969d851166c94c6fb73a3da7ac4ab44a73 (patch) | |
| tree | 47d0b2cea9d2e5fb187725a15d657bf92170c48d | |
| parent | fbed3ed7a3ab37cedf05d551e9c904db44a35b88 (diff) | |
| download | scummvm-rg350-62315b969d851166c94c6fb73a3da7ac4ab44a73.tar.gz scummvm-rg350-62315b969d851166c94c6fb73a3da7ac4ab44a73.tar.bz2 scummvm-rg350-62315b969d851166c94c6fb73a3da7ac4ab44a73.zip | |
GLK: gcc compilation fixes
| -rw-r--r-- | engines/gargoyle/detection.cpp | 3 | ||||
| -rw-r--r-- | engines/gargoyle/detection_tables.h | 14 | ||||
| -rw-r--r-- | engines/gargoyle/events.h | 2 | ||||
| -rw-r--r-- | engines/gargoyle/gargoyle.h | 2 | ||||
| -rw-r--r-- | engines/gargoyle/glk_types.h | 12 | ||||
| -rw-r--r-- | engines/gargoyle/module.mk | 1 | ||||
| -rw-r--r-- | engines/gargoyle/scott/scott.cpp | 8 | ||||
| -rw-r--r-- | engines/gargoyle/streams.cpp | 10 | ||||
| -rw-r--r-- | engines/gargoyle/streams.h | 6 | ||||
| -rw-r--r-- | engines/gargoyle/window_text_buffer.cpp | 4 | 
10 files changed, 24 insertions, 38 deletions
| diff --git a/engines/gargoyle/detection.cpp b/engines/gargoyle/detection.cpp index 4363c4607c..245790a69f 100644 --- a/engines/gargoyle/detection.cpp +++ b/engines/gargoyle/detection.cpp @@ -142,8 +142,7 @@ bool Gargoyle::GargoyleEngine::hasFeature(EngineFeature f) const {  }  bool GargoyleMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { -	Gargoyle::GargoyleGameDescription *gd = (Gargoyle::GargoyleGameDescription *)desc; -	gd->_filename = ConfMan.get("filename"); +	const Gargoyle::GargoyleGameDescription *gd = (const Gargoyle::GargoyleGameDescription *)desc;  	switch (gd->_interpType) {  	case Gargoyle::INTERPRETER_SCOTT: diff --git a/engines/gargoyle/detection_tables.h b/engines/gargoyle/detection_tables.h index 777d4db96b..30491f6d9b 100644 --- a/engines/gargoyle/detection_tables.h +++ b/engines/gargoyle/detection_tables.h @@ -23,19 +23,7 @@  namespace Gargoyle {  static const GargoyleGameDescription gameDescriptions[] = { -	{ -		{ -			"Gargoyle", -			0, -			AD_ENTRY1s("dummy", "0", 0), -			Common::EN_ANY, -			Common::kPlatformDOS, -			ADGF_NO_FLAGS, -			GUIO0() -		}, -	}, - -	{ AD_TABLE_END_MARKER } +	{ AD_TABLE_END_MARKER, "", (InterpreterType)0, "" }  };  } // End of namespace Gargoyle diff --git a/engines/gargoyle/events.h b/engines/gargoyle/events.h index b69cd04c34..745f1ae697 100644 --- a/engines/gargoyle/events.h +++ b/engines/gargoyle/events.h @@ -258,7 +258,7 @@ public:  	/**  	 * Set the total number of frames played  	 */ -	void Events::setTotalPlayTicks(uint frames) { +	void setTotalPlayTicks(uint frames) {  		_frameCounter = frames;  	} diff --git a/engines/gargoyle/gargoyle.h b/engines/gargoyle/gargoyle.h index e131be17d2..aeaa0c0bad 100644 --- a/engines/gargoyle/gargoyle.h +++ b/engines/gargoyle/gargoyle.h @@ -164,7 +164,7 @@ public:  	/**  	 * Returns the primary filename for the game  	 */ -	const Common::String &GargoyleEngine::getFilename() const; +	const Common::String &getFilename() const;  	/**  	 * Return the game engine's target name diff --git a/engines/gargoyle/glk_types.h b/engines/gargoyle/glk_types.h index 7258e693c4..21a8b7599e 100644 --- a/engines/gargoyle/glk_types.h +++ b/engines/gargoyle/glk_types.h @@ -103,7 +103,7 @@ enum Gestalt {  	gestalt_LineTerminatorKey      = 19,  	gestalt_DateTime               = 20,  	gestalt_Sound2                 = 21, -	gestalt_GarglkText             = 0x1100, +	gestalt_GarglkText             = 0x1100  };  enum Style { @@ -118,7 +118,7 @@ enum Style {  	style_Input        = 8,  	style_User1        = 9,  	style_User2        = 10, -	style_NUMSTYLES    = 11, +	style_NUMSTYLES    = 11  };  enum WinType { @@ -127,7 +127,7 @@ enum WinType {  	wintype_Blank      = 2,  	wintype_TextBuffer = 3,  	wintype_TextGrid   = 4, -	wintype_Graphics   = 5, +	wintype_Graphics   = 5  };  enum WinMethod { @@ -143,7 +143,7 @@ enum WinMethod {  	winmethod_Border     = 0x000,  	winmethod_NoBorder   = 0x100, -	winmethod_BorderMask = 0x100, +	winmethod_BorderMask = 0x100  };  enum StyleHint { @@ -162,7 +162,7 @@ enum StyleHint {  	stylehint_just_LeftFlush  = 0,  	stylehint_just_LeftRight  = 1,  	stylehint_just_Centered   = 2, -	stylehint_just_RightFlush = 3, +	stylehint_just_RightFlush = 3  };  /** @@ -176,7 +176,7 @@ enum giDisp {  	gidisp_Class_Window   = 0,  	gidisp_Class_Stream   = 1,  	gidisp_Class_Fileref  = 2, -	gidisp_Class_Schannel = 3, +	gidisp_Class_Schannel = 3  };  enum zcolor { diff --git a/engines/gargoyle/module.mk b/engines/gargoyle/module.mk index bf4138aadc..d24a041f7c 100644 --- a/engines/gargoyle/module.mk +++ b/engines/gargoyle/module.mk @@ -16,7 +16,6 @@ MODULE_OBJS := \  	unicode_gen.o \  	utils.o \  	windows.o \ -	window_mask.o \  	window_graphics.o \  	window_pair.o \  	window_text_buffer.o \ diff --git a/engines/gargoyle/scott/scott.cpp b/engines/gargoyle/scott/scott.cpp index 9f3a87d604..3316995482 100644 --- a/engines/gargoyle/scott/scott.cpp +++ b/engines/gargoyle/scott/scott.cpp @@ -175,7 +175,7 @@ void Scott::delay(int seconds) {  }  void Scott::fatal(const char *x) { -	error(x); +	error("%s", x);  }  void Scott::clearScreen(void) { @@ -412,7 +412,7 @@ void Scott::outputNumber(int a) {  }  void Scott::look(void) { -	static char *ExitNames[6] = { "North", "South", "East", "West", "Up", "Down" }; +	const char *const ExitNames[6] = { "North", "South", "East", "West", "Up", "Down" };  	Room *r;  	int ct, f;  	int pos; @@ -555,7 +555,7 @@ Common::Error Scott::saveGameState(int slot, const Common::String &desc) {  		glk_put_string_stream(file, msg.c_str());  	} -	msg = Common::String::format("%lu %d %hd %d %d %hd\n", +	msg = Common::String::format("%u %d %hd %d %d %hd\n",  	                             BitFlags, (BitFlags & (1 << DARKBIT)) ? 1 : 0,  	                             MyLoc, CurrentCounter, SavedRoom, GameHeader.LightTime);  	glk_put_string_stream(file, msg.c_str()); @@ -602,7 +602,7 @@ Common::Error Scott::loadGameState(int slot) {  	}  	glk_get_line_stream(file, buf, sizeof buf); -	sscanf(buf, "%ld %hd %d %d %d %d\n", +	sscanf(buf, "%u %hd %d %d %d %d\n",  	       &BitFlags, &darkFlag, &MyLoc, &CurrentCounter, &SavedRoom,  	       &GameHeader.LightTime); diff --git a/engines/gargoyle/streams.cpp b/engines/gargoyle/streams.cpp index 75fb205591..659fcd00d6 100644 --- a/engines/gargoyle/streams.cpp +++ b/engines/gargoyle/streams.cpp @@ -850,7 +850,7 @@ void FileStream::putBuffer(const char *buf, size_t len) {  	ensureOp(filemode_Write);  	for (size_t lx = 0; lx < len; lx++) { -		unsigned char ch = ((unsigned char *)buf)[lx]; +		unsigned char ch = ((const unsigned char *)buf)[lx];  		if (!_unicode) {  			_outFile->writeByte(ch);  		} else if (_textFile) { @@ -1100,7 +1100,7 @@ glui32 FileStream::getBuffer(char *buf, glui32 len) {  		for (lx = 0; lx < len; lx++) {  			glui32 ch;  			ch = getCharUtf8(); -			if (ch == -1) +			if (ch == (glui32)-1)  				break;  			_readCount++;  			if (ch >= 0x100) @@ -1161,7 +1161,7 @@ glui32 FileStream::getBufferUni(glui32 *buf, glui32 len) {  		for (lx = 0; lx < len; lx++) {  			glui32 ch;  			ch = getCharUtf8(); -			if (ch == -1) +			if (ch == (glui32)-1)  				break;  			_readCount++;  			buf[lx] = ch; @@ -1221,7 +1221,7 @@ glui32 FileStream::getLine(char *buf, glui32 len) {  		for (lx = 0; lx < len && !gotNewline; lx++) {  			glui32 ch;  			ch = getCharUtf8(); -			if (ch == -1) +			if (ch == (glui32)-1)  				break;  			_readCount++;  			if (ch >= 0x100) @@ -1295,7 +1295,7 @@ glui32 FileStream::getLineUni(glui32 *ubuf, glui32 len) {  		for (lx = 0; lx < (int)len && !gotNewline; lx++) {  			glui32 ch;  			ch = getCharUtf8(); -			if (ch == -1) +			if (ch == (glui32)-1)  				break;  			_readCount++;  			ubuf[lx] = ch; diff --git a/engines/gargoyle/streams.h b/engines/gargoyle/streams.h index 8a497e08cb..772b0215c2 100644 --- a/engines/gargoyle/streams.h +++ b/engines/gargoyle/streams.h @@ -44,20 +44,20 @@ enum FileUsage {  	fileusage_TypeMask = 0x0f,  	fileusage_TextMode = 0x100, -	fileusage_BinaryMode = 0x000, +	fileusage_BinaryMode = 0x000  };  enum FileMode {  	filemode_Write = 0x01,  	filemode_Read = 0x02,  	filemode_ReadWrite = 0x03, -	filemode_WriteAppend = 0x05, +	filemode_WriteAppend = 0x05  };  enum SeekMode {  	seekmode_Start = 0,  	seekmode_Current = 1, -	seekmode_End = 2, +	seekmode_End = 2  };  struct StreamResult { diff --git a/engines/gargoyle/window_text_buffer.cpp b/engines/gargoyle/window_text_buffer.cpp index ca891672ab..5cf8f34da5 100644 --- a/engines/gargoyle/window_text_buffer.cpp +++ b/engines/gargoyle/window_text_buffer.cpp @@ -43,7 +43,7 @@ TextBufferWindow::TextBufferWindow(Windows *windows, uint32 rock) : Window(windo  	_radjn(0), _numChars(0), _chars(nullptr), _attrs(nullptr),  	_spaced(0), _dashed(0), _copyBuf(0), _copyPos(0) {  	_type = wintype_TextBuffer; -	Common::fill(&_history[0], &_history[HISTORYLEN], nullptr); +	Common::fill(&_history[0], &_history[HISTORYLEN], (glui32 *)nullptr);  	_lines.resize(SCROLLBACK);  	_chars = _lines[0]._chars; @@ -908,7 +908,7 @@ void TextBufferWindow::redraw() {  					for (tsc = 0; tsc < linelen; tsc++) {  						tsw = calcWidth(ln->_chars, ln->_attrs, 0, tsc, spw) / GLI_SUBPIX;  						if (tsw + tx >= sx0 || -						        tsw + tx + GLI_SUBPIX >= sx0 && ln->_chars[tsc] != ' ') { +						        ((tsw + tx + GLI_SUBPIX) >= sx0 && ln->_chars[tsc] != ' ')) {  							lsc = tsc;  							selchar = true;  							break; | 
