From 6cf5c60dcc3877854bf1ed5340f3a94751ac3804 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Thu, 13 Feb 2003 05:10:21 +0000 Subject: [PATCH] CE patch (from ) --- Files | 21 +-- include/wceconf.h | 6 + sys/wince/celib.c | 16 ++ sys/wince/cesetup.bat | 1 + sys/wince/cesound.c | 27 +++ sys/wince/hpc.vcp | 380 ++++++++++++++++++++++++++++++++++++++++- sys/wince/mhmenu.c | 102 ++++++----- sys/wince/mhmsgwnd.c | 104 ++++++++--- sys/wince/mswproc.c | 1 + sys/wince/palmpc.vcp | 256 ++++++++++++++++++++++++++- sys/wince/pocketpc.vcp | 318 +++++++++++++++++++++++++++++++++- sys/wince/smartphn.vcp | 128 ++++++++++++++ 12 files changed, 1266 insertions(+), 94 deletions(-) create mode 100644 sys/wince/cesound.c diff --git a/Files b/Files index 4472ce7e0..cf5dc7e86 100644 --- a/Files +++ b/Files @@ -175,16 +175,17 @@ vmsmisc.c vmstty.c vmsunix.c sys/wince: (files for Windows CE and PocketPC) -assert.h bootstrp.mak celib.c cesetup.bat defaults.nh -errno.h fcntl.h hpc.vcp Install.ce keypad.uu -mhaskyn.c mhaskyn.h mhcmd.c mhcmd.h mhcolor.c -mhcolor.h mhdlg.c mhdlg.h mhfont.c mhfont.h -mhinput.c mhinput.h mhmain.c mhmain.h mhmap.c -mhmap.h mhmenu.c mhmenu.h mhmsg.h mhmsgwnd.c -mhmsgwnd.h mhrip.c mhrip.h mhstatus.c mhstatus.h -mhtext.c mhtext.h mswproc.c newres.h palmpc.vcp -pocketpc.vcp resource.h smartphn.vcp stat.h winMS.h -wince.vcw winhack.c winhack.rc winhcksp.rc winmain.c +assert.h bootstrp.mak celib.c cesetup.bat cesound.c +defaults.nh errno.h fcntl.h hpc.vcp Install.ce +keypad.uu mhaskyn.c mhaskyn.h mhcmd.c mhcmd.h +mhcolor.c mhcolor.h mhdlg.c mhdlg.h mhfont.c +mhfont.h mhinput.c mhinput.h mhmain.c mhmain.h +mhmap.c mhmap.h mhmenu.c mhmenu.h mhmsg.h +mhmsgwnd.c mhmsgwnd.h mhrip.c mhrip.h mhstatus.c +mhstatus.h mhtext.c mhtext.h mswproc.c newres.h +palmpc.vcp pocketpc.vcp resource.h smartphn.vcp stat.h +winMS.h wince.vcw winhack.c winhack.rc winhcksp.rc +winmain.c sys/winnt: (files for Windows 9x, NT and Windows2000 version) diff --git a/include/wceconf.h b/include/wceconf.h index 2e14d3f2f..c7b0ec6ec 100644 --- a/include/wceconf.h +++ b/include/wceconf.h @@ -41,6 +41,8 @@ #define NOTSTDC /* no strerror() */ +#define USER_SOUNDS + /* * ----------------------------------------------------------------- * The remaining code shouldn't need modification. @@ -243,6 +245,7 @@ int __cdecl read(int, void *, unsigned int); int __cdecl unlink(const char *); int __cdecl write(int, const void *, unsigned int); int __cdecl rename(const char *, const char *); +int __cdecl access(const char *, int); #ifdef DeleteFile #undef DeleteFile @@ -254,6 +257,9 @@ char *getcwd( char *buffer, int maxlen ); /* __stdlib.h__ */ #define abort() (void)TerminateProcess(GetCurrentProcess(), 0) +#ifndef strdup +#define strdup _strdup +#endif /* sys/stat.h */ #define S_IWRITE GENERIC_WRITE diff --git a/sys/wince/celib.c b/sys/wince/celib.c index 6bf2e97da..22323b09d 100644 --- a/sys/wince/celib.c +++ b/sys/wince/celib.c @@ -311,6 +311,22 @@ int __cdecl rename( const char *oldname, const char *newname ) return !MoveFile(f1, f2); } +int __cdecl access( const char *path, int mode ) +{ + DWORD attr; + WCHAR f[MAX_PATH+1]; + ZeroMemory(f, sizeof(f)); + MultiByteToWideChar(CP_ACP, 0, path, -1, f, MAX_PATH); + + attr = GetFileAttributes(f); + if( attr == (DWORD)-1 ) return -1; + + if ( (attr & FILE_ATTRIBUTE_READONLY) && (mode & 2) ) + return -1; + else + return 0; +} + int chdir( const char *dirname ) { ZeroMemory(_nh_cwd, sizeof(_nh_cwd)); diff --git a/sys/wince/cesetup.bat b/sys/wince/cesetup.bat index 62b74d392..cf144b3a7 100755 --- a/sys/wince/cesetup.bat +++ b/sys/wince/cesetup.bat @@ -69,6 +69,7 @@ copy winhack.rc ..\..\wince\winhack.rc copy winhcksp.rc ..\..\wince\winhack_sp.rc copy winmain.c ..\..\wince\winmain.c copy winMS.h ..\..\wince\winMS.h +copy cesound.c ..\..\wince\cesound.c echo. echo Proceed with the following steps: echo. diff --git a/sys/wince/cesound.c b/sys/wince/cesound.c new file mode 100644 index 000000000..5a856d784 --- /dev/null +++ b/sys/wince/cesound.c @@ -0,0 +1,27 @@ +/* SCCS Id: @(#)cesound.c 3.4 $Date$ */ +/* Copyright (c) NetHack PC Development Team 1993 */ +/* NetHack may be freely redistributed. See license for details. */ +/* */ +/* + * cesound.c - Windows NT NetHack sound support + * + * + */ + +#include "hack.h" +#include + +#ifdef USER_SOUNDS + +void play_usersound(filename, volume) +const char* filename; +int volume; +{ + TCHAR wbuf[MAX_PATH+1]; +/* pline("play_usersound: %s (%d).", filename, volume); */ + ZeroMemory(wbuf, sizeof(wbuf)); + (void)sndPlaySound(NH_A2W(filename, wbuf, MAX_PATH), SND_ASYNC | SND_NODEFAULT); +} + +#endif /*USER_SOUNDS*/ +/* cesound.c */ diff --git a/sys/wince/hpc.vcp b/sys/wince/hpc.vcp index 5e12d3468..03f7ae72d 100644 --- a/sys/wince/hpc.vcp +++ b/sys/wince/hpc.vcp @@ -2992,6 +2992,373 @@ DEP_CPP_BOTL_=\ "..\include\youprop.h"\ +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\cesound.c + +!IF "$(CFG)" == "nethack_hpc - Win32 (WCE MIPS) HPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE x86em) HPCDebug" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE ARM) HPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE SH3) HPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE x86em) HPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE SH4) HPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + !ENDIF # End Source File @@ -5372,7 +5739,7 @@ SOURCE=..\src\do.c !IF "$(CFG)" == "nethack_hpc - Win32 (WCE MIPS) HPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -5433,7 +5800,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE x86em) HPCDebug" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -5494,7 +5861,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE ARM) HPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -5555,7 +5922,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE SH3) HPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -5616,7 +5983,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE x86em) HPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -5677,7 +6044,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_hpc - Win32 (WCE SH4) HPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -47777,3 +48144,4 @@ SOURCE=..\wince\winMS.h # End Group # End Target # End Project + diff --git a/sys/wince/mhmenu.c b/sys/wince/mhmenu.c index 66f1cc051..d2006d2b8 100644 --- a/sys/wince/mhmenu.c +++ b/sys/wince/mhmenu.c @@ -26,6 +26,7 @@ typedef struct mswin_menu_item { BOOLEAN_P presel; int count; BOOL has_focus; + BOOL has_tab; } NHMenuItem, *PNHMenuItem; typedef struct mswin_nethack_menu_window { @@ -562,33 +563,38 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) data->menu.items[new_item].presel = msg_data->presel; /* calculate tabstop size */ - hDC = GetDC(hWnd); - saveFont = SelectObject(hDC, mswin_get_font(NHW_MENU, msg_data->attr, hDC, FALSE)); - p1 = data->menu.items[new_item].str; p = strchr(data->menu.items[new_item].str, '\t'); - column = 0; - for (;;) { - TCHAR wbuf[BUFSZ]; - RECT drawRect; - SetRect ( &drawRect, 0, 0, 1, 1 ); - if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ - DrawText(hDC, - NH_A2W(p1, wbuf, BUFSZ), - strlen(p1), - &drawRect, - DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_EXPANDTABS | DT_SINGLELINE - ); - data->menu.tab_stop_size[column] = - max( data->menu.tab_stop_size[column], drawRect.right - drawRect.left ); - if (p != NULL) *p = '\t'; - else /* last string so, */ break; - - ++column; - p1 = p + 1; - p = strchr(p1, '\t'); + if( p ) { + data->menu.items[new_item].has_tab = TRUE; + hDC = GetDC(hWnd); + saveFont = SelectObject(hDC, mswin_get_font(NHW_MENU, msg_data->attr, hDC, FALSE)); + p1 = data->menu.items[new_item].str; + column = 0; + for (;;) { + TCHAR wbuf[BUFSZ]; + RECT drawRect; + SetRect ( &drawRect, 0, 0, 1, 1 ); + if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ + DrawText(hDC, + NH_A2W(p1, wbuf, BUFSZ), + strlen(p1), + &drawRect, + DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_EXPANDTABS | DT_SINGLELINE + ); + data->menu.tab_stop_size[column] = + max( data->menu.tab_stop_size[column], drawRect.right - drawRect.left ); + if (p != NULL) *p = '\t'; + else /* last string so, */ break; + + ++column; + p1 = p + 1; + p = strchr(p1, '\t'); + } + SelectObject(hDC, saveFont); + ReleaseDC(hWnd, hDC); + } else { + data->menu.items[new_item].has_tab = FALSE; } - SelectObject(hDC, saveFont); - ReleaseDC(hWnd, hDC); /* increment size */ data->menu.size++; @@ -913,31 +919,41 @@ LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) x += TILE_X + 5; /* draw item text */ - p1 = item->str; - p = strchr(item->str, '\t'); - column = 0; - SetRect( &drawRect, x, lpdis->rcItem.top, min(x + data->menu.tab_stop_size[0], lpdis->rcItem.right), - lpdis->rcItem.bottom ); - for (;;) { + if( item->has_tab ) { + p1 = item->str; + p = strchr(item->str, '\t'); + column = 0; + SetRect( &drawRect, x, lpdis->rcItem.top, min(x + data->menu.tab_stop_size[0], lpdis->rcItem.right), + lpdis->rcItem.bottom ); + for (;;) { + TCHAR wbuf[BUFSZ]; + if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ + DrawText(lpdis->hDC, + NH_A2W(p1, wbuf, BUFSZ), + strlen(p1), + &drawRect, + DT_LEFT | DT_VCENTER | DT_SINGLELINE + ); + if (p != NULL) *p = '\t'; + else /* last string so, */ break; + + p1 = p + 1; + p = strchr(p1, '\t'); + drawRect.left = drawRect.right + TAB_SEPARATION; + ++column; + drawRect.right = min (drawRect.left + data->menu.tab_stop_size[column], lpdis->rcItem.right); + } + } else { TCHAR wbuf[BUFSZ]; - if (p != NULL) *p = '\0'; /* for time being, view tab field as zstring */ + SetRect( &drawRect, x, lpdis->rcItem.top, lpdis->rcItem.right, lpdis->rcItem.bottom); DrawText(lpdis->hDC, - NH_A2W(p1, wbuf, BUFSZ), - strlen(p1), + NH_A2W(item->str, wbuf, BUFSZ), + strlen(item->str), &drawRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE ); - if (p != NULL) *p = '\t'; - else /* last string so, */ break; - - p1 = p + 1; - p = strchr(p1, '\t'); - drawRect.left = drawRect.right + TAB_SEPARATION; - ++column; - drawRect.right = min (drawRect.left + data->menu.tab_stop_size[column], lpdis->rcItem.right); } - /* draw focused item */ if( item->has_focus ) { RECT client_rt; diff --git a/sys/wince/mhmsgwnd.c b/sys/wince/mhmsgwnd.c index 2d3946018..482828ff1 100644 --- a/sys/wince/mhmsgwnd.c +++ b/sys/wince/mhmsgwnd.c @@ -4,6 +4,7 @@ #include "winMS.h" #include "mhmsgwnd.h" #include "mhmsg.h" +#include "mhcmd.h" #include "mhfont.h" #include "mhcolor.h" @@ -31,6 +32,8 @@ typedef struct mswin_nethack_message_window { int xMax; /* maximum horizontal scrolling position */ int yMax; /* maximum vertical scrolling position */ int xPage; /* page size of horizontal scroll bar */ + int lines_last_turn; /* lines added during the last turn */ + int dont_care; /* flag the the user does not care if messages are lost */ } NHMessageWindow, *PNHMessageWindow; static TCHAR szMessageWindowClass[] = TEXT("MSNHMessageWndClass"); @@ -43,7 +46,10 @@ static void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam); #endif static void onPaint(HWND hWnd); static void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam); -static HDC prepareDC( HDC hdc ); + +#ifdef USER_SOUNDS +extern void play_sound_for_message(const char* str); +#endif HWND mswin_init_message_window () { static int run_once = 0; @@ -165,14 +171,14 @@ LRESULT CALLBACK NHMessageWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM SetScrollInfo(hWnd, SB_HORZ, &si, TRUE); #endif - data->yMax = MSG_LINES - MSG_VISIBLE_LINES - 1; + data->yMax = MSG_LINES-1; data->yPos = min(data->yPos, data->yMax); ZeroMemory(&si, sizeof(si)); si.cbSize = sizeof(si); si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; - si.nMin = 0; - si.nMax = MSG_LINES; + si.nMin = MSG_VISIBLE_LINES; + si.nMax = data->yMax + MSG_VISIBLE_LINES - 1; si.nPage = MSG_VISIBLE_LINES; si.nPos = data->yPos; SetScrollInfo(hWnd, SB_VERT, &si, TRUE); @@ -226,23 +232,75 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) si.nPos = data->yPos; SetScrollInfo(hWnd, SB_VERT, &si, TRUE); + /* deal with overflows */ + data->lines_last_turn++; + if( !data->dont_care && data->lines_last_turn>=MSG_LINES-2 ) { + char c; + BOOL done; + + /* append "--More--" to the message window text (cannot call putstr + here - infinite recursion) */ + memmove(&data->window_text[0], + &data->window_text[1], + (MSG_LINES-1)*sizeof(data->window_text[0])); + data->window_text[MSG_LINES-1].attr = ATR_NONE; + strncpy(data->window_text[MSG_LINES-1].text, "--More--", MAXWINDOWTEXT); + + /* update window content */ + InvalidateRect(hWnd, NULL, TRUE); + +#if defined(WIN_CE_SMARTPHONE) + NHSPhoneSetKeypadFromString( "\033- <>" ); +#endif + + done = FALSE; + while( !done ) { + int x, y, mod; + c = mswin_nh_poskey(&x, &y, &mod); + switch (c) { + /* ESC indicates that we can safely discard any further messages during this turn */ + case '\033': + data->dont_care = 1; + done = TRUE; + break; + + case '<': + SendMessage(hWnd, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), (LPARAM)NULL); + break; + + case '>': + SendMessage(hWnd, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), (LPARAM)NULL); + break; + + /* continue scrolling on any key */ + default: + data->lines_last_turn = 0; + done = TRUE; + break; + } + } + +#if defined(WIN_CE_SMARTPHONE) + NHSPhoneSetKeypadDefault(); +#endif + /* remove "--More--" from the message window text */ + data->window_text[MSG_LINES-1].attr = ATR_NONE; + strncpy(data->window_text[MSG_LINES-1].text, " ", MAXWINDOWTEXT); + } + /* update window content */ InvalidateRect(hWnd, NULL, TRUE); + +#ifdef USER_SOUNDS + play_sound_for_message(msg_data->text); +#endif } break; case MSNH_MSG_CLEAR_WINDOW: - { - MSNHMsgPutstr data; - - /* append an empty line to the message window (send message to itself) */ - data.attr = ATR_NONE; - data.text = " "; - onMSNHCommand(hWnd, (WPARAM)MSNH_MSG_PUTSTR, (LPARAM)&data); - - InvalidateRect(hWnd, NULL, TRUE); - break; - } + data->lines_last_turn = 0; + data->dont_care = 0; + break; } } @@ -302,7 +360,8 @@ void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam) // of the scroll box, and update the window. UpdateWindow // sends the WM_PAINT message. - if (yInc = max(-data->yPos, min(yInc, data->yMax - data->yPos))) + if (yInc = max( MSG_VISIBLE_LINES - data->yPos, + min(yInc, data->yMax - data->yPos))) { data->yPos += yInc; /* ScrollWindowEx(hWnd, 0, -data->yChar * yInc, @@ -419,8 +478,8 @@ void onPaint(HWND hWnd) GetClientRect(hWnd, &client_rt); if( !IsRectEmpty(&ps.rcPaint) ) { - FirstLine = max (0, data->yPos + ps.rcPaint.top/data->yChar - 1); - LastLine = min (MSG_LINES-1, data->yPos + ps.rcPaint.bottom/data->yChar); + FirstLine = max (0, data->yPos - (client_rt.bottom - ps.rcPaint.top)/data->yChar + 1); + LastLine = min (MSG_LINES-1, data->yPos - (client_rt.bottom - ps.rcPaint.bottom)/data->yChar); y = min( ps.rcPaint.bottom, client_rt.bottom - 2); for (i=LastLine; i>=FirstLine; i--) { if( i==MSG_LINES-1 ) { @@ -495,7 +554,7 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) SetWindowLong(hWnd, GWL_USERDATA, (LONG)data); /* Get the handle to the client area's device context. */ - hdc = prepareDC( GetDC(hWnd) ); + hdc = GetDC(hWnd); saveFont = SelectObject(hdc, mswin_get_font(NHW_MESSAGE, ATR_NONE, hdc, FALSE)); /* Extract font dimensions from the text metrics. */ @@ -510,13 +569,6 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) ReleaseDC (hWnd, hdc); } -HDC prepareDC( HDC hdc ) -{ - // set font here - return hdc; -} - - void mswin_message_window_size (HWND hWnd, LPSIZE sz) { PNHMessageWindow data; diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index affafe8e5..9316ec8cc 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -1313,6 +1313,7 @@ doprev_message() int mswin_doprev_message() { logDebug("mswin_doprev_message()\n"); + SendMessage(mswin_hwnd_from_winid(WIN_MESSAGE), WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), (LPARAM)NULL); return 0; } diff --git a/sys/wince/palmpc.vcp b/sys/wince/palmpc.vcp index 5b955b446..8d9dc8eb8 100644 --- a/sys/wince/palmpc.vcp +++ b/sys/wince/palmpc.vcp @@ -2021,6 +2021,253 @@ DEP_CPP_BOTL_=\ "..\include\youprop.h"\ +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\cesound.c + +!IF "$(CFG)" == "nethack_palm_pc - Win32 (WCE MIPS) PalmPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_palm_pc - Win32 (WCE x86em) PalmPCDebug" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_palm_pc - Win32 (WCE SH3) PalmPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_palm_pc - Win32 (WCE x86em) PalmPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + !ENDIF # End Source File @@ -3627,7 +3874,7 @@ SOURCE=..\src\do.c !IF "$(CFG)" == "nethack_palm_pc - Win32 (WCE MIPS) PalmPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -3688,7 +3935,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_palm_pc - Win32 (WCE x86em) PalmPCDebug" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -3749,7 +3996,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_palm_pc - Win32 (WCE SH3) PalmPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -3810,7 +4057,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_palm_pc - Win32 (WCE x86em) PalmPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -32329,3 +32576,4 @@ SOURCE=..\wince\winMS.h # End Group # End Target # End Project + diff --git a/sys/wince/pocketpc.vcp b/sys/wince/pocketpc.vcp index a5f489832..cc23c88c0 100644 --- a/sys/wince/pocketpc.vcp +++ b/sys/wince/pocketpc.vcp @@ -2503,6 +2503,313 @@ DEP_CPP_BOTL_=\ "..\include\youprop.h"\ +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\cesound.c + +!IF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE MIPS) PocketPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE ARM) PocketPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE x86em) PocketPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE x86em) PocketPCDebug" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE SH3) PocketPCRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + !ENDIF # End Source File @@ -4496,7 +4803,7 @@ SOURCE=..\src\do.c !IF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE MIPS) PocketPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -4557,7 +4864,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE ARM) PocketPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -4618,7 +4925,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE x86em) PocketPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -4679,7 +4986,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE x86em) PocketPCDebug" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -4740,7 +5047,7 @@ DEP_CPP_DO_C1e=\ !ELSEIF "$(CFG)" == "nethack_pocketp_pc - Win32 (WCE SH3) PocketPCRelease" -DEP_CPP_DO_C1e=\ +DEP_CPP_DO_C20=\ "..\include\align.h"\ "..\include\amiconf.h"\ "..\include\attrib.h"\ @@ -39881,3 +40188,4 @@ SOURCE=..\wince\winMS.h # End Group # End Target # End Project + diff --git a/sys/wince/smartphn.vcp b/sys/wince/smartphn.vcp index c119c9546..ad0c1a072 100644 --- a/sys/wince/smartphn.vcp +++ b/sys/wince/smartphn.vcp @@ -1057,6 +1057,133 @@ DEP_CPP_BOTL_=\ "..\include\youprop.h"\ +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\cesound.c + +!IF "$(CFG)" == "nethack_smartphone - Win32 (WCE ARM) SPhoneRelease" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + +!ELSEIF "$(CFG)" == "nethack_smartphone - Win32 (WCE x86) SPhoneDebug" + +DEP_CPP_CESOU=\ + "..\include\align.h"\ + "..\include\amiconf.h"\ + "..\include\attrib.h"\ + "..\include\beconf.h"\ + "..\include\color.h"\ + "..\include\config.h"\ + "..\include\config1.h"\ + "..\include\coord.h"\ + "..\include\decl.h"\ + "..\include\display.h"\ + "..\include\dungeon.h"\ + "..\include\engrave.h"\ + "..\include\extern.h"\ + "..\include\flag.h"\ + "..\include\global.h"\ + "..\include\hack.h"\ + "..\include\macconf.h"\ + "..\include\micro.h"\ + "..\include\mkroom.h"\ + "..\include\monattk.h"\ + "..\include\mondata.h"\ + "..\include\monflag.h"\ + "..\include\monst.h"\ + "..\include\monsym.h"\ + "..\include\nhlan.h"\ + "..\include\ntconf.h"\ + "..\include\obj.h"\ + "..\include\objclass.h"\ + "..\include\onames.h"\ + "..\include\os2conf.h"\ + "..\include\pcconf.h"\ + "..\include\permonst.h"\ + "..\include\pm.h"\ + "..\include\prop.h"\ + "..\include\quest.h"\ + "..\include\rect.h"\ + "..\include\region.h"\ + "..\include\rm.h"\ + "..\include\skills.h"\ + "..\include\spell.h"\ + "..\include\system.h"\ + "..\include\timeout.h"\ + "..\include\tosconf.h"\ + "..\include\tradstdc.h"\ + "..\include\trampoli.h"\ + "..\include\trap.h"\ + "..\include\unixconf.h"\ + "..\include\vision.h"\ + "..\include\vmsconf.h"\ + "..\include\wceconf.h"\ + "..\include\winprocs.h"\ + "..\include\wintty.h"\ + "..\include\wintype.h"\ + "..\include\you.h"\ + "..\include\youprop.h"\ + + !ENDIF # End Source File @@ -16996,3 +17123,4 @@ SOURCE=..\wince\winMS.h # End Group # End Target # End Project + -- 2.40.0