Adrien Destugues
468af075c3
Fixed the vector calculation. You can now draw gradiation rectangles.
...
However there is still some work needed :
-Some crash when the calculation gives something outside the range (clipping will probably do the trick)
-Divide by zero or something nasty like that when doing a vertical vector
-Some vector give horizontal gradiation... maybe because all the calculations are done with integers
-The operation handler still need some work : rigt click for cancelling, displaying the selected rectangle properly.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@302 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 06:59:11 +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
221b7cae00
ok, fixed line drawing. The error in previous commit was my fault, after all :)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@295 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-21 13:56:28 +00:00
Adrien Destugues
31c278813e
Trying to get straight lines drawn with shift + click. Seems the value of the starting point gets cut to 8 bit somewhere but i can't see where that happens... and it works fine when drawing, but not in preview mode !
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@294 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-21 13:39:47 +00:00
Yves Rizoud
b488ec9272
Fixed stricter compilation warnings, deleted unused asm code
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@288 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-18 19:23:35 +00:00
Yves Rizoud
9a759615ae
Cleaned up some DOS leftovers.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@282 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 21:30:38 +00:00
Yves Rizoud
763087a626
Implemented Meilleure_couleur_sans_exclusion().
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@281 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 21:01:47 +00:00
Yves Rizoud
a453821325
Fixed the darn color remapping bug in Palette window, that still happened with zoomed menus (x2 x3)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@271 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-16 22:02:42 +00:00
Franck Charlet
6a778031fe
Handling for these formats were broken due to endianness problems on PPC: pkm img bmp gif
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@268 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-16 00:29:04 +00:00
Yves Rizoud
9770d70f2a
Refactored the "#ifndef __macosx__" that were around every SDL_UpdateRect().
...
Redraw method is now defined once, in sdlscreen.c
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@266 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 22:52:00 +00:00
Franck Charlet
99b99322be
Added the missing objective C files for the macosx and fixed the changes you forgot in main.c etc..
...
Also added a way to handle the right mouse button when the shift key is pressed (for mice with only have 1 button :]).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@264 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 20:55:31 +00:00
Yves Rizoud
dac1e814ec
Fixes color mismatch under palette window when it's low and you alter a color used in the GUI and the menu bar is
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@262 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 19:34:45 +00:00
Adrien Destugues
4117dace60
You can now change zoom factor while in magnify mode.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@261 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 19:03:13 +00:00
Adrien Destugues
db9e12eda4
Fixed the screen update function... again...
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@260 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 17:58:36 +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
9434f76dfd
More fixes of palette remapping. Todo: Button Swap needs a refresh, button Cancel requires a toolbar redraw.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@258 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-15 00:04:15 +00:00
Yves Rizoud
9fb162e748
Fixes the missing color remapping of windows background (and status bar) when palette remapping occurs.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@257 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-14 22:46:51 +00:00
Adrien Destugues
584c4696c1
Mac os X port. Compiles and runs slowly
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@256 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-14 20:42:05 +00:00
Adrien Destugues
70a750e187
fixed screen update for cursor outside screen
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@252 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-14 19:31:16 +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
Yves Rizoud
403159f9a3
Resolution in gfx2.ini is now default.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@248 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-13 21:23:43 +00:00
Yves Rizoud
8a1e44ed30
Windows restore their background. Fixes/speeds-up some refreshes, and prepares for pop-up windows
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@237 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 17:32:46 +00:00
Adrien Destugues
717a7f1fbb
fixed line artifacts.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@223 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-10 15:48:40 +00:00
Yves Rizoud
83ef6ef4ac
(linux) Fixed a sigsegv when drawing a color brush which is completely outside screen (The only way is to use the circle tool)
...
SDL_UpdateRect was crashing because of receiving negative Width or Height.
This was due to Calculer_dimensions_clipees() clipping width or height so much that they become negative.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@222 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-10 00:33:22 +00:00
Adrien Destugues
b0cd961188
Fixed the statusbar update.
...
Fixed the brushes ! finally !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@221 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-09 19:29:34 +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
5fd1e42ea0
Copyright notices in source files
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@217 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-08 19:40:47 +00:00
Adrien Destugues
449858e21b
Finally fixed the Annoying Screen Update Bug (tm)!
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@216 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 22:06:29 +00:00
Adrien Destugues
93a4cd2db5
The transparent cursor left some artefacts in the edge of the menu, this is now corrected. The screen is updated when drawing.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@213 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 17:50:37 +00:00
Adrien Destugues
6d47ee1952
fixed a little screen update bug in cursor handling.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@212 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 17:26:34 +00:00
Adrien Destugues
cee796f7d4
update the palette when selecting another color
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@211 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 17:13:56 +00:00
Adrien Destugues
820df9fa2f
some more screen updates, for correct display of the zoom splitbar and workspace
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@206 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 14:39:49 +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
54b4f5a121
Resolution and window size remembered in gfx2.ini. Gfx2.ini now uses hosts' end-of-line character(s)
...
Removed Gfx2.ini from SVN, since it's automatically re-created from Gfx2.dat as needed.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@202 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-05 19:10:46 +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
7c1ecd4bb5
Fixes minimum size not taken into account if window was 320x200 before resize (issue 21).
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@197 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 22:07:56 +00:00
Adrien Destugues
16f642c689
monochrome brush drawing screen update
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@195 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 20:43:01 +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
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
Adrien Destugues
3c1fc67ca8
Fixed afficher_ligne_transparente_zoomée, used a byte for counting horizontal pixels, obviously causing an overflow and incorrect drawing. Now color brushes are always displayed correctly, including in zomm mode.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@186 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 17:54:54 +00:00
Adrien Destugues
92c4340dbd
Video modes can now be windowed or fullscreen. Quite hacky, however. We would need a way to :
...
-Easily change the number of video modes in the list (i'd like to use my 1440x900 screen at full resoluution !)
-Maybe add a resizeable window mode, but that would require more work, so i'd like to keep that for 2.0 .
In the meantime, i've made the list symetric, ie, mode are loaded from the cfg file and when the list is processed, each mode is copied to a fullscreen equivalent. Note this way of doing things will prevent the config file to save the selected video mode properly, so the program will switch to the default 800x600 windowed. When you load an image, Grafx2 will switch back to windowed mode when selecting the appropriate resolution for that image.
The NB_MODES_VIDEO constant is also only the HALF of the actually available video modes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@183 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 15:12:40 +00:00
Yves Rizoud
11a4a488a6
Changed all the remaining OEM characters in the source code into Windows-1252.
...
Except in aide.c, because the strings are printed with an OEM font.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@175 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 22:11:17 +00:00
Yves Rizoud
73ca66c084
Keyboard: Converted hardware scancodes to SDL keysyms.
...
Version becomes 97.0%, Charger_CFG() auto-converts 96.5% format as needed.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@169 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-26 23:08:21 +00:00
Yves Rizoud
ca8be4e399
Save/Load: Fixed backspace, limit 255 characters, various fixes for long filenames,
...
(linux) drive '~' uses $HOME environment variable.
Fixed some more struct packing issues (ex: GIF saving)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@163 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 16:37:50 +00:00
Yves Rizoud
f26c8fe9f1
Save/Load: Much better filename input, can enter French keys and characters.
...
The text functions now apply a Windows-1252 -> OEM conversion, since the two
main fonts are an OEM code page.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@161 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-19 00:24:00 +00:00
Yves Rizoud
b380fb28df
Fixed display of characters >127 (alpha, beta, etc).
...
Save/Load: Improved display of filenames too long to display entirely.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@155 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 21:53:37 +00:00
Yves Rizoud
3894c39631
Updated makefile for MingW support, fixed some strict compilation warnings.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@133 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-11 23:40:06 +00:00