I get the following error, pointing to Rectangle rec height and width, when I instantiate the struct AnimData:
error: non-constant-expression cannot be narrowed from type ‘int’ to ‘float’ in initializer list [-Wc++11-narrowing]
However, the code executes correctly if I press “Debug Anyway”.
Is this a VsCode issue, or should I modify my declaration:
Texture2D scarfy = LoadTexture("textures/scarfy.png");
AnimData scarfyData{
{scarfy.width / 6, scarfy.height, 0, 0}, // Rectangle rec
{w_width / 2 - scarfy.width / 12, w_height - scarfy.height}, // Vector2 pos
0, // int frame
1.0 / 12.0, // int updateTime
0 // int runningTime
};