[Scummvm-git-logs] scummvm master -> a2b3790063d52f247c0a33af9ef82ed75c673c83

mduggan mgithub at guarana.org
Fri May 1 06:30:55 UTC 2020


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:
a2b3790063 ULTIMA8: CRUSADER: Support game menu and quit gump.


Commit: a2b3790063d52f247c0a33af9ef82ed75c673c83
    https://github.com/scummvm/scummvm/commit/a2b3790063d52f247c0a33af9ef82ed75c673c83
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-05-01T15:18:43+09:00

Commit Message:
ULTIMA8: CRUSADER: Support game menu and quit gump.

Changed paths:
  A engines/ultima/ultima8/gumps/remorse_menu_gump.cpp
  A engines/ultima/ultima8/gumps/remorse_menu_gump.h
    engines/ultima/module.mk
    engines/ultima/ultima8/games/remorse_game.cpp
    engines/ultima/ultima8/graphics/palette_manager.h
    engines/ultima/ultima8/gumps/menu_gump.cpp
    engines/ultima/ultima8/gumps/menu_gump.h
    engines/ultima/ultima8/gumps/quit_gump.cpp
    engines/ultima/ultima8/gumps/quit_gump.h


diff --git a/engines/ultima/module.mk b/engines/ultima/module.mk
index 620de1ed25..01407b2f8b 100644
--- a/engines/ultima/module.mk
+++ b/engines/ultima/module.mk
@@ -475,6 +475,7 @@ MODULE_OBJS := \
 	ultima8/gumps/paperdoll_gump.o \
 	ultima8/gumps/quit_gump.o \
 	ultima8/gumps/readable_gump.o \
+	ultima8/gumps/remorse_menu_gump.o \
 	ultima8/gumps/resizable_gump.o \
 	ultima8/gumps/scaler_gump.o \
 	ultima8/gumps/scroll_gump.o \
