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