register_datafile_object(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– register_datafile_object(3) πŸ’–

okay so bestie, we're deep in the Allegro manual rn, and this page is about register_datafile_object β€” aka the little function that lets you register load/destroy functions for custom object types. Allegro game programming library, periodt. πŸŽ€


✨ NAME ✨

register_datafile_object β€” registers load/destroy functions for custom object types. Allegro game programming library. 🫢

πŸ“œ SYNOPSIS πŸ“œ

#include <allegro.h>

void register_datafile_object(int id, void *(*load)(PACKFILE *f, long size), void (*destroy)(void *data));

🌸 DESCRIPTION 🌸

Used to add custom object types, specifying functions to load and destroy objects of this type.

So like, you hand it an id, a load function pointer, and a destroy function pointer, and it's giving "custom object type, registered." The load function gets PACKFILE *f and long size, and the destroy function gets void *data. That's the whole vibe, no cap. πŸ’…

πŸ‘€ SEE ALSO πŸ‘€


Allegro version 4.4.3 β€” that's the version, bestie. Slay, bye. πŸ’–βœ¨

πŸ“¦ where this page comes from