examples: Stop using img2ds and switch to grit

img2ds is still required for the clear bitmap example because grit doesn't
support the clear depth format.
This commit is contained in:
Antonio Niño Díaz 2024-01-27 16:21:05 +00:00
parent c8324ca1b9
commit c037b79af4
166 changed files with 225 additions and 754 deletions

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -4,18 +4,11 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $OBJ2DL \
--input $ASSETS/sphere.obj \
--output data/sphere.bin \
--texture 256 256
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output data \
--format A1RGB5

View File

@ -0,0 +1,2 @@
# 16-bit palette, no transparency
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -6,7 +6,7 @@
#include <NEMain.h>
#include "texture_tex_bin.h"
#include "texture.h"
#include "sphere_bin.h"
NE_Camera *Camera;
@ -60,7 +60,7 @@ int main(void)
// Load texture
NE_MaterialTexLoad(Material, NE_RGB5, 256, 256, NE_TEXGEN_TEXCOORD,
(u8 *)texture_tex_bin);
textureBitmap);
// Assign the same material to every model object.
NE_ModelSetMaterial(Model, Material);

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -4,8 +4,8 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $OBJ2DL \
@ -13,9 +13,3 @@ python3 $OBJ2DL \
--output data/teapot.bin \
--texture 256 256 \
--scale 0.1
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name teapot \
--output data \
--format A1RGB5

View File

@ -0,0 +1,2 @@
# 16-bit palette, no transparency
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -7,7 +7,7 @@
#include <NEMain.h>
#include "teapot_bin.h"
#include "teapot_tex_bin.h"
#include "teapot.h"
NE_Camera *Camera;
NE_Model *Model;
@ -58,7 +58,7 @@ int main(void)
// Load teapot from RAM and assign it to a material
NE_MaterialTexLoad(Material, NE_RGB5, 256, 256,
NE_TEXGEN_TEXCOORD | NE_TEXTURE_WRAP_S | NE_TEXTURE_WRAP_T,
(u8 *)teapot_tex_bin);
teapotBitmap);
// Assign material to the model
NE_ModelSetMaterial(Model, Material);

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -4,8 +4,8 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $OBJ2DL \
@ -13,9 +13,3 @@ python3 $OBJ2DL \
--output data/teapot.bin \
--texture 256 256 \
--scale 0.1
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name teapot \
--output data \
--format A1RGB5

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
# 16-bit palette, no transparency
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -6,9 +6,9 @@
#include <NEMain.h>
// Files autogenerated from bin files inside of the folder data
// Files autogenerated from bin files inside of the data and graphics folders.
#include "teapot_bin.h"
#include "teapot_tex_bin.h"
#include "teapot.h"
NE_Camera *Camera;
NE_Model *ModelSpecular, *ModelDiffuse;
@ -70,7 +70,7 @@ int main(void)
// outside of [0.0, 1.0], so it is needed to enable wrapping.
NE_MaterialTexLoad(MaterialSpecular, NE_A1RGB5, 256, 256,
NE_TEXGEN_TEXCOORD | NE_TEXTURE_WRAP_S | NE_TEXTURE_WRAP_T,
(u8 *)teapot_tex_bin);
teapotBitmap);
NE_MaterialClone(MaterialSpecular, MaterialDiffuse);
NE_ModelSetMaterial(ModelSpecular, MaterialSpecular);

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -4,8 +4,8 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
MD5_TO_DSMA=$TOOLS/md5_to_dsma/md5_to_dsma.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $MD5_TO_DSMA \
@ -17,9 +17,3 @@ python3 $MD5_TO_DSMA \
--skip-frames 1 \
--bin \
--blender-fix
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output data \
--format A1RGB5

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
# 16 bit texture bitmap, force alpha bit to 1
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -8,7 +8,7 @@
#include "robot_dsm_bin.h"
#include "robot_wave_dsa_bin.h"
#include "texture_tex_bin.h"
#include "texture.h"
NE_Camera *Camera;
NE_Model *Model;
@ -49,7 +49,7 @@ int main(void)
Texture = NE_MaterialCreate();
NE_MaterialTexLoad(Texture, NE_A1RGB5, 256, 256, NE_TEXGEN_TEXCOORD,
(void *)texture_tex_bin);
textureBitmap);
NE_ModelSetMaterial(Model, Texture);

