~rabbits/orca-toy

40363c285bbdae0410158d833a190ba1fb9b1d7b — neauoire 10 months ago 0314d8a
Fixed bang display colors
3 files changed, 7 insertions(+), 7 deletions(-)

M build.sh
M sim.c
M toy.c
M build.sh => build.sh +2 -2
@@ 15,6 15,6 @@ clang-format -i midi.h

# toy
rm -f ./toy
cc -std=c89 -DDEBUG -Wall -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined -L/usr/local/lib -lSDL2 toy.c sim.c midi.c -o toy
# cc toy.c sim.c -std=c89 -O2 -DNDEBUG -g0 -s -Wall -L/usr/local/lib -lSDL2 -o toy
# cc -std=c89 -DDEBUG -Wall -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined -L/usr/local/lib -lSDL2 toy.c sim.c -o toy
cc toy.c sim.c -std=c89 -O2 -DNDEBUG -g0 -s -Wall -L/usr/local/lib -lSDL2 -o toy
./toy

M sim.c => sim.c +4 -4
@@ 218,11 218,11 @@ ope(Grid *g, int x, int y, char c)
		set(g, x, y, '*');
	else {
		set(g, x, y, '.');
		settype(g, x, y, 0);
		setport(g, x + 1, y, c);
		lock(g, x + 1, y);
		settype(g, x + 1, y, 0);
	}
	settype(g, x, y, 0);
}

void


@@ 324,11 324,11 @@ opn(Grid *g, int x, int y, char c)
		set(g, x, y, '*');
	else {
		set(g, x, y, '.');
		settype(g, x, y, 0);
		setport(g, x, y - 1, c);
		lock(g, x, y - 1);
		settype(g, x, y - 1, 0);
	}
	settype(g, x, y, 0);
}

void


@@ 387,10 387,10 @@ ops(Grid *g, int x, int y, char c)
		set(g, x, y, '*');
	else {
		set(g, x, y, '.');
		settype(g, x, y, 0);
		set(g, x, y + 1, c);
		lock(g, x, y + 1);
	}
	settype(g, x, y, 0);
}

void


@@ 443,11 443,11 @@ opw(Grid *g, int x, int y, char c)
		set(g, x, y, '*');
	else {
		set(g, x, y, '.');
		settype(g, x, y, 0);
		setport(g, x - 1, y, c);
		lock(g, x - 1, y);
		settype(g, x - 1, y, 0);
	}
	settype(g, x, y, 0);
}

void

M toy.c => toy.c +1 -1
@@ 1,7 1,7 @@
#include <SDL2/SDL.h>
#include <stdio.h>
#include "sim.h"
#include "midi.h"
/* #include "midi.h" */

#define HOR 32
#define VER 16