Changes to existing files by the win32 port additions.

This commit is contained in:
nethack.allison
2002-01-13 05:53:39 +00:00
parent 963e5e69bf
commit e02ab47597
13 changed files with 441 additions and 50 deletions

View File

@@ -99,8 +99,10 @@ static int lockptr;
#define Delay(a) msleep(a)
# endif
#define Close close
#ifndef WIN_CE
#define DeleteFile unlink
#endif
#endif
#ifdef USER_SOUNDS
extern int FDECL(add_sound_mapping, (const char* mapping));

View File

@@ -34,7 +34,13 @@ STATIC_DCL struct mkroom *FDECL(pos_to_room, (XCHAR_P, XCHAR_P));
STATIC_DCL boolean FDECL(place_niche,(struct mkroom *,int*,int*,int*));
STATIC_DCL void FDECL(makeniche,(int));
STATIC_DCL void NDECL(make_niches);
#ifdef WIN_CE
static int __cdecl do_comp(const void *vx, const void *vy);
#else
STATIC_PTR int FDECL(do_comp,(const genericptr,const genericptr));
#endif
STATIC_DCL void FDECL(dosdoor,(XCHAR_P,XCHAR_P,struct mkroom *,int));
STATIC_DCL void FDECL(join,(int,int,BOOLEAN_P));
STATIC_DCL void FDECL(do_room_or_subroom, (struct mkroom *,int,int,int,int,
@@ -53,10 +59,14 @@ static boolean made_branch; /* used only during level creation */
/* Args must be (const genericptr) so that qsort will always be happy. */
#ifdef WIN_CE
static int __cdecl do_comp(const void *vx, const void *vy)
#else
STATIC_PTR int
do_comp(vx,vy)
const genericptr vx;
const genericptr vy;
#endif
{
#ifdef LINT
/* lint complains about possible pointer alignment problems, but we know
@@ -108,7 +118,11 @@ sort_rooms()
#if defined(SYSV) || defined(DGUX)
qsort((genericptr_t) rooms, (unsigned)nroom, sizeof(struct mkroom), do_comp);
#else
# if defined(WIN_CE)
qsort((genericptr_t) rooms, (unsigned)nroom, sizeof(struct mkroom), (int (__cdecl*)(const void *, const void *))do_comp);
# else
qsort((genericptr_t) rooms, nroom, sizeof(struct mkroom), do_comp);
# endif
#endif
}

View File

@@ -8,7 +8,7 @@ STATIC_DCL void FDECL(center, (int, char *));
extern const char *killed_by_prefix[];
#if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(GEM_GRAPHICS)
#if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(GEM_GRAPHICS) || defined(MSWIN_GRAPHICS)
# define TEXT_TOMBSTONE
#endif
#if defined(mac) || defined(__BEOS__) || defined(WIN32_GRAPHICS)

View File

@@ -37,6 +37,10 @@ extern struct window_procs win32_procs;
#include "winGnome.h"
extern struct window_procs Gnome_procs;
#endif
#ifdef MSWIN_GRAPHICS
#include "winMS.h"
extern struct window_procs mswin_procs;
#endif
STATIC_DCL void FDECL(def_raw_print, (const char *s));
@@ -74,6 +78,9 @@ struct win_choices {
#endif
#ifdef GNOME_GRAPHICS
{ &Gnome_procs, 0 },
#endif
#ifdef MSWIN_GRAPHICS
{ &mswin_procs, 0 },
#endif
{ 0, 0 } /* must be last */
};