summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-11-14 05:06:46 (EST)
committer P. J. McDermott <pjm@nac.net>2013-11-14 05:06:46 (EST)
commit55d3b15d69bd5a1bd43c5de660e5d90c92f375a0 (patch)
tree6b135935db0365fa736193c85abd75c7d28f6f0e
parente83f12c349bc7416ff91c9b7a21f117aea47a77e (diff)
downloadoverworld-rpg-55d3b15d69bd5a1bd43c5de660e5d90c92f375a0.zip
overworld-rpg-55d3b15d69bd5a1bd43c5de660e5d90c92f375a0.tar.gz
overworld-rpg-55d3b15d69bd5a1bd43c5de660e5d90c92f375a0.tar.bz2
tools/mkpals.c: Remove.
-rw-r--r--tools/mkpals.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/tools/mkpals.c b/tools/mkpals.c
deleted file mode 100644
index dcb0a75..0000000
--- a/tools/mkpals.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2013 Patrick "P. J." McDermott
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <stdio.h>
-
-static void parse_day_palette(void);
-
-int
-main(void)
-{
- parse_day_palette();
- return 0;
-}
-
-static void
-parse_day_palette(void)
-{
- FILE *in_fp, *day_fp, *night_fp, *eve_fp, *morn_fp;
- unsigned int n, r, g, b;
-
- in_fp = fopen("palette.txt", "rb");
- day_fp = fopen("data/palettes/day.gpl", "wb");
- night_fp = fopen("data/palettes/night.gpl", "wb");
- eve_fp = fopen("data/palettes/eve.gpl", "wb");
- morn_fp = fopen("data/palettes/morn.gpl", "wb");
-
- fputs("GIMP Palette\nName: Day colors\n#\n", day_fp);
- fputs("GIMP Palette\nName: Night colors\n#\n", night_fp);
- fputs("GIMP Palette\nName: Evening colors\n#\n", eve_fp);
- fputs("GIMP Palette\nName: Morning colors\n#\n", morn_fp);
-
- while (1) {
- if (fscanf(in_fp, "%3u %2x %2x %2x", &n, &r, &g, &b) == EOF) {
- break;
- }
- fprintf(day_fp, "%3u %3u %3u\tColor %02x%02x%02x\n",
- r, g, b, r, g, b);
- fprintf(night_fp, "%3u %3u %3u\tColor %02x%02x%02x\n",
- (unsigned int) (r * 0.250),
- (unsigned int) (g * 0.250),
- (unsigned int) (b * 0.500), /* was 0.375 */
- (unsigned int) (r * 0.250),
- (unsigned int) (g * 0.250),
- (unsigned int) (b * 0.500));
- fprintf(eve_fp, "%3u %3u %3u\tColor %02x%02x%02x\n",
- (unsigned int) (r * 0.875), /* was 0.750 */
- (unsigned int) (g * 0.625),
- (unsigned int) (b * 0.625),
- (unsigned int) (r * 0.875),
- (unsigned int) (g * 0.625),
- (unsigned int) (b * 0.625));
- fprintf(morn_fp, "%3u %3u %3u\tColor %02x%02x%02x\n",
- (unsigned int) (r * 1.000),
- (unsigned int) (g * 0.875), /* was 0.750 */
- (unsigned int) (b * 0.625),
- (unsigned int) (r * 1.000),
- (unsigned int) (g * 0.875),
- (unsigned int) (b * 0.625));
- }
-
- fclose(in_fp);
- fclose(day_fp);
- fclose(night_fp);
- fclose(eve_fp);
- fclose(morn_fp);
-}