diff --git a/engines/ultima/ultima8/games/remorse_game.cpp b/engines/ultima/ultima8/games/remorse_game.cpp
index 5742a247c6..4f95c977e3 100644
--- a/engines/ultima/ultima8/games/remorse_game.cpp
+++ b/engines/ultima/ultima8/games/remorse_game.cpp
@@ -124,8 +124,8 @@ bool RemorseGame::startGame() {
 }
 
 bool RemorseGame::startInitialUsecode(int saveSlot) {
-	ProcId moviepid = Game::get_instance()->playIntroMovie(false);
-	Process *movieproc = Kernel::get_instance()->getProcess(moviepid);
+	//ProcId moviepid = Game::get_instance()->playIntroMovie(false);
+	//Process *movieproc = Kernel::get_instance()->getProcess(moviepid);
 
 	//if (movieproc) {
 	//	waitFor(movieproc);
diff --git a/engines/ultima/ultima8/graphics/palette_manager.h b/engines/ultima/ultima8/graphics/palette_manager.h
index bf6a827280..9cb12d3bda 100644
--- a/engines/ultima/ultima8/graphics/palette_manager.h
+++ b/engines/ultima/ultima8/graphics/palette_manager.h
@@ -43,8 +43,8 @@ public:
 	enum PalIndex {
 		Pal_Game = 0,
 		Pal_Movie = 1,
-		Pal_Diff = 2,	// Crusaders only
-		Pal_Misc = 3,	// Crusaders only
+		Pal_Diff = 2,	// Crusaders only - difficulty screen
+		Pal_Misc = 3,	// Crusaders only - game menu
 		Pal_Misc2 = 4,	// Crusaders only
 		Pal_Star = 5,	// Crusaders only
 		Pal_Cred = 6,	// Crusader: No regret only
diff --git a/engines/ultima/ultima8/gumps/menu_gump.cpp b/engines/ultima/ultima8/gumps/menu_gump.cpp
index 61ae282940..26b11ff668 100644
--- a/engines/ultima/ultima8/gumps/menu_gump.cpp
+++ b/engines/ultima/ultima8/gumps/menu_gump.cpp
@@ -22,6 +22,7 @@
 
 #include "ultima/ultima8/misc/pent_include.h"
 #include "ultima/ultima8/gumps/menu_gump.h"
+#include "ultima/ultima8/gumps/remorse_menu_gump.h"
 #include "ultima/ultima8/games/game_data.h"
 #include "ultima/ultima8/graphics/gump_shape_archive.h"
 #include "ultima/ultima8/graphics/shape.h"
@@ -126,14 +127,13 @@ void MenuGump::InitGump(Gump *newparent, bool take_focus) {
 
 		int x_ = _dims.w / 2 + 14;
 		int y_ = 18;
-		Gump *widget;
 		for (int i = 0; i < 8; ++i) {
 			if ((quotes || i != 6) && (endgame || i != 7)) {
 				FrameID frame_up(GameData::GUMPS, menuEntryShape, i * 2);
 				FrameID frame_down(GameData::GUMPS, menuEntryShape, i * 2 + 1);
 				frame_up = _TL_SHP_(frame_up);
 				frame_down = _TL_SHP_(frame_down);
-				widget = new ButtonWidget(x_, y_, frame_up, frame_down, true);
+				Gump *widget = new ButtonWidget(x_, y_, frame_up, frame_down, true);
 				widget->InitGump(this, false);
 				widget->SetIndex(i + 1);
 			}
@@ -148,7 +148,7 @@ void MenuGump::InitGump(Gump *newparent, bool take_focus) {
 
 		if (!name.empty()) {
 			Rect rect;
-			widget = new TextWidget(0, 0, name, true, 6);
+			Gump *widget = new TextWidget(0, 0, name, true, 6);
 			widget->InitGump(this, false);
 			widget->GetDims(rect);
 			widget->Move(90 - rect.w / 2, _dims.h - 40);
@@ -260,7 +260,10 @@ void MenuGump::showMenu() {
 	if (gump) {
 		gump->Close();
 	} else {
-		gump = new MenuGump();
+		if (GAME_IS_U8)
+			gump = new MenuGump();
+		else
+			gump = new RemorseMenuGump();
 		gump->InitGump(0);
 		gump->setRelativePosition(CENTER);
 	}
@@ -268,7 +271,11 @@ void MenuGump::showMenu() {
 
 //static
 void MenuGump::inputName() {
-	ModalGump *gump = new MenuGump(true);
+	ModalGump *gump;
+	if (GAME_IS_U8)
+		gump = new MenuGump(true);
+	else
+		gump = new RemorseMenuGump(true);
 	gump->InitGump(0);
 	gump->setRelativePosition(CENTER);
 }
diff --git a/engines/ultima/ultima8/gumps/menu_gump.h b/engines/ultima/ultima8/gumps/menu_gump.h
index fdea2cfbe7..93fe3958c3 100644
--- a/engines/ultima/ultima8/gumps/menu_gump.h
+++ b/engines/ultima/ultima8/gumps/menu_gump.h
@@ -24,7 +24,6 @@
 #define ULTIMA8_GUMPS_MENUGUMP_H
 
 #include "ultima/ultima8/gumps/modal_gump.h"
-#include "ultima/ultima8/audio/music_process.h"
 #include "ultima/ultima8/misc/p_dynamic_cast.h"
 
 namespace Ultima {
diff --git a/engines/ultima/ultima8/gumps/quit_gump.cpp b/engines/ultima/ultima8/gumps/quit_gump.cpp
index 233a96e0fb..73fd023712 100644
--- a/engines/ultima/ultima8/gumps/quit_gump.cpp
+++ b/engines/ultima/ultima8/gumps/quit_gump.cpp
@@ -36,58 +36,83 @@ namespace Ultima8 {
 
 DEFINE_RUNTIME_CLASSTYPE_CODE(QuitGump, ModalGump)
 
+static const int u8GumpShape = 17;
+static const int u8AskShapeId = 18;
+static const int u8YesShapeId = 47;
+static const int u8NoShapeId = 50;
+
+static const int remGumpShape = 21;
+static const int remAskShapeId = 0;
+static const int remYesShapeId = 19;
+static const int remNoShapeId = 20;
+
+
 QuitGump::QuitGump(): ModalGump(0, 0, 5, 5), _yesWidget(0), _noWidget(0) {
 	Mouse *mouse = Mouse::get_instance();
 	mouse->pushMouseCursor();
 	mouse->setMouseCursor(Mouse::MOUSE_HAND);
+	if (GAME_IS_U8) {
+		_gumpShape = u8GumpShape;
+		_askShape = u8AskShapeId;
+		_yesShape = u8YesShapeId;
+		_noShape = u8NoShapeId;
+		_buttonXOff = 16;
+		_buttonYOff = 38;
+	} else if (GAME_IS_REMORSE) {
+		_gumpShape = remGumpShape;
+		_askShape = remAskShapeId;
+		_yesShape = remYesShapeId;
+		_noShape = remNoShapeId;
+		_buttonXOff = 55;
+		_buttonYOff = 47;
+	} else {
+		error("unsupported game type");
+	}
 }
 
 QuitGump::~QuitGump() {
 	Mouse::get_instance()->popMouseCursor();
 }
 
-static const int gumpShape = 17;
-static const int askShapeId = 18;
-static const int yesShapeId = 47;
-static const int noShapeId = 50;
-
 void QuitGump::InitGump(Gump *newparent, bool take_focus) {
 	ModalGump::InitGump(newparent, take_focus);
 
-	_shape = GameData::get_instance()->getGumps()->getShape(gumpShape);
+	_shape = GameData::get_instance()->getGumps()->getShape(_gumpShape);
 	UpdateDimsFromShape();
 
-	FrameID askshape(GameData::GUMPS, askShapeId, 0);
-	askshape = _TL_SHP_(askshape);
+	if (_askShape != 0) {
+		FrameID askshape(GameData::GUMPS, _askShape, 0);
+		askshape = _TL_SHP_(askshape);
 
-	Shape *askShape = GameData::get_instance()->getShape(askshape);
-	const ShapeFrame *sf = askShape->getFrame(askshape._frameNum);
-	assert(sf);
+		Shape *askShape = GameData::get_instance()->getShape(askshape);
+		const ShapeFrame *sf = askShape->getFrame(askshape._frameNum);
+		assert(sf);
 
-	Gump *ask = new Gump(0, 0, sf->_width, sf->_height);
-	ask->SetShape(askShape, askshape._frameNum);
-	ask->InitGump(this);
-	ask->setRelativePosition(TOP_CENTER, 0, 5);
+		Gump *ask = new Gump(0, 0, sf->_width, sf->_height);
+		ask->SetShape(askShape, askshape._frameNum);
+		ask->InitGump(this);
+		ask->setRelativePosition(TOP_CENTER, 0, 5);
+	}
 
-	FrameID yesbutton_up(GameData::GUMPS, yesShapeId, 0);
-	FrameID yesbutton_down(GameData::GUMPS, yesShapeId, 1);
+	FrameID yesbutton_up(GameData::GUMPS, _yesShape, 0);
+	FrameID yesbutton_down(GameData::GUMPS, _yesShape, 1);
 	yesbutton_up = _TL_SHP_(yesbutton_up);
 	yesbutton_down = _TL_SHP_(yesbutton_down);
 
 	Gump *widget;
 	widget = new ButtonWidget(0, 0, yesbutton_up, yesbutton_down);
 	widget->InitGump(this);
-	widget->setRelativePosition(TOP_LEFT, 16, 38);
+	widget->setRelativePosition(TOP_LEFT, _buttonXOff, _buttonYOff);
 	_yesWidget = widget->getObjId();
 
-	FrameID nobutton_up(GameData::GUMPS, noShapeId, 0);
-	FrameID nobutton_down(GameData::GUMPS, noShapeId, 1);
+	FrameID nobutton_up(GameData::GUMPS, _noShape, 0);
+	FrameID nobutton_down(GameData::GUMPS, _noShape, 1);
 	nobutton_up = _TL_SHP_(nobutton_up);
 	nobutton_down = _TL_SHP_(nobutton_down);
 
 	widget = new ButtonWidget(0, 0, nobutton_up, nobutton_down);
 	widget->InitGump(this);
-	widget->setRelativePosition(TOP_RIGHT, -16, 38);
+	widget->setRelativePosition(TOP_RIGHT, -_buttonXOff, _buttonYOff);
 	_noWidget = widget->getObjId();
 }
 
diff --git a/engines/ultima/ultima8/gumps/quit_gump.h b/engines/ultima/ultima8/gumps/quit_gump.h
index 3e9e136a09..742899c2c3 100644
--- a/engines/ultima/ultima8/gumps/quit_gump.h
+++ b/engines/ultima/ultima8/gumps/quit_gump.h
@@ -50,6 +50,13 @@ public:
 protected:
 	void saveData(Common::WriteStream *ws) override;
 	ObjId _yesWidget, _noWidget;
+
+	uint32 _gumpShape;
+	uint32 _yesShape;
+	uint32 _noShape;
+	uint32 _askShape;
+	uint32 _buttonXOff;
+	uint32 _buttonYOff;
 };
 
 } // End of namespace Ultima8
diff --git a/engines/ultima/ultima8/gumps/remorse_menu_gump.cpp b/engines/ultima/ultima8/gumps/remorse_menu_gump.cpp
new file mode 100644
index 0000000000..cf47671f61
--- /dev/null
+++ b/engines/ultima/ultima8/gumps/remorse_menu_gump.cpp
@@ -0,0 +1,259 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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.
+ *
+ */
+
+#include "ultima/ultima8/misc/pent_include.h"
+#include "ultima/ultima8/gumps/remorse_menu_gump.h"
+#include "ultima/ultima8/games/game_data.h"
+#include "ultima/ultima8/graphics/gump_shape_archive.h"
+#include "ultima/ultima8/graphics/shape.h"
+#include "ultima/ultima8/graphics/shape_frame.h"
+#include "ultima/ultima8/ultima8.h"
+#include "ultima/ultima8/gumps/desktop_gump.h"
+#include "ultima/ultima8/gumps/widgets/button_widget.h"
+#include "ultima/ultima8/gumps/widgets/text_widget.h"
+#include "ultima/ultima8/gumps/quit_gump.h"
+#include "ultima/ultima8/gumps/paged_gump.h"
+#include "ultima/ultima8/games/game.h"
+#include "ultima/ultima8/world/actors/main_actor.h"
+#include "ultima/ultima8/graphics/fonts/font.h"
+#include "ultima/ultima8/graphics/fonts/rendered_text.h"
+#include "ultima/ultima8/graphics/fonts/font_manager.h"
+#include "ultima/ultima8/graphics/palette_manager.h"
+#include "ultima/ultima8/conf/setting_manager.h"
+#include "ultima/ultima8/audio/music_process.h"
+#include "ultima/ultima8/gumps/widgets/edit_widget.h"
+#include "ultima/ultima8/gumps/u8_save_gump.h"
+#include "ultima/ultima8/world/get_object.h"
+#include "ultima/ultima8/meta_engine.h"
+#include "engines/dialogs.h"
+
+namespace Ultima {
+namespace Ultima8 {
+
+DEFINE_RUNTIME_CLASSTYPE_CODE(RemorseMenuGump, ModalGump)
+
+RemorseMenuGump::RemorseMenuGump(bool nameEntryMode_)
+	: ModalGump(0, 0, 640, 480, 0, FLAG_DONT_SAVE) {
+	_nameEntryMode = nameEntryMode_;
+
+	Mouse *mouse = Mouse::get_instance();
+	mouse->pushMouseCursor();
+	if (!_nameEntryMode)
+		mouse->setMouseCursor(Mouse::MOUSE_HAND);
+	else
+		mouse->setMouseCursor(Mouse::MOUSE_NONE);
+
+	// Save old music state
+	MusicProcess *musicprocess = MusicProcess::get_instance();
+	if (musicprocess) {
+		musicprocess->saveTrackState();
+		// Stop any playing music.
+		musicprocess->playCombatMusic(0);
+	}
+	MetaEngine::setGameMenuActive(true);
+}
+
+RemorseMenuGump::~RemorseMenuGump() {
+	MetaEngine::setGameMenuActive(false);
+}
+
+
+void RemorseMenuGump::Close(bool no_del) {
+	// Restore old music state and palette.
+	// Music state can be changed by the Intro and Credits
+	MusicProcess *musicprocess = MusicProcess::get_instance();
+	if (musicprocess)
+		musicprocess->restoreTrackState();
+
+	Mouse *mouse = Mouse::get_instance();
+	mouse->popMouseCursor();
+
+	ModalGump::Close(no_del);
+}
+
+static const int frameTopLeft = 54;
+static const int firstMenuEntry = 58;
+
+static const int numMenuEntries = 6;
+static const int menuEntryX[] = {45, 45, 45, 446, 488, 550};
+static const int menuEntryY[] = {50, 101, 151, 58, 151, 198};
+
+void RemorseMenuGump::InitGump(Gump *newparent, bool take_focus) {
+	ModalGump::InitGump(newparent, take_focus);
+
+	GumpShapeArchive *shapeArchive = GameData::get_instance()->getGumps();
+
+	Shape *topLeft = shapeArchive->getShape(frameTopLeft);
+	Shape *topRight = shapeArchive->getShape(frameTopLeft + 1);
+	Shape *botLeft = shapeArchive->getShape(frameTopLeft + 2);
+	Shape *botRight = shapeArchive->getShape(frameTopLeft + 3);
+
+	if (!topLeft || !topRight || !botLeft || !botRight) {
+		error("Couldn't load shapes for menu background");
+		return;
+	}
+
+	PaletteManager *palman = PaletteManager::get_instance();
+	assert(palman);
+	const Palette *pal = palman->getPalette(PaletteManager::Pal_Misc);
+	assert(pal);
+	topLeft->setPalette(pal);
+	topRight->setPalette(pal);
+	botLeft->setPalette(pal);
+	botRight->setPalette(pal);
+
+	const ShapeFrame *tlFrame = topLeft->getFrame(0);
+	const ShapeFrame *trFrame = topRight->getFrame(0);
+	const ShapeFrame *blFrame = botLeft->getFrame(0);
+	const ShapeFrame *brFrame = botRight->getFrame(0);
+	if (!tlFrame || !trFrame || !blFrame || !brFrame) {
+		error("Couldn't load shape frames for menu background");
+		return;
+	}
+
+	_dims.w = tlFrame->_width + trFrame->_width;
+	_dims.h = tlFrame->_height + brFrame->_height;
+	_dims.x = 0;
+	_dims.y = 0;
+
+	Gump *tlGump = new Gump(0, 0, tlFrame->_width, tlFrame->_height);
+	tlGump->SetShape(topLeft, 0);
+	tlGump->InitGump(this, false);
+	Gump *trGump = new Gump(tlFrame->_width, 0, trFrame->_width, trFrame->_height);
+	trGump->SetShape(topRight, 0);
+	trGump->InitGump(this, false);
+	Gump *blGump = new Gump(0, tlFrame->_height, blFrame->_width, blFrame->_height);
+	blGump->SetShape(botLeft, 0);
+	blGump->InitGump(this, false);
+	Gump *brGump = new Gump(blFrame->_width, trFrame->_height, brFrame->_width, brFrame->_height);
+	brGump->SetShape(botRight, 0);
+	brGump->InitGump(this, false);
+
+	for (int i = 0; i < numMenuEntries; i++) {
+		uint32 entryShapeNum = firstMenuEntry + i;
+		Shape *menuEntry = shapeArchive->getShape(entryShapeNum);
+		if (!menuEntry) {
+			error("Couldn't load shape for menu entry %d", i);
+			return;
+		}
+		menuEntry->setPalette(pal);
+
+		const ShapeFrame *menuEntryFrame = menuEntry->getFrame(0);
+		if (!menuEntryFrame || menuEntry->frameCount() != 2) {
+			error("Couldn't load shape frame for menu entry %d", i);
+			return;
+		}
+
+		FrameID frame_up(GameData::GUMPS, entryShapeNum, 0);
+		FrameID frame_down(GameData::GUMPS, entryShapeNum, 1);
+		Gump *widget = new ButtonWidget(menuEntryX[i], menuEntryY[i], frame_up, frame_down, true);
+		widget->InitGump(this, false);
+		widget->SetIndex(i + 1);
+	}
+}
+
+
+void RemorseMenuGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
+	Gump::PaintThis(surf, lerp_factor, scaled);
+}
+
+bool RemorseMenuGump::OnKeyDown(int key, int mod) {
+	if (Gump::OnKeyDown(key, mod)) return true;
+
+	if (!_nameEntryMode) {
+
+		if (key == Common::KEYCODE_ESCAPE) {
+			// FIXME: this check should probably be in Game or GUIApp
+			MainActor *av = getMainActor();
+			if (av && !av->hasActorFlags(Actor::ACT_DEAD))
+				Close(); // don't allow closing if dead/game over
+		} else if (key >= Common::KEYCODE_1 && key <= Common::KEYCODE_9) {
+			selectEntry(key - Common::KEYCODE_1 + 1);
+		}
+
+	}
+
+	return true;
+}
+
+void RemorseMenuGump::ChildNotify(Gump *child, uint32 message) {
+	if (child->IsOfType<EditWidget>() && message == EditWidget::EDIT_ENTER) {
+		EditWidget *editwidget = p_dynamic_cast<EditWidget *>(child);
+		assert(editwidget);
+		Std::string name = editwidget->getText();
+		if (!name.empty()) {
+			MainActor *av = getMainActor();
+			av->setName(name);
+			Close();
+		}
+	}
+
+	if (child->IsOfType<ButtonWidget>() && message == ButtonWidget::BUTTON_CLICK) {
+		selectEntry(child->GetIndex());
+	}
+}
+
+void RemorseMenuGump::selectEntry(int entry) {
+	SettingManager *settingman = SettingManager::get_instance();
+	bool endgame, quotes;
+	settingman->get("endgame", endgame);
+	settingman->get("quotes", quotes);
+
+	switch (entry) {
+	case 1: // Intro
+		Game::get_instance()->playIntroMovie(true);
+		break;
+	case 2:
+	case 3: // Read/Write Diary
+		U8SaveGump::showLoadSaveGump(this, entry == 3);
+		break;
+	case 4: {
+		// Options - show the ScummVM options dialog
+		GUI::ConfigDialog dlg;
+		dlg.runModal();
+	}
+	break;
+	case 5: // Credits
+		Game::get_instance()->playCredits();
+		break;
+	case 6: // Quit
+		QuitGump::verifyQuit();
+		break;
+	case 7: // Quotes
+		if (quotes) Game::get_instance()->playQuotes();
+		break;
+	case 8: // End Game
+		if (endgame) Game::get_instance()->playEndgameMovie(true);
+		break;
+	default:
+		break;
+	}
+}
+
+bool RemorseMenuGump::OnTextInput(int unicode) {
+	if (Gump::OnTextInput(unicode)) return true;
+
+	return true;
+}
+
+} // End of namespace Ultima8
+} // End of namespace Ultima
diff --git a/engines/ultima/ultima8/gumps/remorse_menu_gump.h b/engines/ultima/ultima8/gumps/remorse_menu_gump.h
new file mode 100644
index 0000000000..77a5c72e7c
--- /dev/null
+++ b/engines/ultima/ultima8/gumps/remorse_menu_gump.h
@@ -0,0 +1,61 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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.
+ *
+ */
+
+#ifndef ULTIMA8_GUMPS_REMORSEMENUGUMP_H
+#define ULTIMA8_GUMPS_REMORSEMENUGUMP_H
+
+#include "ultima/ultima8/gumps/modal_gump.h"
+#include "ultima/ultima8/misc/p_dynamic_cast.h"
+
+namespace Ultima {
+namespace Ultima8 {
+
+class RenderedText;
+
+class RemorseMenuGump : public ModalGump {
+public:
+	ENABLE_RUNTIME_CLASSTYPE()
+
+	RemorseMenuGump(bool nameEntryMode = false);
+	~RemorseMenuGump() override;
+
+	// Init the gump, call after construction
+	void InitGump(Gump *newparent, bool take_focus = true) override;
+	void Close(bool no_del = false) override;
+
+	// Paint the Gump
+	void PaintThis(RenderSurface *, int32 lerp_factor, bool scaled) override;
+
+	bool OnKeyDown(int key, int mod) override;
+	bool OnTextInput(int unicode) override;
+	void ChildNotify(Gump *child, uint32 message) override;
+
+protected:
+	bool _nameEntryMode;
+
+	virtual void selectEntry(int entry);
+};
+
+} // End of namespace Ultima8
+} // End of namespace Ultima
+
+#endif




More information about the Scummvm-git-logs mailing list