72 Commits

Author SHA1 Message Date
Yves Rizoud
346d940889 All code ready for mass translation
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@691 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-23 18:08:42 +00:00
Yves Rizoud
f8c7c6730b translations
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@690 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-23 02:33:21 +00:00
Adrien Destugues
c324adfff2 Some cleanups to the types of vars.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@689 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-22 17:44:29 +00:00
Yves Rizoud
f342ff5ff7 More translations (about 500)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@687 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-19 03:18:42 +00:00
Yves Rizoud
4dcdc53409 more translations
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@684 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-18 00:16:29 +00:00
Yves Rizoud
f69cf6b8f7 More manual translations, to make the bulk process easier
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@683 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-17 19:09:43 +00:00
Franck Charlet
c60c1e7353 - Modified Initialisation_du_programme() so 0 is returned on SDL initialization fail.
- Added support for .png files in Mac OS X port.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@677 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-16 17:19:40 +00:00
Yves Rizoud
ecafeaace1 more code cleanup to prepare translation
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@676 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-15 17:21:16 +00:00
Yves Rizoud
0aa43794cd Code cleanup: typedef all structs.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@671 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-14 01:08:39 +00:00
Yves Rizoud
b347f5e04b Source cleanup to help translation.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@669 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-13 21:42:26 +00:00
Adrien Destugues
3baa53db96 Fixes small BMP files saving
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@667 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-03-07 21:23:49 +00:00
Yves Rizoud
761d62f761 Removed some unneeded dependencies to speed up compile.
Code "cleanup": Functions that create a button now return its address.
This helps reduce the number of files that use the globals "Fenetre_Liste_boutons_*"


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@642 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-19 02:10:40 +00:00
Franck Charlet
8ed5019b02 - Fixed the usual problem due to non posix code
- Made the png lib optional with: __no_pnglib__

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@630 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-15 17:03:18 +00:00
Yves Rizoud
d704c4f425 Implemented last-chance recovery that saves the current and spare page. (issue 97)
Tested OK on Windows when crashing Contour (issue 119)
Doesn't handle frozen states (when killed in task manager), I'll have to look further.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@628 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-13 01:12:52 +00:00
Yves Rizoud
aaa393e12f Fixed a FREEZE from r619 in Load screen, which happened when previewing an image, if your palette showed more than 255 colors...
Reworked GIF Save/Load. Now saves as GI89a, and is able to save and reload text comments.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@624 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-10 20:18:45 +00:00
Yves Rizoud
f00c58ade3 PNG format now saves the pixel ratio if the program is in /wide or /tall mode.
The ratio is also reloaded, but not used yet.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@615 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-08 17:53:45 +00:00
Adrien Destugues
a236e40fa6 Fixes monochrome image preview (add some sane colors). Real 2-color palette is still used on loading the picture.
Note: can display broken preview if an image is using multiple entries with the same color, and some of them are selected for cm_clair and cm_fonce.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@607 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-02-06 15:02:54 +00:00
Yves Rizoud
0f4776d4a6 fix harmless signedness warnings
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@574 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-29 21:03:07 +00:00
Yves Rizoud
03c0b0d20a PNG saving. Text data are saved: 'Software'='GrafX2', 'Title'=<image comment>
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@573 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-29 19:59:13 +00:00
Yves Rizoud
920e19b298 Moved save/load functions out of global.h
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@572 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-29 18:23:13 +00:00
Yves Rizoud
ac28a82d8e png: better error checking
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@570 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-29 17:07:03 +00:00
Yves Rizoud
0575684810 PNG loading. Don't try saving yet, it's pkm-saving code
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@569 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-29 17:01:02 +00:00
Adrien Destugues
ab5f789fdf Mostly some cleanups.
Also added two experimetal functions, Ouvrir_popup and Fermer_popup, and started to implement a (commented) example popup menu for selecting freehand draw mode.
But it seems there are problem if doing a while(Mouse_K), Mouse_K seems to be reset when the mouse moves, or in some other place. Time to sleep so i'll continue that tomorrow.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@474 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-11 21:59:10 +00:00
Adrien Destugues
154f5e824a Fixes all the tabulation problems.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@465 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-05 22:55:30 +00:00
Adrien Destugues
2c8fe249e6 Adds a listing of all the mountpoints under linux. I used a piece of code from gnulib, but i'm not sure it's a very good idea. It works for me and should be easy to adapt for many other platforms. This may need some tweaking to work also under beos and skyos (and possibly other unix-like), but if not done, the function will be compiled empty and will not harm anyone.
Also, cleans some warnings that occurs with -pedantic -c99 options to gcc, and some little things pointed by splint.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@458 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-05 15:26:59 +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
Pete Gordon
232ed1041d Endian fixed Save_BMP
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@448 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-31 11:44:41 +00:00
Pete Gordon
be5422f7ad FINALLY fixed the load/save bugs in OS4. It was just a stupid mistake in
io.h... wrong seperator!


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@446 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-31 11:04:35 +00:00
Adrien Destugues
90b3f9b1a1 Finished updating the includes for graph.c split. Now we have :
-Graph.c : everything related to drawing.
-Brush.c : everything related to brushes (displaying, erasing, capturing, and effects)
-Windows.c : windows and menu drawing functions

