Browse Source

Added marks

main
neauoire 5 years ago
parent
commit
397da0b1f2
  1. 4
      build.sh
  2. 10
      nasu.c

4
build.sh

@ -7,10 +7,10 @@ clang-format -i nasu.c
rm ./nasu
# debug(slow)
# 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 nasu.c -L/usr/local/lib -lSDL2 -o nasu
# cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined nasu.c -L/usr/local/lib -lSDL2 -o nasu
# build(fast)
cc nasu.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -L/usr/local/lib -lSDL2 -o nasu
cc nasu.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o nasu
# Size
echo "Size: $(du -sk ./nasu)"

10
nasu.c

@ -65,7 +65,7 @@ SDL_Renderer *gRenderer;
SDL_Texture *gTexture;
Uint32 *pixels;
/* helpers */
#pragma mark - HELPERS
int
clamp(int val, int min, int max)
@ -101,7 +101,7 @@ screenpos(int pos, int offset)
return pos;
}
/* chr */
#pragma mark - CHR HANDLERS
int
rowchr(int x, int y)
@ -210,7 +210,7 @@ line(int ax, int ay, int bx, int by, int color)
}
}
/* draw */
#pragma mark - DRAW
void
clear(Uint32 *dst)
@ -303,7 +303,7 @@ redraw(Uint32 *dst)
SDL_RenderPresent(gRenderer);
}
/* options */
#pragma mark - OPTIONS
int
error(char *msg, const char *err)
@ -409,6 +409,8 @@ quit(void)
exit(0);
}
#pragma mark - TRIGGERS
void
domouse(SDL_Event *event)
{

Loading…
Cancel
Save