From 95432d94ee6d5cd0c1f71c36b78e195f1b96892f Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sun, 11 Feb 2018 10:05:49 +0200 Subject: [PATCH] added perf_start/perf_end assembly macros --- GNUmakefile | 6 +++--- Makefile.dj | 1 + src/gfxutil.c | 7 ++++--- src/greets.c | 8 +++++++- src/util.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index d6c67d1..830297d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,5 @@ src = $(wildcard src/*.c) $(wildcard src/sdl/*.c) -obj = $(src:.c=.o) +obj = $(src:.c=.o) $(asmsrc:.asm=.o) dep = $(obj:.o=.d) bin = demo @@ -29,8 +29,8 @@ mikmod: .PHONY: cleanlibs cleanlibs: - $(MAKE) -C libs/imago -f Makefile.dj clean - $(MAKE) -C libs/oldmik -f Makefile.dj clean + $(MAKE) -C libs/imago clean + $(MAKE) -C libs/mikmod clean .PHONY: clean clean: diff --git a/Makefile.dj b/Makefile.dj index 0f152b7..764ad9d 100644 --- a/Makefile.dj +++ b/Makefile.dj @@ -1,4 +1,5 @@ src = $(wildcard src/*.c) $(wildcard src/dos/*.c) +asmsrc = $(wildcard src/*.asm) obj = $(src:.c=.cof) dep = $(obj:.cof=.dep) bin = demo.exe diff --git a/src/gfxutil.c b/src/gfxutil.c index cb51780..b82a612 100644 --- a/src/gfxutil.c +++ b/src/gfxutil.c @@ -149,20 +149,21 @@ void draw_line(int x0, int y0, int x1, int y1, unsigned short color) int sum = sptr[0] * (rad + 1); \ int count = (rad * 2 + 1) << 8; \ int midsize = w - rad * 2; \ + int firstpix = sptr[0]; \ int lastpix = sptr[pstep * (w - 1)]; \ /* add up the contributions for the -1 pixel */ \ for(j=0; j