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
Yves Rizoud
95482d3f17
Tilemap settings window: removed empty space, and the mode is switched ON if you exit this window using the OK button
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1940 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-30 22:06:37 +00:00
Yves Rizoud
d38f5ee981
CPC mode 5 : replaced the global Constraint_mode by a state (Image_mode) in each versioned T_Page: This allows keeping it sane when swapping to Spare, and when Undo/Redoing. Also fixed the first page when program starts, it was unnecessarily allocating pointers for the maximum number of layers(16)/frames(999)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1907 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-02-27 00:47:18 +00:00
Yves Rizoud
496148d485
Tilemap effect: Added a menu to set options. Options saved and reloaded in .INI. Added support for shortcuts (but no helpfile so far, so you can't set them)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1870 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-13 23:21:59 +00:00
Yves Rizoud
d60a4441d1
Max Grid size increased: from 80 to 999. Kudos to Robinson and X-Man for planning 15 years ahead and storing the settings as 16bit in the config file.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1869 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-13 14:06:09 +00:00
Yves Rizoud
e7d37cf367
Tilemap: now separate for main and spare. Safeties added in most places necessary (auto-recompute tilemap after load, undo, etc)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1866 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-11 22:57:35 +00:00
Yves Rizoud
ef030fec3f
Tilemap mode improved to analyze and detect identical tiles, so you write in real time on all occurences of same tile. Works very well but unfinished, will crash or have other problems when you resize image
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1859 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-08 23:11:18 +00:00
Yves Rizoud
f1f658ded4
Start of tilemap. Only a togglable effect
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1856 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-06 19:03:27 +00:00
Adrien Destugues
6672966661
* Avoid crash when enabling mode 5 without enough layers (they are created)
...
* Display error code to terminal when loading an image fails. Mainly for debugging purposes.
* Use different error codes for different errors in ILBM loader.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1818 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-07-12 19:31:48 +00:00
Adrien Destugues
72e9892b53
Constraint mode is now switchable on/off in the effect screen.
...
I did some changes to the effect screen to make some space : instead of displaying an "on/off" label, we now keep the button pressed for active effects.
There is no "constraint menu" yet, we should allow to select different constraints there (C64, MO5, spectrum, ...) to activate their respective enforcer and plug the right thing to the associated checker.
This should eventually allow drawers to :
* Load any single-layer picture
* Select the mode they want to use (without enabling it)
* Run the checker and get the result as a multilayer (with an error layer)
* Then, once they feel enough issues are solved, switch to "enforcer" mode for further manual tweaking.
Now we need a checker for CPC Mode5... :)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/cpcmode5@1721 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-14 13:37:35 +00:00
Adrien Destugues
eba26aaa96
Merge trunk to the cpcmode5 branch. This gets us a more recent grafx2 with the cpcmode5 drawing. Now to make this mode optional so users can still work in regular mode :)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/cpcmode5@1719 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-13 21:49:31 +00:00
Adrien Destugues
4e60f5ad74
Import the WIP CPC-Mode5 code from the sourcearchive
...
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/cpcmode5@1718 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-13 21:20:45 +00:00
Yves Rizoud
3ca5322379
Reorganized source code and directory tree.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1375 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-03-05 02:53:19 +00:00