mirror of
https://github.com/AngelJumbo/lavat.git
synced 2024-11-16 12:46:39 +00:00
Removing -t for now
This commit is contained in:
parent
9ab148550c
commit
c28bd26a10
32
lavat.c
32
lavat.c
@ -6,7 +6,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdbool.h>
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
@ -19,7 +18,6 @@ static int nballs = 10;
|
|||||||
static short speedMult = 1;
|
static short speedMult = 1;
|
||||||
static short rim = 0;
|
static short rim = 0;
|
||||||
static float radius = 100;
|
static float radius = 100;
|
||||||
static bool ova = false;
|
|
||||||
int parse_options(int argc, char *argv[]);
|
int parse_options(int argc, char *argv[]);
|
||||||
void print_help();
|
void print_help();
|
||||||
|
|
||||||
@ -85,29 +83,7 @@ int main(int argc, char *argv[]) {
|
|||||||
(y - balls[k].y) * (y - balls[k].y)));
|
(y - balls[k].y) * (y - balls[k].y)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ova) {
|
if (!custom) {
|
||||||
if (sum[0] > radius) {
|
|
||||||
if (sum[1] > radius) {
|
|
||||||
tb_printf(i, j, color | TB_BOLD, 0, "%e");
|
|
||||||
} else {
|
|
||||||
tb_printf(i, j, color | TB_BOLD, 0, "%e");
|
|
||||||
}
|
|
||||||
} else if (sum[1] > radius) {
|
|
||||||
tb_printf(i, j, color | TB_BOLD, 0, "%e");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rim) {
|
|
||||||
if (sum[0] > innerRadius) {
|
|
||||||
if (sum[1] > innerRadius) {
|
|
||||||
tb_printf(i, j, color, 0, "%e");
|
|
||||||
} else {
|
|
||||||
tb_printf(i, j, color | TB_BOLD, color, "%e");
|
|
||||||
}
|
|
||||||
} else if (sum[1] > innerRadius) {
|
|
||||||
tb_printf(i, j, color | TB_BOLD, color, "%e");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!custom) {
|
|
||||||
if (sum[0] > radius) {
|
if (sum[0] > radius) {
|
||||||
if (sum[1] > radius) {
|
if (sum[1] > radius) {
|
||||||
tb_printf(i, j, color | TB_BOLD, 0, "█");
|
tb_printf(i, j, color | TB_BOLD, 0, "█");
|
||||||
@ -173,7 +149,7 @@ int parse_options(int argc, char *argv[]) {
|
|||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
return 1;
|
return 1;
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt(argc, argv, ":c:s:r:R:b:F:th")) != -1) {
|
while ((c = getopt(argc, argv, ":c:s:r:R:b:F:h")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
if (strcmp(optarg, "red") == 0) {
|
if (strcmp(optarg, "red") == 0) {
|
||||||
@ -227,9 +203,6 @@ int parse_options(int argc, char *argv[]) {
|
|||||||
case 'F':
|
case 'F':
|
||||||
custom = optarg;
|
custom = optarg;
|
||||||
break;
|
break;
|
||||||
case 't':
|
|
||||||
ova = true;
|
|
||||||
break;
|
|
||||||
case 'h':
|
case 'h':
|
||||||
print_help();
|
print_help();
|
||||||
return 0;
|
return 0;
|
||||||
@ -263,7 +236,6 @@ void print_help() {
|
|||||||
" -b NBALLS Set the number of metaballs in the simulation, from "
|
" -b NBALLS Set the number of metaballs in the simulation, from "
|
||||||
"2 to 20. (default: 10)\n"
|
"2 to 20. (default: 10)\n"
|
||||||
" -F CHARS Allows for a custom set of chars to be used\n"
|
" -F CHARS Allows for a custom set of chars to be used\n"
|
||||||
" -t Toggles a 3d appearance\n"
|
|
||||||
" -h Print help.\n"
|
" -h Print help.\n"
|
||||||
"From a tty the rim will not work well.\n");
|
"From a tty the rim will not work well.\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user