+static uint8_t set_map_members(char * token0, char * token1, uint8_t * map_flags)
+{
+ if ( parse_val(token0, token1, "HEIGHT", map_flags,
+ HEIGHT_SET, 'i', (char *) &world.map.size.y)
+ || parse_val(token0, token1, "WIDTH", map_flags,
+ WIDTH_SET, 'i', (char *) &world.map.size.x))
+ {
+ int test = atoi(token1) > 256 || atoi(token1) < 1;
+ err_line(test, "Value must be >= 1 and <= 256.");
+ return 1;
+ }
+ else if ( parse_val(token0, token1, "DIST_ORTHOGONAL", map_flags,
+ ORTH_SET, '8', (char *) &world.map.dist_orthogonal)
+ || parse_val(token0, token1, "DIST_DIAGONAL", map_flags,
+ DIAG_SET, '8', (char *) &world.map.dist_diagonal))
+ {
+ err_line(0 == atoi(token1), "Value must not be zero.");
+ return 1;
+ }
+ return 0;
+}
+
+
+