Macaw OS C reference

Function levelentitytext

#include <macawlevel.h>
int levelentitytext(
    int level,
    const char *class_,
    int i,
    const char *field,
    char *buf,
    int size
);

Gives an entity's field as text. Numbers come out as a level file writes them, and true or false as "true" or "false".

Parameters

levelint
The level.
class_const char *
The class, or NULL for every entity.
iint
Which one of them, from 0.
fieldconst char *
The field's name.
bufchar *
Where the text goes, a char array.
sizeint
How many bytes buf holds.

Returns int

The length of the text, or 0 if there's no such field.

In Entities, with levelentitycount, levelentity, levelentityhas, levelentitynum, levelentityfield.