Reformat all C files.
I'll push a formatting guide at some point. There may still be outstanding changes, but please feel free to resolve those as you arrive a them. To the best of my knowledge, there is no changes to the actual code content, but the formatter does have the occasional bug. If you run into an issue, please fix it!
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 pckeys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.6 pckeys.c $NHDT-Date: 1431192781 2015/05/09 17:33:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
|
||||
/* NetHack 3.6 pckeys.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)pckeys.c 3.5 1996/05/11 */
|
||||
/* Copyright (c) NetHack PC Development Team 1996 */
|
||||
@@ -11,18 +11,18 @@
|
||||
#include "hack.h"
|
||||
|
||||
#ifdef MSDOS
|
||||
# ifdef USE_TILES
|
||||
#include "wintty.h"
|
||||
#ifdef USE_TILES
|
||||
#include "wintty.h"
|
||||
#include "pcvideo.h"
|
||||
|
||||
boolean FDECL(pckeys, (unsigned char, unsigned char));
|
||||
|
||||
extern struct WinDesc *wins[MAXWIN]; /* from wintty.c */
|
||||
extern boolean inmap; /* from video.c */
|
||||
extern struct WinDesc *wins[MAXWIN]; /* from wintty.c */
|
||||
extern boolean inmap; /* from video.c */
|
||||
|
||||
#define SHIFT (0x1 | 0x2)
|
||||
#define CTRL 0x4
|
||||
#define ALT 0x8
|
||||
#define SHIFT (0x1 | 0x2)
|
||||
#define CTRL 0x4
|
||||
#define ALT 0x8
|
||||
|
||||
/*
|
||||
* Check for special interface manipulation keys.
|
||||
@@ -34,49 +34,48 @@ pckeys(scancode, shift)
|
||||
unsigned char scancode;
|
||||
unsigned char shift;
|
||||
{
|
||||
boolean opening_dialog;
|
||||
boolean opening_dialog;
|
||||
|
||||
opening_dialog = pl_character[0] ? FALSE : TRUE;
|
||||
# ifdef SIMULATE_CURSOR
|
||||
switch(scancode) {
|
||||
case 0x3d: /* F3 = toggle cursor type */
|
||||
HideCursor();
|
||||
cursor_type += 1;
|
||||
if (cursor_type >= NUM_CURSOR_TYPES) cursor_type = 0;
|
||||
DrawCursor();
|
||||
break;
|
||||
# endif
|
||||
case 0x74: /* Control-right_arrow = scroll horizontal to right */
|
||||
if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
|
||||
vga_userpan(1);
|
||||
break;
|
||||
opening_dialog = pl_character[0] ? FALSE : TRUE;
|
||||
#ifdef SIMULATE_CURSOR
|
||||
switch (scancode) {
|
||||
case 0x3d: /* F3 = toggle cursor type */
|
||||
HideCursor();
|
||||
cursor_type += 1;
|
||||
if (cursor_type >= NUM_CURSOR_TYPES)
|
||||
cursor_type = 0;
|
||||
DrawCursor();
|
||||
break;
|
||||
#endif
|
||||
case 0x74: /* Control-right_arrow = scroll horizontal to right */
|
||||
if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
|
||||
vga_userpan(1);
|
||||
break;
|
||||
|
||||
case 0x73: /* Control-left_arrow = scroll horizontal to left */
|
||||
if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
|
||||
vga_userpan(0);
|
||||
break;
|
||||
case 0x3E: /* F4 = toggle overview mode */
|
||||
if (iflags.tile_view && !opening_dialog
|
||||
&& !Is_rogue_level(&u.uz)) {
|
||||
iflags.traditional_view = FALSE;
|
||||
vga_overview(iflags.over_view ? FALSE : TRUE);
|
||||
vga_refresh();
|
||||
}
|
||||
break;
|
||||
case 0x3F: /* F5 = toggle traditional mode */
|
||||
if (iflags.tile_view && !opening_dialog
|
||||
&& !Is_rogue_level(&u.uz)) {
|
||||
iflags.over_view = FALSE;
|
||||
vga_traditional(iflags.traditional_view ? FALSE : TRUE);
|
||||
vga_refresh();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
case 0x73: /* Control-left_arrow = scroll horizontal to left */
|
||||
if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
|
||||
vga_userpan(0);
|
||||
break;
|
||||
case 0x3E: /* F4 = toggle overview mode */
|
||||
if (iflags.tile_view && !opening_dialog && !Is_rogue_level(&u.uz)) {
|
||||
iflags.traditional_view = FALSE;
|
||||
vga_overview(iflags.over_view ? FALSE : TRUE);
|
||||
vga_refresh();
|
||||
}
|
||||
break;
|
||||
case 0x3F: /* F5 = toggle traditional mode */
|
||||
if (iflags.tile_view && !opening_dialog && !Is_rogue_level(&u.uz)) {
|
||||
iflags.over_view = FALSE;
|
||||
vga_traditional(iflags.traditional_view ? FALSE : TRUE);
|
||||
vga_refresh();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
# endif /* USE_TILES */
|
||||
#endif /* USE_TILES */
|
||||
#endif /* MSDOS */
|
||||
|
||||
/*pckeys.c*/
|
||||
|
||||
Reference in New Issue
Block a user