diff --git a/Source/all.h b/Source/all.h index 75e229319..24693dbaa 100644 --- a/Source/all.h +++ b/Source/all.h @@ -1,91 +1,91 @@ -/** - * @file all.h - * - * Include all aplication headers. - */ -#ifndef __ALL_H__ -#define __ALL_H__ - -#include "../types.h" - -#ifdef __cplusplus -extern "C" { -#endif -#include "appfat.h" -#include "automap.h" -#include "capture.h" -#include "codec.h" -#include "control.h" -#include "cursor.h" -#include "dead.h" -#include "debug.h" -#include "diablo.h" -#include "doom.h" -#include "drlg_l1.h" -#include "drlg_l2.h" -#include "drlg_l3.h" -#include "drlg_l4.h" -#include "dthread.h" -#include "dx.h" -#include "effects.h" -#include "encrypt.h" -#include "engine.h" -#include "error.h" -#include "fault.h" -#include "gamemenu.h" -#include "gendung.h" -#include "gmenu.h" -#include "help.h" -#include "init.h" -#include "interfac.h" -#include "inv.h" -#include "itemdat.h" -#include "items.h" -#include "lighting.h" -#include "loadsave.h" -#include "logging.h" -#include "mainmenu.h" -#include "minitext.h" -#include "misdat.h" -#include "missiles.h" -#include "monstdat.h" -#include "monster.h" -#include "movie.h" -#include "mpqapi.h" -#include "msg.h" -#include "msgcmd.h" -#include "multi.h" -#include "nthread.h" -#include "objdat.h" -#include "objects.h" -#include "pack.h" -#include "palette.h" -#include "path.h" -#include "pfile.h" -#include "player.h" -#include "plrmsg.h" -#include "portal.h" -#include "quests.h" -#include "restrict.h" -#include "scrollrt.h" -#include "setmaps.h" -#include "sha.h" -#include "sound.h" -#include "spelldat.h" -#include "spells.h" -#include "stores.h" -#include "sync.h" -#include "textdat.h" // check file name -#include "themes.h" -#include "tmsg.h" -#include "town.h" -#include "towners.h" -#include "track.h" -#include "trigs.h" -#include "wave.h" -#include "render.h" // linked last, likely .s/.asm -#ifdef __cplusplus -} -#endif - -#endif /* __ALL_H__ */ +/** + * @file all.h + * + * Include all aplication headers. + */ +#ifndef __ALL_H__ +#define __ALL_H__ + +#include "../types.h" + +#ifdef __cplusplus +extern "C" { +#endif +#include "appfat.h" +#include "automap.h" +#include "capture.h" +#include "codec.h" +#include "control.h" +#include "cursor.h" +#include "dead.h" +#include "debug.h" +#include "diablo.h" +#include "doom.h" +#include "drlg_l1.h" +#include "drlg_l2.h" +#include "drlg_l3.h" +#include "drlg_l4.h" +#include "dthread.h" +#include "dx.h" +#include "effects.h" +#include "encrypt.h" +#include "engine.h" +#include "error.h" +#include "fault.h" +#include "gamemenu.h" +#include "gendung.h" +#include "gmenu.h" +#include "help.h" +#include "init.h" +#include "interfac.h" +#include "inv.h" +#include "itemdat.h" +#include "items.h" +#include "lighting.h" +#include "loadsave.h" +#include "logging.h" +#include "mainmenu.h" +#include "minitext.h" +#include "misdat.h" +#include "missiles.h" +#include "monstdat.h" +#include "monster.h" +#include "movie.h" +#include "mpqapi.h" +#include "msg.h" +#include "msgcmd.h" +#include "multi.h" +#include "nthread.h" +#include "objdat.h" +#include "objects.h" +#include "pack.h" +#include "palette.h" +#include "path.h" +#include "pfile.h" +#include "player.h" +#include "plrmsg.h" +#include "portal.h" +#include "quests.h" +#include "restrict.h" +#include "scrollrt.h" +#include "setmaps.h" +#include "sha.h" +#include "sound.h" +#include "spelldat.h" +#include "spells.h" +#include "stores.h" +#include "sync.h" +#include "textdat.h" // check file name +#include "themes.h" +#include "tmsg.h" +#include "town.h" +#include "towners.h" +#include "track.h" +#include "trigs.h" +#include "wave.h" +#include "render.h" // linked last, likely .s/.asm +#ifdef __cplusplus +} +#endif + +#endif /* __ALL_H__ */ diff --git a/Source/control.cpp b/Source/control.cpp index d612b2b3a..01fce5845 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -185,6 +185,7 @@ char SpellITbl[MAX_SPELLS] = { 30, }; int PanBtnPos[8][5] = { + // clang-format off { PANEL_LEFT + 9, PANEL_TOP + 9, 71, 19, 1 }, // char button { PANEL_LEFT + 9, PANEL_TOP + 35, 71, 19, 0 }, // quests button { PANEL_LEFT + 9, PANEL_TOP + 75, 71, 19, 1 }, // map button @@ -193,6 +194,7 @@ int PanBtnPos[8][5] = { { PANEL_LEFT + 560, PANEL_TOP + 35, 71, 19, 0 }, // spells button { PANEL_LEFT + 87, PANEL_TOP + 91, 33, 32, 1 }, // chat button { PANEL_LEFT + 527, PANEL_TOP + 91, 33, 32, 1 }, // friendly fire button + // clang-format on }; char *PanBtnHotKey[8] = { "'c'", "'q'", "Tab", "Esc", "'i'", "'b'", "Enter", NULL }; char *PanBtnStr[8] = { diff --git a/Source/objdat.cpp b/Source/objdat.cpp index e61f9c4ff..070be9f62 100644 --- a/Source/objdat.cpp +++ b/Source/objdat.cpp @@ -1,4 +1,4 @@ -#include "all.h" +#include "all.h" int ObjTypeConv[113] = { 0, diff --git a/Source/path.cpp b/Source/path.cpp index 0dda48264..39906fe5f 100644 --- a/Source/path.cpp +++ b/Source/path.cpp @@ -66,8 +66,7 @@ int FindPath(BOOL (*PosOk)(int, int, int), int PosOkArg, int sx, int sy, int dx, // A* search until we find (dx,dy) or fail while ((next_node = GetNextPath())) { // reached the end, success! - if (next_node->x == dx && next_node->y == dy) - { + if (next_node->x == dx && next_node->y == dy) { current = next_node; path_length = 0; while (current->Parent) { diff --git a/Source/player.cpp b/Source/player.cpp index c4913c3fd..c324b3a69 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -3076,7 +3076,7 @@ void CheckNewPath(int pnum) plr[pnum].walkpath[i - 1] = plr[pnum].walkpath[i]; } - plr[pnum].walkpath[MAX_PATH_LENGTH-1] = WALK_NONE; + plr[pnum].walkpath[MAX_PATH_LENGTH - 1] = WALK_NONE; if (plr[pnum]._pmode == PM_STAND) { StartStand(pnum, plr[pnum]._pdir); diff --git a/resource.h b/resource.h index bcfe205ac..c04cac6c6 100644 --- a/resource.h +++ b/resource.h @@ -16,7 +16,7 @@ #define IDD_DIALOG11 114 // READONLY // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 103 diff --git a/structs.h b/structs.h index e100ab478..0a04b4595 100644 --- a/structs.h +++ b/structs.h @@ -102,7 +102,7 @@ typedef struct ItemStruct { int _iAnimFrame; int _iAnimWidth; int _iAnimWidth2; // width 2? - BOOL _iDelFlag; // set when item is flagged for deletion, deprecated in 1.02 + BOOL _iDelFlag; // set when item is flagged for deletion, deprecated in 1.02 char _iSelFlag; BOOL _iPostDraw; BOOL _iIdentified; @@ -370,8 +370,8 @@ typedef struct TextDataStruct { typedef struct MissileData { unsigned char mName; - void(* mAddProc)(int, int, int, int, int, int, char, int, int); - void(* mProc)(int); + void (*mAddProc)(int, int, int, int, int, int, char, int, int); + void (*mProc)(int); BOOL mDraw; unsigned char mType; unsigned char mResist; @@ -1002,7 +1002,7 @@ typedef struct QuestData { typedef struct TMenuItem { DWORD dwFlags; char *pszStr; - void(* fnMenu)(BOOL); /* fix, should have one arg */ + void (*fnMenu)(BOOL); /* fix, should have one arg */ } TMenuItem; // TPDEF PTR FCN VOID TMenuUpdateFcn @@ -1314,21 +1314,21 @@ typedef struct _SNETUIDATA { int size; int uiflags; HWND parentwindow; - void(* artcallback)(); - void(* authcallback)(); - void(* createcallback)(); - void(* drawdesccallback)(); - void(* selectedcallback)(); - void(* messageboxcallback)(); - void(* soundcallback)(); - void(* statuscallback)(); - void(* getdatacallback)(); - void(* categorycallback)(); - void(* categorylistcallback)(); - void(* newaccountcallback)(); - void(* profilecallback)(); + void (*artcallback)(); + void (*authcallback)(); + void (*createcallback)(); + void (*drawdesccallback)(); + void (*selectedcallback)(); + void (*messageboxcallback)(); + void (*soundcallback)(); + void (*statuscallback)(); + void (*getdatacallback)(); + void (*categorycallback)(); + void (*categorylistcallback)(); + void (*newaccountcallback)(); + void (*profilecallback)(); const char **profilefields; - void(* profilebitmapcallback)(); + void (*profilebitmapcallback)(); int(__stdcall *selectnamecallback)( const struct _SNETPROGRAMDATA *, const struct _SNETPLAYERDATA *, @@ -1338,8 +1338,8 @@ typedef struct _SNETUIDATA { char *, DWORD, /* character name will be copied here */ char *, DWORD, /* character "description" will be copied here (used to advertise games) */ BOOL * /* new character? - unsure about this */ - ); - void(* changenamecallback)(); + ); + void (*changenamecallback)(); } _SNETUIDATA; typedef struct _SNETVERSIONDATA {