Source:NetHack 3.6.0/include/bitmfile.h

From NetHackWiki
Jump to: navigation, search

Below is the full text to bitmfile.h from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/include/bitmfile.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

  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.  typedef enum { IMG, XIMG } FILE_TYP;
  20.  
  21.  const char *get_file_ext(FILE_TYP typ);
  22.  
  23.  struct RGB {
  24.      UWORD r, g, b;
  25.  };
  26.  
  27.  int bitmap_to_file(FILE_TYP typ, int ww, int wh, unsigned int pwx,
  28.                     unsigned int pwy, unsigned int planes, unsigned int colors,
  29.                     const char *filename,
  30.                     void (*get_color)(unsigned int colind, struct RGB *rgb),
  31.                     void (*get_pixel)(int x, int y, unsigned int *colind));
  32.  
  33.  #endif