2004-01-02 13:49:33 -05:00
|
|
|
$OpenBSD: patch-genclr_c,v 1.2 2004/01/02 18:49:33 espie Exp $
|
|
|
|
--- genclr.c.orig 1998-08-08 14:53:59.000000000 +0200
|
|
|
|
+++ genclr.c 2004-01-02 19:43:38.000000000 +0100
|
|
|
|
@@ -280,30 +280,33 @@ int main (int argc, char **argv)
|
|
|
|
* Emit .c file.
|
initial import of omega-0.90.4:
--
omega is a complex rogue-style game of dungeon exploration. Unlike
other such games, there are a number of ways to "win", depending
on various actions taken during play. The ways you can get your
name on the hiscore board include becoming the highest ranked head
of a guild, sect, college, etc., as well as gaining the most points
figured from possessions and experience. The game (via the oracle)
may impose some structure on your exploration, but you need not
follow all of the oracle's advice. There *is* a "total winner"
status, by the way.
omega offers a richness of playing detail that goes beyond a simple
game like rogue. However, the majority of gameplay is very similar
to rogue, hack, ultrarogue, larn, and other such games. The player
is represented by the highlighted "@" symbol, objects and terrain
features are represented by non-alphabetic symbols, monsters are
represented by the various upper and lower case letters, and other
humans are represented by a non-highlighted "@". It is recommended
that the novice read the man pages for rogue or some other such
game and perhaps play a few games before playing omega.
WWW: http://www.alcyone.com/max/projects/omega/
2001-07-28 12:31:47 -04:00
|
|
|
*/
|
|
|
|
fp = emitopen (cfile, argv);
|
2004-01-02 13:49:33 -05:00
|
|
|
- fprintf (fp, "\
|
|
|
|
-#include <curses.h>\n\
|
|
|
|
-#include <stdio.h>\n\
|
|
|
|
-#include <stdlib.h>\n\
|
|
|
|
-
|
|
|
|
-#include \"%s\"\n\
|
|
|
|
-
|
|
|
|
-void clrgen_init (void)\n\
|
|
|
|
-""{\n\
|
|
|
|
- if (%d > COLOR_PAIRS - 1) {\n\
|
|
|
|
- endwin();
|
|
|
|
- fputs (\"Too many color pairs!\\n\", stderr);\n\
|
|
|
|
- exit (1);\n\
|
|
|
|
- }\n\
|
|
|
|
-",
|
|
|
|
+ fprintf (fp,
|
|
|
|
+"#ifdef __FreeBSD__\n"
|
|
|
|
+"#include <ncurses.h>\n"
|
|
|
|
+"#else\n"
|
|
|
|
+"#include <curses.h>\n"
|
|
|
|
+"#endif\n"
|
|
|
|
+"#include <stdio.h>\n"
|
|
|
|
+"#include <stdlib.h>\n"
|
|
|
|
+"\n"
|
|
|
|
+"#include \"%s\"\n"
|
|
|
|
+"\n"
|
|
|
|
+"void clrgen_init (void)\n"
|
|
|
|
+"{\n"
|
|
|
|
+" if (%d > COLOR_PAIRS - 1) {\n"
|
|
|
|
+" endwin();\n"
|
|
|
|
+" fputs (\"Too many color pairs!\\n\", stderr);\n"
|
|
|
|
+" exit (1);\n"
|
|
|
|
+" }\n"
|
|
|
|
+"",
|
|
|
|
hfile, ncpairs);
|
|
|
|
for (i = 0; i < ncpairs; i++)
|
|
|
|
- fprintf (fp, "\
|
|
|
|
- init_pair (%d, COLOR_%s, COLOR_%s);\n\
|
|
|
|
-",
|
|
|
|
+ fprintf (fp,
|
|
|
|
+" init_pair (%d, COLOR_%s, COLOR_%s);\n",
|
|
|
|
+
|
|
|
|
cpairs[i]->idx, cpairs[i]->cfg, cpairs[i]->cbg);
|
|
|
|
- fputs ("\
|
|
|
|
-""}\n\
|
|
|
|
-",
|
|
|
|
+ fputs (
|
|
|
|
+"}\n",
|
|
|
|
fp);
|
|
|
|
emitclose (fp, cfile);
|
|
|
|
|
|
|
|
@@ -318,10 +321,10 @@ void clrgen_init (void)\n\
|
|
|
|
strlen (pair->ofg) + strlen (pair->obg) > 10 ? "" : "\t",
|
|
|
|
pair->idx, pair->boldfg ? "|A_BOLD" : "");
|
|
|
|
}
|
|
|
|
- fputs ("\
|
|
|
|
-\n\
|
|
|
|
-extern void clrgen_init (void);\n\
|
|
|
|
-",
|
|
|
|
+ fputs (
|
|
|
|
+"\n"
|
|
|
|
+"extern void clrgen_init (void);\n"
|
|
|
|
+,
|
|
|
|
fp);
|
|
|
|
emitclose (fp, hfile);
|
initial import of omega-0.90.4:
--
omega is a complex rogue-style game of dungeon exploration. Unlike
other such games, there are a number of ways to "win", depending
on various actions taken during play. The ways you can get your
name on the hiscore board include becoming the highest ranked head
of a guild, sect, college, etc., as well as gaining the most points
figured from possessions and experience. The game (via the oracle)
may impose some structure on your exploration, but you need not
follow all of the oracle's advice. There *is* a "total winner"
status, by the way.
omega offers a richness of playing detail that goes beyond a simple
game like rogue. However, the majority of gameplay is very similar
to rogue, hack, ultrarogue, larn, and other such games. The player
is represented by the highlighted "@" symbol, objects and terrain
features are represented by non-alphabetic symbols, monsters are
represented by the various upper and lower case letters, and other
humans are represented by a non-highlighted "@". It is recommended
that the novice read the man pages for rogue or some other such
game and perhaps play a few games before playing omega.
WWW: http://www.alcyone.com/max/projects/omega/
2001-07-28 12:31:47 -04:00
|
|
|
|