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:
@@ -27,24 +27,24 @@
|
||||
* around with the rest of the #includes. --AMC
|
||||
*/
|
||||
#if defined(_DCC) && !defined(HACK_H)
|
||||
# define ptrdiff_t ptrdiff_t_
|
||||
# define size_t size_t_
|
||||
# define wchar_t wchar_t_
|
||||
#define ptrdiff_t ptrdiff_t_
|
||||
#define size_t size_t_
|
||||
#define wchar_t wchar_t_
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#undef strcmpi
|
||||
#undef strcmpi
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#if defined(_DCC) && !defined(HACK_H)
|
||||
# undef ptrdiff_t
|
||||
# undef size_t
|
||||
# undef wchar_T
|
||||
#undef ptrdiff_t
|
||||
#undef size_t
|
||||
#undef wchar_T
|
||||
#endif
|
||||
|
||||
#ifdef IDCMP_CLOSEWINDOW
|
||||
# ifndef INTUI_NEW_LOOK
|
||||
# define INTUI_NEW_LOOK
|
||||
# endif
|
||||
#ifdef IDCMP_CLOSEWINDOW
|
||||
#ifndef INTUI_NEW_LOOK
|
||||
#define INTUI_NEW_LOOK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HACK_H
|
||||
@@ -54,12 +54,12 @@
|
||||
#include "winami.h"
|
||||
#include "func_tab.h"
|
||||
|
||||
#ifndef CLIPPING
|
||||
#ifndef CLIPPING
|
||||
CLIPPING must be defined for the AMIGA version
|
||||
#endif
|
||||
|
||||
#undef LI
|
||||
#undef CO
|
||||
#undef LI
|
||||
#undef CO
|
||||
|
||||
/*#define TOPL_GETLINE /* Don't use a window for getlin() */
|
||||
/*#define WINDOW_YN /* Use a window for y/n questions */
|
||||
@@ -85,22 +85,22 @@ CLIPPING must be defined for the AMIGA version
|
||||
#endif
|
||||
|
||||
/* kludge - see amirip for why */
|
||||
# undef red
|
||||
# undef green
|
||||
# undef blue
|
||||
#undef red
|
||||
#undef green
|
||||
#undef blue
|
||||
#ifdef _DCC
|
||||
# include <clib/graphics_protos.h>
|
||||
#include <clib/graphics_protos.h>
|
||||
#else
|
||||
# include <proto/graphics.h>
|
||||
#include <proto/graphics.h>
|
||||
#endif
|
||||
|
||||
#ifdef _DCC
|
||||
# define __asm /* DICE doesn't like __asm */
|
||||
#define __asm /* DICE doesn't like __asm */
|
||||
#endif
|
||||
|
||||
#ifndef __SASC_60
|
||||
#undef index
|
||||
# define index strchr
|
||||
#define index strchr
|
||||
#endif
|
||||
|
||||
#ifdef _DCC
|
||||
@@ -110,24 +110,24 @@ CLIPPING must be defined for the AMIGA version
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SHAREDLIB
|
||||
#ifdef SHAREDLIB
|
||||
#include "NH:sys/amiga/lib/libmacs.h"
|
||||
#endif
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
#include <utility/tagitem.h>
|
||||
#endif
|
||||
|
||||
#define WINVERS_AMII (strcmp("amii",windowprocs.name)==0)
|
||||
#define WINVERS_AMIV (strcmp("amitile",windowprocs.name)==0)
|
||||
#define WINVERS_AMIT (strcmp("amitty",windowprocs.name)==0)
|
||||
#define WINVERS_AMII (strcmp("amii", windowprocs.name) == 0)
|
||||
#define WINVERS_AMIV (strcmp("amitile", windowprocs.name) == 0)
|
||||
#define WINVERS_AMIT (strcmp("amitty", windowprocs.name) == 0)
|
||||
|
||||
/* cw->data[x] contains 2 characters worth of special information. These
|
||||
* characters are stored at the offsets as described here.
|
||||
*/
|
||||
#define VATTR 0 /* Video attribute is in this slot */
|
||||
#define SEL_ITEM 1 /* If this is a select item, slot is 1 else 0 */
|
||||
#define SOFF 2 /* The string starts here. */
|
||||
#define VATTR 0 /* Video attribute is in this slot */
|
||||
#define SEL_ITEM 1 /* If this is a select item, slot is 1 else 0 */
|
||||
#define SOFF 2 /* The string starts here. */
|
||||
|
||||
#undef NULL
|
||||
#define NULL 0L
|
||||
@@ -138,68 +138,68 @@ CLIPPING must be defined for the AMIGA version
|
||||
* don't have that version number in the 1.2 ROM.
|
||||
*/
|
||||
|
||||
#define LIBRARY_FONT_VERSION 34L
|
||||
#define LIBRARY_TILE_VERSION 37L
|
||||
#define LIBRARY_FONT_VERSION 34L
|
||||
#define LIBRARY_TILE_VERSION 37L
|
||||
|
||||
/* These values are just sorta suggestions in use, but are minimum requirements
|
||||
/* These values are just sorta suggestions in use, but are minimum
|
||||
* requirements
|
||||
* in reality...
|
||||
*/
|
||||
#define WINDOWHEIGHT 192
|
||||
#define SCREENHEIGHT 200
|
||||
#define WIDTH 640
|
||||
#define WINDOWHEIGHT 192
|
||||
#define SCREENHEIGHT 200
|
||||
#define WIDTH 640
|
||||
|
||||
/* This character is a solid block (cursor) in Hack.font */
|
||||
#define CURSOR_CHAR 0x90
|
||||
#define CURSOR_CHAR 0x90
|
||||
|
||||
#define FONTHEIGHT 8
|
||||
#define FONTWIDTH 8
|
||||
#define FONTBASELINE 8
|
||||
#define FONTHEIGHT 8
|
||||
#define FONTWIDTH 8
|
||||
#define FONTBASELINE 8
|
||||
|
||||
#define MAPFTWIDTH 8
|
||||
#define MAPFTHEIGHT 8
|
||||
#define MAPFTBASELN 6
|
||||
#define MAPFTWIDTH 8
|
||||
#define MAPFTHEIGHT 8
|
||||
#define MAPFTBASELN 6
|
||||
|
||||
/* If Compiling with the "New Look", redefine these now */
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
#define NewWindow ExtNewWindow
|
||||
#define NewScreen ExtNewScreen
|
||||
#endif
|
||||
|
||||
#define SIZEOF_DISKNAME 8
|
||||
#define SIZEOF_DISKNAME 8
|
||||
|
||||
#define CSI '\x9b'
|
||||
#define NO_CHAR -1
|
||||
#define RAWHELP 0x5F /* Rawkey code of the HELP key */
|
||||
#define CSI '\x9b'
|
||||
#define NO_CHAR -1
|
||||
#define RAWHELP 0x5F /* Rawkey code of the HELP key */
|
||||
|
||||
|
||||
#define C_BLACK 0
|
||||
#define C_WHITE 1
|
||||
#define C_BROWN (WINVERS_AMIV ? 11 : 2)
|
||||
#define C_CYAN (WINVERS_AMIV ? 2 : 3)
|
||||
#define C_GREEN (WINVERS_AMIV ? 5 : 4)
|
||||
#define C_MAGENTA (WINVERS_AMIV ? 10 : 5)
|
||||
#define C_BLUE (WINVERS_AMIV ? 4 : 6)
|
||||
#define C_RED 7
|
||||
#define C_ORANGE 3
|
||||
#define C_GREY 6
|
||||
#define C_LTGREEN 8
|
||||
#define C_YELLOW 9
|
||||
#define C_GREYBLUE 12
|
||||
#define C_LTBROWN 13
|
||||
#define C_LTGREY 14
|
||||
#define C_PEACH 15
|
||||
#define C_BLACK 0
|
||||
#define C_WHITE 1
|
||||
#define C_BROWN (WINVERS_AMIV ? 11 : 2)
|
||||
#define C_CYAN (WINVERS_AMIV ? 2 : 3)
|
||||
#define C_GREEN (WINVERS_AMIV ? 5 : 4)
|
||||
#define C_MAGENTA (WINVERS_AMIV ? 10 : 5)
|
||||
#define C_BLUE (WINVERS_AMIV ? 4 : 6)
|
||||
#define C_RED 7
|
||||
#define C_ORANGE 3
|
||||
#define C_GREY 6
|
||||
#define C_LTGREEN 8
|
||||
#define C_YELLOW 9
|
||||
#define C_GREYBLUE 12
|
||||
#define C_LTBROWN 13
|
||||
#define C_LTGREY 14
|
||||
#define C_PEACH 15
|
||||
|
||||
/* Structure describing tile files */
|
||||
struct PDAT
|
||||
{
|
||||
long nplanes; /* Depth of images */
|
||||
long pbytes; /* Bytes in a plane of data */
|
||||
long across; /* Number of tiles across */
|
||||
long down; /* Number of tiles down */
|
||||
long npics; /* Number of pictures in this file */
|
||||
long xsize; /* X-size of a tile */
|
||||
long ysize; /* Y-size of a-tile */
|
||||
long nplanes; /* Depth of images */
|
||||
long pbytes; /* Bytes in a plane of data */
|
||||
long across; /* Number of tiles across */
|
||||
long down; /* Number of tiles down */
|
||||
long npics; /* Number of pictures in this file */
|
||||
long xsize; /* X-size of a tile */
|
||||
long ysize; /* Y-size of a-tile */
|
||||
};
|
||||
|
||||
#undef MAXCOLORS
|
||||
#define MAXCOLORS 256
|
||||
#undef MAXCOLORS
|
||||
#define MAXCOLORS 256
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
extern int reclip;
|
||||
|
||||
#ifdef CLIPPING
|
||||
#ifdef CLIPPING
|
||||
extern int clipping;
|
||||
extern int clipx;
|
||||
extern int clipy;
|
||||
@@ -20,14 +20,15 @@ extern int LI;
|
||||
extern int scrollmsg;
|
||||
extern int alwaysinvent;
|
||||
|
||||
#ifndef SHAREDLIB
|
||||
extern unsigned short amii_defpens[ 20 ];
|
||||
extern struct amii_DisplayDesc *amiIDisplay; /* the Amiga Intuition descriptor */
|
||||
#ifndef SHAREDLIB
|
||||
extern unsigned short amii_defpens[20];
|
||||
extern struct amii_DisplayDesc
|
||||
*amiIDisplay; /* the Amiga Intuition descriptor */
|
||||
extern struct window_procs amii_procs;
|
||||
extern struct window_procs amiv_procs;
|
||||
extern unsigned short amii_initmap[ AMII_MAXCOLORS ];
|
||||
extern unsigned short amiv_init_map[ AMII_MAXCOLORS ];
|
||||
extern unsigned short amii_init_map[ AMII_MAXCOLORS ];
|
||||
extern unsigned short amii_initmap[AMII_MAXCOLORS];
|
||||
extern unsigned short amiv_init_map[AMII_MAXCOLORS];
|
||||
extern unsigned short amii_init_map[AMII_MAXCOLORS];
|
||||
extern int bigscreen;
|
||||
extern int amii_numcolors;
|
||||
extern long amii_scrnmode;
|
||||
@@ -35,7 +36,7 @@ extern winid amii_rawprwin;
|
||||
extern struct Screen *HackScreen;
|
||||
extern char Initialized;
|
||||
/* These have already been defined elsewhere (and some are conflicting)
|
||||
* ... going ... going once ... going twice ....
|
||||
* ... going ... going once ... going twice ....
|
||||
* extern const char *roles[];
|
||||
* extern struct Library *ConsoleDevice;
|
||||
* extern char toplines[ TBUFSZ ];
|
||||
@@ -79,7 +80,7 @@ extern struct IOStdReq ConsoleIO;
|
||||
extern struct MsgPort *HackPort;
|
||||
|
||||
extern int txwidth, txheight, txbaseline;
|
||||
#ifdef SUPERBITMAP_MAP
|
||||
#ifdef SUPERBITMAP_MAP
|
||||
extern struct BitMap amii_vbm;
|
||||
#endif
|
||||
|
||||
@@ -95,10 +96,9 @@ extern struct Gadget MsgScroll;
|
||||
|
||||
extern struct TagItem tags[];
|
||||
|
||||
extern struct win_setup
|
||||
{
|
||||
extern struct win_setup {
|
||||
struct NewWindow newwin;
|
||||
UWORD offx,offy,maxrow,rows,maxcol,cols; /* CHECK TYPES */
|
||||
UWORD offx, offy, maxrow, rows, maxcol, cols; /* CHECK TYPES */
|
||||
} new_wins[];
|
||||
|
||||
extern UWORD scrnpens[];
|
||||
@@ -109,32 +109,36 @@ extern struct TagItem scrntags[];
|
||||
extern struct NewScreen NewHackScreen;
|
||||
|
||||
extern int topl_addspace;
|
||||
extern char spaces[ 76 ];
|
||||
extern int wincnt; /* # of nh windows opened */
|
||||
extern char spaces[76];
|
||||
extern int wincnt; /* # of nh windows opened */
|
||||
extern struct Rectangle lastinvent, lastmsg;
|
||||
|
||||
typedef struct {
|
||||
UWORD w, h;
|
||||
WORD x, y;
|
||||
UBYTE nPlanes;
|
||||
UBYTE masking;
|
||||
UBYTE compression;
|
||||
UBYTE reserved1;
|
||||
UWORD transparentColor;
|
||||
UBYTE xAspect, yAspect;
|
||||
WORD pageWidth, pageHeight;
|
||||
UWORD w, h;
|
||||
WORD x, y;
|
||||
UBYTE nPlanes;
|
||||
UBYTE masking;
|
||||
UBYTE compression;
|
||||
UBYTE reserved1;
|
||||
UWORD transparentColor;
|
||||
UBYTE xAspect, yAspect;
|
||||
WORD pageWidth, pageHeight;
|
||||
} BitMapHeader;
|
||||
|
||||
typedef enum {COL_MAZE_BRICK,COL_MAZE_STONE,COL_MAZE_HEAT,COL_MAZE_WOOD} MazeType;
|
||||
typedef enum {
|
||||
COL_MAZE_BRICK,
|
||||
COL_MAZE_STONE,
|
||||
COL_MAZE_HEAT,
|
||||
COL_MAZE_WOOD
|
||||
} MazeType;
|
||||
extern struct PDAT pictdata;
|
||||
extern struct Hook fillhook;
|
||||
extern struct TagItem wintags[];
|
||||
#ifndef SHAREDLIB
|
||||
#ifndef SHAREDLIB
|
||||
#ifndef __GNUC__
|
||||
void __asm LayerFillHook(
|
||||
register __a0 struct Hook *hk,
|
||||
register __a2 struct RastPort *rp,
|
||||
register __a1 struct FillParams *fp );
|
||||
void __asm LayerFillHook(register __a0 struct Hook *hk,
|
||||
register __a2 struct RastPort *rp,
|
||||
register __a1 struct FillParams *fp);
|
||||
#else
|
||||
#ifdef __PPC__
|
||||
struct EmulLibEntry LayerFillHook;
|
||||
|
||||
@@ -4,143 +4,146 @@
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/* winreq.c */
|
||||
void EditColor ( void );
|
||||
void EditClipping( void );
|
||||
void DrawCol ( struct Window *w , int idx , UWORD *colors );
|
||||
void DispCol ( struct Window *w , int idx , UWORD *colors );
|
||||
void amii_change_color( int, long, int );
|
||||
char *amii_get_color_string( );
|
||||
void amii_getlin ( const char *prompt , char *bufp );
|
||||
void getlind ( const char *prompt , char *bufp , const char *dflt );
|
||||
char *amii_get_color_string( void );
|
||||
int filecopy( char *from, char *to );
|
||||
char *basename( char *str );
|
||||
char *dirname( char *str );
|
||||
void EditColor(void);
|
||||
void EditClipping(void);
|
||||
void DrawCol(struct Window *w, int idx, UWORD *colors);
|
||||
void DispCol(struct Window *w, int idx, UWORD *colors);
|
||||
void amii_change_color(int, long, int);
|
||||
char *amii_get_color_string();
|
||||
void amii_getlin(const char *prompt, char *bufp);
|
||||
void getlind(const char *prompt, char *bufp, const char *dflt);
|
||||
char *amii_get_color_string(void);
|
||||
int filecopy(char *from, char *to);
|
||||
char *basename(char *str);
|
||||
char *dirname(char *str);
|
||||
|
||||
/* winstr.c */
|
||||
void amii_putstr ( winid window , int attr , const char *str );
|
||||
void outmore ( struct amii_WinDesc *cw );
|
||||
void outsubstr ( struct amii_WinDesc *cw , char *str , int len, int fudge );
|
||||
void amii_putsym ( winid st , int i , int y , CHAR_P c );
|
||||
void amii_addtopl ( const char *s );
|
||||
void TextSpaces ( struct RastPort *rp , int nr );
|
||||
void amii_remember_topl ( void );
|
||||
long CountLines( winid );
|
||||
long FindLine( winid, int );
|
||||
int amii_doprev_message ( void );
|
||||
void flushIDCMP( struct MsgPort * );
|
||||
int amii_msgborder( struct Window * );
|
||||
void amii_scrollmsg( register struct Window *w, register struct amii_WinDesc *cw );
|
||||
void amii_putstr(winid window, int attr, const char *str);
|
||||
void outmore(struct amii_WinDesc *cw);
|
||||
void outsubstr(struct amii_WinDesc *cw, char *str, int len, int fudge);
|
||||
void amii_putsym(winid st, int i, int y, CHAR_P c);
|
||||
void amii_addtopl(const char *s);
|
||||
void TextSpaces(struct RastPort *rp, int nr);
|
||||
void amii_remember_topl(void);
|
||||
long CountLines(winid);
|
||||
long FindLine(winid, int);
|
||||
int amii_doprev_message(void);
|
||||
void flushIDCMP(struct MsgPort *);
|
||||
int amii_msgborder(struct Window *);
|
||||
void amii_scrollmsg(register struct Window *w,
|
||||
register struct amii_WinDesc *cw);
|
||||
|
||||
/* winkey.c */
|
||||
int amii_nh_poskey ( int *x , int *y , int *mod );
|
||||
int amii_nhgetch ( void );
|
||||
void amii_get_nh_event ( void );
|
||||
void amii_getret ( void );
|
||||
int amii_nh_poskey(int *x, int *y, int *mod);
|
||||
int amii_nhgetch(void);
|
||||
void amii_get_nh_event(void);
|
||||
void amii_getret(void);
|
||||
|
||||
/* winmenu.c */
|
||||
void amii_start_menu ( winid window );
|
||||
void FDECL(amii_add_menu, (winid,int,const anything *,CHAR_P,CHAR_P,int,const char *,BOOLEAN_P));
|
||||
void amii_start_menu(winid window);
|
||||
void FDECL(amii_add_menu, (winid, int, const anything *, CHAR_P, CHAR_P, int,
|
||||
const char *, BOOLEAN_P));
|
||||
void FDECL(amii_end_menu, (winid, const char *));
|
||||
int FDECL(amii_select_menu, (winid, int, menu_item **));
|
||||
int DoMenuScroll ( int win , int blocking, int how, menu_item ** );
|
||||
void ReDisplayData ( winid win );
|
||||
void DisplayData ( winid win , int start );
|
||||
void SetPropInfo ( struct Window *win , struct Gadget *gad , long vis , long total , long top );
|
||||
int DoMenuScroll(int win, int blocking, int how, menu_item **);
|
||||
void ReDisplayData(winid win);
|
||||
void DisplayData(winid win, int start);
|
||||
void SetPropInfo(struct Window *win, struct Gadget *gad, long vis, long total,
|
||||
long top);
|
||||
|
||||
/* amiwind.c */
|
||||
struct Window *OpenShWindow ( struct NewWindow *nw );
|
||||
void CloseShWindow ( struct Window *win );
|
||||
int ConvertKey ( struct IntuiMessage *message );
|
||||
int kbhit ( void );
|
||||
int kbhit ( void );
|
||||
int amikbhit ( void );
|
||||
int WindowGetchar ( void );
|
||||
WETYPE WindowGetevent ( void );
|
||||
void amii_cleanup ( void );
|
||||
#ifndef SHAREDLIB
|
||||
void Abort ( long rc );
|
||||
struct Window *OpenShWindow(struct NewWindow *nw);
|
||||
void CloseShWindow(struct Window *win);
|
||||
int ConvertKey(struct IntuiMessage *message);
|
||||
int kbhit(void);
|
||||
int kbhit(void);
|
||||
int amikbhit(void);
|
||||
int WindowGetchar(void);
|
||||
WETYPE WindowGetevent(void);
|
||||
void amii_cleanup(void);
|
||||
#ifndef SHAREDLIB
|
||||
void Abort(long rc);
|
||||
#endif
|
||||
void CleanUp ( void );
|
||||
void flush_glyph_buffer ( struct Window *w );
|
||||
void amiga_print_glyph ( winid window , int color_index , int glyph );
|
||||
void start_glyphout ( winid window );
|
||||
void amii_end_glyphout ( winid window );
|
||||
struct NewWindow *DupNewWindow ( struct NewWindow *win );
|
||||
void FreeNewWindow ( struct NewWindow *win );
|
||||
void bell ( void );
|
||||
void amii_delay_output ( void );
|
||||
void amii_number_pad ( int state );
|
||||
#ifndef SHAREDLIB
|
||||
void amiv_loadlib ( void );
|
||||
void amii_loadlib ( void );
|
||||
void CleanUp(void);
|
||||
void flush_glyph_buffer(struct Window *w);
|
||||
void amiga_print_glyph(winid window, int color_index, int glyph);
|
||||
void start_glyphout(winid window);
|
||||
void amii_end_glyphout(winid window);
|
||||
struct NewWindow *DupNewWindow(struct NewWindow *win);
|
||||
void FreeNewWindow(struct NewWindow *win);
|
||||
void bell(void);
|
||||
void amii_delay_output(void);
|
||||
void amii_number_pad(int state);
|
||||
#ifndef SHAREDLIB
|
||||
void amiv_loadlib(void);
|
||||
void amii_loadlib(void);
|
||||
#endif
|
||||
void preserve_icon( void );
|
||||
void clear_icon( void );
|
||||
void preserve_icon(void);
|
||||
void clear_icon(void);
|
||||
|
||||
/* winfuncs.c */
|
||||
void amii_destroy_nhwindow ( winid win );
|
||||
int amii_create_nhwindow ( int type );
|
||||
void amii_init_nhwindows ( int *, char ** );
|
||||
void amii_setdrawpens( struct Window *, int type );
|
||||
void amii_sethipens( struct Window *, int type, int attr );
|
||||
void amii_setfillpens( struct Window *, int type );
|
||||
void amii_clear_nhwindow ( winid win );
|
||||
void dismiss_nhwindow ( winid win );
|
||||
void amii_exit_nhwindows ( const char *str );
|
||||
void amii_display_nhwindow ( winid win , boolean blocking );
|
||||
void amii_curs ( winid window , int x , int y );
|
||||
void kill_nhwindows ( int all );
|
||||
void amii_cl_end ( struct amii_WinDesc *cw , int i );
|
||||
void cursor_off ( winid window );
|
||||
void cursor_on ( winid window );
|
||||
void amii_suspend_nhwindows ( const char *str );
|
||||
void amii_resume_nhwindows ( void );
|
||||
void amii_bell ( void );
|
||||
void removetopl ( int cnt );
|
||||
void port_help ( void );
|
||||
void amii_print_glyph ( winid win , xchar x , xchar y , int glyph );
|
||||
void amii_raw_print ( const char *s );
|
||||
void amii_raw_print_bold ( const char *s );
|
||||
void amii_update_inventory ( void );
|
||||
void amii_mark_synch ( void );
|
||||
void amii_wait_synch ( void );
|
||||
void amii_setclipped ( void );
|
||||
void amii_cliparound ( int x , int y );
|
||||
void amii_set_text_font( char *font, int size );
|
||||
BitMapHeader ReadImageFiles( char **, struct BitMap **, char ** );
|
||||
void amii_destroy_nhwindow(winid win);
|
||||
int amii_create_nhwindow(int type);
|
||||
void amii_init_nhwindows(int *, char **);
|
||||
void amii_setdrawpens(struct Window *, int type);
|
||||
void amii_sethipens(struct Window *, int type, int attr);
|
||||
void amii_setfillpens(struct Window *, int type);
|
||||
void amii_clear_nhwindow(winid win);
|
||||
void dismiss_nhwindow(winid win);
|
||||
void amii_exit_nhwindows(const char *str);
|
||||
void amii_display_nhwindow(winid win, boolean blocking);
|
||||
void amii_curs(winid window, int x, int y);
|
||||
void kill_nhwindows(int all);
|
||||
void amii_cl_end(struct amii_WinDesc *cw, int i);
|
||||
void cursor_off(winid window);
|
||||
void cursor_on(winid window);
|
||||
void amii_suspend_nhwindows(const char *str);
|
||||
void amii_resume_nhwindows(void);
|
||||
void amii_bell(void);
|
||||
void removetopl(int cnt);
|
||||
void port_help(void);
|
||||
void amii_print_glyph(winid win, xchar x, xchar y, int glyph);
|
||||
void amii_raw_print(const char *s);
|
||||
void amii_raw_print_bold(const char *s);
|
||||
void amii_update_inventory(void);
|
||||
void amii_mark_synch(void);
|
||||
void amii_wait_synch(void);
|
||||
void amii_setclipped(void);
|
||||
void amii_cliparound(int x, int y);
|
||||
void amii_set_text_font(char *font, int size);
|
||||
BitMapHeader ReadImageFiles(char **, struct BitMap **, char **);
|
||||
BitMapHeader ReadTileImageFiles(void);
|
||||
void FreeImageFiles( char **, struct BitMap ** );
|
||||
void FreeImageFiles(char **, struct BitMap **);
|
||||
void FreeTileImageFiles();
|
||||
|
||||
/* winami.c */
|
||||
#ifdef SHAREDLIB
|
||||
int __UserLibInit ( void );
|
||||
void __UserLibCleanup ( void );
|
||||
#ifdef SHAREDLIB
|
||||
int __UserLibInit(void);
|
||||
void __UserLibCleanup(void);
|
||||
#endif
|
||||
void amii_askname ( void );
|
||||
void amii_player_selection ( void );
|
||||
void RandomWindow ( char *name );
|
||||
int amii_get_ext_cmd ( void );
|
||||
char amii_yn_function ( const char *prompt , const char *resp , char def );
|
||||
char amii_yn_function ( const char *query , const char *resp , char def );
|
||||
void amii_display_file ( const char *fn , boolean complain );
|
||||
void SetBorder ( struct Gadget *gd );
|
||||
void *malloc ( register unsigned size );
|
||||
void free ( void *q );
|
||||
void amii_askname(void);
|
||||
void amii_player_selection(void);
|
||||
void RandomWindow(char *name);
|
||||
int amii_get_ext_cmd(void);
|
||||
char amii_yn_function(const char *prompt, const char *resp, char def);
|
||||
char amii_yn_function(const char *query, const char *resp, char def);
|
||||
void amii_display_file(const char *fn, boolean complain);
|
||||
void SetBorder(struct Gadget *gd);
|
||||
void *malloc(register unsigned size);
|
||||
void free(void *q);
|
||||
|
||||
#ifdef SHAREDLIB
|
||||
#ifdef SHAREDLIB
|
||||
/* amilib.c */
|
||||
void amii_loadlib ( void );
|
||||
void amiv_loadlib ( void );
|
||||
void CleanUp ( void );
|
||||
void setup_librefs ( WinamiBASE *base );
|
||||
void amii_loadlib(void);
|
||||
void amiv_loadlib(void);
|
||||
void CleanUp(void);
|
||||
void setup_librefs(WinamiBASE *base);
|
||||
#else
|
||||
void Abort ( long rc );
|
||||
void Abort(long rc);
|
||||
#endif
|
||||
|
||||
/* amirip.c */
|
||||
void FDECL(amii_outrip, ( winid tmpwin, int how, time_t when ));
|
||||
void FDECL(amii_outrip, (winid tmpwin, int how, time_t when));
|
||||
|
||||
/* winchar.c */
|
||||
void SetMazeType(MazeType);
|
||||
|
||||
@@ -6,61 +6,60 @@
|
||||
/* */
|
||||
/*
|
||||
* pctiles.h - Definitions for PC graphical tile support
|
||||
*
|
||||
*
|
||||
*Edit History:
|
||||
* Initial Creation M. Allison 93/10/30
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef USE_TILES
|
||||
#define NETHACK_PLANAR_TILEFILE "NetHack1.tib" /* Planar style tiles */
|
||||
#define NETHACK_PACKED_TILEFILE "NetHack2.tib" /* Packed style tiles */
|
||||
#define NETHACK_PLANAR_TILEFILE "NetHack1.tib" /* Planar style tiles */
|
||||
#define NETHACK_PACKED_TILEFILE "NetHack2.tib" /* Packed style tiles */
|
||||
#define NETHACK_OVERVIEW_TILEFILE "NetHacko.tib" /* thin overview tiles */
|
||||
|
||||
#define ROWS_PER_TILE TILE_Y
|
||||
#define COLS_PER_TILE TILE_X
|
||||
#define EMPTY_TILE -1
|
||||
#define TIBHEADER_SIZE 1024 /* Use this for size, allows expansion */
|
||||
#define PLANAR_STYLE 0
|
||||
#define PACKED_STYLE 1
|
||||
#define DJGPP_COMP 0
|
||||
#define MSC_COMP 1
|
||||
#define BC_COMP 2
|
||||
#define OTHER_COMP 10
|
||||
#define ROWS_PER_TILE TILE_Y
|
||||
#define COLS_PER_TILE TILE_X
|
||||
#define EMPTY_TILE -1
|
||||
#define TIBHEADER_SIZE 1024 /* Use this for size, allows expansion */
|
||||
#define PLANAR_STYLE 0
|
||||
#define PACKED_STYLE 1
|
||||
#define DJGPP_COMP 0
|
||||
#define MSC_COMP 1
|
||||
#define BC_COMP 2
|
||||
#define OTHER_COMP 10
|
||||
|
||||
struct tibhdr_struct {
|
||||
char ident[80]; /* Identifying string */
|
||||
char timestamp[26]; /* Ascii timestamp */
|
||||
char tilestyle; /* 0 = planar, 1 = pixel */
|
||||
char compiler; /* 0 = DJGPP, 1 = MSC, 2= BC etc. see above */
|
||||
short tilecount; /* number of tiles in file */
|
||||
short numcolors; /* number of colors in palette */
|
||||
char palette[256 * 3]; /* palette */
|
||||
char ident[80]; /* Identifying string */
|
||||
char timestamp[26]; /* Ascii timestamp */
|
||||
char tilestyle; /* 0 = planar, 1 = pixel */
|
||||
char compiler; /* 0 = DJGPP, 1 = MSC, 2= BC etc. see above */
|
||||
short tilecount; /* number of tiles in file */
|
||||
short numcolors; /* number of colors in palette */
|
||||
char palette[256 * 3]; /* palette */
|
||||
};
|
||||
|
||||
|
||||
/* Note on packed style tile file:
|
||||
* Each record consists of one of the following arrays:
|
||||
* char packtile[TILE_Y][TILE_X];
|
||||
*/
|
||||
|
||||
|
||||
extern void FDECL(CloseTileFile, (BOOLEAN_P));
|
||||
extern int FDECL(OpenTileFile, (char *, BOOLEAN_P));
|
||||
extern int FDECL(ReadTileFileHeader, (struct tibhdr_struct *, BOOLEAN_P));
|
||||
extern int FDECL(OpenTileFile, (char *, BOOLEAN_P));
|
||||
extern int FDECL(ReadTileFileHeader, (struct tibhdr_struct *, BOOLEAN_P));
|
||||
|
||||
# ifdef PLANAR_FILE
|
||||
# ifdef SCREEN_VGA
|
||||
extern int FDECL(ReadPlanarTileFile,(int, struct planar_cell_struct **));
|
||||
extern int FDECL(ReadPlanarTileFile_O,
|
||||
(int, struct overview_planar_cell_struct **));
|
||||
# endif
|
||||
# endif
|
||||
#ifdef PLANAR_FILE
|
||||
#ifdef SCREEN_VGA
|
||||
extern int FDECL(ReadPlanarTileFile, (int, struct planar_cell_struct **));
|
||||
extern int FDECL(ReadPlanarTileFile_O,
|
||||
(int, struct overview_planar_cell_struct **));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# ifdef PACKED_FILE
|
||||
extern int FDECL(ReadPackedTileFile, (int, char (*)[TILE_X]));
|
||||
# endif
|
||||
#ifdef PACKED_FILE
|
||||
extern int FDECL(ReadPackedTileFile, (int, char (*)[TILE_X]));
|
||||
#endif
|
||||
|
||||
extern short glyph2tile[MAX_GLYPH]; /* in tile.c (made from tilemap.c) */
|
||||
extern short glyph2tile[MAX_GLYPH]; /* in tile.c (made from tilemap.c) */
|
||||
|
||||
#endif /* USE_TILES */
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/*
|
||||
* pcvideo.h - Hardware video support definitions and prototypes
|
||||
*
|
||||
*
|
||||
*Edit History:
|
||||
* Initial Creation M. Allison 93/10/30
|
||||
*
|
||||
@@ -17,197 +17,208 @@
|
||||
|
||||
#include "portio.h"
|
||||
|
||||
# ifdef SCREEN_BIOS
|
||||
# if !defined(PC9800)
|
||||
# define MONO_CHECK /* Video BIOS can do the check */
|
||||
# endif
|
||||
# endif
|
||||
#ifdef SCREEN_BIOS
|
||||
#if !defined(PC9800)
|
||||
#define MONO_CHECK /* Video BIOS can do the check */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# ifdef SCREEN_DJGPPFAST
|
||||
#ifdef SCREEN_DJGPPFAST
|
||||
/*# define MONO_CHECK /* djgpp should be able to do check */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PC interrupts
|
||||
*/
|
||||
# ifdef PC9800
|
||||
#define CRT_BIOS 0x18
|
||||
#define DOS_EXT_FUNC 0xdc
|
||||
#define DIRECT_CON_IO 0x10
|
||||
# else
|
||||
#define VIDEO_BIOS 0x10
|
||||
# endif
|
||||
#define DOSCALL 0x21
|
||||
|
||||
#ifdef PC9800
|
||||
#define CRT_BIOS 0x18
|
||||
#define DOS_EXT_FUNC 0xdc
|
||||
#define DIRECT_CON_IO 0x10
|
||||
#else
|
||||
#define VIDEO_BIOS 0x10
|
||||
#endif
|
||||
#define DOSCALL 0x21
|
||||
|
||||
/*
|
||||
* Video BIOS functions
|
||||
*/
|
||||
# if defined(PC9800)
|
||||
#define SENSEMODE 0x0b /* Sense CRT Mode */
|
||||
#if defined(PC9800)
|
||||
#define SENSEMODE 0x0b /* Sense CRT Mode */
|
||||
|
||||
#define PUTCHAR 0x00 /* Put Character */
|
||||
#define SETATT 0x02 /* Set Attribute */
|
||||
#define SETCURPOS 0x03 /* Set Cursor Position */
|
||||
#define CURSOR_RIGHT 0x08 /* Move Cursor Right */
|
||||
#define CURSOR_LEFT 0x09 /* Move Cursor Left */
|
||||
#define SCREEN_CLEAR 0x0a /* Clear Screen */
|
||||
#define LINE_CLEAR 0x0b /* Clear Line */
|
||||
# else
|
||||
#define SETCURPOS 0x02 /* Set Cursor Position */
|
||||
# endif
|
||||
#define PUTCHAR 0x00 /* Put Character */
|
||||
#define SETATT 0x02 /* Set Attribute */
|
||||
#define SETCURPOS 0x03 /* Set Cursor Position */
|
||||
#define CURSOR_RIGHT 0x08 /* Move Cursor Right */
|
||||
#define CURSOR_LEFT 0x09 /* Move Cursor Left */
|
||||
#define SCREEN_CLEAR 0x0a /* Clear Screen */
|
||||
#define LINE_CLEAR 0x0b /* Clear Line */
|
||||
#else
|
||||
#define SETCURPOS 0x02 /* Set Cursor Position */
|
||||
#endif
|
||||
|
||||
#define GETCURPOS 0x03 /* Get Cursor Position */
|
||||
#define GETMODE 0x0f /* Get Video Mode */
|
||||
#define SETMODE 0x00 /* Set Video Mode */
|
||||
#define SETPAGE 0x05 /* Set Video Page */
|
||||
#define FONTINFO 0x1130 /* Get Font Info */
|
||||
#define SCROLL 0x06 /* Scroll or initialize window */
|
||||
#define PUTCHARATT 0x09 /* Write attribute & char at cursor */
|
||||
#define GETCURPOS 0x03 /* Get Cursor Position */
|
||||
#define GETMODE 0x0f /* Get Video Mode */
|
||||
#define SETMODE 0x00 /* Set Video Mode */
|
||||
#define SETPAGE 0x05 /* Set Video Page */
|
||||
#define FONTINFO 0x1130 /* Get Font Info */
|
||||
#define SCROLL 0x06 /* Scroll or initialize window */
|
||||
#define PUTCHARATT 0x09 /* Write attribute & char at cursor */
|
||||
|
||||
/*
|
||||
* VGA Specific Stuff
|
||||
*/
|
||||
# ifdef SCREEN_VGA
|
||||
#ifdef SCREEN_VGA
|
||||
/* #define HW_PANNING /* Hardware panning enabled */
|
||||
#define USHORT unsigned short
|
||||
#define MODE640x480 0x0012 /* Switch to VGA 640 x 480 Graphics mode */
|
||||
#define MODETEXT 0x0003 /* Switch to Text mode 3 */
|
||||
#define USHORT unsigned short
|
||||
#define MODE640x480 0x0012 /* Switch to VGA 640 x 480 Graphics mode */
|
||||
#define MODETEXT 0x0003 /* Switch to Text mode 3 */
|
||||
|
||||
#ifdef HW_PANNING
|
||||
#define PIXELINC 16 /* How much to increment by when panning */
|
||||
#define PIXELINC 16 /* How much to increment by when panning */
|
||||
/*#define PIXELINC 1 /* How much to increment by when panning */
|
||||
#define SCREENBYTES 128
|
||||
#define CharRows 30
|
||||
#define VERT_RETRACE {while (!(inportb(crt_status) & 0x08)); }
|
||||
#define VERT_RETRACE_END {while ( (inportb(crt_status) & 0x08)); }
|
||||
#define SCREENBYTES 128
|
||||
#define CharRows 30
|
||||
#define VERT_RETRACE \
|
||||
{ \
|
||||
while (!(inportb(crt_status) & 0x08)) \
|
||||
; \
|
||||
}
|
||||
#define VERT_RETRACE_END \
|
||||
{ \
|
||||
while ((inportb(crt_status) & 0x08)) \
|
||||
; \
|
||||
}
|
||||
#else
|
||||
#define SCREENBYTES 80
|
||||
#define SCREENBYTES 80
|
||||
#endif
|
||||
|
||||
#define CharacterWidth 8
|
||||
#define SCREENHEIGHT 480
|
||||
#define SCREENHEIGHT 480
|
||||
#define SCREENWIDTH (SCREENBYTES * CharacterWidth)
|
||||
#define VIDEOSEG 0xa000
|
||||
#define VIDEOSEG 0xa000
|
||||
#define FONT_PTR_SEGMENT 0x0000
|
||||
#define FONT_PTR_OFFSET 0x010C
|
||||
#define SCREENPLANES 4
|
||||
#define COLORDEPTH 16
|
||||
#define egawriteplane(n) { outportb(0x3c4,2); outportb(0x3c5,n); }
|
||||
#define egareadplane(n) { outportb(0x3ce,4); outportb(0x3cf,n); }
|
||||
#define col2x8(c) ((c) * 8)
|
||||
#define col2x16(c) ((c) * 16)
|
||||
#define col2x(c) ((c) * 2)
|
||||
#define row2y(c) ((c) * 16)
|
||||
#define FONT_PTR_OFFSET 0x010C
|
||||
#define SCREENPLANES 4
|
||||
#define COLORDEPTH 16
|
||||
#define egawriteplane(n) \
|
||||
{ \
|
||||
outportb(0x3c4, 2); \
|
||||
outportb(0x3c5, n); \
|
||||
}
|
||||
#define egareadplane(n) \
|
||||
{ \
|
||||
outportb(0x3ce, 4); \
|
||||
outportb(0x3cf, n); \
|
||||
}
|
||||
#define col2x8(c) ((c) *8)
|
||||
#define col2x16(c) ((c) *16)
|
||||
#define col2x(c) ((c) *2)
|
||||
#define row2y(c) ((c) *16)
|
||||
#define MAX_ROWS_PER_CELL 16
|
||||
#define MAX_COLS_PER_CELL 16
|
||||
#define MAX_BYTES_PER_CELL 2 /* MAX_COLS_PER_CELL/8 */
|
||||
#define ROWS_PER_CELL MAX_ROWS_PER_CELL
|
||||
#define COLS_PER_CELL MAX_COLS_PER_CELL
|
||||
#define MAX_BYTES_PER_CELL 2 /* MAX_COLS_PER_CELL/8 */
|
||||
#define ROWS_PER_CELL MAX_ROWS_PER_CELL
|
||||
#define COLS_PER_CELL MAX_COLS_PER_CELL
|
||||
#define BYTES_PER_CELL MAX_BYTES_PER_CELL
|
||||
|
||||
struct cellplane {
|
||||
char image[MAX_ROWS_PER_CELL][MAX_BYTES_PER_CELL];
|
||||
char image[MAX_ROWS_PER_CELL][MAX_BYTES_PER_CELL];
|
||||
};
|
||||
|
||||
|
||||
struct planar_cell_struct {
|
||||
struct cellplane plane[SCREENPLANES];
|
||||
struct cellplane plane[SCREENPLANES];
|
||||
};
|
||||
|
||||
struct overview_cellplane {
|
||||
char image[MAX_ROWS_PER_CELL][1];
|
||||
char image[MAX_ROWS_PER_CELL][1];
|
||||
};
|
||||
|
||||
struct overview_planar_cell_struct {
|
||||
struct overview_cellplane plane[SCREENPLANES];
|
||||
struct overview_cellplane plane[SCREENPLANES];
|
||||
};
|
||||
|
||||
|
||||
|
||||
# endif /* SCREEN_VGA */
|
||||
|
||||
#endif /* SCREEN_VGA */
|
||||
|
||||
/*
|
||||
* Default color Indexes for hardware palettes
|
||||
*
|
||||
*
|
||||
* Do not change the values below.
|
||||
* These are the color mappings defined by the particular video
|
||||
* These are the color mappings defined by the particular video
|
||||
* hardware/mode. You can rearrange the NetHack color mappings at
|
||||
* run-time via the defaults.nh "videocolors" and "videoshades"
|
||||
* settings.
|
||||
*
|
||||
*/
|
||||
|
||||
# if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)
|
||||
#define M_BLACK 8
|
||||
#define M_WHITE 15
|
||||
#define M_GRAY 7 /* low-intensity white */
|
||||
#define M_RED 4
|
||||
#define M_GREEN 2
|
||||
#define M_BROWN 6 /* low-intensity yellow */
|
||||
#define M_BLUE 1
|
||||
#define M_MAGENTA 5
|
||||
#define M_CYAN 3
|
||||
#define M_ORANGE 12
|
||||
#define M_BRIGHTGREEN 10
|
||||
#define M_YELLOW 14
|
||||
#define M_BRIGHTBLUE 9
|
||||
#define M_BRIGHTMAGENTA 13
|
||||
#define M_BRIGHTCYAN 11
|
||||
#if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)
|
||||
#define M_BLACK 8
|
||||
#define M_WHITE 15
|
||||
#define M_GRAY 7 /* low-intensity white */
|
||||
#define M_RED 4
|
||||
#define M_GREEN 2
|
||||
#define M_BROWN 6 /* low-intensity yellow */
|
||||
#define M_BLUE 1
|
||||
#define M_MAGENTA 5
|
||||
#define M_CYAN 3
|
||||
#define M_ORANGE 12
|
||||
#define M_BRIGHTGREEN 10
|
||||
#define M_YELLOW 14
|
||||
#define M_BRIGHTBLUE 9
|
||||
#define M_BRIGHTMAGENTA 13
|
||||
#define M_BRIGHTCYAN 11
|
||||
|
||||
#define M_TEXT M_GRAY
|
||||
#define BACKGROUND_COLOR 0
|
||||
#define ATTRIB_NORMAL M_TEXT /* Normal attribute */
|
||||
#define ATTRIB_INTENSE M_WHITE /* Intense White */
|
||||
#define ATTRIB_MONO_NORMAL 0x01 /* Underlined,white */
|
||||
#define ATTRIB_MONO_UNDERLINE 0x01 /* Underlined,white */
|
||||
#define ATTRIB_MONO_BLINK 0x87 /* Flash bit, white */
|
||||
#define ATTRIB_MONO_REVERSE 0x70 /* Black on white */
|
||||
# endif /*SCREEN_BIOS || SCREEN_DJGPPFAST */
|
||||
#define M_TEXT M_GRAY
|
||||
#define BACKGROUND_COLOR 0
|
||||
#define ATTRIB_NORMAL M_TEXT /* Normal attribute */
|
||||
#define ATTRIB_INTENSE M_WHITE /* Intense White */
|
||||
#define ATTRIB_MONO_NORMAL 0x01 /* Underlined,white */
|
||||
#define ATTRIB_MONO_UNDERLINE 0x01 /* Underlined,white */
|
||||
#define ATTRIB_MONO_BLINK 0x87 /* Flash bit, white */
|
||||
#define ATTRIB_MONO_REVERSE 0x70 /* Black on white */
|
||||
#endif /*SCREEN_BIOS || SCREEN_DJGPPFAST */
|
||||
|
||||
# if defined(SCREEN_VGA) || defined(SCREEN_8514)
|
||||
#define BACKGROUND_VGA_COLOR 0
|
||||
#define ATTRIB_VGA_NORMAL CLR_GRAY /* Normal attribute */
|
||||
#define ATTRIB_VGA_INTENSE 13 /* Intense White 94/06/07 palette chg*/
|
||||
# endif /*SCREEN_VGA || SCREEN_8514*/
|
||||
#if defined(SCREEN_VGA) || defined(SCREEN_8514)
|
||||
#define BACKGROUND_VGA_COLOR 0
|
||||
#define ATTRIB_VGA_NORMAL CLR_GRAY /* Normal attribute */
|
||||
#define ATTRIB_VGA_INTENSE 13 /* Intense White 94/06/07 palette chg*/
|
||||
#endif /*SCREEN_VGA || SCREEN_8514*/
|
||||
|
||||
# if defined(PC9800)
|
||||
#if defined(PC9800)
|
||||
static unsigned char attr98[CLR_MAX] = {
|
||||
0xe1, /* 0 white */
|
||||
0x21, /* 1 blue */
|
||||
0x81, /* 2 green */
|
||||
0xa1, /* 3 cyan */
|
||||
0x41, /* 4 red */
|
||||
0x61, /* 5 magenta */
|
||||
0xc1, /* 6 yellow */
|
||||
0xe1, /* 7 white */
|
||||
0xe1, /* 8 white */
|
||||
0x25, /* 9 reversed blue */
|
||||
0x85, /* 10 reversed green */
|
||||
0xa5, /* 11 reversed cyan */
|
||||
0x45, /* 12 reversed red */
|
||||
0x65, /* 13 reversed magenta */
|
||||
0xc5, /* 14 reversed yellow */
|
||||
0xe5, /* 15 reversed white */
|
||||
0xe1, /* 0 white */
|
||||
0x21, /* 1 blue */
|
||||
0x81, /* 2 green */
|
||||
0xa1, /* 3 cyan */
|
||||
0x41, /* 4 red */
|
||||
0x61, /* 5 magenta */
|
||||
0xc1, /* 6 yellow */
|
||||
0xe1, /* 7 white */
|
||||
0xe1, /* 8 white */
|
||||
0x25, /* 9 reversed blue */
|
||||
0x85, /* 10 reversed green */
|
||||
0xa5, /* 11 reversed cyan */
|
||||
0x45, /* 12 reversed red */
|
||||
0x65, /* 13 reversed magenta */
|
||||
0xc5, /* 14 reversed yellow */
|
||||
0xe5, /* 15 reversed white */
|
||||
};
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef SIMULATE_CURSOR
|
||||
#define CURSOR_HEIGHT 3 /* this should go - MJA */
|
||||
#ifdef SIMULATE_CURSOR
|
||||
#define CURSOR_HEIGHT 3 /* this should go - MJA */
|
||||
/* cursor styles */
|
||||
#define CURSOR_INVIS 0 /* cursor not visible at all */
|
||||
#define CURSOR_FRAME 1 /* block around the current tile */
|
||||
#define CURSOR_UNDERLINE 2 /* thin line at bottom of the tile */
|
||||
#define CURSOR_CORNER 3 /* cursor visible at the 4 tile corners */
|
||||
#define NUM_CURSOR_TYPES 4 /* number of different cursor types */
|
||||
#define CURSOR_DEFAULT_STYLE CURSOR_CORNER
|
||||
#define CURSOR_INVIS 0 /* cursor not visible at all */
|
||||
#define CURSOR_FRAME 1 /* block around the current tile */
|
||||
#define CURSOR_UNDERLINE 2 /* thin line at bottom of the tile */
|
||||
#define CURSOR_CORNER 3 /* cursor visible at the 4 tile corners */
|
||||
#define NUM_CURSOR_TYPES 4 /* number of different cursor types */
|
||||
#define CURSOR_DEFAULT_STYLE CURSOR_CORNER
|
||||
#define CURSOR_DEFAULT_COLOR M_GRAY
|
||||
/* global variables for cursor */
|
||||
extern int cursor_type;
|
||||
extern int cursor_flag;
|
||||
extern int cursor_color;
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Function Prototypes
|
||||
@@ -218,55 +229,55 @@ extern int cursor_color;
|
||||
|
||||
/* ### video.c ### */
|
||||
|
||||
# ifdef SIMULATE_CURSOR
|
||||
#ifdef SIMULATE_CURSOR
|
||||
E void NDECL(DrawCursor);
|
||||
E void NDECL(HideCursor);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* ### vidtxt.c ### */
|
||||
|
||||
# ifdef NO_TERMS
|
||||
#ifdef NO_TERMS
|
||||
E void NDECL(txt_backsp);
|
||||
E void NDECL(txt_clear_screen);
|
||||
E void FDECL(txt_cl_end,(int,int));
|
||||
E void FDECL(txt_cl_end, (int, int));
|
||||
E void NDECL(txt_cl_eos);
|
||||
E void NDECL(txt_get_scr_size);
|
||||
E void FDECL(txt_gotoxy,(int,int));
|
||||
E int NDECL(txt_monoadapt_check);
|
||||
E void FDECL(txt_gotoxy, (int, int));
|
||||
E int NDECL(txt_monoadapt_check);
|
||||
E void NDECL(txt_nhbell);
|
||||
E void FDECL(txt_startup,(int*,int*));
|
||||
E void FDECL(txt_startup, (int *, int *));
|
||||
E void FDECL(txt_xputs, (const char *, int, int));
|
||||
E void FDECL(txt_xputc, (CHAR_P, int));
|
||||
|
||||
/* ### vidvga.c ### */
|
||||
|
||||
# ifdef SCREEN_VGA
|
||||
#ifdef SCREEN_VGA
|
||||
E void NDECL(vga_backsp);
|
||||
E void FDECL(vga_clear_screen,(int));
|
||||
E void FDECL(vga_cl_end,(int,int));
|
||||
E void FDECL(vga_cl_eos,(int));
|
||||
E int NDECL(vga_detect);
|
||||
# ifdef SIMULATE_CURSOR
|
||||
E void FDECL(vga_clear_screen, (int));
|
||||
E void FDECL(vga_cl_end, (int, int));
|
||||
E void FDECL(vga_cl_eos, (int));
|
||||
E int NDECL(vga_detect);
|
||||
#ifdef SIMULATE_CURSOR
|
||||
E void NDECL(vga_DrawCursor);
|
||||
# endif
|
||||
#endif
|
||||
E void FDECL(vga_DisplayCell, (struct planar_cell_struct *, int, int));
|
||||
E void FDECL(vga_DisplayCell_O,
|
||||
(struct overview_planar_cell_struct *, int, int));
|
||||
E void FDECL(vga_DisplayCell_O,
|
||||
(struct overview_planar_cell_struct *, int, int));
|
||||
E void NDECL(vga_Finish);
|
||||
E char __far *NDECL(vga_FontPtrs);
|
||||
E void NDECL(vga_get_scr_size);
|
||||
E void FDECL(vga_gotoloc,(int,int));
|
||||
# ifdef POSITIONBAR
|
||||
E void FDECL(vga_gotoloc, (int, int));
|
||||
#ifdef POSITIONBAR
|
||||
E void FDECL(vga_update_positionbar, (char *));
|
||||
# endif
|
||||
# ifdef SIMULATE_CURSOR
|
||||
#endif
|
||||
#ifdef SIMULATE_CURSOR
|
||||
E void NDECL(vga_HideCursor);
|
||||
# endif
|
||||
#endif
|
||||
E void NDECL(vga_Init);
|
||||
E void FDECL(vga_SwitchMode, (unsigned int));
|
||||
E void FDECL(vga_SetPalette, (char *));
|
||||
E void NDECL(vga_tty_end_screen);
|
||||
E void FDECL(vga_tty_startup,(int*,int*));
|
||||
E void FDECL(vga_tty_startup, (int *, int *));
|
||||
E void FDECL(vga_WriteChar, (int, int, int, int));
|
||||
E void FDECL(vga_WriteStr, (char *, int, int, int, int));
|
||||
E void FDECL(vga_xputs, (const char *, int, int));
|
||||
@@ -276,8 +287,8 @@ E void FDECL(vga_userpan, (BOOLEAN_P));
|
||||
E void FDECL(vga_overview, (BOOLEAN_P));
|
||||
E void FDECL(vga_traditional, (BOOLEAN_P));
|
||||
E void NDECL(vga_refresh);
|
||||
# endif /* SCREEN_VGA */
|
||||
# endif /* NO_TERMS */
|
||||
#endif /* SCREEN_VGA */
|
||||
#endif /* NO_TERMS */
|
||||
|
||||
#undef E
|
||||
|
||||
|
||||
@@ -7,30 +7,30 @@
|
||||
/*
|
||||
* portio.h - PC port I/O Hardware support definitions and other
|
||||
* low-level definitions.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PORTIO_H
|
||||
#define PORTIO_H
|
||||
|
||||
# if defined(__GO32__) || defined(__DJGPP__)
|
||||
#if defined(__GO32__) || defined(__DJGPP__)
|
||||
#define __far
|
||||
#include <go32.h>
|
||||
#include <dpmi.h>
|
||||
#include <sys/farptr.h>
|
||||
#endif
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
#define outportb _outp
|
||||
#define outportw _outpw
|
||||
#define inportb _inp
|
||||
# endif
|
||||
# if defined(__BORLANDC__)
|
||||
#endif
|
||||
#if defined(__BORLANDC__)
|
||||
#define outportw outport
|
||||
/* #define inportb inport */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifndef MK_PTR
|
||||
#ifndef MK_PTR
|
||||
/*
|
||||
* Depending on environment, this is a macro to construct either:
|
||||
*
|
||||
@@ -38,36 +38,38 @@
|
||||
* - a far pointer from segment and offset values
|
||||
*
|
||||
*/
|
||||
# if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
#define MK_PTR(seg, offset) (void __far *)(((unsigned long)seg << 16) \
|
||||
+ (unsigned long)(unsigned)offset)
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
#define MK_PTR(seg, offset) \
|
||||
(void __far *)(((unsigned long) seg << 16) \
|
||||
+ (unsigned long) (unsigned) offset)
|
||||
#define READ_ABSOLUTE(x) *(x)
|
||||
#define READ_ABSOLUTE_WORD(x) *(x)
|
||||
#define WRITE_ABSOLUTE(x,y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x,y) *(x) = (y)
|
||||
# endif
|
||||
#define WRITE_ABSOLUTE(x, y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x, y) *(x) = (y)
|
||||
#endif
|
||||
|
||||
# if defined(__GO32__) || defined(__DJGPP__)
|
||||
#define MK_PTR(seg, offset) (void *)(((unsigned)seg << 4) + (unsigned)offset)
|
||||
#if defined(__GO32__) || defined(__DJGPP__)
|
||||
#define MK_PTR(seg, offset) \
|
||||
(void *)(((unsigned) seg << 4) + (unsigned) offset)
|
||||
#define READ_ABSOLUTE(x) \
|
||||
(_farpeekb(_go32_conventional_mem_selector(), (unsigned)x))
|
||||
(_farpeekb(_go32_conventional_mem_selector(), (unsigned) x))
|
||||
#define READ_ABSOLUTE_WORD(x) \
|
||||
(_farpeekw(_go32_conventional_mem_selector(), (unsigned)x))
|
||||
#define WRITE_ABSOLUTE(x,y) \
|
||||
_farpokeb(_go32_conventional_mem_selector(), (unsigned)x, (y))
|
||||
#define WRITE_ABSOLUTE_WORD(x,y) \
|
||||
_farpokew(_go32_conventional_mem_selector(), (unsigned)x, (y))
|
||||
# endif
|
||||
(_farpeekw(_go32_conventional_mem_selector(), (unsigned) x))
|
||||
#define WRITE_ABSOLUTE(x, y) \
|
||||
_farpokeb(_go32_conventional_mem_selector(), (unsigned) x, (y))
|
||||
#define WRITE_ABSOLUTE_WORD(x, y) \
|
||||
_farpokew(_go32_conventional_mem_selector(), (unsigned) x, (y))
|
||||
#endif
|
||||
|
||||
# ifdef OBSOLETE /* old djgpp V1.x way of mapping 1st MB */
|
||||
#define MK_PTR(seg, offset) (void *)(0xE0000000+((((unsigned)seg << 4) \
|
||||
+ (unsigned)offset)))
|
||||
#ifdef OBSOLETE /* old djgpp V1.x way of mapping 1st MB */
|
||||
#define MK_PTR(seg, offset) \
|
||||
(void *)(0xE0000000 + ((((unsigned) seg << 4) + (unsigned) offset)))
|
||||
#define READ_ABSOLUTE(x) *(x)
|
||||
#define READ_ABSOLUTE_WORD(x) *(x)
|
||||
#define WRITE_ABSOLUTE(x,y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x,y) *(x) = (y)
|
||||
# endif
|
||||
# endif /* MK_PTR */
|
||||
#define WRITE_ABSOLUTE(x, y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x, y) *(x) = (y)
|
||||
#endif
|
||||
#endif /* MK_PTR */
|
||||
|
||||
#endif /* PORTIO_H */
|
||||
/* portio.h */
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
@@ -28,39 +28,38 @@
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
INTEGER = 258,
|
||||
A_DUNGEON = 259,
|
||||
BRANCH = 260,
|
||||
CHBRANCH = 261,
|
||||
LEVEL = 262,
|
||||
RNDLEVEL = 263,
|
||||
CHLEVEL = 264,
|
||||
RNDCHLEVEL = 265,
|
||||
UP_OR_DOWN = 266,
|
||||
PROTOFILE = 267,
|
||||
DESCRIPTION = 268,
|
||||
DESCRIPTOR = 269,
|
||||
LEVELDESC = 270,
|
||||
ALIGNMENT = 271,
|
||||
LEVALIGN = 272,
|
||||
ENTRY = 273,
|
||||
STAIR = 274,
|
||||
NO_UP = 275,
|
||||
NO_DOWN = 276,
|
||||
PORTAL = 277,
|
||||
STRING = 278
|
||||
};
|
||||
#define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
INTEGER = 258,
|
||||
A_DUNGEON = 259,
|
||||
BRANCH = 260,
|
||||
CHBRANCH = 261,
|
||||
LEVEL = 262,
|
||||
RNDLEVEL = 263,
|
||||
CHLEVEL = 264,
|
||||
RNDCHLEVEL = 265,
|
||||
UP_OR_DOWN = 266,
|
||||
PROTOFILE = 267,
|
||||
DESCRIPTION = 268,
|
||||
DESCRIPTOR = 269,
|
||||
LEVELDESC = 270,
|
||||
ALIGNMENT = 271,
|
||||
LEVALIGN = 272,
|
||||
ENTRY = 273,
|
||||
STAIR = 274,
|
||||
NO_UP = 275,
|
||||
NO_DOWN = 276,
|
||||
PORTAL = 277,
|
||||
STRING = 278
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define INTEGER 258
|
||||
@@ -85,29 +84,20 @@
|
||||
#define PORTAL 277
|
||||
#define STRING 278
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE {
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 69 "dgn_comp.y"
|
||||
|
||||
int i;
|
||||
char* str;
|
||||
|
||||
|
||||
int i;
|
||||
char *str;
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 105 "y.tab.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#define YYSTYPE_IS_TRIVIAL 1
|
||||
#define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
@@ -28,192 +28,191 @@
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
CHAR = 258,
|
||||
INTEGER = 259,
|
||||
BOOLEAN = 260,
|
||||
PERCENT = 261,
|
||||
SPERCENT = 262,
|
||||
MINUS_INTEGER = 263,
|
||||
PLUS_INTEGER = 264,
|
||||
MAZE_GRID_ID = 265,
|
||||
SOLID_FILL_ID = 266,
|
||||
MINES_ID = 267,
|
||||
ROGUELEV_ID = 268,
|
||||
MESSAGE_ID = 269,
|
||||
MAZE_ID = 270,
|
||||
LEVEL_ID = 271,
|
||||
LEV_INIT_ID = 272,
|
||||
GEOMETRY_ID = 273,
|
||||
NOMAP_ID = 274,
|
||||
OBJECT_ID = 275,
|
||||
COBJECT_ID = 276,
|
||||
MONSTER_ID = 277,
|
||||
TRAP_ID = 278,
|
||||
DOOR_ID = 279,
|
||||
DRAWBRIDGE_ID = 280,
|
||||
object_ID = 281,
|
||||
monster_ID = 282,
|
||||
terrain_ID = 283,
|
||||
MAZEWALK_ID = 284,
|
||||
WALLIFY_ID = 285,
|
||||
REGION_ID = 286,
|
||||
FILLING = 287,
|
||||
IRREGULAR = 288,
|
||||
JOINED = 289,
|
||||
ALTAR_ID = 290,
|
||||
LADDER_ID = 291,
|
||||
STAIR_ID = 292,
|
||||
NON_DIGGABLE_ID = 293,
|
||||
NON_PASSWALL_ID = 294,
|
||||
ROOM_ID = 295,
|
||||
PORTAL_ID = 296,
|
||||
TELEPRT_ID = 297,
|
||||
BRANCH_ID = 298,
|
||||
LEV = 299,
|
||||
MINERALIZE_ID = 300,
|
||||
CORRIDOR_ID = 301,
|
||||
GOLD_ID = 302,
|
||||
ENGRAVING_ID = 303,
|
||||
FOUNTAIN_ID = 304,
|
||||
POOL_ID = 305,
|
||||
SINK_ID = 306,
|
||||
NONE = 307,
|
||||
RAND_CORRIDOR_ID = 308,
|
||||
DOOR_STATE = 309,
|
||||
LIGHT_STATE = 310,
|
||||
CURSE_TYPE = 311,
|
||||
ENGRAVING_TYPE = 312,
|
||||
DIRECTION = 313,
|
||||
RANDOM_TYPE = 314,
|
||||
RANDOM_TYPE_BRACKET = 315,
|
||||
A_REGISTER = 316,
|
||||
ALIGNMENT = 317,
|
||||
LEFT_OR_RIGHT = 318,
|
||||
CENTER = 319,
|
||||
TOP_OR_BOT = 320,
|
||||
ALTAR_TYPE = 321,
|
||||
UP_OR_DOWN = 322,
|
||||
SUBROOM_ID = 323,
|
||||
NAME_ID = 324,
|
||||
FLAGS_ID = 325,
|
||||
FLAG_TYPE = 326,
|
||||
MON_ATTITUDE = 327,
|
||||
MON_ALERTNESS = 328,
|
||||
MON_APPEARANCE = 329,
|
||||
ROOMDOOR_ID = 330,
|
||||
IF_ID = 331,
|
||||
ELSE_ID = 332,
|
||||
TERRAIN_ID = 333,
|
||||
HORIZ_OR_VERT = 334,
|
||||
REPLACE_TERRAIN_ID = 335,
|
||||
EXIT_ID = 336,
|
||||
SHUFFLE_ID = 337,
|
||||
QUANTITY_ID = 338,
|
||||
BURIED_ID = 339,
|
||||
LOOP_ID = 340,
|
||||
FOR_ID = 341,
|
||||
TO_ID = 342,
|
||||
SWITCH_ID = 343,
|
||||
CASE_ID = 344,
|
||||
BREAK_ID = 345,
|
||||
DEFAULT_ID = 346,
|
||||
ERODED_ID = 347,
|
||||
TRAPPED_ID = 348,
|
||||
RECHARGED_ID = 349,
|
||||
INVIS_ID = 350,
|
||||
GREASED_ID = 351,
|
||||
FEMALE_ID = 352,
|
||||
CANCELLED_ID = 353,
|
||||
REVIVED_ID = 354,
|
||||
AVENGE_ID = 355,
|
||||
FLEEING_ID = 356,
|
||||
BLINDED_ID = 357,
|
||||
PARALYZED_ID = 358,
|
||||
STUNNED_ID = 359,
|
||||
CONFUSED_ID = 360,
|
||||
SEENTRAPS_ID = 361,
|
||||
ALL_ID = 362,
|
||||
MONTYPE_ID = 363,
|
||||
GRAVE_ID = 364,
|
||||
ERODEPROOF_ID = 365,
|
||||
FUNCTION_ID = 366,
|
||||
MSG_OUTPUT_TYPE = 367,
|
||||
COMPARE_TYPE = 368,
|
||||
UNKNOWN_TYPE = 369,
|
||||
rect_ID = 370,
|
||||
fillrect_ID = 371,
|
||||
line_ID = 372,
|
||||
randline_ID = 373,
|
||||
grow_ID = 374,
|
||||
selection_ID = 375,
|
||||
flood_ID = 376,
|
||||
rndcoord_ID = 377,
|
||||
circle_ID = 378,
|
||||
ellipse_ID = 379,
|
||||
filter_ID = 380,
|
||||
complement_ID = 381,
|
||||
gradient_ID = 382,
|
||||
GRADIENT_TYPE = 383,
|
||||
LIMITED = 384,
|
||||
HUMIDITY_TYPE = 385,
|
||||
STRING = 386,
|
||||
MAP_ID = 387,
|
||||
NQSTRING = 388,
|
||||
VARSTRING = 389,
|
||||
CFUNC = 390,
|
||||
CFUNC_INT = 391,
|
||||
CFUNC_STR = 392,
|
||||
CFUNC_COORD = 393,
|
||||
CFUNC_REGION = 394,
|
||||
VARSTRING_INT = 395,
|
||||
VARSTRING_INT_ARRAY = 396,
|
||||
VARSTRING_STRING = 397,
|
||||
VARSTRING_STRING_ARRAY = 398,
|
||||
VARSTRING_VAR = 399,
|
||||
VARSTRING_VAR_ARRAY = 400,
|
||||
VARSTRING_COORD = 401,
|
||||
VARSTRING_COORD_ARRAY = 402,
|
||||
VARSTRING_REGION = 403,
|
||||
VARSTRING_REGION_ARRAY = 404,
|
||||
VARSTRING_MAPCHAR = 405,
|
||||
VARSTRING_MAPCHAR_ARRAY = 406,
|
||||
VARSTRING_MONST = 407,
|
||||
VARSTRING_MONST_ARRAY = 408,
|
||||
VARSTRING_OBJ = 409,
|
||||
VARSTRING_OBJ_ARRAY = 410,
|
||||
VARSTRING_SEL = 411,
|
||||
VARSTRING_SEL_ARRAY = 412,
|
||||
METHOD_INT = 413,
|
||||
METHOD_INT_ARRAY = 414,
|
||||
METHOD_STRING = 415,
|
||||
METHOD_STRING_ARRAY = 416,
|
||||
METHOD_VAR = 417,
|
||||
METHOD_VAR_ARRAY = 418,
|
||||
METHOD_COORD = 419,
|
||||
METHOD_COORD_ARRAY = 420,
|
||||
METHOD_REGION = 421,
|
||||
METHOD_REGION_ARRAY = 422,
|
||||
METHOD_MAPCHAR = 423,
|
||||
METHOD_MAPCHAR_ARRAY = 424,
|
||||
METHOD_MONST = 425,
|
||||
METHOD_MONST_ARRAY = 426,
|
||||
METHOD_OBJ = 427,
|
||||
METHOD_OBJ_ARRAY = 428,
|
||||
METHOD_SEL = 429,
|
||||
METHOD_SEL_ARRAY = 430,
|
||||
DICE = 431
|
||||
};
|
||||
#define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
CHAR = 258,
|
||||
INTEGER = 259,
|
||||
BOOLEAN = 260,
|
||||
PERCENT = 261,
|
||||
SPERCENT = 262,
|
||||
MINUS_INTEGER = 263,
|
||||
PLUS_INTEGER = 264,
|
||||
MAZE_GRID_ID = 265,
|
||||
SOLID_FILL_ID = 266,
|
||||
MINES_ID = 267,
|
||||
ROGUELEV_ID = 268,
|
||||
MESSAGE_ID = 269,
|
||||
MAZE_ID = 270,
|
||||
LEVEL_ID = 271,
|
||||
LEV_INIT_ID = 272,
|
||||
GEOMETRY_ID = 273,
|
||||
NOMAP_ID = 274,
|
||||
OBJECT_ID = 275,
|
||||
COBJECT_ID = 276,
|
||||
MONSTER_ID = 277,
|
||||
TRAP_ID = 278,
|
||||
DOOR_ID = 279,
|
||||
DRAWBRIDGE_ID = 280,
|
||||
object_ID = 281,
|
||||
monster_ID = 282,
|
||||
terrain_ID = 283,
|
||||
MAZEWALK_ID = 284,
|
||||
WALLIFY_ID = 285,
|
||||
REGION_ID = 286,
|
||||
FILLING = 287,
|
||||
IRREGULAR = 288,
|
||||
JOINED = 289,
|
||||
ALTAR_ID = 290,
|
||||
LADDER_ID = 291,
|
||||
STAIR_ID = 292,
|
||||
NON_DIGGABLE_ID = 293,
|
||||
NON_PASSWALL_ID = 294,
|
||||
ROOM_ID = 295,
|
||||
PORTAL_ID = 296,
|
||||
TELEPRT_ID = 297,
|
||||
BRANCH_ID = 298,
|
||||
LEV = 299,
|
||||
MINERALIZE_ID = 300,
|
||||
CORRIDOR_ID = 301,
|
||||
GOLD_ID = 302,
|
||||
ENGRAVING_ID = 303,
|
||||
FOUNTAIN_ID = 304,
|
||||
POOL_ID = 305,
|
||||
SINK_ID = 306,
|
||||
NONE = 307,
|
||||
RAND_CORRIDOR_ID = 308,
|
||||
DOOR_STATE = 309,
|
||||
LIGHT_STATE = 310,
|
||||
CURSE_TYPE = 311,
|
||||
ENGRAVING_TYPE = 312,
|
||||
DIRECTION = 313,
|
||||
RANDOM_TYPE = 314,
|
||||
RANDOM_TYPE_BRACKET = 315,
|
||||
A_REGISTER = 316,
|
||||
ALIGNMENT = 317,
|
||||
LEFT_OR_RIGHT = 318,
|
||||
CENTER = 319,
|
||||
TOP_OR_BOT = 320,
|
||||
ALTAR_TYPE = 321,
|
||||
UP_OR_DOWN = 322,
|
||||
SUBROOM_ID = 323,
|
||||
NAME_ID = 324,
|
||||
FLAGS_ID = 325,
|
||||
FLAG_TYPE = 326,
|
||||
MON_ATTITUDE = 327,
|
||||
MON_ALERTNESS = 328,
|
||||
MON_APPEARANCE = 329,
|
||||
ROOMDOOR_ID = 330,
|
||||
IF_ID = 331,
|
||||
ELSE_ID = 332,
|
||||
TERRAIN_ID = 333,
|
||||
HORIZ_OR_VERT = 334,
|
||||
REPLACE_TERRAIN_ID = 335,
|
||||
EXIT_ID = 336,
|
||||
SHUFFLE_ID = 337,
|
||||
QUANTITY_ID = 338,
|
||||
BURIED_ID = 339,
|
||||
LOOP_ID = 340,
|
||||
FOR_ID = 341,
|
||||
TO_ID = 342,
|
||||
SWITCH_ID = 343,
|
||||
CASE_ID = 344,
|
||||
BREAK_ID = 345,
|
||||
DEFAULT_ID = 346,
|
||||
ERODED_ID = 347,
|
||||
TRAPPED_ID = 348,
|
||||
RECHARGED_ID = 349,
|
||||
INVIS_ID = 350,
|
||||
GREASED_ID = 351,
|
||||
FEMALE_ID = 352,
|
||||
CANCELLED_ID = 353,
|
||||
REVIVED_ID = 354,
|
||||
AVENGE_ID = 355,
|
||||
FLEEING_ID = 356,
|
||||
BLINDED_ID = 357,
|
||||
PARALYZED_ID = 358,
|
||||
STUNNED_ID = 359,
|
||||
CONFUSED_ID = 360,
|
||||
SEENTRAPS_ID = 361,
|
||||
ALL_ID = 362,
|
||||
MONTYPE_ID = 363,
|
||||
GRAVE_ID = 364,
|
||||
ERODEPROOF_ID = 365,
|
||||
FUNCTION_ID = 366,
|
||||
MSG_OUTPUT_TYPE = 367,
|
||||
COMPARE_TYPE = 368,
|
||||
UNKNOWN_TYPE = 369,
|
||||
rect_ID = 370,
|
||||
fillrect_ID = 371,
|
||||
line_ID = 372,
|
||||
randline_ID = 373,
|
||||
grow_ID = 374,
|
||||
selection_ID = 375,
|
||||
flood_ID = 376,
|
||||
rndcoord_ID = 377,
|
||||
circle_ID = 378,
|
||||
ellipse_ID = 379,
|
||||
filter_ID = 380,
|
||||
complement_ID = 381,
|
||||
gradient_ID = 382,
|
||||
GRADIENT_TYPE = 383,
|
||||
LIMITED = 384,
|
||||
HUMIDITY_TYPE = 385,
|
||||
STRING = 386,
|
||||
MAP_ID = 387,
|
||||
NQSTRING = 388,
|
||||
VARSTRING = 389,
|
||||
CFUNC = 390,
|
||||
CFUNC_INT = 391,
|
||||
CFUNC_STR = 392,
|
||||
CFUNC_COORD = 393,
|
||||
CFUNC_REGION = 394,
|
||||
VARSTRING_INT = 395,
|
||||
VARSTRING_INT_ARRAY = 396,
|
||||
VARSTRING_STRING = 397,
|
||||
VARSTRING_STRING_ARRAY = 398,
|
||||
VARSTRING_VAR = 399,
|
||||
VARSTRING_VAR_ARRAY = 400,
|
||||
VARSTRING_COORD = 401,
|
||||
VARSTRING_COORD_ARRAY = 402,
|
||||
VARSTRING_REGION = 403,
|
||||
VARSTRING_REGION_ARRAY = 404,
|
||||
VARSTRING_MAPCHAR = 405,
|
||||
VARSTRING_MAPCHAR_ARRAY = 406,
|
||||
VARSTRING_MONST = 407,
|
||||
VARSTRING_MONST_ARRAY = 408,
|
||||
VARSTRING_OBJ = 409,
|
||||
VARSTRING_OBJ_ARRAY = 410,
|
||||
VARSTRING_SEL = 411,
|
||||
VARSTRING_SEL_ARRAY = 412,
|
||||
METHOD_INT = 413,
|
||||
METHOD_INT_ARRAY = 414,
|
||||
METHOD_STRING = 415,
|
||||
METHOD_STRING_ARRAY = 416,
|
||||
METHOD_VAR = 417,
|
||||
METHOD_VAR_ARRAY = 418,
|
||||
METHOD_COORD = 419,
|
||||
METHOD_COORD_ARRAY = 420,
|
||||
METHOD_REGION = 421,
|
||||
METHOD_REGION_ARRAY = 422,
|
||||
METHOD_MAPCHAR = 423,
|
||||
METHOD_MAPCHAR_ARRAY = 424,
|
||||
METHOD_MONST = 425,
|
||||
METHOD_MONST_ARRAY = 426,
|
||||
METHOD_OBJ = 427,
|
||||
METHOD_OBJ_ARRAY = 428,
|
||||
METHOD_SEL = 429,
|
||||
METHOD_SEL_ARRAY = 430,
|
||||
DICE = 431
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define CHAR 258
|
||||
@@ -391,61 +390,52 @@
|
||||
#define METHOD_SEL_ARRAY 430
|
||||
#define DICE 431
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
|
||||
#if !defined YYSTYPE && !defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE {
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 149 "lev_comp.y"
|
||||
|
||||
long i;
|
||||
char* map;
|
||||
struct {
|
||||
long room;
|
||||
long wall;
|
||||
long door;
|
||||
} corpos;
|
||||
long i;
|
||||
char *map;
|
||||
struct {
|
||||
long area;
|
||||
long x1;
|
||||
long y1;
|
||||
long x2;
|
||||
long y2;
|
||||
long room;
|
||||
long wall;
|
||||
long door;
|
||||
} corpos;
|
||||
struct {
|
||||
long area;
|
||||
long x1;
|
||||
long y1;
|
||||
long x2;
|
||||
long y2;
|
||||
} lregn;
|
||||
struct {
|
||||
long x;
|
||||
long y;
|
||||
long x;
|
||||
long y;
|
||||
} crd;
|
||||
struct {
|
||||
long ter;
|
||||
long lit;
|
||||
long ter;
|
||||
long lit;
|
||||
} terr;
|
||||
struct {
|
||||
long height;
|
||||
long width;
|
||||
long height;
|
||||
long width;
|
||||
} sze;
|
||||
struct {
|
||||
long die;
|
||||
long num;
|
||||
long die;
|
||||
long num;
|
||||
} dice;
|
||||
struct {
|
||||
long cfunc;
|
||||
char *varstr;
|
||||
long cfunc;
|
||||
char *varstr;
|
||||
} meth;
|
||||
|
||||
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 443 "y.tab.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#define YYSTYPE_IS_TRIVIAL 1
|
||||
#define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef stdin
|
||||
# undef stdin
|
||||
#undef stdin
|
||||
#endif
|
||||
#define stdin 0
|
||||
#define stdin 0
|
||||
#ifdef stdout
|
||||
# undef stdout
|
||||
#undef stdout
|
||||
#endif
|
||||
#define stdout 0
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
*
|
||||
****/
|
||||
|
||||
#undef assert
|
||||
#undef assert
|
||||
|
||||
#ifdef NDEBUG
|
||||
#ifdef NDEBUG
|
||||
|
||||
#define assert(exp) ((void)0)
|
||||
#define assert(exp) ((void) 0)
|
||||
|
||||
#else
|
||||
|
||||
#define assert(exp) (void)( (exp) || (panic("%s at %s line %ld", #exp, __FILE__,__LINE__), 1) )
|
||||
#define assert(exp) \
|
||||
(void)((exp) || (panic("%s at %s line %ld", #exp, __FILE__, __LINE__), 1))
|
||||
|
||||
#endif /* NDEBUG */
|
||||
#endif /* NDEBUG */
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* empty file */
|
||||
|
||||
extern int errno;
|
||||
|
||||
|
||||
@@ -13,55 +13,55 @@
|
||||
#ifndef _INC_FCNTL
|
||||
#define _INC_FCNTL
|
||||
|
||||
#define _O_RDONLY 0x0000 /* open for reading only */
|
||||
#define _O_WRONLY 0x0001 /* open for writing only */
|
||||
#define _O_RDWR 0x0002 /* open for reading and writing */
|
||||
#define _O_APPEND 0x0008 /* writes done at eof */
|
||||
#define _O_RDONLY 0x0000 /* open for reading only */
|
||||
#define _O_WRONLY 0x0001 /* open for writing only */
|
||||
#define _O_RDWR 0x0002 /* open for reading and writing */
|
||||
#define _O_APPEND 0x0008 /* writes done at eof */
|
||||
|
||||
#define _O_CREAT 0x0100 /* create and open file */
|
||||
#define _O_TRUNC 0x0200 /* open and truncate */
|
||||
#define _O_EXCL 0x0400 /* open only if file doesn't already exist */
|
||||
#define _O_CREAT 0x0100 /* create and open file */
|
||||
#define _O_TRUNC 0x0200 /* open and truncate */
|
||||
#define _O_EXCL 0x0400 /* open only if file doesn't already exist */
|
||||
|
||||
/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
|
||||
** and <lf> sequences translated to <cr><lf> on write()'s
|
||||
*/
|
||||
|
||||
#define _O_TEXT 0x4000 /* file mode is text (translated) */
|
||||
#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */
|
||||
#define _O_TEXT 0x4000 /* file mode is text (translated) */
|
||||
#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */
|
||||
|
||||
/* macro to translate the C 2.0 name used to force binary mode for files */
|
||||
|
||||
#define _O_RAW _O_BINARY
|
||||
#define _O_RAW _O_BINARY
|
||||
|
||||
/* Open handle inherit bit */
|
||||
|
||||
#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */
|
||||
#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */
|
||||
|
||||
/* Temporary file bit - file is deleted when last handle is closed */
|
||||
|
||||
#define _O_TEMPORARY 0x0040 /* temporary file bit */
|
||||
#define _O_TEMPORARY 0x0040 /* temporary file bit */
|
||||
|
||||
/* sequential/random access hints */
|
||||
|
||||
#define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */
|
||||
#define _O_RANDOM 0x0010 /* file access is primarily random */
|
||||
#define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */
|
||||
#define _O_RANDOM 0x0010 /* file access is primarily random */
|
||||
|
||||
#if !__STDC__ || defined(_POSIX_)
|
||||
#if !__STDC__ || defined(_POSIX_)
|
||||
/* Non-ANSI names for compatibility */
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_TEXT _O_TEXT
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_RAW _O_BINARY
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQUENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
#endif /* __STDC__ */
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_TEXT _O_TEXT
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_RAW _O_BINARY
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQUENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#endif /* _INC_FCNTL */
|
||||
#endif /* _INC_FCNTL */
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
/* empty file */
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
|
||||
#include "winMS.h"
|
||||
|
||||
int mswin_yes_no_dialog( const char *question, const char *choices, int def);
|
||||
int mswin_yes_no_dialog(const char *question, const char *choices, int def);
|
||||
|
||||
#endif /* MSWINAskYesNO_h */
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
HWND mswin_init_command_window ();
|
||||
HWND mswin_init_command_window();
|
||||
|
||||
/* if either sz->cx or sz->cy are already set this function will
|
||||
no modify it. It will adjust them to the minimum size
|
||||
/* if either sz->cx or sz->cy are already set this function will
|
||||
no modify it. It will adjust them to the minimum size
|
||||
required by the command window */
|
||||
void mswin_command_window_size (HWND hwnd, LPSIZE sz);
|
||||
void mswin_command_window_size(HWND hwnd, LPSIZE sz);
|
||||
|
||||
#if defined(WIN_CE_SMARTPHONE)
|
||||
/* special keypad input handling for SmartPhone */
|
||||
BOOL NHSPhoneTranslateKbdMessage(WPARAM wParam, LPARAM lParam, BOOL keyDown);
|
||||
void NHSPhoneSetKeypadFromString(const char* str);
|
||||
void NHSPhoneSetKeypadDirection();
|
||||
void NHSPhoneSetKeypadDefault();
|
||||
BOOL NHSPhoneTranslateKbdMessage(WPARAM wParam, LPARAM lParam, BOOL keyDown);
|
||||
void NHSPhoneSetKeypadFromString(const char *str);
|
||||
void NHSPhoneSetKeypadDirection();
|
||||
void NHSPhoneSetKeypadDefault();
|
||||
#endif
|
||||
|
||||
#endif /* MSWINCMDWindow_h */
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
int mswin_getlin_window (const char *question, char *result, size_t result_size);
|
||||
int mswin_ext_cmd_window (int* selection);
|
||||
int mswin_player_selection_window(int* selection);
|
||||
int mswin_getlin_window(const char *question, char *result,
|
||||
size_t result_size);
|
||||
int mswin_ext_cmd_window(int *selection);
|
||||
int mswin_player_selection_window(int *selection);
|
||||
|
||||
#endif /* MSWINDlgWindow_h */
|
||||
|
||||
@@ -10,30 +10,43 @@
|
||||
/* nethack input queue - store/extract input events */
|
||||
#include "winMS.h"
|
||||
|
||||
#define NHEVENT_CHAR 1
|
||||
#define NHEVENT_MOUSE 2
|
||||
#define NHEVENT_CHAR 1
|
||||
#define NHEVENT_MOUSE 2
|
||||
typedef struct mswin_event {
|
||||
int type;
|
||||
union {
|
||||
struct {
|
||||
int ch;
|
||||
} kbd;
|
||||
int type;
|
||||
union {
|
||||
struct {
|
||||
int ch;
|
||||
} kbd;
|
||||
|
||||
struct {
|
||||
int mod;
|
||||
int x, y;
|
||||
} ms;
|
||||
};
|
||||
struct {
|
||||
int mod;
|
||||
int x, y;
|
||||
} ms;
|
||||
};
|
||||
} MSNHEvent, *PMSNHEvent;
|
||||
|
||||
#define NHEVENT_KBD(c) { MSNHEvent e; e.type=NHEVENT_CHAR; e.kbd.ch=(c); mswin_input_push(&e); }
|
||||
#define NHEVENT_MS(_mod, _x, _y) { MSNHEvent e; e.type=NHEVENT_MOUSE; e.ms.mod = (_mod); e.ms.x=(_x); e.ms.y=(_y); mswin_input_push(&e); }
|
||||
#define NHEVENT_KBD(c) \
|
||||
{ \
|
||||
MSNHEvent e; \
|
||||
e.type = NHEVENT_CHAR; \
|
||||
e.kbd.ch = (c); \
|
||||
mswin_input_push(&e); \
|
||||
}
|
||||
#define NHEVENT_MS(_mod, _x, _y) \
|
||||
{ \
|
||||
MSNHEvent e; \
|
||||
e.type = NHEVENT_MOUSE; \
|
||||
e.ms.mod = (_mod); \
|
||||
e.ms.x = (_x); \
|
||||
e.ms.y = (_y); \
|
||||
mswin_input_push(&e); \
|
||||
}
|
||||
|
||||
void mswin_nh_input_init();
|
||||
int mswin_have_input();
|
||||
void mswin_input_push(PMSNHEvent event);
|
||||
PMSNHEvent mswin_input_pop();
|
||||
PMSNHEvent mswin_input_peek();
|
||||
void mswin_nh_input_init();
|
||||
int mswin_have_input();
|
||||
void mswin_input_push(PMSNHEvent event);
|
||||
PMSNHEvent mswin_input_pop();
|
||||
PMSNHEvent mswin_input_peek();
|
||||
|
||||
#endif /* MSWINInput_h */
|
||||
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
#include "winMS.h"
|
||||
|
||||
extern TCHAR szMainWindowClass[];
|
||||
HWND mswin_init_main_window ();
|
||||
HWND mswin_init_main_window();
|
||||
void mswin_layout_main_window(HWND changed_child);
|
||||
void mswin_select_map_mode(int map_mode);
|
||||
|
||||
#endif /* MSWINMainWindow_h */
|
||||
|
||||
|
||||
@@ -10,15 +10,14 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
|
||||
HWND mswin_init_map_window (void);
|
||||
HWND mswin_init_map_window(void);
|
||||
void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw);
|
||||
int mswin_map_mode(HWND hWnd, int mode);
|
||||
void mswin_map_get_cursor(HWND hWnd, int* x, int* y);
|
||||
void mswin_map_get_cursor(HWND hWnd, int *x, int *y);
|
||||
|
||||
#define ROGUE_LEVEL_MAP_MODE MAP_MODE_ASCII12x16
|
||||
#define ROGUE_LEVEL_MAP_MODE MAP_MODE_ASCII12x16
|
||||
|
||||
#define DEF_CLIPAROUND_MARGIN 5
|
||||
#define DEF_CLIPAROUND_AMOUNT 1
|
||||
#define DEF_CLIPAROUND_MARGIN 5
|
||||
#define DEF_CLIPAROUND_AMOUNT 1
|
||||
|
||||
#endif /* MSWINMapWindow_h */
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
#define MENU_TYPE_TEXT 1
|
||||
#define MENU_TYPE_MENU 2
|
||||
#define MENU_TYPE_TEXT 1
|
||||
#define MENU_TYPE_MENU 2
|
||||
|
||||
HWND mswin_init_menu_window ( int type );
|
||||
int mswin_menu_window_select_menu (HWND hwnd, int how, MENU_ITEM_P **);
|
||||
void mswin_menu_window_size (HWND hwnd, LPSIZE sz);
|
||||
HWND mswin_init_menu_window(int type);
|
||||
int mswin_menu_window_select_menu(HWND hwnd, int how, MENU_ITEM_P **);
|
||||
void mswin_menu_window_size(HWND hwnd, LPSIZE sz);
|
||||
|
||||
#endif /* MSWINTextWindow_h */
|
||||
|
||||
@@ -8,56 +8,56 @@
|
||||
#define MHNethackMessages_H
|
||||
|
||||
/* nethack messages */
|
||||
#define WM_MSNH_COMMAND (WM_APP+1)
|
||||
#define WM_MSNH_COMMAND (WM_APP + 1)
|
||||
|
||||
#define MSNH_MSG_ADDWND 100
|
||||
#define MSNH_MSG_PUTSTR 101
|
||||
#define MSNH_MSG_PRINT_GLYPH 102
|
||||
#define MSNH_MSG_CLEAR_WINDOW 103
|
||||
#define MSNH_MSG_CLIPAROUND 104
|
||||
#define MSNH_MSG_STARTMENU 105
|
||||
#define MSNH_MSG_ADDMENU 106
|
||||
#define MSNH_MSG_CURSOR 107
|
||||
#define MSNH_MSG_ENDMENU 108
|
||||
#define MSNH_MSG_ADDWND 100
|
||||
#define MSNH_MSG_PUTSTR 101
|
||||
#define MSNH_MSG_PRINT_GLYPH 102
|
||||
#define MSNH_MSG_CLEAR_WINDOW 103
|
||||
#define MSNH_MSG_CLIPAROUND 104
|
||||
#define MSNH_MSG_STARTMENU 105
|
||||
#define MSNH_MSG_ADDMENU 106
|
||||
#define MSNH_MSG_CURSOR 107
|
||||
#define MSNH_MSG_ENDMENU 108
|
||||
|
||||
typedef struct mswin_nhmsg_add_wnd {
|
||||
winid wid;
|
||||
winid wid;
|
||||
} MSNHMsgAddWnd, *PMSNHMsgAddWnd;
|
||||
|
||||
typedef struct mswin_nhmsg_putstr {
|
||||
int attr;
|
||||
const char* text;
|
||||
boolean append;
|
||||
int attr;
|
||||
const char *text;
|
||||
boolean append;
|
||||
} MSNHMsgPutstr, *PMSNHMsgPutstr;
|
||||
|
||||
typedef struct mswin_nhmsg_print_glyph {
|
||||
XCHAR_P x;
|
||||
XCHAR_P y;
|
||||
int glyph;
|
||||
XCHAR_P x;
|
||||
XCHAR_P y;
|
||||
int glyph;
|
||||
} MSNHMsgPrintGlyph, *PMSNHMsgPrintGlyph;
|
||||
|
||||
typedef struct mswin_nhmsg_cliparound {
|
||||
int x;
|
||||
int y;
|
||||
int x;
|
||||
int y;
|
||||
} MSNHMsgClipAround, *PMSNHMsgClipAround;
|
||||
|
||||
typedef struct mswin_nhmsg_add_menu {
|
||||
int glyph;
|
||||
const ANY_P* identifier;
|
||||
CHAR_P accelerator;
|
||||
CHAR_P group_accel;
|
||||
int attr;
|
||||
const char * str;
|
||||
BOOLEAN_P presel;
|
||||
int glyph;
|
||||
const ANY_P *identifier;
|
||||
CHAR_P accelerator;
|
||||
CHAR_P group_accel;
|
||||
int attr;
|
||||
const char *str;
|
||||
BOOLEAN_P presel;
|
||||
} MSNHMsgAddMenu, *PMSNHMsgAddMenu;
|
||||
|
||||
typedef struct mswin_nhmsg_cursor {
|
||||
int x;
|
||||
int y;
|
||||
int x;
|
||||
int y;
|
||||
} MSNHMsgCursor, *PMSNHMsgCursor;
|
||||
|
||||
typedef struct mswin_nhmsg_end_menu {
|
||||
const char* text;
|
||||
const char *text;
|
||||
} MSNHMsgEndMenu, *PMSNHMsgEndMenu;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
HWND mswin_init_message_window ();
|
||||
void mswin_message_window_size (HWND hWnd, LPSIZE sz);
|
||||
|
||||
HWND mswin_init_message_window();
|
||||
void mswin_message_window_size(HWND hWnd, LPSIZE sz);
|
||||
|
||||
#endif /* MSWINMessageWindow_h */
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
HWND mswin_init_RIP_window ();
|
||||
void mswin_display_RIP_window (HWND hwnd);
|
||||
HWND mswin_init_RIP_window();
|
||||
void mswin_display_RIP_window(HWND hwnd);
|
||||
|
||||
#endif /* MSWINRIPWindow_h */
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
HWND mswin_init_status_window ();
|
||||
void mswin_status_window_size (HWND hWnd, LPSIZE sz);
|
||||
HWND mswin_init_status_window();
|
||||
void mswin_status_window_size(HWND hWnd, LPSIZE sz);
|
||||
|
||||
#endif /* MSWINStatusWindow_h */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
|
||||
HWND mswin_init_text_window ();
|
||||
void mswin_display_text_window (HWND hwnd);
|
||||
HWND mswin_init_text_window();
|
||||
void mswin_display_text_window(HWND hwnd);
|
||||
|
||||
#endif /* MSWINTextWindow_h */
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
#include "winMS.h"
|
||||
|
||||
typedef struct mswin_nethack_text_buffer* PNHTextBuffer;
|
||||
typedef struct mswin_nethack_text_buffer *PNHTextBuffer;
|
||||
PNHTextBuffer mswin_init_text_buffer(BOOL wrap_text);
|
||||
void mswin_free_text_buffer(PNHTextBuffer pb);
|
||||
void mswin_add_text(PNHTextBuffer pb, int attr, const char* text);
|
||||
void mswin_add_text(PNHTextBuffer pb, int attr, const char *text);
|
||||
void mswin_set_text_wrap(PNHTextBuffer pb, BOOL wrap_text);
|
||||
BOOL mswin_get_text_wrap(PNHTextBuffer pb);
|
||||
void mswin_render_text(PNHTextBuffer pb, HWND edit_control);
|
||||
|
||||
@@ -2,39 +2,38 @@
|
||||
#define __NEWRES_H__
|
||||
|
||||
#if !defined(UNDER_CE)
|
||||
#define UNDER_CE _WIN32_WCE
|
||||
#define UNDER_CE _WIN32_WCE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
#if !defined(WCEOLE_ENABLE_DIALOGEX)
|
||||
#define DIALOGEX DIALOG DISCARDABLE
|
||||
#endif
|
||||
#include <commctrl.h>
|
||||
#define SHMENUBAR RCDATA
|
||||
#if (defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)) && (_WIN32_WCE >= 300)
|
||||
#include <aygshell.h>
|
||||
#else
|
||||
#define I_IMAGENONE (-2)
|
||||
#define NOMENU 0xFFFF
|
||||
#define IDS_SHNEW 1
|
||||
#if !defined(WCEOLE_ENABLE_DIALOGEX)
|
||||
#define DIALOGEX DIALOG DISCARDABLE
|
||||
#endif
|
||||
#include <commctrl.h>
|
||||
#define SHMENUBAR RCDATA
|
||||
#if (defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)) \
|
||||
&& (_WIN32_WCE >= 300)
|
||||
#include <aygshell.h>
|
||||
#else
|
||||
#define I_IMAGENONE (-2)
|
||||
#define NOMENU 0xFFFF
|
||||
#define IDS_SHNEW 1
|
||||
|
||||
#define IDM_SHAREDNEW 10
|
||||
#define IDM_SHAREDNEWDEFAULT 11
|
||||
#endif
|
||||
#define IDM_SHAREDNEW 10
|
||||
#define IDM_SHAREDNEWDEFAULT 11
|
||||
#endif
|
||||
#endif // _WIN32_WCE
|
||||
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
#ifndef _INC_WINDOWS
|
||||
#define _INC_WINDOWS
|
||||
#include "winuser.h" // extract from windows header
|
||||
#include "winuser.h" // extract from windows header
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef IDC_STATIC
|
||||
#undef IDC_STATIC
|
||||
#endif
|
||||
#define IDC_STATIC (-1)
|
||||
#define IDC_STATIC (-1)
|
||||
|
||||
#endif //__NEWRES_H__
|
||||
|
||||
|
||||
@@ -2,163 +2,163 @@
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by winhcksp.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_WINHACK_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDS_HELLO 106
|
||||
#define IDI_WINHACK 107
|
||||
#define IDC_WINHACK 109
|
||||
#define IDC_SPHONE_DIALOGBAR 111
|
||||
#define IDC_SPHONE_TEXTDIALOGBAR 112
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDB_TILES 129
|
||||
#define IDD_TEXT 130
|
||||
#define IDD_NHTEXT 130
|
||||
#define IDD_MENU 132
|
||||
#define IDB_MENU_SEL 133
|
||||
#define IDB_MENU_UNSEL 134
|
||||
#define IDD_COMMANDS 136
|
||||
#define IDD_GETLIN 138
|
||||
#define IDD_EXTCMD 139
|
||||
#define IDD_PLAYER_SELECTOR 141
|
||||
#define IDB_PETMARK 145
|
||||
#define IDB_MENU_SEL_COUNT 146
|
||||
#define IDB_KEYPAD 147
|
||||
#define IDB_MENUBAR 154
|
||||
#define IDC_TEXT_VIEW 1001
|
||||
#define IDC_CMD_MOVE_NW 1001
|
||||
#define IDC_CMD_MOVE_N 1002
|
||||
#define IDC_MENU_LIST 1003
|
||||
#define IDC_CMD_MOVE_NE 1003
|
||||
#define IDC_MENU_TEXT 1004
|
||||
#define IDC_CMD_MOVE_W 1004
|
||||
#define IDC_CMD_MOVE_SELF 1005
|
||||
#define IDC_CMD_MOVE_E 1006
|
||||
#define IDC_CMD_MOVE_SW 1007
|
||||
#define IDC_CMD_MOVE_S 1008
|
||||
#define IDC_CMD_MOVE_SE 1009
|
||||
#define IDC_CMD_MOVE_UP 1010
|
||||
#define IDC_CMD_MOVE_DOWN 1011
|
||||
#define IDC_CMD_5 1012
|
||||
#define IDC_CMD_A 1013
|
||||
#define IDC_CMD_B 1014
|
||||
#define IDC_CMD_C 1015
|
||||
#define IDC_CMD_D 1016
|
||||
#define IDC_CMD_E 1017
|
||||
#define IDC_CMD_F 1018
|
||||
#define IDC_CMD_G 1019
|
||||
#define IDC_CMD_H 1020
|
||||
#define IDC_CMD_I 1021
|
||||
#define IDC_CMD_J 1022
|
||||
#define IDC_CMD_K 1023
|
||||
#define IDC_CMD_L 1024
|
||||
#define IDC_CMD_M 1025
|
||||
#define IDC_CMD_N 1026
|
||||
#define IDC_CMD_O 1027
|
||||
#define IDC_CMD_P 1028
|
||||
#define IDC_CMD_Q 1029
|
||||
#define IDC_CMD_R 1030
|
||||
#define IDC_CMD_S 1031
|
||||
#define IDC_CMD_T 1032
|
||||
#define IDC_CMD_U 1033
|
||||
#define IDC_CMD_V 1034
|
||||
#define IDC_CMD_W 1035
|
||||
#define IDC_CMD_X 1036
|
||||
#define IDC_CMD_Y 1037
|
||||
#define IDC_CMD_Z 1038
|
||||
#define IDC_CMD_AA 1039
|
||||
#define IDC_CMD_BB 1040
|
||||
#define IDC_CMD_CC 1041
|
||||
#define IDC_CMD_DD 1042
|
||||
#define IDC_CMD_EE 1043
|
||||
#define IDC_CMD_FF 1044
|
||||
#define IDC_CMD_GG 1045
|
||||
#define IDC_CMD_HH 1046
|
||||
#define IDC_CMD_II 1047
|
||||
#define IDC_CMD_JJ 1048
|
||||
#define IDC_CMD_KK 1049
|
||||
#define IDC_CMD_LL 1050
|
||||
#define IDC_CMD_MM 1051
|
||||
#define IDC_CMD_NN 1052
|
||||
#define IDC_CMD_OO 1053
|
||||
#define IDC_CMD_PP 1054
|
||||
#define IDC_CMD_QQ 1055
|
||||
#define IDC_CMD_RR 1056
|
||||
#define IDC_CMD_SS 1057
|
||||
#define IDC_CMD_TT 1058
|
||||
#define IDC_CMD_UU 1059
|
||||
#define IDC_CMD_VV 1060
|
||||
#define IDC_CMD_WW 1061
|
||||
#define IDC_CMD_XX 1062
|
||||
#define IDC_CMD_YY 1063
|
||||
#define IDC_CMD_ZZ 1064
|
||||
#define IDC_CMD_FIRST 1100
|
||||
#define IDC_CMD_LAST 1300
|
||||
#define IDC_GETLIN_EDIT 1309
|
||||
#define IDC_EXTCMD_LIST 1310
|
||||
#define IDC_PLSEL_NAME 1314
|
||||
#define IDC_PLSEL_ROLE_RANDOM 1315
|
||||
#define IDC_PLSEL_RACE_RANDOM 1318
|
||||
#define IDC_PLSEL_GENDER_RANDOM 1319
|
||||
#define IDC_PLSEL_ALIGN_RANDOM 1320
|
||||
#define IDC_PLSEL_ROLE_LIST 1323
|
||||
#define IDC_PLSEL_RACE_LIST 1324
|
||||
#define IDC_PLSEL_ALIGN_LIST 1325
|
||||
#define IDC_PLSEL_GENDER_LIST 1326
|
||||
#define IDC_ABOUT_VERSION 1327
|
||||
#define IDC_TEXT_CONTROL 1331
|
||||
#define IDC_ABOUT_COPYRIGHT 1332
|
||||
#define IDC_TEXT_TOGGLE_WRAP 1333
|
||||
#define IDM_SAVE 32771
|
||||
#define IDM_HELP_LONG 32772
|
||||
#define IDM_HELP_COMMANDS 32773
|
||||
#define IDM_HELP_HISTORY 32774
|
||||
#define IDM_HELP_INFO_CHAR 32775
|
||||
#define IDM_HELP_INFO_KEY 32776
|
||||
#define IDM_HELP_OPTIONS 32777
|
||||
#define IDM_HELP_OPTIONS_LONG 32778
|
||||
#define IDM_HELP_EXTCMD 32779
|
||||
#define IDM_HELP_LICENSE 32780
|
||||
#define IDM_MAP_TILES 32781
|
||||
#define IDM_MAP_ASCII4X6 32782
|
||||
#define IDM_MAP_ASCII6X8 32783
|
||||
#define IDM_MAP_ASCII8X8 32784
|
||||
#define IDM_MAP_ASCII16X8 32785
|
||||
#define IDM_MAP_ASCII7X12 32786
|
||||
#define IDM_MAP_ASCII8X12 32787
|
||||
#define IDM_MAP_ASCII16X12 32788
|
||||
#define IDM_MAP_ASCII12X16 32789
|
||||
#define IDM_MAP_ASCII10X18 32790
|
||||
#define IDM_MAP_FIT_TO_SCREEN 32791
|
||||
#define ID_FILE 32792
|
||||
#define IDS_CAP_FILE 32793
|
||||
#define ID_HELP 32794
|
||||
#define IDS_CAP_HELP 32795
|
||||
#define IDS_CAP_TEMP 32796
|
||||
#define ID_MAP 32797
|
||||
#define IDS_CAP_AMP 32798
|
||||
#define IDS_CAP_MAP 32799
|
||||
#define IDM_VIEW_KEYPAD 32800
|
||||
#define ID_VIEW 32801
|
||||
#define IDS_CAP_VIEW 32802
|
||||
#define IDS_CAP_ENTIREMAP 32826
|
||||
#define IDS_CAP_NORMALMAP 32827
|
||||
#define IDM_HELP_MENU 32828
|
||||
#define IDM_VIEW_OPTIONS 32829
|
||||
#define IDM_DIRECT_COMMAND 32830
|
||||
#define IDS_TEXT_WRAP 32831
|
||||
#define IDS_TEXT_UNWRAP 32832
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_WINHACK_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDS_HELLO 106
|
||||
#define IDI_WINHACK 107
|
||||
#define IDC_WINHACK 109
|
||||
#define IDC_SPHONE_DIALOGBAR 111
|
||||
#define IDC_SPHONE_TEXTDIALOGBAR 112
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDB_TILES 129
|
||||
#define IDD_TEXT 130
|
||||
#define IDD_NHTEXT 130
|
||||
#define IDD_MENU 132
|
||||
#define IDB_MENU_SEL 133
|
||||
#define IDB_MENU_UNSEL 134
|
||||
#define IDD_COMMANDS 136
|
||||
#define IDD_GETLIN 138
|
||||
#define IDD_EXTCMD 139
|
||||
#define IDD_PLAYER_SELECTOR 141
|
||||
#define IDB_PETMARK 145
|
||||
#define IDB_MENU_SEL_COUNT 146
|
||||
#define IDB_KEYPAD 147
|
||||
#define IDB_MENUBAR 154
|
||||
#define IDC_TEXT_VIEW 1001
|
||||
#define IDC_CMD_MOVE_NW 1001
|
||||
#define IDC_CMD_MOVE_N 1002
|
||||
#define IDC_MENU_LIST 1003
|
||||
#define IDC_CMD_MOVE_NE 1003
|
||||
#define IDC_MENU_TEXT 1004
|
||||
#define IDC_CMD_MOVE_W 1004
|
||||
#define IDC_CMD_MOVE_SELF 1005
|
||||
#define IDC_CMD_MOVE_E 1006
|
||||
#define IDC_CMD_MOVE_SW 1007
|
||||
#define IDC_CMD_MOVE_S 1008
|
||||
#define IDC_CMD_MOVE_SE 1009
|
||||
#define IDC_CMD_MOVE_UP 1010
|
||||
#define IDC_CMD_MOVE_DOWN 1011
|
||||
#define IDC_CMD_5 1012
|
||||
#define IDC_CMD_A 1013
|
||||
#define IDC_CMD_B 1014
|
||||
#define IDC_CMD_C 1015
|
||||
#define IDC_CMD_D 1016
|
||||
#define IDC_CMD_E 1017
|
||||
#define IDC_CMD_F 1018
|
||||
#define IDC_CMD_G 1019
|
||||
#define IDC_CMD_H 1020
|
||||
#define IDC_CMD_I 1021
|
||||
#define IDC_CMD_J 1022
|
||||
#define IDC_CMD_K 1023
|
||||
#define IDC_CMD_L 1024
|
||||
#define IDC_CMD_M 1025
|
||||
#define IDC_CMD_N 1026
|
||||
#define IDC_CMD_O 1027
|
||||
#define IDC_CMD_P 1028
|
||||
#define IDC_CMD_Q 1029
|
||||
#define IDC_CMD_R 1030
|
||||
#define IDC_CMD_S 1031
|
||||
#define IDC_CMD_T 1032
|
||||
#define IDC_CMD_U 1033
|
||||
#define IDC_CMD_V 1034
|
||||
#define IDC_CMD_W 1035
|
||||
#define IDC_CMD_X 1036
|
||||
#define IDC_CMD_Y 1037
|
||||
#define IDC_CMD_Z 1038
|
||||
#define IDC_CMD_AA 1039
|
||||
#define IDC_CMD_BB 1040
|
||||
#define IDC_CMD_CC 1041
|
||||
#define IDC_CMD_DD 1042
|
||||
#define IDC_CMD_EE 1043
|
||||
#define IDC_CMD_FF 1044
|
||||
#define IDC_CMD_GG 1045
|
||||
#define IDC_CMD_HH 1046
|
||||
#define IDC_CMD_II 1047
|
||||
#define IDC_CMD_JJ 1048
|
||||
#define IDC_CMD_KK 1049
|
||||
#define IDC_CMD_LL 1050
|
||||
#define IDC_CMD_MM 1051
|
||||
#define IDC_CMD_NN 1052
|
||||
#define IDC_CMD_OO 1053
|
||||
#define IDC_CMD_PP 1054
|
||||
#define IDC_CMD_QQ 1055
|
||||
#define IDC_CMD_RR 1056
|
||||
#define IDC_CMD_SS 1057
|
||||
#define IDC_CMD_TT 1058
|
||||
#define IDC_CMD_UU 1059
|
||||
#define IDC_CMD_VV 1060
|
||||
#define IDC_CMD_WW 1061
|
||||
#define IDC_CMD_XX 1062
|
||||
#define IDC_CMD_YY 1063
|
||||
#define IDC_CMD_ZZ 1064
|
||||
#define IDC_CMD_FIRST 1100
|
||||
#define IDC_CMD_LAST 1300
|
||||
#define IDC_GETLIN_EDIT 1309
|
||||
#define IDC_EXTCMD_LIST 1310
|
||||
#define IDC_PLSEL_NAME 1314
|
||||
#define IDC_PLSEL_ROLE_RANDOM 1315
|
||||
#define IDC_PLSEL_RACE_RANDOM 1318
|
||||
#define IDC_PLSEL_GENDER_RANDOM 1319
|
||||
#define IDC_PLSEL_ALIGN_RANDOM 1320
|
||||
#define IDC_PLSEL_ROLE_LIST 1323
|
||||
#define IDC_PLSEL_RACE_LIST 1324
|
||||
#define IDC_PLSEL_ALIGN_LIST 1325
|
||||
#define IDC_PLSEL_GENDER_LIST 1326
|
||||
#define IDC_ABOUT_VERSION 1327
|
||||
#define IDC_TEXT_CONTROL 1331
|
||||
#define IDC_ABOUT_COPYRIGHT 1332
|
||||
#define IDC_TEXT_TOGGLE_WRAP 1333
|
||||
#define IDM_SAVE 32771
|
||||
#define IDM_HELP_LONG 32772
|
||||
#define IDM_HELP_COMMANDS 32773
|
||||
#define IDM_HELP_HISTORY 32774
|
||||
#define IDM_HELP_INFO_CHAR 32775
|
||||
#define IDM_HELP_INFO_KEY 32776
|
||||
#define IDM_HELP_OPTIONS 32777
|
||||
#define IDM_HELP_OPTIONS_LONG 32778
|
||||
#define IDM_HELP_EXTCMD 32779
|
||||
#define IDM_HELP_LICENSE 32780
|
||||
#define IDM_MAP_TILES 32781
|
||||
#define IDM_MAP_ASCII4X6 32782
|
||||
#define IDM_MAP_ASCII6X8 32783
|
||||
#define IDM_MAP_ASCII8X8 32784
|
||||
#define IDM_MAP_ASCII16X8 32785
|
||||
#define IDM_MAP_ASCII7X12 32786
|
||||
#define IDM_MAP_ASCII8X12 32787
|
||||
#define IDM_MAP_ASCII16X12 32788
|
||||
#define IDM_MAP_ASCII12X16 32789
|
||||
#define IDM_MAP_ASCII10X18 32790
|
||||
#define IDM_MAP_FIT_TO_SCREEN 32791
|
||||
#define ID_FILE 32792
|
||||
#define IDS_CAP_FILE 32793
|
||||
#define ID_HELP 32794
|
||||
#define IDS_CAP_HELP 32795
|
||||
#define IDS_CAP_TEMP 32796
|
||||
#define ID_MAP 32797
|
||||
#define IDS_CAP_AMP 32798
|
||||
#define IDS_CAP_MAP 32799
|
||||
#define IDM_VIEW_KEYPAD 32800
|
||||
#define ID_VIEW 32801
|
||||
#define IDS_CAP_VIEW 32802
|
||||
#define IDS_CAP_ENTIREMAP 32826
|
||||
#define IDS_CAP_NORMALMAP 32827
|
||||
#define IDM_HELP_MENU 32828
|
||||
#define IDM_VIEW_OPTIONS 32829
|
||||
#define IDM_DIRECT_COMMAND 32830
|
||||
#define IDS_TEXT_WRAP 32831
|
||||
#define IDS_TEXT_UNWRAP 32832
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 155
|
||||
#define _APS_NEXT_COMMAND_VALUE 32833
|
||||
#define _APS_NEXT_CONTROL_VALUE 1334
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#define _APS_NEXT_RESOURCE_VALUE 155
|
||||
#define _APS_NEXT_COMMAND_VALUE 32833
|
||||
#define _APS_NEXT_CONTROL_VALUE 1334
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/* NetHack 3.6 win32api.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.6 win32api.h $Date: 2009/05/06 10:53:39 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)win32api.h 3.5 $NHDT-Date$ */
|
||||
/* SCCS Id: @(#)win32api.h 3.5 $Date: 2009/05/06 10:53:39 $ */
|
||||
/* SCCS Id: @(#)win32api.h 3.5 $Date: 2009/05/06 10:53:39 $
|
||||
*/
|
||||
/* Copyright (c) NetHack PC Development Team 1996 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -10,21 +11,21 @@
|
||||
* header files & NetHack before including windows.h, so all NetHack
|
||||
* files should include "win32api.h" rather than <windows.h>.
|
||||
*/
|
||||
# if defined(_MSC_VER)
|
||||
# undef strcmpi
|
||||
# undef min
|
||||
# undef max
|
||||
# pragma warning(disable:4142) /* Warning, Benign redefinition of type */
|
||||
# pragma pack(8)
|
||||
# endif
|
||||
#if defined(_MSC_VER)
|
||||
#undef strcmpi
|
||||
#undef min
|
||||
#undef max
|
||||
#pragma warning(disable : 4142) /* Warning, Benign redefinition of type */
|
||||
#pragma pack(8)
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
# pragma pack()
|
||||
# endif
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
/*win32api.h*/
|
||||
|
||||
Reference in New Issue
Block a user