tests: Use grit instead of img2ds

This commit is contained in:
Antonio Niño Díaz 2024-01-27 18:36:14 +00:00
parent 1c58dd09ed
commit 83928fd8aa
8 changed files with 11 additions and 18 deletions

View File

@ -23,8 +23,8 @@ TARGET := $(shell basename $(CURDIR))
BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
DATA :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,6 @@
BINDIRS := data
# This is a minimal makefile only used for the examples. If you want a makefile
# for your project, take one from the templates inside examples/templates.
GFXDIRS := graphics
include ../../examples/Makefile.example.blocksds

View File

@ -1,11 +0,0 @@
#!/bin/sh
NITRO_ENGINE=$DEVKITPRO/nitro-engine
TOOLS=$NITRO_ENGINE/tools
IMG2DS=$TOOLS/img2ds/img2ds.py
python3 $IMG2DS \
--input $NITRO_ENGINE/examples/assets/a3pal32.png \
--name a3pal32 \
--output data \
--format A3PAL32

View File

@ -0,0 +1,2 @@
# 3 bits of alpha, 5 bits of color index
-gx -gb -gBa3i5 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -6,8 +6,7 @@
#include <NEMain.h>
#include "a3pal32_pal_bin.h"
#include "a3pal32_tex_bin.h"
#include "a3pal32.h"
#define NUM_CLONES 5
@ -39,8 +38,8 @@ int main(void)
NE_MaterialTexLoad(Material[0],
NE_A3PAL32, // Texture type
64, 200, // Width, height (in pixels)
NE_TEXGEN_TEXCOORD, (u8 *)a3pal32_tex_bin);
NE_PaletteLoad(Palette, (u16 *)a3pal32_pal_bin, 32, NE_A3PAL32);
NE_TEXGEN_TEXCOORD, a3pal32Bitmap);
NE_PaletteLoad(Palette, a3pal32Pal, 32, NE_A3PAL32);
NE_MaterialSetPalette(Material[0], Palette);
for (int i = 1; i < NUM_CLONES; i++)