Game Development Community

GuiTheoraCtrl & 1.5

by CdnGater · in Torque Game Engine · 12/12/2006 (5:48 pm) · 0 replies

Dunno if anyone has tried running the GuiTheoraCtrl in 1.5, but I found that it didn't work. It keeped shutting down before it even played. I traced it to the following code

DemoGame::Main


   while(Game->isRunning())
   {
            PROFILE_START(MainLoop);
            PROFILE_START(JournalMain);
      Game->journalProcess();
            PROFILE_END();
            PROFILE_START(NetProcessMain);
      Net::process();      // read in all events
            PROFILE_END();
            PROFILE_START(PlatformProcessMain);
      Platform::process(); // keys, etc.
            PROFILE_END();
            PROFILE_START(TelconsoleProcessMain);
      TelConsole->process();
            PROFILE_END();
            PROFILE_START(TelDebuggerProcessMain);
      TelDebugger->process();
            PROFILE_END();
            PROFILE_START(TimeManagerProcessMain);
      TimeManager::process(); // guaranteed to produce an event
            PROFILE_END();
            PROFILE_START(GameProcessEvents);
      Game->processEvents(); // process all non-sim posted events.
            PROFILE_END();
            PROFILE_END();
   }

I found that if you swap the two bottom processes, the GuiTheoraCtrl works as before as it should

DemoGame::Main


   while(Game->isRunning())
   {
            PROFILE_START(MainLoop);
            PROFILE_START(JournalMain);
      Game->journalProcess();
            PROFILE_END();
            PROFILE_START(NetProcessMain);
      Net::process();      // read in all events
            PROFILE_END();
            PROFILE_START(PlatformProcessMain);
      Platform::process(); // keys, etc.
            PROFILE_END();
            PROFILE_START(TelconsoleProcessMain);
      TelConsole->process();
            PROFILE_END();
            PROFILE_START(TelDebuggerProcessMain);
      TelDebugger->process();
            PROFILE_END();
[b]
            PROFILE_START(GameProcessEvents);
      Game->processEvents(); // process all non-sim posted events.
            PROFILE_END();
            PROFILE_START(TimeManagerProcessMain);
      TimeManager::process(); // guaranteed to produce an event
            PROFILE_END();
[/b]
            PROFILE_END();
   }

Anyway, try it if you find the control does not work for you, this fixed it for me.