SCUMM: _currentLights is v0 only
This commit is contained in:
parent
e14e4ab3b0
commit
daff6f36ae
4 changed files with 16 additions and 11 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include "scumm/he/intern_he.h"
|
#include "scumm/he/intern_he.h"
|
||||||
#endif
|
#endif
|
||||||
#include "scumm/resource.h"
|
#include "scumm/resource.h"
|
||||||
|
#include "scumm/scumm_v0.h"
|
||||||
#include "scumm/scumm_v5.h"
|
#include "scumm/scumm_v5.h"
|
||||||
#include "scumm/scumm_v6.h"
|
#include "scumm/scumm_v6.h"
|
||||||
#include "scumm/usage_bits.h"
|
#include "scumm/usage_bits.h"
|
||||||
|
@ -1487,15 +1488,17 @@ void ScummEngine_v5::drawFlashlight() {
|
||||||
_flashlight.isDrawn = true;
|
_flashlight.isDrawn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// V0 Maniac doesn't have a ScummVar for VAR_CURRENT_LIGHTS, and just uses
|
int ScummEngine_v0::getCurrentLights() const {
|
||||||
// an internal variable. Emulate this to prevent overwriting script vars...
|
// V0 Maniac doesn't have a ScummVar for VAR_CURRENT_LIGHTS, and just uses
|
||||||
// And V6 games do not use the "lights" at all. There, the whole screen is
|
// an internal variable. Emulate this to prevent overwriting script vars...
|
||||||
// always visible, and actors are always colored, so we fake the correct
|
// And V6 games do not use the "lights" at all. There, the whole screen is
|
||||||
// light value for it.
|
// always visible, and actors are always colored, so we fake the correct
|
||||||
|
// light value for it.
|
||||||
|
return _currentLights;
|
||||||
|
}
|
||||||
|
|
||||||
int ScummEngine::getCurrentLights() const {
|
int ScummEngine::getCurrentLights() const {
|
||||||
if (_game.id == GID_MANIAC && _game.version == 0)
|
if (_game.version >= 6)
|
||||||
return _currentLights;
|
|
||||||
else if (_game.version >= 6)
|
|
||||||
return LIGHTMODE_room_lights_on | LIGHTMODE_actor_use_colors;
|
return LIGHTMODE_room_lights_on | LIGHTMODE_actor_use_colors;
|
||||||
else
|
else
|
||||||
return VAR(VAR_CURRENT_LIGHTS);
|
return VAR(VAR_CURRENT_LIGHTS);
|
||||||
|
|
|
@ -263,7 +263,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
|
||||||
_bytesPerPixel = 1;
|
_bytesPerPixel = 1;
|
||||||
_doEffect = false;
|
_doEffect = false;
|
||||||
_snapScroll = false;
|
_snapScroll = false;
|
||||||
_currentLights = 0;
|
|
||||||
_shakeEnabled = false;
|
_shakeEnabled = false;
|
||||||
_shakeFrame = 0;
|
_shakeFrame = 0;
|
||||||
_screenStartStrip = 0;
|
_screenStartStrip = 0;
|
||||||
|
@ -713,6 +712,7 @@ ScummEngine_v0::ScummEngine_v0(OSystem *syst, const DetectorResult &dr)
|
||||||
: ScummEngine_v2(syst, dr) {
|
: ScummEngine_v2(syst, dr) {
|
||||||
|
|
||||||
_currentMode = 0;
|
_currentMode = 0;
|
||||||
|
_currentLights = 0;
|
||||||
|
|
||||||
_activeVerb = kVerbNone;
|
_activeVerb = kVerbNone;
|
||||||
_activeObject = 0;
|
_activeObject = 0;
|
||||||
|
|
|
@ -942,8 +942,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
bool isLightOn() const;
|
bool isLightOn() const;
|
||||||
|
|
||||||
byte _currentLights;
|
virtual int getCurrentLights() const;
|
||||||
int getCurrentLights() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initScreens(int b, int h);
|
void initScreens(int b, int h);
|
||||||
|
|
|
@ -47,6 +47,7 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
byte _currentMode;
|
byte _currentMode;
|
||||||
|
byte _currentLights;
|
||||||
|
|
||||||
int _activeVerb; // selected verb
|
int _activeVerb; // selected verb
|
||||||
int _activeObject; // 1st selected object (see OBJECT_V0())
|
int _activeObject; // 1st selected object (see OBJECT_V0())
|
||||||
|
@ -115,6 +116,8 @@ protected:
|
||||||
|
|
||||||
bool ifEqualActiveObject2Common(bool checkType);
|
bool ifEqualActiveObject2Common(bool checkType);
|
||||||
|
|
||||||
|
virtual int getCurrentLights() const;
|
||||||
|
|
||||||
/* Version C64 script opcodes */
|
/* Version C64 script opcodes */
|
||||||
void o_stopCurrentScript();
|
void o_stopCurrentScript();
|
||||||
void o_walkActorToObject();
|
void o_walkActorToObject();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue