150 Commits

Author SHA1 Message Date
Yves Rizoud
8c2655f88a Lua: finished inputbox with negative and decimal inputs. Added to the repository more than 20(!) new scripts by DawnBringer
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1357 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-21 17:58:20 +00:00
Yves Rizoud
4c3a0b6f68 Grafx2 now disables safety backups (and warns the user on startup) if another instance is running or if its configuration directory is read-only. Implemented separately on Linux and Windows, tested only on Windows
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1343 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 00:28:42 +00:00
Yves Rizoud
7076e8e06d Eliminated a lot of tab characters in source code
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1342 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 19:25:49 +00:00
Yves Rizoud
6f08d59f01 Layer toolbar visible by default. Grafx2 now records which toolbars are visible on exit, and restores them next time.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1327 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-08 18:58:42 +00:00
Yves Rizoud
5678f0712d Fix issue 310:Lua's 'getbackuppixel' that returns wrong data, and Picture Scroll that shows garbage; both after Load/Reload/Resize.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1317 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-04 01:07:42 +00:00
Adrien Destugues
84ccd7f845 Fixed polygon and polyform overdrawing the first point in an approximate way.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1300 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-03 18:27:04 +00:00
Adrien Destugues
4c40a0a99a Fix backup not being deleted on exit.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1299 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-03 18:07:15 +00:00
Yves Rizoud
c04dbcb19a Layer-specific: Fixed possible double free on exit. Removed unused global pointer. Implemented proper backup (history) before the various Copy-to-spare actions, fixing a severe history bug when using layers (issue 270). Grafx2 no longer asks 'Spare page was modified, continue?' on Spare modifications. Fixed missing screen refresh in Copy-to-spare (issue 293). Fixed the save-on-crash to actually save the spare
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1282 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-26 02:23:44 +00:00
Adrien Destugues
b36dee613e Ensure pointers are put back to NULL when freed.
--Cette ligne, et les suivantes ci-dessous, seront ignorées--

M    trunk/palette.c
M    trunk/init.c
M    trunk/engine.c
M    trunk/filesel.c
M    trunk/miscfileformats.c
M    trunk/pages.c
M    trunk/brush_ops.c
M    trunk/op_c.c
M    trunk/operatio.c
M    trunk/brush.c
M    trunk/loadsave.c
M    trunk/graph.c
M    trunk/fileformats.c
M    trunk/main.c


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1277 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-18 14:26:59 +00:00
Adrien Destugues
28b2122997 Fix wrong menu colors when recovering a backup.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1269 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-17 19:54:02 +00:00
Yves Rizoud
e351605a24 Reverted the icon-loading code to SDL_image, using more solid code to handle both 8bit and hi-color icons
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1248 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-15 02:40:32 +00:00
Yves Rizoud
84ac0df49c Issue 285: For skins and fonts, replaced calls to SDL_image with our own image-loading functions. Also fixed the generic loader that was updating the screen palette even when not useful.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1247 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-15 01:48:33 +00:00
Yves Rizoud
8bdd163ede Huge rewrite of the file loading/saving system. Normally safer in case of problem. Added incremental safety backups at regular intervals in the 'application data' directory (Windows) or $HOME/.grafx2 (unix). Keeps 8 files, saves every 30-60s and/or every 10-30 clicks.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1245 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-13 02:09:47 +00:00
Yves Rizoud
cf54bb5f29 Implemented back the Mask mode. Fixed a historical bug of memory violation if you used Mask with images of different sizes (would crash all platforms except DOS)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1237 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-12-07 20:39:32 +00:00
Yves Rizoud
0a7bd889d1 Better command-line handling (issue 266) contributed by Pasi Kallinen
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1227 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-29 18:25:14 +00:00
Yves Rizoud
3538abadb9 Added support for hiding the main toolbar, keeping the status line and optionally layer bar. Made it the default behaviour of F10 / right-click 'hide', for testing and feedback. (IMO it's less unforgiving for new users, and we can provide alternative shortcut with old behaviour for veterans).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1225 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-26 00:32:45 +00:00
Adrien Destugues
63191fec2f Fix nasty bug whith skin management.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1210 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-16 23:09:06 +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
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
b2feccc039 Restored changes in main() that I overwrote in merge
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1127 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 18:11:13 +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
Adrien Destugues
fb3404e2ba Partial patch to allow loading spare page from command line.
It's not working yet but does not introduce regressions instead.
Cleaned up version of patch proposed on the issue tracker.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1122 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 16:42:08 +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
1934425972 Added "Brush Factory", allowing you to run a lua script to generate (or alter, untested yet) a brush.
Added a simple (and ugly) sample script.
This needs updates to the makefile for platforms other than linux.
TODO: add a listbox to select the script you want to run. Do we have a simple API to handle filelists yet ?


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1094 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-29 15:22:45 +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
abb6204757 [layers] Limited to 32 layers. (previously there was no limit and the 16-bit depth buffer wrapped). Fixed a display bug after picture transforms or layers add/del.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1075 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-14 00:13:49 +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
Adrien Destugues
bdf0186c7f -Added help about rgb option
-Better formatting of the video mode list


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1061 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-06 12:26:29 +00:00
Yves Rizoud
057d5e76e4 [layers] working swap between main/spare, and loading files in command-line. Start of work on variable layers number and layer sharing.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1044 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-28 18:48:05 +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
b3f2deedac ... and fixes the build back.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1036 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-09-19 22:47:10 +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
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
Franck Charlet
48d04c2568 Updated XCode Project
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@969 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-07-31 10:20:35 +00:00
Adrien Destugues
bd9541cc04 Allows exiting a textfield with a mouse click (but not using space). Introduce a new global var to do it, however...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@952 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-07-24 15:22:18 +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
a619897862 Don't free the GrafX2 logo when exiting the splash screen, it's now part of a struct and we free the struct at exit. This made the linux version crash. If you find it's memory waste, then make the logo a pointer instead of an array of bytes in the struct.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@887 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-28 19:18:30 +00:00
Yves Rizoud
67dbb218a2 GUI skins and fileselectors: cleaned up a little
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@886 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-28 18:19:21 +00:00
Yves Rizoud
ab9671b286 Separated font graphics from skin graphics. WIP, a lot is still hard-coded (font list) or not coded at all (save/load in ini, and match in skin selection screen).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@885 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-23 21:04:58 +00:00
Yves Rizoud
f683d9ff2e GUI skins: The loader now recovers cleanly from errors and displays a message that says what's the problem in the image.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@881 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-06-21 18:34:57 +00:00