1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 11:11:20 +00:00
Commit graph

45 commits

Author SHA1 Message Date
FellippeHeitor bd54eb0f39 Attempts at implementing _MEMSOUND 2020-12-31 01:40:54 -03:00
FellippeHeitor 3e474f2f0b Fixes SUB calls like SHELL _HIDE command$ for $NOPREFIX use. Also:
- Fixes incorrect resolution of _BIT in variable declarations.
2020-01-06 04:46:29 -03:00
FellippeHeitor 2ebaeab3c6 Initial implementation of $NOPREFIX
Allows QB64-specific keywords to be called without the leading underscore.

Per user and per project; affects nothing globally.

Allows prefixed keywords to be used even when it's set.
2020-01-04 16:13:13 -03:00
FellippeHeitor 7c9eafbadb Replaces _TOGGLE_(KEY)LOCK with _(KEY)LOCK ON/OFF/_TOGGLE. Also:
- Changes CFont to sub__consolefont and func_CInp to func_cinp, in alignment with the rest of libqb/qbx.
- Adds stubs to all new console functionality, so we can still ship for other OSes with no bigger issues.
- Adds new keywords to syntax highlighter.
2020-01-02 19:55:58 -03:00
FellippeHeitor d7f77cd2af Removes inexistent sub/function declarations. 2020-01-02 19:49:29 -03:00
FellippeHeitor 49f265f1c2 Adds $ASSERTS, $ASSERTS:CONSOLE and _ASSERT condition[, message$] 2020-01-01 18:20:30 -03:00
QB64Cobalt 68831584b8
Update subs_functions.bas 2019-12-05 07:10:31 -08:00
QB64Cobalt 036385e20a
Update subs_functions.bas 2019-11-16 16:21:51 -08:00
SteveMcNeill eba05938bb Pushed changes to enhance the Windows Console Experience
Window's CONSOLE support has been extended so that:

