_lrotl is defined elsewhere in the graphics routines. By using a custom
QB64 version, it tosses definition errors with newer compiler versions.
Easiest fix: Remove the custom _lrotl since it's only used a total of 3
times (all in the LINE routine), and do themath without the function
naturally.
Requesting state for an invalid GLUT state name returns negative one...
So, we start with a -1 and wait until GLUT has initialized our window
and registered it with the OS all properly, and then use the proper
return value to move the window to the middle of the screen.
change so that the windowhandle will return a 64-bit value for QB64x64
versions, while returning a 32-bit value for QB64. This allows for
upgrade to 64-bit to be as simple as just swapping compilers and then
rebuilding QB64 with the setup script.
- Allows using _DROPPEDFILE as an array ranging from 1 TO _TOTALDROPPEDFILES.
- Using _DROPPEDFILE as an array doesn't reset _TOTALDROPPEDFILES (unlike when reading _DROPPEDFILE$ sequentially with no parameter), so it's necessary to call _FINISHDROP after working with the list of dropped files so it'll be reset.
New statement:
_ACCEPTFILEDROP [{ON|OFF}]
Enables a program to accept files being dropped from a folder.
New functions:
_TOTALDROPPEDFILES
Returns the number of files that have been received via drag/drop.
_DROPPEDFILE$
Returns the list of files that have been dropped. The function sequentially returns the file list and decreases _TOTALDROPPEDFILES with every read.
The statement works as INSTR does but starts from the end of the passed string (or from the specified position) and looks for the passed substring while moving backards.
Takes after VBScript's InStrRev: https://www.w3schools.com/asp/func_instrrev.asp
Closes #51
Syntax:
_ALLOWFULLSCREEN [{_STRETCH|_SQUAREPIXELS|_OFF|_ALL}][,{_SMOOTH|_OFF|_ALL}]
Existing _FULLSCREEN statement is not bound by _ALLOWFULLSCREEN's settings, only the ALT+ENTER key combo.
_ECHO is more of a macro than a new statement, as it'll perform the following actions:
1- Save current _DEST;
2- Switch to _CONSOLE;
3- Print the passed string (only strings accepted);
4- Switch back to previous _DEST.
None of the PRINT features such as USING, numeric variables, retaining the cursor are implemented/planned for this statement.
Closes #29
- _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.
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.
- 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&
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.
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.
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.
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).
_OPEN{CONNECTION, HOST, CLIENT}, _CONNECTIONADDRESS$ now do something, as the underlying tcp routines
are implemented (with the exception of tcp_connected and thus _CONNECTED).
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.
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