Paul Gofman : ddraw: Factor out viewport_alloc_active_light_index() function.