Mon, 30 Oct 2023 18:54:16 +0100
give unions names
src/ascension/datatypes.h | file | annotate | diff | comparison | revisions |
1.1 --- a/src/ascension/datatypes.h Mon Oct 30 18:42:09 2023 +0100 1.2 +++ b/src/ascension/datatypes.h Mon Oct 30 18:54:16 2023 +0100 1.3 @@ -37,13 +37,13 @@ 1.4 typedef unsigned char asc_ubyte; 1.5 typedef signed char asc_sbyte; 1.6 1.7 -typedef union { 1.8 +typedef union asc_vec2i { 1.9 int data[2]; 1.10 struct { int x, y; }; 1.11 struct { int width, height; }; 1.12 } asc_vec2i; 1.13 1.14 -typedef union { 1.15 +typedef union asc_col4i { 1.16 asc_ubyte data[4]; 1.17 #if SDL_BYTEORDER == SDL_BIG_ENDIAN 1.18 struct { asc_ubyte red, green, blue, alpha; }; 1.19 @@ -52,7 +52,7 @@ 1.20 #endif 1.21 } asc_col4i; 1.22 1.23 -typedef union { 1.24 +typedef union asc_col4f { 1.25 float data[4]; 1.26 #if SDL_BYTEORDER == SDL_BIG_ENDIAN 1.27 struct { float red, green, blue, alpha; };