/* { name = *** type = GENERATOR_MESH_CONFIG } */ void generator_mesh::load_section_generator_config(DATA_FILE_SECTION *p_section) { DATA_FILE_SECTION *p_line = p_section->section_child_get(); if(!p_line) return; // Set name of this generator name_set(p_section->name_get()); int modificator_index = -1; int target_index = -1; do { if(p_line->is_line()) { if(p_line->match_name("modificator")) { modificator_index++; target_index = -1; GENERATOR_MESH_MODIFICATOR_CONFIG *p_modificator = config.modificator_ref(modificator_index); strncpy(p_modificator->modificator_name, p_line->line_value_string_get(), MAX_NAME); p_line->line_mark_loaded(); continue; } else if(modificator_index >= 0) { GENERATOR_MESH_MODIFICATOR_CONFIG *p_modificator = config.modificator_ref(modificator_index); // modificator target - for unique targets (TEXTURE/MESH) if(p_line->match_name("modificator_target")) { target_index++; GENERATOR_MESH_MODIFICATOR_TARGET_CONFIG *p_target = p_modificator->target_config_ref(target_index); p_target->target_type = modificator_target_translate(p_line->line_value_string_get()); if(p_target->target_type == MODIFICATOR_TARGET_NONE) { ppset(p_line->source_file_get(), p_line->source_line_get()); pperror(TRUE, "'%s' is not a valid modificator target!",p_line->line_value_string_get()); ppclear(); } p_line->line_mark_loaded(); continue; } else { GENERATOR_MESH_MODIFICATOR_TARGET_CONFIG *p_target = p_modificator->target_config_ref(target_index); // For other targets (BITMAP/HEIGHTMAP/AUX) if(p_line->match_name("modificator_target_name")) { strncpy(p_target->target_name, p_line->line_value_string_get(), MAX_NAME); p_line->line_mark_loaded(); continue; } // Load repeat load_int(p_target->repeat,"modificator_repeat"); // Load mask p_target->mask.load_line(p_line, generator_get()); } } } } while((p_line = p_line->section_next())); }
void line_tree::ppline(void) { ppset(p_param->parse_file_get(), source_line_number); pperror(FALSE, p_source_line); ppclear(); }
void data_file_section::ppline(void) { ppset(source_file_get(), line_number); pperror(FALSE, raw_string); ppclear(); }