2788 Commits

Author SHA1 Message Date
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
Yves Rizoud
c4f6cf7762 Changed a lot of platform-specific code to "simplify" it:
A Unix-like system is now considered the default.
The number of platform-specific blocks is down to:
   win32: 13, watcomc: 3, linux: 4, macosx: 16, amigaos4: 8, beos/haiku: 1
Removed linux.c, implemented the relevant functions for all platforms.
(win32) In Stats screen, included free memory report
(macosx) Conversion_ANSI: Fixed the __macosx__ with wrong case from my former 'fix', sorry.
(macosx) readline.c : Removed a manual "Update_necessaire=1", because normally
all calls to UpdateRect() will set this flag already. Don't hesitate to call 
Flush_Update() anywhere where it's lacking, but you shouldn't put it inside a  #ifdef __macosx__
(win32) Packaging: 'make ziprelease' now includes libpng13.dll and zlib1.dll
(win32) Hacked something to resolve naming conflict of MOD_SHIFT constants with windows.h
(all) Resolution: Fixed the black space that appeared between button and label,
the memory overwrite also caused resolutions above number 2 to disappear from list.
 
Tested fine on Linux (without TTF) and Windows


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@345 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 16:25:37 +00:00
Adrien Destugues
b511ceafdb Slightly modified the operation hadling of the gradiation rectangle to avoid erasing the rectangle footprint while drawing the vector.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@344 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 15:53:42 +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
Adrien Destugues
14536f17d1 whoops... memory leak... always red the manpages :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@338 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 20:23:58 +00:00
Adrien Destugues
d5143b5f82 Implemented font listing under linux in a quite hacky way. The directory list returned by XGetFontPath is not really usable, there are some path with appended :unscaled for non-ttf fonts, so i needed to add some null-pointer check to for_each_file after the opendir to avoid a crash. I think most of my ttf fonts gets listed, but at a quick glance i find some duplicates and the list is not alphabetically sorted. That would be a great improvement (sort and remove duplicates).
Also renamed Mask to Mask_table because XLib.h already defines some var called Mask.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@337 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 20:20:47 +00:00
Yves Rizoud
038303721c Fix long filenames, and cursor keys while editing text
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@336 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 23:39:05 +00:00
Adrien Destugues
bf7e4a53dd We are now officially running under BeOS !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@335 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 21:21:26 +00:00
Franck Charlet
1b183d5861 - Added handling for right mouse button when entering filenames input array (clears it) also using escape key restores old filename.
- Clicking the button with default filename in an empty directory wouldn't work.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@334 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 13:30:22 +00:00
Franck Charlet
f5d45ade8e - Issue 51 should be fixed.
- Patched 2 segfaults in Save_PKM() which were due to the packing routine accessing a byte of a picture beyond the allocated memory block.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@333 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 12:55:54 +00:00
Franck Charlet
02bdbd4627 - Fixed the display of the current directory size by casting uint64_t for the multiplication (should work for linux too i guess).
- Fixed the macosx xcode project.
- More aspect ratios added.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@332 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-10 17:51:01 +00:00
Yves Rizoud
3e04f68127 FIX screen refresh with large brushes and in zoomed mode
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@330 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-08 20:54:00 +00:00
Yves Rizoud
83bfd14393 Text: Help screen (F1), and font detection by file extension (unknown files are ignored)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@329 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-06 23:37:24 +00:00
Adrien Destugues
746b000d06 small fix to the beos/haiku compile options. still crash ...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@328 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-06 16:31:20 +00:00
Yves Rizoud
863f5111f0 Text: You can now type long lines (250car).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@327 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 23:59:05 +00:00
Yves Rizoud
29dae934f1 Text: tweaked and debugged the screen, Up/Down/Home/End allow easily changing the font
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@326 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 23:22:33 +00:00
Adrien Destugues
3422eeff46 Patch from begasus to allow building under haiku and beos. The program is crashing when you launch it (segmentation violation).
I'm not sure the way to get the program directory we use is ok for beos, but the official way of doing that is using C++ code.
Maybe it's time to switch to some more unix way to store the config files...

