home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
games
/
volume16
/
nethack31
/
patch2m
/
patches02l
Wrap
Text File
|
1993-06-16
|
55KB
|
2,312 lines
*** /tmp/da11840 Tue Jun 1 17:00:36 1993
--- sys/amiga/amiwind.c Tue Jun 1 12:12:53 1993
***************
*** 3,70 ****
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993 */
/* NetHack may be freely redistributed. See license for details. */
! /*
! * Here is some very Amiga specific stuff, dealing with
! * screens, windows, menus, and input via IntuiMessages.
! */
- #include "hack.h"
- #include "winami.h"
-
/* Have to undef CLOSE as display.h and intuition.h both use it */
#undef CLOSE
! #include <exec/types.h>
! #include <exec/alerts.h>
! #include <exec/io.h>
! #include <exec/devices.h>
! #include <devices/console.h>
! #include <devices/conunit.h>
! #include <intuition/intuition.h>
! #include <intuition/intuitionbase.h>
! #include <libraries/dosextens.h>
! #ifdef __SASC
! # undef COUNT
!
! # include <dos.h> /* for __emit */
! # include <string.h>
! # include <proto/dos.h>
! # include <proto/exec.h>
!
! /* kludge - see amirip for why */
! # undef red
! # undef green
! # undef blue
! # undef index
! # include <proto/graphics.h>
!
! # include <proto/intuition.h>
! # include <proto/diskfont.h>
! # include <proto/console.h>
#endif
- #undef NULL
- #define NULL 0L
-
#include "Amiga:amimenu.c"
- /* First, external declarations... */
-
- struct Library *ConsoleDevice;
-
- #ifdef AZTEC_50
- # include <functions.h>
- #endif
-
- #ifdef INTUI_NEW_LOOK
- #define NewWindow ExtNewWindow
- #endif
-
- #include "Amiga:winami.p"
- #include "Amiga:amiwind.p"
- #include "Amiga:amidos.p"
-
static int BufferGetchar(void);
static void ProcessMessage( register struct IntuiMessage *message );
--- 3,23 ----
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993 */
/* NetHack may be freely redistributed. See license for details. */
! #include "amiga:windefs.h"
! #include "amiga:winext.h"
! #include "amiga:winproto.h"
/* Have to undef CLOSE as display.h and intuition.h both use it */
#undef CLOSE
! #ifdef AMII_GRAPHICS /* too early in the file? too late? */
! #ifndef SHAREDLIB
! struct Library *ConsoleDevice;
#endif
#include "Amiga:amimenu.c"
static int BufferGetchar(void);
static void ProcessMessage( register struct IntuiMessage *message );
***************
*** 75,85 ****
--- 28,42 ----
/* Now our own variables */
struct IntuitionBase *IntuitionBase;
+ #ifndef SHAREDLIB
struct Screen *HackScreen;
+ #endif
struct Window *pr_WindowPtr;
struct MsgPort *HackPort;
struct IOStdReq ConsoleIO;
+ #ifndef SHAREDLIB
char Initialized = 0;
+ #endif
WEVENT lastevent;
#ifdef HACKFONT
***************
*** 87,98 ****
struct Library *DiskfontBase;
#endif
extern struct Library *ConsoleDevice;
- #define CSI '\x9b'
- #define NO_CHAR -1
- #define RAWHELP 0x5F /* Rawkey code of the HELP key */
-
#define KBDBUFFER 10
static unsigned char KbdBuffer[KBDBUFFER];
unsigned char KbdBuffered;
--- 44,53 ----
struct Library *DiskfontBase;
#endif
+ #ifndef SHAREDLIB
extern struct Library *ConsoleDevice;
+ #endif
#define KBDBUFFER 10
static unsigned char KbdBuffer[KBDBUFFER];
unsigned char KbdBuffered;
***************
*** 122,134 ****
--- 77,118 ----
* See amiwind.c for the amiga specific colormap.
*/
+ #ifdef VIEWWINDOW
+ int foreg[16] = { 8, 7, 4, 2, 6, 5, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
+ int backg[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 4, 1, 6, 5, 3, 1 };
+ #else
int foreg[16] = { 0, 7, 4, 2, 6, 5, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
int backg[16] = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 7, 4, 1, 6, 5, 3, 1 };
#endif
+ #if 0
+ #define BLACK 0
+ #define RED 1
+ #define GREEN 2
+ #define BROWN 3 /* on IBM, low-intensity yellow is brown */
+ #define BLUE 4
+ #define MAGENTA 5
+ #define CYAN 6
+ #define GRAY 7 /* low-intensity white */
+ #define NO_COLOR 8
+ #define ORANGE_COLORED 9 /* "orange" conflicts with the object */
+ #define BRIGHT_GREEN 10
+ #define YELLOW 11
+ #define BRIGHT_BLUE 12
+ #define BRIGHT_MAGENTA 13
+ #define BRIGHT_CYAN 14
+ #define WHITE 15
+ #define MAXCOLORS 16
+ #endif
+ #endif
#ifdef HACKFONT
+ struct TextFont *TextsFont;
struct TextFont *HackFont;
+ #ifdef VIEWWINDOW
+ struct TextFont *HackFont4;
+ struct TextFont *HackFont16;
+ #endif
UBYTE FontName[] = "NetHack:hack.font";
/* # chars in "NetHack:": */
#define SIZEOF_DISKNAME 8
***************
*** 141,149 ****
#else
(UBYTE *) "topaz.font",
#endif
! TOPAZ_EIGHTY, FS_NORMAL, FPF_DISKFONT | FPF_ROMFONT
};
/*
* Open a window that shares the HackPort IDCMP. Use CloseShWindow()
* to close.
--- 125,168 ----
#else
(UBYTE *) "topaz.font",
#endif
! 8, FS_NORMAL, FPF_DISKFONT | FPF_DESIGNED
! | FPF_ROMFONT
};
+ #ifdef VIEWWINDOW
+ struct TextAttr Hack40 = {
+ #ifdef HACKFONT
+ &FontName[SIZEOF_DISKNAME],
+ #else
+ (UBYTE *) "topaz.font",
+ #endif
+ 4, FS_NORMAL, FPF_DISKFONT | FPF_DESIGNED
+ #ifndef HACKFONT
+ | FPF_ROMFONT
+ #endif
+ };
+
+ struct TextAttr Hack160 = {
+ #ifdef HACKFONT
+ &FontName[SIZEOF_DISKNAME],
+ #else
+ (UBYTE *) "topaz.font",
+ #endif
+ 16, FS_NORMAL, FPF_DISKFONT | FPF_DESIGNED
+ #ifndef HACKFONT
+ | FPF_ROMFONT
+ #endif
+ };
+ #endif
+
+ struct TextAttr TextsFont13 = {
+ (UBYTE *) "courier.font",
+ 13, FS_NORMAL, FPF_DISKFONT | FPF_DESIGNED
+ #ifndef HACKFONT
+ | FPF_ROMFONT
+ #endif
+ };
+
/*
* Open a window that shares the HackPort IDCMP. Use CloseShWindow()
* to close.
***************
*** 177,183 ****
void CloseShWindow(win)
struct Window *win;
{
! register struct IntuiMessage *msg, *nxt;
if( !HackPort )
panic("HackPort NULL in CloseShWindow" );
--- 196,202 ----
void CloseShWindow(win)
struct Window *win;
{
! register struct IntuiMessage *msg;
if( !HackPort )
panic("HackPort NULL in CloseShWindow" );
***************
*** 332,353 ****
int c;
static int skip_mouse=0; /* need to ignore next mouse event on
* a window activation */
switch(message->Class) {
case ACTIVEWINDOW:
! skip_mouse=1;break;
case MOUSEBUTTONS:
{
! if(skip_mouse){
skip_mouse=0;
break;
}
! if( message->Code == SELECTDOWN ){
lastevent.type = WEMOUSE;
! lastevent.u.mouse.x = message->MouseX;
! lastevent.u.mouse.y = message->MouseY;
/* With shift equals RUN */
! lastevent.u.mouse.qual = (message->Qualifier &
(IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT)) != 0;
}
}
break;
--- 351,409 ----
int c;
static int skip_mouse=0; /* need to ignore next mouse event on
* a window activation */
+ struct Window *w = message->IDCMPWindow;
+
switch(message->Class) {
case ACTIVEWINDOW:
! if( alwaysinvent && WIN_INVEN != WIN_ERR &&
! message->IDCMPWindow ==
! amii_wins[ WIN_INVEN ]->win )
! {
! DoMenuScroll( WIN_INVEN, 0 );
! }
! else if( scrollmsg && WIN_MESSAGE != WIN_ERR &&
! message->IDCMPWindow ==
! amii_wins[ WIN_MESSAGE ]->win )
! {
! DoMenuScroll( WIN_MESSAGE, 0 );
! }
! else
! {
! skip_mouse=1;
! }
! break;
!
case MOUSEBUTTONS:
{
! if( skip_mouse )
! {
skip_mouse=0;
break;
}
!
! if( !amii_wins[ WIN_MAP ] || w != amii_wins[ WIN_MAP ]->win )
! break;
!
! if( message->Code == SELECTUP )
! {
! #ifdef VIEWWINDOW
! amii_putstr( WIN_MESSAGE, 0, "done..." );
! w->Flags &= ~REPORTMOUSE;
! #endif
! }
! else if( message->Code == SELECTDOWN )
! {
lastevent.type = WEMOUSE;
! lastevent.un.mouse.x = message->MouseX;
! lastevent.un.mouse.y = message->MouseY;
/* With shift equals RUN */
! lastevent.un.mouse.qual = (message->Qualifier &
(IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT)) != 0;
+ #ifdef VIEWWINDOW
+ w->Flags |= REPORTMOUSE;
+ amii_putstr( WIN_MESSAGE, 0,
+ "drag mouse to see other areas of this level" );
+ #endif
}
}
break;
***************
*** 358,364 ****
struct MenuItem *item;
thismenu = message->Code;
! while (thismenu != MENUNULL) {
item = ItemAddress(HackMenu, (ULONG) thismenu);
if (KbdBuffered < KBDBUFFER)
BufferQueueChar(item->Command); /* Unused: No COMMSEQ */
--- 414,421 ----
struct MenuItem *item;
thismenu = message->Code;
! while (thismenu != MENUNULL)
! {
item = ItemAddress(HackMenu, (ULONG) thismenu);
if (KbdBuffered < KBDBUFFER)
BufferQueueChar(item->Command); /* Unused: No COMMSEQ */
***************
*** 367,372 ****
--- 424,469 ----
}
break;
+ case REFRESHWINDOW:
+ #ifdef VIEWWINDOW
+ {
+ struct Window *vw, *vbw;
+ if( amii_wins[ WIN_VIEWBOX ] && amii_wins[ WIN_VIEW ] &&
+ w == amii_wins[ WIN_VIEWBOX ]->win )
+ {
+ vw = amii_wins[ WIN_VIEW ]->win;
+ vbw = amii_wins[ WIN_VIEWBOX ]->win;
+
+ if( vw->LeftEdge != (vbw->LeftEdge+vbw->BorderLeft) ||
+ vw->TopEdge != ( vbw->TopEdge + vbw->BorderTop ) ||
+ vw->Width != (vbw->Width -vbw->BorderLeft - vbw->BorderRight ) ||
+ vw->Height != (vbw->Height - vbw->BorderTop - vbw->BorderBottom ) )
+ {
+ MoveWindow( vw, (vbw->LeftEdge+vbw->BorderLeft) - vw->LeftEdge,
+ ( vbw->TopEdge + vbw->BorderTop ) - vw->TopEdge );
+ SizeWindow( vw,
+ ( vbw->Width -vbw->BorderLeft -
+ vbw->BorderRight ) - vw->Width,
+ ( vbw->Height - vbw->BorderTop -
+ vbw->BorderBottom - vw->Height ) );
+ }
+ }
+ else if( amii_wins[ WIN_MESSAGE ] && w == amii_wins[ WIN_MESSAGE ]->win )
+ {
+ DoMenuScroll( WIN_MESSAGE, 0 );
+ }
+ }
+ #endif
+ break;
+
+ case CLOSEWINDOW:
+ if( WIN_INVEN != WIN_ERR && message->IDCMPWindow ==
+ amii_wins[ WIN_INVEN ]->win )
+ {
+ dismiss_nhwindow( WIN_INVEN );
+ }
+ break;
+
case RAWKEY:
if (!(message->Code & IECODE_UP_PREFIX)){
/* May queue multiple characters
***************
*** 376,385 ****
--- 473,557 ----
BufferQueueChar( c );
}
break;
+
+ case MOUSEMOVE:
+ #ifdef VIEWWINDOW
+ if( w == amii_wins[ WIN_MAP ]->win )
+ {
+ int posx, posy, dx, dy;
+ register struct MsgPort *port = w->UserPort;
+ struct amii_WinDesc *cw;
+
+ posx = message->MouseX;
+ posy = message->MouseY;
+ cursor_on( WIN_MAP );
+ cw = amii_wins[ WIN_MAP ];
+
+ do {
+ if( message->Class == MOUSEBUTTONS ||
+ message->Class == INACTIVEWINDOW )
+ {
+ w->Flags &= ~REPORTMOUSE;
+ break;
+ }
+ else if( message->Class == MOUSEMOVE )
+ {
+ if( posx != message->MouseX || posy != message->MouseY )
+ {
+ dx = message->MouseX - posx;
+ dy = message->MouseY - posy;
+ dx /= MAPFTWIDTH;
+ dy /= MAPFTHEIGHT;
+ if( dx != 0 || dy != 0 )
+ {
+ posx = message->MouseX;
+ posy = message->MouseY;
+ amii_curs( WIN_MAP,
+ (posx - w->BorderLeft)/MAPFTWIDTH+dx,
+ (posy - w->BorderTop)/MAPFTHEIGHT+dy );
+ cursor_on( WIN_MAP );
+ }
+ }
+ }
+ ReplyMsg( (struct Message *) message );
+ while( !(message = (struct IntuiMessage *)GetMsg( port ) ) )
+ WaitPort( port );
+ } while( message );
+ amii_putstr( WIN_MESSAGE, 0, "done..." );
+ break;
+ }
+ #endif
+ /* FALL through for MESSAGE or INVEN windows */
+ case GADGETDOWN:
+ if( WIN_MESSAGE != WIN_ERR && message->IDCMPWindow ==
+ amii_wins[ WIN_MESSAGE ]->win )
+ {
+ DoMenuScroll( WIN_MESSAGE, 0 );
+ }
+ else if( WIN_INVEN != WIN_ERR && message->IDCMPWindow ==
+ amii_wins[ WIN_INVEN ]->win )
+ {
+ DoMenuScroll( WIN_INVEN, 0 );
+ }
+ break;
+
+ case NEWSIZE:
+ if( WIN_MESSAGE != WIN_ERR && message->IDCMPWindow ==
+ amii_wins[ WIN_MESSAGE ]->win )
+ {
+ ReDisplayData( WIN_MESSAGE );
+ }
+ else if( WIN_INVEN != WIN_ERR && message->IDCMPWindow ==
+ amii_wins[ WIN_INVEN ]->win )
+ {
+ ReDisplayData( WIN_INVEN );
+ }
+ break;
}
ReplyMsg((struct Message *) message);
}
+ #endif /* AMII_GRAPHICS */
/*
* Get all incoming messages and fill up the keyboard buffer,
* thus allowing Intuition to (maybe) free up the IntuiMessages.
***************
*** 388,403 ****
--- 560,586 ----
* between characters and incoming messages.
*/
+ #if defined(TTY_GRAPHICS) && !defined(AMII_GRAPHICS)
+ int kbhit(){return 0};
+ #else
int
kbhit()
{
int c;
+ #ifdef TTY_GRAPHICS
+ /* a kludge to defuse the mess in allmain.c */
+ /* I hope this is the right approach */
+ if(windowprocs.win_init_nhwindows==amii_procs.win_init_nhwindows)return 0;
+ #endif
c = amikbhit();
if( c <= 0 )
return( 0 );
return( c );
}
+ #endif
+ #ifdef AMII_GRAPHICS
+
int
amikbhit()
{
***************
*** 445,451 ****
if( KbdBuffered )
{
lastevent.type = WEKEY;
! lastevent.u.key = BufferGetchar();
}
return( lastevent.type );
}
--- 628,634 ----
if( KbdBuffered )
{
lastevent.type = WEKEY;
! lastevent.un.key = BufferGetchar();
}
return( lastevent.type );
}
***************
*** 455,470 ****
* when there is something that s/he should read.
*/
! void CleanUp()
{
register struct IntuiMessage *msg;
! /* Finish closing things up */
- amii_raw_print("");
- amii_getret();
-
- ((struct Process *) FindTask(NULL))->pr_WindowPtr = (APTR) pr_WindowPtr;
if (ConsoleIO.io_Device)
CloseDevice( (struct IORequest *)&ConsoleIO );
ConsoleIO.io_Device = 0;
--- 638,654 ----
* when there is something that s/he should read.
*/
! void amii_cleanup()
{
register struct IntuiMessage *msg;
! /* Close things up */
! if( HackPort )
! {
! amii_raw_print("");
! amii_getret();
! }
if (ConsoleIO.io_Device)
CloseDevice( (struct IORequest *)&ConsoleIO );
ConsoleIO.io_Device = 0;
***************
*** 473,479 ****
DeletePort( ConsoleIO.io_Message.mn_ReplyPort );
ConsoleIO.io_Message.mn_ReplyPort = 0;
! if (HackPort) {
Forbid();
while (msg = (struct IntuiMessage *) GetMsg(HackPort))
ReplyMsg((struct Message *) msg);
--- 657,665 ----
DeletePort( ConsoleIO.io_Message.mn_ReplyPort );
ConsoleIO.io_Message.mn_ReplyPort = 0;
! /* Strip messages before deleting the port */
! if( HackPort )
! {
Forbid();
while (msg = (struct IntuiMessage *) GetMsg(HackPort))
ReplyMsg((struct Message *) msg);
***************
*** 483,493 ****
Permit();
}
! if (HackScreen) {
#ifdef INTUI_NEW_LOOK
if( IntuitionBase->LibNode.lib_Version >= 37 )
{
! while( CloseScreen(HackScreen) == FALSE )
{
struct EasyStruct easy =
{
--- 669,683 ----
Permit();
}
! /* Close the screen, under v37 or greater it is a pub screen and there may be
! * visitors, so check close status and wait till everyone is gone.
! */
! if( HackScreen )
! {
#ifdef INTUI_NEW_LOOK
if( IntuitionBase->LibNode.lib_Version >= 37 )
{
! while( CloseScreen( HackScreen ) == FALSE )
{
struct EasyStruct easy =
{
***************
*** 500,513 ****
EasyRequest( NULL, &easy, NULL, NULL );
}
}
! #else
! CloseScreen(HackScreen);
#endif
HackScreen = NULL;
}
#ifdef HACKFONT
-
if (HackFont)
{
CloseFont(HackFont);
--- 690,704 ----
EasyRequest( NULL, &easy, NULL, NULL );
}
}
! else
#endif
+ {
+ CloseScreen(HackScreen);
+ }
HackScreen = NULL;
}
#ifdef HACKFONT
if (HackFont)
{
CloseFont(HackFont);
***************
*** 514,519 ****
--- 705,730 ----
HackFont = NULL;
}
+ #ifdef VIEWWINDOW
+ if (HackFont4)
+ {
+ CloseFont(HackFont4);
+ HackFont4 = NULL;
+ }
+
+ if (HackFont16)
+ {
+ CloseFont(HackFont16);
+ HackFont16 = NULL;
+ }
+ #endif
+
+ if( TextsFont )
+ {
+ CloseFont( TextsFont );
+ TextsFont = NULL;
+ }
+
if( DiskfontBase )
{
CloseLibrary(DiskfontBase);
***************
*** 521,526 ****
--- 732,744 ----
}
#endif
+ #ifdef VIEWWINDOW
+ if (LayersBase) {
+ CloseLibrary((struct Library *)LayersBase);
+ LayersBase = NULL;
+ }
+ #endif
+
if (GfxBase) {
CloseLibrary((struct Library *)GfxBase);
GfxBase = NULL;
***************
*** 531,563 ****
IntuitionBase = NULL;
}
Initialized = 0;
}
void Abort(rc)
long rc;
{
#ifdef CHDIR
extern char orgdir[];
chdir(orgdir);
#endif
! if (Initialized && ConsoleDevice) {
! printf("\n\nAbort with alert code %08lx...\n", rc);
! amii_getret();
} else
! Alert(rc);
#ifdef __SASC
{
/* __emit(0x4afc); /* illegal instruction */
__emit(0x40fc); /* divide by */
__emit(0x0000); /* #0 */
! /* NOTE: don't move CleanUp() above here - */
! /* it is too likely to kill the system */
! /* before it can get the SnapShot out, if */
! /* there is something really wrong. */
}
#endif
! CleanUp();
#undef exit
#ifdef AZTEC_C
_abort();
--- 749,818 ----
IntuitionBase = NULL;
}
+ #ifdef SHAREDLIB
+ if (DOSBase) {
+ CloseLibrary((struct Library *)DOSBase);
+ DOSBase = NULL;
+ }
+ #endif
+
+ ((struct Process *) FindTask(NULL))->pr_WindowPtr = (APTR) pr_WindowPtr;
+
Initialized = 0;
}
+ #ifndef SHAREDLIB
void Abort(rc)
long rc;
{
+ int fault = 1;
#ifdef CHDIR
extern char orgdir[];
chdir(orgdir);
#endif
! #ifdef AMII_GRAPHICS
! if (Initialized
! && ConsoleDevice
! && windowprocs.win_init_nhwindows==amii_procs.win_init_nhwindows) {
! printf("\n\nAbort with alert code %08lx...\n", rc);
! amii_getret();
} else
! #endif
! printf("\n\nAbort with alert code %08lx...\n",rc);
! #if 0
! Alert(rc); /* this is too severe */
! #endif
#ifdef __SASC
+ #ifdef INTUI_NEW_LOOK
{
+ struct EasyStruct es =
+ {
+ sizeof( struct EasyStruct ),
+ 0,
+ "NetHack Panic Request",
+ "NetHack is Aborting with code == 0x%08lx",
+ "Continue Abort|Return to Program|Clean up and exit",
+ };
+ fault = EasyRequest( NULL, &es, NULL, (long)rc );
+ if( fault == 2 )
+ return;
+ }
+ #endif
+ if( fault == 1 )
+ {
/* __emit(0x4afc); /* illegal instruction */
__emit(0x40fc); /* divide by */
__emit(0x0000); /* #0 */
! /* NOTE: don't move amii_cleanup() above here - */
! /* it is too likely to kill the system */
! /* before it can get the SnapShot out, if */
! /* there is something really wrong. */
}
#endif
! #ifdef AMII_GRAPHICS
! if(windowprocs.win_init_nhwindows==amii_procs.win_init_nhwindows)
! amii_cleanup();
! #endif
#undef exit
#ifdef AZTEC_C
_abort();
***************
*** 565,570 ****
--- 820,834 ----
exit((int) rc);
}
+ void
+ CleanUp()
+ {
+ amii_cleanup();
+ }
+ #endif
+
+ #ifdef AMII_GRAPHICS
+
#ifdef AMIFLUSH
/* This routine adapted from AmigaMail IV-37 by Michael Sinz */
static struct Message *
***************
*** 620,625 ****
--- 884,894 ----
struct Window *w;
{
short i, x, y;
+ #ifdef VIEWWINDOW
+ struct Window *vw = amii_wins[ WIN_VIEW ]->win;
+ register struct RastPort *vrp = vw->RPort;
+ #endif
+ register struct RastPort *rp = w->RPort;
/* If nothing is buffered, return before we do anything */
if(glyph_node_index == 0)
***************
*** 627,657 ****
cursor_off( WIN_MAP );
start_glyphout( WIN_MAP );
/* Set up the drawing mode */
! SetDrMd( w->RPort, JAM2);
/* Go ahead and start dumping the stuff */
for(i=0; i<glyph_node_index; ++i) {
/* These coordinate calculations must be synced with the
! * code in curs() in winami.c. curs_on_u() calls curs()
* to draw the cursor on top of the player
*/
! y = w->BorderTop + (g_nodes[i].y-1) * w->RPort->TxHeight +
! w->RPort->TxBaseline + 1;
! x = g_nodes[i].x * w->RPort->TxWidth + w->BorderLeft;
/* Move pens to correct location */
! Move(w->RPort, (long)x, (long)y);
/* Setup the colors */
! SetAPen(w->RPort, (long)g_nodes[i].fg_color);
! SetBPen(w->RPort, (long)g_nodes[i].bg_color);
/* Do it */
! Text(w->RPort, g_nodes[i].buffer, g_nodes[i].len);
}
! end_glyphout( WIN_MAP );
/* Clean up */
glyph_node_index = glyph_buffer_index = 0;
}
--- 896,952 ----
cursor_off( WIN_MAP );
start_glyphout( WIN_MAP );
+ #ifdef VIEWWINDOW
+ cursor_off( WIN_VIEW );
+ start_glyphout( WIN_VIEW );
+ #endif
+
/* Set up the drawing mode */
! SetDrMd( rp, JAM2);
! #ifdef VIEWWINDOW
! SetDrMd( vrp, JAM2);
! #endif
/* Go ahead and start dumping the stuff */
for(i=0; i<glyph_node_index; ++i) {
/* These coordinate calculations must be synced with the
! * code in amii_curs() in winami.c. curs_on_u() calls amii_curs()
* to draw the cursor on top of the player
*/
! y = w->BorderTop + (g_nodes[i].y-1) * rp->TxHeight +
! rp->TxBaseline + 1;
! x = g_nodes[i].x * rp->TxWidth + w->BorderLeft;
/* Move pens to correct location */
! Move( rp, (long)x, (long)y);
/* Setup the colors */
! SetAPen( rp, (long)g_nodes[i].fg_color);
! SetBPen( rp, (long)g_nodes[i].bg_color);
/* Do it */
! Text( rp, g_nodes[i].buffer, g_nodes[i].len);
!
! #ifdef VIEWWINDOW
! y = vw->BorderTop + (g_nodes[i].y-1) * vrp->TxHeight + vrp->TxBaseline + 1;
! x = g_nodes[i].x * vrp->TxWidth + vw->BorderLeft;
!
! /* Move pens to correct location */
! Move( vrp, (long)x, (long)y);
!
! /* Setup the colors */
! SetAPen( vrp, (long)g_nodes[i].fg_color);
! SetBPen( vrp, (long)g_nodes[i].bg_color);
!
! /* Do it */
! Text( vrp, g_nodes[i].buffer, g_nodes[i].len);
! #endif
}
! amii_end_glyphout( WIN_MAP );
! #ifdef VIEWWINDOW
! amii_end_glyphout( WIN_VIEW );
! #endif
/* Clean up */
glyph_node_index = glyph_buffer_index = 0;
}
***************
*** 665,676 ****
int color_index, glyph;
{
int fg_color, bg_color;
! struct WinDesc *cw;
struct Window *w;
int curx;
int cury;
! if( ( cw=wins[window] ) == (struct WinDesc *)NULL )
panic("bad winid in amiga_print_glyph: %d", window );
w = cw->win;
--- 960,971 ----
int color_index, glyph;
{
int fg_color, bg_color;
! struct amii_WinDesc *cw;
struct Window *w;
int curx;
int cury;
! if( ( cw=amii_wins[window] ) == (struct amii_WinDesc *)NULL )
panic("bad winid in amiga_print_glyph: %d", window );
w = cw->win;
***************
*** 740,752 ****
start_glyphout(window)
winid window;
{
! struct WinDesc *cw;
struct Window *w;
! if( ( cw=wins[window] ) == (struct WinDesc *)NULL )
panic( "bad winid %d in start_glyphout()", window );
! if( cw->flags & FLMAP_INGLYPH )
return;
if( !(w = cw->win ) )
--- 1035,1047 ----
start_glyphout(window)
winid window;
{
! struct amii_WinDesc *cw;
struct Window *w;
! if( ( cw=amii_wins[window] ) == (struct amii_WinDesc *)NULL )
panic( "bad winid %d in start_glyphout()", window );
! if( cw->wflags & FLMAP_INGLYPH )
return;
if( !(w = cw->win ) )
***************
*** 766,772 ****
*/
usecolor = flags.use_color;
flags.use_color = FALSE;
! cw->flags |= FLMAP_INGLYPH;
}
/*
--- 1061,1067 ----
*/
usecolor = flags.use_color;
flags.use_color = FALSE;
! cw->wflags |= FLMAP_INGLYPH;
}
/*
***************
*** 773,790 ****
* General cleanup routine -- flushes and restores cursor
*/
void
! end_glyphout(window)
winid window;
{
! struct WinDesc *cw;
struct Window *w;
! if( ( cw = wins[ window ] ) == (struct WinDesc *)NULL )
! panic("bad window id %d in end_glyphout()", window );
! if( ( cw->flags & FLMAP_INGLYPH ) == 0 )
return;
! cw->flags &= ~(FLMAP_INGLYPH);
if( !(w = cw->win ) )
panic( "bad winid %d, no window ptr set", window );
--- 1068,1085 ----
* General cleanup routine -- flushes and restores cursor
*/
void
! amii_end_glyphout(window)
winid window;
{
! struct amii_WinDesc *cw;
struct Window *w;
! if( ( cw = amii_wins[ window ] ) == (struct amii_WinDesc *)NULL )
! panic("bad window id %d in amii_end_glyphout()", window );
! if( ( cw->wflags & FLMAP_INGLYPH ) == 0 )
return;
! cw->wflags &= ~(FLMAP_INGLYPH);
if( !(w = cw->win ) )
panic( "bad winid %d, no window ptr set", window );
***************
*** 866,871 ****
--- 1161,1167 ----
free( sip );
}
else if( gd->GadgetType == PROPGADGET )
+
{
free( (struct PropInfo *)gd->SpecialInfo );
}
***************
*** 893,899 ****
--- 1189,1207 ----
int state;
{
}
+ #endif /* AMII_GRAPHICS */
+ #ifndef SHAREDLIB
+ void
+ amiv_loadlib( void )
+ {
+ }
+
+ void
+ amii_loadlib( void )
+ {
+ }
+
/* fatal error */
/*VARARGS1*/
void error VA_DECL(const char *, s)
***************
*** 907,909 ****
--- 1215,1218 ----
VA_END();
Abort(0L);
}
+ #endif
*** /tmp/da11848 Tue Jun 1 17:00:39 1993
--- sys/amiga/amiwind.p Tue Apr 13 15:41:46 1993
***************
*** 20,30 ****
void FDECL( WindowPrintf, ( char *,... ));
void NDECL( CleanUp );
int FDECL( ConvertKey, ( struct IntuiMessage * ));
void FDECL( Abort, (long ));
void FDECL( flush_glyph_buffer, (struct Window *));
void FDECL( amiga_print_glyph, (winid , int , int ));
void FDECL( start_glyphout, (winid ));
! void FDECL( end_glyphout, (winid ));
#ifdef INTUI_NEW_LOOK
struct ExtNewWindow *FDECL( DupNewWindow, (struct ExtNewWindow *));
void FDECL( FreeNewWindow, (struct ExtNewWindow *));
--- 20,32 ----
void FDECL( WindowPrintf, ( char *,... ));
void NDECL( CleanUp );
int FDECL( ConvertKey, ( struct IntuiMessage * ));
+ #ifndef SHAREDLIB
void FDECL( Abort, (long ));
+ #endif
void FDECL( flush_glyph_buffer, (struct Window *));
void FDECL( amiga_print_glyph, (winid , int , int ));
void FDECL( start_glyphout, (winid ));
! void FDECL( amii_end_glyphout, (winid ));
#ifdef INTUI_NEW_LOOK
struct ExtNewWindow *FDECL( DupNewWindow, (struct ExtNewWindow *));
void FDECL( FreeNewWindow, (struct ExtNewWindow *));
***************
*** 35,37 ****
--- 37,40 ----
void NDECL( bell );
void NDECL( amii_delay_output );
void FDECL( amii_number_pad, (int ));
+ void amii_cleanup( void );
*** /tmp/da11864 Tue Jun 1 17:00:44 1993
--- sys/amiga/char.c Mon May 3 13:21:08 1993
***************
*** 14,23 ****
};
struct IntuiText Type_IText1 = {
! 3,0,JAM2,
38,1,
NULL,
! (UBYTE *)"Wizard",
NULL
};
--- 14,23 ----
};
struct IntuiText Type_IText1 = {
! 7,0,JAM2,
38,1,
NULL,
! "Wizard",
NULL
};
***************
*** 53,62 ****
};
struct IntuiText Type_IText2 = {
! 3,0,JAM2,
29,1,
NULL,
! (UBYTE *)"Valkyrie",
NULL
};
--- 53,62 ----
};
struct IntuiText Type_IText2 = {
! 7,0,JAM2,
29,1,
NULL,
! "Valkyrie",
NULL
};
***************
*** 95,101 ****
1,0,JAM2,
14,1,
NULL,
! (UBYTE *)"Pick a Random Character Type",
NULL
};
--- 95,101 ----
1,0,JAM2,
14,1,
NULL,
! "Pick a Random Character Type",
NULL
};
***************
*** 131,140 ****
};
struct IntuiText Type_IText4 = {
! 3,0,JAM2,
33,1,
NULL,
! (UBYTE *)"Samurai",
NULL
};
--- 131,140 ----
};
struct IntuiText Type_IText4 = {
! 7,0,JAM2,
33,1,
NULL,
! "Samurai",
NULL
};
***************
*** 170,179 ****
};
struct IntuiText Type_IText5 = {
! 3,0,JAM2,
34,1,
NULL,
! (UBYTE *)"Tourist",
NULL
};
--- 170,179 ----
};
struct IntuiText Type_IText5 = {
! 7,0,JAM2,
34,1,
NULL,
! "Tourist",
NULL
};
***************
*** 209,218 ****
};
struct IntuiText Type_IText6 = {
! 3,0,JAM2,
40,1,
NULL,
! (UBYTE *)"Rogue",
NULL
};
--- 209,218 ----
};
struct IntuiText Type_IText6 = {
! 7,0,JAM2,
40,1,
NULL,
! "Rogue",
NULL
};
***************
*** 248,257 ****
};
struct IntuiText Type_IText7 = {
! 3,0,JAM2,
36,1,
NULL,
! (UBYTE *)"Priest",
NULL
};
--- 248,257 ----
};
struct IntuiText Type_IText7 = {
! 7,0,JAM2,
36,1,
NULL,
! "Priest",
NULL
};
***************
*** 287,296 ****
};
struct IntuiText Type_IText8 = {
! 3,0,JAM2,
35,1,
NULL,
! (UBYTE *)"Healer",
NULL
};
--- 287,296 ----
};
struct IntuiText Type_IText8 = {
! 7,0,JAM2,
35,1,
NULL,
! "Healer",
NULL
};
***************
*** 326,335 ****
};
struct IntuiText Type_IText9 = {
! 3,0,JAM2,
33,1,
NULL,
! (UBYTE *)"Caveman",
NULL
};
--- 326,335 ----
};
struct IntuiText Type_IText9 = {
! 7,0,JAM2,
33,1,
NULL,
! "Caveman",
NULL
};
***************
*** 365,374 ****
};
struct IntuiText Type_IText10 = {
! 3,0,JAM2,
16,1,
NULL,
! (UBYTE *)"Archeologist",
NULL
};
--- 365,374 ----
};
struct IntuiText Type_IText10 = {
! 7,0,JAM2,
16,1,
NULL,
! "Archeologist",
NULL
};
***************
*** 404,413 ****
};
struct IntuiText Type_IText11 = {
! 3,0,JAM2,
36,1,
NULL,
! (UBYTE *)"Knight",
NULL
};
--- 404,413 ----
};
struct IntuiText Type_IText11 = {
! 7,0,JAM2,
36,1,
NULL,
! "Knight",
NULL
};
***************
*** 443,452 ****
};
struct IntuiText Type_IText12 = {
! 3,0,JAM2,
48,1,
NULL,
! (UBYTE *)"Elf",
NULL
};
--- 443,452 ----
};
struct IntuiText Type_IText12 = {
! 7,0,JAM2,
48,1,
NULL,
! "Elf",
NULL
};
***************
*** 482,491 ****
};
struct IntuiText Type_IText13 = {
! 3,0,JAM2,
27,1,
NULL,
! (UBYTE *)"Barbarian",
NULL
};
--- 482,491 ----
};
struct IntuiText Type_IText13 = {
! 7,0,JAM2,
27,1,
NULL,
! "Barbarian",
NULL
};
***************
*** 515,521 ****
WINDOWCLOSE+ACTIVATE+NOCAREREFRESH,
&Type_Gadget1,
NULL,
! (UBYTE *)"Pick a Character",
NULL,
NULL,
5,5,
--- 515,521 ----
WINDOWCLOSE+ACTIVATE+NOCAREREFRESH,
&Type_Gadget1,
NULL,
! "Pick a Character",
NULL,
NULL,
5,5,
*** /tmp/da11888 Tue Jun 1 17:00:50 1993
--- sys/amiga/colorwin.c Wed May 19 10:07:49 1993
***************
*** 15,21 ****
};
struct IntuiText Col_IText1 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
13,1, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"Save", /* pointer to text */
--- 15,21 ----
};
struct IntuiText Col_IText1 = {
! 7,0,JAM2, /* front and back text pens, drawmode and fill byte */
13,1, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"Save", /* pointer to text */
***************
*** 54,60 ****
};
struct IntuiText Col_IText2 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
17,1, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"Use", /* pointer to text */
--- 54,60 ----
};
struct IntuiText Col_IText2 = {
! 7,0,JAM2, /* front and back text pens, drawmode and fill byte */
17,1, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"Use", /* pointer to text */
***************
*** 63,69 ****
struct Gadget Col_Okay = {
&Col_Save, /* next gadget */
! 117,77, /* origin XY of hit box relative to window TopLeft */
58,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY, /* activation flags */
--- 63,69 ----
struct Gadget Col_Okay = {
&Col_Save, /* next gadget */
! 128,77, /* origin XY of hit box relative to window TopLeft */
58,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY, /* activation flags */
***************
*** 93,99 ****
};
struct IntuiText Col_IText3 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
6,1, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"Cancel", /* pointer to text */
--- 93,99 ----
};
struct IntuiText Col_IText3 = {
! 7,0,JAM2, /* front and back text pens, drawmode and fill byte */
6,1, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"Cancel", /* pointer to text */
***************
*** 102,108 ****
struct Gadget Col_Cancel = {
&Col_Okay, /* next gadget */
! 218,77, /* origin XY of hit box relative to window TopLeft */
58,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY, /* activation flags */
--- 102,108 ----
struct Gadget Col_Cancel = {
&Col_Okay, /* next gadget */
! 244,77, /* origin XY of hit box relative to window TopLeft */
58,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY, /* activation flags */
***************
*** 133,139 ****
struct Gadget Col_RedPen = {
&Col_Cancel, /* next gadget */
! 7,12, /* origin XY of hit box relative to window TopLeft */
271,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE, /* activation flags */
--- 133,139 ----
struct Gadget Col_RedPen = {
&Col_Cancel, /* next gadget */
! 32,12, /* origin XY of hit box relative to window TopLeft */
271,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE, /* activation flags */
***************
*** 164,170 ****
struct Gadget Col_GreenPen = {
&Col_RedPen, /* next gadget */
! 7,24, /* origin XY of hit box relative to window TopLeft */
271,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE, /* activation flags */
--- 164,170 ----
struct Gadget Col_GreenPen = {
&Col_RedPen, /* next gadget */
! 32,24, /* origin XY of hit box relative to window TopLeft */
271,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE, /* activation flags */
***************
*** 195,201 ****
struct Gadget Col_BluePen = {
&Col_GreenPen, /* next gadget */
! 7,36, /* origin XY of hit box relative to window TopLeft */
271,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE, /* activation flags */
--- 195,201 ----
struct Gadget Col_BluePen = {
&Col_GreenPen, /* next gadget */
! 32,36, /* origin XY of hit box relative to window TopLeft */
271,11, /* hit box width and height */
NULL, /* gadget flags */
RELVERIFY+GADGIMMEDIATE+FOLLOWMOUSE, /* activation flags */
***************
*** 211,219 ****
#define Col_GadgetList1 Col_BluePen
struct NewWindow Col_NewWindowStructure1 = {
175,45, /* window XY origin relative to TopLeft of screen */
! 284,93, /* window width and height */
0,1, /* detail and block pens */
MOUSEBUTTONS+MOUSEMOVE+GADGETDOWN+GADGETUP+CLOSEWINDOW+VANILLAKEY+INTUITICKS, /* IDCMP flags */
WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH, /* other window flags */
--- 211,245 ----
#define Col_GadgetList1 Col_BluePen
+ struct IntuiText Col_IText6 = {
+ 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
+ 17,38, /* XY origin relative to container TopLeft */
+ NULL, /* font pointer or NULL for default */
+ "B", /* pointer to text */
+ NULL /* next IntuiText structure */
+ };
+
+ struct IntuiText Col_IText5 = {
+ 4,0,JAM2, /* front and back text pens, drawmode and fill byte */
+ 16,26, /* XY origin relative to container TopLeft */
+ NULL, /* font pointer or NULL for default */
+ "G", /* pointer to text */
+ &Col_IText6 /* next IntuiText structure */
+ };
+
+ struct IntuiText Col_IText4 = {
+ 7,0,JAM2, /* front and back text pens, drawmode and fill byte */
+ 16,14, /* XY origin relative to container TopLeft */
+ NULL, /* font pointer or NULL for default */
+ "R", /* pointer to text */
+ &Col_IText5 /* next IntuiText structure */
+ };
+
+ #define Col_IntuiTextList1 Col_IText4
+
struct NewWindow Col_NewWindowStructure1 = {
175,45, /* window XY origin relative to TopLeft of screen */
! 312,93, /* window width and height */
0,1, /* detail and block pens */
MOUSEBUTTONS+MOUSEMOVE+GADGETDOWN+GADGETUP+CLOSEWINDOW+VANILLAKEY+INTUITICKS, /* IDCMP flags */
WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH, /* other window flags */
*** /tmp/da11912 Tue Jun 1 17:00:55 1993
--- sys/amiga/hackwb.hlp Mon May 3 13:35:05 1993
***************
*** 22,35 ****
Top Scores - View the score file.
Recover - Recover a game which was interrupted by a
GURU, Software Failure, or other disaster.
- Edit Default Game - The file wbdefaults.def is always
- loaded to provide the default ToolTypes
- information for the NewGame icon (specifying
- options, character name and character type).
- The window opened by this selection allows
- you to edit this information as well as
- create new "games" by changing wbdefaults to
- a different name and using save/load.
Edit Configuration - The string data in nethack.cnf can be
edited saved and loaded using the requester
opened by this selection.
--- 22,27 ----
***************
*** 40,51 ****
Game Configuration gadget lets you change
the options that "Edit Default Game" let you
enter.
! Change Comment - Lets you set a comment string for the
! save file.
! Set Options - takes you directly to the options editing
! requester.
! Copy Options - Creates a new icon with the same options as
! the selected game. The new Icon has no saved
game associated with it.
Discard - Deletes the icon and any saved game
associated with it.
--- 32,39 ----
Game Configuration gadget lets you change
the options that "Edit Default Game" let you
enter.
! Copy Info - Creates a new icon with the same tooltypes as
! the selected icon. The new icon has no saved
game associated with it.
Discard - Deletes the icon and any saved game
associated with it.
*** /tmp/da11928 Tue Jun 1 17:00:59 1993
--- sys/amiga/randwin.c Tue May 11 10:08:45 1993
***************
*** 15,21 ****
};
struct IntuiText Rnd_IText1 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
8,5, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"OKAY", /* pointer to text */
--- 15,21 ----
};
struct IntuiText Rnd_IText1 = {
! 7,0,JAM2, /* front and back text pens, drawmode and fill byte */
8,5, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"OKAY", /* pointer to text */
***************
*** 41,47 ****
#define Rnd_GadgetList1 Rnd_Gadget1
struct IntuiText Rnd_IText6 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
198,29, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"a", /* pointer to text */
--- 41,47 ----
#define Rnd_GadgetList1 Rnd_Gadget1
struct IntuiText Rnd_IText6 = {
! 6,0,JAM2, /* front and back text pens, drawmode and fill byte */
198,29, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"a", /* pointer to text */
***************
*** 57,63 ****
};
struct IntuiText Rnd_IText4 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
25,29, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"exciting game playing as", /* pointer to text */
--- 57,63 ----
};
struct IntuiText Rnd_IText4 = {
! 6,0,JAM2, /* front and back text pens, drawmode and fill byte */
25,29, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"exciting game playing as", /* pointer to text */
***************
*** 65,71 ****
};
struct IntuiText Rnd_IText3 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
15,18, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"I think that you will have an", /* pointer to text */
--- 65,71 ----
};
struct IntuiText Rnd_IText3 = {
! 6,0,JAM2, /* front and back text pens, drawmode and fill byte */
15,18, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
"I think that you will have an", /* pointer to text */
***************
*** 73,82 ****
};
struct IntuiText Rnd_IText2 = {
! 3,0,JAM2, /* front and back text pens, drawmode and fill byte */
7,6, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
! "You asked for a random Character,", /* pointer to text */
&Rnd_IText3 /* next IntuiText structure */
};
--- 73,82 ----
};
struct IntuiText Rnd_IText2 = {
! 6,0,JAM2, /* front and back text pens, drawmode and fill byte */
7,6, /* XY origin relative to container TopLeft */
NULL, /* font pointer or NULL for default */
! "You asked for a random Character.", /* pointer to text */
&Rnd_IText3 /* next IntuiText structure */
};
*** /tmp/da11976 Tue Jun 1 17:01:20 1993
--- sys/amiga/wbdata.c Thu May 6 11:25:53 1993
***************
*** 11,20 ****
char *classes = "ABCEHKPRSTVW";
struct TmpRas tmpras;
! DEFAULTS defgame =
{
! PL_RANDOM,
! NULL, NULL,
};
OPTIONS curopts[] =
--- 11,45 ----
char *classes = "ABCEHKPRSTVW";
struct TmpRas tmpras;
! UWORD __chip waitPointer[] =
{
! 0x0000,0x0000,
!
! 0x0400,0x07c0,
! 0x0000,0x07c0,
!
! 0x0100,0x0380,
! 0x0000,0x07e0,
!
! 0x07c0,0x1ff8,
! 0x1ff0,0x3fec,
!
! 0x3ff8,0x7fde,
! 0x3ff8,0x7fbe,
!
! 0x7ffc,0xff7f,
! 0x7efc,0xffff,
!
! 0x7ffc,0xffff,
! 0x3ff8,0x7ffe,
!
! 0x3ff8,0x7ffe,
! 0x1ff0,0x3ffc,
!
! 0x07c0,0x1ff8,
! 0x0000,0x07e0,
!
! 0x0000,0x0000,
};
OPTIONS curopts[] =
***************
*** 32,40 ****
{ 0, 1, "legacy", NULL, GADOLEGACY, },
{ 0, 0, "lit_corridor", NULL, GADOLITCORRIDOR, },
{ 0, 1, "news", NULL, GADONEWS, },
! { 0, 0, "numberpad", NULL, GADONUMBERPAD, },
{ 0, 1, "null", NULL, GADONULL, },
! { 0, 1, "pickup", NULL, GADOPICKUP, },
{ 0, 0, "rest_on_space", NULL, GADORESTONSPACE, },
{ 0, 1, "safepet", NULL, GADOSAFEPET, },
{ 0, 0, "showexp", NULL, GADOSHOWEXP, },
--- 57,65 ----
{ 0, 1, "legacy", NULL, GADOLEGACY, },
{ 0, 0, "lit_corridor", NULL, GADOLITCORRIDOR, },
{ 0, 1, "news", NULL, GADONEWS, },
! { 0, 0, "number_pad", NULL, GADONUMBERPAD, },
{ 0, 1, "null", NULL, GADONULL, },
! { 0, 1, "autopickup", NULL, GADOPICKUP, },
{ 0, 0, "rest_on_space", NULL, GADORESTONSPACE, },
{ 0, 1, "safepet", NULL, GADOSAFEPET, },
{ 0, 0, "showexp", NULL, GADOSHOWEXP, },
***************
*** 46,52 ****
{ 0, 0, "time", NULL, GADOTIME, },
{ 0, 1, "tombstone", NULL, GADOTOMBSTONE, },
{ 0, 1, "verbose", NULL, GADOVERBOSE, },
! { 0, 0, "asksave", NULL, GADOASKSAVE, },
{ 0, 0, "packorder", "", GADOPACKORDER, },
{ 0, 0, "dogname", "", GADODOGNAME, },
{ 0, 0, "catname", "", GADOCATNAME, },
--- 71,84 ----
{ 0, 0, "time", NULL, GADOTIME, },
{ 0, 1, "tombstone", NULL, GADOTOMBSTONE, },
{ 0, 1, "verbose", NULL, GADOVERBOSE, },
! { 0, 0, "asksavedisk", NULL, GADOASKSAVE, },
! { 0, 0, "name", "", GADONAME, },
! { 0, 0, "score", "", GADOSCORE, },
! { 0, 0, "palette", "", GADOPALETTE, },
! { 0, 0, "windowtype", "", GADOWINDOWTYPE, },
! { 0, 0, "msghistory", "", GADOMSGHISTORY, },
! { 0, 0, "pickup_types", "", GADOPICKUPTYPES, },
! { 0, 0, "pettype", "", GADOPETTYPE, },
{ 0, 0, "packorder", "", GADOPACKORDER, },
{ 0, 0, "dogname", "", GADODOGNAME, },
{ 0, 0, "catname", "", GADOCATNAME, },
***************
*** 102,107 ****
--- 134,174 ----
};
+ USHORT __chip tall_up_renderdata[] = {
+ /* Plane 0 */
+ 0xfff0,
+ 0x8700,
+ 0x8700,
+ 0x8700,
+ 0x8f80,
+ 0x8f80,
+ 0xbfe0,
+ 0xbfe0,
+ 0xbfe0,
+ 0x8000,
+
+ /* Plane 1 */
+ 0x0008,
+ 0x0708,
+ 0x0708,
+ 0x0708,
+ 0x0f88,
+ 0x0f88,
+ 0x3fe8,
+ 0x3fe8,
+ 0x3fe8,
+ 0x7ff8,
+
+ };
+
+ struct Image tall_up_renderimage = {
+ 0, 0,
+ 13, 10, 2,
+ tall_up_renderdata,
+ 3,0,
+ NULL,
+ };
+
struct Image up_renderimage = {
0, 0,
13, 5, 2,
***************
*** 110,120 ****
NULL,
};
USHORT __chip up_selectdata[] = {
/* Plane 0 */
! 0x0008, 0x78f8, 0x7078, 0x4018, 0xfff8,
/* Plane 1 */
! 0xfff0, 0xf8f0, 0xf070, 0xc010, 0x0000,
};
struct Image up_selectimage = {
--- 177,220 ----
NULL,
};
+ USHORT __chip tall_up_selectdata[] = {
+ /* Plane 0 */
+ 0x0008,
+ 0x78f8,
+ 0x78f8,
+ 0x78f8,
+ 0x7078,
+ 0x7078,
+ 0x4018,
+ 0x4018,
+ 0x4018,
+ 0xfff8,
+ /* Plane 1 */
+ 0xfff0,
+ 0xf8f0,
+ 0xf8f0,
+ 0xf8f0,
+ 0xf070,
+ 0xf070,
+ 0xc010,
+ 0xc010,
+ 0xc010,
+ 0x0000,
+ };
+
USHORT __chip up_selectdata[] = {
/* Plane 0 */
! 0x0008,
! 0x78f8,
! 0x7078,
! 0x4018,
! 0xfff8,
/* Plane 1 */
! 0xfff0,
! 0xf8f0,
! 0xf070,
! 0xc010,
! 0x0000,
};
struct Image up_selectimage = {
***************
*** 125,130 ****
--- 225,238 ----
NULL,
};
+ struct Image tall_up_selectimage = {
+ 0, 0,
+ 13, 10, 2,
+ tall_up_selectdata,
+ 3,0,
+ NULL,
+ };
+
USHORT __chip down_renderdata[] = {
/* Plane 0 */
0xfff0,
***************
*** 142,147 ****
--- 250,289 ----
};
+ USHORT __chip tall_down_renderdata[] = {
+ /* Plane 0 */
+ 0xfff0,
+ 0xbfe0,
+ 0xbfe0,
+ 0xbfe0,
+ 0x8f80,
+ 0x8f80,
+ 0x8700,
+ 0x8700,
+ 0x8700,
+ 0x8000,
+
+ /* Plane 1 */
+ 0x0008,
+ 0x3fe8,
+ 0x3fe8,
+ 0x3fe8,
+ 0x0f88,
+ 0x0f88,
+ 0x0708,
+ 0x0708,
+ 0x0708,
+ 0x7ff8,
+ };
+
+ struct Image tall_down_renderimage = {
+ 0, 0,
+ 13, 10, 2,
+ tall_down_renderdata,
+ 3,0,
+ NULL,
+ };
+
struct Image down_renderimage = {
0, 0,
13, 5, 2,
***************
*** 152,160 ****
USHORT __chip down_selectdata[] = {
/* Plane 0 */
! 0x0008, 0x4018, 0x7078, 0x78f8, 0x7ff8,
/* Plane 1 */
! 0xfff0, 0xc010, 0xf070, 0xf8f0, 0x8000,
};
struct Image down_selectimage = {
--- 294,343 ----
USHORT __chip down_selectdata[] = {
/* Plane 0 */
! 0x0008,
! 0x4018,
! 0x7078,
! 0x78f8,
! 0x7ff8,
/* Plane 1 */
! 0xfff0,
! 0xc010,
! 0xf070,
! 0xf8f0,
! 0x8000,
! };
!
! USHORT __chip tall_down_selectdata[] = {
! /* Plane 0 */
! 0x0008,
! 0x4018,
! 0x4018,
! 0x4018,
! 0x7078,
! 0x7078,
! 0x78f8,
! 0x78f8,
! 0x78f8,
! 0x7ff8,
! /* Plane 1 */
! 0xfff0,
! 0xc010,
! 0xc010,
! 0xc010,
! 0xf070,
! 0xf070,
! 0xf8f0,
! 0xf8f0,
! 0xf8f0,
! 0x8000,
! };
!
! struct Image tall_down_selectimage = {
! 0, 0,
! 13, 10, 2,
! tall_down_selectdata,
! 3,0,
! NULL,
};
struct Image down_selectimage = {
*** /tmp/da11984 Tue Jun 1 17:01:22 1993
--- sys/amiga/wbdefs.h Thu May 6 11:25:57 1993
***************
*** 43,60 ****
#define ITEM_ABOUT 1
#define ITEM_SCORES 2
#define ITEM_RECOVER 3
! /*#define ITEM_EDNEW 4*/
! #define ITEM_EDDEF 4
! #define ITEM_CONFIG 5
! #define ITEM_QUIT 6
#define MENU_GAME 1
#define ITEM_INFO 0
! #define ITEM_SETCOMMENT 1
! #define ITEM_SETOPT 2
! #define ITEM_COPYOPT 3
! #define ITEM_DISCARD 4
! #define ITEM_RENAME 5
#define GADSCROLL 1 /* The scroll bar */
#define GADNEWGAME 2 /* New Game requested */
--- 43,56 ----
#define ITEM_ABOUT 1
#define ITEM_SCORES 2
#define ITEM_RECOVER 3
! #define ITEM_CONFIG 4
! #define ITEM_QUIT 5
#define MENU_GAME 1
#define ITEM_INFO 0
! #define ITEM_COPYOPT 1
! #define ITEM_DISCARD 2
! #define ITEM_RENAME 3
#define GADSCROLL 1 /* The scroll bar */
#define GADNEWGAME 2 /* New Game requested */
***************
*** 72,79 ****
#define GADOUTFILE 10
#define GADCATNAME 11
#define GADDOGNAME 12
- #define GADDEFLOAD 13
- #define GADDEFSAVE 14
#define GADSTRSAVE 15
#define GADSTRLEVELS 16
--- 68,73 ----
***************
*** 80,86 ****
#define GADSTRPATH 17
#define GADSTRPENS 18
#define GADSTRHACKDIR 19
- #define GADEDOPTIONS 20
#define GADCONFSAVE 21
#define GADCONFLOAD 22
#define GADCONFNAME 23
--- 74,79 ----
***************
*** 93,99 ****
#define GADHELPOKAY 30
#define GADHELPFRWD 31
#define GADHELPBKWD 32
! #define GADEDDEF 33
#define GADRESTDIR 34
#define GADRESTOLD 35
--- 86,92 ----
#define GADHELPOKAY 30
#define GADHELPFRWD 31
#define GADHELPBKWD 32
! #define GADEDITOPTS 33
#define GADRESTDIR 34
#define GADRESTOLD 35
***************
*** 100,105 ****
--- 93,102 ----
#define GADRESTNEW 36
#define GADRESTCAN 37
#define GADRESTOKAY 38
+ #define GADSAVEINFO 39
+ #define GADUSEINFO 40
+ #define GADQUITINFO 41
+ #define GADPLNAME 42
/*
* Option gadgets GadgetID's
***************
*** 139,144 ****
--- 136,148 ----
#define GADOLITCORRIDOR 133
#define GADOSHOWEXP 134
#define GADOSHOWSCORE 135
+ #define GADONAME 136
+ #define GADOSCORE 137
+ #define GADOPALETTE 138
+ #define GADOWINDOWTYPE 139
+ #define GADOMSGHISTORY 140
+ #define GADOPICKUPTYPES 141
+ #define GADOPETTYPE 142
/* Definition of workbench size layout */
***************
*** 165,176 ****
#define RstOld (Sbuff(&Rst_RestOld))
#define RstNew (Sbuff(&Rst_RestNew))
- #define DefPlayerName (Sbuff(&Defs_PlayerName))
- #define DefOutFile (Sbuff(&Defs_DefaultName))
-
#define StrString (Sbuff(&Str_String))
#define StrTools (Sbuff(&Info_ToolTypes))
#define GAMEIMAGE "HackExe:NetHack"
#define GAMESTACK 50000
--- 169,178 ----
#define RstOld (Sbuff(&Rst_RestOld))
#define RstNew (Sbuff(&Rst_RestNew))
#define StrString (Sbuff(&Str_String))
#define StrTools (Sbuff(&Info_ToolTypes))
+ #define StrPlayer (Sbuff(&Info_Player))
#define GAMEIMAGE "HackExe:NetHack"
#define GAMESTACK 50000
***************
*** 210,215 ****
#define NO_FLASH 0
#define FLASH 1
-
- #define GAME_FROM_DEFAULT 0
- #define GAME_FROM_INFO 1
--- 212,214 ----
*** /tmp/da11992 Tue Jun 1 17:01:24 1993
--- sys/amiga/wbprotos.h Mon May 24 11:12:34 1993
***************
*** 23,29 ****
void getline P(( FILE *fp , long *offarr , int which , char *buf , int size ));
void help_requester P(( char *file ));
void do_closewindow P(( void ));
! void do_menu P(( int mcode ));
void menu_discard P(( void ));
void menu_copyopt P(( void ));
void menu_rename P(( void ));
--- 23,29 ----
void getline P(( FILE *fp , long *offarr , int which , char *buf , int size ));
void help_requester P(( char *file ));
void do_closewindow P(( void ));
! void do_menu P(( struct Menu *mptr, int mcode ));
void menu_discard P(( void ));
void menu_copyopt P(( void ));
void menu_rename P(( void ));
***************
*** 34,39 ****
--- 34,40 ----
void SafeCloseWindow P(( struct Window *window ));
GPTR AllocGITEM P(( void ));
void FreeGITEM P(( GPTR gptr ));
+ void RemoveGITEM P(( GPTR ));
struct DiskObject *AllocDObj P(( char *str ));
void FreeDObj P(( struct DiskObject *doptr ));
void LoadIcons P(( void ));
***************
*** 45,51 ****
void do_buttons P(( struct IntuiMessage *imsg ));
void do_gadgetdown P(( struct IntuiMessage *imsg ));
int ask_request P(( char *str ));
! void menu_setopt P(( void ));
void menu_info P(( void ));
int IsEditEntry P(( char *, GPTR ));
void menu_comment P(( void ));
--- 46,52 ----
void do_buttons P(( struct IntuiMessage *imsg ));
void do_gadgetdown P(( struct IntuiMessage *imsg ));
int ask_request P(( char *str ));
! void setopt P(( GPTR ));
void menu_info P(( void ));
int IsEditEntry P(( char *, GPTR ));
void menu_comment P(( void ));
***************
*** 75,81 ****
GPTR NeedGame P(( void ));
void ChgGameItems P(( struct Menu *menup , int enable ));
void ChgNewGameItems P(( struct Menu *menup , int enable ));
! int EditOptions P(( OPTR optr ));
struct Gadget *FindGadget P(( struct Window *window ,
struct NewWindow *newwindow , int id ));
void ZapOptions P(( OPTR optr ));
--- 76,82 ----
GPTR NeedGame P(( void ));
void ChgGameItems P(( struct Menu *menup , int enable ));
void ChgNewGameItems P(( struct Menu *menup , int enable ));
! int EditOptions P(( OPTR optr, GPTR gptr ));
struct Gadget *FindGadget P(( struct Window *window ,
struct NewWindow *newwindow , int id ));
void ZapOptions P(( OPTR optr ));
*** /tmp/da12000 Tue Jun 1 17:01:26 1993
--- sys/amiga/wbstruct.h Mon May 3 13:33:32 1993
***************
*** 42,51 ****
* options value.
*/
} OPTIONS, *OPTR;
-
- typedef struct DEFAULTS
- {
- int pltype; /* Character class */
- char *plname; /* Players name */
- char *options; /* Preferred options string */
- } DEFAULTS;
--- 42,44 ----
*** /tmp/da12032 Tue Jun 1 17:01:51 1993
--- sys/amiga/winami.p Tue Apr 13 15:41:59 1993
***************
*** 40,46 ****
void FDECL(DisplayData, (int , int , int ));
void FDECL(SetPropInfo, (struct Window * , struct Gadget * , long , long , long ));
void FDECL(kill_nhwindows, (int ));
! void FDECL(amii_cl_end, (struct WinDesc * , int ));
void FDECL(cursor_off, (winid ));
void FDECL(cursor_on, (winid ));
void NDECL(amii_getret );
--- 40,46 ----
void FDECL(DisplayData, (int , int , int ));
void FDECL(SetPropInfo, (struct Window * , struct Gadget * , long , long , long ));
void FDECL(kill_nhwindows, (int ));
! void FDECL(amii_cl_end, (struct amii_WinDesc * , int ));
void FDECL(cursor_off, (winid ));
void FDECL(cursor_on, (winid ));
void NDECL(amii_getret );
***************
*** 55,57 ****
--- 55,58 ----
void NDECL( amii_setpens );
void FDECL( SetBorder, (struct Gadget *) );
void NDECL( port_help );
+ void FDECL( dismiss_nhwindow, (winid) );