#include "map.h" #include "game.h" void repositionMap(Map* map) { map->rect.x = GetRenderWidth() - map->rect.width; } void initMap(Map* map, const Settings* settings) { *map = (Map){ .rect = (Rectangle){0.0, 0.0, settings->mapPreviewSize, settings->mapPreviewSize}, .isEnabled = settings->isMapPreviewEnabledDefault, .isFullSize = false }; repositionMap(map); } void updateMap(Map* map, Game* game) { // Handle window resize. if (IsWindowResized()) { repositionMap(map); } if (!map->isEnabled) { return; } DrawRectangleLinesEx(map->rect, 3.0, BLUE); }