Wikia

Wikihack

Source:SLASH'EM 0.0.7E7F2/egyp.h

2,032pages on
this wiki
Talk0

Below is the full text to egyp.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/egyp.h#line123]], for example.

The latest source code for vanilla NetHack is at Source code.


The NetHack General Public License applies to screenshots, source code and other content from NetHack.
1.    /*** egyp.h ***/
2.    
3.    #ifndef EGYP__H
4.    #define EGYP__H
5.    
6.    
7.    /*** Card definitions ***/
8.    #define CARD_SUITS		4		/* Number of suits */
9.    #define CARD_RANKS		13		/* Number of cards in each suit */
10.   #define CARD_TRUMPS		20		/* Number of trump cards */
11.   #define CARD_SUITED		(CARD_SUITS * CARD_RANKS)
12.   #define CARD_FOOL		CARD_SUITED
13.   #define CARD_TOTAL		(CARD_SUITED + CARD_TRUMPS)
14.   
15.   #define card_istrump(c)	((c) >= CARD_SUITED)
16.   #define card_suit(c)	((c) / CARD_RANKS)
17.   #define card_rank(c)	((c) % CARD_RANKS)
18.   #define card_trump(c)	((c) - CARD_SUITED)
19.   
20.   
21.   /*** Monster definitions ***/
22.   struct egyp {
23.   	long credit;				/* Amount credited to player */
24.   	int top;					/* Index of top of the deck */
25.   	xchar cards[CARD_TOTAL];	/* Shuffled cards */
26.   };
27.   #define EGYP(mon)	((struct egyp *)&(mon)->mextra[0])
28.   
29.   
30.   #endif /* EGYP__H */
31.   
32.   

Around Wikia's network

Random Wiki