[Scummvm-git-logs] scummvm master -> 71a741822bcc67ae70b7e1b882fd54df2b3ef47b

digitall 547637+digitall at users.noreply.github.com
Sun Mar 28 06:25:08 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
71a741822b ULTIMA: Fix GCC Incompatible Cast of Function Warnings


Commit: 71a741822bcc67ae70b7e1b882fd54df2b3ef47b
    https://github.com/scummvm/scummvm/commit/71a741822bcc67ae70b7e1b882fd54df2b3ef47b
Author: D G Turner (digitall at scummvm.org)
Date: 2021-03-28T07:23:26+01:00

Commit Message:
ULTIMA: Fix GCC Incompatible Cast of Function Warnings

These are emitted by -Wcast-function-type.

Thanks to dreammaster for advice on fixing this.

Changed paths:
    engines/ultima/shared/actions/huh.cpp
    engines/ultima/shared/actions/huh.h
    engines/ultima/shared/actions/pass.cpp
    engines/ultima/shared/actions/pass.h
    engines/ultima/shared/early/game.cpp
    engines/ultima/shared/early/game.h
    engines/ultima/shared/gfx/character_input.cpp
    engines/ultima/shared/gfx/character_input.h
    engines/ultima/shared/gfx/info.cpp
    engines/ultima/shared/gfx/info.h
    engines/ultima/shared/gfx/popup.cpp
    engines/ultima/shared/gfx/popup.h
    engines/ultima/shared/gfx/text_input.cpp
    engines/ultima/shared/gfx/text_input.h
    engines/ultima/shared/gfx/visual_item.cpp
    engines/ultima/shared/gfx/visual_item.h
    engines/ultima/ultima1/actions/attack.cpp
    engines/ultima/ultima1/actions/attack.h
    engines/ultima/ultima1/actions/map_action.h
    engines/ultima/ultima1/actions/move.cpp
    engines/ultima/ultima1/actions/move.h
    engines/ultima/ultima1/actions/quit.cpp
    engines/ultima/ultima1/actions/quit.h
    engines/ultima/ultima1/actions/ready.cpp
    engines/ultima/ultima1/actions/ready.h
    engines/ultima/ultima1/actions/stats.cpp
    engines/ultima/ultima1/actions/stats.h
    engines/ultima/ultima1/spells/kill_magic_missile.cpp
    engines/ultima/ultima1/spells/kill_magic_missile.h
    engines/ultima/ultima1/u1dialogs/armoury.cpp
    engines/ultima/ultima1/u1dialogs/armoury.h
    engines/ultima/ultima1/u1dialogs/buy_sell_dialog.cpp
    engines/ultima/ultima1/u1dialogs/buy_sell_dialog.h
    engines/ultima/ultima1/u1dialogs/combat.cpp
    engines/ultima/ultima1/u1dialogs/combat.h
    engines/ultima/ultima1/u1dialogs/drop.cpp
    engines/ultima/ultima1/u1dialogs/drop.h
    engines/ultima/ultima1/u1dialogs/grocery.cpp
    engines/ultima/ultima1/u1dialogs/grocery.h
    engines/ultima/ultima1/u1dialogs/king.cpp
    engines/ultima/ultima1/u1dialogs/king.h
    engines/ultima/ultima1/u1dialogs/magic.cpp
    engines/ultima/ultima1/u1dialogs/magic.h
    engines/ultima/ultima1/u1dialogs/ready.cpp
    engines/ultima/ultima1/u1dialogs/ready.h
    engines/ultima/ultima1/u1dialogs/stats.cpp
    engines/ultima/ultima1/u1dialogs/stats.h
    engines/ultima/ultima1/u1dialogs/tavern.cpp
    engines/ultima/ultima1/u1dialogs/tavern.h
    engines/ultima/ultima1/u1dialogs/transports.cpp
    engines/ultima/ultima1/u1dialogs/transports.h
    engines/ultima/ultima1/u1dialogs/weaponry.cpp
    engines/ultima/ultima1/u1dialogs/weaponry.h
    engines/ultima/ultima1/u1gfx/sprites.cpp
    engines/ultima/ultima1/u1gfx/sprites.h
    engines/ultima/ultima1/u1gfx/status.cpp
    engines/ultima/ultima1/u1gfx/status.h
    engines/ultima/ultima1/u1gfx/view_char_gen.cpp
    engines/ultima/ultima1/u1gfx/view_char_gen.h
    engines/ultima/ultima1/u1gfx/view_game.cpp
    engines/ultima/ultima1/u1gfx/view_game.h
    engines/ultima/ultima1/u1gfx/view_title.cpp
    engines/ultima/ultima1/u1gfx/view_title.h
    engines/ultima/ultima1/u1gfx/viewport_map.cpp
    engines/ultima/ultima1/u1gfx/viewport_map.h
    engines/ultima/ultima1/u6gfx/game_view.cpp
    engines/ultima/ultima1/u6gfx/game_view.h


diff --git a/engines/ultima/shared/actions/huh.cpp b/engines/ultima/shared/actions/huh.cpp
index 3d6b06ce3a..3e62b9c881 100644
--- a/engines/ultima/shared/actions/huh.cpp
+++ b/engines/ultima/shared/actions/huh.cpp
@@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(Huh, Action)
 	ON_MESSAGE(HuhMsg)
 END_MESSAGE_MAP()
 
