;;; The map types both sides of the comparison produce: what the save ;;; stored and what the generator makes for one map region. (include stdlib.h) (pub define MAX-STRATA 32) ;;; IntDataMap2D: a square map whose border pixels only feed lerps ;;; and blurs. The region's own pixels are the inner ;;; (size - pad-tl - pad-br) square. (pub record int-map ((data (* i32)) (size i32) (pad-tl i32) (pad-br i32))) (pub record region-maps ((landform int-map) (climate int-map) (geoprov int-map) (upheaval int-map) (ocean int-map) (strata [int-map MAX_STRATA]) (strata-count int))) (pub fn region-maps/free ((m (* region-maps))) void (free (. m landform data)) (free (. m climate data)) (free (. m geoprov data)) (free (. m upheaval data)) (free (. m ocean data)) (for (var i int 0) (< i (. m strata-count)) (++ i) (free (. [(. m strata) i] data))))