longlene / cl-raylib

Common Lisp binding of raylib
MIT License
145 stars 21 forks source link

why draw-rectangle takes arguments of type integers instead of float? #46

Open Oleg-Harput opened 1 year ago

Oleg-Harput commented 1 year ago

draw-rectange arguments take integer but when we multiply it with get-frame-time the argument becomes float and we no longer put them into draw-rectangle.

longlene commented 1 year ago

@Oleg-Harput It is decided by raylib, if you check the raylib.h for these signatures:

RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color);                        // Draw a color-filled rectangle

RLAPI float GetFrameTime(void);                                   // Get time in seconds for last frame drawn (delta time)