| 882 | } |
| 883 | |
| 884 | void PageDataList::AddWeaponPage(int id, int process_type) { |
| 885 | CWaitCursor wc; |
| 886 | weapon *weaponpointer = &Weapons[id]; |
| 887 | |
| 888 | if (id == -1) |
| 889 | return; |
| 890 | |
| 891 | int i; |
| 892 | ProcessPage(Weapons[id].name, PAGETYPE_WEAPON, process_type); |
| 893 | wc.Restore(); |
| 894 | |
| 895 | if (!(weaponpointer->flags & (WF_IMAGE_BITMAP | WF_IMAGE_VCLIP))) { |
| 896 | PageInPolymodel(weaponpointer->fire_image_handle); |
| 897 | poly_model *pm = &Poly_models[weaponpointer->fire_image_handle]; |
| 898 | for (int t = 0; t < pm->n_textures; t++) |
| 899 | AddTexturePage(pm->textures[t], process_type); |
| 900 | } |
| 901 | |
| 902 | // Load the various textures associated with this weapon |
| 903 | if (weaponpointer->explode_image_handle != -1) { |
| 904 | AddTexturePage(weaponpointer->explode_image_handle, process_type); |
| 905 | } |
| 906 | |
| 907 | if (weaponpointer->particle_handle != -1) { |
| 908 | AddTexturePage(weaponpointer->particle_handle, process_type); |
| 909 | } |
| 910 | |
| 911 | if (weaponpointer->smoke_handle != -1) { |
| 912 | AddTexturePage(weaponpointer->smoke_handle, process_type); |
| 913 | } |
| 914 | |
| 915 | if (weaponpointer->scorch_handle != -1) { |
| 916 | AddTexturePage(weaponpointer->scorch_handle, process_type); |
| 917 | } |
| 918 | |
| 919 | if (weaponpointer->icon_handle != -1) { |
| 920 | AddTexturePage(weaponpointer->icon_handle, process_type); |
| 921 | } |
| 922 | |
| 923 | // Try to load spawn weapons |
| 924 | if (weaponpointer->spawn_handle != -1 && weaponpointer->spawn_count > 0 && weaponpointer->spawn_handle != id) { |
| 925 | AddWeaponPage(weaponpointer->spawn_handle, process_type); |
| 926 | } |
| 927 | |
| 928 | if (weaponpointer->alternate_spawn_handle != -1 && weaponpointer->spawn_count > 0 && |
| 929 | weaponpointer->alternate_spawn_handle != id) { |
| 930 | AddWeaponPage(weaponpointer->alternate_spawn_handle, process_type); |
| 931 | } |
| 932 | |
| 933 | if (weaponpointer->robot_spawn_handle != -1) { |
| 934 | AddGenericPage(weaponpointer->robot_spawn_handle, process_type); |
| 935 | } |
| 936 | |
| 937 | // Try and load the various sounds |
| 938 | for (i = 0; i < MAX_WEAPON_SOUNDS; i++) { |
| 939 | if (weaponpointer->sounds[i] != SOUND_NONE_INDEX) { |
| 940 | AddSoundPage(weaponpointer->sounds[i], process_type); |
| 941 | } |
nothing calls this directly
no test coverage detected