[Scummvm-git-logs] scummvm master -> 9d4210f4051f9bf382e0bf4445e558e290fe3317
neuromancer
noreply at scummvm.org
Wed Jan 26 15:58:14 UTC 2022
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:
9d4210f405 HYPNO: renamed player position constants
Commit: 9d4210f4051f9bf382e0bf4445e558e290fe3317
https://github.com/scummvm/scummvm/commit/9d4210f4051f9bf382e0bf4445e558e290fe3317
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-26T16:58:16+01:00
Commit Message:
HYPNO: renamed player position constants
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/hypno.cpp
engines/hypno/hypno.h
engines/hypno/spider/arcade.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index ea6a9d6f98d..749f8751dcc 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -139,8 +139,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
_playerFrames = decodeFrames(arc->player);
_playerFrameSep = 0;
// Only used in spider
- _currentPlayerPosition = PlayerLeft;
- _lastPlayerPosition = PlayerLeft;
+ _currentPlayerPosition = kPlayerLeft;
+ _lastPlayerPosition = kPlayerLeft;
_skipLevel = false;
for (Frames::iterator it =_playerFrames.begin(); it != _playerFrames.end(); ++it) {
@@ -191,16 +191,16 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
_health = 0;
} else if (event.kbd.keycode == Common::KEYCODE_LEFT) {
_lastPlayerPosition = _currentPlayerPosition;
- _currentPlayerPosition = PlayerLeft;
+ _currentPlayerPosition = kPlayerLeft;
} else if (event.kbd.keycode == Common::KEYCODE_DOWN) {
_lastPlayerPosition = _currentPlayerPosition;
- _currentPlayerPosition = PlayerBottom;
+ _currentPlayerPosition = kPlayerBottom;
} else if (event.kbd.keycode == Common::KEYCODE_RIGHT) {
_lastPlayerPosition = _currentPlayerPosition;
- _currentPlayerPosition = PlayerRight;
+ _currentPlayerPosition = kPlayerRight;
} else if (event.kbd.keycode == Common::KEYCODE_UP) {
_lastPlayerPosition = _currentPlayerPosition;
- _currentPlayerPosition = PlayerTop;
+ _currentPlayerPosition = kPlayerTop;
}
break;
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index a1b8c2956e1..2a894e498c4 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -54,7 +54,7 @@ HypnoEngine::HypnoEngine(OSystem *syst, const ADGameDescription *gd)
_playerFrameIdx(0), _playerFrameSep(0), _refreshConversation(false),
_countdown(0), _timerStarted(false), _score(0),
_defaultCursor(""), _checkpoint(""),
- _currentPlayerPosition(PlayerLeft), _lastPlayerPosition(PlayerLeft),
+ _currentPlayerPosition(kPlayerLeft), _lastPlayerPosition(kPlayerLeft),
_screenW(640), _screenH(480) {
_rnd = new Common::RandomSource("hypno");
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 3f6b5976794..944e941c8ef 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -62,10 +62,10 @@ typedef Common::Array<Graphics::Surface *> Frames;
// Player positions
enum PlayerPosition {
- PlayerTop = 'T',
- PlayerBottom = 'B',
- PlayerLeft = 'L',
- PlayerRight = 'R'
+ kPlayerTop = 'T',
+ kPlayerBottom = 'B',
+ kPlayerLeft = 'L',
+ kPlayerRight = 'R'
};
class HypnoEngine : public Engine {
diff --git a/engines/hypno/spider/arcade.cpp b/engines/hypno/spider/arcade.cpp
index 77003ea002e..0d32751f5fb 100644
--- a/engines/hypno/spider/arcade.cpp
+++ b/engines/hypno/spider/arcade.cpp
@@ -85,63 +85,63 @@ void SpiderEngine::drawPlayer() {
else if (_lastPlayerPosition != _currentPlayerPosition && (_playerFrameIdx % 4 == 0 || _playerFrameIdx % 4 == 3)) {
switch(_lastPlayerPosition) {
- case PlayerLeft:
+ case kPlayerLeft:
switch(_currentPlayerPosition) {
- case PlayerTop:
+ case kPlayerTop:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 1;
break;
- case PlayerBottom:
+ case kPlayerBottom:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 13;
break;
- case PlayerRight:
+ case kPlayerRight:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 45;
break;
}
break;
- case PlayerRight:
+ case kPlayerRight:
switch(_currentPlayerPosition) {
- case PlayerTop:
+ case kPlayerTop:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 5;
break;
- case PlayerBottom:
+ case kPlayerBottom:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 17;
break;
- case PlayerLeft:
+ case kPlayerLeft:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 33;
break;
}
break;
- case PlayerBottom:
+ case kPlayerBottom:
switch(_currentPlayerPosition) {
- case PlayerTop:
+ case kPlayerTop:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 9;
break;
- case PlayerLeft:
+ case kPlayerLeft:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 29;
break;
- case PlayerRight:
+ case kPlayerRight:
_lastPlayerPosition = _currentPlayerPosition;
_playerFrameIdx = 41;
break;
}
break;
- case PlayerTop:
+ case kPlayerTop:
switch(_currentPlayerPosition) {
- case PlayerBottom:
+ case kPlayerBottom:
_playerFrameIdx = 21;
break;
- case PlayerLeft:
+ case kPlayerLeft:
_playerFrameIdx = 25;
break;
- case PlayerRight:
+ case kPlayerRight:
_playerFrameIdx = 37;
break;
}
More information about the Scummvm-git-logs
mailing list