diff options
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r-- | src/video_core/pica.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 9628a758..feb20214 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -5,10 +5,10 @@ #pragma once #include <array> +#include <cmath> #include <cstddef> -#include <initializer_list> #include <map> -#include <vector> +#include <string> #include "common/assert.h" #include "common/bit_field.h" @@ -114,11 +114,17 @@ struct Regs { struct TextureConfig { enum WrapMode : u32 { ClampToEdge = 0, + ClampToBorder = 1, Repeat = 2, MirroredRepeat = 3, }; - INSERT_PADDING_WORDS(0x1); + union { + BitField< 0, 8, u32> r; + BitField< 8, 8, u32> g; + BitField<16, 8, u32> b; + BitField<24, 8, u32> a; + } border_color; union { BitField< 0, 16, u32> height; @@ -1014,7 +1020,7 @@ struct float24 { u32 mantissa = hex & 0xFFFF; u32 exponent = (hex >> 16) & 0x7F; u32 sign = hex >> 23; - ret.value = powf(2.0f, (float)exponent-63.0f) * (1.0f + mantissa * powf(2.0f, -16.f)); + ret.value = std::pow(2.0f, (float)exponent-63.0f) * (1.0f + mantissa * std::pow(2.0f, -16.f)); if (sign) ret.value = -ret.value; } |