Skip to content

Commit

Permalink
Added support for _EnvironCount
Browse files Browse the repository at this point in the history
  • Loading branch information
boxgaming committed Jan 20, 2024
1 parent 956a621 commit 1995561
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion codemirror/qb-lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ CodeMirror.defineMode("qbjs", function(conf, parserConf) {
'_?backgroundcolor', '_?blue', '_?blue32', '_?capslock', '_?ceil', '_?commandcount', '_?continue', '_?copyimage',
'_?cosh', '_?cot', '_?coth', '_?csc', '_?csch', '_?cwd',
'_?defaultcolor', '_?d2g', '_?d2r', '_?deflate', '_?desktopwidth', '_?desktopheight',
'_?delay', '_?dest', '_?dir', '_?direxists', '_?display', '_?echo', '_?fileexists', '_?font', '_?fontwidth', '_?fontheight',
'_?delay', '_?dest', '_?dir', '_?direxists', '_?display',
'_?echo', '_?environcount', '_?fileexists', '_?font', '_?fontwidth', '_?fontheight',
'_?freeimage', '_?fullscreen', '_?g2d', '_?g2r', '_?green', '_?green32', '_?height', '_?hypot', "_?inflate",
'_?instrrev', '_?limit', '_?keyclear', '_?keydown', '_?keyhit', '_?loadfont', '_?loadimage',
'_?mousebutton', '_?mousehide', '_?mouseinput', '_?mouseshow', '_?mousewheel', '_?mousex', '_?mousey',
Expand Down
5 changes: 5 additions & 0 deletions qb.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ var QB = new function() {
console.log(msg);
};

this.func__EnvironCount = function() {
/* no-op: included for compatibility */
return 0;
};

this.func__FileExists = function(path) {
var vfs = GX.vfs();
var file = vfs.getNode(path, GX.vfsCwd());
Expand Down
1 change: 1 addition & 0 deletions qb2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -3420,6 +3420,7 @@ if (QB.halted()) { return; };
await sub_AddQBMethod( "FUNCTION" , "_Display" , False);
await sub_AddQBMethod( "SUB" , "_Display" , False);
await sub_AddQBMethod( "SUB" , "_Echo" , False);
await sub_AddQBMethod( "FUNCTION" , "_EnvironCount" , False);
await sub_AddQBMethod( "FUNCTION" , "_FileExists" , False);
await sub_AddQBMethod( "FUNCTION" , "_Font" , False);
await sub_AddQBMethod( "SUB" , "_Font" , False);
Expand Down
1 change: 1 addition & 0 deletions tools/qb2js.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3646,6 +3646,7 @@ Sub InitQBMethods
AddQBMethod "FUNCTION", "_Display", False
AddQBMethod "SUB", "_Display", False
AddQBMethod "SUB", "_Echo", False
AddQBMethod "FUNCTION", "_EnvironCount", False
AddQBMethod "FUNCTION", "_FileExists", False
AddQBMethod "FUNCTION", "_Font", False
AddQBMethod "SUB", "_Font", False
Expand Down

0 comments on commit 1995561

Please sign in to comment.