private static void sheep_SetActorLocation(IntPtr vm) { string location = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); Game.GameManager.SetStringGameVariable("_LOC_" + actor, location); }
private static void sheep_SetGameVariableInt(IntPtr vm) { int value = SheepMachine.PopIntOffStack(vm); string name = SheepMachine.PopStringOffStack(vm); Game.GameManager.SetIntegerGameVariable(name, value); }
private static void sheep_setIdleGas(IntPtr vm) { string gas = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); Logger.WriteDebug("FIXME: SetIdleGas() sheep function not implemented"); }
private static void sheep_WalkerBoundaryBlockRegion(IntPtr vm) { int index1 = SheepMachine.PopIntOffStack(vm); int index2 = SheepMachine.PopIntOffStack(vm); // TODO! }
private static void sheep_SetTalkGas(IntPtr vm) { string gas = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); // TODO }
private static void sheep_WalkTo(IntPtr vm) { string position = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); // TODO }
private static void sheep_InspectModelUsingAngle(IntPtr vm) { string angle = SheepMachine.PopStringOffStack(vm); string model = SheepMachine.PopStringOffStack(vm); SceneManager.SetCameraToCinematicCamera(angle); }
private static void sheep_DoesGraceHaveInvItem(IntPtr vm) { string item = SheepMachine.PopStringOffStack(vm); bool hasItem = Game.GameManager.IsInInventory(item, false); SheepMachine.PushIntOntoStack(vm, hasItem ? 1 : 0); }
private static void sheep_DoesModelExist(IntPtr vm) { string model = SheepMachine.PopStringOffStack(vm); // TODO! SheepMachine.PushIntOntoStack(vm, 0); }
private static void sheep_GetFlag(IntPtr vm) { string name = SheepMachine.PopStringOffStack(vm); int flag = Game.GameManager.GetFlag(name) ? 1 : 0; SheepMachine.PushIntOntoStack(vm, flag); }
private static void sheep_GetEgoLocationCount(IntPtr vm) { string location = SheepMachine.PopStringOffStack(vm); int count = Game.GameManager.GetEgoLocationCount(location); SheepMachine.PushIntOntoStack(vm, count); }
private static void sheep_WasEgoEverInLocation(IntPtr vm) { string location = SheepMachine.PopStringOffStack(vm); // TODO SheepMachine.PushIntOntoStack(vm, 0); }
private static void sheep_IsActiveInvItem(IntPtr vm) { string item = SheepMachine.PopStringOffStack(vm); // TODO SheepMachine.PushIntOntoStack(vm, 0); }
private static void sheep_PlaySound(IntPtr context) { bool isInWaitSection = SheepMachine.IsInWaitSection(context); string sound = SheepMachine.PopStringOffStack(context); Sound.AudioEngine.SoundEffect s = SceneManager.SceneContentManager.Load <Sound.AudioEngine.SoundEffect>(sound); Sound.PlayingSound ps = Sound.SoundManager.PlaySound2DToChannel(s, Sound.SoundTrackChannel.SFX); }
private static void sheep_GetGameVariableInt(IntPtr vm) { string variable = SheepMachine.PopStringOffStack(vm); int value = Game.GameManager.GetIntegerGameVariable(variable); SheepMachine.PushIntOntoStack(vm, value); }
private static void sheep_SetNounVerbCount(IntPtr vm) { int count = SheepMachine.PopIntOffStack(vm); string verb = SheepMachine.PopStringOffStack(vm); string noun = SheepMachine.PopStringOffStack(vm); Game.GameManager.SetNounVerbCount(noun, verb, count); }
private static void sheep_SetCameraAngleType(IntPtr vm) { string camera = SheepMachine.PopStringOffStack(vm); string type = SheepMachine.PopStringOffStack(vm); // TODO! Logger.WriteDebug("FIXME: SetCameraAngleType() sheep function not implemented"); }
private static void sheep_SetActorPosition(IntPtr vm) { string position = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); SceneManager.SetActorPosition(actor, position); Logger.WriteDebug("Setting actor {0} position to {1}", actor, position); }
private static void sheep_IncNounVerbCount(IntPtr vm) { string verb = SheepMachine.PopStringOffStack(vm); string noun = SheepMachine.PopStringOffStack(vm); Game.Nouns n = Game.NounUtils.ConvertStringToNoun(noun); Game.Verbs v = Game.VerbsUtils.ConvertStringToVerbs(verb); Game.GameManager.IncrementNounVerbCount(n, v); }
private static void sheep_GetTopicCountInt(IntPtr vm) { int verb = SheepMachine.PopIntOffStack(vm); int noun = SheepMachine.PopIntOffStack(vm); int count = Game.GameManager.GetTopicCount((Game.Nouns)noun, (Game.Verbs)verb); SheepMachine.PushIntOntoStack(vm, count); }
private static void sheep_LookitSceneModel(IntPtr vm) { int duration = SheepMachine.PopIntOffStack(vm); string components = SheepMachine.PopStringOffStack(vm); string target = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); // TODO }
private static void sheep_GetChatCount(IntPtr vm) { string noun = SheepMachine.PopStringOffStack(vm); Game.Nouns n = Game.NounUtils.ConvertStringToNoun(noun); int c = Game.GameManager.GetChatCount(n); SheepMachine.PushIntOntoStack(vm, c); }
private static void sheep_TurnHead(IntPtr vm) { int duration = SheepMachine.PopIntOffStack(vm); int percentY = SheepMachine.PopIntOffStack(vm); int percentX = SheepMachine.PopIntOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); // TODO }
private static void sheep_SetTimerSeconds(IntPtr context) { float seconds = SheepMachine.PopFloatOffStack(context); if (SheepMachine.IsInWaitSection(context)) { SheepMachine.AddWaitHandle(context, new Game.TimedWaitHandle((int)(seconds * 1000))); } }
private static void sheep_GetRandomInt(IntPtr vm) { int upper = SheepMachine.PopIntOffStack(vm); int lower = SheepMachine.PopIntOffStack(vm); int num = Utils.PickRandomNumber(lower, upper); SheepMachine.PushIntOntoStack(vm, num); }
private static void sheep_GetTopicCount(IntPtr vm) { string verb = SheepMachine.PopStringOffStack(vm); string noun = SheepMachine.PopStringOffStack(vm); int count = Game.GameManager.GetTopicCount(noun, verb); SheepMachine.PushIntOntoStack(vm, count); }
private static void sheep_GetNounVerbCount(IntPtr vm) { string verb = SheepMachine.PopStringOffStack(vm); string noun = SheepMachine.PopStringOffStack(vm); Game.Verbs v = Game.VerbsUtils.ConvertStringToVerbs(verb); int count = Game.GameManager.GetNounVerbCount(noun, v); SheepMachine.PushIntOntoStack(vm, count); }
private static void sheep_SetGameTimer(IntPtr vm) { int milliseconds = SheepMachine.PopIntOffStack(vm); string verb = SheepMachine.PopStringOffStack(vm); string noun = SheepMachine.PopStringOffStack(vm); Game.Nouns n = Game.NounUtils.ConvertStringToNoun(noun); Game.Verbs v = Game.VerbsUtils.ConvertStringToVerbs(verb); Game.GameManager.AddGameTimer(n, v, milliseconds); }
private static void sheep_IsActorNear(IntPtr vm) { float distance = SheepMachine.PopFloatOffStack(vm); string position = SheepMachine.PopStringOffStack(vm); string actor = SheepMachine.PopStringOffStack(vm); // TODO SheepMachine.PushIntOntoStack(vm, 0); }
private static void sheep_InitEgoPosition(IntPtr vm) { string position = SheepMachine.PopStringOffStack(vm); Logger.WriteDebug("Setting ego position to {0}", position); // TODO: put the current ego's model at the specified position SceneManager.SetEgoToSifPosition(position); // set the camera to the specified position SceneManager.SetCameraToSifPosition(position); }