ksp: c: add more complete ASCII spaceship sprites

This commit is contained in:
Vince Weaver 2016-06-10 01:16:44 -04:00
parent 1004701ad5
commit e5a424a688

View File

@ -51,6 +51,18 @@ int autopilot(double fuel_left, double altitude, double *angle) {
}
#endif
static void erase_old_ship(void) {
printf("\033[1;40;37m"
"\033[7;33H "
"\033[8;33H "
"\033[9;33H "
"\033[10;33H "
"\033[11;33H "
"\033[12;33H ");
printf("\033[13;33H ");
}
static void draw_ship(int stage, int thrusting, int rotation) {
if (stage) {
@ -72,20 +84,31 @@ static void draw_ship(int stage, int thrusting, int rotation) {
"\033[9;40H/ R\\|"
"\033[10;39H/ /"
"\033[11;38H_\\ /"
"\033[12;38H/\\/\\/"
"\033[13;39H--"
"\033[12;37H/\\/\\/"
"\033[13;37H--"
);
}
if (rotation==16) {
printf("\033[1;40;37m");
if (thrusting) {
printf(
"\033[8;35H_ ____ _"
"\033[9;34H- | |- |-"
"\033[10;33H|O |R | |--"
"\033[11;34H-_|____|-_|-"
printf(
"\033[8;36H_ ____ _"
"\033[9;34H-| -| | \\"
"\033[10;33H--| | R| O|"
"\033[11;34H-|_-|____|_/"
);
}
}
if (rotation==24) {
printf(
"\033[1;40;37m"
"\033[7;38H__"
"\033[8;38H\\/|/\\"
"\033[9;38H'-/ \\"
"\033[10;40H\\ \\"
"\033[11;41H\\ R/|"
"\033[12;42H\\/o/"
"\033[13;43H-/"
);
}
if (rotation==32) {
if (thrusting) printf("\033[7;39H/|\\");
@ -96,27 +119,40 @@ static void draw_ship(int stage, int thrusting, int rotation) {
"\033[10;38H| R |"
"\033[11;38H\\---/"
"\033[12;39H\\O/"
"\033[7;40H_"
"\033[7;40H-"
);
}
if (rotation==40) {
printf(
"\033[1;40;37m"
"\033[7;44H__"
"\033[8;41H/\\|\\/"
"\033[9;40H/ \\-'"
"\033[10;39H/ /"
"\033[11;38H|\\R /"
"\033[12;38H\\o\\/"
"\033[13;39H\\-"
);
}
if (rotation==48) {
printf("\033[1;40;37m");
if (thrusting) {
printf(
"\033[8;35H_ ____ _"
"\033[9;34H- | |- |-"
"\033[9;34H/ | |- |-"
"\033[10;33H|O |R | |--"
"\033[11;34H-_|____|-_|-"
"\033[11;34H\\_|____|-_|-"
);
}
else {
printf(
"\033[8;35H_ ____ _"
"\033[9;34H- | |- |"
"\033[9;34H/ | |- |"
"\033[10;33H|O |R | |"
"\033[11;34H-_|____|-_|"
"\033[11;34H\\_|____|-_|"
);
}
}
@ -130,7 +166,7 @@ static void draw_ship(int stage, int thrusting, int rotation) {
"\033[10;37H\\ \\"
"\033[11;38H\\ /_"
"\033[12;39H\\/|/\\"
"\033[13;41H--"
"\033[13;42H--"
);
}
@ -148,24 +184,6 @@ _______________
/_\ |
\|/ |
---------------|
_______________
|
_ ____ _ |
- | |- |- |
|O |R | |--|
-_|____|-_|- |
|
|
---------------|
_______________
|
_ ____ _ |
- | |- |- |
|O |R | |--|
-_|____|-_|- |
|
|
---------------|
_______________
_ |
/o/\ |
@ -175,6 +193,57 @@ _______________
\/|/\ |
-- |
---------------|
_______________
|
_ ____ _ |
/ | |- |- |
|O |R | |--|
\_|____|-_|- |
|
|
---------------|
_______________
__ |
/\|\/ |
/ \-' |'
/ / |
|\R / |
\o\/ |
\- |
_______________
_______________
/|\ |
\-/ |
|---| |
| R | |
\---/ |
\O/ |
- |
_______________
_______________
__ |
\/|/\ |
'-/ \ |'
\ \ |
\ R/| |
\/o/ |
-/ |
_______________
_______________
|
_ ____ _ |
-| -| | \ |
--| | R| O| |
-|_-|____|_/ |
|
|
---------------|
_______________
_ |
/\o\ |
@ -564,7 +633,7 @@ after_physics:
}
/* 5555 */
/* if (!orbit_map_view) erase_old_ship() */
if (!orbit_map_view) erase_old_ship();
/* 6060 */
if (input=='q') {