1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* hack.rip.c - version 1.0.2 */
3 /* $FreeBSD: src/games/hack/hack.rip.c,v 1.4 1999/11/16 10:26:37 marcel Exp $ */
4 /* $DragonFly: src/games/hack/hack.rip.c,v 1.3 2005/05/22 03:37:05 y0netan1 Exp $ */
9 static void center(int , const char *);
12 static char rip[][60] = {
26 " _________)/\\\\_//(\\/(/\\)/\\//\\/|_)_______\n",
28 static const int n_rips = sizeof(rip) / sizeof(rip[0]);
36 (void) strcpy(buf, plname);
39 (void) sprintf(buf, "%ld AU", u.ugold);
41 (void) sprintf(buf, "killed by%s",
42 !strncmp(killer, "the ", 4) ? "" :
43 !strcmp(killer, "starvation") ? "" :
44 index(vowels, *killer) ? " an" : " a");
46 (void) strcpy(buf, killer);
47 if(strlen(buf) > 16) {
50 for(i = 0; i <= 16; i++)
51 if(buf[i] == ' ') i0 = i, i1 = i+1;
58 (void) sprintf(buf, "%4d", getyear());
60 for(y = 8, i = 0; i < n_rips; y++, i++){
64 while(dpx[x] == ' ') x++;
66 while(dpx[x] && dpx[x] != ' '){
67 extern int done_stopprint;
71 (void) putchar(dpx[x++]);
79 center(int line, const char *text)
81 const char *ip = text;
84 op = &rip[line][28 - ((strlen(text)+1)/2)];
85 while(*ip) *op++ = *ip++;