verify("05efdcc9e950f1544a21358a059829adf800be64a5c5af7f6e0c570519965a9614547e0efd98f866901faf5140116fdaad78a94a73e7dd1f1540638cd9f03c66");
--  Populous Reincarnated © 2019
--  Populous is a registered trademark of Electronic Arts Inc.
    
--  Library:    Supervisor
--  Purpose:    Runs on top of the game, always watching.
--  Author:     Brandan Tyler Lasley 
--  Site:       http://popre.net
--  Discord:    https://discord.gg/buRQ4HK
    
--  This program is free software: you can redistribute it and/or modify
--  it under the terms of the GNU General Public License as published by
--  the Free Software Foundation, either version 3 of the License, or
--  (at your option) any later version.

--  This program is distributed in the hope that it will be useful,
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--  GNU General Public License for more details.

--  You should have received a copy of the GNU General Public License
--  along with this program.  If not, see <https://www.gnu.org/licenses/>.

-- Load all modules
for mod = 0, MAX_NUM_MODLES-1, 1 do
    import(mod);
end

_gnsi                   = gnsi();
_gsi                    = gsi();
_gci                    = gci();
_c                      = constants();
_pti                    = people_type_info();
_tti                    = thing_type_info();
_spi                    = spells_type_info();
_bti                    = building_type_info();
_vti                    = vehicle_type_info();
_sti                    = scenery_type_info();
_tdi                    = thing_draw_info();
_execute_all_chat       = false;
_execute_my_playernum   = TRIBE_NEUTRAL
_execute_playernum_tmp  = TRIBE_NEUTRAL
_from_temp              = TRIBE_NEUTRAL

is_fps_visable = false;
function OnImGuiFrame()
    if (is_fps_visable) then
        imgui.Begin('Supervisor', nil, ImGuiWindowFlags_AlwaysAutoResize);
        imgui.TextUnformatted(string.format("Application average %.3f ms/frame (%.1f FPS)", 1000.0 / imgui_framerate(), imgui_framerate()));
        imgui.End()    
    end
end

function OnKeyDown(key)
    if (key == LB_KEY_END) then
        is_fps_visable = not is_fps_visable;
    end
end