codes a point for visibility in the window passed to RenderTerrain()
| 875 | } |
| 876 | // codes a point for visibility in the window passed to RenderTerrain() |
| 877 | uint8_t CodeTerrainPoint(g3Point *p) { |
| 878 | uint8_t cc = 0; |
| 879 | if (p->p3_sx > Clip_scale_right) |
| 880 | cc |= CC_OFF_RIGHT; |
| 881 | if (p->p3_sx < Clip_scale_left) |
| 882 | cc |= CC_OFF_LEFT; |
| 883 | if (p->p3_sy > Clip_scale_bot) |
| 884 | cc |= CC_OFF_BOT; |
| 885 | if (p->p3_sy < Clip_scale_top) |
| 886 | cc |= CC_OFF_TOP; |
| 887 | return cc; |
| 888 | } |
| 889 | // Returns true if light can hit this segment/heighth bit |
| 890 | int IsTerrainDynamicChecked(int seg, int bit) { |
| 891 | if (seg < 0 || seg >= (TERRAIN_WIDTH * TERRAIN_DEPTH)) |
no outgoing calls
no test coverage detected