Commit Graph

384 Commits

Author SHA1 Message Date
Antonio Niño Díaz
c0d41eabff doc: library: Increase version to 0.11.0 2024-03-02 14:21:47 +00:00
Antonio Niño Díaz
9c62fbf0f2 docs: Update changelog 2024-03-02 13:20:53 +00:00
Antonio Niño Díaz
9c3bb283cc library: Add note to old text system 2024-03-02 13:14:45 +00:00
Antonio Niño Díaz
3e6af44b1b examples: Move old text example to text folder 2024-03-02 13:13:28 +00:00
Antonio Niño Díaz
9fd31b81ad examples: Add example of using rich text from NitroFS 2024-03-02 13:13:28 +00:00
Antonio Niño Díaz
50e14b2c21 library: Add rich text support
This support relies on BMFont: https://www.angelcode.com/products/bmfont/

Nitro Engine doesn't support that format directly. Instead, it uses
LibDSF internally: https://github.com/AntonioND/libdsf
2024-03-02 13:07:44 +00:00
Antonio Niño Díaz
951f0f87ca library: Support autodeleting palettes
In many cases the developer doesn't want to keep track of palettes and
materials as two different objects. This is only required if a palette
needs to be shared between multiple materials.

In cases where there a palette is only used by one material, this new
function can be used so that the developer doesn't need to keep track of
the palette object, only the material.
2024-03-02 12:42:31 +00:00
Antonio Niño Díaz
e7fc9f8203 library: Silence warnings of unused variables 2024-03-02 12:42:08 +00:00
Antonio Niño Díaz
a7f8353bac library: Set sprite size to the texture size it is assigned
What most people will want to do is to draw sprites with the same size as
the texture, so do that by default.
2024-02-28 02:50:29 +00:00
Antonio Niño Díaz
3af40682cb examples: Don't print text when using dual 3D FB mode
When using dual 3D DMA mode the console is setup to use memory in the
middle of SUB background VRAM. This is what holds the text that you can see
on the screen.

When switching to FB mode, the console is never reconfigured (when
switching to regular dual 3D mode it is reconfigured). This means that any
printf will write to the middle of background VRAM, which is used as
framebuffer. This will manifest itself as a blue horizontal line in the
middle of the screen.

This patch fixes the examples to not print text when using FB mode.
2024-02-18 01:42:01 +00:00
Antonio Niño Díaz
b00a4f29b8 library: Refactor sprite setup in dual 3D modes
Instead of allocating the buffer permanently, only allocate it while the
sprites are setup. Then, free the buffer.

Also, the cache needs to be flushed before doing a DMA copy. This used to
cause black squares on the screen because of some sprite attributes not
being properly copied to OAM.
2024-02-18 01:22:23 +00:00
Antonio Niño Díaz
25fc0bcff3 library: Update usage of GRF libnds functions 2024-02-15 17:49:50 +00:00
Antonio Niño Díaz
83dd805fe8 examples: library: docs: Fix "properties" typo everywhere
Function names have also been changed, but this patch adds defines to
preserve compatibility with old names for the time being.
2024-02-05 01:45:14 +00:00
Antonio Niño Díaz
4d0066465e docs: library: Update version to 0.10.0 2024-01-28 02:35:35 +00:00
Antonio Niño Díaz
91abea3e87 tests: Fix build of LCD depth test example 2024-01-28 02:35:35 +00:00
Antonio Niño Díaz
a44073e9ce examples: Fix makefile not handling defines correctly 2024-01-28 01:59:05 +00:00
Antonio Niño Díaz
cf12e3d51d img2ds: Add another deprecation notice 2024-01-28 01:44:50 +00:00
Antonio Niño Díaz
441997c50c examples: Remove unused files in NFlib template 2024-01-27 19:47:12 +00:00
Antonio Niño Díaz
d432916f0a examples: Simplify GRF loading example 2024-01-27 19:43:27 +00:00
Antonio Niño Díaz
488f5c7d8f library: Small style fixes 2024-01-27 19:34:15 +00:00
Antonio Niño Díaz
33f9bd4416 examples: Remove unneeded casts
They were needed in older versions of Nitro Engine, but now the functions
that take data arrays expect a void pointer, so casts are not needed.
2024-01-27 19:33:56 +00:00
Antonio Niño Díaz
9ce79478e0 img2ds: Update readme to mention img2ds is deprecated 2024-01-27 18:41:59 +00:00
Antonio Niño Díaz
1a29d63a6d img2ds: Deprecate tool for regular textures
It's unlikely this tool will be removed from the repository, but it's no
longer going to be maintained now that the version of grit included in
BlocksDS has had a few bugs related to NDS textures fixed.

