[Scummvm-git-logs] scummvm master -> 600c68be2a5a9fdf72fe5a4815728b846594ac07
OMGPizzaGuy
48367439+OMGPizzaGuy at users.noreply.github.com
Sun Feb 14 20:47:55 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4889ac20f3 ULTIMA8: Remove keybinding for enabling cheats.
600c68be2a ULTIMA8: Fix credits / quotes when using font override.
Commit: 4889ac20f33ad594a87a9974269aba131783739a
https://github.com/scummvm/scummvm/commit/4889ac20f33ad594a87a9974269aba131783739a
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-02-14T14:47:39-06:00
Commit Message:
ULTIMA8: Remove keybinding for enabling cheats.
Cheats can be enabled through the game options menu.
Changed paths:
engines/ultima/ultima8/meta_engine.cpp
engines/ultima/ultima8/meta_engine.h
diff --git a/engines/ultima/ultima8/meta_engine.cpp b/engines/ultima/ultima8/meta_engine.cpp
index febbe39a13..f3d8c2296f 100644
--- a/engines/ultima/ultima8/meta_engine.cpp
+++ b/engines/ultima/ultima8/meta_engine.cpp
@@ -95,7 +95,6 @@ static const KeybindingRecord CRUSADER_KEYS[] = {
};
static const KeybindingRecord CHEAT_KEYS[] = {
- { ACTION_CHEAT_MODE, "CHEAT_MODE", "Toggle Cheat Mode", "Cheat::toggle", nullptr, "BACKQUOTE", nullptr, 0 },
{ ACTION_CLIPPING, "CLIPPING", "Toggle Clipping", "QuickAvatarMoverProcess::toggleClipping", nullptr, "INSERT", nullptr, 0 },
{ ACTION_DEC_SORT_ORDER, "DEC_SORT_ORDER", "Decrement Map Sort Order", "GameMapGump::decrementSortOrder", nullptr, "LEFTBRACKET", nullptr, 0 },
{ ACTION_INC_SORT_ORDER, "INC_SORT_ORDER", "Increment Map Sort Order", "GameMapGump::incrementSortOrder", nullptr, "RIGHTBRACKET", nullptr, 0 },
@@ -135,6 +134,12 @@ static const ExtraGuiOption COMMON_OPTIONS[] = {
"frameLimit",
true
},
+ {
+ _s("Enable cheats"),
+ _s("Allow cheats by commands and a menu when player is clicked."),
+ "cheat",
+ false
+ },
{ nullptr, nullptr, nullptr, false }
};
@@ -151,12 +156,6 @@ static const ExtraGuiOption U8_OPTIONS[] = {
"targetedjump",
true
},
- {
- _s("Enable cheats"),
- _s("Allow cheats by commands and a menu when player is clicked."),
- "cheat",
- false
- },
{
_s("Use original save/load screens"),
_s("Use the original save/load screens instead of the ScummVM ones"),
diff --git a/engines/ultima/ultima8/meta_engine.h b/engines/ultima/ultima8/meta_engine.h
index ec4d93a11a..b1e9564484 100644
--- a/engines/ultima/ultima8/meta_engine.h
+++ b/engines/ultima/ultima8/meta_engine.h
@@ -41,7 +41,7 @@ enum KeybindingAction {
ACTION_MOVE_RIGHT, ACTION_MOVE_RUN, ACTION_MOVE_STEP, ACTION_ATTACK,
ACTION_CAMERA_AVATAR,
- ACTION_CHEAT_MODE, ACTION_CLIPPING, ACTION_DEC_SORT_ORDER,
+ ACTION_CLIPPING, ACTION_DEC_SORT_ORDER,
ACTION_INC_SORT_ORDER, ACTION_QUICK_MOVE_ASCEND, ACTION_QUICK_MOVE_DESCEND,
ACTION_QUICK_MOVE_UP, ACTION_QUICK_MOVE_DOWN, ACTION_QUICK_MOVE_LEFT,
ACTION_QUICK_MOVE_RIGHT,
Commit: 600c68be2a5a9fdf72fe5a4815728b846594ac07
https://github.com/scummvm/scummvm/commit/600c68be2a5a9fdf72fe5a4815728b846594ac07
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2021-02-14T14:47:39-06:00
Commit Message:
ULTIMA8: Fix credits / quotes when using font override.
Quotes starts with text large than the scroll buffer height with font override. Increasing the buffer height fixed this, but it may be a problem again if we ever encounter longer text.
Changed paths:
engines/ultima/ultima8/gumps/credits_gump.cpp
diff --git a/engines/ultima/ultima8/gumps/credits_gump.cpp b/engines/ultima/ultima8/gumps/credits_gump.cpp
index a3822ce8cc..35e54dc7e2 100644
--- a/engines/ultima/ultima8/gumps/credits_gump.cpp
+++ b/engines/ultima/ultima8/gumps/credits_gump.cpp
@@ -70,14 +70,16 @@ CreditsGump::~CreditsGump() {
void CreditsGump::InitGump(Gump *newparent, bool take_focus) {
ModalGump::InitGump(newparent, take_focus);
- _scroll[0] = RenderSurface::CreateSecondaryRenderSurface(256, 200);
- _scroll[1] = RenderSurface::CreateSecondaryRenderSurface(256, 200);
- _scroll[2] = RenderSurface::CreateSecondaryRenderSurface(256, 200);
- _scroll[3] = RenderSurface::CreateSecondaryRenderSurface(256, 200);
- _scroll[0]->Fill32(0xFF000000, 0, 0, 256, 200); // black background
- _scroll[1]->Fill32(0xFF000000, 0, 0, 256, 200);
- _scroll[2]->Fill32(0xFF000000, 0, 0, 256, 200);
- _scroll[3]->Fill32(0xFF000000, 0, 0, 256, 200);
+ uint32 width = 256;
+ uint32 height = 280;
+ _scroll[0] = RenderSurface::CreateSecondaryRenderSurface(width, height);
+ _scroll[1] = RenderSurface::CreateSecondaryRenderSurface(width, height);
+ _scroll[2] = RenderSurface::CreateSecondaryRenderSurface(width, height);
+ _scroll[3] = RenderSurface::CreateSecondaryRenderSurface(width, height);
+ _scroll[0]->Fill32(0xFF000000, 0, 0, width, height); // black background
+ _scroll[1]->Fill32(0xFF000000, 0, 0, width, height);
+ _scroll[2]->Fill32(0xFF000000, 0, 0, width, height);
+ _scroll[3]->Fill32(0xFF000000, 0, 0, width, height);
_scrollHeight[0] = 156;
_scrollHeight[1] = 0;
_scrollHeight[2] = 0;
@@ -169,8 +171,10 @@ void CreditsGump::run() {
if (_state == CS_PLAYING && available <= 160) {
// time to render next block
- _scroll[nextblock]->Fill32(0xFF000000, 0, 0, 256, 200);
- // _scroll[nextblock]->Fill32(0xFFFFFFFF,0,0,256,5); // block marker
+ Rect bounds;
+ _scroll[nextblock]->GetSurfaceDims(bounds);
+ _scroll[nextblock]->Fill32(0xFF000000, 0, 0, bounds.width(), bounds.height());
+ //_scroll[nextblock]->Fill32(0xFFFFFFFF, 0, 0, bounds.width(), 2); // block marker
_scrollHeight[nextblock] = 0;
Font *redfont, *yellowfont;
@@ -263,7 +267,7 @@ void CreditsGump::run() {
if (outline.hasPrefix("&")) {
// horizontal line
- if (_scrollHeight[nextblock] + height + 7 > 200) {
+ if (_scrollHeight[nextblock] + height + 7 > bounds.height()) {
done = true;
break;
}
@@ -280,12 +284,12 @@ void CreditsGump::run() {
}
RenderedText *rt = font->renderText(outline, remaining,
- 256 - indent, 0,
+ bounds.width() - indent, 0,
align);
int xd, yd;
rt->getSize(xd, yd);
- if (_scrollHeight[nextblock] + height + yd > 200) {
+ if (_scrollHeight[nextblock] + height + yd > bounds.height()) {
delete rt;
done = true;
break;
@@ -303,9 +307,9 @@ void CreditsGump::run() {
if (_state == CS_PLAYING)
height += _parSkip;
- if (_scrollHeight[nextblock] + height > 200) {
+ if (_scrollHeight[nextblock] + height > bounds.height()) {
if (firstline) {
- height = 200 - _scrollHeight[nextblock];
+ height = bounds.height() - _scrollHeight[nextblock];
assert(height >= 0);
} else {
done = true;
@@ -350,8 +354,10 @@ void CreditsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled)
int h = _scrollHeight[_currentSurface] - _currentY;
if (h > 156) h = 156;
- if (h > 0)
- surf->Blit(_scroll[_currentSurface]->getRawSurface(), 0, _currentY, 256, h, 32, 44);
+ if (h > 0) {
+ Graphics::ManagedSurface* ms = _scroll[_currentSurface]->getRawSurface();
+ surf->Blit(ms, 0, _currentY, ms->getBounds().width(), h, 32, 44);
+ }
int y = h;
for (int i = 1; i < 4; i++) {
@@ -360,8 +366,10 @@ void CreditsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled)
int s = (_currentSurface + i) % 4;
h = _scrollHeight[s];
if (h > 156 - y) h = 156 - y;
- if (h > 0)
- surf->Blit(_scroll[s]->getRawSurface(), 0, 0, 256, h, 32, 44 + y);
+ if (h > 0) {
+ Graphics::ManagedSurface* ms = _scroll[s]->getRawSurface();
+ surf->Blit(ms, 0, 0, ms->getBounds().width(), h, 32, 44 + y);
+ }
y += h;
}
}
More information about the Scummvm-git-logs
mailing list