@@ -49,7 +49,7 @@ void getSize(int *x, int *y) {
4949#endif
5050#define g (x , y , u , v , s ) for (int j = 0, X = x, Y = y; j < v && Y + j < h - X / w && Y >= 0 && X >= 0; ++j) memcpy(&f[Y + j][X], &s[j * u], u)
5151#define l (x , y , w , h , a , b , c , d ) !((x - a > c && x >= a) || (a - x > w && a >= x) || (y - b > d && y >= b) || (b - y > h && b >= y))
52- #define f (x , y , z ) y += z * d; strcpy(b, x); break
52+ #define f (x , y , z ) p. y += z * d; strcpy(b, x); break
5353int main () {
5454 SetupConsole ();
5555 puts ("\x1b[?25l" ); // hide cursor
@@ -67,13 +67,13 @@ int main() {
6767 memset (f , ' ' , h * w ); // clear the screen
6868 switch (u ) { // could be minified...
6969 case UP :
70- f (" /\\ / \\ vv " , p . y , -20 );
70+ f (" /\\ / \\ vv " , y , -20 );
7171 case DOWN :
72- f (" ^^ \\ / \\/ " , p . y , 20 );
72+ f (" ^^ \\ / \\/ " , y , 20 );
7373 case RIGHT :
74- f ("<\\ < ></ " , p . x , 40 );
74+ f ("<\\ < ></ " , x , 40 );
7575 case LEFT :
76- f (" />< > \\>" , p . x , -40 );
76+ f (" />< > \\>" , x , -40 );
7777 }
7878 p .x = p .x < 4 ? 4 : p .x >= w - 4 ? w - 4 : p .x ; // make sure the player is in the screen (horizontally)
7979 p .y = p .y < 2 ? 2 : p .y >= h - 3 ? h - 3 : p .y ; // make sure the player is in the screen (vertically)
0 commit comments