The main purpose for img2ds was to eventually support compressed
textures, but ptexconv already does a good job at it.
2024-01-27 18:39:42 +00:00
Antonio Niño Díaz
83928fd8aa tests: Use grit instead of img2ds 2024-01-27 18:36:14 +00:00
Antonio Niño Díaz
1c58dd09ed docs: Update readme 2024-01-27 18:33:03 +00:00
Antonio Niño Díaz
55a53a91dc examples: Add warnings to BlocksDS makefiles 2024-01-27 18:31:17 +00:00
Antonio Niño Díaz
c037b79af4 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.
2024-01-27 18:25:38 +00:00
Antonio Niño Díaz
c8324ca1b9 examples: Migrate 2D examples to grit 2024-01-27 03:35:03 +00:00
Antonio Niño Díaz
1d0b3058aa examples: Add example of loading GRF files 2024-01-25 18:28:13 +00:00
Antonio Niño Díaz
8e6d64d2d9 library: Disable GRF loading function outside of BlocksDS
This isn't supported in devkitPro.
2024-01-25 18:28:07 +00:00
Antonio Niño Díaz
640d2441f6 library: Add helper to load textures in GRF format 2024-01-25 02:42:38 +00:00
Antonio Niño Díaz
fb503d5972 library: Add deprecation notice 2024-01-25 02:05:24 +00:00
Antonio Niño Díaz
5fbe47c7fc examples: Refactor compressed texture example
Add PNG files that get converted to the binary data used by the NDS ROM.
2024-01-22 02:28:51 +00:00
Antonio Niño Díaz
a57af044f4 library: Make some pointers void and const
It doesn't make sense to use other types because the modified functions
treat the data as a constant binary blob.
2024-01-22 02:26:57 +00:00
Antonio Niño Díaz
142e1662b6 examples: Clarify Texel 4x4 format example 2024-01-21 17:00:57 +00:00
Antonio Niño Díaz
65b4eb55a3 library: Add alternate functions to load Texel 4x4 textures
They can be used to load textures where the 3 chunks are stored as
different files.
2024-01-21 17:00:12 +00:00
Antonio Niño Díaz
0a7db208da docs: Update doxyfile 2024-01-21 16:20:22 +00:00
Antonio Niño Díaz
bacb1d1811 chore: Remove comments about NE_PolyEnd() being ignored
It's not 100% clear that the command is ignored. It's better to remove
the comments unless we're completely sure about it.
2024-01-10 19:28:13 +00:00
Antonio Niño Díaz
eca99150c4 examples: Add simple example of loading models from nitroFS 2024-01-03 00:52:33 +01:00
Antonio Niño Díaz
9a5c6dfa67 library: Use NULL insted of 0 for clarity 2024-01-02 02:49:13 +01:00
Antonio Niño Díaz
e6e27fed0a library: Remove unnecessary DC_FlushAll()
The buffer that is passed to fwrite() is written by the CPU, not by DMA.
It isn't needed to do anything to the cache.
2024-01-02 01:10:42 +01:00
Antonio Niño Díaz
36957b04ab library: Add warning about screenshot function 2024-01-02 01:09:18 +01:00
Antonio Niño Díaz
53a382e8ac build: Update BlocksDS makefile 2024-01-02 01:08:10 +01:00
Antonio Niño Díaz
f885f25bfb tools: Clarify some comments 2024-01-01 03:50:16 +01:00
Antonio Niño Díaz
2ec91e1100 examples: Add missing include 2024-01-01 03:35:34 +01:00
Antonio Niño Díaz
d03ccfddd5 obj2dl: Fix vertical texture coordinate 2024-01-01 03:35:25 +01:00
Antonio Niño Díaz
2d7a71a056 build: Install tools to BlocksDS directory 2023-12-31 02:09:00 +01:00
Antonio Niño Díaz
7cd5d3999c obj2dl: Improve error message 2023-12-26 23:52:55 +01:00
Antonio Niño Díaz
76dc2f9901 library: Make some small functions static inline 2023-11-17 01:00:40 +01:00
Antonio Niño Díaz
6fde18d712 library: examples: Use stdint.h types 2023-11-17 01:00:40 +01:00