Some functions were also moved to divers.c.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@396 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-16 22:14:08 +00:00
Yves Rizoud
14accb544b Palette now uses RGB components in the full 0-255 range instead of 0-63.
All palette functions can be used in HSL color space too (multi-select, etc).
Fixed some more missing refreshes in Palette screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@368 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-03 01:03:32 +00:00
Adrien Destugues
8ce30de525 Add 32 null bytes at end of PI1 files to make ST Deluxe Paint happy (reported by tobe)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@361 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-25 18:58:50 +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
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
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
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
a4bcfff7de (Windows) Fixed a harmless unixism : File separator /. It Worked, but may have caused programmer errors.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@284 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 21:49:33 +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
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
Yves Rizoud
75c772a724 (linux) Fixed signedness issue that caused previous change to behave strangely.
Unsupported modes are no longer listed.
(linux) Fixed a "harmless" signedness warning in LBM loader
Will sort modes tomorrow, with a qsort.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@200 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-05 02:47:28 +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
Yves Rizoud
7bf71cd7b0 More work on endianness. Grid settings are now saved and reloaded.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@187 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 19:24:49 +00:00
Yves Rizoud
47c511a130 Fixed the CEL loader (really) and the IMG loader
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@181 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 02:19:17 +00:00
Yves Rizoud
2426b54464 Fixed CEL loader
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@180 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 02:08:57 +00:00
Yves Rizoud
1c872fdbe9 Fixed the PCX loader (broken by r176)
Made the calls to Error() more verbose


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@179 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 01:58:10 +00:00
Yves Rizoud
58b553b511 Fixed the memory corruption that happened only in 320x200 mode
(ie: after loading a small picture)
Windows taller than the screen are not supported, and there's no safety.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@178 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 01:09:19 +00:00
Yves Rizoud
acfe5836ce Grafx2 can now read and convert gfx2.cfg from the original DOS (96.5%) format.
Older .cfg files in svn were saved incorrectly: the wrong size of chunk #5
(0x0101 instead of 0xE1) made it impossible to re-read the file in gfxcfg.

gfxcfg can read and save gfx2.cfg. Upward compatibility is provided:
- If new chunk types are added to the format, it only needs a re-compile. Older
files can be read and saved.
- If new keyboard shortcuts are added (134 currently), the older files can be
read and the default shortcut will be used for missing keys.

Fixed many endianness cases, hopefully
Fixed LBM loading : bug in ASM->C conversion of Couleur_ILBM_line()
Broke PCX loading : argh!


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@176 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-29 23:15:08 +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
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