~rabbits/nasu

0b0d86984f651c05f730b3a8ba87ceb9abac3996 — Devine Lu Linvega 1 year, 2 months ago 6cb68be
Renamed to chr6
4 files changed, 12 insertions(+), 12 deletions(-)

M README.md
M build.sh
R nasu6.c => chr6.c
A main.o
M README.md => README.md +3 -3
@@ 1,13 1,13 @@
# Nasu6
# Chr6

A minimal chr editor, written in ANSI C.

## Build

To build Nasu6, you must have [SDL2](https://wiki.libsdl.org/).
To build chr6, you must have [SDL2](https://wiki.libsdl.org/).

```
sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl2-dev
```

## Controls

M build.sh => build.sh +5 -5
@@ 1,14 1,14 @@
# format code
clang-format -i nasu6.c
clang-format -i chr6.c

# remove old
rm ./nasu6
rm ./chr6

# debug
# 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 nasu6.c -I/usr/local/include -L/usr/local/lib -lSDL2 -o nasu6
# 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 chr6.c -I/usr/local/include -L/usr/local/lib -lSDL2 -o chr6

# build
cc -std=c89 -Wall nasu6.c -I/usr/local/include -L/usr/local/lib -lSDL2 -o nasu6
cc -std=c89 -Wall chr6.c -I/usr/local/include -L/usr/local/lib -lSDL2 -o chr6

# run
./nasu6 sprite.chr
./chr6 sprite.chr

R nasu6.c => chr6.c +4 -4
@@ 112,7 112,7 @@ edit(Brush* b)
	    (p1.x / ZOOM) % 8,
	    (p1.y / ZOOM) % 8,
	    b->color);
	SDL_SetWindowTitle(gWindow, "nasu*");
	SDL_SetWindowTitle(gWindow, "chr6*");
	redraw();
}



@@ 129,7 129,7 @@ erase(Brush* b)
		buffer[(id * 16) + i] = 0x00;
		buffer[(id * 16) + i + 8] = 0x00;
	}
	SDL_SetWindowTitle(gWindow, "nasu*");
	SDL_SetWindowTitle(gWindow, "chr6*");
	redraw();
}



@@ 138,7 138,7 @@ save(void)
{
	fwrite(buffer, sizeof(buffer), 1,
	       fopen("output.chr", "wb"));
	SDL_SetWindowTitle(gWindow, "nasu");
	SDL_SetWindowTitle(gWindow, "chr6");
}

int


@@ 236,7 236,7 @@ init(void)
	int i, j;
	if(SDL_Init(SDL_INIT_VIDEO) < 0)
		return error("init", SDL_GetError());
	gWindow = SDL_CreateWindow("nasu6",
	gWindow = SDL_CreateWindow("chr66",
	                           SDL_WINDOWPOS_UNDEFINED,
	                           SDL_WINDOWPOS_UNDEFINED,
	                           WIDTH,

A main.o => main.o +0 -0