try to add pilemark support
Changes to be committed: modified: Files modified: sys/winnt/Makefile.msc modified: win/win32/mhmap.c new file: win/win32/pilemark.uu modified: win/win32/resource.h modified: win/win32/winMS.h modified: win/win32/winhack.rc
This commit is contained in:
4
Files
4
Files
@@ -269,8 +269,8 @@ mhmap.c mhmap.h mhmenu.c mhmenu.h mhmsg.h
|
||||
mhmsgwnd.c mhmsgwnd.h mhrip.c mhrip.h mhsplash.c
|
||||
mhsplash.h mhstatus.c mhstatus.h mhtext.c mhtext.h
|
||||
mnsel.uu mnselcnt.uu mnunsel.uu mswproc.c
|
||||
petmark.uu resource.h rip.uu splash.uu tiles.mak
|
||||
winMS.h winhack.c winhack.rc
|
||||
petmark.uu pilemark.uu resource.h rip.uu splash.uu
|
||||
tiles.mak winMS.h winhack.c winhack.rc
|
||||
(files for Visual Studio 2010 Express Edition builds)
|
||||
dgncomp.vcxproj dgnstuff.vcxproj dgnstuff.mak dlb_main.vcxproj levcomp.vcxproj
|
||||
levstuff.vcxproj levstuff.mak makedefs.vcxproj NetHack.sln uudecode.vcxproj
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.6 Makefile.msc $NHDT-Date: 1434138153 2015/06/12 19:42:33 $ $NHDT-Branch: master $:$NHDT-Revision: 1.93 $ */
|
||||
# NetHack 3.6 Makefile.msc $NHDT-Date: 1434321147 2015/06/14 22:32:27 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.94 $ */
|
||||
# Copyright (c) NetHack PC Development Team 1993-2015
|
||||
#
|
||||
#==============================================================================
|
||||
@@ -602,7 +602,7 @@ tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
|
||||
|
||||
$(O)winhack.res: $(TILEBMP16) $(MSWIN)\winhack.rc $(MSWIN)\mnsel.bmp \
|
||||
$(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \
|
||||
$(MSWIN)\petmark.bmp $(MSWIN)\NetHack.ico $(MSWIN)\rip.bmp \
|
||||
$(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico $(MSWIN)\rip.bmp \
|
||||
$(MSWIN)\splash.bmp
|
||||
@$(rc) -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\winhack.rc
|
||||
|
||||
@@ -855,6 +855,11 @@ $(MSWIN)\petmark.bmp: $(U)uudecode.exe $(MSWIN)\petmark.uu
|
||||
..\..\util\uudecode.exe petmark.uu
|
||||
chdir ..\..\src
|
||||
|
||||
$(MSWIN)\pilemark.bmp: $(U)uudecode.exe $(MSWIN)\pilemark.uu
|
||||
chdir $(MSWIN)
|
||||
..\..\util\uudecode.exe pilemark.uu
|
||||
chdir ..\..\src
|
||||
|
||||
$(MSWIN)\rip.bmp: $(U)uudecode.exe $(MSWIN)\rip.uu
|
||||
chdir $(MSWIN)
|
||||
..\..\util\uudecode.exe rip.uu
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mhmap.c $NHDT-Date: 1432512811 2015/05/25 00:13:31 $ $NHDT-Branch: master $:$NHDT-Revision: 1.48 $ */
|
||||
/* NetHack 3.6 mhmap.c $NHDT-Date: 1434321129 2015/06/14 22:32:09 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.53 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -712,7 +712,11 @@ onPaint(HWND hWnd)
|
||||
int glyph, bkglyph;
|
||||
RECT glyph_rect;
|
||||
int layer;
|
||||
|
||||
#ifndef IGNORE_MJA
|
||||
int color;
|
||||
unsigned special;
|
||||
int mgch;
|
||||
#endif
|
||||
/* prepare tiles DC for mapping */
|
||||
tileDC = CreateCompatibleDC(hDC);
|
||||
saveBmp = SelectObject(tileDC, GetNHApp()->bmpMapTiles);
|
||||
@@ -759,7 +763,14 @@ onPaint(HWND hWnd)
|
||||
layer ++;
|
||||
}
|
||||
|
||||
#ifndef IGNORE_NHMALL
|
||||
/* rely on NetHack core helper routine */
|
||||
(void) mapglyph(data->map[i][j], &mgch, &color,
|
||||
&special, i, j);
|
||||
if ((glyph != NO_GLYPH) && (special & MG_PET)
|
||||
#else
|
||||
if ((glyph != NO_GLYPH) && glyph_is_pet(glyph)
|
||||
#endif
|
||||
&& iflags.wc_hilite_pet) {
|
||||
/* apply pet mark transparently over
|
||||
pet image */
|
||||
@@ -778,6 +789,25 @@ onPaint(HWND hWnd)
|
||||
SelectObject(hdcPetMark, bmPetMarkOld);
|
||||
DeleteDC(hdcPetMark);
|
||||
}
|
||||
#ifndef IGNORE_NHMALL
|
||||
if ((glyph != NO_GLYPH) && (special & MG_OBJPILE)) {
|
||||
/* apply pilemark transparently over other image */
|
||||
HDC hdcPileMark;
|
||||
HBITMAP bmPileMarkOld;
|
||||
|
||||
/* this is DC for pilemark bitmap */
|
||||
hdcPileMark = CreateCompatibleDC(hDC);
|
||||
bmPileMarkOld = SelectObject(
|
||||
hdcPileMark, GetNHApp()->bmpPileMark);
|
||||
|
||||
(*GetNHApp()->lpfnTransparentBlt)(
|
||||
hDC, glyph_rect.left, glyph_rect.top,
|
||||
data->xScrTile, data->yScrTile, hdcPileMark, 0,
|
||||
0, TILE_X, TILE_Y, TILE_BK_COLOR);
|
||||
SelectObject(hdcPileMark, bmPileMarkOld);
|
||||
DeleteDC(hdcPileMark);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
SelectObject(tileDC, saveBmp);
|
||||
|
||||
9
win/win32/pilemark.uu
Normal file
9
win/win32/pilemark.uu
Normal file
@@ -0,0 +1,9 @@
|
||||
begin 600 c:\personal\nhdev\tools\uuencode
|
||||
M0DWV`````````'8````H````$````!`````!``0``````(`````3"P``$PL`
|
||||
M`!`````0````;&Q'````_P```````("``(````"``(``@(```,#`P`#`W,``
|
||||
M\,JF``0$!``("`@`#`P,`!$1$0`6%A8`'!P<````````````````````````
|
||||
M````````````````````````````````````````````````````````````
|
||||
M````````````````````````````````````$``````````0````````$1$0
|
||||
5````````$``````````0````````
|
||||
`
|
||||
end
|
||||
@@ -29,6 +29,7 @@
|
||||
#define IDB_SPLASH 146
|
||||
#define IDB_RIP 147
|
||||
#define IDD_SPLASH 148
|
||||
#define IDB_PILEMARK 149
|
||||
#define IDC_TEXT_VIEW 1000
|
||||
#define IDC_TEXT_CONTROL 1000
|
||||
#define IDC_CMD_MOVE_NW 1001
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 winMS.h $NHDT-Date: 1433806621 2015/06/08 23:37:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */
|
||||
/* NetHack 3.6 winMS.h $NHDT-Date: 1434321135 2015/06/14 22:32:15 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.39 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -71,6 +71,9 @@ typedef struct mswin_nhwindow_app {
|
||||
|
||||
HBITMAP bmpTiles;
|
||||
HBITMAP bmpPetMark;
|
||||
#ifndef IGNORE_NHMALL
|
||||
HBITMAP bmpPileMark;
|
||||
#endif
|
||||
HBITMAP bmpMapTiles; /* custom tiles bitmap */
|
||||
HBITMAP bmpRip;
|
||||
HBITMAP bmpSplash;
|
||||
|
||||
@@ -255,6 +255,7 @@ IDB_TILES BITMAP DISCARDABLE "tiles.bmp"
|
||||
IDB_MENU_SEL BITMAP DISCARDABLE "mnsel.bmp"
|
||||
IDB_MENU_UNSEL BITMAP DISCARDABLE "mnunsel.bmp"
|
||||
IDB_PETMARK BITMAP DISCARDABLE "petmark.bmp"
|
||||
IDB_PILEMARK BITMAP DISCARDABLE "pilemark.bmp"
|
||||
IDB_MENU_SEL_COUNT BITMAP DISCARDABLE "mnselcnt.bmp"
|
||||
IDB_RIP BITMAP DISCARDABLE "rip.bmp"
|
||||
IDB_SPLASH BITMAP DISCARDABLE "splash.bmp"
|
||||
|
||||
Reference in New Issue
Block a user