Amiga: make INTUI_NEW_LOOK unconditional
OS 2.0+ Intuition is required; the pre-2.0 fallback paths are unreachable.
This commit is contained in:
+1
-9
@@ -59,16 +59,8 @@ struct amii_WinDesc {
|
||||
char *morestr; /* string to display instead of default */
|
||||
/* amiga stuff */
|
||||
struct Window *win; /* Intuition window pointer */
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct ExtNewWindow *newwin; /* NewWindow alloc'd */
|
||||
#else
|
||||
struct NewWindow *newwin; /* ExtNewWindow alloc'd */
|
||||
#endif
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct ExtNewWindow *newwin; /* NewWindow alloc'd */
|
||||
struct TagItem wintags[MAXWINTAGS]; /* Tag items for this window */
|
||||
#else
|
||||
long wintags[MAXWINTAGS * 2];
|
||||
#endif
|
||||
void *hook; /* Hook structure pointer for tiles version */
|
||||
#define FLMAP_INGLYPH 1 /* An NHW_MAP window is in glyph mode */
|
||||
#define FLMAP_CURSUP 2 /* An NHW_MAP window has the cursor displayed */
|
||||
|
||||
+1
-4
@@ -630,7 +630,6 @@ amii_cleanup(void)
|
||||
* be visitors, so check close status and wait till everyone is gone.
|
||||
*/
|
||||
if (HackScreen) {
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
if (MenuStrip)
|
||||
FreeMenus(MenuStrip);
|
||||
@@ -643,9 +642,7 @@ amii_cleanup(void)
|
||||
};
|
||||
EasyRequest(NULL, &easy, NULL, NULL);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
CloseScreen(HackScreen);
|
||||
}
|
||||
HackScreen = NULL;
|
||||
|
||||
@@ -271,11 +271,9 @@ DoMenuScroll(int win, int blocking, int how, menu_item **retmip)
|
||||
topidx = 0;
|
||||
|
||||
if (w == NULL) {
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
PropScroll.Flags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
nw = (void *) DupNewWindow((void *) (&new_wins[cw->type].newwin));
|
||||
if (!alwaysinvent || win != WIN_INVEN) {
|
||||
xsize = scrn->WBorLeft + scrn->WBorRight + MenuScroll.Width + 1
|
||||
@@ -1415,11 +1413,9 @@ SetPropInfo(struct Window *win, struct Gadget *gad, long vis, long total, long t
|
||||
pot = 0;
|
||||
|
||||
mflags = AUTOKNOB | FREEVERT;
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
mflags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NewModifyProp(gad, win, NULL, mflags, 0, pot, MAXBODY, body, 1);
|
||||
}
|
||||
|
||||
+2
-64
@@ -207,14 +207,12 @@ int wincnt = 0; /* # of nh windows opened */
|
||||
* while they are playing... like compiling...
|
||||
*/
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
extern struct Hook fillhook;
|
||||
struct TagItem tags[] = {
|
||||
{ WA_BackFill, (ULONG) &fillhook },
|
||||
{ WA_PubScreenName, (ULONG) "NetHack" },
|
||||
{ TAG_DONE, 0 },
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The default dimensions and status values for each window type. The
|
||||
@@ -230,16 +228,10 @@ struct win_setup new_wins[] = {
|
||||
{ { 0, 1, 640, 11, 0xff, 0xff,
|
||||
NEWSIZE | GADGETUP | GADGETDOWN | MOUSEMOVE | MOUSEBUTTONS | RAWKEY,
|
||||
BORDERLESS | ACTIVATE | SMART_REFRESH
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
NULL, NULL, (UBYTE *) "Messages", NULL, NULL, 320, 40, 0xffff, 0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -251,16 +243,10 @@ struct win_setup new_wins[] = {
|
||||
/* NHW_STATUS */
|
||||
{ { 0, 181, 640, 24, 0xff, 0xff, RAWKEY | MENUPICK | DISKINSERTED,
|
||||
BORDERLESS | ACTIVATE | SMART_REFRESH | BACKDROP
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
NULL, NULL, (UBYTE *) "Game Status", NULL, NULL, 0, 0, 0xffff, 0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -273,17 +259,11 @@ struct win_setup new_wins[] = {
|
||||
{ { 0, 0, WIDTH, WINDOWHEIGHT, 0xff, 0xff,
|
||||
RAWKEY | MENUPICK | MOUSEBUTTONS | ACTIVEWINDOW | MOUSEMOVE,
|
||||
BORDERLESS | ACTIVATE | SMART_REFRESH | BACKDROP
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
NULL, NULL, (UBYTE *) "Dungeon Map", NULL, NULL, 64, 64, 0xffff,
|
||||
0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -298,16 +278,10 @@ struct win_setup new_wins[] = {
|
||||
| GADGETDOWN | CLOSEWINDOW | VANILLAKEY | NEWSIZE
|
||||
| INACTIVEWINDOW,
|
||||
WINDOWSIZING | WINDOWCLOSE | WINDOWDRAG | ACTIVATE | SMART_REFRESH
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
&MenuScroll, NULL, NULL, NULL, NULL, 64, 32, 0xffff, 0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -321,17 +295,11 @@ struct win_setup new_wins[] = {
|
||||
RAWKEY | MENUPICK | DISKINSERTED | MOUSEMOVE | GADGETUP | CLOSEWINDOW
|
||||
| VANILLAKEY | NEWSIZE,
|
||||
WINDOWSIZING | WINDOWCLOSE | WINDOWDRAG | ACTIVATE | SMART_REFRESH
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
&MenuScroll, NULL, (UBYTE *) NULL, NULL, NULL, 100, 32, 0xffff,
|
||||
0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -349,16 +317,10 @@ struct win_setup new_wins[] = {
|
||||
{ { 0, 0, WIDTH, WINDOWHEIGHT, 0xff, 0xff,
|
||||
RAWKEY | MENUPICK | MOUSEBUTTONS,
|
||||
BORDERLESS | ACTIVATE | SMART_REFRESH | BACKDROP
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
NULL, NULL, (UBYTE *) NULL, NULL, NULL, -1, -1, 0xffff, 0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -370,16 +332,10 @@ struct win_setup new_wins[] = {
|
||||
/* NHW_OVER */
|
||||
{ { 320, 20, 319, 179, 0xff, 0xff, RAWKEY | MENUPICK | MOUSEBUTTONS,
|
||||
BORDERLESS | ACTIVATE | SMART_REFRESH | BACKDROP
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| WFLG_NW_EXTENDED
|
||||
#endif
|
||||
,
|
||||
NULL, NULL, (UBYTE *) NULL, NULL, NULL, 64, 32, 0xffff, 0xffff,
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
PUBLICSCREEN, tags
|
||||
#else
|
||||
CUSTOMSCREEN
|
||||
#endif
|
||||
},
|
||||
0,
|
||||
0,
|
||||
@@ -394,7 +350,6 @@ const char winpanicstr[] = "Bad winid %d in %s()";
|
||||
/* The opened windows information */
|
||||
struct amii_WinDesc *amii_wins[MAXWIN + 1];
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
/*
|
||||
* NUMDRIPENS varies based on headers, so don't use it
|
||||
* here, its value is used elsewhere.
|
||||
@@ -413,23 +368,14 @@ struct TagItem scrntags[] = {
|
||||
{ TAG_DONE, 0 },
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct NewScreen NewHackScreen = { 0, 0, WIDTH, SCREENHEIGHT, 3, 0,
|
||||
1, /* DetailPen, BlockPen */
|
||||
HIRES, CUSTOMSCREEN
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
| NS_EXTENDED
|
||||
#endif
|
||||
,
|
||||
HIRES, CUSTOMSCREEN | NS_EXTENDED,
|
||||
&Hack80, /* Font */
|
||||
NULL, /*(UBYTE *)" NetHack X.Y.Z" */
|
||||
NULL, /* Gadgets */
|
||||
NULL, /* CustomBitmap */
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
scrntags
|
||||
#endif
|
||||
};
|
||||
scrntags };
|
||||
|
||||
/*
|
||||
* plname is filled either by an option (-u Player or -uPlayer) or
|
||||
@@ -507,13 +453,11 @@ amii_player_selection(void)
|
||||
|
||||
if( WINVERS_AMIV )
|
||||
{
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
Type_NewWindowStructure1.Extension = wintags;
|
||||
Type_NewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
|
||||
fillhook.h_Entry = (void *) &LayerFillHook;
|
||||
fillhook.h_Data = (void *)-2;
|
||||
fillhook.h_SubEntry = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
Type_NewWindowStructure1.Screen = HackScreen;
|
||||
@@ -679,13 +623,11 @@ allocerr:
|
||||
|
||||
if( WINVERS_AMIV )
|
||||
{
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
Rnd_NewWindowStructure1.Extension = wintags;
|
||||
Rnd_NewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
|
||||
fillhook.h_Entry = (void *) &LayerFillHook;
|
||||
fillhook.h_Data = (void *)-2;
|
||||
fillhook.h_SubEntry = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
Rnd_NewWindowStructure1.Screen = HackScreen;
|
||||
@@ -1200,11 +1142,8 @@ SetBorder(struct Gadget *gd)
|
||||
int borders = 6;
|
||||
int hipen = sysflags.amii_dripens[SHINEPEN],
|
||||
shadowpen = sysflags.amii_dripens[SHADOWPEN];
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct DrawInfo *dip;
|
||||
#endif
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
if ((dip = GetScreenDrawInfo(HackScreen)) != 0) {
|
||||
hipen = dip->dri_Pens[SHINEPEN];
|
||||
@@ -1212,7 +1151,6 @@ SetBorder(struct Gadget *gd)
|
||||
FreeScreenDrawInfo(HackScreen, dip);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Allocate two border structures one for up image and one for down
|
||||
* image, plus vector arrays for the border lines.
|
||||
*/
|
||||
|
||||
+1
-11
@@ -21,12 +21,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef IDCMP_CLOSEWINDOW
|
||||
#ifndef INTUI_NEW_LOOK
|
||||
#define INTUI_NEW_LOOK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HACK_H
|
||||
#include "hack.h"
|
||||
#endif
|
||||
@@ -63,9 +57,7 @@ CLIPPING must be defined for the AMIGA version
|
||||
#include "NH:sys/amiga/lib/libmacs.h"
|
||||
#endif
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
#include <utility/tagitem.h>
|
||||
#endif
|
||||
|
||||
#define WINVERS_AMII (strcmp("amii", windowprocs.name) == 0)
|
||||
#define WINVERS_AMIV (strcmp("amiv", windowprocs.name) == 0)
|
||||
@@ -109,11 +101,9 @@ CLIPPING must be defined for the AMIGA version
|
||||
#define MAPFTHEIGHT 8
|
||||
#define MAPFTBASELN 6
|
||||
|
||||
/* If Compiling with the "New Look", redefine these now */
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
/* Use the OS 2.0+ "new look" Intuition structs unconditionally. */
|
||||
#define NewWindow ExtNewWindow
|
||||
#define NewScreen ExtNewScreen
|
||||
#endif
|
||||
|
||||
#define SIZEOF_DISKNAME 8
|
||||
|
||||
|
||||
@@ -143,7 +143,6 @@ ami_wininit_data(int dir)
|
||||
sizeof(sysflags.amii_dripens));
|
||||
}
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct Hook SM_FilterHook;
|
||||
struct Hook fillhook;
|
||||
struct TagItem wintags[] = {
|
||||
@@ -151,7 +150,6 @@ struct TagItem wintags[] = {
|
||||
{ WA_PubScreenName, (ULONG) "NetHack" },
|
||||
{ TAG_END, 0 },
|
||||
};
|
||||
#endif
|
||||
|
||||
void
|
||||
amii_destroy_nhwindow(winid win) /* just hide */
|
||||
@@ -244,7 +242,6 @@ amii_destroy_nhwindow(winid win) /* just hide */
|
||||
WIN_INVEN = WIN_ERR;
|
||||
}
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct FillParams {
|
||||
struct Layer *layer;
|
||||
struct Rectangle bounds;
|
||||
@@ -323,7 +320,6 @@ LayerFillHook_impl(struct Hook *hk, struct RastPort *rp,
|
||||
SetDrMd(&rptmp, JAM2);
|
||||
RectFill(&rptmp, x, y, xmax, ymax);
|
||||
}
|
||||
#endif
|
||||
|
||||
winid
|
||||
amii_create_nhwindow(int type)
|
||||
@@ -508,12 +504,10 @@ amii_create_nhwindow(int type)
|
||||
if (nw->Height + stath + maph < HackScreen->Height - nw->TopEdge)
|
||||
nw->Height = HackScreen->Height - nw->TopEdge - 1 - maph - stath;
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
MsgPropScroll.Flags |= PROPNEWLOOK;
|
||||
PropScroll.Flags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
nw->IDCMPFlags |= MENUPICK;
|
||||
@@ -980,7 +974,6 @@ amii_init_nhwindows(int *argcp, char **argv)
|
||||
/* Use Intuition sizes for overscan screens... */
|
||||
|
||||
amiIDisplay->xpix = 0;
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
if (wbscr = LockPubScreen("Workbench")) {
|
||||
amiIDisplay->xpix = wbscr->Width;
|
||||
@@ -988,7 +981,6 @@ amii_init_nhwindows(int *argcp, char **argv)
|
||||
UnlockPubScreen(NULL, wbscr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (amiIDisplay->xpix == 0) {
|
||||
amiIDisplay->ypix = GfxBase->NormalDisplayRows;
|
||||
amiIDisplay->xpix = GfxBase->NormalDisplayColumns;
|
||||
@@ -1118,7 +1110,6 @@ amii_init_nhwindows(int *argcp, char **argv)
|
||||
NewHackScreen.BlockPen = C_BLACK;
|
||||
NewHackScreen.DetailPen = C_WHITE;
|
||||
#endif
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
int i;
|
||||
struct DimensionInfo dims;
|
||||
@@ -1137,11 +1128,7 @@ amii_init_nhwindows(int *argcp, char **argv)
|
||||
|
||||
if (amii_scrnmode == 0xffffffff) {
|
||||
struct ScreenModeRequester *SMR;
|
||||
#ifdef __GNUC__
|
||||
SM_FilterHook.h_Entry = (void *) &SM_Filter;
|
||||
#else
|
||||
SM_FilterHook.h_Entry = (ULONG (*) ()) SM_Filter;
|
||||
#endif
|
||||
SM_FilterHook.h_Data = 0;
|
||||
SM_FilterHook.h_SubEntry = 0;
|
||||
SMR = AllocAslRequest(ASL_ScreenModeRequest, NULL);
|
||||
@@ -1231,7 +1218,6 @@ amii_init_nhwindows(int *argcp, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (WINVERS_AMIV) {
|
||||
extern char *tilefile;
|
||||
@@ -1278,10 +1264,8 @@ amii_init_nhwindows(int *argcp, char **argv)
|
||||
else
|
||||
bigscreen = 0;
|
||||
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37)
|
||||
PubScreenStatus(HackScreen, 0);
|
||||
#endif
|
||||
|
||||
amiIDisplay->ypix = HackScreen->Height;
|
||||
amiIDisplay->xpix = HackScreen->Width;
|
||||
|
||||
+4
-27
@@ -117,21 +117,17 @@ EditColor(void)
|
||||
svcolors[i] = colors[i] = GetRGB4(scrn->ViewPort.ColorMap, i);
|
||||
|
||||
Col_NewWindowStructure1.Screen = scrn;
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
((struct PropInfo *) Col_BluePen.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
((struct PropInfo *) Col_RedPen.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
((struct PropInfo *) Col_GreenPen.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
if (WINVERS_AMIV || WINVERS_AMII) {
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
Col_NewWindowStructure1.Extension = wintags;
|
||||
Col_NewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
|
||||
fillhook.h_Entry = (void *) &LayerFillHook;
|
||||
fillhook.h_Data = (void *) -2;
|
||||
fillhook.h_SubEntry = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
nw = OpenWindow((void *) &Col_NewWindowStructure1);
|
||||
@@ -372,22 +368,18 @@ EditClipping(void)
|
||||
once = 1;
|
||||
}
|
||||
ClipNewWindowStructure1.Screen = scrn;
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
((struct PropInfo *) ClipXSIZE.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
((struct PropInfo *) ClipYSIZE.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
((struct PropInfo *) ClipXCLIP.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
((struct PropInfo *) ClipYCLIP.SpecialInfo)->Flags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
if (WINVERS_AMIV || WINVERS_AMII) {
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
ClipNewWindowStructure1.Extension = wintags;
|
||||
ClipNewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
|
||||
fillhook.h_Entry = (void *) &LayerFillHook;
|
||||
fillhook.h_Data = (void *) -2;
|
||||
fillhook.h_SubEntry = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
nw = OpenWindow((void *) &ClipNewWindowStructure1);
|
||||
@@ -399,11 +391,9 @@ EditClipping(void)
|
||||
|
||||
ShowClipValues(nw);
|
||||
mflags = AUTOKNOB | FREEHORIZ;
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
mflags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 7; ++i) {
|
||||
if (mxsize <= sizes[i])
|
||||
@@ -582,12 +572,9 @@ filecopy(char *from, char *to)
|
||||
if (buf) {
|
||||
sprintf(buf, "c:copy \"%s\" \"%s\" clone", from, to);
|
||||
|
||||
/* Check SysBase instead? Shouldn't matter */
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37)
|
||||
i = System(buf, NULL);
|
||||
else
|
||||
#endif
|
||||
Execute(buf, NULL, NULL);
|
||||
free(buf);
|
||||
} else {
|
||||
@@ -716,11 +703,9 @@ DrawCol(struct Window *w, int idx, UWORD *colors)
|
||||
b = colors[idx] & 0x00f;
|
||||
|
||||
mflags = AUTOKNOB | FREEHORIZ;
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
if (IntuitionBase->LibNode.lib_Version >= 37) {
|
||||
mflags |= PROPNEWLOOK;
|
||||
}
|
||||
#endif
|
||||
NewModifyProp(&Col_RedPen, w, NULL, mflags, (r * MAXPOT) / 15, 0,
|
||||
MAXPOT / 15, 0, 1);
|
||||
NewModifyProp(&Col_GreenPen, w, NULL, mflags, (g * MAXPOT) / 15, 0,
|
||||
@@ -759,7 +744,6 @@ DispCol(struct Window *w, int idx, UWORD *colors)
|
||||
void
|
||||
amii_setpens(int count)
|
||||
{
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
struct EasyStruct ea = { sizeof(struct EasyStruct), 0l, "NetHack Request",
|
||||
"Number of pens requested(%ld) not correct",
|
||||
"Use default pens|Use requested pens" };
|
||||
@@ -768,12 +752,9 @@ amii_setpens(int count)
|
||||
"Number of pens requested(%ld) not\ncompatible "
|
||||
"with game configuration(%ld)",
|
||||
"Use default pens|Use requested pens" };
|
||||
#endif
|
||||
/* If the pens in amii_curmap are
|
||||
* more pens than in amii_numcolors, then we choose to ignore
|
||||
* those pens.
|
||||
*/
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
|
||||
/* If the pens in amii_curmap are more than in amii_numcolors, ignore
|
||||
* the extras. */
|
||||
if (IntuitionBase && IntuitionBase->LibNode.lib_Version >= 39) {
|
||||
if (count != amii_numcolors) {
|
||||
long args[2];
|
||||
@@ -791,9 +772,7 @@ amii_setpens(int count)
|
||||
amii_numcolors * sizeof(amii_initmap[0]));
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
if (count != amii_numcolors) {
|
||||
} else if (count != amii_numcolors) {
|
||||
memcpy(sysflags.amii_curmap, amii_initmap,
|
||||
amii_numcolors * sizeof(amii_initmap[0]));
|
||||
}
|
||||
@@ -849,13 +828,11 @@ getlind(const char *prompt, char *bufp, const char *dflt)
|
||||
}
|
||||
|
||||
if (WINVERS_AMIV || WINVERS_AMII) {
|
||||
#ifdef INTUI_NEW_LOOK
|
||||
StrWindow.Extension = wintags;
|
||||
StrWindow.Flags |= WFLG_NW_EXTENDED;
|
||||
fillhook.h_Entry = (void *) &LayerFillHook;
|
||||
fillhook.h_Data = (void *) -2;
|
||||
fillhook.h_SubEntry = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((cwin = OpenWindow((void *) &StrWindow)) == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user