Start trying to clean up the Windows x64 build (trunk only)
This commit is contained in:
+11
-12
@@ -1,5 +1,4 @@
|
||||
/* NetHack 3.5 mhmsgwnd.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)mhmsgwnd.c 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -161,9 +160,9 @@ LRESULT CALLBACK NHMessageWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
||||
case WM_DESTROY:
|
||||
{
|
||||
PNHMessageWindow data;
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
free(data);
|
||||
SetWindowLong(hWnd, GWL_USERDATA, (LONG)0);
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0);
|
||||
} break;
|
||||
|
||||
case WM_SIZE:
|
||||
@@ -174,7 +173,7 @@ LRESULT CALLBACK NHMessageWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
||||
PNHMessageWindow data;
|
||||
RECT rt;
|
||||
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
|
||||
xNewSize = LOWORD(lParam);
|
||||
yNewSize = HIWORD(lParam);
|
||||
@@ -239,7 +238,7 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PNHMessageWindow data;
|
||||
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
switch( wParam ) {
|
||||
case MSNH_MSG_PUTSTR:
|
||||
{
|
||||
@@ -383,7 +382,7 @@ void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
int yInc;
|
||||
|
||||
/* get window data */
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
si.cbSize = sizeof(si);
|
||||
@@ -460,7 +459,7 @@ void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
int xInc;
|
||||
|
||||
/* get window data */
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
si.cbSize = sizeof(si);
|
||||
@@ -571,7 +570,7 @@ void onPaint(HWND hWnd)
|
||||
OldBg = SetBkColor(hdc, message_bg_brush ? message_bg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_BG_MSG));
|
||||
OldFg = setMsgTextColor(hdc, 0);
|
||||
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
|
||||
GetClientRect(hWnd, &client_rt);
|
||||
|
||||
@@ -660,7 +659,7 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
if( !data ) panic("out of memory");
|
||||
ZeroMemory(data, sizeof(NHMessageWindow));
|
||||
data->max_text = MAXWINDOWTEXT;
|
||||
SetWindowLong(hWnd, GWL_USERDATA, (LONG)data);
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data);
|
||||
|
||||
/* re-calculate window size (+ font size) */
|
||||
mswin_message_window_size(hWnd, &dummy);
|
||||
@@ -674,7 +673,7 @@ void mswin_message_window_size (HWND hWnd, LPSIZE sz)
|
||||
PNHMessageWindow data;
|
||||
RECT rt, client_rt;
|
||||
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
if( !data ) return;
|
||||
|
||||
/* -- Calculate the font size -- */
|
||||
@@ -715,7 +714,7 @@ BOOL can_append_text(HWND hWnd, int attr, const char* text )
|
||||
RECT draw_rt;
|
||||
BOOL retval = FALSE;
|
||||
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
|
||||
/* cannot append if lines_not_seen is 0 (beginning of the new turn */
|
||||
if( data->lines_not_seen==0 ) return FALSE;
|
||||
@@ -766,7 +765,7 @@ BOOL more_prompt_check(HWND hWnd)
|
||||
int remaining_height;
|
||||
char tmptext[MAXWINDOWTEXT+1];
|
||||
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHMessageWindow)GetWindowLong(hWnd, GWLP_USERDATA);
|
||||
|
||||
if( data->lines_not_seen==0 ) return FALSE; /* don't bother checking - nothig to "more" */
|
||||
if( data->lines_not_seen>=MSG_LINES ) return TRUE; /* history size exceeded - always more */
|
||||
|
||||
Reference in New Issue
Block a user