(bind-func world_data_index
(lambda (w x y)
(let ((width (world_width w))
(height (world_height w))
(xrem (% x width))
(yrem (% y height)))
(+ (* (+ yrem (if (< yrem 0) height 0)) width)
(+ xrem (if (< xrem 0) width 0))))))