-bool Huh::HuhMsg(CHuhMsg &msg) {
+bool Huh::HuhMsg(CHuhMsg *msg) {
 	addInfoMsg(_text);
 	endOfTurn();
 	return true;
diff --git a/engines/ultima/shared/actions/huh.h b/engines/ultima/shared/actions/huh.h
index 65898b302f..09a1818174 100644
--- a/engines/ultima/shared/actions/huh.h
+++ b/engines/ultima/shared/actions/huh.h
@@ -32,7 +32,7 @@ namespace Actions {
 
 class Huh : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool HuhMsg(CHuhMsg &msg);
+	bool HuhMsg(CHuhMsg *msg);
 private:
 	const char *&_text;
 public:
diff --git a/engines/ultima/shared/actions/pass.cpp b/engines/ultima/shared/actions/pass.cpp
index d3286fa0a1..db3add43fd 100644
--- a/engines/ultima/shared/actions/pass.cpp
+++ b/engines/ultima/shared/actions/pass.cpp
@@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(Pass, Action)
 	ON_MESSAGE(PassMsg)
 END_MESSAGE_MAP()
 
-bool Pass::PassMsg(CPassMsg &msg) {
+bool Pass::PassMsg(CPassMsg *msg) {
 	addInfoMsg(_text);
 	endOfTurn();
 	return true;
diff --git a/engines/ultima/shared/actions/pass.h b/engines/ultima/shared/actions/pass.h
index 6c8352e3e0..a74a999694 100644
--- a/engines/ultima/shared/actions/pass.h
+++ b/engines/ultima/shared/actions/pass.h
@@ -32,7 +32,7 @@ namespace Actions {
 
 class Pass : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool PassMsg(CPassMsg &msg);
+	bool PassMsg(CPassMsg *msg);
 private:
 	const char *&_text;
 public:
diff --git a/engines/ultima/shared/early/game.cpp b/engines/ultima/shared/early/game.cpp
index 8cb28e6c87..e580d770b1 100644
--- a/engines/ultima/shared/early/game.cpp
+++ b/engines/ultima/shared/early/game.cpp
@@ -126,7 +126,7 @@ void Game::synchronize(Common::Serializer &s) {
 	_map->synchronize(s);
 }
 
-bool Game::EndOfTurnMsg(CEndOfTurnMsg &msg) {
+bool Game::EndOfTurnMsg(CEndOfTurnMsg *msg) {
 	// Update things on the map
 	_map->update();
 	return false;
diff --git a/engines/ultima/shared/early/game.h b/engines/ultima/shared/early/game.h
index 327502f155..8ad344b304 100644
--- a/engines/ultima/shared/early/game.h
+++ b/engines/ultima/shared/early/game.h
@@ -42,7 +42,7 @@ class Map;
  */
 class Game : public GameBase {
 	DECLARE_MESSAGE_MAP;
-	bool EndOfTurnMsg(CEndOfTurnMsg &msg);
+	bool EndOfTurnMsg(CEndOfTurnMsg *msg);
 protected:
 	GameView *_gameView;
 	FontResources *_fontResources;
diff --git a/engines/ultima/shared/gfx/character_input.cpp b/engines/ultima/shared/gfx/character_input.cpp
index b8d6c761c1..15e0300b4e 100644
--- a/engines/ultima/shared/gfx/character_input.cpp
+++ b/engines/ultima/shared/gfx/character_input.cpp
@@ -42,10 +42,10 @@ void CharacterInput::show(const Point &pt, byte color, TreeItem *respondTo) {
 	_game->_textCursor->setVisible(true);
 }
 
-bool CharacterInput::KeypressMsg(CKeypressMsg &msg) {
+bool CharacterInput::KeypressMsg(CKeypressMsg *msg) {
 	hide();
 
-	CCharacterInputMsg inputMsg(msg._keyState);
+	CCharacterInputMsg inputMsg(msg->_keyState);
 	inputMsg.execute(_respondTo);
 
 	return true;
diff --git a/engines/ultima/shared/gfx/character_input.h b/engines/ultima/shared/gfx/character_input.h
index 97ea4b3ef2..618a51142b 100644
--- a/engines/ultima/shared/gfx/character_input.h
+++ b/engines/ultima/shared/gfx/character_input.h
@@ -34,7 +34,7 @@ namespace Gfx {
  */
 class CharacterInput : public Popup {
 	DECLARE_MESSAGE_MAP;
-	bool KeypressMsg(CKeypressMsg &msg);
+	bool KeypressMsg(CKeypressMsg *msg);
 private:
 	byte _color;
 public:
diff --git a/engines/ultima/shared/gfx/info.cpp b/engines/ultima/shared/gfx/info.cpp
index 517a08b299..cb6e11e205 100644
--- a/engines/ultima/shared/gfx/info.cpp
+++ b/engines/ultima/shared/gfx/info.cpp
@@ -50,11 +50,11 @@ Info::~Info() {
 	delete _textInput;
 }
 
-bool Info::InfoMsg(CInfoMsg &msg) {
+bool Info::InfoMsg(CInfoMsg *msg) {
 	// Iterate through text, dealing with lines one at a time
-	StringArray lines = String(msg._text).split("\r\n");
+	StringArray lines = String(msg->_text).split("\r\n");
 
-	if (!_lines.empty() && msg._replaceLine)
+	if (!_lines.empty() && msg->_replaceLine)
 		_lines.back() = _lines.back().firstChar();
 
 	for (uint idx = 0; idx < lines.size(); ++idx) {
@@ -65,7 +65,7 @@ bool Info::InfoMsg(CInfoMsg &msg) {
 	}
 
 	// Add newline if necessary
-	if (msg._newLine)
+	if (msg->_newLine)
 		_lines.push_back(" ");
 
 	setDirty();
@@ -78,7 +78,7 @@ bool Info::InfoMsg(CInfoMsg &msg) {
 	return true;
 }
 
-bool Info::InfoGetCommandKeypress(CInfoGetCommandKeypress &msg) {
+bool Info::InfoGetCommandKeypress(CInfoGetCommandKeypress *msg) {
 	if (_lines.empty() || _lines.back() != " ")
 		_lines.push_back("");
 	_lines.back() = PROMPT_CHAR;
@@ -87,34 +87,34 @@ bool Info::InfoGetCommandKeypress(CInfoGetCommandKeypress &msg) {
 	textCursor->setVisible(true);
 	textCursor->setPosition(Point(8, _bounds.bottom - 8));
 
-	_commandRespondTo = msg._responder;
+	_commandRespondTo = msg->_responder;
 	return true;
 }
 
-bool Info::InfoGetKeypress(CInfoGetKeypress &msg) {
+bool Info::InfoGetKeypress(CInfoGetKeypress *msg) {
 	Game *game = getGame();
 	Point pt(_bounds.left + _lines.back().size() * 8, _bounds.bottom - 8);
-	_characterInput->show(pt, game->_textColor, msg._responder);
+	_characterInput->show(pt, game->_textColor, msg->_responder);
 
 	return true;
 }
 
-bool Info::InfoGetInput(CInfoGetInput &msg) {
+bool Info::InfoGetInput(CInfoGetInput *msg) {
 	Game *game = getGame();
 	Point pt(_bounds.left + _lines.back().size() * 8, _bounds.bottom - 8);
-	_textInput->show(pt, msg._isNumeric, msg._maxCharacters, game->_textColor, msg._responder);
+	_textInput->show(pt, msg->_isNumeric, msg->_maxCharacters, game->_textColor, msg->_responder);
 
 	return true;
 }
 
-bool Info::KeypressMsg(CKeypressMsg &msg) {
+bool Info::KeypressMsg(CKeypressMsg *msg) {
 	// If waiting for a command, dispatch the key to the respond, and hide the cursor
 	if (_commandRespondTo) {
 		TreeItem *target = _commandRespondTo;
 		_commandRespondTo = nullptr;
 
 		getGame()->_textCursor->setVisible(false);
-		CCharacterInputMsg cMsg(msg._keyState);
+		CCharacterInputMsg cMsg(msg->_keyState);
 		cMsg.execute(target);
 		return true;
 	}
diff --git a/engines/ultima/shared/gfx/info.h b/engines/ultima/shared/gfx/info.h
index 6505ace74a..6e92285dac 100644
--- a/engines/ultima/shared/gfx/info.h
+++ b/engines/ultima/shared/gfx/info.h
@@ -41,11 +41,11 @@ using Shared::CKeypressMsg;
  */
 class Info : public Gfx::VisualItem {
 	DECLARE_MESSAGE_MAP;
-	bool InfoMsg(CInfoMsg &msg);
-	bool InfoGetCommandKeypress(CInfoGetCommandKeypress &msg);
-	bool InfoGetKeypress(CInfoGetKeypress &msg);
-	bool InfoGetInput(CInfoGetInput &msg);
-	bool KeypressMsg(CKeypressMsg &msg);
+	bool InfoMsg(CInfoMsg *msg);
+	bool InfoGetCommandKeypress(CInfoGetCommandKeypress *msg);
+	bool InfoGetKeypress(CInfoGetKeypress *msg);
+	bool InfoGetInput(CInfoGetInput *msg);
+	bool KeypressMsg(CKeypressMsg *msg);
 private:
 	Common::StringArray _lines;
 	Gfx::TextInput *_textInput;
diff --git a/engines/ultima/shared/gfx/popup.cpp b/engines/ultima/shared/gfx/popup.cpp
index c0b2ce97ee..323f51ffa6 100644
--- a/engines/ultima/shared/gfx/popup.cpp
+++ b/engines/ultima/shared/gfx/popup.cpp
@@ -60,7 +60,7 @@ void Popup::hide() {
 	_parentView->setDirty();
 }
 
-bool Popup::ShowMsg(CShowMsg &msg) {
+bool Popup::ShowMsg(CShowMsg *msg) {
 	CPopupShownMsg shownMsg(this);
 	shownMsg.execute(_respondTo, nullptr, 0);
 	return true;
diff --git a/engines/ultima/shared/gfx/popup.h b/engines/ultima/shared/gfx/popup.h
index 951defa472..757cd0942d 100644
--- a/engines/ultima/shared/gfx/popup.h
+++ b/engines/ultima/shared/gfx/popup.h
@@ -38,7 +38,7 @@ namespace Gfx {
  */
 class Popup : public VisualItem {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
 protected:
 	GameBase *_game;
 	VisualItem *_parentView;
diff --git a/engines/ultima/shared/gfx/text_input.cpp b/engines/ultima/shared/gfx/text_input.cpp
index 3c3f3db677..42069981a8 100644
--- a/engines/ultima/shared/gfx/text_input.cpp
+++ b/engines/ultima/shared/gfx/text_input.cpp
@@ -60,28 +60,28 @@ void TextInput::draw() {
 	s.writeString(text, TextPoint(0, 0), _color);
 }
 
-bool TextInput::KeypressMsg(CKeypressMsg &msg) {
-	uint16 c = msg._keyState.ascii;
+bool TextInput::KeypressMsg(CKeypressMsg *msg) {
+	uint16 c = msg->_keyState.ascii;
 	//TreeItem *respondTo = _respondTo;
 
 	if (c >= ' ' && c <= 0x7f) {
 		// Printable character
 		if (_text.size() < _maxCharacters && (!_isNumeric || (c >= '0' && c <= '9'))) {
-			_text += msg._keyState.ascii;
+			_text += msg->_keyState.ascii;
 			setDirty();
 		}
-	} else if (msg._keyState.keycode == Common::KEYCODE_BACKSPACE || msg._keyState.keycode == Common::KEYCODE_LEFT) {
+	} else if (msg->_keyState.keycode == Common::KEYCODE_BACKSPACE || msg->_keyState.keycode == Common::KEYCODE_LEFT) {
 		if (!_text.empty()) {
 			_text.deleteLastChar();
 			setDirty();
 		}
-	} else if (msg._keyState.keycode == Common::KEYCODE_RETURN || msg._keyState.keycode == Common::KEYCODE_KP_ENTER) {
+	} else if (msg->_keyState.keycode == Common::KEYCODE_RETURN || msg->_keyState.keycode == Common::KEYCODE_KP_ENTER) {
 		_game->_textCursor->setVisible(false);
 		hide();
 
 		CTextInputMsg inputMsg(_text, false);
 		inputMsg.execute(_respondTo);
-	} else if (msg._keyState.keycode == Common::KEYCODE_ESCAPE) {
+	} else if (msg->_keyState.keycode == Common::KEYCODE_ESCAPE) {
 		_game->_textCursor->setVisible(false);
 		hide();
 
diff --git a/engines/ultima/shared/gfx/text_input.h b/engines/ultima/shared/gfx/text_input.h
index 31632be209..39fb4ba3fe 100644
--- a/engines/ultima/shared/gfx/text_input.h
+++ b/engines/ultima/shared/gfx/text_input.h
@@ -34,7 +34,7 @@ namespace Gfx {
  */
 class TextInput : public Popup {
 	DECLARE_MESSAGE_MAP;
-	bool KeypressMsg(CKeypressMsg &msg);
+	bool KeypressMsg(CKeypressMsg *msg);
 private:
 	bool _isNumeric;
 	size_t _maxCharacters;
diff --git a/engines/ultima/shared/gfx/visual_item.cpp b/engines/ultima/shared/gfx/visual_item.cpp
index ae77bdf5f9..9a9314e40b 100644
--- a/engines/ultima/shared/gfx/visual_item.cpp
+++ b/engines/ultima/shared/gfx/visual_item.cpp
@@ -39,7 +39,7 @@ void VisualItem::init(TreeItem *parent) {
 		addUnder(parent);
 }
 
-bool VisualItem::ShowMsg(CShowMsg &msg) {
+bool VisualItem::ShowMsg(CShowMsg *msg) {
 	// When a view is shown, mark it to be redrawn
 	_isDirty = true;
 	//	Font *font = Font::getActiveFont();
@@ -48,7 +48,7 @@ bool VisualItem::ShowMsg(CShowMsg &msg) {
 	return false;
 }
 
-bool VisualItem::HideMsg(CHideMsg &msg) {
+bool VisualItem::HideMsg(CHideMsg *msg) {
 	// When view is hidden, mark it as not dirty
 	_isDirty = false;
 	return false;
diff --git a/engines/ultima/shared/gfx/visual_item.h b/engines/ultima/shared/gfx/visual_item.h
index 8960651881..e6468d1bad 100644
--- a/engines/ultima/shared/gfx/visual_item.h
+++ b/engines/ultima/shared/gfx/visual_item.h
@@ -40,8 +40,8 @@ class Popup;
 class VisualItem : public NamedItem {
 	friend class VisualSurface;
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool HideMsg(CHideMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool HideMsg(CHideMsg *msg);
 private:
 	/**
 	 * Common initialization method used by the constructors
diff --git a/engines/ultima/ultima1/actions/attack.cpp b/engines/ultima/ultima1/actions/attack.cpp
index f4d47e9077..a7ab3ae9af 100644
--- a/engines/ultima/ultima1/actions/attack.cpp
+++ b/engines/ultima/ultima1/actions/attack.cpp
@@ -34,9 +34,9 @@ BEGIN_MESSAGE_MAP(AttackFire, Action)
 	ON_MESSAGE(CharacterInputMsg)
 END_MESSAGE_MAP()
 
-bool AttackFire::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool AttackFire::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
-	Shared::Maps::Direction dir = Shared::Maps::MapWidget::directionFromKey(msg._keyState.keycode);
+	Shared::Maps::Direction dir = Shared::Maps::MapWidget::directionFromKey(msg->_keyState.keycode);
 
 	if (dir == Shared::Maps::DIR_NONE) {
 		addInfoMsg(game->_res->NOTHING);
@@ -57,14 +57,14 @@ BEGIN_MESSAGE_MAP(Attack, AttackFire)
 	ON_MESSAGE(CharacterInputMsg)
 END_MESSAGE_MAP()
 
-bool Attack::AttackMsg(CAttackMsg &msg) {
+bool Attack::AttackMsg(CAttackMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
 	Maps::Ultima1Map *map = static_cast<Maps::Ultima1Map *>(getMap());
 	const Shared::Character &c = *game->_party;
 	const Shared::Weapon &weapon = *c._weapons[c._equippedWeapon];
 
 	addInfoMsg(Common::String::format("%s %s", game->_res->ACTION_NAMES[0], weapon._shortName.c_str()), false);
-	
+
 	if (weapon._distance == 0) {
 		addInfoMsg("?");
 		game->playFX(1);
@@ -73,16 +73,16 @@ bool Attack::AttackMsg(CAttackMsg &msg) {
 		// In the dungeons, attacks always are straight ahead
 		addInfoMsg("");
 		doAttack(Shared::Maps::DIR_UP);
-	} else if (msg._direction == Shared::Maps::DIR_NONE) {
+	} else if (msg->_direction == Shared::Maps::DIR_NONE) {
 		// Prompt user for direction
 		addInfoMsg(": ", false);
 		Shared::CInfoGetKeypress keyMsg(this);
 		keyMsg.execute(getGame());
 	} else {
 		addInfoMsg(": ", false);
-		addInfoMsg(game->_res->DIRECTION_NAMES[(int)msg._direction - 1]);
+		addInfoMsg(game->_res->DIRECTION_NAMES[(int)msg->_direction - 1]);
 
-		getMap()->attack(msg._direction, 7);
+		getMap()->attack(msg->_direction, 7);
 	}
 
 	return true;
@@ -98,7 +98,7 @@ BEGIN_MESSAGE_MAP(Fire, AttackFire)
 	ON_MESSAGE(FireMsg)
 END_MESSAGE_MAP()
 
-bool Fire::FireMsg(CFireMsg &msg) {
+bool Fire::FireMsg(CFireMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
 	Maps::Ultima1Map *map = static_cast<Maps::Ultima1Map *>(getMap());
 	addInfoMsg(game->_res->ACTION_NAMES[5], false);
diff --git a/engines/ultima/ultima1/actions/attack.h b/engines/ultima/ultima1/actions/attack.h
index 3ae7736d40..b2ef9cf8fa 100644
--- a/engines/ultima/ultima1/actions/attack.h
+++ b/engines/ultima/ultima1/actions/attack.h
@@ -40,7 +40,7 @@ using Shared::CFireMsg;
  */
 class AttackFire : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
 protected:
 	/**
 	 * Do the attack in a given direction
@@ -61,7 +61,7 @@ public:
  */
 class Attack : public AttackFire {
 	DECLARE_MESSAGE_MAP;
-	bool AttackMsg(CAttackMsg &msg);
+	bool AttackMsg(CAttackMsg *msg);
 protected:
 	/**
 	 * Do the attack in a given direction
@@ -81,7 +81,7 @@ public:
  */
 class Fire : public AttackFire {
 	DECLARE_MESSAGE_MAP;
-	bool FireMsg(CFireMsg &msg);
+	bool FireMsg(CFireMsg *msg);
 protected:
 	/**
 	 * Do the attack in a given direction
diff --git a/engines/ultima/ultima1/actions/map_action.h b/engines/ultima/ultima1/actions/map_action.h
index 591bcc30c5..f083d96cb5 100644
--- a/engines/ultima/ultima1/actions/map_action.h
+++ b/engines/ultima/ultima1/actions/map_action.h
@@ -29,7 +29,7 @@ namespace Actions {
 
 #define MAP_ACTION(NAME, ACTION_NUM, MAP_METHOD) \
 	using Shared::C##NAME##Msg; \
-	class NAME : public Action { DECLARE_MESSAGE_MAP; bool NAME##Msg(C##NAME##Msg &msg) { \
+	class NAME : public Action { DECLARE_MESSAGE_MAP; bool NAME##Msg(C##NAME##Msg *msg) { \
 	addInfoMsg(getRes()->ACTION_NAMES[ACTION_NUM], false); \
 	getMap()->MAP_METHOD(); \
 	return true; } \
@@ -41,7 +41,7 @@ namespace Actions {
 
 #define MAP_ACTION_END_TURN(NAME, ACTION_NUM, MAP_METHOD) \
 	using Shared::C##NAME##Msg; \
-	class NAME : public Action { DECLARE_MESSAGE_MAP; bool NAME##Msg(C##NAME##Msg &msg) { \
+	class NAME : public Action { DECLARE_MESSAGE_MAP; bool NAME##Msg(C##NAME##Msg *msg) { \
 	addInfoMsg(getRes()->ACTION_NAMES[ACTION_NUM], false); \
 	getMap()->MAP_METHOD(); \
 	endOfTurn(); \
diff --git a/engines/ultima/ultima1/actions/move.cpp b/engines/ultima/ultima1/actions/move.cpp
index d4dfeb7751..333c71557e 100644
--- a/engines/ultima/ultima1/actions/move.cpp
+++ b/engines/ultima/ultima1/actions/move.cpp
@@ -34,11 +34,11 @@ BEGIN_MESSAGE_MAP(Move, Action)
 	ON_MESSAGE(MoveMsg)
 END_MESSAGE_MAP()
 
-bool Move::MoveMsg(CMoveMsg &msg) {
+bool Move::MoveMsg(CMoveMsg *msg) {
 	Maps::Ultima1Map *map = getMap();
 	
 	if (map->_mapType == Maps::MAP_DUNGEON) {
-		switch (msg._direction) {
+		switch (msg->_direction) {
 		case Shared::Maps::DIR_LEFT:
 			dungeonTurnLeft();
 			break;
@@ -58,7 +58,7 @@ bool Move::MoveMsg(CMoveMsg &msg) {
 
 		// Figure out the new position
 		Point delta;
-		switch (msg._direction) {
+		switch (msg->_direction) {
 		case Shared::Maps::DIR_WEST:
 			delta = Point(-1, 0);
 			break;
@@ -81,7 +81,7 @@ bool Move::MoveMsg(CMoveMsg &msg) {
 
 			// Move to the new position
 			player->moveTo(newPos);
-			addInfoMsg(getRes()->DIRECTION_NAMES[msg._direction - 1]);
+			addInfoMsg(getRes()->DIRECTION_NAMES[msg->_direction - 1]);
 		} else {
 			// Nope, so show a blocked message
 			addInfoMsg(getRes()->BLOCKED);
diff --git a/engines/ultima/ultima1/actions/move.h b/engines/ultima/ultima1/actions/move.h
index 1969e1dfb0..834cd2746a 100644
--- a/engines/ultima/ultima1/actions/move.h
+++ b/engines/ultima/ultima1/actions/move.h
@@ -34,7 +34,7 @@ using Shared::CMoveMsg;
 
 class Move : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool MoveMsg(CMoveMsg &msg);
+	bool MoveMsg(CMoveMsg *msg);
 private:
 	/**
 	 * Turn left
diff --git a/engines/ultima/ultima1/actions/quit.cpp b/engines/ultima/ultima1/actions/quit.cpp
index d67fe6f8b6..2e73708b26 100644
--- a/engines/ultima/ultima1/actions/quit.cpp
+++ b/engines/ultima/ultima1/actions/quit.cpp
@@ -34,7 +34,7 @@ BEGIN_MESSAGE_MAP(Quit, Action)
 	ON_MESSAGE(QuitMsg)
 END_MESSAGE_MAP()
 
-bool Quit::QuitMsg(CQuitMsg &msg) {
+bool Quit::QuitMsg(CQuitMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
 	addInfoMsg(game->_res->ACTION_NAMES[16]);
 	g_vm->saveGameDialog();
diff --git a/engines/ultima/ultima1/actions/quit.h b/engines/ultima/ultima1/actions/quit.h
index 6670c0ae4c..c367abcda5 100644
--- a/engines/ultima/ultima1/actions/quit.h
+++ b/engines/ultima/ultima1/actions/quit.h
@@ -34,7 +34,7 @@ using Shared::CQuitMsg;
 
 class Quit : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool QuitMsg(CQuitMsg &msg);
+	bool QuitMsg(CQuitMsg *msg);
 public:
 	CLASSDEF;
 
diff --git a/engines/ultima/ultima1/actions/ready.cpp b/engines/ultima/ultima1/actions/ready.cpp
index b23376483b..0042166f8f 100644
--- a/engines/ultima/ultima1/actions/ready.cpp
+++ b/engines/ultima/ultima1/actions/ready.cpp
@@ -33,7 +33,7 @@ BEGIN_MESSAGE_MAP(Ready, Action)
 	ON_MESSAGE(ReadyMsg)
 END_MESSAGE_MAP()
 
-bool Ready::ReadyMsg(CReadyMsg &msg) {
+bool Ready::ReadyMsg(CReadyMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
 	addInfoMsg(game->_res->ACTION_NAMES[17], false);
 
diff --git a/engines/ultima/ultima1/actions/ready.h b/engines/ultima/ultima1/actions/ready.h
index 60964e8272..b1e6d3b28d 100644
--- a/engines/ultima/ultima1/actions/ready.h
+++ b/engines/ultima/ultima1/actions/ready.h
@@ -34,7 +34,7 @@ using Shared::CReadyMsg;
 
 class Ready : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool ReadyMsg(CReadyMsg &msg);
+	bool ReadyMsg(CReadyMsg *msg);
 public:
 	CLASSDEF;
 
diff --git a/engines/ultima/ultima1/actions/stats.cpp b/engines/ultima/ultima1/actions/stats.cpp
index 349a1dc010..0ef76a85c8 100644
--- a/engines/ultima/ultima1/actions/stats.cpp
+++ b/engines/ultima/ultima1/actions/stats.cpp
@@ -33,7 +33,7 @@ BEGIN_MESSAGE_MAP(Stats, Action)
 	ON_MESSAGE(StatsMsg)
 END_MESSAGE_MAP()
 
-bool Stats::StatsMsg(CStatsMsg &msg) {
+bool Stats::StatsMsg(CStatsMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
 	addInfoMsg(game->_res->ACTION_NAMES[25]);
 
diff --git a/engines/ultima/ultima1/actions/stats.h b/engines/ultima/ultima1/actions/stats.h
index a76760588c..1ad50f82b7 100644
--- a/engines/ultima/ultima1/actions/stats.h
+++ b/engines/ultima/ultima1/actions/stats.h
@@ -34,7 +34,7 @@ using Shared::CStatsMsg;
 
 class Stats : public Action {
 	DECLARE_MESSAGE_MAP;
-	bool StatsMsg(CStatsMsg &msg);
+	bool StatsMsg(CStatsMsg *msg);
 public:
 	CLASSDEF;
 
diff --git a/engines/ultima/ultima1/spells/kill_magic_missile.cpp b/engines/ultima/ultima1/spells/kill_magic_missile.cpp
index 9a32a6ee91..2275919bea 100644
--- a/engines/ultima/ultima1/spells/kill_magic_missile.cpp
+++ b/engines/ultima/ultima1/spells/kill_magic_missile.cpp
@@ -43,8 +43,8 @@ void KillMagicMIssile::cast(Maps::MapBase *map) {
 	keyMsg.execute(_game);
 }
 
-bool KillMagicMIssile::CharacterInputMsg(CCharacterInputMsg &msg) {
-	Shared::Maps::Direction dir = Shared::Maps::MapWidget::directionFromKey(msg._keyState.keycode);
+bool KillMagicMIssile::CharacterInputMsg(CCharacterInputMsg *msg) {
+	Shared::Maps::Direction dir = Shared::Maps::MapWidget::directionFromKey(msg->_keyState.keycode);
 	Character &c = *static_cast<Party *>(_game->_party);
 
 	if (dir == Shared::Maps::DIR_NONE) {
diff --git a/engines/ultima/ultima1/spells/kill_magic_missile.h b/engines/ultima/ultima1/spells/kill_magic_missile.h
index 2a39225e9b..274e14e27e 100644
--- a/engines/ultima/ultima1/spells/kill_magic_missile.h
+++ b/engines/ultima/ultima1/spells/kill_magic_missile.h
@@ -37,7 +37,7 @@ using Shared::CCharacterInputMsg;
  */
 class KillMagicMIssile : public Spell {
 	DECLARE_MESSAGE_MAP;
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
 public:
 	CLASSDEF;
 
diff --git a/engines/ultima/ultima1/u1dialogs/armoury.cpp b/engines/ultima/ultima1/u1dialogs/armoury.cpp
index 52e9d9fbf0..b1ff5dd98c 100644
--- a/engines/ultima/ultima1/u1dialogs/armoury.cpp
+++ b/engines/ultima/ultima1/u1dialogs/armoury.cpp
@@ -129,13 +129,13 @@ void Armoury::drawSell() {
 	}
 }
 
-bool Armoury::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Armoury::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
 
 	if (_mode == BUY) {
-		if (msg._keyState.keycode >= (int)(Common::KEYCODE_a + _startIndex) &&
-			msg._keyState.keycode <= (int)(Common::KEYCODE_a + _endIndex)) {
-			uint armourNum = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= (int)(Common::KEYCODE_a + _startIndex) &&
+			msg->_keyState.keycode <= (int)(Common::KEYCODE_a + _endIndex)) {
+			uint armourNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			Armour &armour = *static_cast<Armour *>(c._armour[armourNum]);
 
 			if (armour.getBuyCost() <= c._coins) {
@@ -155,9 +155,9 @@ bool Armoury::CharacterInputMsg(CCharacterInputMsg &msg) {
 		nothing();
 		return true;
 	} else if (_mode == SELL && !c._armour.hasNothing()) {
-		if (msg._keyState.keycode >= Common::KEYCODE_b &&
-			msg._keyState.keycode < (Common::KEYCODE_a + (int)c._armour.size())) {
-			uint armourNum = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= Common::KEYCODE_b &&
+			msg->_keyState.keycode < (Common::KEYCODE_a + (int)c._armour.size())) {
+			uint armourNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			Armour &armour = *static_cast<Armour *>(c._armour[armourNum]);
 
 			if (!armour.empty()) {
diff --git a/engines/ultima/ultima1/u1dialogs/armoury.h b/engines/ultima/ultima1/u1dialogs/armoury.h
index deab893bc0..794c741e5b 100644
--- a/engines/ultima/ultima1/u1dialogs/armoury.h
+++ b/engines/ultima/ultima1/u1dialogs/armoury.h
@@ -34,7 +34,7 @@ namespace U1Dialogs {
  */
 class Armoury : public BuySellDialog {
 	DECLARE_MESSAGE_MAP;
-	bool CharacterInputMsg(CCharacterInputMsg &msg) override;
+	bool CharacterInputMsg(CCharacterInputMsg *msg) override;
 private:
 //	uint _armouryNum;
 	uint _startIndex, _endIndex;
diff --git a/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.cpp b/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.cpp
index d053805f31..6931a6aeba 100644
--- a/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.cpp
+++ b/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.cpp
@@ -42,13 +42,13 @@ BuySellDialog::BuySellDialog(Ultima1Game *game, const Common::String &title) :
 	_bounds = Rect(31, 23, 287, 127);
 }
 
-bool BuySellDialog::ShowMsg(CShowMsg &msg) {
+bool BuySellDialog::ShowMsg(CShowMsg *msg) {
 	addInfoMsg(_game->_res->BUY_SELL, false);
 	getKeypress();
 	return true;
 }
 
-bool BuySellDialog::FrameMsg(CFrameMsg &msg) {
+bool BuySellDialog::FrameMsg(CFrameMsg *msg) {
 	if (_closeCounter > 0 && --_closeCounter == 0) {
 		_game->endOfTurn();
 		hide();
@@ -57,12 +57,12 @@ bool BuySellDialog::FrameMsg(CFrameMsg &msg) {
 	return true;
 }
 
-bool BuySellDialog::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool BuySellDialog::CharacterInputMsg(CCharacterInputMsg *msg) {
 	switch (_mode) {
 	case SELECT:
-		if (msg._keyState.keycode == Common::KEYCODE_b)
+		if (msg->_keyState.keycode == Common::KEYCODE_b)
 			setMode(BUY);
-		else if (msg._keyState.keycode == Common::KEYCODE_s)
+		else if (msg->_keyState.keycode == Common::KEYCODE_s)
 			setMode(SELL);
 		else
 			nothing();
diff --git a/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.h b/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.h
index 85a975046a..1670c2b4d5 100644
--- a/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.h
+++ b/engines/ultima/ultima1/u1dialogs/buy_sell_dialog.h
@@ -43,9 +43,9 @@ using Shared::CCharacterInputMsg;
   */
 class BuySellDialog : public Dialog {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool FrameMsg(CFrameMsg &msg);
-	virtual bool CharacterInputMsg(CCharacterInputMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool FrameMsg(CFrameMsg *msg);
+	virtual bool CharacterInputMsg(CCharacterInputMsg *msg);
 private:
 	Shared::Gfx::CharacterInput _charInput;
 protected:
diff --git a/engines/ultima/ultima1/u1dialogs/combat.cpp b/engines/ultima/ultima1/u1dialogs/combat.cpp
index 2c8cdf5f0f..1409cc2ff1 100644
--- a/engines/ultima/ultima1/u1dialogs/combat.cpp
+++ b/engines/ultima/ultima1/u1dialogs/combat.cpp
@@ -39,9 +39,9 @@ Combat::Combat(Ultima1Game *game, Shared::Maps::Direction direction, int weaponT
 	const Common::String weaponName) : FullScreenDialog(game), _direction(direction) {
 }
 
-bool Combat::KeypressMsg(CKeypressMsg &msg) {
+bool Combat::KeypressMsg(CKeypressMsg *msg) {
 	if (_direction == Shared::Maps::DIR_NONE) {
-		switch (msg._keyState.keycode) {
+		switch (msg->_keyState.keycode) {
 		case Common::KEYCODE_LEFT:
 		case Common::KEYCODE_KP4:
 			_direction = Shared::Maps::DIR_LEFT;
diff --git a/engines/ultima/ultima1/u1dialogs/combat.h b/engines/ultima/ultima1/u1dialogs/combat.h
index 2fa12d7d89..26dbfef0ad 100644
--- a/engines/ultima/ultima1/u1dialogs/combat.h
+++ b/engines/ultima/ultima1/u1dialogs/combat.h
@@ -37,7 +37,7 @@ using Shared::CKeypressMsg;
  */
 class Combat : public FullScreenDialog {
 	DECLARE_MESSAGE_MAP;
-	bool KeypressMsg(CKeypressMsg &msg);
+	bool KeypressMsg(CKeypressMsg *msg);
 private:
 	Common::String _weaponName;
 	int _direction;
diff --git a/engines/ultima/ultima1/u1dialogs/drop.cpp b/engines/ultima/ultima1/u1dialogs/drop.cpp
index 704a4077e1..7419d8c715 100644
--- a/engines/ultima/ultima1/u1dialogs/drop.cpp
+++ b/engines/ultima/ultima1/u1dialogs/drop.cpp
@@ -39,18 +39,18 @@ END_MESSAGE_MAP()
 Drop::Drop(Ultima1Game *game) : FullScreenDialog(game), _mode(SELECT) {
 }
 
-bool Drop::ShowMsg(CShowMsg &msg) {
+bool Drop::ShowMsg(CShowMsg *msg) {
 	addInfoMsg(_game->_res->DROP_PENCE_WEAPON_armour, false);
 	getKeypress();
 	return true;
 }
 
-bool Drop::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Drop::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
 
 	switch (_mode) {
 	case SELECT:
-		switch (msg._keyState.keycode) {
+		switch (msg->_keyState.keycode) {
 		case Common::KEYCODE_p:
 			setMode(DROP_PENCE);
 			break;
@@ -67,10 +67,10 @@ bool Drop::CharacterInputMsg(CCharacterInputMsg &msg) {
 		break;
 
 	case DROP_WEAPON:
-		if (msg._keyState.keycode >= Common::KEYCODE_b && msg._keyState.keycode < (Common::KEYCODE_b + (int)c._weapons.size())
-			&& !c._weapons[msg._keyState.keycode - Common::KEYCODE_a]->empty()) {
+		if (msg->_keyState.keycode >= Common::KEYCODE_b && msg->_keyState.keycode < (Common::KEYCODE_b + (int)c._weapons.size())
+			&& !c._weapons[msg->_keyState.keycode - Common::KEYCODE_a]->empty()) {
 			// Drop the weapon
-			int weaponNum = msg._keyState.keycode - Common::KEYCODE_a;
+			int weaponNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			if (c._weapons[weaponNum]->decrQuantity() && c._equippedWeapon == weaponNum)
 				c.removeWeapon();
 
@@ -83,10 +83,10 @@ bool Drop::CharacterInputMsg(CCharacterInputMsg &msg) {
 		break;
 
 	case DROP_armour:
-		if (msg._keyState.keycode >= Common::KEYCODE_b && msg._keyState.keycode < (Common::KEYCODE_b + (int)c._armour.size())
-			&& c._armour[msg._keyState.keycode - Common::KEYCODE_a]->_quantity > 0) {
+		if (msg->_keyState.keycode >= Common::KEYCODE_b && msg->_keyState.keycode < (Common::KEYCODE_b + (int)c._armour.size())
+			&& c._armour[msg->_keyState.keycode - Common::KEYCODE_a]->_quantity > 0) {
 			// Drop the armor
-			int armorNum = msg._keyState.keycode - Common::KEYCODE_a;
+			int armorNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			if (c._armour[armorNum]->decrQuantity() && c._equippedArmour == armorNum)
 				c.removeArmour();
 
@@ -105,15 +105,15 @@ bool Drop::CharacterInputMsg(CCharacterInputMsg &msg) {
 	return true;
 }
 
-bool Drop::TextInputMsg(CTextInputMsg &msg) {
+bool Drop::TextInputMsg(CTextInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
 	assert(_mode == DROP_PENCE);
 	Ultima1Game *game = _game;
 	Maps::Ultima1Map *map = getMap();
 
-	uint amount = atoi(msg._text.c_str());
+	uint amount = atoi(msg->_text.c_str());
 
-	if (msg._escaped || !amount) {
+	if (msg->_escaped || !amount) {
 		none();
 
 	} else {
diff --git a/engines/ultima/ultima1/u1dialogs/drop.h b/engines/ultima/ultima1/u1dialogs/drop.h
index ebc9ce0970..5182e42906 100644
--- a/engines/ultima/ultima1/u1dialogs/drop.h
+++ b/engines/ultima/ultima1/u1dialogs/drop.h
@@ -39,9 +39,9 @@ using Shared::CTextInputMsg;
  */
 class Drop : public FullScreenDialog {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
-	bool TextInputMsg(CTextInputMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
+	bool TextInputMsg(CTextInputMsg *msg);
 
 	enum Mode { SELECT, DROP_PENCE, DROP_WEAPON, DROP_armour };
 private:
diff --git a/engines/ultima/ultima1/u1dialogs/grocery.cpp b/engines/ultima/ultima1/u1dialogs/grocery.cpp
index 580db9975a..8ef43d3243 100644
--- a/engines/ultima/ultima1/u1dialogs/grocery.cpp
+++ b/engines/ultima/ultima1/u1dialogs/grocery.cpp
@@ -84,18 +84,18 @@ void Grocery::draw() {
 	}
 }
 
-bool Grocery::TextInputMsg(CTextInputMsg &msg) {
+bool Grocery::TextInputMsg(CTextInputMsg *msg) {
 	assert(_mode == BUY);
 	Shared::Character &c = *_game->_party;
-	uint amount = atoi(msg._text.c_str());
+	uint amount = atoi(msg->_text.c_str());
 	uint cost = amount * _costPerPack;
 
-	if (msg._escaped || !amount) {
+	if (msg->_escaped || !amount) {
 		nothing();
 	} else if (cost > c._coins) {
 		cantAfford();
 	} else {
-		addInfoMsg(msg._text);
+		addInfoMsg(msg->_text);
 
 		c._coins -= cost;
 		c._food += amount * 10;
diff --git a/engines/ultima/ultima1/u1dialogs/grocery.h b/engines/ultima/ultima1/u1dialogs/grocery.h
index 60a99ae047..86771f990b 100644
--- a/engines/ultima/ultima1/u1dialogs/grocery.h
+++ b/engines/ultima/ultima1/u1dialogs/grocery.h
@@ -37,7 +37,7 @@ using Shared::CTextInputMsg;
  */
 class Grocery : public BuySellDialog {
 	DECLARE_MESSAGE_MAP;
-	bool TextInputMsg(CTextInputMsg &msg);
+	bool TextInputMsg(CTextInputMsg *msg);
 private:
 	uint _costPerPack;
 protected:
diff --git a/engines/ultima/ultima1/u1dialogs/king.cpp b/engines/ultima/ultima1/u1dialogs/king.cpp
index 084e0fdd70..1a90a55587 100644
--- a/engines/ultima/ultima1/u1dialogs/king.cpp
+++ b/engines/ultima/ultima1/u1dialogs/king.cpp
@@ -40,7 +40,7 @@ King::King(Ultima1Game *game, uint kingIndex) : Dialog(game), _kingIndex(kingInd
 	_bounds = Rect(31, 23, 287, 127);
 }
 
-bool King::ShowMsg(CShowMsg &msg) {
+bool King::ShowMsg(CShowMsg *msg) {
 	addInfoMsg(_game->_res->KING_TEXT[0], false);
 	getKeypress();
 	return true;
@@ -139,12 +139,12 @@ void King::setMode(KingMode mode) {
 	setDirty();
 }
 
-bool King::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool King::CharacterInputMsg(CCharacterInputMsg *msg) {
 	switch (_mode) {
 	case SELECT:
-		if (msg._keyState.keycode == Common::KEYCODE_p)
+		if (msg->_keyState.keycode == Common::KEYCODE_p)
 			setMode(PENCE);
-		else if (msg._keyState.keycode == Common::KEYCODE_s)
+		else if (msg->_keyState.keycode == Common::KEYCODE_s)
 			setMode(SERVICE);
 		else
 			neither();
@@ -163,12 +163,12 @@ bool King::CharacterInputMsg(CCharacterInputMsg &msg) {
 	return true;
 }
 
-bool King::TextInputMsg(CTextInputMsg &msg) {
+bool King::TextInputMsg(CTextInputMsg *msg) {
 	assert(_mode == PENCE);
 	const Shared::Character &c = *_game->_party;
-	uint amount = atoi(msg._text.c_str());
+	uint amount = atoi(msg->_text.c_str());
 
-	if (msg._escaped || !amount) {
+	if (msg->_escaped || !amount) {
 		none();
 	} else if (amount > c._coins) {
 		notThatMuch();
diff --git a/engines/ultima/ultima1/u1dialogs/king.h b/engines/ultima/ultima1/u1dialogs/king.h
index 5eb1f8620f..bf9e48710f 100644
--- a/engines/ultima/ultima1/u1dialogs/king.h
+++ b/engines/ultima/ultima1/u1dialogs/king.h
@@ -39,9 +39,9 @@ using Shared::CTextInputMsg;
   */
 class King : public Dialog {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
-	bool TextInputMsg(CTextInputMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
+	bool TextInputMsg(CTextInputMsg *msg);
 	enum KingMode { SELECT, PENCE, SERVICE };
 private:
 	KingMode _mode;
diff --git a/engines/ultima/ultima1/u1dialogs/magic.cpp b/engines/ultima/ultima1/u1dialogs/magic.cpp
index c8b0c9698e..ed03bf8d83 100644
--- a/engines/ultima/ultima1/u1dialogs/magic.cpp
+++ b/engines/ultima/ultima1/u1dialogs/magic.cpp
@@ -100,14 +100,14 @@ void Magic::drawBuy() {
 	}
 }
 
-bool Magic::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Magic::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
 
 	if (_mode == BUY) {
-		if (msg._keyState.keycode >= (int)(Common::KEYCODE_a + _startIndex) &&
-			msg._keyState.keycode <= (int)(Common::KEYCODE_a + _endIndex) &&
-			(int)(msg._keyState.keycode - Common::KEYCODE_a - _startIndex) % 2 == 0) {
-			uint magicNum = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= (int)(Common::KEYCODE_a + _startIndex) &&
+			msg->_keyState.keycode <= (int)(Common::KEYCODE_a + _endIndex) &&
+			(int)(msg->_keyState.keycode - Common::KEYCODE_a - _startIndex) % 2 == 0) {
+			uint magicNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			Spells::Spell &spell = *static_cast<Spells::Spell *>(c._spells[magicNum]);
 
 			if (spell.getBuyCost() <= c._coins) {
diff --git a/engines/ultima/ultima1/u1dialogs/magic.h b/engines/ultima/ultima1/u1dialogs/magic.h
index 714ffacb53..a5c01fd93e 100644
--- a/engines/ultima/ultima1/u1dialogs/magic.h
+++ b/engines/ultima/ultima1/u1dialogs/magic.h
@@ -36,7 +36,7 @@ using Shared::CCharacterInputMsg;
  */
 class Magic : public BuySellDialog {
 	DECLARE_MESSAGE_MAP;
-	bool CharacterInputMsg(CCharacterInputMsg &msg) override;
+	bool CharacterInputMsg(CCharacterInputMsg *msg) override;
 private:
 //	uint _magicNum;
 	uint _startIndex, _endIndex;
diff --git a/engines/ultima/ultima1/u1dialogs/ready.cpp b/engines/ultima/ultima1/u1dialogs/ready.cpp
index 8516cbff0a..45a8db37d7 100644
--- a/engines/ultima/ultima1/u1dialogs/ready.cpp
+++ b/engines/ultima/ultima1/u1dialogs/ready.cpp
@@ -39,18 +39,18 @@ END_MESSAGE_MAP()
 Ready::Ready(Ultima1Game *game) : FullScreenDialog(game), _mode(SELECT) {
 }
 
-bool Ready::ShowMsg(CShowMsg &msg) {
+bool Ready::ShowMsg(CShowMsg *msg) {
 	addInfoMsg(_game->_res->READY_WEAPON_armour_SPELL, false);
 	getKeypress();
 	return true;
 }
 
-bool Ready::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Ready::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
 
 	switch (_mode) {
 	case SELECT:
-		switch (msg._keyState.keycode) {
+		switch (msg->_keyState.keycode) {
 		case Common::KEYCODE_w:
 			setMode(READY_WEAPON);
 			break;
@@ -68,8 +68,8 @@ bool Ready::CharacterInputMsg(CCharacterInputMsg &msg) {
 		break;
 
 	case READY_WEAPON:
-		if (msg._keyState.keycode >= Common::KEYCODE_a && msg._keyState.keycode < (Common::KEYCODE_a + (int)c._weapons.size())) {
-			int index = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= Common::KEYCODE_a && msg->_keyState.keycode < (Common::KEYCODE_a + (int)c._weapons.size())) {
+			int index = msg->_keyState.keycode - Common::KEYCODE_a;
 			if (!c._weapons[index]->empty())
 				c._equippedWeapon = index;
 		}
@@ -81,8 +81,8 @@ bool Ready::CharacterInputMsg(CCharacterInputMsg &msg) {
 		break;
 
 	case READY_armour:
-		if (msg._keyState.keycode >= Common::KEYCODE_a && msg._keyState.keycode < (Common::KEYCODE_a + (int)c._armour.size())) {
-			int index = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= Common::KEYCODE_a && msg->_keyState.keycode < (Common::KEYCODE_a + (int)c._armour.size())) {
+			int index = msg->_keyState.keycode - Common::KEYCODE_a;
 			if (!c._armour[index]->empty())
 				c._equippedArmour = index;
 		}
@@ -94,8 +94,8 @@ bool Ready::CharacterInputMsg(CCharacterInputMsg &msg) {
 		break;
 
 	case READY_SPELL:
-		if (msg._keyState.keycode >= Common::KEYCODE_a && msg._keyState.keycode < (Common::KEYCODE_a + (int)c._spells.size())) {
-			int index = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= Common::KEYCODE_a && msg->_keyState.keycode < (Common::KEYCODE_a + (int)c._spells.size())) {
+			int index = msg->_keyState.keycode - Common::KEYCODE_a;
 			if (!c._spells[index]->empty())
 				c._equippedSpell = index;
 		}
diff --git a/engines/ultima/ultima1/u1dialogs/ready.h b/engines/ultima/ultima1/u1dialogs/ready.h
index b34daf7d2b..26fdafe5a0 100644
--- a/engines/ultima/ultima1/u1dialogs/ready.h
+++ b/engines/ultima/ultima1/u1dialogs/ready.h
@@ -37,8 +37,8 @@ using Shared::CCharacterInputMsg;
  */
 class Ready : public FullScreenDialog {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
 
 	enum Mode { SELECT, READY_WEAPON, READY_armour, READY_SPELL };
 private:
diff --git a/engines/ultima/ultima1/u1dialogs/stats.cpp b/engines/ultima/ultima1/u1dialogs/stats.cpp
index 9dc79a6173..f56d7d7f11 100644
--- a/engines/ultima/ultima1/u1dialogs/stats.cpp
+++ b/engines/ultima/ultima1/u1dialogs/stats.cpp
@@ -39,13 +39,13 @@ BEGIN_MESSAGE_MAP(Stats, FullScreenDialog)
 END_MESSAGE_MAP()
 
 
-bool Stats::ShowMsg(CShowMsg &msg) {
+bool Stats::ShowMsg(CShowMsg *msg) {
 	addInfoMsg(_game->_res->PRESS_SPACE_TO_CONTINUE, false);
 	getKeypress();
 	return true;
 }
 
-bool Stats::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Stats::CharacterInputMsg(CCharacterInputMsg *msg) {
 	if ((_startingIndex + 26U) < _stats.size()) {
 		_startingIndex += 26U;
 		setDirty();
diff --git a/engines/ultima/ultima1/u1dialogs/stats.h b/engines/ultima/ultima1/u1dialogs/stats.h
index 496269d3cf..af4895f6be 100644
--- a/engines/ultima/ultima1/u1dialogs/stats.h
+++ b/engines/ultima/ultima1/u1dialogs/stats.h
@@ -38,8 +38,8 @@ using Shared::CCharacterInputMsg;
  */
 class Stats : public FullScreenDialog {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
 public:
 	/**
 	 * Contains the data for a single stat entry to display
diff --git a/engines/ultima/ultima1/u1dialogs/tavern.cpp b/engines/ultima/ultima1/u1dialogs/tavern.cpp
index dc80012faf..a7a4b3794f 100644
--- a/engines/ultima/ultima1/u1dialogs/tavern.cpp
+++ b/engines/ultima/ultima1/u1dialogs/tavern.cpp
@@ -65,7 +65,7 @@ void Tavern::setMode(BuySell mode) {
 	}
 }
 
-bool Tavern::FrameMsg(CFrameMsg &msg) {
+bool Tavern::FrameMsg(CFrameMsg *msg) {
 	Shared::Character &c = *_game->_party;
 
 	if (_countdown > 0 && --_countdown == 0) {
diff --git a/engines/ultima/ultima1/u1dialogs/tavern.h b/engines/ultima/ultima1/u1dialogs/tavern.h
index 0e6eea3fc7..8ec6e3ea58 100644
--- a/engines/ultima/ultima1/u1dialogs/tavern.h
+++ b/engines/ultima/ultima1/u1dialogs/tavern.h
@@ -38,7 +38,7 @@ namespace U1Dialogs {
  */
 class Tavern : public BuySellDialog {
 	DECLARE_MESSAGE_MAP;
-	bool FrameMsg(CFrameMsg &msg);
+	bool FrameMsg(CFrameMsg *msg);
 private:
 	Maps::MapCityCastle *_map;
 	//uint _tavernNum;
diff --git a/engines/ultima/ultima1/u1dialogs/transports.cpp b/engines/ultima/ultima1/u1dialogs/transports.cpp
index 20605e9b10..4211e36488 100644
--- a/engines/ultima/ultima1/u1dialogs/transports.cpp
+++ b/engines/ultima/ultima1/u1dialogs/transports.cpp
@@ -166,13 +166,13 @@ void Transports::drawSell() {
 	centerText(String(_game->_res->TRANSPORTS_TEXT[0]).split("\r\n"), titleLines + 2);
 }
 
-bool Transports::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Transports::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
-	int transportIndex = msg._keyState.keycode - Common::KEYCODE_a;
+	int transportIndex = msg->_keyState.keycode - Common::KEYCODE_a;
 
 	if (_mode == BUY) {
-		if (msg._keyState.keycode >= Common::KEYCODE_a &&
-				msg._keyState.keycode <= Common::KEYCODE_f &&
+		if (msg->_keyState.keycode >= Common::KEYCODE_a &&
+				msg->_keyState.keycode <= Common::KEYCODE_f &&
 				_transports[transportIndex]) {
 			uint cost = getBuyCost(transportIndex + 1);
 			if (cost <= c._coins) {
diff --git a/engines/ultima/ultima1/u1dialogs/transports.h b/engines/ultima/ultima1/u1dialogs/transports.h
index c529debff2..218d3d38ab 100644
--- a/engines/ultima/ultima1/u1dialogs/transports.h
+++ b/engines/ultima/ultima1/u1dialogs/transports.h
@@ -36,7 +36,7 @@ using Shared::CCharacterInputMsg;
  */
 class Transports : public BuySellDialog {
 	DECLARE_MESSAGE_MAP;
-	bool CharacterInputMsg(CCharacterInputMsg &msg) override;
+	bool CharacterInputMsg(CCharacterInputMsg *msg) override;
 private:
 	uint _water, _woods, _grass;
 	bool _hasFreeTiles, _hasShuttle, _isClosed;
diff --git a/engines/ultima/ultima1/u1dialogs/weaponry.cpp b/engines/ultima/ultima1/u1dialogs/weaponry.cpp
index 80e82e0f81..c7ca5dd782 100644
--- a/engines/ultima/ultima1/u1dialogs/weaponry.cpp
+++ b/engines/ultima/ultima1/u1dialogs/weaponry.cpp
@@ -135,14 +135,14 @@ void Weaponry::drawSell() {
 	}
 }
 
-bool Weaponry::CharacterInputMsg(CCharacterInputMsg &msg) {
+bool Weaponry::CharacterInputMsg(CCharacterInputMsg *msg) {
 	Shared::Character &c = *_game->_party;
 
 	if (_mode == BUY) {
-		if (msg._keyState.keycode >= (int)(Common::KEYCODE_a + _startIndex) &&
-			msg._keyState.keycode <= (int)(Common::KEYCODE_a + _endIndex) &&
-			(int)(msg._keyState.keycode - Common::KEYCODE_a - _startIndex) % 2 == 0) {
-			uint weaponNum = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= (int)(Common::KEYCODE_a + _startIndex) &&
+			msg->_keyState.keycode <= (int)(Common::KEYCODE_a + _endIndex) &&
+			(int)(msg->_keyState.keycode - Common::KEYCODE_a - _startIndex) % 2 == 0) {
+			uint weaponNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			Weapon &weapon = *static_cast<Weapon *>(c._weapons[weaponNum]);
 
 			if (weapon.getBuyCost() <= c._coins) {
@@ -162,9 +162,9 @@ bool Weaponry::CharacterInputMsg(CCharacterInputMsg &msg) {
 		nothing();
 		return true;
 	} else if (_mode == SELL && !c._weapons.hasNothing()) {
-		if (msg._keyState.keycode >= Common::KEYCODE_b &&
-			msg._keyState.keycode < (Common::KEYCODE_a + (int)c._weapons.size())) {
-			uint weaponNum = msg._keyState.keycode - Common::KEYCODE_a;
+		if (msg->_keyState.keycode >= Common::KEYCODE_b &&
+			msg->_keyState.keycode < (Common::KEYCODE_a + (int)c._weapons.size())) {
+			uint weaponNum = msg->_keyState.keycode - Common::KEYCODE_a;
 			Weapon &weapon = *static_cast<Weapon *>(c._weapons[weaponNum]);
 
 			if (!weapon.empty()) {
diff --git a/engines/ultima/ultima1/u1dialogs/weaponry.h b/engines/ultima/ultima1/u1dialogs/weaponry.h
index fe036773b5..91f2409e87 100644
--- a/engines/ultima/ultima1/u1dialogs/weaponry.h
+++ b/engines/ultima/ultima1/u1dialogs/weaponry.h
@@ -34,7 +34,7 @@ namespace U1Dialogs {
  */
 class Weaponry : public BuySellDialog {
 	DECLARE_MESSAGE_MAP;
-	bool CharacterInputMsg(CCharacterInputMsg &msg) override;
+	bool CharacterInputMsg(CCharacterInputMsg *msg) override;
 private:
 //	uint _weaponryNum;
 	uint _startIndex, _endIndex;
diff --git a/engines/ultima/ultima1/u1gfx/sprites.cpp b/engines/ultima/ultima1/u1gfx/sprites.cpp
index 49b7f9508d..b7d0c41e71 100644
--- a/engines/ultima/ultima1/u1gfx/sprites.cpp
+++ b/engines/ultima/ultima1/u1gfx/sprites.cpp
@@ -43,7 +43,7 @@ void Sprites::load(bool isOverworld) {
 		Shared::Gfx::Sprites::load("t1ktown.bin", 4, 8, 8);
 }
 
-bool Sprites::FrameMsg(CFrameMsg &msg) {
+bool Sprites::FrameMsg(CFrameMsg *msg) {
 	if (!empty() && _isOverworld) {
 		animateWater();
 	}
diff --git a/engines/ultima/ultima1/u1gfx/sprites.h b/engines/ultima/ultima1/u1gfx/sprites.h
index fc01d2bbb7..2ddc600b17 100644
--- a/engines/ultima/ultima1/u1gfx/sprites.h
+++ b/engines/ultima/ultima1/u1gfx/sprites.h
@@ -39,7 +39,7 @@ using Shared::CFrameMsg;
  */
 class Sprites : public Shared::Gfx::Sprites, public Shared::TreeItem {
 	DECLARE_MESSAGE_MAP;
-	bool FrameMsg(CFrameMsg &msg);
+	bool FrameMsg(CFrameMsg *msg);
 private:
 	bool _isOverworld;
 	uint _frameCtr;
diff --git a/engines/ultima/ultima1/u1gfx/status.cpp b/engines/ultima/ultima1/u1gfx/status.cpp
index 2f08955296..ba21e8a7eb 100644
--- a/engines/ultima/ultima1/u1gfx/status.cpp
+++ b/engines/ultima/ultima1/u1gfx/status.cpp
@@ -36,7 +36,7 @@ Status::Status(Shared::TreeItem *parent) : Shared::Gfx::VisualItem("Status", Tex
 		_hitPoints(0), _food(0), _experience(0), _coins(0) {
 }
 
-bool Status::FrameMsg(CFrameMsg &msg) {
+bool Status::FrameMsg(CFrameMsg *msg) {
 	// If any of the figures have changed, mark the display as dirty
 	const Ultima1Game *game = static_cast<const Ultima1Game *>(getGame());
 	const Shared::Character &c = *game->_party;
diff --git a/engines/ultima/ultima1/u1gfx/status.h b/engines/ultima/ultima1/u1gfx/status.h
index 67fbe59c2b..c54e39f779 100644
--- a/engines/ultima/ultima1/u1gfx/status.h
+++ b/engines/ultima/ultima1/u1gfx/status.h
@@ -36,7 +36,7 @@ using Shared::CFrameMsg;
  */
 class Status : public Shared::Gfx::VisualItem {
 	DECLARE_MESSAGE_MAP;
-	bool FrameMsg(CFrameMsg &msg);
+	bool FrameMsg(CFrameMsg *msg);
 private:
 	uint _hitPoints, _food, _experience, _coins;
 private:
diff --git a/engines/ultima/ultima1/u1gfx/view_char_gen.cpp b/engines/ultima/ultima1/u1gfx/view_char_gen.cpp
index 8d10e07b64..f1de8e72b9 100644
--- a/engines/ultima/ultima1/u1gfx/view_char_gen.cpp
+++ b/engines/ultima/ultima1/u1gfx/view_char_gen.cpp
@@ -272,46 +272,46 @@ void ViewCharacterGeneration::setClass(int classNum) {
 	setMode(FLAG_NAME | FLAG_ATTRIBUTES);
 }
 
-bool ViewCharacterGeneration::ShowMsg(CShowMsg &msg) {
+bool ViewCharacterGeneration::ShowMsg(CShowMsg *msg) {
 	Shared::Gfx::VisualItem::ShowMsg(msg);
 	setMode(FLAG_INITIAL);
 	return true;
 }
 
-bool ViewCharacterGeneration::HideMsg(CHideMsg &msg) {
+bool ViewCharacterGeneration::HideMsg(CHideMsg *msg) {
 	Shared::Gfx::VisualItem::HideMsg(msg);
 	getGame()->_textCursor->setVisible(false);
 	return true;
 }
 
-bool ViewCharacterGeneration::KeypressMsg(CKeypressMsg &msg) {
+bool ViewCharacterGeneration::KeypressMsg(CKeypressMsg *msg) {
 	Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
 
 	if (_flags & FLAG_RACE) {
-		if (msg._keyState.keycode >= Common::KEYCODE_a && msg._keyState.keycode <= Common::KEYCODE_d)
-			setRace(msg._keyState.keycode - Common::KEYCODE_a);
+		if (msg->_keyState.keycode >= Common::KEYCODE_a && msg->_keyState.keycode <= Common::KEYCODE_d)
+			setRace(msg->_keyState.keycode - Common::KEYCODE_a);
 	} else if (_flags & FLAG_SEX) {
-		if (msg._keyState.keycode >= Common::KEYCODE_a && msg._keyState.keycode <= Common::KEYCODE_b)
-			setSex(msg._keyState.keycode - Common::KEYCODE_a);
+		if (msg->_keyState.keycode >= Common::KEYCODE_a && msg->_keyState.keycode <= Common::KEYCODE_b)
+			setSex(msg->_keyState.keycode - Common::KEYCODE_a);
 	} else if (_flags & FLAG_CLASS) {
-		if (msg._keyState.keycode >= Common::KEYCODE_a && msg._keyState.keycode <= Common::KEYCODE_d)
-			setClass(msg._keyState.keycode - Common::KEYCODE_a);
+		if (msg->_keyState.keycode >= Common::KEYCODE_a && msg->_keyState.keycode <= Common::KEYCODE_d)
+			setClass(msg->_keyState.keycode - Common::KEYCODE_a);
 	} else if (_flags & FLAG_NAME) {
 		// Shouldn't reach here, since during name entry, keypresses go to text input
 	} else if (_flags & FLAG_SAVE) {
-		if (msg._keyState.keycode == Common::KEYCODE_y) {
+		if (msg->_keyState.keycode == Common::KEYCODE_y) {
 			// Save the game
 			if (save())
 				setView("Game");
 			else
 				setView("Title");
-		} else if (msg._keyState.keycode == Common::KEYCODE_n) {
+		} else if (msg->_keyState.keycode == Common::KEYCODE_n) {
 			// Start at the beginning again
 			setMode(FLAG_INITIAL);
 		}
 	} else {
 		// Initial attributes allocation
-		switch (msg._keyState.keycode) {
+		switch (msg->_keyState.keycode) {
 		case Common::KEYCODE_UP:
 		case Common::KEYCODE_KP8:
 			_selectedAttribute = (_selectedAttribute == 0) ? ATTRIBUTE_COUNT - 1 : _selectedAttribute - 1;
@@ -366,10 +366,10 @@ bool ViewCharacterGeneration::KeypressMsg(CKeypressMsg &msg) {
 	return true;
 }
 
-bool ViewCharacterGeneration::TextInputMsg(CTextInputMsg &msg) {
-	if (!msg._escaped && !msg._text.empty()) {
+bool ViewCharacterGeneration::TextInputMsg(CTextInputMsg *msg) {
+	if (!msg->_escaped && !msg->_text.empty()) {
 		// Name provided
-		_character->_name = msg._text;
+		_character->_name = msg->_text;
 		
 		_textInput->hide();
 		setMode(FLAG_SAVE);
diff --git a/engines/ultima/ultima1/u1gfx/view_char_gen.h b/engines/ultima/ultima1/u1gfx/view_char_gen.h
index 3a469f4389..effc5700c4 100644
--- a/engines/ultima/ultima1/u1gfx/view_char_gen.h
+++ b/engines/ultima/ultima1/u1gfx/view_char_gen.h
@@ -44,10 +44,10 @@ using Shared::CTextInputMsg;
  */
 class ViewCharacterGeneration : public Shared::Gfx::VisualItem {
 	DECLARE_MESSAGE_MAP;
-	bool KeypressMsg(CKeypressMsg &msg);
-	bool ShowMsg(CShowMsg &msg);
-	bool HideMsg(CHideMsg &msg);
-	bool TextInputMsg(CTextInputMsg &msg);
+	bool KeypressMsg(CKeypressMsg *msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool HideMsg(CHideMsg *msg);
+	bool TextInputMsg(CTextInputMsg *msg);
 private:
 	enum Flag {
 		FLAG_FRAME = 1, FLAG_POINTS = 2, FLAG_ATTRIBUTES = 4, FLAG_ATTR_POINTERS = 8, FLAG_HELP = 16,
diff --git a/engines/ultima/ultima1/u1gfx/view_game.cpp b/engines/ultima/ultima1/u1gfx/view_game.cpp
index d6cbcc172b..50a77a5c95 100644
--- a/engines/ultima/ultima1/u1gfx/view_game.cpp
+++ b/engines/ultima/ultima1/u1gfx/view_game.cpp
@@ -164,7 +164,7 @@ void ViewGame::drawIndicators() {
 	}
 }
 
-bool ViewGame::ShowMsg(CShowMsg &msg) {
+bool ViewGame::ShowMsg(CShowMsg *msg) {
 	// Set the info area to prompt for a command
 	Shared::CInfoGetCommandKeypress cmdMsg(this);
 	cmdMsg.execute(this);
@@ -172,7 +172,7 @@ bool ViewGame::ShowMsg(CShowMsg &msg) {
 	return true;
 }
 
-bool ViewGame::EndOfTurnMsg(CEndOfTurnMsg &msg) {
+bool ViewGame::EndOfTurnMsg(CEndOfTurnMsg *msg) {
 	// Set the info area to prompt for the next command
 	Shared::CInfoGetCommandKeypress cmdMsg(this);
 	cmdMsg.execute(this);
@@ -182,12 +182,12 @@ bool ViewGame::EndOfTurnMsg(CEndOfTurnMsg &msg) {
 
 #define FRAME_REDUCTION_RATE 5
 
-bool ViewGame::FrameMsg(CFrameMsg &msg) {
+bool ViewGame::FrameMsg(CFrameMsg *msg) {
 	if (_frameCtr == FRAME_REDUCTION_RATE) {
 		// Ignore frame message at the start of passing reduced frame rate to child views
 		return false;
 	} else if (++_frameCtr == FRAME_REDUCTION_RATE) {
-		msg.execute(this, nullptr, Shared::MSGFLAG_SCAN);
+		msg->execute(this, nullptr, Shared::MSGFLAG_SCAN);
 		_frameCtr = 0;
 	}
 
@@ -202,7 +202,7 @@ void dispatchKey(ViewGame *game) {
 	T dMsg;
 	dMsg.execute(game);
 }
-#define CHECK(KEYCODE, MSG_CLASS) else if (msg._keyState.keycode == KEYCODE) { dispatchKey<MSG_CLASS>(this); }
+#define CHECK(KEYCODE, MSG_CLASS) else if (msg->_keyState.keycode == KEYCODE) { dispatchKey<MSG_CLASS>(this); }
 
 bool ViewGame::checkMovement(const Common::KeyState &keyState) {
 	Shared::Maps::Direction dir = Shared::Maps::MapWidget::directionFromKey(keyState.keycode);
@@ -256,8 +256,8 @@ bool ViewGame::checkMovement(const Common::KeyState &keyState) {
 	return true;
 }
 
-bool ViewGame::CharacterInputMsg(CCharacterInputMsg &msg) {
-	if (checkMovement(msg._keyState)) {}
+bool ViewGame::CharacterInputMsg(CCharacterInputMsg *msg) {
+	if (checkMovement(msg->_keyState)) {}
 	CHECK(Common::KEYCODE_a, Shared::CAttackMsg)
 	CHECK(Common::KEYCODE_b, Shared::CBoardMsg)
 	CHECK(Common::KEYCODE_c, Shared::CCastMsg)
diff --git a/engines/ultima/ultima1/u1gfx/view_game.h b/engines/ultima/ultima1/u1gfx/view_game.h
index 043e0183f8..76e50e65ee 100644
--- a/engines/ultima/ultima1/u1gfx/view_game.h
+++ b/engines/ultima/ultima1/u1gfx/view_game.h
@@ -53,10 +53,10 @@ using Shared::CCharacterInputMsg;
  */
 class ViewGame : public Shared::Gfx::VisualContainer {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool EndOfTurnMsg(CEndOfTurnMsg &msg);
-	bool FrameMsg(CFrameMsg &msg);
-	bool CharacterInputMsg(CCharacterInputMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool EndOfTurnMsg(CEndOfTurnMsg *msg);
+	bool FrameMsg(CFrameMsg *msg);
+	bool CharacterInputMsg(CCharacterInputMsg *msg);
 private:
 	Shared::Info *_info;
 	Shared::ViewportDungeon *_viewportDungeon;
diff --git a/engines/ultima/ultima1/u1gfx/view_title.cpp b/engines/ultima/ultima1/u1gfx/view_title.cpp
index 8666d6d648..a64e243236 100644
--- a/engines/ultima/ultima1/u1gfx/view_title.cpp
+++ b/engines/ultima/ultima1/u1gfx/view_title.cpp
@@ -214,7 +214,7 @@ void ViewTitle::setCastlePalette() {
 	getGame()->setEGAPalette(PALETTE);
 }
 
-bool ViewTitle::FrameMsg(CFrameMsg &msg) {
+bool ViewTitle::FrameMsg(CFrameMsg *msg) {
 	uint32 time = getGame()->getMillis();
 	if (time < _expiryTime)
 		return true;
@@ -281,7 +281,7 @@ void ViewTitle::setMode(TitleMode mode) {
 	}
 }
 
-bool ViewTitle::ShowMsg(CShowMsg &msg) {
+bool ViewTitle::ShowMsg(CShowMsg *msg) {
 	Shared::Gfx::VisualItem::ShowMsg(msg);
 
 	if (_mode == TITLEMODE_MAIN_MENU) {
@@ -292,16 +292,16 @@ bool ViewTitle::ShowMsg(CShowMsg &msg) {
 	return true;
 }
 
-bool ViewTitle::KeypressMsg(CKeypressMsg &msg) {
+bool ViewTitle::KeypressMsg(CKeypressMsg *msg) {
 	uint32 time = getGame()->getMillis();
 
 	if (_mode == TITLEMODE_MAIN_MENU) {
-		if (msg._keyState.keycode == Common::KEYCODE_a || msg._keyState.keycode == Common::KEYCODE_b) {
+		if (msg->_keyState.keycode == Common::KEYCODE_a || msg->_keyState.keycode == Common::KEYCODE_b) {
 			// Hide the cursor
 			Shared::Gfx::TextCursor *textCursor = getGame()->_textCursor;
 			textCursor->setVisible(false);
 
-			if (msg._keyState.keycode == Common::KEYCODE_a) {
+			if (msg->_keyState.keycode == Common::KEYCODE_a) {
 				setView("CharGen");
 			} else {
 				if (!g_vm->loadGameDialog())
diff --git a/engines/ultima/ultima1/u1gfx/view_title.h b/engines/ultima/ultima1/u1gfx/view_title.h
index 1b640f93b4..ecb4a10905 100644
--- a/engines/ultima/ultima1/u1gfx/view_title.h
+++ b/engines/ultima/ultima1/u1gfx/view_title.h
@@ -41,9 +41,9 @@ using Shared::CFrameMsg;
  */
 class ViewTitle : public Shared::Gfx::VisualItem {
 	DECLARE_MESSAGE_MAP;
-	bool ShowMsg(CShowMsg &msg);
-	bool KeypressMsg(CKeypressMsg &msg);
-	bool FrameMsg(CFrameMsg &msg);
+	bool ShowMsg(CShowMsg *msg);
+	bool KeypressMsg(CKeypressMsg *msg);
+	bool FrameMsg(CFrameMsg *msg);
 private:
 	Graphics::ManagedSurface _logo, _castle;
 	Graphics::ManagedSurface _flags[3];
diff --git a/engines/ultima/ultima1/u1gfx/viewport_map.cpp b/engines/ultima/ultima1/u1gfx/viewport_map.cpp
index 2a616abb78..cb002a7ad6 100644
--- a/engines/ultima/ultima1/u1gfx/viewport_map.cpp
+++ b/engines/ultima/ultima1/u1gfx/viewport_map.cpp
@@ -53,7 +53,7 @@ void ViewportMap::draw() {
 	Shared::ViewportMap::draw();
 }
 
-bool ViewportMap::FrameMsg(CFrameMsg &msg) {
+bool ViewportMap::FrameMsg(CFrameMsg *msg) {
 	// To allow map to animate, on each frame mark the map as dirty again
 	setDirty(true);
 	return true;
diff --git a/engines/ultima/ultima1/u1gfx/viewport_map.h b/engines/ultima/ultima1/u1gfx/viewport_map.h
index af336ad346..1dd89a6d1b 100644
--- a/engines/ultima/ultima1/u1gfx/viewport_map.h
+++ b/engines/ultima/ultima1/u1gfx/viewport_map.h
@@ -34,7 +34,7 @@ using Shared::CFrameMsg;
 
 class ViewportMap : public Shared::ViewportMap {
 	DECLARE_MESSAGE_MAP;
-	bool FrameMsg(CFrameMsg &msg);
+	bool FrameMsg(CFrameMsg *msg);
 private:
 	Maps::MapType _mapType;
 public:
diff --git a/engines/ultima/ultima1/u6gfx/game_view.cpp b/engines/ultima/ultima1/u6gfx/game_view.cpp
index d730569b6d..8ebf047009 100644
--- a/engines/ultima/ultima1/u6gfx/game_view.cpp
+++ b/engines/ultima/ultima1/u6gfx/game_view.cpp
@@ -99,8 +99,8 @@ void GameView::draw() {
 	_status->draw();
 }
 
-bool GameView::KeypressMsg(CKeypressMsg &msg) {
-	switch (msg._keyState.keycode) {
+bool GameView::KeypressMsg(CKeypressMsg *msg) {
+	switch (msg->_keyState.keycode) {
 	case Common::KEYCODE_LEFT:
 	case Common::KEYCODE_KP4: {
 		Shared::CMoveMsg move(Shared::Maps::DIR_LEFT);
diff --git a/engines/ultima/ultima1/u6gfx/game_view.h b/engines/ultima/ultima1/u6gfx/game_view.h
index 007649690f..38f93ed21a 100644
--- a/engines/ultima/ultima1/u6gfx/game_view.h
+++ b/engines/ultima/ultima1/u6gfx/game_view.h
@@ -76,7 +76,7 @@ class GameView : public Shared::Gfx::VisualContainer {
 	};
 
 	DECLARE_MESSAGE_MAP;
-	bool KeypressMsg(CKeypressMsg &msg);
+	bool KeypressMsg(CKeypressMsg *msg);
 private:
 	Shared::Info *_info;
 	U1Gfx::Status *_status;




More information about the Scummvm-git-logs mailing list