| 484 | |
| 485 | |
| 486 | static void gamma_callback(newuiTiledWindow *wnd, void *data) { |
| 487 | int bm_handle = *((int *)data); |
| 488 | |
| 489 | g3Point pnts[4], *pntlist[4]; |
| 490 | rend_SetColorModel(CM_RGB); |
| 491 | rend_SetAlphaType(AT_ALWAYS); |
| 492 | rend_SetTextureType(TT_LINEAR); |
| 493 | rend_SetLighting(LS_NONE); |
| 494 | rend_SetOverlayType(OT_NONE); |
| 495 | rend_SetWrapType(WT_WRAP); |
| 496 | rend_SetZBufferState(0); |
| 497 | |
| 498 | // First draw checkboard |
| 499 | int startx = GAMMA_SLICE_X; |
| 500 | |
| 501 | for (int i = 0; i < 4; i++) { |
| 502 | pntlist[i] = &pnts[i]; |
| 503 | pnts[i].p3_z = 0; |
| 504 | pnts[i].p3_r = 1; |
| 505 | pnts[i].p3_g = 1; |
| 506 | pnts[i].p3_b = 1; |
| 507 | pnts[i].p3_flags = PF_PROJECTED; |
| 508 | } |
| 509 | |
| 510 | pnts[0].p3_sx = startx; |
| 511 | pnts[0].p3_sy = GAMMA_SLICE_Y; |
| 512 | pnts[0].p3_u = 0; |
| 513 | pnts[0].p3_v = 0; |
| 514 | |
| 515 | pnts[1].p3_sx = startx + GAMMA_SLICE_WIDTH; |
| 516 | pnts[1].p3_sy = GAMMA_SLICE_Y; |
| 517 | pnts[1].p3_u = 2; |
| 518 | pnts[1].p3_v = 0; |
| 519 | |
| 520 | pnts[2].p3_sx = startx + GAMMA_SLICE_WIDTH; |
| 521 | pnts[2].p3_sy = GAMMA_SLICE_Y + GAMMA_SLICE_HEIGHT; |
| 522 | pnts[2].p3_u = 2; |
| 523 | pnts[2].p3_v = 1; |
| 524 | |
| 525 | pnts[3].p3_sx = startx; |
| 526 | pnts[3].p3_sy = GAMMA_SLICE_Y + GAMMA_SLICE_HEIGHT; |
| 527 | pnts[3].p3_u = 0; |
| 528 | pnts[3].p3_v = 1; |
| 529 | |
| 530 | rend_DrawPolygon2D(bm_handle, pntlist, 4); |
| 531 | |
| 532 | // Now draw grey in the center |
| 533 | int int_val = 8; |
| 534 | rend_SetFlatColor(GR_RGB(int_val, int_val, int_val)); |
| 535 | rend_SetTextureType(TT_FLAT); |
| 536 | |
| 537 | pnts[0].p3_sx += 64; |
| 538 | pnts[0].p3_sy += 32; |
| 539 | |
| 540 | pnts[1].p3_sx -= 64; |
| 541 | pnts[1].p3_sy += 32; |
| 542 | |
| 543 | pnts[2].p3_sx -= 64; |
nothing calls this directly
no test coverage detected