* 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_NAME_GENERAL = 1,
|
||||
MAP_NAME1 = 4,
|
||||
MAP_NAME1 = 5,
|
||||
MAP_NAME2,
|
||||
MAP_NAME3,
|
||||
MAP_NAME4,
|
||||
@ -201,32 +201,86 @@ enum MapEnum
|
||||
MAP_NAME6,
|
||||
MAP_NAME7,
|
||||
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[] =
|
||||
{
|
||||
"","name_general","","","name","name","name","name","name","name",
|
||||
"name","name","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","",
|
||||
""
|
||||
"", "name_general","", "", "", "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 =
|
||||
{
|
||||
"isxxssssss"
|
||||
"ssxxxxxxxx"
|
||||
"xxxxxxxxxx"
|
||||
"xxxxxxxxxx"
|
||||
"xxxxxxxxxx"
|
||||
"xxxxxxxxxx"
|
||||
"xxxxxxxxxx"
|
||||
"xxxxx"
|
||||
"isxxxsssss"
|
||||
"ssssssssss"
|
||||
"sxxsssssss"
|
||||
"sssssssssx"
|
||||
"ssssssssss"
|
||||
"ssssssxixx"
|
||||
"xxxxxx"
|
||||
};
|
||||
|
||||
enum LoadingScreenEnum
|
||||
{
|
||||
LOADINGSCREEN_ID = 0,
|
||||
LOADINGSCREEN_MAPNAME,
|
||||
LOADINGSCREEN_FILE,
|
||||
LOADINGSCREEN_END
|
||||
};
|
||||
|
||||
static const char *LoadingScreenFieldNames[] = {
|
||||
"","mapname","loadingscreen"
|
||||
};
|
||||
|
||||
static const char *LoadingScreenFormat = {
|
||||
"iss"
|
||||
};
|
||||
|
||||
enum AreaTableEnum
|
||||
|
||||
@ -38,7 +38,7 @@ bool DBCFile::open()
|
||||
f.read((char*)&nb,4); // Number of fields
|
||||
f.read((char*)&es,4); // Size of a record
|
||||
f.read((char*)&ss,4); // String size
|
||||
|
||||
|
||||
recordSize = es;
|
||||
recordCount = na;
|
||||
fieldCount = nb;
|
||||
@ -69,7 +69,7 @@ bool DBCFile::openmem(ByteBuffer bb)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ public:
|
||||
Iterator & operator++() {
|
||||
record.offset += record.file.recordSize;
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
/// Return address of current instance
|
||||
Record const & operator*() const { return record; }
|
||||
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,uint32> classmask; //from CharBaseInfo.dbc
|
||||
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,
|
||||
CreatureModelData,CreatureDisplayInfo,NPCSounds,CharSections,GameObjectDisplayInfo, ChrBaseInfo;
|
||||
CreatureModelData,CreatureDisplayInfo,NPCSounds,CharSections,GameObjectDisplayInfo, ChrBaseInfo, LoadingScreen;
|
||||
printf("Opening DBC archive...\n");
|
||||
|
||||
|
||||
@ -296,6 +296,7 @@ bool ConvertDBC(void)
|
||||
NPCSounds.openmem(mpq.ExtractFile("DBFilesClient\\NPCSounds.dbc"));
|
||||
CharSections.openmem(mpq.ExtractFile("DBFilesClient\\CharSections.dbc"));
|
||||
ChrBaseInfo.openmem(mpq.ExtractFile("DBFilesClient\\CharBaseInfo.dbc"));
|
||||
LoadingScreen.openmem(mpq.ExtractFile("DBFilesClient\\LoadingScreens.dbc"));
|
||||
//...
|
||||
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..");
|
||||
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("sound.."); OutSCP(SCPDIR "/sound.scp",SoundDataStorage, "sound");
|
||||
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("itemdisplayinfo.."); OutSCP(SCPDIR "/itemdisplayinfo.scp",ItemDisplayInfoStorage, "itemdisplayinfo");
|
||||
printf("creaturemodeldata.."); OutSCP(SCPDIR "/creaturemodeldata.scp",CreatureModelStorage,"creaturemodeldata");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user