Mercurial > hg > dmlib
changeset 557:1993cd341079
Adjust to conform to lib64gfx API changes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 23 Nov 2012 18:37:47 +0200 |
parents | 44d1e0d4acf3 |
children | 67d9e319246f |
files | Makefile.gen gfxconv.c view64.c |
diffstat | 3 files changed, 4 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.gen Fri Nov 23 18:37:09 2012 +0200 +++ b/Makefile.gen Fri Nov 23 18:37:47 2012 +0200 @@ -390,7 +390,7 @@ $(BINPATH)view64$(EXEEXT): $(OBJPATH)view64.o $(DMLIB_A) @echo " LINK $+" - @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) + @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(LIBPNG_LDFLAGS) $(SDL_LDFLAGS) $(BINPATH)gentab$(EXEEXT): $(OBJPATH)gentab.o $(DMLIB_A) @echo " LINK $+"
--- a/gfxconv.c Fri Nov 23 18:37:09 2012 +0200 +++ b/gfxconv.c Fri Nov 23 18:37:47 2012 +0200 @@ -1585,21 +1585,7 @@ switch (optOutFormat) { case FFMT_IMAGE: - if ((outImage = dmImageAlloc(C64_SCR_WIDTH, C64_SCR_HEIGHT)) == NULL) - { - dmError("Could not allocate output image surface %d x %d.\n", - C64_SCR_WIDTH, C64_SCR_HEIGHT); - goto error; - } - - outImage->pal = (DMColor *) &dmC64Palette; - outImage->ncolors = C64_NCOLORS; - outImage->constpal = TRUE; - - if (cfmt->convertFrom != NULL) - res = cfmt->convertFrom(outImage, &cimage); - else - res = dmC64ConvertGenericBMP2Image(outImage, &cimage); + res = dmC64ConvertBMP2Image(&outImage, &cimage, cfmt, TRUE); if (res != DMERR_OK || outImage == NULL) {
--- a/view64.c Fri Nov 23 18:37:09 2012 +0200 +++ b/view64.c Fri Nov 23 18:37:47 2012 +0200 @@ -238,9 +238,9 @@ bmap.constpal = TRUE; if (fmt->convertFrom != NULL) - ret = fmt->convertFrom(&bmap, &image); + ret = fmt->convertFrom(&bmap, &image, TRUE); else - ret = dmC64ConvertGenericBMP2Image(&bmap, &image); + ret = dmC64ConvertGenericBMP2Image(&bmap, &image, TRUE); // Set window title and caption