Compare commits

..

No commits in common. "master" and "1.0.2" have entirely different histories.

3 changed files with 5 additions and 58 deletions

BIN
main

Binary file not shown.

27
main.c

@ -12,12 +12,10 @@
#include <math.h>
#include <string.h>
uint16_t Hole_Div = 40;
uint16_t SCR_X;
uint16_t SCR_Y;
uint16_t FPS = 60;
#define FPS (60)
char blank_char = 32;
char wall_char = 35;
char goal_char = 71;
@ -28,7 +26,6 @@ uint16_t wall_color = 1;
uint16_t goal_color = 2;
uint16_t player_color = 3;
uint16_t border_color = 4;
uint16_t Quit_on_pass = 0;
char letter = ' ';
struct Object {
uint16_t x;
@ -239,26 +236,9 @@ int main(int argc, char * argv[]) {
SCR_Y = atoi(argv[2]);
Hole_Div = atoi(argv[3]);
}
if(argc == 5){
SCR_X = atoi(argv[1]);
SCR_Y = atoi(argv[2]);
Hole_Div = atoi(argv[3]);
FPS = atoi(argv[4]);
}
if (argc == 6){
SCR_X = atoi(argv[1]);
SCR_Y = atoi(argv[2]);
Hole_Div = atoi(argv[3]);
FPS = atoi(argv[4]);
if(strcmp(argv[5],"-n") == 0){
Quit_on_pass = 1;
}
}
generate_maze();
if(Quit_on_pass == 0){
render_maze();
draw_maze();
}
while (1) {
inputs_tmp = keyinput();
if (inputs_tmp == 1) {
@ -270,15 +250,10 @@ int main(int argc, char * argv[]) {
} else {
orient = 0;
}
if(Quit_on_pass == 1){
return 4;
}
generate_maze();
}
if(Quit_on_pass == 0){
render_maze();
draw_maze();
}
usleep(round(1000000 / FPS));
}
endwin();

28
test.sh

@ -1,28 +0,0 @@
#!/bin/bash
RANDOM=$$$(date +%s)
X=""
CNT=0
CNTX=0
CNTA=0
CNTB=0
CNTXB=0
CNTAB=0
while [ $CNTX -lt 50 ]; do
let CNT=0
while [ $CNT -lt 162 ]; do
X+="wd"
let CNT=CNT+1
done
let CNTA=0
while [ $CNTA -lt 162 ]; do
X+="wa"
let CNTA=CNTA+1
done
let CNTX=CNTX+1
done
X+="q"
echo $X