| 865 | |
| 866 | extern tTelComInfo Telcom_system; |
| 867 | bool CreateBackgroundEffect(TCBKGDESC* desc, int monitor, int screen, int id) { |
| 868 | ASSERT(desc); |
| 869 | int efxtype = -1; |
| 870 | switch (desc->type) { |
| 871 | case TC_BACK_STATIC: |
| 872 | efxtype = EFX_BACKGROUND; |
| 873 | break; |
| 874 | default: |
| 875 | Int3(); |
| 876 | } |
| 877 | if (efxtype == -1) |
| 878 | return false; |
| 879 | // Creates an instance of the Effect |
| 880 | int efxnum = EfxCreate(efxtype, monitor, screen, id); |
| 881 | if (efxnum == -1) |
| 882 | return false; |
| 883 | tceffect *tce = &TCEffects[efxnum]; |
| 884 | |
| 885 | if (desc->caps & TCBGD_COLOR) |
| 886 | tce->color = desc->color; |
| 887 | else |
| 888 | tce->color = GR_BLUE; |
| 889 | if (desc->caps & TCBGD_WAITTIME) |
| 890 | tce->start_time = desc->waittime; |
| 891 | else |
| 892 | tce->start_time = 0; |
| 893 | |
| 894 | tce->pos_x = 0; |
| 895 | tce->pos_y = 0; |
| 896 | tce->w = Telcom_system.Monitor_coords[monitor].right - Telcom_system.Monitor_coords[monitor].left; |
| 897 | tce->h = Telcom_system.Monitor_coords[monitor].bottom - Telcom_system.Monitor_coords[monitor].top; |
| 898 | |
| 899 | switch (tce->type) { |
| 900 | case EFX_BACKGROUND: |
| 901 | return CreateBackground(tce); |
| 902 | } |
| 903 | return false; |
| 904 | } |
| 905 | |
| 906 | bool CreatePolyModelEffect(TCPOLYDESC* desc, int monitor, int screen, int id) { |
| 907 | ASSERT(desc); |
no test coverage detected