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

1431 commits

Author SHA1 Message Date
Roland Heyder
b10a055d28 Finetuned handle checks
- better check if _EMBEDDED$ appears inside a string or after a REM or apostrophe
- make sure REM is a valid command and not just part of a variable name
- better enforcement for 'handle' being a single literal string, i.e. not allowing stuff before or after
2023-12-16 16:38:09 +01:00
Roland Heyder
84c9761d51 Fixed include path separators 2023-12-15 19:01:40 +01:00
Samuel Gomes
5d037775af Add support for _FILES$() 2023-12-15 20:54:11 +05:30
Roland Heyder
45ffc8c9e6 Minor flow changes
- As suggested by @mkilgore , moved the embed list array reset out of the $EMBED block
- Imposed a 20% least ratio for compression
- Moved the handle comparison into `func__embedded()` to avoid some unnecessary function calls
2023-12-15 00:22:28 +01:00
Roland Heyder
1358716115 Fixing tests
forget AddQuotes$(), rather make file.bas self-contained using CHR$(34)
2023-12-13 22:11:14 +01:00
Roland Heyder
38eed18fc4 Implement file embedding
$EMBED:'filename','handle' and _EMBEDDED$("handle")
2023-12-13 20:49:53 +01:00
SteveMcNeill
79d48113f2 IDE Module Error Fix
When loading a font, and that  font wasn't found, we were tossing an IDE Module Error at the users.  This corrects that glitch and even pops up a notification letting them know that the font wasn't found, before reverting back to the old font handle.
2023-12-08 12:48:47 -05:00
SteveMcNeill
442f620dbe Chance IDE save method as discussed on Discord
String manipulation has too much overhead for larger files to write all at once.   The best write speeds, from multiple testing experiments in various conditions, come from simply using PUT to place the data line by line to the drive.

This change reflects that method of file saving.
2023-11-28 16:04:05 -05:00
SteveMcNeill
f5800fe9a7 Move IF outside of loop for efficiency 2023-11-07 16:32:02 -05:00
SteveMcNeill
0ec0dd62f3 Update QB64PE for faster file saving
As per the discussion here: https://qb64phoenix.com/forum/showthread.php?tid=2144
2023-11-07 14:36:34 -05:00
SteveMcNeill
1be3e366ac Final fixes to math stuff (I hope)
Fix to CONST with the math evaluator to toss a message and error with values out of acceptable range for ARCSEC and ARCCSC.

Tweak to _PI to add constexpr for speedier execution.

Fix to the math tests for the new (and unbuggy) values for ARCSEC and ARCCSC.
2023-10-31 11:32:22 -04:00
SteveMcNeill
45bf68fad4 Error Report before REDIM, not after 2023-10-30 10:51:14 -04:00
SteveMcNeill
d7498d173c Increase Sub/Function Id Limit
As per #362, this raises the limit in increments from 1,000 to a maximum of 25,000 subs and functions for a single QB64PE program.  If that number is exceeded, the IDE will give an error message. reporting the issue for the user.
2023-10-30 00:43:20 -04:00
SteveMcNeill
61e0ef72ee swap types to proper order 2023-10-18 19:18:31 -04:00
SteveMcNeill
2a6cc27ee1 rework CLS specialformat so 2nd comma is required if using the 3rd param. 2023-10-18 09:19:54 -04:00
SteveMcNeill
9854955d99 Add Support for optional paramter for an image handle to CLS 2023-10-18 08:01:12 -04:00
Steve McNeill
4138f0a09c
Merge branch 'main' into main 2023-10-15 10:54:10 -04:00
Samuel Gomes
5efe08153f
Merge branch 'main' into versioninfo-enhancement 2023-10-15 19:03:30 +05:30
SteveMcNeill
f27a9129d0 Wait for key release before running
Issue #290
2023-10-15 08:26:16 -04:00
SteveMcNeill
669e20fdea Fix to IDE blowing up from last fix 2023-10-15 02:43:44 -04:00
Samuel Gomes
f03efa2468
Merge branch 'main' into versioninfo-enhancement 2023-10-15 11:39:02 +05:30
SteveMcNeill
1a7e9dd959 Fix to Mod and \ in CONST
As per the sample code below:

