fixes to code and a option for opengl building for release
This commit is contained in:
parent
b6afd854d0
commit
3b29a74767
6
Makefile
6
Makefile
@ -16,6 +16,7 @@ all: build/powder
|
||||
powder-release.exe: build/powder-release.exe
|
||||
powder.exe: build/powder.exe
|
||||
powder-release: build/powder-release
|
||||
powder-opengl-release: build/powder-opengl-release
|
||||
powder: build/powder
|
||||
powder-x: build/powder-x
|
||||
powder-x.jnilib: build/powder-x.jnilib
|
||||
@ -26,6 +27,8 @@ build/powder.exe: CFLAGS += -DWIN32
|
||||
build/powder.exe: LFLAGS := -lmingw32 -lregex -lws2_32 -lSDLmain -lpthread -lSDL -lm -lbz2 -llua -lfftw3f-3 #-mwindows
|
||||
build/powder-release: CFLAGS += -DLIN32 -O3 -ftree-vectorize -msse3 -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations
|
||||
build/powder-release: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f
|
||||
build/powder-opengl-release: CFLAGS += -DLIN32 -O3 -ftree-vectorize -msse3 -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations -DOGLR -DPIX32OGL -DPIXALPHA
|
||||
build/powder-opengl-release: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f -lGL -lGLEW -DOGLR -DPIX32OGL -DPIXALPHA
|
||||
build/powder: CFLAGS += -DLIN32
|
||||
build/powder: LFLAGS := -lSDL -lm -lbz2 -llua -lfftw3f
|
||||
#build/powder-x: CFLAGS += -DMACOSX -I/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/Lua.framework/Headers -I/Library/Frameworks/OpenGL.framework/Headers -DOGLR -DPIX32OGL -DPIXALPHA
|
||||
@ -46,6 +49,9 @@ build/powder-res.o: resources/powder-res.rc resources/powder.ico resources/docum
|
||||
build/powder-release: $(SOURCES)
|
||||
$(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@
|
||||
strip $@
|
||||
build/powder-opengl-release: $(SOURCES)
|
||||
$(CPPC) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(SOURCES) $(LFLAGS) -o $@
|
||||
strip $@
|
||||
build/powder.exe: buildpaths-powder.exe generate $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o
|
||||
$(CPPC_WIN) $(CFLAGS) $(OFLAGS) $(LDFLAGS) $(patsubst build/obj/%.o,build/obj/powder.exe/%.o,$(OBJS)) build/powder-res.o $(LFLAGS) -o $@ -ggdb
|
||||
build/obj/powder.exe/%.o: src/%.cpp $(HEADERS)
|
||||
|
@ -19,10 +19,7 @@ SaveRenderer::SaveRenderer(){
|
||||
|
||||
Thumbnail * SaveRenderer::Render(GameSave * save)
|
||||
{
|
||||
#ifndef OGLR
|
||||
Thumbnail * tempThumb = NULL;
|
||||
int width, height;
|
||||
|
||||
#ifdef OGLR
|
||||
width = save->blockWidth*CELL;
|
||||
height = save->blockHeight*CELL;
|
||||
@ -43,6 +40,7 @@ Thumbnail * SaveRenderer::Render(GameSave * save)
|
||||
|
||||
g->Clear();
|
||||
sim->clear_sim();
|
||||
|
||||
if(!sim->Load(save))
|
||||
{
|
||||
ren->render_parts();
|
||||
@ -55,17 +53,11 @@ Thumbnail * SaveRenderer::Render(GameSave * save)
|
||||
dst+=(width*CELL);///PIXELSIZE;
|
||||
src+=XRES+BARSIZE;
|
||||
}
|
||||
|
||||
tempThumb = new Thumbnail(0, 0, pData, ui::Point(width*CELL, height*CELL));
|
||||
}
|
||||
if(pData)
|
||||
free(pData);
|
||||
return tempThumb;
|
||||
#else
|
||||
VideoBuffer buffer(64, 64);
|
||||
buffer.BlendCharacter(32, 32, 'X', 255, 255, 255, 255);
|
||||
Thumbnail * thumb = new Thumbnail(0, 0, buffer.Buffer, ui::Point(64, 64));
|
||||
return thumb;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user