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

Merge remote-tracking branch 'origin/master' into plString

Conflicts:
	Sources/Plasma/CoreLib/hsStream.h
	Sources/Plasma/FeatureLib/pfAudio/plListener.cpp
	Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp
	Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp
	Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp
	Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp
	Sources/Plasma/FeatureLib/pfPython/cyMisc.h
	Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp
	Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp
	Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h
	Sources/Plasma/FeatureLib/pfPython/pyImage.cpp
	Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp
	Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h
	Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp
	Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp
	Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp
	Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h
	Sources/Plasma/NucleusLib/pnMessage/plMessage.h
	Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h
	Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp
	Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp
	Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp
	Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp
	Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h
	Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h
	Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h
	Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp
	Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h
	Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h
	Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp
	Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp
	Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp
	Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp
	Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h
	Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp
	Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h
	Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp
	Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h
	Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
2012-01-28 17:20:01 -08:00
1722 changed files with 24149 additions and 27599 deletions

View File

@ -87,7 +87,7 @@ protected:
bool fLinkedToSingleAge;
bool fJustLinkToAges;
UInt64 fLinkTime;
uint64_t fLinkTime;
plString fStatusMessage;
@ -162,12 +162,12 @@ void plAutoProfileImp::IInit()
plgDispatch::Dispatch()->RegisterForExactType(plInitialAgeStateLoadedMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey());
plConsoleMsg* consoleMsg = TRACKED_NEW plConsoleMsg(plConsoleMsg::kExecuteLine, "Camera.AlwaysCut true");
plConsoleMsg* consoleMsg = new plConsoleMsg(plConsoleMsg::kExecuteLine, "Camera.AlwaysCut true");
consoleMsg->Send();
}
#ifdef HS_BUILD_FOR_WIN32
#include "hsWindows.h"
#include <shellapi.h>
#endif
@ -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));
@ -201,7 +201,7 @@ void plAutoProfileImp::IShutdown()
// Pump the queue so we get fully unregistered
plgDispatch::Dispatch()->MsgQueueProcess();
plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kQuit);
plClientMsg* clientMsg = new plClientMsg(plClientMsg::kQuit);
clientMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY));
}
@ -326,7 +326,7 @@ bool plAutoProfileImp::INextSpawnPoint()
fNextSpawnPoint++;
plTimerCallbackMsg* timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey());
plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey());
plgTimerCallbackMgr::NewTimer(30, timerMsg);
return true;
@ -372,7 +372,7 @@ hsBool plAutoProfileImp::MsgReceive(plMessage* msg)
fStatusMessage = _TEMP_CONVERT_FROM_LITERAL("Age loaded. Preparing to profile.");
// Age is loaded, start profiling in 5 seconds (to make sure the avatar is linked in all the way)
plTimerCallbackMsg* timerMsg = TRACKED_NEW plTimerCallbackMsg(GetKey());
plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey());
plgTimerCallbackMgr::NewTimer(5, timerMsg);
return true;
}

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();