From 7445e23e59993926918d38bad1ee2f4f3aca78ca Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Sat, 11 Oct 2014 14:38:17 -0700 Subject: [PATCH 1/2] Rename "new account" button resource to reflect actual purpose. --- Sources/Plasma/Apps/plClient/res/plClient.rc | 2 +- Sources/Plasma/Apps/plClient/res/resource.h | 2 +- Sources/Plasma/Apps/plClient/winmain.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/res/plClient.rc b/Sources/Plasma/Apps/plClient/res/plClient.rc index a48b1310..a489e22d 100644 --- a/Sources/Plasma/Apps/plClient/res/plClient.rc +++ b/Sources/Plasma/Apps/plClient/res/plClient.rc @@ -112,7 +112,7 @@ BEGIN RTEXT "Product String",IDC_PRODUCTSTRING,88,86,194,8 CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,7,49, 288,168 - PUSHBUTTON "Need an account?",IDC_URULOGIN_GAMETAPLINK,95,183,110, + PUSHBUTTON "Need an account?",IDC_URULOGIN_NEWACCTLINK,95,183,110, 14,BS_FLAT END diff --git a/Sources/Plasma/Apps/plClient/res/resource.h b/Sources/Plasma/Apps/plClient/res/resource.h index 3d8bf476..4f0bc7be 100644 --- a/Sources/Plasma/Apps/plClient/res/resource.h +++ b/Sources/Plasma/Apps/plClient/res/resource.h @@ -20,7 +20,7 @@ #define IDC_RICHEDIT22 1028 #define IDC_AUTH_TEXT 1029 #define IDC_BUTTON1 1030 -#define IDC_URULOGIN_GAMETAPLINK 1030 +#define IDC_URULOGIN_NEWACCTLINK 1030 #define IDC_AUTH_MESSAGE 1031 #define IDC_PRODUCTSTRING 1033 #define IDC_STATUS_TEXT 1034 diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 0a742bf5..4b600e64 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -1091,7 +1091,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM return TRUE; } - else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_URULOGIN_GAMETAPLINK) + else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_URULOGIN_NEWACCTLINK) { const char* signupurl = GetServerSignupUrl(); ShellExecuteA(NULL, "open", signupurl, NULL, NULL, SW_SHOWNORMAL); From 0d297076efd1c1e9b43550a1d4b7906c93d0e979 Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Sat, 11 Oct 2014 14:39:22 -0700 Subject: [PATCH 2/2] Remove unused and dead code in winmain.cpp. --- Sources/Plasma/Apps/plClient/winmain.cpp | 53 ++---------------------- 1 file changed, 3 insertions(+), 50 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 4b600e64..782c27f3 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -43,39 +43,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsWindows.h" -#include // windows directory handling fxns (for chdir) #include #include // ShellExecuteA #include -//#define DETACH_EXE // Microsoft trick to force loading of exe to memory -#ifdef DETACH_EXE - #include // Windows Load EXE into memory suff -#endif - #include #include "hsStream.h" - #include "plClient.h" #include "plClientResMgr/plClientResMgr.h" #include "pfCrashHandler/plCrashCli.h" #include "plNetClient/plNetClientMgr.h" -#include "plNetClient/plNetLinkingMgr.h" #include "plInputCore/plInputDevice.h" #include "plInputCore/plInputManager.h" -#include "plUnifiedTime/plUnifiedTime.h" #include "plPipeline.h" #include "plResMgr/plResManager.h" #include "plResMgr/plLocalization.h" #include "plFile/plEncryptedStream.h" #include "pnEncryption/plChallengeHash.h" - #include "plStatusLog/plStatusLog.h" #include "plProduct.h" #include "plNetGameLib/plNetGameLib.h" - #include "plPhysX/plSimulationMgr.h" #include "res/resource.h" @@ -94,7 +83,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // Globals // -bool gHasMouse = false; ITaskbarList3* gTaskbarList = nil; // NT 6.1+ taskbar stuff extern bool gDataServerLocal; @@ -121,7 +109,6 @@ int gWinBorderDX = GetSystemMetrics( SM_CXSIZEFRAME ); int gWinBorderDY = GetSystemMetrics( SM_CYSIZEFRAME ); int gWinMenuDY = GetSystemMetrics( SM_CYCAPTION ); -//#include "global.h" plClient *gClient; bool gPendingActivate = false; bool gPendingActivateFlag = false; @@ -247,12 +234,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } break; -#if 0 - case WM_KILLFOCUS: - SetForegroundWindow(hWnd); - break; -#endif - case WM_SYSKEYUP: case WM_SYSKEYDOWN: { @@ -555,13 +536,6 @@ bool InitClient( HWND hWnd ) gClient->SetWindowHandle( hWnd ); -#ifdef DETACH_EXE - hInstance = ((LPCREATESTRUCT) lParam)->hInstance; - - // This Function loads the EXE into Virtual memory...supposedly - HRESULT hr = DetachFromMedium(hInstance, DMDFM_ALWAYS | DMDFM_ALLPAGES); -#endif - if( gClient->InitPipeline() ) gClient->SetDone(true); else @@ -602,9 +576,6 @@ BOOL WinInit(HINSTANCE hInst, int nCmdShow) if (!RegisterClass(&wndClass)) return FALSE; - /// 8.11.2000 - Test for OpenGL fullscreen, and if so use no border, no caption; - /// else, use our normal styles - // Create a window HWND hWnd = CreateWindow( CLASSNAME, plProduct::LongName().c_str(), @@ -614,7 +585,6 @@ BOOL WinInit(HINSTANCE hInst, int nCmdShow) 600 + gWinBorderDY * 2 + gWinMenuDY, NULL, NULL, hInst, NULL ); -// gClient->SetWindowHandle((hsWindowHndl) if( !InitClient( hWnd ) ) return FALSE; @@ -681,12 +651,7 @@ static void AuthFailedStrings (ENetError authError, switch (plLocalization::GetLanguage()) { - case plLocalization::kFrench: - case plLocalization::kGerman: - case plLocalization::kJapanese: - *ppStr1 = "Authentication Failed. Please try again."; - break; - + case plLocalization::kEnglish: default: *ppStr1 = "Authentication Failed. Please try again."; @@ -1133,13 +1098,13 @@ BOOL CALLBACK SplashDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l case plLocalization::kGerman: ::SetDlgItemText( hwndDlg, IDC_STARTING_TEXT, "Starte URU, bitte warten ..."); break; -/* case plLocalization::kSpanish: + case plLocalization::kSpanish: ::SetDlgItemText( hwndDlg, IDC_STARTING_TEXT, "Iniciando URU, por favor espera..."); break; case plLocalization::kItalian: ::SetDlgItemText( hwndDlg, IDC_STARTING_TEXT, "Avvio di URU, attendere..."); break; -*/ // default is English + // default is English case plLocalization::kJapanese: ::SetDlgItemText( hwndDlg, IDC_STARTING_TEXT, "..."); break; @@ -1390,15 +1355,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC if (!WinInit(hInst, nCmdShow) || gClient->GetDone()) break; - // We don't have multiplayer localized assets for Italian or Spanish, so force them to English in that case. - /* if (!plNetClientMgr::GetInstance()->InOfflineMode() && - (plLocalization::GetLanguage() == plLocalization::kItalian || - plLocalization::GetLanguage() == plLocalization::kSpanish)) - { - plLocalization::SetLanguage(plLocalization::kEnglish); - } - */ - // Done with our splash now ::DestroyWindow( splashDialog ); @@ -1407,8 +1363,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC // Show the main window ShowWindow(gClient->GetWindowHandle(), SW_SHOW); - - gHasMouse = GetSystemMetrics(SM_MOUSEPRESENT); // Be really REALLY forceful about being in the front BringWindowToTop( gClient->GetWindowHandle() ); @@ -1473,7 +1427,6 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC #endif // Exit WinMain and terminate the app.... -// return msg.wParam; return PARABLE_NORMAL_EXIT; }