spline(3alleg4)

✨ NAME ✨

okay so bestie, welcome to the spline page from the Allegro manual (that's spline(3alleg4), section 3, iykyk) πŸ’–

spline β€” it draws a Bezier spline using four control points. yes literally, that's the whole job. and it lives in the Allegro game programming library, which is giving very much "your fave retro game dev toolkit" energy 🌈


πŸŽ€ SYNOPSIS πŸŽ€

like, here's the vibe, character for character:

#include <allegro.h>

void spline(BITMAP *bmp, const int points[8], int color);

so it takes a BITMAP * called bmp, a const int array of points that's 8 long, and an int color. that's it, that's the whole signature, periodt πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so what it does: it draws a Bezier spline using the four control points you specified in the points array. four points. Bezier. slay. ✨

and if you're sitting there like "bestie how do i even build that points array??" β€” no worries, go read the description of calc_spline() and it'll walk you through it. it's giving "the prequel you gotta watch first" fr fr πŸ“–

real talk: this page does not explain how to construct points. it points you at calc_spline() instead. don't skip that one, or you'll be out here guessing and the spline will look like a whole mess 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, no cap 🫢 this was spline(3alleg4) from the Allegro manual, version 4.4.3 β€” shoutout to Allegro for the docs, mwah, iconic, go draw some curves bestie πŸ’œπŸŽ€