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

Method AddGenericPage

editor/TableFileFilterMng.cpp:1013–1098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013void PageDataList::AddGenericPage(int id, int process_type) {
1014 int i, t;
1015 CWaitCursor wc;
1016
1017 if (id == -1)
1018 return;
1019
1020 ProcessPage(Object_info[id].name, PAGETYPE_GENERIC, process_type);
1021 wc.Restore();
1022
1023 object_info *objinfopointer = &Object_info[id];
1024
1025 // Page in all textures for this object
1026
1027 PageInPolymodel(objinfopointer->render_handle);
1028 poly_model *pm = &Poly_models[objinfopointer->render_handle];
1029
1030 for (t = 0; t < pm->n_textures; t++)
1031 AddTexturePage(pm->textures[t], process_type);
1032
1033 if (objinfopointer->med_render_handle != -1) {
1034 PageInPolymodel(objinfopointer->med_render_handle);
1035 pm = &Poly_models[objinfopointer->med_render_handle];
1036 for (t = 0; t < pm->n_textures; t++)
1037 AddTexturePage(pm->textures[t], process_type);
1038 }
1039
1040 if (objinfopointer->lo_render_handle != -1) {
1041 PageInPolymodel(objinfopointer->lo_render_handle);
1042 pm = &Poly_models[objinfopointer->lo_render_handle];
1043 for (t = 0; t < pm->n_textures; t++)
1044 AddTexturePage(pm->textures[t], process_type);
1045 }
1046
1047 // Process all sounds for this object
1048 for (i = 0; i < MAX_OBJ_SOUNDS; i++) {
1049 if (objinfopointer->sounds[i] != SOUND_NONE_INDEX) {
1050 AddSoundPage(objinfopointer->sounds[i], process_type);
1051 }
1052 }
1053
1054 for (i = 0; i < MAX_AI_SOUNDS; i++) {
1055 if (objinfopointer->ai_info->sound[i] != SOUND_NONE_INDEX) {
1056 AddSoundPage(objinfopointer->ai_info->sound[i], process_type);
1057 }
1058 }
1059
1060 // Try and load the various wb sounds
1061 int j;
1062 for (i = 0; i < MAX_WBS_PER_OBJ; i++) {
1063 for (j = 0; j < MAX_WB_FIRING_MASKS; j++) {
1064 if (objinfopointer->static_wb[i].fm_fire_sound_index[j] != SOUND_NONE_INDEX) {
1065 AddSoundPage(objinfopointer->static_wb[i].fm_fire_sound_index[j], process_type);
1066 }
1067 }
1068 }
1069
1070 // Try and load the various wb sounds

Callers

nothing calls this directly

Calls 1

PageInPolymodelFunction · 0.85

Tested by

no test coverage detected