View File

@ -4,8 +4,9 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
MD5_TO_DSMA=$TOOLS/md5_to_dsma/md5_to_dsma.py
IMG2DS=$TOOLS/img2ds/img2ds.py
GRIT=grit
rm -rf nitrofiles
mkdir -p nitrofiles
python3 $MD5_TO_DSMA \
@ -17,8 +18,7 @@ python3 $MD5_TO_DSMA \
--skip-frames 1 \
--blender-fix
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output nitrofiles \
--format A1RGB5
$GRIT \
graphics/texture.png \
-ftb -fh! -W1 \
-onitrofiles/texture

View File

@ -0,0 +1,2 @@
# 16 bit texture bitmap, force alpha bit to 1
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -0,0 +1,25 @@
//{{BLOCK(texture)
//======================================================================
//
// texture, 256x256@16,
// Alphabit on.
// + bitmap not compressed
// Total size: 131072 = 131072
//
// Time-stamp: 2024-01-27, 18:07:12
// Exported by Cearn's GBA Image Transmogrifier, v0.9.2
// ( http://www.coranac.com/projects/#grit )
//
//======================================================================
#ifndef GRIT_TEXTURE_H
#define GRIT_TEXTURE_H
#define textureBitmapLen 131072
extern const unsigned int textureBitmap[32768];
#endif // GRIT_TEXTURE_H
//}}BLOCK(texture)

File diff suppressed because one or more lines are too long

View File

@ -81,7 +81,7 @@ int main(void)
}
if (NE_MaterialTexLoadFAT(Material, NE_A1RGB5, 256, 256, NE_TEXGEN_TEXCOORD,
"texture_tex.bin") == 0)
"texture.img.bin") == 0)
{
printf("Couldn't load texture...");
WaitLoop();

View File

@ -3,9 +3,10 @@
NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
IMG2DS=$TOOLS/img2ds/img2ds.py
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
GRIT=grit
rm -rf nitrofiles
mkdir -p nitrofiles
python3 $OBJ2DL \
@ -13,14 +14,12 @@ python3 $OBJ2DL \
--output nitrofiles/cube.bin \
--texture 64 64
python3 $IMG2DS \
--input $ASSETS/spiral_blue_pal32.png \
--name spiral_blue_pal32 \
--output nitrofiles \
--format A3PAL32
$GRIT \
graphics/spiral_blue_pal32.png \
-ftb -fh! -W1 \
-onitrofiles/spiral_blue_pal32
python3 $IMG2DS \
--input $ASSETS/spiral_red_pal32.png \
--name spiral_red_pal32 \
--output nitrofiles \
--format A3PAL32
$GRIT \
graphics/spiral_red_pal32.png \
-ftb -fh! -W1 \
-onitrofiles/spiral_red_pal32

View File

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

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

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

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1 +0,0 @@
,$08<<@@4(8DH@D<@D4

View File

@ -65,12 +65,12 @@ int main(void)
NE_ModelLoadStaticMeshFAT(Model, "cube.bin");
NE_MaterialTexLoadFAT(MaterialBlue, NE_A3PAL32, 64, 64, NE_TEXGEN_TEXCOORD,
"spiral_blue_pal32_tex.bin");
"spiral_blue_pal32.img.bin");
NE_MaterialTexLoadFAT(MaterialRed, NE_A3PAL32, 64, 64, NE_TEXGEN_TEXCOORD,
"spiral_red_pal32_tex.bin");
"spiral_red_pal32.img.bin");
NE_PaletteLoadFAT(PaletteBlue, "spiral_blue_pal32_pal.bin", NE_A3PAL32);
NE_PaletteLoadFAT(PaletteRed, "spiral_red_pal32_pal.bin", NE_A3PAL32);
NE_PaletteLoadFAT(PaletteBlue, "spiral_blue_pal32.pal.bin", NE_A3PAL32);
NE_PaletteLoadFAT(PaletteRed, "spiral_red_pal32.pal.bin", NE_A3PAL32);
NE_MaterialSetPalette(MaterialBlue, PaletteBlue);
NE_MaterialSetPalette(MaterialRed, PaletteRed);

