Commit Graph

30 Commits

Author SHA1 Message Date
Albrecht Schlosser 7810cda145 Fix Visual Studio build warnings 2022-02-26 18:19:43 +01:00
Matthias Melcher 09eff7243a
Fixing and upgrading Fl_Preferences (#374)
* Added filename function to Fl_Preferences

Static function to get filename before opening.
Member to get filename after opening.
Bug fixes for memory mapped preferences.

* ERROR is a macro on Windows, don't use it

* Added Fl_Preferences::dirty().

User can now check if the database will be written
when flushed or destroyed.
Flush returns a crude error code.

* Fl_Preferences::get binary data returns # of bytes read.

* Verified group deletion code

* Fl_Preferences ignores locale.

This will make .prefs files interchangeable
between different computers.

* Updating the Preferences Mode to ignore locale.

* Fixes in docs.
2022-01-19 16:08:29 +01:00
Albrecht Schlosser 9d474dfcdf Fix whitespace and Makefile dependencies
No code changes
2022-01-05 22:00:54 +01:00
Michael R Sweet ea34edc1ea
Tweak blocks game to use higher update rates and slightly larger window. 2022-01-01 10:01:23 -05:00
Albrecht Schlosser 5810edaf84 Fix remaining VS compiler warnings in test programs 2021-11-16 21:25:19 +01:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
Matthias Melcher 29fe0c43df Remove obsolete condition to make static analysis happy. 2018-12-29 01:19:51 +01:00
Matthias Melcher b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
The original intention of FL_PORTING was to mark all places in the
source code where changes are required to port FLTK to a new platform.
Thanks to the driver system, this approach has become somewhat
misleading, so I removed all references.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 17:04:18 +00:00
Albrecht Schlosser 52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
Albrecht Schlosser 42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
This second step replaces FL/x.H with FL/platform.H in all source files.
Dependencies have been adjusted as well.

This commit completes the replacement of FL/x.H with FL/platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 21:17:17 +00:00
Albrecht Schlosser 463b3e5d9d Fix blocks demo keyboard handling, add new shortcut.
The blocks demo was unintentionally intercepting ctrl/+ which was
introduced in FLTK 1.4.0 to change scaling for HiDPI screens. Now this
is separated: use ctrl/+/-/0 to change scaling, use '+' alone to change
the game level.

The new keyboard shortcut ALT+SHIFT+H allows users to reset their high
scores without editing the preferences file.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 18:44:19 +00:00
Albrecht Schlosser 768ba675b0 Fix test/blocks "runaway timer" bug.
Bug #1: When entering the next level an _additional_ timeout was started,
hence multiple timers would run in parallel and increase the game's speed
more than (supposedly) intended.

Bug #2: When the game was over, these additional timers were not stopped,
hence level 1 was never again as slow as it should be.

This is fixed in this commit. Additionally the timer values are defined
as preprocessor macros (constants) for easier fine tuning. To compensate
for the lower speed in higher levels the LEVEL_FACTOR was reduced from
0.95 to 0.90 so the higher levels are slightly faster than without this
fix.

Note: the result of this fix (generally less speed increase per level)
may result in higher scores.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12353 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 18:15:52 +00:00
Albrecht Schlosser 7aea5b50a0 test/blocks: improve timer test code.
This commit does not change operative code but adds the ability to test
the timer callback under Windows and improves the timer statistics.

The code has been formatted in some parts, but not "everywhere".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25 17:25:51 +00:00
Albrecht Schlosser d32b291a72 Fix typos in #pragma FL_PORTING.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04 13:40:57 +00:00
Matthias Melcher acf6c881d3 Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03 22:54:29 +00:00
Manolo Gouy 6c92cc9a8d Fix STR#3063: compilation using Mac OS 10.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-04-27 13:57:09 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Matthias Melcher 7fc05e3505 Fixed more Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7904 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:12:59 +00:00
Matthias Melcher d0c53ccedf Removed remaining 'deprecated function' warnings for Xcode
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-10 22:56:56 +00:00
Matthias Melcher b92ee9f21c Fixed some typos and some funny language (my own) in the documentation of the test applications. ADded a hidden [+] key support for 'Blocks' so that I can increase the level to my prefered one (6) and not have to play through 1-5 ;-)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-11-19 14:14:13 +00:00
Matthias Melcher abde88e220 On OS X: disable all 'deprecated' warnings to be able to see the really important warnings. Nevertheless, we will have to replace all Carbon calls as soon as possible. Also re-fixed (i hope) the 'return' from an endless loop in 'threads.cxx'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20 16:32:37 +00:00
Michael R Sweet d8c288df3e Fix compiler warnings/errors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20 16:18:31 +00:00
Matthias Melcher 7697347fd4 Missing underscore in previous commit.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20 15:26:09 +00:00
Michael R Sweet 73d01dd659 Fix all compiler warnings from various build systems.
Fix vsnprintf() implementation to properly handle long and long long ints.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20 00:01:06 +00:00
Michael R Sweet cb0d6f8f03 Fix blocks crashes on WIN32 - audio buffer too small
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-28 14:45:20 +00:00
Michael R Sweet 8bec5ff1e0 Don't accept clicks when paused.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5372 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-26 20:25:37 +00:00
Michael R Sweet e01c0e8079 Tweak the blocks game some more, and fix the coding style to conform to the
FLTK coding standards.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5371 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-26 20:01:24 +00:00
Michael R Sweet f3088c4f8d Workaround HP-UX compiler bug by making Blocks and Columns structures public.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5370 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-26 13:14:24 +00:00
Matthias Melcher 78547a5267 Added Blocks to the VC6 project file and set dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-25 10:12:33 +00:00
Michael R Sweet f27180b7cd Do some rearranging of image and desktop support files.
Add new Block Attack! game...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-25 06:58:33 +00:00