[Scummvm-git-logs] scummvm master -> ed3bd2829236f713a475832922818a3c85cd2bd3
bluegr
bluegr at gmail.com
Thu Sep 16 17:34:42 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:
b0f75b365d GROOVIE: Improve list formatting
ed3bd28292 GROOVIE: Some work on the 11h beehive puzzle. Add stubs for 11h puzzles
Commit: b0f75b365d292a2a176a98e9280411aa7ad1ba89
https://github.com/scummvm/scummvm/commit/b0f75b365d292a2a176a98e9280411aa7ad1ba89
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-09-16T20:34:32+03:00
Commit Message:
GROOVIE: Improve list formatting
Changed paths:
engines/groovie/logic/tlcgame.cpp
engines/groovie/video/vdx.cpp
diff --git a/engines/groovie/logic/tlcgame.cpp b/engines/groovie/logic/tlcgame.cpp
index 60f02e91ff..693b493a76 100644
--- a/engines/groovie/logic/tlcgame.cpp
+++ b/engines/groovie/logic/tlcgame.cpp
@@ -34,13 +34,24 @@
namespace Groovie {
// This a list of files for background music. This list is hardcoded in the TLC player.
-const char *kTlcMusicFiles[] = {"ep01epm", "ep01tatm", "amb_hs", "amb_mr", "amb_kr", "amb_mo", "music_rc", "amb_ds", "amb_ds3",
- "amb_jr", "amb_mr4", "amb_jr4", "amb_jr2", "amb_kr2", "amb_mr2", "amb_br", "amb_ds2", "amb_jr3",
- "amb_ds4", "amb_kr3", "amb_to1", "amb_to2", "ep02epm", "ep02tatm", "ep03epm", "ep03tatm", "ep04epm",
- "ep04tatm", "ep05epm", "ep05tatm", "ep06epm", "ep06tatm", "ep07epm", "ep07tatm", "ep08epm", "ep08tatm",
- "ep09epm", "ep09tatm", "ep10epm", "ep10tatm", "ep11epm", "ep11tatm", "ep12epm", "ep12tatm", "ep13epm",
- "ep13tatm", "ep14epm", "ep14tatm", "ep15epm", "ep15tatm" };
-const uint8 kTlcEpQuestToPlay[] = { 0x0E, 0x0F, 0x0B, 0x10, 0x11, 0x12, 0x0C, 0x0C, 0x09, 0x06, 0x0F, 0x0C, 0x0B, 0x0D, 0x0D };
+const char *kTlcMusicFiles[] = {
+ "ep01epm", "ep01tatm", "amb_hs", "amb_mr", "amb_kr",
+ "amb_mo", "music_rc", "amb_ds", "amb_ds3", "amb_jr",
+ "amb_mr4", "amb_jr4", "amb_jr2", "amb_kr2", "amb_mr2",
+ "amb_br", "amb_ds2", "amb_jr3", "amb_ds4", "amb_kr3",
+ "amb_to1", "amb_to2", "ep02epm", "ep02tatm", "ep03epm",
+ "ep03tatm", "ep04epm", "ep04tatm", "ep05epm", "ep05tatm",
+ "ep06epm", "ep06tatm", "ep07epm", "ep07tatm", "ep08epm",
+ "ep08tatm", "ep09epm", "ep09tatm", "ep10epm", "ep10tatm",
+ "ep11epm", "ep11tatm", "ep12epm", "ep12tatm", "ep13epm",
+ "ep13tatm", "ep14epm", "ep14tatm", "ep15epm", "ep15tatm"
+};
+
+const uint8 kTlcEpQuestToPlay[] = {
+ 0x0E, 0x0F, 0x0B, 0x10, 0x11,
+ 0x12, 0x0C, 0x0C, 0x09, 0x06,
+ 0x0F, 0x0C, 0x0B, 0x0D, 0x0D
+};
TlcGame::TlcGame(byte *scriptVariables) :
diff --git a/engines/groovie/video/vdx.cpp b/engines/groovie/video/vdx.cpp
index dc66ce06a0..5cc83aa389 100644
--- a/engines/groovie/video/vdx.cpp
+++ b/engines/groovie/video/vdx.cpp
@@ -210,12 +210,18 @@ bool VDXPlayer::playFrameInternal() {
}
static const uint16 vdxBlockMapLookup[] = {
-0xc800, 0xec80, 0xfec8, 0xffec, 0xfffe, 0x3100, 0x7310, 0xf731, 0xff73, 0xfff7, 0x6c80, 0x36c8, 0x136c, 0x6310, 0xc631, 0x8c63,
-0xf000, 0xff00, 0xfff0, 0x1111, 0x3333, 0x7777, 0x6666, 0xcccc, 0x0ff0, 0x00ff, 0xffcc, 0x0076, 0xff33, 0x0ee6, 0xccff, 0x6770,
-0x33ff, 0x6ee0, 0x4800, 0x2480, 0x1248, 0x0024, 0x0012, 0x2100, 0x4210, 0x8421, 0x0042, 0x0084, 0xf888, 0x0044, 0x0032, 0x111f,
-0x22e0, 0x4c00, 0x888f, 0x4470, 0x2300, 0xf111, 0x0e22, 0x00c4, 0xf33f, 0xfccf, 0xff99, 0x99ff, 0x4444, 0x2222, 0xccee, 0x7733,
-0x00f8, 0x00f1, 0x00bb, 0x0cdd, 0x0f0f, 0x0f88, 0x13f1, 0x19b3, 0x1f80, 0x226f, 0x27ec, 0x3077, 0x3267, 0x37e4, 0x38e3, 0x3f90,
-0x44cf, 0x4cd9, 0x4c99, 0x5555, 0x603f, 0x6077, 0x6237, 0x64c9, 0x64cd, 0x6cd9, 0x70ef, 0x0f00, 0x00f0, 0x0000, 0x4444, 0x2222
+ 0xc800, 0xec80, 0xfec8, 0xffec, 0xfffe, 0x3100, 0x7310, 0xf731,
+ 0xff73, 0xfff7, 0x6c80, 0x36c8, 0x136c, 0x6310, 0xc631, 0x8c63,
+ 0xf000, 0xff00, 0xfff0, 0x1111, 0x3333, 0x7777, 0x6666, 0xcccc,
+ 0x0ff0, 0x00ff, 0xffcc, 0x0076, 0xff33, 0x0ee6, 0xccff, 0x6770,
+ 0x33ff, 0x6ee0, 0x4800, 0x2480, 0x1248, 0x0024, 0x0012, 0x2100,
+ 0x4210, 0x8421, 0x0042, 0x0084, 0xf888, 0x0044, 0x0032, 0x111f,
+ 0x22e0, 0x4c00, 0x888f, 0x4470, 0x2300, 0xf111, 0x0e22, 0x00c4,
+ 0xf33f, 0xfccf, 0xff99, 0x99ff, 0x4444, 0x2222, 0xccee, 0x7733,
+ 0x00f8, 0x00f1, 0x00bb, 0x0cdd, 0x0f0f, 0x0f88, 0x13f1, 0x19b3,
+ 0x1f80, 0x226f, 0x27ec, 0x3077, 0x3267, 0x37e4, 0x38e3, 0x3f90,
+ 0x44cf, 0x4cd9, 0x4c99, 0x5555, 0x603f, 0x6077, 0x6237, 0x64c9,
+ 0x64cd, 0x6cd9, 0x70ef, 0x0f00, 0x00f0, 0x0000, 0x4444, 0x2222
};
void VDXPlayer::getDelta(Common::ReadStream *in) {
Commit: ed3bd2829236f713a475832922818a3c85cd2bd3
https://github.com/scummvm/scummvm/commit/ed3bd2829236f713a475832922818a3c85cd2bd3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-09-16T20:34:32+03:00
Commit Message:
GROOVIE: Some work on the 11h beehive puzzle. Add stubs for 11h puzzles
Changed paths:
engines/groovie/logic/t11hgame.cpp
engines/groovie/logic/t11hgame.h
diff --git a/engines/groovie/logic/t11hgame.cpp b/engines/groovie/logic/t11hgame.cpp
index 27add7b1f9..f1b414be21 100644
--- a/engines/groovie/logic/t11hgame.cpp
+++ b/engines/groovie/logic/t11hgame.cpp
@@ -44,20 +44,22 @@ void T11hGame::handleOp(uint8 op) {
switch (op) {
case 1:
debugC(1, kDebugScript, "Groovie::Script Op42 (0x%02X): T11H Connect four in the dining room. (tb.grv) TODO", op);
+ opConnectFour();
break;
case 2:
- debugC(1, kDebugScript, "Groovie::Script Op42 (0x%02X): T11H Beehive Puzzle in the top room (hs.grv) TODO", op);
+ debugC(1, kDebugScript, "Groovie::Script Op42 (0x%02X): T11H Beehive Puzzle in the top room (hs.grv)", op);
opBeehive();
break;
case 3:
- debugC(1, kDebugScript, "Groovie::Script Op42 (0x%02X): T11H Make last move on modern art picture in the gallery (bs.grv) TODO", op);
+ debugC(1, kDebugScript, "Groovie::Script Op42 (0x%02X): T11H Make last move on modern art picture in the gallery (bs.grv)", op);
opGallery();
break;
case 4:
debugC(1, kDebugScript, "Groovie::Script Op42 (0x%02X): T11H Triangle in the Chapel (tx.grv)", op);
+ opTriangle();
break;
case 5:
@@ -99,13 +101,16 @@ void T11hGame::handleOp(uint8 op) {
* Space -2 is the next piece, outside of the box
*/
void T11hGame::opMouseTrap() {
- // FIXME: properly implement mouse trap game
+ // TODO: Finish the logic
+ byte op = _scriptVariables[2];
+
+ warning("Mousetrap subop %d", op);
+
// variable 24 is the mouse?
//_scriptVariables[24] = 2;
- switch (_scriptVariables[2]) {
+ switch (op) {
case 0:
- warning("mouse trap _scriptVariables[2] is 0 not implemented yet");
break;
case 1: // init board
// value of 0 is V, 1 is <, 2 is ^, 3 is >
@@ -118,7 +123,7 @@ void T11hGame::opMouseTrap() {
_scriptVariables[i] = _random.getRandomNumber(3);
}
break;
- case 2: // before player choose move floor, set the banned move
+ case 2: // before player chooses the floor to move, set the banned move
{
int clicked = int(_scriptVariables[0]) * 5 + int(_scriptVariables[1]) + 1;
_scriptVariables[clicked + 50] = 0;
@@ -130,9 +135,6 @@ void T11hGame::opMouseTrap() {
// this probably also sets a variable to allow the player to
// move the mouse, and checks for win/lose
break;
- case 4: // 4 is not in the switch/case according to Ghidra
- warning("mouse trap _scriptVariables[2] is 4? this shouldn't happen");
- break;
case 5: // maybe player moving mouse
break;
case 6: // Stauf moving floor?
@@ -143,31 +145,83 @@ void T11hGame::opMouseTrap() {
break;
default:
- warning("unknown mouse trap op %d", _scriptVariables[2]);
+ warning("Unknown mousetrap op %d", op);
break;
}
}
+void T11hGame::opConnectFour() {
+ // TODO: Finish the logic
+}
+
/*
* Beehive puzzle
*
* An infection-style game in which the player must cover more
* territory than the computer. It's similar to the microscope puzzle
* in the 7th Guest. The playfield is a honeycomb made of 61
- * hexagons.
+ * hexagons. The hexagons are numbered starting from the top-left
+ * corner, with a direction from bottom left to top right.
*/
void T11hGame::opBeehive() {
- // FIXME: properly implement Beehive game
- // for now just auto-solve the puzzle so the player can continue
- _scriptVariables[13] = 5;
+ // TODO: Finish the logic
+ int8 *hexagons = (int8 *)_scriptVariables + 25;
+ int8 *hexDifference = (int8 *)_scriptVariables + 13;
+ byte op = _scriptVariables[14] - 1;
+
+ warning("Beehive subop %d", op);
+
+ //*hexDifference = 4;
+ *hexDifference = 5; // DEBUG: set the difference to 5 to skip the game
- // TODO: Finish logic
- switch (_scriptVariables[14]) {
- case 1: // init board's hexagons
+ switch (op) {
+ case 0: // init board's hexagons
+ memset(_beehiveHexagons, 0, 60);
+ _beehiveHexagons[0] = BEEHIVE_YELLOW;
+ _beehiveHexagons[4] = BEEHIVE_RED;
+ _beehiveHexagons[34] = BEEHIVE_YELLOW;
+ _beehiveHexagons[60] = BEEHIVE_RED;
+ _beehiveHexagons[56] = BEEHIVE_YELLOW;
+ _beehiveHexagons[26] = BEEHIVE_RED;
+ break;
+ case 1:
+ memset(hexagons, 0, 60);
+ _scriptVariables[85] = 0;
+ //opBeehiveSub2(); // TODO
+ // TODO: Check opBeehiveSub2()'s result
+ //*hexDifference = opBeehiveGetHexDifference();
+ break;
+ case 2:
+ memset(hexagons, 0, 60);
+ _scriptVariables[85] = 0;
+ //opBeehiveSub4(); // TODO
+ break;
+ case 3:
+ break;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ break;
+ default:
break;
}
}
+int8 T11hGame::opBeehiveGetHexDifference() {
+ return (opBeehiveGetTotal(_beehiveHexagons) >= 0) + 5;
+}
+
+int8 T11hGame::opBeehiveGetTotal(int8 *hexagons) {
+ int8 result = 0;
+
+ for (int i = 0; i < 61; i++)
+ result += hexagons[i];
+
+ return result;
+}
+
void T11hGame::opPente() {
// FIXME: properly implement Pente game (the final puzzle)
// for now just auto-solve the puzzle so the player can continue
@@ -318,6 +372,10 @@ byte T11hGame::opGallerySub(int one, byte* field) {
return 0;
}
+void T11hGame::opTriangle() {
+ // TODO
+}
+
// This function is mainly for debugging purposes
void inline T11hGame::setScriptVar(uint16 var, byte value) {
_scriptVariables[var] = value;
diff --git a/engines/groovie/logic/t11hgame.h b/engines/groovie/logic/t11hgame.h
index a03d506f2e..3e3cb615ba 100644
--- a/engines/groovie/logic/t11hgame.h
+++ b/engines/groovie/logic/t11hgame.h
@@ -30,6 +30,9 @@ namespace Groovie {
class GroovieEngine;
+#define BEEHIVE_YELLOW -1
+#define BEEHIVE_RED 1
+
class T11hGame {
public:
#ifdef ENABLE_GROOVIE2
@@ -42,15 +45,22 @@ private:
Common::RandomSource _random;
void opMouseTrap();
+ void opConnectFour();
void opBeehive();
void opPente();
void opGallery();
+ void opTriangle();
byte opGallerySub(int one, byte *field);
+ int8 opBeehiveGetHexDifference();
+ int8 opBeehiveGetTotal(int8 *hexagons);
void inline setScriptVar(uint16 var, byte value);
void inline setScriptVar16(uint16 var, uint16 value);
uint16 inline getScriptVar16(uint16 var);
byte *_scriptVariables;
+
+ int8 _beehiveHexagons[61];
+
static const byte kGalleryLinks[21][10];
#endif
};
More information about the Scummvm-git-logs
mailing list