Пример #1
0
void clear_car(int x)
{
  int i;
  move_to_top();
  for (i = 0; i < 10; i++) {
    line_at(x, "  ");
  }
}
Пример #2
0
Файл: gti.c Проект: Joker-vD/gti
void draw_car(int x)
{
    move_to_top();
    line_at(x, "   ,---------------.");
    line_at(x, "  /  /``````|``````\\\\");
    line_at(x, " /  /_______|_______\\\\________");
    line_at(x, "|]      GTI |'       |        |]");
    if (x % 2) {
    line_at(x, "=  .-:-.    |________|  .-:-.  =");
    line_at(x, " `  -+-  --------------  -+-  '");
    line_at(x, "   '-:-'                '-:-'  ");
    } else {
    line_at(x, "=  .:-:.    |________|  .:-:.  =");
    line_at(x, " `   X   --------------   X   '");
    line_at(x, "   ':-:'                ':-:'  ");
    }
}
Пример #3
0
Файл: gti.c Проект: rwos/gti
void draw_pull(int x)
{
    /* *INDENT-OFF* */
    move_to_top();
    line_at(x, "   ,---------------.               __");
    line_at(x, "  /  /``````|``````\\\\             /--\\");
    line_at(x, " /  /_______|_______\\\\________    \\__/");
    line_at(x, "|]      GTI |'       |        |] >-||");
    if (x % 2) {
    line_at(x, "=  .-:-.    |________|  .-:-.  = >-||");
    line_at(x, " `  -+-  --------------  -+-  '    || ");
    line_at(x, "   '-:-'                '-:-'      ||  ");
    } else {
    line_at(x, "=  .:-:.    |________|  .:-:.  = >-||");
    line_at(x, " `   X   --------------   X   '   /  \\");
    line_at(x, "   ':-:'                ':-:'    /    \\");
    }
    /* *INDENT-ON* */
    usleep(FRAME_TIME * 8);
}
Пример #4
0
Файл: gti.c Проект: rwos/gti
void draw_push(int x)
{
    /* *INDENT-OFF* */
    move_to_top();
    line_at(x, "   __      ,---------------.");
    line_at(x, "  /--\\   /  /``````|``````\\\\");
    line_at(x, "  \\__/  /  /_______|_______\\\\________");
    line_at(x, "   ||-< |]      GTI |'       |        |]");
    if (x % 2) {
    line_at(x, "   ||-< =  .-:-.    |________|  .-:-.  =");
    line_at(x, "   ||    `  -+-  --------------  -+-  '");
    line_at(x, "   ||      '-:-'                '-:-'  ");
    } else {
    line_at(x, "   ||-< =  .:-:.    |________|  .:-:.  =");
    line_at(x, "   /\\    `   X   --------------   X   '");
    line_at(x, "  /  \\     ':-:'                ':-:'  ");
    }
    /* *INDENT-ON* */
    usleep(FRAME_TIME * 10);
}
Пример #5
0
Файл: gti.c Проект: rwos/gti
void draw_std(int x)
{
    /* *INDENT-OFF* */
    move_to_top();
    line_at(x, "   ,---------------.");
    line_at(x, "  /  /``````|``````\\\\");
    line_at(x, " /  /_______|_______\\\\________");
    line_at(x, "|]      GTI |'       |        |]");
    if (x % 2) {
    line_at(x, "=  .-:-.    |________|  .-:-.  =");
    line_at(x, " `  -+-  --------------  -+-  '");
    line_at(x, "   '-:-'                '-:-'  ");
    } else {
    line_at(x, "=  .:-:.    |________|  .:-:.  =");
    line_at(x, " `   X   --------------   X   '");
    line_at(x, "   ':-:'                ':-:'  ");
    }
    /* *INDENT-ON* */
    usleep(FRAME_TIME);
}
Пример #6
0
Файл: gti.c Проект: Joker-vD/gti
void clear_car(int x)
{
    move_to_top();
    line_at(x, "  ");
    line_at(x, "  ");
    line_at(x, "  ");
    line_at(x, "  ");
    line_at(x, "  ");
    line_at(x, "  ");
    line_at(x, "  ");
}
Пример #7
0
// Return the index of the key corresponding to the given (x,y) coordinates, if any.
boost::optional<std::size_t> KeyboardMap::key_at(double x, double y) const
{
	// Determine the index of the key-line.
	boost::optional<std::size_t> line = line_at(y);
	if(!line) {
		return boost::none;
	}

	// Determine the key.
	for(std::size_t k=0; k<_keys.size(); ++k) {
		const KeyDescriptor &key(_keys[k]);
		if(*line>=key.line_top() && *line<=key.line_bottom() && x>=key.x(*line) && x<key.x(*line)+key.width(*line)) {
			return k;
		}
	}
	return boost::none;
}
Пример #8
0
void draw_car(int x)
{
    move_to_top();
    line_at(x, "                                       ______________                               ");
    line_at(x, "                                  _.-''         || \\ `-.                           ");
    line_at(x, "                             _.-''              ||   \\  `-._       -=====/         ");
    line_at(x, "                   _____..-''.<(]_______________||_____\\    `-------/--/.          ");
    line_at(x, "         _..---''''__      /  ``     ____________|__________.....________\\         ");
    if (x % 2) {
    line_at(x, "   _.-'''__.-.='_`_`-.\\---|---'''''''       ` `  |   __  /.-'_`_`-.\\      \\.     ");
    line_at(x, " .' --''' .'/ /  |  \\ \\`. |                     /   '='.'/ /\\ | /\\ \\`.  __.|   ");
    line_at(x, " |--------|| |``-O-''| ||--\\-------------------/-------|| |''-O-``| ||''  /        ");
    line_at(x, " '''----..| \\ \\/_ _\\/ / |______________________________| \\ \\ _|_ / / `--'\"    ");
    line_at(x, "             `-.....-'                                    `-.....-'                 ");
    } else {
    line_at(x, "   _.-'''__.-.='_`_`-.\\---|---'''''''       ` `  |   __  /.-'_`_`-.\\      \\.     ");
    line_at(x, " .' --''' .'/ /\\   /\\ \\`. |                     /   '='.'/ /  |  \\ \\`.  __.|   ");
    line_at(x, " |--------|| |''-O-``| ||--\\-------------------/-------|| |``-O-''| ||''  /        ");
    line_at(x, " '''----..| \\ \\ _|_ / / |______________________________| \\ \\/_ _\\/ / `--'\"    ");
    line_at(x, "             `-.....-'                                    `-.....-'                 ");
    }
}