Пример #1
0
	void renderer::draw_debug_lines(
		const debug_lines& logic_step_lines,
		const debug_lines& persistent_lines,
		const debug_lines& frame_lines,

		const augs::atlas_entry tex,
		const float interpolation_ratio
	) {
		const auto output = augs::line_drawer_with_default({ get_line_buffer(), tex });

		auto line_lambda = [&](const debug_line line) {
			output.line(line.a, line.b, line.col);
		};

		if (interpolate_debug_logic_step_lines && logic_step_lines.size() == prev_logic_step_lines.size()) {
			std::vector<debug_line> interpolated_logic_step_lines;

			interpolated_logic_step_lines.resize(logic_step_lines.size());

			for (size_t i = 0; i < logic_step_lines.size(); ++i) {
				interpolated_logic_step_lines[i].a = prev_logic_step_lines[i].a.lerp(logic_step_lines[i].a, interpolation_ratio);
				interpolated_logic_step_lines[i].b = prev_logic_step_lines[i].b.lerp(logic_step_lines[i].b, interpolation_ratio);
				interpolated_logic_step_lines[i].col = logic_step_lines[i].col;
			}

			for_each_in(interpolated_logic_step_lines, line_lambda);
		}
		else {
			for_each_in(logic_step_lines, line_lambda);
		}

		for_each_in(persistent_lines, line_lambda);
		for_each_in(frame_lines, line_lambda);
	}
Пример #2
0
void print_bus_info_with_refs(void* the_bus_ptr)
{
    Bus* the_bus;
    the_bus = (Bus*)the_bus_ptr;
    printf(" - %04d   |  %3d  |   %11s  | %24s | W zajezdni: ", the_bus->side_no,
           the_bus->line_no, the_bus->driver_pesel, the_bus->driver_name);
    if (the_bus->memberships.length > 0)
        for_each_in(&(the_bus->memberships), print_bus_memberships);
    else
        printf("== BRAK ==");
    printf("\n");
}
Пример #3
0
void print_all_buses_with_refs()
{
    print_bus_labels();
    for_each_in(&buses, print_bus_info_with_refs);
    prt(LINE);
}
Пример #4
0
static void print_all_depots()
{
    prt(DEPOTS_LABEL);
    for_each_in(&depots, print_depot_info);
    prt(LINE);
}
Пример #5
0
void print_all_buses()
{
    print_bus_labels();
    for_each_in(&buses, print_bus_info);
    prt(LINE);
}