Files
nethack/include/bitmfile.h
Sean Hunt 8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00

34 lines
851 B
C

/****************************\
* Bitmap mit Farbtabelle als *
* Graphik-Datei speichern *
* Autor: Gabriel Schmidt *
* (c} 1992 by MAXON-Computer *
* -> Header-Datei *
\****************************/
#ifndef H_TO_FILE
#define H_TO_FILE
/* #include <portab.h> */
#define UWORD unsigned short
#define ULONG unsigned long
#define UBYTE unsigned char
#define XIMG_MAGIC 0x58494D47
typedef enum { IMG, XIMG } FILE_TYP;
const char *get_file_ext(FILE_TYP typ);
struct RGB {
UWORD r, g, b;
};
int bitmap_to_file(FILE_TYP typ, int ww, int wh, unsigned int pwx,
unsigned int pwy, unsigned int planes, unsigned int colors,
const char *filename,
void (*get_color)(unsigned int colind, struct RGB *rgb),
void (*get_pixel)(int x, int y, unsigned int *colind));
#endif