Changes to existing files by the win32 port additions.
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN_CE
|
||||
#define PREFIX "\\nethack\\dat\\"
|
||||
#endif
|
||||
|
||||
#ifndef MPWTOOL
|
||||
# define SpinCursor(x)
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,13 @@ int FDECL(open_levelfile, (int));
|
||||
int NDECL(create_savefile);
|
||||
void FDECL(copy_bytes, (int,int));
|
||||
|
||||
#ifndef WIN_CE
|
||||
#define Fprintf (void)fprintf
|
||||
#else
|
||||
#define Fprintf (void)nhce_message
|
||||
static void nhce_message(FILE*, const char*, ...);
|
||||
#endif
|
||||
|
||||
#define Close (void)close
|
||||
|
||||
#ifdef UNIX
|
||||
@@ -340,11 +346,19 @@ char *str;
|
||||
if (!str) return (char *)0;
|
||||
bsize = EXEPATHBUFSZ;
|
||||
tmp = exepathbuf;
|
||||
# ifndef WIN32
|
||||
#if !defined(WIN32)
|
||||
strcpy (tmp, str);
|
||||
#else
|
||||
# if defined(WIN_CE)
|
||||
{
|
||||
TCHAR wbuf[EXEPATHBUFSZ];
|
||||
GetModuleFileName((HANDLE)0, wbuf, EXEPATHBUFSZ);
|
||||
NH_W2A(wbuf, tmp, bsize);
|
||||
}
|
||||
# else
|
||||
*(tmp + GetModuleFileName((HANDLE)0, tmp, bsize)) = '\0';
|
||||
# endif
|
||||
#endif
|
||||
tmp2 = strrchr(tmp, PATH_SEPARATOR);
|
||||
if (tmp2) *tmp2 = '\0';
|
||||
return tmp;
|
||||
@@ -356,4 +370,19 @@ char *str;
|
||||
const char amiga_version_string[] = AMIGA_VERSION_STRING;
|
||||
#endif
|
||||
|
||||
#ifdef WIN_CE
|
||||
void nhce_message(FILE* f, const char* str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
TCHAR wbuf[NHSTR_BUFSIZE];
|
||||
char buf[NHSTR_BUFSIZE];
|
||||
|
||||
va_start(ap, str);
|
||||
vsprintf(buf, str, ap);
|
||||
va_end(ap);
|
||||
|
||||
MessageBox(NULL, NH_A2W(buf, wbuf, NHSTR_BUFSIZE), TEXT("Recover"), MB_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*recover.c*/
|
||||
|
||||
Reference in New Issue
Block a user