Const a = 5 Mod 2.8
Const b = 5 \ 2.8
Print a; "="; 5 Mod 2.8
Print b; "="; 5 \ 2.8

Old output was wrong.  Patch should make the CONST values the same as what QB64 normally generates for us.
2023-10-15 01:24:34 -04:00
SteveMcNeill
ca38a08ce7 Clean up previous patch 2023-10-15 00:04:32 -04:00
SteveMcNeill
3670825280 Patch to CONST
Should fix both of these issues:
https://github.com/QB64-Phoenix-Edition/QB64pe/issues/193
https://github.com/QB64-Phoenix-Edition/QB64pe/issues/224
2023-10-14 23:00:53 -04:00
Samuel Gomes
5db34487c9 Implement #20 with suggestions from #392 2023-10-14 07:07:11 +05:30
Samuel Gomes
db0a96bd6b Prefix remaining math functions to use std:: 2023-10-08 09:05:26 +05:30
Samuel Gomes
087f02bb73 Version 3.9.1 2023-10-08 06:12:30 +05:30
Samuel Gomes
bc8047563e Fix MENU ITEM [Run #Only (No EXE) NOT IMPLEMENTED! 2023-10-05 22:20:38 +05:30
Samuel Gomes
3d85819279 Version 3.9.0 2023-10-04 21:20:24 +05:30
Samuel Gomes
49aeccc486 Initial WoA64 and MingW-LLVM support 2023-10-01 08:08:58 +05:30
Samuel Gomes
87a99c3970 Make _MEMSOUND channel parameter optional 2023-09-22 19:14:30 +05:30
Samuel Gomes
dae6beba08 Few IDE menu cosmetic fixes 2023-09-22 10:28:39 +05:30
Samuel Gomes
28d1bf1aac Remove legacy audio code from the compiler 2023-09-22 10:10:04 +05:30
Roland Heyder
7cd648c143 Feature request
see https://qb64phoenix.com/forum/showthread.php?tid=2017&pid=19971#pid19971
2023-09-22 00:34:19 +02:00
Samuel Gomes
586371dc77 Implement _SAVEIMAGE 2023-09-17 11:52:54 +05:30
SteveMcNeill
73fd7264a5 Patch to CopyFile
Fix to blank file before writing so larger files don't corrupt data when overwritten by smaller ones.
2023-09-03 13:31:53 -04:00
Samuel Gomes
1a43246c65 Add additional case sensitive file filters for *nix 2023-08-24 22:07:13 +05:30
Samuel Gomes
1fc5792d57 Default_StartDir is now shared between SaveFile() & OpenFile() 2023-08-24 21:57:35 +05:30
Samuel Gomes
634bee63eb Fix save dialog filter 2023-08-23 00:51:00 +05:30
Samuel Gomes
3b44191330 Make SaveFile$ return "C" on cancel 2023-08-23 00:01:48 +05:30
SteveMcNeill
adf46cdf62 Add GUI option to #Save
Correct glitch on not canceling properly with GUI input.
2023-07-11 22:05:10 -04:00
SteveMcNeill
00921c6d84 Savefile GUI added to IDE
Added the ability to use the Save Dialogs in the IDE.
2023-07-11 10:49:58 -04:00
Samuel Gomes
bdc39f4e65 Fix DECLARE DYNAMIC LIBRARY to load shared libraries relative to source without using absolute paths 2023-06-27 11:21:28 +05:30
Roland Heyder
ed9a4f773d Version 3.8.0 2023-06-13 14:45:29 +02:00
Samuel Gomes
90d3be11d3 Merge branch 'audio-enhancements' of https://github.com/a740g/QB64pe into audio-enhancements 2023-06-10 02:35:28 +05:30
Samuel Gomes
40840a236f Fix SOUND specialformat 2023-06-10 02:35:27 +05:30
Samuel Gomes
4a70d88dee
Merge branch 'QB64-Phoenix-Edition:main' into audio-enhancements 2023-06-10 02:28:48 +05:30
Samuel Gomes
3f16e3c9d1 Add volume, panning & waveform support for SOUND 2023-06-10 02:24:05 +05:30
Roland Heyder
3393f899bb Some refactoring
- also fix meta command color in new forum export
2023-06-09 15:58:54 +02:00
Roland Heyder
8eda570604 Improves code export
- added ability to export as new [qb=export] Forum codebox
- Forum/Wiki exports now go to the clipboard and can directly be pasted into the Forum post or Wiki page
2023-06-09 10:37:03 +02:00
Samuel Gomes
381e5ab0e9
Merge branch 'main' into ucharpos-enhancement 2023-05-08 18:04:22 +05:30
Samuel Gomes
47c3cac56a
Merge branch 'QB64-Phoenix-Edition:main' into dialog-fixes 2023-05-08 02:00:22 +05:30
Samuel Gomes
514e41bdce Correct error message 2023-05-08 01:46:41 +05:30
Samuel Gomes
290081ddb6 Use LONG array instead of INTEGER 2023-05-08 01:11:01 +05:30
Samuel Gomes
60a448fb54 Add _UCHARPOS() to get individual char pixel position 2023-05-07 22:12:47 +05:30
Samuel Gomes
c6b8524739 Improve dialog functions using #305 & make string options case insensitive 2023-05-02 00:19:33 +05:30
RainRat
3914037c0f fix typos 2023-04-30 15:20:42 -07:00
Matthew Kilgore
35d9808377 Version 3.7.0 2023-04-29 21:02:49 -04:00
Samuel Gomes
9870510b04
Merge branch 'QB64-Phoenix-Edition:main' into font-FreeTypeAmalgam 2023-04-28 20:57:28 +05:30
Samuel Gomes
3dd439e625 Change function names 2023-04-26 22:36:24 +05:30
Samuel Gomes
2d650cf1fe Fix GetStringPixelWidth() 2023-04-26 21:37:36 +05:30
Samuel Gomes
c033c624ac Add support for _UPrint*() 2023-04-26 17:36:09 +05:30
Matthew Kilgore
075d5bf157 Fix $MidiSoundFont when compiling from command line 2023-04-25 09:48:08 -04:00
Matthew Kilgore
312e31ab0f Fix .h file resolution when compiling via command line
When compiling via the command line (NoIDEMode) the `idepath$` is blank
and `path.source$` contains the path to the source file.
2023-04-25 09:48:08 -04:00
Samuel Gomes
e4b36ca8ad Add font load-from-memory support 2023-04-20 09:23:13 +05:30
Roland Heyder
c2df60db6f Fix pre-compiler highlighting
- in pre-compiler lines, the regular keywords such as AND, OR, XOR and the final THEN are rendered with meta command color
2023-03-28 23:43:46 +02:00
Roland Heyder
84e51c20e2 Add link titles in HTML export
- titles are usually shown as tool tip in a browser
- almost useless, but made to be in line with Wiki behavior
2023-03-28 12:43:33 +02:00
Roland Heyder
a34907edef Export finetuning
- strip useless line feeds after last code line
- fix some wrong wiki links
2023-03-28 10:19:17 +02:00
Samuel Gomes
8a9b8a2f25 Update TSF and add SF3 support. Fix $MIDISOUNDFONT behavior 2023-03-26 11:38:03 +05:30
Samuel Gomes
2b6b04e36c Fix to look for header libs relative to the $INCLUDE file 2023-03-24 06:13:21 +05:30
Samuel Gomes
5bd3192491 Fix #124 2023-03-23 05:33:28 +05:30
Roland Heyder
da5f789fd3 Fix File menu
Fix a bad interaction between "Export As" and the recent files list.
2023-03-20 01:30:55 +01:00
Roland Heyder
9d9e063b67 Multiple IDE instance fix
When exporting "Untitled" code, then take current IDE instance into account.
2023-03-19 22:56:11 +01:00
Roland Heyder
7038e2527d Fix Wiki downloads (Update all pages)
Better detect deleted/new pages and prevent the problem discussed here: https://qb64phoenix.com/forum/showthread.php?tid=1521
2023-03-19 12:33:24 +01:00
Roland Heyder
c52d3bcd28 Add code export abilities
Use File menu > Export As... to export current code as HTML, Rich Text or Wiki example.
2023-03-19 12:27:54 +01:00
Matthew Kilgore
07822586e8 Version 3.6.0 2023-02-19 03:40:00 -05:00
Matthew Kilgore
fac5375ea6 Fix DECLARE LIBRARY against stripped .so file
.so files can be stripped such that they contain no "regular" symbol
table but do still contain the "dynamic" symbol table, this is pretty
typical for .so files. QB64-PE is supposed to check both tables when
linking against a .so file, but a bug in ab0c2b18 meant that the second
run of nm with the -D flag to check the dynamic symbol table no longer
happens. The fix is to introduce a new output file for the dynamic run
so that they are handled separately in terms of caching the result.

A new test .so file that only contains a dynamic symbol table was added
to avoid this in the future.

Fixes: #301
2023-02-19 02:10:51 -05:00
Matthew Kilgore
596a8d6092 Fix formatting 2023-02-18 14:50:31 -05:00
Matthew Kilgore
df70f7e708 The -o flag should not strip extensions except for .exe
Current the -o flag will strip any "extension" on the provided filename,
which is fairly problimatic on Linux and Mac OS since those executes do
not have other extensions and names like "foobar.v1" will get the ".v1"
stripped off. This can happen on Windows as well if you leave off the
.exe (QB64-PE will add it for you, but also strip off the existing
extension).

QB64-PE stripping off the ".exe" when provided that on Linux and Mac OS
might actually be useful behavior people are relying on (so that they
don't need to provide different names when compiling on Linux/Mac OS) so
we are preserving that and still removing the extension if it is exactly
"EXE", otherwise we now leave it in place.

Fixes: #297
2023-02-18 14:50:31 -05:00
Samuel Gomes
e1e6203db9
Merge branch 'QB64-Phoenix-Edition:main' into image-load-from-memory-support 2023-02-13 19:05:48 +05:30
Samuel Gomes
e79537e624
Merge branch 'main' into image-load-from-memory-support 2023-02-13 16:24:36 +05:30
Matthew Kilgore
e810229d11 Fix _RGB32() optional arguments
The new optional arguments for functions broke _RGB32() because it uses
some custom flags ('overloaded' and 'minargs' on the id Type) to control
its parameter passing. You are allowed passing any number from 1 to 4 args
to `func__rgb32` and there are 4 overloaded C++ functions that will get
picked from. This is different from how this typically would work, with
all 4 parameters always passed and an extra argument to specify the
parameters that were passed.

Rather than change `func__rgb32` I simply adjusted the optional argument
logic to account for the flags used by `_RGB32()` - if the `overloaded`
flag is set, then we don't need to add extra `NULL` parameters for any
parameter that wasn't specified in the argument list. Instead we simply
don't emit anything for those.
2023-02-13 00:25:51 -05:00
Matthew Kilgore
0836cf31eb Format source, apply Option _Explicit in tests 2023-02-12 22:38:50 -05:00
Matthew Kilgore
83533dc319 Add support for optional function arguments
Currently functions only have very limited optional argument support,
this expands it so that we can have more complex sets of optional
arguments for functions, such as multiple arguments where not all need
to be provided. This will be used in the future for some upcoming
functionality.

Note that this does not support any generic optional argument format,
the commas always have to be provided unless an optional argument is at
the end of the parameter list. Thus, if you have a format with two
optional arguments and you want to omit the second, then you need to call
it as 'foo(2, , 3)`, rather than `foo(2, 3)`. This is important for
avoiding ambiguous situations, and is how many SUBs currently function.

The two functions that violate that requirement are INSTR() and
_INSTRREV(), which use the format `[?],?,?` and allow omitting the comma
for the first argument. This format is simply handled as a special case.

Fixes: #303
2023-02-12 22:38:50 -05:00
Samuel Gomes
f86d566d7a Merge branch 'image-load-from-memory-support' of https://github.com/a740g/QB64pe into image-load-from-memory-support 2023-02-13 03:52:28 +05:30
Samuel Gomes
52d168ff00 Update to use #305 2023-02-13 03:52:16 +05:30
Roland Heyder
275ca24c9a General refactoring
- things not fitting into the previous commits
2023-02-12 19:47:01 +01:00
Roland Heyder
b1c9733420 Removes old code
- unused (commented) code
- no longer needed HTML tag handling (eliminated from Wiki pages)
- #toc/#top link filters removed (those links are supported now)
2023-02-12 19:41:25 +01:00
Roland Heyder
dacff9e1b8 Improve local linking for #toc/#top links
- designate the help page header as target for #toc/#top links (Return to Top, Return to Table of Contents in the Wiki)
- include bottom {{PageNavigation}} links
- implement <h4> headings (==== in the Wiki), used as letter anchors in the alphabetic index
2023-02-12 19:32:47 +01:00
Roland Heyder
08b000b71c Skip more useless line feeds
- ignore line feeds after HTML comments and <br> and <br /> tags
2023-02-12 19:20:50 +01:00
Roland Heyder
dfa65b8fdd Add more Entities/UTF-8 chars
- adds some 20+ more chars to the list
- re-grouping and some comment changes
2023-02-12 19:13:05 +01:00
Roland Heyder
174a95b052 Change flow logic (Entity/UTF-8 related)
- targets especially links, templates and centered text
- every char must properly run through the Entity/UTF-8 substitution stage
2023-02-12 15:01:21 +01:00
Roland Heyder
6399068293 Change line end detection
- use color bit 7 instead of the CR char to mark the end of a help line
2023-02-12 14:37:51 +01:00
Samuel Gomes
18efb60cc3
Merge branch 'QB64-Phoenix-Edition:main' into image-load-from-memory-support 2023-02-07 18:32:03 +05:30
Samuel Gomes
4c548822d3 Fix arg count for _SNDNEW and type for _COLORCHOOSERDIALOG 2023-02-06 18:50:03 +05:30
Roland Heyder
9c7e067990 Improve Entity/UTF-8 handling
- UTF-8 handling changed to signal missing/unknown chars
- old entity handling (see 1st commit) removed and replaced by a similar method as UTF-8 handling incl. signalling missing/unknown entities
- added dynamic warnings at the top of pages which are using missing/unknown entities or UTF-8
2023-02-02 00:10:31 +01:00
Roland Heyder
01ed59c1d3 Add Interwiki link support
- wikipedia pages can be linked simply as Winkipedia:page instead of the full URL
- advantage: the new syntax can be used in internal links as well and will automatically expanded into external links when clicked
2023-02-02 00:02:05 +01:00
Roland Heyder
ceb3d18c1e General refactoring 2023-02-01 23:52:13 +01:00
Roland Heyder
61513cbcd8 Remove obsolete code
- wiki pages have been fixed, so the handling for these old things is no longer required
2023-02-01 23:48:43 +01:00
Roland Heyder
163f6eb6e2 Availability gallery
- add handling for the new separator image
2023-01-19 23:48:22 +01:00