96 Commits

Author SHA1 Message Date
Thomas Bernard
50f3b99106 store unicode filename for brush 2018-11-09 12:50:45 +01:00
Thomas Bernard
725da6307e
Remove warnings with GCC 7
GCC 7 introduced a new warning in switch() statements :
warning: this statement may fall through [-Wimplicit-fallthrough=]
2018-10-17 16:42:54 +02:00
Thomas Bernard
65c761345f fix: MSVC defines _DEBUG, not DEBUG 2018-09-16 00:23:13 +02:00
Nic Soudée
0953bc1f9b Fix bug in -help video mode listing
The mode_index is being incremented by 12, but we are
only displaying 6 video modes per line. This results in
the "Available video modes" listing to ignore half of the
valid video modes.
2018-08-16 09:15:57 -04:00
Nic Soudée
78d99fd337 Move command line analysis down a bit
This is necessary so that the list of available video modes
is populated, making the -mode parameter work again.
2018-08-16 09:14:33 -04:00
Thomas Bernard
72972a8b49 doxygen comments in main.c.
Includes the mainpage section
2018-07-27 14:29:25 +02:00
Thomas Bernard
715bda292b silence a warning 2018-07-20 12:27:58 +02:00
Thomas Bernard
05d6a4b3dd properly handle long filenames of preloade files 2018-07-16 14:39:25 +02:00
Thomas Bernard
4978a7cfe2 convert Warning() and DEBUG() to GFX2_Log() 2018-07-12 20:41:49 +02:00
Thomas Bernard
7fb77f85f1 Add GFX2_Log() function 2018-07-12 19:11:39 +02:00
Thomas Bernard
153363d52f Mac OS X : ignore -psn command line argument 2018-07-04 13:34:24 +02:00
Thomas Bernard
1d023c49e2 X11: open window on its previous position
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-04 01:05:32 +02:00
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