Ejemplo n.º 1
0
void MainMenu::stopMainMenuLoop() {
	FaderMoveSpec spec;

	spec.makeTwoKnotFaderSpec(30, 0, 255, 30, 0);
	_menuFader.startFaderSync(spec);
	_menuLoop.stopSound();
}
Ejemplo n.º 2
0
void ScreenFader::doFadeInSync(const TimeValue duration, const TimeValue scale, bool isBlack) {
	_isBlack = isBlack;
	_screen->copyFrom(*g_system->lockScreen());
	g_system->unlockScreen();

	FaderMoveSpec spec;
	spec.makeTwoKnotFaderSpec(scale, 0, getFaderValue(), duration, 100);
	startFaderSync(spec);

	_screen->free();
}
Ejemplo n.º 3
0
void ShuttleEnergyMeter::drainForTractorBeam() {
	stopFader();
	TimeValue startTime = 0, stopTime;
	int32 startValue = getFaderValue(), stopValue;

	if (startValue < kTractorBeamEnergy) {
		stopTime = startValue * kTractorBeamTime / kTractorBeamEnergy;
		stopValue = 0;
	} else {
		stopTime = kTractorBeamTime;
		stopValue = startValue - kTractorBeamEnergy;
	}

	FaderMoveSpec moveSpec;
	moveSpec.makeTwoKnotFaderSpec(kTractorBeamScale, startTime, startValue, stopTime, stopValue);
	startFader(moveSpec);
}
Ejemplo n.º 4
0
void ShuttleEnergyMeter::setEnergyValue(const int32 value) {
	stopFader();
	FaderMoveSpec moveSpec;
	moveSpec.makeTwoKnotFaderSpec(kFifteenTicksPerSecond, value * 3, value, kFullShuttleEnergy * 3, kFullShuttleEnergy);
	startFader(moveSpec);
}
Ejemplo n.º 5
0
void ShuttleEnergyMeter::powerUpMeter() {
	FaderMoveSpec moveSpec;
	moveSpec.makeTwoKnotFaderSpec(kThirtyTicksPerSecond, 0, 0, 45, kFullShuttleEnergy);
	startFader(moveSpec);
}
Ejemplo n.º 6
0
void NoradDelta::getExtraCompassMove(const ExtraTable::Entry &entry, FaderMoveSpec &compassMove) {
	switch (entry.extra) {
	case kArriveFromSubChase:
		compassMove.makeTwoKnotFaderSpec(kNoradDeltaMovieScale, entry.movieStart, 20, entry.movieEnd, 90);
		compassMove.insertFaderKnot(entry.movieStart + 25 * kNoradDeltaFrameDuration, 20);
		compassMove.insertFaderKnot(entry.movieStart + 94 * kNoradDeltaFrameDuration, 45);
		compassMove.insertFaderKnot(entry.movieStart + 101 * kNoradDeltaFrameDuration, 45);
		compassMove.insertFaderKnot(entry.movieStart + 146 * kNoradDeltaFrameDuration, 90 + 15);
		compassMove.insertFaderKnot(entry.movieStart + 189 * kNoradDeltaFrameDuration, 90 + 15);
		compassMove.insertFaderKnot(entry.movieStart + 204 * kNoradDeltaFrameDuration, 90 + 30);
		compassMove.insertFaderKnot(entry.movieStart + 214 * kNoradDeltaFrameDuration, 90 + 20);
		compassMove.insertFaderKnot(entry.movieStart + 222 * kNoradDeltaFrameDuration, 90 + 20);
		compassMove.insertFaderKnot(entry.movieStart + 228 * kNoradDeltaFrameDuration, 90 + 10);
		compassMove.insertFaderKnot(entry.movieStart + 245 * kNoradDeltaFrameDuration, 90 + 85);
		compassMove.insertFaderKnot(entry.movieStart + 262 * kNoradDeltaFrameDuration, 90 + 70);
		compassMove.insertFaderKnot(entry.movieStart + 273 * kNoradDeltaFrameDuration, 90 + 80);
		compassMove.insertFaderKnot(entry.movieStart + 287 * kNoradDeltaFrameDuration, 90);
		break;
	case kN60PlayerFollowsRobotToDoor:
		compassMove.makeTwoKnotFaderSpec(kNoradDeltaMovieScale, entry.movieStart, 270 + kSubControlCompassAngle,
				entry.movieEnd, 270 - 15);
		compassMove.insertFaderKnot(entry.movieStart + 280, 270 + kSubControlCompassAngle);
		compassMove.insertFaderKnot(entry.movieStart + 920, 360);
		compassMove.insertFaderKnot(entry.movieStart + 1840, 360);
		compassMove.insertFaderKnot(entry.movieStart + 2520, 270);
		compassMove.insertFaderKnot(entry.movieStart + 3760, 270);
		compassMove.insertFaderKnot(entry.movieStart + 4640, 270 + kSubControlCompassAngle);
		break;
	case kN59PlayerWins2:
		compassMove.makeTwoKnotFaderSpec(kNoradDeltaMovieScale, entry.movieStart, 270, entry.movieEnd, 280);
		compassMove.insertFaderKnot(entry.movieEnd - 1000, 270);
	default:
		Norad::getExtraCompassMove(entry, compassMove);
		break;
	}
}