#include "debugscript.h"
+#include "profiler.h"
#include <string>
{
currentAction.type = AT_PrintBounds;
}
+ else if (actionType == "profileon")
+ {
+ currentAction.type = AT_ProfileDisplay;
+ currentAction.iz = 1;
+ }
+ else if (actionType == "profileoff")
+ {
+ currentAction.type = AT_ProfileDisplay;
+ currentAction.iz = 0;
+ }
else
Fatal("Unknown action %s", actionType.c_str());
printf("%s\t%s\t%s\t%s\n", Str(view->GetBounds().x).c_str(), Str(view->GetBounds().y).c_str(), Str(view->GetBounds().w).c_str(), Str(view->GetBounds().h).c_str());
break;
}
+ case AT_ProfileDisplay:
+ {
+ g_profiler.Enable(currentAction.iz);
+ break;
+ }
default:
Fatal("Unknown script command in queue.");
}