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

195 commits

Author SHA1 Message Date
Kobolticus
f3eba1aee2
Added Functions for _SHR\_SHL 2018-10-29 23:01:04 -04:00
Kobolticus
8202f98e10
Added _SHR\_SHL declarations 2018-10-29 22:56:06 -04:00
SteveMcNeill
e2c250a42f Change to _WINDOWSHANDLE to return 64-bit offsets 2018-10-29 08:09:30 -04:00
SteveMcNeill
505556a1c7 Change for 64-bit compatability
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.
2018-10-17 17:14:19 -04:00
SteveMcNeill
6844913b8e Fix to fix
Forgot to add the goto label...  /blush
2018-10-17 14:09:42 -04:00
SteveMcNeill
9b0ff95b0d Fix to _PRINTSTRING
bug fix so that printstring will work correctly when the optional
imagehandle is used.  _PRINTSTRING (x,y), text$, optional_imagehandle
2018-10-17 14:03:44 -04:00
FellippeHeitor
53d3341ec3 Undoes commit d9b3d7ed69
Fixes #68
2018-09-30 10:42:30 -03:00
FellippeHeitor
ed4d91714a Merge branch 'development' of https://github.com/Galleondragon/qb64 into development 2018-09-24 02:49:48 -03:00
FellippeHeitor
2d760b9f29 Switches to www.qb64.org for user's own IP retrieval. 2018-09-23 23:02:47 -03:00
Fellippe Heitor
d9b3d7ed69
Fixes sound issue in Linux 64bit distros 2018-09-23 02:50:31 -03:00
FellippeHeitor
9ff026bd5d Prevents hanging when $EXEICON is used with $CONSOLE:ONLY. Fixes #59. 2018-08-05 20:21:10 -03:00
FellippeHeitor
1437dd98c8 Uses GetSystemMetrics to return _DESKTOPWIDTH/HEIGHT in $CONSOLE:ONLY mode.
Windows-only.

Partially addresses and closes #58
2018-08-01 22:38:21 -03: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
9a1b8450aa Enables the IDE to accept files via drag/drop (Windows-only). 2018-07-31 21:59:31 -03:00
FellippeHeitor
60d6aa7d27 Fixes missing #ifdef for sub__finishdrop(); 2018-07-31 10:30: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
RhoSigma-QB64
001d461b47
Add files via upload 2018-07-28 18:32:56 +02:00
FellippeHeitor
4ad9738b4d Makes qbs__trim a tad less thoughtful memory-wise. Addresses #56. 2018-07-27 11:09:23 -03:00
FellippeHeitor
cdfa7e9cb9 Makes qbs__trim a tad more thoughtful memory-wise. 2018-07-18 00:27:11 -03:00
FellippeHeitor
ed28f453f0 Adds _TRIM$ (both left and right TRIM). 2018-07-17 02:35:17 -03:00
FellippeHeitor
37986c978b Removes unused variables from func__instrrev(). 2018-07-16 11:35:53 -03:00
FellippeHeitor
7f0b086b63 Optimizes _INSTRREV - makes it use existing INSTR for searching backwards. 2018-07-16 11:20:47 -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
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
12df99c8da Indentation work. No actual code changes. 2018-06-30 14:23:33 -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
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