68 Commits

Author SHA1 Message Date
Adrien Destugues
86976c9dde Updates pinceau_x and pinceau_y when closing the resolution window.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@641 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-17 21:10:39 +00:00
Adrien Destugues
14671c56a6 Fixes build under linux. Isn't there a standard type for sighandler, working on all platforms ? this __p_sig_fn_t doesn't seem to exist on any unix...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@634 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-16 20:48:49 +00:00
Yves Rizoud
108b887f07 (Windows) Free memory is now queried with GlobalMemoryStatus, so GrafX2 can be used on ...DOS with HX extender.
The result now tops at 4Gb free physical. Previously it would wrap, causing problems if you were extremely unlucky.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@629 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-14 20:22:01 +00:00
Adrien Destugues
990e016381 Grad Rect cancellation now works :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@621 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-09 20:30:14 +00:00
Yves Rizoud
2e2cd8073d Safety in Help text
GUI image change: Added more characters in help font.
Shortcuts: Change internal "no key" value from FFFF to 0000


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@608 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-07 01:44:23 +00:00
Yves Rizoud
ec256da711 Mouse fixes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@606 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-06 01:22:50 +00:00
Yves Rizoud
708e2adbf8 More stuff for double shortcuts
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@603 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-05 23:14:09 +00:00
Adrien Destugues
00b67c23ef Fixes missing refresh on color select with keyboard shortcut
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@592 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-04 17:58:57 +00:00
Adrien Destugues
6dd54a1686 Some fixes to get_input : allows to move windows.
Touche is now resetted to 0 only when a shortcut is processed. So you can let it at the key value for cursor moves, for example. But it does not work, i must have missed something :/


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@577 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-31 11:33:18 +00:00
Adrien Destugues
1b3489bb96 Removes a call to Wait_VBL and replaces it by SDL_Delay
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@478 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-14 16:36:38 +00:00
Yves Rizoud
0b801a28c8 Fixes a severe memory leak, up to 200Kb every time you closed a window. oops!
Fixes a missing refresh when you initiate window dragging.



