projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.31.tar.gz
[xscreensaver]
/
hacks
/
pacman.c
diff --git
a/hacks/pacman.c
b/hacks/pacman.c
index 23fb3a1d4d0b743a43fb2e82e5abf0a0649b2a52..1cd7690b536a318e14a808fa052acc88dd388d31 100644
(file)
--- a/
hacks/pacman.c
+++ b/
hacks/pacman.c
@@
-1,9
+1,8
@@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* pacman --- Mr. Pacman and his ghost friends */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* pacman --- Mr. Pacman and his ghost friends */
-#if
!defined( lint ) && !defined( SABER )
+#if
0
static const char sccsid[] = "@(#)pacman.c 5.00 2000/11/01 xlockmore";
static const char sccsid[] = "@(#)pacman.c 5.00 2000/11/01 xlockmore";
-
#endif
/*-
#endif
/*-
@@
-107,6
+106,7
@@
static const char sccsid[] = "@(#)pacman.c 5.00 2000/11/01 xlockmore";
# include "images/pacman/pacman-ds8.xpm"
#endif
# include "images/pacman/pacman-ds8.xpm"
#endif
+#if 0
static const struct
{
int dx, dy;
static const struct
{
int dx, dy;
@@
-114,6
+114,7
@@
static const struct
{ 0, 1},
{ 1, 0},
{ 0, -1}};
{ 0, 1},
{ 1, 0},
{ 0, -1}};
+#endif
#ifdef DISABLE_INTERACTIVE
ENTRYPOINT ModeSpecOpt pacman_opts = {
#ifdef DISABLE_INTERACTIVE
ENTRYPOINT ModeSpecOpt pacman_opts = {
@@
-1263,7
+1264,7
@@
scale_pixmap (Display ** dpy, GC gc, Pixmap source, int dwidth, int dheight)
end = dheight * yscale;
/* Scale height of temp into dest pixmap */
for (i = 0; i <= end; i += yscale)
end = dheight * yscale;
/* Scale height of temp into dest pixmap */
for (i = 0; i <= end; i += yscale)
- XCopyArea (*dpy, temp, dest, gc, 0, i,
s
width, 1, 0, j++);
+ XCopyArea (*dpy, temp, dest, gc, 0, i,
d
width, 1, 0, j++);
XFreePixmap (*dpy, temp);
return (Pixmap) dest;
XFreePixmap (*dpy, temp);
return (Pixmap) dest;
@@
-1479,7
+1480,7
@@
init_pacman (ModeInfo * mi)
{
Display *display = MI_DISPLAY (mi);
Window window = MI_WINDOW (mi);
{
Display *display = MI_DISPLAY (mi);
Window window = MI_WINDOW (mi);
-
int
size = MI_SIZE (mi);
+
long
size = MI_SIZE (mi);
pacmangamestruct *pp;
XGCValues gcv;
int i, j, k;
pacmangamestruct *pp;
XGCValues gcv;
int i, j, k;
@@
-1779,8
+1780,10
@@
ENTRYPOINT void
reshape_pacman(ModeInfo * mi, int width, int height)
{
pacmangamestruct *pp = &pacman_games[MI_SCREEN (mi)];
reshape_pacman(ModeInfo * mi, int width, int height)
{
pacmangamestruct *pp = &pacman_games[MI_SCREEN (mi)];
- pp->width = width;
+ pp->width
= width;
pp->height = height;
pp->height = height;
+ pp->xb = (pp->width - pp->ncols * pp->xs) >> 1;
+ pp->yb = (pp->height - pp->nrows * pp->ys) >> 1;
MI_CLEARWINDOW (mi);
/* repopulate (mi); */
drawlevel (mi);
MI_CLEARWINDOW (mi);
/* repopulate (mi); */
drawlevel (mi);