parent
aae413fe1a
commit
246112d93c
7
w/w.c
7
w/w.c
|
@ -342,6 +342,7 @@ void clearscreen()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
system("cls");
|
system("cls");
|
||||||
|
// launch chcp 65001 before
|
||||||
#else
|
#else
|
||||||
system("clear");
|
system("clear");
|
||||||
#endif
|
#endif
|
||||||
|
@ -364,7 +365,7 @@ void init()
|
||||||
|
|
||||||
void update(char command[CMD_LEN])
|
void update(char command[CMD_LEN])
|
||||||
{
|
{
|
||||||
char c = command[0];
|
char c = command[0];
|
||||||
if (state.place == PLACE_MAP)
|
if (state.place == PLACE_MAP)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
|
@ -407,7 +408,7 @@ void update(char command[CMD_LEN])
|
||||||
void draw()
|
void draw()
|
||||||
{
|
{
|
||||||
clearscreen();
|
clearscreen();
|
||||||
|
|
||||||
if (state.place == PLACE_TITLE)
|
if (state.place == PLACE_TITLE)
|
||||||
{
|
{
|
||||||
printf("\n\n La légende des dongeons de l'espace\n\n\n");
|
printf("\n\n La légende des dongeons de l'espace\n\n\n");
|
||||||
|
@ -481,7 +482,7 @@ int main()
|
||||||
init();
|
init();
|
||||||
|
|
||||||
char command[CMD_LEN] = "";
|
char command[CMD_LEN] = "";
|
||||||
|
|
||||||
while (command[0] != 'q')
|
while (command[0] != 'q')
|
||||||
{
|
{
|
||||||
update(command);
|
update(command);
|
||||||
|
|
Loading…
Reference in New Issue