82 Commits

Author SHA1 Message Date
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
3cd82f8f25 fix drawing mode for Apple II HGR 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
7b21ac8a90 add Pixel_in_layer() and Read_pixel_from_layer()
To access another layer than the current layer
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
58b39df019 minor modifs in response to Pulkomandy's remarks 2018-11-26 00:44:52 +01:00
Thomas Bernard
9fb2270f58 improve Pixel_in_screen_overlay_with_opt_preview() (Mode5/Raster)
now it is possible to paint in layer 5 with one of the color
defined as INK 0 to 3 in one of the first 4 layers.
2018-11-22 23:21:23 +01:00
Thomas Bernard
aeaf468c4b
code cleaning
Creates Pixel_in_document_current_layer() to factorize code between
Pixel_in_spare() and Pixel_in_current_layer()
2018-11-22 11:39:24 +01:00
Thomas Bernard
0af49cfd95
use Pixel_in_current_layer() & Read_pixel_from_current_layer() when relevant 2018-11-22 11:37:00 +01:00
Thomas Bernard
8453575812
implement C64 Multicolor constraints drawing mode 2018-11-22 11:08:53 +01:00
Thomas Bernard
ebb5a6e430
implement C64 HiRes constraints.
As they are almost the same as ZX Spectrum, that was easy.
2018-11-20 12:20:23 +01:00
Thomas Bernard
06f7b95b0f
Simplification of the Pixel drawing functions
All functions were declared twice. without or with preview.
Only one function with optional preview now.
2018-11-20 12:01:31 +01:00
Thomas Bernard
832617188f
improve Update_pixel_renderer()
+doxygen
2018-11-20 10:53:16 +01:00
Thomas Bernard
13883b7928 remove commented out code 2018-07-02 11:38:51 +02:00
Thomas Bernard
c6fdb6064c Cleanup : rename Set_mode_SDL() to GFX2_Set_mode() 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
3e4f3d0313 WIP. build under Win32 without SDL 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
fb51c1bb1c SDL_GetTicks() => GFX2_GetTicks()
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
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
Philip Linde
b6cebc4edf Fix attribute clash quantization in update
It would previously undershoot, not quantizing to an area fully
enclosing the unquantized area.

This solves issue #79
2018-05-31 19:43:33 +00:00
Thomas Bernard
f9616f570a remove warnings when compiling with MSVC++2010 2018-03-19 16:49:32 +01:00
Thomas Bernard
f2d579695c implements selection of circle/ellipse mode with right button
see http://pulkomandy.tk/projects/GrafX2/ticket/54
2018-03-10 00:46:11 +01:00
Thomas Bernard
df73e91c08 Implement "corner to corner" Gradient ellipses 2018-03-10 00:46:11 +01:00
Thomas Bernard
c1afa188a2 Change empty/filled Ellipse drawing to draw ellipse inscribed in rectangle
still to do gradient ellipses.

see http://pulkomandy.tk/projects/GrafX2/ticket/54
2018-03-10 00:46:11 +01:00
Thomas Bernard
d6ce86cae4 Remove Circle_limit global variable 2018-03-10 00:46:11 +01:00
Thomas Bernard
ce1b55be03 graph.c: Pixel_figure is not a global var anymore 2018-03-10 00:46:11 +01:00
Thomas Bernard
be8b05a384 remove Ellipse_vertical_radius_squared Ellipse_horizontal_radius_squared Ellipse_limit global variables 2018-03-10 00:46:11 +01:00
Thomas Bernard
6b97fcc322 Remove Ellipse_cursor_X/Y and Circle_cursor_X/Y global variables 2018-03-10 00:46:11 +01:00
Thomas Bernard
6be7cb1e9f move circle/ellipse functions from misc.c to graph.c
void Ellipse_compute_limites(short horizontal_radius,short vertical_radius);
byte Pixel_in_ellipse(void);
byte Pixel_in_circle(void);
2018-03-10 00:46:11 +01:00
Thomas Bernard
92620bb4ba merge Upload_infos_page_main() / Upload_infos_page_spare() => Upload_infos_page() 2018-01-22 20:34:29 +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
1d2cfc2a8d ZX: also apply brightness constraint
There may only be one brightness per cell: either two light, or two dark
colors.
2017-06-28 08:24:32 +02: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
a8c7cdff15 Update copyright year in headers. 2017-05-01 20:41:46 +02:00
Adrien Destugues
23eded3e09 Fix endless event loop in Haiku
SDL for Haiku always send a WM size change at init. We did catch that it
would not cause any SDL mode set, so we ignored it, but we forgot to
reset the resize width and height. So each run of the event loop would
try to resize the window again and again to the same size.

Thanks to event throttling this was not very noticeable, the main
consequence was that some stuff was reset and for example the tooltips
in the status bar were not showing at all.
2017-05-01 20:34:05 +02: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
Yves Rizoud
f9eb1bfe7b Fix crash in contourfill when grid is visible - part of ticket #20. Also update credits and homepage address
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2122 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-06-25 22:26:49 +00:00
Adrien Destugues
878c926ce4 Fix issue 185 (XOR highlight) :
* Use a simple optimization algorithm to compute a good set of XOR color pairs
 * Algorothm is not very optimized (complexity is up to n^3). In practize, it stabilizes after 2 to 3 rounds of swapping colors
 * Use this color table for all XOR effects
 * Setting for grid color is now removed


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2048 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-01-06 12:46:46 +00:00
Adrien Destugues
65194af002 Use some macro magic to avoid repeating the list of graphic primitives for each pixel renderer.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2047 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-01-06 11:23:24 +00:00
Yves Rizoud
e87f9140c7 Fix issue 516: Some changes can't be undone on animations > 32 frames
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2033 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-10-16 00:07:42 +00:00
Yves Rizoud
effde4aee2 Issue 473: Fix mouse droppings in Brush rotate tool when you hold Shift
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2012 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-26 23:13:04 +00:00
Yves Rizoud
d8fd3d33a4 Fix issue 473: Brush-rotate cursor has display issues
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2011 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-26 00:37:49 +00:00