View File

@ -4,8 +4,9 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
IMG2DS=$TOOLS/img2ds/img2ds.py
GRIT=grit
rm -rf nitrofiles
mkdir -p nitrofiles
python3 $OBJ2DL \
@ -13,8 +14,7 @@ python3 $OBJ2DL \
--output nitrofiles/robot.bin \
--texture 256 256
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output nitrofiles \
--format A1RGB5
$GRIT \
graphics/texture.png \
-ftb -fh! -W1 \
-onitrofiles/texture

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
# 16 bit texture bitmap, force alpha bit to 1
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -0,0 +1,25 @@
//{{BLOCK(texture)
//======================================================================
//
// texture, 256x256@16,
// Alphabit on.
// + bitmap not compressed
// Total size: 131072 = 131072
//
// Time-stamp: 2024-01-27, 18:13:28
// Exported by Cearn's GBA Image Transmogrifier, v0.9.2
// ( http://www.coranac.com/projects/#grit )
//
//======================================================================
#ifndef GRIT_TEXTURE_H
#define GRIT_TEXTURE_H
#define textureBitmapLen 131072
extern const unsigned int textureBitmap[32768];
#endif // GRIT_TEXTURE_H
//}}BLOCK(texture)

File diff suppressed because one or more lines are too long

View File

@ -62,7 +62,7 @@ int main(void)
NE_ModelLoadStaticMeshFAT(Model, "robot.bin");
// Load a RGB texture from RAM and assign it to "Material".
NE_MaterialTexLoadFAT(Material, NE_RGB5, 256, 256, NE_TEXGEN_TEXCOORD,
"texture_tex.bin");
"texture.img.bin");
// Assign texture to model...
NE_ModelSetMaterial(Model, Material);

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,3 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

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

View File

@ -1 +0,0 @@
<EFBFBD><05><03>Aj\

View File

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

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,2 @@
# 4 color palette
-gx -gb -gB2 -gTFF00FF

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -6,10 +6,8 @@
#include <NEMain.h>
#include "a3pal32_pal_bin.h"
#include "a3pal32_tex_bin.h"
#include "pal4_pal_bin.h"
#include "pal4_tex_bin.h"
#include "a3pal32.h"
#include "pal4.h"
NE_Material *Material, *Material2;
NE_Palette *Palette, *Palette2;
@ -59,8 +57,8 @@ int main(void)
NE_MaterialTexLoad(Material,
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, Palette);
// Allocate objects for another material
@ -68,8 +66,8 @@ int main(void)
Palette2 = NE_PaletteCreate();
NE_MaterialTexLoad(Material2, NE_PAL4, 64, 100, NE_TEXGEN_TEXCOORD,
(u8 *)pal4_tex_bin);
NE_PaletteLoad(Palette2, (u16 *)pal4_pal_bin, 4, NE_PAL4);
pal4Bitmap);
NE_PaletteLoad(Palette2, pal4Pal, 4, NE_PAL4);
NE_MaterialSetPalette(Material2, Palette2);
while (1)

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -4,8 +4,8 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $OBJ2DL \
@ -13,9 +13,3 @@ python3 $OBJ2DL \
--output data/sphere_vertex_colors.bin \
--texture 256 256 \
--use-vertex-color
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output data \
--format A1RGB5

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
# 16 bit texture bitmap, force alpha bit to 1
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -7,7 +7,7 @@
#include <NEMain.h>
#include "sphere_vertex_colors_bin.h"
#include "texture_tex_bin.h"
#include "texture.h"
NE_Camera *Camera;
NE_Model *Model;
@ -48,7 +48,7 @@ int main(void)
NE_ModelLoadStaticMesh(Model, (u32 *)sphere_vertex_colors_bin);
// Load a RGB texture from RAM and assign it to "Material".
NE_MaterialTexLoad(Material, NE_RGB5, 256, 256, NE_TEXGEN_TEXCOORD,
(u8 *)texture_tex_bin);
textureBitmap);
// Assign texture to model...
NE_ModelSetMaterial(Model, Material);

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,3 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

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

