62 Commits

Author SHA1 Message Date
Adrien Destugues
32ec828835 Group all copyright statements in a single file.
This gives a much clearer overview of the licensing.

It also shows there are some problems:
- Some files are under GPLv3 only
- Some files have no known license at all.
2020-12-19 21:56:33 +00:00
Thomas Bernard
cad8658225
add PIXEL_MODE_TMS9918G2 (MSX, ColecoVision, etc.) 2020-01-18 10:13:59 +01:00
Thomas Bernard
848ec95e92
fix warnings caused by sprintf()
note :
%hhu is C99, old mingw32 compiler complains about it
2019-07-25 00:04:41 +02:00
Thomas Bernard
d2777d79cb
add a Sega Mega Drive / Genesis drawing mode 2019-05-27 09:44:25 +02:00
Thomas Bernard
4283fde82a MOD_CTRL => GFX2_MOD_CTRL, etc. 2019-02-13 15:42:51 +01:00
Thomas Bernard
2d392fb7b1
Convert image to FLI when enabling the mode. show errors in layer 4 2018-12-11 12:25:39 +01:00
Thomas Bernard
f003bd8678
Add C64 FLI drawing mode
todo : conversions from flat images
2018-12-11 12:25:39 +01:00
Thomas Bernard
1bdec2949b Apple II DHGR mode support 2018-12-08 18:12:36 +01:00
Thomas Bernard
40e022525b convert image to HGR when enabling IMAGE_MODE_HGR 2018-12-08 18:12:36 +01:00
Thomas Bernard
6ccf61361a use Read_pixel_from_layer() in Check_block_constraints() 2018-12-08 18:12:36 +01:00
Thomas Bernard
45bb0dd9f7 implement Apple II HGR Drawing mode 2018-12-08 18:12:35 +01:00
Thomas Bernard
8d7c37cc5f
Game Boy Color constraints support 2018-11-29 10:07:20 +01:00
Thomas Bernard
14f7eb1ba4
Button_Constraint_menu(): larger dropdown button 2018-11-29 09:44:09 +01:00
Thomas Bernard
be5ead7a04
Check_block_Constraint: check ZX spectrum color intensity. And C64 Multi background color 2018-11-28 15:46:32 +01:00
Thomas Bernard
740983a719
fix : Button_Layer_add(-1) => Add_layer(Main.backups, 1)
it was making the GUI lost his way when called from the Drawing mode menu
2018-11-28 14:26:32 +01:00
Thomas Bernard
216f18607d
Check_block_constraints() to check block constraints 2018-11-28 13:47:56 +01:00
Thomas Bernard
811ae20534
layers.c: button functions receive button number as first argument
also minor improvements
2018-11-28 13:01:01 +01:00
Thomas Bernard
2e3dc0e149
Add layers automatically when switching to IMAGE_MODE_MODE5/RASTER 2018-11-26 22:40:50 +01:00
Thomas Bernard
40bd0fc1c7 8bits: set Thomson and CPC palettes
Also properly scroll the palette, and select relevant background and foreground colors
2018-11-26 15:18:01 +01:00
Thomas Bernard
8a3860611d
Left clic on 8bit button now opens the menu if no mode has previously been selected 2018-11-26 10:50:52 +01:00
Thomas Bernard
58b39df019 minor modifs in response to Pulkomandy's remarks 2018-11-26 00:44:52 +01:00
Thomas Bernard
25c4ec5ceb Scroll palette to show relevant colors 2018-11-26 00:38:41 +01:00
Thomas Bernard
8d50329556
doxygen Button_Constraint_mode() + fix set_grid in Button_Constraint_menu() 2018-11-22 23:13:44 +01:00
Thomas Bernard
f785c420d6
Set grid and picture size in 8bit menu
Enabled thanks to checkboxes
2018-11-22 14:33:26 +01:00
Thomas Bernard
119a5afbf6
Set default CPC palette 2018-11-22 13:45:35 +01:00
Thomas Bernard
8453575812
implement C64 Multicolor constraints drawing mode 2018-11-22 11:08:53 +01:00
Thomas Bernard
499104bc41 underscore P in "Set Palette" 2018-11-20 13:31:16 +01:00
Thomas Bernard
1e6f0175da
Add "Set Palette" option in the 8bit menu 2018-11-20 10:52:37 +01:00
Thomas Bernard
0439831a1d
Add inline doc for 8 bit effect menu 2018-11-20 09:15:48 +01:00
Thomas Bernard
777ce390b4 Display short description in 8bit constraint menu 2018-11-19 23:19:20 +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
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
5c761ace2c Use KEY_NONE for buttons without key shortcuts
SDLK_LAST was used, but it is SDL 1.x specific
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
Adrien Destugues
9d46d1e90f Implement a more generic "rasters" mode for CPC
This is similar to mode 5, but with less constraints:
- All inks can have split rasters
- Split rasters have a min width of 32 pixels

Note that this is nowhere near enough to make sure the image will be
renderable (number of colors should be limited, unless there is a span
without rasters allowing to reload registers with new colors, and
moving from one pen to another also has a cost). The goal is to offer no
over-restriction (everything that can be shown on the real machine is
drawable). Additional constraints may be checked from a lua script that
will generate the code and data for displaying the picture.
2018-06-29 11:02:34 +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
Nic Soudée
a01e7eea69 Implement shortcut/underscore for input button 2018-06-24 15:25:26 +00:00
Thomas Bernard
6aa268e637 Fix 8bit FX mode selection window 2018-04-06 10:51:28 +02:00
Thomas Bernard
353b494617 move tilemap data to T_Document.
Also merge Disable_main_tilemap + Disable_spare_tilemap
=> Disable_tilemap()
2018-01-22 20:59:49 +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
Adrien Destugues
f2b04e08d0 Constraint modes: Thomson, ZX 2017-06-23 22:20:08 +02:00
Adrien Destugues
0b6e782f74 Support Amstrad CPC mode EGX2 2017-06-23 22:20:08 +02:00
Adrien Destugues
aef77744e1 EGX mode for CPC
In this custom mode, odd lines use MODE 0 (wide pixels, 16 colors), and
even lines use MODE 1 (square pixels, 4 colors).

- Add a settings window to the 8-bit effect where you can chose what you
want to draw
- Add the customizations required to make it work in graph.c
- Tweak some other places so it is easier to add other modes later on.
- Groundwork for some more modes: EGX2, ZX spectrum, Game Boy color.
2017-05-06 22:22:52 +02:00
Adrien Destugues
5b6095f0bc Fix all warnings and enable -Werror
mostly unused variables and broken indentation.
2017-05-06 15:13:50 +02:00
Adrien Destugues
26458456a8 Move the "show grid" setting to the effects window.
Fixes https://code.google.com/p/grafx2/issues/detail?id=315


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2108 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-03 16:07:39 +00:00
Adrien Destugues
78fcc648c3 Partial merge of the SDL2 branch into trunk
* Mainly get the cleanup of window drawing functions.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2102 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-02 13:44:18 +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
4fe4ccd7b0 Added safeties for Mode5: Mode will only switch on if the image has the required layers and a compatible width.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1941 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-30 22:27:09 +00:00