Esempio n. 1
0
void ScummEngine_v0::setMode(byte mode) {
	int state;

	_currentMode = mode;

	switch (_currentMode) {
	case kModeCutscene:
		if (_game.features & GF_DEMO) {
			if (VAR(11) != 0)
				_drawDemo = true;
		}
		_redrawSentenceLine = false;
		// Note: do not change freeze state here
		state = USERSTATE_SET_IFACE |
			USERSTATE_SET_CURSOR;
		
		break;
	case kModeKeypad:
		if (_game.features & GF_DEMO) {
			if (VAR(11) != 0)
				_drawDemo = true;
		}
		_redrawSentenceLine = false;
		state = USERSTATE_SET_IFACE |
			USERSTATE_SET_CURSOR | USERSTATE_CURSOR_ON |
			USERSTATE_SET_FREEZE | USERSTATE_FREEZE_ON;
		break;
	case kModeNormal:
	case kModeNoNewKid:
		if (_game.features & GF_DEMO) {
			resetVerbs();
			_activeVerb = kVerbWalkTo;
			_redrawSentenceLine = true;
			_drawDemo = false;
		}
		state = USERSTATE_SET_IFACE | USERSTATE_IFACE_ALL |
			USERSTATE_SET_CURSOR | USERSTATE_CURSOR_ON |
			USERSTATE_SET_FREEZE;
		break;
	default:
		error("Invalid mode: %d", mode);
	}

	setUserState(state);
}
Esempio n. 2
0
//----------------------------------------
void ofxOpenNITracker::startTracking(XnUserID nID) {
	ofLogVerbose(LOG_NAME) << "Start tracking user" << nID;
	openNI->getUserGenerator().GetSkeletonCap().StartTracking(nID);
  setUserState(nID, ofxOpenNIUser::StartTracking);
}
Esempio n. 3
0
//----------------------------------------
void ofxOpenNITracker::requestCalibration(XnUserID nID) {
	ofLogVerbose(LOG_NAME) << "Calibration requested for user" << nID;
	openNI->getUserGenerator().GetSkeletonCap().RequestCalibration(nID, TRUE);
  setUserState(nID, ofxOpenNIUser::Calibrating);
}
Esempio n. 4
0
//----------------------------------------
void ofxOpenNITracker::startPoseDetection(XnUserID nID) {
	ofLogVerbose(LOG_NAME) << "Start pose detection for user" << nID;
	openNI->getUserGenerator().GetPoseDetectionCap().StartPoseDetection(calibration_pose, nID);
  setUserState(nID, ofxOpenNIUser::NeedsPose);
}