2600 Commits

Author SHA1 Message Date
Yves Rizoud
7ba9a726dc Implemented window sizing (and re-sizing) by draggin window edges.
Unfinished, more work needed in:
* command-line arguments (grafx2 myimage.pcx -width 640 -height 480)
* querying SDL for best modes
* detecting bad modes and recovering (though shift+return restores to window)
* saving settings in gfx2.ini.
Also, now the window's close button triggers Quit. Both events (quit, resize)
are only taken into account when all menus are closed.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@188 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-03 01:06:42 +00:00
Yves Rizoud
7bf71cd7b0 More work on endianness. Grid settings are now saved and reloaded.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@187 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 19:24:49 +00:00
Adrien Destugues
3c1fc67ca8 Fixed afficher_ligne_transparente_zoomée, used a byte for counting horizontal pixels, obviously causing an overflow and incorrect drawing. Now color brushes are always displayed correctly, including in zomm mode.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@186 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 17:54:54 +00:00
Adrien Destugues
710c08e158 Some corrections. Take care of adding sdl.dll to the zip.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@185 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 16:37:54 +00:00
Adrien Destugues
d5cdb4dcf0 Some modifications to the makefile to enable cross compiling a windows binary from linux. Also added a way to create a .zip ready for upload on the website.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@184 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 16:29:30 +00:00
Adrien Destugues
92c4340dbd Video modes can now be windowed or fullscreen. Quite hacky, however. We would need a way to :
-Easily change the number of video modes in the list (i'd like to use my 1440x900 screen at full resoluution !)
-Maybe add a resizeable window mode, but that would require more work, so i'd like to keep that for 2.0 .

In the meantime, i've made the list symetric, ie, mode are loaded from the cfg file and when the list is processed, each mode is copied to a fullscreen equivalent. Note this way of doing things will prevent the config file to save the selected video mode properly, so the program will switch to the default 800x600 windowed. When you load an image, Grafx2 will switch back to windowed mode when selecting the appropriate resolution for that image.

The NB_MODES_VIDEO constant is also only the HALF of the actually available video modes


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@183 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 15:12:40 +00:00
Yves Rizoud
cd6b94f594 'make zip' now archives 'new_cfg' too
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@182 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 02:32:33 +00:00
Yves Rizoud
47c511a130 Fixed the CEL loader (really) and the IMG loader
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@181 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 02:19:17 +00:00
Yves Rizoud
2426b54464 Fixed CEL loader
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@180 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 02:08:57 +00:00
Yves Rizoud
1c872fdbe9 Fixed the PCX loader (broken by r176)
Made the calls to Error() more verbose


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@179 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 01:58:10 +00:00
Yves Rizoud
58b553b511 Fixed the memory corruption that happened only in 320x200 mode
(ie: after loading a small picture)
Windows taller than the screen are not supported, and there's no safety.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@178 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 01:09:19 +00:00
Yves Rizoud
6cafa8a7d4 removed modesvdo.h dependancy
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@177 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-29 23:26:56 +00:00
Yves Rizoud
acfe5836ce Grafx2 can now read and convert gfx2.cfg from the original DOS (96.5%) format.
Older .cfg files in svn were saved incorrectly: the wrong size of chunk #5
(0x0101 instead of 0xE1) made it impossible to re-read the file in gfxcfg.

gfxcfg can read and save gfx2.cfg. Upward compatibility is provided:
- If new chunk types are added to the format, it only needs a re-compile. Older
files can be read and saved.
- If new keyboard shortcuts are added (134 currently), the older files can be
read and the default shortcut will be used for missing keys.

Fixed many endianness cases, hopefully
Fixed LBM loading : bug in ASM->C conversion of Couleur_ILBM_line()
Broke PCX loading : argh!


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@176 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-29 23:15:08 +00:00
Yves Rizoud
11a4a488a6 Changed all the remaining OEM characters in the source code into Windows-1252.
Except in aide.c, because the strings are printed with an OEM font.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@175 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 22:11:17 +00:00
Yves Rizoud
48fca5ceb3 When gfx2.ini is missing, default values are now taken from gfx2.dat.
Removed a custom toupper() function.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@174 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 20:17:00 +00:00
Yves Rizoud
7197a98fe3 Added constants for shift/ctrl/alt modifiers
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@173 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 17:12:11 +00:00
Yves Rizoud
554b765ce3 Added constants for shift/ctrl/alt modifiers
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@172 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 17:11:46 +00:00
Yves Rizoud
8ec86f1899 gfxcfg now uses SDL keysyms for input, you can test it to check how SDL understands keys on your platform. The utility still doesn't load gfx2.cfg, and still saves is badly.
Fixed more hardcoded scancodes (shade menu).


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@171 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 16:53:26 +00:00
Adrien Destugues
089f8ca225 modesvdo.h does not exists !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@170 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-27 11:33:52 +00:00
Yves Rizoud
73ca66c084 Keyboard: Converted hardware scancodes to SDL keysyms.
Version becomes 97.0%, Charger_CFG() auto-converts 96.5% format as needed.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@169 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-26 23:08:21 +00:00
Yves Rizoud
a7202fa2f6 Fixed character '+/-' in many menus.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@168 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 21:32:58 +00:00
Yves Rizoud
8c9f66625d Makefile: "zip" target to create a .tgz source archive. Docs: added GPL license.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@167 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 19:13:01 +00:00
Yves Rizoud
e219797b16 Implemented a time simulator for Wait_VBL()
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@166 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 18:53:16 +00:00
Yves Rizoud
7f67d41f86 Save/Load: (windows) Options "Show hidden files" and "Show hidden dirs" now work.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@165 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 18:35:23 +00:00
Yves Rizoud
51a4b91b91 Save/Load: (linux) .. now appears, and options "Show hidden files" and "Show hidden dirs" now work.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@164 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 18:24:26 +00:00
Yves Rizoud
ca8be4e399 Save/Load: Fixed backspace, limit 255 characters, various fixes for long filenames,
(linux) drive '~' uses $HOME environment variable.
Fixed some more struct packing issues (ex: GIF saving)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@163 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 16:37:50 +00:00
Yves Rizoud
2a66650568 Removed a "#pragma once", made Makefile.dep be the same on all platforms.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@162 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 13:51:50 +00:00
Yves Rizoud
f26c8fe9f1 Save/Load: Much better filename input, can enter French keys and characters.
The text functions now apply a Windows-1252 -> OEM conversion, since the two
main fonts are an OEM code page.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@161 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-19 00:24:00 +00:00
Yves Rizoud
204dee8549 Display is now using RGB range 0-255 instead of 0-250.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@160 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-17 22:43:59 +00:00
Yves Rizoud
2e3a9c387f Save/Load: Typing letters to find matching file is now case-insensitive.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@159 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-17 22:38:53 +00:00
Yves Rizoud
7175fe7b17 "Help" text is now hard-coded in tables_aide.h and compiled into the exe,
instead of being encrypted in the middle of gfx.dat


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@158 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-16 23:22:18 +00:00
Yves Rizoud
9cae113c99 Save/Load allows editing very long file names, still imperfect
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@157 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-16 00:28:22 +00:00
Yves Rizoud
87c3f89763 fix linux build, following r153
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@156 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 22:03:06 +00:00
Yves Rizoud
b380fb28df Fixed display of characters >127 (alpha, beta, etc).
Save/Load: Improved display of filenames too long to display entirely.



git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@155 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 21:53:37 +00:00
Yves Rizoud
9186bbdf17 Save/Load: Fixed a boolean bug that made some directories invisible: ".." ".*" "?" (Single-letter directories. I have them.)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@154 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 21:09:54 +00:00
Yves Rizoud
646ac6235f Save/Load: Added drive icons (also linux, but untested)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@153 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 21:00:11 +00:00
Adrien Destugues
ca9115aba6 Moved two loading functions from op_c.c to loadsave.c and converted to fopen/read_bytes.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@151 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 07:06:41 +00:00
Yves Rizoud
a3f2b7c2f8 Save/Load: Allows long filenames of mixed case. File extensions lowercase by default. Confirmation of Deleting a file no longer hangs.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@150 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-15 00:32:08 +00:00
Yves Rizoud
e4d2764ee2 fix Saving that was broken in r148
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@149 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 20:27:42 +00:00
Yves Rizoud
d930788731 I/O converted to use fopen,fread,fwrite.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@148 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 20:21:46 +00:00
Yves Rizoud
f90388d670 implemented Palette_64_to_256()
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@147 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 19:23:46 +00:00
Yves Rizoud
2f5c16a8a0 Support for long file names in file selector, up to 27char.
Cleanup in the Load/Save function for all formats, preparing for big endianness fix.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@146 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 18:07:17 +00:00
Yves Rizoud
beea105ef7 Enabled keyboard repeat (maybe not in the best way).
Fixed FX/Feedback button that couldn't be switched off.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@145 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 00:50:18 +00:00
Yves Rizoud
77f3c5763e Work on directory handling in save/load,
Mingw support for the config utility, with a larger font I made some time ago (I hoped the e' would work for Be'zier curves, but no)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@144 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-14 00:11:55 +00:00
Yves Rizoud
37ca8d13aa More work on endianness,
fixed the save/load box to display names in 8+3 format,
files can now be loaded in command-line.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@142 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-13 20:05:16 +00:00
Yves Rizoud
0eaba7e952 Fixed endianness of PCX i/o, increased buffer size of file paths everywhere.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@141 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-13 00:24:25 +00:00
Yves Rizoud
b3bcf1d841 Files are now opened in binary mode. Saving/Loading now works on windows (It didn't previously - including in the
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@140 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-12 22:51:52 +00:00
Adrien Destugues
2e78536bf2 More work on the config tool
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@139 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-12 12:37:27 +00:00
Adrien Destugues
796e6f788c Scrolling in the list
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@138 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-12 11:58:03 +00:00
Adrien Destugues
996814641d Still working on the config. Full list of options, but does not scroll
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@137 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-12 11:27:21 +00:00