Fandom

Wikihack

Source:SLASH'EM 0.0.7E7F2/bitmfile.h

2,034pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Below is the full text to bitmfile.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/bitmfile.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.    /****************************\
2.    * Bitmap mit Farbtabelle als *
3.    * Graphik-Datei speichern		 *
4.    * Autor: Gabriel Schmidt		 *
5.    * (c} 1992 by MAXON-Computer *
6.    * -> Header-Datei						 *
7.    \****************************/
8.    
9.    #ifndef H_TO_FILE
10.   #define H_TO_FILE
11.   
12.   /*	#include <portab.h>	*/
13.   #define UWORD unsigned short
14.   #define ULONG unsigned long
15.   #define UBYTE unsigned char
16.   
17.   #define XIMG_MAGIC	0x58494D47
18.   
19.   
20.   typedef enum { IMG, XIMG } FILE_TYP;
21.   
22.   const char *get_file_ext(FILE_TYP typ);
23.   
24.   struct RGB
25.   	{
26.   	UWORD r, g, b;
27.   	};
28.   
29.   int bitmap_to_file(FILE_TYP typ, int ww, int wh,
30.   									 unsigned int pwx, unsigned int pwy,
31.   									 unsigned int planes, unsigned int colors,
32.   									 const char *filename,
33.   									 void (*get_color) (unsigned int colind, struct RGB *rgb) ,
34.   									 void (*get_pixel) (int x, int y, unsigned int *colind) ) ;
35.   
36.   #endif
37.   

Also on Fandom

Random Wiki