diff options
author | red031000 <rubenru09@aol.com> | 2020-07-10 21:57:37 +0100 |
---|---|---|
committer | red031000 <rubenru09@aol.com> | 2020-07-10 21:57:37 +0100 |
commit | 6b746c4bff86737b9ca6a3a14dcb543a1216d194 (patch) | |
tree | d5aea74c0992ced6ba0db6f2c43a03960e7f7b0c | |
parent | 0cd5229fae82168f986eff59ad5af1b7a507091e (diff) |
IR handling for palettes, potion and antidote/brn heal/frz heal
18 files changed, 107 insertions, 8 deletions
@@ -257,6 +257,9 @@ $(CLOBBER_SIZE_VERSION101_NCGR_FILES): %.NCGR: %.png %.NCLR: %.pal $(GFX) $< $@ +$(IR_NCLR_FILES): %.NCLR: %.pal + $(GFX) $< $@ -ir + %.png: ; %.pal: ; diff --git a/files/itemtool/itemdata/item_icon/.gitignore b/files/itemtool/itemdata/item_icon/.gitignore index 2e778c6c..6387f2e3 100644 --- a/files/itemtool/itemdata/item_icon/.gitignore +++ b/files/itemtool/itemdata/item_icon/.gitignore @@ -20,3 +20,9 @@ narc_0020.NCGR narc_0021.NCGR narc_0022.NCLR narc_0023.NCGR +narc_0024.NCGR +narc_0024.NCLR +narc_0026.NCGR +narc_0027.NCLR +narc_0028.NCLR +narc_0029.NCLR diff --git a/files/itemtool/itemdata/item_icon/narc_0024.NCGR b/files/itemtool/itemdata/item_icon/narc_0024.NCGR Binary files differdeleted file mode 100644 index df0ab48b..00000000 --- a/files/itemtool/itemdata/item_icon/narc_0024.NCGR +++ /dev/null diff --git a/files/itemtool/itemdata/item_icon/narc_0024.png b/files/itemtool/itemdata/item_icon/narc_0024.png Binary files differnew file mode 100644 index 00000000..5abf90de --- /dev/null +++ b/files/itemtool/itemdata/item_icon/narc_0024.png diff --git a/files/itemtool/itemdata/item_icon/narc_0025.NCLR b/files/itemtool/itemdata/item_icon/narc_0025.NCLR Binary files differdeleted file mode 100644 index 04294c8a..00000000 --- a/files/itemtool/itemdata/item_icon/narc_0025.NCLR +++ /dev/null diff --git a/files/itemtool/itemdata/item_icon/narc_0026.NCGR b/files/itemtool/itemdata/item_icon/narc_0026.NCGR Binary files differdeleted file mode 100644 index 74b77380..00000000 --- a/files/itemtool/itemdata/item_icon/narc_0026.NCGR +++ /dev/null diff --git a/files/itemtool/itemdata/item_icon/narc_0026.png b/files/itemtool/itemdata/item_icon/narc_0026.png Binary files differnew file mode 100644 index 00000000..b8541bf2 --- /dev/null +++ b/files/itemtool/itemdata/item_icon/narc_0026.png diff --git a/files/itemtool/itemdata/item_icon/narc_0027.NCLR b/files/itemtool/itemdata/item_icon/narc_0027.NCLR Binary files differdeleted file mode 100644 index 56911461..00000000 --- a/files/itemtool/itemdata/item_icon/narc_0027.NCLR +++ /dev/null diff --git a/files/itemtool/itemdata/item_icon/narc_0027.pal b/files/itemtool/itemdata/item_icon/narc_0027.pal new file mode 100644 index 00000000..fc656170 --- /dev/null +++ b/files/itemtool/itemdata/item_icon/narc_0027.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +180 180 180 +49 49 49 +255 255 255 +205 205 205 +156 156 156 +255 238 98 +255 180 41 +255 213 74 +246 197 57 +255 255 180 +90 90 90 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/files/itemtool/itemdata/item_icon/narc_0028.NCLR b/files/itemtool/itemdata/item_icon/narc_0028.NCLR Binary files differdeleted file mode 100644 index 3b2de0f8..00000000 --- a/files/itemtool/itemdata/item_icon/narc_0028.NCLR +++ /dev/null diff --git a/files/itemtool/itemdata/item_icon/narc_0028.pal b/files/itemtool/itemdata/item_icon/narc_0028.pal new file mode 100644 index 00000000..9ca16738 --- /dev/null +++ b/files/itemtool/itemdata/item_icon/narc_0028.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +180 180 180 +49 49 49 +255 255 255 +205 205 205 +156 156 156 +139 246 139 +82 189 82 +115 222 115 +106 213 106 +222 255 222 +90 90 90 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/files/itemtool/itemdata/item_icon/narc_0029.NCLR b/files/itemtool/itemdata/item_icon/narc_0029.NCLR Binary files differdeleted file mode 100644 index 7d9c6c89..00000000 --- a/files/itemtool/itemdata/item_icon/narc_0029.NCLR +++ /dev/null diff --git a/files/itemtool/itemdata/item_icon/narc_0029.pal b/files/itemtool/itemdata/item_icon/narc_0029.pal new file mode 100644 index 00000000..49a1b20b --- /dev/null +++ b/files/itemtool/itemdata/item_icon/narc_0029.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +180 180 180 +49 49 49 +255 255 255 +205 205 205 +156 156 156 +255 189 180 +246 106 106 +246 164 164 +246 139 139 +255 222 222 +90 90 90 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/filesystem.mk b/filesystem.mk index 73f16cb0..80e44372 100644 --- a/filesystem.mk +++ b/filesystem.mk @@ -1581,7 +1581,13 @@ files/itemtool/itemdata/item_icon.narc: \ files/itemtool/itemdata/item_icon/narc_0020.NCGR \ files/itemtool/itemdata/item_icon/narc_0021.NCGR \ files/itemtool/itemdata/item_icon/narc_0022.NCLR \ - files/itemtool/itemdata/item_icon/narc_0023.NCGR + files/itemtool/itemdata/item_icon/narc_0023.NCGR \ + files/itemtool/itemdata/item_icon/narc_0024.NCGR \ + files/itemtool/itemdata/item_icon/narc_0024.NCLR \ + files/itemtool/itemdata/item_icon/narc_0026.NCGR \ + files/itemtool/itemdata/item_icon/narc_0027.NCLR \ + files/itemtool/itemdata/item_icon/narc_0028.NCLR \ + files/itemtool/itemdata/item_icon/narc_0029.NCLR files/application/custom_ball/data/cb_data.narc: \ files/application/custom_ball/data/cb_data/narc_0195.NCGR.lz \ diff --git a/graphics_rules.mk b/graphics_rules.mk index 0005814a..34c6544d 100644 --- a/graphics_rules.mk +++ b/graphics_rules.mk @@ -17,7 +17,12 @@ CLOBBER_SIZE_VERSION101_NCGR_FILES := files/graphic/bag_gra/narc_0002.NCGR \ files/itemtool/itemdata/item_icon/narc_0018.NCGR \ files/itemtool/itemdata/item_icon/narc_0020.NCGR \ files/itemtool/itemdata/item_icon/narc_0021.NCGR \ - files/itemtool/itemdata/item_icon/narc_0023.NCGR + files/itemtool/itemdata/item_icon/narc_0023.NCGR \ + files/itemtool/itemdata/item_icon/narc_0024.NCGR \ + files/itemtool/itemdata/item_icon/narc_0026.NCGR + +IR_NCLR_FILES := files/itemtool/itemdata/item_icon/narc_0028.NCLR \ + files/itemtool/itemdata/item_icon/narc_0029.NCLR NCGR_CLEAN_LIST := files/data/cell0.NCGR \ files/graphic/bag_gra/narc_0002.NCGR \ @@ -34,7 +39,9 @@ NCGR_CLEAN_LIST := files/data/cell0.NCGR \ files/itemtool/itemdata/item_icon/narc_0018.NCGR \ files/itemtool/itemdata/item_icon/narc_0020.NCGR \ files/itemtool/itemdata/item_icon/narc_0021.NCGR \ - files/itemtool/itemdata/item_icon/narc_0023.NCGR + files/itemtool/itemdata/item_icon/narc_0023.NCGR \ + files/itemtool/itemdata/item_icon/narc_0024.NCGR \ + files/itemtool/itemdata/item_icon/narc_0026.NCGR NCLR_CLEAN_LIST := files/data/cell0.NCLR \ files/graphic/bag_gra/narc_0003.NCLR \ @@ -48,4 +55,8 @@ NCLR_CLEAN_LIST := files/data/cell0.NCLR \ files/itemtool/itemdata/item_icon/narc_0014.NCLR \ files/itemtool/itemdata/item_icon/narc_0016.NCLR \ files/itemtool/itemdata/item_icon/narc_0018.NCLR \ - files/itemtool/itemdata/item_icon/narc_0022.NCLR + files/itemtool/itemdata/item_icon/narc_0022.NCLR \ + files/itemtool/itemdata/item_icon/narc_0024.NCLR \ + files/itemtool/itemdata/item_icon/narc_0027.NCLR \ + files/itemtool/itemdata/item_icon/narc_0028.NCLR \ + files/itemtool/itemdata/item_icon/narc_0029.NCLR diff --git a/tools/nitrogfx/gfx.c b/tools/nitrogfx/gfx.c index a80d341b..0acb4133 100644 --- a/tools/nitrogfx/gfx.c +++ b/tools/nitrogfx/gfx.c @@ -534,7 +534,7 @@ void WriteGbaPalette(char *path, struct Palette *palette) fclose(fp); } -void WriteNtrPalette(char *path, struct Palette *palette, bool ncpr) +void WriteNtrPalette(char *path, struct Palette *palette, bool ncpr, bool ir) { FILE *fp = fopen(path, "wb"); @@ -594,6 +594,12 @@ void WriteNtrPalette(char *path, struct Palette *palette, bool ncpr) } } + if (ir) + { + colours[510] = 'I'; + colours[511] = 'R'; + } + fwrite(colours, 1, 256 * 2, fp); fclose(fp); diff --git a/tools/nitrogfx/gfx.h b/tools/nitrogfx/gfx.h index 1b097336..ef7926d1 100644 --- a/tools/nitrogfx/gfx.h +++ b/tools/nitrogfx/gfx.h @@ -36,6 +36,6 @@ void FreeImage(struct Image *image); void ReadGbaPalette(char *path, struct Palette *palette); void ReadNtrPalette(char *path, struct Palette *palette); void WriteGbaPalette(char *path, struct Palette *palette); -void WriteNtrPalette(char *path, struct Palette *palette, bool ncpr); +void WriteNtrPalette(char *path, struct Palette *palette, bool ncpr, bool ir); #endif // GFX_H diff --git a/tools/nitrogfx/main.c b/tools/nitrogfx/main.c index 076e7076..b922e4b2 100644 --- a/tools/nitrogfx/main.c +++ b/tools/nitrogfx/main.c @@ -411,6 +411,7 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c { struct Palette palette; bool ncpr = false; + bool ir = false; for (int i = 3; i < argc; i++) { @@ -420,6 +421,10 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c { ncpr = true; } + else if (strcmp(option, "-ir") == 0) + { + ir = true; + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -427,7 +432,7 @@ void HandlePngToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, c } ReadPngPalette(inputPath, &palette); - WriteNtrPalette(outputPath, &palette, ncpr); + WriteNtrPalette(outputPath, &palette, ncpr, ir); } void HandleGbaToJascPaletteCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED) @@ -487,6 +492,7 @@ void HandleJascToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, { int numColors = 0; bool ncpr = false; + bool ir = false; for (int i = 3; i < argc; i++) { @@ -509,6 +515,10 @@ void HandleJascToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, { ncpr = true; } + else if (strcmp(option, "-ir") == 0) + { + ir = true; + } else { FATAL_ERROR("Unrecognized option \"%s\".\n", option); @@ -522,7 +532,7 @@ void HandleJascToNtrPaletteCommand(char *inputPath, char *outputPath, int argc, if (numColors != 0) palette.numColors = numColors; - WriteNtrPalette(outputPath, &palette, ncpr); + WriteNtrPalette(outputPath, &palette, ncpr, ir); } void HandleLatinFontToPngCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED) |