Creates the scanline
| 2044 | |
| 2045 | // Creates the scanline |
| 2046 | void TelcomCreateScanLine(void) { |
| 2047 | scanliney = Telcom_system.Monitor_coords[MONITOR_MAIN].top - 32; |
| 2048 | scanline_speed = 1.0f / 50.0f; |
| 2049 | scanline_nexttime = timer_GetTime() + scanline_speed; |
| 2050 | scanline_handle = bm_AllocBitmap(32, 32, 0); |
| 2051 | |
| 2052 | if (scanline_handle <= BAD_BITMAP_HANDLE) { |
| 2053 | return; |
| 2054 | } |
| 2055 | |
| 2056 | int start_pixel; |
| 2057 | start_pixel = 0; |
| 2058 | |
| 2059 | uint16_t *data = bm_data(scanline_handle, 0); |
| 2060 | |
| 2061 | int x, y; |
| 2062 | for (y = 0; y < 32; y++) { |
| 2063 | for (x = 0; x < 32; x++) { |
| 2064 | if (y >= start_pixel) |
| 2065 | data[y * 32 + x] = OPAQUE_FLAG | GR_RGB16(128, 128, 200); |
| 2066 | else |
| 2067 | data[y * 32 + x] = NEW_TRANSPARENT_COLOR; |
| 2068 | } |
| 2069 | } |
| 2070 | } |
| 2071 | |
| 2072 | // Destroys the scanline |
| 2073 | void TelcomDestroyScanLine(void) { |
no test coverage detected