git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@469 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-10 15:41:56 +00:00
Adrien Destugues
5971f4c9e3 MorphOS port, and some tweaks to the config tool to make it look a little bit less ugly. We should probably use a better color palette for it anyways.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@456 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-04 20:41:22 +00:00
Adrien Destugues
8f66a5905d Discards mouse moved event if the calculated X and Y did not changed (can happen in zoomed mode because we are dividing the coords)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@453 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-02 11:06:22 +00:00
Adrien Destugues
d6ef5ddd95 Added pete's mail to the helpscreen.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@444 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-31 09:18:34 +00:00
Adrien Destugues
a2324e2cb1 Cursor moves faster when using the keyboard shortcuts over the zoomed screen. Feels more natural to me
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@419 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-26 21:46:17 +00:00
Adrien Destugues
e7a1152777 Fixes some problems of sreen update in smear mode (issue 66) and possibly some others. The various calls to Mettre_Ecran_A_Jour in Afficher_Pinceau could benefit from some cleanup in order to avoid if(sthing)Mettre_Ecran_A_Jour(A,B,C,D)else Mettre_Ecran_A_Jour(A,B,C,D) with same ABCD...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@416 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-24 13:13:06 +00:00
Adrien Destugues
514eee4f79 Fixes the brush roatation missing update. Also switched to cumulative rects method instead of rect-by-rect, as it is faster, and flicker free when working with big brushes. It may makes it harder to diagnose missing refreshes, however.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@392 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-16 16:54:21 +00:00
Yves Rizoud
71c2aa4ce6 Fix missing refresh in Spray menu.
Fix wrong color selection in Spray menu when clicking between columns.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@390 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-15 23:54:28 +00:00
Adrien Destugues
87d887e240 One more small speedup. The coordinates were always printed twice in the menubar. Also added a missing refresh when using the pipette and the color replace tools. Now you get a preview of the color under the cursor in the menubar.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@381 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-15 15:17:47 +00:00
Adrien Destugues
2033f2dfb4 Some optimisations to the text drawing (Print_general) unfinished, breaks the OEM special chars for now.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@375 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-10 11:53:56 +00:00
Adrien Destugues
7c658a6855 Some fixes to the floyd steinberg dithering. The error was added to the neughbour pixels, it is now substracted, the results are much better. However, the palette seems to lack saturated colors (in comparison to the one generated b ygimp, wich gives more dithering, but better overall subjective ressemblance to the 24bit image. Maybe having less dithering is fine for us, as we are in a pixelart painting program afterall...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@369 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-03 20:50:52 +00:00
Adrien Destugues
48979bf251 Fixed the last bug remaining in the gradiation rectangle. Again caused by loss of precision by not using floats :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@346 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 18:33:27 +00:00
Adrien Destugues
a6774e5d73 Fixed the remaining bugs from r339. Now we have a fully working gradiation rectangle system !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@343 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 15:35:02 +00:00
Adrien Destugues
d016b8ba48 Some tweaks and fixups to the gradiation rectangles. Clipping and zoom mode work better, but :
-I introduced some weird bug making lines appear on the screen when drawing outside the limits of the zoom in zoom mode. Seems there is a XOR line function that get called with negative coordinates
-The preview rectangle is drawn with XOR-lines on the screen and does not modify the picture. So it is possible to erase it in the zoom screen by moving the cursor around it.
-Maybe I missed some testcases, i did not manage to reproduce the problem trigerred by grid clipping, for one.
-The gradiation vector is horizontal when it should be inclined. I probably missed something when writing the code for it. Probably a division gets out of precision... i should check if i used floats where needed


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@339 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 21:56:03 +00:00
Yves Rizoud
de2f95863d Text tool: corrected colors, various fixes.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@320 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-02 19:03:11 +00:00
Adrien Destugues
d72897e93d Some more fixes for the gradiation rectangles. The position is now calculated in an int, you should not experience any problem with the circle limit.
Also fixed the operation handling. The rectangle is now drawn properly when you finish sizing it.
The vector line still leaves some artifact on screen, however...


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@310 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 09:02:33 +00:00
Yves Rizoud
45f1dfeb7b TEXT Tool, first work-in-progress commit.
Truetype only, compile with "make NOTTF=1" if you don't want to bother with it.
Only TTF is done, aliased (ok) and non-aliased (backgound color is
currently stuck to color index 0)
The Clear button doesn't update the window.
Only one font (certified to be public domain).
Preview not done.
Font selector not done.
SFont support not done.
Limit 30 characters.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@305 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 22:13:53 +00:00
Adrien Destugues
a327f92805 New makefile including os4 build. Thanks xeron ! :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@303 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 07:57:55 +00:00
Adrien Destugues
cef61562d0 Some progress on the gradiation rectangles. I messed up the vector calculation somehow. Is someone good at maths ?
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@301 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-22 19:56:30 +00:00
Adrien Destugues
dc9e10c054 Started work on the gradiation rectangle.
The handling in the operation engine should work pretty well. I would like to do some changes, however (displaying the bottomright of the rectangle, and use XOR for the vector, for example)
Now, i have to do the real thing, the gradiation calculation and drawing. But let's see that tomorrow...


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@299 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-21 19:57:25 +00:00
Yves Rizoud
568e4b7349 Implemented the Additive and Substractive modes, missing from the DOS version
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@286 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 23:24:41 +00:00
Yves Rizoud
8f7d11ef04 Added back the confirmation message in "Copy Spare / Some colors" function.
I shouldn't have removed it in r279, it happens because the spare page has 
unsaved changes and will be modified.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@285 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 22:01:22 +00:00
Adrien Destugues
99d485210c Some speedup for macosx build
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@259 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 13:29:34 +00:00
Yves Rizoud
7ca68f33d0 Fixed many refresh problems in the Sieve menu, plus older logic bugs.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@254 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-14 19:54:22 +00:00
Adrien Destugues
ff1d5d4dd6 Fixed screen update issues.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@251 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-14 16:16:32 +00:00
Adrien Destugues
4a2bef2f6b Removed useless SDL.h include in main.c (already included in global.h)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@250 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-14 15:06:07 +00:00
Yves Rizoud
96089af2ae Contextual help in all menus. Done!
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@240 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 21:28:16 +00:00
Adrien Destugues
393ced7451 Hopefully correct Mettre_Ecran_A_Jour for zoom. Still buggy in the colour brush, going on to check that
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@220 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-09 19:05:21 +00:00
Yves Rizoud
c8c037d00b Fixed resolution menu behavior when less than 12 resolutions are available.
gfx2.cfg : Reverted the default Shade (Blanks are needed to separate the gradients)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@215 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 19:21:17 +00:00
Adrien Destugues
ab3318caaf more work on the shade window.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@209 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 16:13:32 +00:00
Adrien Destugues
8d5e4f6840 removed screen refreshing in the block drawing function and made the needed update in windows display. Should be a lot faster, but i may have missed some screen updates.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@205 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 14:16:48 +00:00
Yves Rizoud
40fe3ccf09 SDL Graphics mode detection and checking if valid, CFG saves only configuration for valid modes where the user set <3 | Imperfect | Unsupported.
Modes are not sorted yet (cosmetic)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@199 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-05 02:10:53 +00:00
Yves Rizoud
0705aae104 Fixed an incompatibilty with gfx2.cfg from DOS version.
Fixed the invalid shades in the current version of gfx2.cfg : Somehow it was filled with multiple occurences of color 0(black), with a step of 0.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@198 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 23:47:53 +00:00
Adrien Destugues
ee6106d80f XOR lines when moving windows
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@194 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 20:37:09 +00:00
Adrien Destugues
1c669a2987 Displays the brush on his button
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@193 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 20:09:09 +00:00
Adrien Destugues
5a2f86a4d6 set the window caption to something useful
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@192 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 18:45:05 +00:00
Adrien Destugues
eaa35aa9c7 Fixed the palette window : color counting works (forgot to initialize the buffer), and correct display of selected colors.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@191 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 18:14:29 +00:00
Adrien Destugues
9dac1feee7 Correct screen update for circles with gradiation.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@190 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 16:40:04 +00:00
Adrien Destugues
3a9dd17bb5 Some rework in the polyfill routine... still imperfect ...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@189 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 15:03:17 +00:00
Yves Rizoud
7ba9a726dc Implemented window sizing (and re-sizing) by draggin window edges.
Unfinished, more work needed in:
* command-line arguments (grafx2 myimage.pcx -width 640 -height 480)
* querying SDL for best modes
* detecting bad modes and recovering (though shift+return restores to window)
* saving settings in gfx2.ini.
Also, now the window's close button triggers Quit. Both events (quit, resize)
are only taken into account when all menus are closed.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@188 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-03 01:06:42 +00:00