[Scummvm-cvs-logs] scummvm master -> a378e771c8d8865c2cc7355375cf23fd1fe2cffc
sev-
sev at scummvm.org
Wed Mar 9 15:47:33 CET 2016
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
19c9993db9 WAGE: Added one more game
c44a7f6020 WAGE: Added Minitorian game detection
c47122cb63 WAGE: More detection entries
2408766f2d WAGE: Precalculate design bounds based on real data
a378e771c8 WAGE: Added alternate versions of Karth of the Jungle
Commit: 19c9993db9dcb1035cc3560f58a3628389c5cdc5
https://github.com/scummvm/scummvm/commit/19c9993db9dcb1035cc3560f58a3628389c5cdc5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:47:21+01:00
Commit Message:
WAGE: Added one more game
Changed paths:
engines/wage/detection_tables.h
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index fcd03d3..26bbe59 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -77,6 +77,7 @@ static const ADGameDescription gameDescriptions[] = {
// Doesn't go past first scene
BIGGAME("Twisted!", "", "Twisted! 1.6", "8ea8cc13d26d7975dc43ea7e6c193217", 992896),
FANGAME("Wishing Well", "3ee884d0d1a168d088cf2250d3a83c73", 105600),
+ FANGAME("Wizard's Warehouse", "46fa84397d83f03d3a683ec9a3000323", 163200),
FANGAME("ZikTuria", "e793155bed1a70fa2074a3fcd696b751", 54784),
FANGAME("Zoony", "e6cc8a914a4215dafbcce6315dd12cf5", 160256),
Commit: c44a7f60208c204237a28966160112d5e8b6e575
https://github.com/scummvm/scummvm/commit/c44a7f60208c204237a28966160112d5e8b6e575
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:47:22+01:00
Commit Message:
WAGE: Added Minitorian game detection
Changed paths:
engines/wage/detection_tables.h
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 26bbe59..740cb96 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -54,6 +54,7 @@ static const ADGameDescription gameDescriptions[] = {
FANGAME("Lost Crystal", "4f21ba8ee64f8d655b9eeb1e3ffd50f7", 792064),
FANGAME("Magic Rings", "6e0d1dd561d3dad8f9a7a20ed1f09b16", 112000),
FANGAME("Midnight Snack", "346982a32fc701f53bb19771d72063d0", 69504),
+ FANGAME("Minitorian", "5e8b1c21fccd629eac0300e9cf003a2d", 592384),
FANGAME("Puzzle Piece Search", "51885fe2effeaa14b2b8b08a53931805", 252928), // From Joshua's Worlds 1.0
// Empty(?) first scene
FANGAME("Pyramid of No Return", "48a9c668ce69206f57e11e1a85970d02", 392192),
Commit: c47122cb63ce4798976b1b19ff50ad752cf457d2
https://github.com/scummvm/scummvm/commit/c47122cb63ce4798976b1b19ff50ad752cf457d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:47:22+01:00
Commit Message:
WAGE: More detection entries
Changed paths:
engines/wage/detection_tables.h
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index 740cb96..abb79d0 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -51,6 +51,9 @@ static const ADGameDescription gameDescriptions[] = {
// Crash in console rendering on the first scene
FANGAME("Fantasy Quest", "599f0b2c7ecce65c39646c05f2c19c1b", 782848),
FANGAME("Find the Heart", "7ae36ffa295651cd6d2d56981d6b5ff7", 108928), // From Joshua's Worlds 1.0
+ FANGAME("Karth of the Jungle", "6e7d5ab9a151a9dfd54e409b79fee0f4", 99456),
+ FANGAME("Karth of the Jungle", "b3f60b9fd2cb2029eff65a1e112a9399", 99840), // Alternative version
+ FANGAME("Karth of the Jungle II", "873223adb36cf3bd259d116ced918bae", 204544),
FANGAME("Lost Crystal", "4f21ba8ee64f8d655b9eeb1e3ffd50f7", 792064),
FANGAME("Magic Rings", "6e0d1dd561d3dad8f9a7a20ed1f09b16", 112000),
FANGAME("Midnight Snack", "346982a32fc701f53bb19771d72063d0", 69504),
@@ -62,6 +65,7 @@ static const ADGameDescription gameDescriptions[] = {
// Crash in console rendering on the initial scene
FANGAME("Quest for the Dark Sword", "7e4e712d151f6c686f6024b0dedf5d34", 590720),
FANGAME("Quest for the Dark Sword", "308cf0fdfa129fa46b325b307f7e88c6", 590720), // Alteranative version
+ FANGAME("Radical Castle 1.0", "b08e1b935807356f86633c2bc4f810ed", 355712),
BIGGAME("raysmaze", "v1.5", "Ray's Maze1.5", "e5a3e25dddfffbed461bca3c26073117", 1437184),
BIGGAME("scepters", "", "Scepters", "b80bff315897776dda7689cdf829fab4", 360832),
// ??? problems with dog bitmap?
Commit: 2408766f2db7aa9c6d9898614800ff5374685e7d
https://github.com/scummvm/scummvm/commit/2408766f2db7aa9c6d9898614800ff5374685e7d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:47:22+01:00
Commit Message:
WAGE: Precalculate design bounds based on real data
Changed paths:
engines/wage/design.cpp
engines/wage/design.h
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index a3dbd97..4d3cbdb 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -56,9 +56,10 @@ struct PlotData {
Patterns *patterns;
uint fillType;
int thickness;
+ Design *design;
- PlotData(Graphics::Surface *s, Patterns *p, int f, int t) :
- surface(s), patterns(p), fillType(f), thickness(t) {}
+ PlotData(Graphics::Surface *s, Patterns *p, int f, int t, Design *d) :
+ surface(s), patterns(p), fillType(f), thickness(t), design(d) {}
};
void drawPixel(int x, int y, int color, void *data);
@@ -81,20 +82,26 @@ Design::~Design() {
}
void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y) {
- Common::MemoryReadStream in(_data, _len);
- Common::Rect r(0, 0, _bounds->width(), _bounds->height());
bool needRender = false;
if (_surface == NULL) {
+ _boundsCalculationMode = true;
+ _bounds->debugPrint(4, "Internal bounds:");
+ _bounds->left = _bounds->right = _bounds->top = _bounds->bottom = 0;
+ render(patterns);
+ _boundsCalculationMode = false;
+ _bounds->debugPrint(4, "Calculated bounds:");
+
_surface = new Graphics::Surface;
_surface->create(_bounds->width(), _bounds->height(), Graphics::PixelFormat::createFormatCLUT8());
+
+ Common::Rect r(0, 0, _bounds->width(), _bounds->height());
_surface->fillRect(r, kColorGreen);
needRender = true;
}
-
#if 0
- PlotData pd(_surface, &patterns, 8, 1);
+ PlotData pd(_surface, &patterns, 8, 1, this);
int x1 = 50, y1 = 50, x2 = 200, y2 = 200, borderThickness = 30;
Common::Rect inn(x1-5, y1-5, x2+5, y2+5);
drawRoundRect(inn, 6, kColorGray, false, drawPixelPlain, &pd);
@@ -115,6 +122,26 @@ void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y)
return;
#endif
+ if (needRender)
+ render(patterns);
+
+ const int padding = 3;
+ for (int i = padding; i < _bounds->height() - 2 * padding; i++) {
+ const byte *src = (const byte *)_surface->getBasePtr(padding, i);
+ byte *dst = (byte *)surface->getBasePtr(x + padding, y+i);
+ for (int j = padding; j < _bounds->width() - 2 * padding; j++) {
+ if (*src != kColorGreen)
+ *dst = *src;
+ src++;
+ dst++;
+ }
+ }
+}
+
+void Design::render(Patterns &patterns) {
+ Common::MemoryReadStream in(_data, _len);
+ bool needRender = true;
+
while (needRender) {
byte fillType = in.readByte();
byte borderThickness = in.readByte();
@@ -152,18 +179,6 @@ void Design::paint(Graphics::Surface *surface, Patterns &patterns, int x, int y)
//g_system->updateScreen();
//g_system->delayMillis(500);
}
-
- const int padding = 3;
- for (int i = padding; i < _bounds->height() - 2 * padding; i++) {
- const byte *src = (const byte *)_surface->getBasePtr(padding, i);
- byte *dst = (byte *)surface->getBasePtr(x + padding, y+i);
- for (int j = padding; j < _bounds->width() - 2 * padding; j++) {
- if (*src != kColorGreen)
- *dst = *src;
- src++;
- dst++;
- }
- }
}
bool Design::isPointOpaque(int x, int y) {
@@ -175,18 +190,43 @@ bool Design::isPointOpaque(int x, int y) {
return pixel != kColorGreen;
}
+void Design::adjustBounds(int16 x, int16 y) {
+ _bounds->left = MIN(x, _bounds->left);
+ _bounds->right = MAX(x, _bounds->left);
+ _bounds->top = MIN(y, _bounds->top);
+ _bounds->bottom = MAX(y, _bounds->bottom);
+}
+
void drawPixel(int x, int y, int color, void *data) {
PlotData *p = (PlotData *)data;
if (p->fillType > p->patterns->size())
return;
+ if (p->design && p->design->isBoundsCalculation()) {
+ if (p->thickness == 1) {
+ p->design->adjustBounds(x, y);
+ } else {
+ int x1 = x - p->thickness / 2;
+ int x2 = x1 + p->thickness;
+ int y1 = y - p->thickness / 2;
+ int y2 = y1 + p->thickness;
+
+ for (y = y1; y < y2; y++)
+ for (x = x1; x < x2; x++)
+ p->design->adjustBounds(x, y);
+ }
+
+ return;
+ }
+
byte *pat = p->patterns->operator[](p->fillType - 1);
if (p->thickness == 1) {
if (x >= 0 && x < p->surface->w && y >= 0 && y < p->surface->h) {
uint xu = (uint)x; // for letting compiler optimize it
uint yu = (uint)y;
+
*((byte *)p->surface->getBasePtr(xu, yu)) =
(pat[yu % 8] & (1 << (7 - xu % 8))) ?
color : kColorWhite;
@@ -212,6 +252,11 @@ void drawPixel(int x, int y, int color, void *data) {
void drawPixelPlain(int x, int y, int color, void *data) {
PlotData *p = (PlotData *)data;
+ if (p->design && p->design->isBoundsCalculation()) {
+ p->design->adjustBounds(x, y);
+ return;
+ }
+
if (x >= 0 && x < p->surface->w && y >= 0 && y < p->surface->h)
*((byte *)p->surface->getBasePtr(x, y)) = (byte)color;
}
@@ -229,7 +274,7 @@ void Design::drawRect(Graphics::Surface *surface, Common::ReadStream &in,
SWAP(y1, y2);
Common::Rect r(x1, y1, x2, y2);
- PlotData pd(surface, &patterns, fillType, 1);
+ PlotData pd(surface, &patterns, fillType, 1, this);
if (fillType <= patterns.size())
Graphics::drawFilledRect(r, kColorBlack, drawPixel, &pd);
@@ -259,7 +304,7 @@ void Design::drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in,
SWAP(y1, y2);
Common::Rect r(x1, y1, x2, y2);
- PlotData pd(surface, &patterns, fillType, 1);
+ PlotData pd(surface, &patterns, fillType, 1, this);
if (fillType <= patterns.size())
Graphics::drawRoundRect(r, arc/2, kColorBlack, true, drawPixel, &pd);
@@ -331,7 +376,7 @@ void Design::drawPolygon(Graphics::Surface *surface, Common::ReadStream &in,
ypoints[i] = ycoords[i];
}
- PlotData pd(surface, &patterns, fillType, 1);
+ PlotData pd(surface, &patterns, fillType, 1, this);
if (fillType <= patterns.size()) {
Graphics::drawPolygonScan(xpoints, ypoints, npoints, bbox, kColorBlack, drawPixel, &pd);
@@ -354,7 +399,7 @@ void Design::drawOval(Graphics::Surface *surface, Common::ReadStream &in,
int16 x1 = in.readSint16BE();
int16 y2 = in.readSint16BE();
int16 x2 = in.readSint16BE();
- PlotData pd(surface, &patterns, fillType, 1);
+ PlotData pd(surface, &patterns, fillType, 1, this);
if (fillType <= patterns.size())
Graphics::drawEllipse(x1, y1, x2-1, y2-1, kColorBlack, true, drawPixel, &pd);
@@ -454,7 +499,7 @@ void Design::drawRect(Graphics::Surface *surface, Common::Rect &rect, int thickn
}
void Design::drawRect(Graphics::Surface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Patterns &patterns, byte fillType) {
- PlotData pd(surface, &patterns, fillType, thickness);
+ PlotData pd(surface, &patterns, fillType, thickness, nullptr);
Graphics::drawLine(x1, y1, x2, y1, kColorBlack, drawPixel, &pd);
Graphics::drawLine(x2, y1, x2, y2, kColorBlack, drawPixel, &pd);
@@ -464,26 +509,26 @@ void Design::drawRect(Graphics::Surface *surface, int x1, int y1, int x2, int y2
void Design::drawFilledRect(Graphics::Surface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) {
- PlotData pd(surface, &patterns, fillType, 1);
+ PlotData pd(surface, &patterns, fillType, 1, nullptr);
for (int y = rect.top; y <= rect.bottom; y++)
Graphics::drawHLine(rect.left, rect.right, y, color, drawPixel, &pd);
}
void Design::drawFilledRoundRect(Graphics::Surface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType) {
- PlotData pd(surface, &patterns, fillType, 1);
+ PlotData pd(surface, &patterns, fillType, 1, nullptr);
Graphics::drawRoundRect(rect, arc, color, true, drawPixel, &pd);
}
void Design::drawHLine(Graphics::Surface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType) {
- PlotData pd(surface, &patterns, fillType, thickness);
+ PlotData pd(surface, &patterns, fillType, thickness, nullptr);
Graphics::drawHLine(x1, x2, y, color, drawPixel, &pd);
}
void Design::drawVLine(Graphics::Surface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType) {
- PlotData pd(surface, &patterns, fillType, thickness);
+ PlotData pd(surface, &patterns, fillType, thickness, nullptr);
Graphics::drawVLine(x, y1, y2, color, drawPixel, &pd);
}
diff --git a/engines/wage/design.h b/engines/wage/design.h
index baa9973..e8f42f4 100644
--- a/engines/wage/design.h
+++ b/engines/wage/design.h
@@ -76,14 +76,18 @@ public:
static void drawHLine(Graphics::Surface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType);
static void drawVLine(Graphics::Surface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType);
+ bool isBoundsCalculation() { return _boundsCalculationMode; }
+ void adjustBounds(int16 x, int16 y);
private:
byte *_data;
int _len;
Common::Rect *_bounds;
Graphics::Surface *_surface;
+ bool _boundsCalculationMode;
private:
+ void render(Patterns &patterns);
void drawRect(Graphics::Surface *surface, Common::ReadStream &in,
Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawRoundRect(Graphics::Surface *surface, Common::ReadStream &in,
Commit: a378e771c8d8865c2cc7355375cf23fd1fe2cffc
https://github.com/scummvm/scummvm/commit/a378e771c8d8865c2cc7355375cf23fd1fe2cffc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:47:22+01:00
Commit Message:
WAGE: Added alternate versions of Karth of the Jungle
Changed paths:
engines/wage/detection_tables.h
diff --git a/engines/wage/detection_tables.h b/engines/wage/detection_tables.h
index abb79d0..35ac91f 100644
--- a/engines/wage/detection_tables.h
+++ b/engines/wage/detection_tables.h
@@ -53,7 +53,9 @@ static const ADGameDescription gameDescriptions[] = {
FANGAME("Find the Heart", "7ae36ffa295651cd6d2d56981d6b5ff7", 108928), // From Joshua's Worlds 1.0
FANGAME("Karth of the Jungle", "6e7d5ab9a151a9dfd54e409b79fee0f4", 99456),
FANGAME("Karth of the Jungle", "b3f60b9fd2cb2029eff65a1e112a9399", 99840), // Alternative version
+ FANGAME("Karth of the Jungle", "e208ddbedc081b04f47a8638e6d28c18", 99840), // Alternative version
FANGAME("Karth of the Jungle II", "873223adb36cf3bd259d116ced918bae", 204544),
+ FANGAME("Karth of the Jungle II", "9327d86cf29d16c9906e34094c1a7b12", 204544), // Alternative version
FANGAME("Lost Crystal", "4f21ba8ee64f8d655b9eeb1e3ffd50f7", 792064),
FANGAME("Magic Rings", "6e0d1dd561d3dad8f9a7a20ed1f09b16", 112000),
FANGAME("Midnight Snack", "346982a32fc701f53bb19771d72063d0", 69504),
More information about the Scummvm-git-logs
mailing list