Skip to content

Commit

Permalink
Make some raylib structs @compact
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Nov 16, 2024
1 parent b9b44de commit 780d28a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libraries/raylib5.c3l/raylib.c3i
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ const Color MAGENTA = { 255, 0, 255, 255 }; // Magenta
const Color RAYWHITE = { 245, 245, 245, 255 }; // My own White (raylib logo)

// Vector2, 2 components
struct Vector2
struct Vector2 @compact
{
float x; // Vector x component
float y; // Vector y component
}

// Vector3, 3 components
struct Vector3
struct Vector3 @compact
{
float x; // Vector x component
float y; // Vector y component
float z; // Vector z component
}

// Vector4, 4 components
struct Vector4
struct Vector4 @compact
{
float x; // Vector x component
float y; // Vector y component
Expand All @@ -62,7 +62,7 @@ struct Vector4
def Quaternion = Vector4;

// Matrix, 4x4 components, column major, OpenGL style, right handed
struct Matrix
struct Matrix @compact
{
float m0, m4, m8, m12; // Matrix first row (4 components)
float m1, m5, m9, m13; // Matrix second row (4 components)
Expand All @@ -71,7 +71,7 @@ struct Matrix
}

// Color, 4 components, R8G8B8A8 (32bit)
struct Color
struct Color @compact
{
char r; // Color red value
char g; // Color green value
Expand All @@ -80,7 +80,7 @@ struct Color
}

// Rectangle, 4 components
struct Rectangle
struct Rectangle @compact
{
float x; // Rectangle top-left corner position x
float y; // Rectangle top-left corner position y
Expand Down Expand Up @@ -285,7 +285,7 @@ struct RayCollision
}

// BoundingBox
struct BoundingBox
struct BoundingBox @compact
{
Vector3 min; // Minimum vertex box-corner
Vector3 max; // Maximum vertex box-corner
Expand Down

0 comments on commit 780d28a

Please sign in to comment.