MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DetermineRequiredPages

Method DetermineRequiredPages

editor/TableFileFilterMng.cpp:1101–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099
1100extern const char *Static_sound_names[];
1101bool PageDataList::DetermineRequiredPages(int process_type) {
1102 CWaitCursor wc;
1103 CString filename;
1104 int i;
1105
1106 ////////////////////////////////////////////////////////////
1107 // Note to Jason:
1108 //
1109 // For every page needed by the level call these functions:
1110 // ProcessPage(page_name,page_type,process_type);
1111 // wc.Restore();
1112 ////////////////////////////////////////////////////////////
1113
1114 // Processes all the pages in the TableParse output file
1115 m_TableParseFile->GetWindowText(filename);
1116 ProcessPagesInTextFile(filename.GetBuffer(0), process_type);
1117
1118 /* SHOULDN'T NEED THE FOLLOWING ANYMORE
1119
1120 // Add all the other files
1121 char ext[12];
1122 for(i=0;i<MAX_GAMEFILES;i++)
1123 {
1124 if(Gamefiles[i].used != 0)
1125 {
1126 GetFileExt(Gamefiles[i].name,ext);
1127
1128 if (stricmp(ext,".d3l"))
1129 {
1130 AddToList(Gamefiles[i].name,PAGETYPE_GAMEFILE,process_type);
1131 }
1132
1133 if (!stricmp(ext,".oof"))
1134 {
1135 int pid=LoadPolyModel (Gamefiles[i].name,0);
1136 if (pid!=-1)
1137 {
1138 PageInPolymodel (pid);
1139 poly_model *pm=&Poly_models[pid];
1140 for (int t=0;t<pm->n_textures;t++)
1141 AddTexturePage (pm->textures[t],process_type);
1142 }
1143 else
1144 {
1145 mprintf(0,"Couldn't find polymodel %s!\n",Gamefiles[i].name);
1146 Int3();
1147 }
1148 }
1149 }
1150 }
1151
1152 // Get misc pages
1153
1154 AddSoundPage (FindSoundName ("AmbSwitch31"),process_type);
1155 AddSoundPage (FindSoundName ("AmbLavaLoop1"),process_type);
1156
1157 AddTexturePage (FindTextureName("Ready1"),process_type);
1158 AddTexturePage (FindTextureName("Online"),process_type);

Callers

nothing calls this directly

Calls 7

FindTextureNameFunction · 0.85
FindSoundNameFunction · 0.85
GetBufferMethod · 0.80
GetCreationTextureMethod · 0.80
GetSoundMethod · 0.80
GetNumProdTypesMethod · 0.80
GetProdInfoMethod · 0.80

Tested by

no test coverage detected