#include #include #include #define RAYGUI_IMPLEMENTATION #include void updateRadius(int baseL, int innerL, int *pBaseR, int *pInnerR) { int totalL=baseL; if (innerL>baseL) totalL = (2*innerL-baseL); int totalR = 420; int remainder = totalR % totalL; if (remainder!=0) { if (remainder < totalL / 2) { totalR -= remainder; } else { totalR += ( totalL - remainder); } } if (innerL=speed) { ImageClearBackground(&circlesImage,BLANK); //base circle ImageDrawCircleEx(&circlesImage,cx,cy,baseR,1,LIGHTRED); ImageDrawCircleEx(&circlesImage,innerCX,innerCY,innerR,1,LIGHTSLATEGRAY); ImageDrawPointEx(&circlesImage,x,y,7,RED); //Drawing in GPU Texture trackTexture = LoadTextureFromImage(trackImage); Texture circlesTexture = LoadTextureFromImage(circlesImage); BeginDrawing(); ClearBackground(WHITE); DrawTexture(trackTexture,300,0,WHITE); DrawTexture(circlesTexture,300,0,WHITE); EndDrawing(); UnloadTexture(circlesTexture); UnloadTexture(trackTexture); frameCount=0; } lastx=x; lasty=y; } //Clean up UnloadImage(circlesImage); UnloadImage(trackImage); CloseWindow(); }