Author Topic: Follow the development of QB64  (Read 1024 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline odin

  • Administrator
  • I am.
Follow the development of QB64
« on: June 29, 2018, 01:49:52 PM »
Hi everyone,

The latest stable release of QB64 is version 1.2. It was built from the master branch of the repository and is the version you can fetch from www.qb64.org (qb64.net is a bit behind even on the stable release).

We also have a development branch being worked on and you can always help us beta test it by downloading the Development release at www.qb64.org. The version currently available will eventually become the next stable release, and as the homepage says, "If you're adventurous, we encourage you to help us find bugs!"

To follow what's being done, check the commit history in the development branch at https://github.com/Galleondragon/qb64/commits/development

QB64 is a collaborative effort based on the amazing and extensive work Galleon did by creating QB64 and developing it up to version 1.000.

We truly hope you enjoy using it as much as we enjoy working on it.

The team.

Offline odin

  • Administrator
  • I am.
Re: Follow the development of QB64
« Reply #1 on: June 29, 2018, 01:58:15 PM »
To request a feature or report a bug, use this forum board or, ideally, add a new issue at https://github.com/Galleondragon/qb64/issues.

By following the link above you will see the list of currently open issues and you can also see the list of closed issues, so you can know what has already been tackled by the team recently.

Re: Follow the development of QB64
« Reply #2 on: June 29, 2018, 04:35:00 PM »
Hi Odin. _SNDRAW play not correctly left / right channel. Is not possible set volume to zero for L/R, it something do, but plays both channels always. See attached program. SNDRAW outputs are on lines 638 and 286. You can try also WAV format 8/16 mono/stereo, 11050 to 44100 Hz. Use the bars below the channel volume pointer. Because is not possible send it correctly here, isen it to thread "SNDRAW Player" in Program section.

« Last Edit: June 29, 2018, 04:36:30 PM by Petr »
Coding is relax (At least sometimes)

Online Pete

  • Cuz I sez so, varmint!
Re: Follow the development of QB64
« Reply #3 on: June 30, 2018, 03:33:58 PM »
Nice swap of RUN DETACHED now just needing just an F5 press. I've refrained from making those types of suggestions as it is somewhat picky when other work is being done or requested. Still, it's a really nice change and thanks for making it. I always run QB64 detached and never quite figured out why Rob made the default as attached.

Pete :)


Marked as best answer by odin on August 12, 2018, 08:41:47 AM

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #4 on: July 31, 2018, 01:08:07 AM »
If you've decided to help beta test the next release of QB64 (likely to be numbered 1.3), here's a list of what to look for so you can help us test the new features and eventually find bugs.

Note: some things got fixed, some of the reported issues are still pending and some new features have been added.

Improvements:
    - Adds Ctrl+Shift+G shortcut to jump to line with error (try the shortcut when your program has an error and the IDE is indicating it on the status area)
    - New Ctrl+T to toggle comments on the current line or selection (also available via Edit menu and by right-clicking the code)
    - Updates NanoJPEG to the version 1.3.5 (try loading different jpg files to see if all works well)
    - Makes F5 run detached by default. (you no longer get an unresponsive IDE while your program is running; equivalent to Ctrl+F5 in older versions).
    - Disables maximize box when $RESIZE isn't enabled. (Windows only -> remember when a non-resizable window would still show Maximize and when you clicked it the window would just move to the top-left corner? That won't happen anymore).
    - Quick Navigation (back arrow) can now be disabled in the Search menu.

Fixes:
    - Tab in included files won't generate an error anymore.
    - A bug that would cause an include line to be duplicated when resizing the IDE was fixed.

New statements and functions:
    - _ECHO: Previously, you could have a $CONSOLE window enabled but to alternate printing to the main program and to the console you'd have to switch _DEST to _CONSOLE, print the text then switch _DEST back to the main program. With the _ECHO command a $CONSOLE-enabled program can output text to the console window without the hassle.

    - _ALLOWFULLSCREEN: the statement allows you to set the behavior of the ALT+ENTER combo. You can allow only certain modes or disable the combo altogether.

    - _SMOOTH: returns true (-1) if the current _FULLSCREEN mode has antialiasing enabled or false (0) if disabled.

    - _RGB32: of course this is not a new function but it has been improved greatly. You no longer need to alternate between _RGB32 and _RGBA32 as it now accepts an optional fourth parameter for alpha. Also: You can create a grayscale color without having to repeat parameters. More details at https://github.com/Galleondragon/qb64/commit/6ee70f1afa3d9dd8ded201743c15711d7b79a1eb

    - _INSTRREV: like INSTR, _INSTRREV allows you to search for a substring inside another string, but unlike INSTR it returns the last occurrence instead of the first one.

    - _TRIM$: Single function to remove trailing and leading spaces from a string. Macro for RTRIM$(LTRIM$(text$)).

    - Drag/Drop support (Windows-only): new statements _ACCEPTFILEDROP, _TOTALDROPPEDFILES and _DROPPEDFILE$ allow your program to accept and handle files dropped from a folder at run-time.



