Labirinto com desafios, iluminação, e enigma

galera estou tendo dificuldades para desenvolver a programação de um labirinto alguém pode me ajudar?

eu preciso fazer uma programação de iluminação 5x7, controle de entrada, salas com enigmas, desafios e vida (que serem perdidas caso os desafios não sejam compridos.

consegui desenvolver apenas isto e não está compilando quando boto -Wall. Alguém pode me ajudar?

#include <stdio.h>
#include <stdlib.h>

#define CHAO 0
#define PAREDE 1
#define VOCE 4
#define BORDA 5
#define PORTA 2
#define ENIGMA 3

#define OK 1
#define ERRO 2

#define LIMPARTELA "clear"

int coluna_atual = 4, linha_atual = 4;

int mapa[30][60] = {
		5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
		5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,5,
		5,1,0,0,0,0,1,0,0,1,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,5,
		5,1,0,0,0,0,0,0,1,1,2,2,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,
		5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
};

int desenhar_mapa(){
	int linha,coluna;
	for (linha=0;linha<30;linha++) {
		for (coluna=0;coluna<60;coluna++) {
			if ((linha == linha_atual) && (coluna == coluna_atual)) {
				printf("@");
				continue;
			}
			if (mapa[linha][coluna] == CHAO)
				printf(" ");
			if (mapa[linha][coluna] == PAREDE)
				printf("#");
			if (mapa[linha][coluna] == BORDA)
				printf("#");
			if (mapa[linha][coluna] == PORTA)
				printf("!");
			if (mapa[linha][coluna] == ENIGMA)
				printf("?");
		}
		printf("\n");
	}
	return OK;
}

int main(){
	char movimento;
	while ((movimento != 'x') && (movimento != 'X')) {
		system(LIMPARTELA);
		desenhar_mapa();
		printf("\n\n  (W)\n(A)+(D)\n  (S)\n\n");
		if ((scanf("%c",&movimento))==0) {
			printf("mensagem de erro..\n");
			getchar();
			return ERRO;
		}
		if ((movimento == 'w') || (movimento == 'W')) {
			linha_atual = linha_atual - 1;
			
			if (mapa[linha_atual][coluna_atual] != CHAO) {
				linha_atual = linha_atual + 1;
				printf("\n\nups.. ali não =)\n");
				getchar();
			}
		}
		if ((movimento == 's') || (movimento == 'S')) {
			linha_atual = linha_atual + 1;
			
			if (mapa[linha_atual][coluna_atual] != CHAO) {
				linha_atual = linha_atual - 1;
				printf("\n\nups.. ali não =)\n");
				getchar();
			}
		}
		if ((movimento == 'd') || (movimento == 'D')) {
			coluna_atual = coluna_atual + 1;
			
			if (mapa[linha_atual][coluna_atual] != CHAO) {
				coluna_atual = coluna_atual - 1;
				printf("\n\nups.. ali não =)\n");
				getchar();
			}
		}
		if ((movimento == 'a') || (movimento == 'A')) {
			coluna_atual = coluna_atual - 1;
			
			if (mapa[linha_atual][coluna_atual] != CHAO) {
				coluna_atual = coluna_atual + 1;
				printf("\n\nups.. ali não =)\n");
				getchar();
			}
		}
	}
}

@Douglas_Baptist, bem vindo ao GUJ! Quando postar código, selecione-o e formate-o usando o botão </> que fica acima da caixa de respostas, ou usando o atalho CTRL + SHIFT + C após selecionar o código na sua resposta. Repare como seu código fica confuso por não estar formatado. Edite sua questão, utilizando esta dica que te dei, e veja a diferença.

Aproveitando, dê uma lida neste tópico aqui: