Mercurial > hg > forks > 3x666-SDL
changeset 25:f896fe6a98da
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 15 Mar 2013 23:35:52 +0200 |
parents | 7c314ac342f4 |
children | 7f7330567277 |
files | 3x666.c Makefile Makefile.gwin Makefile.w32 |
diffstat | 4 files changed, 23 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/3x666.c Fri Mar 15 23:21:08 2013 +0200 +++ b/3x666.c Fri Mar 15 23:35:52 2013 +0200 @@ -584,11 +584,15 @@ // capable of producing stereo anyway (for now, at least.) int i, need = len / sizeof(Sint16); +#if 0 // The audio rendering handling is a bit silly due to the way // the original code works (assumes that it can always render // a certain amount/duration of data, instead of being given // the buffer duration/size to render. So we cope with that here. - while (engine.mixFill < need && engine.mixFill < engine.mixBufSize / 2) + if (need >= engine.mixBufSize) + need = engine.mixBufSize; + + while (engine.mixFill < need && engine.mixFill < engine.mixBufSize) { int got = engineRenderAudio(engine.mixBuf + engine.mixFill); engine.mixFill += got; @@ -604,6 +608,7 @@ { memmove(engine.mixBuf, engine.mixBuf + need, engine.mixFill * sizeof(Sint32)); } +#endif }
--- a/Makefile Fri Mar 15 23:21:08 2013 +0200 +++ b/Makefile Fri Mar 15 23:35:52 2013 +0200 @@ -1,21 +1,16 @@ -# mAKEFiLE fOR 3x666 bY oCSA +# +# Configuration settings for Linux and generic UNIX +# See other Makefile.* files for more options. +# + +# C-compiler, flags and linker flags +CC=gcc SDL_CFLAGS=`sdl-config --cflags` SDL_LDFLAGS=`sdl-config --libs` -CC = gcc -CFLAGS = -O3 -march=core2 - - -CFLAGS += -g -W -Wall $(SDL_CFLAGS) -LDFLAGS = $(SDL_LDFLAGS) -lm - +# Miscellaneous +BINPATH= +OBJPATH=obj/unix/ +EXEEXT= -3x666: 3x666.o - $(CC) -o $@ $+ $(LDFLAGS) - -3x666.o: 3x666.c config.h 3xfont.h - $(CC) $(CFLAGS) -c -o $@ $< - -clean: - $(RM) 3x666.o 3x666 - +include Makefile.gen
--- a/Makefile.gwin Fri Mar 15 23:21:08 2013 +0200 +++ b/Makefile.gwin Fri Mar 15 23:35:52 2013 +0200 @@ -5,23 +5,13 @@ # C-compiler, flags and linker flags CC=$(MINGW_PREFIX)gcc -AR=$(MINGW_PREFIX)ar -RANLIB=$(MINGW_PREFIX)ranlib RM=rm SDL_CFLAGS=`$(MINGW_PATH)/bin/sdl-config --cflags` -SDL_LDFLAGS:=`$(MINGW_PATH)/bin/sdl-config --libs` +SDL_LDFLAGS=`$(MINGW_PATH)/bin/sdl-config --libs` -lSDL -CFLAGS = -O3 -march=pentium-m -g -W -Wall $(SDL_CFLAGS) -LDFLAGS = -lm -lmingw32 $(SDL_LDFLAGS) -lSDL +CFLAGS = -march=pentium-m +LDFLAGS = -lmingw32 -3x666$(EXEEXT): 3x666.o - $(CC) -o $@ $+ $(LDFLAGS) - -3x666.o: 3x666.c config.h 3xfont.h - $(CC) $(CFLAGS) -c -o $@ $< - -clean: - $(RM) 3x666.o 3x666$(EXEEXT) - +include Makefile.gen