[Scummvm-git-logs] scummvm master -> 0f338b21aea0c3f20264b7422509187163cc4c5c
Strangerke
noreply at scummvm.org
Sun Feb 23 07:46:33 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0f338b21ae GOT: Add eyeballs mode for chapter 2 shovel maze (#6451)
Commit: 0f338b21aea0c3f20264b7422509187163cc4c5c
https://github.com/scummvm/scummvm/commit/0f338b21aea0c3f20264b7422509187163cc4c5c
Author: blowfist (nik_89 at xroutine.net)
Date: 2025-02-23T08:46:30+01:00
Commit Message:
GOT: Add eyeballs mode for chapter 2 shovel maze (#6451)
In chapter 2, there is a section where you enter in a pitch dark room
and Thor is replaced with eyeballs. This is all you can see while
you move around in the invisible maze to find the shovel.
This patch fully implements this mode and also adds these additional
related features :
* bruised eye animation that happens after the shovel is
found, with Thor's face.
* Saving and loading preserves the eyeball effect in
the room 105.
* Thor's spinning animation takes the eyeballs mode in
consideration. Although the only way the user can
die in that room is to explicitely use the "die"
feature/command.
The original code was used as a guideline to implement this feature.
Changed paths:
engines/got/game/back.cpp
engines/got/game/main.cpp
engines/got/game/move_patterns.cpp
engines/got/vars.h
engines/got/views/game_content.cpp
diff --git a/engines/got/game/back.cpp b/engines/got/game/back.cpp
index bf6043e6526..7fe56c2ac83 100644
--- a/engines/got/game/back.cpp
+++ b/engines/got/game/back.cpp
@@ -46,6 +46,17 @@ const char *ITEM_NAMES[] = {
static const char *odinEndMessage;
void showLevel(const int newLevel) {
+ if (newLevel == 105) { // Shovel Maze
+ _G(thorInfo)._armor = 2; // eyeballs mode
+ loadNewThor();
+ _G(eyeballs) = 1;
+ } else if (_G(eyeballs) == 1) {
+ _G(setup).f25 = 0;
+ _G(thorInfo)._armor = 1;
+ loadNewThor();
+ _G(eyeballs) = 0;
+ }
+
_G(bossActive) = false;
if (!_G(shieldOn))
_G(actor[2])._active = false;
diff --git a/engines/got/game/main.cpp b/engines/got/game/main.cpp
index 52e2ca79efe..db9f9b51d25 100644
--- a/engines/got/game/main.cpp
+++ b/engines/got/game/main.cpp
@@ -22,6 +22,7 @@
#include "common/memstream.h"
#include "got/game/back.h"
#include "got/vars.h"
+#include "got/gfx/image.h" // loadNewThor
namespace Got {
@@ -64,6 +65,12 @@ void setupLoad() {
_G(currentLevel) = _G(newLevel);
showLevel(_G(newLevel));
+
+ if (_G(currentLevel) == 105) { // Shovel Maze
+ _G(thorInfo)._armor = 2; // eyeballs mode
+ loadNewThor();
+ _G(eyeballs) = 1;
+ }
}
void pause(int delay) {
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 926e4129c03..9d043170f6f 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -789,6 +789,12 @@ int movementZero(Actor *actor) {
}
}
+ if (_G(eyeballs)) {
+ nextFrame(actor);
+ actor->_dir = oldDir;
+ return d;
+ }
+
actor->_moveCounter = 5;
actor->_nextFrame = 0;
actor->_dir = oldDir;
diff --git a/engines/got/vars.h b/engines/got/vars.h
index bcef339f861..3988179a1e9 100644
--- a/engines/got/vars.h
+++ b/engines/got/vars.h
@@ -203,6 +203,7 @@ public:
int _currentArea = 0;
bool _thorSpecialFlag = false;
byte _explosionRow = 0;
+ bool _eyeballs = 0;
};
#define _G(X) (g_vars->_##X)
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index e9f1e208eff..d124ae3ae5c 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -207,6 +207,14 @@ bool GameContent::tick() {
break;
}
+ if (_G(eyeballs) == 1) { // eyeballs movement animation
+ if (!_G(setup).f25) {
+ _G(thor)->_dir = 0;
+ } else {
+ _G(thor)->_dir = 1;
+ }
+ }
+
checkForAreaChange();
// Check for end of game area
@@ -499,8 +507,10 @@ void GameContent::thorDies() {
void GameContent::spinThor() {
static const byte DIRS[] = {0, 2, 1, 3};
- _G(thor)->_dir = DIRS[(_deathCtr / SPIN_INTERVAL) % 4];
- _G(thor)->_lastDir = DIRS[(_deathCtr / SPIN_INTERVAL) % 4];
+ if (!_G(eyeballs)) {
+ _G(thor)->_dir = DIRS[(_deathCtr / SPIN_INTERVAL) % 4];
+ _G(thor)->_lastDir = DIRS[(_deathCtr / SPIN_INTERVAL) % 4];
+ }
++_deathCtr;
}
More information about the Scummvm-git-logs
mailing list