// Slot-numbered pickup families, described once and expanded wherever the
// per-slot symbols are needed (catalog ids, names, membership arrays,
// cognate maps, object registration, switch case labels, savegame keys).
//
// Consumers define only the macros they care about before including this
// file; any family macro left undefined falls back to the generic
// X_PICKUP / X_RECEPTACLE / X_RECEPTACLE_DONE hooks, which default to
// nothing. Example - visiting every item/option pair:
//
//     #define X_PICKUP(item, option) { item, option },
//     #include <trx/game/objects/pickups.def>
//     #undef X_PICKUP
//
// Defaulted macros are #undef'd at the bottom of this file; consumers only
// clean up the macros they defined themselves.

#ifndef X_PICKUP
    #define X_PICKUP(item, option)
    #define X_PICKUP_DEFAULTED
#endif
#ifndef X_RECEPTACLE
    #define X_RECEPTACLE(option, receptacle)
    #define X_RECEPTACLE_DEFAULTED
#endif
#ifndef X_RECEPTACLE_DONE
    #define X_RECEPTACLE_DONE(receptacle, done)
    #define X_RECEPTACLE_DONE_DEFAULTED
#endif

#ifndef X_PICKUP_GUN
    #define X_PICKUP_GUN(item, option) X_PICKUP(item, option)
    #define X_PICKUP_GUN_DEFAULTED
#endif
#ifndef X_PICKUP_GUN_AMMO
    #define X_PICKUP_GUN_AMMO(gun_item, item, option) X_PICKUP(item, option)
    #define X_PICKUP_GUN_AMMO_DEFAULTED
#endif
#ifndef X_PICKUP_GUN_AMMO_VARIANT
    #define X_PICKUP_GUN_AMMO_VARIANT(gun_item, item, option)                  \
        X_PICKUP_GUN_AMMO(gun_item, item, option)
    #define X_PICKUP_GUN_AMMO_VARIANT_DEFAULTED
#endif
#ifndef X_PICKUP_MISC
    #define X_PICKUP_MISC(item, option) X_PICKUP(item, option)
    #define X_PICKUP_MISC_DEFAULTED
#endif
#ifndef X_PICKUP_VARIANT
    #define X_PICKUP_VARIANT(item, option) X_PICKUP(item, option)
    #define X_PICKUP_VARIANT_DEFAULTED
#endif
#ifndef X_PICKUP_SUPPLY
    #define X_PICKUP_SUPPLY(item, option) X_PICKUP(item, option)
    #define X_PICKUP_SUPPLY_DEFAULTED
#endif
#ifndef X_PICKUP_SUPPLY_VARIANT
    #define X_PICKUP_SUPPLY_VARIANT(item, option) X_PICKUP_VARIANT(item, option)
    #define X_PICKUP_SUPPLY_VARIANT_DEFAULTED
#endif
#ifndef X_PICKUP_SPECIAL
    #define X_PICKUP_SPECIAL(item, option) X_PICKUP(item, option)
    #define X_PICKUP_SPECIAL_DEFAULTED
#endif
#ifndef X_PICKUP_SECRET
    #define X_PICKUP_SECRET(item, option) X_PICKUP(item, option)
    #define X_PICKUP_SECRET_DEFAULTED
#endif

#ifndef X_PICKUP_NUMBERED
    #define X_PICKUP_NUMBERED(item, option) X_PICKUP(item, option)
    #define X_PICKUP_NUMBERED_DEFAULTED
#endif

