Code: Select all
bg={x=161,y=52,w=174,h=170} //background variables
edit: removed some code
Advertising
Code: Select all
bg={x=161,y=52,w=174,h=170} //background variables
Code: Select all
typedef struct
{
u16 x, y, w, h;
} t_bg;
//..
t_bg my_background = {161, 52, 174, 170};
too complicated for his limited knowledge, a simple array of u16 would sufficeGBOT wrote:for example.Code: Select all
typedef struct { u16 x, y, w, h; } t_bg; //.. t_bg my_background = {161, 52, 174, 170};
Code: Select all
u16 my_background[] = {161, 52, 174, 170};
Code: Select all
struct { int x, y, w, h } bg = { .x = 161, .y = 152, .w = 174, .h = 170 };
Code: Select all
struct StructType
{
StructFields
} StructObject.
Code: Select all
struct StructType myNewStructObject;
Code: Select all
typedef struct StructType TypeName;
TypeName myNewStructObject;
Code: Select all
typedef struct StructType
{
StructFields
} TypeName;
Code: Select all
typedef struct Rect Rect;
struct Screen
{
Rect rect;
unsigned color;
};
struct Rect
{
int x, y, w, h;
};