mirror of
https://github.com/knightfox75/nds_nflib.git
synced 2025-06-18 16:55:32 -04:00
![]() 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). |
||
---|---|---|
.. | ||
nf_2d.c | ||
nf_3d.c | ||
nf_affinebg.c | ||
nf_basic.c | ||
nf_bitmapbg.c | ||
nf_collision.c | ||
nf_media.c | ||
nf_mixedbg.c | ||
nf_sound.c | ||
nf_sprite3d.c | ||
nf_sprite256.c | ||
nf_text16.c | ||
nf_text.c | ||
nf_tiledbg.c | ||
nf_wifi.c |