* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
76 lines
1.3 KiB
C++
76 lines
1.3 KiB
C++
#pragma once
|
|
|
|
|
|
class Byte
|
|
{
|
|
public:
|
|
static const char MAX_VALUE = CHAR_MAX;
|
|
static const char MIN_VALUE = CHAR_MIN;
|
|
};
|
|
|
|
class Short
|
|
{
|
|
public:
|
|
static const short MAX_VALUE = SHRT_MAX;
|
|
static const short MIN_VALUE = SHRT_MIN;
|
|
};
|
|
|
|
class Integer
|
|
{
|
|
public:
|
|
static const int MAX_VALUE = INT_MAX;
|
|
static int parseInt(wstring &str, int radix = 10);
|
|
};
|
|
|
|
class Float
|
|
{
|
|
public:
|
|
static const float MAX_VALUE;
|
|
static int floatToIntBits( float value )
|
|
{
|
|
return *(int *)&value;
|
|
}
|
|
static int floatToRawIntBits( float value )
|
|
{
|
|
return *(int *)&value;
|
|
}
|
|
|
|
static float intBitsToFloat( int bits )
|
|
{
|
|
return *(float *)&bits;
|
|
}
|
|
|
|
static const float POSITIVE_INFINITY;
|
|
};
|
|
|
|
class Double
|
|
{
|
|
public:
|
|
static const double MAX_VALUE;
|
|
static const double MIN_NORMAL;
|
|
|
|
static bool isNaN( double a ) {
|
|
#ifdef __PS3__
|
|
return isnan(a);
|
|
#else
|
|
return ( a != a );
|
|
#endif
|
|
}
|
|
static bool isInfinite( double a ) { return false; /*4J TODO*/ }
|
|
|
|
static double longBitsToDouble( __int64 bits )
|
|
{
|
|
return *(double *)&bits;
|
|
}
|
|
|
|
static __int64 doubleToLongBits( double d )
|
|
{
|
|
return *(__int64 *)&d;
|
|
}
|
|
};
|
|
|
|
// 4J Stu - The String class should only be used if we need to use the BaseClass::class type
|
|
// As such I have renamed it so that we don't confuse it with places where we should use std::string
|
|
class _String
|
|
{
|
|
}; |