ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/readable.C
(Generate patch)

Comparing deliantra/server/common/readable.C (file contents):
Revision 1.30 by root, Sun Jul 1 05:00:17 2007 UTC vs.
Revision 1.31 by root, Tue Jul 10 06:05:55 2007 UTC

1591 1591
1592 book->msg = retbuf; 1592 book->msg = retbuf;
1593 } 1593 }
1594} 1594}
1595 1595
1596#define DESCRIBE_PATH(retbuf, variable, name) \
1597 if(variable) { \
1598 int i,j=0; \
1599 strcat(retbuf,"(" name ": "); \
1600 for(i=0; i<NRSPELLPATHS; i++) \
1601 if(variable & (1<<i)) { \
1602 if (j) \
1603 strcat(retbuf,", "); \
1604 else \
1605 j = 1; \
1606 strcat(retbuf, spellpathnames[i]); \
1607 } \
1608 strcat(retbuf,")"); \
1609 }
1610
1596/* god_info_msg() - generate a message detailing the properties 1611/* god_info_msg() - generate a message detailing the properties
1597 * of a random god. Used by the book hack. b.t. 1612 * of a random god. Used by the book hack. b.t.
1598 */ 1613 */
1599const char * 1614const char *
1600god_info_msg (int level, int booksize) 1615god_info_msg (int level, int booksize)
1628 1643
1629 /* Information about the god is random, and based on the level of the 1644 /* Information about the god is random, and based on the level of the
1630 * 'book'. Probably there is a more intellegent way to implement 1645 * 'book'. Probably there is a more intellegent way to implement
1631 * this ... 1646 * this ...
1632 */ 1647 */
1633
1634 while (level > 0) 1648 while (level > 0)
1635 { 1649 {
1636 sprintf (buf, " "); 1650 sprintf (buf, " ");
1637 if (level == 2 && RANDOM () % 2) 1651 if (level == 2 && RANDOM () % 2)
1638 { /* enemy god */ 1652 { /* enemy god */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines