mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-21 07:31:26 +02:00
Fix packer and unpacker
This commit is contained in:
@@ -77,8 +77,13 @@ int main(int argc, char *argv[])
|
|||||||
fread(font, CELLW*CELLH, 256, f);
|
fread(font, CELLW*CELLH, 256, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
|
printf("#ifndef FONT_H_CHECK\n");
|
||||||
|
printf("#define FONT_H_CHECK\n");
|
||||||
|
|
||||||
printf("#define FONT_H %d\n", ysize);
|
printf("#define FONT_H %d\n", ysize);
|
||||||
|
|
||||||
|
printf("#ifdef INCLUDE_FONTDATA\n");
|
||||||
|
|
||||||
printf("char font_data[] = {\n");
|
printf("char font_data[] = {\n");
|
||||||
for(c=0; c<256; c++) {
|
for(c=0; c<256; c++) {
|
||||||
p[c] = n;
|
p[c] = n;
|
||||||
@@ -98,6 +103,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
printf("};\n");
|
printf("};\n");
|
||||||
|
|
||||||
|
printf("#endif\n#endif\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#define INCLUDE_FONTDATA
|
||||||
|
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
|
|
||||||
#define CELLW 12
|
#define CELLW 12
|
||||||
|
Reference in New Issue
Block a user