snake4-1.0.14/000755 000765 000024 00000000000 12373036012 013765 5ustar00sverrehustaff000000 000000 snake4-1.0.14/board.c000644 000765 000024 00000040060 12372644400 015225 0ustar00sverrehustaff000000 000000 /* $Id: board.c,v 1.7 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE board.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include #include #include #include "win.h" #include "gameobject.h" #include "game.h" #include "snake.h" #include "mushroom.h" #include "scull.h" #include "headbanger.h" #include "slimpill.h" #include "fruit.h" #include "score.h" #include "board.h" /* must be last to avoid redefinition of Pixel */ #include /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ #define BLOCK_WIDTH 12 #define BLOCK_HEIGHT 12 /* all pixmaps are static */ #include "pixmaps/instructions" #include "pixmaps/snakeheadN" #include "pixmaps/snakeheadE" #include "pixmaps/snakeheadS" #include "pixmaps/snakeheadW" #include "pixmaps/snakebodyNW" #include "pixmaps/snakebodyNS" #include "pixmaps/snakebodyNE" #include "pixmaps/snakebodyWE" #include "pixmaps/snakebodySE" #include "pixmaps/snakebodySW" #include "pixmaps/snaketailN" #include "pixmaps/snaketailE" #include "pixmaps/snaketailS" #include "pixmaps/snaketailW" #include "pixmaps/splat" #include "pixmaps/borderNW" #include "pixmaps/borderN" #include "pixmaps/borderNE" #include "pixmaps/borderE" #include "pixmaps/borderSE" #include "pixmaps/borderS" #include "pixmaps/borderSW" #include "pixmaps/borderW" #include "pixmaps/mushroom01" #include "pixmaps/mushroom02" #include "pixmaps/mushroom03" #include "pixmaps/mushroom04" #include "pixmaps/mushroom05" #include "pixmaps/mushroom06" #include "pixmaps/mushroom07" #include "pixmaps/mushroom08" #include "pixmaps/mushroom09" #include "pixmaps/mushroom10" #include "pixmaps/mushroom11" #include "pixmaps/scull01" #include "pixmaps/scull02" #include "pixmaps/scull03" #include "pixmaps/scull04" #include "pixmaps/scull05" #include "pixmaps/scull06" #include "pixmaps/headbanger01" #include "pixmaps/headbanger02" #include "pixmaps/headbanger03" #include "pixmaps/headbanger04" #include "pixmaps/slimpill" #include "pixmaps/lemon01" #include "pixmaps/lemon02" #include "pixmaps/banana01" #include "pixmaps/banana02" #include "pixmaps/pear01" #include "pixmaps/pear02" #include "pixmaps/strawberry01" #include "pixmaps/strawberry02" static GC boardGC; static Pixmap pixInstructions; static XpmAttributes attrInstructions; static Pixmap pixBorderNW, pixBorderN, pixBorderNE, pixBorderE; static Pixmap pixBorderSE, pixBorderS, pixBorderSW, pixBorderW; /************************************************************************** * * * P U B L I C D A T A * * * **************************************************************************/ Window boardWin; int boardWidth = (BLOCK_WIDTH * X_BLOCKS); int boardHeight = (BLOCK_HEIGHT * Y_BLOCKS); Pixmap pixSnakeHeadN, pixSnakeHeadE, pixSnakeHeadS, pixSnakeHeadW; Pixmap pixSnakeBodyNW, pixSnakeBodyNS, pixSnakeBodyNE; Pixmap pixSnakeBodyWE, pixSnakeBodySE, pixSnakeBodySW; Pixmap pixSnakeTailN, pixSnakeTailE, pixSnakeTailS, pixSnakeTailW; Pixmap pixSplat; Pixmap pixMushroom[NUM_MUSHROOM_PIXMAPS]; Pixmap pixScull[NUM_SCULL_PIXMAPS]; Pixmap pixHeadbanger[NUM_HEADBANGER_PIXMAPS]; Pixmap pixSlimPill; Pixmap pixLemon[NUM_FRUIT_PIXMAPS], pixBanana[NUM_FRUIT_PIXMAPS]; Pixmap pixPear[NUM_FRUIT_PIXMAPS], pixStrawberry[NUM_FRUIT_PIXMAPS]; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void createPixmap(char **data, Pixmap *pix, XpmAttributes *attr) { int err; XpmAttributes xa; if (attr == NULL) attr = &xa; xa.valuemask = 0; attr->closeness = 40000; attr->valuemask |= XpmCloseness; err = XpmCreatePixmapFromData(winDisplay, boardWin, data, pix, NULL, attr); if (err == XpmSuccess) return; else if (err > 0) msgError("warning: %s\n", XpmGetErrorString(err)); msgFatal("Xpm: %s\n", XpmGetErrorString(err)); } static void setupPixmaps(void) { XGCValues values; XColor xc, xc2; /* make sure we don't get NoExpose for each XCopyArea */ values.graphics_exposures = False; XAllocNamedColor(winDisplay, DefaultColormap(winDisplay, DefaultScreen(winDisplay)), "light gray", &xc, &xc2); values.foreground = xc.pixel; XAllocNamedColor(winDisplay, DefaultColormap(winDisplay, DefaultScreen(winDisplay)), "black", &xc, &xc2); values.background = xc.pixel; values.font = XLoadFont(winDisplay, "6x10"); boardGC = XCreateGC(winDisplay, boardWin, GCGraphicsExposures | GCForeground | GCBackground | GCFont, &values); attrInstructions.valuemask = 0; createPixmap(instructions, &pixInstructions, &attrInstructions); createPixmap(snakeheadN, &pixSnakeHeadN, NULL); createPixmap(snakeheadE, &pixSnakeHeadE, NULL); createPixmap(snakeheadS, &pixSnakeHeadS, NULL); createPixmap(snakeheadW, &pixSnakeHeadW, NULL); createPixmap(snakebodyNW, &pixSnakeBodyNW, NULL); createPixmap(snakebodyNS, &pixSnakeBodyNS, NULL); createPixmap(snakebodyNE, &pixSnakeBodyNE, NULL); createPixmap(snakebodyWE, &pixSnakeBodyWE, NULL); createPixmap(snakebodySE, &pixSnakeBodySE, NULL); createPixmap(snakebodySW, &pixSnakeBodySW, NULL); createPixmap(snaketailN, &pixSnakeTailN, NULL); createPixmap(snaketailE, &pixSnakeTailE, NULL); createPixmap(snaketailS, &pixSnakeTailS, NULL); createPixmap(snaketailW, &pixSnakeTailW, NULL); createPixmap(splat, &pixSplat, NULL); createPixmap(borderNW, &pixBorderNW, NULL); createPixmap(borderN, &pixBorderN, NULL); createPixmap(borderNE, &pixBorderNE, NULL); createPixmap(borderE, &pixBorderE, NULL); createPixmap(borderSE, &pixBorderSE, NULL); createPixmap(borderS, &pixBorderS, NULL); createPixmap(borderSW, &pixBorderSW, NULL); createPixmap(borderW, &pixBorderW, NULL); createPixmap(borderW, &pixBorderW, NULL); createPixmap(mushroom01, &pixMushroom[0], NULL); createPixmap(mushroom02, &pixMushroom[1], NULL); createPixmap(mushroom03, &pixMushroom[2], NULL); createPixmap(mushroom04, &pixMushroom[3], NULL); createPixmap(mushroom05, &pixMushroom[4], NULL); createPixmap(mushroom06, &pixMushroom[5], NULL); createPixmap(mushroom07, &pixMushroom[6], NULL); createPixmap(mushroom08, &pixMushroom[7], NULL); createPixmap(mushroom09, &pixMushroom[8], NULL); createPixmap(mushroom10, &pixMushroom[9], NULL); createPixmap(mushroom11, &pixMushroom[10], NULL); createPixmap(scull01, &pixScull[0], NULL); createPixmap(scull02, &pixScull[1], NULL); createPixmap(scull03, &pixScull[2], NULL); createPixmap(scull04, &pixScull[3], NULL); createPixmap(scull05, &pixScull[4], NULL); createPixmap(scull06, &pixScull[5], NULL); createPixmap(headbanger01, &pixHeadbanger[0], NULL); createPixmap(headbanger02, &pixHeadbanger[1], NULL); createPixmap(headbanger03, &pixHeadbanger[2], NULL); createPixmap(headbanger04, &pixHeadbanger[3], NULL); createPixmap(slimpill, &pixSlimPill, NULL); createPixmap(lemon01, &pixLemon[0], NULL); createPixmap(lemon02, &pixLemon[1], NULL); createPixmap(banana01, &pixBanana[0], NULL); createPixmap(banana02, &pixBanana[1], NULL); createPixmap(pear01, &pixPear[0], NULL); createPixmap(pear02, &pixPear[1], NULL); createPixmap(strawberry01, &pixStrawberry[0], NULL); createPixmap(strawberry02, &pixStrawberry[1], NULL); } static void freePixmaps(void) { int q; XFreePixmap(winDisplay, pixInstructions); XpmFreeAttributes(&attrInstructions); XFreePixmap(winDisplay, pixSnakeHeadN); XFreePixmap(winDisplay, pixSnakeHeadE); XFreePixmap(winDisplay, pixSnakeHeadS); XFreePixmap(winDisplay, pixSnakeHeadW); XFreePixmap(winDisplay, pixSnakeBodyNW); XFreePixmap(winDisplay, pixSnakeBodyNS); XFreePixmap(winDisplay, pixSnakeBodyNE); XFreePixmap(winDisplay, pixSnakeBodyWE); XFreePixmap(winDisplay, pixSnakeBodySE); XFreePixmap(winDisplay, pixSnakeBodySW); XFreePixmap(winDisplay, pixSnakeTailN); XFreePixmap(winDisplay, pixSnakeTailE); XFreePixmap(winDisplay, pixSnakeTailS); XFreePixmap(winDisplay, pixSnakeTailW); XFreePixmap(winDisplay, pixSplat); XFreePixmap(winDisplay, pixBorderNW); XFreePixmap(winDisplay, pixBorderN); XFreePixmap(winDisplay, pixBorderNE); XFreePixmap(winDisplay, pixBorderE); XFreePixmap(winDisplay, pixBorderSW); XFreePixmap(winDisplay, pixBorderS); XFreePixmap(winDisplay, pixBorderSW); XFreePixmap(winDisplay, pixBorderW); for (q = 0; q < NUM_MUSHROOM_PIXMAPS; q++) XFreePixmap(winDisplay, pixMushroom[q]); for (q = 0; q < NUM_SCULL_PIXMAPS; q++) XFreePixmap(winDisplay, pixScull[q]); for (q = 0; q < NUM_HEADBANGER_PIXMAPS; q++) XFreePixmap(winDisplay, pixHeadbanger[q]); XFreePixmap(winDisplay, pixSlimPill); for (q = 0; q < NUM_FRUIT_PIXMAPS; q++) { XFreePixmap(winDisplay, pixLemon[q]); XFreePixmap(winDisplay, pixBanana[q]); XFreePixmap(winDisplay, pixPear[q]); XFreePixmap(winDisplay, pixStrawberry[q]); } XFreeGC(winDisplay, boardGC); } static void boardDraw(void) { int q; boardDrawBlock(pixBorderNW, 0, 0); boardDrawBlock(pixBorderNE, X_BLOCKS - 1, 0); boardDrawBlock(pixBorderSE, X_BLOCKS - 1, Y_BLOCKS - 1); boardDrawBlock(pixBorderSW, 0, Y_BLOCKS - 1); for (q = 1; q < X_BLOCKS - 1; q++) { boardDrawBlock(pixBorderN, q, 0); boardDrawBlock(pixBorderS, q, Y_BLOCKS - 1); } for (q = 1; q < Y_BLOCKS - 1; q++) { boardDrawBlock(pixBorderW, 0, q); boardDrawBlock(pixBorderE, X_BLOCKS - 1, q); } } static Bool boardIsKeyPressEvent(Display *display, XEvent *xev, char *data) { return xev->type == KeyPress; } static void boardFlushKeyboard(void) { XEvent xev; winFlush(); while (XCheckIfEvent(winDisplay, &xev, boardIsKeyPressEvent, NULL)) ; snakeFlushKeys(); } static void boardShowInstructions(void) { int w, h, bw; w = attrInstructions.width; h = attrInstructions.height; bw = (X_BLOCKS - 2) * BLOCK_WIDTH; XCopyArea(winDisplay, pixInstructions, boardWin, boardGC, 0, 0, w, h, BLOCK_WIDTH + (bw - w) / 2, BLOCK_HEIGHT); } static void boardDrawString(int x, int y, char *s) { XDrawString(winDisplay, boardWin, boardGC, x, y, s, strlen(s)); } static void boardShowHighscores(void) { int q, y, y0, x0, ch, cw, len, thisPlayer, from, to, eachSide; char *s; XClearArea(winDisplay, boardWin, BLOCK_WIDTH, BLOCK_HEIGHT + attrInstructions.height, (X_BLOCKS - 2) * BLOCK_WIDTH, boardHeight - 2 * BLOCK_HEIGHT - attrInstructions.height, False); len = strlen(scoreGetHeadSepStr()) + 3; cw = 6; ch = 12; x0 = (boardWidth - cw * len) / 2; y0 = BLOCK_HEIGHT + attrInstructions.height; thisPlayer = scoreGetThisPlayerIndex(); if (thisPlayer < BOARD_MAX_HIGHSCORES) to = BOARD_MAX_HIGHSCORES; else to = BOARD_MAX_HIGHSCORES / 2; y = y0 + ch; boardDrawString(x0 + cw * 3, y, scoreGetHeadStr()); y += ch; boardDrawString(x0 + cw * 3, y, scoreGetHeadSepStr()); y += ch; for (q = 0; q < to; q++) { if (q == thisPlayer) boardDrawString(x0, y, "->"); boardDrawString(x0 + cw * 3, y, scoreGetEntryStr(q)); y += ch; } if (thisPlayer >= BOARD_MAX_HIGHSCORES) { boardDrawString(x0 + cw * 3, y, " :"); y += ch; eachSide = (BOARD_MAX_HIGHSCORES / 2 - 2) / 2; from = thisPlayer - eachSide; while (from < to) /* to is from the above loop */ ++from; to = from + 2 * eachSide + 1; for (q = from; q < to; q++) { if ((s = scoreGetEntryStr(q)) == NULL) break; if (q == thisPlayer) boardDrawString(x0, y, "->"); boardDrawString(x0 + cw * 3, y, s); y += ch; } } } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void boardInit(void) { XSelectInput(winDisplay, boardWin, ExposureMask | KeyPressMask); } void boardFinish(void) { freePixmaps(); } void boardInitGame(void) { XClearArea(winDisplay, boardWin, BLOCK_WIDTH, BLOCK_HEIGHT, (X_BLOCKS - 2) * BLOCK_WIDTH, (Y_BLOCKS - 2) * BLOCK_HEIGHT, False); } void boardFinishGame(void) { boardDraw(); boardShowInstructions(); boardShowHighscores(); } void boardInitRound(void) { boardDraw(); boardFlushKeyboard(); } void boardFinishRound(void) { } void boardHandleEvent(XEvent *evt) { static int setupDone = 0; KeySym* ks; switch (evt->type) { case Expose: if (evt->xexpose.count) break; if (!setupDone) { setupPixmaps(); snakeInit(); mushInit(); scullInit(); headbangerInit(); pillInit(); fruitInit(); winShowHighscore(); setupDone = 1; } boardDraw(); if (gameRunning) goDrawAll(); else { boardShowInstructions(); boardShowHighscores(); } break; case KeyPress: { int keysymsPerKeycode; ks = XGetKeyboardMapping(winDisplay, evt->xkey.keycode, 1, &keysymsPerKeycode); switch (*ks) { case XK_Up: case XK_A: case XK_a: case XK_T: case XK_t: case XK_K: case XK_k: snakeTurnNorth(); break; case XK_Right: case XK_M: case XK_m: case XK_G: case XK_g: case XK_L: case XK_l: snakeTurnEast(); break; case XK_Down: case XK_Z: case XK_z: case XK_V: case XK_v: case XK_J: case XK_j: snakeTurnSouth(); break; case XK_Left: case XK_N: case XK_n: case XK_F: case XK_f: case XK_H: case XK_h: snakeTurnWest(); break; case XK_space: case XK_Pause: case XK_P: case XK_p: winTogglePause(); break; case XK_Escape: case XK_Q: case XK_q: gameExit = 1; break; /* choosing level */ case XK_1: case XK_KP_1: winChooseLevel(1); break; case XK_2: case XK_KP_2: winChooseLevel(2); break; case XK_3: case XK_KP_3: winChooseLevel(3); break; case XK_4: case XK_KP_4: winChooseLevel(4); break; case XK_5: case XK_KP_5: winChooseLevel(5); break; } XFree(ks); break; } } } void boardHandleTick(void) { } void boardDrawBlock(Pixmap pix, int x, int y) { XCopyArea(winDisplay, pix, boardWin, boardGC, 0, 0, BLOCK_WIDTH, BLOCK_HEIGHT, x * BLOCK_WIDTH, y * BLOCK_HEIGHT); } void boardClearBlock(int x, int y) { XClearArea(winDisplay, boardWin, x * BLOCK_WIDTH, y * BLOCK_HEIGHT, BLOCK_WIDTH, BLOCK_HEIGHT, False); } void boardRandomPos(int *x, int *y) { *x = RANDOM(1 + X_MAX - X_MIN) + X_MIN; *y = RANDOM(1 + Y_MAX - Y_MIN) + Y_MIN; } void boardEmptyRandomPos(int *x, int *y) { do { boardRandomPos(x, y); } while (goGetObjectAt(*x, *y) != NULL); } void boardEmptyRandomPosFarFromSnake(int *x, int *y) { int sx, sy, dx, dy, distsquared; snakeGetHeadPos(&sx, &sy); do { boardRandomPos(x, y); dx = *x - sx; dy = *y - sy; distsquared = dx * dx + dy * dy; } while (goGetObjectAt(*x, *y) != NULL || distsquared < 150); } snake4-1.0.14/board.h000644 000765 000024 00000003015 12372644400 015231 0ustar00sverrehustaff000000 000000 /* $Id: board.h,v 1.2 1996/10/11 14:45:03 sverrehu Exp $ */ #ifndef BOARD_H #define BOARD_H #include /* Pixmap */ #define X_BLOCKS 61 #define Y_BLOCKS 47 #define X_MIN 1 #define Y_MIN 1 #define X_MAX (X_BLOCKS - 2) #define Y_MAX (Y_BLOCKS - 2) #define BOARD_MAX_HIGHSCORES 20 void boardInit(void); void boardFinish(void); void boardInitGame(void); void boardFinishGame(void); void boardInitRound(void); void boardFinishRound(void); void boardHandleEvent(XEvent *evt); void boardHandleTick(void); void boardDrawBlock(Pixmap pix, int x, int y); void boardClearBlock(int x, int y); void boardRandomPos(int *x, int *y); void boardEmptyRandomPos(int *x, int *y); void boardEmptyRandomPosFarFromSnake(int *x, int *y); extern Window boardWin; extern int boardWidth, boardHeight; #define NUM_MUSHROOM_PIXMAPS 11 #define NUM_SCULL_PIXMAPS 6 #define NUM_HEADBANGER_PIXMAPS 4 #define NUM_FRUIT_PIXMAPS 2 extern Pixmap pixSnakeHeadN, pixSnakeHeadE, pixSnakeHeadS, pixSnakeHeadW; extern Pixmap pixSnakeBodyNW, pixSnakeBodyNS, pixSnakeBodyNE; extern Pixmap pixSnakeBodyWE, pixSnakeBodySE, pixSnakeBodySW; extern Pixmap pixSnakeTailN, pixSnakeTailE, pixSnakeTailS, pixSnakeTailW; extern Pixmap pixSplat; extern Pixmap pixMushroom[NUM_MUSHROOM_PIXMAPS]; extern Pixmap pixScull[NUM_SCULL_PIXMAPS]; extern Pixmap pixHeadbanger[NUM_HEADBANGER_PIXMAPS]; extern Pixmap pixSlimPill; extern Pixmap pixLemon[NUM_FRUIT_PIXMAPS], pixBanana[NUM_FRUIT_PIXMAPS]; extern Pixmap pixPear[NUM_FRUIT_PIXMAPS], pixStrawberry[NUM_FRUIT_PIXMAPS]; #endif snake4-1.0.14/ChangeLog000644 000765 000024 00000010246 12373035452 015551 0ustar00sverrehustaff000000 000000 2014-08-14 Alexandre Dantas * Release: 1.0.14 * Makefile fix after renaming README to README.md 2014-08-13 Sverre H. Huseby * Release: 1.0.13 * Code cleanup by Alexandre Dantas 2002-03-02 Sverre H. Huseby * Release: 1.0.12 * All: Updated contact information. 1998-07-05 Sverre H. Huseby * Release: 1.0.11 * Updated author information, and changed license to Artistic License, to please sunsite. * pixmaps/instructions: removed old mail address. Wed Aug 13 22:39:30 1997 Sverre H. Huseby * Release: 1.0.10 * score.c (scoreWriteScoreLines): Makes sure no empty fields are written out, as strtok doesn't like empty tokens. Mon Aug 11 21:30:35 1997 Sverre H. Huseby * Release: 1.0.9 * Makefile: Added possibility to make a binary distribution. Wed Mar 19 20:11:25 1997 Sverre H. Huseby * Version: 1.0.8 * win.c (winParseOptions): Added a terminating NULL to the resources. Mon Nov 11 22:04:24 1996 Sverre H. Huseby * Version: 1.0.7 * score.c: Use 3 positions for position number on score list. Tue Oct 15 11:32:10 1996 Sverre H. Huseby * Version: 1.0.6 * pixmaps/instructions*: Included score values in the instructions. Fri Oct 11 11:15:15 1996 Sverre H. Huseby * Version: 1.0.5 * score.c (scoreGetThisPlayerIndex): New function. * board.c (boardShowHighscores): No longer shows the top 20, but rather the top 10, plus a few centered around the current player. Fri Oct 11 11:15:15 1996 Sverre H. Huseby * Version: 1.0.4 * snake.c: Added idling timeout for start of rounds. The game is over if the user waits too long (a couple of minutes) before moving the snake. Fri Oct 11 10:31:55 1996 Sverre H. Huseby * Version: 1.0.3 * Increased number of entries in the highscore file, and made a constant for how many scores may be showed inline. Thu Oct 10 13:41:53 1996 Sverre H. Huseby * Version: 1.0.2 * game.c (gameInit): Fixed bug. Random seed was initialized using clock(), but clock returns number of ticks since the last call to clock(), so it was always zero. Wed Oct 9 17:48:49 1996 Sverre H. Huseby * Version: 1.0.1 * snake4.c (main): Now shows highscores if called as snake4scores. * Makefile: At installation, creates a symlink called snake4scores to snake4. Tue Oct 8 06:56:01 1996 Sverre H. Huseby * Version: 1.0.0 (uploaded to sunsite.unc.edu) * win.c (winTogglePause): Bugfix: Added test for gameEndOfRound. Problems occurred if the player paused the game after the snake died. * board.c (boardHandleEvent): Moved test for pausing legal to winTogglePause in win.c * suid.c: Added this file and suid.h. Fixes SUID-problems on SunOS. * Makefile: Creates snake4.score from snake4.score.ifi by keeping sverrehu only. * Translated TODO to English. Sun Oct 6 20:38:50 1996 Sverre H. Huseby * Version: 0.9.5 * snake4.c (version): Added info on who compiled the program, and when. Sun Oct 6 17:03:50 1996 Sverre H. Huseby * Version: 0.9.4 * board.c (boardHandleEvent): Bugfix: Expose events would both show instructions and repaint game objects. Sun Oct 6 15:05:19 1996 Sverre H. Huseby * Version: 0.9.3 * slimpill.c: Slimpill comes less often. * headbanger.c: Score for each move of the headbanger, and extra bonus when it leaves. * fruit.c (fruitHandleTick): At least two fruits available. Sat Oct 5 11:19:52 1996 Sverre H. Huseby * Version 0.9.2 * snake4.6: Added a man-page. * score.c, snake4.c: Added possibility to merge scores from separate highscore file. Fri Oct 4 22:14:57 1996 Sverre H. Huseby * Bumped version up to 0.9.1 - soon finished! Tue Sep 24 19:38:47 1996 Sverre H. Huseby * Initial version. This program was first implemented in assembly for MS-DOS by the same author. snake4-1.0.14/CREDITS000644 000765 000024 00000001767 12372645612 015033 0ustar00sverrehustaff000000 000000 Misc ---- Alexandre Dantas * Put snake4 on github: https://github.com/alexdantas/snake4 * Cleaned up the code Major ideas ----------- Reidar Huseby * The slimpill. Hints / Ideas ------------- Lars Berg Knut Erik Borgen Kjetil T. Homme Ingvil Hovig Jan Ingvoldstad John Olav Olsen Bug reports ----------- Nicolay Fredrik Aslaksen Arne Olav Bryne Lars Håkedal Bjørn Vaggen Konestabo Steinar Midtskogen Henning Spjelkavik R. Dale Thomas Jørn Ommund Topnes Daniel Øyan Your name may appear here if you -------------------------------- * report/fix bugs (see TODO) * extend the functionality of the program (see TODO) * do something nice * all of the above snake4-1.0.14/fruit.c000644 000765 000024 00000007401 12372644400 015271 0ustar00sverrehustaff000000 000000 /* $Id: fruit.c,v 1.4 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE fruit.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include "gameobject.h" #include "game.h" #include "board.h" #include "scull.h" #include "fruit.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ #define TICK_FREQ 20 static int currTick; #define MAX_FRUITS 10 static GameObject *fruit[MAX_FRUITS]; static int numFruits; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void fruitActivate(int n) { int q; GameObject *go; go = fruit[n]; boardEmptyRandomPos(&go->x, &go->y); switch (RANDOM(4)) { case 0: go->type = GO_LEMON; for (q = 0; q < NUM_FRUIT_PIXMAPS; q++) go->pixmaps[q] = pixLemon[q]; break; case 1: go->type = GO_BANANA; for (q = 0; q < NUM_FRUIT_PIXMAPS; q++) go->pixmaps[q] = pixBanana[q]; break; case 2: go->type = GO_PEAR; for (q = 0; q < NUM_FRUIT_PIXMAPS; q++) go->pixmaps[q] = pixPear[q]; break; case 3: go->type = GO_STRAWBERRY; for (q = 0; q < NUM_FRUIT_PIXMAPS; q++) go->pixmaps[q] = pixStrawberry[q]; break; } go->currPixmap = 0; go->tickCount = 0; go->ticksPixmap[0] = 300 + 70 * (MAX_LEVEL - gameLevel) + RANDOM(500); go->extra[0] = 0; goActivate(go); ++numFruits; } static void fruitAllCallback(GameObject *go) { if (go->extra[0] == 0) go->ticksPixmap[0] = 2 * go->ticksPixmap[1]; if (++go->extra[0] == 7) { goDeactivate(go); scullAt(go->x, go->y); } } static void fruitDeactivateCallback(GameObject *go) { --numFruits; } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void fruitInit(void) { int q, w; for (q = 0; q < MAX_FRUITS; q++) { fruit[q] = goNew(GO_LEMON); for (w = 0; w < NUM_FRUIT_PIXMAPS; w++) goAddPixmap(fruit[q], pixLemon[w], 5); fruit[q]->deactivateCallback = fruitDeactivateCallback; fruit[q]->allPixmapsCallback = fruitAllCallback; } } void fruitFinish(void) { int q; for (q = 0; q < MAX_FRUITS; q++) goFree(fruit[q]); } void fruitInitGame(void) { currTick = 0; numFruits = 0; } void fruitFinishGame(void) { } void fruitInitRound(void) { } void fruitFinishRound(void) { int q; for (q = 0; q < MAX_FRUITS; q++) goDeactivate(fruit[q]); } void fruitHandleTick(void) { int q; if (++currTick < TICK_FREQ) return; currTick = 0; if (numFruits < 2 || RANDOM(3 + MAX_LEVEL - gameLevel) == 0) { for (q = 0; q < MAX_FRUITS; q++) if (!fruit[q]->active) break; if (q < MAX_FRUITS) fruitActivate(q); } } snake4-1.0.14/fruit.h000644 000765 000024 00000000435 12372644400 015276 0ustar00sverrehustaff000000 000000 /* $Id: fruit.h,v 1.1.1.1 1996/10/04 20:16:16 sverrehu Exp $ */ #ifndef FRUIT_H #define FRUIT_H void fruitInit(void); void fruitFinish(void); void fruitInitGame(void); void fruitFinishGame(void); void fruitInitRound(void); void fruitFinishRound(); void fruitHandleTick(void); #endif snake4-1.0.14/game.c000644 000765 000024 00000007451 12372644400 015056 0ustar00sverrehustaff000000 000000 /* $Id: game.c,v 1.5 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE game.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include #include #include #include "win.h" #include "gameobject.h" #include "snake.h" #include "mushroom.h" #include "scull.h" #include "headbanger.h" #include "slimpill.h" #include "fruit.h" #include "board.h" #include "score.h" #include "game.h" /************************************************************************** * * * P U B L I C D A T A * * * **************************************************************************/ int gameLevel = 0; long gameScore = 0L, gameHighscore = 0L; int gameRound; int gameEndOfRound; /* 1 = end of this round, >1 = end of all rounds */ int gameRunning; int gamePause; int gameExit; /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void gameInit(void) { RANDOMIZE(time(NULL) + getpid()); gameRunning = 0; gameExit = 0; winInit(); scoreInit(); boardInit(); /* init-functions for other `modules' are called from board.c */ } void gameFinish(void) { fruitFinish(); pillFinish(); headbangerFinish(); scullFinish(); mushFinish(); snakeFinish(); boardFinish(); scoreFinish(); winFinish(); } void gameInitGame(void) { gameSetRound(1); gameSetScore(0); gameRunning = 1; scoreInitGame(); boardInitGame(); snakeInitGame(); mushInitGame(); scullInitGame(); headbangerInitGame(); pillInitGame(); fruitInitGame(); } void gameFinishGame(void) { gameRunning = 0; fruitFinishGame(); pillFinishGame(); headbangerFinishGame(); scullFinishGame(); mushFinishGame(); snakeFinishGame(); scoreFinishGame(); /* score must be updated before board is repainted */ boardFinishGame(); } void gameInitRound(void) { gameEndOfRound = 0; gamePause = 0; scoreInitRound(); boardInitRound(); snakeInitRound(); mushInitRound(); scullInitRound(); headbangerInitRound(); pillInitRound(); fruitInitRound(); } void gameFinishRound(void) { fruitFinishRound(); pillFinishRound(); headbangerFinishRound(); scullFinishRound(); mushFinishRound(); snakeFinishRound(); boardFinishRound(); scoreFinishRound(); gameSetRound(gameRound + 1); } void gameHandleTick(void) { /* let all `modules' handle the tick */ goHandleTick(); scoreHandleTick(); boardHandleTick(); snakeHandleTick(); mushHandleTick(); scullHandleTick(); headbangerHandleTick(); pillHandleTick(); fruitHandleTick(); winFlush(); } void gameSetLevel(int level) { gameLevel = level; winShowLevel(); } void gameSetRound(int round) { gameRound = round; winShowRound(); } void gameSetScore(long score) { gameScore = score; if (gameScore > gameHighscore) { gameHighscore = gameScore; winShowHighscore(); } winShowScore(); } void gameAddScore(long add) { gameSetScore(gameScore + add); } snake4-1.0.14/game.h000644 000765 000024 00000002347 12372644400 015062 0ustar00sverrehustaff000000 000000 /* $Id: game.h,v 1.2 1996/10/06 13:36:50 sverrehu Exp $ */ #ifndef GAME_H #define GAME_H #define RANDOM(x) (random() % (x)) #define RANDOMIZE(x) (srandom((unsigned) (x))) /* keyboard routines in board.c needs to be changed if the following two are altered */ #define MIN_LEVEL 1 #define MAX_LEVEL 5 #define MAX_ROUNDS 3 #define SCORE_BONUS_PER_LENGTH ( 10 * gameLevel) #define SCORE_LEMON ( 5 * gameLevel) #define SCORE_BANANA ( 10 * gameLevel) #define SCORE_PEAR ( 15 * gameLevel) #define SCORE_STRAWBERRY ( 20 * gameLevel) #define SCORE_SLIMPILL (100 * gameLevel) #define SCORE_HEADBANGER_MOVE ( 2) #define SCORE_HEADBANGER_LEAVE ( 50 * gameLevel) #define SLIMPILL_SHRINK_PST 50 void gameInit(void); void gameFinish(void); void gameInitGame(void); void gameFinishGame(void); void gameInitRound(void); void gameFinishRound(void); void gameHandleTick(void); void gameSetLevel(int level); void gameSetRound(int round); void gameSetScore(long score); void gameAddScore(long add); extern int gameLevel; extern long gameScore; extern long gameHighscore; extern int gameRound; extern int gameEndOfRound; extern int gameRunning; extern int gamePause; extern int gameExit; #endif snake4-1.0.14/gameobject.c000644 000765 000024 00000010775 12372644400 016250 0ustar00sverrehustaff000000 000000 /* $Id: gameobject.c,v 1.3 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE gameobject.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include "board.h" #include "gameobject.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ static GameObject *list = NULL; /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ GameObject * goNew(int type) { GameObject *go; if ((go = malloc(sizeof(GameObject))) == NULL) msgFatal("out of memory\n"); go->type = type; go->active = 0; go->x = go->y = 0; go->pixmaps = NULL; go->numPixmaps = 0; go->currPixmap = 0; go->ticksPixmap = NULL; go->tickCount = 0; go->allPixmapsCallback = NULL; go->deactivateCallback = NULL; /* include in list of handeled objects */ go->next = list; if (list) list->prev = go; go->prev = NULL; list = go; return go; } void goFree(GameObject *go) { if (go->prev == NULL) { /* first element in list */ list = go->next; if (go->next) go->next->prev = NULL; } else { go->prev->next = go->next; if (go->next) go->next->prev = go->prev; } free(go->pixmaps); free(go->ticksPixmap); free(go); } void goAddPixmap(GameObject *go, Pixmap pix, int ticks) { if (!go->numPixmaps) { go->pixmaps = malloc(sizeof(Pixmap)); go->ticksPixmap = malloc(sizeof(int)); } else { go->pixmaps = realloc(go->pixmaps, (go->numPixmaps + 1) * sizeof(Pixmap)); go->ticksPixmap = realloc(go->ticksPixmap, (go->numPixmaps + 1) * sizeof(int)); } if (go->pixmaps == NULL || go->ticksPixmap == NULL) msgFatal("out of memory\n"); go->pixmaps[go->numPixmaps] = pix; go->ticksPixmap[go->numPixmaps] = ticks; ++go->numPixmaps; } void goHandleTick(void) { GameObject *go; go = list; while (go) { if (go->active && go->numPixmaps > 1) { if (++go->tickCount >= go->ticksPixmap[go->currPixmap]) { go->tickCount = 0; if (++go->currPixmap >= go->numPixmaps) { go->currPixmap = 0; if (go->allPixmapsCallback) go->allPixmapsCallback(go); } if (go->active) { /* may have been changed by callback */ boardClearBlock(go->x, go->y); boardDrawBlock(go->pixmaps[go->currPixmap], go->x, go->y); } } } go = go->next; } } void goMove(GameObject *go, int x, int y) { int oldx, oldy; GameObject *go2; oldx = go->x; oldy = go->y; go->x = x; go->y = y; if (go->active) { if ((go2 = goGetObjectAt(oldx, oldy)) != NULL) boardDrawBlock(go2->pixmaps[go2->currPixmap], go2->x, go2->y); else boardClearBlock(oldx, oldy); boardDrawBlock(go->pixmaps[go->currPixmap], go->x, go->y); } } void goActivate(GameObject *go) { if (go->active) return; go->active = 1; goDraw(go); } void goDeactivate(GameObject *go) { if (!go->active) return; go->active = 0; if (go->deactivateCallback) go->deactivateCallback(go); goDraw(go); } void goDraw(GameObject *go) { GameObject *go2; if (go->active) boardDrawBlock(go->pixmaps[go->currPixmap], go->x, go->y); else { if ((go2 = goGetObjectAt(go->x, go->y)) != NULL) boardDrawBlock(go2->pixmaps[go2->currPixmap], go2->x, go2->y); else boardClearBlock(go->x, go->y); } } void goDrawAll(void) { GameObject *go; go = list; while (go) { if (go->active) boardDrawBlock(go->pixmaps[go->currPixmap], go->x, go->y); go = go->next; } } GameObject * goGetObjectAt(int x, int y) { GameObject *go; go = list; while (go) { if (go->active && go->x == x && go->y == y) return go; go = go->next; } return NULL; } snake4-1.0.14/gameobject.h000644 000765 000024 00000003016 12372644400 016243 0ustar00sverrehustaff000000 000000 /* $Id: gameobject.h,v 1.1.1.1 1996/10/04 20:16:16 sverrehu Exp $ */ #ifndef GAMEOBJECT_H #define GAMEOBJECT_H #include /* Pixmap */ struct GameObject; typedef void (*GameObjectCallbackFunc)(struct GameObject *); typedef struct GameObject { int type; /* for classification */ int active; /* member of the game? */ int x, y; /* position */ Pixmap *pixmaps; /* one or more pixmaps */ int numPixmaps; int currPixmap; /* current pixmap */ int *ticksPixmap; /* game ticks for each pixmap to last */ int tickCount; /* number of ticks so far for current pixmap */ GameObjectCallbackFunc allPixmapsCallback; /* called when all pixmaps are circulated throug */ GameObjectCallbackFunc deactivateCallback; /* called when object is deactivated */ int extra[10]; /* used defined */ struct GameObject *next; struct GameObject *prev; } GameObject; /* game object types */ enum { GO_SNAKE, GO_MUSHROOM, GO_SCULL, GO_HEADBANGER, GO_SLIMPILL, GO_LEMON, GO_BANANA, GO_PEAR, GO_STRAWBERRY }; GameObject *goNew(int type); void goFree(GameObject *go); void goAddPixmap(GameObject *go, Pixmap pix, int ticks); void goHandleTick(void); void goMove(GameObject *go, int x, int y); void goActivate(GameObject *go); void goDeactivate(GameObject *go); void goDraw(GameObject *go); void goDrawAll(void); GameObject *goGetObjectAt(int x, int y); #endif snake4-1.0.14/headbanger.c000644 000765 000024 00000007744 12372644400 016232 0ustar00sverrehustaff000000 000000 /* $Id: headbanger.c,v 1.4 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE headbanger.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include "gameobject.h" #include "game.h" #include "board.h" #include "snake.h" #include "headbanger.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ static int tickFreq; static int currTick; static int ticksToGo; static GameObject *headbanger; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void headbangerActivate(void) { boardEmptyRandomPosFarFromSnake(&headbanger->x, &headbanger->y); goActivate(headbanger); } static int headbangerPosOk(int x, int y) { GameObject *go; int sx, sy; if (x < X_MIN || x > X_MAX || y < Y_MIN || y > Y_MAX) return 0; snakeGetHeadPos(&sx, &sy); if (x == sx && y == sy) return 1; if ((go = goGetObjectAt(x, y)) == NULL) return 1; if (go->type != GO_HEADBANGER) return 0; return 1; } static void headbangerMove(void) { int x, y, ox, oy, px, py, sx, sy; x = ox = headbanger->x; y = oy = headbanger->y; snakeGetHeadPos(&sx, &sy); if (sx < x) px = -1; else if (sx == x) px = 0; else px = 1; if (sy < y) py = -1; else if (sy == y) py = 0; else py = 1; x += px; y += py; if (!headbangerPosOk(x, y)) { if (px && py) { /* check if moving in x-direction only fixes it */ x = ox + px; y = oy; if (headbangerPosOk(x, y)) goto posfound; /* check if moving in y-direction only fixes it */ x = ox; y = oy + py; if (headbangerPosOk(x, y)) goto posfound; } /* well, nothing worked, so we just keep the old position. */ x = ox; y = oy; } posfound: goMove(headbanger, x, y); if (x == sx && y == sy) snakeDie(); else gameAddScore(SCORE_HEADBANGER_MOVE); } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void headbangerInit(void) { int q; headbanger = goNew(GO_HEADBANGER); for (q = 0; q < NUM_HEADBANGER_PIXMAPS; q++) goAddPixmap(headbanger, pixHeadbanger[q], 5); } void headbangerFinish(void) { goFree(headbanger); } void headbangerInitGame(void) { tickFreq = MAX_LEVEL - gameLevel + 3 + RANDOM(3); currTick = 0; } void headbangerFinishGame(void) { } void headbangerInitRound(void) { ticksToGo = 200 + RANDOM(500); } void headbangerFinishRound(void) { goDeactivate(headbanger); } void headbangerHandleTick(void) { if (++currTick < tickFreq) return; currTick = 0; if (headbanger->active) { if (--ticksToGo <= 0) { goDeactivate(headbanger); gameAddScore(SCORE_HEADBANGER_LEAVE); ticksToGo = 200 + RANDOM(500); } else headbangerMove(); } else { if (--ticksToGo <= 0) { ticksToGo = 50 + RANDOM(200); headbangerActivate(); } } } snake4-1.0.14/headbanger.h000644 000765 000024 00000000517 12372644400 016226 0ustar00sverrehustaff000000 000000 /* $Id: headbanger.h,v 1.1.1.1 1996/10/04 20:16:17 sverrehu Exp $ */ #ifndef HEADBANGER_H #define HEADBANGER_H void headbangerInit(void); void headbangerFinish(void); void headbangerInitGame(void); void headbangerFinishGame(void); void headbangerInitRound(void); void headbangerFinishRound(); void headbangerHandleTick(void); #endif snake4-1.0.14/INSTALL000644 000765 000024 00000002112 12372644400 015017 0ustar00sverrehustaff000000 000000 Installing snake4 ================= If you don't have gcc, you'll have to edit the Makefile. If your compiler is not ANSI, you'll have to change all files. 1. Make sure you have the libraries shhopt, shhmsg, xalloc and shhcards by the same author. If not, you may find them at http://shh.thathost.com/pub-unix/ 2. Make sure you have the xpm-library. X11 is nothing without this. :-) ftp://koala.inria.fr/pub/xpm/ 3. Edit the Makefile. You will at least need to describe where the above mentioned libraries and X11 can be found. If your game program group and owner is not `games', you must enter the appropriate names. 4. Build the program make dep make 5. Install program, highscore file and man-file make install By default, the program will be installed in /usr/local/games, the man-file in /usr/local/man/man6, and the highscore file will go into /var/local/lib/games. NOTE: The program will be installed with the SUID-bit set, to allow editing the highscore file. The program will refuse to run if owned by root, for security reasons. snake4-1.0.14/Makefile000644 000765 000024 00000012044 12373035345 015436 0ustar00sverrehustaff000000 000000 # $Id: Makefile,v 1.18 2002/03/02 21:17:51 sverrehu Exp $ PROG = snake4 DIST = $(PROG) VERMAJ = 1 VERMIN = 0 VERPAT = 14 VERSION = $(VERMAJ).$(VERMIN).$(VERPAT) COMPILED_DATE = `date '+%Y-%m-%d %H:%M:%S'` COMPILED_BY = `whoami` ########################################################################### # Where are shhmsg, shhopt, Xpm and X11? # GNU/Linux at home INCDIR = -I/local/include -I/usr/X11R6/include -I/local/include/X11 LIBDIR = -L/local/lib -L/usr/X11R6/lib -L/local/lib/X11 EXTRA_LIBS = -lXmu -lICE -lSM -lXext # Irix at Ifi ifeq ($(HOSTTYPE),sgi) INCDIR = -I/usr/include/X11 -I$$HOME/include LIBDIR = -L/usr/lib/X11 -L$$HOME/lib/$$HOSTTYPE endif # Solaris at Ifi ifeq ($(HOSTTYPE),sol) INCDIR = -I/usr/openwin/include -I$$HOME/include LIBDIR = -L/usr/openwin/lib -L$$HOME/lib/$$HOSTTYPE EXTRA_LD_OPT = -R$(LD_RUN_PATH):/usr/openwin/lib EXTRA_LIBS = -lXmu endif # SunOS at Ifi ifeq ($(HOSTTYPE),sun4) INCDIR = -I/local/X11R5/include -I$$HOME/include LIBDIR = -L/local/X11R5/lib -L$$HOME/lib/$$HOSTTYPE EXTRA_LIBS = -liberty -lXext -lXmu endif ########################################################################### # Where do you want to install the program and the highscore file? INSTLIBDIR = /var/local/lib/games INSTBINDIR = /usr/local/games INSTMANDIR = /usr/local/man/man6 #INSTLIBDIR = /hom/sverrehu/lib #INSTBINDIR = /hom/sverrehu/bin/$$HOSTTYPE #INSTMANDIR = /hom/sverrehu/man/man6 # Game user. Program runs suid, so this must not be root. OWNER = games GROUP = games #OWNER = sverrehu #GROUP = sverrehu SCOREBASEFILE = $(PROG).score SCOREFILE = $(INSTLIBDIR)/$(SCOREBASEFILE) DEFINES = -DVERSION=\"$(VERSION)\" \ "-DCOMPILED_DATE=\"$(COMPILED_DATE)\"" \ "-DCOMPILED_BY=\"$(COMPILED_BY)\"" \ -DSCOREFILE=\"$(SCOREFILE)\" \ -DXK_MISCELLANY -DXK_LATIN1 ########################################################################### CC = gcc OPTIM = -s -O2 CCOPT = -Wall $(OPTIM) $(INCDIR) $(DEFINES) $(CFLAGS) LDOPT = -s $(LIBDIR) $(LDFLAGS) $(EXTRA_LD_OPT) LIBS = -lshhopt -lshhmsg -lXaw -lXt -lXpm -lX11 $(EXTRA_LIBS) OBJS = board.o fruit.o game.o gameobject.o headbanger.o \ mushroom.o score.o scull.o slimpill.o snake.o \ snake4.o suid.o win.o ########################################################################### all: $(PROG) $(PROG): $(OBJS) .o: $(OBJS) $(CC) $(CCOPT) -o $@ $(OBJS) $(LDOPT) $(LIBS) .c.o: $(CC) -o $@ -c $(CCOPT) $< clean: rm -f *.o core depend *~ $(PROG) install: $(PROG) install -d -m 755 $(INSTBINDIR) $(INSTLIBDIR) $(INSTMANDIR) install -s -m 4755 -o $(OWNER) -g $(GROUP) $(PROG) $(INSTBINDIR) ln -sf $(PROG) $(INSTBINDIR)/snake4scores install -m 644 $(DIST).6 $(INSTMANDIR) if test ! -f $(SCOREFILE); then \ install -m 644 -o $(OWNER) -g $(GROUP) \ $(SCOREBASEFILE) $(INSTLIBDIR); fi depend dep: $(CC) $(INCDIR) -MM *.c >depend ########################################################################### # To let the author make a distribution. The rest of the Makefile # should be used by the author only. LSMFILE = $(DIST)-$(VERSION).lsm DISTDIR = $(DIST)-$(VERSION) DISTFILE = $(DIST)-$(VERSION).tar.gz DISTFILES = README.md INSTALL CREDITS TODO $(LSMFILE) $(DIST).6 \ $(DIST).lsm.in ChangeLog Makefile $(SCOREBASEFILE) \ $(SCOREBASEFILE).ifi \ board.c fruit.c game.c gameobject.c headbanger.c \ mushroom.c score.c scull.c slimpill.c snake.c \ snake4.c suid.c win.c \ board.h fruit.h game.h gameobject.h headbanger.h \ mushroom.h score.h scull.h slimpill.h snake.h \ suid.h win.h \ pixmaps BINDISTDIR = $(DIST)-$(VERSION)-bin BINDISTFILE = $(DIST)-$(VERSION)-bin.tar.gz BINDISTFILES = README.md.static $(PROG).static $(PROG).6 \ Makefile.static $(SCOREBASEFILE) # Linux executable with my libraries and Xpm statically linked. static $(PROG).static: $(OBJS) $(CC) $(CCOPT) -o $(PROG).static $(OBJS) $(LDOPT) \ /local/lib/libshhopt.a /local/lib/libshhmsg.a \ /local/lib/X11/libXpm.a \ -lXaw -lXt -lX11 $(EXTRA_LIBS) $(LSMFILE): $(DIST).lsm.in VER=$(VERSION); \ DATE=`date "+%d%b%y"|tr '[a-z]' '[A-Z]'`; \ sed -e "s/VER/$$VER/g;s/DATE/$$DATE/g" $(DIST).lsm.in > $(LSMFILE) $(SCOREBASEFILE): $(SCOREBASEFILE).ifi echo "1" > $(SCOREBASEFILE) grep "^sverrehu," $(SCOREBASEFILE).ifi >> $(SCOREBASEFILE) chmod: chmod -R a+rX * veryclean: clean rm -f $(PROG) $(PROG).static $(DISTFILE) $(BINDISTFILE) $(LSMFILE) dist: $(LSMFILE) $(SCOREBASEFILE) chmod mkdir $(DISTDIR) chmod a+rx $(DISTDIR) for q in $(DISTFILES); do \ if test -r $$q; then \ ln -s ../$$q $(DISTDIR); \ else echo "warning: no file $$q"; fi; \ done tar -cvhzf $(DISTFILE) --exclude \*/CVS $(DISTDIR) chmod a+r $(DISTFILE) rm -rf $(DISTDIR) bindist: $(PROG).static $(SCOREBASEFILE) chmod mkdir $(BINDISTDIR) chmod a+rx $(BINDISTDIR) for q in $(BINDISTFILES); do \ if test -r $$q; then \ ln -s ../$$q $(BINDISTDIR)/`basename $$q .static`; \ else echo "warning: no file $$q"; fi; \ done tar -cvhzf $(BINDISTFILE) --exclude \*/CVS $(BINDISTDIR) chmod a+r $(BINDISTFILE) rm -rf $(BINDISTDIR) ifeq (depend,$(wildcard depend)) include depend endif snake4-1.0.14/mushroom.c000644 000765 000024 00000005627 12372644400 016021 0ustar00sverrehustaff000000 000000 /* $Id: mushroom.c,v 1.3 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE mushroom.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include "gameobject.h" #include "game.h" #include "board.h" #include "mushroom.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ #define TICK_FREQ 20 static int currTick; #define MAX_MUSHROOMS 30 static GameObject *mushroom[MAX_MUSHROOMS]; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void finishCallback(GameObject *ob) { goDeactivate(ob); } static void mushActivate(int n) { GameObject *go; go = mushroom[n]; boardEmptyRandomPosFarFromSnake(&go->x, &go->y); go->ticksPixmap[NUM_MUSHROOM_PIXMAPS / 2] = 100 + RANDOM(4000); go->currPixmap = 0; go->tickCount = 0; goActivate(go); } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void mushInit(void) { int q, w; for (q = 0; q < MAX_MUSHROOMS; q++) { mushroom[q] = goNew(GO_MUSHROOM); for (w = 0; w < NUM_MUSHROOM_PIXMAPS; w++) goAddPixmap(mushroom[q], pixMushroom[w], 2); mushroom[q]->allPixmapsCallback = finishCallback; } } void mushFinish(void) { int q; for (q = 0; q < MAX_MUSHROOMS; q++) goFree(mushroom[q]); } void mushInitGame(void) { currTick = 0; } void mushFinishGame(void) { int q; for (q = 0; q < MAX_MUSHROOMS; q++) goDeactivate(mushroom[q]); } void mushInitRound(void) { } void mushFinishRound(void) { } void mushHandleTick(void) { int q; if (++currTick < TICK_FREQ) return; currTick = 0; if (RANDOM(15) == 0) { for (q = 0; q < MAX_MUSHROOMS; q++) if (!mushroom[q]->active) break; if (q < MAX_MUSHROOMS) mushActivate(q); } } snake4-1.0.14/mushroom.h000644 000765 000024 00000000437 12372644400 016020 0ustar00sverrehustaff000000 000000 /* $Id: mushroom.h,v 1.1.1.1 1996/10/04 20:16:16 sverrehu Exp $ */ #ifndef MUSHROOM_H #define MUSHROOM_H void mushInit(void); void mushFinish(void); void mushInitGame(void); void mushFinishGame(void); void mushInitRound(void); void mushFinishRound(); void mushHandleTick(void); #endif snake4-1.0.14/pixmaps/000755 000765 000024 00000000000 12372644400 015453 5ustar00sverrehustaff000000 000000 snake4-1.0.14/README.md000644 000765 000024 00000004070 12373035327 015255 0ustar00sverrehustaff000000 000000 # snake4 - Fruit-eating snake game ![screenshot](http://shh.thathost.com/pub-unix/html/img/snake4-playing.png) This program is my fourth implementation of the snake game, written for Unix and X11. Previous versions were written for MS-DOS. Move the snake around the screen and eat food. The snake grows in length as you eat. Avoid hitting the fence, eating lethal mushrooms and rotten food, and biting your own tail. Now and then a slim-pill will bounce around. If you eat this, you will get shorter, and you will gain bonus points for every length you loose. The bonus is also given when a round is over. When food starts blinking, it's about to rot. Rotten food is poisonous, and thus uneatable. As long as it blinks, it can still be eaten. Oh, yes - I almost forgot: You may be visited by the evil headbanger. Take my advice and run away from him before he hits you in the head! He won't stay long. Thx to brother Reidar for thinking up the slim-pill. Choose among the following keys to move the snake around: | Action | Keys | | ------------- | -------------------------- | | Up | `A`, `T`, `K`, Up arrow | | Down | `Z`, `V`, `J`, Down arrow | | Left | `N`, `F`, `H`, Left arrow | | Right | `M`, `G`, `L`, Right arrow | | Pause/Unpause | `P`, Space, Pause | | Quit | `Q`, Esc | snake4 features a site-wide highscore file. The file contains the top 200 users. Each user may appear once only in the highscore table. # Author The program is written by _Sverre H. Huseby_ (, http://shh.thathost.com/) Lindealleen 18 A, N-0487 Oslo, Norway # License This program is released under the Artistic License: http://www.opensource.org/licenses/artistic-license.html Comments (even as simple as "I use your program") are very welcome. If you insist on paying something, please donate some money to an organization that strives to make the world a better place for everyone. I don't like bugs, so please help me removing them by reporting whatever you find! snake4-1.0.14/score.c000644 000765 000024 00000025625 12372644400 015263 0ustar00sverrehustaff000000 000000 /* $Id: score.c,v 1.8 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE score.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include #include #include #include #include #include #include "game.h" #include "win.h" #include "board.h" #include "suid.h" #include "score.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ #define TICK_FREQ 1000 static int currTick; typedef struct { char *userName; char *realName; long score; int level; char *dateTime; } Highscore; static Highscore *highscore[MAX_HIGHSCORES]; static int numHighscores; static time_t lastUpdate = 0; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static char * xstrdup(const char *s) { char *ret; if ((ret = malloc(strlen(s) + 1)) == NULL) msgFatal("out of memory\n"); strcpy(ret, s); return ret; } static Highscore * scoreNew(void) { Highscore *hs; if ((hs = malloc(sizeof(Highscore))) == NULL) msgFatal("out of memory\n"); hs->userName = NULL; hs->realName = NULL; hs->score = 0L; hs->level = 0; hs->dateTime = NULL; return hs; } static Highscore * scoreNewInit(char *uname, char *rname, long score, int level, char *dt) { Highscore *hs; if ((hs = malloc(sizeof(Highscore))) == NULL) msgFatal("out of memory\n"); hs->userName = xstrdup(uname); hs->realName = xstrdup(rname); hs->score = score; hs->level = level; hs->dateTime = xstrdup(dt); return hs; } static Highscore * scoreNewCurrent(void) { Highscore *hs; struct passwd *pw; char dateTime[20], *rname, *s; struct tm *tm; time_t tt; if ((pw = getpwuid(getuid())) == NULL) { msgError("unable to get password info\n"); return NULL; } rname = xstrdup(pw->pw_gecos); if ((s = strchr(rname, ',')) != NULL) *s = '\0'; time(&tt); tm = localtime(&tt); strftime(dateTime, sizeof(dateTime), "%Y-%m-%d %H:%M:%S", tm); hs = scoreNewInit(pw->pw_name, rname, gameScore, gameLevel, dateTime); free(rname); return hs; } void scoreFree(Highscore *hs) { if (!hs) return; free(hs->userName); free(hs->realName); free(hs->dateTime); free(hs); } static time_t scoreGetUpdateTime(void) { struct stat st; if (stat(SCOREFILE, &st) < 0) return 0; return st.st_mtime; } static void scoreDelete(int n) { int q; if (n >= MAX_HIGHSCORES) return; scoreFree(highscore[n]); for (q = n; q < numHighscores - 1; q++) highscore[q] = highscore[q + 1]; highscore[numHighscores - 1] = scoreNew(); if (n < numHighscores) --numHighscores; } static void scoreInsert(int n, Highscore *hs) { int q; if (numHighscores == MAX_HIGHSCORES) { scoreFree(highscore[numHighscores - 1]); --numHighscores; } for (q = numHighscores; q > n; q--) highscore[q] = highscore[q - 1]; highscore[n] = hs; ++numHighscores; } static int scoreFindUser(const char *user) { int q; for (q = 0; q < numHighscores; q++) if (strcmp(highscore[q]->userName, user) == 0) return q; return -1; } static void scoreLockHelp(FILE *f, short type) { struct flock fl; fl.l_type = type; fl.l_start = 0; fl.l_whence = SEEK_SET; fl.l_len = 0; /* lock to EOF */ if (fcntl(fileno(f), F_SETLKW, &fl) < 0) msgFatal("error locking highscore file\n"); } static void scoreReadLockFile(FILE *f) { scoreLockHelp(f, F_RDLCK); } static void scoreWriteLockFile(FILE *f) { scoreLockHelp(f, F_WRLCK); } static void scoreUnlockFile(FILE *f) { fflush(f); scoreLockHelp(f, F_UNLCK); } static Highscore * scoreReadScoreLine(FILE *f) { char line[100], *uname, *rname, *score, *level, *dateTime; Highscore *hs = NULL; if (fgets(line, sizeof(line), f)) { if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = '\0'; if ((uname = strtok(line, ",")) == NULL) msgFatal("error in highscore file\n"); if ((rname = strtok(NULL, ",")) == NULL) msgFatal("error in highscore file\n"); if ((score = strtok(NULL, ",")) == NULL) msgFatal("error in highscore file\n"); if ((level = strtok(NULL, ",")) == NULL) msgFatal("error in highscore file\n"); if ((dateTime = strtok(NULL, ",")) == NULL) msgFatal("error in highscore file\n"); hs = scoreNewInit(uname, rname, atol(score), atoi(level), dateTime); } return hs; } static void scoreReadScoreLines(FILE *f, int winOk) { int n; char line[81]; Highscore *hs; numHighscores = 0; if (fgets(line, sizeof(line), f) == NULL) return; n = atoi(line); while (numHighscores < n && (hs = scoreReadScoreLine(f)) != NULL) { scoreFree(highscore[numHighscores]); highscore[numHighscores] = hs; if (++numHighscores == MAX_HIGHSCORES) break; } if (highscore[0]->score > gameHighscore) { gameHighscore = highscore[0]->score; if (winOk) winShowHighscore(); } } static void scoreWriteScoreLines(FILE *f) { Highscore *hs; int q; fprintf(f, "%d\n", numHighscores); for (q = 0; q < numHighscores; q++) { hs = highscore[q]; /* strtok (used when reading score lines) doesn't like empty * tokens, so we make sure no empty tokens are written out. */ fprintf(f, "%s,%s,%ld,%d,%s\n", strlen(hs->userName) ? hs->userName : "nobody", strlen(hs->realName) ? hs->realName : "An Anonymous Gamer", hs->score, hs->level, hs->dateTime); } } static void scoreReadScoreFile(int winOk) { FILE *f; suidStartPrivilegedAction(); numHighscores = 0; if ((f = fopen(SCOREFILE, "r")) == NULL) goto finish; scoreReadLockFile(f); scoreReadScoreLines(f, winOk); scoreUnlockFile(f); fclose(f); finish: suidEndPrivilegedAction(); } static int scorePossiblyAddEntry(Highscore *hs) { int ret = 0, q, n; if ((n = scoreFindUser(hs->userName)) >= 0) { if (highscore[n]->score >= hs->score) goto finish; scoreDelete(n); } for (q = 0; q < numHighscores; q++) if (highscore[q]->score < hs->score) break; if (q < MAX_HIGHSCORES) { scoreInsert(q, hs); ret = 1; } finish: return ret; } static void scorePossiblyUpdateScores(void) { FILE *f; Highscore *hs; suidStartPrivilegedAction(); if ((hs = scoreNewCurrent()) == NULL) goto finish; numHighscores = 0; if ((f = fopen(SCOREFILE, "r+")) == NULL) { msgPerror("unable to write `%s'", SCOREFILE); goto finish; } scoreWriteLockFile(f); scoreReadScoreLines(f, 1); if (scorePossiblyAddEntry(hs)) { rewind(f); scoreWriteScoreLines(f); } else scoreFree(hs); scoreUnlockFile(f); fclose(f); finish: suidEndPrivilegedAction(); } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void scoreInit(void) { int q; for (q = 0; q < MAX_HIGHSCORES; q++) highscore[q] = scoreNew(); numHighscores = 0; lastUpdate = scoreGetUpdateTime(); scoreReadScoreFile(0); } void scoreFinish(void) { int q; for (q = 0; q < MAX_HIGHSCORES; q++) scoreFree(highscore[q]); } void scoreInitGame(void) { currTick = 0; } void scoreFinishGame(void) { scorePossiblyUpdateScores(); } void scoreInitRound(void) { } void scoreFinishRound(void) { } void scoreHandleTick(void) { time_t ut; if (++currTick < TICK_FREQ) return; currTick = 0; if ((ut = scoreGetUpdateTime()) > lastUpdate) { lastUpdate = ut; scoreReadScoreFile(1); } } int scoreGetThisPlayerIndex(void) { struct passwd *pw; if ((pw = getpwuid(getuid())) == NULL) { msgError("unable to get password info\n"); return -1; } return scoreFindUser(pw->pw_name); } char * scoreGetHeadStr(void) { static char line[81]; sprintf(line, " # %-10.10s %-25.25s %6.6s %3.3s %s", "user", "name", "score", "lvl", "date time"); return line; } char * scoreGetHeadSepStr(void) { static char line[81]; int q; for (q = 0; q < 73; q++) line[q] = '-'; line[q] = '\0'; return line; } char * scoreGetEntryStr(int n) { static char line[81]; Highscore *hs; if (n < 0 || n >= MAX_HIGHSCORES) return NULL; hs = highscore[n]; if (n >= numHighscores) sprintf(line, "%3d.", n + 1); else sprintf(line, "%3d. %-10s %-25.25s %6ld %3d %s", n + 1, hs->userName, hs->realName, hs->score, hs->level, hs->dateTime); return line; } void scoreDumpHighscores(void) { int q; if (!numHighscores) scoreReadScoreFile(0); printf("%s\n", scoreGetHeadStr()); printf("%s\n", scoreGetHeadSepStr()); for (q = 0; q < numHighscores; q++) printf("%s\n", scoreGetEntryStr(q)); printf("\n"); } void scoreMergeScoreFile(char *file) { int q, n, changed = 0; FILE *orig, *merge; char line[81]; Highscore *hs; suidStartPrivilegedAction(); if (getuid() != 0 && getuid() != geteuid()) msgFatal("scorefile merging only allowed for game owner or root\n"); if ((merge = fopen(file, "r")) == NULL) msgFatalPerror("unable to open `%s'", file); scoreReadLockFile(merge); /* read current highscores */ numHighscores = 0; if ((orig = fopen(SCOREFILE, "r+")) == NULL) { msgFatalPerror("unable to write `%s'", SCOREFILE); goto finish; } scoreWriteLockFile(orig); scoreReadScoreLines(orig, 0); /* merge new entries */ if (fgets(line, sizeof(line), merge) == NULL) goto unlock; n = atoi(line); for (q = 0; q < n; q++) { if ((hs = scoreReadScoreLine(merge)) != NULL) { if (scorePossiblyAddEntry(hs)) { changed = 1; } else { scoreFree(hs); } } } /* possibly save new highscore table */ if (changed) { rewind(orig); scoreWriteScoreLines(orig); } unlock: scoreUnlockFile(orig); fclose(orig); scoreUnlockFile(merge); fclose(merge); finish: suidEndPrivilegedAction(); } snake4-1.0.14/score.h000644 000765 000024 00000000773 12372644400 015265 0ustar00sverrehustaff000000 000000 /* $Id: score.h,v 1.5 1996/10/11 15:33:08 sverrehu Exp $ */ #ifndef SCORE_H #define SCORE_H #define MAX_HIGHSCORES 200 void scoreInit(void); void scoreFinish(void); void scoreInitGame(void); void scoreFinishGame(void); void scoreInitRound(void); void scoreFinishRound(); void scoreHandleTick(void); int scoreGetThisPlayerIndex(void); char *scoreGetHeadStr(void); char *scoreGetHeadSepStr(void); char *scoreGetEntryStr(int n); void scoreDumpHighscores(void); void scoreMergeScoreFile(char *file); #endif snake4-1.0.14/scull.c000644 000765 000024 00000004205 12372644400 015261 0ustar00sverrehustaff000000 000000 /* $Id: scull.c,v 1.3 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE scull.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include "gameobject.h" #include "board.h" #include "scull.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ #define MAX_SCULLS ((X_MAX - X_MIN + 1) * (Y_MAX - Y_MIN + 1)) static GameObject *scull[MAX_SCULLS]; /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void scullInit(void) { int q, w; for (q = 0; q < MAX_SCULLS; q++) { scull[q] = goNew(GO_SCULL); for (w = 0; w < NUM_SCULL_PIXMAPS; w++) goAddPixmap(scull[q], pixScull[w], (w == 0) ? 25 : 4); } } void scullFinish(void) { int q; for (q = 0; q < MAX_SCULLS; q++) goFree(scull[q]); } void scullInitGame(void) { } void scullFinishGame(void) { int q; for (q = 0; q < MAX_SCULLS; q++) goDeactivate(scull[q]); } void scullInitRound(void) { } void scullFinishRound(void) { } void scullHandleTick(void) { } void scullAt(int x, int y) { int q; for (q = 0; q < MAX_SCULLS; q++) if (!scull[q]->active) break; if (q >= MAX_SCULLS) return; scull[q]->x = x; scull[q]->y = y; scull[q]->currPixmap = 0; scull[q]->tickCount = 0; goActivate(scull[q]); } snake4-1.0.14/scull.h000644 000765 000024 00000000471 12372644400 015267 0ustar00sverrehustaff000000 000000 /* $Id: scull.h,v 1.1.1.1 1996/10/04 20:16:17 sverrehu Exp $ */ #ifndef SCULL_H #define SCULL_H void scullInit(void); void scullFinish(void); void scullInitGame(void); void scullFinishGame(void); void scullInitRound(void); void scullFinishRound(); void scullHandleTick(void); void scullAt(int x, int y); #endif snake4-1.0.14/slimpill.c000644 000765 000024 00000007320 12372644400 015765 0ustar00sverrehustaff000000 000000 /* $Id: slimpill.c,v 1.4 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE slimpill.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include "gameobject.h" #include "game.h" #include "board.h" #include "slimpill.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ static int tickFreq; static int currTick; static int ticksToGo; static GameObject *slimPill; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void pillActivate(void) { boardEmptyRandomPos(&slimPill->x, &slimPill->y); slimPill->extra[0] = RANDOM(2) ? -1 : 1; slimPill->extra[1] = RANDOM(2) ? -1 : 1; goActivate(slimPill); } static int pillPosOk(int x, int y) { GameObject *go; if (x < X_MIN || x > X_MAX || y < Y_MIN || y > Y_MAX) return 0; if ((go = goGetObjectAt(x, y)) == NULL) return 1; if (go->type != GO_SLIMPILL) return 0; return 1; } static void pillMove(void) { int x, y, ox, oy, px, py; x = ox = slimPill->x; y = oy = slimPill->y; px = slimPill->extra[0]; py = slimPill->extra[1]; x += px; y += py; if (!pillPosOk(x, y)) { /* check if turning x-direction fixes it */ x = ox - px; y = oy + py; if (pillPosOk(x, y)) { px = -px; goto posfound; } /* check if turning y-direction fixes it */ x = ox + px; y = oy - py; if (pillPosOk(x, y)) { py = -py; goto posfound; } /* check if turning both directions fixes it */ x = ox - px; y = oy - py; if (pillPosOk(x, y)) { px = -px; py = -py; goto posfound; } /* well, nothing worked, so we just keep the old position. */ x = ox; y = oy; } posfound: slimPill->extra[0] = px; slimPill->extra[1] = py; goMove(slimPill, x, y); } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void pillInit(void) { slimPill = goNew(GO_SLIMPILL); goAddPixmap(slimPill, pixSlimPill, 0); } void pillFinish(void) { goFree(slimPill); } void pillInitGame(void) { tickFreq = MAX_LEVEL - gameLevel + 3 + RANDOM(3); currTick = 0; } void pillFinishGame(void) { } void pillInitRound(void) { ticksToGo = 250 + RANDOM(400); } void pillFinishRound(void) { goDeactivate(slimPill); } void pillHandleTick(void) { if (++currTick < tickFreq) return; currTick = 0; if (slimPill->active) { if (--ticksToGo <= 0) { goDeactivate(slimPill); ticksToGo = 250 + RANDOM(400); } else pillMove(); } else { if (--ticksToGo <= 0) { ticksToGo = 50 + RANDOM(250); pillActivate(); } } } snake4-1.0.14/slimpill.h000644 000765 000024 00000000437 12372644400 015774 0ustar00sverrehustaff000000 000000 /* $Id: slimpill.h,v 1.1.1.1 1996/10/04 20:16:17 sverrehu Exp $ */ #ifndef SLIMPILL_H #define SLIMPILL_H void pillInit(void); void pillFinish(void); void pillInitGame(void); void pillFinishGame(void); void pillInitRound(void); void pillFinishRound(); void pillHandleTick(void); #endif snake4-1.0.14/snake.c000644 000765 000024 00000022016 12372644400 015240 0ustar00sverrehustaff000000 000000 /* $Id: snake.c,v 1.4 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE snake.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include "gameobject.h" #include "game.h" #include "win.h" #include "board.h" #include "snake.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ static int tickFreq; static int currTick; static int maxIdleTick; static int idleTick; #define MAX_SNAKE_LEN ((X_MAX - X_MIN + 1) * (Y_MAX - Y_MIN + 1)) static GameObject *snake[MAX_SNAKE_LEN]; static int snakeHead, snakeTail, snakeLen; static int moving; static int xInc, yInc; static int xIncNew, yIncNew, newInc; static int digest; #define KEY_BUF_SIZE 10 static int keybuf[KEY_BUF_SIZE]; static int keyIn, keyOut, keyLen; enum { KEY_NORTH = 1, KEY_EAST, KEY_SOUTH, KEY_WEST }; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void keyPut(int key) { if (keyLen == KEY_BUF_SIZE) return; /* don't buffer multiple identical keys */ if (keyLen && keybuf[keyOut] == key) return; keybuf[keyIn] = key; if (++keyIn == KEY_BUF_SIZE) keyIn = 0; ++keyLen; } static int keyGet(void) { int ret; if (!keyLen) return -1; ret = keybuf[keyOut]; if (++keyOut == KEY_BUF_SIZE) keyOut = 0; --keyLen; return ret; } static void snakeHandleTurn(void) { int key; if (newInc || (key = keyGet()) < 0) return; switch (key) { case KEY_NORTH: if (yInc == 1) return; xIncNew = 0; yIncNew = -1; break; case KEY_EAST: if (xInc == -1) return; xIncNew = 1; yIncNew = 0; break; case KEY_SOUTH: if (yInc == -1) return; xIncNew = 0; yIncNew = 1; break; case KEY_WEST: if (xInc == 1) return; xIncNew = -1; yIncNew = 0; break; } newInc = 1; moving = 1; } /* returns GameObject on head position, or NULL if none. */ static GameObject * snakeMoveHead(void) { int old; Pixmap pix, oldHeadPix; GameObject *go; /* find next position, and determine what body part should overwrite the old head */ if (newInc && xIncNew != xInc && yIncNew != yInc) { if (xInc == -1) { /* yInc == 0 */ if (yIncNew == -1) /* xIncNew == 0 */ oldHeadPix = pixSnakeBodyNE; else /* yIncNew == 1 */ oldHeadPix = pixSnakeBodySE; } else if (xInc == 1) { /* yInc == 0 */ if (yIncNew == -1) /* xIncNew == 0 */ oldHeadPix = pixSnakeBodyNW; else /* yIncNew == 1 */ oldHeadPix = pixSnakeBodySW; } else if (yInc == -1) { /* xInc == 0 */ if (xIncNew == -1) /* yIncNew == 0 */ oldHeadPix = pixSnakeBodySW; else /* xIncNew == 1 */ oldHeadPix = pixSnakeBodySE; } else { /* yInc == 1, xInc == 0 */ if (xIncNew == -1) /* yIncNew == 0 */ oldHeadPix = pixSnakeBodyNW; else /* xIncNew == 1 */ oldHeadPix = pixSnakeBodyNE; } xInc = xIncNew; yInc = yIncNew; } else { if (xInc) oldHeadPix = pixSnakeBodyWE; else oldHeadPix = pixSnakeBodyNS; } newInc = 0; old = snakeHead; /* new snake head */ if (++snakeHead >= MAX_SNAKE_LEN) snakeHead = 0; snake[snakeHead]->x = snake[old]->x + xInc; snake[snakeHead]->y = snake[old]->y + yInc; go = goGetObjectAt(snake[snakeHead]->x, snake[snakeHead]->y); if (xInc == 1) pix = pixSnakeHeadE; else if (xInc == -1) pix = pixSnakeHeadW; else if (yInc == 1) pix = pixSnakeHeadS; else pix = pixSnakeHeadN; snake[snakeHead]->pixmaps[0] = pix; goActivate(snake[snakeHead]); /* overwrite old snakehead */ snake[old]->pixmaps[0] = oldHeadPix; goDraw(snake[old]); return go; } static void snakeMoveTail(void) { int dx, dy, old, next; Pixmap pix; old = snakeTail; if (++snakeTail >= MAX_SNAKE_LEN) snakeTail = 0; if ((next = snakeTail + 1) >= MAX_SNAKE_LEN) next = 0; dx = snake[next]->x - snake[snakeTail]->x; dy = snake[next]->y - snake[snakeTail]->y; if (dx == -1) pix = pixSnakeTailW; else if (dx == 1) pix = pixSnakeTailE; else if (dy == -1) pix = pixSnakeTailN; else /* dy == 1 */ pix = pixSnakeTailS; goDeactivate(snake[old]); snake[snakeTail]->pixmaps[0] = pix; goDraw(snake[snakeTail]); } static void snakeShrinkToLen(int len) { while (snakeLen > len) { if (--snakeLen > 0) snakeMoveTail(); winFlush(); gameAddScore(SCORE_BONUS_PER_LENGTH); } } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void snakeInit(void) { int q; for (q = 0; q < MAX_SNAKE_LEN; q++) { snake[q] = goNew(GO_SNAKE); goAddPixmap(snake[q], 0, 0); } } void snakeFinish(void) { int q; for (q = 0; q < MAX_SNAKE_LEN; q++) goFree(snake[q]); } void snakeInitGame(void) { tickFreq = MAX_LEVEL - gameLevel + 1; currTick = 0; maxIdleTick = (120 * 33) / tickFreq; } void snakeFinishGame(void) { } void snakeInitRound(void) { GameObject *go; idleTick = 0; snakeTail = 0; snake[0]->x = X_MIN + (X_MAX - X_MIN) / 2; snake[0]->y = Y_MIN + (Y_MAX - Y_MIN) / 2; snake[0]->pixmaps[0] = pixSnakeTailE; if ((go = goGetObjectAt(snake[0]->x, snake[0]->y)) != NULL) goDeactivate(go); snake[1]->x = snake[0]->x + 1; snake[1]->y = snake[0]->y; snake[1]->pixmaps[0] = pixSnakeBodyWE; if ((go = goGetObjectAt(snake[1]->x, snake[1]->y)) != NULL) goDeactivate(go); snakeHead = 2; snake[2]->x = snake[1]->x + 1; snake[2]->y = snake[1]->y; snake[2]->pixmaps[0] = pixSnakeHeadE; if ((go = goGetObjectAt(snake[2]->x, snake[2]->y)) != NULL) goDeactivate(go); snakeLen = 3; xInc = 1; yInc = 0; digest = 0; moving = 0; newInc = 0; goActivate(snake[0]); goActivate(snake[1]); goActivate(snake[2]); snakeFlushKeys(); } void snakeFinishRound(void) { int q; for (q = 0; q < MAX_SNAKE_LEN; q++) goDeactivate(snake[q]); } void snakeHandleTick(void) { int x, y, len; GameObject *go; if (++currTick < tickFreq) return; currTick = 0; snakeHandleTurn(); if (!moving) { if (++idleTick >= maxIdleTick) { printf("idling too long, ending game\n"); gameEndOfRound = 2; } return; } go = snakeMoveHead(); if (digest) { --digest; ++snakeLen; } else snakeMoveTail(); /* check if the snake hit something */ x = snake[snakeHead]->x; y = snake[snakeHead]->y; if (x < X_MIN || x > X_MAX || y < Y_MIN || y > Y_MAX) snakeDie(); else if (go) { switch (go->type) { case GO_MUSHROOM: case GO_SCULL: case GO_HEADBANGER: goDeactivate(go); /* fall through */ case GO_SNAKE: snakeDie(); break; case GO_SLIMPILL: gameAddScore(SCORE_SLIMPILL); len = (snakeLen * (100 - SLIMPILL_SHRINK_PST)) / 100; if (len < 3) len = 3; snakeShrinkToLen(len); goDeactivate(go); break; case GO_LEMON: gameAddScore(SCORE_LEMON); goDeactivate(go); digest += 3; break; case GO_BANANA: gameAddScore(SCORE_BANANA); goDeactivate(go); digest += 6; break; case GO_PEAR: gameAddScore(SCORE_PEAR); goDeactivate(go); digest += 9; break; case GO_STRAWBERRY: gameAddScore(SCORE_STRAWBERRY); goDeactivate(go); digest += 12; break; } } } void snakeTurnNorth(void) { keyPut(KEY_NORTH); } void snakeTurnEast(void) { keyPut(KEY_EAST); } void snakeTurnSouth(void) { keyPut(KEY_SOUTH); } void snakeTurnWest(void) { keyPut(KEY_WEST); } void snakeGetHeadPos(int *x, int *y) { *x = snake[snakeHead]->x; *y = snake[snakeHead]->y; } void snakeFlushKeys(void) { keyIn = keyOut = keyLen = 0; } void snakeDie(void) { boardDrawBlock(pixSplat, snake[snakeHead]->x, snake[snakeHead]->y); winFlush(); snakeShrinkToLen(0); boardDrawBlock(pixSplat, snake[snakeHead]->x, snake[snakeHead]->y); winFlush(); gameEndOfRound = 1; } snake4-1.0.14/snake.h000644 000765 000024 00000000735 12372644400 015251 0ustar00sverrehustaff000000 000000 /* $Id: snake.h,v 1.1.1.1 1996/10/04 20:16:16 sverrehu Exp $ */ #ifndef SNAKE_H #define SNAKE_H void snakeInit(void); void snakeFinish(void); void snakeInitGame(void); void snakeFinishGame(void); void snakeInitRound(void); void snakeFinishRound(); void snakeHandleTick(void); void snakeTurnNorth(void); void snakeTurnEast(void); void snakeTurnSouth(void); void snakeTurnWest(void); void snakeGetHeadPos(int *x, int *y); void snakeFlushKeys(void); void snakeDie(void); #endif snake4-1.0.14/snake4-1.0.14.lsm000644 000765 000024 00000001256 12373036012 016412 0ustar00sverrehustaff000000 000000 Begin3 Title: snake4 - X11 game starring a fruit-eating snake Version: 1.0.14 Entered-date: 14AUG14 Description: Steer this fruitloving snake around the screen, and pick up fruit. The snake grows in length as it eats. Watch out for lethal mushrooms, rotten fruit, and evil headbangers. Features a site-wide highscore file for fun and excitement. :) Keywords: game, X11, snake Author: shh@thathost.com (Sverre H. Huseby) Primary-site: http://shh.thathost.com/pub-unix/ Platforms: Requires X11, xpm and the libraries shhopt and shhmsg, the last two created by the same author. Copying-policy: Artistic License http://www.opensource.org/licenses/artistic-license.html End snake4-1.0.14/snake4.6000644 000765 000024 00000004730 12372644400 015252 0ustar00sverrehustaff000000 000000 .TH SNAKE4 6 "11 October 1996" \" -*- nroff -*- .SH NAME snake4, snake4scores \- Game starring a fruit-eating snake. .SH SYNOPSIS .B snake4 [\-hHV] [\-M file] [\-\-help] [\-\-highscores] [\-\-version] [\-\-merge\-highscores=file] .B snake4scores .SH DESCRIPTION The .B snake4 program is my fourth implementation of the snake game, written for Unix and X11. Previous versions were written for MS-DOS. Move the snake around the screen and eat food. The snake grows in length as you eat. Avoid hitting the fence, eating lethal mushrooms and rotten food, and biting your own tail. Now and then a slim\-pill will bounce around. If you eat this, you will get shorter, and you will gain bonus points for every length you loose. The bonus is also given when a round is over. When food starts blinking, it's about to rot. Rotten food is poisonous, and thus uneatable. As long as it blinks, it can still be eaten. Oh, yes \- I almost forgot: You may be visited by the evil headbanger. Take my advice and run away from him before he hits you in the head! He won't stay long. The keys used to control the game are given at startup. .B snake4 features a site\-wide highscore file. The file contains the top 200 users. Each user may appear once only in the highscore table. For technical reasons, .B snake4 connects to the X11 server before parsing options. This makes it impossible to eg. browse the highscore table using \-H if no server is available. To be able to see the scores in such a case, .B snake4scores produces the same output as .B snake4 with option \-H, but does no attempt on connecting to the X11 server. .SS OPTIONS .TP .I "\-h, \-\-help" Print a usage message on standard output, and exit successfully. .TP .I "\-H, \-\-highscores" Dump the highscore list to standard output, and exit successfully. Starting .B snake4 with the name .B snake4score does the same thing, without first connecting to the X11 server. Note that this will possibly print more entries than the 20 or so that will fit within the game startup screen. .TP .I "-V, \-\-version" Print version information on standard output, then exit successfully. .TP .I "\-M, \-\-merge\-highscores=file" Merge separate highscore file .I file into the default highscore file, and exit successfully. Displays the new highscore table. This option is for the game owner or root only. .SH X11 OPTIONS In addition to the above mentioned options, .B snake4 accepts the standard X11 toolkit options. .SH AUTHOR Sverre H. Huseby . snake4-1.0.14/snake4.c000644 000765 000024 00000005672 12372644400 015335 0ustar00sverrehustaff000000 000000 /* $Id: snake4.c,v 1.7 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE snake4.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include #include "win.h" #include "game.h" #include "score.h" #include "suid.h" /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void version(void) { printf( "snake4 " VERSION ", by Sverre H. Huseby " "(compiled " COMPILED_DATE " by " COMPILED_BY ")\n" ); exit(0); } static void usage(void) { printf( "usage: %s [options]\n" "\n" " -h, --help display this help and exit\n" " -H, --highscores show highscores and exit\n" " -M, --merge-highscores=FILE merge highscores from FILE and exit\n" " -V, --version output version information and exit\n" "\n" "In addition, `normal' X11 options are allowed.\n", msgGetName() ); exit(0); } static void highscores(void) { scoreDumpHighscores(); exit(0); } static void merge(char *file) { scoreMergeScoreFile(file); scoreDumpHighscores(); exit(0); } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ int main(int argc, char *argv[]) { optStruct opt[] = { /* short long type var/func special */ { 'h', "help", OPT_FLAG, usage, OPT_CALLFUNC }, { 'H', "highscores", OPT_FLAG, highscores, OPT_CALLFUNC }, { 'M', "merge-highscores", OPT_STRING, merge, OPT_CALLFUNC }, { 'V', "version", OPT_FLAG, version, OPT_CALLFUNC }, { 0, 0, OPT_END, 0, 0 } /* no more options */ }; msgSetName(argv[0]); suidInit(); /* to allow showing highscores before connecting to X11 server */ if (strcmp(msgGetName(), "snake4scores") == 0) highscores(); /* exits the program */ winParseOptions(&argc, argv); optParseOptions(&argc, argv, opt, 0); gameInit(); winMainLoop(); gameFinish(); return 0; } snake4-1.0.14/snake4.lsm.in000644 000765 000024 00000001250 12372644400 016277 0ustar00sverrehustaff000000 000000 Begin3 Title: snake4 - X11 game starring a fruit-eating snake Version: VER Entered-date: DATE Description: Steer this fruitloving snake around the screen, and pick up fruit. The snake grows in length as it eats. Watch out for lethal mushrooms, rotten fruit, and evil headbangers. Features a site-wide highscore file for fun and excitement. :) Keywords: game, X11, snake Author: shh@thathost.com (Sverre H. Huseby) Primary-site: http://shh.thathost.com/pub-unix/ Platforms: Requires X11, xpm and the libraries shhopt and shhmsg, the last two created by the same author. Copying-policy: Artistic License http://www.opensource.org/licenses/artistic-license.html End snake4-1.0.14/snake4.score000644 000765 000024 00000000071 12372644400 016212 0ustar00sverrehustaff000000 000000 1 sverrehu,Sverre H. Huseby,117474,4,1996-10-10 20:31:11 snake4-1.0.14/snake4.score.ifi000644 000765 000024 00000025112 12372644400 016763 0ustar00sverrehustaff000000 000000 200 monicast,Monica Stamnes,292960,4,2000-05-04 12:17:45 knutbo,Knut Erik Borgen,195666,4,1999-12-10 15:13:15 in219p64,Prosjektkonto IN219 P64,189824,4,2000-04-25 17:21:14 in105-8,Gruppelærer in105-8,176398,4,2000-03-02 12:36:45 cyb,Cybernetisk Selskab,165350,4,2000-04-23 18:33:18 monicas,Monica Stamnes,156906,4,1998-11-14 17:14:19 jonathas,Jonathan Antony Scudder,141580,3,1999-11-29 18:12:37 trondam,Trond Amlie,140451,3,1998-02-04 19:13:46 baardm,Bård Lutzow-Holm Myrstad,139987,3,1999-04-21 16:50:05 solveie,Solveig Edvardsen,138794,4,1999-04-22 15:24:35 igorr,Igor Rafienko,133462,3,1998-03-06 18:51:20 arthurj,Arthur Jahr,122284,3,1999-05-06 18:01:09 oysteis,Øystein Middelthun Sættem,122015,3,1997-05-12 19:06:32 theiss,Ingebjørg Thelin Theiss,117972,4,1998-03-03 17:14:12 sverrehu,Sverre H. Huseby,117474,4,1996-10-10 20:31:11 andreasn,Andreas Nergaard,110558,4,1997-11-27 02:34:12 kspilhau,Kristian Spilhaug Torkildsen,106575,3,1999-12-05 14:53:46 guyk,Guy Thomas Kværnberg,105804,4,2000-01-14 09:07:15 larsbe,Lars Magnus Ramnefjell Berg,105033,3,1996-11-14 03:33:50 geirmy,Geir Myrind,101154,4,1999-03-05 04:00:35 jankr,Jan Kroken,95786,3,1996-10-15 18:56:37 steinarm,Steinar Midtskogen,90906,4,1996-10-12 13:20:37 kjetim,Kjetil Myhre,89828,4,1998-01-27 03:21:41 gmyrind,Geir Myrind,88226,4,2000-05-22 22:01:16 oyvindba,Øyvind Rast Bangsund,84606,3,1997-09-25 17:36:03 hansstu,Hans Julius Bull Stubberud,84133,3,1998-11-24 18:45:39 in105-3,Gruppelærer in105-3,83090,4,1999-01-23 16:32:54 torav,Tora Kristine Vedø,81806,4,1999-05-08 16:24:14 jan-chri,Jan-Christer Torvik,80388,3,1999-11-24 14:00:25 hansr,Hans Arild Runde,79116,4,1996-10-15 20:30:22 oddbjoeh,Oddbjørn Hansen,77534,4,1999-03-09 16:17:47 roarv,Roar Valle,75500,3,1997-12-10 14:34:57 in219p41,Prosjektkonto IN219 P41,73840,4,1998-12-07 18:46:19 eskilt,Eskil Teigen,72527,3,2000-06-01 08:12:15 petterwh,Petter Blom Whittingham,71748,4,1999-12-01 15:54:51 arneh,Arne Martin Guettler Hanssen,71614,3,2000-05-26 14:08:43 janha,Jan Egil Hagen,69608,4,1999-12-30 04:59:38 mikkelor,Mikkel Orheim,68042,4,1997-01-17 19:55:45 ranveif,Ranveig Flåten,67924,4,1999-11-30 15:02:26 nicolaya,Nicolay Fredrik Aslaksen,67126,4,1996-11-16 13:05:08 kjetilma,Kjetil Svalastog Matheussen,66774,3,1998-09-09 22:27:36 nilsno,Nils Agne Nordbotten,66489,3,1999-04-21 13:08:12 olejohas,Ole-Johannes Sognnæs,65504,3,1997-11-24 10:19:44 jani,Jan Ingvoldstad,64588,3,1996-10-10 04:39:21 in105-11,Gruppelærer in105-11,64172,4,1998-11-05 23:09:10 ngal,Nga Thi Tuyet Lam,62134,3,1998-11-26 21:43:50 petterw,Petter Blom Whittingham,62076,4,1999-05-22 21:35:19 thomabr,Thomas Brække,61143,3,1999-05-01 17:14:44 johanm,Johan Arild Mygland,60644,4,1999-10-19 18:27:02 olavb,Olav Andree Brevik,59923,3,1996-10-17 22:13:39 in115-12,Gruppelærer in115-12,58437,3,2000-06-13 18:35:31 andrewcw,Andrew Candidus Jeneric Ojia Wandera,58242,4,1997-06-24 21:57:31 jentegr,Jentegruppe v/ Ifi,57084,4,1997-04-20 19:29:00 bjornno,Bjørn Kristian Nordlund,55318,4,1998-11-30 17:47:56 arnegl,Arne Georg Gleditsch,53070,4,1996-10-12 02:51:24 josteina,Jostein Amlie,52840,3,1999-04-30 22:08:59 kjetilsv,Kjetil Svendsberget,52590,4,1996-10-11 19:17:58 tronl,Tron Lunde,52456,3,1999-03-22 17:55:32 katrins,Katrine Skjelsvik,50466,4,1998-11-19 22:15:53 ingebjor,Ingebjørg Thelin Theiss,50452,4,1997-06-27 18:41:45 martineg,Martin Eggen,50414,4,1997-10-28 22:17:51 haavardg,Håvard Grimelid,50400,3,1997-02-18 15:35:54 johnv,John Enok Vollestad,50124,3,1998-05-31 11:47:46 kashiff,Kashif Waqar Faiz,49676,4,1997-12-12 21:15:53 olesv,Joachim Svendsen,49166,3,1996-10-28 13:02:14 astridn,Astrid Elisabeth Nordhagen,48520,4,1998-11-07 17:27:43 karlka,Karl Robert Bragmo Karlsson,48355,3,1999-04-01 17:07:50 jonhaug,Jon Haugsand,47754,4,1996-10-22 18:37:05 johanyg,Johan Yves August Grasmo,47424,4,2000-01-14 08:51:37 ann,An Khang Duong Nguyen,47008,3,1998-05-28 11:44:41 opptak,Konto for emnepåmelding,46210,4,1997-01-16 14:50:13 geirhan,Geir Kristian Hansen,45908,4,1996-10-18 10:26:11 torg,Tor-Øyvind Gundersen,45718,3,1996-10-16 22:29:21 trolunde,Tron Lunde,45699,3,1999-11-26 12:08:44 jacobs,Jacob Alexander Stepaschko,45277,3,1997-01-02 17:07:18 birgittk,Birgitte Kvarme,45248,4,1998-01-27 17:48:12 in114-5,Gruppelærer in114-5,44666,4,1997-09-30 16:52:31 johanfo,Johan Fredrik Øhman,44621,3,1997-02-26 09:02:40 arvel,Arve Larsen,43052,4,1996-10-16 19:08:31 maritv,Marit Vaksvik,42919,3,1998-12-08 19:49:56 mortekri,Morten Kristiansen,42324,3,1999-05-06 12:31:01 kathrinr,Kathrine Raaen,42308,3,1999-03-19 10:34:53 olap,Ola Presterud,42186,4,1999-05-31 18:34:21 torech,Tore Christian Skobba,42161,3,1999-11-30 18:17:11 ronnyso,Ronny Solstad,42096,4,1996-10-18 20:31:58 fazilata,Fazilat Siddiq Akthar,41902,4,1999-05-26 19:12:14 andersho,Anders Hogseth,41860,3,1998-11-15 11:10:58 hiwam,Hiwa Mayi,41772,3,1997-04-12 11:37:46 alfh,Alf-Ivar Holm,41602,3,1996-10-15 20:15:06 gunnarlu,Gunnar Lunde,41556,3,1999-10-20 16:49:42 gunnarl,Gunnar Lunde,40770,4,1999-06-04 17:33:21 maritce,Marit Cecilie Frodesen,40246,3,1999-11-23 16:00:38 trines,Trine Sandmo,39960,3,1996-11-20 18:22:13 endrem,Runar Andre Myklebust,39758,4,1997-12-03 16:31:42 peru,Per Christopher Aarøe Undheim,39516,3,1999-11-22 21:36:40 trondamu,Trond HAsle Amundsen,39509,3,1997-11-01 18:35:05 toreba,Tore Jahn Bastiansen,39351,3,1996-10-11 15:10:25 kristiag,Kristian André Gallis,39346,3,1999-01-25 14:28:24 kentk,Kent Karlsson,39095,3,1997-09-08 15:38:54 willyk,Willy Thorkildsen Koch,39018,3,1999-05-07 19:54:39 haakonb,Håkon Brynildsen,38122,4,1999-11-24 12:59:23 johang,Johan Yves August Grasmo,38005,3,1998-06-17 09:25:04 kaaren,Kåre Gunnar Nesheim,38002,4,1997-07-04 23:08:51 mortenjo,Morten Lied Johansen,37154,3,1998-08-05 16:54:57 torvalde,Torvald Einarson,36762,4,1997-11-09 17:31:49 runars,Runar Standal,36398,4,1998-11-03 20:00:03 argggh,Arne Georg Gleditsch,36284,4,1997-01-29 23:53:22 lisefr,Lise Marianne Bolling Frengen,36078,3,1997-06-30 18:45:51 torhu,Tor Husabø,35844,4,1997-04-22 17:40:14 hennings,Henning Spjelkavik,35506,4,1996-10-18 08:20:47 kristije,Kristian Jess,35345,3,1997-06-19 19:17:30 ivanf,Ivan Falsen,35008,4,1996-10-26 16:28:23 thomabo,Thomas Førrisdahl Bohlin,34829,3,1996-10-15 13:10:18 kjetilw,Kjetil Andre Wågbø,34678,4,1998-11-18 15:24:37 sturleh,Sturle Helland,34592,3,1999-11-05 14:02:53 janm,Jan-Tore Marienborg,34001,3,1998-07-07 17:26:09 mattisg,Mattis Gutu,33912,3,1996-11-14 03:58:50 trondfo,Trond Fredrik Scjander Opsahl,33754,3,1997-12-05 13:09:26 takw,Tak Wang,33484,3,1997-12-03 01:20:21 in105-19,Gruppelærer in105-19,33482,5,1999-11-25 19:15:37 klausb,Klaus Raaen Bekken,33314,4,1997-11-28 17:59:29 olet,Ole Jørgen Tetlie,33283,3,1998-05-02 13:27:03 sigurdbs,Sigurd Brattsti Sørensen,32568,3,1998-11-26 23:32:13 in212-4,Gruppelærer in212-4,32392,3,1999-02-28 23:35:56 sindres,Sindre Skogen,31848,3,1996-10-11 19:25:04 ingridbo,Ingrid Bønes,31812,3,1999-02-04 17:40:42 runefr,Rune Frøysa,31770,4,1996-10-12 16:49:04 ronnyl,Ronny Lorentzen,31630,4,1998-11-19 15:51:36 runeas,Rune Aske,31465,3,1997-04-20 13:52:38 andersb,Anders Berg,31353,3,1998-12-11 18:47:51 yajunl,Yajun Liu,31284,3,1997-12-05 19:28:46 bjornmy,Bjørn Magnar Myklebust,31271,3,1996-10-10 18:00:27 ahogseth,Anders Hogseth,31139,3,1999-09-09 10:33:54 christkk,Christian Kringstad Kielland,31044,3,1998-05-13 14:28:02 larsha,Lars Håkedal,31015,3,1996-10-12 17:46:48 lokc,Lok Nin Chan,30812,3,1997-12-03 22:45:53 kjetilho,Kjetil BOFH Homme,30713,3,1996-10-09 13:10:10 kritisk,Kristin Skar,30712,3,1999-12-03 14:18:38 erlendg,Erlend Ziegler Gundersen,30592,4,1998-10-31 18:48:42 joner,Jon Wegard Eriksen,30429,5,1999-02-04 17:51:12 jonlo,Jon Cato Lorentzen,30190,4,1996-10-14 09:57:28 vibekes,Vibeke Stoltenberg,30148,2,1996-11-15 15:48:36 davidra,David Ranvig,30131,3,1997-03-06 20:06:37 jenser,Jens Erik Conradi Rønningen,30110,4,1998-11-26 17:14:54 grob,Gro Bjune,30046,4,1998-03-06 20:06:37 larshau,Lars Haugseth,30042,4,1996-10-11 21:14:20 rune,Rune Sung Aske,29833,3,2000-06-01 07:57:51 toresk,Tore Christian Skobba,29504,4,1996-10-18 17:06:33 in114-1,Gruppelærer in114-1,29451,3,1998-08-23 22:09:05 tora,Tor Viggo Andreassen,28579,3,1999-05-16 18:45:30 eivindk,Eivind Krystad,28522,4,1998-08-09 17:36:38 torfinnn,Torfinn Nome,28438,4,1996-10-17 17:20:50 oddvark,Oddvar Kolset,28434,2,1996-10-18 16:52:05 viktore,Viktor Eide,28356,4,1996-10-13 20:14:23 nadeemm,Nadeem Gilani Malik,28092,4,1997-11-19 18:26:05 espenbr,Espen Frøberg Brekke,27848,3,1998-05-08 17:28:39 tormy,Tor Sigurd Mytting,27394,4,1996-10-12 13:38:35 johnen,John Enok Vollestad,26714,4,2000-04-07 18:00:56 dag-erli,Dag-Erling Coidan Smørgrav,26702,4,1998-09-27 19:21:37 synnovef,Synnøve Foss,26593,3,1998-06-12 12:13:58 joergehl,Jørgen Hysvær Langgåt,26560,4,2000-05-10 16:40:08 kjetils,Kjetil Marinius Sjulsen,26518,4,1998-05-25 11:50:18 magnusr,Magnus Rekkedal,26422,4,1996-12-13 15:06:02 janse,Jan Erik Secker,26382,4,1996-10-23 19:46:48 vegardha,Vegard Hanssen,26036,3,1998-03-04 22:18:53 steffent,Steffen Emil Thorkildsen,25626,4,1998-05-08 17:22:19 kapilae,Kapila Epasinghe,25601,3,1996-10-13 16:49:30 in114-6,Gruppelærer in114-6,25305,3,1998-08-23 22:19:24 janjoh,Jan Terje Johansen,25089,3,1996-10-13 15:39:46 runev,Rune Kristian Dalberg Viken,24434,4,1999-11-24 13:03:12 alfl,Alf Dagfinn Lynegard,24398,2,1996-10-13 20:24:33 arnehos,Arne Høstmark,24211,3,1996-10-11 21:21:27 espenbe,Espen Berger,23785,3,1997-03-08 16:46:39 erikkri,Erik Kristensen,23729,3,1999-03-26 21:05:21 mohammas,Mohammad Shamshirgaran,23716,4,1997-12-03 12:35:21 runebs,Rune Brekke Stensland,22818,4,1998-05-08 17:54:36 henningh,Henning Holen,22653,3,1998-02-06 18:09:12 arnstein,Arnstein Schei,22015,3,1996-10-18 18:05:32 steinaa,Steinar Andenes,21936,4,1999-01-08 06:16:11 henrikol,Henrik Olsen,21900,4,1997-10-11 01:28:26 anderbru,Anders Brunland,21868,3,2000-02-03 17:00:52 torstei,Torstein Tauno Svendsen,21811,3,1996-10-16 18:05:16 lenea,Lene Akerhaugen,20990,2,1996-10-18 15:06:37 hegedr,Hege Dreiem,20933,3,1997-07-06 13:33:06 nenadc,Nenad Ciric,20773,3,1996-10-17 08:42:45 svenr,Sven-Arne Reinemo,20704,3,1996-10-16 20:08:53 pederkl,Peder Olavssøn Klingenberg,20691,3,1997-11-29 10:30:40 hellef,Helle Frøyseth,20342,3,1998-12-09 17:33:44 trygvehs,Trygve Håvard Skaaland,20173,3,1997-03-18 20:21:25 paalst,Pål Steihaug,19976,3,1997-02-24 19:49:23 jonth,Jon Hammond Thingvold,19860,4,1996-10-18 17:14:47 ragnarni,Ragnar Nicolaysen,19744,2,1997-12-19 09:47:15 ketilf,Ketil Froyn,19742,4,1998-05-08 17:20:37 ronny,Ronny Andre Nilsen,19642,1,1996-10-11 16:37:23 mortefa,Morten Fahle,19241,3,1999-03-18 15:46:40 thomash,Thomas Horjen,18680,4,1998-10-31 18:50:29 jonsoe,Jon Sølvberg,18536,4,1999-05-05 16:37:58 in147-3,Gruppelærer in147-3,18380,4,1999-03-20 23:11:20 berntj,Bernt Johannessen,18225,3,1998-05-20 18:06:16 rutht,Ruth Kristin Thomlevold,18076,2,1997-05-23 18:56:12 snake4-1.0.14/suid.c000644 000765 000024 00000010162 12372644400 015102 0ustar00sverrehustaff000000 000000 /* $Id: suid.c,v 1.3 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE suid.c * * DESCRIPTION Helper functions for programs running part time * with a different effective user ID. * * The executable file must have the set-UID bit set. * At startup, the function suidInit() is called to set * the effective UID to the user running the program, * to run securely. * * Before a privileged action is to be done, the function * suidStartPrivilegedAction() is called to set the * effective UID to the owner of the executable file. * * when the privileged action is done, call * suidEndPrivilegedAction() to reenter the secure state * where the effective UID matches the user running the * program. * * I have tested this on Linux, Irix, Solaris and SunOS. * If it doesn't work for you, and you fix it, please * mail me a patch. * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include /* uid_t */ #include #include #define HAVE_SETEUID /* possibly move this to a Makefile or something */ #ifdef HAVE_SETEUID # define SETUID seteuid #else # define SETUID setuid #endif /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ static uid_t uidOwner; /* the effective uid at startup */ static uid_t uidUser; /* the real uid at startup */ /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ /*------------------------------------------------------------------------- * * NAME suidInit * * FUNCTION Do initialization at program startup. * * SYNOPSIS #include "suid.h" * void suidInit(void); * * RETURNS Nothing. Aborts the program in case of an error. * * DESCRIPTION Sets the effective UID equal to the real UID, to run * securely. Also sets up variables used by the other * functions. */ void suidInit(void) { uidOwner = geteuid(); uidUser = getuid(); if (uidOwner == 0 && uidUser != 0) msgFatal("won't run as set-UID root\n"); if (SETUID(uidUser) < 0) msgFatalPerror("suidInit"); } /*------------------------------------------------------------------------- * * NAME suidStartPrivilegedAction * * FUNCTION Prepare a privileged action. * * SYNOPSIS #include "suid.h" * void suidStartPrivilegedAction(void); * * RETURNS Nothing. Aborts the program in case of an error. * * DESCRIPTION Sets the effective UID to the program owner. */ void suidStartPrivilegedAction(void) { if (SETUID(uidOwner) < 0) msgFatalPerror("suidStartPrivilegedAction"); } /*------------------------------------------------------------------------- * * NAME suidEndPrivilegedAction * * FUNCTION Reenter secure mode after a privileged action. * * SYNOPSIS #include "suid.h" * void suidEndPrivilegedAction(void); * * RETURNS Nothing. Aborts the program in case of an error. * * DESCRIPTION Sets the effective UID to the program user. */ void suidEndPrivilegedAction(void) { if (SETUID(uidUser) < 0) msgFatalPerror("suidEndPrivilegedAction"); } snake4-1.0.14/suid.h000644 000765 000024 00000000413 12372644400 015105 0ustar00sverrehustaff000000 000000 /* $Id: suid.h,v 1.1 1996/10/08 16:49:00 sverrehu Exp $ */ #ifndef SUID_H #define SUID_H #ifdef __cplusplus extern "C" { #endif void suidInit(void); void suidStartPrivilegedAction(void); void suidEndPrivilegedAction(void); #ifdef __cplusplus } #endif #endif snake4-1.0.14/TODO000644 000765 000024 00000002244 12372644400 014464 0ustar00sverrehustaff000000 000000 BUGS ==== * None, of course. There are never bugs in my programs¹. DO NOW ====== * Include autoconf-stuff I received in a mail. DO LATER (OR NEVER) =================== Igor R * Pause the game when it looses focus. Ingvil Hovig * Speed-up by holding a key down. Must have a command line option that disables this. Kjetil T. Homme * Tell xpm how to map the colors to black and white. May be done from the pixmap progra. * Pause indicator. * Personal highscore. John Olav Olsen * On-line comments, like when the headbanger shows up. Tor Sigurd Mytting * Cartoon-like talk-balloons saying "Yum!" and things like that. Knut Erik Borgen * Super-nam: Doubles the length of the tail, but enables eating rotten food for a while. Alf Dagfinn Lynegard * Put some walls inside the playground. Sverre H. Huseby * Demo-mode where the computer plays the game. * Create a more reasonable scheduler, or rather: Create a reasonable scheduler. The current one isn't. ------ ¹ Big joke. Please laugh. snake4-1.0.14/win.c000644 000765 000024 00000021313 12372644400 014733 0ustar00sverrehustaff000000 000000 /* $Id: win.c,v 1.6 2002/03/02 21:10:55 sverrehu Exp $ */ /************************************************************************** * * FILE win.c * MODULE OF snake4 - game of snake eating fruit * * DESCRIPTION * * WRITTEN BY Sverre H. Huseby * **************************************************************************/ #include #include #include #include #include #include #include #include #include #include "game.h" #include "board.h" #include "snake.h" #include "score.h" #include "win.h" /************************************************************************** * * * P R I V A T E D A T A * * * **************************************************************************/ #define TICK_FREQ 30 static int winSleepDone; static XtIntervalId timerId; static Widget chooseLevelWidget, startWidget[MAX_LEVEL - MIN_LEVEL + 1]; static Widget levelWidget, roundWidget, scoreWidget, highscoreWidget; /************************************************************************** * * * P U B L I C D A T A * * * **************************************************************************/ Display *winDisplay; XtAppContext winAppContext; Widget winTopLevel; Widget winMainWindow; /************************************************************************** * * * P R I V A T E F U N C T I O N S * * * **************************************************************************/ static void winGetAndHandleEvent(void) { XEvent e; XtAppNextEvent(winAppContext, &e); if (e.xany.window == boardWin || e.type == KeyPress) boardHandleEvent(&e); else if (e.type == FocusIn) { XAutoRepeatOff(winDisplay); /* for users holding the keys down */ } else if (e.type == FocusOut) { XAutoRepeatOn(winDisplay); } else XtDispatchEvent(&e); } static void winSleepTimerProc(XtPointer foo, XtIntervalId *bar) { XEvent e; winSleepDone = 1; /* wake up the waiting loop by sending a ClientMessage */ e.type = ClientMessage; e.xclient.message_type = 0; e.xclient.format = 8; XSendEvent(winDisplay, XtWindowOfObject(winMainWindow), 0, 0, &e); } static void winSleep(unsigned long ms) { winSleepDone = 0; XtAppAddTimeOut(winAppContext, ms, winSleepTimerProc, 0); while (!winSleepDone && !gameExit) winGetAndHandleEvent(); } static void timerProc(XtPointer, XtIntervalId *); static void installTimer(void) { timerId = XtAppAddTimeOut(winAppContext, TICK_FREQ, timerProc, 0); } static void removeTimer(void) { XtRemoveTimeOut(timerId); } static void timerProc(XtPointer foo, XtIntervalId *bar) { installTimer(); gameHandleTick(); if (gameEndOfRound) { removeTimer(); if (gameEndOfRound == 1) winSleep(1000); gameFinishRound(); if (gameRound > MAX_ROUNDS || gameEndOfRound > 1) { int q; gameFinishGame(); XtSetSensitive(chooseLevelWidget, 1); for (q = 0; q < MAX_LEVEL - MIN_LEVEL + 1; q++) XtSetSensitive(startWidget[q], 1); XtSetSensitive(levelWidget, 0); XtSetSensitive(roundWidget, 0); XtSetSensitive(scoreWidget, 0); XtSetSensitive(highscoreWidget, 0); } else { installTimer(); gameInitRound(); } } } static void callbackQuit(Widget w, XtPointer clientData, XtPointer callData) { gameExit = 1; } static void callbackStart(Widget w, XtPointer clientData, XtPointer callData) { winChooseLevel((int) clientData); } /************************************************************************** * * * P U B L I C F U N C T I O N S * * * **************************************************************************/ void winParseOptions(int *argc, char *argv[]) { static String resources[] = { "*board.accelerators: :", "*background: black", "*foreground: white", "*borderColor: dim gray", "*Command.background: gray", "*Command.foreground: black", "*score.foreground: yellow", "*font: 9x15bold", NULL }; winTopLevel = XtVaAppInitialize(&winAppContext, "Snake4", NULL, 0, argc, argv, resources, NULL); winDisplay = XtDisplay(winTopLevel); } void winInit(void) { int q; char num[10]; Widget boardWidget; Widget quitWidget; winMainWindow = XtVaCreateManagedWidget("mainWindow", formWidgetClass, winTopLevel, NULL); boardWidget = XtVaCreateManagedWidget("board", coreWidgetClass, winMainWindow, XtNwidth, boardWidth, XtNheight, boardHeight, XtNborderWidth, 0, NULL); chooseLevelWidget = XtVaCreateManagedWidget("chooseLevel", labelWidgetClass, winMainWindow, XtNlabel, "Choose level:", XtNfromVert, boardWidget, NULL); for (q = 0; q < MAX_LEVEL - MIN_LEVEL + 1; q++) { sprintf(num, "%d", q + MIN_LEVEL); startWidget[q] = XtVaCreateManagedWidget(num, commandWidgetClass, winMainWindow, XtNfromHoriz, q ? startWidget[q - 1] : chooseLevelWidget, XtNfromVert, boardWidget, NULL); XtAddCallback(startWidget[q], XtNcallback, callbackStart, (XtPointer) (q + MIN_LEVEL)); } levelWidget = XtVaCreateManagedWidget("level", labelWidgetClass, winMainWindow, XtNlabel, "Level: 0", XtNfromVert, boardWidget, XtNfromHoriz, startWidget[MAX_LEVEL - MIN_LEVEL], XtNsensitive, 0, NULL); roundWidget = XtVaCreateManagedWidget("round", labelWidgetClass, winMainWindow, XtNlabel, "Lives: 0", XtNfromVert, boardWidget, XtNfromHoriz, levelWidget, XtNsensitive, 0, NULL); scoreWidget = XtVaCreateManagedWidget("score", labelWidgetClass, winMainWindow, XtNlabel, "Score: 0", XtNfromVert, boardWidget, XtNfromHoriz, roundWidget, XtNsensitive, 0, NULL); highscoreWidget = XtVaCreateManagedWidget("highscore", labelWidgetClass, winMainWindow, XtNlabel, "High: 0", XtNfromVert, boardWidget, XtNfromHoriz, scoreWidget, XtNsensitive, 0, NULL); quitWidget = XtVaCreateManagedWidget("quit", commandWidgetClass, winMainWindow, XtNlabel, "Quit", XtNfromVert, boardWidget, XtNfromHoriz, highscoreWidget, NULL); XtAddCallback(quitWidget, XtNcallback, callbackQuit, 0); XtRealizeWidget(winTopLevel); XtInstallAccelerators(winTopLevel, boardWidget); boardWin = XtWindowOfObject(boardWidget); } void winFinish(void) { } void winMainLoop(void) { while (!gameExit) winGetAndHandleEvent(); if (gameRunning) scoreFinishGame(); XAutoRepeatOn(winDisplay); winFlush(); } void winFlush(void) { XFlush(winDisplay); } void winTogglePause(void) { if (!gameRunning || gameEndOfRound) return; gamePause ^= 1; if (!gamePause) snakeFlushKeys(); if (gamePause) removeTimer(); else installTimer(); } void winChooseLevel(int level) { int q; if (gameRunning || level < MIN_LEVEL || level > MAX_LEVEL) return; XtSetSensitive(chooseLevelWidget, 0); for (q = 0; q < MAX_LEVEL - MIN_LEVEL + 1; q++) XtSetSensitive(startWidget[q], 0); XtSetSensitive(levelWidget, 1); XtSetSensitive(roundWidget, 1); XtSetSensitive(scoreWidget, 1); XtSetSensitive(highscoreWidget, 1); gameSetLevel(level); gameInitGame(); gameInitRound(); installTimer(); } void winShowLevel(void) { char text[40]; sprintf(text, "Level: %d", gameLevel); XtVaSetValues(levelWidget, XtNlabel, text, NULL); } void winShowRound(void) { char text[40]; sprintf(text, "Lives: %d", MAX_ROUNDS - gameRound + 1); XtVaSetValues(roundWidget, XtNlabel, text, NULL); } void winShowScore(void) { char text[40]; sprintf(text, "Score:%7ld", gameScore); XtVaSetValues(scoreWidget, XtNlabel, text, NULL); } void winShowHighscore(void) { char text[40]; sprintf(text, "High:%7ld", gameHighscore); XtVaSetValues(highscoreWidget, XtNlabel, text, NULL); } snake4-1.0.14/win.h000644 000765 000024 00000001142 12372644400 014736 0ustar00sverrehustaff000000 000000 /* $Id: win.h,v 1.1.1.1 1996/10/04 20:16:16 sverrehu Exp $ */ #ifndef WIN_H #define WIN_H #include /* Display, Window */ #include /* Widget */ void winParseOptions(int *argc, char *argv[]); void winInit(void); void winFinish(void); void winMainLoop(void); void winFlush(void); void winChooseLevel(int level); void winTogglePause(void); void winShowLevel(void); void winShowRound(void); void winShowScore(void); void winShowHighscore(void); extern Display *winDisplay; extern XtAppContext winAppContext; extern Widget winTopLevel; extern Widget winMainWindow; #endif snake4-1.0.14/pixmaps/banana000644 000765 000024 00000000470 12372644400 016617 0ustar00sverrehustaff000000 000000 /* XPM */ static char * banana[] = { "12 12 4 1", " c black", ". c #D34CD34C0000", "X c yellow", "o c #820782070000", " .", " ..", " . ", " X. ", " X.. ", " X... ", " X...o ", " X.... ", " X....o ", " X....o ", " XX...oo ", "Xooooo "}; snake4-1.0.14/pixmaps/banana01000644 000765 000024 00000000472 12372644400 016762 0ustar00sverrehustaff000000 000000 /* XPM */ static char * banana01[] = { "12 12 4 1", " c black", ". c #D34CD34C0000", "X c yellow", "o c #820782070000", " .", " ..", " . ", " X. ", " X.. ", " X... ", " X...o ", " X.... ", " X....o ", " X....o ", " XX...oo ", "Xooooo "}; snake4-1.0.14/pixmaps/banana02000644 000765 000024 00000000402 12372644400 016754 0ustar00sverrehustaff000000 000000 /* XPM */ static char * banana02[] = { "12 12 1 1", " c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; snake4-1.0.14/pixmaps/borderE000644 000765 000024 00000000453 12372644400 016762 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderE[] = { "12 12 3 1", " c #B2CA30C230C2", ". c brown", "X c #410310401040", " ..........X", " .........XX", " ..... ....X", " ..........X", " . ........X", " .......X..X", " ..........X", " ..........X", " ..X.......X", " ..........X", " .... .... X", " ..........X"}; snake4-1.0.14/pixmaps/borderN000644 000765 000024 00000000453 12372644400 016773 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderN[] = { "12 12 3 1", " c #B2CA30C230C2", ". c brown", "X c #410310401040", " ", "............", "....... ....", "...X........", "............", ". ..........", "......... ..", "............", "......X.....", "............", ". ........X.", "XXXXXXXXXXXX"}; snake4-1.0.14/pixmaps/borderNE000644 000765 000024 00000000454 12372644400 017101 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderNE[] = { "12 12 3 1", " c #B2CA30C230C2", ". c #410310401040", "X c brown", " .", "XXXXXXXXX. .", "XXXXXXXX. X.", "XXXXXXX. XX.", "XXXXXX. XXX.", "XXXXX. XXXX.", "XXXX. XXX X.", "XXX. XXXXXX.", "XX. XXXXXXX.", "X. XXXX XXX.", ". XXXXXXXXX.", " XXXXXXXXXX."}; snake4-1.0.14/pixmaps/borderNW000644 000765 000024 00000000454 12372644400 017123 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderNW[] = { "12 12 3 1", " c #B2CA30C230C2", ". c #410310401040", "X c brown", " ", " .XXXXXXXXXX", " .XXX XXXXX", " X .XXXXXXXX", " XX .XXXX XX", " XXX .XXXXXX", " XXXX .XXXXX", " XXXXX .XXXX", " XXXXXX .XXX", " XXXXXXX .XX", " XXXXXXXX .X", " XXXXXXXXX ."}; snake4-1.0.14/pixmaps/borderS000644 000765 000024 00000000453 12372644400 017000 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderS[] = { "12 12 3 1", " c #B2CA30C230C2", ". c brown", "X c #410310401040", " ", "............", "....... ....", "...X........", "............", ". ..........", "......... ..", "............", "......X.....", "............", ". ........X.", "XXXXXXXXXXXX"}; snake4-1.0.14/pixmaps/borderSE000644 000765 000024 00000000454 12372644400 017106 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderSE[] = { "12 12 3 1", " c #B2CA30C230C2", ". c #410310401040", "X c brown", " .XXXXXXXXX.", "X .XXX XXXX.", "XX .XXXXXXX.", "XXX .XXXXXX.", "XXXX .XXXXX.", "XXXXX .XXXX.", "XXXXXX .XXX.", "XX XXXX .XX.", "XXXXXXXX .X.", "XXXXX XXX ..", "XXXXXXXXXX .", "............"}; snake4-1.0.14/pixmaps/borderSW000644 000765 000024 00000000454 12372644400 017130 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderSW[] = { "12 12 3 1", " c #B2CA30C230C2", ". c brown", "X c #410310401040", " ..........X", " .........X ", " ... ....X .", " .......X ..", " ......X ...", " . ...X ....", " ....X ... .", " ...X ......", " ..X ...X...", " .X ........", " X .........", " XXXXXXXXXXX"}; snake4-1.0.14/pixmaps/borderW000644 000765 000024 00000000453 12372644400 017004 0ustar00sverrehustaff000000 000000 /* XPM */ static char * borderW[] = { "12 12 3 1", " c #B2CA30C230C2", ". c brown", "X c #410310401040", " ..........X", " .........XX", " ..... ....X", " ..........X", " . ........X", " .......X..X", " ..........X", " ..........X", " ..X.......X", " ..........X", " .... .... X", " ..........X"}; snake4-1.0.14/pixmaps/headbanger01000644 000765 000024 00000000564 12372644400 017624 0ustar00sverrehustaff000000 000000 /* XPM */ static char * headbanger01[] = { "12 12 7 1", " c black", ". c white", "X c #B2CAB2CAB2CA", "o c #820782078207", "O c #618561856185", "+ c #FFFF82078207", "@ c brown", " ...... ", " .XXXXXXo ", " .XXXXXXXXO", " OOOOOOOOOO", " +@@ ", " +@@ ", " +@@ ", " +@@ ", " +@@ ", " +@@ ", " +@@ ", " @ "}; snake4-1.0.14/pixmaps/headbanger02000644 000765 000024 00000000537 12372644400 017625 0ustar00sverrehustaff000000 000000 /* XPM */ static char * headbanger02[] = { "12 12 6 1", " c black", ". c white", "X c #618561856185", "o c #B2CAB2CAB2CA", "O c brown", "+ c #FFFF82078207", " . ", " ....X ", " .oooX ", " .oooX ", ".oooXO+ ", "XooXOOO+ ", " XX OOO+ ", " OOO+ ", " OOO+ ", " OOO ", " ", " "}; snake4-1.0.14/pixmaps/headbanger03000644 000765 000024 00000000537 12372644400 017626 0ustar00sverrehustaff000000 000000 /* XPM */ static char * headbanger03[] = { "12 12 6 1", " c black", ". c white", "X c #B2CAB2CAB2CA", "o c #618561856185", "O c #FFFF82078207", "+ c brown", " ", " ", " .. ", " Xo ", " .Xo ", " XXo ", ".XXoOOOOOOO ", ".XXo++++++++", ".XXo+++++++ ", ".XXo ", ".XXo ", "oooo "}; snake4-1.0.14/pixmaps/headbanger04000644 000765 000024 00000000537 12372644400 017627 0ustar00sverrehustaff000000 000000 /* XPM */ static char * headbanger04[] = { "12 12 6 1", " c black", ". c white", "X c #618561856185", "o c #B2CAB2CAB2CA", "O c brown", "+ c #FFFF82078207", " . ", " ....X ", " .oooX ", " .oooX ", ".oooXO+ ", "XooXOOO+ ", " XX OOO+ ", " OOO+ ", " OOO+ ", " OOO ", " ", " "}; snake4-1.0.14/pixmaps/instructions000644 000765 000024 00000520260 12372644400 020147 0ustar00sverrehustaff000000 000000 /* XPM */ static char * instructions[] = { "667 256 25 1", " c None", ". c #000000", "+ c #0000FF", "@ c #00A200", "# c #87CEFF", "$ c #FF0000", "% c #00FF00", "& c #828200", "* c #D30000", "= c #C30000", "- c #7A0B0B", "; c #00D300", "> c #008200", ", c #D3D300", "' c #FFFF00", ") c #FFBF00", "! c #A2A2A2", "~ c #828282", "{ c #515151", "] c #D3D3D3", "^ c #820000", "/ c #FFFFFF", "( c #B2B2B2", "_ c #616161", ": c #FF8282", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", ".....................+++++++++..............................................................++++++.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..................+++++++++++++++...........................................................++++++.............................................................+++++++.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "................++++++++++++++++++..........................................................++++++............................................................++++++++.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...............++++++++++++++++++++.........................................................++++++...........................................................+++++++++.............................................................................................................................................................................................................................................................................................................................................................................@@..@@..................................................................................................................................", "..............+++++++++++++++++++++........................................................++++++...........................................................+++++++++...............................................................................................................................................................................................................#...............###..............................#....#........#....#................#.......................................................................$$$$@@@@.$$................%%%..%...............%.........................................###...###..............#.................#......", "..............+++++++.......++++++++.......................................................++++++..........................................................++++++++++...............................................................................................................................................................................................................#..............#...#.............................#....#........#....#................#......................................................................$$$$$$@@$$$$...............%...%.%...............%........................................#...#.#...#.............#.................#......", ".............++++++..........+++++++.......................................................++++++..........................................................++++++++++...............................................................................................................................................................................................................#.##..#..#.....#.....#...#..##..#.#.#.#..##......#....#........#....#.#..#..##...##..#.##..#..#.............................................................$$&$$@@@$$$$...............%....%%%%.%.%%..%.%.%.%.%...%%..%.%%.%%.%..........................#.#...#....#...#....#..##..#...#..##..#......", ".............++++++...........++++++.......................................................++++++.........................................................++++.++++++...............................................................................................................................................................................................................##..#.#..#......###..#...#.#..#.##..##..#..#.....######........######.#..#.#..#.#..#.##..#.#..#.............................................................$&$$@$$$$$$&................%%%..%.%%.%..%.%.%.%.%%.%.%..%.%%.%%.%.%..........................#.#...#.....#.#.....#.#..#.#...#.#..#.#......", ".............++++++...........++++++......+++++....++++++..............++++++++++..........++++++......++++++++.......++++++++...........................++++..++++++...............................................................................................................................................................................................................#...#.#.#..........#..#.#..####.#...#...####.....#....#........#....#.#..#..##..####.#...#.#.#..............................................................$$$$$$$&$$$$...................%.%.%...%%%.%.%.%.%..%.%%%%.%..%..%.%........................##..#...#......#......#.####..#.#..####.#......", "............+++++++......................++++++..++++++++++..........++++++++++++++.......++++++......+++++++.......++++++++++++........................++++..++++++................................................................................................................................................................................................................#...#.#.#......#...#..#.#..#....#...#...#........#....#........#....#.#..#....#.#....#...#.#.#..............................................................$$$$&$$$&$$$...............%...%.%.%..%..%.%.%.%.%..%.%....%..%..%.%.......................#....#...#.....#.#.....#.#.....#.#..#....#......", "............++++++++.....................++++++.++++++++++++.......+++++++++++++++++......++++++.....+++++++......+++++++++++++++......................+++++..++++++................................................................................................................................................................................................................##..#..##......#...#...#...#..#.#...#...#..#.....#....#........#....#.#..#.#..#.#..#.##..#..##..............................................................$$$&$$$$$$$*...............%...%.%.%..%..%..%.%..%%.%.%..%.%..%...%%......................#.....#...#....#...#....#.#..#...#...#..#.#......", "............+++++++++++..................+++++++++++++++++++.......++++++++++++++++++.....++++++....+++++++......+++++++++++++++++....................+++++...++++++................................................................................................................................................................................................................#.##...#........###....#....##..#...#....##......#....#..#.....#....#..###..##...##..#.##...#................................................................$$$$$&$$$*.................%%%..%%%...%%.%.%.%..%.%...%%..%..%....%......................#####..###.....#...#....#..##....#....##..#......", ".............++++++++++++++..............+++++++++++++++++++......+++++++++++++++++++.....++++++...+++++++......++++++++++++++++++....................++++....++++++.......................................................................................................................................................................................................................#....................................................................................#.................................................................$$$$$&$*=........................................................%.......................................................................", ".............+++++++++++++++++...........+++++++.....+++++++.....+++++++......+++++++.....+++++...+++++++.......++++++.....+++++++...................++++.....++++++......................................................................................................................................................................................................................#....................................................................................#....................................................................$$$$=........................................................%%........................................................................", "..............++++++++++++++++++........+++++++.......++++++.....++++++.......++++++.....++++++..+++++++.......++++++.......+++++++.................++++.....++++++........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...............++++++++++++++++++.......++++++........++++++..................++++++.....++++++.++++++........++++++.........++++++................+++++.....++++++........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..................++++++++++++++++......++++++........++++++.............+++++++++++.....++++++++++++.........++++++.........++++++...............+++++......++++++........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "......................++++++++++++......++++++........++++++........++++++++++++++++.....+++++++++++++........+++++++++++++++++++++..............+++++.......++++++........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", ".........................+++++++++.....++++++........++++++.......+++++++++++++++++.....++++++++++++++.......+++++++++++++++++++++...............++++.......++++++.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................+++++++.....++++++........++++++......++++++++++++++++++.....+++++++++++++++......+++++++++++++++++++++..............+++++++++++++++++++++......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "............................++++++.....++++++........++++++.....++++++++.....++++++.....+++++++++++++++......+++++++++++++++++++++..............+++++++++++++++++++++......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..........++++++............++++++.....++++++........++++++....+++++++.......++++++.....+++++++..++++++......++++++.............................+++++++++++++++++++++.....................................................................................................................................................................................................................................................................................................................................................................................--...............................................................................................................................", "..........++++++...........++++++......++++++........++++++....++++++........++++++.....++++++...+++++++.....++++++.............................+++++++++++++++++++++...................................................................................................................................................................................................................................................................................................................................................................................%---................%%%%............................................................#...#####.............#.................#......", "..........++++++...........++++++.....++++++........++++++....++++++........++++++.....++++++....+++++++.....++++++........++++++...............++++++++++++++++++++..................................................................................................................................................................................................................................................................................................................................................................................%;;;--................%...%..........................................................##...#.................#.................#......", "..........++++++++.......++++++++.....++++++........++++++....++++++.......+++++++.....++++++.....+++++++....+++++++......+++++++..........................++++++....................................................................................................................................................................................................................................................................................................................................................................................%;;;;..................%...%..%%..%%%..%.%.............................................#...#........#...#....#..##..#...#..##..#......", "..........++++++++++++++++++++++......++++++........++++++....++++++++++++++++++++.....++++++.....+++++++....+++++++++++++++++++...........................++++++...................................................................................................................................................................................................................................................................................................................................................................................%;;;;;..................%%%%..%..%....%.%%..............................................#...####......#.#.....#.#..#.#...#.#..#.#......", "...........++++++++++++++++++++.......++++++........++++++....++++++++++++++++++++.....++++++.....+++++++.....+++++++++++++++++............................++++++.................................................................................................................................................................................................................................................................................................................................................................................%%;;;;;>..................%.....%%%%..%%%.%...............................................#.......#......#......#.####..#.#..####.#......", "...........+++++++++++++++++++........++++++........++++++.....++++++++++++.++++++.....++++++......+++++++....++++++++++++++++.............................++++++...............................................................................................................................................................................................................................................................................................................................................................................>;;;%;;;;>..................%.....%....%..%.%...............................................#.......#.....#.#.....#.#.....#.#..#....#......", ".............+++++++++++++++.........++++++........++++++......+++++++++++..++++++....++++++.......+++++++.....+++++++++++++..............................++++++................................................................................................................................................................................................................................................................................................................................................................................;;;;;%;;;...................%.....%..%.%..%.%...............................................#...#...#....#...#....#.#..#...#...#..#.#......", "................+++++++++............++++++........++++++........++++++.....++++++....++++++.......+++++++........++++++++................................++++++................................................................................................................................................................................................................................................................................................................................................................................;;;;;;;;;...................%......%%...%%.%%...............................................#....###.....#...#....#..##....#....##..#......", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................;;.;;;;;>..................................................................................................................................", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................;..;;;;;...................................................................................................................................", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................>;;;;.....................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................,...............................................................................................................................", "..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................,,................%%%%............................................................#....###..............#.................#......", "..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................,.................%...%..........................................................##...#...#.............#.................#......", ".........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................',.................%...%.%%%..%.%%..%%%..%.%%..%%%.................................#...#...#....#...#....#..##..#...#..##..#......", "........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................',,.................%%%%.....%.%%..%....%.%%..%....%................................#...#...#.....#.#.....#.#..#.#...#.#..#.#......", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................',,,.................%...%..%%%.%...%..%%%.%...%..%%%................................#...#...#......#......#.####..#.#..####.#......", ".......).......)...........................)...).....................................)....................................................)......)...)........................)....................................................)........................)....................)........))..................)............)...................)......)......)......)..)...)...)....................)...)..................)).........................................................................................................................',,,&.................%...%.%..%.%...%.%..%.%...%.%..%................................#...#...#.....#.#.....#.#.....#.#..#....#......", ".......)).....))...........................)...).....................................)....................................................)......)...)........................)....................................................)........................)....................).......)....................)...........).).........................)......).........)...)........................)...).................)..........................................................................................................................',,,,..................%...%.%..%.%...%.%..%.%...%.%..%................................#...#...#....#...#....#.#..#...#...#..#.#......", ".......)).....))...)))...)...)...)))......)))..).))....)))........))...).))....)))...)..)...)))........)))...).)..)))...)...)..).))....)).).....)))..).))....))).......).))...)...)))...)...)...)).)..).)..)))...)...)..).))....)).).......)))...).))....)).).......)))....)))..))).....)))..)))....)))....)).)...........).)....)...)...)))...)...)).)......).))...).))).)))..)..).))....)).).....)))..).))....)))......)))..)))...).))....)))....)))..............................................................................................',,,,&..................%%%%...%%.%%...%..%%.%%...%..%%.%...............................#....###.....#...#....#..##....#....##..#......", ".......).)...).)..)...)..)...)..)...)......)...))..)..)...)......)..)..))..)..)...)..).)...)...)......)...)..))..)...)..)...)..))..)..)..))......)...))..)..)...)......))..)..)..)...)..)...)..)..))..))..)...)..)...)..))..)..)..))......)...)..))..)..)..))......)...)..)...)..).......)..)...)..)...)..)..))..........)...)...)...)..)...)..)..)..))......))..)..)..)...)...)..))..)..)..))......)...))..)..)...)......)..)...)..))..)..)...)..)...)............................................................................................',,,,&..................................................................................................................................", ".......).)...).)..)...)..)...)..)...)......)...)...)..)...)......).....)...)......)..))....)...)..........)..)...)...)..)...)..)...)..)...)......)...)...)..)...)......)...)..)......)..)...)..)...)..)...)...)..)...)..)...)..)...)..........)..)...)..)...)......)...)......)..).......)..)...)..)...)..)...)..........)...)...)...)..)...)..)..)...)......)...)..)..)...)...)..)...)..)...)......)...)...)..)...)......)..)...)..)...)..)......)...)..........................................................................................'',,,&&...................................................................................................................................", ".......)..).)..)..)...)...).)...)))))......)...)...)..))))).......))...)...)...))))..))....))))).......))))..)...)...)..)...)..)...)..)...)......)...)...)..)))))......)...)..)...))))..)..)...)...)..)...)...)..)...)..)...)..)...).......))))..)...)..)...)......)))))...))))..).......)..)...)..)...)..)...)..........)))))....).)...)...)..)..)...)......)...)..)..)...)...)..)...)..)...)......)...)...)..)))))......)..)))))..)...)..)......))))).........................................................................................'&&&&&.....................................................................................................................................", ".......)..).)..)..)...)...).)...)..........)...)...)..).............)..)...)..)...)..).)...)..........)...)..)...)...)..)...)..)...)..)...)......)...)...)..)..........)...)..)..)...)...).)...)...)..)...)...)..)...)..)...)..)...)......)...)..)...)..)...)......)......)...)..).......)..)...)..)...)..)...).........).....)...).)...)...)..)..)...)......)...)..)..)...)...)..)...)..)...)......)...)...)..)..........)..)......)...)..)......)........................................................................................................................................................................................................................................", ".......)...)...)..)...)....)....)...)......)...)...)..)...)......)..)..)...)..)...)..)..)..)...)......)...)..)...)...)..)..))..)...)..)..))......)...)...)..)...)......))..)..)..)...)...).)...)..))..)...)...)..)..))..)...)..)..))......)...)..)...)..)..))......)...)..)...)..).......)..)...)..)...)..)..)).........).....)....)....)...)..)..)..))......)...)..)..)...)...)..)...)..)..))......)...)...)..)...)......)..)...)..)...)..)...)..)...)....................................................................................................................................................................................................................................", ".......)...)...)...))).....).....))).......))..)...)...)))........))...)...)...))).).)...)..)))........))).).)....)))....)).)..)...)...)).)......))..)...)...))).......).))...)...))).)...).....)).)..)....)))....)).)..)...)...)).).......))).).)...)...)).).......)))....))).).))......)...)))....)))....)).)..)......).....)....).....)))...)...)).)......)...)..)..))..))..)..)...)...)).)......))..)...)...))).......)...)))...)...)...)))....)))....)................................................................................................................................................................................................................................", ".......................................................................................................................................................................)..................)........).........................................................................................................................................................................................)............................................................)................................................................................................................................................................................................................................", ".......................................................................................................................................................................).................).....)...).....................................................................................................................................................................................)...)...........................................................).................................................................................................................................................................................................................................", ".......................................................................................................................................................................)................).......))).......................................................................................................................................................................................)))..............................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................''.........................%...................................................................#####.............#.................#......", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................','''......................%...................................................................#.................#.................#......", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................',,>,,&....................%.....%%..%%%.%%...%%%..%.%%........................................#........#...#....#..##..#...#..##..#......", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................',,,,,,,...................%....%..%.%..%..%.%...%.%%..%.......................................####......#.#.....#.#..#.#...#.#..#.#......", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................,,;,;,,,&..................%....%%%%.%..%..%.%...%.%...%...........................................#......#......#.####..#.#..####.#......", ".....................)...)....................).........)...).............)............................)......................................................).................)...)......................))..................)............................)......)......)..)...)............................................................................)..........)..)....................................................................................................................................................................&,,,,,,,,..................%....%....%..%..%.%...%.%...%...........................................#.....#.#.....#.#.....#.#..#....#......", ".....................)........................).........)...).............)............................)......................................................).................)...).....................)....................)............................)......).........)................................................................................).............).....................................................................................................................................................................,;,,,;,,,.................%....%..%.%..%..%.%...%.%...%.......................................#...#....#...#....#.#..#...#...#..#.#......", "........)))....)))..)))..)..).))....)).)......)...)))..)))..).))....)))...)......).)..)...)...)...))...).))...).)..)))...).)..)....))........)))...).))....)).)......).)..)))..))).)))...)))...).))......)))..)))....)))....)).)...........)))...).))....)).)......).))...).)))..)..).))....)).)......)...)...)))...)...)..).)......)))..)...)...).).))......)))...)))...)..).....................................................................................................................................................................&,,,,,,,,.................%%%%..%%..%..%..%..%%%..%...%........................................###.....#...#....#..##....#....##..#......", ".......)...)..)...)..)...)..))..)..)..))......)..)...)..)...))..)..)...)..)......)).)).)..)...)..)..)..))..)..))..)...)..)).)).)..)..)......)...)..))..)..)..))......))..)...)..)...)...)...)..))..)......)..)...)..)...)..)..))..........)...)..))..)..)..))......))..)..)..)...)..))..)..)..))......)...)..)...)..)...)..))......)...).)...)...).))..)......)...)...)..)..).......................................................................................................................................................................&,,,>,,................................................................................................................................", ".......)...)......)..)...)..)...)..)...)......)..)...)..)...)...)......)..)......)..)..)..)...)..).....)...)..)...)...)..)..)..)..).............)..)...)..)...)......)...)...)..)...)...)...)..)...)......)..)...)..)...)..)...)..............)..)...)..)...)......)...)..)..)...)..)...)..)...)......)...)..)...)..)...)..).......)...)..)..)..)..)...)......).......)..)..)..........................................................................................................................................................................&&&&................................................................................................................................", ".......)))))...))))..)...)..)...)..)...)......)..)))))..)...)...)...))))..)......)..)..)..)...)...))...)...)..)...)...)..)..)..)...))........))))..)...)..)...)......)...)...)..)...)...)))))..)...)......)..)...)..)...)..)...)...........))))..)...)..)...)......)...)..)..)...)..)...)..)...)......)..)...)...)..)...)..).......)...)..)..)..)..)...)......)....))))..)..)..............................................................................................................................................................................................................................................................................................................", ".......)......)...)..)...)..)...)..)...)......)..)......)...)...)..)...)..)......)..)..)..)...).....)..)...)..)...)...)..)..)..).....)......)...)..)...)..)...)......)...)...)..)...)...)......)...)......)..)...)..)...)..)...)..........)...)..)...)..)...)......)...)..)..)...)..)...)..)...).......).)...)...)..)...)..).......)...)..).).).)..)...)......)...)...)..)..)..............................................................................................................................................................................................................................................................................................................", ".......)...)..)...)..)...)..)...)..)..))......)..)...)..)...)...)..)...)..)......)..)..)..)..))..)..)..)...)..)...)...)..)..)..)..)..)......)...)..)...)..)..))......)...)...)..)...)...)...)..)...)......)..)...)..)...)..)..))..........)...)..)...)..)..))......))..)..)..)...)..)...)..)..)).......).)...)...)..)..))..).......)...)...)...)...)...)......)...)...)..)..)..............................................................................................................................................................................................................................................................................................................", "........)))....))).).))..)..)...)...)).)......)...)))...))..)...)...))).).)......)..)..)...)).)...))...)...)..)....)))...)..)..)...))........))).).)...)...)).)......)....)))...))..))...)))...)...)......)...)))....)))....)).)...).......))).).)...)...)).)......).))...)..))..)..)...)...)).)........).....)))....)).)..)........)))....)...)...)...)......))...))).).)..)..)...........................................................................................................................................................................................................................................................................................................", ".......................................)...........................................................................................................................................................................................)...........................................................)........)..................................................................................................................................................................................................................................................................................................................................................................................", "...................................)...)..........................................................................................................................................................................................)........................................................)...).......)...................................................................................................................................................................................................................................................................................................................................................................................", "....................................))).....................................................................................................................................................................................................................................................))).......)....................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!!~!......................'''..'.'...............'.'.'.............................#....###...###..............#.................#......", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!~~~~~~~...................'...'.'...................'.'............................##...#...#.#...#.............#.................#......", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................~~~~~~~~{..................'.....'.'.'''.''..'.''..'.'.'.............................#...#...#.#...#....#...#....#..##..#...#..##..#......", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!~~~~~{!~~{..................'''..'.'.'..'..'.''..'.'.'.'.............................#...#...#.#...#.....#.#.....#.#..#.#...#.#..#.#......", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!~~~~{!~~~{.....................'.'.'.'..'..'.'...'.'.'.'.............................#...#...#.#...#......#......#.####..#.#..####.#......", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................~~~~{!!~~~~.................'...'.'.'.'..'..'.'...'.'.'.'.............................#...#...#.#...#.....#.#.....#.#.....#.#..#....#......", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!~~{!!~~~~{.................'...'.'.'.'..'..'.''..'.'.'.'.............................#...#...#.#...#....#...#....#.#..#...#...#..#.#......", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................!~{!~~~~~~{..................'''..'.'.'..'..'.'.''..'.'.'.............................#....###...###.....#...#....#..##....#....##..#......", ".......).....)........................................)......)...).........................................)..)..................)..)..)...............)..)..)......).................................................................................).........)...))...........................................).......)...)......)..................................................)..)..)....................).............).................)..............................................................................................~~~~~~~~~{...................................'............................................................................................", ".......))....)........................................)......)...).........................................)........................)..)..................)..)......).................................................................................).........)..).............................................).......)...)............................................................)..)....................).............).................)..............................................................................................!~~~~~~~{....................................'............................................................................................", ".......).)...)...)))..)...)...)......)))...).))....)).).....)))..).))....)))...).))........)))........))...)..)..).)..)...).))...)..)..).....)...)...).)..)..)......).))....)))...)...)..).))....)))....)))........)))...).)..)))...)...)..).))....)).).........).))).....)...)...)))...)...).......)))....)))..))).....)))..).))...)...))...........)...)...)))...)...).....)...)...).)..)..).......)).)...)))..))).......))...).))....)))...).))))...)))...).)...................................................................................!!~{{{..................................................................................................................................", ".......).)...)..)...).)...)...).....)...)..))..)..)..))......)...))..)..)...)..))..)......)...)......)..)..)..)..)).)).)..))..)..)..)..).....)...)...).)..)..)......))..)..)...)..)...)..))..)..)...)..)...)......)...)..))..)...)..)...)..))..)..)..)).........)..)......)...)..)...)..)...)......)...)..)...)..).......)...))..)..)..)..)..........)...)..)...)..)...).....)...)...).)..)..)......)..))..)...)..).......)..)..))..)..)...)..))..)...)...)..))............................................................................................................................................................................................................................", ".......)..)..)..)...)..)..)..)..........)..)...)..)...)......)...)...)..)...)..)...)..........)......).....)..)..)..)..)..)...)..)..)..)......)..)..)..)..)..)......)...)..)...)..)...)..)...)..)......)...)..........)..)...)...)..)...)..)...)..)...).........)..)......)...)..)...)..)...)......)...)......)..).......)...)...)..)..).............)...)..)...)..)...)......)..)..)..)..)..)......)...)..)...)..).......).....)...)..)...)..)...)...)...)..).............................................................................................................................................................................................................................", ".......)...).)..)...)..)..)..).......))))..)...)..)...)......)...)...)..)))))..)...).......)))).......))...)..)..)..)..)..)...)..)..)..)......)..)..)..)..)..)......)...)..)...)..)...)..)...)..)......))))).......))))..)...)...)..)...)..)...)..)...).........)..)......)..)...)...)..)...)......)))))...))))..).......)...)...)..)...))...........)..)...)...)..)...)......)..)..)..)..)..)......)...)..)))))..)........))...)...)..)...)..)...)...)))))..).............................................................................................................................................................................................................................", ".......)...).)..)...)..).).).)......)...)..)...)..)...)......)...)...)..)......)...)......)...).........)..)..)..)..)..)..)...)..)..)..)......).).).)..)..)..)......)...)..)...)..)...)..)...)..)......)..........)...)..)...)...)..)...)..)...)..)...).........)..).......).)...)...)..)...)......)......)...)..).......)...)...)..).....)...........).)...)...)..)...)......).).).)..)..)..)......)...)..)......)..........)..)...)..)...)..)...)...)......).............................................................................................................................................................................................................................", ".......)....))..)...)...)...).......)...)..)...)..)..))......)...)...)..)...)..)...)......)...)......)..)..)..)..)..)..)..))..)..)..)..).......)...)...)..)..)......))..)..)...)..)..))..)...)..)...)..)...)......)...)..)...)...)..)..))..)...)..)..)).........)..).......).)...)...)..)..))......)...)..)...)..).......)...)...)..)..)..)...........).)...)...)..)..)).......)...)...)..)..)......)..))..)...)..).......)..)..)...)..)...)..)...)...)...)..).............................................................................................................................................................................................................................", ".......).....)...)))....)...)........))).).)...)...)).)......))..)...)...)))...)...).......))).)......))...)..)..)..)..)..).))...)..)..).......)...)...)..)..)......).))....)))....)).)..)...)...)))....)))........))).).)....)))....)).)..)...)...)).)..)......)..)........).....)))....)).).......)))....))).).))......))..)...)..)...))....)........).....)))....)).).......)...)...)..)..).......)).)...)))...)).......))...)...)...)))...)...))...)))...)....)........................................................................................................................................................................................................................", "..........................................................................................................................).................................................................................................................................................).................................................................)........)................................................).........................................................)........................................................................................................................................................................................................................", "..........................................................................................................................)................................................................................................................................................).................................................................)........).............................................)...)........................................................).........................................................................................................................................................................................................................", "..........................................................................................................................)...............................................................................................................................................)..........................................................................)...............................................)))...................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*$$$$$$..................................................................................................................................", ".................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*$=]====**.................$..........$..$..........$......................$..............................................................", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................$$====!=]=^^................$..........$..$..........$......................$..............................................................", ".........................)........................................)..)..)....................).............)...................................................).........)..............))...................................................).......................)...)...................................)...................................))))))).).................).....................................)...................)..........................................................................................................$==========^................$.....$$..$$$.$.$$..$$$..$....$$$.$$..$..$..$$..$.$$..$.$..$$$...$$$..$$$.$$...................................", ".........................)...........................................)..)..................................).............................................................).............).....................................................).......................)...)...................................)......................................)....).................).........................................................)..........................................................................................................$==]==]====^................$....$..$..$..$$..$....$.$....$..$..$.$..$.$..$.$$..$.$$..$...$.$...$.$..$..$..................................", "........)))...).))....)).)......)...)...)))...)...).....)...)...).)..)..).......)).)...)))...)..).)).......).))....)))...).))...)...)...)).......).))....)))...)..).))..)))...))......)))..)))...).)......)))...)...)...)))...).).)...)......)...)))...).))....)).).)))..).)).......)...)...)))...)...)......)...)))....)))....))....)))............)....).))....))).......).))....)))...).))...)...)...)).......)...))........)))...)...))....)))...............................................................................................*========^.................$....$$$$..$..$...$..$$$.$....$..$..$.$..$..$$..$...$.$...$...$.$...$.$..$..$..................................", ".......)...)..))..)..)..))......)...)..)...)..)...).....)...)...).)..)..)......)..))..)...)..)..))..)......))..)..)...)..))..)..)...)..)..)......))..)..)...)..)..))..)..)...)..)......)..)...)..))......)...)..)...)..)...)..))..)...)......)..)...)..))..)..)..))..)...))..)......)...)..)...)..)...)......)..)...)..)...)..)..)..)...)...........)....))..)..)...)......))..)..)...)..))..)..)...)..)..)......)..)..)......)...)..)..)..)..)...)...............................................................................................^^^^^^^^..................$....$.....$..$...$.$..$.$....$..$..$.$..$....$.$...$.$...$...$.$...$.$..$..$..................................", "...........)..)...)..)...)......)...)..)...)..)...)......)..)..)..)..)..)......)...)......)..)..)...)......)...)..)...)..)...)..)...)..).........)...)..)...)..)..)...)..)...).........)..)...)..).......)...)..)...)..)...)..)...)...)......)..)...)..)...)..)...)..)...)...)......)...)..)...)..)...)......)..)...)..)...)..).....)...)...........)....)...)..)...)......)...)..)...)..)...)..)...)..).........)..).............)..)..).....)...).................................................................................................]!!~....................$....$..$..$..$...$.$..$.$....$..$..$.$..$.$..$.$...$.$...$...$.$...$.$..$..$..................................", "........))))..)...)..)...)......)..)...)...)..)...)......)..)..)..)..)..)......)...)...))))..)..)...)......)...)..)...)..)...)..)...)...)).......)...)..)...)..)..)...)..)....)).......)..)...)..).......)))))...).)...)))))..)...)..).......)..)))))..)...)..)...)..)...)...)......)..)...)...)..)...)......)..)...)..)...)...))...)))))...........)....)...)..)))))......)...)..)...)..)...)..)...)...)).......)...))........))))..)...))...)...)................................................................................................@]!!~....................$$$$..$$...$$.$...$..$$.$$....$..$..$..$$$..$$..$...$.$....$$$...$$$..$..$..$..................................", ".......)...)..)...)..)...).......).)...)...)..)...)......).).).)..)..)..)......)...)..)...)..)..)...)......)...)..)...)..)...)..)...).....)......)...)..)...)..)..)...)..)......)......)..)...)..).......).......).)...)......)....).).......)..)......)...)..)...)..)...)...).......).)...)...)..)...)......)..)...)..)...).....)..)...............)....)...)..)..........)...)..)...)..)...)..)...).....)......).....)......)...)..).....)..)...).................................................................................................]!!~.@.................................................................................................................................", ".......)...)..)...)..)..)).......).)...)...)..)..)).......)...)...)..)..)......)..))..)...)..)..)...)......))..)..)...)..)...)..)..))..)..)......))..)..)...)..)..)...)..)...)..)......)..)...)..).......)...)....)....)...)..)....).).......)..)...)..)...)..)..))..)...)...).......).)...)...)..)..))......)..)...)..)...)..)..)..)...)...........)....)...)..)...)......))..)..)...)..)...)..)..))..)..)......)..)..)......)...)..)..)..)..)...)................................................................................................]@!!!@..................................................................................................................................", "........))).).)...)...)).)........).....)))....)).).......)...)...)..)..).......)).)...))).).)..)...)......).))....)))...)...)...)).)...)).......).))....)))...)..)...)..))...)).......)...)))...)........))).....).....)))...).....)........)...)))...)...)...)).)..))..)...)........).....)))....)).)......)...)))....)))....))....)))...)........)....)...)...))).......).))....)))...)...)...)).)...)).......)...))........))).).)...))....))).................................................................................................]!@!@~..................................................................................................................................", "..................................)................................................).............................................................)..................................................................................).............................)...................)....................................................................................................................................................................................................................................................................................................................................................................................................", ".................................).............................................)...).............................................................).................................................................................)..........................)...)..................).....................................................................................................................................................................................................................................................................................................................................................................................................", "................................)...............................................)))..............................................................)................................................................................)............................)))..................)......................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../!!~...................................................................................................................................", "..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................//!!!!~~..................$$$$.........$...$..................$$................$........................................................", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................./..!!!!..~.................$...$........$...$.................$..................$........................................................", "..............)....................................)................................................................)......)..................................................................................................................................................................................................................................................................................................................................................................................................................../!...!!...!~................$...$..$$$..$$$.$$$..$$..$.$$.....$$$..$$$...$$$...$$.$........................................................", "...................................................)................................................................).........................................................................................................................................................................................................................................................................................................................................................................................................................../!..!!.!..!~................$$$$..$...$..$...$..$..$.$$..$.....$..$...$.$...$.$..$$........................................................", "........)).)..)..)...)...)))...).))......)...)...).).))....)))...).))........))).......).)..)))...)...)..).))....)).)......)...))........)))...)...)...)))...).)................................................................................................................................................................................................................................................................................................................................................................................/!..!..!..!~................$...$.$...$..$...$..$$$$.$...$.....$..$...$.$...$.$...$........................................................", ".......)..))..)..)...)..)...)..))..).....)...)...).))..)..)...)..))..)......)...)......))..)...)..)...)..))..)..)..))......)..)..)......)...)..)...)..)...)..))..................................................................................................................................................................................................................................................................................................................................................................................!!!!..!!!!.................$...$.$...$..$...$..$....$...$.....$..$...$.$...$.$...$........................................................", ".......)...)..)..)...)..)...)..)...)......)..)..)..)...)..)...)..)...)..........)......)...)...)..)...)..)...)..)...)......)..).........)...)..)...)..)...)..)....................................................................................................................................................................................................................................................................................................................................................................................!!!!!!!!..................$...$.$...$..$...$..$..$.$...$.....$..$...$.$...$.$..$$........................................................", ".......)...)..)...).)...)))))..)...)......)..)..)..)...)..)))))..)...).......))))......)...)...)..)...)..)...)..)...)......)...)).......)...)...).)...)))))..)...................................................................................................................................................................................................................................................................................................................................................................................../.!.!....................$...$..$$$...$$..$$..$$..$...$.....$...$$$...$$$...$$.$........................................................", ".......)...)..)...).)...)......)...)......).).).)..)...)..)......)...)......)...)......)...)...)..)...)..)...)..)...)......).....)......)...)...).)...)......)....................................................................................................................................................................................................................................................................................................................................................................................!/.!.!.!.................................................................................................................................", ".......)..))..)....)....)...)..)...).......)...)...)...)..)...)..)...)......)...)......)...)...)..)..))..)...)..)..))......)..)..)......)...)....)....)...)..)..................................................................................................................................................................................................................................................................................................................................................................................!!./!~!~!.!!...............................................................................................................................", "........)).)..)....).....)))...)...).......)...)...)...)...)))...)...).......))).).....)....)))....)).)..)...)...)).)......)...))........))).....).....)))...)...)..............................................................................................................................................................................................................................................................................................................................................................................!!..!!!!..!!...............................................................................................................................", "...........)...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", ".......)...)...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "........)))................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................//////...................................................................................................................................", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../((((((~..................$$$$$.......$.$....$...................$.$.....................................................................", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../((((((((_................$.............$....$...................$.$.....................................................................", "..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................__________................$.....$...$.$.$....$.$$...$$..$$$...$$.$.$.$$..$$$..$.$$...$$.$..$$..$.$.......................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--....................$$$$$.$...$.$.$....$$..$.$..$....$.$..$$.$$..$....$.$$..$.$..$$.$..$.$$........................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--....................$......$.$..$.$....$...$.$$$$..$$$.$...$.$...$..$$$.$...$.$...$.$$$$.$.........................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--....................$......$.$..$.$....$...$.$....$..$.$...$.$...$.$..$.$...$.$...$.$....$.........................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--....................$.......$...$.$....$...$.$..$.$..$.$..$$.$$..$.$..$.$...$.$..$$.$..$.$.........................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--....................$$$$$...$...$.$....$...$..$$...$$.$.$$.$.$.$$...$$.$$...$..$$.$..$$..$.........................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--..................................................................................$................................................", ".....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................:--...............................................................................$$$.................................................", "......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................-....................................................................................................................................", ".......)...)...)..).........................))..................)............)..............).............)......)..).........).....)........................)..)...))..................)....................).......).........................)..........)))))..........)...)......................))..................)......)..........................)....................................................................)......)...)................................................................................................................................................................................................................................................", ".......)...)...)..)........................)....................)............)..............).............)......)............).................................)....)..................)....................).......).........................)..........)....).........)...).....................)....................)......................................................................................................)......)...)................................................................................................................................................................................................................................................", ".......)...)...)..).))....)))...).))......)))..)))....)))....)).).......))..)))...)))...).))))...)).......).))...)..)..).))...)..)..)..).))....)).)..........).)))..)...))........)))...).))....)))...)...).))).....)))...))).......).)..)))..))).........)....)...)))..))).)))...)))...).))......)))..)))....)))....)).)......)...)).......).))....)))...)...))....)))...).))....)))...)...)...))............)))...).))....)).).....)))..).))...)...)...))................................................................................................................................................................................................................................", "........)..)..)...))..)..)...)..))..)......)..)...)..)...)..)..))......)..)..)...)...)..))..)...)..)......))..)..)..)..))..)..).)...)..))..)..)..))..........)..)......)..)......)...)..))..)..)...)..)...)..).......)...)...)......))..)...)..)..........)....)..)...)..)...)...)...)..))..)......)..)...)..)...)..)..))......)..)..)......))..)..)...)..)..)..)..)...)..))..)..)...)..)...)..)..)..........)...)..))..)..)..))......)...))..)..)...)..)..)...............................................................................................................................................................................................................................", "........).).).)...)...)..)...)..)...)......)..)...)..)...)..)...)......).....).......)..)...)...).........)...)..)..)..)...)..))....)..)...)..)...)..........)..)......).............)..)...)..)...)..)...)..).......)...)...)......)...)...)..)..........)))))...)...)..)...)...)...)..)...)......)..)...)..)...)..)...)......)..).........)...)..)...)..)..).....)...)..)...)..)...)..)...)..).................)..)...)..)...)......)...)...)..)...)..)..................................................................................................................................................................................................................................", "........).).).)...)...)..)))))..)...)......)..)...)..)...)..)...).......))...)....))))..)...)....)).......)...)..)..)..)...)..))....)..)...)..)...)..........)..).......))........))))..)...)..)...)..)...)..).......)...)...)......)...)...)..)..........)...)...)...)..)...)...)))))..)...)......)..)...)..)...)..)...)......)...)).......)...)..)...)..)...))...)...)..)...)..)...)..)...)...))............))))..)...)..)...)......)...)...)..)...)...))................................................................................................................................................................................................................................", ".........)...)....)...)..)......)...)......)..)...)..)...)..)...).........)..)...)...)..)...)......)......)...)..)..)..)...)..).)...)..)...)..)...)..........)..).........)......)...)..)...)..)...)..)...)..).......)...)...)......)...)...)..)..........)....)..)...)..)...)...)......)...)......)..)...)..)...)..)...)......).....)......)...)..)...)..).....)..)...)..)...)..)...)..)...).....)..........)...)..)...)..)...)......)...)...)..)...).....)...............................................................................................................................................................................................................................", ".........)...)....)...)..)...)..)...)......)..)...)..)...)..)..))......)..)..)...)...)..)...)...)..)......))..)..)..)..)...)..)..)..)..)...)..)..))..........)..)......)..)......)...)..))..)..)...)..)..))..).......)...)...)......)...)...)..)..........)....)..)...)..)...)...)...)..)...)......)..)...)..)...)..)..))......)..)..)......))..)..)...)..)..)..)..)...)..)...)..)...)..)..))..)..)..........)...)..)...)..)..))......)...)...)..)..))..)..)...............................................................................................................................................................................................................................", ".........)...)....)...)...)))...)...)......)...)))....)))....)).).......))...))...))).).)...))...)).......).))...)..)..)...)..)...).)..)...)...)).)...)......)..))......))........))).).).))....)))....)).)..))......))...))).......)....)))...))..)......)....)...)))...))..))...)))...)...)......)...)))....)))....)).)......)...)).......).))....)))...)...))....)))...)...)...)))....)).)...))....).......))).).)...)...)).)......))..)...)...)).)...))................................................................................................................................................................................................................................", "..................................................................................................................................................)...).....................................................................................................................................................................................).........................................................)...............................................................................................................................................############################################################################################################################.........", "..............................................................................................................................................)...)..)......................................................................................................................................................................................)........................................................).................................................................................................................................................................................#.............................#.............................#.......................................", "...............................................................................................................................................)))..........................................................................................................................................................................................)..........................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#..........................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#..........................#..............#..............#............#####............#............#...#......................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#.##.....................#..............#..............#..............#..............#............#..#.......................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.##..#....................#.............#.#.............#..............#..............#............#.#........................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#...#....................#.............#.#.............#..............#..............#............###........................", "...................................)..........)......)...................)...............)............................................)..).......)......)..).........)...................)..)......................................)...)..)..)......)...............................)..................................................................................................................................................................................................................................................................#....#.#...#....................#............#...#............#..............#..............#............#..#.......................", "...................................)..........)......)..................).)..............)...............................................).......)......)............)......................)......................................)......)..)......)...............................)..................................................................................................................................................................................................................................................................#....#.##..#....................#............#####............#..............#..............#............#..#.......................", ".......)...)..).))....)))....)))..)))...)))...).))...)...)))............).).....)).......)...)))...).))....)).).......)))....)).......).)))......).))...)..)..).))...)..)...))...........).))).......)))....)))...).))........))..)))..)..)..)......).))....)))........)))....)))..)))...)))...).)).....................................................................................................................................................................................................................................................####..#.##.....................#...........#.....#...........#..............#..............#............#...#......................", ".......)...)..))..)..)...)..)...)..)...)...)..))..)..)..)...)..........)...)...)..)......)..)...)..))..)..)..))......)...)..)..)......)..).......))..)..)..)..))..)..).)...)..)..........)..).......)...)..)...)..))..)......)..)..)...)..)..)......))..)..)...)......)...)..)...)..)...)...)..))..)..........................................................................................................................................................................................................................................................#........................#...........#.....#...........#..............#..............#............#...#......................", ".......)...)..)...)..)...)......)..).......)..)...)..)..)...)..........)...)...).........)..)...)..)...)..)...)..........)..).........)..).......)...)..)..)..)...)..))....).............)..).......)..........)..)...)......).....)...)..)..)......)...)..)...)......)...)......)..)...)...)..)...)..........................................................................................................................................................................................................................................................#........................#.............................#.............................#.......................................", ".......)...)..)...)..)))))...))))..)....))))..)...)..)..)))))..........)))))....)).......)..)...)..)...)..)...).......))))...)).......)..).......)...)..)..)..)...)..)).....))...........)..).......).......))))..)...).......))...)...)..)..)......)...)..)))))......)))))...))))..)...)))))..)...)...................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......)...)..)...)..)......)...)..)...)...)..)...)..)..).............).....).....)......)..)...)..)...)..)...)......)...).....)......)..).......)...)..)..)..)...)..).)......)..........)..).......)......)...)..)...).........)..)...)..)..)......)...)..)..........)......)...)..)...)......)...)...................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......)..))..)...)..)...)..)...)..)...)...)..))..)..)..)...).........).....)..)..)......)..)...)..)...)..)..))......)...)..)..)......)..).......))..)..)..)..)...)..)..)..)..)..........)..).......)...)..)...)..)...)......)..)..)...)..)..)......))..)..)...)......)...)..)...)..)...)...)..)...)...................................................................................................................................................................................................................................................####............................#.............................#.............................#.......................................", "........)).)..)...)...)))....))).).))...))).).).))...)...)))...)......).....)...)).......)...)))...)...)...)).).......))).)..)).......)..))......).))...)..)..)...)..)...)..))....)......)..)).......)))....))).).)...).......))...))..)..)..)......).))....)))........)))....))).).))...)))...)...)..)................................................................................................................................................................................................................................................#...#...........................#............#####............#...........#.....#...........#...............#.......................", "..............................................................................................................)...................................................................)....................................................................................................................................................................................................................................................................................................................................................................#....#..###..#..#..#.#.##.......#................#............#...........#.....#...........#...............#.......................", "..........................................................................................................)...)..................................................................).....................................................................................................................................................................................................................................................................................................................................................................#....#.#...#.#..#..#.##..#......#...............#.............#............#...#............#...............#.......................", "...........................................................................................................))).........................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#...#..#.#.#..#...#......#..............#..............#............#...#............#...............#.......................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#...#..#.#.#..#...#......#..............#..............#............#...#............#...............#.......................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#...#..#...#...#.#...#...#......#.............#...............#.............#.#.............#...............#.......................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................####....###....#.#...#...#......#............#................#.............#.#.............#............#..#.......................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#............#####............#..............#..............#.............##........................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#...........##.#................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#..........#...#................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.....##..###.###...............#............##...#...........#.............#####...........#............#....#.....................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#..#..#...#................#............##...#...........#.............#...............#............#....#.....................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....####..#...#................#............#.#..#...........#.............#...............#............#....#.....................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.....#...#................#............#.#..#...........#.............####............#............######.....................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#..#..#...#................#............#..#.#...........#.............#...............#............#....#.....................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................####..##...#...##...............#............#..#.#...........#.............#...............#............#....#.....................", ".........))))....)..................................................).............)........................)........)).........................)..........).....)...............................................)........................)........)..)..............)......).................)...)...............................)..)......)........................)..)............................................)))))))........)...................................................................................................................................................#............#...##...........#.............#...............#............#....#.....................", "........)....)...)..................................................).............)........................).......)...........................)..........).....)...............................................)....................................)..............)......).................)...)..................................)......)........................)..)...............................................)...........)...................................................................................................................................................#............#...##...........#.............#...............#............#....#.....................", ".......)......)..).))...........)...)...)))....))...................).......)))...)..).)..)....)))....))..))).....)))..)))...).)..)).)...)))..)))..........)...)....)))...)...)......).)..)....)))...)...)......).))....))).......)...)..)...))...).)))...)))....)).)......).))...)...).....)))..).))....)))........)))...)...)..)..)......).))....)))....)))....)).)..).))....)))...).))....)).)...)))...).)..........).....)))...)..)...))).......).)..)...)...).....................................................................................................................#.............................#.............................#.......................................", ".......)......)..))..)..........)...)..)...)..)..)..................)......)...)..)..)).)).)..)...)..)..)..).......)..)...)..))..)..))..)...)..)...).......)...)...)...)..)...)......)).)).)..)...)..)...)......))..)..)...)......)...)..)..)..)..)..)...)...)..)..))......))..)..)...)......)...))..)..)...)......)...)..)...)..)..)......))..)..)...)..)...)..)..))..))..)..)...)..))..)..)..))..)...)..))...........)....)...)..).)...)...)......)).)).)..)...).....................................................................................................................#.............................#.............................#.......................................", ".......)......)..)...)..........)...)..)...)..).....................)..........)..)..)..)..)..)...)..).....).......)..)...)..)...)...)..)...)..)............).)....)...)..)...)......)..)..)......)..)...)......)...)..)...)......)...)..)..).....)..)...)...)..)...)......)...)..)...)......)...)...)..)...)......)...)..)...)..)..)......)...)..)...)......)..)...)..)...)......)..)...)..)...)..)...)..)............)........)..))....)...)......)..)..)..)...).....................................................................................####..#.......#......#..........#.............................#.............................#.......................................", ".......)......)..)...)..........)..)...)))))...)).......))))).......).......))))..)..)..)..)..)...)...))...).......)..)...)..)...)...)..)...)..).............).....)...)..)...)......)..)..)...))))..)..).......)...)..))))).......).)...)...))...)..)...)))))..)...)......)...)..)..).......)...)...)..)))))......)))))...).)...)..)......)...)..)))))...))))..)...)..)...)...))))..)...)..)...)..)))))..)............).....))))..))....)))))......)..)..)..)..)......................................................................................#...#.........#......#..........#...........#.....#...........#.............####............#.............#.........................", ".......)......)..)...)...........).)...).........)..................)......)...)..)..)..)..)..)...).....)..).......)..)...)..)...)...)..)...)..).............).....)...)..)...)......)..)..)..)...)...).).......)...)..)...........).)...).....)..)..)...)......)...)......)...)...).).......)...)...)..)..........).......).)...)..)......)...)..)......)...)..)...)..)...)..)...)..)...)..)...)..)......)............)....)...)..).)...)..........)..)..)...).)......................................................................................#...#.#..##.#.#.##..###.........#...........##...##...........#............#....#...........#.............#.........................", "........)....)...)...)...........).)...)...)..)..)..................)......)...)..)..)..)..)..)...)..)..)..).......)..)...)..)...)..))..)...)..).............).....)...)..)..))......)..)..)..)...)...).).......))..)..)...)........)....)..)..)..)..)...)...)..)..))......))..)...).).......)...)...)..)...)......)...)....)....)..)......)...)..)...)..)...)..)..))..))..)..)...)..)...)..)..))..)...)..)............)....)...)..)..)..)...)......)..)..)...).)......................................................................................####..#.#..##.##..#..#..........#...........##...##...........#............#................#.............#.........................", ".........))))....)...)...)........).....)))....))...................).......))).).)..)..)..)...)))....))...))......)...)))...)....)).)...)))...))..).........)......)))....)).)......)..)..)...))).)...)........).))....))).........)....)...))...)..))...)))....)).)......).)).....)........))..)...)...)))........))).....)....)..)......)...)...)))....))).)..)).)..).))....))).).)...)...)).)...)))...)...)........).....))).).)...)..))).......)..)..)....).......................................................................................#...#.#.#...#.#...#..#..........#...........#.#.#.#...........#............#................#.............#.........................", ".........................)........)..................................................................................................).................................................................)............................................................................)...........................................................................................................)..............................................................).......................................................................................#...#.#.#...#.#...#..#..........#...........#.#.#.#...........#............#...##...........#.............#.........................", "........................)........)...............................................................................................)...)................................................................)............................................................................)........................................................................................................)...).............................................................)........................................................................................#...#.#.#..##.#...#..#..........#...........#..#..#...........#............#....#...........#.............#.........................", "................................).................................................................................................)))................................................................)............................................................................)..........................................................................................................))).............................................................).........................................................................................#...#.#..##.#.#...#..##.........#...........#..#..#...........#............#...##...........#.............#.........................", "...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#...................#...........#..#..#...........#.............###.#...........#.............####......................", "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................###....................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................####............................#.............................#............####.............#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#...#...........................#.............................#............#...#............#.......................................", "..................).........)......................................)...............................................................))........................)......)...............)..............))......................).................)......)..)......................................).............)...).................)........................)..)......).....)....................................)).).............).....................)...............................................................................................#...#.###..#..#..##...##........#..##..#.##..###...##...##....#............#...#............#....#.##..###..#..#..##...##...........", "..................)................................................)..............................................................)..........................)......................).............)........................).................).........)....................................................)...).................)........................)..)......).....).....................................).).............).....................)...............................................................................................####.....#.#..#.#..#.#..#.......#.#..#.##..#....#.#..#.#..#...#............####.............#....##..#....#.#..#.#..#.#..#..........", "........)))....)).)..)...)..)...)))....)))........)))...).))....)).)......).).)...)..).))........)))..)...)...)..)))...)...).....))).).)..)))...).)..).......).))...)..).)..).......).))....)))..)))..)))...).)..))).......).))....))).......).))...).)))...)).......)...)...)))...)...)......)..).))......)))..).))....))).......).))....)))....)))....)).)..)......).....)...)))......)...)...)..)))...).))...).))).......))..)))...)))...)...)......)...)))...).))....)).)..........................................................................#......###.#..#..##..####.......#..##..#...#..###.#....####...#............#................#....#...#..###.#..#..##..####..........", ".......)...)..)..))..)...)..)..)...)..)...)......)...)..))..)..)..))......))..)...)..))..)......)...).)...)...).)...)..)...)......)..))..)...)..)).)).)......))..)..)..)).)).)......))..)..)...)..)..)...)..))..)...)......))..)..)...)......))..)..)..)...)..)......)...)..)...)..)...)......)..))..)......)...))..)..)...)......))..)..)...)..)...)..)..))..)......).....)..)...).....)...)...).)...)..))..).....).......)..)..)...)...)..)...)......)..)...)..))..)..)..))..........................................................................#.....#..#.#..#....#.#..........#....#.#...#.#..#.#....#......#............#................#....#...#.#..#.#..#....#.#.............", "...........)..)...)..)...)..)..)......)...)..........)..)...)..)...)......)...)...)..)...)..........)..)..)..)......)..)...)......)..)...)...)..)..)..)......)...)..)..)..)..)......)...)..)...)..)..)...)..)...)...)......)...)..)...)......)...)..)..)...).........)...)..)...)..)...)......)..)...)......)...)...)..)...)......)...)..)...)......)..)...)..)......)))))))..)...)......)..)..)..)...)..)...).....).......).....).......)..)...)......)..)...)..)...)..)...)..........................................................................#.....#..#.#..#.#..#.#..#.......#.#..#.##..#.#..#.#..#.#..#...#............#................#....##..#.#..#.#..#.#..#.#..#..........", "........))))..)...)...).)...)..)......))))).......))))..)...)..)...)......)...)...)..)...).......))))..)..)..)...))))..)..).......)..)...)...)..)..)..)......)...)..)..)..)..)......)...)..)))))..)..)...)..)...)))))......)...)..)))))......)...)..)..)....)).......)..)...)...)..)...)......)..)...)......)...)...)..)))))......)...)..)))))...))))..)...)..)......).....)..)))))......)..)..)..)...)..)...).....)........))...)....))))..)..).......)..)...)..)...)..)...)..........................................................................#......##.#.###..##...##........#..##..#.##...##.#.##...##....#............#................#....#.##...##.#.###..##...##...........", ".......)...)..)...)...).)...)..)......)..........)...)..)...)..)...)......)...)...)..)...)......)...)..).).).)..)...)...).).......)..)...)...)..)..)..)......)...)..)..)..)..)......)...)..)......)..)...)..)...)..........)...)..)..........)...)..)..)......).......).)...)...)..)...)......)..)...)......)...)...)..)..........)...)..)......)...)..)...)..)......).....)..)..........).).).)..)...)..)...).....)..........)..)...)...)...).).......)..)...)..)...)..)...)..........................................................................................................#......#......................#.............................#....#..................................", ".......)...)..)..))....)....)..)...)..)...)......)...)..)...)..)..))......)...)..))..)...)......)...)...)...)...)...)...).).......)..)...)...)..)..)..)......)...)..)..)..)..)......))..)..)...)..)..)...)..)...)...)......)...)..)...)......)...)..)..)...)..).......).)...)...)..)..))......)..)...)......)...)...)..)...)......)...)..)...)..)...)..)..)).........).....)..)...).......)...)...)...)..)...).....).......)..)..)...)...)...).).......)..)...)..)...)..)..))..........................................................................................................#......#......................#.............................#....#..................................", "........))).)..)).)....)....)...)))....)))........))).).)...)...)).)......)....)).)..)...).......))).)..)...)....))).)...)........)..)....)))...)..)..)......)...)..)..)..)..)......).))....)))...)...)))...)....))).......)...)...))).......)...)..)..))...)).........).....)))....)).)......)..)...)......))..)...)...))).......)...)...)))....))).)..)).)..)......).....)...)))........)...)....)))...)...).....)).......))...))...))).)...)........)...)))...)...)...)).)..).......................................................................................................#.............................#.............................#.......................................", ".........................................................................................................................).............................................................................................................................................)......................................................................................................................................................................).............................)..........................................................................................................#.............................#.............................#.......................................", "........................................................................................................................).............................................................................................................................................)......................................................................................................................................................................)..........................)...)...........................................................................####.......#..#................#.............................#.............................#.......................................", ".......................................................................................................................).............................................................................................................................................)......................................................................................................................................................................)............................)))...........................................................................#....#.........#................#.............................#.............####............#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#..#.#.###...............#.............................#............#....#...........#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#..#.#..#................#........##...##...##.........#............#....#...........#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#....#.#..#.#..#................#.......#..#.#..#.#..#........#............#....#...........#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#..#.#.#..#.#..#................#.......####..##..#...........#............#....#...........#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#...##.#..#.#..#................#.......#.......#.#...........#............#..#.#...........#.......................................", "........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#####..###.#..##...............#.......#..#.#..#.#..#........#............#...##...........#.......................................", ".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.........................#........##...##...##.........#.............#####...........#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#..................#..........#.......................................", ".......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................#.............................#.............................#.......................................", "......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................############################################################################################################################.........", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................", "..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."}; snake4-1.0.14/pixmaps/instructions.fig000644 000765 000024 00000011356 12372644400 020714 0ustar00sverrehustaff000000 000000 #FIG 3.2 Landscape Center Metric A4 100.00 Single -2 1200 2 6 1079 1304 7694 1799 4 0 31 0 0 16 12 0.0000 4 180 6480 1081 1441 Move the snake around the playground and eat food. Avoid hitting the fence,\001 4 0 31 0 0 16 12 0.0000 4 180 5355 1081 1711 eating lethal mushroms and rotten food, and biting your own tail.\001 -6 6 1080 1980 7785 2745 4 0 31 0 0 16 12 0.0000 4 180 6615 1082 2117 Now and then a slimpill will bounce around. If you eat this, you will get shorter,\001 4 0 31 0 0 16 12 0.0000 4 180 6420 1082 2387 and you will gain bonus points for every length you loose. The bonus is also\001 4 0 31 0 0 16 12 0.0000 4 180 2355 1082 2657 given when a round is over.\001 -6 6 1080 2925 7695 3420 4 0 31 0 0 16 12 0.0000 4 180 6450 1082 3062 When food starts blinking, it's about to rot. Rotten food is poisonous, and thus\001 4 0 31 0 0 16 12 0.0000 4 180 4275 1082 3332 uneatable. As long as it blinks, it can still be eaten.\001 -6 6 1080 3600 8010 4095 4 0 31 0 0 16 12 0.0000 4 180 6615 1082 3737 Oh, yes - I almost forgot: You may be visited by the evil headbanger. Take my\001 4 0 31 0 0 16 12 0.0000 4 180 6825 1082 4007 advice and run away from him before he hits you in the head! He won't stay long.\001 -6 6 8910 2205 10530 2430 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 mushroom06 8912 2207 9092 2207 9092 2387 8912 2387 8912 2207 4 0 4 0 0 16 10 0.0000 4 120 1185 9317 2342 Lethal mushroom\001 -6 6 8910 2475 10215 2700 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 scull01 8912 2477 9092 2477 9092 2657 8912 2657 8912 2477 4 0 4 0 0 16 10 0.0000 4 120 855 9317 2612 Rotten food\001 -6 6 8910 2745 10440 2970 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 headbanger01 8912 2747 9092 2747 9092 2927 8912 2927 8912 2747 4 0 4 0 0 16 10 0.0000 4 150 1110 9317 2882 Evil headbanger\001 -6 6 9000 3060 10890 4230 2 1 0 1 11 7 0 0 -1 0.000 0 0 -1 0 0 2 9002 3062 10847 3062 2 1 0 1 11 7 0 0 -1 0.000 0 0 -1 0 0 2 9497 3062 9498 4188 2 1 0 1 11 7 0 0 -1 0.000 0 0 -1 0 0 2 9947 3062 9948 4188 2 1 0 1 11 7 0 0 -1 0.000 0 0 -1 0 0 2 10397 3062 10398 4188 2 1 0 1 11 7 0 0 -1 0.000 0 0 -1 0 0 2 9003 4188 10850 4190 4 1 11 0 0 16 10 0.0000 4 120 105 9727 3247 A\001 4 1 11 0 0 16 10 0.0000 4 120 75 10177 3247 T\001 4 1 11 0 0 16 10 0.0000 4 120 105 10627 3247 K\001 4 0 11 0 0 16 10 0.0000 4 150 210 9005 3245 Up\001 4 1 11 0 0 16 10 0.0000 4 120 105 9727 3436 Z\001 4 1 11 0 0 16 10 0.0000 4 120 105 10177 3436 V\001 4 1 11 0 0 16 10 0.0000 4 120 75 10627 3436 J\001 4 0 11 0 0 16 10 0.0000 4 120 420 9005 3425 Down\001 4 1 11 0 0 16 10 0.0000 4 120 120 9727 3625 N\001 4 1 11 0 0 16 10 0.0000 4 120 90 10177 3625 F\001 4 1 11 0 0 16 10 0.0000 4 120 120 10627 3625 H\001 4 0 11 0 0 16 10 0.0000 4 120 285 9005 3605 Left\001 4 0 11 0 0 16 10 0.0000 4 150 375 9005 3785 Right\001 4 0 11 0 0 16 10 0.0000 4 120 405 9005 3965 Pause\001 4 1 11 0 0 16 10 0.0000 4 90 225 9727 4147 esc\001 4 1 11 0 0 16 10 0.0000 4 135 120 10177 4147 Q\001 4 0 11 0 0 16 10 0.0000 4 135 285 9005 4145 Quit\001 4 1 11 0 0 16 10 0.0000 4 120 135 9731 3801 M\001 4 1 11 0 0 16 10 0.0000 4 120 120 10181 3791 G\001 4 1 11 0 0 16 10 0.0000 4 120 90 10631 3796 L\001 4 1 11 0 0 16 10 0.0000 4 120 390 9721 3961 space\001 4 1 11 0 0 16 10 0.0000 4 120 105 10171 3961 P\001 4 1 11 0 0 16 10 0.0000 4 120 390 10666 3961 pause\001 -6 6 8909 674 10934 899 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 strawberry01 8911 676 9091 676 9091 856 8911 856 8911 676 4 0 11 0 0 20 10 0.0000 4 120 705 10215 810 20 x level\001 4 0 2 0 0 16 11 0.0000 4 150 780 9316 811 Strawberry\001 -6 6 8909 944 10934 1169 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 pear01 8912 947 9092 947 9092 1127 8912 1127 8912 947 4 0 11 0 0 20 10 0.0000 4 120 705 10215 1080 15 x level\001 4 0 2 0 0 16 10 0.0000 4 120 315 9317 1082 Pear\001 -6 6 8909 1214 10934 1439 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 banana01 8912 1217 9092 1217 9092 1397 8912 1397 8912 1217 4 0 11 0 0 20 10 0.0000 4 120 705 10215 1350 10 x level\001 4 0 2 0 0 16 10 0.0000 4 120 510 9317 1352 Banana\001 -6 6 8909 1484 10934 1709 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 lemon01 8912 1487 9092 1487 9092 1667 8912 1667 8912 1487 4 0 11 0 0 20 10 0.0000 4 120 705 10215 1620 5 x level\001 4 0 2 0 0 16 10 0.0000 4 120 465 9317 1622 Lemon\001 -6 6 8909 1844 10934 2069 2 5 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 0 slimpill 8912 1847 9092 1847 9092 2027 8912 2027 8912 1847 4 0 11 0 0 20 10 0.0000 4 120 750 10170 1980 100 x level\001 4 0 6 0 0 16 10 0.0000 4 150 465 9317 1982 Slimpill\001 -6 6 6435 675 8055 1080 4 2 11 0 0 16 10 0.0000 4 150 1440 8011 811 by Sverre H. Huseby\001 4 2 11 0 0 16 10 0.0000 4 150 1575 8011 1045 \001 -6 2 2 0 1 -1 6 1 0 0 0.000 0 0 0 0 0 5 990 450 10980 450 10980 4275 990 4275 990 450 4 0 1 0 0 19 42 0.0000 4 480 2340 1080 1080 Snake 4\001 snake4-1.0.14/pixmaps/lemon000644 000765 000024 00000000541 12372644400 016510 0ustar00sverrehustaff000000 000000 /* XPM */ static char * lemon[] = { "12 12 6 1", " c black", ". c yellow", "X c #D34CD34C0000", "o c #000082070000", "O c #820782070000", "+ c #0000D34C0000", " ", " .. ", " .X... ", " .XXoXXO ", " .XXXXXXX ", " XX+X+XXXO ", " OXXXXXXXX ", " X+XXX+XXX ", " OXXXXXXXX ", " OXXXoXX ", " OOOO ", " "}; snake4-1.0.14/pixmaps/lemon01000644 000765 000024 00000000543 12372644400 016653 0ustar00sverrehustaff000000 000000 /* XPM */ static char * lemon01[] = { "12 12 6 1", " c black", ". c yellow", "X c #D34CD34C0000", "o c #000082070000", "O c #820782070000", "+ c #0000D34C0000", " ", " .. ", " .X... ", " .XXoXXO ", " .XXXXXXX ", " XX+X+XXXO ", " OXXXXXXXX ", " X+XXX+XXX ", " OXXXXXXXX ", " OXXXoXX ", " OOOO ", " "}; snake4-1.0.14/pixmaps/lemon02000644 000765 000024 00000000401 12372644400 016645 0ustar00sverrehustaff000000 000000 /* XPM */ static char * lemon02[] = { "12 12 1 1", " c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; snake4-1.0.14/pixmaps/mushroom01000644 000765 000024 00000000516 12372644400 017412 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom01[] = { "12 12 5 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. "}; snake4-1.0.14/pixmaps/mushroom02000644 000765 000024 00000000570 12372644400 017413 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom02[] = { "12 12 7 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", " ", " ", " ", " ", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@"}; snake4-1.0.14/pixmaps/mushroom03000644 000765 000024 00000000570 12372644400 017414 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom03[] = { "12 12 7 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", " ", " ", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ "}; snake4-1.0.14/pixmaps/mushroom04000644 000765 000024 00000000615 12372644400 017415 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom04[] = { "12 12 8 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", "# c #820782078207", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ ", " @@@@@@@@ ", " O++# "}; snake4-1.0.14/pixmaps/mushroom05000644 000765 000024 00000000642 12372644400 017416 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom05[] = { "12 12 9 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", "# c #820782078207", "$ c #0000A2890000", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ ", " @@@@@@@@ ", " O++# ", " $O++# ", " O++# $ "}; snake4-1.0.14/pixmaps/mushroom06000644 000765 000024 00000000652 12372644400 017420 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom06[] = { "12 12 9 1", " m black c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", "# c #820782078207", "$ c #0000A2890000", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ ", " @@@@@@@@ ", " O++# ", " $O++# ", " O++# $ ", " O$+++$ ", " O+$+$# "}; snake4-1.0.14/pixmaps/mushroom07000644 000765 000024 00000000642 12372644400 017420 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom07[] = { "12 12 9 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", "# c #820782078207", "$ c #0000A2890000", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ ", " @@@@@@@@ ", " O++# ", " $O++# ", " O++# $ "}; snake4-1.0.14/pixmaps/mushroom08000644 000765 000024 00000000615 12372644400 017421 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom08[] = { "12 12 8 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", "# c #820782078207", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ ", " @@@@@@@@ ", " O++# "}; snake4-1.0.14/pixmaps/mushroom09000644 000765 000024 00000000570 12372644400 017422 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom09[] = { "12 12 7 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", " ", " ", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@", "XooOooOoooo@", " .oooooooo@ "}; snake4-1.0.14/pixmaps/mushroom10000644 000765 000024 00000000570 12372644400 017412 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom10[] = { "12 12 7 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", "+ c #A289A289A289", "@ c #820700000000", " ", " ", " ", " ", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. ", "XXoooo+oOo@@", "Xoooooooooo@"}; snake4-1.0.14/pixmaps/mushroom11000644 000765 000024 00000000516 12372644400 017413 0ustar00sverrehustaff000000 000000 /* XPM */ static char * mushroom11[] = { "12 12 5 1", " c black", ". c #D34C00000000", "X c red", "o c #C30B00000000", "O c #D34CD34CD34C", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " .XXXXXX ", " .XoOoooo.. "}; snake4-1.0.14/pixmaps/pear000644 000765 000024 00000000502 12372644400 016322 0ustar00sverrehustaff000000 000000 /* XPM */ static char * pear[] = { "12 12 5 1", " c black", ". c brown", "X c green", "o c #0000D34C0000", "O c #000082070000", " ..", " X...", " Xooo..", " Xoooo ", " Xooooo ", " XXoooooO ", "OoooXooooO ", "oooooXooo ", "ooooooooo ", "oo oooooO ", "o ooooo ", " Ooooo "}; snake4-1.0.14/pixmaps/pear01000644 000765 000024 00000000504 12372644400 016465 0ustar00sverrehustaff000000 000000 /* XPM */ static char * pear01[] = { "12 12 5 1", " c black", ". c brown", "X c green", "o c #0000D34C0000", "O c #000082070000", " ..", " X...", " Xooo..", " Xoooo ", " Xooooo ", " XXoooooO ", "OoooXooooO ", "oooooXooo ", "ooooooooo ", "oo oooooO ", "o ooooo ", " Ooooo "}; snake4-1.0.14/pixmaps/pear02000644 000765 000024 00000000400 12372644400 016461 0ustar00sverrehustaff000000 000000 /* XPM */ static char * pear02[] = { "12 12 1 1", " c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; snake4-1.0.14/pixmaps/README000644 000765 000024 00000000476 12372644400 016342 0ustar00sverrehustaff000000 000000 instructions was made using the following steps: 1. Export instrictions.fig to an xpm-file from xfig. 2. Read that xpm-file into xv, and autocrop it. 3. Save to gif-file from xv, since my version of xv failed to save correct xpm-files. 4. giftoppm instructions.gif | ppmtoxpm -name instructions > instructions snake4-1.0.14/pixmaps/scull01000644 000765 000024 00000000470 12372644400 016662 0ustar00sverrehustaff000000 000000 /* XPM */ static char * scull01[] = { "12 12 4 1", " c black", ". c white", "X c #A289A289A289", "o c #820782078207", " .XXo ", " ..XXXXoo ", " . XXXX o ", ".X XX Xo", ".X XX X Xo", ".X X X Xo", " XXXX XXXX ", " XXXXXXXX ", " . X X ", " X. X X X ", "XX .XoXoX XX", "XX XXXX XX"}; snake4-1.0.14/pixmaps/scull02000644 000765 000024 00000000515 12372644400 016663 0ustar00sverrehustaff000000 000000 /* XPM */ static char * scull02[] = { "12 12 5 1", " c black", ". c white", "X c #A289A289A289", "o c #820782078207", "O c #924800000000", " .XXo ", " ..XXXXoo ", " .OOXXXXOOo ", ".XOOOXXOOOXo", ".XOOXX XOOXo", ".XOOX XOOXo", " XXXX XXXX ", " XXXXXXXX ", " . X X ", " X. X X X ", "XX .XoXoX XX", "XX XXXX XX"}; snake4-1.0.14/pixmaps/scull03000644 000765 000024 00000000515 12372644400 016664 0ustar00sverrehustaff000000 000000 /* XPM */ static char * scull03[] = { "12 12 5 1", " c black", ". c white", "X c #A289A289A289", "o c #820782078207", "O c #B2CA00000000", " .XXo ", " ..XXXXoo ", " .OOXXXXOOo ", ".XOOOXXOOOXo", ".XOOXX XOOXo", ".XOOX XOOXo", " XXXX XXXX ", " XXXXXXXX ", " . X X ", " X. X X X ", "XX .XoXoX XX", "XX XXXX XX"}; snake4-1.0.14/pixmaps/scull04000644 000765 000024 00000000503 12372644400 016662 0ustar00sverrehustaff000000 000000 /* XPM */ static char * scull04[] = { "12 12 5 1", " c black", ". c white", "X c #A289A289A289", "o c #820782078207", "O c red", " .XXo ", " ..XXXXoo ", " .OOXXXXOOo ", ".XOOOXXOOOXo", ".XOOXX XOOXo", ".XOOX XOOXo", " XXXX XXXX ", " XXXXXXXX ", " . X X ", " X. X X X ", "XX .XoXoX XX", "XX XXXX XX"}; snake4-1.0.14/pixmaps/scull05000644 000765 000024 00000000515 12372644400 016666 0ustar00sverrehustaff000000 000000 /* XPM */ static char * scull05[] = { "12 12 5 1", " c black", ". c white", "X c #A289A289A289", "o c #820782078207", "O c #B2CA00000000", " .XXo ", " ..XXXXoo ", " .OOXXXXOOo ", ".XOOOXXOOOXo", ".XOOXX XOOXo", ".XOOX XOOXo", " XXXX XXXX ", " XXXXXXXX ", " . X X ", " X. X X X ", "XX .XoXoX XX", "XX XXXX XX"}; snake4-1.0.14/pixmaps/scull06000644 000765 000024 00000000515 12372644400 016667 0ustar00sverrehustaff000000 000000 /* XPM */ static char * scull06[] = { "12 12 5 1", " c black", ". c white", "X c #A289A289A289", "o c #820782078207", "O c #924800000000", " .XXo ", " ..XXXXoo ", " .OOXXXXOOo ", ".XOOOXXOOOXo", ".XOOXX XOOXo", ".XOOX XOOXo", " XXXX XXXX ", " XXXXXXXX ", " . X X ", " X. X X X ", "XX .XoXoX XX", "XX XXXX XX"}; snake4-1.0.14/pixmaps/slimpill000644 000765 000024 00000000501 12372644400 017217 0ustar00sverrehustaff000000 000000 /* XPM */ static char * slimpill[] = { "12 12 4 1", " c black", ". c #A289A289A289", "X c #820782078207", "o c #514451445144", " ", " ..X. ", " .XXXXXXX ", " XXXXXXXXo ", ".XXXXXo.XXo ", ".XXXXo.XXXo ", "XXXXo..XXXX ", ".XXo..XXXXo ", ".Xo.XXXXXXo ", " XXXXXXXXXo ", " .XXXXXXXo ", " ..Xooo "}; snake4-1.0.14/pixmaps/snakebodyNE000644 000765 000024 00000000521 12372644400 017576 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakebodyNE[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " .XXXXoXO ", " .XXXXXXO ", " .XXXoXXX..", " .XXoXXoXXX", " .XXXXXXXXo", " .XXXXXXoXX", " oXXXXoXXX", " oXXXXXXXX", " ooXXXXXX", " OOOOOO", " ", " "}; snake4-1.0.14/pixmaps/snakebodyNS000644 000765 000024 00000000521 12372644400 017614 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakebodyNS[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " .XoXXXXO ", " .XXXXXXO ", " .XXoXXXO ", " .XXXoXXO ", " .XXXXXXO ", " .XXXXoXO ", " .XXXXoXO ", " .XXXXXXO ", " .XXXoXXO ", " .XXoXXXO ", " .XXXXXXO ", " .XoXXXXO "}; snake4-1.0.14/pixmaps/snakebodyNW000644 000765 000024 00000000521 12372644400 017620 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakebodyNW[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " .XoXXXXO ", " .XXXXXXO ", "..XXXoXXXO ", "XXXoXXoXXO ", "oXXXXXXXXO ", "XXoXXXXXXO ", "XXXoXXXXO ", "XXXXXXXXO ", "XXXXXXOO ", "OOOOOO ", " ", " "}; snake4-1.0.14/pixmaps/snakebodySE000644 000765 000024 00000000521 12372644400 017603 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakebodySE[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " ", " ", " ......", " ..XXXXXX", " .XXXXXXXX", " .XXXXoXXX", " .XXXXXXoXX", " .XXXXXXXXo", " .XXoXXoXXX", " .XXXoXXXOO", " .XXXXXXO ", " .XXXXoXO "}; snake4-1.0.14/pixmaps/snakebodySW000644 000765 000024 00000000521 12372644400 017625 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakebodySW[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " ", " ", "...... ", "XXXXXXoo ", "XXXXXXXXo ", "XXXoXXXXo ", "XXoXXXXXXO ", "oXXXXXXXXO ", "XXXoXXoXXO ", "OOXXXoXXXO ", " .XXXXXXO ", " .XoXXXXO "}; snake4-1.0.14/pixmaps/snakebodyWE000644 000765 000024 00000000521 12372644400 017607 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakebodyWE[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " ", " ", "............", "XXXXXXXXXXXX", "oXXXXXXXXXXo", "XXoXXXXXXoXX", "XXXoXXXXoXXX", "XXXXXooXXXXX", "XXXXXXXXXXXX", "OOOOOOOOOOOO", " ", " "}; snake4-1.0.14/pixmaps/snakeheadE000644 000765 000024 00000000545 12372644400 017432 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakeheadE[] = { "12 12 6 1", " c black", ". c #000082070000", "X c green", "o c #000051440000", "O c #0000C30B0000", "+ c #00000000D34C", " .XXXo ", "XOOOOO. ", "OOOOOOO.. ", "OOOOOOOOO. ", "OO++++OOOO. ", "OOOOOOOOOOOo", "OOOOOOOOOOOo", "OO++++OOOOo ", "OOOOOOOOOo ", "OOOOOOOoo ", "oOOOO.o ", " ooo "}; snake4-1.0.14/pixmaps/snakeheadN000644 000765 000024 00000000545 12372644400 017443 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakeheadN[] = { "12 12 6 1", " c black", ". c green", "X c #0000C30B0000", "o c #0000A2890000", "O c #00000000D34C", "+ c #000051440000", " .. ", " .XXo ", " .XXXXo ", " .XXXXXXo ", " .XXXXXXo ", " .XXXXXXXXo ", " .XXOXXOXXo ", ".XXXOXXOXXX+", ".XXXOXXOXXX+", ".XXXOXXOXXX+", " XXXXXXXXXX ", " oXXXXXXXX+ "}; snake4-1.0.14/pixmaps/snakeheadS000644 000765 000024 00000000545 12372644400 017450 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakeheadS[] = { "12 12 6 1", " c black", ". c green", "X c #0000C30B0000", "o c #0000A2890000", "O c #00000000D34C", "+ c #000051440000", " .XXXXXXXXo ", " XXXXXXXXXX ", ".XXXOXXOXXX+", ".XXXOXXOXXX+", ".XXXOXXOXXX+", " oXXOXXOXX+ ", " oXXXXXXXX+ ", " oXXXXXX+ ", " oXXXXXX+ ", " oXXXX+ ", " oXX+ ", " ++ "}; snake4-1.0.14/pixmaps/snakeheadW000644 000765 000024 00000000520 12372644400 017445 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snakeheadW[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #00000000D34C", "O c #000051440000", " ... ", " ..XXXX.", " ..XXXXXXX", " .XXXXXXXXX", " .XXXXooooXX", ".XXXXXXXXXXX", "OXXXXXXXXXXX", " OXXXXooooXX", " OXXXXXXXXX", " OOXXXXXXX", " OOXXXXO", " OOO "}; snake4-1.0.14/pixmaps/snaketailE000644 000765 000024 00000000520 12372644400 017453 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snaketailE[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " ", " ", " .......", " ..XXXXXXX", " ..XXXXXXXXo", ".XoXXXXXXoXX", "oXXoXXXXoXXX", " oooXooXXXXX", " OOXXXXXXX", " OOOOOOO", " ", " "}; snake4-1.0.14/pixmaps/snaketailN000644 000765 000024 00000000520 12372644400 017464 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snaketailN[] = { "12 12 5 1", " c black", ". c green", "X c #0000C30B0000", "o c #000082070000", "O c #000051440000", " .XoXXXXO ", " .XXXXXXO ", " .XXoXXXO ", " .XXXoXXO ", " .XXXXXXO ", " .XXXXoXO ", " .XXXXoXO ", " XXXXXO ", " oXXooO ", " ooXO ", " oXXO ", " OO "}; snake4-1.0.14/pixmaps/snaketailS000644 000765 000024 00000000520 12372644400 017471 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snaketailS[] = { "12 12 5 1", " c black", ". c green", "X c #000051440000", "o c #0000C30B0000", "O c #000082070000", " .X ", " .ooX ", " .oOX ", " .OOooX ", " .ooooX ", " .oOooooX ", " .oOooooX ", " .ooooooX ", " .ooOoooX ", " .oooOooX ", " .ooooooX ", " .ooooOoX "}; snake4-1.0.14/pixmaps/snaketailW000644 000765 000024 00000000520 12372644400 017475 0ustar00sverrehustaff000000 000000 /* XPM */ static char * snaketailW[] = { "12 12 5 1", " c black", ". c green", "X c #000082070000", "o c #0000C30B0000", "O c #000051440000", " ", " ", "......X ", "oooooooXX ", "oooooXXoXXX ", "oooXooooXooO", "ooXooooooXoO", "XooooooooOO ", "oooooooOO ", "OOOOOOO ", " ", " "}; snake4-1.0.14/pixmaps/splat000644 000765 000024 00000000521 12372644400 016517 0ustar00sverrehustaff000000 000000 /* XPM */ static char * splat[] = { "12 12 5 1", " c #820700000000", ". c red", "X m black c black", "o c #A289A289A289", "O c #C30B00000000", " ..XX...XXXX", ".oOX.ooOXXX ", ".OOOOOOO... ", "X.OOO.OOooO ", "XXOO..OOOO ", "XX.O.OOOOO X", "XX.OOOOOO XX", "X.OOOOOOOO .", ".OOOOOOOOO X", "XOOOOOOOOO X", "XO OO O X", "XOXXO XX X."}; snake4-1.0.14/pixmaps/strawberry000644 000765 000024 00000000543 12372644400 017604 0ustar00sverrehustaff000000 000000 /* XPM */ static char * strawberry[] = { "12 12 6 1", " c black", ". c #0000A2890000", "X c red", "o c #820782070000", "O c #D34C00000000", "+ c #C30B00000000", " .. .. ", " XXXX.... XX", "XXXXXX..XXXX", "XXoXX...XXXX", "XoXX.XXXXXXo", "XXXXXXXoXXXX", "XXXXoXXXoXXX", "XXXoXXXXXXXO", " XXXXXoXXXO ", " XXXXXoXO+ ", " XXXX+ ", " "}; snake4-1.0.14/pixmaps/strawberry01000644 000765 000024 00000000545 12372644400 017747 0ustar00sverrehustaff000000 000000 /* XPM */ static char * strawberry01[] = { "12 12 6 1", " c black", ". c #0000A2890000", "X c red", "o c #820782070000", "O c #D34C00000000", "+ c #C30B00000000", " .. .. ", " XXXX.... XX", "XXXXXX..XXXX", "XXoXX...XXXX", "XoXX.XXXXXXo", "XXXXXXXoXXXX", "XXXXoXXXoXXX", "XXXoXXXXXXXO", " XXXXXoXXXO ", " XXXXXoXO+ ", " XXXX+ ", " "}; snake4-1.0.14/pixmaps/strawberry02000644 000765 000024 00000000406 12372644400 017744 0ustar00sverrehustaff000000 000000 /* XPM */ static char * strawberry02[] = { "12 12 1 1", " c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "};