fix typos

This commit is contained in:
RainRat
2024-02-28 20:15:56 -08:00
parent b53a43027f
commit a3658f85ac
167 changed files with 320 additions and 320 deletions
+4 -4
View File
@@ -71,7 +71,7 @@ int GUILaunched = TRUE; /* We tell shared startup code in windmain.c
#define _strdup(s1) strdup(s1)
#endif
// Foward declarations of functions included in this code module:
// Forward declarations of functions included in this code module:
extern boolean main(int, char **);
static void __cdecl mswin_moveloop(void *);
@@ -170,7 +170,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
_nethack_app.bNoSounds = FALSE;
#if 0 /* GdiTransparentBlt does not render spash bitmap for whatever reason */
#if 0 /* GdiTransparentBlt does not render splash bitmap for whatever reason */
/* use system-provided TransparentBlt for Win2k+ */
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
@@ -206,7 +206,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
/* get command line parameters */
p = _get_cmd_arg(GetCommandLine());
p = _get_cmd_arg(NULL); /* skip first paramter - command name */
p = _get_cmd_arg(NULL); /* skip first parameter - command name */
for (argc = 1; p && argc < MAX_CMDLINE_PARAM; argc++) {
len = _tcslen(p);
if (len > 0) {
@@ -420,7 +420,7 @@ _nhapply_image_transparent(HDC hDC, int x, int y, int width, int height,
/* Mask out the transparent colored pixels on the source image. */
BitBlt(hdcSave, 0, 0, width, height, hdcBack, 0, 0, SRCAND);
/* XOR the source image with the beckground. */
/* XOR the source image with the background. */
BitBlt(hdcMem, 0, 0, width, height, hdcSave, 0, 0, SRCPAINT);
/* blt resulting image to the screen */
+2 -2
View File
@@ -38,7 +38,7 @@ mswin_getlin_window(const char *question, char *result, size_t result_size)
INT_PTR ret;
struct getlin_data data;
/* initilize dialog data */
/* initialize dialog data */
ZeroMemory(&data, sizeof(data));
data.question = question;
data.result = result;
@@ -402,7 +402,7 @@ calculate_player_selector_layout(plsel_data_t * data)
name_box->size.cy = (int) (24 * scale);
control_t * role_list = &data->controls[psc_role_list];
/* NOTE: we dont' scale the list view reported height as it appears these
/* NOTE: we don't scale the list view reported height as it appears these
values are the actual size the control will be drawn at using the
existing DPI value */
role_list->size.cy = list_view_height(role_list->hWnd, data->role_count);
+1 -1
View File
@@ -55,7 +55,7 @@ mswin_font_supports_unicode(HFONT hFont)
return FALSE;
}
/* create font based on window type, charater attributes and
/* create font based on window type, character attributes and
window device context */
cached_font *
mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace)
+2 -2
View File
@@ -1113,7 +1113,7 @@ onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
return 0;
}
// Mesage handler for about box.
// Message handler for about box.
LRESULT CALLBACK
About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -1213,7 +1213,7 @@ mswin_select_map_mode(int mode)
iflags.wc_map_mode = mode;
/*
** first, check if WIN_MAP has been inialized.
** first, check if WIN_MAP has been initialized.
** If not - attempt to retrieve it by type, then check it again
*/
if (map_id == WIN_ERR)
+1 -1
View File
@@ -5,7 +5,7 @@
#ifndef MSWINMainWindow_h
#define MSWINMainWindow_h
/* this is a main appliation window */
/* this is a main application window */
#include "winMS.h"
+2 -2
View File
@@ -325,7 +325,7 @@ mswin_map_layout(HWND hWnd, LPSIZE map_size)
data->xFrontTile = max(data->xFrontTile, 1);
data->yFrontTile = max(data->yFrontTile, 1);
/* calcuate ASCII cursor height */
/* calculate ASCII cursor height */
data->yBlinkCursor = (int) ((double) CURSOR_HEIGHT * data->backScale);
data->yNoBlinkCursor = data->yBackTile;
@@ -586,7 +586,7 @@ MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
size.cx = LOWORD(lParam);
size.cy = HIWORD(lParam);
} else {
/* mapping factor is unchaged we just need to adjust scroll bars
/* mapping factor is unchanged we just need to adjust scroll bars
*/
size.cx = data->xFrontTile * COLNO;
size.cy = data->yFrontTile * ROWNO;
+1 -1
View File
@@ -299,7 +299,7 @@ MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
data->is_active = FALSE;
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) data);
}
/* set font for the text cotrol */
/* set font for the text control */
cached_font * font = mswin_get_font(NHW_MENU, ATR_NONE, hdc, FALSE);
SendMessage(control, WM_SETFONT,
(WPARAM) font->hFont,
+3 -3
View File
@@ -294,7 +294,7 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
int okkey = 0;
char tmptext[MAXWINDOWTEXT + 1];
// @@@ Ok respnses
// @@@ Ok responses
/* save original text */
strcpy(tmptext, data->window_text[MSG_LINES - 1].text);
@@ -795,7 +795,7 @@ can_append_text(HWND hWnd, int attr, const char *text)
if (data->lines_not_seen == 0)
return FALSE;
/* cannot append text with different attrbutes */
/* cannot append text with different attributes */
if (data->window_text[MSG_LINES - 1].attr != attr)
return FALSE;
@@ -803,7 +803,7 @@ can_append_text(HWND hWnd, int attr, const char *text)
if (str_end_is(data->window_text[MSG_LINES - 1].text, "\n"))
return FALSE;
/* check if the maximum string langth will be exceeded */
/* check if the maximum string length will be exceeded */
if (strlen(data->window_text[MSG_LINES - 1].text) + 2
+ /* space characters */
strlen(text) + strlen(MORE)
+1 -1
View File
@@ -73,7 +73,7 @@ typedef struct mswin_nethack_status_window {
mswin_status_lines * status_lines;
back_buffer_t back_buffer;
boolean blink_state; /* true = invert blink text */
boolean has_blink_fields; /* true if one or more has blink attriubte */
boolean has_blink_fields; /* true if one or more has blink attribute */
} NHStatusWindow, *PNHStatusWindow;
+1 -1
View File
@@ -36,7 +36,7 @@ mswin_init_text_window(void)
mswin_get_window_placement(NHW_TEXT, &rt);
}
/* create text widnow object */
/* create text window object */
ret = CreateDialog(GetNHApp()->hApp, MAKEINTRESOURCE(IDD_NHTEXT),
GetNHApp()->hMainWnd, NHTextWndProc);
if (!ret)
+5 -5
View File
@@ -161,10 +161,10 @@ mswin_init_nhwindows(int *argc, char **argv)
mswin_nh_input_init();
/* set it to WIN_ERR so we can detect attempts to
use this ID before it is inialized */
use this ID before it is initialized */
WIN_MAP = WIN_ERR;
/* Read Windows settings from the reqistry */
/* Read Windows settings from the registry */
/* First set safe defaults */
GetNHApp()->regMainMinX = CW_USEDEFAULT;
mswin_read_reg();
@@ -3050,7 +3050,7 @@ mswin_status_enablefield(int fieldidx, const char *nm, const char *fmt,
}
}
/* TODO: turn this into a commmon helper; multiple identical implementations */
/* TODO: turn this into a common helper; multiple identical implementations */
static int
mswin_condcolor(long bm, unsigned long *bmarray)
{
@@ -3095,7 +3095,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percent, int color, u
windowport that it should output all changes received
to this point. It marks the end of a bot() cycle.
-- fldindex could also be BL_RESET, which is not really
a field index, but is a special advisory to to tell the
a field index, but is a special advisory to tell the
windowport that it should redisplay all its status fields,
even if no changes have been presented to it.
-- ptr is usually a "char *", unless fldindex is BL_CONDITION.
@@ -3122,7 +3122,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percent, int color, u
use to display the text.
-- condmasks is a pointer to a set of BL_ATTCLR_MAX unsigned
longs telling which conditions should be displayed in each
color and attriubte.
color and attribute.
*/
DISABLE_WARNING_FORMAT_NONLITERAL