Amiga: drop OPT_DISPMAP / display_map / fast_map machinery

display_map() was never integrated; no .c defines it.  All OPT_DISPMAP /
DISPMAP / sysflags.fast_map conditionals were unreachable.
This commit is contained in:
Ingo Paschke
2026-05-11 20:43:08 +02:00
parent 7b559f4d02
commit 94a74b84d8
6 changed files with 5 additions and 104 deletions
-4
View File
@@ -154,7 +154,6 @@ extern char *gets(char *);
#define MAIL /* Get mail at unexpected occasions */ #define MAIL /* Get mail at unexpected occasions */
#define DEFAULT_ICON "NetHack:default.icon" /* private icon */ #define DEFAULT_ICON "NetHack:default.icon" /* private icon */
#define AMIFLUSH /* toss typeahead (select flush in .cnf) */ #define AMIFLUSH /* toss typeahead (select flush in .cnf) */
/* #define OPT_DISPMAP /* enable fast_map option */
/* new window system options */ /* new window system options */
/* WRONG - AMIGA_INTUITION should go away */ /* WRONG - AMIGA_INTUITION should go away */
@@ -201,9 +200,6 @@ struct ami_sysflags {
unsigned short amii_dripens[20]; /* DrawInfo Pens currently there are 13 in v39 */ unsigned short amii_dripens[20]; /* DrawInfo Pens currently there are 13 in v39 */
AMII_COLOR_TYPE amii_curmap[AMII_MAXCOLORS]; /* colormap */ AMII_COLOR_TYPE amii_curmap[AMII_MAXCOLORS]; /* colormap */
#endif #endif
#ifdef OPT_DISPMAP
boolean fast_map; /* use optimized, less flexible map display */
#endif
#ifdef MFLOPPY #ifdef MFLOPPY
boolean asksavedisk; boolean asksavedisk;
#endif #endif
-3
View File
@@ -328,9 +328,6 @@ ConvertKey(struct IntuiMessage *message)
got = 0; got = 0;
break; break;
} }
#ifdef OPT_DISPMAP
dispmap_sanity();
#endif
if (got) { if (got) {
CO = (w->Width - w->BorderLeft - w->BorderRight) / mxsize; CO = (w->Width - w->BorderLeft - w->BorderRight) / mxsize;
+1 -75
View File
@@ -27,10 +27,6 @@
#include "winproto.h" #include "winproto.h"
#endif #endif
#ifdef OPT_DISPMAP
#define DISPMAP /* use display_map() from dispmap.s */
#endif
/* NH:sys/amiga/winvchar.c */ /* NH:sys/amiga/winvchar.c */
int main(int, char **); int main(int, char **);
struct BitMap *MyAllocBitMap(int, int, int, long); struct BitMap *MyAllocBitMap(int, int, int, long);
@@ -54,10 +50,6 @@ extern int reclip;
struct BitMap *MyAllocBitMap(int xsize, int ysize, int depth, long mflags); struct BitMap *MyAllocBitMap(int xsize, int ysize, int depth, long mflags);
void MyFreeBitMap(struct BitMap *bmp); void MyFreeBitMap(struct BitMap *bmp);
#ifdef DISPMAP
extern void display_map(struct Window *);
#endif
#ifdef TILES_IN_GLYPHMAP #ifdef TILES_IN_GLYPHMAP
extern int maxmontile, maxobjtile, maxothtile; /* from tile.c */ extern int maxmontile, maxobjtile, maxothtile; /* from tile.c */
#define MAXMONTILE maxmontile #define MAXMONTILE maxmontile
@@ -280,7 +272,6 @@ flush_glyph_buffer(struct Window *vw)
void void
amiv_flush_glyph_buffer(struct Window *vw) amiv_flush_glyph_buffer(struct Window *vw)
{ {
#if !defined(DISPMAP) || defined(OPT_DISPMAP)
int xsize, ysize, x, y; int xsize, ysize, x, y;
struct BitScaleArgs bsa; struct BitScaleArgs bsa;
struct BitScaleArgs bsm; struct BitScaleArgs bsm;
@@ -290,7 +281,6 @@ amiv_flush_glyph_buffer(struct Window *vw)
int i, k; int i, k;
int scaling_needed; int scaling_needed;
struct RastPort *rp = vw->RPort; struct RastPort *rp = vw->RPort;
#endif
/* If nothing is buffered, return before we do anything */ /* If nothing is buffered, return before we do anything */
if (glyph_node_index == 0) if (glyph_node_index == 0)
@@ -299,20 +289,8 @@ amiv_flush_glyph_buffer(struct Window *vw)
cursor_off(WIN_MAP); cursor_off(WIN_MAP);
amiv_start_glyphout(WIN_MAP); amiv_start_glyphout(WIN_MAP);
#ifdef OPT_DISPMAP
if (sysflags.fast_map) {
#endif
#ifdef DISPMAP
display_map(vw);
#endif
#ifdef OPT_DISPMAP
} else {
#endif
#if !defined(DISPMAP) || defined(OPT_DISPMAP)
/* XXX fix indent */
/* This is a dynamic value based on this relationship. */ /* This is a dynamic value based on this relationship. */
scaling_needed = scaling_needed = (pictdata.xsize != mxsize || pictdata.ysize != mysize);
(pictdata.xsize != mxsize || pictdata.ysize != mysize);
/* If overview window is up, set up to render the correct scale there /* If overview window is up, set up to render the correct scale there
*/ */
@@ -441,10 +419,6 @@ amiv_flush_glyph_buffer(struct Window *vw)
MyFreeBitMap(imgbm); MyFreeBitMap(imgbm);
if (bm) if (bm)
MyFreeBitMap(bm); MyFreeBitMap(bm);
#endif /* DISPMAP */
#ifdef OPT_DISPMAP
}
#endif
amii_end_glyphout(WIN_MAP); amii_end_glyphout(WIN_MAP);
@@ -520,27 +494,8 @@ amiv_lprint_glyph(winid window, int color_index, int glyph)
amiv_g_nodes[glyph_node_index].dsty = amiv_g_nodes[glyph_node_index].dsty =
min(w->BorderTop + (cury * mysize), w->Height - 1); min(w->BorderTop + (cury * mysize), w->Height - 1);
#ifdef OPT_DISPMAP
if (sysflags.fast_map) {
#endif /* keni */
#ifdef DISPMAP
/* display_map() needs byte-aligned destinations, and we don't
* want to
* overwrite the window border.
*/
amiv_g_nodes[glyph_node_index].dstx =
(w->BorderLeft + 8 + (curx * mxsize)) & -8;
#endif
#ifdef OPT_DISPMAP
} else {
#endif
#if !defined(DISPMAP) || defined(OPT_DISPMAP)
amiv_g_nodes[glyph_node_index].dstx = amiv_g_nodes[glyph_node_index].dstx =
min(w->BorderLeft + (curx * mxsize), w->Width - 1); min(w->BorderLeft + (curx * mxsize), w->Width - 1);
#endif
#ifdef OPT_DISPMAP
}
#endif
amiv_g_nodes[glyph_node_index].odsty = cw->cury; amiv_g_nodes[glyph_node_index].odsty = cw->cury;
amiv_g_nodes[glyph_node_index].odstx = cw->curx; amiv_g_nodes[glyph_node_index].odstx = cw->curx;
amiv_g_nodes[glyph_node_index].srcx = xoff; amiv_g_nodes[glyph_node_index].srcx = xoff;
@@ -552,17 +507,6 @@ amiv_lprint_glyph(winid window, int color_index, int glyph)
int j, k, x, y, apen; int j, k, x, y, apen;
struct RastPort *rp = w->RPort; struct RastPort *rp = w->RPort;
x = rp->cp_x - pictdata.xsize - 3; x = rp->cp_x - pictdata.xsize - 3;
#ifdef OPT_DISPMAP
if (sysflags.fast_map) {
#endif
#ifdef DISPMAP
x &= -8;
if (x == 0)
x = 8;
#endif
#ifdef OPT_DISPMAP
}
#endif
y = rp->cp_y - pictdata.ysize + 1; y = rp->cp_y - pictdata.ysize + 1;
@@ -915,21 +859,3 @@ amii_start_glyphout(winid window)
} }
#endif #endif
#ifdef OPT_DISPMAP
/* don't use dispmap unless x & y are 8,16,24,32,48 and equal */
void
dispmap_sanity(void)
{
if (mxsize != mysize || dispmap_sanity1(mxsize)
|| dispmap_sanity1(mysize)) {
sysflags.fast_map = 0;
}
}
int
dispmap_sanity1(int x)
{
static unsigned char valid[] = { 8, 16, 24, 32, 48, 0 };
return !strchr((char *)valid, x);
}
#endif /* OPT_DISPMAP */
-8
View File
@@ -136,9 +136,6 @@ ami_wininit_data(int dir)
memcpy(amii_initmap, amiv_init_map, sizeof(amii_initmap)); memcpy(amii_initmap, amiv_init_map, sizeof(amii_initmap));
} }
#ifdef OPT_DISPMAP
dispmap_sanity();
#endif
memcpy(sysflags.amii_dripens, amii_defpens, memcpy(sysflags.amii_dripens, amii_defpens,
sizeof(sysflags.amii_dripens)); sizeof(sysflags.amii_dripens));
} }
@@ -1886,11 +1883,6 @@ cursor_on(winid window)
/* Save the current information */ /* Save the current information */
#ifdef DISPMAP
if (WINVERS_AMIV && cw->type == NHW_MAP && !Is_rogue_level(&u.uz))
x = cw->cursx = (rp->cp_x & -8) + 8;
else
#endif
x = cw->cursx = rp->cp_x; x = cw->cursx = rp->cp_x;
y = cw->cursy = rp->cp_y; y = cw->cursy = rp->cp_y;
apen = rp->FgPen; apen = rp->FgPen;
-4
View File
@@ -129,7 +129,3 @@ void amii_outrip(winid tmpwin, int how, time_t when);
/* winchar.c */ /* winchar.c */
void SetMazeType(MazeType); void SetMazeType(MazeType);
int GlyphToIcon(int glyph); int GlyphToIcon(int glyph);
#ifdef OPT_DISPMAP
void dispmap_sanity(void);
int dispmap_sanity1(int);
#endif
-6
View File
@@ -460,9 +460,6 @@ EditClipping(void)
yclipbord = aidx + 2; yclipbord = aidx + 2;
} }
ShowClipValues(nw); ShowClipValues(nw);
#ifdef OPT_DISPMAP
dispmap_sanity();
#endif
} else if (gd->GadgetID == GADOKAY) { } else if (gd->GadgetID == GADOKAY) {
done = 1; done = 1;
okay = 1; okay = 1;
@@ -508,9 +505,6 @@ EditClipping(void)
SetBPen(nw->RPort, amii_otherBPen); SetBPen(nw->RPort, amii_otherBPen);
SetDrMd(nw->RPort, JAM2); SetDrMd(nw->RPort, JAM2);
Text(nw->RPort, buf, strlen(buf)); Text(nw->RPort, buf, strlen(buf));
#ifdef OPT_DISPMAP
dispmap_sanity();
#endif
break; break;
} }
} }