MYST3: Name some effects related variables

This commit is contained in:
Bastien Bouclet 2014-02-23 13:44:35 +01:00
parent 19dd4dcb11
commit 77b707c869
4 changed files with 43 additions and 8 deletions

View File

@ -75,6 +75,7 @@ Script::Script(Myst3Engine *vm):
OP_1( 31, waterEffectSetSpeed, kValue );
OP_1( 32, waterEffectSetAttenuation, kValue );
OP_2( 33, waterEffectSetWave, kValue, kValue );
OP_2( 34, shakeEffectSet, kEvalValue, kEvalValue );
OP_2( 35, sunspotAdd, kValue, kValue );
OP_3( 36, sunspotAddIntensity, kValue, kValue, kValue );
OP_4( 37, sunspotAddVarIntensity, kValue, kValue, kValue, kVar );
@ -625,6 +626,17 @@ void Script::waterEffectSetWave(Context &c, const Opcode &cmd) {
_vm->_state->setWaterEffectAmpl(cmd.args[1]);
}
void Script::shakeEffectSet(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Set shake effect amplitude to %d and period to %d",
cmd.op, cmd.args[0], cmd.args[1]);
uint16 ampl = _vm->_state->valueOrVarValue(cmd.args[0]);
uint16 period = _vm->_state->valueOrVarValue(cmd.args[1]);
_vm->_state->setShakeEffectAmpl(ampl);
_vm->_state->setShakeEffectFramePeriod(period);
}
void Script::sunspotAdd(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Add sunspot: pitch %d heading %d", cmd.op, cmd.args[0], cmd.args[1]);

View File

@ -125,6 +125,7 @@ private:
DECLARE_OPCODE(waterEffectSetSpeed);
DECLARE_OPCODE(waterEffectSetAttenuation);
DECLARE_OPCODE(waterEffectSetWave);
DECLARE_OPCODE(shakeEffectSet);
DECLARE_OPCODE(sunspotAdd);
DECLARE_OPCODE(sunspotAddIntensity);
DECLARE_OPCODE(sunspotAddVarIntensity);

View File

@ -112,14 +112,25 @@ GameState::GameState(Myst3Engine *vm):
VAR(92, HotspotActiveRect, false)
VAR(93, WaterEffectRunning, true)
VAR(94, WaterEffectActive, true)
VAR(95, WaterEffectSpeed, true)
VAR(96, WaterEffectAttenuation, true)
VAR(97, WaterEffectFrequency, true)
VAR(98, WaterEffectAmpl, true)
VAR(99, WaterEffectMaxStep, true)
VAR(100, WaterEffectAmplOffset, true)
VAR(93, WaterEffectRunning, false)
VAR(94, WaterEffectActive, false)
VAR(95, WaterEffectSpeed, false)
VAR(96, WaterEffectAttenuation, false)
VAR(97, WaterEffectFrequency, false)
VAR(98, WaterEffectAmpl, false)
VAR(99, WaterEffectMaxStep, false)
VAR(100, WaterEffectAmplOffset, false)
VAR(105, MagnetEffectActive, true)
VAR(106, MagnetEffectSpeed, true)
VAR(107, MagnetEffectUnk1, true)
VAR(108, MagnetEffectUnk2, true)
VAR(109, MagnetEffectSound, true)
VAR(110, MagnetEffectNode, true)
VAR(111, MagnetEffectUnk3, true)
VAR(112, ShakeEffectAmpl, true)
VAR(113, ShakeEffectFramePeriod, true)
VAR(115, SunspotIntensity, false)
VAR(116, SunspotColor, false)

View File

@ -101,6 +101,17 @@ public:
DECLARE_VAR(99, WaterEffectMaxStep)
DECLARE_VAR(100, WaterEffectAmplOffset)
DECLARE_VAR(105, MagnetEffectActive)
DECLARE_VAR(106, MagnetEffectSpeed)
DECLARE_VAR(107, MagnetEffectUnk1)
DECLARE_VAR(108, MagnetEffectUnk2)
DECLARE_VAR(109, MagnetEffectSound)
DECLARE_VAR(110, MagnetEffectNode)
DECLARE_VAR(111, MagnetEffectUnk3)
DECLARE_VAR(112, ShakeEffectAmpl)
DECLARE_VAR(113, ShakeEffectFramePeriod)
DECLARE_VAR(115, SunspotIntensity)
DECLARE_VAR(116, SunspotColor)
DECLARE_VAR(117, SunspotRadius)