RingRacers/src/m_perfstats.h
James R b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00

64 lines
1.4 KiB
C

// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 2020 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file m_perfstats.h
/// \brief Performance measurement tools.
#ifndef __M_PERFSTATS_H__
#define __M_PERFSTATS_H__
#include "doomdef.h"
#include "lua_script.h"
#include "p_local.h"
typedef enum
{
PS_OFF = 0,
PS_RENDER,
PS_LOGIC,
PS_BOT,
PS_THINKFRAME,
} ps_types_t;
extern precise_t ps_tictime;
extern precise_t ps_playerthink_time;
extern precise_t ps_botticcmd_time;
extern precise_t ps_thinkertime;
extern precise_t ps_thlist_times[];
extern int ps_checkposition_calls;
extern precise_t ps_lua_thinkframe_time;
extern int ps_lua_mobjhooks;
struct ps_hookinfo_t
{
precise_t time_taken;
char short_src[LUA_IDSIZE];
};
void PS_SetThinkFrameHookInfo(int index, precise_t time_taken, char* short_src);
struct ps_botinfo_t
{
boolean isBot;
precise_t total;
precise_t prediction; // K_CreateBotPrediction
precise_t nudge; // K_NudgePredictionTowardsObjects
precise_t item; // K_BotItemUsage
};
extern ps_botinfo_t ps_bots[MAXPLAYERS];
void PS_ResetBotInfo(void);
void M_DrawPerfStats(void);
#endif