Update 0.3
Signed-off-by: 0xf8 <0xf8.dev@proton.me>
This commit is contained in:
parent
5a05b09713
commit
d9526039eb
11
src/main.c
11
src/main.c
@ -175,19 +175,19 @@ int main(int argc, char **argv) {
|
||||
ncplane_putchar_yx(notcurses_stdplane(nc), midr + 0, midc, '|');
|
||||
ncplane_putchar_yx(notcurses_stdplane(nc), midr + 1, midc, '|');
|
||||
|
||||
struct bignumber_t *bn_houru = bignumber(00, 0, houru);
|
||||
struct bignumber_t *bn_houru = bignumber(00, houru);
|
||||
drawbignumber(bn_houru, sec, midc - 20, midr - 2, notcurses_stdplane(nc));
|
||||
free(bn_houru);
|
||||
|
||||
struct bignumber_t *bn_hourl = bignumber(15, 1, hourl);
|
||||
struct bignumber_t *bn_hourl = bignumber(15, hourl);
|
||||
drawbignumber(bn_hourl, sec, midc - 10, midr - 2, notcurses_stdplane(nc));
|
||||
free(bn_hourl);
|
||||
|
||||
struct bignumber_t *bn_minu = bignumber(30, 2, minu);
|
||||
struct bignumber_t *bn_minu = bignumber(30, minu);
|
||||
drawbignumber(bn_minu, sec, midc + 3, midr - 2, notcurses_stdplane(nc));
|
||||
free(bn_minu);
|
||||
|
||||
struct bignumber_t *bn_minl = bignumber(45, 3, minl);
|
||||
struct bignumber_t *bn_minl = bignumber(45, minl);
|
||||
drawbignumber(bn_minl, sec, midc + 13, midr - 2, notcurses_stdplane(nc));
|
||||
free(bn_minl);
|
||||
|
||||
@ -204,7 +204,7 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bignumber_t *bignumber(int start, uint index, uint mimick) {
|
||||
struct bignumber_t *bignumber(int start, uint mimick) {
|
||||
struct bignumber_t *bn = (struct bignumber_t *)malloc(sizeof(struct bignumber_t) + 1);
|
||||
|
||||
uint i = start;
|
||||
@ -212,7 +212,6 @@ struct bignumber_t *bignumber(int start, uint index, uint mimick) {
|
||||
for (int y = 0; y < 5; y++)
|
||||
bn->matrix[y][x] = i, i++;
|
||||
|
||||
bn->index = index;
|
||||
bn->mimick = mimick;
|
||||
|
||||
return bn;
|
||||
|
@ -38,7 +38,6 @@ struct string {
|
||||
struct bignumber_t {
|
||||
uint matrix[5][3];
|
||||
uint mimick;
|
||||
uint index;
|
||||
};
|
||||
|
||||
|
||||
@ -49,7 +48,7 @@ void free_string(struct string *s);
|
||||
struct string *pad_int(int n, uint pad, uint maxsize);
|
||||
|
||||
// this creates a bignumber_t
|
||||
struct bignumber_t *bignumber(int start, uint index, uint mimick);
|
||||
struct bignumber_t *bignumber(int start, uint mimick);
|
||||
|
||||
// this draws a big number
|
||||
void drawbignumber(struct bignumber_t *, int sec, int startx, int starty, struct ncplane *place);
|
||||
|
Loading…
Reference in New Issue
Block a user