| 71 | int Shoot_from_patch = 1; |
| 72 | |
| 73 | int DoRadiosityRun(int method, rad_surface *light_surfaces, int count) { |
| 74 | float start_time; |
| 75 | |
| 76 | mprintf(0, "Calculating radiosity on %d faces.\n", count); |
| 77 | |
| 78 | rad_Surfaces = light_surfaces; |
| 79 | rad_NumSurfaces = count; |
| 80 | |
| 81 | Shoot_method = method; |
| 82 | |
| 83 | start_time = timer_GetTime(); |
| 84 | |
| 85 | InitRadiosityRun(); |
| 86 | |
| 87 | // Setup our window |
| 88 | CLightingStatus dlg; |
| 89 | |
| 90 | dlg.Create(IDD_LIGHTINGSTATUS); |
| 91 | |
| 92 | CalculateRadiosity(); |
| 93 | |
| 94 | dlg.DestroyWindow(); |
| 95 | CloseRadiosityRun(); |
| 96 | |
| 97 | // Print time taken |
| 98 | mprintf(0, "\nLighting took %.4f seconds.\n", timer_GetTime() - start_time); |
| 99 | |
| 100 | return 1; |
| 101 | } |
| 102 | |
| 103 | // Sets up our radiosity run |
| 104 | void InitRadiosityRun() { |
no test coverage detected