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

SDL_Game_CPP git · main

SDL game in C++

sdl game c++ · first commit 2026-03-24 · last commit 2026-03-24 (8 months ago) · synced 1 hour ago · upstream: codeberg.org/Studying_at_HsNR/SDL_Game_CPP

C++ 99.3%
git clone https://git.christianimmanuel.de/sdl-graphics/SDL_Game_CPP.gitwget https://git.christianimmanuel.de/sdl-graphics/SDL_Game_CPP/archive/SDL_Game_CPP.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();

}