From 1dd7315fa4e8d2ba69d854540fec4680f477ef3d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 26 Oct 2022 22:01:44 -0700 Subject: [PATCH] MM: MM1: In progress map 38 --- devtools/create_mm/files/mm1/strings_en.yml | 10 +++ engines/mm/mm1/maps/map38.cpp | 70 ++++++++++++++++++--- engines/mm/mm1/maps/map38.h | 40 +++++++++++- 3 files changed, 110 insertions(+), 10 deletions(-) diff --git a/devtools/create_mm/files/mm1/strings_en.yml b/devtools/create_mm/files/mm1/strings_en.yml index f7bef4dcc45..2c8892b690a 100644 --- a/devtools/create_mm/files/mm1/strings_en.yml +++ b/devtools/create_mm/files/mm1/strings_en.yml @@ -1353,3 +1353,13 @@ maps: opening: "AN OPENING ABOVE LEADS OUTSIDE,\nCLIMB OUT (Y/N)?" spins: "THE FLOOR SPINS!" wall: "THE WALL IS PAINTED FROM CEILING TO\nFLOOR IN A BLACK AND WHITE CHECKERED\nPATTERN!" + + map38: + message4: "ETCHED IN GOLD, MESSAGE 4 READS:'\nOF-BE-HAS-TRUE-KNOWLEDGE-PLANE-A-LEVEL-'\nTO-REALITY-IT" + banner: "A BANNER READS:\nTHE LABYRINTH OF LAZZERUTH...\nFEW HAVE ENTERED, NONE HAVE RETURNED!" + face1: "INSET IN THE WALL, A STONE FACE\nYELLS: ""MY BRAIN HURTS!""" + face2: "INSET IN THE WALL, A STONE FACE\nSPEAKS: ""I WOULD PAY HIGHLY FOR A GREEN\nHANDLED, PEARL ENCRUSTED ABELNUSKI.""" + face3: "INSET IN THE WALL, A STONE FACE\nSPEAKS: ""I SEE ALL, HEAR ALL,\nKNOW NOTHING...""" + face4: "INSET IN THE WALL, A STONE FACE\nPROCLAIMS: ""OKRIM IS WATCHING.\nHE STUDIES YOUR WEAKNESSES!""" + wall: THE WALL IS PAINTED FROM CEILING TO\nFLOOR IN A BLACK AND WHITE CHECKERED\nPATTERN!" + ringing: "A STRANGE RINGING SOUND STARTLES\nTHE PARTY. YOU ARE TELEPORTED!" diff --git a/engines/mm/mm1/maps/map38.cpp b/engines/mm/mm1/maps/map38.cpp index 38144473fd6..a4fd59f2cab 100644 --- a/engines/mm/mm1/maps/map38.cpp +++ b/engines/mm/mm1/maps/map38.cpp @@ -31,12 +31,11 @@ namespace Maps { void Map38::special() { // Scan for special actions on the map cell - for (uint i = 0; i < _data[50]; ++i) { + for (uint i = 0; i < 19; ++i) { if (g_maps->_mapOffset == _data[51 + i]) { // Found a specially handled cell, but it // only triggers in designated direction(s) - if (g_maps->_forwardMask & _data[75 + i]) { - + if (g_maps->_forwardMask & _data[70 + i]) { (this->*SPECIAL_FN[i])(); } else { checkPartyDead(); @@ -44,14 +43,69 @@ void Map38::special() { return; } } -/* - // All other cells on the map are encounters - g_maps->clearSpecial(); - g_globals->_encounters.execute(); - */ + + send(SoundMessage(STRING["maps.map38.ringing"])); + g_maps->_mapPos = Common::Point(getRandomNumber(16) - 1, + getRandomNumber(16) - 1); + updateGame(); } void Map38::special00() { + send(SoundMessage(STRING["maps.map38.message4"])); +} + +void Map38::special01() { +} + +void Map38::special02() { +} + +void Map38::special03() { +} + +void Map38::special04() { +} + +void Map38::special05() { +} + +void Map38::special06() { +} + +void Map38::special07() { +} + +void Map38::special08() { +} + +void Map38::special09() { +} + +void Map38::special10() { +} + +void Map38::special11() { +} + +void Map38::special12() { +} + +void Map38::special13() { +} + +void Map38::special14() { +} + +void Map38::special15() { +} + +void Map38::special16() { +} + +void Map38::special17() { +} + +void Map38::special18() { } } // namespace Maps diff --git a/engines/mm/mm1/maps/map38.h b/engines/mm/mm1/maps/map38.h index dc672b61448..eaa0c851699 100644 --- a/engines/mm/mm1/maps/map38.h +++ b/engines/mm/mm1/maps/map38.h @@ -32,9 +32,45 @@ class Map38 : public Map { typedef void (Map38:: *SpecialFn)(); private: void special00(); + void special01(); + void special02(); + void special03(); + void special04(); + void special05(); + void special06(); + void special07(); + void special08(); + void special09(); + void special10(); + void special11(); + void special12(); + void special13(); + void special14(); + void special15(); + void special16(); + void special17(); + void special18(); - const SpecialFn SPECIAL_FN[1] = { - &Map38::special00 + const SpecialFn SPECIAL_FN[19] = { + &Map38::special00, + &Map38::special01, + &Map38::special02, + &Map38::special03, + &Map38::special04, + &Map38::special05, + &Map38::special06, + &Map38::special07, + &Map38::special08, + &Map38::special09, + &Map38::special10, + &Map38::special11, + &Map38::special12, + &Map38::special13, + &Map38::special14, + &Map38::special15, + &Map38::special16, + &Map38::special17, + &Map38::special18 }; public: Map38() : Map(38, "qvl2", 0x703) {}