95 Commits

Author SHA1 Message Date
Adrien Destugues
8923011906 Split buttons.c as it was > 5000 lines. It's still big however, but I had no other idea to split it porperly. Let's see that later.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1172 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-11 19:27:57 +00:00
Adrien Destugues
eb917ce0ed Fixed stupid bug : it was not possible to rotate a brush 180° from the brush transform menu if hte height was even !!?
Also use proper NAN value if it exists when rotating a brush (we use some floats there and it's better to do it this way)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1170 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-11 18:17:42 +00:00
Adrien Destugues
792abd4866 Some cleanups
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1169 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-11 17:44:51 +00:00
Yves Rizoud
c150be2664 [layers] merged in the recent changes from trunk
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1162 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-10 20:35:09 +00:00
Adrien Destugues
e6e698c2bd Added vim modelines to all files.
Set them to 2-space indent, I hope this is ok.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1161 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-10 20:08:11 +00:00
Adrien Destugues
b6d6fe19b6 Add option to show the grid in grid menu (not only snapping)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1144 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-02 20:15:23 +00:00
Yves Rizoud
110a7bdd58 [layers] continuted work on no-layer option. No more crash.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1141 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-02 00:10:59 +00:00
Yves Rizoud
3ede1f3a56 [layers] NOLAYERS option at compile time. Unfinished.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1140 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 23:22:43 +00:00
Yves Rizoud
ad4b417afb [layers] Merged changes from trunk (up-to-date now)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1132 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 01:18:29 +00:00
Yves Rizoud
f38fd068a2 [layers] Merged changes from trunk
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1131 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 01:05:21 +00:00
Yves Rizoud
1582d9e6d9 Contextual help for skin window
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1129 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 23:57:32 +00:00
Adrien Destugues
ba36fa675f -Moved test script to "scripts" directory
-Allow to add other scripts to this dir and run them too.
--Cette ligne, et les suivantes ci-dessous, seront ignorées--

A    trunk/scripts
A  + trunk/scripts/test.lua
D    trunk/test.lua
M    trunk/buttons.c
M    trunk/factory.c


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1125 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 17:33:04 +00:00
Yves Rizoud
b021a52fc3 Skins: Fix preview area after loading invalid file
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1124 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 17:16:48 +00:00
Yves Rizoud
e7f34fefe4 Skin preview previews gui colors
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1123 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 17:07:56 +00:00
Yves Rizoud
036d8008cb (internal) Skins have their own GUI color indices : avoids sharing/restoring MC_ colors
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1121 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 15:46:07 +00:00
Adrien Destugues
49cce9643e Load the favorite colors from the skin, not the ini file. We may want to override them, but for now just change the skin's palette.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1116 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 12:10:07 +00:00
Adrien Destugues
2b02ff505f Moved skin preview to the Gfx struct so it is not overwritten if you cancel skin loading.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1115 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 11:19:44 +00:00
Adrien Destugues
a2fd796e59 Proper remapping on skin change in (almost) all cases. I commit this before breaking everything trying to fix the remaining issue...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1114 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 10:44:09 +00:00
Adrien Destugues
d4b730cb4d Remap the preview of the skin and use the old colors to draw the list in order to keep the skin changer looking good even if skins use different MC_ indexes.
Thingsd are still messed up after loading a skin but I can't find out why this happens and remap does not seem to help.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1110 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 21:56:56 +00:00
Adrien Destugues
0661e59e1c Preview skins.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1108 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 16:58:37 +00:00
Adrien Destugues
f4defe7e75 Moved "show limits" and "separate colors" to skin dialog
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1107 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 15:19:59 +00:00
Adrien Destugues
111fbbcf33 -Introduce new Requester_window to ask the user to enter a single value
-Reduce colors in the palette screen is now a dropdown for easy access to usual values. "Other" option opens a requester to enter a custom one if needed
-Some cleanup to make things a little more readable
-Build fixes after versionning system revert


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1090 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-24 13:42:59 +00:00
Yves Rizoud
22d5e7de70 [layers] Updated from trunk: 'All formats' filter in file selectors
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1084 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-21 09:57:38 +00:00
Yves Rizoud
9ef0e6b74c (trunk) File save/load only shows common file extensions by default. (choice 'all' in filter, different from '*.*')
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1083 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-21 01:52:07 +00:00
Yves Rizoud
7690cd9e50 [layers] Added functions to add and delete layers (Keyboard shortcuts alt-ins and alt-del) Now defaults back to 1 layer per image on startup.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1073 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-13 01:03:32 +00:00
Yves Rizoud
2049f96c59 [layers] Implemented layer insertion. No keys or menu yet, but it's already used when loading images, to make an image with right number of layers. Undoing/redoing such change works. Implemented single-layer deletion (untested)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1069 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-08 23:54:02 +00:00
Yves Rizoud
dc70d2f59f [layers] Merged-in the trunk changes (support for variable-height menu bar). Color replacer now works. Saving non-layer formats issues a warning and saves flattened version of the visible layers.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1068 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-08 21:41:25 +00:00
Yves Rizoud
953185205d Internal support for variable-height menu
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1066 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-07 22:27:14 +00:00
Yves Rizoud
0b07b43722 [layers] Merged r1063 from trunk. Separated the controls for layers from translucency keys. Can now control up to 8 layers
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1065 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-07 00:07:27 +00:00
Yves Rizoud
2f1888e50d [layers] Implemented 'Copy to spare - pixels'. It replaces the current layer in the spare, resizing the whole spare (all layers) as needed.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1064 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-06 23:28:37 +00:00
Yves Rizoud
6f8223b09b trunk: Continued the handling of multiple effect on single shortcuts. Multiple window-open work (one after an other), and the restriction on shortcuts that are disabled while drawing is now applied correctly.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1063 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-06 23:24:00 +00:00
Yves Rizoud
5fd28bdd3b trunk: Reserved hotkeys for layers. Allowed a single shortcut to launch several actions (Issue 88)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1062 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-06 22:42:43 +00:00
Yves Rizoud
9be9ed9c17 [layers] Sped up the switching from one active layer to another, when the new layer was already displayed (thanks to the depth buffer, again)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1049 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-30 21:37:16 +00:00
Yves Rizoud
2fd88b81bb [layers] work on layer sharing (still stable)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1045 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-28 21:01:29 +00:00
Yves Rizoud
cedb706326 First svn commit of the experiment with layers. Preemptive backup (to shorten delay before drawing) is currently disabled. Basic Undo/Redo works, but not image resizing, the adjust tool, and saving (not even flattened)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1039 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-21 14:16:41 +00:00
Adrien Destugues
b12423d03b Trying to compile on amiga with vbcc.
Removed some useless unixisms.
Still not working.
Hope I did not break too much things.




git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1035 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-19 22:41:51 +00:00
Yves Rizoud
2241eee7f1 Report fix of issue 211 from release branch
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1030 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-13 14:48:35 +00:00
Yves Rizoud
ba42b3cb17 In fullscreen mode, auto-activate wide/tall pixels when you load a C64 multicolor picture, or a PNG picture you saved with wide/tall pixels.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1019 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-05 21:20:43 +00:00
Yves Rizoud
d6bf9413bf Displayable tile grid (Issue 171)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1007 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-08-26 23:42:55 +00:00
Yves Rizoud
7bfdb28936 Keyboard shortcuts that open a window now also close it (Issue 88). Fixed a recent bug that made contextual help in FX window only work once.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1004 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-08-23 00:41:40 +00:00
Yves Rizoud
8ac66726f2 Brush container integrated as the bottom row of Paintbrush screen (F4)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1003 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-08-22 22:11:01 +00:00
Yves Rizoud
1ccdf24dfa Brush container (Issue 135) now working with color brushes too.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1001 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-08-20 23:13:41 +00:00
Yves Rizoud
29ee887c78 Brush container (unfinished). Temporarily bound to right-click 'Brush FX'. Only accepts monochrome brushes of any size at the moment.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@997 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-08-18 23:42:07 +00:00
Yves Rizoud
8b340684bd Various internal changes, preparing for layers (mostly backup system)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@983 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-08-08 18:53:30 +00:00
Adrien Destugues
07bfc119b8 -No need to check if a pointer is null before freeing it.
-However if the pointer is still living (for example a global) you should assign NULL to it to avoid bad ram access and random bugs. Accessing a NULL pointer always  gives a segfault, accessing a freed pointer may or may not crash.
-Also fixed a memory leak


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@924 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-07-16 07:33:14 +00:00
Adrien Destugues
cadb762640 Fixed issue 190: buffer overflow in splash screen.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@903 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-07-07 14:03:21 +00:00
Yves Rizoud
8b4533f105 Skin graphics and font are now recorded & reloaded.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@891 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-29 00:28:58 +00:00
Yves Rizoud
d4dcba62a6 More work on fonts/skins
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@890 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-28 21:50:01 +00:00
Adrien Destugues
48c98b2234 -Remove the spaces I just added when looking for the fonts,
-No need to check if a pointer is NULL before freeing it, free() takes care of that,
-Removed useless variables after Yves cleanup


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@889 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-28 19:36:06 +00:00
Adrien Destugues
cc64de7e1f -Pad font names with spaces, as we need that to clear the dropdown button from previus selection
-Made the font dropdown a little larger to hold 'fairlight' (quite a big group ;))
-Don't list fonts in the skin fileselector


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@888 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-28 19:27:20 +00:00