84 Commits

Author SHA1 Message Date
Thomas Bernard
c53b86d6c9 Fix Endian dependent code when compiled without SDL or SDL2
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-02 11:38:52 +02:00
Thomas Bernard
a514f7e9a2 use MessageBox() to display error messages under Win32 2018-07-02 11:38:51 +02:00
Thomas Bernard
cb2d479867 add GFX2_Get_Window_Handle() to get the win32 HWND
and use it
2018-07-02 11:38:51 +02:00
Thomas Bernard
af25970c09 Fix Joystick support (with SDL and SDL2) 2018-07-02 11:38:51 +02:00
Thomas Bernard
d809adb540 Process Win32 commandline 2018-07-02 11:38:51 +02:00
Thomas Bernard
9f9c21de21 backup position of windows (Win32 API) 2018-07-02 11:38:51 +02:00
Thomas Bernard
4b28894bb8 cross compilation of Win32 version (using win32 API) 2018-07-02 11:38:51 +02:00
Thomas Bernard
9ac4267468 Working win32 API implementation with mouse
(no keyboard yet)
2018-07-02 11:38:51 +02:00
Thomas Bernard
4d86b8a0c1 change all references to SDLK_xxxxx to KEY_xxxx
+ some fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
77005eb780 use screen.h instead of sdlscreen.h, etc.
Create grafx2-win32 MSVC++ project
create keycode.h
various fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
d86efa58e4 Compilation with SDL2 (to be finalized) > API=sdl2 make 2018-07-02 11:38:51 +02:00
Thomas Bernard
72fea0290f isolate dependencies to SDL
Do not access directly the SDL_Surface Screen_pixels
use new functions Get_Screen_pixel_ptr() Set_Screen_pixel(),
Get_Screen_pixel()
And SetPalette()

Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-02 11:38:51 +02:00
Thomas Bernard
92facef46d Convert comments to UTF-8
most were encoded in Latin1 / CP1252
but a few lines in op_c.c were using IBM437/850 !
2018-06-26 11:37:19 +02:00
Philip Linde
b91cfe4ed3 Call Button_Quit and Button_Page with correct enum
These functions are called explicitly in a few places and need to be
handed the corresponding enum value to correctly get the button value.
Since they were previously called with -1, they would cause segfaults.
These seemed to happen when restoring backups or loading images to both
pages.
2018-06-03 20:03:34 +00:00
Thomas Bernard
d4746ea72e
Fix MacOS file case in include
<corefoundation/corefoundation.h>
should be
<CoreFoundation/CoreFoundation.h>

Many MacOS FS are case insensitives, but not all, so we must use
the correct case.

Issue detected by the MacPorts buildbot : https://trac.macports.org/ticket/56490
2018-05-15 15:33:15 +02:00
boomlinde
2639dec301 Add -size commandline argument 2018-05-14 19:46:19 +02:00
Thomas Bernard
30f23b93ef Massive change of button callback function prototypes 2018-03-10 00:46:11 +01:00
Thomas Bernard
3870cc8afb Program_shutdown() free all images, backups, brushes. 2018-03-05 09:22:02 +01:00
Thomas Bernard
37eac890c2 memory leak fix : free the main page on exit 2018-03-05 09:22:02 +01:00
Thomas Bernard
5acf27c1b4 call iconv_close() to free iconv resources 2018-03-05 09:22:02 +01:00
Thomas Bernard
dc4926b7c0 Fix to compile windows build with MinGW32 2018-02-20 15:45:45 +01:00
Thomas Bernard
c48e881a54 WIN32 versions of io functions 2018-02-20 15:45:45 +01:00
Thomas Bernard
6f48d7fefe Add MSVC 2010 project file and a make the project compile 2018-02-20 15:45:45 +01:00
Thomas Bernard
689aebf264 Unicode support in keyboard editable field for filename 2018-02-20 15:44:39 +01:00
Thomas Bernard
a4593da4d4 display unicode filename in menu 2018-02-20 15:44:39 +01:00
Thomas Bernard
9a03a54fef Display the current directory in unicode
rename function Print_in_window_utf16() to Print_in_window_unicode()
2018-02-20 15:44:39 +01:00
Thomas Bernard
3322529804 Support for unicode names in directory listing 2018-02-20 15:44:39 +01:00
Thomas Bernard
a1f0f36062 chdir() => Change_directory()
improve portability
2018-02-20 15:44:39 +01:00
Thomas Bernard
545308265b Add the ability to print unicode characters in addition to "Latin1" ones 2018-02-20 15:44:39 +01:00
Thomas Bernard
48a8a79746 Fix some memory leaks 2018-02-10 18:49:35 +01:00
Thomas Bernard
4ffa389a90 Update File selector to load/save palettes
Also "constify" the format array
2018-01-25 22:55:27 +01:00
Thomas Bernard
a53d6da6ea Add visible_image and backups to the T_Document structure 2018-01-22 16:16:39 +01:00
Thomas Bernard
8ae651c75f put common fields for Main and Spare page in a T_Document structure 2018-01-22 14:46:44 +01:00
Thomas Bernard
08e3c6bebf Fix issue 46 : part 2
in Error(0) the palette was not properly restored
as it was always restored to the Main_palette.
Now we really restore the right palette !

