Use array<> for segment members
Default construct g3s_codes to 0/ff
Use helper functions for apply_light
Compact find_goal_texture, multi_apply_goal_textures
Fix crash on exiting game