1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-02 16:57:47 +00:00

add path arg to common gen, new common gen file

This commit is contained in:
NotAdam 2019-06-28 20:21:58 +10:00
parent 46c9da6533
commit 3fe84d5a63
2 changed files with 47 additions and 17 deletions

View file

@ -6,8 +6,7 @@
/* This file has been automatically generated. /* This file has been automatically generated.
Changes will be lost upon regeneration. Changes will be lost upon regeneration.
To change the content edit tools/exd_common_gen */ To change the content edit tools/exd_common_gen */
namespace Sapphire { namespace Sapphire::Common {
namespace Common {
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ActionCategory.exd //ActionCategory.exd
@ -173,6 +172,8 @@ enum class ClassJob : uint8_t
Samurai = 34, Samurai = 34,
Redmage = 35, Redmage = 35,
Bluemage = 36, Bluemage = 36,
Gunbreaker = 37,
Dancer = 38,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -199,14 +200,10 @@ enum class ContentType : uint8_t
DisciplesoftheHand = 17, DisciplesoftheHand = 17,
RetainerVentures = 18, RetainerVentures = 18,
GoldSaucer = 19, GoldSaucer = 19,
one = 20,
DeepDungeons = 21, DeepDungeons = 21,
two = 22,
three = 23,
WondrousTails = 24, WondrousTails = 24,
CustomDeliveries = 25, CustomDeliveries = 25,
Eureka = 26, Eureka = 26,
four = 27,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -217,7 +214,6 @@ enum class EmoteCategory : uint8_t
General = 1, General = 1,
Special = 2, Special = 2,
Expressions = 3, Expressions = 3,
one = 4,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -227,7 +223,7 @@ enum class ExVersion : uint8_t
ARealmReborn = 0, ARealmReborn = 0,
Heavensward = 1, Heavensward = 1,
Stormblood = 2, Stormblood = 2,
three = 3, Shadowbringers = 3,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -369,6 +365,8 @@ enum class ItemUICategory : uint8_t
SubmersibleBow = 103, SubmersibleBow = 103,
SubmersibleBridge = 104, SubmersibleBridge = 104,
BlueMagesArm = 105, BlueMagesArm = 105,
GunbreakersArm = 106,
DancersArm = 107,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -393,7 +391,7 @@ enum class ItemSearchCategory : uint8_t
ConjurersArms = 15, ConjurersArms = 15,
ArcanistsArms = 16, ArcanistsArms = 16,
Shields = 17, Shields = 17,
ThrowingWeapons = 18, DancersArms = 18,
CarpentersTools = 19, CarpentersTools = 19,
BlacksmithsTools = 20, BlacksmithsTools = 20,
ArmorersTools = 21, ArmorersTools = 21,
@ -454,13 +452,15 @@ enum class ItemSearchCategory : uint8_t
DarkKnightsArms = 76, DarkKnightsArms = 76,
MachinistsArms = 77, MachinistsArms = 77,
AstrologiansArms = 78, AstrologiansArms = 78,
Airship_SubmersibleComponents = 79, AirshipSubmersibleComponents = 79,
OrchestrionComponents = 80, OrchestrionComponents = 80,
GardeningItems = 81, GardeningItems = 81,
Paintings = 82, Paintings = 82,
SamuraisArms = 83, SamuraisArms = 83,
RedMagesArms = 84, RedMagesArms = 84,
ScholarsArms = 85, ScholarsArms = 85,
GunbreakersArms = 86,
ThrowingWeapons = 87,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -527,6 +527,8 @@ enum class Race : uint8_t
Miqote = 4, Miqote = 4,
Roegadyn = 5, Roegadyn = 5,
AuRa = 6, AuRa = 6,
Hrothgar = 7,
Viera = 8,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -546,6 +548,10 @@ enum class Tribe : uint8_t
Hellsguard = 10, Hellsguard = 10,
Raen = 11, Raen = 11,
Xaela = 12, Xaela = 12,
Helions = 13,
TheLost = 14,
Rava = 15,
Veena = 16,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -558,6 +564,7 @@ enum class Town : uint8_t
Uldah = 3, Uldah = 3,
Ishgard = 4, Ishgard = 4,
Kugane = 7, Kugane = 7,
TheCrystarium = 10,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -680,7 +687,21 @@ enum class Weather : uint8_t
TrueBlue = 113, TrueBlue = 113,
TrueBlue1 = 114, TrueBlue1 = 114,
TrueBlue2 = 115, TrueBlue2 = 115,
UmbralTurbulence = 116,
TrueBlue3 = 117, TrueBlue3 = 117,
EverlastingLight = 118,
Gales2 = 119,
Termination = 120,
Termination1 = 121,
Dreams = 122,
Dreams1 = 123,
Dreams2 = 124,
Brilliance = 125,
Brilliance1 = 126,
Termination2 = 127,
Termination3 = 128,
EverlastingLight1 = 129,
Termination4 = 131,
}; };
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -695,7 +716,7 @@ enum class HousingAppeal : uint8_t
Tavern = 5, Tavern = 5,
Eatery = 6, Eatery = 6,
ImmersiveExperience = 7, ImmersiveExperience = 7,
Cafe = 8, Café = 8,
Aquarium = 9, Aquarium = 9,
Sanctum = 10, Sanctum = 10,
Venue = 11, Venue = 11,
@ -703,8 +724,12 @@ enum class HousingAppeal : uint8_t
Library = 14, Library = 14,
PhotoStudio = 15, PhotoStudio = 15,
HauntedHouse = 16, HauntedHouse = 16,
Atelier = 17,
Bathhouse = 18,
Garden = 19,
FarEastern = 20,
}; };
}
} }
#endif #endif

