diff --git a/Makefile b/Makefile index f687a7d2..8d89df91 100755 --- a/Makefile +++ b/Makefile @@ -88,6 +88,8 @@ COMPILER_FLAGS = $(includeflag) -I/usr/local/include -g -O0 $(WARNING_FLAGS) -MD LIBPATH = -L./bin -L/usr/local/lib -L/usr/local/lib/tcc +ALLFILES != find source/ -name '*.[ch]' -type f + ifeq ($(UNAME), Windows_NT) LINKER_FLAGS = -static -DSDL_MAIN_HANDLED ELIBS = engine editor mingw32 SDL2main SDL2 m dinput8 dxguid dxerr8 user32 gdi32 winmm imm32 ole32 oleaut32 shell32 version uuid setupapi opengl32 stdc++ winpthread @@ -161,6 +163,10 @@ $(objprefix)/%.o:%.c @echo Making C object $@ -@$(CC) $(COMPILER_FLAGS) +tags: $(ALLFILES) + @echo Making tags + @ctags -x -R source > tags + clean: @echo Cleaning project @find $(BIN) -type f -delete \ No newline at end of file diff --git a/acme/cdef b/acme/cdef new file mode 100755 index 00000000..57c35c26 --- /dev/null +++ b/acme/cdef @@ -0,0 +1,24 @@ +#!/usr/bin/perl +# Use with tags created with 'ctags -x'; give it a symbol + +use strict; +use warnings; + +my $pat = $ARGV[0] or die("Need a tag to find"); +print "Found for the tag $pat: \n"; + +sub main +{ + my $t = 'tags'; + open(FH, $t) or die("File $t not found."); + + while (my $line = ) { + if ($line =~ /^$pat/) { + my @l = split(' ', $line); + #print "$l[3]:$l[2] \n"; + exec 'echo $l[3]:$l[2] > /dev/null' + } + } +} + +main(); diff --git a/source/engine/sound.c b/source/engine/sound.c index 8ab88e17..0a0522db 100755 --- a/source/engine/sound.c +++ b/source/engine/sound.c @@ -1,9 +1,6 @@ - - - #include "sound.h" #include "resources.h" - +#include ma_engine engine; diff --git a/source/engine/sound.h b/source/engine/sound.h index 7e5ffdbd..57dd582a 100755 --- a/source/engine/sound.h +++ b/source/engine/sound.h @@ -1,7 +1,7 @@ #ifndef SOUND_H #define SOUND_H -#include +#include "miniaudio.h" diff --git a/source/engine/window.c b/source/engine/window.c index 340f8fa1..85380d13 100755 --- a/source/engine/window.c +++ b/source/engine/window.c @@ -1,13 +1,9 @@ #include "window.h" - - - #include #include "texture.h" #include "log.h" #include #include - #include static struct mSDLWindow *mainwin;