View File

@ -1 +0,0 @@
ÝË¿Â!Ý  I<fd

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -6,11 +6,8 @@
#include <NEMain.h>
#include "a5pal8_tex_bin.h"
#include "a5pal8_pal_bin.h"
#include "a3pal32_tex_bin.h"
#include "a3pal32_pal_bin.h"
#include "a5pal8.h"
#include "a3pal32.h"
NE_Material *Material1, *Material2;
NE_Palette *Palette1, *Palette2;
@ -51,14 +48,14 @@ int main(void)
// Load part of the texture ignoring some of its height. You can't do
// this with width because of how textures are laid out in VRAM.
NE_MaterialTexLoad(Material1, NE_A3PAL32, 256, 192, NE_TEXGEN_TEXCOORD,
(u8 *)a3pal32_tex_bin);
a3pal32Bitmap);
// Load complete texture
NE_MaterialTexLoad(Material2, NE_A5PAL8, 256, 256, NE_TEXGEN_TEXCOORD,
(u8 *)a5pal8_tex_bin);
a5pal8Bitmap);
NE_PaletteLoad(Palette1, (u16 *)a3pal32_pal_bin, 32, NE_A3PAL32);
NE_PaletteLoad(Palette2, (u16 *)a5pal8_pal_bin, 32, NE_A5PAL8);
NE_PaletteLoad(Palette1, a3pal32Pal, 32, NE_A3PAL32);
NE_PaletteLoad(Palette2, a5pal8Pal, 32, NE_A5PAL8);
NE_MaterialSetPalette(Material1, Palette1);
NE_MaterialSetPalette(Material2, Palette2);

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -4,17 +4,11 @@ NITRO_ENGINE=$DEVKITPRO/nitro-engine
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $OBJ2DL \
--input $ASSETS/robot/robot.obj \
--output data/robot.bin \
--texture 256 256
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output data \
--format A1RGB5

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
# 16-bit palette, no transparency
-gx -gb -gB16 -gT!

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -17,7 +17,7 @@
// NE_ModelLoadStaticMesh(Model, (u32 *)binfilename_bin);
//
#include "robot_bin.h"
#include "texture_tex_bin.h"
#include "texture.h"
NE_Camera *Camera;
NE_Model *Model;
@ -58,7 +58,7 @@ int main(void)
NE_ModelLoadStaticMesh(Model, (u32 *)robot_bin);
// Load a RGB texture from RAM and assign it to "Material".
NE_MaterialTexLoad(Material, NE_RGB5, 256, 256, NE_TEXGEN_TEXCOORD,
(u8 *)texture_tex_bin);
textureBitmap);
// Assign texture to model...
NE_ModelSetMaterial(Model, Material);

View File

@ -24,7 +24,7 @@ BUILD := build
SOURCES := source
INCLUDES := include
DATA := data
GRAPHICS :=
GRAPHICS := graphics
AUDIO :=
ICON :=

View File

@ -1,3 +1,4 @@
BINDIRS := data
GFXDIRS := graphics
include ../../Makefile.example.blocksds

View File

@ -5,8 +5,8 @@ ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
MD5_TO_DSMA=$TOOLS/md5_to_dsma/md5_to_dsma.py
IMG2DS=$TOOLS/img2ds/img2ds.py
rm -rf data
mkdir -p data
python3 $MD5_TO_DSMA \
@ -18,9 +18,3 @@ python3 $MD5_TO_DSMA \
--skip-frames 1 \
--bin \
--blender-fix
python3 $IMG2DS \
--input $ASSETS/teapot.png \
--name texture \
--output data \
--format A1RGB5

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
# 16-bit palette, no transparency
-gx -gb -gB16 -gT!

Some files were not shown because too many files have changed in this diff Show More