mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-19 08:41:23 +02:00
Update to v106r78 release.
byuu says: I've implemented a lot more TLCS900H instructions. There are currently 20 missing spots, all of which are unique instructions (well, MINC and MDEC could be considered pairs of 3 each), from a map of 1024 slots. After that, I have to write the disassembler. Then the memory bus. Then I get to start the fun process of debugging this monstrosity. Also new is nall/inline-if.hpp. Note that this file is technically a war crime, so be careful when opening it. This replaces ternary() from the previous WIP.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace nall {
|
||||
|
||||
template<int RequestedPrecision> struct Real {
|
||||
enum : uint { Precision = RequestedPrecision <= 32 ? 32 : 64 };
|
||||
template<int Requested> struct Real {
|
||||
enum : uint { Precision = Requested <= 32 ? 32 : 64 };
|
||||
static inline constexpr auto bits() -> uint { return Precision; }
|
||||
using type =
|
||||
typename conditional<bits() == 32, float32_t,
|
||||
@@ -13,7 +13,6 @@ template<int RequestedPrecision> struct Real {
|
||||
inline Real() : data(0.0) {}
|
||||
template<typename T> inline Real(const T& value) : data((type)value) {}
|
||||
|
||||
explicit operator bool() const { return (bool)data; }
|
||||
inline operator type() const { return data; }
|
||||
|
||||
inline auto operator++(int) { auto value = *this; ++data; return value; }
|
||||
@@ -23,11 +22,11 @@ template<int RequestedPrecision> struct Real {
|
||||
inline auto& operator--() { data--; return *this; }
|
||||
|
||||
template<typename T> inline auto& operator =(const T& value) { data = value; return *this; }
|
||||
template<typename T> inline auto& operator+=(const T& value) { data = data + value; return *this; }
|
||||
template<typename T> inline auto& operator-=(const T& value) { data = data - value; return *this; }
|
||||
template<typename T> inline auto& operator*=(const T& value) { data = data * value; return *this; }
|
||||
template<typename T> inline auto& operator/=(const T& value) { data = data / value; return *this; }
|
||||
template<typename T> inline auto& operator%=(const T& value) { data = data % value; return *this; }
|
||||
template<typename T> inline auto& operator+=(const T& value) { data = data + value; return *this; }
|
||||
template<typename T> inline auto& operator-=(const T& value) { data = data - value; return *this; }
|
||||
|
||||
inline auto serialize(serializer& s) { s(data); }
|
||||
|
||||
|
Reference in New Issue
Block a user