Start trying to clean up the Windows x64 build (trunk only)

This commit is contained in:
nethack.allison
2012-01-11 01:15:37 +00:00
parent b97d53fb30
commit 783413bb57
11 changed files with 145 additions and 122 deletions
+10 -10
View File
@@ -25,7 +25,7 @@ static TCHAR szMainWindowClass[] = TEXT("MSNHMainWndClass");
static TCHAR szTitle[MAX_LOADSTRING];
extern void mswin_display_splash_window(BOOL);
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK MainWndProc(HWND, UINT, UINT, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
static LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
@@ -175,7 +175,7 @@ static const char scanmap[] = { /* ... */
//
// PURPOSE: Processes messages for the main window.
*/
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, UINT wParam, LPARAM lParam)
{
PNHMainWindow data;
@@ -187,7 +187,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
if( !data ) panic("out of memory");
ZeroMemory(data, sizeof(NHMainWindow));
data->mapAcsiiModeSave = MAP_MODE_ASCII12x16;
SetWindowLong(hWnd, GWL_USERDATA, (LONG)data);
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data);
/* update menu items */
CheckMenuItem(
@@ -213,7 +213,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
case WM_KEYDOWN:
{
data = (PNHMainWindow)GetWindowLong(hWnd, GWL_USERDATA);
data = (PNHMainWindow)GetWindowLong(hWnd, GWLP_USERDATA);
/* translate arrow keys into nethack commands */
switch (wParam)
@@ -524,8 +524,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
WM_QUIT somehow */
/* clean up */
free( (PNHMainWindow)GetWindowLong(hWnd, GWL_USERDATA) );
SetWindowLong(hWnd, GWL_USERDATA, (LONG)0);
free( (PNHMainWindow)GetWindowLong(hWnd, GWLP_USERDATA) );
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0);
// PostQuitMessage(0);
exit(1);
@@ -584,7 +584,7 @@ void mswin_layout_main_window(HWND changed_child)
if( GetNHApp()->bAutoLayout ) {
GetClientRect(GetNHApp()->hMainWnd, &client_rt);
data = (PNHMainWindow)GetWindowLong(GetNHApp()->hMainWnd, GWL_USERDATA);
data = (PNHMainWindow)GetWindowLong(GetNHApp()->hMainWnd, GWLP_USERDATA);
/* get sizes of child windows */
wnd_status = mswin_hwnd_from_winid(WIN_STATUS);
@@ -754,7 +754,7 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
int wmId, wmEvent;
PNHMainWindow data;
data = (PNHMainWindow)GetWindowLong(hWnd, GWL_USERDATA);
data = (PNHMainWindow)GetWindowLong(hWnd, GWLP_USERDATA);
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
@@ -1039,7 +1039,7 @@ void mswin_select_map_mode(int mode)
winid map_id;
map_id = WIN_MAP;
data = (PNHMainWindow)GetWindowLong(GetNHApp()->hMainWnd, GWL_USERDATA);
data = (PNHMainWindow)GetWindowLong(GetNHApp()->hMainWnd, GWLP_USERDATA);
/* override for Rogue level */
#ifdef REINCARNATION
@@ -1133,7 +1133,7 @@ void nhlock_windows( BOOL lock )
style = GetWindowLong(GetNHApp()->windowlist[i].win, GWL_STYLE);
if( lock ) style &= ~WS_CAPTION;
else style |= WS_CAPTION;
SetWindowLong(GetNHApp()->windowlist[i].win, GWL_STYLE, style);
SetWindowLongPtr(GetNHApp()->windowlist[i].win, GWL_STYLE, style);
SetWindowPos(
GetNHApp()->windowlist[i].win,
NULL,