Hello folks,
iam currently working on my Snake Project, actually trying to implement some Item Stuff. I applied for every Item(Food, Speedups, Healthups) a file, which contains simplify a Struct. In this Struct are some propertys saved and Path Names to Shader and Textures. For every Item i load Stuff.
Actually i have the Problem, if i "out-comment" this line here:
(in CSFMLGameClock.c)
// Set GameTime to Item Shaders
if(GameItem.GI_Is_Init)
{
size_t it;
for(it = 0; it<GameItem.GI_Items_Count; it++)
{
if(GameItem.GI_Coordinates_Setted[it] && GameItem.GI_Placed[it])
{
//sfShader_setFloatUniform(GameItem.GI_Shaders[it], "Time", GameClock.GC_Time); // <- This
}
}
}
On Start, it works fine, if i move my Snake then with a key, it directly lead to a crash. Iam not sure, where's the problem. Maybe you can give me some tip.
If it outcommentated, it works fine.
I applied fast a github repo, if you want to see the full code.
You can see it here:
https://github.com/MasterOfPenetrator/SnakeGameGreetz