mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-11 15:45:05 +02:00
#15 fix 16 to 24-bit color conversion
This commit is contained in:
@@ -175,8 +175,8 @@ namespace TR {
|
|||||||
struct Color16 {
|
struct Color16 {
|
||||||
uint16 r:5, g:5, b:5, a:1;
|
uint16 r:5, g:5, b:5, a:1;
|
||||||
|
|
||||||
operator Color24() const { return Color24(r << 3, g << 3, b << 3); }
|
operator Color24() const { return Color24((r << 3) | (r >> 2), (g << 3) | (g >> 2), (b << 3) | (b >> 2)); }
|
||||||
operator Color32() const { return Color32(r << 3, g << 3, b << 3, -a); }
|
operator Color32() const { return Color32((r << 3) | (r >> 2), (g << 3) | (g >> 2), (b << 3) | (b >> 2), -a); }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Vertex {
|
struct Vertex {
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define EPS FLT_EPSILON
|
#define EPS FLT_EPSILON
|
||||||
#define INF INFINITY
|
#define INF INFINITY
|
||||||
#define PI 3.14159265358979323846f
|
#define PI 3.14159265358979323846f
|
||||||
#define PI2 (PI * 2.0f)
|
#define PI2 (PI * 2.0f)
|
||||||
#define DEG2RAD (PI / 180.0f)
|
#define DEG2RAD (PI / 180.0f)
|
||||||
|
Reference in New Issue
Block a user