|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 27579 (0x6bbb)
Types: TextFile
Names: »changes«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/X/Xwanderer/changes«
diff -c ORIG/old/Makefile ./Makefile
*** ORIG/old/Makefile Tue Nov 15 14:10:41 1988
--- ./Makefile Tue Nov 15 14:16:27 1988
***************
*** 4,11 ****
#
# GOALS: the programs you want to make
#
! GOALS = wanderer xwanderer dev xdev erase
! #GOALS = xwanderer
#
# HEADERS: the header files
#
--- 4,11 ----
#
# GOALS: the programs you want to make
#
! GOALS = wanderer xwanderer dev xdev erase icon_fonts
! #GOALS = xwanderer icon_fonts
#
# HEADERS: the header files
#
***************
*** 14,20 ****
# CUR_OBJS: the object files for the curses based wanderer
# XWIN_OBJS: object files for the X based wanderer
# DEV_OBJS: object files for the curses base dev. utility
- # COM_OBJS: object files common to the X based progams and the curses base ones
# ERASE_OBJS: object files for the erase utility
#
CUR_OBJS = displayC.o fallC.o gameC.o iconC.o jumpC.o mC.o read.o scoresC.o \
--- 14,19 ----
***************
*** 23,29 ****
helpscrX.o
DEV_OBJS= displayC.o iconC.o gameD.o mD.o fallC.o devread.o helpscrC.o
XDEV_OBJS= displayX.o iconX.o gameXD.o mXD.o fallX.o devread.o helpscrX.o
- COM_OBJS= read.o
ERASE_OBJS= erase.o
SRCS= devread.c display.c erase.c fall.c game.c gamedev.c helpscr.c \
icon.c jump.c m.c pixmapdecl.h read.c scores.c wand_head.h
--- 22,27 ----
***************
*** 30,40 ****
#
# all of the object files
#
! ALLOBJS = $(CUR_OBJS) $(XWIN_OBJS) $(DEV_OBJS) $(COM_OBJS) $(ERASE_OBJS)
#
# flags for the compiler
#
! CFLAGS = -g
#
# libraries for an X based program
#
--- 28,38 ----
#
# all of the object files
#
! ALLOBJS = $(CUR_OBJS) $(XWIN_OBJS) $(DEV_OBJS) $(ERASE_OBJS)
#
# flags for the compiler
#
! CFLAGS = -g -I/x11
#
# libraries for an X based program
#
***************
*** 51,67 ****
# BINDIR: where to put the executables
# SCREENPATH: where to put the screens (see wand_head.h also)
#
! BINDIR=/mnt/cuddy/bin
! SCREENPATH= /mnt/cuddy/lib/wanderer
all: $(GOALS)
@echo DONE
! wanderer: $(CUR_OBJS) $(COM_OBJS)
! $(CC) $(CFLAGS) -o wanderer $(CUR_OBJS) $(COM_OBJS) $(CLIBS)
! xwanderer: $(XWIN_OBJS) $(COM_OBJS)
! $(CC) $(CFLAGS) -o xwanderer $(XWIN_OBJS) $(COM_OBJS) $(XLIBS)
erase: $(ERASE_OBJS)
$(CC) $(CFLAGS) -o erase $(ERASE_OBJS)
--- 49,65 ----
# BINDIR: where to put the executables
# SCREENPATH: where to put the screens (see wand_head.h also)
#
! BINDIR=/usr/local/bin
! SCREENPATH= /usr/local/lib/wanderer/wanderer
all: $(GOALS)
@echo DONE
! wanderer: $(CUR_OBJS)
! $(CC) $(CFLAGS) -o wanderer $(CUR_OBJS) $(CLIBS)
! xwanderer: $(XWIN_OBJS)
! $(CC) $(CFLAGS) -o xwanderer $(XWIN_OBJS) $(XLIBS)
erase: $(ERASE_OBJS)
$(CC) $(CFLAGS) -o erase $(ERASE_OBJS)
***************
*** 77,101 ****
cp screens/* $(SCREENPATH)
cp wanderer.help $(SCREENPATH)
dclean:
! $(RM) $(DEV_OBJS) $(COM_OBJS)
xdclean:
! $(RM) $(XDEV_OBJS) $(COM_OBJS)
wclean:
! $(RM) $(CUR_OBJS) $(COM_OBJS)
xclean:
! $(RM) $(XWIN_OBJS) $(COM_OBJS)
tags: $(SRCS)
ctags $(SRCS)
! clean: dclean wclean xclean xdclean
$(RM) core make.out lint.out tags .#*
clobber: clean
$(RM) dev xdev wanderer xwanderer erase
- $(COM_OBJS): $(HEADERS)
#
# special multiple compile targets
#
--- 75,104 ----
cp screens/* $(SCREENPATH)
cp wanderer.help $(SCREENPATH)
+ icon_fonts:
+ cd icons; make
+
+ icon_clean:
+ cd icons; make clean
+
dclean:
! $(RM) $(DEV_OBJS)
xdclean:
! $(RM) $(XDEV_OBJS)
wclean:
! $(RM) $(CUR_OBJS)
xclean:
! $(RM) $(XWIN_OBJS)
tags: $(SRCS)
ctags $(SRCS)
! clean: dclean wclean xclean xdclean icon_clean
$(RM) core make.out lint.out tags .#*
clobber: clean
$(RM) dev xdev wanderer xwanderer erase
#
# special multiple compile targets
#
Only in .: ORIG
Only in .: RCS
Only in .: changes
diff -c ORIG/old/display.c ./display.c
*** ORIG/old/display.c Tue Nov 15 14:10:44 1988
--- ./display.c Tue Nov 15 14:16:42 1988
***************
*** 75,81 ****
/* erase the magnified map */
XClearArea(dpy, win, 5, 5, ICON_WIDE * 11, ICON_HIGH * 7, 0);
}
! for (x= -1; x <= ROWLEN+1; x++)
paint_small_square(x ,-1, '=');
for(y = 0;y < NOOFROWS; y++)
--- 75,82 ----
/* erase the magnified map */
XClearArea(dpy, win, 5, 5, ICON_WIDE * 11, ICON_HIGH * 7, 0);
}
! do_repaint = 1;
! for (x= -1; x < ROWLEN+1; x++)
paint_small_square(x ,-1, '=');
for(y = 0;y < NOOFROWS; y++)
***************
*** 88,99 ****
ch = ' ';
paint_small_square(x,y,ch);
}
- paint_small_square(x,y,'=');
row_ptr++;
}
! for (x= -1; x <= ROWLEN+1; x++)
paint_small_square(x, y, '=');
- do_repaint = 1;
XDrawLine(dpy,win,linegc,2,2,2,ICON_HIGH*7+6);
XDrawLine(dpy,win,linegc,2,ICON_HIGH*7+6,ICON_WIDE*11+6,ICON_HIGH*7+6);
XDrawLine(dpy,win,linegc,ICON_WIDE*11+6,ICON_HIGH*7+6,ICON_WIDE*11+6,2);
--- 89,98 ----
ch = ' ';
paint_small_square(x,y,ch);
}
row_ptr++;
}
! for (x= -1; x <= ROWLEN; x++)
paint_small_square(x, y, '=');
XDrawLine(dpy,win,linegc,2,2,2,ICON_HIGH*7+6);
XDrawLine(dpy,win,linegc,2,ICON_HIGH*7+6,ICON_WIDE*11+6,ICON_HIGH*7+6);
XDrawLine(dpy,win,linegc,ICON_WIDE*11+6,ICON_HIGH*7+6,ICON_WIDE*11+6,2);
diff -c ORIG/old/fall.c ./fall.c
*** ORIG/old/fall.c Tue Nov 15 14:10:18 1988
--- ./fall.c Tue Nov 15 14:16:44 1988
***************
*** 94,99 ****
--- 94,100 ----
#else
if((y<(sy+4)) && (y>(sy-4)) && (nx>(sx-6)) && (nx<(sx+6)) || tinymode)
draw_symbol((nx-sx+5),(y-sy+3),'O');
+ update_symbols ();
#endif
retval+=fall(mx,my,nx ,y+1,sx,sy,screen,howdead);
retval+=fall(mx,my,nx ,y+1,sx,sy,screen,howdead);
***************
*** 144,149 ****
--- 145,151 ----
#else
if((nyr<(sy+4)) && (nyr>(sy-4)) && (x<(sx+7)) && (x>(sx-5))||tinymode)
draw_symbol((x-sx+5),(nyr-sy+3),'<');
+ update_symbols ();
#endif
retval+=fall(mx,my,x-1,nyr,sx,sy,screen,howdead);
retval+=fall(mx,my,x+1,y-1,sx,sy,screen,howdead);
***************
*** 194,199 ****
--- 196,202 ----
#else
if((nyl<(sy+4)) && (nyl>(sy-4)) && (x<(sx+5)) && (x>(sx-7))||tinymode)
draw_symbol((x-sx+5),(nyl-sy+3),'>');
+ update_symbols ();
#endif
retval+=fall(mx,my,x+1,nyl,sx,sy,screen,howdead);
retval+=fall(mx,my,x+1,y-1,sx,sy,screen,howdead);
diff -c ORIG/old/game.c ./game.c
*** ORIG/old/game.c Tue Nov 15 14:10:26 1988
--- ./game.c Tue Nov 15 14:16:48 1988
***************
*** 248,254 ****
move(16,0);
refresh();
#else
! *bell = 1;
score_message(12,"Bell OFF");
#endif
}
--- 248,254 ----
move(16,0);
refresh();
#else
! *bell = 0;
score_message(12,"Bell OFF");
#endif
}
***************
*** 824,828 ****
--- 824,831 ----
}
}
+ #ifdef XWANDER
+ update_symbols ();
+ #endif
return(howdead);
}
diff -c ORIG/old/helpscr.c ./helpscr.c
*** ORIG/old/helpscr.c Tue Nov 15 14:10:52 1988
--- ./helpscr.c Tue Nov 15 14:16:52 1988
***************
*** 385,403 ****
#endif
}
- xydrawsymbol(x,y,ch)
- {
- #ifdef XWANDER
- Pixmap p = (Pixmap) symbol_pixmap(ch);
- GC g = (GC) symbol_gc(ch);
-
- XCopyArea(dpy, p, win, g, 0, 0, ICON_WIDE, ICON_HIGH,
- x * tablefontwide + 10, y * tablefonthigh + 10);
- #else
- draw_symbol(x, y, ch);
- #endif
- }
-
static char make_filenamebuf[1024];
char *make_filename(path,file) /* make a filepath from 'path' and 'file' */
char *path, *file;
--- 385,390 ----
diff -c ORIG/old/icon.c ./icon.c
*** ORIG/old/icon.c Tue Nov 15 14:10:33 1988
--- ./icon.c Tue Nov 15 14:16:57 1988
***************
*** 3,8 ****
--- 3,19 ----
#ifdef XWANDER
+ #include "icons/font.h"
+
+ int use_icons;
+
+ Font regular_icon_font;
+ Font tiny_icon_font;
+ GC regular_icon_gc;
+ GC tiny_icon_gc;
+
+ unsigned long fg, bg;
+
void paint_small_square();
extern playerfacing;
extern tinymode;
***************
*** 120,155 ****
move(y+2,x+1);
addstr(*iconrow);
}
#else
Pixmap tiny_symbol_pixmap(), symbol_pixmap();
GC symbol_gc();
void draw_symbol(x,y,ch)
int x,y;
char ch;
{
! Pixmap p = symbol_pixmap(ch);
! GC g = symbol_gc(ch);
! static int drawn[ROWLEN+1][NOOFROWS+1];
! if (tinymode) { paint_small_square(x,y,ch); return; }
! if (do_repaint) {
int i, j;
! for (i = 0; i < ROWLEN; i++)
! for (j = 0; j < NOOFROWS+1; j++)
! drawn[i][j] = -1;
do_repaint = 0;
}
/* only paint area if we have to */
! if (drawn[x][y] != ch) {
! XCopyArea(dpy, p, win, g, 0, 0, ICON_WIDE, ICON_HIGH,
! x * ICON_WIDE + 5, y * ICON_HIGH + 5);
! drawn[x][y] = ch;
}
}
Pixmap symbol_pixmap(ch)
int ch;
{
--- 131,328 ----
move(y+2,x+1);
addstr(*iconrow);
}
+
+ xydrawsymbol(x,y,ch)
+ {
+ draw_symbol(x, y, ch);
+ }
+
#else
Pixmap tiny_symbol_pixmap(), symbol_pixmap();
GC symbol_gc();
+ static int drawn_data[ROWLEN+1+1][NOOFROWS+1+1];
+ static int onscreen_data[ROWLEN+1+1][NOOFROWS+1+1];
+ #define check_x(x) (((x) < -1 || (x) > ROWLEN+1) ? abort() : 0)
+ #define check_y(y) (((y) < -1 || (y) > NOOFROWS+1) ? abort() : 0)
+ #define range_check(x,y) (check_x(x), check_y(y))
+ #define drawn(x,y) (range_check(x,y),drawn_data[(x)+1][(y)+1])
+ #define onscreen(x,y) (range_check(x,y),onscreen_data[x+1][y+1])
+ #define set_drawn(x,y,c) (range_check(x,y),(drawn_data[(x)+1][(y)+1] = (c)))
+ #define set_onscreen(x,y,c) (range_check(x,y),(onscreen_data[x+1][y+1] = (c)))
+
+ static int screenmode = -1;
+
void draw_symbol(x,y,ch)
int x,y;
char ch;
{
! int xp, yp, width, height;
! if (do_repaint || screenmode != tinymode) {
int i, j;
! for (i = -1; i < ROWLEN+1; i++)
! for (j = -1; j < NOOFROWS+1; j++) {
! set_drawn(i,j, -1);
! set_onscreen(i,j, -1);
! }
do_repaint = 0;
+ screenmode = tinymode;
}
/* only paint area if we have to */
! if (drawn(x,y) != ch) {
! if (use_icons) {
! Pixmap p;
! GC g = symbol_gc(ch);
!
! if (tinymode) {
! p = tiny_symbol_pixmap(ch);
! xp = x * SMALL_WIDE + 13;
! yp = SMALL_HIGH + 83;
! width = SMALL_WIDE;
! height = SMALL_HIGH;
! } else {
! p = symbol_pixmap (ch);
! xp = x * ICON_WIDE + 5;
! yp = y * ICON_HIGH + 5;
! width = ICON_WIDE;
! height = ICON_HIGH;
! }
! XCopyArea(dpy, p, win, g, 0, 0, width, height, xp, yp);
! }
! set_drawn(x,y, ch);
}
}
+ xydrawsymbol(x,y,ch)
+ {
+ if (use_icons) {
+ Pixmap p = (Pixmap) symbol_pixmap(ch);
+ GC g = (GC) symbol_gc(ch);
+
+ XCopyArea(dpy, p, win, g, 0, 0, ICON_WIDE, ICON_HIGH,
+ x * tablefontwide + 10, y * tablefonthigh + 10);
+ } else {
+ char c;
+ int xp, yp;
+ GC g = regular_icon_gc;
+
+ xp = x * tablefontwide + 10;
+ yp = y * tablefonthigh + 10 + ICON_HIGH;
+ c = symbol_fontchar (ch);
+ XDrawImageString (dpy, win, g, xp, yp, &c, 1);
+ }
+ }
+
+ update_symbols ()
+ {
+ char line[ROWLEN+1+1];
+ int start;
+ int i, j, xp, yp;
+ GC g;
+
+ if (!use_icons) {
+ start = -2;
+ for (j = -1; j < NOOFROWS+1; j++) {
+ for (i = -1; i <= ROWLEN+1; i++) {
+ if (i != ROWLEN+1 && drawn(i,j) != onscreen(i,j)) {
+ if (start == -2)
+ start = i;
+ line[i+1] = symbol_fontchar(drawn(i,j));
+ set_onscreen(i,j, drawn(i,j));
+ } else if (start != -2) {
+ if (tinymode) {
+ g = tiny_icon_gc;
+ xp = start * SMALL_WIDE + 13;
+ yp = (j + 1) * SMALL_HIGH + 83;
+ } else {
+ g = regular_icon_gc;
+ xp = start * ICON_WIDE + 5;
+ yp = (j + 1) * ICON_HIGH + 5;
+ }
+ XDrawImageString (dpy, win, g, xp, yp, &line[start+1],
+ i - start);
+ start = -2;
+ }
+ }
+ }
+ }
+ XFlush (dpy);
+ }
+
+ int
+ symbol_fontchar(ch)
+ int ch;
+ {
+ int picture;
+
+ switch(ch) {
+ case ' ':
+ picture = W_space;
+ break;
+ case '#':
+ picture = W_wall;
+ break;
+ case '<':
+ picture = W_larrow;
+ break;
+ case '>':
+ picture = W_rarrow;
+ break;
+ case 'O':
+ picture = W_rock;
+ break;
+ case ':':
+ picture = W_dirt;
+ break;
+ case '/':
+ picture = W_fwdslide;
+ break;
+ case '\\':
+ picture = W_backslide;
+ break;
+ case '*':
+ picture = W_diamond;
+ break;
+ case '=':
+ picture = W_brick;
+ break;
+ case '@':
+ if (playerfacing == 1)
+ picture = W_playerl;
+ else
+ picture = W_playerr;
+ break;
+ case 'T':
+ picture = W_teleport;
+ break;
+ case 'X':
+ picture = W_wayout;
+ break;
+ case '!':
+ picture = W_landmine;
+ break;
+ case 'M':
+ picture = W_monster;
+ break;
+ case 'S':
+ picture = W_sprite;
+ break;
+ case 'C':
+ picture = W_timecapsule;
+ break;
+ case '+':
+ picture = W_cage;
+ break;
+ default:
+ picture = W_brick;
+ break;
+ }
+ return(picture);
+ }
+
Pixmap symbol_pixmap(ch)
int ch;
{
***************
*** 224,237 ****
int x,y;
char ch;
{
! Pixmap p = tiny_symbol_pixmap(ch);
! GC g = symbol_gc(ch);
! x++;
! y++;
! if (ch == ' ' && !tinymode) return;
! XCopyArea(dpy, p, win, g, 0, 0, SMALL_WIDE, SMALL_HIGH,
! x * SMALL_WIDE + 13, y * SMALL_HIGH + 83);
}
Pixmap tiny_symbol_pixmap(ch)
--- 397,406 ----
int x,y;
char ch;
{
! if (ch == ' ' && !tinymode)
! return;
! draw_symbol (x, y, ch);
}
Pixmap tiny_symbol_pixmap(ch)
***************
*** 323,330 ****
pid = XCreatePixmap(dpy,root,width,height,
DefaultDepth(dpy,DefaultScreen(dpy)));
! gcv.foreground = BlackPixel(dpy,DefaultScreen(dpy));
! gcv.background = WhitePixel(dpy,DefaultScreen(dpy));
pgc = XCreateGC(dpy, pid, GCForeground | GCBackground, &gcv);
ximage.height = height;
--- 492,499 ----
pid = XCreatePixmap(dpy,root,width,height,
DefaultDepth(dpy,DefaultScreen(dpy)));
! gcv.foreground = fg;
! gcv.background = bg;
pgc = XCreateGC(dpy, pid, GCForeground | GCBackground, &gcv);
ximage.height = height;
***************
*** 391,449 ****
build_pixmaps()
{
char *cp;
! space_pm = MakePixmap(dpy, win, space_bm_bits, 64, 64);
! wall_pm = MakePixmap(dpy, win, wall_bm_bits, 64, 64);
! larrow_pm = MakePixmap(dpy, win, larrow_bm_bits, 64, 64);
! rarrow_pm = MakePixmap(dpy, win, rarrow_bm_bits, 64, 64);
! rock_pm = MakePixmap(dpy, win, rock_bm_bits, 64, 64);
! dirt_pm = MakePixmap(dpy, win, dirt_bm_bits, 64, 64);
! fwdslide_pm = MakePixmap(dpy, win, fwdslide_bm_bits, 64, 64);
! backslide_pm = MakePixmap(dpy, win, backslide_bm_bits, 64, 64);
! diamond_pm = MakePixmap(dpy, win, diamond_bm_bits, 64, 64);
! brick_pm = MakePixmap(dpy, win, brick_bm_bits, 64, 64);
! playerl_pm = MakePixmap(dpy, win, playerl_bm_bits, 64, 64);
! playerr_pm = MakePixmap(dpy, win, playerr_bm_bits, 64, 64);
! wayout_pm = MakePixmap(dpy, win, wayout_bm_bits, 64, 64);
! landmine_pm = MakePixmap(dpy, win, landmine_bm_bits, 64, 64);
! monster_pm = MakePixmap(dpy, win, monster_bm_bits, 64, 64);
! sprite_pm = MakePixmap(dpy, win, sprite_bm_bits, 64, 64);
! timecapsule_pm = MakePixmap(dpy, win, timecapsule_bm_bits, 64, 64);
! cage_pm = MakePixmap(dpy, win, cage_bm_bits, 64, 64);
! teleport_pm = MakePixmap(dpy, win, teleport_bm_bits, 64, 64);
! whoops_pm = MakePixmap(dpy, win, whoops_bm_bits, 64, 64);
!
! space_tpm = MakePixmap(dpy, win, space_tbm_bits, 16, 16);
! wall_tpm = MakePixmap(dpy, win, wall_tbm_bits, 16, 16);
! larrow_tpm = MakePixmap(dpy, win, larrow_tbm_bits, 16, 16);
! rarrow_tpm = MakePixmap(dpy, win, rarrow_tbm_bits, 16, 16);
! rock_tpm = MakePixmap(dpy, win, rock_tbm_bits, 16, 16);
! dirt_tpm = MakePixmap(dpy, win, dirt_tbm_bits, 16, 16);
! fwdslide_tpm = MakePixmap(dpy, win, fwdslide_tbm_bits, 16, 16);
! backslide_tpm = MakePixmap(dpy, win, backslide_tbm_bits, 16, 16);
! diamond_tpm = MakePixmap(dpy, win, diamond_tbm_bits, 16, 16);
! brick_tpm = MakePixmap(dpy, win, brick_tbm_bits, 16, 16);
! player_tpm = MakePixmap(dpy, win, player_tbm_bits, 16, 16);
! wayout_tpm = MakePixmap(dpy, win, wayout_tbm_bits, 16, 16);
! landmine_tpm = MakePixmap(dpy, win, landmine_tbm_bits, 16, 16);
! monster_tpm = MakePixmap(dpy, win, monster_tbm_bits, 16, 16);
! sprite_tpm = MakePixmap(dpy, win, sprite_tbm_bits, 16, 16);
! timecapsule_tpm = MakePixmap(dpy, win, timecapsule_tbm_bits, 16, 16);
! cage_tpm = MakePixmap(dpy, win, cage_tbm_bits, 16, 16);
! teleport_tpm = MakePixmap(dpy, win, teleport_tbm_bits, 16, 16);
! whoops_tpm = MakePixmap(dpy, win, whoops_tbm_bits, 16, 16);
/* build all of the GC's here too! */
! globgc = XCreateGC(dpy, win, 0, 0);
! XSetFunction(dpy, globgc, GXcopyInverted);
/* create the message font gc and load the message font */
! msgfontgc = XCreateGC(dpy, win, 0, 0);
! XSetFunction(dpy, msgfontgc, GXcopyInverted);
! linegc = XCreateGC(dpy, win, 0, 0);
! XSetFunction(dpy, linegc, GXcopy);
XSetLineAttributes(dpy,linegc, 2, LineSolid, CapButt, JoinMiter);
cp = (char *)getenv("MSGFONT");
! if (!cp) cp = "vr-20";
msgfont = XLoadQueryFont(dpy, cp);
if (msgfont == 0) {
fprintf(stderr,"Can't load (msgfont) %s. Bye!\n",cp);
--- 560,637 ----
build_pixmaps()
{
char *cp;
+ XFontStruct *regular_info;
+ XFontStruct *tiny_info;
+ XGCValues gcv;
+ int mask = GCForeground|GCBackground;
! regular_info = XLoadQueryFont (dpy, NORMAL_NAME);
! tiny_info = XLoadQueryFont (dpy, TINY_NAME);
! fg = WhitePixel (dpy, DefaultScreen (dpy));
! bg = BlackPixel (dpy, DefaultScreen (dpy));
! gcv.foreground = fg;
! gcv.background = bg;
! if (!regular_info || !tiny_info)
! use_icons = 1;
! else {
! regular_icon_font = regular_info->fid;
! gcv.font = regular_icon_font;
! regular_icon_gc = XCreateGC (dpy, win, GCForeground|GCBackground|GCFont, &gcv);
! tiny_icon_font = tiny_info->fid;
! gcv.font = tiny_icon_font;
! tiny_icon_gc = XCreateGC (dpy, win, GCForeground|GCBackground|GCFont, &gcv);
! }
! if (use_icons) {
! space_pm = MakePixmap(dpy, win, space_bm_bits, 64, 64);
! wall_pm = MakePixmap(dpy, win, wall_bm_bits, 64, 64);
! larrow_pm = MakePixmap(dpy, win, larrow_bm_bits, 64, 64);
! rarrow_pm = MakePixmap(dpy, win, rarrow_bm_bits, 64, 64);
! rock_pm = MakePixmap(dpy, win, rock_bm_bits, 64, 64);
! dirt_pm = MakePixmap(dpy, win, dirt_bm_bits, 64, 64);
! fwdslide_pm = MakePixmap(dpy, win, fwdslide_bm_bits, 64, 64);
! backslide_pm = MakePixmap(dpy, win, backslide_bm_bits, 64, 64);
! diamond_pm = MakePixmap(dpy, win, diamond_bm_bits, 64, 64);
! brick_pm = MakePixmap(dpy, win, brick_bm_bits, 64, 64);
! playerl_pm = MakePixmap(dpy, win, playerl_bm_bits, 64, 64);
! playerr_pm = MakePixmap(dpy, win, playerr_bm_bits, 64, 64);
! wayout_pm = MakePixmap(dpy, win, wayout_bm_bits, 64, 64);
! landmine_pm = MakePixmap(dpy, win, landmine_bm_bits, 64, 64);
! monster_pm = MakePixmap(dpy, win, monster_bm_bits, 64, 64);
! sprite_pm = MakePixmap(dpy, win, sprite_bm_bits, 64, 64);
! timecapsule_pm = MakePixmap(dpy, win, timecapsule_bm_bits, 64, 64);
! cage_pm = MakePixmap(dpy, win, cage_bm_bits, 64, 64);
! teleport_pm = MakePixmap(dpy, win, teleport_bm_bits, 64, 64);
! whoops_pm = MakePixmap(dpy, win, whoops_bm_bits, 64, 64);
!
! space_tpm = MakePixmap(dpy, win, space_tbm_bits, 16, 16);
! wall_tpm = MakePixmap(dpy, win, wall_tbm_bits, 16, 16);
! larrow_tpm = MakePixmap(dpy, win, larrow_tbm_bits, 16, 16);
! rarrow_tpm = MakePixmap(dpy, win, rarrow_tbm_bits, 16, 16);
! rock_tpm = MakePixmap(dpy, win, rock_tbm_bits, 16, 16);
! dirt_tpm = MakePixmap(dpy, win, dirt_tbm_bits, 16, 16);
! fwdslide_tpm = MakePixmap(dpy, win, fwdslide_tbm_bits, 16, 16);
! backslide_tpm = MakePixmap(dpy, win, backslide_tbm_bits, 16, 16);
! diamond_tpm = MakePixmap(dpy, win, diamond_tbm_bits, 16, 16);
! brick_tpm = MakePixmap(dpy, win, brick_tbm_bits, 16, 16);
! player_tpm = MakePixmap(dpy, win, player_tbm_bits, 16, 16);
! wayout_tpm = MakePixmap(dpy, win, wayout_tbm_bits, 16, 16);
! landmine_tpm = MakePixmap(dpy, win, landmine_tbm_bits, 16, 16);
! monster_tpm = MakePixmap(dpy, win, monster_tbm_bits, 16, 16);
! sprite_tpm = MakePixmap(dpy, win, sprite_tbm_bits, 16, 16);
! timecapsule_tpm = MakePixmap(dpy, win, timecapsule_tbm_bits, 16, 16);
! cage_tpm = MakePixmap(dpy, win, cage_tbm_bits, 16, 16);
! teleport_tpm = MakePixmap(dpy, win, teleport_tbm_bits, 16, 16);
! whoops_tpm = MakePixmap(dpy, win, whoops_tbm_bits, 16, 16);
! }
/* build all of the GC's here too! */
! globgc = XCreateGC(dpy, win, mask, &gcv);
/* create the message font gc and load the message font */
! msgfontgc = XCreateGC(dpy, win, mask, &gcv);
! linegc = XCreateGC(dpy, win, mask, &gcv);
XSetLineAttributes(dpy,linegc, 2, LineSolid, CapButt, JoinMiter);
cp = (char *)getenv("MSGFONT");
! if (!cp) cp = "fixed";
msgfont = XLoadQueryFont(dpy, cp);
if (msgfont == 0) {
fprintf(stderr,"Can't load (msgfont) %s. Bye!\n",cp);
***************
*** 454,462 ****
XSetFont(dpy, msgfontgc, msgfont->fid);
/* create the highscore table gc and load the font */
! tablegc = XCreateGC(dpy, win, 0, 0);
cp =(char *) getenv("TABLEFONT");
! if (!cp) cp = "8x13bold";
tablefont = XLoadQueryFont(dpy, cp);
if (tablefont == 0) {
fprintf(stderr,"Can't load (tablefont) %s. Bye!\n",cp);
--- 642,650 ----
XSetFont(dpy, msgfontgc, msgfont->fid);
/* create the highscore table gc and load the font */
! tablegc = XCreateGC(dpy, win, mask, &gcv);
cp =(char *) getenv("TABLEFONT");
! if (!cp) cp = "fixed";
tablefont = XLoadQueryFont(dpy, cp);
if (tablefont == 0) {
fprintf(stderr,"Can't load (tablefont) %s. Bye!\n",cp);
***************
*** 468,477 ****
XSetFont(dpy, tablegc, tablefont->fid);
/* create the score font gc and load the score font */
! scorefontgc = XCreateGC(dpy, win, 0, 0);
! XSetFunction(dpy, scorefontgc, GXcopyInverted);
cp = (char*)getenv("SCOREFONT");
! if (!cp) cp = "fcor-20";
scorefont = XLoadQueryFont(dpy,cp);
if (scorefont == 0) {
fprintf(stderr,"Can't load (scorefont). Bye!\n");
--- 656,664 ----
XSetFont(dpy, tablegc, tablefont->fid);
/* create the score font gc and load the score font */
! scorefontgc = XCreateGC(dpy, win, mask, &gcv);
cp = (char*)getenv("SCOREFONT");
! if (!cp) cp = "fixed";
scorefont = XLoadQueryFont(dpy,cp);
if (scorefont == 0) {
fprintf(stderr,"Can't load (scorefont). Bye!\n");
***************
*** 484,491 ****
--- 671,680 ----
display_monster(mx)
{
+ /*
Pixmap m = symbol_pixmap((mx != (-1) ? 'M' : ' '));
GC mgc = symbol_gc((mx != (-1) ? 'M' : ' '));
+ */
int x1 = ICON_WIDE * 12 + 54;
int x2 = x1 + (ICON_WIDE) + 6;
int y1 = scorefonthigh * 10 + 10;
***************
*** 496,503 ****
--- 685,695 ----
XDrawLine(dpy, win, linegc, x2, y2, x1, y2);
XDrawLine(dpy, win, linegc, x1, y2, x1, y1);
+ xydrawsymbol(x1 + 3, y1 + 3, mx != (-1) ? 'M' : ' ');
+ /*
XCopyArea(dpy, m, win, mgc, 0, 0, ICON_WIDE, ICON_HIGH,
x1 + 3, y1 + 3);
+ */
/* score_message(9," Monster Detector"); */
}
***************
*** 561,567 ****
/* printf("In getchar\n"); */
while (1) {
! XNextEvent(dpy, &(event));
switch(event.type) {
case Expose:
if (event.xexpose.count != 0) {
--- 753,760 ----
/* printf("In getchar\n"); */
while (1) {
! update_symbols ();
! XNextEvent(dpy, &(event));
switch(event.type) {
case Expose:
if (event.xexpose.count != 0) {
Common subdirectories: ORIG/old/icons and ./icons
Only in .: lib
diff -c ORIG/old/m.c ./m.c
*** ORIG/old/m.c Tue Nov 15 14:11:02 1988
--- ./m.c Tue Nov 15 14:17:01 1988
***************
*** 253,259 ****
if (ch == 'Y' || ch == 'N')
break;
erase_message(1);
! message(1,"You dolt, type `Y' or `N': ");
dobeep();
}
if (ch == 'N') break; else {
--- 253,259 ----
if (ch == 'Y' || ch == 'N')
break;
erase_message(1);
! message(1,"Please type `Y' or `N': ");
dobeep();
}
if (ch == 'N') break; else {
Only in ORIG/old: make.out
diff -c ORIG/old/read.c ./read.c
*** ORIG/old/read.c Tue Nov 15 14:13:24 1988
--- ./read.c Tue Nov 15 14:17:04 1988
***************
*** 22,28 ****
printf("no maxmoves specified: assuming infinite movement.\n");
*maxmoves= (-1);
}
};
- fclose(fp);
return (fp == NULL);
}
--- 22,28 ----
printf("no maxmoves specified: assuming infinite movement.\n");
*maxmoves= (-1);
}
+ fclose(fp);
};
return (fp == NULL);
}
diff -c ORIG/old/scores.c ./scores.c
*** ORIG/old/scores.c Tue Nov 15 14:11:05 1988
--- ./scores.c Tue Nov 15 14:17:19 1988
***************
*** 63,68 ****
--- 63,69 ----
{
FILE *fp;
int numread;
+ char line[1024];
if((fp = fopen(HISCOREPATH,"r")) == NULL)
{
numread = 0;
***************
*** 69,75 ****
}
else
{
! numread = fread(table_ptr, sizeof(score_entry), ENTRIES, fp);
fclose(fp);
}
return numread;
--- 70,84 ----
}
else
{
! numread = 0;
! while (fgets (line, sizeof (line), fp) != NULL) {
! sscanf (line, "%[^\t]\t%[^\t]\t%d %d\n",
! table_ptr[numread].howdead,
! table_ptr[numread].name,
! &table_ptr[numread].score,
! &table_ptr[numread].level);
! numread++;
! }
fclose(fp);
}
return numread;
***************
*** 159,165 ****
numread = ( (numread > ENTRIES) ? ENTRIES : numread );
fp = fopen(HISCOREPATH,"w");
table_ptr = table;
! numsaved = fwrite(table_ptr, sizeof(score_entry), numread, fp);
chmod(HISCOREPATH,0666);
if(numsaved < numread)
{
--- 168,180 ----
numread = ( (numread > ENTRIES) ? ENTRIES : numread );
fp = fopen(HISCOREPATH,"w");
table_ptr = table;
! for (numsaved = 0; numsaved < numread; numsaved++) {
! fprintf (fp, "%s\t%s\t%d %d\n",
! table_ptr[numsaved].howdead,
! table_ptr[numsaved].name,
! table_ptr[numsaved].score,
! table_ptr[numsaved].level);
! }
chmod(HISCOREPATH,0666);
if(numsaved < numread)
{
Common subdirectories: ORIG/old/screens and ./screens
diff -c ORIG/old/wand_head.h ./wand_head.h
*** ORIG/old/wand_head.h Tue Nov 15 14:12:48 1988
--- ./wand_head.h Tue Nov 15 14:17:21 1988
***************
*** 4,11 ****
#define ROWLEN 40
#define NOOFROWS 16
! #define SCREENPATH "/mnt/cuddy/lib/wanderer"
! #define HISCOREPATH "/mnt/cuddy/lib/hiscores"
#define LOCKPATH "/tmp/wanderer.lock"
#define MASTERPASSWORD "zaphod"
--- 4,11 ----
#define ROWLEN 40
#define NOOFROWS 16
! #define SCREENPATH "/usr/local/lib/wanderer"
! #define HISCOREPATH "/usr/local/lib/wanderer/hiscore"
#define LOCKPATH "/tmp/wanderer.lock"
#define MASTERPASSWORD "zaphod"