page@swan.ulowell.edu (Bob Page) (12/02/88)
Submitted-by: u211344@hnykun11.bitnet (Olaf 'Rhialto' Seibert) Posting-number: Volume 2, Issue 73 Archive-name: fun/nethack.d4 # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # diffs.4 # This archive created: Thu Dec 1 17:55:48 1988 cat << \SHAR_EOF > diffs.4 --- 9,18 ----- #include <signal.h> #include "hack.h" + + #ifdef AMIGA /* same as in amigaTermcap.c */ + # define xputc(c) WindowPutchar(c) + # define xputs(s) WindowFPuts(s) + #endif + extern int CO, LI; /* usually COLNO and ROWNO+2 */ extern char *CD; *************** *** 32,36 extern getpos(); coord cc; ! char r; pline ("Specify unknown object by cursor ? [ynq] "); --- 38,43 ----- extern getpos(); coord cc; ! unsigned char r; /* OIS, for chars >= 128 */ ! /* q need not be unsigned, it is same type as buf. */ pline ("Specify unknown object by cursor ? [ynq] "); *************** *** 339,342 curline = 1; for (tl = texthead; tl; tl = tl->next_line) { #ifdef MSDOS cmov (lth, curline); --- 346,352 ----- curline = 1; for (tl = texthead; tl; tl = tl->next_line) { + #ifdef AMIGA + #undef MSDOS /* Watch out! */ + #endif #ifdef MSDOS cmov (lth, curline); diff -bc2 potion.c Amiga:potion.c *** potion.c Wed May 4 15:08:50 1988 --- Amiga:potion.c Sun Jul 24 16:39:19 1988 *************** *** 26,30 /* Is there something to drink here, i.e., a fountain? */ ! if (IS_FOUNTAIN(levl[u.ux][u.uy].typ)) { pline("Drink from the fountain? [ny] "); if(readchar() == 'y') { --- 26,30 ----- /* Is there something to drink here, i.e., a fountain? */ ! if (IS_FOUNTAIN(RM_TYP(levl[u.ux][u.uy]))) { pline("Drink from the fountain? [ny] "); if(readchar() == 'y') { *************** *** 525,529 #ifdef FOUNTAINS /* Is there something to dip into here, i.e., a fountain? */ ! if (levl[u.ux][u.uy].typ == FOUNTAIN) { pline("Dip it in the fountain? [ny] "); if(readchar() == 'y') { --- 525,529 ----- #ifdef FOUNTAINS /* Is there something to dip into here, i.e., a fountain? */ ! if (RM_TYP(levl[u.ux][u.uy]) == FOUNTAIN) { pline("Dip it in the fountain? [ny] "); if(readchar() == 'y') { diff -bc2 prisym.c Amiga:prisym.c *** prisym.c Wed May 4 15:08:56 1988 --- Amiga:prisym.c Sun Jul 24 17:17:03 1988 *************** *** 16,20 return; } ! if(crm->seen && crm->scrsym == ch) return; crm->scrsym = ch; crm->new = 1; --- 16,20 ----- return; } ! if(RM_SEEN(*crm) && crm->scrsym == ch) return; crm->scrsym = ch; RM_SET_NEW(*crm); *************** *** 18,22 if(crm->seen && crm->scrsym == ch) return; crm->scrsym = ch; ! crm->new = 1; on_scr(x,y); } --- 18,22 ----- if(RM_SEEN(*crm) && crm->scrsym == ch) return; crm->scrsym = ch; ! RM_SET_NEW(*crm); on_scr(x,y); } *************** *** 98,102 tc[cnt].y = y; if(++cnt >= COLNO) panic("Tmp_at overflow?"); ! levl[x][y].new = 0; /* prevent pline-nscr erasing --- */ } } --- 98,102 ----- tc[cnt].y = y; if(++cnt >= COLNO) panic("Tmp_at overflow?"); ! RM_CLR_NEW(levl[x][y]); /* prevent pline-nscr erasing --- */ } } *************** *** 109,113 { if(u.udispl && (Invisible || u.udisx != u.ux || u.udisy != u.uy)) ! /* if(! levl[u.udisx][u.udisy].new) */ if(!vism_at(u.udisx, u.udisy)) newsym(u.udisx, u.udisy); --- 109,113 ----- { if(u.udispl && (Invisible || u.udisx != u.ux || u.udisy != u.uy)) ! /* if(! RM_NEW(levl[u.udisx][u.udisy])) */ if(!vism_at(u.udisx, u.udisy)) newsym(u.udisx, u.udisy); *************** *** 122,126 u.udisy = u.uy; } ! levl[u.ux][u.uy].seen = 1; } --- 122,126 ----- u.udisy = u.uy; } ! RM_SET_SEEN(levl[u.ux][u.uy]); } *************** *** 144,149 if(!isok(x,y)) return; room = &levl[x][y]; ! if((!room->typ) || ! (IS_ROCK(room->typ) && levl[u.ux][u.uy].typ == CORR)) return; if((mtmp = m_at(x,y)) && !mtmp->mhide && --- 144,149 ----- if(!isok(x,y)) return; room = &levl[x][y]; ! if((!RM_TYP(*room)) || ! (IS_ROCK(RM_TYP(*room)) && RM_TYP(levl[u.ux][u.uy]) == CORR)) return; if((mtmp = m_at(x,y)) && !mtmp->mhide && *************** *** 156,160 pmon(mtmp); } ! else if((otmp = o_at(x,y)) && room->typ != POOL) atl(x,y,Hallucination ? rndobjsym() : otmp->olet); #ifdef SPIDERS --- 156,160 ----- pmon(mtmp); } ! else if((otmp = o_at(x,y)) && RM_TYP(*room) != POOL) atl(x,y,Hallucination ? rndobjsym() : otmp->olet); #ifdef SPIDERS *************** *** 168,172 pmon(mtmp); } ! else if(g_at(x,y) && room->typ != POOL) atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM); else if(!room->seen || room->scrsym == STONE_SYM) { --- 168,172 ----- pmon(mtmp); } ! else if(g_at(x,y) && RM_TYP(*room) != POOL) atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM); else if(!RM_SEEN(*room) || room->scrsym == STONE_SYM) { *************** *** 170,175 else if(g_at(x,y) && room->typ != POOL) atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM); ! else if(!room->seen || room->scrsym == STONE_SYM) { ! room->new = room->seen = 1; newsym(x,y); on_scr(x,y); --- 170,177 ----- else if(g_at(x,y) && RM_TYP(*room) != POOL) atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM); ! else if(!RM_SEEN(*room) || room->scrsym == STONE_SYM) { ! /* room->new = room->seen = 1; */ ! RM_SET_NEW(*room); ! RM_SET_SEEN(*room); newsym(x,y); on_scr(x,y); *************** *** 175,179 on_scr(x,y); } ! room->seen = 1; } --- 177,181 ----- on_scr(x,y); } ! RM_SET_SEEN(*room); } *************** *** 185,189 register struct trap *ttmp; struct rm *room; ! register char tmp; room = &levl[x][y]; --- 187,191 ----- register struct trap *ttmp; struct rm *room; ! register unsigned char tmp; /* OIS: don't compare char with uchar */ room = &levl[x][y]; *************** *** 188,193 room = &levl[x][y]; ! if(!room->seen) tmp = STONE_SYM; ! else if(room->typ == POOL) tmp = POOL_SYM; else if(!Blind && (otmp = o_at(x,y))) tmp = Hallucination ? rndobjsym() : otmp->olet; --- 190,195 ----- room = &levl[x][y]; ! if(!RM_SEEN(*room)) tmp = STONE_SYM; ! else if (RM_TYP(*room) == POOL) tmp = POOL_SYM; else if(!Blind && (otmp = o_at(x,y))) tmp = Hallucination ? rndobjsym() : otmp->olet; *************** *** 202,206 else if((ttmp = t_at(x,y)) && ttmp->tseen) tmp = TRAP_SYM; #endif ! else switch(room->typ) { case SCORR: case SDOOR: --- 204,208 ----- else if((ttmp = t_at(x,y)) && ttmp->tseen) tmp = TRAP_SYM; #endif ! else switch (RM_TYP(*room)) { case SCORR: case SDOOR: *************** *** 223,227 break; case ROOM: ! if(room->lit || cansee(x,y) || Blind) tmp = ROOM_SYM; else tmp = STONE_SYM; break; --- 225,229 ----- break; case ROOM: ! if(RM_LIT(*room) || cansee(x,y) || Blind) tmp = ROOM_SYM; else tmp = STONE_SYM; break; *************** *** 264,268 { register struct rm *room; ! char newscrsym; if(!vism_at(x,y)) { --- 266,270 ----- { register struct rm *room; ! unsigned char newscrsym; /* OIS */ if(!vism_at(x,y)) { *************** *** 271,275 if(room->scrsym != newscrsym) { room->scrsym = newscrsym; ! room->seen = 0; } } --- 273,277 ----- if(room->scrsym != newscrsym) { room->scrsym = newscrsym; ! RM_CLR_SEEN(*room); } } *************** *** 283,289 if(!isok(x,y)) return; room = &levl[x][y]; ! if(room->scrsym == ROOM_SYM && !room->lit && !Blind) { ! room->scrsym = ' '; ! room->new = 1; on_scr(x,y); } --- 285,292 ----- if(!isok(x,y)) return; room = &levl[x][y]; ! if(room->scrsym == ROOM_SYM && !RM_LIT(*room) && !Blind) { ! room->scrsym = STONE_SYM; /* OIS, was ' ' */ ! /* Otherwise a STONE_SYM != 32 looks so stupid */ ! RM_SET_NEW(*room); on_scr(x,y); } diff -bc2 read.c Amiga:read.c *** read.c Wed May 4 15:08:58 1988 --- Amiga:read.c Sun Jul 24 17:26:08 1988 *************** *** 419,423 if(!confused || rn2(7)) if(!cansee(zx,zy)) ! levl[zx][zy].seen = 0; docrt(); pline("Who was that Maude person anyway?"); --- 419,423 ----- if(!confused || rn2(7)) if(!cansee(zx,zy)) ! RM_CLR_SEEN(levl[zx][zy]); docrt(); pline("Who was that Maude person anyway?"); *************** *** 519,524 if(Blind) goto do_it; if(!on) { ! if(u.uswallow || !xdnstair || levl[u.ux][u.uy].typ == CORR || ! !levl[u.ux][u.uy].lit) { pline("It seems even darker in here than before."); return; --- 519,524 ----- if(Blind) goto do_it; if(!on) { ! if(u.uswallow || !xdnstair || RM_TYP(levl[u.ux][u.uy]) == CORR || ! !RM_LIT(levl[u.ux][u.uy])) { pline("It seems even darker in here than before."); return; *************** *** 538,542 return; #else ! if(levl[u.ux][u.uy].typ == CORR) { pline("The corridor lights up around you, then fades."); return; --- 538,542 ----- return; #else ! if(RM_TYP(levl[u.ux][u.uy]) == CORR) { pline("The corridor lights up around you, then fades."); return; *************** *** 541,545 pline("The corridor lights up around you, then fades."); return; ! } else if(levl[u.ux][u.uy].lit) { pline("The light here seems better now."); return; --- 541,545 ----- pline("The corridor lights up around you, then fades."); return; ! } else if(RM_LIT(levl[u.ux][u.uy])) { pline("The light here seems better now."); return; *************** *** 553,557 return; #else ! if(levl[u.ux][u.uy].lit == on) return; if(levl[u.ux][u.uy].typ == DOOR) { --- 553,560 ----- return; #else ! # ifdef RM_LITM ! if (on) on = RM_LITM; /* OIS, for AMIGA */ ! # endif ! if(RM_LIT(levl[u.ux][u.uy]) == on) return; if(RM_TYP(levl[u.ux][u.uy]) == DOOR) { *************** *** 555,561 if(levl[u.ux][u.uy].lit == on) return; ! if(levl[u.ux][u.uy].typ == DOOR) { ! if(IS_ROOM(levl[u.ux][u.uy+1].typ)) zy = u.uy+1; ! else if(IS_ROOM(levl[u.ux][u.uy-1].typ)) zy = u.uy-1; else zy = u.uy; if(IS_ROOM(levl[u.ux+1][u.uy].typ)) zx = u.ux+1; --- 558,564 ----- if(RM_LIT(levl[u.ux][u.uy]) == on) return; ! if(RM_TYP(levl[u.ux][u.uy]) == DOOR) { ! if(IS_ROOM(RM_TYP(levl[u.ux][u.uy+1]))) zy = u.uy+1; ! else if(IS_ROOM(RM_TYP(levl[u.ux][u.uy-1]))) zy = u.uy-1; else zy = u.uy; if(IS_ROOM(RM_TYP(levl[u.ux+1][u.uy]))) zx = u.ux+1; *************** *** 559,564 else if(IS_ROOM(levl[u.ux][u.uy-1].typ)) zy = u.uy-1; else zy = u.uy; ! if(IS_ROOM(levl[u.ux+1][u.uy].typ)) zx = u.ux+1; ! else if(IS_ROOM(levl[u.ux-1][u.uy].typ)) zx = u.ux-1; else zx = u.ux; } else { --- 562,567 ----- else if(IS_ROOM(RM_TYP(levl[u.ux][u.uy-1]))) zy = u.uy-1; else zy = u.uy; ! if(IS_ROOM(RM_TYP(levl[u.ux+1][u.uy]))) zx = u.ux+1; ! else if(IS_ROOM(RM_TYP(levl[u.ux-1][u.uy]))) zx = u.ux-1; else zx = u.ux; } else { *************** *** 566,570 zy = u.uy; } ! for(seelx = u.ux; (num = levl[seelx-1][zy].typ) != CORR && num != 0; seelx--); for(seehx = u.ux; (num = levl[seehx+1][zy].typ) != CORR && num != 0; --- 569,573 ----- zy = u.uy; } ! for(seelx = u.ux; (num = RM_TYP(levl[seelx-1][zy])) != CORR && num != 0; seelx--); for(seehx = u.ux; (num = RM_TYP(levl[seehx+1][zy])) != CORR && num != 0; *************** *** 568,572 for(seelx = u.ux; (num = levl[seelx-1][zy].typ) != CORR && num != 0; seelx--); ! for(seehx = u.ux; (num = levl[seehx+1][zy].typ) != CORR && num != 0; seehx++); for(seely = u.uy; (num = levl[zx][seely-1].typ) != CORR && num != 0; --- 571,575 ----- for(seelx = u.ux; (num = RM_TYP(levl[seelx-1][zy])) != CORR && num != 0; seelx--); ! for(seehx = u.ux; (num = RM_TYP(levl[seehx+1][zy])) != CORR && num != 0; seehx++); for(seely = u.uy; (num = RM_TYP(levl[zx][seely-1])) != CORR && num != 0; *************** *** 570,574 for(seehx = u.ux; (num = levl[seehx+1][zy].typ) != CORR && num != 0; seehx++); ! for(seely = u.uy; (num = levl[zx][seely-1].typ) != CORR && num != 0; seely--); for(seehy = u.uy; (num = levl[zx][seehy+1].typ) != CORR && num != 0; --- 573,577 ----- for(seehx = u.ux; (num = RM_TYP(levl[seehx+1][zy])) != CORR && num != 0; seehx++); ! for(seely = u.uy; (num = RM_TYP(levl[zx][seely-1])) != CORR && num != 0; seely--); for(seehy = u.uy; (num = RM_TYP(levl[zx][seehy+1])) != CORR && num != 0; *************** *** 572,576 for(seely = u.uy; (num = levl[zx][seely-1].typ) != CORR && num != 0; seely--); ! for(seehy = u.uy; (num = levl[zx][seehy+1].typ) != CORR && num != 0; seehy++); for(zy = seely; zy <= seehy; zy++) --- 575,579 ----- for(seely = u.uy; (num = RM_TYP(levl[zx][seely-1])) != CORR && num != 0; seely--); ! for(seehy = u.uy; (num = RM_TYP(levl[zx][seehy+1])) != CORR && num != 0; seehy++); for(zy = seely; zy <= seehy; zy++) *************** *** 576,579 for(zy = seely; zy <= seehy; zy++) for(zx = seelx; zx <= seehx; zx++) { levl[zx][zy].lit = on; if(!Blind && dist(zx,zy) > 2) --- 579,588 ----- for(zy = seely; zy <= seehy; zy++) for(zx = seelx; zx <= seehx; zx++) { + # ifdef BITFIELD_BUG /* for AMIGA */ + if (on) + RM_SET_LIT(levl[zx][zy]); + else + RM_CLR_LIT(levl[zx][zy]); + # else levl[zx][zy].lit = on; # endif *************** *** 577,580 for(zx = seelx; zx <= seehx; zx++) { levl[zx][zy].lit = on; if(!Blind && dist(zx,zy) > 2) if(on) prl(zx,zy); else nosee(zx,zy); --- 586,590 ----- # else levl[zx][zy].lit = on; + # endif if(!Blind && dist(zx,zy) > 2) if(on) prl(zx,zy); else nosee(zx,zy); *************** *** 653,657 if((Confusion != 0) && rn2(7)) continue; lev = &(levl[zx][zy]); ! if((num = lev->typ) == 0) continue; if(num == SCORR) { --- 663,667 ----- if((Confusion != 0) && rn2(7)) continue; lev = &(levl[zx][zy]); ! if((num = RM_TYP(*lev)) == 0) continue; if(num == SCORR) { *************** *** 656,660 if(num == SCORR) { ! lev->typ = CORR; lev->scrsym = CORR_SYM; } else if(num == SDOOR) { --- 666,670 ----- if(num == SCORR) { ! RM_SET_TYP(*lev, CORR); lev->scrsym = CORR_SYM; } else if(num == SDOOR) { *************** *** 659,663 lev->scrsym = CORR_SYM; } else if(num == SDOOR) { ! lev->typ = DOOR; lev->scrsym = DOOR_SYM; /* do sth in doors ? */ --- 669,673 ----- lev->scrsym = CORR_SYM; } else if(num == SDOOR) { ! RM_SET_TYP(*lev, DOOR); lev->scrsym = DOOR_SYM; /* do sth in doors ? */ *************** *** 662,666 lev->scrsym = DOOR_SYM; /* do sth in doors ? */ ! } else if(lev->seen) continue; #ifndef QUEST if(num != ROOM) --- 672,676 ----- lev->scrsym = DOOR_SYM; /* do sth in doors ? */ ! } else if (RM_SEEN(*lev)) continue; #ifndef QUEST if(num != ROOM) *************** *** 667,671 #endif { ! lev->seen = lev->new = 1; if(lev->scrsym == STONE_SYM || !lev->scrsym) newsym(zx,zy); --- 677,683 ----- #endif { ! /* lev->seen = lev->new = 1; */ ! RM_SET_SEEN(*lev); ! RM_SET_NEW(*lev); if(lev->scrsym == STONE_SYM || !lev->scrsym) newsym(zx,zy); diff -bc2 save.c Amiga:save.c *** save.c Wed May 4 15:09:02 1988 --- Amiga:save.c Thu Aug 4 02:05:07 1988 *************** *** 23,26 exit(0); } #ifdef LINT return(0); --- 23,27 ----- exit(0); } + docrt(); /* Redraw screen */ #ifdef LINT return(0); *************** *** 53,57 if (!saveDiskPrompt(0)) return 0; ! fd = open(SAVEF, O_WRONLY | O_BINARY | O_CREAT, FMASK); #else fd = creat(SAVEF, FMASK); --- 54,58 ----- if (!saveDiskPrompt(0)) return 0; ! fd = open(SAVEF, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FMASK); #else fd = creat(SAVEF, FMASK); *************** *** 101,104 #ifdef DGK if (mode == COUNT) { /* make sure there is enough disk space */ needed = bytes_counted; --- 102,108 ----- #ifdef DGK if (mode == COUNT) { + #ifdef COMPRESS + bflush(fd); + #endif /* make sure there is enough disk space */ needed = bytes_counted; *************** *** 142,145 return(0); } getlev(ofd, hackpid, tmp); (void) close(ofd); --- 146,152 ----- return(0); } + #ifdef COMPRESS + minit(); + #endif getlev(ofd, hackpid, tmp); (void) close(ofd); *************** *** 152,155 (void) unlink(lock); } (void) close(fd); glo(dlevel); --- 159,165 ----- (void) unlink(lock); } + #ifdef COMPRESS + bflush(fd); + #endif (void) close(fd); glo(dlevel); *************** *** 173,176 oldflags = flags; /* Save flags set in the config file */ #endif restoring = TRUE; getlev(fd, 0, 0); --- 183,189 ----- oldflags = flags; /* Save flags set in the config file */ #endif + #ifdef COMPRESS + minit(); + #endif restoring = TRUE; getlev(fd, 0, 0); *************** *** 230,234 #endif while(1) { ! if(read(fd, (char *) &tmp, sizeof tmp) != sizeof tmp) break; getlev(fd, 0, tmp); --- 243,251 ----- #endif while(1) { ! #ifdef COMPRESS ! if(mread(fd, (char *) &tmp, sizeof tmp) < 0) /*level #*/ ! #else ! if(read(fd, (char *) &tmp, sizeof tmp) != sizeof tmp) /*level #*/ ! #endif break; getlev(fd, 0, tmp); *************** *** 274,277 savelev(nfd,tmp); #endif (void) close(nfd); } --- 291,297 ----- savelev(nfd,tmp); #endif + #ifdef COMPRESS + bflush(nfd); + #endif (void) close(nfd); } *************** *** 277,280 } (void) lseek(fd, 0L, 0); getlev(fd, 0, 0); (void) close(fd); --- 297,303 ----- } (void) lseek(fd, 0L, 0); + #ifdef COMPRESS + minit(); + #endif getlev(fd, 0, 0); (void) close(fd); diff -bc2 shk.c Amiga:shk.c *** shk.c Wed May 4 15:09:04 1988 --- Amiga:shk.c Sun Jul 24 17:58:35 1988 *************** *** 1021,1025 nx = poss[i].x; ny = poss[i].y; ! if(levl[nx][ny].typ == ROOM || shkroom != ESHK(shkp)->shoproom || ESHK(shkp)->following) { --- 1021,1025 ----- nx = poss[i].x; ny = poss[i].y; ! if (RM_TYP(levl[nx][ny]) == ROOM || shkroom != ESHK(shkp)->shoproom || ESHK(shkp)->following) { diff -bc2 shknam.c Amiga:shknam.c No differences encountered diff -bc2 spell.c Amiga:spell.c No differences encountered diff -bc2 topten.c Amiga:topten.c *** topten.c Tue May 3 16:58:12 1988 --- Amiga:topten.c Thu Aug 4 19:10:55 1988 *************** *** 57,60 #endif #ifndef DGK #define HUP if(!done_hup) --- 57,64 ----- #endif + #ifdef AMIGA + curx = FAR; /* Prevent screen from closing too fast */ + #endif + #ifndef DGK #define HUP if(!done_hup) *************** *** 103,106 t0->points = 0; #ifdef LOGFILE /* used for debugging (who dies of what, where) */ while(link(lgfile, loglock) == -1) { HUP perror(loglock); --- 107,111 ----- t0->points = 0; #ifdef LOGFILE /* used for debugging (who dies of what, where) */ + # ifdef UNIX while(link(lgfile, loglock) == -1) { HUP perror(loglock); *************** *** 115,118 sleep(1); } if(!(lfile = fopen(lgfile,"a"))){ HUP puts("Cannot open log file!"); --- 120,124 ----- sleep(1); } + # endif if(!(lfile = fopen(lgfile,"a"))){ HUP puts("Cannot open log file!"); *************** *** 125,128 t0->plchar, t0->sex, t0->name, t0->death); fclose(lfile); (void) unlink(loglock); lgend:; --- 131,135 ----- t0->plchar, t0->sex, t0->name, t0->death); fclose(lfile); + # ifdef UNIX (void) unlink(loglock); # endif *************** *** 126,129 fclose(lfile); (void) unlink(loglock); lgend:; #endif --- 133,137 ----- # ifdef UNIX (void) unlink(loglock); + # endif lgend:; #endif *************** *** 331,334 *bp = 0; standoutbeg(); fputs(linebuf,stdout); standoutend(); --- 339,345 ----- *bp = 0; standoutbeg(); + #ifdef stdout_puts /* For AMIGA */ + stdout_puts(linebuf); + #else fputs(linebuf,stdout); #endif *************** *** 332,335 standoutbeg(); fputs(linebuf,stdout); standoutend(); (void) putchar('\n'); --- 343,347 ----- #else fputs(linebuf,stdout); + #endif standoutend(); (void) putchar('\n'); *************** *** 385,388 #else char *player0; #endif --- 397,403 ----- #else char *player0; + #endif + #ifdef AMIGA + curx = FAR; /* Prevent screen from closing too fast */ #endif diff -bc2 trap.c Amiga:trap.c *** trap.c Wed May 4 15:09:12 1988 --- Amiga:trap.c Sun Jul 24 21:12:09 1988 *************** *** 253,257 break; #endif ! #if defined(RPH) && defined(KAA) case POLY_TRAP: pline("You feel a change coming over you."); --- 253,259 ----- break; #endif ! /* #if defined(RPH) && defined(KAA) */ ! #ifdef RPH ! # ifdef KAA case POLY_TRAP: pline("You feel a change coming over you."); *************** *** 259,262 deltrap(trap); break; #endif #ifdef NEWTRAPS --- 261,265 ----- deltrap(trap); break; + # endif #endif #ifdef NEWTRAPS *************** *** 532,536 /* check for falling into pool - added by GAN 10/20/86 */ ! if(IS_POOL(levl[u.ux][u.uy].typ) && !Levitation) drown(); --- 535,539 ----- /* check for falling into pool - added by GAN 10/20/86 */ ! if(IS_POOL(RM_TYP(levl[u.ux][u.uy])) && !Levitation) drown(); *************** *** 636,640 } nomul(0); ! if(IS_POOL(levl[nux][nuy].typ) && !Levitation) drown(); (void) inshop(); --- 639,643 ----- } nomul(0); ! if(IS_POOL(RM_TYP(levl[nux][nuy])) && !Levitation) drown(); (void) inshop(); *************** *** 648,652 #ifdef STUPID boolean tmp1, tmp2, tmp3; ! tmp1 = isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y); tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y); tmp3 = !(IS_POOL(levl[x][y].typ) && !Levitation); --- 651,655 ----- #ifdef STUPID boolean tmp1, tmp2, tmp3; ! tmp1 = isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y); tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y); tmp3 = !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation); *************** *** 650,654 tmp1 = isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y); tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y); ! tmp3 = !(IS_POOL(levl[x][y].typ) && !Levitation); return(tmp1 && tmp2 && tmp3); #else --- 653,657 ----- tmp1 = isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y); tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y); ! tmp3 = !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation); return(tmp1 && tmp2 && tmp3); #else *************** *** 653,657 return(tmp1 && tmp2 && tmp3); #else ! return( isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y) && !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) && !(IS_POOL(levl[x][y].typ) && !Levitation) --- 656,660 ----- return(tmp1 && tmp2 && tmp3); #else ! return( isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y) && !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) && !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation) *************** *** 655,659 return( isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y) && !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) && ! !(IS_POOL(levl[x][y].typ) && !Levitation) ); #endif --- 658,662 ----- return( isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y) && !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) && ! !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation) ); #endif *************** *** 911,915 pline("You attempt a teleport spell."); /* utcsri!carroll */ (void) dotele(); ! if(!IS_POOL(levl[u.ux][u.uy].typ)) return; } pline("You drown."); --- 914,918 ----- pline("You attempt a teleport spell."); /* utcsri!carroll */ (void) dotele(); ! if(!IS_POOL(RM_TYP(levl[u.ux][u.uy]))) return; } pline("You drown."); diff -bc2 u_init.c Amiga:u_init.c *** u_init.c Wed May 4 15:09:14 1988 --- Amiga:u_init.c Mon Jul 25 23:19:17 1988 *************** *** 316,319 u.uhorizon = 6; #endif switch(pc) { case 'c': --- 316,323 ----- u.uhorizon = 6; #endif + /* + * On the AMIGA, this switch would produce a jump table that is too + * large for pc-relative addressing... Besides, pc is in uppercase. + */ switch(pc) { /* case 'c': */ *************** *** 317,321 #endif switch(pc) { ! case 'c': case 'C': Cave_man[C_ARROWS].trquan = 12 + rnd(9)*rnd(9); --- 321,325 ----- */ switch(pc) { ! /* case 'c': */ case 'C': Cave_man[C_ARROWS].trquan = 12 + rnd(9)*rnd(9); *************** *** 324,328 ini_inv(Cave_man); break; ! case 't': case 'T': #ifdef KAA --- 328,332 ----- ini_inv(Cave_man); break; ! /* case 't': */ case 'T': #ifdef KAA *************** *** 343,347 #endif break; ! case 'w': case 'W': for(i = W_MULTSTART; i <= W_MULTEND; i++) --- 347,351 ----- #endif break; ! /* case 'w': */ case 'W': for(i = W_MULTSTART; i <= W_MULTEND; i++) *************** *** 359,363 if(!rn2(5)) ini_inv(Blindfold); break; ! case 'a': case 'A': Fast = INTRINSIC; --- 363,367 ----- if(!rn2(5)) ini_inv(Blindfold); break; ! /* case 'a': */ case 'A': Fast = INTRINSIC; *************** *** 372,376 break; #ifdef KAA ! case 'e': case 'E': Elf[E_ARROWS].trquan = 15+rnd(20); --- 376,380 ----- break; #ifdef KAA ! /* case 'e': */ case 'E': Elf[E_ARROWS].trquan = 15+rnd(20); *************** *** 384,388 else if(!rn2(6)) ini_inv(Lamp); break; ! case 'v': case 'V': Stealth = INTRINSIC; --- 388,392 ----- else if(!rn2(6)) ini_inv(Lamp); break; ! /* case 'v': */ case 'V': Stealth = INTRINSIC; *************** *** 394,398 if(!rn2(6)) ini_inv(Lamp); break; ! case 'h': case 'H': objects[POT_HEALING].oc_name_known=1; --- 398,402 ----- if(!rn2(6)) ini_inv(Lamp); break; ! /* case 'h': */ case 'H': objects[POT_HEALING].oc_name_known=1; *************** *** 405,409 break; #endif ! case 'k': case 'K': u.uhp = u.uhpmax = 12; --- 409,413 ----- break; #endif ! /* case 'k': */ case 'K': u.uhp = u.uhpmax = 12; *************** *** 411,415 ini_inv(Knight); break; ! case 'b': case 'B': u.uhp = u.uhpmax = 14; --- 415,419 ----- ini_inv(Knight); break; ! /* case 'b': */ case 'B': u.uhp = u.uhpmax = 14; *************** *** 419,423 break; #ifdef NEWCLASS ! case 's': case 'S': Fast = INTRINSIC; --- 423,427 ----- break; #ifdef NEWCLASS ! /* case 's': */ case 'S': Fast = INTRINSIC; *************** *** 427,431 ini_inv(Samurai); break; ! case 'n': case 'N': Fast = INTRINSIC; --- 431,435 ----- ini_inv(Samurai); break; ! /* case 'n': */ case 'N': Fast = INTRINSIC; *************** *** 437,441 if(!rn2(5)) ini_inv(Blindfold); break; ! case 'p': case 'P': u.uhp = u.uhpmax = 13; --- 441,445 ----- if(!rn2(5)) ini_inv(Blindfold); break; ! /* case 'p': */ case 'P': u.uhp = u.uhpmax = 13; *************** *** 467,470 #ifdef WIZARD wiz_inv(); #endif --- 471,475 ----- #ifdef WIZARD + if (wizard) wiz_inv(); #endif diff -bc2 write.c Amiga:write.c No differences encountered diff -bc2 zap.c Amiga:zap.c *** zap.c Wed May 4 15:09:28 1988 --- Amiga:zap.c Mon Jul 25 02:30:19 1988 *************** *** 541,547 zy < 3 || zy > ROWNO-3) break; ! if(room->typ == HWALL || ! room->typ == VWALL){ ! room->typ = ROOM; break; } --- 541,547 ----- zy < 3 || zy > ROWNO-3) break; ! if(RM_TYP(*room) == HWALL || ! RM_TYP(*room) == VWALL) { ! RM_SET_TYP(*room, ROOM); break; } *************** *** 547,553 } } else ! if(room->typ == HWALL || room->typ == VWALL || ! room->typ == SDOOR || room->typ == LDOOR){ ! room->typ = DOOR; digdepth -= 2; } else --- 547,553 ----- } } else ! if(RM_TYP(*room) == HWALL || RM_TYP(*room) == VWALL || ! RM_TYP(*room) == SDOOR || RM_TYP(*room) == LDOOR) { ! RM_SET_TYP(*room, DOOR); digdepth -= 2; } else *************** *** 552,557 digdepth -= 2; } else ! if(room->typ == SCORR || !room->typ) { ! room->typ = CORR; digdepth--; } --- 552,557 ----- digdepth -= 2; } else ! if(RM_TYP(*room) == SCORR || !RM_TYP(*room)) { ! RM_SET_TYP(*room, CORR); digdepth--; } *************** *** 638,642 bhitpos.x += ddx; bhitpos.y += ddy; ! typ = levl[bhitpos.x][bhitpos.y].typ; if(mtmp = m_at(bhitpos.x,bhitpos.y)){ if(sym) { --- 638,642 ----- bhitpos.x += ddx; bhitpos.y += ddy; ! typ = RM_TYP(levl[bhitpos.x][bhitpos.y]); if(mtmp = m_at(bhitpos.x,bhitpos.y)){ if(sym) { *************** *** 670,674 /* leave last symbol unless in a pool */ if(sym) ! tmp_at(-1, (levl[bhitpos.x][bhitpos.y].typ == POOL) ? -1 : 0); return(0); } --- 670,674 ----- /* leave last symbol unless in a pool */ if(sym) ! tmp_at(-1, (RM_TYP(levl[bhitpos.x][bhitpos.y]) == POOL) ? -1 : 0); return(0); } *************** *** 698,702 return(mtmp); } ! if(!ZAP_POS(levl[bhitpos.x][bhitpos.y].typ)) { bhitpos.x -= dx; bhitpos.y -= dy; --- 698,702 ----- return(mtmp); } ! if(!ZAP_POS(RM_TYP(levl[bhitpos.x][bhitpos.y]))) { bhitpos.x -= dx; bhitpos.y -= dy; *************** *** 716,720 if(ct % 5 != 0) i++; #ifdef SINKS ! if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) break; /* boomerang falls on sink */ #endif --- 716,720 ----- if(ct % 5 != 0) i++; #ifdef SINKS ! if(IS_SINK(RM_TYP(levl[bhitpos.x][bhitpos.y]))) break; /* boomerang falls on sink */ #endif *************** *** 764,768 sx += dx; sy += dy; ! if((lev = &levl[sx][sy])->typ) Tmp_at(sx,sy); else { int bounce = 0; --- 764,768 ----- sx += dx; sy += dy; ! if((lev = &levl[sx][sy]), RM_TYP(*lev)) Tmp_at(sx,sy); else { int bounce = 0; *************** *** 769,773 if(cansee(sx-dx,sy-dy)) pline("The %s bounces!", fltxt); ! if(ZAP_POS(levl[sx][sy-dy].typ)) bounce = 1; if(ZAP_POS(levl[sx-dx][sy].typ)) { --- 769,773 ----- if(cansee(sx-dx,sy-dy)) pline("The %s bounces!", fltxt); ! if(ZAP_POS(RM_TYP(levl[sx][sy-dy]))) bounce = 1; if(ZAP_POS(RM_TYP(levl[sx-dx][sy]))) { *************** *** 771,775 if(ZAP_POS(levl[sx][sy-dy].typ)) bounce = 1; ! if(ZAP_POS(levl[sx-dx][sy].typ)) { if(!bounce || rn2(2)) bounce = 2; } --- 771,775 ----- if(ZAP_POS(RM_TYP(levl[sx][sy-dy]))) bounce = 1; ! if(ZAP_POS(RM_TYP(levl[sx-dx][sy]))) { if(!bounce || rn2(2)) bounce = 2; } *************** *** 791,795 continue; } ! if(lev->typ == POOL && abstype == 1 /* fire */) { range -= 3; lev->typ = ROOM; --- 791,795 ----- continue; } ! if(RM_TYP(*lev) == POOL && abstype == 1 /* fire */) { range -= 3; RM_SET_TYP(*lev, ROOM); *************** *** 793,797 if(lev->typ == POOL && abstype == 1 /* fire */) { range -= 3; ! lev->typ = ROOM; if(cansee(sx,sy)) { mnewsym(sx,sy); --- 793,797 ----- if(RM_TYP(*lev) == POOL && abstype == 1 /* fire */) { range -= 3; ! RM_SET_TYP(*lev, ROOM); if(cansee(sx,sy)) { mnewsym(sx,sy); *************** *** 800,804 pline("You hear a hissing sound."); } ! if(lev->typ == POOL && abstype == 3 /* cold */) { range -= 3; lev->typ = ROOM; --- 800,804 ----- pline("You hear a hissing sound."); } ! if(RM_TYP(*lev) == POOL && abstype == 3 /* cold */) { range -= 3; RM_SET_TYP(*lev, ROOM); *************** *** 802,806 if(lev->typ == POOL && abstype == 3 /* cold */) { range -= 3; ! lev->typ = ROOM; if(cansee(sx,sy)) { mnewsym(sx,sy); --- 802,806 ----- if(RM_TYP(*lev) == POOL && abstype == 3 /* cold */) { range -= 3; ! RM_SET_TYP(*lev, ROOM); if(cansee(sx,sy)) { mnewsym(sx,sy); *************** *** 889,893 stop_occupation(); } ! if(!ZAP_POS(lev->typ)) { int bounce = 0, rmn; if(cansee(sx,sy)) pline("The %s bounces!",fltxt); --- 889,893 ----- stop_occupation(); } ! if(!ZAP_POS(RM_TYP(*lev))) { int bounce = 0, rmn; if(cansee(sx,sy)) pline("The %s bounces!",fltxt); *************** *** 897,902 dy = -dy; } else { ! if(ZAP_POS(rmn = levl[sx][sy-dy].typ) && ! (IS_ROOM(rmn) || ZAP_POS(levl[sx+dx][sy-dy].typ))) bounce = 1; if(ZAP_POS(rmn = levl[sx-dx][sy].typ) && --- 897,902 ----- dy = -dy; } else { ! if(ZAP_POS(rmn = RM_TYP(levl[sx][sy-dy])) && ! (IS_ROOM(rmn) || ZAP_POS(RM_TYP(levl[sx+dx][sy-dy])))) bounce = 1; if(ZAP_POS(rmn = RM_TYP(levl[sx-dx][sy])) && *************** *** 900,905 (IS_ROOM(rmn) || ZAP_POS(levl[sx+dx][sy-dy].typ))) bounce = 1; ! if(ZAP_POS(rmn = levl[sx-dx][sy].typ) && ! (IS_ROOM(rmn) || ZAP_POS(levl[sx-dx][sy+dy].typ))) if(!bounce || rn2(2)) bounce = 2; --- 900,905 ----- (IS_ROOM(rmn) || ZAP_POS(RM_TYP(levl[sx+dx][sy-dy])))) bounce = 1; ! if(ZAP_POS(rmn = RM_TYP(levl[sx-dx][sy])) && ! (IS_ROOM(rmn) || ZAP_POS(RM_TYP(levl[sx-dx][sy+dy])))) if(!bounce || rn2(2)) bounce = 2; SHAR_EOF # End of shell archive exit 0 -- Bob Page, U of Lowell CS Dept. page@swan.ulowell.edu ulowell!page Have five nice days.