Reformat .h files.

I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
This commit is contained in:
Sean Hunt
2015-05-25 09:03:10 +09:00
parent 26ee7dc370
commit 8b57d96fd2
156 changed files with 10712 additions and 10701 deletions

View File

@@ -6,7 +6,7 @@
#ifndef WINMS_H
#define WINMS_H
#pragma warning(disable:4142) /* benign redefinition of type */
#pragma warning(disable : 4142) /* benign redefinition of type */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -17,12 +17,12 @@
#include "hack.h"
#if defined(WIN_CE_POCKETPC)
#include <aygshell.h>
#include <aygshell.h>
#include <sipapi.h>
#endif
#if defined(WIN_CE_SMARTPHONE)
#include <aygshell.h>
#include <aygshell.h>
#include <sipapi.h>
#include <shlobj.h>
#include <prsht.h>
@@ -45,8 +45,8 @@
#endif
/* RIP window ID */
#define NHW_RIP 32
#define NHW_KEYPAD 33
#define NHW_RIP 32
#define NHW_KEYPAD 33
/* size of tiles */
#ifndef TILE_X
@@ -55,7 +55,7 @@
#define TILE_Y 16
/* tiles per line in the bitmap */
#define TILES_PER_LINE 40
#define TILES_PER_LINE 40
/* tile background color */
#define TILE_BK_COLOR RGB(71, 108, 108)
@@ -67,42 +67,43 @@
#define NHFONT_SIZE_MAX 20
typedef struct mswin_nhwindow_data {
HWND win;
int type;
int dead;
HWND win;
int type;
int dead;
} MSNHWinData, *PMSNHWinData;
/* global application data - alailable thour GetNHApp() */
typedef struct mswin_nhwindow_app {
HINSTANCE hApp; /* hInstance from WinMain */
int nCmdShow; /* main window mode flag */
HWND hMainWnd; /* main window handle */
HACCEL hAccelTable; /* accelerator table */
HWND hPopupWnd; /* active dialog window (nethack menu, text, etc) */
HWND hMenuBar; /* menu bar */
HINSTANCE hApp; /* hInstance from WinMain */
int nCmdShow; /* main window mode flag */
HWND hMainWnd; /* main window handle */
HACCEL hAccelTable; /* accelerator table */
HWND hPopupWnd; /* active dialog window (nethack menu, text, etc) */
HWND hMenuBar; /* menu bar */
MSNHWinData windowlist[MAXWINDOWS]; /* nethack windows array */
MSNHWinData windowlist[MAXWINDOWS]; /* nethack windows array */
HBITMAP bmpTiles; /* nethack tiles */
HBITMAP bmpPetMark; /* pet mark Bitmap */
HBITMAP bmpMapTiles; /* alternative map tiles */
int mapTile_X; /* alt. tiles width */
int mapTile_Y; /* alt. tiles height */
int mapTilesPerLine; /* number of tile per row in the bitmap */
HBITMAP bmpTiles; /* nethack tiles */
HBITMAP bmpPetMark; /* pet mark Bitmap */
HBITMAP bmpMapTiles; /* alternative map tiles */
int mapTile_X; /* alt. tiles width */
int mapTile_Y; /* alt. tiles height */
int mapTilesPerLine; /* number of tile per row in the bitmap */
boolean bNoHScroll; /* disable cliparound for horizontal grid (map) */
boolean bNoVScroll; /* disable cliparound for vertical grid (map) */
boolean bNoHScroll; /* disable cliparound for horizontal grid (map) */
boolean bNoVScroll; /* disable cliparound for vertical grid (map) */
int mapDisplayModeSave; /* saved map display mode */
int mapDisplayModeSave; /* saved map display mode */
int bCmdPad; /* command pad - on-screen keyboard */
HWND hCmdWnd; /* handle of on-screen keyboard window */
int bCmdPad; /* command pad - on-screen keyboard */
HWND hCmdWnd; /* handle of on-screen keyboard window */
/* options */
boolean bWrapText; /* format text to fit the window */
boolean bFullScreen;/* run nethack in full-screen mode */
boolean bHideScrollBars; /* hide scroll bars */
boolean bUseSIP; /* use SIP (built-in software keyboard) for menus (PocketPC only) */
/* options */
boolean bWrapText; /* format text to fit the window */
boolean bFullScreen; /* run nethack in full-screen mode */
boolean bHideScrollBars; /* hide scroll bars */
boolean bUseSIP; /* use SIP (built-in software keyboard) for menus
(PocketPC only) */
} NHWinApp, *PNHWinApp;
extern PNHWinApp GetNHApp();
@@ -113,7 +114,7 @@ E struct window_procs mswin_procs;
#undef E
/* Some prototypes */
void mswin_init_nhwindows(int* argc, char** argv);
void mswin_init_nhwindows(int *argc, char **argv);
void mswin_player_selection(void);
void mswin_askname(void);
void mswin_get_nh_event(void);
@@ -127,28 +128,27 @@ void mswin_destroy_nhwindow(winid wid);
void mswin_curs(winid wid, int x, int y);
void mswin_putstr(winid wid, int attr, const char *text);
void mswin_putstr_ex(winid wid, int attr, const char *text, boolean append);
void mswin_display_file(const char *filename,BOOLEAN_P must_exist);
void mswin_display_file(const char *filename, BOOLEAN_P must_exist);
void mswin_start_menu(winid wid);
void mswin_add_menu(winid wid, int glyph, const ANY_P * identifier,
CHAR_P accelerator, CHAR_P group_accel, int attr,
const char *str, BOOLEAN_P presel);
void mswin_add_menu(winid wid, int glyph, const ANY_P *identifier,
CHAR_P accelerator, CHAR_P group_accel, int attr,
const char *str, BOOLEAN_P presel);
void mswin_end_menu(winid wid, const char *prompt);
int mswin_select_menu(winid wid, int how, MENU_ITEM_P **selected);
int mswin_select_menu(winid wid, int how, MENU_ITEM_P **selected);
void mswin_update_inventory(void);
void mswin_mark_synch(void);
void mswin_wait_synch(void);
void mswin_cliparound(int x, int y);
void mswin_print_glyph(winid wid,XCHAR_P x,XCHAR_P y,int glyph);
void mswin_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph);
void mswin_raw_print(const char *str);
void mswin_raw_print_bold(const char *str);
int mswin_nhgetch(void);
int mswin_nh_poskey(int *x, int *y, int *mod);
int mswin_nhgetch(void);
int mswin_nh_poskey(int *x, int *y, int *mod);
void mswin_nhbell(void);
int mswin_doprev_message(void);
char mswin_yn_function(const char *question, const char *choices,
CHAR_P def);
int mswin_doprev_message(void);
char mswin_yn_function(const char *question, const char *choices, CHAR_P def);
void mswin_getlin(const char *question, char *input);
int mswin_get_ext_cmd(void);
int mswin_get_ext_cmd(void);
void mswin_number_pad(int state);
void mswin_delay_output(void);
void mswin_change_color(void);
@@ -164,16 +164,15 @@ winid mswin_winid_from_type(int type);
winid mswin_winid_from_handle(HWND hWnd);
void mswin_window_mark_dead(winid wid);
void bail(const char *mesg);
void nhapply_image_transparent(
HDC hDC, int x, int y, int width, int height,
HDC sourceDC, int s_x, int s_y, int s_width, int s_height,
COLORREF cTransparent
);
void mswin_popup_display(HWND popup, int* done_indicator);
void nhapply_image_transparent(HDC hDC, int x, int y, int width, int height,
HDC sourceDC, int s_x, int s_y, int s_width,
int s_height, COLORREF cTransparent);
void mswin_popup_display(HWND popup, int *done_indicator);
void mswin_popup_destroy(HWND popup);
#if defined(WIN_CE_SMARTPHONE)
void NHSPhoneDialogSetup(HWND hDlg, UINT nToolBarId, BOOL is_edit, BOOL is_fullscreen);
void NHSPhoneDialogSetup(HWND hDlg, UINT nToolBarId, BOOL is_edit,
BOOL is_fullscreen);
#endif
void mswin_read_reg(void);