add back to station

This commit is contained in:
quenousimporte 2025-03-30 20:15:15 +00:00
parent 635aedce92
commit 853921b79b
1 changed files with 17 additions and 4 deletions

21
w/w.c
View File

@ -92,6 +92,11 @@ void savestate()
fclose(file);
}
char currentchar()
{
return charatpos(state.location.x, state.location.y);
}
void update3dpov()
{
for (int i = 0; i < POV_3D_SIZE; i++)
@ -231,11 +236,12 @@ void update3dpov()
{
for (int i = 5; i < 9; i++) pov3d[i][9] = doorchar;
}
}
char currentchar()
{
return charatpos(state.location.x, state.location.y);
if (currentchar() == 's')
{
pov3d[0][4] = '[';
pov3d[0][5] = ']';
}
}
void updatepov()
@ -376,6 +382,7 @@ void update(char command[CMD_LEN])
switch (c)
{
case 's':
case '\0':
forward();
break;
case 'x':
@ -384,6 +391,12 @@ void update(char command[CMD_LEN])
case 'w':
left();
break;
case 'r':
if (currentchar() == 's')
{
state.place = PLACE_STATION;
}
break;
default:
break;
}