Antonio Niño Díaz
6be1dfa154
examples: Add example of deleting 3D sprites
2023-06-05 22:21:05 +01:00
Antonio Niño Díaz
90287a7133
library: Simplify struct handling of 3D sprites
...
Only initialize the structure when a new sprite is created. The "inuse"
field of the struct is enough to disable it completely, and the state
is set to the default values when it is created again.
2023-06-05 21:27:13 +01:00
Antonio Niño Díaz
5c31f779c8
library: Small style fixes
2023-06-05 21:12:18 +01:00
Antonio Niño Díaz
e3fbe8dbec
examples: Turn some bitshifts into multiplications for clarity
2023-06-05 20:01:20 +01:00
Antonio Niño Díaz
33e9ba783e
library: Remove unused collision map fields
...
They don't have a palette.
2023-05-30 22:51:53 +01:00
Antonio Niño Díaz
aef2292857
library: Share most code that loads file from the filesystem
...
Instead of repeating the same code whenever a file needs to be loaded,
move it to a function.
2023-05-30 22:50:22 +01:00
Antonio Niño Díaz
ce24bbc52e
library: Small cleanup
2023-05-30 22:48:47 +01:00
Antonio Niño Díaz
e15a8402b5
library: Cleanup memory allocation
...
Only call calloc() if the buffer actually needs to be zeroed. For
buffers that are going to be filled right away, malloc() is faster.
2023-05-30 01:47:45 +01:00
Antonio Niño Díaz
039eda9343
library: Replace some shifts by multiplications and divisions
2023-05-30 01:37:01 +01:00
Antonio Niño Díaz
470c39d031
library: Add copyright notice
2023-05-29 23:25:36 +01:00
Antonio Niño Díaz
021a5a0048
library: Cleanup and translate the remaining source files
2023-05-29 23:15:53 +01:00
Antonio Niño Díaz
18fc4a63ba
library: Cleanup and translate more source files
2023-05-28 02:09:25 +01:00
Antonio Niño Díaz
0329934b90
library: Cleanup and translate some source files
2023-05-26 00:54:32 +01:00
Antonio Niño Díaz
0428b7a1ea
library: Translate file headers
2023-05-25 22:11:19 +01:00
Antonio Niño Díaz
5280f3fe64
library: Cleanup affine background source files
2023-05-25 21:56:27 +01:00
Antonio Niño Díaz
89c6c00f9a
docs: Fix note in readme
2023-05-25 02:00:51 +01:00
Antonio Niño Díaz
6fc5d73d80
library: Cleanup and translate some source files
2023-05-25 02:00:31 +01:00
Antonio Niño Díaz
2f13ecd7b8
library: Cleanup and translate 256 color sprite module
2023-05-24 02:53:36 +01:00
Antonio Niño Díaz
e1506cc74f
library: Cleanup of types
...
Types like u8 and u16 aren't always a good idea. For example:
void function(u8 x, u8 y)
{
u32 value = (x << 16) | y;
}
The left shift of x will overflow because x is 8 bits wide. It is better
to make both arguments 32 bit wide.
It may also cause the compiler to introduce bit masking operations at
the caller side because the caller doesn't know how the function
behaves internally.
In order to prevent this kind of issues, it's better to use 32 bit
variables unless there is a very good reason to use smaller types (like
in structs, to save RAM).
2023-05-24 02:53:36 +01:00
Antonio Niño Díaz
f9d6b71a40
library: Translate and cleanup more source files
2023-05-23 02:16:53 +01:00
Antonio Niño Díaz
5150862e16
library: Translate and cleanup more source files
2023-05-22 01:02:17 +01:00
Antonio Niño Díaz
08798c9260
docs: Clarify installation instructions on Windows
2023-05-21 23:08:48 +01:00
Antonio Niño Díaz
dc67afb8c9
library: Translate and cleanup some source files
2023-05-21 22:29:57 +01:00
Antonio Niño Díaz
c3d6122d95
library: Mark NF_Error as noreturn
2023-05-21 22:23:21 +01:00
Antonio Niño Díaz
0672158d1e
examples: Remove unused includes
2023-05-21 21:17:28 +01:00
Antonio Niño Díaz
18bb211e32
examples: Add missing makefile
2023-05-21 21:17:06 +01:00
Antonio Niño Díaz
892acee5fb
examples: Translate WiFi example messages to English
2023-05-21 21:15:43 +01:00
Antonio Niño Díaz
d923bbec50
examples: Translate asset and variable names to English
2023-05-21 21:11:40 +01:00
Antonio Niño Díaz
498a0a2464
examples: Cleanup and translate the remaining examples to English
2023-05-21 20:31:06 +01:00
Antonio Niño Díaz
4d4cb6ab8e
examples: Cleanup and translate more examples to English
2023-05-21 02:25:53 +01:00
Antonio Niño Díaz
af329f901a
examples: Fix potential tearing
...
The image needs to be switched during the vertical blanking period so
that no tearing is shown during the switch.
2023-05-21 00:56:06 +01:00
Antonio Niño Díaz
11b2717515
examples: Cleanup and translate more examples to English
2023-05-21 00:49:40 +01:00
Antonio Niño Díaz
c6d6883caf
examples: Cleanup and translate more examples to English
2023-05-20 18:42:39 +01:00
Antonio Niño Díaz
eb91123a9a
examples: Fix alpha configuration of 3dsprites/alpha
...
The backdrop needs to be added to the destination layers. If not,
transparent pixels in the backgrounds won't have correct alpha blending.
2023-05-20 12:44:56 +01:00
Antonio Niño Díaz
25511c82dd
examples: Cleanup and translate 3dprites/alpha to English
2023-05-20 12:44:11 +01:00
Antonio Niño Díaz
a097eb3762
examples: Update background scroll before copying frames
...
Copying a new frame to VRAM takes much longer than updating the scroll,
so it makes sense to update the scroll first as that is guaranteed to
always be fast.
2023-05-20 12:25:14 +01:00
Antonio Niño Díaz
6c221ffea1
examples: Cleanup and translate 3dprites/setlayer to English
2023-05-20 12:24:02 +01:00
Antonio Niño Díaz
b20bb1ca2c
examples: Cleanup and translate more examples to English
2023-05-20 02:43:19 +01:00
Antonio Niño Díaz
fa21c62ac4
examples: Cleanup and translate more examples to English
2023-05-19 02:17:59 +01:00
Antonio Niño Díaz
2b4aab4ba8
examples: Cleanup and translate more examples to English
2023-05-18 18:08:55 +01:00
Antonio Niño Díaz
4c92c8c864
examples: Cleanup and translate some examples to English
2023-05-18 02:19:38 +01:00
Antonio Niño Díaz
37e1d5cb56
template: Cleanup and translate comments to English
2023-05-18 02:19:14 +01:00
Antonio Niño Díaz
b31a3e7d20
library: Make some functions static inline
2023-05-15 02:15:02 +01:00
Antonio Niño Díaz
dcf452b33b
docs: Update changelog
2023-05-14 02:36:50 +01:00
Antonio Niño Díaz
3d2b4ebabb
examples: Add assets of graphics/bgextpalette example
2023-05-14 02:36:01 +01:00
Antonio Niño Díaz
be3050bca8
examples: Add assets of the graphics/affine example
2023-05-14 02:26:11 +01:00
Antonio Niño Díaz
c184900ad6
examples: Add assets and scripts for most remaining examples
2023-05-14 01:42:06 +01:00
Antonio Niño Díaz
b74f8a5d98
examples: Add assets and scripts to more examples
2023-05-13 18:47:41 +01:00
Antonio Niño Díaz
2b079d20cf
examples: Add assets and scripts to collision examples
2023-05-13 18:36:14 +01:00
Antonio Niño Díaz
1246d11d74
examples: Remove font templates
...
There are many examples with sample fonts.
2023-05-13 17:32:28 +01:00