#ifndef X_PICKUP_KEY
    #define X_PICKUP_KEY(n)                                                    \
        X_PICKUP_NUMBERED(O_KEY_ITEM_##n, O_KEY_OPTION_##n)                    \
        X_RECEPTACLE(O_KEY_OPTION_##n, O_KEY_HOLE_##n)
    #define X_PICKUP_KEY_DEFAULTED
#endif
#ifndef X_PICKUP_PUZZLE
    #define X_PICKUP_PUZZLE(n)                                                 \
        X_PICKUP_NUMBERED(O_PUZZLE_ITEM_##n, O_PUZZLE_OPTION_##n)              \
        X_RECEPTACLE(O_PUZZLE_OPTION_##n, O_PUZZLE_HOLE_##n)                   \
        X_RECEPTACLE_DONE(O_PUZZLE_HOLE_##n, O_PUZZLE_DONE_##n)
    #define X_PICKUP_PUZZLE_DEFAULTED
#endif
#ifndef X_PICKUP_PICKUP
    #define X_PICKUP_PICKUP(n)                                                 \
        X_PICKUP_NUMBERED(O_PICKUP_ITEM_##n, O_PICKUP_OPTION_##n)
    #define X_PICKUP_PICKUP_DEFAULTED
#endif
#ifndef X_PICKUP_QUEST
    #define X_PICKUP_QUEST(n)                                                  \
        X_PICKUP_NUMBERED(O_QUEST_ITEM_##n, O_QUEST_OPTION_##n)
    #define X_PICKUP_QUEST_DEFAULTED
#endif
#ifndef X_PICKUP_KEY_COMBO
    #define X_PICKUP_KEY_COMBO(n, c)                                           \
        X_PICKUP_NUMBERED(                                                     \
            O_KEY_ITEM_##n##_COMBO_##c, O_KEY_OPTION_##n##_COMBO_##c)
    #define X_PICKUP_KEY_COMBO_DEFAULTED
#endif
#ifndef X_PICKUP_PUZZLE_COMBO
    #define X_PICKUP_PUZZLE_COMBO(n, c)                                        \
        X_PICKUP_NUMBERED(                                                     \
            O_PUZZLE_ITEM_##n##_COMBO_##c, O_PUZZLE_OPTION_##n##_COMBO_##c)
    #define X_PICKUP_PUZZLE_COMBO_DEFAULTED
#endif
#ifndef X_PICKUP_PICKUP_COMBO
    #define X_PICKUP_PICKUP_COMBO(n, c)                                        \
        X_PICKUP_NUMBERED(                                                     \
            O_PICKUP_ITEM_##n##_COMBO_##c, O_PICKUP_OPTION_##n##_COMBO_##c)
    #define X_PICKUP_PICKUP_COMBO_DEFAULTED
#endif
#ifndef X_PICKUP_EXAMINE
    #define X_PICKUP_EXAMINE(n)                                                \
        X_PICKUP_NUMBERED(O_EXAMINE_ITEM_##n, O_EXAMINE_OPTION_##n)
    #define X_PICKUP_EXAMINE_DEFAULTED
#endif

X_PICKUP_GUN(O_PISTOL_ITEM, O_PISTOL_OPTION)
X_PICKUP_GUN_AMMO(O_PISTOL_ITEM, O_PISTOL_AMMO_ITEM, O_PISTOL_AMMO_OPTION)
X_PICKUP_GUN(O_SHOTGUN_ITEM, O_SHOTGUN_OPTION)
X_PICKUP_GUN_AMMO(O_SHOTGUN_ITEM, O_SHOTGUN_AMMO_ITEM, O_SHOTGUN_AMMO_OPTION)
X_PICKUP_GUN_AMMO_VARIANT(
    O_SHOTGUN_ITEM, O_SHOTGUN_AMMO_2_ITEM, O_SHOTGUN_AMMO_OPTION)
X_PICKUP_GUN(O_MAGNUM_ITEM, O_MAGNUM_OPTION)
X_PICKUP_GUN_AMMO(O_MAGNUM_ITEM, O_MAGNUM_AMMO_ITEM, O_MAGNUM_AMMO_OPTION)
X_PICKUP_GUN(O_AUTOS_ITEM, O_AUTOS_OPTION)
X_PICKUP_GUN_AMMO(O_AUTOS_ITEM, O_AUTOS_AMMO_ITEM, O_AUTOS_AMMO_OPTION)
X_PICKUP_GUN(O_DESERT_EAGLE_ITEM, O_DESERT_EAGLE_OPTION)
X_PICKUP_GUN_AMMO(
    O_DESERT_EAGLE_ITEM, O_DESERT_EAGLE_AMMO_ITEM, O_DESERT_EAGLE_AMMO_OPTION)
X_PICKUP_GUN(O_UZI_ITEM, O_UZI_OPTION)
X_PICKUP_GUN_AMMO(O_UZI_ITEM, O_UZI_AMMO_ITEM, O_UZI_AMMO_OPTION)
X_PICKUP_GUN(O_HARPOON_ITEM, O_HARPOON_OPTION)
X_PICKUP_GUN_AMMO(O_HARPOON_ITEM, O_HARPOON_AMMO_ITEM, O_HARPOON_AMMO_OPTION)
X_PICKUP_GUN(O_M16_ITEM, O_M16_OPTION)
X_PICKUP_GUN_AMMO(O_M16_ITEM, O_M16_AMMO_ITEM, O_M16_AMMO_OPTION)
X_PICKUP_GUN(O_MP5_ITEM, O_MP5_OPTION)
X_PICKUP_GUN_AMMO(O_MP5_ITEM, O_MP5_AMMO_ITEM, O_MP5_AMMO_OPTION)
X_PICKUP_GUN(O_GRENADE_GUN_ITEM, O_GRENADE_GUN_OPTION)
X_PICKUP_GUN_AMMO(
    O_GRENADE_GUN_ITEM, O_GRENADE_AMMO_ITEM, O_GRENADE_AMMO_OPTION)
X_PICKUP_GUN_AMMO_VARIANT(
    O_GRENADE_GUN_ITEM, O_GRENADE_AMMO_2_ITEM, O_GRENADE_AMMO_OPTION)
X_PICKUP_GUN_AMMO_VARIANT(
    O_GRENADE_GUN_ITEM, O_GRENADE_AMMO_3_ITEM, O_GRENADE_AMMO_OPTION)
X_PICKUP_GUN(O_ROCKET_GUN_ITEM, O_ROCKET_GUN_OPTION)
X_PICKUP_GUN_AMMO(
    O_ROCKET_GUN_ITEM, O_ROCKET_AMMO_ITEM, O_ROCKET_AMMO_OPTION)
X_PICKUP_GUN(O_CROSSBOW_ITEM, O_CROSSBOW_OPTION)
X_PICKUP_GUN_AMMO(
    O_CROSSBOW_ITEM, O_CROSSBOW_AMMO_1_ITEM, O_CROSSBOW_AMMO_OPTION)
X_PICKUP_GUN_AMMO_VARIANT(
    O_CROSSBOW_ITEM, O_CROSSBOW_AMMO_2_ITEM, O_CROSSBOW_AMMO_OPTION)
X_PICKUP_GUN_AMMO_VARIANT(
    O_CROSSBOW_ITEM, O_CROSSBOW_AMMO_3_ITEM, O_CROSSBOW_AMMO_OPTION)
X_PICKUP_GUN(O_REVOLVER_ITEM, O_REVOLVER_OPTION)
X_PICKUP_GUN_AMMO(
    O_REVOLVER_ITEM, O_REVOLVER_AMMO_ITEM, O_REVOLVER_AMMO_OPTION)

X_PICKUP_SUPPLY(O_EXPLOSIVE_ITEM, O_EXPLOSIVE_OPTION)
X_PICKUP_SUPPLY(O_SMALL_MEDIPACK_ITEM, O_SMALL_MEDIPACK_OPTION)
X_PICKUP_SUPPLY(O_LARGE_MEDIPACK_ITEM, O_LARGE_MEDIPACK_OPTION)
X_PICKUP_SUPPLY(O_FLAREBOX_ITEM, O_FLAREBOX_OPTION)
X_PICKUP_SUPPLY_VARIANT(O_FLARE_ITEM, O_FLAREBOX_OPTION)
X_PICKUP_MISC(O_LEADBAR_ITEM, O_LEADBAR_OPTION)
X_PICKUP_MISC(O_LASERSIGHT_ITEM, O_LASERSIGHT_OPTION)
X_PICKUP_MISC(O_BINOCULARS_ITEM, O_BINOCULARS_OPTION)
X_PICKUP_MISC(O_CROWBAR_ITEM, O_CROWBAR_OPTION)
X_PICKUP_MISC(O_WATERSKIN_1_EMPTY, O_WATERSKIN_1_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_1_1, O_WATERSKIN_1_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_1_2, O_WATERSKIN_1_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_1_3, O_WATERSKIN_1_OPTION)
X_PICKUP_MISC(O_WATERSKIN_2_EMPTY, O_WATERSKIN_2_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_2_1, O_WATERSKIN_2_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_2_2, O_WATERSKIN_2_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_2_3, O_WATERSKIN_2_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_2_4, O_WATERSKIN_2_OPTION)
X_PICKUP_VARIANT(O_WATERSKIN_2_5, O_WATERSKIN_2_OPTION)
X_PICKUP_SPECIAL(O_SCION_ITEM_1, O_SCION_OPTION)
X_PICKUP_VARIANT(O_SCION_ITEM_2, O_SCION_OPTION)
X_PICKUP_SECRET(O_SECRET_1, O_SECRET_1_OPTION)
X_PICKUP_SECRET(O_SECRET_2, O_SECRET_2_OPTION)
X_PICKUP_SECRET(O_SECRET_3, O_SECRET_3_OPTION)

X_PICKUP_KEY(1)
X_PICKUP_KEY(2)
X_PICKUP_KEY(3)
X_PICKUP_KEY(4)
X_PICKUP_KEY(5)
X_PICKUP_KEY(6)
X_PICKUP_KEY(7)
X_PICKUP_KEY(8)
X_PICKUP_KEY(9)
X_PICKUP_KEY(10)
X_PICKUP_KEY(11)
X_PICKUP_KEY(12)

X_PICKUP_PUZZLE(1)
X_PICKUP_PUZZLE(2)
X_PICKUP_PUZZLE(3)
X_PICKUP_PUZZLE(4)
X_PICKUP_PUZZLE(5)
X_PICKUP_PUZZLE(6)
X_PICKUP_PUZZLE(7)
X_PICKUP_PUZZLE(8)
X_PICKUP_PUZZLE(9)
X_PICKUP_PUZZLE(10)
X_PICKUP_PUZZLE(11)
X_PICKUP_PUZZLE(12)

X_PICKUP_PICKUP(1)
X_PICKUP_PICKUP(2)
X_PICKUP_PICKUP(3)
X_PICKUP_PICKUP(4)

X_PICKUP_QUEST(1)
X_PICKUP_QUEST(2)
X_PICKUP_QUEST(3)
X_PICKUP_QUEST(4)
X_PICKUP_QUEST(5)
X_PICKUP_QUEST(6)

X_PICKUP_KEY_COMBO(1, 1)
X_PICKUP_KEY_COMBO(1, 2)
X_PICKUP_KEY_COMBO(2, 1)
X_PICKUP_KEY_COMBO(2, 2)
X_PICKUP_KEY_COMBO(3, 1)
X_PICKUP_KEY_COMBO(3, 2)
X_PICKUP_KEY_COMBO(4, 1)
X_PICKUP_KEY_COMBO(4, 2)
X_PICKUP_KEY_COMBO(5, 1)
X_PICKUP_KEY_COMBO(5, 2)
X_PICKUP_KEY_COMBO(6, 1)
X_PICKUP_KEY_COMBO(6, 2)
X_PICKUP_KEY_COMBO(7, 1)
X_PICKUP_KEY_COMBO(7, 2)
X_PICKUP_KEY_COMBO(8, 1)
X_PICKUP_KEY_COMBO(8, 2)

X_PICKUP_PUZZLE_COMBO(1, 1)
X_PICKUP_PUZZLE_COMBO(1, 2)
X_PICKUP_PUZZLE_COMBO(2, 1)
X_PICKUP_PUZZLE_COMBO(2, 2)
X_PICKUP_PUZZLE_COMBO(3, 1)
X_PICKUP_PUZZLE_COMBO(3, 2)
X_PICKUP_PUZZLE_COMBO(4, 1)
X_PICKUP_PUZZLE_COMBO(4, 2)
X_PICKUP_PUZZLE_COMBO(5, 1)
X_PICKUP_PUZZLE_COMBO(5, 2)
X_PICKUP_PUZZLE_COMBO(6, 1)
X_PICKUP_PUZZLE_COMBO(6, 2)
X_PICKUP_PUZZLE_COMBO(7, 1)
X_PICKUP_PUZZLE_COMBO(7, 2)
X_PICKUP_PUZZLE_COMBO(8, 1)
X_PICKUP_PUZZLE_COMBO(8, 2)

X_PICKUP_PICKUP_COMBO(1, 1)
X_PICKUP_PICKUP_COMBO(1, 2)
X_PICKUP_PICKUP_COMBO(2, 1)
X_PICKUP_PICKUP_COMBO(2, 2)
X_PICKUP_PICKUP_COMBO(3, 1)
X_PICKUP_PICKUP_COMBO(3, 2)
X_PICKUP_PICKUP_COMBO(4, 1)
X_PICKUP_PICKUP_COMBO(4, 2)

X_PICKUP_EXAMINE(1)
X_PICKUP_EXAMINE(2)
X_PICKUP_EXAMINE(3)

#ifdef X_PICKUP_SPECIAL_DEFAULTED
    #undef X_PICKUP_SPECIAL
    #undef X_PICKUP_SPECIAL_DEFAULTED
#endif
#ifdef X_PICKUP_SUPPLY_VARIANT_DEFAULTED
    #undef X_PICKUP_SUPPLY_VARIANT
    #undef X_PICKUP_SUPPLY_VARIANT_DEFAULTED
#endif
#ifdef X_PICKUP_SUPPLY_DEFAULTED
    #undef X_PICKUP_SUPPLY
    #undef X_PICKUP_SUPPLY_DEFAULTED
#endif
#ifdef X_PICKUP_SECRET_DEFAULTED
    #undef X_PICKUP_SECRET
    #undef X_PICKUP_SECRET_DEFAULTED
#endif
#ifdef X_PICKUP_VARIANT_DEFAULTED
    #undef X_PICKUP_VARIANT
    #undef X_PICKUP_VARIANT_DEFAULTED
#endif
#ifdef X_PICKUP_MISC_DEFAULTED
    #undef X_PICKUP_MISC
    #undef X_PICKUP_MISC_DEFAULTED
#endif
#ifdef X_PICKUP_GUN_AMMO_VARIANT_DEFAULTED
    #undef X_PICKUP_GUN_AMMO_VARIANT
    #undef X_PICKUP_GUN_AMMO_VARIANT_DEFAULTED
#endif
#ifdef X_PICKUP_GUN_AMMO_DEFAULTED
    #undef X_PICKUP_GUN_AMMO
    #undef X_PICKUP_GUN_AMMO_DEFAULTED
#endif
#ifdef X_PICKUP_GUN_DEFAULTED
    #undef X_PICKUP_GUN
    #undef X_PICKUP_GUN_DEFAULTED
#endif
#ifdef X_PICKUP_EXAMINE_DEFAULTED
    #undef X_PICKUP_EXAMINE
    #undef X_PICKUP_EXAMINE_DEFAULTED
#endif
#ifdef X_PICKUP_PICKUP_COMBO_DEFAULTED
    #undef X_PICKUP_PICKUP_COMBO
    #undef X_PICKUP_PICKUP_COMBO_DEFAULTED
#endif
#ifdef X_PICKUP_PUZZLE_COMBO_DEFAULTED
    #undef X_PICKUP_PUZZLE_COMBO
    #undef X_PICKUP_PUZZLE_COMBO_DEFAULTED
#endif
#ifdef X_PICKUP_KEY_COMBO_DEFAULTED
    #undef X_PICKUP_KEY_COMBO
    #undef X_PICKUP_KEY_COMBO_DEFAULTED
#endif
#ifdef X_PICKUP_QUEST_DEFAULTED
    #undef X_PICKUP_QUEST
    #undef X_PICKUP_QUEST_DEFAULTED
#endif
#ifdef X_PICKUP_PICKUP_DEFAULTED
    #undef X_PICKUP_PICKUP
    #undef X_PICKUP_PICKUP_DEFAULTED
#endif
#ifdef X_PICKUP_PUZZLE_DEFAULTED
    #undef X_PICKUP_PUZZLE
    #undef X_PICKUP_PUZZLE_DEFAULTED
#endif
#ifdef X_PICKUP_KEY_DEFAULTED
    #undef X_PICKUP_KEY
    #undef X_PICKUP_KEY_DEFAULTED
#endif
#ifdef X_PICKUP_NUMBERED_DEFAULTED
    #undef X_PICKUP_NUMBERED
    #undef X_PICKUP_NUMBERED_DEFAULTED
#endif
#ifdef X_RECEPTACLE_DONE_DEFAULTED
    #undef X_RECEPTACLE_DONE
    #undef X_RECEPTACLE_DONE_DEFAULTED
#endif
#ifdef X_RECEPTACLE_DEFAULTED
    #undef X_RECEPTACLE
    #undef X_RECEPTACLE_DEFAULTED
#endif
#ifdef X_PICKUP_DEFAULTED
    #undef X_PICKUP
    #undef X_PICKUP_DEFAULTED
#endif
