1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00

Include int type alias for uint8_t;

This commit is contained in:
Maru 2017-11-18 00:45:08 -02:00
parent f043049d2b
commit 7789ad382d
4 changed files with 39 additions and 78 deletions

View file

@ -1,5 +1,7 @@
#include "CommonGen.h" #include "CommonGen.h"
#include <stdint.h>
namespace Core { namespace Core {
namespace Common { namespace Common {

View file

@ -1,5 +1,8 @@
#ifndef _COMMON_GEN_H_ #ifndef _COMMON_GEN_H_
#define _COMMON_GEN_H_ #define _COMMON_GEN_H_
#include <stdint.h>
/* 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 */
@ -26,8 +29,6 @@ namespace Common {
ItemManipulation = 14, ItemManipulation = 14,
AdrenalineRush = 15, AdrenalineRush = 15,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//BeastReputationRank.exd //BeastReputationRank.exd
enum class BeastReputationRank : uint8_t enum class BeastReputationRank : uint8_t
@ -42,15 +43,11 @@ namespace Common {
Sworn = 7, Sworn = 7,
Allied = 8, Allied = 8,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//BeastTribe.exd //BeastTribe.exd
enum class BeastTribe : uint8_t enum class BeastTribe : uint8_t
{ {
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ClassJob.exd //ClassJob.exd
enum class ClassJob : uint8_t enum class ClassJob : uint8_t
@ -92,8 +89,6 @@ namespace Common {
Samurai = 34, Samurai = 34,
Redmage = 35, Redmage = 35,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ContentType.exd //ContentType.exd
enum class ContentType : uint8_t enum class ContentType : uint8_t
@ -121,8 +116,6 @@ namespace Common {
WondrousTails = 24, WondrousTails = 24,
CustomDeliveries = 25, CustomDeliveries = 25,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//EmoteCategory.exd //EmoteCategory.exd
enum class EmoteCategory : uint8_t enum class EmoteCategory : uint8_t
@ -131,8 +124,6 @@ namespace Common {
Persistent = 2, Persistent = 2,
Expressions = 3, Expressions = 3,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ExVersion.exd //ExVersion.exd
enum class ExVersion : uint8_t enum class ExVersion : uint8_t
@ -141,8 +132,6 @@ namespace Common {
Heavensward = 1, Heavensward = 1,
Stormblood = 2, Stormblood = 2,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//GrandCompany.exd //GrandCompany.exd
enum class GrandCompany : uint8_t enum class GrandCompany : uint8_t
@ -152,8 +141,6 @@ namespace Common {
OrderoftheTwinAdder = 2, OrderoftheTwinAdder = 2,
ImmortalFlames = 3, ImmortalFlames = 3,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//GuardianDeity.exd //GuardianDeity.exd
enum class GuardianDeity : uint8_t enum class GuardianDeity : uint8_t
@ -171,8 +158,6 @@ namespace Common {
NophicatheMatron = 11, NophicatheMatron = 11,
AlthyktheKeeper = 12, AlthyktheKeeper = 12,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ItemUICategory.exd //ItemUICategory.exd
enum class ItemUICategory : uint8_t enum class ItemUICategory : uint8_t
@ -278,8 +263,6 @@ namespace Common {
FishersSecondaryTool = 99, FishersSecondaryTool = 99,
Currency = 100, Currency = 100,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ItemSearchCategory.exd //ItemSearchCategory.exd
enum class ItemSearchCategory : uint8_t enum class ItemSearchCategory : uint8_t
@ -370,8 +353,6 @@ namespace Common {
RedMagesArms = 84, RedMagesArms = 84,
ScholarsArms = 85, ScholarsArms = 85,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//OnlineStatus.exd //OnlineStatus.exd
enum class OnlineStatus : uint8_t enum class OnlineStatus : uint8_t
@ -424,8 +405,6 @@ namespace Common {
GrandCompany = 46, GrandCompany = 46,
Online = 47, Online = 47,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Race.exd //Race.exd
enum class Race : uint8_t enum class Race : uint8_t
@ -437,8 +416,6 @@ namespace Common {
Roegadyn = 5, Roegadyn = 5,
AuRa = 6, AuRa = 6,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Tribe.exd //Tribe.exd
enum class Tribe : uint8_t enum class Tribe : uint8_t
@ -456,8 +433,6 @@ namespace Common {
Raen = 11, Raen = 11,
Xaela = 12, Xaela = 12,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Town.exd //Town.exd
enum class Town : uint8_t enum class Town : uint8_t
@ -469,8 +444,6 @@ namespace Common {
Ishgard = 4, Ishgard = 4,
Kugane = 7, Kugane = 7,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Weather.exd //Weather.exd
enum class Weather : uint8_t enum class Weather : uint8_t
@ -565,9 +538,6 @@ namespace Common {
Thunder3 = 88, Thunder3 = 88,
DimensionalDisruption3 = 89, DimensionalDisruption3 = 89,
FairSkies9 = 90, FairSkies9 = 90,
};
} }
} }
#endif #endif

View file

@ -1,5 +1,9 @@
[14:21:11][info] Setting up EXD data #ifndef _COMMON_GEN_H_
[14:21:12][info] /* This file has been automatically generated. #define _COMMON_GEN_H_
#include <stdint.h>
/* 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 Core { namespace Core {
@ -7,7 +11,7 @@ namespace Common {
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ActionCategory.exd //ActionCategory.exd
enum ActionCategory : uint8_t enum class ActionCategory : uint8_t
{ {
Autoattack = 1, Autoattack = 1,
Spell = 2, Spell = 2,
@ -24,11 +28,10 @@ namespace Common {
Glamour = 13, Glamour = 13,
ItemManipulation = 14, ItemManipulation = 14,
AdrenalineRush = 15, AdrenalineRush = 15,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//BeastReputationRank.exd //BeastReputationRank.exd
enum BeastReputationRank : uint8_t enum class BeastReputationRank : uint8_t
{ {
None = 0, None = 0,
Neutral = 1, Neutral = 1,
@ -39,25 +42,15 @@ namespace Common {
Honored = 6, Honored = 6,
Sworn = 7, Sworn = 7,
Allied = 8, Allied = 8,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//BeastTribe.exd //BeastTribe.exd
enum BeastTribe : uint8_t enum class BeastTribe : uint8_t
{ {
Amaljaa = 1,
Sylphs = 2,
Kobolds = 3,
Sahagin = 4,
Ixal = 5,
VanuVanu = 6,
Vath = 7,
Moogles = 8,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ClassJob.exd //ClassJob.exd
enum ClassJob : uint8_t enum class ClassJob : uint8_t
{ {
Adventurer = 0, Adventurer = 0,
Gladiator = 1, Gladiator = 1,
@ -95,11 +88,10 @@ namespace Common {
Astrologian = 33, Astrologian = 33,
Samurai = 34, Samurai = 34,
Redmage = 35, Redmage = 35,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ContentType.exd //ContentType.exd
enum ContentType : uint8_t enum class ContentType : uint8_t
{ {
DutyRoulette = 1, DutyRoulette = 1,
Dungeons = 2, Dungeons = 2,
@ -122,39 +114,36 @@ namespace Common {
GoldSaucer = 19, GoldSaucer = 19,
DeepDungeons = 21, DeepDungeons = 21,
WondrousTails = 24, WondrousTails = 24,
}; CustomDeliveries = 25,
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//EmoteCategory.exd //EmoteCategory.exd
enum EmoteCategory : uint8_t enum class EmoteCategory : uint8_t
{ {
General = 1, General = 1,
Persistent = 2, Persistent = 2,
Expressions = 3, Expressions = 3,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ExVersion.exd //ExVersion.exd
enum ExVersion : uint8_t enum class ExVersion : uint8_t
{ {
ARealmReborn = 0, ARealmReborn = 0,
Heavensward = 1, Heavensward = 1,
Stormblood = 2, Stormblood = 2,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//GrandCompany.exd //GrandCompany.exd
enum GrandCompany : uint8_t enum class GrandCompany : uint8_t
{ {
None = 0, None = 0,
Maelstrom = 1, Maelstrom = 1,
OrderoftheTwinAdder = 2, OrderoftheTwinAdder = 2,
ImmortalFlames = 3, ImmortalFlames = 3,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//GuardianDeity.exd //GuardianDeity.exd
enum GuardianDeity : uint8_t enum class GuardianDeity : uint8_t
{ {
HalonetheFury = 1, HalonetheFury = 1,
MenphinatheLover = 2, MenphinatheLover = 2,
@ -168,11 +157,10 @@ namespace Common {
NaldthaltheTraders = 10, NaldthaltheTraders = 10,
NophicatheMatron = 11, NophicatheMatron = 11,
AlthyktheKeeper = 12, AlthyktheKeeper = 12,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ItemUICategory.exd //ItemUICategory.exd
enum ItemUICategory : uint8_t enum class ItemUICategory : uint8_t
{ {
PugilistsArm = 1, PugilistsArm = 1,
GladiatorsArm = 2, GladiatorsArm = 2,
@ -273,11 +261,11 @@ namespace Common {
RedMagesArm = 97, RedMagesArm = 97,
ScholarsArm = 98, ScholarsArm = 98,
FishersSecondaryTool = 99, FishersSecondaryTool = 99,
}; Currency = 100,
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//ItemSearchCategory.exd //ItemSearchCategory.exd
enum ItemSearchCategory : uint8_t enum class ItemSearchCategory : uint8_t
{ {
PrimaryArms = 1, PrimaryArms = 1,
PrimaryTools = 2, PrimaryTools = 2,
@ -364,11 +352,10 @@ namespace Common {
SamuraisArms = 83, SamuraisArms = 83,
RedMagesArms = 84, RedMagesArms = 84,
ScholarsArms = 85, ScholarsArms = 85,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//OnlineStatus.exd //OnlineStatus.exd
enum OnlineStatus : uint8_t enum class OnlineStatus : uint8_t
{ {
Producer = 1, Producer = 1,
GameMaster = 2, GameMaster = 2,
@ -417,11 +404,10 @@ namespace Common {
FreeCompany = 45, FreeCompany = 45,
GrandCompany = 46, GrandCompany = 46,
Online = 47, Online = 47,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Race.exd //Race.exd
enum Race : uint8_t enum class Race : uint8_t
{ {
Hyur = 1, Hyur = 1,
Elezen = 2, Elezen = 2,
@ -429,11 +415,10 @@ namespace Common {
Miqote = 4, Miqote = 4,
Roegadyn = 5, Roegadyn = 5,
AuRa = 6, AuRa = 6,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Tribe.exd //Tribe.exd
enum Tribe : uint8_t enum class Tribe : uint8_t
{ {
Midlander = 1, Midlander = 1,
Highlander = 2, Highlander = 2,
@ -447,11 +432,10 @@ namespace Common {
Hellsguard = 10, Hellsguard = 10,
Raen = 11, Raen = 11,
Xaela = 12, Xaela = 12,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Town.exd //Town.exd
enum Town : uint8_t enum class Town : uint8_t
{ {
Nowheresville = 0, Nowheresville = 0,
LimsaLominsa = 1, LimsaLominsa = 1,
@ -459,11 +443,10 @@ namespace Common {
Uldah = 3, Uldah = 3,
Ishgard = 4, Ishgard = 4,
Kugane = 7, Kugane = 7,
};
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//Weather.exd //Weather.exd
enum Weather : uint8_t enum class Weather : uint8_t
{ {
ClearSkies = 1, ClearSkies = 1,
FairSkies = 2, FairSkies = 2,
@ -554,7 +537,8 @@ namespace Common {
Quicklevin = 87, Quicklevin = 87,
Thunder3 = 88, Thunder3 = 88,
DimensionalDisruption3 = 89, DimensionalDisruption3 = 89,
}; FairSkies9 = 90,
} }
} }
#endif

View file

@ -21,7 +21,7 @@ Core::Data::ExdData g_exdData;
//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\\ffxiv" ); const std::string datLocation( "C:\\Data\\Games\\Final Fantasy XIV\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv" );
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 )
{ {
@ -66,11 +66,14 @@ std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::s
result += " " + str + " = " + std::to_string( id ) + ",\n"; result += " " + str + " = " + std::to_string( id ) + ",\n";
} }
/*
result += result +=
" bool operator==( const " + exd + "& t, const " + type + "& g ) { return static_cast< " + type + " >( t ) == g; }\n" " bool operator==( const " + exd + "& t, const " + type + "& g ) { return static_cast< " + type + " >( t ) == g; }\n"
" bool operator==( const " + type + "& g, const " + exd + "& t ) { return static_cast< " + type + " >( t ) == g; }\n"; " bool operator==( const " + type + "& g, const " + exd + "& t ) { return static_cast< " + type + " >( t ) == g; }\n";
result += " };\n"; result += " };\n";
*/
return result; return result;
} }
@ -85,11 +88,13 @@ int main()
if( !g_exdData.init( datLocation ) ) if( !g_exdData.init( datLocation ) )
{ {
g_log.fatal( "Error setting up EXD data " ); g_log.fatal( "Error setting up EXD data " );
return 0; return 1;
} }
std::string result = "#ifndef _COMMON_GEN_H_\n#define _COMMON_GEN_H_\n"; std::string result = "#ifndef _COMMON_GEN_H_\n#define _COMMON_GEN_H_\n";
result += "\n#include <stdint.h>\n\n";
result += result +=
"/* 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";