# HG changeset patch # User Mike Becker # Date 1698688456 -3600 # Node ID 7e1196d551ff52feebf5f3db4f6a5190ae168107 # Parent b7acda6a44763ac94d69ac4d6cb8508140a5cf29 give unions names diff -r b7acda6a4476 -r 7e1196d551ff src/ascension/datatypes.h --- a/src/ascension/datatypes.h Mon Oct 30 18:42:09 2023 +0100 +++ b/src/ascension/datatypes.h Mon Oct 30 18:54:16 2023 +0100 @@ -37,13 +37,13 @@ typedef unsigned char asc_ubyte; typedef signed char asc_sbyte; -typedef union { +typedef union asc_vec2i { int data[2]; struct { int x, y; }; struct { int width, height; }; } asc_vec2i; -typedef union { +typedef union asc_col4i { asc_ubyte data[4]; #if SDL_BYTEORDER == SDL_BIG_ENDIAN struct { asc_ubyte red, green, blue, alpha; }; @@ -52,7 +52,7 @@ #endif } asc_col4i; -typedef union { +typedef union asc_col4f { float data[4]; #if SDL_BYTEORDER == SDL_BIG_ENDIAN struct { float red, green, blue, alpha; };