File worldService.hpp

class WorldService
#include <worldService.hpp>

The WorldService is responsible for containing and drawing the Room.

Public Functions

WorldService()

Empty constructor.

bool getIfRoomExist()

Check if the room exists.

Room &getRoom() const

Get a reference to the current room.

void setRoom(const std::string_view &filePath)

Set the current room using path to a .rmap file.

void setRoomBin(RoomBin bin)

Set the current room using a RoomBin binary structure.

void setRoomBin(const std::string &roomBin)

Set the current room using a room title in the GameBin.

void doFadeTransition()

Activate transition effect

Player &getPlayer() const

Get a reference to the Player object.

void update()

Update routine.

void draw() const

Draw routine.

void unload() const

Unload routine.

Private Members

std::unique_ptr<Room> room

The current room in this World.

bool lock
std::string deferredRoomId

Id for the next room.

bool deferRoomChange

Whether there will be a deferred change of Room event.