Modify the window interface for print_glyph

Changes to be committed:
	modified:   doc/window.doc
	modified:   include/qt_win.h
	modified:   include/trampoli.h
	modified:   include/winX.h
	modified:   include/wingem.h
	modified:   include/winprocs.h
	modified:   include/wintty.h
	modified:   src/display.c
	modified:   src/windows.c
	modified:   sys/amiga/winami.p
	modified:   sys/amiga/winfuncs.c
	modified:   sys/amiga/winproto.h
	modified:   sys/wince/mswproc.c
	modified:   sys/wince/winMS.h
	modified:   win/Qt/qt_win.cpp
	modified:   win/X11/winmap.c
	modified:   win/chain/wc_chainin.c
	modified:   win/chain/wc_chainout.c
	modified:   win/chain/wc_trace.c
	modified:   win/gem/wingem.c
	modified:   win/gem/wingem1.c
	modified:   win/gnome/gnbind.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mswproc.c
	modified:   win/win32/winMS.h

print_glyph now takes a second parameter.

Tiles on tiled ports always looked odd on places like the plane of air
where the background color of the tile didn't match the general background
of the surrounding area.

3.6 made that even worse and more glaringly noticeable with the introduction
of darkened room tiles.

The code to actually send something useful through the new parameter
for window ports to take advantage if they want will follow.
This commit is contained in:
nhmall
2015-06-08 19:37:26 -04:00
parent 9070d129de
commit c3a77914a9
25 changed files with 84 additions and 73 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winami.p $NHDT-Date: 1432512795 2015/05/25 00:13:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $ */
/* NetHack 3.6 winami.p $NHDT-Date: 1433806595 2015/06/08 23:36:35 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */
/* NetHack may be freely redistributed. See license for details. */
/* winami.c */
@@ -35,7 +35,7 @@ int NDECL(amii_doprev_message );
void FDECL(amii_display_nhwindow, (winid , boolean ));
void FDECL(amii_display_file, (const char * , boolean ));
void FDECL(amii_curs, (winid , int , int ));
void FDECL(amii_print_glyph, (winid , xchar , xchar , int ));
void FDECL(amii_print_glyph, (winid , xchar , xchar , int, int ));
void FDECL(DoMenuScroll, (int , int ));
void FDECL(DisplayData, (int , int , int ));
void FDECL(SetPropInfo, (struct Window * , struct Gadget * , long , long , long ));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winfuncs.c $NHDT-Date: 1432512796 2015/05/25 00:13:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.14 $ */
/* NetHack 3.6 winfuncs.c $NHDT-Date: 1433806596 2015/06/08 23:36:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996.
*/
/* NetHack may be freely redistributed. See license for details. */
@@ -1936,10 +1936,10 @@ port_help()
*/
void
amii_print_glyph(win, x, y, glyph)
amii_print_glyph(win, x, y, glyph, bkglyph)
winid win;
xchar x, y;
int glyph;
int glyph, bkglyph;
{
struct amii_WinDesc *cw;
uchar ch;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winproto.h $NHDT-Date: 1432512795 2015/05/25 00:13:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.6 winproto.h $NHDT-Date: 1433806597 2015/06/08 23:36:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */
/* NetHack may be freely redistributed. See license for details. */
@@ -65,7 +65,7 @@ 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 amiga_print_glyph(winid window, int color_index, int glyph, int bkglyph);
void start_glyphout(winid window);
void amii_end_glyphout(winid window);
struct NewWindow *DupNewWindow(struct NewWindow *win);
@@ -101,7 +101,7 @@ 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_print_glyph(winid win, xchar x, xchar y, int glyph, int bkglyph);
void amii_raw_print(const char *s);
void amii_raw_print_bold(const char *s);
void amii_update_inventory(void);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mswproc.c $NHDT-Date: 1432512801 2015/05/25 00:13:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.59 $ */
/* NetHack 3.6 mswproc.c $NHDT-Date: 1433806606 2015/06/08 23:36:46 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
@@ -1205,16 +1205,16 @@ mswin_cliparound(int x, int y)
}
/*
print_glyph(window, x, y, glyph)
print_glyph(window, x, y, glyph, bkglyph)
-- Print the glyph at (x,y) on the given window. Glyphs are
integers at the interface, mapped to whatever the window-
port wants (symbol, font, color, attributes, ...there's
a 1-1 map between glyphs and distinct things on the map).
*/
void
mswin_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph)
mswin_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, int bkglyph)
{
logDebug("mswin_print_glyph(%d, %d, %d, %d)\n", wid, x, y, glyph);
logDebug("mswin_print_glyph(%d, %d, %d, %d, %d)\n", wid, x, y, glyph, bkglyph);
if ((wid >= 0) && (wid < MAXWINDOWS)
&& (GetNHApp()->windowlist[wid].win != NULL)) {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winMS.h $NHDT-Date: 1432512798 2015/05/25 00:13:18 $ $NHDT-Branch: master $:$NHDT-Revision: 1.28 $ */
/* NetHack 3.6 winMS.h $NHDT-Date: 1433806609 2015/06/08 23:36:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.29 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
@@ -138,7 +138,7 @@ 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, int bkglyph);
void mswin_raw_print(const char *str);
void mswin_raw_print_bold(const char *str);
int mswin_nhgetch(void);