Also clarified/simplified the change directory code in case of error.

http://pulkomandy.tk/projects/GrafX2/ticket/46
2018-01-22 13:46:13 +01:00
Thomas Bernard
2928a16e41 Also save visible layers for spare page
see http://pulkomandy.tk/projects/GrafX2/ticket/25#comment:3
2018-01-03 05:13:51 +01:00
Adrien Destugues
32b3996cb8 Add Gamma correction in palette editor
Particularly useful when working for platforms with non-linear palettes.
For example the Thomson TO8 has a Gamma correction of 2.8, so the
darkest shade of color is already very bright. It is important to take
this into account when drawing pictures to avoid bad surprises when
showing them on the real machine.

The setting is available from the command line, or from the extended
palette window, which gets a little relayout using horizontal sliders
now that these are available.
2017-03-19 09:49:35 +01:00
Adrien Destugues
9c6f343215 Patch by Thomas Bernard to fix compilation on FreeBSD.
Thanks!

Fixes #50.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2173 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2017-01-03 18:25:35 +00:00
Adrien Destugues
0eaf3fce96 Use iconv to convert filenames from UTF-8.
Patch by miniupnp, with some C89 adjustments.
Enabled for Haiku and the generic Linux/*BSD part of the Makefile.
Please adjust as needed.

Fixes #10 for codepages for which we have a font.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2172 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-12-02 19:43:23 +00:00
Adrien Destugues
8808625851 Add a "tall 3" drawing mode.
Pixels with 3:4 aspect ratio. Why not?

Contributed by Nic Soudée (zoner/xylem). Thanks!


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2166 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-10-15 18:57:14 +00:00
Adrien Destugues
61c8dca353 Add a port to the GCW Zero, contributed by David Knight.
Untested since I don't have the hardware.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2080 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-02-10 20:13:57 +00:00
Yves Rizoud
1248100ae9 Integrate path fix from Android port (tnanks a lot Pelya)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2071 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2014-03-30 17:31:05 +00:00
Yves Rizoud
fbdde8d16c Issue 490: color 255 selected FG by default
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2021 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-30 16:25:52 +00:00
Yves Rizoud
26613ec440 Program now remembers favorite mode layers/anim, based on last time you switched in splash screen or toolbar. Fixed graphic behavior when mode 5 is enabled/disabled, and added a safety (colors <4).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2014 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-28 00:19:57 +00:00
Yves Rizoud
80fc7da7f6 Fix issue 462: Save/Load path problems: Main, Spare and Brush now have completely distinct fileselector settings.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2003 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-22 16:47:39 +00:00
Yves Rizoud
191aa87172 Remove debug printf
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1958 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-13 16:55:06 +00:00
Yves Rizoud
7443239566 Fix issue 477: Crash when browsing drives that have no 'parent directory' entry
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1957 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-13 14:55:33 +00:00
Yves Rizoud
93c4832138 Saving as palette format no longer shows warning about lyaer/anim support. Loading a single file in command-line makes the spare use the same mode (layer/anim), so that the menus don't move when you switch
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1951 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-08 18:55:17 +00:00
Yves Rizoud
55f4884e34 Fix a few compilation warnings on Linux; Fix a possible bug in Mode5 loader; Removed a pair of debug printfs in realpath.c
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1933 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-14 19:17:35 +00:00
Adrien Destugues
af8316c279 * Second attempt at fixing #448.
* Fix another bug with realpath in Haiku (relying on nonstandard behaviour)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1917 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-06 21:05:54 +00:00
Yves Rizoud
de6b3ac8d1 Toolbars now automatically switch to anim/layers when required
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1911 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-04 15:35:20 +00:00