Commit Graph

465 Commits

Author SHA1 Message Date
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
Antonio Niño Díaz
ec72c4080d examples: Add example of new process functions with arguments 2023-11-17 00:46:40 +01:00
Antonio Niño Díaz
88e222c756 library: Add new process functions that can take arguments
The functions called by NE_Process() and NE_ProcessDual() rely on global
data to know what to draw on the screen.

The functions called by the new NE_ProcessArg() and NE_ProcessDualArg()
can take arguments passed from the caller of the process function. This way
it isn't needed to have global variables.
2023-11-17 00:46:23 +01:00
Antonio Niño Díaz
bbe064db63 docs: Update changelog 2023-11-12 01:27:38 +00:00
Antonio Niño Díaz
dfb5422710 docs: library: Update version number to 0.9.1 2023-11-12 01:27:31 +00:00
Antonio Niño Díaz
056042cd31 library: Check for errors properly in FAT functions 2023-11-12 01:23:51 +00:00
Antonio Niño Díaz
334c1aa9ab library: Fix fseek() by changing the fopen() mode
fseek() seems to fail when the file is open in "rb+" mode. However,
there is no reason to use this mode, and "rb" is enough.
2023-11-12 01:23:48 +00:00
Antonio Niño Díaz
95e6a16a89 library: Fix FAT load function
"rb+" isn't required, "rb" is more correct.

Also, it is important to check the result of fread().
2023-11-11 18:34:21 +00:00
Antonio Niño Díaz
a4c1b40c7a build: Update makefiles of BlocksDS 2023-11-11 18:00:41 +00:00
Antonio Niño Díaz
6408190477 chore: Fix a Doxygen comment 2023-10-19 02:04:55 +01:00
Antonio Niño Díaz
88a1e20393 docs: Update changelog and definitions for version 0.9.0 2023-10-19 01:49:39 +01:00
Antonio Niño Díaz
98995f4561 docs: Document all Dual 3D modes
Documentation extracted from my blog:

http://www.skylyrac.net/2023-10-12-dual-screen-3d-on-nds.html
2023-10-18 22:29:17 +01:00
Antonio Niño Díaz
48e013f815 library: Use safe DMA functions in BlocksDS
They aren't available in the libnds provided by devkitPro. I could copy
the safe versions of the functions to Nitro Engine, but that wouldn't
help as the program would still use the unsafe versions for everything
else outside of Nitro Engine. The fix needs to happen in libnds for it
to work.
2023-10-16 02:55:39 +01:00
Antonio Niño Díaz
01b8a9cf9a library: Fix dual 3D DMA mode in BlocksDS
The fork of libnds of BlocksDS doesn't leave 32 unused characters right
at the beginning of the tileset of the debug console. The code used to
rely on this space being free to store there the first line of a 16-bit
bitmap.

The line has been moved to an actual free part of the VRAM bank.
2023-10-16 02:24:14 +01:00
Antonio Niño Díaz
06ac0eba5b tests: Show that the LCD uses 18-bit colors, not 15-bit 2023-10-16 02:24:10 +01:00
Antonio Niño Díaz
8c323c7e2c library: Document VRAM overlap in dual 3D DMA Mode 2023-10-12 21:11:12 +01:00
Antonio Niño Díaz
53a66ae746 library: Add comment about console setup in dual 3D DMA mode 2023-10-12 19:59:39 +01:00
Antonio Niño Díaz
166cf29986 library: Add synchronization to NE initialization
This should fix issues in dual 3D mode where the output of each screen
was switched at boot, and it changes after a framerate drop (like when
loading assets).
2023-10-11 18:18:10 +01:00
Antonio Niño Díaz
5cd0909b5c examples: Add example to compare all dual 3D modes 2023-10-10 01:13:34 +01:00
Antonio Niño Díaz
8445136b6b library: Implement another dual 3D Mode
This one is also stable, but it doesn't support the debug console.
2023-10-10 01:02:45 +01:00