NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
OSFastCast.h
Go to the documentation of this file.
1#pragma once
2#include <types.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
11
12// The GQRs used for casting
13#define OS_FASTCAST_U8 2
14#define OS_FASTCAST_U16 3
15#define OS_FASTCAST_S8 4
16#define OS_FASTCAST_S16 5
17
18// Int to float conversions
19
21inline float OSu16tof32(register u16* in) {
22 register f32 r;
23 asm { psq_l r, 0(in), 1, OS_FASTCAST_U16 };
24 return r;
25}
26
28
29#ifdef __cplusplus
30}
31#endif
float OSu16tof32(register u16 *in)
Converts an unsigned short value into a single-precision floating point value.
Definition OSFastCast.h:21