Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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
142e1662b6 examples: Clarify Texel 4x4 format example 2024-01-21 17:00:57 +00:00
Antonio Niño Díaz
1acfca1a24 examples: Wait for VBL in the right place
This change is a bit pedantic, but it makes the ROMs run better in
DeSmuMe.

Some examples (particularly the dual 3D examples) used to flicker during
one or two seconds right after starting. In dual 3D examples the top and
bottom screen would start swapped, and they would eventually swap and
stop flickering. This would never happen in melonDS or real hardware.

I suspect this is because of the interaction between GFX_FLUSH and
swiWaitForVBlank(), where there would be some timing difference to reach
the first swiWaitForVBlank() or GFX_FLUSH, and that caused the desync.

This commit moves swiWaitForVBlank() to the beginning of the game loop.
This means that, even in the first iteration of the game loop, all
emulators and hardware will be synchronized. This doesn't actually
matter in any other situation, it just makes the first iteration
consistent.
2023-01-21 19:32:02 +00:00
Antonio Niño Díaz
7b9b119f73 examples: Add example of loading compressed textures 2022-10-31 02:18:02 +00:00