mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04: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:
@ -71,7 +71,6 @@ if(PLASMA_EXTERNAL_RELEASE)
|
||||
set_target_properties(plClient PROPERTIES OUTPUT_NAME "UruExplorer")
|
||||
endif(PLASMA_EXTERNAL_RELEASE)
|
||||
target_link_libraries(plClient CoreLib)
|
||||
target_link_libraries(plClient CoreLibExe)
|
||||
target_link_libraries(plClient pfAnimation)
|
||||
target_link_libraries(plClient pfAudio)
|
||||
target_link_libraries(plClient pfCamera)
|
||||
|
@ -39,5 +39,5 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include "hsWindows.h"
|
||||
|
||||
#include "plAllCreatables.h"
|
||||
|
@ -41,8 +41,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
#pragma warning(disable: 4284)
|
||||
#include "HeadSpin.h"
|
||||
#include "hsTypes.h"
|
||||
#include "hsWindowHndl.h"
|
||||
#include "plClient.h"
|
||||
#include "hsStream.h"
|
||||
#include "plResMgr/plResManager.h"
|
||||
@ -164,7 +162,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#define MSG_LOADING_BAR
|
||||
|
||||
// static hsVector3 gAbsDown(0,0,-hsScalar1);
|
||||
// static hsVector3 gAbsDown(0,0,-1.f);
|
||||
|
||||
static plDispatchBase* gDisp = nil;
|
||||
static plTimerCallbackManager* gTimerMgr = nil;
|
||||
@ -224,14 +222,14 @@ plClient::plClient()
|
||||
|
||||
/// allow console commands to start working early
|
||||
// Create the console engine
|
||||
fConsoleEngine = TRACKED_NEW pfConsoleEngine();
|
||||
fConsoleEngine = new pfConsoleEngine();
|
||||
|
||||
// create network mgr before console runs
|
||||
plNetClientMgr::SetInstance(TRACKED_NEW plNetClientMgr);
|
||||
plAgeLoader::SetInstance(TRACKED_NEW plAgeLoader);
|
||||
plNetClientMgr::SetInstance(new plNetClientMgr);
|
||||
plAgeLoader::SetInstance(new plAgeLoader);
|
||||
|
||||
// Use it to parse the init directory
|
||||
wchar initFolder[MAX_PATH];
|
||||
wchar_t initFolder[MAX_PATH];
|
||||
PathGetInitDirectory(initFolder, arrsize(initFolder));
|
||||
pfConsoleDirSrc dirSrc( fConsoleEngine, initFolder, L"*.ini" );
|
||||
|
||||
@ -276,7 +274,7 @@ hsBool plClient::Shutdown()
|
||||
plBinkPlayer::DeInit();
|
||||
//
|
||||
// Get any proxies to commit suicide.
|
||||
plProxyDrawMsg* nuke = TRACKED_NEW plProxyDrawMsg(plProxyDrawMsg::kAllTypes
|
||||
plProxyDrawMsg* nuke = new plProxyDrawMsg(plProxyDrawMsg::kAllTypes
|
||||
| plProxyDrawMsg::kDestroy);
|
||||
plgDispatch::MsgSend(nuke);
|
||||
|
||||
@ -449,17 +447,17 @@ void plClient::InitAuxInits()
|
||||
void plClient::InitInputs()
|
||||
{
|
||||
hsStatusMessage("InitInputs client\n");
|
||||
fInputManager = TRACKED_NEW plInputManager( fWindowHndl );
|
||||
fInputManager = new plInputManager( fWindowHndl );
|
||||
fInputManager->CreateInterfaceMod(fPipeline);
|
||||
fInputManager->RegisterAs( kInput_KEY );
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plIMouseXEventMsg::Index(), fInputManager->GetKey());
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plIMouseYEventMsg::Index(), fInputManager->GetKey());
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plIMouseBEventMsg::Index(), fInputManager->GetKey());
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), fInputManager->GetKey());
|
||||
plInputDevice* pKeyboard = TRACKED_NEW plKeyboardDevice();
|
||||
plInputDevice* pKeyboard = new plKeyboardDevice();
|
||||
fInputManager->AddInputDevice(pKeyboard);
|
||||
|
||||
plInputDevice* pMouse = TRACKED_NEW plMouseDevice();
|
||||
plInputDevice* pMouse = new plMouseDevice();
|
||||
fInputManager->AddInputDevice(pMouse);
|
||||
|
||||
if( fWindowActive )
|
||||
@ -469,7 +467,7 @@ void plClient::InitInputs()
|
||||
void plClient::ISetGraphicsDefaults()
|
||||
{
|
||||
// couldn't find display mode set defaults write to ini file
|
||||
wchar graphicsIniFile[MAX_PATH];
|
||||
wchar_t graphicsIniFile[MAX_PATH];
|
||||
PathGetInitDirectory(graphicsIniFile, arrsize(graphicsIniFile));
|
||||
PathAddFilename(graphicsIniFile, graphicsIniFile, L"graphics.ini", arrsize(graphicsIniFile));
|
||||
IWriteDefaultGraphicsSettings(graphicsIniFile);
|
||||
@ -571,7 +569,7 @@ hsBool plClient::InitPipeline()
|
||||
|
||||
float yon = 500.0f;
|
||||
|
||||
pipe->SetFOV( 60.f, hsIntToScalar( 60.f * pipe->Height() / pipe->Width() ) );
|
||||
pipe->SetFOV( 60.f, int32_t( 60.f * pipe->Height() / pipe->Width() ) );
|
||||
pipe->SetDepth( 0.3f, yon );
|
||||
|
||||
hsMatrix44 id;
|
||||
@ -793,7 +791,7 @@ hsBool plClient::MsgReceive(plMessage* msg)
|
||||
plAudible* aud = plAudible::ConvertNoRef(callback->GetSender()->ObjectIsLoaded());
|
||||
if( simpMod )
|
||||
{
|
||||
plAnimCmdMsg* cmd = TRACKED_NEW plAnimCmdMsg;
|
||||
plAnimCmdMsg* cmd = new plAnimCmdMsg;
|
||||
cmd->AddReceiver(simpMod->GetKey());
|
||||
cmd->SetCmd(plAnimCmdMsg::kRemoveCallbacks);
|
||||
cmd->AddCallback(callback);
|
||||
@ -802,7 +800,7 @@ hsBool plClient::MsgReceive(plMessage* msg)
|
||||
}
|
||||
else if( aud )
|
||||
{
|
||||
plSoundMsg* cmd = TRACKED_NEW plSoundMsg;
|
||||
plSoundMsg* cmd = new plSoundMsg;
|
||||
cmd->AddReceiver(aud->GetKey());
|
||||
cmd->SetCmd(plSoundMsg::kRemoveCallbacks);
|
||||
cmd->AddCallback(callback);
|
||||
@ -892,7 +890,7 @@ hsBool plClient::IHandleMovieMsg(plMovieMsg* mov)
|
||||
if( i == fMovies.GetCount() )
|
||||
{
|
||||
|
||||
fMovies.Append(TRACKED_NEW plBinkPlayer);
|
||||
fMovies.Append(new plBinkPlayer);
|
||||
fMovies[i]->SetFileName(mov->GetFileName());
|
||||
}
|
||||
|
||||
@ -989,7 +987,7 @@ void plClient::IQueueRoomLoad(const std::vector<plLocation>& locs, bool hold)
|
||||
bool allSameAge = true;
|
||||
const char* lastAgeName = nil;
|
||||
|
||||
UInt32 numRooms = 0;
|
||||
uint32_t numRooms = 0;
|
||||
for (int i = 0; i < locs.size(); i++)
|
||||
{
|
||||
const plLocation& loc = locs[i];
|
||||
@ -1011,7 +1009,7 @@ void plClient::IQueueRoomLoad(const std::vector<plLocation>& locs, bool hold)
|
||||
continue;
|
||||
}
|
||||
|
||||
fLoadRooms.push_back(TRACKED_NEW LoadRequest(loc, hold));
|
||||
fLoadRooms.push_back(new LoadRequest(loc, hold));
|
||||
|
||||
if (!lastAgeName || hsStrEQ(info->GetAge(), lastAgeName))
|
||||
lastAgeName = info->GetAge();
|
||||
@ -1051,7 +1049,7 @@ void plClient::ILoadNextRoom()
|
||||
|
||||
if (req)
|
||||
{
|
||||
plClientRefMsg* pRefMsg = TRACKED_NEW plClientRefMsg(GetKey(),
|
||||
plClientRefMsg* pRefMsg = new plClientRefMsg(GetKey(),
|
||||
plRefMsg::kOnCreate, -1,
|
||||
req->hold ? plClientRefMsg::kLoadRoomHold : plClientRefMsg::kLoadRoom);
|
||||
|
||||
@ -1063,7 +1061,7 @@ void plClient::ILoadNextRoom()
|
||||
|
||||
delete req;
|
||||
|
||||
plClientMsg* nextRoom = TRACKED_NEW plClientMsg(plClientMsg::kLoadNextRoom);
|
||||
plClientMsg* nextRoom = new plClientMsg(plClientMsg::kLoadNextRoom);
|
||||
nextRoom->Send(GetKey());
|
||||
}
|
||||
}
|
||||
@ -1108,7 +1106,7 @@ void plClient::IUnloadRooms(const std::vector<plLocation>& locs)
|
||||
}
|
||||
GetKey()->Release(nodeKey); // release notify interest in scene node
|
||||
|
||||
UInt32 recFlags = 0;
|
||||
uint32_t recFlags = 0;
|
||||
if (roomIdx != -1)
|
||||
{
|
||||
recFlags = fRooms[roomIdx].fFlags;
|
||||
@ -1237,7 +1235,7 @@ void plClient::IRoomLoaded(plSceneNode* node, bool hold)
|
||||
// now tell all those who are interested that a room was loaded
|
||||
if (!hold)
|
||||
{
|
||||
plRoomLoadNotifyMsg* loadmsg = TRACKED_NEW plRoomLoadNotifyMsg;
|
||||
plRoomLoadNotifyMsg* loadmsg = new plRoomLoadNotifyMsg;
|
||||
loadmsg->SetRoom(pRmKey);
|
||||
loadmsg->SetWhatHappen(plRoomLoadNotifyMsg::kLoaded);
|
||||
plgDispatch::MsgSend(loadmsg);
|
||||
@ -1273,7 +1271,7 @@ void plClient::IRoomUnloaded(plSceneNode* node)
|
||||
plAgeLoader::GetInstance()->FinishedPagingOutRoom(&pRmKey, 1);
|
||||
|
||||
// tell all those who are interested that a room was unloaded
|
||||
plRoomLoadNotifyMsg* loadmsg = TRACKED_NEW plRoomLoadNotifyMsg;
|
||||
plRoomLoadNotifyMsg* loadmsg = new plRoomLoadNotifyMsg;
|
||||
loadmsg->SetRoom(pRmKey);
|
||||
loadmsg->SetWhatHappen(plRoomLoadNotifyMsg::kUnloaded);
|
||||
plgDispatch::MsgSend(loadmsg);
|
||||
@ -1295,7 +1293,7 @@ void plClient::IProgressMgrCallbackProc(plOperationProgress * progress)
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void plClient::IIncProgress (hsScalar byHowMuch, const char * text)
|
||||
void plClient::IIncProgress (float byHowMuch, const char * text)
|
||||
{
|
||||
if (fProgressBar) {
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
@ -1306,7 +1304,7 @@ void plClient::IIncProgress (hsScalar byHowMuch, const char * text)
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void plClient::IStartProgress( const char *title, hsScalar len )
|
||||
void plClient::IStartProgress( const char *title, float len )
|
||||
{
|
||||
if (fProgressBar)
|
||||
{
|
||||
@ -1375,11 +1373,11 @@ public:
|
||||
LoginNetClientCommCallback() : plNetClientComm::Callback(), fNumCurrentOps(0)
|
||||
{}
|
||||
|
||||
virtual void OperationStarted( UInt32 context )
|
||||
virtual void OperationStarted( uint32_t context )
|
||||
{
|
||||
fNumCurrentOps++;
|
||||
}
|
||||
virtual void OperationComplete( UInt32 context, int resultCode )
|
||||
virtual void OperationComplete( uint32_t context, int resultCode )
|
||||
{
|
||||
if (context == kAuth)
|
||||
{
|
||||
@ -1392,14 +1390,14 @@ public:
|
||||
{
|
||||
if ( hsSucceeded( resultCode ) )
|
||||
{
|
||||
UInt32 numPlayers = fCbArgs.GetInt(0);
|
||||
UInt32 pId = -1;
|
||||
uint32_t numPlayers = fCbArgs.GetInt(0);
|
||||
uint32_t pId = -1;
|
||||
std::string pName;
|
||||
|
||||
for (UInt32 i = 0; i < numPlayers; i++)
|
||||
for (uint32_t i = 0; i < numPlayers; i++)
|
||||
{
|
||||
pId = fCbArgs.GetInt((UInt16)(i*3+1));
|
||||
pName = fCbArgs.GetString((UInt16)(i*3+2));
|
||||
pId = fCbArgs.GetInt((uint16_t)(i*3+1));
|
||||
pName = fCbArgs.GetString((uint16_t)(i*3+2));
|
||||
|
||||
if (pName == plClient::GetInstance()->fUsername)
|
||||
{
|
||||
@ -1473,7 +1471,7 @@ hsBool plClient::StartInit()
|
||||
InitDLLs();
|
||||
|
||||
plGlobalVisMgr::Init();
|
||||
fPageMgr = TRACKED_NEW plPageTreeMgr;
|
||||
fPageMgr = new plPageTreeMgr;
|
||||
|
||||
plVisLOSMgr::Init(fPipeline, fPageMgr);
|
||||
|
||||
@ -1493,32 +1491,32 @@ hsBool plClient::StartInit()
|
||||
/// Note: this can be done last because the console engine was inited first, and
|
||||
/// everything in code that works with the console does so through the console engine
|
||||
|
||||
fConsole = TRACKED_NEW pfConsole();
|
||||
fConsole = new pfConsole();
|
||||
pfConsole::SetPipeline( fPipeline );
|
||||
fConsole->RegisterAs( kConsoleObject_KEY ); // fixedKey from plFixedKey.h
|
||||
fConsole->Init( fConsoleEngine );
|
||||
|
||||
/// Init the font cache
|
||||
fFontCache = TRACKED_NEW plFontCache();
|
||||
fFontCache = new plFontCache();
|
||||
|
||||
/// Init the transition manager
|
||||
fTransitionMgr = TRACKED_NEW plTransitionMgr();
|
||||
fTransitionMgr = new plTransitionMgr();
|
||||
fTransitionMgr->RegisterAs( kTransitionMgr_KEY ); // fixedKey from plFixedKey.h
|
||||
fTransitionMgr->Init();
|
||||
|
||||
// Init the Age Linking effects manager
|
||||
fLinkEffectsMgr = TRACKED_NEW plLinkEffectsMgr();
|
||||
fLinkEffectsMgr = new plLinkEffectsMgr();
|
||||
fLinkEffectsMgr->RegisterAs( kLinkEffectsMgr_KEY ); // fixedKey from plFixedKey.h
|
||||
fLinkEffectsMgr->Init();
|
||||
|
||||
/// Init the in-game GUI manager
|
||||
fGameGUIMgr = TRACKED_NEW pfGameGUIMgr();
|
||||
fGameGUIMgr = new pfGameGUIMgr();
|
||||
fGameGUIMgr->RegisterAs( kGameGUIMgr_KEY );
|
||||
fGameGUIMgr->Init();
|
||||
|
||||
plgAudioSys::Activate(true);
|
||||
|
||||
plConst(hsScalar) delay(2.f);
|
||||
plConst(float) delay(2.f);
|
||||
//commenting out publisher splash for MORE
|
||||
//IPlayIntroBink("avi/intro0.bik", delay, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||
//if( GetDone() ) return false;
|
||||
@ -1534,14 +1532,14 @@ hsBool plClient::StartInit()
|
||||
plAgeLoader::GetInstance()->Init();
|
||||
pfSecurePreloader::GetInstance()->Init();
|
||||
|
||||
plCmdIfaceModMsg* pModMsg2 = TRACKED_NEW plCmdIfaceModMsg;
|
||||
plCmdIfaceModMsg* pModMsg2 = new plCmdIfaceModMsg;
|
||||
pModMsg2->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
pModMsg2->SetSender(fConsole->GetKey());
|
||||
pModMsg2->SetCmd(plCmdIfaceModMsg::kAdd);
|
||||
plgDispatch::MsgSend(pModMsg2);
|
||||
|
||||
// create new the virtual camera
|
||||
fNewCamera = TRACKED_NEW plVirtualCam1;
|
||||
fNewCamera = new plVirtualCam1;
|
||||
fNewCamera->RegisterAs( kVirtualCamera1_KEY );
|
||||
fNewCamera->Init();
|
||||
fNewCamera->SetPipeline( GetPipeline() );
|
||||
@ -1555,7 +1553,7 @@ hsBool plClient::StartInit()
|
||||
plInputManager::SetRecenterMouse(false);
|
||||
|
||||
// create the listener for the audio system:
|
||||
plListener* pLMod = TRACKED_NEW plListener;
|
||||
plListener* pLMod = new plListener;
|
||||
pLMod->RegisterAs(kListenerMod_KEY );
|
||||
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), pLMod->GetKey());
|
||||
@ -1565,7 +1563,7 @@ hsBool plClient::StartInit()
|
||||
|
||||
if (StrCmp(NetCommGetStartupAge()->ageDatasetName, "StartUp") == 0)
|
||||
{
|
||||
plNetCommAuthMsg * msg = NEW(plNetCommAuthMsg);
|
||||
plNetCommAuthMsg * msg = new plNetCommAuthMsg();
|
||||
msg->result = kNetSuccess;
|
||||
msg->param = nil;
|
||||
msg->Send();
|
||||
@ -1730,7 +1728,7 @@ hsBool plClient::IUpdate()
|
||||
// Time may have been clamped in IncSysSeconds, depending on hsTimer's current mode.
|
||||
|
||||
double currTime = hsTimer::GetSysSeconds();
|
||||
hsScalar delSecs = hsTimer::GetDelSysSeconds();
|
||||
float delSecs = hsTimer::GetDelSysSeconds();
|
||||
|
||||
// do not change this ordering
|
||||
|
||||
@ -1749,18 +1747,18 @@ hsBool plClient::IUpdate()
|
||||
// starting trouble during their update. So to get rid of this message, some
|
||||
// other way of flushing the dispatch after NegClientMgr's update is needed. mf
|
||||
plProfile_BeginTiming(TimeMsg);
|
||||
plTimeMsg* msg = TRACKED_NEW plTimeMsg(nil, nil, nil, nil);
|
||||
plTimeMsg* msg = new plTimeMsg(nil, nil, nil, nil);
|
||||
plgDispatch::MsgSend(msg);
|
||||
plProfile_EndTiming(TimeMsg);
|
||||
|
||||
plProfile_BeginTiming(EvalMsg);
|
||||
plEvalMsg* eval = TRACKED_NEW plEvalMsg(nil, nil, nil, nil);
|
||||
plEvalMsg* eval = new plEvalMsg(nil, nil, nil, nil);
|
||||
plgDispatch::MsgSend(eval);
|
||||
plProfile_EndTiming(EvalMsg);
|
||||
|
||||
char *xFormLap1 = "Main";
|
||||
plProfile_BeginLap(TransformMsg, xFormLap1);
|
||||
plTransformMsg* xform = TRACKED_NEW plTransformMsg(nil, nil, nil, nil);
|
||||
plTransformMsg* xform = new plTransformMsg(nil, nil, nil, nil);
|
||||
plgDispatch::MsgSend(xform);
|
||||
plProfile_EndLap(TransformMsg, xFormLap1);
|
||||
|
||||
@ -1778,7 +1776,7 @@ hsBool plClient::IUpdate()
|
||||
{
|
||||
char *xFormLap2 = "Simulation";
|
||||
plProfile_BeginLap(TransformMsg, xFormLap2);
|
||||
xform = TRACKED_NEW plTransformMsg(nil, nil, nil, nil);
|
||||
xform = new plTransformMsg(nil, nil, nil, nil);
|
||||
plgDispatch::MsgSend(xform);
|
||||
plProfile_EndLap(TransformMsg, xFormLap2);
|
||||
}
|
||||
@ -1786,7 +1784,7 @@ hsBool plClient::IUpdate()
|
||||
{
|
||||
char *xFormLap3 = "Delayed";
|
||||
plProfile_BeginLap(TransformMsg, xFormLap3);
|
||||
xform = TRACKED_NEW plDelayedTransformMsg(nil, nil, nil, nil);
|
||||
xform = new plDelayedTransformMsg(nil, nil, nil, nil);
|
||||
plgDispatch::MsgSend(xform);
|
||||
plProfile_EndLap(TransformMsg, xFormLap3);
|
||||
}
|
||||
@ -1794,7 +1792,7 @@ hsBool plClient::IUpdate()
|
||||
plCoordinateInterface::SetTransformPhase(plCoordinateInterface::kTransformPhaseNormal);
|
||||
|
||||
plProfile_BeginTiming(CameraMsg);
|
||||
plCameraMsg* cameras = TRACKED_NEW plCameraMsg;
|
||||
plCameraMsg* cameras = new plCameraMsg;
|
||||
cameras->SetCmd(plCameraMsg::kUpdateCameras);
|
||||
cameras->SetBCastFlag(plMessage::kBCastByExactType);
|
||||
plgDispatch::MsgSend(cameras);
|
||||
@ -1867,11 +1865,11 @@ hsBool plClient::IDraw()
|
||||
plProfile_EndTiming(VisEval);
|
||||
|
||||
plProfile_BeginTiming(RenderMsg);
|
||||
plRenderMsg* rendMsg = TRACKED_NEW plRenderMsg(fPipeline);
|
||||
plRenderMsg* rendMsg = new plRenderMsg(fPipeline);
|
||||
plgDispatch::MsgSend(rendMsg);
|
||||
plProfile_EndTiming(RenderMsg);
|
||||
|
||||
plPreResourceMsg* preMsg = TRACKED_NEW plPreResourceMsg(fPipeline);
|
||||
plPreResourceMsg* preMsg = new plPreResourceMsg(fPipeline);
|
||||
plgDispatch::MsgSend(preMsg);
|
||||
|
||||
// This might not be the ideal place for this, but it
|
||||
@ -1970,7 +1968,7 @@ void plClient::IKillMovies()
|
||||
fMovies.Reset();
|
||||
}
|
||||
|
||||
hsBool plClient::IPlayIntroBink(const char* movieName, hsScalar endDelay, hsScalar posX, hsScalar posY, hsScalar scaleX, hsScalar scaleY, hsScalar volume /* = 1.0 */)
|
||||
hsBool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume /* = 1.0 */)
|
||||
{
|
||||
SetQuitIntro(false);
|
||||
plBinkPlayer player;
|
||||
@ -2113,7 +2111,7 @@ hsG3DDeviceModeRecord plClient::ILoadDevMode(const char* devModeFile)
|
||||
/// Read the rest in
|
||||
selMode.Read(&stream);
|
||||
|
||||
UInt16 performance = stream.ReadLE16();
|
||||
uint16_t performance = stream.ReadLE16();
|
||||
|
||||
if( performance < 25 )
|
||||
plBitmap::SetGlobalLevelChopCount( 2 );
|
||||
@ -2147,7 +2145,7 @@ hsG3DDeviceModeRecord plClient::ILoadDevMode(const char* devModeFile)
|
||||
{
|
||||
dmr.GetDevice()->Write(&stream);
|
||||
dmr.GetMode()->Write(&stream);
|
||||
stream.WriteLE16((UInt16)(0*100));
|
||||
stream.WriteLE16((uint16_t)(0*100));
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
@ -2179,7 +2177,7 @@ void plClient::ResizeDisplayDevice(int Width, int Height, hsBool Windowed)
|
||||
pfGameGUIMgr::GetInstance()->SetAspectRatio( aspectratio );
|
||||
|
||||
|
||||
UInt32 winStyle, winExStyle;
|
||||
uint32_t winStyle, winExStyle;
|
||||
if( Windowed )
|
||||
{
|
||||
winStyle = WS_OVERLAPPEDWINDOW;
|
||||
@ -2192,8 +2190,8 @@ void plClient::ResizeDisplayDevice(int Width, int Height, hsBool Windowed)
|
||||
SetWindowLong(fWindowHndl, GWL_EXSTYLE, winExStyle);
|
||||
|
||||
|
||||
UInt32 flags = SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_FRAMECHANGED;
|
||||
UInt32 OutsideWidth, OutsideHeight;
|
||||
uint32_t flags = SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_FRAMECHANGED;
|
||||
uint32_t OutsideWidth, OutsideHeight;
|
||||
HWND insertAfter;
|
||||
if( Windowed )
|
||||
{
|
||||
@ -2312,7 +2310,7 @@ void plClient::IDetectAudioVideoSettings()
|
||||
int val = 0;
|
||||
hsStream *stream = nil;
|
||||
hsUNIXStream s;
|
||||
wchar audioIniFile[MAX_PATH], graphicsIniFile[MAX_PATH];
|
||||
wchar_t audioIniFile[MAX_PATH], graphicsIniFile[MAX_PATH];
|
||||
PathGetInitDirectory(audioIniFile, arrsize(audioIniFile));
|
||||
StrCopy(graphicsIniFile, audioIniFile, arrsize(audioIniFile));
|
||||
PathAddFilename(audioIniFile, audioIniFile, L"audio.ini", arrsize(audioIniFile));
|
||||
@ -2371,7 +2369,7 @@ void plClient::IDetectAudioVideoSettings()
|
||||
}
|
||||
}
|
||||
|
||||
void plClient::IWriteDefaultGraphicsSettings(const wchar* destFile)
|
||||
void plClient::IWriteDefaultGraphicsSettings(const wchar_t* destFile)
|
||||
{
|
||||
hsStream *stream = plEncryptedStream::OpenEncryptedFileWrite(destFile);
|
||||
|
||||
@ -2445,11 +2443,11 @@ void plClient::IOnAsyncInitComplete () {
|
||||
|
||||
pfMarkerMgr::Instance();
|
||||
|
||||
fAnimDebugList = TRACKED_NEW plAnimDebugList();
|
||||
fAnimDebugList = new plAnimDebugList();
|
||||
|
||||
/// Now parse final init files (*.fni). These are files just like ini files, only to be run
|
||||
/// after all hell has broken loose in the client.
|
||||
wchar initFolder[MAX_PATH];
|
||||
wchar_t initFolder[MAX_PATH];
|
||||
PathGetInitDirectory(initFolder, arrsize(initFolder));
|
||||
pfConsoleDirSrc dirSrc( fConsoleEngine, initFolder, L"net*.fni" ); // connect to net first
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
@ -2477,7 +2475,7 @@ void plClient::IOnAsyncInitComplete () {
|
||||
|
||||
// Tell the transition manager to start faded out. This is so we don't
|
||||
// get a frame or two of non-faded drawing before we do our initial fade in
|
||||
(void)(TRACKED_NEW plTransitionMsg( plTransitionMsg::kFadeOut, 0.0f, true ))->Send();
|
||||
(void)(new plTransitionMsg( plTransitionMsg::kFadeOut, 0.0f, true ))->Send();
|
||||
|
||||
fFlags.SetBit(kFlagAsyncInitComplete);
|
||||
if (fFlags.IsBitSet(kFlagGlobalDataLoaded))
|
||||
@ -2495,7 +2493,7 @@ void plClient::ICompleteInit () {
|
||||
hsStatusMessage("Client init complete.");
|
||||
|
||||
// Tell everyone we're ready to rock.
|
||||
plClientMsg* clientMsg = TRACKED_NEW plClientMsg(plClientMsg::kInitComplete);
|
||||
plClientMsg* clientMsg = new plClientMsg(plClientMsg::kInitComplete);
|
||||
clientMsg->SetBCastFlag(plMessage::kBCastByType);
|
||||
clientMsg->Send();
|
||||
|
||||
|
@ -47,10 +47,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
//#define NEW_CAMERA_CODE
|
||||
|
||||
#include "hsWindowHndl.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsBitVector.h"
|
||||
#include "hsTemplates.h"
|
||||
#include "hsUtils.h"
|
||||
|
||||
#include "hsStlUtils.h"
|
||||
#include "pnKeyedObject/hsKeyedObject.h"
|
||||
#include "pnKeyedObject/plUoid.h"
|
||||
@ -94,10 +94,10 @@ protected:
|
||||
{
|
||||
public:
|
||||
plSceneNode *fNode;
|
||||
UInt32 fFlags;
|
||||
uint32_t fFlags;
|
||||
|
||||
plRoomRec() { fNode = nil; fFlags = 0; }
|
||||
plRoomRec( plSceneNode *n, UInt32 f ) : fNode( n ), fFlags( f ) {}
|
||||
plRoomRec( plSceneNode *n, uint32_t f ) : fNode( n ), fFlags( f ) {}
|
||||
|
||||
enum Flags
|
||||
{
|
||||
@ -189,13 +189,13 @@ protected:
|
||||
void IProcessRenderRequests(hsTArray<plRenderRequest*>& reqs);
|
||||
void IAddRenderRequest(plRenderRequest* req);
|
||||
|
||||
hsBool IPlayIntroBink(const char* movieName, hsScalar endDelay, hsScalar posX, hsScalar posY, hsScalar scaleX, hsScalar scaleY, hsScalar volume = 1.0);
|
||||
hsBool IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume = 1.0);
|
||||
hsBool IHandleMovieMsg(plMovieMsg* mov);
|
||||
void IKillMovies();
|
||||
void IServiceMovies();
|
||||
|
||||
void IStartProgress( const char *title, hsScalar len );
|
||||
void IIncProgress( hsScalar byHowMuch, const char *text );
|
||||
void IStartProgress( const char *title, float len );
|
||||
void IIncProgress( float byHowMuch, const char *text );
|
||||
void IStopProgress( void );
|
||||
|
||||
static void IDispatchMsgReceiveCallback();
|
||||
@ -293,7 +293,7 @@ public:
|
||||
void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool VSync = false);
|
||||
void ResizeDisplayDevice(int Width, int Height, hsBool Windowed);
|
||||
void IDetectAudioVideoSettings();
|
||||
void IWriteDefaultGraphicsSettings(const wchar* destFile);
|
||||
void IWriteDefaultGraphicsSettings(const wchar_t* destFile);
|
||||
|
||||
plAnimDebugList *fAnimDebugList;
|
||||
|
||||
|
@ -54,13 +54,13 @@ namespace ClientUpdate
|
||||
//
|
||||
// Format of the update stream
|
||||
//
|
||||
// UInt8 - type (kUpdate, kShutdown)
|
||||
// uint8_t - type (kUpdate, kShutdown)
|
||||
//
|
||||
// If type is kUpdate:
|
||||
// UInt32 - number of deleted keys
|
||||
// uint32_t - number of deleted keys
|
||||
// plUoid - uoid of deleted key (* num)
|
||||
//
|
||||
// UInt32 - number of new creatables
|
||||
// uint32_t - number of new creatables
|
||||
// plCreatable - new creatable (* num)
|
||||
//
|
||||
|
||||
|
@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStream.h"
|
||||
#include "hsUtils.h"
|
||||
|
||||
#include "plClient.h"
|
||||
#include "plClientResMgr/plClientResMgr.h"
|
||||
#include "plNetClient/plNetClientMgr.h"
|
||||
@ -133,14 +133,14 @@ static const unsigned AUTH_FAILED_TIMER = 2;
|
||||
//============================================================================
|
||||
#ifdef PLASMA_EXTERNAL_RELEASE
|
||||
|
||||
static wchar s_patcherExeName[] = L"UruLauncher.exe";
|
||||
static wchar_t s_patcherExeName[] = L"UruLauncher.exe";
|
||||
|
||||
#endif // PLASMA_EXTERNAL_RELEASE
|
||||
|
||||
//============================================================================
|
||||
// PhysX installer
|
||||
//============================================================================
|
||||
static wchar s_physXSetupExeName[] = L"PhysX_Setup.exe";
|
||||
static wchar_t s_physXSetupExeName[] = L"PhysX_Setup.exe";
|
||||
|
||||
//============================================================================
|
||||
// TRANSGAMING detection & dialog replacement
|
||||
@ -178,12 +178,12 @@ struct LoginDialogParam {
|
||||
};
|
||||
|
||||
static bool AuthenticateNetClientComm(ENetError* result, HWND parentWnd);
|
||||
static void GetCryptKey(UInt32* cryptKey, unsigned size);
|
||||
static void GetCryptKey(uint32_t* cryptKey, unsigned size);
|
||||
static void SaveUserPass (LoginDialogParam *pLoginParam, char *password);
|
||||
static void LoadUserPass (LoginDialogParam *pLoginParam);
|
||||
static void AuthFailedStrings (ENetError authError,
|
||||
const char **ppStr1, const char **ppStr2,
|
||||
const wchar **ppWStr);
|
||||
const wchar_t **ppWStr);
|
||||
|
||||
|
||||
// Detect whether we're running under TRANSGAMING Cider
|
||||
@ -290,7 +290,7 @@ static bool TGRunLoginDialog (LoginDialogParam *pLoginParam)
|
||||
if (!cancelled)
|
||||
{
|
||||
const char *pStr1, *pStr2;
|
||||
const wchar *pWStr;
|
||||
const wchar_t *pWStr;
|
||||
unsigned int Len;
|
||||
char *pTmpStr;
|
||||
|
||||
@ -302,7 +302,7 @@ static bool TGRunLoginDialog (LoginDialogParam *pLoginParam)
|
||||
if (pWStr)
|
||||
Len += StrLen (pWStr) + 2;
|
||||
|
||||
pTmpStr = TRACKED_NEW char[Len];
|
||||
pTmpStr = new char[Len];
|
||||
StrCopy (pTmpStr, pStr1, StrLen (pStr1));
|
||||
if (pStr2)
|
||||
{
|
||||
@ -361,7 +361,7 @@ void DebugMsgF(const char* format, ...);
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static bool gDragging = false;
|
||||
static UInt32 keyState=0;
|
||||
static uint32_t keyState=0;
|
||||
|
||||
// Handle messages
|
||||
switch (message) {
|
||||
@ -661,8 +661,8 @@ bool InitPhysX()
|
||||
// launch the PhysX installer
|
||||
STARTUPINFOW startupInfo;
|
||||
PROCESS_INFORMATION processInfo;
|
||||
ZERO(startupInfo);
|
||||
ZERO(processInfo);
|
||||
memset(&startupInfo, 0, sizeof(startupInfo));
|
||||
memset(&processInfo, 0, sizeof(processInfo));
|
||||
startupInfo.cb = sizeof(startupInfo);
|
||||
if(!CreateProcessW(NULL, s_physXSetupExeName, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo))
|
||||
{
|
||||
@ -702,7 +702,7 @@ bool InitPhysX()
|
||||
|
||||
bool InitClient( HWND hWnd )
|
||||
{
|
||||
plResManager *resMgr = TRACKED_NEW plResManager;
|
||||
plResManager *resMgr = new plResManager;
|
||||
resMgr->SetDataPath("dat");
|
||||
hsgResMgr::Init(resMgr);
|
||||
|
||||
@ -713,7 +713,7 @@ bool InitClient( HWND hWnd )
|
||||
}
|
||||
plClientResMgr::Instance().ILoadResources("resource.dat");
|
||||
|
||||
gClient = TRACKED_NEW plClient;
|
||||
gClient = new plClient;
|
||||
if( gClient == nil )
|
||||
return false;
|
||||
|
||||
@ -773,7 +773,7 @@ BOOL WinInit(HINSTANCE hInst, int nCmdShow)
|
||||
/// else, use our normal styles
|
||||
|
||||
char windowName[256];
|
||||
wchar productString[256];
|
||||
wchar_t productString[256];
|
||||
StrCopy(productString, ProductLongName(), arrsize(productString));
|
||||
StrToAnsi(windowName, productString, arrsize(windowName));
|
||||
|
||||
@ -837,7 +837,7 @@ void DebugMsgF(const char* format, ...)
|
||||
|
||||
static void AuthFailedStrings (ENetError authError,
|
||||
const char **ppStr1, const char **ppStr2,
|
||||
const wchar **ppWStr)
|
||||
const wchar_t **ppWStr)
|
||||
{
|
||||
*ppStr1 = NULL;
|
||||
*ppStr2 = NULL;
|
||||
@ -895,7 +895,7 @@ BOOL CALLBACK AuthFailedDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||
{
|
||||
LoginDialogParam* loginParam = (LoginDialogParam*)lParam;
|
||||
const char *pStr1, *pStr2;
|
||||
const wchar *pWStr;
|
||||
const wchar_t *pWStr;
|
||||
|
||||
AuthFailedStrings (loginParam->authError,
|
||||
&pStr1, &pStr2, &pWStr);
|
||||
@ -939,7 +939,7 @@ BOOL CALLBACK UruTOSDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||
char* eulaData = NULL;
|
||||
unsigned dataLen = stream.GetSizeLeft();
|
||||
|
||||
eulaData = TRACKED_NEW char[dataLen + 1];
|
||||
eulaData = new char[dataLen + 1];
|
||||
ZeroMemory(eulaData, dataLen + 1);
|
||||
|
||||
stream.Read(dataLen, eulaData);
|
||||
@ -970,12 +970,12 @@ BOOL CALLBACK UruTOSDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||
|
||||
static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
|
||||
{
|
||||
UInt32 cryptKey[4];
|
||||
uint32_t cryptKey[4];
|
||||
ZeroMemory(cryptKey, sizeof(cryptKey));
|
||||
GetCryptKey(cryptKey, arrsize(cryptKey));
|
||||
|
||||
wchar wusername[kMaxAccountNameLength];
|
||||
wchar wpassword[kMaxPasswordLength];
|
||||
wchar_t wusername[kMaxAccountNameLength];
|
||||
wchar_t wpassword[kMaxPasswordLength];
|
||||
|
||||
StrToUnicode(wusername, pLoginParam->username, arrsize(wusername));
|
||||
|
||||
@ -985,7 +985,7 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
|
||||
{
|
||||
StrToUnicode(wpassword, password, arrsize(wpassword));
|
||||
|
||||
wchar domain[15];
|
||||
wchar_t domain[15];
|
||||
PathSplitEmail(wusername, nil, 0, domain, arrsize(domain), nil, 0, nil, 0, 0);
|
||||
|
||||
if (StrLen(domain) == 0 || StrCmpI(domain, L"gametap") == 0) {
|
||||
@ -1012,12 +1012,12 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
|
||||
else
|
||||
NetCommSetAuthTokenAndOS(nil, L"win");
|
||||
|
||||
wchar fileAndPath[MAX_PATH];
|
||||
wchar_t fileAndPath[MAX_PATH];
|
||||
PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
|
||||
PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
// internal builds can use the local init directory
|
||||
wchar localFileAndPath[MAX_PATH];
|
||||
wchar_t localFileAndPath[MAX_PATH];
|
||||
StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
|
||||
if (PathDoesFileExist(localFileAndPath))
|
||||
StrCopy(fileAndPath, localFileAndPath, arrsize(localFileAndPath));
|
||||
@ -1038,7 +1038,7 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
|
||||
|
||||
static void LoadUserPass (LoginDialogParam *pLoginParam)
|
||||
{
|
||||
UInt32 cryptKey[4];
|
||||
uint32_t cryptKey[4];
|
||||
ZeroMemory(cryptKey, sizeof(cryptKey));
|
||||
GetCryptKey(cryptKey, arrsize(cryptKey));
|
||||
|
||||
@ -1046,12 +1046,12 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
|
||||
pLoginParam->remember = false;
|
||||
pLoginParam->username[0] = '\0';
|
||||
|
||||
wchar fileAndPath[MAX_PATH];
|
||||
wchar_t fileAndPath[MAX_PATH];
|
||||
PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
|
||||
PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
// internal builds can use the local init directory
|
||||
wchar localFileAndPath[MAX_PATH];
|
||||
wchar_t localFileAndPath[MAX_PATH];
|
||||
StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
|
||||
if (PathDoesFileExist(localFileAndPath))
|
||||
StrCopy(fileAndPath, localFileAndPath, arrsize(localFileAndPath));
|
||||
@ -1059,7 +1059,7 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
|
||||
hsStream* stream = plEncryptedStream::OpenEncryptedFile(fileAndPath, true, cryptKey);
|
||||
if (stream && !stream->AtEnd())
|
||||
{
|
||||
UInt32 savedKey[4];
|
||||
uint32_t savedKey[4];
|
||||
stream->Read(sizeof(savedKey), savedKey);
|
||||
|
||||
if (memcmp(cryptKey, savedKey, sizeof(savedKey)) == 0)
|
||||
@ -1166,7 +1166,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||
}
|
||||
|
||||
char windowName[256];
|
||||
wchar productString[256];
|
||||
wchar_t productString[256];
|
||||
ProductString(productString, arrsize(productString));
|
||||
StrToAnsi(windowName, productString, arrsize(windowName));
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_PRODUCTSTRING), WM_SETTEXT, 0, (LPARAM) windowName);
|
||||
@ -1218,7 +1218,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||
|
||||
SaveUserPass (pLoginParam, password);
|
||||
|
||||
MemSet(&pLoginParam->authError, 0, sizeof(pLoginParam->authError));
|
||||
memset(&pLoginParam->authError, 0, sizeof(pLoginParam->authError));
|
||||
bool cancelled = AuthenticateNetClientComm(&pLoginParam->authError, hwndDlg);
|
||||
|
||||
if (IS_NET_SUCCESS(pLoginParam->authError) && !cancelled)
|
||||
@ -1251,7 +1251,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||
}
|
||||
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_URULOGIN_GAMETAPLINK)
|
||||
{
|
||||
const wchar *signupurl = GetServerSignupUrl();
|
||||
const wchar_t *signupurl = GetServerSignupUrl();
|
||||
ShellExecuteW(NULL, L"open", signupurl, NULL, NULL, SW_SHOWNORMAL);
|
||||
|
||||
return TRUE;
|
||||
@ -1380,7 +1380,7 @@ LONG WINAPI plCustomUnhandledExceptionFilter( struct _EXCEPTION_POINTERS *Except
|
||||
}
|
||||
|
||||
char prodName[256];
|
||||
wchar productString[256];
|
||||
wchar_t productString[256];
|
||||
ProductString(productString, arrsize(productString));
|
||||
StrToAnsi(prodName, productString, arrsize(prodName));
|
||||
|
||||
@ -1390,7 +1390,7 @@ LONG WINAPI plCustomUnhandledExceptionFilter( struct _EXCEPTION_POINTERS *Except
|
||||
|
||||
/// Print the info out to a log file as well
|
||||
hsUNIXStream log;
|
||||
wchar fileAndPath[MAX_PATH];
|
||||
wchar_t fileAndPath[MAX_PATH];
|
||||
PathGetLogDirectory(fileAndPath, arrsize(fileAndPath));
|
||||
PathAddFilename(fileAndPath, fileAndPath, L"stackDump.log", arrsize(fileAndPath));
|
||||
if( log.Open( fileAndPath, L"wt" ) )
|
||||
@ -1430,7 +1430,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
gDataServerLocal = true;
|
||||
#endif
|
||||
|
||||
const wchar *serverIni = L"server.ini";
|
||||
const wchar_t *serverIni = L"server.ini";
|
||||
if (cmdParser.IsSpecified(kArgServerIni))
|
||||
serverIni = cmdParser.GetString(kArgServerIni);
|
||||
|
||||
@ -1455,11 +1455,11 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
// if the client was started directly, run the patcher, and shutdown
|
||||
STARTUPINFOW si;
|
||||
PROCESS_INFORMATION pi;
|
||||
ZERO(si);
|
||||
ZERO(pi);
|
||||
memset(&si, 0, sizeof(si));
|
||||
memset(&pi, 0, sizeof(pi));
|
||||
si.cb = sizeof(si);
|
||||
wchar cmdLine[MAX_PATH];
|
||||
const wchar ** addrs;
|
||||
wchar_t cmdLine[MAX_PATH];
|
||||
const wchar_t ** addrs;
|
||||
|
||||
if (!eventExists) // if it is missing, assume patcher wasn't launched
|
||||
{
|
||||
@ -1487,7 +1487,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
#endif
|
||||
|
||||
// Load an optional general.ini
|
||||
wchar gipath[MAX_PATH];
|
||||
wchar_t gipath[MAX_PATH];
|
||||
PathGetInitDirectory(gipath, arrsize(gipath));
|
||||
PathAddFilename(gipath, gipath, L"general.ini", arrsize(gipath));
|
||||
FILE *generalini = _wfopen(gipath, L"rb");
|
||||
@ -1547,13 +1547,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
|
||||
bool needExit = false;
|
||||
LoginDialogParam loginParam;
|
||||
MemSet(&loginParam, 0, sizeof(loginParam));
|
||||
memset(&loginParam, 0, sizeof(loginParam));
|
||||
LoadUserPass(&loginParam);
|
||||
|
||||
if (!doIntroDialogs && loginParam.remember) {
|
||||
ENetError auth;
|
||||
|
||||
wchar wusername[kMaxAccountNameLength];
|
||||
wchar_t wusername[kMaxAccountNameLength];
|
||||
StrToUnicode(wusername, loginParam.username, arrsize(wusername));
|
||||
NetCommSetAccountUsernamePassword(wusername, loginParam.namePassHash);
|
||||
bool cancelled = AuthenticateNetClientComm(&auth, NULL);
|
||||
@ -1616,7 +1616,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
gDebugFile = NULL;
|
||||
if ( !plStatusLog::fLoggingOff )
|
||||
{
|
||||
wchar fileAndPath[MAX_PATH];
|
||||
wchar_t fileAndPath[MAX_PATH];
|
||||
PathGetLogDirectory(fileAndPath, arrsize(fileAndPath));
|
||||
PathAddFilename(fileAndPath, fileAndPath, L"plasmalog.txt", arrsize(fileAndPath));
|
||||
gDebugFile = _wfopen(fileAndPath, L"wt");
|
||||
@ -1625,7 +1625,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
if (gDebugFile != NULL)
|
||||
{
|
||||
char prdName[256];
|
||||
wchar prdString[256];
|
||||
wchar_t prdString[256];
|
||||
ProductString(prdString, arrsize(prdString));
|
||||
StrToAnsi(prdName, prdString, arrsize(prdName));
|
||||
fprintf(gDebugFile, "%s\n", prdName);
|
||||
@ -1635,10 +1635,10 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
|
||||
// log stackdump.log text if the log exists
|
||||
char stackDumpText[1024];
|
||||
wchar stackDumpTextW[1024];
|
||||
wchar_t stackDumpTextW[1024];
|
||||
memset(stackDumpText, 0, arrsize(stackDumpText));
|
||||
memset(stackDumpTextW, 0, arrsize(stackDumpTextW) * sizeof(wchar));
|
||||
wchar fileAndPath[MAX_PATH];
|
||||
memset(stackDumpTextW, 0, arrsize(stackDumpTextW) * sizeof(wchar_t));
|
||||
wchar_t fileAndPath[MAX_PATH];
|
||||
PathGetLogDirectory(fileAndPath, arrsize(fileAndPath));
|
||||
PathAddFilename(fileAndPath, fileAndPath, L"stackDump.log", arrsize(fileAndPath));
|
||||
FILE *stackDumpLog = _wfopen(fileAndPath, L"r");
|
||||
@ -1758,7 +1758,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
return PARABLE_NORMAL_EXIT;
|
||||
}
|
||||
|
||||
static void GetCryptKey(UInt32* cryptKey, unsigned numElements)
|
||||
static void GetCryptKey(uint32_t* cryptKey, unsigned numElements)
|
||||
{
|
||||
char volName[] = "C:\\";
|
||||
int index = 0;
|
||||
|
Reference in New Issue
Block a user