- Windows: cursor returns to top-left of console screen buffer
- Non-Windows: isatty(stdout) check to prevent CLS from working when
stdout is redirected
_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.aspCloses#51
Existing syntax:
colour~& = _RGB32(red, green, blue)
New possible uses:
- Instead of passing identical rgb values to achieve a shade of gray, pass only 1 parameter for all color components:
colour~& = _RGB32(51) 'same as _RGB32(51, 51, 51)
- _RGB32 can now take an optional alpha parameter, which makes _RGBA32 obsolete (although it still exists for retrocompatibility):
colour~& = _RGB32(255, 0, 255, 30) 'same as _RGBA32(255, 0, 255, 30)
- If you want a shade of gray and also to specify the alpha level, you can pass just two parameters:
colour~& = _RGB32(51, 30) 'same as _RGBA32(51, 51, 51, 30)
In summary:
- 1 parameter = red, green and blue simultaneously set.
- 2 parameters = red, green and blue simultaneously set plus alpha level.
- 3 parameters = red, green and blue as usual.
- 4 parameters = red, green and blue plus alpha level (same as _RGBA32).
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.
- 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();
- 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&
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.
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).
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.
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.
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.
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