Compare commits
No commits in common. "4773cdb387e0b102d7c5370afadc1a82a871cfaa" and "5dc0ee8cf18c2c4cab95f03d3bfef3cb5d7eba1f" have entirely different histories.
4773cdb387
...
5dc0ee8cf1
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@ FILTERED_C_FILES := $(filter-out src/gfx%.c src/merge%.c, $(C_FILES))
|
||||||
all: terminal
|
all: terminal
|
||||||
|
|
||||||
curses: $(FILTERED_C_FILES) src/gfx_curses.c
|
curses: $(FILTERED_C_FILES) src/gfx_curses.c
|
||||||
$(CC) $(CFLAGS) -I/usr/share/gettext $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lcurses
|
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lcurses
|
||||||
|
|
||||||
terminal: $(FILTERED_C_FILES) src/gfx_terminal.c
|
terminal: $(FILTERED_C_FILES) src/gfx_terminal.c
|
||||||
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM) $(LDFLAGS)
|
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM) $(LDFLAGS)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# 2048-cli
|
# 2048-cli
|
||||||
|
|
||||||
[![run on repl.it](http://repl.it/badge/github/tiehuis/2048-cli)](https://repl.it/github/tiehuis/2048-cli)
|
|
||||||
|
|
||||||
A cli version/engine of the game [2048](https://github.com/gabrielecirulli/2048)=
|
A cli version/engine of the game [2048](https://github.com/gabrielecirulli/2048)=
|
||||||
for your Linux terminal.
|
for your Linux terminal.
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# French translations for 2048 package.
|
|
||||||
# Copyright (C) 2019 THE 2048'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the 2048 package.
|
|
||||||
# Thomas <thomas@servuc.fr>, 2019.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: 2048 v1.0.1\n"
|
|
||||||
"Report-Msgid-Bugs-To: matiasezequielbian@gmail.com\n"
|
|
||||||
"POT-Creation-Date: 2018-04-26 18:58-0300\n"
|
|
||||||
"PO-Revision-Date: 2019-10-24 23:37+0200\n"
|
|
||||||
"Last-Translator: Thomas <thomas@servuc.fr>\n"
|
|
||||||
"Language-Team: French\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=ASCII\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
||||||
|
|
||||||
#: src/gfx_curses.c:70
|
|
||||||
#, c-format
|
|
||||||
msgid " Hi: %d\n"
|
|
||||||
msgstr "Meilleur:%d\n"
|
|
||||||
|
|
||||||
#: src/gfx_curses.c:68
|
|
||||||
#, c-format
|
|
||||||
msgid "Score: %d\n"
|
|
||||||
msgstr " Score: %d\n"
|
|
||||||
|
|
||||||
#: src/gfx_curses.c:66
|
|
||||||
#, c-format
|
|
||||||
msgid "Score: %d (+%d)\n"
|
|
||||||
msgstr " Score: %d (+%d)\n"
|
|
|
@ -1,33 +0,0 @@
|
||||||
# French translations for PACKAGE package.
|
|
||||||
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# Thomas <thomas@servuc.fr>, 2019.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-04-26 19:02-0300\n"
|
|
||||||
"PO-Revision-Date: 2019-10-24 23:38+0200\n"
|
|
||||||
"Last-Translator: Thomas <thomas@servuc.fr>\n"
|
|
||||||
"Language-Team: French\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=ASCII\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
||||||
|
|
||||||
#: src/gfx_terminal.c:46
|
|
||||||
#, c-format
|
|
||||||
msgid " Hi: %ld\n"
|
|
||||||
msgstr "Meilleur: %ld\n"
|
|
||||||
|
|
||||||
#: src/gfx_terminal.c:44
|
|
||||||
#, c-format
|
|
||||||
msgid "Score: %ld\n"
|
|
||||||
msgstr " Score: %ld\n"
|
|
||||||
|
|
||||||
#: src/gfx_terminal.c:42
|
|
||||||
#, c-format
|
|
||||||
msgid "Score: %ld (+%ld)\n"
|
|
||||||
msgstr " Score: %ld (+%ld)\n"
|
|
|
@ -1,56 +0,0 @@
|
||||||
# French translations for PACKAGE package.
|
|
||||||
# Copyright (C) 2019 THE PACKAGE'S COPYRIGHT HOLDER
|
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
|
||||||
# Thomas <thomas@servuc.fr>, 2019.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2018-05-17 18:12-0300\n"
|
|
||||||
"PO-Revision-Date: 2019-10-24 23:38+0200\n"
|
|
||||||
"Last-Translator: Thomas <thomas@servuc.fr>\n"
|
|
||||||
"Language-Team: French\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=ASCII\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:58
|
|
||||||
#, c-format
|
|
||||||
msgid "Are you sure you want to reset your scores? Y(es) or N(o)\n"
|
|
||||||
msgstr "Voulez-vous vraiment remettre a zero vos scores ? (Y)Oui ou (N)on\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:76
|
|
||||||
#, c-format
|
|
||||||
msgid "Please enter Yes or No\n"
|
|
||||||
msgstr "Veuillez entrer (Y)Oui ou (N)on\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:95
|
|
||||||
#, c-format
|
|
||||||
msgid "load: Failed to open highscore file\n"
|
|
||||||
msgstr "chargement: Echec dans l'ouverture du fichier de score\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:100
|
|
||||||
#, c-format
|
|
||||||
msgid "load: Failed to parse highscore file\n"
|
|
||||||
msgstr "chargement: Echec dans la lecture du fichier de score\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:122
|
|
||||||
#, c-format
|
|
||||||
msgid "save: Failed to open highscore file\n"
|
|
||||||
msgstr "sauvegarde: Echec dans l'ouverture du fichier de score\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:127
|
|
||||||
#, c-format
|
|
||||||
msgid "save: Failed to write highscore file\n"
|
|
||||||
msgstr "sauvegarde: Echec dans l'ecriture du fichier de score\n"
|
|
||||||
|
|
||||||
#: src/highscore.c:71
|
|
||||||
msgid "y"
|
|
||||||
msgstr "y"
|
|
||||||
|
|
||||||
#: src/highscore.c:71
|
|
||||||
msgid "yes"
|
|
||||||
msgstr "yes"
|
|
|
@ -71,7 +71,7 @@ void gfx_draw(struct gfx_state *s, struct gamestate *g)
|
||||||
if (g->score >= g->score_high)
|
if (g->score >= g->score_high)
|
||||||
g->score_high = g->score;
|
g->score_high = g->score;
|
||||||
|
|
||||||
mvwprintw(s->window, 1, 0, gettext(" Hi: %d\n"), g->score_high);
|
mvwprintw(s->window, 1, 0, gettext(" Hil: %d\n"), g->score_high);
|
||||||
|
|
||||||
wattron(s->window, A_DIM);
|
wattron(s->window, A_DIM);
|
||||||
iterate(g->opts->grid_width * (g->print_width + 2) + 1, waddch(s->window, '-'));
|
iterate(g->opts->grid_width * (g->print_width + 2) + 1, waddch(s->window, '-'));
|
||||||
|
@ -112,12 +112,6 @@ void gfx_draw(struct gfx_state *s, struct gamestate *g)
|
||||||
iterate(g->opts->grid_height * (g->print_width + 2) + 1, waddch(s->window, '-'));
|
iterate(g->opts->grid_height * (g->print_width + 2) + 1, waddch(s->window, '-'));
|
||||||
wattroff(s->window, A_DIM);
|
wattroff(s->window, A_DIM);
|
||||||
wrefresh(s->window);
|
wrefresh(s->window);
|
||||||
|
|
||||||
mvwprintw(s->window, 12, 0, "2048");
|
|
||||||
mvwprintw(s->window, 13, 0, "----");
|
|
||||||
|
|
||||||
mvwprintw(s->window, 15, 0, "Use WASD for direction");
|
|
||||||
mvwprintw(s->window, 16, 0, "Q to quit.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int gfx_getch(struct gfx_state *s)
|
int gfx_getch(struct gfx_state *s)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user