-
Notifications
You must be signed in to change notification settings - Fork 13
Next: GetRoomData
Gets the deserialized contents of a GameMaker room.
AurieStatus GetRoomData(
[in] int32_t RoomID,
[out] CRoom*& Room
);
The room number of the room, the data of which is retrieved.
A reference to a pointer-sized buffer into which the address of the CRoom object is written. If the function fails, the buffer referenced by this parameter is left untouched. In the name of safety, this structure is normally opaque. To remove this safeguard, see Enabling internal structure access. The pointer written into this buffer is guaranteed to remain valid for the duration of the room's existence.
Note
Using this function to get the active room may produce unexpected results (eg. the room having no active instances) due to how the GameMaker engine works. To get a pointer to the currently active room, use the GetCurrentRoomData function.
The function returns AURIE_SUCCESS
on success, otherwise returns a matching error code. If the information needed for looking up rooms isn't available, the function returns AURIE_MODULE_INTERNAL_ERROR
. If the RoomID
index isn't a valid room, the function returns AURIE_OBJECT_NOT_FOUND
.