Thomas Bernard
8a018fdb82
fix Save_PI1()
...
the color cycling information was always overwriting the last 32 bytes
so the last 16 pixels were almost always saved black
2018-07-02 14:25:14 +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
4d86b8a0c1
change all references to SDLK_xxxxx to KEY_xxxx
...
+ some fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
77005eb780
use screen.h instead of sdlscreen.h, etc.
...
Create grafx2-win32 MSVC++ project
create keycode.h
various 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
c6014da99f
FLI/FLC: fix loading of "empty" frames
2018-04-16 13:29:03 +02:00
Thomas Bernard
bb7b187275
Load FLI/FLC autodesk animator files.
2018-04-16 07:03:17 +00:00
Thomas Bernard
187c7d53e3
Fix a few warnings (from MS Visual Studio 2015)
2018-04-06 16:45:35 +02:00
Thomas Bernard
3e82bd0649
Test_PAL/Load_PAL: replace fread() by Read_bytes()
2018-03-15 13:40:14 +01:00
Thomas Bernard
531cda58b6
Fix Test_GPL() and Load_GPL()
2018-03-15 13:24:59 +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
f53925f4f5
Load_CM5() : clean up palette setup
2018-03-05 13:55:35 +01:00
Thomas Bernard
9e89fb665b
Load_CM5() Fix preview for CM5 format
2018-03-05 13:55:35 +01:00
Thomas Bernard
68cad3884b
Load_CM5() update comments
2018-03-05 13:55:35 +01:00
Thomas Bernard
9209cc0a5c
Load_CM5(): clear palette if configured to do so
2018-03-05 13:55:35 +01:00
Thomas Bernard
4b4a66d65c
Load_CM5() remove uneeded buffer
2018-03-05 13:55:35 +01:00
Thomas Bernard
524bdfba90
improve Test_CM5()
2018-03-05 13:55:35 +01:00
Thomas Bernard
f32eacaa01
Make compilers happy, remove warnings...
...
unsigned/signed comparaison in miscfileformat.c
unused argument in readline.c
2018-03-05 09:22:03 +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
3c3ef150a6
improve Test_PPH()
...
remove one TODO :)
2018-02-20 15:45:45 +01:00
Thomas Bernard
be824627ce
loadsave.c: Add functions to open file with alternate extension.
...
Used by CPC format which are in several files :
PPH format uses PPH, ODD, EVE
CM5 uses CM5 + GFX
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
2bfbc03cb8
Display the bpp of the picture in the Load/Save Dialog
2018-02-18 21:11:40 +01:00
Adrian Castravete
7059271965
Add indication of offending cell in C64 formats
2018-02-13 13:31:15 +02:00
Thomas Bernard
a53d6da6ea
Add visible_image and backups to the T_Document structure
2018-01-22 16:16:39 +01:00
Adrien Destugues
5b6095f0bc
Fix all warnings and enable -Werror
...
mostly unused variables and broken indentation.
2017-05-06 15:13:50 +02:00
Adrien Destugues
bb5da79264
CPC/SCR: allow 32K pictures.
...
Set R12 so that the picture can use the full video RAM, if it is large enough.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2170 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-11-28 20:24:53 +00:00
Adrien Destugues
8808625851
Add a "tall 3" drawing mode.
...
Pixels with 3:4 aspect ratio. Why not?
Contributed by Nic Soudée (zoner/xylem). Thanks!
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2166 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-10-15 18:57:14 +00:00
Adrien Destugues
d3a4ced94c
PPH loader fixes
...
- Fix palette computation, flickering two colors give a mix lighter than 50%
- Fix off by one error in B1 palette change decoding.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2164 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-07-20 18:53:58 +00:00
Adrien Destugues
702f1835da
Support loading PPH files (Amstrad CPC).
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2162 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-07-19 20:28:43 +00:00
Adrien Destugues
3332b43330
Save and load support for GIMP palettes (.GPL files)
...
* Implemented by 00ai99
* Fixes https://code.google.com/p/grafx2/issues/detail?id=518
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2112 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-04 13:45:01 +00:00
Adrien Destugues
d9f2cd2d40
Remove no-op function Palette_loaded.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2109 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-04 09:28:23 +00:00
Adrien Destugues
5e26436c48
Fix mismatched parameters.
...
Bug caught by the Debian team on GrafX2 2.3.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2072 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2014-05-16 10:15:07 +00:00
Yves Rizoud
cac2d00dfb
Add support for saving/loading cycling colors in formats PI1 PC1. Also probably fix an error in PI1 footer (Issue 535)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2067 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-08-30 17:21:40 +00:00
Yves Rizoud
01543b7a8d
Fix issue 535 : PC1 files created by Grafx2 can't be reloaded by Degas Elite
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2063 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-08-29 22:08:22 +00:00
Adrien Destugues
92e438bde5
* Add codenet lua script (linux only for now) to send pictures to a runnning C64
...
* Fix C64 multicolor format :
- Improve background color detection
- Do not save as FLI unless the file extension matches
fixes #521 , #522 and #524
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2043 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-12-29 18:58:07 +00:00
Yves Rizoud
56cdbc4c10
Issue 505: Support for saving IFF/ILBM format, compatible with Deluxe Paint 3
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1993 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-15 18:05:44 +00:00
Yves Rizoud
a630a84822
Removed all usage of __attribute__((unused)), replaced by void cast which is supported both on GCC and VBCC
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1984 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-11 16:19:07 +00:00
Adrien Destugues
86d67e4658
* Fix CPC palette for Mode 5 files : add 'undocumented' color codes
...
* Fix "layer support" detection, it didn't work for Mode 5.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1966 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-24 18:03:21 +00:00
Adrien Destugues
b437d458d4
CPC Mode 5 fixes :
...
* Be case unsensitive when looking for the GFX-file,
* When an underlay is hidden, do not use it and replace it with color 0, 1, 2 or 3. Allows to see pixel data
alone or disable rasters on one color, as it's possible to get confused quite easily.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1964 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-13 19:50:35 +00:00
Adrien Destugues
2aa9ea7f8e
* Load Microsoft RIFF palette files
...
* Make byte, word, dword, qword typedefs instead of defines.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1954 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-12 14:05:40 +00:00
Yves Rizoud
d8bb1e1d55
Fix some mostly harmless warnings and re-generated dependencies. Now compiles with zero warnings on Linux (gcc 4.1.2)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1945 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-03 21:32:59 +00:00
Yves Rizoud
55f4884e34
Fix a few compilation warnings on Linux; Fix a possible bug in Mode5 loader; Removed a pair of debug printfs in realpath.c
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1933 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-14 19:17:35 +00:00
Yves Rizoud
d38f5ee981
CPC mode 5 : replaced the global Constraint_mode by a state (Image_mode) in each versioned T_Page: This allows keeping it sane when swapping to Spare, and when Undo/Redoing. Also fixed the first page when program starts, it was unnecessarily allocating pointers for the maximum number of layers(16)/frames(999)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1907 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-02-27 00:47:18 +00:00
Yves Rizoud
55d0889bc8
Change rendering system to use function pointers, see Issue 31 c38 : preliminary work to make the same executable handle Layers or Anims. Fixed an old issue where Lasso-ing a brush with right mouse button wouldn't erase cleanly (visual). Fixed an old issue where picking colors in layer 5 would not 'see' through layers.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1906 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-02-22 23:47:53 +00:00
Yves Rizoud
58e8194f40
Compilation fix for dependencies
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1875 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-23 19:05:12 +00:00
Adrien Destugues
e875597964
Merge the "CPC Mode 5" branch to trunk.
...
Note this alsoincludes the "oldies" branch.
This has the following consequences :
[C64]
* Loading and saving of screen-only, and color-only C64 picture is removed
* Loading and saving in FLI mode is now possible
* FLI constraint checker : tries to convert your image to FLI format, and put all the areas where it couldn't find a solution in a separate layer for you to fixup
* This is currently accessible only with a shortcut. Menu will come next.
[Amstrad CPC]
* Loading and saving of pictures in "Mode 5" is now possible. This custom format allows overscan mode 1 with rasters on 2 inks and split rasters on a 3rd one.
* Mode 5 constraint enforcer : will ensure you can only draw pictures that are valid in mode 5. Each ink is seen as a layer.
* This is accessible from a new button in the FX menu.
[Generic]
* Added patch as I saw it : platform that don't support reporting "free space" on disk will not display anything (instead of "0 bytesÃ" as before)
* For other platforms, when the free space is 0, we now have a disk full message.
The merge was not straight forward. I hope I didn't break too much things.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1810 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-06-19 20:15:22 +00:00
Yves Rizoud
55422d160e
(mode5 branch) Fix a bug in saving, including autosave every few minutes, that auto-selects the last layer to draw.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/cpcmode5@1743 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-03-02 22:07:24 +00:00