6#include "Etterna/Models/Misc/EnumHelper.h"
16 BLEND_ALPHA_KNOCK_OUT,
18 BLEND_WEIGHTED_MULTIPLY,
24LuaDeclareType(BlendMode);
41LuaDeclareType(TextureMode);
46 EffectMode_Unpremultiply,
48 EffectMode_ColorDodge,
49 EffectMode_VividLight,
57LuaDeclareType(EffectMode);
67LuaDeclareType(CullMode);
77LuaDeclareType(ZTestMode);
86LuaDeclareType(PolygonMode);
96LuaDeclareType(TextGlowMode);
116 operator float*() {
return &x; };
117 operator const float*()
const {
return &x; };
168 float x{ 0 }, y{ 0 };
189 operator float*() {
return &x; };
190 operator const float*()
const {
return &x; };
225 return RageVector3(x + other.x, y + other.y, z + other.z);
229 return RageVector3(x - other.x, y - other.y, z - other.z);
245 float x{ 0 }, y{ 0 }, z{ 0 };
259 RageVector4(
float x1,
float y1,
float z1,
float w1)
268 operator float*() {
return &x; };
269 operator const float*()
const {
return &x; };
308 return RageVector4(x + other.x, y + other.y, z + other.z, w + other.w);
312 return RageVector4(x - other.x, y - other.y, z - other.z, w - other.w);
328 float x{ 0 }, y{ 0 }, z{ 0 }, w{ 0 };
342 RageColor(
float r1,
float g1,
float b1,
float a1)
356 operator float*() {
return &r; };
357 operator const float*()
const {
return &r; };
400 return RageColor(r + other.r, g + other.g, b + other.b, a + other.a);
404 return RageColor(r - other.r, g - other.g, b - other.b, a - other.a);
408 return RageColor(r * other.r, g * other.g, b * other.b, a * other.a);
410 auto operator*(
float f)
const ->
RageColor
412 return RageColor(r * f, g * f, b * f, a * f);
415 auto operator/(
float f)
const ->
RageColor
417 return RageColor(r / f, g / f, b / f, a / f);
425 auto operator==(
const RageColor& other)
const ->
bool
427 return r == other.r && g == other.g && b == other.b && a == other.a;
429 auto operator!=(
const RageColor& other)
const ->
bool
431 return !operator==(other);
434 auto FromString(
const std::string& str) ->
bool
436 int result = sscanf(str.c_str(),
"%f,%f,%f,%f", &r, &g, &b, &a);
449 result = sscanf(str.c_str(),
"#%2x%2x%2x%2x", &ir, &ig, &ib, &ia);
469 [[nodiscard]]
auto ToString()
const -> std::string;
470 static auto NormalizeColorString(
const std::string& sColor) -> std::string;
472 void PushTable(lua_State* L)
const;
473 void FromStack(lua_State* L,
int iPos);
474 void FromStackCompat(lua_State* L,
int iPos);
476 float r{ 0 }, g{ 0 }, b{ 0 }, a{ 0 };
480FTOC(
float a) ->
unsigned char
482 auto ret =
static_cast<int>(a * 256.F);
484 return static_cast<unsigned char>(ret);
494 uint8_t b{ 0 }, g{ 0 }, r{ 0 },
518 Rect(T l, T t, T r, T b)
526 [[nodiscard]]
auto GetWidth()
const -> T {
return right - left; };
527 [[nodiscard]]
auto GetHeight()
const -> T {
return bottom - top; };
528 [[nodiscard]]
auto GetCenterX()
const -> T {
return (left + right) / 2; };
529 [[nodiscard]]
auto GetCenterY()
const -> T {
return (top + bottom) / 2; };
531 auto operator==(
const Rect& other)
const ->
bool
534 if ((x) != other.x) \
543 auto operator!=(
const Rect& other)
const ->
bool
545 return !operator==(other);
548 T left, top, right, bottom;
573 float percent_between);
582 , TextureMatrixScale(1, 1)
604 for (
int i = 0; i < 4; i++) {
605 for (
int j = 0; j < 4; j++) {
606 m[j][i] = f[j * 4 + i];
612 for (
int i = 0; i < 4; i++) {
613 for (
int j = 0; j < 4; j++) {
614 m[j][i] = other.m[j][i];
636 auto operator()(
int iRow,
int iCol) ->
float& {
return m[iCol][iRow]; }
637 auto operator()(
int iRow,
int iCol)
const ->
float {
return m[iCol][iRow]; }
640 operator float*() {
return m[0]; }
641 operator const float*()
const {
return m[0]; }
643 [[nodiscard]]
auto GetTranspose()
const ->
RageMatrix;
655LuaDeclareType(ShaderType);
660 ShaderParamType_IntArray,
661 ShaderParamType_Float,
662 ShaderParamType_FloatArray,
663 ShaderParamType_Texture,
665 ShaderParamType_Invalid
667LuaDeclareType(ShaderParamType);
Definition RageTypes.h:492
Definition RageTypes.h:509
Utility functions for controlling the whole game.
Definition StepMania.h:11
Definition RageTypes.h:332
Definition RageTypes.h:599
Definition RageTypes.h:576
Definition RageTypes.h:557
Definition RageTypes.h:101
Definition RageTypes.h:172
Definition RageTypes.h:249