changeset 607:360b1ad83ed9

Rename things; Fix build by combining the conflicting rules.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 12 Apr 2013 11:21:37 +0300
parents a0082ce261c8
children 9620208f7ff4
files Makefile.gen gfxconv.c setupmenubar.h
diffstat 3 files changed, 32 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Fri Apr 12 11:18:45 2013 +0300
+++ b/Makefile.gen	Fri Apr 12 11:21:37 2013 +0300
@@ -301,9 +301,6 @@
 	@echo " CC $+"
 	@$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS)
 
-$(OBJPATH)dmsimple.o: $(DMLIB)dmsimple.c $(DMLIB)dmengine.h
-	@echo " CC $+"
-	@$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS)
 
 $(OBJPATH)jssmod.o: $(DMLIB)jssmod.c $(DMLIB)jssmod.h $(DMLIB)jss.h
 	@echo " CC $+"
@@ -343,10 +340,12 @@
 $(DMLIB)setupimage.h: $(DMLIB)graphics/SetupImage.png
 	$(DATA2INC_BIN) -C -n engineSetupImage -t Uint8 $< $@
 
-$(DMLIB)setupbar.h: $(DMLIB)graphics/SetupMenuBar.png
+$(DMLIB)setupmenubar.h: $(DMLIB)graphics/SetupMenuBar.png
 	$(DATA2INC_BIN) -C -n engineSetupMenuBar -t Uint8 $< $@
 
-$(OBJPATH)dmsimple.o: $(DMLIB)setupbar.h $(DMLIB)setupfont.h $(DMLIB)setupimage.h $(DMLIB)dmsimple.c
+$(OBJPATH)dmsimple.o: $(DMLIB)dmsimple.c $(DMLIB)dmengine.h \
+	$(DMLIB)setupmenubar.h $(DMLIB)setupfont.h \
+	$(DMLIB)setupimage.h $(DMLIB)dmsimple.c
 	@echo " CC $+"
 	@$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS)
 
--- a/gfxconv.c	Fri Apr 12 11:18:45 2013 +0300
+++ b/gfxconv.c	Fri Apr 12 11:21:37 2013 +0300
@@ -1099,6 +1099,7 @@
                 if (info) dmMsg(2, "%d bitplanes, %s interleave.\n", spec->nplanes, spec->interleave ? "with" : "without");
                 return dmWriteRAWImage(filename, image, spec);
             }
+            break;
 
         default:
             return DMERR_INVALID_DATA;
@@ -1441,6 +1442,15 @@
         
         dmImageFree(outImage);
     }
+    else
+    if (optOutFormat == FFMT_BITMAP)
+    {
+        if (optSequential)
+        {
+            dmError("Sequential output not supported for spr/char -> bitmap conversion.\n");
+            goto error;
+        }
+    }
 
     dmFree(bufData);
     return 0;
@@ -1618,6 +1628,11 @@
                         res = dmWriteBitmap(optOutFilename, &cimage, optOutSubFormat, TRUE);
                         break;
 
+                    case FFMT_CHAR:
+                    case FFMT_SPRITE:
+                        res = dmWriteSpritesAndChars(optOutFilename, outImage, optOutFormat, optInMulticolor);
+                        break;
+
                     default:
                         dmError("Unsupported output format for bitmap/image conversion.\n");
                         break;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setupmenubar.h	Fri Apr 12 11:21:37 2013 +0300
@@ -0,0 +1,13 @@
+/* 'setupmenubar.h' generated by data2inc v0.6
+ */
+Uint8 engineSetupMenuBar[134] = {
+	137, 80, 78, 71, 13, 10, 26, 10,  0,  0,  0, 13, 73, 72, 68, 82,
+	  0,  0,  0, 16,  0,  0,  0, 16,  8,  6,  0,  0,  0, 31,243,255,
+	 97,  0,  0,  0, 77, 73, 68, 65, 84, 56,203, 99,252,255,255,255,
+	100,  6, 10,  0, 19,  3,133,128,133,129,129, 65,148, 82,  3,  4,
+	 41, 53,128,141, 82,  3,228,137, 84,251,  3,151,  1,196,  2, 14,
+	154,120,129, 42,209,248,139, 82,  3,126, 80,106,192, 31, 74, 13,
+	184,134, 67, 78,144, 88,  3,112,129,247,196, 26,240,122, 64,163,
+	 17,  0,220, 81, 10,200,234, 71, 48, 81,  0,  0,  0,  0, 73, 69,
+	 78, 68,174, 66, 96,130,
+};