1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Convert custom HeadSpin integer types to standard types from stdint.h

This commit is contained in:
2012-01-19 21:19:26 -05:00
parent a0d54e2644
commit 5027b5a4ac
1301 changed files with 14497 additions and 14532 deletions

View File

@ -87,7 +87,7 @@ protected:
bool fLinkedToSingleAge;
bool fJustLinkToAges;
UInt64 fLinkTime;
uint64_t fLinkTime;
std::string fStatusMessage;
@ -176,8 +176,8 @@ void plAutoProfileImp::IShutdown()
// KLUDGE - Copy the load timing log, in case we used it
#define kTimingLog L"readtimings.0.log"
#define kAgeTimingLog L"agetimings.0.log"
wchar destPath[MAX_PATH];
wchar sourcePath[MAX_PATH];
wchar_t destPath[MAX_PATH];
wchar_t sourcePath[MAX_PATH];
PathAddFilename(destPath, plProfileManagerFull::Instance().GetProfilePath(), kTimingLog, arrsize(destPath));
PathGetLogDirectory(sourcePath, arrsize(sourcePath));

View File

@ -87,8 +87,8 @@ plProfile_CreateCounter("Polys Per Material", "General", PolysPerMat);
void CalculateProfiles()
{
// KLUDGE - do timing that overlaps the beginframe / endframe (where timing is normally reset)
static UInt32 lastTicks = plProfileManager::GetTime();
UInt32 curTicks = plProfileManager::GetTime();
static uint32_t lastTicks = plProfileManager::GetTime();
uint32_t curTicks = plProfileManager::GetTime();
gVarRFPS.Set(curTicks - lastTicks);
lastTicks = curTicks;
@ -111,18 +111,18 @@ void CalculateProfiles()
hsAssert(nc->GetNetCore(), "nil net core in stats?");
plNetCoreStats* ns = nc->GetNetCore()->GetStats();
plProfile_Set(UploadAgeBitsPerSec, (UInt32)nc->GetNetClientStats().GetAgeStatsULBitsPerSec());
plProfile_Set(UploadAgeBitsPerSec, (uint32_t)nc->GetNetClientStats().GetAgeStatsULBitsPerSec());
plProfile_Set(UploadBW, ns->GetULBits()/8);
plProfile_Set(UploadPPS, ns->GetULPackets());
plProfile_Set(UploadAPS, (UInt32)ns->GetULAvgPacketBytes());
plProfile_Set(UploadPQ, (UInt32)ns->GetULAvgNumPacketsQueued());
plProfile_Set(UploadAPS, (uint32_t)ns->GetULAvgPacketBytes());
plProfile_Set(UploadPQ, (uint32_t)ns->GetULAvgNumPacketsQueued());
plProfile_Set(RMultAcksPQ, nc->GetNetClientStats().GetRecvdMultipleAcks());
plProfile_Set(DownloadAgeBitsPerSec, (UInt32)nc->GetNetClientStats().GetAgeStatsDLBitsPerSec());
plProfile_Set(DownloadAgeBitsPerSec, (uint32_t)nc->GetNetClientStats().GetAgeStatsDLBitsPerSec());
plProfile_Set(DownloadBW, ns->GetDLBits()/8);
plProfile_Set(DownloadPPS, ns->GetDLPackets());
plProfile_Set(DownloadAPS, (UInt32)ns->GetDLAvgPacketBytes());
plProfile_Set(DownloadPQ, (UInt32)ns->GetDLAvgNumPacketsQueued());
plProfile_Set(DownloadAPS, (uint32_t)ns->GetDLAvgPacketBytes());
plProfile_Set(DownloadPQ, (uint32_t)ns->GetDLAvgNumPacketsQueued());
plProfile_Set(DownloadDP, ns->GetDLDroppedPackets());
plProfile_Set(RemotePlayers, nc->RemotePlayerKeys().size());
@ -269,8 +269,8 @@ void UpdateStandardGraphs(float xPos, float yPos)
if (fNetBWPlate)
{
fNetBWPlate->AddData(
(UInt32)(ns->GetULBits()/8.f),
(UInt32)(ns->GetDLBits()/8.f));
(uint32_t)(ns->GetULBits()/8.f),
(uint32_t)(ns->GetDLBits()/8.f));
PositionPlate(fNetBWPlate);
}
@ -294,24 +294,24 @@ void UpdateStandardGraphs(float xPos, float yPos)
if (fNetAvgBWPlate)
{
fNetAvgBWPlate->AddData(
(UInt32)(ns->GetULBitsPS()/8.f),
(UInt32)(ns->GetDLBitsPS()/8.f));
(uint32_t)(ns->GetULBitsPS()/8.f),
(uint32_t)(ns->GetDLBitsPS()/8.f));
PositionPlate(fNetAvgBWPlate);
}
if (fNetAvgPPSPlate)
{
fNetAvgPPSPlate->AddData(
(Int32)ns->GetULNumPacketsPS(),
(Int32)ns->GetDLNumPacketsPS());
(int32_t)ns->GetULNumPacketsPS(),
(int32_t)ns->GetDLNumPacketsPS());
PositionPlate(fNetAvgPPSPlate);
}
if (fNetAvgQueuesPlate)
{
fNetAvgQueuesPlate->AddData(
(Int32)ns->GetULAvgNumPacketsQueued(),
(Int32)ns->GetDLAvgNumPacketsQueued());
(int32_t)ns->GetULAvgNumPacketsQueued(),
(int32_t)ns->GetDLAvgNumPacketsQueued());
PositionPlate(fNetAvgQueuesPlate);
}
#endif

