---
name: "register_datafile_object"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/register_datafile_object/3alleg4"
---

# register\_datafile\_object(3alleg4)

Registers load/destroy functions for custom object types. Allegro game programming library.

## 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.

## SEE ALSO

**load\_datafile**(3alleg4), **load\_datafile\_object**(3alleg4), **DAT\_ID**(3alleg4)
