Commit Graph

425 Commits

Author SHA1 Message Date
Antonio Niño Díaz
3ba35ba48e docs: build: library: examples: Set BlocksDS as main toolchain
Until now the main makefiles of Nitro Engine have been the ones of
devkitPro, forcing users to go through extra steps to build everything
under BlocksDS.

Now, the easy makefiles are the BlocksDS ones, and additional notes have
been added to warn about the limitations of devkitPro:

- No GRF support in libnds.
- NitroFS doesn't work in melonDS.
2024-06-02 17:38:52 +01:00
Antonio Niño Díaz
381e4071ac tools: Update md5_2_dsma
This fixes a bug where the base animation of the model (its standing pose)
would be exported with the wrong extension.
2024-06-02 12:08:08 +01:00
Antonio Niño Díaz
ccb3739f98 docs: Add note about ArchitectDS to the readme 2024-06-01 02:03:38 +01:00
Antonio Niño Díaz
230a65541e docs: Remove version from readme
This gets out of date easily and it isn't that useful anyway.
2024-04-09 01:53:49 +01:00
Antonio Niño Díaz
7dda3abe54 docs: Update changelog 2024-03-30 11:41:28 +00:00
Antonio Niño Díaz
3f3e266a4f library: Implement priority setting functions in RichText
This reverts commit 48ff37231f ("library: Remove unimplemented
functions from RichText system").

I thought the 3D drawing functions took a "depth" argument, but I was
wrong. I'm re-introducing the functions (and, this time, with an actual
implementation).
2024-03-30 00:34:39 +00:00
Antonio Niño Díaz
5ce71a9b02 library: Add function to calculate rendered text size
This simply exposes DSF_StringRenderDryRun() in a way that can be easily
used with Nitro Engine.
2024-03-29 22:21:22 +00:00
Antonio Niño Díaz
12b7389d1f examples: Remove asset from example that doesn't use it 2024-03-29 19:39:12 +00:00
Antonio Niño Díaz
48ff37231f library: Remove unimplemented functions from RichText system
They were never meant to be there, they are a copy-paste error from taking
the code of the original text system to create the original files of the
rich text system.
2024-03-29 14:56:55 +00:00
William
ff734036fc
fix: NE_RichTextMetadataLoadFAT returning error code on success 2024-03-28 14:19:30 +00:00
Antonio Niño Díaz
d7ecc5cc4d templates: examples: Fix linker invocation for C++
Using g++ to link object files automatically links the STD of C++. It looks
like this library is linked outside of the start/end-group commands with
the other libraries, which causes undefined reference errors when linking
C++ projects that use standard library functions that interface with the
OS, like `fopen()`.

Thanks to @lifehackerhansol for the report and testing the fix.
2024-03-26 18:54:35 +00:00
Antonio Niño Díaz
5ea29c4f81 docs: Update sprites screenshot in readme 2024-03-24 16:52:19 +00:00
Antonio Niño Díaz
b40f67c593 examples: Improve sprites example 2024-03-24 16:50:51 +00:00
Antonio Niño Díaz
8cb10264bb library: Support setting texture coordinates in sprites
This allows you to use one single texture for multiple images, and to
specify the coordinates that a sprite needs to use so that you don't need
to keep track of them.
2024-03-24 16:14:21 +00:00
Antonio Niño Díaz
cf1a3c48e2 library: Fix build on devkitARM 2024-03-20 23:42:15 +00:00
Antonio Niño Díaz
b0d9151455 library: Build some functions as ARM to increase performance
Using `mulf32()` while compiling functions to Thumb makes the compiler
add calls to `__aeabi_lmul()` once per multiplication. This routine is
quite slow, so the cost of any function that uses `mulf32()` a lot is
quite high.

Switching math-heavy functions to ARM increases performance and reduces
code size.
2024-03-16 03:04:02 +01:00
Antonio Niño Díaz
82171bbf69 chore: Simplify copyright years in notices
Instead of listing every individual year, keep only the first and last
years.
2024-03-09 01:42:29 +00:00
Antonio Niño Díaz
47c8061168 examples: test: Refactor to avoid global variables
Using global variables is generally discouraged. Now that NE_ProcessArg()
and NE_ProcessDualArg() exist, it's better to show how to use them instead
of NE_Process() and NE_ProcessDual() while using global variables.

