[Scummvm-git-logs] scummvm master -> 61ee3a1ec5265767aa58cbc27e28ff463c3a5468

mgerhardy martin.gerhardy at gmail.com
Wed Nov 4 19:24:40 UTC 2020


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

Summary:
b14b0c1a13 TWINE: tweaked rendering the playername
556c5a0a86 TWINE: reduced visibility
61ee3a1ec5 TWINE: doxygen


Commit: b14b0c1a13692962557208d85dba6a47ba5ae01b
    https://github.com/scummvm/scummvm/commit/b14b0c1a13692962557208d85dba6a47ba5ae01b
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-11-04T20:22:59+01:00

Commit Message:
TWINE: tweaked rendering the playername

Changed paths:
    engines/twine/menu.cpp
    engines/twine/menuoptions.cpp


diff --git a/engines/twine/menu.cpp b/engines/twine/menu.cpp
index a56c0a2135..082118b50a 100644
--- a/engines/twine/menu.cpp
+++ b/engines/twine/menu.cpp
@@ -223,11 +223,11 @@ void Menu::processPlasmaEffect(int32 left, int32 top, int32 color) {
 	const uint8 *in = plasmaEffectPtr + 5 * PLASMA_WIDTH;
 	uint8 *out = (uint8 *)_engine->frontVideoBuffer.getPixels() + _engine->screenLookupTable[top] + left;
 
-	for (int32 i = 0; i < 25; i++) {
-		for (int32 j = 0; j < kMainMenuButtonWidth; j++) {
-			const uint8 c = MIN(in[i * kMainMenuButtonWidth + j] / 2 + color, max_value);
+	for (int32 y = 0; y < PLASMA_HEIGHT / 2; y++) {
+		for (int32 x = 0; x < PLASMA_WIDTH; x++) {
+			const uint8 c = MIN(in[y * PLASMA_WIDTH + x] / 2 + color, max_value);
 			/* 2x2 squares sharing the same pixel color: */
-			const int32 target = 2 * (i * DEFAULT_SCREEN_WIDTH + j);
+			const int32 target = 2 * (y * DEFAULT_SCREEN_WIDTH + x);
 			out[target + 0] = c;
 			out[target + 1] = c;
 			out[target + DEFAULT_SCREEN_WIDTH + 0] = c;
diff --git a/engines/twine/menuoptions.cpp b/engines/twine/menuoptions.cpp
index 7d51ea56c3..fab3cf59b5 100644
--- a/engines/twine/menuoptions.cpp
+++ b/engines/twine/menuoptions.cpp
@@ -158,18 +158,18 @@ void MenuOptions::drawSelectableCharacters() {
 }
 
 void MenuOptions::drawPlayerName(int32 centerx, int32 top, int32 type) {
-	const int left = _engine->_text->dialTextBoxLeft;
+	const int32 left = 10;
 	if (type == 1) {
 		_engine->_menu->processPlasmaEffect(left, top, 32);
 	}
 
-	const int right = SCREEN_WIDTH - 1; //_engine->_text->dialTextBoxRight; // FIXME: dialTextBoxRight is 0 here
-	const int bottom = _engine->_text->dialTextBoxBottom;
+	const int right = SCREEN_WIDTH - left;
+	const int bottom = top + PLASMA_HEIGHT;
 	_engine->_menu->drawBox(left, top, right, bottom);
 	_engine->_interface->drawTransparentBox(left + 1, top + 1, right - 1, bottom - 1, 3);
 
-	_engine->_text->drawText(centerx - _engine->_text->getTextSize(playerName) / 2, top, playerName);
-	_engine->copyBlockPhys(left, top, right, top + PLASMA_HEIGHT);
+	_engine->_text->drawText(centerx - _engine->_text->getTextSize(playerName) / 2, top + 6, playerName);
+	_engine->copyBlockPhys(left, top, right, bottom);
 }
 
 /**
@@ -293,7 +293,6 @@ bool MenuOptions::enterPlayerName(int32 textIdx) {
 					_onScreenKeyboardLeaveViaOkButton = false;
 				}
 
-				_engine->flip();
 				break;
 			}
 			default:


Commit: 556c5a0a86f2eff53482f2bc39f176b752225959
    https://github.com/scummvm/scummvm/commit/556c5a0a86f2eff53482f2bc39f176b752225959
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-11-04T20:22:59+01:00

Commit Message:
TWINE: reduced visibility

Changed paths:
    engines/twine/text.h


diff --git a/engines/twine/text.h b/engines/twine/text.h
index 2da619c1c2..db717b6230 100644
--- a/engines/twine/text.h
+++ b/engines/twine/text.h
@@ -175,8 +175,6 @@ private:
 	char *currDialTextPtr = nullptr;
 	/** Current dialogue text size */
 	int32 currDialTextSize = 0;
-public:
-	Text(TwinEEngine *engine) : _engine(engine) {}
 
 	/** Dialogue text size */
 	int32 dialTextSize = 0;
@@ -203,6 +201,8 @@ public:
 
 	int32 dialTextBoxParam1 = 0; // dialogueBoxParam1
 	int32 dialTextBoxParam2 = 0; // dialogueBoxParam2
+public:
+	Text(TwinEEngine *engine) : _engine(engine) {}
 
 	// TODO: refactor all this variables and related functions
 	int32 printTextVar13 = 0;


Commit: 61ee3a1ec5265767aa58cbc27e28ff463c3a5468
    https://github.com/scummvm/scummvm/commit/61ee3a1ec5265767aa58cbc27e28ff463c3a5468
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-11-04T20:24:17+01:00

Commit Message:
TWINE: doxygen

Changed paths:
    engines/twine/text.h


diff --git a/engines/twine/text.h b/engines/twine/text.h
index db717b6230..5d21081852 100644
--- a/engines/twine/text.h
+++ b/engines/twine/text.h
@@ -274,7 +274,8 @@ public:
 	void setTextCrossColor(int32 stopColor, int32 startColor, int32 stepSize);
 
 	/**
-	 * Get dialogue text into text buffer
+	 * Get dialogue text into text buffer from the currently loaded text bank
+	 * @sa initTextBank()
 	 * @param index dialogue index
 	 */
 	bool getText(int32 index);




More information about the Scummvm-git-logs mailing list