Atrinik Server 2.5
Functions
types/magic_mirror.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

void magic_mirror_init (object *mirror)
void magic_mirror_deinit (object *mirror)
mapstructmagic_mirror_get_map (object *mirror)

Detailed Description

Handles code for magic mirrors.

Magic mirrors are objects that mirror contents of another tile, effectively creating a map stacking effect. It is also possible to make the magic mirrors zoom out/in mirrored objects to create a depth effect.

Definition in file magic_mirror.c.


Function Documentation

void magic_mirror_deinit ( object mirror)

Deinitialize a magic mirror object.

Mostly used to free object::custom_attrset of the mirror.

Parameters:
mirrorMagic mirror to deinitialize.

Definition at line 97 of file magic_mirror.c.

mapstruct* magic_mirror_get_map ( object mirror)

Get map to which a magic mirror is pointing to. Almost always this should be used instead of accessing magic_mirror_struct::map directly, as it will make sure the map is loaded and will reset the swap timeout.

Parameters:
mirrorMagic mirror to get map of.
Returns:
The map. Can be NULL in case of loading error.

Definition at line 108 of file magic_mirror.c.

void magic_mirror_init ( object mirror)

Initializes a magic mirror object after it has been placed on map.

Parameters:
mirrorThe magic mirror to initialize.

Definition at line 40 of file magic_mirror.c.