1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 15:30:14 +00:00

Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309)

* Fix some more GCC warnings, mark some bugs based on GCC warnings

* Weird formatting

* Suggested changes

* More weird indentation I guess

* UNREACHABLE() macro, add missing NORETURNs to fault_n64.c

* AVOID_UB for PAL path in z_file_nameset.c

* Remove comments about return types

* Remove temp no longer needed
This commit is contained in:
Tharo 2024-12-02 09:40:49 +00:00 committed by GitHub
parent 6199634ffb
commit 3f703a39d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 156 additions and 83 deletions

View file

@ -17,21 +17,23 @@
// For use in initializing OSViMode structures
#define BURST(hsync_width, color_width, vsync_width, color_start) \
(hsync_width | (color_width << 8) | (vsync_width << 16) | (color_start << 20))
#define WIDTH(v) v
#define VSYNC(v) v
#define HSYNC(duration, leap) (duration | (leap << 16))
#define LEAP(upper, lower) ((upper << 16) | lower)
#define START(start, end) ((start << 16) | end)
#define FTOFIX(val, i, f) ((u32)(val * (f32)(1 << f)) & ((1 << (i + f)) - 1))
((((u8)(hsync_width) & 0xFF) << 0) | \
(((u8)(color_width) & 0xFF) << 8) | \
(((u8)(vsync_width) & 0xF) << 16) | \
(((u16)(color_start) & 0xFFF) << 20))
#define WIDTH(v) (v)
#define VSYNC(v) (v)
#define HSYNC(duration, leap) (((u16)(leap) << 16) | (u16)(duration))
#define LEAP(upper, lower) (((u16)(upper) << 16) | (u16)(lower))
#define START(start, end) (((u16)(start) << 16) | (u16)(end))
#define FTOFIX(val, i, f) ((u32)((val) * (f32)(1 << (f))) & ((1 << ((i) + (f))) - 1))
#define F210(val) FTOFIX(val, 2, 10)
#define SCALE(scaleup, off) (F210((1.0f / (f32)scaleup)) | (F210((f32)off) << 16))
#define SCALE(scaleup, off) (F210(1.0f / (f32)(scaleup)) | (F210((f32)(off)) << 16))
#define VCURRENT(v) v
#define ORIGIN(v) v
#define VINTR(v) v
#define HSTART START
#define VCURRENT(v) (v)
#define ORIGIN(v) (v)
#define VINTR(v) (v)
#define HSTART(start, end) START(start, end)
#endif