From 0bdb255a4e1aa5a893aec73ea1290837277ede34 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 15 Jan 2017 14:07:18 -0500 Subject: [PATCH] puzzles: fix building on c200v2 - disables Solo and Loopy Change-Id: I3de15c0ad001683a4303950972af2f5988d438d0 --- apps/plugins/puzzles/SOURCES.games | 12 ++++++++---- apps/plugins/puzzles/puzzles.make | 9 +++++++-- apps/plugins/puzzles/rockbox.c | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/apps/plugins/puzzles/SOURCES.games b/apps/plugins/puzzles/SOURCES.games index b16cf0f70d..8ca99c0e2e 100644 --- a/apps/plugins/puzzles/SOURCES.games +++ b/apps/plugins/puzzles/SOURCES.games @@ -19,9 +19,6 @@ net.c netslide.c /*palisade.c*/ pattern.c -#if PLUGIN_BUFFER_SIZE > 0x20000 -pearl.c -#endif pegs.c range.c rect.c @@ -35,7 +32,7 @@ tents.c /*towers.c*/ tracks.c twiddle.c -/*undead.c*/ +/*undead.c*/ /*unequal.c*/ unruly.c untangle.c @@ -45,3 +42,10 @@ untangle.c /*unfinished/separate.c*/ /*unfinished/slide.c*/ /*unfinished/sokoban.c*/ + +/* no c200v2 */ +#if PLUGIN_BUFFER_SIZE > 0x14000 +pearl.c +loopy.c +solo.c +#endif diff --git a/apps/plugins/puzzles/puzzles.make b/apps/plugins/puzzles/puzzles.make index f49b663197..520fd46693 100644 --- a/apps/plugins/puzzles/puzzles.make +++ b/apps/plugins/puzzles/puzzles.make @@ -42,8 +42,13 @@ PUZZLES_ROCKS := $(addprefix $(PUZZLES_OBJDIR)/sgt-, $(notdir $(PUZZLES_GAMES_SR ROCKS += $(PUZZLES_ROCKS) endif -# Hack to suppress all warnings: -PUZZLESFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O3 \ +PUZZLESOPTIMIZE := -O3 +ifeq ($(MODELNAME), sansac200v2) +PUZZLESOPTIMIZE := -Os +endif + +# we suppress all warnings +PUZZLESFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) $(PUZZLESOPTIMIZE) \ -Wno-unused-parameter -Wno-sign-compare -Wno-strict-aliasing -w \ -DFOR_REAL -I$(PUZZLES_SRCDIR) ifdef PUZZLES_COMBINED diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index dc8d4c9645..077d5f8fe2 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c @@ -207,7 +207,7 @@ static inline void plot(unsigned x, unsigned y, unsigned long a, r2 = RGB_UNPACK_RED(orig); g2 = RGB_UNPACK_GREEN(orig); b2 = RGB_UNPACK_BLUE(orig); -#lse +#else r2 = orig.r; g2 = orig.g; b2 = orig.b;