CSRLIN support added.
POS(0) support added.
LOCATE support added. (Works with optional parameters.)
COLOR support added.
SCREEN support added to get both character and color information of any point on the console.
tab() glitch fixed. (Which could cause an endless loop when printing with comma spaced text/numbers.)
_WIDTH support added.
_HEIGHT support added.
WIDTH support added, with 2 new parameters added so we can set the buffer width and buffer height also.
CLS support semi-added.  (Doesn't accept colored backgrounds; it clears the screen black.  I'm getting tired of working up console stuff which I probably won't ever use myself...)
SLEEP support added.
END support added so we now end with any keypress and not just enter.

_CONSOLEINPUT added, so we can tell the difference in mouse and keyboard input.
_CINP(toggle) support added, which allows us to get single character keystrokes from the console.
_CONSOLEFONT FontName, FontSize support added, which allows us to change the font and font size we use for the console.
_CONSOLECURSOR _SHOW|_HIDE, cursorsize support added, which allows us to show or hide the cursor in the console, and to change its size (from 0 to 100), as desired.

New keyboard commands added:

_CAPSLOCK -- returns 1 if caps lock is on, 0 if it isn't.
_NUMLOCK -- as above, but for num lock
_SCROLLOCK -- as above, but for scroll lock

_TOGGLE_CAPSLOCK -- toggles the caps lock state for us.
_TOGGLE_NUMLOCK -- same, but for num lock
_TOGGLE_SCROLLOCK -- same, but for scroll lock
2019-08-27 19:52:02 -04:00
SteveMcNeill 449bdecacd Adding ZLIB into the QB64 parts system for windows.
Two new keywords added:
FUNCTION _INFLATE$ (text$)
FUNCTION _DEFLATE$ (text$)

Use of these commands can compress and decompress strings using the ZLIB library.
2019-08-27 18:22:07 -04:00
FellippeHeitor 3918db63cc Removes dead Qloud references. 2019-04-14 14:42:49 -03:00
FellippeHeitor 369d522a98 Applies common naming convention and makes _SHL/_SHR functions inline. 2018-10-30 00:32:12 -03:00
Kobolticus 761c34a7f6
Added support for _SHR\_SHL functions 2018-10-29 22:53:36 -04:00
SteveMcNeill e2c250a42f Change to _WINDOWSHANDLE to return 64-bit offsets 2018-10-29 08:09:30 -04:00
FellippeHeitor 5e0ff36205 Adds _ACCEPTFILEDROP as a function to return true (-1) if active/enabled.
Returns 0 otherwise.
2018-07-31 22:23:34 -03:00
FellippeHeitor 975408e2ef _DROPPEDFILE$ now takes an optional index parameter.
- 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.
2018-07-31 10:24:52 -03:00
FellippeHeitor c83b15eb95 Implements Drag/Drop of files onto a program's window (Windows-only).
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.
2018-07-31 00:23:36 -03:00
FellippeHeitor ed28f453f0 Adds _TRIM$ (both left and right TRIM). 2018-07-17 02:35:17 -03:00
FellippeHeitor 024f27a5b5 Indentation work (.bas files). No actual code changes. 2018-07-17 00:01:23 -03:00
FellippeHeitor bc6b427a99 Implements _INSTRREV, to search for the last occurence of a substring.
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
2018-07-15 16:43:12 -03:00
Fellippe Heitor a846fdbc4d
OFF/_OFF allowed for _FULLSCREEN and _ALLOWFULLSCREEN (#50)
Closes #49
2018-07-13 18:03:00 -03:00
FellippeHeitor 19fda93caf Adds .overloaded and .minargs to idstruct.
Allows more functions to be overloaded in the future, like _RGB32.
2018-07-03 00:33:37 -03:00
FellippeHeitor 6ee70f1afa Makes _RGB32 more flexible and powerful.
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).
2018-07-01 21:46:08 -03:00
FellippeHeitor 4264666130 Adds _SMOOTH function to return current fullscreen antialiasing setting.
Returns true (-1) if enabled.
2018-06-30 17:09:29 -03:00
FellippeHeitor d911e3d01e Implements _ALLOWFULLSCREEN to set how ALT+ENTER behaves. Closes #22.
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.
2018-06-29 11:30:14 -03:00
FellippeHeitor 688e31c0f3 Introduces _ECHO, which will output a string to the console.
_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
2018-06-27 23:51:09 -03:00
Ashish Kushwaha 4624cb942d
Fixed a typo in opengl_methods.bas 2018-05-22 19:36:49 +05:30
FellippeHeitor 89f2e12cc8 Remove references to DEPENDENCY_USER_MODS from subs_functions.bas. 2017-09-27 22:04:40 -03:00
Luke Ceddia bdc3250b89 Resolved the issue of user mods not working for $console:only programs 2017-09-25 21:56:24 +10:00
SteveMcNeill 4f23fd9b7b Add function _AUTODISPLAY so user can get display/autodisplay staus 2017-09-24 18:41:00 -04: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
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 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
FellippeHeitor 2f217fce6b Function _BLINK returns -1 if blinking is enabled; 0 if disabled. 2017-08-16 00:40:37 -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 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
FellippeHeitor cf99f38bcf Add _CONTINUE, to jump to the end of FOR..NEXT/DO..LOOP/WHILE..WEND blocks. 2017-06-28 22:47:17 -03:00
FellippeHeitor 90923af3db Add _INCLERRORFILE$, which reports the included file that last errored.
Also:
Change qb64.bas to produce C code that reports INCLUDE file names.
2016-07-08 22:48:00 -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 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
Galleondragon accdaf1ce0 Added support for Android & Virtual Keyboards 2015-10-30 23:18:44 +11: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
Galleon 91e7ace500 (Automated push) Update internal/source/* from qb64.bas 2015-08-02 05:12:44 -07:00