| 943 | } |
| 944 | |
| 945 | void PageDataList::AddShipPage(int id, int process_type) { |
| 946 | int i, t; |
| 947 | CWaitCursor wc; |
| 948 | |
| 949 | ProcessPage(Ships[id].name, PAGETYPE_SHIP, process_type); |
| 950 | wc.Restore(); |
| 951 | |
| 952 | ship *shippointer = &Ships[id]; |
| 953 | |
| 954 | // Page in all textures for this object |
| 955 | |
| 956 | PageInPolymodel(shippointer->model_handle); |
| 957 | poly_model *pm = &Poly_models[shippointer->model_handle]; |
| 958 | |
| 959 | for (t = 0; t < pm->n_textures; t++) |
| 960 | AddTexturePage(pm->textures[t], process_type); |
| 961 | |
| 962 | if (shippointer->med_render_handle != -1) { |
| 963 | PageInPolymodel(shippointer->med_render_handle); |
| 964 | pm = &Poly_models[shippointer->med_render_handle]; |
| 965 | for (t = 0; t < pm->n_textures; t++) |
| 966 | AddTexturePage(pm->textures[t], process_type); |
| 967 | } |
| 968 | |
| 969 | if (shippointer->lo_render_handle != -1) { |
| 970 | PageInPolymodel(shippointer->lo_render_handle); |
| 971 | pm = &Poly_models[shippointer->lo_render_handle]; |
| 972 | for (t = 0; t < pm->n_textures; t++) |
| 973 | AddTexturePage(pm->textures[t], process_type); |
| 974 | } |
| 975 | |
| 976 | if (shippointer->dying_model_handle != -1) { |
| 977 | PageInPolymodel(shippointer->dying_model_handle); |
| 978 | pm = &Poly_models[shippointer->dying_model_handle]; |
| 979 | for (t = 0; t < pm->n_textures; t++) |
| 980 | AddTexturePage(pm->textures[t], process_type); |
| 981 | } |
| 982 | |
| 983 | // Try and load the various weapons |
| 984 | int j; |
| 985 | for (i = 0; i < MAX_PLAYER_WEAPONS; i++) { |
| 986 | for (j = 0; j < MAX_WB_GUNPOINTS; j++) { |
| 987 | if (shippointer->static_wb[i].gp_weapon_index[j] != LASER_INDEX) { |
| 988 | AddWeaponPage(shippointer->static_wb[i].gp_weapon_index[j], process_type); |
| 989 | } |
| 990 | } |
| 991 | } |
| 992 | |
| 993 | // Try and load the various weapons |
| 994 | for (i = 0; i < MAX_PLAYER_WEAPONS; i++) { |
| 995 | for (j = 0; j < MAX_WB_FIRING_MASKS; j++) { |
| 996 | if (shippointer->static_wb[i].fm_fire_sound_index[j] != SOUND_NONE_INDEX) |
| 997 | AddSoundPage(shippointer->static_wb[i].fm_fire_sound_index[j], process_type); |
| 998 | } |
| 999 | } |
| 1000 | |
| 1001 | for (i = 0; i < MAX_PLAYER_WEAPONS; i++) { |
| 1002 | if (shippointer->firing_sound[i] != -1) |
nothing calls this directly
no test coverage detected