-
Notifications
You must be signed in to change notification settings - Fork 1
Api Reference
Lulezer edited this page Mar 30, 2025
·
1 revision
void MakeWindow(int width, int height, const char* title);
void CloseWindow();
int WindowShouldClose();
void StartDrawing();
void EndDrawing();
void ClearBackground(Color color);
void SetTargetFps(int targetFps);
void DrawTriangle(float x, float y, float width, float height, const Color& color);
void DrawRectangle(float x, float y, float width, float height, const Color& color);
void DrawProRectangle(float x, float y, float width, float height, const Color& color, float angle, - float transparency);
void DrawCircle(float centerX, float centerY, float radius, const Color& color, int segments = 36);
void DrawProCircle(float centerX, float centerY, float radius, const Color& color, int segments, -float transparency);
void DrawProTriangle(float x, float y, float width, float height, const Color& color, float transparency);
void DrawProTexturedRectangle(float x, float y, float width, float height, float rotation, float alpha, const std::string& name);
-
int IsKeyPressed(int key);
-
int IsKeyHeld(int key);
-
int IsMouseButtonPressed(int button);
-
int IsMouseButtonHeld(int button);
void LoadTexture(const char* filepath, const std::string& name);
void DrawTexturedRectangle(float x, float y, float width, float height, const std::string& name);
bool LoadFont(const char* fontFile, int fontSize, Font& outFont);
void DrawText(Font& font, const char* text, float x, float y, int fontSize, Color color);
float GetDeltaTime();
void GetMousePosition(double& x, double& y);
bool ech::CollisionShape::CheckCollision(const CollisionShape& other);
CollisionShape rectShape{ 100.0f, 370.0f, 20.0f, 20.0f }; // Static obstacle
CollisionShape nextPlayerShapeX = { nextPlayerX, playerShape.y, PlayerCollWidth, PlayerCollHeight };
if (!nextPlayerShapeX.CheckCollision(rectShape))
{
playerShape.x = nextPlayerX;
}
-
inline void savefile(const std::string& filename, const T& data);
-
inline void loadfile(const std::string& filename, T& data);
Yo