Browse Source

Renamed to chr6

main
Devine Lu Linvega 6 years ago
parent
commit
0b0d86984f
  1. 6
      README.md
  2. 10
      build.sh
  3. 8
      chr6.c
  4. BIN
      main.o

6
README.md

@ -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

10
build.sh

@ -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

8
nasu6.c → chr6.c

@ -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,

BIN
main.o

Binary file not shown.
Loading…
Cancel
Save