151 Commits

Author SHA1 Message Date
Thomas Bernard
725da6307e
Remove warnings with GCC 7
GCC 7 introduced a new warning in switch() statements :
warning: this statement may fall through [-Wimplicit-fallthrough=]
2018-10-17 16:42:54 +02:00
Thomas Bernard
4978a7cfe2 convert Warning() and DEBUG() to GFX2_Log() 2018-07-12 20:41:49 +02:00
Thomas Bernard
733a3cd0fb minor fixes 2018-07-12 19:11:39 +02:00
Thomas Bernard
7fb77f85f1 Add GFX2_Log() function 2018-07-12 19:11:39 +02:00
Thomas Bernard
221515e663 Load_PNG() : read Comment tEXt in addition to Title 2018-07-12 11:54:29 +02:00
Thomas Bernard
3bdd69c523 Save_PNG(): use PNG_RESOLUTION_UNKNOWN in pHYs chunk 2018-07-12 11:54:12 +02:00
Thomas Bernard
f9dc86eb87 Load_GIF(): Be more tolerant on ratio values 2018-07-12 11:54:12 +02:00
Thomas Bernard
4338d31f04 Load_PNG(): load correctly aspect ratio 2018-07-12 11:54:12 +02:00
Thomas Bernard
8dfd6d6c97 Handle PIXEL_TALL3 mode in file formats (GIF) 2018-07-12 11:54:12 +02:00
Thomas Bernard
5f5d7ba1b0 win32 : fix byteswapping function for MSVC/gcc 2018-07-11 11:54:54 +02:00
François Revol
f7e46b97e9 atari: work around 'longjmp' undeclared error
This seems to be due to glibc headers being installed instead of MiNT
ones...
2018-07-09 01:31:17 +02:00
Thomas Bernard
c53b86d6c9 Fix Endian dependent code when compiled without SDL or SDL2
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-02 11:38:52 +02:00
Thomas Bernard
3e32bc0c39 Fix endian aware load/save when SDL is disabled 2018-07-02 11:38:51 +02:00
Thomas Bernard
4d86b8a0c1 change all references to SDLK_xxxxx to KEY_xxxx
+ some fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
92facef46d Convert comments to UTF-8
most were encoded in Latin1 / CP1252
but a few lines in op_c.c were using IBM437/850 !
2018-06-26 11:37:19 +02:00
Thomas Bernard
758bc0833c fix Load_IFF() when bpp=0 ! 2018-04-18 18:10:16 +02:00
Thomas Bernard
c651d0c33a Save_IMG() remove fclose() for file not open 2018-04-16 12:31:12 +02:00
Thomas Bernard
bb7b187275 Load FLI/FLC autodesk animator files. 2018-04-16 07:03:17 +00:00
Thomas Bernard
f9616f570a remove warnings when compiling with MSVC++2010 2018-03-19 16:49:32 +01:00
Thomas Bernard
3ab746ef29 fileformats.c: Get rid of "unreferenced argument" Warning 2018-03-15 12:21:22 +01:00
Thomas Bernard
cd8291b6ff loadsave: change Test_XXX functions to open file only once 2018-03-15 12:21:22 +01:00
Thomas Bernard
b039977f5f move Test_XXX/Load_XXX/Save_XXX functions prototypes to fileformats.h 2018-03-15 12:21:16 +01:00
Thomas Bernard
ebaccbab3e Load_INFO() : load comments + fix for NewIcons
fix Palette loading of newIcons when the palette spans
on several lines
2018-03-14 10:48:47 +01:00
Thomas Bernard
856ba45839 Load_INFO() right colors for 2nd image of NewIcons 2018-03-12 11:39:10 +01:00
Thomas Bernard
d57c6dd4ba Load_INFO Add more colors in default palette 2018-03-12 11:39:10 +01:00
Thomas Bernard
6efc257229 Load_IFF() fix for some ILBM containing only palette 2018-03-12 11:39:10 +01:00
Thomas Bernard
b388bc56a8 Load_INFO() fix memory leak 2018-03-12 11:39:10 +01:00
Thomas Bernard
e48e2101e4 Load_INFO() Amiga Icons : don't load 2nd image in preview mode 2018-03-12 11:39:10 +01:00
Thomas Bernard
cfd5839ba5 Load Amiga Icons found in .info files 2018-03-12 11:39:10 +01:00
Thomas Bernard
c03984fccb Load_IFF() set a default grayscale palette for files without CMAP 2018-03-06 16:25:39 +01:00
Thomas Bernard
144207f6d6 Load_IFF() improve 4bits per component palettes 2018-03-06 16:25:39 +01:00
Thomas Bernard
975c343cd7 Load_IFF() cleanup. remove counter variable 2018-03-06 16:25:39 +01:00
Thomas Bernard
5907219e6f Load_IFF(): Use same palette structures for SHAM and PCHG + PCHG ok with EHB modes 2018-03-06 16:25:39 +01:00
Thomas Bernard
ca352e756c Load_IFF() parse RAST chunks 2018-03-06 16:25:39 +01:00
Thomas Bernard
2338e99d47 Load_IFF(): parse DYCP and CTBL chunks found in Dynamic Hires files 2018-03-06 16:25:39 +01:00
Thomas Bernard
aca95e4ca0 remove left over printf 2018-03-06 16:25:39 +01:00
Thomas Bernard
b0203ff93c Display original picture size in Load/Save dialog when displaying a thumbnail 2018-03-06 16:25:39 +01:00
Thomas Bernard
3876f8e1c5 Load_IFF(): Move ILBM decoding to LBM_Decode() and display ILBM thumbnails
also dont load thumbnail with invalid dimensions
2018-03-06 16:25:39 +01:00
Thomas Bernard
03d0d5e882 Save_XPM() properly add a , after each line 2018-03-02 22:03:15 +01:00
Thomas Bernard
9bd758acdc Save_XPM(): Save transparency information.
As XPM is mainly designed for Icons, that is useful.
2018-03-02 22:03:15 +01:00
Thomas Bernard
999458d047 Save_XPM(): save 1 char per pixel if possible
" and \ are not valid characters for XPM pixels
2018-03-02 22:03:15 +01:00
Thomas Bernard
3a6968c97c Save_IFF() fix: Remove file after fclose() 2018-02-20 15:45:45 +01:00
Thomas Bernard
60beebc9ac fixes for MSVC non-standard C library
strcase => _stricmp
strncase => _strnicmp
strdup => _strdup
snprintf => _snprintf

a compliant snprintf() is supposed to be available
in MS Visual Studio 2015 and later
2018-02-20 15:45:45 +01:00
Thomas Bernard
87e4cfad94 MSVC fix: no arithmetics on void * pointers 2018-02-20 15:45:45 +01:00
Thomas Bernard
3d4f39fe36 Use Open_file_write() in Save_GPL() Save_PAL() and Save_XPM()
They are Text format, correctly handle line endings
according to the type
2018-02-20 15:45:45 +01:00
Thomas Bernard
74818299a3 use Open_file_read()/Open_file_write() 2018-02-20 15:45:45 +01:00
Thomas Bernard
3149d04110 Load_IFF(): load multi palette ILBMs using the BEAM chunk 2018-02-18 21:11:40 +01:00
Thomas Bernard
d4bf0a8af9 Load_IFF(): Load Animations saved by DeluxePaint ST 2018-02-18 21:11:40 +01:00
Thomas Bernard
2cdb6a4da4 Load_IFF() properly set frame duration for animations 2018-02-18 21:11:40 +01:00
Thomas Bernard
2d7ecbda0c Load_IFF() improve compatibilty with malformed IFF files 2018-02-18 21:11:40 +01:00