FellippeHeitor
bf99e30c30
Fix detection of title bar height globally.
...
_SCREENY would return wrong values after the recent commits.
2018-06-27 11:03:33 -03:00
FellippeHeitor
2c81a6d74b
Properly calculates window area.
2018-06-26 20:14:48 -03:00
Fellippe Heitor
15958ca4a5
Fixes #24
...
Disables maximize box when $RESIZE isn't enabled. Windows only.
2018-06-26 16:57:40 -03:00
Fellippe Heitor
68c765db75
Merge pull request #43 from ebourg/development
...
Update NanoJPEG to the version 1.3.5
2018-06-17 22:11:06 -03:00
AshishKingdom
820d6736f7
Added multisample support (MSAA x4)
2018-06-15 22:27:30 +05:30
Emmanuel Bourg
6be33c0935
Update NanoJPEG to the version 1.3.5
2018-05-22 21:31:49 +02:00
Luke Ceddia
ce1a4aa8c8
More dead code removal
2018-02-26 11:30:44 +11:00
Luke Ceddia
3a5364e111
_SCREENIMAGE on Linux/OSX returns a blank image instead of an error
2018-01-21 22:24:16 +11:00
Luke Ceddia
61cb34f635
Remove some SDL stuff that was dead weight
2018-01-16 20:56:45 +11:00
Luke Ceddia
8a5d7e7eea
Remove QB64_X11
2018-01-16 20:29:20 +11:00
Luke Ceddia
219bbc27f0
QB64_LINUX is now for linux exclusively
2018-01-16 20:22:32 +11:00
Luke Ceddia
1320d7fe52
Introduce QB64_LINUXONLY and _UNIX
2018-01-10 22:50:07 +11:00
Luke Ceddia
a1a0536d69
Tidy up parts/core/src.c
2018-01-09 22:38:07 +11:00
Luke Ceddia
3a0e1ae320
Move all executable code out of common.cpp; rename to common.h
2018-01-05 21:22:36 +11:00
Luke Ceddia
adeda29619
Tidy up some #defines, remove a few Android #ifdefs
2018-01-04 20:20:38 +11:00
Luke Ceddia
7dc0054fa8
Include unistd.h for freeglut
2018-01-02 17:26:16 +11:00
Luke Ceddia
7655dda762
Unset modifier keys on window defocus
2017-12-30 01:03:47 +11:00
Luke Ceddia
64edcf1b47
Support _WINDOWHASFOCUS on Linux
2017-12-30 00:01:48 +11:00
Luke Ceddia
e2bdbc01ad
Correctly set speex's output buffer size
2017-10-23 00:51:17 +11:00
Fellippe Heitor
a5f702eb6f
Implements proper error handling for Cliboard routine on macOS.
2017-10-18 20:58:26 -02:00
Fellippe Heitor
50b1002aa4
Remove reference to undeclared identifier preventing compilation (macOS)
...
Details at http://www.qb64.net/forum/index.php?topic=14553.msg126181#msg126181
Signed-off-by: Fellippe Heitor <fellippeheitor@gmail.com>
2017-10-18 19:48:17 -02:00
FellippeHeitor
6dfbeb2419
Disables 256-color image loading again, until a better solution is found.
...
Returns -1 if there's an attempt to load an image in 256-color mode.
2017-10-17 03:08:33 -02:00
FellippeHeitor
19917654aa
Adds support for Alt+F4 to close a program's window (Windows-only).
2017-10-10 01:41:53 -03:00
Luke Ceddia
86a6646bdb
Change freeglut to only look for ctrl/alt/shift down events when window
...
has focus.
Previously this functionality was in libqb.
2017-10-10 13:47:10 +11:00
Luke Ceddia
54574c1ca6
Add declaration for sub__keyclear()
2017-09-25 23:03:38 +10:00
Luke Ceddia
bdc3250b89
Resolved the issue of user mods not working for $console:only programs
2017-09-25 21:56:24 +10:00
FellippeHeitor
7998aa89cd
Detect focus using GetForegroundWindow instead of GetActiveWindow.
2017-09-25 02:25:53 -03:00
SteveMcNeill
4f23fd9b7b
Add function _AUTODISPLAY so user can get display/autodisplay staus
2017-09-24 18:41:00 -04:00
FellippeHeitor
3488bd916b
Fix to MessageBox call.
2017-09-24 08:20:18 -03:00
FellippeHeitor
5922d112bf
Adds _WINDOWHANDLE, _WINDOWHASFOCUS and _TITLE$ (function).
...
- _WINDOWHANDLE exposes the current window's handle (Windows-only).
- _WINDOWHASFOCUS returns true (-1) when the program is the foremost window (Windows-only). Always returns -1 in other OSes.
- _TITLE$ (function) returns the last title set using the _TITLE statement.
2017-09-24 08:12:13 -03:00
SteveMcNeill
d3a2424b73
Added right and middle button support for _SCREENCLICK with Windows
2017-09-24 01:08:29 -04:00
SteveMcNeill
b89ade1c5c
Patch to previous patch for Linux/Mac compatability
2017-09-23 20:33:58 -04:00
SteveMcNeill
e264458841
Patch to SLEEP, _KEYHIT, INP(&H60), _SCREENEXISTS for WINDOWS
...
Change so that modifer keypresses will only register when the window has
focus in Windows. This corrects the issue with SLEEP, KEYHIT, and
INP(&H60) registering SHIFT, CTRL, and ALT keypresses even when the
program is not in focus or is running as a background app.
Also changed _SCREENEXISTS (and a few other window user commands) so
that they require windows to have actually registered a windows handle
for the function to return -1, and not just for glut to have finished
initializing the screen itself.
2017-09-23 20:24:19 -04:00
FellippeHeitor
13fa2ca4d5
Unnecessary repeated inline functions removed from _loadimage.
2017-09-22 00:29:41 -03:00
FellippeHeitor
5368b9d5d7
Initial attempt to restore _LOADIMAGE's ability to load in 8bit mode.
...
- When mode = 256, _LOADIMAGE will return an 8bit image with the loaded file's colors matching the default palette.
- Slower for bigger images, because of the call to matchcol();
2017-09-21 23:55:01 -03:00
FellippeHeitor
8fe5804fa2
Sets the proper dependency (DEPENDENCY_SCREENIMAGE) for clipboard features.
...
Using $CONSOLE:ONLY without the above causes compilation fails.
2017-09-11 10:29:45 -03:00
FellippeHeitor
7d3f1f9833
Temporary hack to reenable _SNDRAWLEN.
...
_SNDRAWLEN currently gets stuck at .3715192763764172; this reenables it by returning zero when < .375.
2017-09-09 13:17:03 -03:00
FellippeHeitor
90e0b0df16
Minor fix to _SCREENIMAGE (function).
...
_SETALPHA needs to be called on the resulting image, as some images com with alpha = 0 from the clipboard.
2017-09-06 21:03:41 -03:00
FellippeHeitor
e3bb55da1a
Add _CLIPBOARDIMAGE (statement and function)
...
- Fetch an image from the clipboard with handle& = _CLIPBOARDIMAGE
- If there isn't an image in the clipboard, handle& will be -1.
- Copy a valid image to the clipboard (All screen modes, except 0) with _CLIPBOARDIMAGE = handle&
2017-09-06 11:19:54 -03:00
Luke Ceddia
2d651bfa76
Merge branch 'no_teapot'
2017-08-18 22:07:49 +10:00
Luke Ceddia
a7a4783650
Remove teapot from setup build files
2017-08-18 21:52:23 +10:00
Luke Ceddia
995f563d0c
Remove teapot, decrease executable by 18K
2017-08-18 20:20:42 +10:00
FellippeHeitor
b5e2b06ecd
Modifies _MOUSEX/_MOUSEY to return an integer value in SCREEN 0.
2017-08-17 23:11:30 -03:00
FellippeHeitor
2f217fce6b
Function _BLINK returns -1 if blinking is enabled; 0 if disabled.
2017-08-16 00:40:37 -03:00
FellippeHeitor
de75b0aa29
Emulates port &H3C0 to disable/enable blinking using OUT.
...
Again, thanks to _vince for contributing this bit.
2017-08-16 00:24:33 -03:00
FellippeHeitor
2c153b3db0
Adds _BLINK {ON|OFF} to disable blinking in SCREEN 0 for colors 16-31.
...
Thanks to _vince for finding the right spots where blinking was set. Or flashing, you choose the naming.
2017-08-16 00:11:31 -03:00
Luke Ceddia
8238feba75
Squash annoying message from openal on quit
2017-08-11 21:47:05 +10:00
Luke Ceddia
8c9390173e
Reenable _SNDRAW and _SNDPLAYFILE
2017-08-11 21:19:52 +10:00
Luke Ceddia
237f42799b
Fix initial positioning of sound
2017-08-10 22:06:20 +10:00
Luke Ceddia
2089a95b8b
Separate left/right audio channels for stereo audio files.
...
No _SNDRAW or PLAY yet. Also removed need for sound capability strings.
2017-08-10 22:05:16 +10:00
Luke Ceddia
79ffcc50b3
Cosmetic changes to audio source files
2017-08-06 15:06:26 +10:00
SteveMcNeill
78d4b607bd
Minor change to mem structure
...
Change to mem.TYPE from LONG variable type to OFFSET. This prevents
4-bytes padding from throwing off values for mem.ELEMENTSIZE and
mem.IMAGE on 64-bit systems.
Patch should work on Mac, Linux, and Windows; both 32-bit and 64-bit
versions, giving the correct results for mem.ELEMENTSIZE and mem.IMAGE
from now on.
2017-08-02 01:00:01 -04:00
SteveMcNeill
b75eed2784
Patch to Windows LOADFONT
...
Fix to bug in Loadfont when using the Windows default font folder,
without specifying a drect route to a font.
2017-07-21 11:20:07 -04:00
Luke Ceddia
b51f6e4117
Fix comparisons involving empty strings and inequalities.
2016-11-09 16:22:07 +11:00
Luke Ceddia
9f7a7a9e79
Tweak image loading code to handle more image types
2016-10-10 23:07:31 +11:00
Luke Ceddia
0f82a86131
Add signal handler to catch SIGFPE (division by 0) on linux.
2016-10-10 20:42:36 +11:00
FellippeHeitor
713d27fae6
Fix makeline in setup_win.bat.
...
Previous iterations built qb64.exe without proper access to terminal.
2016-09-06 11:17:12 -03:00
Luke Ceddia
01d207ec7f
Reintroduce _MOUSEMOVE (with great power comes great responsibility)
2016-08-23 21:52:57 +10:00
FellippeHeitor
435861fa49
Change sub__icon to load the proper embedded icon according to size.
...
Title bar icons are 16x16; 32x32 version is loaded as default.
2016-08-18 23:06:48 -03:00
FellippeHeitor
441bc134cf
Tweaks to $EXEICON implementation (libqb)
2016-08-18 07:28:56 -03:00
FellippeHeitor
127c4acd88
Add $EXEICON, which allows to embed an icon in the exe (Windows only).
...
Also:
- Revamp _ICON so it'll use the embed icon if it's called without parameters. The default QB64 icon is still used otherwise.
- Fix "Creating .EXE..." being printed in the wrong coordinates (IDE)
- Fix the new error message (when Debug is <> 0) so it'll show properly when compiling with -x.
2016-08-18 01:12:08 -03:00
Luke Ceddia
a6ad741acf
Fix scroll wheel on Linux (again).
2016-08-13 00:16:56 +10:00
Luke Ceddia
2f21ad352c
Stop qbr() doing range checking, which is more inline with the rest of QB64.
2016-08-08 09:45:28 +10:00
Luke Ceddia
84e542ef32
Fix evaluation of some boolean conditionals
...
Commit 7855219
introduced a regression which caused some IF
statements involving boolean operators and strings to
give a C++ compilation error.
2016-08-03 17:18:20 +10:00
Luke Ceddia
785521966e
Add floating-point version of qbs_cleanup().
...
This fixes scenarios like IF VAL("0.9") THEN
2016-07-30 00:17:44 +10:00
FellippeHeitor
766ded514b
Ground changes to allow reporting $INCLUDE file name in error messages.
...
- Add optional parameter to evnt().
- fix_error() rewrite by flukiluke, in order to allow longer error messages.
2016-07-08 22:42:04 -03:00
FellippeHeitor
fca4a96ef3
Remove unnecessary optional parameter in fix_error().
...
Also:
- "Unhandled error" message now only shows included line number when it's > 0.
- qb64.bas adds include line number to every evnt() call.
2016-03-23 08:29:32 -03:00
FellippeHeitor
e891ce0891
Extended error reporting, pointing to included lines.
...
The "Unhandled error" message will now display "Line: #### (included line: ####)" with the line number in the included file that generated the error. 0 will be reported if the error wasn't in an included line.
Also:
- Add function _INCLERRORLINE, which returns a value greater than zero when _ERRORLINE points to an $INCLUDEd file.
2016-03-23 07:45:51 -03:00
Galleondragon
9b17aa8bca
Added accidentally removed line #include <fcntl.h>
2016-03-20 23:23:50 +11:00
Galleondragon
0ea631d375
Implements the _DIR$("desktop") function which returns OS specific paths.
...
Implements changes to allow programs to run on ARMBI-v7 Android devices which also provides a massive performance boost to but runtime and startup time.
Implements changes to allow programs to run on x86-based Android devices.
Fix to ensure variables allocated in the "stack" are aligned on appropriate boundaries which would have otherwise crashed on Android.
Fix to _DEVICES to ensure variables are aligned on appropriate boundaries which would have otherwise crashed on Android (includes some refactoring).
Added permissions to allow reading from/writing to external storage. Use the _DIR$(...) function to help locate appropriate paths.
2016-03-20 18:56:10 +11:00
SteveMcNeill
d9aa69afb9
Change to INPUT routine so when reading a byte at a time, we'll find proper EOF markers.
...
A fix to the issue described here:
http://www.qb64.net/forum/index.php?topic=13195.msg113782#msg113782
2016-03-04 23:06:22 -05:00
FellippeHeitor
e26f63f8c1
Fix to PNG import CRC-check returning False failure results sometimes.
...
Fix by Steve McNeill.
2016-03-04 00:17:02 -03:00
Luke Ceddia
10ce118bec
Extra cast to satisfy compiler on OSX.
2016-02-10 00:26:33 +11:00
Luke Ceddia
46e8ce414b
Fix conditional compilation statements in libqb.
2016-02-04 13:58:53 +11:00
Luke Ceddia
ff27678f98
Merge branch 'linux_tcpip'
2016-02-03 16:27:58 +11:00
Luke Ceddia
992a74c7ee
Implemented a better _CONNECTED
...
It is no longer confused by buffered data. However, it no longer makes
an explicit call to send()/recv(), so one of those must first fail to
signal the disconnection. This allows _CONNECTED to be used to check
if a GET/PUT succeeded (on the local end, anyway).
2016-02-03 15:42:57 +11:00
Luke Ceddia
264ad29f22
Make tcp_out try harder to send data.
...
The function now interprets the return value from send() and recalls if
needed to transmit all data.
2016-01-30 19:10:14 +11:00
Luke Ceddia
976f757c2f
Fix memory leak in _PRINTSTRING
...
FontRenderTextUTF32 now frees the 'render' array, which is allocated for multi-character strings.
2016-01-28 13:58:08 +11:00
Luke Ceddia
6d49cff3ee
Add preliminary support for tcp/ip on Linux
...
_OPEN{CONNECTION, HOST, CLIENT}, _CONNECTIONADDRESS$ now do something, as the underlying tcp routines
are implemented (with the exception of tcp_connected and thus _CONNECTED).
2016-01-26 23:11:05 +11:00
Luke Ceddia
b0edf45d47
Fix _EXIT race condition that prevents exit; make _EXIT work on Linux.
2016-01-21 00:37:27 +11:00
Luke Ceddia
9c17efacf5
Removed non-ASCII characters and many hard tabs from source files, making it easier to use other text editors (special characters were being mangled in some cases).
2015-12-30 21:28:13 +11:00
Luke Ceddia
9595dd37e6
Fixed the SHELL() function to return correct values on Linux (and presumably OSX).
2015-12-11 13:02:44 +11:00
Galleondragon
accdaf1ce0
Added support for Android & Virtual Keyboards
2015-10-30 23:18:44 +11:00
Luke Ceddia
3bfd7a799b
Fixed MessageBox implementation on Linux and presumably Mac to actually do something.
2015-08-18 18:55:08 +10:00
Luke Ceddia
8abc34c99e
Explicitly declare a large integer in qbr() routines to be unsigned, thus averting compiler warning.
2015-08-17 21:53:35 +10:00
Luke Ceddia
d4c0a4c5a1
Optimise func_val, especially for common usecases with small integers.
2015-08-16 23:10:22 +10:00
Luke Ceddia
ab99f5f837
Added overflow checks to the portable version of qb(), and corrected some missing negative signs in the other version.
...
Also patched func_val to behave properly when parsing integers > UINT64_MAX.
2015-08-16 01:59:46 +10:00
SteveMcNeill
f917da369a
Alteration to common.cpp to allow rounding to _UINT64_MAX limit
...
Floats previously only rounded to the upper limit of a signed integer64;
this alteration will now round them to the unsigned integer64 limit if
possible, or else toss an "OVERFLOW ERROR" if there's no way to squeeze
the float's value into an integer64.
2015-08-15 10:48:35 -04:00
Luke Ceddia
a25cb9a846
Temporaraily commented out Linux version of _SCREENICON function due to compile errors
2015-08-09 21:33:22 +10:00
SMcNeill
7fb1db97f6
Added function _SCREENICON to tell us if the window has been minimized to the taskbar (Iconified)
2015-08-08 12:50:45 -04:00
SMcNeill
f9bb83066b
Added "&B" support to VAL function.
...
Added extended math functionality into user mods. (COT, SEC, COT, and their deritives.)
Cleaned up old config setting from config.txt file.
2015-08-08 02:23:15 -04:00
Luke Ceddia
05d0b0a36b
Merge
2015-08-06 21:41:16 +10:00
Luke Ceddia
c003f0bc20
Fix scroll wheel on Linux; tidy up licensing info; clean up Windows setup; fix OSX script permissions.
...
The scroll wheel now behaves correctly on Linux. Reports suggest that the fix does not have any effect
on OSX though. The licensing documentation is updated to reflect the fact that there are no GPL components
included in a QB64 program. Some redundant code was removed from the Windows setup script. OSX setup and
run scripts were missing the executable bit - hopefully the repository will preserve that change.
2015-08-06 21:39:16 +10:00
SMcNeill
eb69e62827
Fix to custom font error-checking routine which used an invalid variable name and always failed.
...
Made use of _SCREENHIDE function so we don't update the IDE position when the screen is hidden.
2015-08-05 04:56:49 -04:00
Galleon
91e7ace500
(Automated push) Update internal/source/* from qb64.bas
2015-08-02 05:12:44 -07:00
SMcNeill
ea20dad4a9
Fix to PRINT text$; USING format$; values
...
Added _SCREENHIDE as a FUNCTION to return 0/-1 if the screen is hidden or not.
2015-08-01 22:41:48 -04:00
Luke Ceddia
f2bd84b5c5
Updated Ogg Vorbis decoder and fixed some .ogg files not playing at correct speed.
2015-07-26 22:06:52 +10:00
Luke Ceddia
beb3f089d8
Removed download archive of Opus tools and updated Opus licence.
...
This avoids having to distribute opusinfo, which had a GPL licence attached.
A link to the download and the Opus homepage remains in conversion/download.txt.
2015-07-19 15:59:10 +10:00
Luke Ceddia
cfc5c90b73
Removed some libresample/libsamplerate files that were still lingering
...
and corrected #define in speex for Linux.
2015-07-16 00:49:52 +10:00
Luke Ceddia
6f33160368
Add the User Additions module to the QB64 compiler build at setup time.
2015-07-15 19:38:35 +10:00
Luke Ceddia
d87657bde3
Replaced libsamplerate with resampler from Opus tools and deleted libresample (which was unused).
2015-07-14 22:14:20 +10:00
SMcNeill
bded17cf7a
Change to proper 120 value and not 255 for play default value. :P
2015-05-29 13:56:12 -04:00
SMcNeill
f5ebfac729
Change to PLAY to default T to 120 instead of error if < 32 or > 255 to match QB45 behavior.
2015-05-29 13:51:25 -04:00
Luke Ceddia
bc7fa3539e
Add support for COMMAND$(n) returning the nth command line parameter, 1 through
...
to _COMMANDCOUNT, with 0 being the name of the program. This revision will not
build, since internal/source/ has references to the old COMMAND$ call.
2015-05-23 12:28:45 +10:00
SMcNeill
859a046cfb
Fix to the previous fix (151) which quit fixing as soon as it was pushed into the repo. /SIGH
2015-05-04 09:13:32 -04:00
SMcNeill
70a5af095b
Fix to OPEN bug which was introduced with "SCRN:" support with false flags being set for screen output.
2015-05-04 02:53:27 -04:00
Luke Ceddia
338a995f61
Improved support for OPEN "SCRN:".
...
Appropriate errors are raised for attempting to open FOR INPUT,
or calling various file-related functions on the handle (as per QB45).
2015-04-20 17:01:24 +10:00
SMcNeill
4e742a9c32
Support added for "SCRN:" as a file output method to the display. Fix to color bug when resizing the IDE.
2015-04-16 04:26:35 -04:00
Galleon
eab00d12e9
Fix for making starting directory exe's path in OSX
2015-03-26 04:37:39 -07:00
Galleon
784ca1f2de
Correction for launching in executable's folder for Linux & OSX
2015-03-25 04:56:16 -07:00
Galleon
56228a8c23
Make function _CWD$ part of QB64's core
...
Implemented _STARTDIR$ function
2015-03-25 03:14:53 -07:00
Galleon
57f6ee159a
Forward references for MacOSX Yosemite audio out compatibility
2015-03-22 01:16:50 -07:00
Galleon
5d41e5ec7b
Major patch for OSX support
...
Fixes gamepad support dependency / thread of call
Allows libqb.cpp to use Objective C++
Fixes tracking/handling of SHIFT, ALT, CTRL & CAPS LOCK
Fixes serious bug in internal getticks() which caused _LIMIT, _DELAY, SLEEP, TIMER, etc to malfunction and IDE to be unusably slow
2015-03-12 02:06:48 -07:00
Galleon
b52cb62c79
MacOSX fixes
2015-03-07 06:31:54 -08:00
Galleon
f5285a1a61
(Automated push) Update internal/source/* from qb64.bas
2015-02-20 05:15:27 -08:00