The list above contains what's new up to development build 06bc7c6 available today, which you can get from www.qb64.org. Notice that the Help->About dialog will still report an older build number (that will only be updated once development becomes stable), so what really matters is that Help->About shows you From git 06bc7c6.
« Last Edit: Today at 12:48:30 PM by FellippeHeitor »

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #5 on: July 31, 2018, 01:39:44 AM »
_ECHO sample usage:
Code: [Select]
$CONSOLE
PRINT "This will be seen in the main program's window"
_ECHO "This will be output to the console"

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #6 on: July 31, 2018, 01:41:52 AM »
_ALLOWFULLSCREEN usage (BTW, _FULLSCREEN now accepts OFF without the underscore):

Code: [Select]
'_ALLOWFULLSCREEN only affects the behavior of ALT+ENTER.
'
'Existing _FULLSCREEN statement is not bound by _ALLOWFULLSCREEN's settings.

'default mode:
fsMode$ = "_ALLOWFULLSCREEN not used (or _ALLOWFULLSCREEN _ALL, _ALL or without arguments)"
fsDesc$ = "both stretched and 1:1 modes allowed; both normal and antialised modes allowed."

DO
    CLS

    LOCATE 7
    COLOR 14: PRINT "_ALLOWFULLSCREEN statement demo": COLOR 7
    PRINT "    - Press 1-8 to change _ALLOWFULLSCREEN mode"
    PRINT "    - Press ALT+ENTER to test"
    PRINT
    COLOR 14: PRINT "Syntax:": COLOR 7
    PRINT "    _ALLOWFULLSCREEN [{_STRETCH|_SQUAREPIXELS|OFF|_ALL}][,{_SMOOTH|OFF|_ALL}]"


    k& = _KEYHIT

    IF k& >= 49 AND k& <= 56 THEN
        _FULLSCREEN OFF
        altEnter = 0
        SELECT CASE CHR$(k&)
            CASE "1"
                fsMode$ = "_ALLOWFULLSCREEN OFF"
                fsDesc$ = "full screen mode disabled; alt+enter can be manually trapped."
                _ALLOWFULLSCREEN OFF
            CASE "2"
                fsMode$ = "_ALLOWFULLSCREEN _STRETCH, _ALL"
                fsDesc$ = "stretch mode allowed only; normal+antialiased modes allowed"
                _ALLOWFULLSCREEN _STRETCH , _ALL
            CASE "3"
                fsMode$ = "_ALLOWFULLSCREEN _SQUAREPIXELS, _ALL"
                fsDesc$ = "1:1 mode allowed only; normal+antialiased modes allowed"
                _ALLOWFULLSCREEN _SQUAREPIXELS , _ALL
            CASE "4"
                fsMode$ = "_ALLOWFULLSCREEN _STRETCH, OFF"
                fsDesc$ = "stretch mode allowed only; normal mode allowed only"
                _ALLOWFULLSCREEN _STRETCH , OFF
            CASE "5"
                fsMode$ = "_ALLOWFULLSCREEN _SQUAREPIXELS, OFF"
                fsDesc$ = "1:1 mode allowed only; normal mode allowed only"
                _ALLOWFULLSCREEN _SQUAREPIXELS , OFF
            CASE "6"
                fsMode$ = "_ALLOWFULLSCREEN _STRETCH, _SMOOTH"
                fsDesc$ = "stretch mode allowed only; antialiased mode allowed only"
                _ALLOWFULLSCREEN _STRETCH , _SMOOTH
            CASE "7"
                fsMode$ = "_ALLOWFULLSCREEN _SQUAREPIXELS, _SMOOTH"
                fsDesc$ = "1:1 mode allowed only; antialiased mode allowed only"
                _ALLOWFULLSCREEN _SQUAREPIXELS , _SMOOTH
            CASE "8"
                fsMode$ = "_ALLOWFULLSCREEN not used (or _ALLOWFULLSCREEN _ALL, _ALL or without arguments)"
                fsDesc$ = "both stretched and 1:1 modes allowed; both normal and antialised modes allowed."
                _ALLOWFULLSCREEN _ALL , _ALL
        END SELECT
    ELSEIF k& = 13 THEN
        IF _KEYDOWN(100307) OR _KEYDOWN(100308) THEN
            altEnter = altEnter + 1
        END IF
    END IF

    LOCATE 14
    COLOR 14: PRINT "Current setting:": COLOR 7
    PRINT fsMode$
    COLOR 14: PRINT "Behavior:": COLOR 7
    PRINT fsDesc$

    IF altEnter THEN
        LOCATE 18
        PRINT "ALT+ENTER manually trapped"; altEnter; "times."
    END IF

    _DISPLAY
    _LIMIT 30
LOOP

