mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-30 10:29:55 +00:00
gr-sim: tfv: fix build
was actually an issue with a non-indexed title.png
This commit is contained in:
parent
50584c5541
commit
f77972b380
@ -131,7 +131,7 @@ tfv_multiply.o: tfv_multiply.c
|
||||
$(CC) $(CFLAGS) -c tfv_multiply.c
|
||||
|
||||
tfv_multiply: tfv_multiply.o
|
||||
$(CC) $(LFLAGS) -o tfv_multiply tfv_multiply.o
|
||||
$(CC) -o tfv_multiply tfv_multiply.o $(LFLAGS)
|
||||
|
||||
|
||||
tfv.o: tfv.c ../gr-sim.h tfv_backgrounds.h tfv_sprites.h
|
||||
@ -144,14 +144,14 @@ tfv: tfv.o tfv_backgrounds.o tfv_battle.o tfv_credits.o tfv_dialog.o \
|
||||
tfv_random.o tfv_sprites.o tfv_textentry.o \
|
||||
tfv_title.o tfv_worldmap.o tfv_mapinfo.h \
|
||||
$(GR_SIM)
|
||||
$(CC) $(LFLAGS) $(SDL_LIBS) -o tfv tfv.o \
|
||||
$(CC) -o tfv tfv.o \
|
||||
tfv_backgrounds.o tfv_battle.o tfv_credits.o tfv_dialog.o \
|
||||
tfv_ending.o tfv_flying.o \
|
||||
tfv_game_over.o tfv_help.o tfv_info.o tfv_map.o \
|
||||
tfv_opener.o tfv_player_select.o \
|
||||
tfv_random.o tfv_sprites.o tfv_textentry.o \
|
||||
tfv_title.o tfv_worldmap.o \
|
||||
$(GR_SIM)
|
||||
$(GR_SIM) $(LFLAGS) $(SDL_LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o tfv
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <png.h>
|
||||
#include "loadpng.h"
|
||||
|
||||
static int convert_color(int color) {
|
||||
static int convert_color(int color, char *filename) {
|
||||
|
||||
int c=0;
|
||||
|
||||
@ -37,7 +37,9 @@ static int convert_color(int color) {
|
||||
case 0x72ffd0: c=14; break; /* aqua */
|
||||
case 0xffffff: c=15; break; /* white */
|
||||
default:
|
||||
printf("Unknown color %x\n",color);
|
||||
fprintf(stderr,"Unknown color %x, file %s\n",
|
||||
color,filename);
|
||||
exit(-1);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -181,7 +183,7 @@ int loadpng(char *filename, unsigned char **image_ptr, int *xsize, int *ysize,
|
||||
printf("%x ",color);
|
||||
}
|
||||
|
||||
a2_color=convert_color(color);
|
||||
a2_color=convert_color(color,filename);
|
||||
|
||||
/* bottom color */
|
||||
color= (row_pointers[y+1][x*xadd*4]<<16)+
|
||||
@ -191,7 +193,7 @@ int loadpng(char *filename, unsigned char **image_ptr, int *xsize, int *ysize,
|
||||
printf("%x ",color);
|
||||
}
|
||||
|
||||
a2_color|=(convert_color(color)<<4);
|
||||
a2_color|=(convert_color(color,filename)<<4);
|
||||
|
||||
*out_ptr=a2_color;
|
||||
out_ptr++;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 9.5 KiB |
Loading…
x
Reference in New Issue
Block a user