This is the first of many commits to improve code quality, and try to tame my bad looking code. Types such as Slot and Race are now living under types/ and have dedicated functions to go between ids and enumerations without a heavy std::map. A new repository API lives in a new SqPack header, which replaces the old crusty way of fetching repository information in GameData. Building equipment paths now live in libxiv (moved from novus) provided you have a model id. Standard methods to build index and dat filenames are provided in their functions now too.
23 lines
No EOL
369 B
C++
23 lines
No EOL
369 B
C++
#pragma once
|
|
|
|
#include <string_view>
|
|
#include <optional>
|
|
|
|
enum class Slot {
|
|
Head,
|
|
Hands,
|
|
Legs,
|
|
Feet,
|
|
Body,
|
|
Earring,
|
|
Neck,
|
|
Rings,
|
|
Wrists
|
|
};
|
|
|
|
/*
|
|
* This gets the slot abbreviation used in model paths. For example, Head returns "met".
|
|
*/
|
|
std::string_view get_slot_abbreviation(Slot slot);
|
|
|
|
std::optional<Slot> get_slot_from_id(int id); |