Re: Follow the development of QB64
« Reply #7 on: July 31, 2018, 01:42:16 AM »
Are you guys certain that _RGB32 should have that optional 4th parameter for Alpha?  Seems to me that it's just asking for trouble since _RGB has a different, optional 4th parameter for image handle.

Honestly, I think _RGBA32 should work fine enough for most folks, without any possible issues for parameter confusion between such similar named commands.

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #8 on: July 31, 2018, 01:43:15 AM »
Details on the new _RGB32:

Existing syntax:
Code: [Select]
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:

Code: [Select]
    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):

Code: [Select]
    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:

Code: [Select]
    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).

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #9 on: July 31, 2018, 01:44:06 AM »
Are you guys certain that _RGB32 should have that optional 4th parameter for Alpha?  Seems to me that it's just asking for trouble since _RGB has a different, optional 4th parameter for image handle.

Honestly, I think _RGBA32 should work fine enough for most folks, without any possible issues for parameter confusion between such similar named commands.

All new features of _RGB32 are optional and it can continue to be used as always. _RGBA32 will also continue to exist.
« Last Edit: July 31, 2018, 01:46:59 AM by FellippeHeitor »

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #10 on: July 31, 2018, 01:44:48 AM »
_INSTRREV:
Code: [Select]
fullPath$ = "C:\Documents and Settings\Administrator\Desktop\qb64\internal\c\libqb\os\win\libqb_1_2_000000000000.o"
file$ = MID$(fullPath$, _INSTRREV(fullPath$, "\") + 1)
PRINT file$

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #11 on: July 31, 2018, 01:45:40 AM »
Drag/drop support demo (for Windows only):
Code: [Select]
SCREEN _NEWIMAGE(128, 25, 0)

_ACCEPTFILEDROP
PRINT "Drag files from a folder and drop them in this window..."

DO
    IF _TOTALDROPPEDFILES THEN
        FOR i = 1 TO _TOTALDROPPEDFILES
            a$ = _DROPPEDFILE$
            COLOR 15
            PRINT i,
            IF _FILEEXISTS(a$) THEN
                COLOR 2: PRINT "file",
            ELSE
                IF _DIREXISTS(a$) THEN
                    COLOR 3: PRINT "folder",
                ELSE
                    COLOR 4: PRINT "not found", 'highly unlikely, but who knows?
                END IF
            END IF
            COLOR 15
            PRINT a$
        NEXT
    END IF

    _LIMIT 30
LOOP
« Last Edit: July 31, 2018, 01:48:28 AM by FellippeHeitor »

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #12 on: July 31, 2018, 10:48:30 AM »
Latest dev build:

- _DROPPEDFILE can now take an optional index parameter, which goes from 1 TO _TOTALDROPPEDFILES and allows you to read the dropped files list in any order.
- When reading _DROPPEDFILE using an index, instead of sequentially, _TOTALDROPPEDFILES won't get reset until a new drag/drop occurs or until _FINISHDROP is called.

Code: [Select]
SCREEN _NEWIMAGE(128, 25, 0)

_ACCEPTFILEDROP ON

DO
    PRINT "Drag files from a folder and drop them in this window..."

    DO UNTIL _TOTALDROPPEDFILES > 0: _LIMIT 30: LOOP

    PRINT _TOTALDROPPEDFILES; " files/folders dropped;"

    FOR i = 1 TO _TOTALDROPPEDFILES
        a$ = _DROPPEDFILE(i)
        COLOR 15
        IF _FILEEXISTS(a$) THEN
            COLOR 2: PRINT "file",
        ELSE
            IF _DIREXISTS(a$) THEN
                COLOR 3: PRINT "folder",
            ELSE
                COLOR 4: PRINT "not found", 'highly unlikely, but who knows?
            END IF
        END IF
        COLOR 15
        PRINT a$
    NEXT
    _FINISHDROP

    _LIMIT 30
LOOP
« Last Edit: August 01, 2018, 10:51:19 PM by odin »

Offline RhoSigma

  • Out of Time !!
Re: Follow the development of QB64
« Reply #13 on: August 01, 2018, 05:11:28 AM »
The _DROPPEDFILE keyword works syntax error free with and without "$" sign for both, indexed (array) usage and sequencial usage. Is that by intention? Shouldn't it not require the "$" sign as it is mandatory for eg. the COMMAND$ keyword with and without its indexed usage?

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Follow the development of QB64
« Reply #14 on: August 01, 2018, 08:00:15 AM »
It accepts the $ sygil in alignment with _CONNECTIONADDRESS, which also works both with and without it. It makes sense in that it returns a string, so it's kind of instinctive for BASIC users like us, but it also works without it cause it belongs to QB64-exclusive keywords.

COMMAND$, on the other hand, although the indexed syntax is not inherited from QuickBASIC, is historically mandatorily followed by $, which is why it only works with it.
« Last Edit: August 01, 2018, 08:37:03 AM by FellippeHeitor »