63 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Yves Rizoud
a223fcb9b6 Made the welcome screen behave like a spash screen: Any click or keypress dismisses it.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@280 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 19:35:02 +00:00
Yves Rizoud
30aa716ba6 "Copy Spare / Some colors" is no longer a guaranteed SEGFAULT (crash)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@279 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 19:21:23 +00:00
Yves Rizoud
a86ded68e4 Fixed missing refreshes in the GUI: Load/Save, Stencil, Mask, Best match colors, and all scrollbar buttons.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@278 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 19:09:22 +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
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
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
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
47c1db98ce fixed screen update in loadfile screen when opening an empty directory (or with little number of files)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@247 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-13 20:03:21 +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
Yves Rizoud
74d0b87233 Contextual help in Effects menu
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@239 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 19:09:29 +00:00
Adrien Destugues
157722706b some work on the titlepage and credit help.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@228 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-11 15:17:25 +00:00
Yves Rizoud
fe249a3c7d Splash screen, About
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@218 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-09 00:30:44 +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
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
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
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
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
dd984538bf Removed some old DOS code, unified (for gcc) the handling of file paths.
Probably fixed some linux issues there.
Fixed the filename search by typing in Save/load.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@196 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-04 21:56:02 +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
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
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
7197a98fe3 Added constants for shift/ctrl/alt modifiers
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@173 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 17:12:11 +00:00
Yves Rizoud
8ec86f1899 gfxcfg now uses SDL keysyms for input, you can test it to check how SDL understands keys on your platform. The utility still doesn't load gfx2.cfg, and still saves is badly.
Fixed more hardcoded scancodes (shade menu).


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@171 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 16:53:26 +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
2e3a9c387f Save/Load: Typing letters to find matching file is now case-insensitive.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@159 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-17 22:38:53 +00:00
Yves Rizoud
9cae113c99 Save/Load allows editing very long file names, still imperfect
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@157 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-16 00:28:22 +00:00
Yves Rizoud
646ac6235f Save/Load: Added drive icons (also linux, but untested)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@153 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 21:00:11 +00:00
Yves Rizoud
a3f2b7c2f8 Save/Load: Allows long filenames of mixed case. File extensions lowercase by default. Confirmation of Deleting a file no longer hangs.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@150 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 00:32:08 +00:00
Yves Rizoud
2f5c16a8a0 Support for long file names in file selector, up to 27char.
Cleanup in the Load/Save function for all formats, preparing for big endianness fix.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@146 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 18:07:17 +00:00
Yves Rizoud
beea105ef7 Enabled keyboard repeat (maybe not in the best way).
Fixed FX/Feedback button that couldn't be switched off.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@145 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 00:50:18 +00:00
Yves Rizoud
0eaba7e952 Fixed endianness of PCX i/o, increased buffer size of file paths everywhere.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@141 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-13 00:24:25 +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
Adrien Destugues
ccf08d6229 Removed a bad include. Should avoid errors when linking
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@131 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-11 12:11:30 +00:00
Adrien Destugues
867ac703ca Working palette reduction ! You can now load 24b pcx images !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@121 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-08-13 17:31:32 +00:00
Adrien Destugues
b6986f2b56 All brush effects working !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@119 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-08-12 17:52:55 +00:00
Adrien Destugues
bf0127e306 Working load and save for PKM files !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@108 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-08-09 21:14:33 +00:00
Adrien Destugues
7e48434e19 Right click is working. You can stop drawing polylines and do various other things
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@83 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-07-30 20:08:02 +00:00
Adrien Destugues
9093f3c09c Debugged keyboard input. You can now change the picture size.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@80 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-07-30 18:43:43 +00:00