This should also fix watcom build (very untested as i'm using mingw to cross compile windows builds now)
Also added begasus to the credits screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@325 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 18:59:55 +00:00
Yves Rizoud
b11d9e3ff9 Fix tiny compilation problem with mingw-gcc 3.4.2, and standardized tabs
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@324 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-03 22:42:48 +00:00
Adrien Destugues
8dd0113697 Fixed the key release handling. Avoid to mess with global variables... or the shortcut keys will trigger the actions twice (both when pressed and released)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@323 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-03 17:03:30 +00:00
Adrien Destugues
2e163fb5af Fixed drawing with the keyboard. Space key release wasn't taken into account. Now you can plot a single pixel.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@322 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-03 15:59:18 +00:00
Yves Rizoud
c5a3b7b3c8 Text tool: now has a preview.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@321 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-02 20:33:36 +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
Yves Rizoud
3b4149be49 Text: Fonts are scanned in fonts/ and Windows own directory
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@319 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-31 20:03:58 +00:00
Yves Rizoud
bd23cc6f76 Text with SFont, unfinished. Also merged in some Makefile tweaks by xeron
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@318 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-29 20:04:25 +00:00
Adrien Destugues
a6ab2465fc Fixed some warnings reported by gcc under linux.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@317 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-29 15:51:42 +00:00
Franck Charlet
af9e862b5d - Enabled the support for text in macosx version albeit it doesn't seem to do anything yet beside displaying a dialog window (updated the xcode project accordingly by installing SDL_ttf with the application).
.- Added a Backup() in Rectangle_Degrade_12_0() so the undo command should work.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@316 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-28 10:34:46 +00:00
Adrien Destugues
72c42b92ce fixed crash when drawing a vertical gradiation or a single-point (nonsense) gradiation.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@315 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-28 09:59:58 +00:00
Yves Rizoud
cc81845f7b work in progress on Text menu
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@314 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-28 00:02:48 +00:00
Yves Rizoud
3fb9a91c8f Fixed a memory leak on each directory scan
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@313 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 18:35:41 +00:00
Yves Rizoud
b49fde7015 OS4, OSX: Centralized the part which determined which directory contains the program's files.
Owners of these platforms, please check if I did it ok. It should crash spectacularly on program init or shutdown if I messed up.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@312 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 18:27:05 +00:00
Yves Rizoud
392f5f13d0 (AmigaOS4) Volume list implemented, courtesy of xeron.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@311 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 18:02:36 +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
cf54d4a460 Load/Save: "Select Drive" button. Allows a way for the AmigaOS4 version to display the list of drives / volume names.
Peter, you can plug in Lire_liste_des_lecteurs(void) to enumerate the drives.

Additionally, if you want to display drive icons as well, you have a spot in
Rechercher_drives(void) :
For each drive, call Ajouter_lecteur(car, icon, string);
* car is the displayed character
* string is the drive name "df0:", "mypictures:" etc. (string will be copied)
* icon is one of :
    LECTEUR_FLOPPY_3_5
    LECTEUR_FLOPPY_5_25
    LECTEUR_HDD
    LECTEUR_CDROM
    LECTEUR_NETWORK


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@309 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 18:20:31 +00:00
Yves Rizoud
aeda49b9bb Stats screen: report if TTF is enabled
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@308 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 13:35:28 +00:00
Yves Rizoud
c28a01522a (linux) Makefile: fixed dependencies checking
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@307 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 13:15:26 +00:00
Yves Rizoud
f2b551a3da Makefile: version.o in right directory now, ziprelease now adds -nottf to
archive names if TrueType support was disabled. Otherwise, the 435Kb DLLs are 
included in the win32 archive. The sample font is archived, too.

TODO: texte.c should expose a public function that reports if texte.o was
compiled with TTF off. This way, the stats screen can display the information.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@306 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 23:10:59 +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
78e48f5156 Fixed sprite cursor drawing on screen edges
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@304 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 17:04:18 +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
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
Franck Charlet
08f0541f11 x-swap and swap should be fixed (i forgot to refresh the main palette in such cases).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@300 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-22 03:16:39 +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
Franck Charlet
320eb547cd Added support for 192:145 (1152*870) aspect ratio in screen sizes dialog (and revamped the column a bit).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@298 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-21 14:15:18 +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
Franck Charlet
c3182555b9 I noticed modifying the logical palette only wasn't effective in fullscreen mode so i modified the palette functions to act a little bit differently: the physical palette is only refreshed globally after all locals colors are modified, that should hopefully fix the speed issue as it looks like there's also a vblank wait when the physical palette is modified (that's how it acts on mac).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@293 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-21 01:44:46 +00:00
Franck Charlet
2b232bbc48 Improved the speed of the spread and swap commands in the palette window by only refreshing the logical palette instead of the physical one (at least it works on MacOSX, i don't know if it's any good on other versions)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@292 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-20 20:08:26 +00:00
Adrien Destugues
e31b88ceed Palette sorting works
-still slow
-seems there is a bug in the HSL calculation for green and blue, they get sorted incorrectly
-maybe the new S parameter should be used in clustersets, because now we are not differenciating grey from red !! maybe it's done elsewhere, we'll have to check.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@291 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-20 18:14:10 +00:00