Also, switch from "int main(void)" to "int main(int argc, char *argv[])".
2024-03-08 18:44:02 +00:00
Antonio Niño Díaz
9f81541075 examples: Remove global variables from some examples 2024-03-08 02:43:18 +00:00
Antonio Niño Díaz
a06617a93f examples: Cleanup variables of 2D quads example 2024-03-08 02:43:18 +00:00
Antonio Niño Díaz
fc73687b79 docs: Update list of future work items 2024-03-07 02:41:06 +00:00
Antonio Niño Díaz
052a15b974 example: Stop using deprecated NE_ShadingEnabled() 2024-03-07 01:49:25 +00:00
Antonio Niño Díaz
bf63ddea8a examples: Remove unneeded calls to NE_ShadowEnable()
This function wasn't required for regular shading, but for toon shading.
2024-03-07 01:49:07 +00:00
Antonio Niño Díaz
636a7d73c3 library: Deprecate NE_ShadingEnable()
This has been replaced by NE_SetupToonShadingTables(), which is a more
sensible name.

A define has been added for compatibility.
2024-03-07 01:48:34 +00:00
Antonio Niño Díaz
521012d4d1 library: Add function to reset rich text system 2024-03-07 01:26:15 +00:00
Antonio Niño Díaz
15ce18b74c examples: Add example of loading rich text fonts from RAM 2024-03-07 01:22:36 +00:00
Antonio Niño Díaz
dd746c0ef5 library: Allow loading font bitmaps from RAM, not just the filesystem 2024-03-07 01:20:00 +00:00
Antonio Niño Díaz
a49ddecda7 examples: Fix incorrect comments 2024-03-06 23:05:28 +00:00
Antonio Niño Díaz
30ac9ab8e9 library: Don't expect palette objects when loading GRF files
Currently, if the user wants to load a GRF file with a palette, the
function NE_MaterialTexLoadGRF() will fail unless it is provided a palette
object.

With this change, if a palette object isn't provided, it will be created
and marked for automatic deletion when the material is deleted.
2024-03-06 22:17:49 +00:00
Antonio Niño Díaz
edf4457d49 examples: Fix typo 2024-03-06 22:02:30 +00:00
Antonio Niño Díaz
e952990ae4 examples: Improve volumetric shadow example
The light in the dark room was too bright.
2024-03-06 21:41:11 +00:00
Antonio Niño Díaz
3273bd7333 examples: Fix comment 2024-03-06 21:41:11 +00:00
Antonio Niño Díaz
c22fa167e7 docs: Add shadow volume screenshot to readme 2024-03-06 21:41:11 +00:00
Antonio Niño Díaz
5a2b722128 examples: Add shadow volume example 2024-03-06 21:41:11 +00:00
Antonio Niño Díaz
227bffddc5 library: Fix compilation with devkitARM 2024-03-06 01:31:40 +00:00
Antonio Niño Díaz
a85b16284f library: Update libDSF to version 0.1.2 2024-03-05 01:55:19 +00:00
Antonio Niño Díaz
006bcf9d01 library: Add note about texture sizes for rich text 2024-03-03 19:59:49 +00:00
Antonio Niño Díaz
366a9532c1 libdsf: Update to version 0.1.1 2024-03-03 19:59:15 +00:00
Antonio Niño Díaz
719935647a library: Relicense libdsf under "Zlib OR MIT"
Nitro Engine and DSMA use the MIT license. This way everything can be used
under the MIT license.
2024-03-02 18:47:38 +00:00
Antonio Niño Díaz
e94ed5b4e3 docs: Add screenshot of text rendering to readme 2024-03-02 18:43:19 +00:00
Antonio Niño Díaz
935c06e296 library: Add note about the replacement character 2024-03-02 18:42:00 +00:00
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