View file

@ -21,7 +21,7 @@ Sapphire::Data::ExdDataGenerated g_exdData;
using namespace Sapphire; using namespace Sapphire;
//const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); //const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" );
const std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" ); std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" );
std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::string& type, bool useLang = true ) std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::string& type, bool useLang = true )
{ {
@ -86,13 +86,20 @@ std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::s
} }
int main() int main( int argc, char** argv )
{ {
Logger::init( "commongen" ); Logger::init( "commongen" );
Logger::info( "Setting up EXD data" ); Logger::info( "Setting up EXD data" );
if( argc > 1 )
{
Logger::info( "using dat path: {0}", std::string( argv[ 1 ] ) );
datLocation = std::string( argv[ 1 ] );
}
if( !g_exdData.init( datLocation ) ) if( !g_exdData.init( datLocation ) )
{ {
Logger::fatal( "Error setting up EXD data " ); Logger::fatal( "Error setting up EXD data " );
@ -107,8 +114,7 @@ int main()
"/* This file has been automatically generated.\n Changes will be lost upon regeneration.\n To change the content edit tools/exd_common_gen */\n"; "/* This file has been automatically generated.\n Changes will be lost upon regeneration.\n To change the content edit tools/exd_common_gen */\n";
result += "namespace Sapphire {\n"; result += "namespace Sapphire::Common {\n";
result += "namespace Common {\n";
result += generateEnum( "ActionCategory", 0, "uint8_t" ); result += generateEnum( "ActionCategory", 0, "uint8_t" );
result += generateEnum( "BaseParam", 1, "uint8_t" ); result += generateEnum( "BaseParam", 1, "uint8_t" );
result += generateEnum( "BeastReputationRank", 1, "uint8_t" ); result += generateEnum( "BeastReputationRank", 1, "uint8_t" );
@ -127,7 +133,6 @@ int main()
result += generateEnum( "Town", 0, "uint8_t" ); result += generateEnum( "Town", 0, "uint8_t" );
result += generateEnum( "Weather", 1, "uint8_t" ); result += generateEnum( "Weather", 1, "uint8_t" );
result += generateEnum( "HousingAppeal", 0, "uint8_t" ); result += generateEnum( "HousingAppeal", 0, "uint8_t" );
result += "}\n";
result += "}\n#endif\n"; result += "}\n#endif\n";
Logger::info( result ); Logger::info( result );
return 0; return 0;