Nimbin[12]?SDL & Graphics / mapcreator / src/resource/resource_data.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/resource/resource_data.hpp 840 B · 57 lines raw
#pragma once

#include <deque>

#include "defaults/defaults.hpp"
#include "defaults/input.hpp"

enum class ResourceType {
    NONE,
    WOOD,
    STONE,
    CLAY,
    IRON,
    BONE,
    LAST
};

enum class CollectingMethode {
    NONE,
    HAND,
    AXE_STONE,
    SWORD_WOOD,
    KNIFE,
    FISHINGROT,
    PICKAXE_STONE,
    LAST
};


struct Resource_s {
    size_t tileset_id;
    size_t object_id;

    ResourceType resource;

    CollectingMethode collecting_methode;
    float             collecting_duration;
    unsigned quantity;
};



namespace ResourceData {
    extern const std::deque<std::string> names;

    void save_Resources();
    void load_Resources();

    void set_ObjectPropsResource(Input& input);


    const char*
    to_String(CollectingMethode methode);

    const char*
    to_String(ResourceType resource);
}