View File

@ -194,7 +194,7 @@ static void PrintColumn(ProfileGroup& group, const char* groupName, int column,
txt.DrawString(x, y+height, groupName, 255, 255, 255, 255, plDebugText::kStyleBold);
height += yInc;
UInt32 samplesWidth = txt.CalcStringWidth("[000]");
uint32_t samplesWidth = txt.CalcStringWidth("[000]");
for (int i = 0; i < group.size(); i++)
{
@ -376,13 +376,13 @@ void plProfileManagerFull::Update()
double value;
double scale;
int i;
std::vector<Int32> values;
std::vector<int32_t> values;
for (i=0; i<fDetailVars.size(); i++)
{
value = (double)fDetailVars[i].var->GetValue();
scale = 100.0/((double)(fDetailVars[i].max-fDetailVars[i].min));
value = scale*value-fDetailVars[i].min;
values.push_back((Int32)value);
values.push_back((int32_t)value);
}
fDetailGraph->AddData(values);
fDetailGraph->SetVisible(true);
@ -421,15 +421,15 @@ void plProfileManagerFull::IPrintGroup(hsStream* s, const char* groupName, bool
void plProfileManagerFull::LogStats(const char* ageName, const char* spawnName)
{
fLogStats = true;
wchar* temp = hsStringToWString(ageName);
wchar_t* temp = hsStringToWString(ageName);
fLogAgeName = temp;
delete [] temp;
fLogSpawnName = spawnName;
}
const wchar* plProfileManagerFull::GetProfilePath()
const wchar_t* plProfileManagerFull::GetProfilePath()
{
static wchar profilePath[MAX_PATH];
static wchar_t profilePath[MAX_PATH];
static bool initialized = false;
if (!initialized)
@ -442,7 +442,7 @@ const wchar* plProfileManagerFull::GetProfilePath()
PathAddFilename(profilePath, profilePath, L"Profile", arrsize(profilePath));
plFileUtils::CreateDir(profilePath);
wchar buff[256];
wchar_t buff[256];
swprintf(buff, 256, L"%02d-%02d-%04d_%02d-%02d//",
curTime.GetMonth(),
curTime.GetDay(),
@ -459,7 +459,7 @@ const wchar* plProfileManagerFull::GetProfilePath()
void plProfileManagerFull::ILogStats()
{
wchar statFilename[256];
wchar_t statFilename[256];
swprintf(statFilename, 256, L"%s%s.csv", GetProfilePath(), fLogAgeName.c_str());
bool exists = plFileUtils::FileExists(statFilename);
@ -543,7 +543,7 @@ void plProfileManagerFull::ShowLaps(const char* groupName, const char* varName)
fShowLaps->SetLapsActive(true);
}
void plProfileManagerFull::CreateGraph(const char* varName, UInt32 min, UInt32 max)
void plProfileManagerFull::CreateGraph(const char* varName, uint32_t min, uint32_t max)
{
// If the graph is already created, destroy it
for (int i = 0; i < fGraphs.size(); i++)
@ -609,7 +609,7 @@ void plProfileManagerFull::HideDetailGraph()
}
}
void plProfileManagerFull::AddDetailVar(const char* varName, UInt32 min, UInt32 max)
void plProfileManagerFull::AddDetailVar(const char* varName, uint32_t min, uint32_t max)
{
int i=0;
for (i=0; i<fDetailVars.size(); i++)
@ -658,7 +658,7 @@ void plProfileManagerFull::UpdateDetailLabels()
fDetailGraph->SetLabelText(labels);
// update the colors as well, just in case
std::vector<UInt32> colors;
std::vector<uint32_t> colors;
colors.push_back(0xff00ff00); // green
colors.push_back(0xff0000ff); // blue
colors.push_back(0xffffff00); // yellow

View File

@ -72,15 +72,15 @@ protected:
struct detailVar
{
plProfileVar* var;
Int32 min;
Int32 max;
int32_t min;
int32_t max;
};
std::vector<detailVar> fDetailVars; // the vars we want to show on the detail graph
GroupSet fShowGroups;
plProfileVar* fShowLaps;
UInt32 fMinLap; // For Display
uint32_t fMinLap; // For Display
void IPrintGroup(hsStream* s, const char* groupName, bool printTitle=false);
void ILogStats();
@ -109,19 +109,19 @@ public:
void PageDownLaps() { fMinLap += 40; }
void PageUpLaps() { fMinLap = (fMinLap < 40) ? 0 : fMinLap - 40;}
void CreateGraph(const char* varName, UInt32 min, UInt32 max);
void CreateGraph(const char* varName, uint32_t min, uint32_t max);
void ResetDefaultDetailVars();
void ShowDetailGraph();
void HideDetailGraph();
void AddDetailVar(const char* varName, UInt32 min, UInt32 max);
void AddDetailVar(const char* varName, uint32_t min, uint32_t max);
void RemoveDetailVar(const char* varName);
void UpdateDetailLabels();
void ResetMax();
void LogStats(const char* ageName, const char* spawnName);
const wchar* GetProfilePath();
const wchar_t* GetProfilePath();
// If you're going to call LogStats, make sure to call this first so all stats will be evaluated before logging
void ActivateAllStats();