Nimbin[12]?SDL & Graphics / mapcreator / src/defaults/icons.hpp

mapcreator git · master

SDL3 2.5D game and engine using assets, with map editor

sdl3 c++ game engine map-editor cmake · first commit 2025-10-31 · last commit 2026-09-07 (1 month ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-spieleentwicklung/map_creator

C++ 99.3%
git clone https://git.christianimmanuel.de/sdl-graphics/mapcreator.gitwget https://git.christianimmanuel.de/sdl-graphics/mapcreator/archive/mapcreator.tar.gz
src/defaults/icons.hpp 570 B · 29 lines raw
#pragma once

#include <SDL3/SDL.h>

#include "inventory/item.hpp"

#include <unordered_map>

enum class IconType {
    CHECKMARK
};

namespace Icon {

    struct TilePos {
        int x;
        int y;
    };

    extern SDL_Texture* icons_texture;
    extern std::unordered_map<ResourceType, TilePos> resource_pos;
    extern std::unordered_map<ItemType,     TilePos> item_pos;
    extern std::unordered_map<BuildingType, TilePos> building_pos;
    extern std::unordered_map<IconType,     TilePos> icon_pos;

    bool Init(SDL_Renderer* renderer);
    void Quit();

}