3 world
Sara edited this page 2023-07-15 21:37:51 +00:00

Purpose

The game world is a list of managed pointers to objects. If an object managed by the world defines evt_update or evt_draw they will be called automatically.

Interface

object_t* make_object()

Add a object_default() to the world.

object_t* instantiate_object(const object_t original)*

Copy an object into the world.

Note: activates the object regardless of if the original is active.

void world_clear()

Deletes all objects in the world.

object_t* world_get_object(size_t at)

If you have a object index, this is where to redeem it.

size_t world_num_objects()

The number of slots available. Does not correspond to the number of active objects. Some of these will be null pointers.