#include <trx/config/enum.h>

#include <trx/core/enum_map.h>

static __attribute__((constructor)) void M_Init(void)
{
    ENUM_MAP(ASPECT_MODE, ASPECT_MODE_ANY, "any");
    ENUM_MAP(ASPECT_MODE, ASPECT_MODE_4_3, "4:3");
    ENUM_MAP(ASPECT_MODE, ASPECT_MODE_16_9, "16:9");
    ENUM_MAP(ASPECT_MODE, ASPECT_MODE_16_10, "16:10");

    ENUM_MAP(INPUT_BACKEND, INPUT_BACKEND_KEYBOARD, "keyboard");
    ENUM_MAP(INPUT_BACKEND, INPUT_BACKEND_CONTROLLER, "controller");
    ENUM_MAP(INPUT_BACKEND, INPUT_BACKEND_TOUCH, "touch");

    ENUM_MAP(SCREENSHOT_FORMAT, SCREENSHOT_FORMAT_JPEG, "jpg");
    ENUM_MAP(SCREENSHOT_FORMAT, SCREENSHOT_FORMAT_JPEG, "jpeg");
    ENUM_MAP(SCREENSHOT_FORMAT, SCREENSHOT_FORMAT_PNG, "png");

    ENUM_MAP(MUSIC_LOAD_CONDITION, MUSIC_LOAD_CONDITION_NEVER, "never");
    ENUM_MAP(
        MUSIC_LOAD_CONDITION, MUSIC_LOAD_CONDITION_NON_AMBIENT, "non-ambient");
    ENUM_MAP(MUSIC_LOAD_CONDITION, MUSIC_LOAD_CONDITION_ALWAYS, "always");

    ENUM_MAP(LOADING_SCREENS_MODE, LOADING_SCREENS_DISABLED, "disabled");
    ENUM_MAP(LOADING_SCREENS_MODE, LOADING_SCREENS_ALWAYS, "always");
    ENUM_MAP(LOADING_SCREENS_MODE, LOADING_SCREENS_NEW_GAMES, "new-games");

    ENUM_MAP(INTRO_FMV_MODE, INTRO_FMV_NEW_GAME, "new-game");
    ENUM_MAP(INTRO_FMV_MODE, INTRO_FMV_LAUNCH, "launch");

    ENUM_MAP(BAR_SHOW_MODE, BAR_SHOW_MODE_NEVER, "never");
    ENUM_MAP(BAR_SHOW_MODE, BAR_SHOW_MODE_ALWAYS, "always");
    ENUM_MAP(BAR_SHOW_MODE, BAR_SHOW_MODE_BOSS_ONLY, "boss-only");

    ENUM_MAP(UI_ELEMENT_LOCATION, UI_ELEMENT_LOCATION_TOP_LEFT, "top-left");
    ENUM_MAP(UI_ELEMENT_LOCATION, UI_ELEMENT_LOCATION_TOP_CENTER, "top-center");
    ENUM_MAP(UI_ELEMENT_LOCATION, UI_ELEMENT_LOCATION_TOP_RIGHT, "top-right");
    ENUM_MAP(
        UI_ELEMENT_LOCATION, UI_ELEMENT_LOCATION_BOTTOM_LEFT, "bottom-left");
    ENUM_MAP(
        UI_ELEMENT_LOCATION, UI_ELEMENT_LOCATION_BOTTOM_CENTER,
        "bottom-center");
    ENUM_MAP(
        UI_ELEMENT_LOCATION, UI_ELEMENT_LOCATION_BOTTOM_RIGHT, "bottom-right");

    ENUM_MAP(UI_STYLE, UI_STYLE_PS1, "ps1");
    ENUM_MAP(UI_STYLE, UI_STYLE_PC, "pc");

    ENUM_MAP(BACKGROUND_TYPE, BK_NONE, "none");
    ENUM_MAP(BACKGROUND_TYPE, BK_TRANSPARENT_MEDIUM, "transparent");
    ENUM_MAP(BACKGROUND_TYPE, BK_TRANSPARENT_DARK, "transparent-dark");
    ENUM_MAP(BACKGROUND_TYPE, BK_BLACK, "black");
    ENUM_MAP(BACKGROUND_TYPE, BK_PATTERN_STATIC, "pattern-static");
    ENUM_MAP(BACKGROUND_TYPE, BK_PATTERN_WAVE, "pattern-wave");
    ENUM_MAP(BACKGROUND_TYPE, BK_IMAGE, "image");
    ENUM_MAP(BACKGROUND_TYPE, BK_MONOCHROME, "monochrome");
    ENUM_MAP(BACKGROUND_TYPE, BK_MONOCHROME_WARM, "monochrome-warm");
    ENUM_MAP(BACKGROUND_TYPE, BK_MONOCHROME_COOL, "monochrome-cool");

    ENUM_MAP(CAMERA_MODE, CAMERA_MODE_TR1, "tr1");
    ENUM_MAP(CAMERA_MODE, CAMERA_MODE_TR2, "tr2");
    ENUM_MAP(CAMERA_MODE, CAMERA_MODE_TR3, "tr3");
    ENUM_MAP(CAMERA_MODE, CAMERA_MODE_TR4, "tr4");

    ENUM_MAP(SAVE_CRYSTAL_MODE, SAVE_CRYSTAL_OFF, "off");
    ENUM_MAP(SAVE_CRYSTAL_MODE, SAVE_CRYSTAL_SAVE, "save");
    ENUM_MAP(SAVE_CRYSTAL_MODE, SAVE_CRYSTAL_SAVE_PICKUP, "save_pickup");
    ENUM_MAP(SAVE_CRYSTAL_MODE, SAVE_CRYSTAL_HEAL, "heal");
    ENUM_MAP(SAVE_CRYSTAL_MODE, SAVE_CRYSTAL_PICKUP, "pickup");

    ENUM_MAP(WALL_GLITCH_MODE, WALL_GLITCH_FIXED, "fixed");
    ENUM_MAP(WALL_GLITCH_MODE, WALL_GLITCH_TR1, "tr1");
    ENUM_MAP(WALL_GLITCH_MODE, WALL_GLITCH_TR2, "tr2");

    ENUM_MAP(JUMP_LOCK_MODE, JUMP_LOCK_LEGACY, "legacy");
    ENUM_MAP(JUMP_LOCK_MODE, JUMP_LOCK_TUNED, "tuned");
    ENUM_MAP(JUMP_LOCK_MODE, JUMP_LOCK_DISABLED, "disabled");

    ENUM_MAP(LOOK_MODE, LOOK_MODE_RESTRICTED, "restricted");
    ENUM_MAP(LOOK_MODE, LOOK_MODE_ENHANCED, "enhanced");
    ENUM_MAP(LOOK_MODE, LOOK_MODE_UNRESTRICTED, "unrestricted");

    ENUM_MAP(RING_MEMORY_MODE, RING_MEMORY_OFF, "off");
    ENUM_MAP(RING_MEMORY_MODE, RING_MEMORY_MAIN, "main-ring");
    ENUM_MAP(RING_MEMORY_MODE, RING_MEMORY_ALL, "all-rings");

    ENUM_MAP(QUICK_GUNS_MODE, QUICK_GUNS_MODE_DRAW_ONLY, "draw-only");
    ENUM_MAP(
        QUICK_GUNS_MODE, QUICK_GUNS_MODE_DRAW_AND_HOLSTER, "draw-and-holster");

    ENUM_MAP(LIGHTING_CONTRAST, LIGHTING_CONTRAST_LOW, "low");
    ENUM_MAP(LIGHTING_CONTRAST, LIGHTING_CONTRAST_MEDIUM, "medium");
    ENUM_MAP(LIGHTING_CONTRAST, LIGHTING_CONTRAST_HIGH, "high");

    ENUM_MAP(BILLBOARD_LOCK_MODE, BILLBOARD_LOCK_NONE, "none");
    ENUM_MAP(BILLBOARD_LOCK_MODE, BILLBOARD_LOCK_ROLL, "roll");
    ENUM_MAP(BILLBOARD_LOCK_MODE, BILLBOARD_LOCK_ROLL_PITCH, "roll-pitch");
    ENUM_MAP(BILLBOARD_LOCK_MODE, BILLBOARD_LOCK_PERSPECTIVE, "perspective");

    ENUM_MAP(TARGET_LOCK_MODE, TARGET_LOCK_MODE_FULL, "full-lock");
    ENUM_MAP(TARGET_LOCK_MODE, TARGET_LOCK_MODE_SEMI, "semi-lock");
    ENUM_MAP(TARGET_LOCK_MODE, TARGET_LOCK_MODE_NONE, "no-lock");

    ENUM_MAP(STATS_STYLE, STATS_STYLE_BARE, "bare");
    ENUM_MAP(STATS_STYLE, STATS_STYLE_BORDERED, "bordered");

    ENUM_MAP(SHADOW_TYPE, SHADOW_TYPE_OCTAGON, "octagon");
    ENUM_MAP(SHADOW_TYPE, SHADOW_TYPE_CIRCLE, "circle");
    ENUM_MAP(SHADOW_TYPE, SHADOW_TYPE_SPRITE, "sprite");

    ENUM_MAP(BLOOD_EFFECTS, BLOOD_EFFECTS_DISABLED, "disabled");
    ENUM_MAP(BLOOD_EFFECTS, BLOOD_EFFECTS_PINK, "pink");
    ENUM_MAP(BLOOD_EFFECTS, BLOOD_EFFECTS_RED, "red");

    ENUM_MAP(SUNGLASSES_MODE, SUNGLASSES_MODE_OFF, "off");
    ENUM_MAP(SUNGLASSES_MODE, SUNGLASSES_MODE_OPAQUE, "opaque");
    ENUM_MAP(SUNGLASSES_MODE, SUNGLASSES_MODE_TRANSPARENT, "transparent");

    ENUM_MAP(ALLY_HOSTILITY_POLICY, ALLY_HOSTILITY_POLICY_SHARED, "shared");
    ENUM_MAP(
        ALLY_HOSTILITY_POLICY, ALLY_HOSTILITY_POLICY_INDIVIDUAL, "individual");

    ENUM_MAP(CREATURE_DROWN_POLICY, CREATURE_DROWN_POLICY_NEVER, "never");
    ENUM_MAP(CREATURE_DROWN_POLICY, CREATURE_DROWN_POLICY_DEFAULT, "default");
    ENUM_MAP(
        CREATURE_DROWN_POLICY, CREATURE_DROWN_POLICY_SUBMERGED, "accurate");

    ENUM_MAP(
        PROJECTILE_AREA_DAMAGE, PROJECTILE_AREA_DAMAGE_SINGLE_SWEEP,
        "single-sweep");
    ENUM_MAP(
        PROJECTILE_AREA_DAMAGE, PROJECTILE_AREA_DAMAGE_MULTI_SWEEP,
        "multi-sweep");

    ENUM_MAP(GAME_MODES_POLICY, GAME_MODES_POLICY_NEVER, "never");
    ENUM_MAP(GAME_MODES_POLICY, GAME_MODES_POLICY_ALWAYS, "always");
    ENUM_MAP(
        GAME_MODES_POLICY, GAME_MODES_POLICY_ON_COMPLETION, "on-completion");

    ENUM_MAP(TARGET_CHANGE_MODE, TARGET_CHANGE_MODE_OFF, "off");
    ENUM_MAP(TARGET_CHANGE_MODE, TARGET_CHANGE_MODE_ENHANCED, "enhanced");
    ENUM_MAP(TARGET_CHANGE_MODE, TARGET_CHANGE_MODE_TR4, "tr4");

    ENUM_MAP(BREEZE_MODE, BREEZE_MODE_OFF, "off");
    ENUM_MAP(BREEZE_MODE, BREEZE_MODE_TR2, "tr2");
    ENUM_MAP(BREEZE_MODE, BREEZE_MODE_TR3, "tr3");
}
