* Add extraction of loading screens to StuffExtract
Also corrected mapinfo extraction
This commit is contained in:
parent
03d67b79eb
commit
dd94c79d1d
@ -193,7 +193,7 @@ enum MapEnum
|
|||||||
{
|
{
|
||||||
MAP_ID = 0,
|
MAP_ID = 0,
|
||||||
MAP_NAME_GENERAL = 1,
|
MAP_NAME_GENERAL = 1,
|
||||||
MAP_NAME1 = 4,
|
MAP_NAME1 = 5,
|
||||||
MAP_NAME2,
|
MAP_NAME2,
|
||||||
MAP_NAME3,
|
MAP_NAME3,
|
||||||
MAP_NAME4,
|
MAP_NAME4,
|
||||||
@ -201,32 +201,86 @@ enum MapEnum
|
|||||||
MAP_NAME6,
|
MAP_NAME6,
|
||||||
MAP_NAME7,
|
MAP_NAME7,
|
||||||
MAP_NAME8,
|
MAP_NAME8,
|
||||||
MAP_END = 75
|
MAP_NAME9,
|
||||||
|
MAP_NAME10,
|
||||||
|
MAP_NAME11,
|
||||||
|
MAP_NAME12,
|
||||||
|
MAP_NAME13,
|
||||||
|
MAP_NAME14,
|
||||||
|
MAP_NAME15,
|
||||||
|
MAP_NAME16,
|
||||||
|
MAP_DESCR_A1 = 23,
|
||||||
|
MAP_DESCR_A2,
|
||||||
|
MAP_DESCR_A3,
|
||||||
|
MAP_DESCR_A4,
|
||||||
|
MAP_DESCR_A5,
|
||||||
|
MAP_DESCR_A6,
|
||||||
|
MAP_DESCR_A7,
|
||||||
|
MAP_DESCR_A8,
|
||||||
|
MAP_DESCR_A9,
|
||||||
|
MAP_DESCR_A10,
|
||||||
|
MAP_DESCR_A11,
|
||||||
|
MAP_DESCR_A12,
|
||||||
|
MAP_DESCR_A13,
|
||||||
|
MAP_DESCR_A14,
|
||||||
|
MAP_DESCR_A15,
|
||||||
|
MAP_DESCR_A16,
|
||||||
|
MAP_DESCR_H1 = 40,
|
||||||
|
MAP_DESCR_H2,
|
||||||
|
MAP_DESCR_H3,
|
||||||
|
MAP_DESCR_H4,
|
||||||
|
MAP_DESCR_H5,
|
||||||
|
MAP_DESCR_H6,
|
||||||
|
MAP_DESCR_H7,
|
||||||
|
MAP_DESCR_H8,
|
||||||
|
MAP_DESCR_H9,
|
||||||
|
MAP_DESCR_H10,
|
||||||
|
MAP_DESCR_H11,
|
||||||
|
MAP_DESCR_H12,
|
||||||
|
MAP_DESCR_H13,
|
||||||
|
MAP_DESCR_H14,
|
||||||
|
MAP_DESCR_H15,
|
||||||
|
MAP_DESCR_H16,
|
||||||
|
MAP_LOADINGSCREEN = 57,
|
||||||
|
MAP_END = 66
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *MapFieldNames[] =
|
static const char *MapFieldNames[] =
|
||||||
{
|
{
|
||||||
"","name_general","","","name","name","name","name","name","name",
|
"", "name_general","", "", "", "name", "name", "name", "name", "name",
|
||||||
"name","name","","","","","","","","",
|
"name", "name", "name", "name", "name", "name", "name", "name", "name", "name",
|
||||||
"","","","","","","","","","",
|
"name", "", "", "descrA","descrA","descrA","descrA","descrA", "descrA","descrA",
|
||||||
"","","","","","","","","","",
|
"descrA","descrA", "descrA","descrA","descrA","descrA","descrA","descrA", "descrA","",
|
||||||
"","","","","","","","","","",
|
"descrH","descrH", "descrH","descrH","descrH","descrH","descrH","descrH", "descrH","descrH",
|
||||||
"","","","","","","","","","",
|
"descrH","descrH", "descrH","descrH","descrH","descrH","", "loadingscreen","", "",
|
||||||
"","","","","","","","","","",
|
"", "", "", "", "", ""
|
||||||
"","","","",
|
|
||||||
""
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *MapFormat =
|
static const char *MapFormat =
|
||||||
{
|
{
|
||||||
"isxxssssss"
|
"isxxxsssss"
|
||||||
"ssxxxxxxxx"
|
"ssssssssss"
|
||||||
"xxxxxxxxxx"
|
"sxxsssssss"
|
||||||
"xxxxxxxxxx"
|
"sssssssssx"
|
||||||
"xxxxxxxxxx"
|
"ssssssssss"
|
||||||
"xxxxxxxxxx"
|
"ssssssxixx"
|
||||||
"xxxxxxxxxx"
|
"xxxxxx"
|
||||||
"xxxxx"
|
};
|
||||||
|
|
||||||
|
enum LoadingScreenEnum
|
||||||
|
{
|
||||||
|
LOADINGSCREEN_ID = 0,
|
||||||
|
LOADINGSCREEN_MAPNAME,
|
||||||
|
LOADINGSCREEN_FILE,
|
||||||
|
LOADINGSCREEN_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *LoadingScreenFieldNames[] = {
|
||||||
|
"","mapname","loadingscreen"
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *LoadingScreenFormat = {
|
||||||
|
"iss"
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AreaTableEnum
|
enum AreaTableEnum
|
||||||
|
|||||||
@ -38,7 +38,7 @@ bool DBCFile::open()
|
|||||||
f.read((char*)&nb,4); // Number of fields
|
f.read((char*)&nb,4); // Number of fields
|
||||||
f.read((char*)&es,4); // Size of a record
|
f.read((char*)&es,4); // Size of a record
|
||||||
f.read((char*)&ss,4); // String size
|
f.read((char*)&ss,4); // String size
|
||||||
|
|
||||||
recordSize = es;
|
recordSize = es;
|
||||||
recordCount = na;
|
recordCount = na;
|
||||||
fieldCount = nb;
|
fieldCount = nb;
|
||||||
@ -69,7 +69,7 @@ bool DBCFile::openmem(ByteBuffer bb)
|
|||||||
|
|
||||||
if(memcmp(&hdr,"WDBC",4)) // check if its a valid dbc file
|
if(memcmp(&hdr,"WDBC",4)) // check if its a valid dbc file
|
||||||
{
|
{
|
||||||
printf("not a valid WDB File??\n");
|
printf("not a valid DBC File??\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public:
|
|||||||
Iterator & operator++() {
|
Iterator & operator++() {
|
||||||
record.offset += record.file.recordSize;
|
record.offset += record.file.recordSize;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
/// Return address of current instance
|
/// Return address of current instance
|
||||||
Record const & operator*() const { return record; }
|
Record const & operator*() const { return record; }
|
||||||
const Record* operator->() const {
|
const Record* operator->() const {
|
||||||
|
|||||||
@ -275,9 +275,9 @@ bool ConvertDBC(void)
|
|||||||
std::map<uint8,std::string> racemap; // needed to extract other dbc files correctly
|
std::map<uint8,std::string> racemap; // needed to extract other dbc files correctly
|
||||||
std::map<uint8,uint32> classmask; //from CharBaseInfo.dbc
|
std::map<uint8,uint32> classmask; //from CharBaseInfo.dbc
|
||||||
SCPStorageMap EmoteDataStorage,RaceDataStorage,SoundDataStorage,MapDataStorage,ZoneDataStorage,ItemDisplayInfoStorage,
|
SCPStorageMap EmoteDataStorage,RaceDataStorage,SoundDataStorage,MapDataStorage,ZoneDataStorage,ItemDisplayInfoStorage,
|
||||||
CreatureModelStorage,CreatureDisplayInfoStorage,NPCSoundStorage,CharSectionStorage, GameObjectDisplayInfoStorage, ChrBaseInfoStorage; // will store the converted data from dbc files
|
CreatureModelStorage,CreatureDisplayInfoStorage,NPCSoundStorage,CharSectionStorage, GameObjectDisplayInfoStorage, ChrBaseInfoStorage, LoadingScreenStorage; // will store the converted data from dbc files
|
||||||
DBCFile EmotesText,EmotesTextData,EmotesTextSound,ChrRaces,SoundEntries,Map,AreaTable,ItemDisplayInfo,
|
DBCFile EmotesText,EmotesTextData,EmotesTextSound,ChrRaces,SoundEntries,Map,AreaTable,ItemDisplayInfo,
|
||||||
CreatureModelData,CreatureDisplayInfo,NPCSounds,CharSections,GameObjectDisplayInfo, ChrBaseInfo;
|
CreatureModelData,CreatureDisplayInfo,NPCSounds,CharSections,GameObjectDisplayInfo, ChrBaseInfo, LoadingScreen;
|
||||||
printf("Opening DBC archive...\n");
|
printf("Opening DBC archive...\n");
|
||||||
|
|
||||||
|
|
||||||
@ -296,6 +296,7 @@ bool ConvertDBC(void)
|
|||||||
NPCSounds.openmem(mpq.ExtractFile("DBFilesClient\\NPCSounds.dbc"));
|
NPCSounds.openmem(mpq.ExtractFile("DBFilesClient\\NPCSounds.dbc"));
|
||||||
CharSections.openmem(mpq.ExtractFile("DBFilesClient\\CharSections.dbc"));
|
CharSections.openmem(mpq.ExtractFile("DBFilesClient\\CharSections.dbc"));
|
||||||
ChrBaseInfo.openmem(mpq.ExtractFile("DBFilesClient\\CharBaseInfo.dbc"));
|
ChrBaseInfo.openmem(mpq.ExtractFile("DBFilesClient\\CharBaseInfo.dbc"));
|
||||||
|
LoadingScreen.openmem(mpq.ExtractFile("DBFilesClient\\LoadingScreens.dbc"));
|
||||||
//...
|
//...
|
||||||
printf("DBC files opened.\n");
|
printf("DBC files opened.\n");
|
||||||
//...
|
//...
|
||||||
@ -431,6 +432,21 @@ bool ConvertDBC(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("loadingscreen..");
|
||||||
|
for(DBCFile::Iterator it = LoadingScreen.begin(); it != LoadingScreen.end(); ++it)
|
||||||
|
{
|
||||||
|
uint32 id = it->getUInt(LOADINGSCREEN_ID);
|
||||||
|
for(uint32 field=LOADINGSCREEN_ID; field < LOADINGSCREEN_END; field++)
|
||||||
|
{
|
||||||
|
if(strlen(LoadingScreenFieldNames[field]))
|
||||||
|
{
|
||||||
|
std::string value = AutoGetDataString(it,LoadingScreenFormat,field);
|
||||||
|
if(value.size()) // only store if not null
|
||||||
|
LoadingScreenStorage[id].push_back(std::string(LoadingScreenFieldNames[field]) + "=" + value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf("zonedata..");
|
printf("zonedata..");
|
||||||
for(DBCFile::Iterator it = AreaTable.begin(); it != AreaTable.end(); ++it)
|
for(DBCFile::Iterator it = AreaTable.begin(); it != AreaTable.end(); ++it)
|
||||||
{
|
{
|
||||||
@ -627,6 +643,7 @@ bool ConvertDBC(void)
|
|||||||
printf("race.."); OutSCP(SCPDIR "/race.scp",RaceDataStorage, "race");
|
printf("race.."); OutSCP(SCPDIR "/race.scp",RaceDataStorage, "race");
|
||||||
printf("sound.."); OutSCP(SCPDIR "/sound.scp",SoundDataStorage, "sound");
|
printf("sound.."); OutSCP(SCPDIR "/sound.scp",SoundDataStorage, "sound");
|
||||||
printf("map.."); OutSCP(SCPDIR "/map.scp",MapDataStorage, "map");
|
printf("map.."); OutSCP(SCPDIR "/map.scp",MapDataStorage, "map");
|
||||||
|
printf("loadingscreens.."); OutSCP(SCPDIR "/loadingscreens.scp",LoadingScreenStorage, "loadingscreens");
|
||||||
printf("area.."); OutSCP(SCPDIR "/zone.scp",ZoneDataStorage, "zone");
|
printf("area.."); OutSCP(SCPDIR "/zone.scp",ZoneDataStorage, "zone");
|
||||||
printf("itemdisplayinfo.."); OutSCP(SCPDIR "/itemdisplayinfo.scp",ItemDisplayInfoStorage, "itemdisplayinfo");
|
printf("itemdisplayinfo.."); OutSCP(SCPDIR "/itemdisplayinfo.scp",ItemDisplayInfoStorage, "itemdisplayinfo");
|
||||||
printf("creaturemodeldata.."); OutSCP(SCPDIR "/creaturemodeldata.scp",CreatureModelStorage,"creaturemodeldata");
|
printf("creaturemodeldata.."); OutSCP(SCPDIR "/creaturemodeldata.scp",CreatureModelStorage,"creaturemodeldata");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user