[Scummvm-git-logs] scummvm master -> 22733f0cb39ee2657614e4203736e8902c42d90f
neuromancer
noreply at scummvm.org
Tue May 3 07:49:40 UTC 2022
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6fa4da4073 HYPNO: added offsets to the fonts rendering in wet
53c840980b HYPNO: minor improvements in UI rendering in wet
e960959b50 HYPNO: better adjusted UI element rendering in wet
22733f0cb3 HYPNO: added extra ammo bar in some level of wet
Commit: 6fa4da4073e8d7c608d2ee87cba74d9afe868f9d
https://github.com/scummvm/scummvm/commit/6fa4da4073e8d7c608d2ee87cba74d9afe868f9d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-03T09:48:29+02:00
Commit Message:
HYPNO: added offsets to the fonts rendering in wet
Changed paths:
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 3f3c71f972c..704f9461975 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -481,12 +481,20 @@ void WetEngine::loadFonts() {
}
void WetEngine::drawString(const Common::String &font, const Common::String &str, int x, int y, int w, uint32 color) {
+ int offset = 0;
if (font == "block05.fgx") {
for (uint32 c = 0; c < str.size(); c++) {
+
+ offset = 0;
+ if (str[c] == ':')
+ offset = 1;
+ else if (str[c] == '.')
+ offset = 4;
+
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (!_font05.get(275 + 40*str[c] + j*8 + i))
- _compositeSurface->setPixel(x + 5 - i + 6*c, y + j, color);
+ _compositeSurface->setPixel(x + 5 - i + 6*c, offset + y + j, color);
}
}
}
@@ -495,10 +503,18 @@ void WetEngine::drawString(const Common::String &font, const Common::String &str
if (str[c] == 0)
continue;
assert(str[c] >= 32);
+ offset = 0;
+ if (str[c] == 't')
+ offset = 0;
+ else if (str[c] == 'i' || str[c] == '%')
+ offset = 1;
+ else if (Common::isLower(str[c]) || str[c] == ':')
+ offset = 2;
+
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 8; j++) {
if (!_font08.get(1554 + 72*(str[c]-32) + j*8 + i))
- _compositeSurface->setPixel(x + 6 - i + 7*c, y + j, color);
+ _compositeSurface->setPixel(x + 6 - i + 7*c, offset + y + j, color);
}
}
}
Commit: 53c840980b14bae37fb3f6f8ee7e3faac1d793f5
https://github.com/scummvm/scummvm/commit/53c840980b14bae37fb3f6f8ee7e3faac1d793f5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-03T09:48:29+02:00
Commit Message:
HYPNO: minor improvements in UI rendering in wet
Changed paths:
engines/hypno/wet/arcade.cpp
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 645f01e6cf1..4e5e212bfac 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -983,15 +983,14 @@ void WetEngine::drawHealth() {
if (_arcadeMode == "Y1" || _arcadeMode == "Y3" || _arcadeMode == "Y4" || _arcadeMode == "Y5") {
Common::Rect r;
- r = Common::Rect(ep.x - 2, ep.y - 2, ep.x + 69, sp.y + 9);
+ r = Common::Rect(ep.x - 2, ep.y - 2, ep.x + 69, sp.y + 7);
_compositeSurface->frameRect(r, kHypnoColorGreen);
- r = Common::Rect(sp.x - 2, sp.y - 2, sp.x + 74, sp.y + 8);
+ r = Common::Rect(sp.x - 2, sp.y - 2, sp.x + 74, sp.y + 7);
_compositeSurface->frameRect(r, kHypnoColorGreen);
- // TODO: not rendering correctly
- //r = Common::Rect(op.x - 2, op.y - 2, op.x + 75, op.y + 9);
- //_compositeSurface->frameRect(r, kHypnoColorGreen);
+ r = Common::Rect(op.x - 2, op.y - 2, op.x + 74, op.y + 7);
+ _compositeSurface->frameRect(r, kHypnoColorGreen);
}
drawString("block05.fgx", Common::String::format("ENERGY %d%%", p), ep.x, ep.y, 65, c);
Commit: e960959b508d95e12c814c06c7a72c0a9e7958de
https://github.com/scummvm/scummvm/commit/e960959b508d95e12c814c06c7a72c0a9e7958de
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-03T09:48:29+02:00
Commit Message:
HYPNO: better adjusted UI element rendering in wet
Changed paths:
engines/hypno/wet/arcade.cpp
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 4e5e212bfac..9d49e44ea45 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -924,7 +924,14 @@ void WetEngine::drawPlayer() {
c = kHypnoColorYellow;
uint32 minutes = _countdown / 60;
uint32 seconds = _countdown % 60;
- drawString("block05.fgx", Common::String::format("CLOCK: %02d:%02d", minutes, seconds), 19, 11, 0, c);
+ drawString("block05.fgx", Common::String::format("CLOCK %02d:%02d", minutes, seconds), 19, 11, 0, c);
+
+ const chapterEntry *entry = _chapterTable[_levelId];
+ Common::Point ep(entry->energyPos[0], entry->energyPos[1]);
+
+ Common::Rect r = Common::Rect(ep.x - 2, ep.y + 6, ep.x + 69, ep.y + 15);
+ _compositeSurface->frameRect(r, kHypnoColorGreen);
+
}
c = kHypnoColorRed; // red ?
@@ -981,6 +988,10 @@ void WetEngine::drawHealth() {
Common::Point sp(entry->scorePos[0], entry->scorePos[1]);
Common::Point op(entry->objectivesPos[0], entry->objectivesPos[1]);
+ drawString("block05.fgx", Common::String::format("ENERGY %d%%", p), ep.x, ep.y, 65, c);
+ Common::String scoreFormat = "SCORE %04d";
+ Common::String moFormat = "M.O. %d/%d";
+
if (_arcadeMode == "Y1" || _arcadeMode == "Y3" || _arcadeMode == "Y4" || _arcadeMode == "Y5") {
Common::Rect r;
r = Common::Rect(ep.x - 2, ep.y - 2, ep.x + 69, sp.y + 7);
@@ -991,12 +1002,14 @@ void WetEngine::drawHealth() {
r = Common::Rect(op.x - 2, op.y - 2, op.x + 74, op.y + 7);
_compositeSurface->frameRect(r, kHypnoColorGreen);
+
+ scoreFormat = "SCORE %04d";
+ moFormat = "M.O. %d/%d";
}
- drawString("block05.fgx", Common::String::format("ENERGY %d%%", p), ep.x, ep.y, 65, c);
- drawString("block05.fgx", Common::String::format("SCORE %04d", s), sp.x, sp.y, 72, c);
+ drawString("block05.fgx", Common::String::format(scoreFormat.c_str(), s), sp.x, sp.y, 72, c);
if (op.x > 0 && op.y > 0)
- drawString("block05.fgx", Common::String::format("M.O. %d/%d", mo, mm), op.x, op.y, 60, c);
+ drawString("block05.fgx", Common::String::format(moFormat.c_str(), mo, mm), op.x, op.y, 60, c);
}
}
Commit: 22733f0cb39ee2657614e4203736e8902c42d90f
https://github.com/scummvm/scummvm/commit/22733f0cb39ee2657614e4203736e8902c42d90f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-03T09:48:29+02:00
Commit Message:
HYPNO: added extra ammo bar in some level of wet
Changed paths:
engines/hypno/hypno.h
engines/hypno/wet/arcade.cpp
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 8749f343598..6b52f3b4799 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -361,6 +361,7 @@ struct chapterEntry {
int scorePos[2];
int objectivesPos[2];
int ammoPos[2];
+ int ammoOffset;
int targetColor;
};
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 9d49e44ea45..2d0e55b11c4 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -1025,6 +1025,7 @@ void WetEngine::drawAmmo() {
if (d >= 13)
return;
Common::Point p(entry->ammoPos[0], entry->ammoPos[1]);
+ int ao = entry->ammoOffset;
Common::Rect r;
if (_arcadeMode == "Y1" || _arcadeMode == "Y3" || _arcadeMode == "Y4" || _arcadeMode == "Y5") {
r = Common::Rect(p.x - 1, p.y - 1, p.x + 16, p.y + 14);
@@ -1037,6 +1038,13 @@ void WetEngine::drawAmmo() {
} else {
r = Common::Rect(p.x, p.y + d, p.x + 15, p.y + 13);
_compositeSurface->fillRect(r, kHypnoColorWhiteOrBlue); // blue
+
+ if (ao > 0) {
+ r = Common::Rect(p.x + ao, p.y + d, p.x + 15 + ao, p.y + 13);
+ _compositeSurface->fillRect(r, kHypnoColorWhiteOrBlue); // blue
+ }
+
+
}
}
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 704f9461975..e5cce59c462 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -28,27 +28,27 @@
namespace Hypno {
static const chapterEntry rawChapterTable[] = {
- {11, {44, 172}, {218, 172}, {0, 0}, {127, 172}, kHypnoColorRed}, // c11
- {10, {19, 3}, {246, 3}, {246, 11}, {2, 2}, kHypnoNoColor}, // c10
- {21, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorYellow}, // c21
- {22, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorGreen}, // c22
- {23, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorCyan}, // c23
- {20, {128, 150}, {238, 150},{0, 0}, {209, 146}, kHypnoColorCyan}, // c20
- {31, {70, 160}, {180, 160}, {220, 185}, {44, 164}, kHypnoColorGreen}, // c31
- {32, {70, 160}, {180, 160}, {220, 185}, {44, 164}, kHypnoColorRed}, // c32
- {33, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorRed}, // c33
- {30, {19, 3}, {246, 3}, {246, 11}, {2, 2}, kHypnoColorRed}, // c30
- {41, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorRed}, // c41
- {42, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorRed}, // c42
- {43, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorRed}, // c43
- {44, {70, 160}, {180, 160}, {220, 185}, {44, 162}, kHypnoColorRed}, // c44
- {40, {19, 3}, {246, 3}, {246, 11}, {2, 2}, kHypnoColorRed}, // c40
- {51, {60, 167}, {190, 167}, {135, 187}, {136, 163}, kHypnoColorRed}, // c51
- {52, {60, 167}, {190, 167}, {135, 187}, {136, 165}, kHypnoColorCyan}, // c52
- {50, {19, 3}, {246, 3}, {246, 11}, {2, 2}, kHypnoColorRed}, // c50 (fixed)
- {61, {63, 167}, {187, 167}, {192, 188}, {152, 185}, kHypnoColorCyan}, // c61
- {60, {63, 167}, {187, 167}, {192, 188}, {152, 185}, kHypnoColorCyan}, // c60
- {0, {0, 0}, {0, 0}, {0, 0}, {0, 0}, kHypnoColorRed} // NULL
+ {11, {44, 172}, {218, 172}, {0, 0}, {127, 172}, 0, kHypnoColorRed}, // c11
+ {10, {19, 3}, {246, 3}, {246, 11}, {2, 2}, 0, kHypnoNoColor}, // c10
+ {21, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorYellow}, // c21
+ {22, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorGreen}, // c22
+ {23, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorCyan}, // c23
+ {20, {128, 150}, {238, 150},{0, 0}, {209, 146}, 0, kHypnoColorCyan}, // c20
+ {31, {70, 160}, {180, 160}, {220, 185}, {44, 164}, 215, kHypnoColorGreen}, // c31
+ {32, {70, 160}, {180, 160}, {220, 185}, {44, 164}, 215, kHypnoColorRed}, // c32
+ {33, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorRed}, // c33
+ {30, {19, 3}, {246, 3}, {246, 11}, {2, 2}, 0, kHypnoColorRed}, // c30
+ {41, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorRed}, // c41
+ {42, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorRed}, // c42
+ {43, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorRed}, // c43
+ {44, {70, 160}, {180, 160}, {220, 185}, {44, 162}, 215, kHypnoColorRed}, // c44
+ {40, {19, 3}, {246, 3}, {246, 11}, {2, 2}, 0, kHypnoColorRed}, // c40
+ {51, {60, 167}, {190, 167}, {135, 187}, {136, 163}, 35, kHypnoColorRed}, // c51
+ {52, {60, 167}, {190, 167}, {135, 187}, {136, 165}, 35, kHypnoColorCyan}, // c52
+ {50, {19, 3}, {246, 3}, {246, 11}, {2, 2}, 0, kHypnoColorRed}, // c50 (fixed)
+ {61, {63, 167}, {187, 167}, {192, 188}, {152, 185}, 0, kHypnoColorCyan}, // c61
+ {60, {63, 167}, {187, 167}, {192, 188}, {152, 185}, 0, kHypnoColorCyan}, // c60
+ {0, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoColorRed} // NULL
};
WetEngine::WetEngine(OSystem *syst, const ADGameDescription *gd) : HypnoEngine(syst, gd) {
More information about the Scummvm-git-logs
mailing list