mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-28 03:34:22 -05:00
Merge pull request #381 from DizzyEggg/mons_pal
Some checks are pending
GithubCI / build (push) Waiting to run
Some checks are pending
GithubCI / build (push) Waiting to run
Move ax mons palette to C and fix #34
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@
|
||||
*.4bpp
|
||||
*.8bpp
|
||||
*.gbapal
|
||||
*.pmdpal
|
||||
*.lz
|
||||
*.rl
|
||||
*.pcm
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
.global banrpal
|
||||
banrpal:
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x0f, 0x0f, 0x0f, 0x80
|
||||
.byte 0x1f, 0x1f, 0x1f, 0x80
|
||||
.byte 0x2f, 0x2f, 0x2f, 0x80
|
||||
.byte 0x3f, 0x3f, 0x3f, 0x80
|
||||
.byte 0x4f, 0x4f, 0x4f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0x6f, 0x6f, 0x6f, 0x80
|
||||
.byte 0x7f, 0x7f, 0x7f, 0x80
|
||||
.byte 0x8f, 0x8f, 0x8f, 0x80
|
||||
.byte 0x9f, 0x9f, 0x9f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xbf, 0xbf, 0xbf, 0x80
|
||||
.byte 0xcf, 0xcf, 0xcf, 0x80
|
||||
.byte 0xd7, 0xd7, 0xd7, 0x80
|
||||
.byte 0xe7, 0xe7, 0xe7, 0x80
|
||||
@@ -43080,7 +43080,9 @@ gUnknown_8499554:
|
||||
|
||||
|
||||
#include "dungeon/banfont.inc"
|
||||
#include "dungeon/banrpal.inc"
|
||||
.global banrpal
|
||||
banrpal:
|
||||
.incbin "graphics/dungeon/pal/barnpal.pmdpal"
|
||||
#include "dungeon/colvec.inc"
|
||||
#include "dungeon/etcfont.inc"
|
||||
#include "dungeon/etcfonta.inc"
|
||||
|
||||
@@ -612,7 +612,3 @@ ax_sprite 0, 0
|
||||
.include "data/kao/deoxysnormal.inc"
|
||||
.include "data/kao/munchlax.inc"
|
||||
.include "data/kao/rayquazacutscene.inc"
|
||||
|
||||
.global gPaletFile
|
||||
gPaletFile:
|
||||
.incbin "baserom.gba", 0x16BD42C, 0x82BD4
|
||||
|
||||
5
data/unk_96BD7AC.s
Normal file
5
data/unk_96BD7AC.s
Normal file
@@ -0,0 +1,5 @@
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
|
||||
.incbin "baserom.gba", 0x16BD7AC, 0x82854
|
||||
272
data/unk_data.s
272
data/unk_data.s
@@ -19,262 +19,22 @@
|
||||
@ Unknown Palette
|
||||
.global monPal
|
||||
monPal:
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x47, 0x37, 0x37, 0x80
|
||||
.byte 0x77, 0x67, 0x67, 0x80
|
||||
.byte 0xaf, 0x9f, 0x9f, 0x80
|
||||
.byte 0xd7, 0xcf, 0xcf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x77, 0x1f, 0x47, 0x80
|
||||
.byte 0xaf, 0x3f, 0x6f, 0x80
|
||||
.byte 0xd7, 0x7f, 0x9f, 0x80
|
||||
.byte 0x00, 0x37, 0xc7, 0x80
|
||||
.byte 0x00, 0x97, 0xef, 0x80
|
||||
.byte 0x37, 0xbf, 0xff, 0x80
|
||||
.byte 0x77, 0x57, 0x37, 0x80
|
||||
.byte 0xb7, 0x7f, 0x47, 0x80
|
||||
|
||||
.byte 0xe7, 0xb7, 0x6f, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x77, 0x37, 0x00, 0x80
|
||||
.byte 0xbf, 0x87, 0x27, 0x80
|
||||
.byte 0xdf, 0xbf, 0x4f, 0x80
|
||||
.byte 0xff, 0xff, 0x77, 0x80
|
||||
.byte 0x4f, 0x27, 0x57, 0x80
|
||||
.byte 0x8f, 0x57, 0x7f, 0x80
|
||||
.byte 0xd7, 0x87, 0xa7, 0x80
|
||||
.byte 0x3f, 0x67, 0x00, 0x80
|
||||
.byte 0x67, 0x8f, 0x00, 0x80
|
||||
|
||||
.byte 0xb7, 0xd7, 0x1f, 0x80
|
||||
.byte 0x8f, 0x0f, 0x3f, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0xc7, 0x87, 0x00, 0x80
|
||||
.byte 0xef, 0xdf, 0x2f, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x17, 0x4f, 0x6f, 0x80
|
||||
.byte 0x27, 0x7f, 0xb7, 0x80
|
||||
.byte 0x37, 0xaf, 0xff, 0x80
|
||||
.byte 0xbf, 0xe7, 0xef, 0x80
|
||||
.byte 0x87, 0x87, 0x00, 0x80
|
||||
.byte 0xbf, 0xbf, 0x00, 0x80
|
||||
.byte 0x8f, 0xd7, 0xf7, 0x80
|
||||
.byte 0x2f, 0x2f, 0x2f, 0x80
|
||||
|
||||
.byte 0x67, 0x67, 0x67, 0x80
|
||||
.byte 0xa7, 0xa7, 0xa7, 0x80
|
||||
.byte 0x37, 0xaf, 0xff, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x47, 0x1f, 0x5f, 0x80
|
||||
.byte 0x6f, 0x47, 0x87, 0x80
|
||||
.byte 0x9f, 0x6f, 0xb7, 0x80
|
||||
.byte 0xcf, 0x97, 0xe7, 0x80
|
||||
.byte 0x6f, 0x00, 0x37, 0x80
|
||||
.byte 0xa7, 0x47, 0x77, 0x80
|
||||
.byte 0xe7, 0x8f, 0xb7, 0x80
|
||||
|
||||
.byte 0x87, 0x3f, 0x00, 0x80
|
||||
.byte 0xaf, 0x6f, 0x00, 0x80
|
||||
.byte 0xef, 0xaf, 0x37, 0x80
|
||||
.byte 0xff, 0xd7, 0x57, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x37, 0x6f, 0x1f, 0x80
|
||||
.byte 0x5f, 0x8f, 0x17, 0x80
|
||||
.byte 0x87, 0xaf, 0x0f, 0x80
|
||||
.byte 0xaf, 0xd7, 0x0f, 0x80
|
||||
.byte 0x17, 0x1f, 0x77, 0x80
|
||||
.byte 0x37, 0x5f, 0xb7, 0x80
|
||||
|
||||
.byte 0x57, 0xa7, 0xff, 0x80
|
||||
.byte 0x27, 0x1f, 0x37, 0x80
|
||||
.byte 0x3f, 0x3f, 0x4f, 0x80
|
||||
.byte 0x57, 0x67, 0x67, 0x80
|
||||
.byte 0xbf, 0x17, 0x00, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x1f, 0x47, 0x6f, 0x80
|
||||
.byte 0x37, 0x6f, 0x9f, 0x80
|
||||
.byte 0x57, 0x9f, 0xcf, 0x80
|
||||
.byte 0x77, 0xcf, 0xff, 0x80
|
||||
.byte 0x57, 0x37, 0x00, 0x80
|
||||
|
||||
.byte 0x97, 0x67, 0x00, 0x80
|
||||
.byte 0xd7, 0xa7, 0x47, 0x80
|
||||
.byte 0x77, 0x2f, 0x77, 0x80
|
||||
.byte 0xaf, 0x47, 0xaf, 0x80
|
||||
.byte 0xdf, 0x77, 0xd7, 0x80
|
||||
.byte 0x87, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x6f, 0x17, 0x0f, 0x80
|
||||
.byte 0xa7, 0x37, 0x0f, 0x80
|
||||
.byte 0xd7, 0x57, 0x0f, 0x80
|
||||
.byte 0xf7, 0x9f, 0x67, 0x80
|
||||
|
||||
.byte 0x5f, 0x87, 0x0f, 0x80
|
||||
.byte 0x8f, 0xb7, 0x1f, 0x80
|
||||
.byte 0xc7, 0xe7, 0x2f, 0x80
|
||||
.byte 0x67, 0x47, 0x27, 0x80
|
||||
.byte 0x97, 0x77, 0x57, 0x80
|
||||
.byte 0xdf, 0xb7, 0x67, 0x80
|
||||
.byte 0xff, 0xff, 0x8f, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x8f, 0x37, 0x00, 0x80
|
||||
.byte 0xe7, 0x8f, 0x00, 0x80
|
||||
.byte 0xff, 0xc7, 0x57, 0x80
|
||||
|
||||
.byte 0xff, 0xff, 0xaf, 0x80
|
||||
.byte 0x67, 0x67, 0x00, 0x80
|
||||
.byte 0xaf, 0xaf, 0x00, 0x80
|
||||
.byte 0xff, 0xff, 0x00, 0x80
|
||||
.byte 0x5f, 0x1f, 0x3f, 0x80
|
||||
.byte 0xa7, 0x4f, 0x5f, 0x80
|
||||
.byte 0xdf, 0x8f, 0xaf, 0x80
|
||||
.byte 0x00, 0x6f, 0x97, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x67, 0x37, 0x0f, 0x80
|
||||
.byte 0x97, 0x67, 0x27, 0x80
|
||||
|
||||
.byte 0xc7, 0x9f, 0x47, 0x80
|
||||
.byte 0xff, 0xd7, 0x67, 0x80
|
||||
.byte 0x57, 0x3f, 0x77, 0x80
|
||||
.byte 0x77, 0x67, 0xc7, 0x80
|
||||
.byte 0xaf, 0xaf, 0xd7, 0x80
|
||||
.byte 0x27, 0x57, 0x67, 0x80
|
||||
.byte 0x57, 0x97, 0x8f, 0x80
|
||||
.byte 0x7f, 0xcf, 0x9f, 0x80
|
||||
.byte 0xbf, 0x17, 0x00, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x27, 0x5f, 0x0f, 0x80
|
||||
|
||||
.byte 0x5f, 0x8f, 0x17, 0x80
|
||||
.byte 0x8f, 0xbf, 0x27, 0x80
|
||||
.byte 0xbf, 0xef, 0x3f, 0x80
|
||||
.byte 0x47, 0x47, 0x47, 0x80
|
||||
.byte 0x87, 0x87, 0x87, 0x80
|
||||
.byte 0xd7, 0xd7, 0xd7, 0x80
|
||||
.byte 0x67, 0x47, 0x27, 0x80
|
||||
.byte 0xb7, 0x77, 0x00, 0x80
|
||||
.byte 0xef, 0xd7, 0x57, 0x80
|
||||
.byte 0xbf, 0x17, 0x00, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x0f, 0x0f, 0x0f, 0x80
|
||||
.byte 0xc7, 0x87, 0x00, 0x80
|
||||
.byte 0xef, 0xdf, 0x2f, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
|
||||
.byte 0x47, 0x47, 0x47, 0x80
|
||||
.byte 0x77, 0x7f, 0x77, 0x80
|
||||
.byte 0xa7, 0xb7, 0xa7, 0x80
|
||||
.byte 0xcf, 0xdf, 0xcf, 0x80
|
||||
.byte 0x67, 0x67, 0x67, 0x80
|
||||
.byte 0xa7, 0xa7, 0xa7, 0x80
|
||||
.byte 0xdf, 0xef, 0xdf, 0x80
|
||||
.byte 0x6f, 0x4f, 0x1f, 0x80
|
||||
.byte 0xcf, 0x97, 0x00, 0x80
|
||||
.byte 0xef, 0xd7, 0x57, 0x80
|
||||
.byte 0xff, 0x3f, 0x00, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x0f, 0x80
|
||||
.byte 0x57, 0x00, 0x27, 0x80
|
||||
.byte 0x97, 0x3f, 0x5f, 0x80
|
||||
|
||||
.byte 0xc7, 0x77, 0x97, 0x80
|
||||
.byte 0xd7, 0xaf, 0xbf, 0x80
|
||||
.byte 0xef, 0xef, 0xef, 0x80
|
||||
.byte 0x97, 0x97, 0x8f, 0x80
|
||||
.byte 0x27, 0x67, 0x6f, 0x80
|
||||
.byte 0x37, 0x97, 0x97, 0x80
|
||||
.byte 0x27, 0x57, 0x3f, 0x80
|
||||
.byte 0x57, 0x7f, 0x37, 0x80
|
||||
.byte 0x87, 0xc7, 0x57, 0x80
|
||||
.byte 0xb7, 0x77, 0x00, 0x80
|
||||
.byte 0xef, 0xaf, 0x00, 0x80
|
||||
.byte 0xef, 0xff, 0x87, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x17, 0x17, 0x17, 0x80
|
||||
.byte 0x3f, 0x3f, 0x3f, 0x80
|
||||
|
||||
.byte 0x6f, 0x6f, 0x6f, 0x80
|
||||
.byte 0x9f, 0x9f, 0x9f, 0x80
|
||||
.byte 0xcf, 0xcf, 0xcf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x57, 0x57, 0x57, 0x80
|
||||
.byte 0x87, 0x87, 0x87, 0x80
|
||||
.byte 0xbf, 0xbf, 0xbf, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0x8f, 0x97, 0x97, 0x80
|
||||
.byte 0xc7, 0xcf, 0xd7, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0x8f, 0x8f, 0x8f, 0x80
|
||||
.byte 0xbf, 0xbf, 0xbf, 0x80
|
||||
.byte 0x00, 0x8f, 0x00, 0x80
|
||||
.byte 0x0f, 0x0f, 0x0f, 0x80
|
||||
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0xaf, 0xaf, 0xaf, 0x80
|
||||
.byte 0xff, 0xff, 0xff, 0x80
|
||||
.byte 0x47, 0x47, 0x47, 0x80
|
||||
.byte 0x77, 0x77, 0x77, 0x80
|
||||
.byte 0xa7, 0xa7, 0xa7, 0x80
|
||||
.byte 0xd7, 0xd7, 0xd7, 0x80
|
||||
.byte 0x67, 0x67, 0x67, 0x80
|
||||
.byte 0xa7, 0xa7, 0xa7, 0x80
|
||||
.byte 0xe7, 0xe7, 0xe7, 0x80
|
||||
.byte 0x5f, 0x5f, 0x5f, 0x80
|
||||
.byte 0x97, 0x97, 0x97, 0x80
|
||||
.byte 0xcf, 0xcf, 0xcf, 0x80
|
||||
.byte 0xa7, 0xa7, 0xa7, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
.byte 0x00, 0x00, 0x00, 0x80
|
||||
|
||||
.incbin "graphics/unk_monpal/0.pmdpal"
|
||||
.incbin "graphics/unk_monpal/1.pmdpal"
|
||||
.incbin "graphics/unk_monpal/2.pmdpal"
|
||||
.incbin "graphics/unk_monpal/3.pmdpal"
|
||||
.incbin "graphics/unk_monpal/4.pmdpal"
|
||||
.incbin "graphics/unk_monpal/5.pmdpal"
|
||||
.incbin "graphics/unk_monpal/6.pmdpal"
|
||||
.incbin "graphics/unk_monpal/7.pmdpal"
|
||||
.incbin "graphics/unk_monpal/8.pmdpal"
|
||||
.incbin "graphics/unk_monpal/9.pmdpal"
|
||||
.incbin "graphics/unk_monpal/10.pmdpal"
|
||||
.incbin "graphics/unk_monpal/11.pmdpal"
|
||||
.incbin "graphics/unk_monpal/12.pmdpal"
|
||||
.incbin "graphics/unk_monpal/13.pmdpal"
|
||||
.incbin "graphics/unk_monpal/14.pmdpal"
|
||||
|
||||
.string "pksdir0\0"
|
||||
.string "pksdir0\0"
|
||||
.string "pksdir0\0"
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
%.4bpp: %.png
|
||||
$(GBAGFX) $< $@
|
||||
%.4bpp: %.png ; $(GBAGFX) $< $@
|
||||
%.pmdpal: %.pal ; $(GBAGFX) $< $@
|
||||
%.gbapal: %.pal ; $(GBAGFX) $< $@
|
||||
|
||||
19
graphics/ax/pal/0.pal
Normal file
19
graphics/ax/pal/0.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
191 119 39
|
||||
223 175 103
|
||||
255 231 159
|
||||
167 111 0
|
||||
223 183 0
|
||||
255 247 0
|
||||
0 103 183
|
||||
31 159 231
|
||||
143 223 255
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
255 135 191
|
||||
255 255 255
|
||||
19
graphics/ax/pal/1.pal
Normal file
19
graphics/ax/pal/1.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
231 63 103
|
||||
255 143 175
|
||||
255 199 215
|
||||
0 103 183
|
||||
31 159 231
|
||||
143 223 255
|
||||
119 63 0
|
||||
167 95 31
|
||||
223 119 31
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
199 215 215
|
||||
255 255 255
|
||||
19
graphics/ax/pal/10.pal
Normal file
19
graphics/ax/pal/10.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
231 63 103
|
||||
255 143 175
|
||||
255 199 215
|
||||
127 143 151
|
||||
175 183 191
|
||||
215 223 223
|
||||
39 135 0
|
||||
95 199 55
|
||||
143 255 103
|
||||
111 63 151
|
||||
199 151 223
|
||||
223 183 0
|
||||
255 247 0
|
||||
255 255 255
|
||||
19
graphics/ax/pal/11.pal
Normal file
19
graphics/ax/pal/11.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
191 119 39
|
||||
223 175 103
|
||||
255 231 159
|
||||
55 63 143
|
||||
79 95 151
|
||||
103 135 175
|
||||
127 143 151
|
||||
175 183 191
|
||||
215 223 223
|
||||
183 0 0
|
||||
231 63 103
|
||||
255 143 175
|
||||
255 199 215
|
||||
255 255 255
|
||||
19
graphics/ax/pal/12.pal
Normal file
19
graphics/ax/pal/12.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
119 63 0
|
||||
167 95 31
|
||||
223 119 31
|
||||
71 135 111
|
||||
143 175 183
|
||||
215 231 223
|
||||
215 167 0
|
||||
255 247 0
|
||||
255 231 159
|
||||
159 0 0
|
||||
255 87 15
|
||||
79 159 215
|
||||
167 207 239
|
||||
255 255 255
|
||||
19
graphics/ax/pal/13.pal
Normal file
19
graphics/ax/pal/13.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
19
graphics/ax/pal/2.pal
Normal file
19
graphics/ax/pal/2.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
87 47 159
|
||||
143 103 191
|
||||
183 151 223
|
||||
167 111 0
|
||||
223 183 0
|
||||
255 247 0
|
||||
55 63 143
|
||||
79 95 151
|
||||
103 135 175
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
191 207 247
|
||||
255 255 255
|
||||
19
graphics/ax/pal/3.pal
Normal file
19
graphics/ax/pal/3.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
87 103 183
|
||||
135 159 255
|
||||
183 207 255
|
||||
167 111 0
|
||||
223 183 0
|
||||
255 247 0
|
||||
39 135 0
|
||||
95 183 39
|
||||
159 207 111
|
||||
215 239 167
|
||||
255 255 255
|
||||
19
graphics/ax/pal/4.pal
Normal file
19
graphics/ax/pal/4.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
183 135 39
|
||||
215 191 103
|
||||
255 247 159
|
||||
167 111 0
|
||||
223 183 0
|
||||
255 247 0
|
||||
231 63 103
|
||||
255 143 175
|
||||
255 199 215
|
||||
119 63 0
|
||||
167 95 31
|
||||
223 119 31
|
||||
255 151 71
|
||||
255 255 255
|
||||
19
graphics/ax/pal/5.pal
Normal file
19
graphics/ax/pal/5.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
191 119 39
|
||||
223 175 103
|
||||
255 231 159
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
0 103 183
|
||||
31 159 231
|
||||
127 207 255
|
||||
71 103 111
|
||||
127 143 151
|
||||
175 183 191
|
||||
215 223 223
|
||||
255 255 255
|
||||
19
graphics/ax/pal/6.pal
Normal file
19
graphics/ax/pal/6.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
191 119 39
|
||||
223 175 103
|
||||
255 231 159
|
||||
119 63 0
|
||||
167 95 31
|
||||
223 119 31
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
71 103 111
|
||||
127 143 151
|
||||
175 183 191
|
||||
215 223 223
|
||||
255 255 255
|
||||
19
graphics/ax/pal/7.pal
Normal file
19
graphics/ax/pal/7.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
87 103 183
|
||||
135 159 255
|
||||
183 207 255
|
||||
191 119 39
|
||||
223 175 103
|
||||
255 231 159
|
||||
135 63 135
|
||||
175 111 183
|
||||
215 151 223
|
||||
215 63 0
|
||||
71 103 111
|
||||
151 159 167
|
||||
215 223 223
|
||||
255 255 255
|
||||
19
graphics/ax/pal/8.pal
Normal file
19
graphics/ax/pal/8.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
119 63 0
|
||||
167 95 31
|
||||
223 119 31
|
||||
159 0 0
|
||||
215 63 0
|
||||
255 135 95
|
||||
191 119 39
|
||||
223 175 103
|
||||
255 231 159
|
||||
39 135 0
|
||||
95 183 39
|
||||
127 223 87
|
||||
143 255 103
|
||||
255 255 255
|
||||
19
graphics/ax/pal/9.pal
Normal file
19
graphics/ax/pal/9.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 127 151
|
||||
0 0 0
|
||||
55 63 143
|
||||
79 95 151
|
||||
103 135 175
|
||||
87 103 183
|
||||
135 159 255
|
||||
183 207 255
|
||||
119 63 0
|
||||
223 119 31
|
||||
255 151 71
|
||||
175 103 31
|
||||
223 175 103
|
||||
255 231 159
|
||||
183 191 199
|
||||
255 255 255
|
||||
19
graphics/dungeon/pal/barnpal.pal
Normal file
19
graphics/dungeon/pal/barnpal.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
15 15 15
|
||||
31 31 31
|
||||
47 47 47
|
||||
63 63 63
|
||||
79 79 79
|
||||
95 95 95
|
||||
111 111 111
|
||||
127 127 127
|
||||
143 143 143
|
||||
159 159 159
|
||||
175 175 175
|
||||
191 191 191
|
||||
207 207 207
|
||||
215 215 215
|
||||
231 231 231
|
||||
19
graphics/unk_monpal/0.pal
Normal file
19
graphics/unk_monpal/0.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
23 23 15
|
||||
71 55 55
|
||||
119 103 103
|
||||
175 159 159
|
||||
215 207 207
|
||||
255 255 255
|
||||
119 31 71
|
||||
175 63 111
|
||||
215 127 159
|
||||
0 55 199
|
||||
0 151 239
|
||||
55 191 255
|
||||
119 87 55
|
||||
183 127 71
|
||||
231 183 111
|
||||
19
graphics/unk_monpal/1.pal
Normal file
19
graphics/unk_monpal/1.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
119 55 0
|
||||
191 135 39
|
||||
223 191 79
|
||||
255 255 119
|
||||
79 39 87
|
||||
143 87 127
|
||||
215 135 167
|
||||
63 103 0
|
||||
103 143 0
|
||||
183 215 31
|
||||
143 15 63
|
||||
19
graphics/unk_monpal/10.pal
Normal file
19
graphics/unk_monpal/10.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
15 15 15
|
||||
199 135 0
|
||||
239 223 47
|
||||
255 255 255
|
||||
71 71 71
|
||||
119 127 119
|
||||
167 183 167
|
||||
207 223 207
|
||||
103 103 103
|
||||
167 167 167
|
||||
223 239 223
|
||||
111 79 31
|
||||
207 151 0
|
||||
239 215 87
|
||||
255 63 0
|
||||
19
graphics/unk_monpal/11.pal
Normal file
19
graphics/unk_monpal/11.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
87 0 39
|
||||
151 63 95
|
||||
199 119 151
|
||||
215 175 191
|
||||
239 239 239
|
||||
151 151 143
|
||||
39 103 111
|
||||
55 151 151
|
||||
39 87 63
|
||||
87 127 55
|
||||
135 199 87
|
||||
183 119 0
|
||||
239 175 0
|
||||
239 255 135
|
||||
19
graphics/unk_monpal/12.pal
Normal file
19
graphics/unk_monpal/12.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
23 23 23
|
||||
63 63 63
|
||||
111 111 111
|
||||
159 159 159
|
||||
207 207 207
|
||||
255 255 255
|
||||
87 87 87
|
||||
135 135 135
|
||||
191 191 191
|
||||
95 95 95
|
||||
143 151 151
|
||||
199 207 215
|
||||
95 95 95
|
||||
143 143 143
|
||||
191 191 191
|
||||
19
graphics/unk_monpal/13.pal
Normal file
19
graphics/unk_monpal/13.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
15 15 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
71 71 71
|
||||
119 119 119
|
||||
167 167 167
|
||||
215 215 215
|
||||
103 103 103
|
||||
167 167 167
|
||||
231 231 231
|
||||
95 95 95
|
||||
151 151 151
|
||||
207 207 207
|
||||
167 167 167
|
||||
19
graphics/unk_monpal/14.pal
Normal file
19
graphics/unk_monpal/14.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
19
graphics/unk_monpal/2.pal
Normal file
19
graphics/unk_monpal/2.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
199 135 0
|
||||
239 223 47
|
||||
255 255 255
|
||||
23 79 111
|
||||
39 127 183
|
||||
55 175 255
|
||||
191 231 239
|
||||
135 135 0
|
||||
191 191 0
|
||||
143 215 247
|
||||
47 47 47
|
||||
103 103 103
|
||||
167 167 167
|
||||
55 175 255
|
||||
19
graphics/unk_monpal/3.pal
Normal file
19
graphics/unk_monpal/3.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
71 31 95
|
||||
111 71 135
|
||||
159 111 183
|
||||
207 151 231
|
||||
111 0 55
|
||||
167 71 119
|
||||
231 143 183
|
||||
135 63 0
|
||||
175 111 0
|
||||
239 175 55
|
||||
255 215 87
|
||||
19
graphics/unk_monpal/4.pal
Normal file
19
graphics/unk_monpal/4.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
55 111 31
|
||||
95 143 23
|
||||
135 175 15
|
||||
175 215 15
|
||||
23 31 119
|
||||
55 95 183
|
||||
87 167 255
|
||||
39 31 55
|
||||
63 63 79
|
||||
87 103 103
|
||||
191 23 0
|
||||
19
graphics/unk_monpal/5.pal
Normal file
19
graphics/unk_monpal/5.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
31 71 111
|
||||
55 111 159
|
||||
87 159 207
|
||||
119 207 255
|
||||
87 55 0
|
||||
151 103 0
|
||||
215 167 71
|
||||
119 47 119
|
||||
175 71 175
|
||||
223 119 215
|
||||
135 0 0
|
||||
19
graphics/unk_monpal/6.pal
Normal file
19
graphics/unk_monpal/6.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
111 23 15
|
||||
167 55 15
|
||||
215 87 15
|
||||
247 159 103
|
||||
95 135 15
|
||||
143 183 31
|
||||
199 231 47
|
||||
103 71 39
|
||||
151 119 87
|
||||
223 183 103
|
||||
255 255 143
|
||||
19
graphics/unk_monpal/7.pal
Normal file
19
graphics/unk_monpal/7.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
143 55 0
|
||||
231 143 0
|
||||
255 199 87
|
||||
255 255 175
|
||||
103 103 0
|
||||
175 175 0
|
||||
255 255 0
|
||||
95 31 63
|
||||
167 79 95
|
||||
223 143 175
|
||||
0 111 151
|
||||
19
graphics/unk_monpal/8.pal
Normal file
19
graphics/unk_monpal/8.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
103 55 15
|
||||
151 103 39
|
||||
199 159 71
|
||||
255 215 103
|
||||
87 63 119
|
||||
119 103 199
|
||||
175 175 215
|
||||
39 87 103
|
||||
87 151 143
|
||||
127 207 159
|
||||
191 23 0
|
||||
19
graphics/unk_monpal/9.pal
Normal file
19
graphics/unk_monpal/9.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 143 0
|
||||
23 23 15
|
||||
95 95 95
|
||||
175 175 175
|
||||
255 255 255
|
||||
39 95 15
|
||||
95 143 23
|
||||
143 191 39
|
||||
191 239 63
|
||||
71 71 71
|
||||
135 135 135
|
||||
215 215 215
|
||||
103 71 39
|
||||
183 119 0
|
||||
239 215 87
|
||||
191 23 0
|
||||
@@ -6,6 +6,7 @@ typedef struct RGB
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
u8 unk4; // Never read, always 0x80. Unused transparency/alpha flag?
|
||||
} RGB;
|
||||
|
||||
#endif // GUARD_RGB_H
|
||||
|
||||
@@ -811,6 +811,13 @@ SECTIONS {
|
||||
{
|
||||
src/monster_sbin.o(.rodata);
|
||||
data/monster_sbin.o(.rodata);
|
||||
src/monster_sbin_palet.o(.rodata);
|
||||
} > ROM =0
|
||||
|
||||
unk_96BD7AC_section :
|
||||
ALIGN(4)
|
||||
{
|
||||
data/unk_96BD7AC.o(.rodata);
|
||||
} > ROM =0
|
||||
|
||||
effect_sbin_section :
|
||||
|
||||
@@ -510,7 +510,7 @@ extern const u8 gKaoJirachi[];
|
||||
extern const u8 gKaoDeoxysNormal[];
|
||||
extern const u8 gKaoMunchlax[];
|
||||
extern const u8 gKaoRayquazaCutscene[];
|
||||
extern const u8 gPaletFile[];
|
||||
extern const u8 gAxMonsPalette[];
|
||||
|
||||
const File gMonsterFiles[MONSTER_FILES_COUNT] = {
|
||||
[0] = { "ax001", gAxBulbasaur,},
|
||||
@@ -1009,7 +1009,7 @@ const File gMonsterFiles[MONSTER_FILES_COUNT] = {
|
||||
[493] = { "kao414", gKaoDeoxysNormal,},
|
||||
[494] = { "kao420", gKaoMunchlax,},
|
||||
[495] = { "kao423", gKaoRayquazaCutscene,},
|
||||
[496] = { "palet", gPaletFile,},
|
||||
[496] = { "palet", gAxMonsPalette,},
|
||||
};
|
||||
|
||||
UNUSED ALIGNED(4) static const char sPksDir3[] = "pksdir0";
|
||||
|
||||
20
src/monster_sbin_palet.c
Normal file
20
src/monster_sbin_palet.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "global.h"
|
||||
#include "structs/rgb.h"
|
||||
|
||||
// These correspond to the 'overworldPalette' field in the monster data. Only slots 0-12 are actually used, slot 13 seems to be a placeholder.
|
||||
const RGB gAxMonsPalette[] = {
|
||||
INCBIN_RGB("graphics/ax/pal/0.pmdpal",
|
||||
"graphics/ax/pal/1.pmdpal",
|
||||
"graphics/ax/pal/2.pmdpal",
|
||||
"graphics/ax/pal/3.pmdpal",
|
||||
"graphics/ax/pal/4.pmdpal",
|
||||
"graphics/ax/pal/5.pmdpal",
|
||||
"graphics/ax/pal/6.pmdpal",
|
||||
"graphics/ax/pal/7.pmdpal",
|
||||
"graphics/ax/pal/8.pmdpal",
|
||||
"graphics/ax/pal/9.pmdpal",
|
||||
"graphics/ax/pal/10.pmdpal",
|
||||
"graphics/ax/pal/11.pmdpal",
|
||||
"graphics/ax/pal/12.pmdpal",
|
||||
"graphics/ax/pal/13.pmdpal")
|
||||
};
|
||||
@@ -505,3 +505,25 @@ void WriteGbaPalette(char *path, struct Palette *palette)
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void WritePmdPalette(char *path, struct Palette *palette)
|
||||
{
|
||||
FILE *fp = fopen(path, "wb");
|
||||
|
||||
if (fp == NULL)
|
||||
FATAL_ERROR("Failed to open \"%s\" for writing.\n", path);
|
||||
|
||||
for (int i = 0; i < palette->numColors; i++) {
|
||||
unsigned char red = palette->colors[i].red;
|
||||
unsigned char green = palette->colors[i].green;
|
||||
unsigned char blue = palette->colors[i].blue;
|
||||
unsigned char alpha = 0x80;
|
||||
|
||||
fputc(red, fp);
|
||||
fputc(green, fp);
|
||||
fputc(blue, fp);
|
||||
fputc(alpha, fp);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
@@ -49,5 +49,6 @@ void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int m
|
||||
void FreeImage(struct Image *image);
|
||||
void ReadGbaPalette(char *path, struct Palette *palette);
|
||||
void WriteGbaPalette(char *path, struct Palette *palette);
|
||||
void WritePmdPalette(char *path, struct Palette *palette);
|
||||
|
||||
#endif // GFX_H
|
||||
|
||||
@@ -262,7 +262,7 @@ void HandleGbaToJascPaletteCommand(char *inputPath, char *outputPath, int argc U
|
||||
WriteJascPalette(outputPath, &palette);
|
||||
}
|
||||
|
||||
void HandleJascToGbaPaletteCommand(char *inputPath, char *outputPath, int argc, char **argv)
|
||||
static void HandleJascToPaletteCommand(char *inputPath, char *outputPath, int argc, char **argv, bool isPmdPal)
|
||||
{
|
||||
int numColors = 0;
|
||||
|
||||
@@ -296,7 +296,22 @@ void HandleJascToGbaPaletteCommand(char *inputPath, char *outputPath, int argc,
|
||||
if (numColors != 0)
|
||||
palette.numColors = numColors;
|
||||
|
||||
WriteGbaPalette(outputPath, &palette);
|
||||
if (isPmdPal) {
|
||||
WritePmdPalette(outputPath, &palette);
|
||||
}
|
||||
else {
|
||||
WriteGbaPalette(outputPath, &palette);
|
||||
}
|
||||
}
|
||||
|
||||
void HandleJascToGbaPaletteCommand(char *inputPath, char *outputPath, int argc, char **argv)
|
||||
{
|
||||
HandleJascToPaletteCommand(inputPath, outputPath, argc, argv, false);
|
||||
}
|
||||
|
||||
void HandleJascToPmdPaletteCommand(char *inputPath, char *outputPath, int argc, char **argv)
|
||||
{
|
||||
HandleJascToPaletteCommand(inputPath, outputPath, argc, argv, true);
|
||||
}
|
||||
|
||||
void HandleLatinFontToPngCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
|
||||
@@ -554,6 +569,7 @@ int main(int argc, char **argv)
|
||||
{ "png", "pal", HandlePngToJascPaletteCommand },
|
||||
{ "gbapal", "pal", HandleGbaToJascPaletteCommand },
|
||||
{ "pal", "gbapal", HandleJascToGbaPaletteCommand },
|
||||
{ "pal", "pmdpal", HandleJascToPmdPaletteCommand },
|
||||
{ "latfont", "png", HandleLatinFontToPngCommand },
|
||||
{ "png", "latfont", HandlePngToLatinFontCommand },
|
||||
{ "hwjpnfont", "png", HandleHalfwidthJapaneseFontToPngCommand },
|
||||
|
||||
@@ -332,10 +332,12 @@ int ExtractData(const std::unique_ptr<unsigned char[]>& buffer, int offset, int
|
||||
|
||||
void CFile::TryConvertIncbin()
|
||||
{
|
||||
std::string idents[6] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32" };
|
||||
std::string idents[7] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32", "INCBIN_RGB" };
|
||||
int incbinType = -1;
|
||||
int size;
|
||||
bool isSigned, isRGB;
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (CheckIdentifier(idents[i]))
|
||||
{
|
||||
@@ -347,8 +349,17 @@ void CFile::TryConvertIncbin()
|
||||
if (incbinType == -1)
|
||||
return;
|
||||
|
||||
int size = 1 << (incbinType / 2);
|
||||
bool isSigned = ((incbinType % 2) == 0);
|
||||
// RGB incbin
|
||||
if (incbinType == 6) {
|
||||
isRGB = true;
|
||||
size = 4;
|
||||
isSigned = false;
|
||||
}
|
||||
else {
|
||||
isRGB = false;
|
||||
size = 1 << (incbinType / 2);
|
||||
isSigned = ((incbinType % 2) == 0);
|
||||
}
|
||||
|
||||
long oldPos = m_pos;
|
||||
long oldLineNum = m_lineNum;
|
||||
@@ -366,7 +377,8 @@ void CFile::TryConvertIncbin()
|
||||
|
||||
m_pos++;
|
||||
|
||||
std::printf("{");
|
||||
if (!isRGB)
|
||||
std::printf("{");
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -394,7 +406,7 @@ void CFile::TryConvertIncbin()
|
||||
|
||||
if (m_buffer[m_pos] == '\\')
|
||||
RaiseError("unexpected escape in path string");
|
||||
|
||||
|
||||
m_pos++;
|
||||
}
|
||||
|
||||
@@ -416,7 +428,9 @@ void CFile::TryConvertIncbin()
|
||||
int data = ExtractData(buffer, offset, size);
|
||||
offset += size;
|
||||
|
||||
if (isSigned)
|
||||
if (isRGB)
|
||||
std::printf("{%uu, %uu, %uu, %uu},", (data & 0xFF), (data & 0xFF00) >> 8, (data & 0xFF0000) >> 16, (data & 0xFF000000) >> 24);
|
||||
else if (isSigned)
|
||||
std::printf("%d,", data);
|
||||
else
|
||||
std::printf("%uu,", data);
|
||||
@@ -429,13 +443,14 @@ void CFile::TryConvertIncbin()
|
||||
|
||||
m_pos++;
|
||||
}
|
||||
|
||||
|
||||
if (m_buffer[m_pos] != ')')
|
||||
RaiseError("expected ')'");
|
||||
|
||||
m_pos++;
|
||||
|
||||
std::printf("}");
|
||||
if (!isRGB)
|
||||
std::printf("}");
|
||||
}
|
||||
|
||||
// Reports a diagnostic message.
|
||||
|
||||
@@ -213,10 +213,10 @@ void CFile::CheckIncbin()
|
||||
return;
|
||||
}
|
||||
|
||||
std::string idents[6] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32" };
|
||||
std::string idents[7] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32", "INCBIN_RGB" };
|
||||
int incbinType = -1;
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (CheckIdentifier(idents[i]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user