mirror of
https://github.com/boxgaming/qbjs.git
synced 2024-05-28 19:00:14 +00:00
Added support for Hex$().
This commit is contained in:
parent
4debfb666c
commit
98afc309ee
|
@ -41,7 +41,7 @@ CodeMirror.defineMode("qbjs", function(conf, parserConf) {
|
|||
'_putimage', '_red', '_red32', '_resize', '_resizewidth', '_resizeheight', '_rgb', '_rgba', '_rgb32', '_rgba32', '_round',
|
||||
'_screenexists', '_sndclose', '_sndopen', '_sndplay', '_sndloop', '_sndpause', '_sndstop', '_sndvol',
|
||||
'_title', '_trim', '_width', 'abs', 'asc', 'atn', 'chr', 'circle', 'cls', 'color', 'command', 'cos', 'cvi', 'cvl', 'exp',
|
||||
'fix', 'input', 'inkey', 'instr', 'int', 'lbound', 'left', 'lcase', 'len', 'line', 'locate', 'log', 'ltrim', 'mid', 'mki', 'mkl',
|
||||
'fix', 'hex', 'input', 'inkey', 'instr', 'int', 'lbound', 'left', 'lcase', 'len', 'line', 'locate', 'log', 'ltrim', 'mid', 'mki', 'mkl',
|
||||
'point', 'print', 'pset', 'right', 'rtrim', 'rnd', 'screen', 'shared', 'sgn', 'sin', 'sleep', 'space', 'sqr', 'str', 'swap', 'tan',
|
||||
'timer', 'ubound', 'ucase', 'val',
|
||||
// QBJS-specific
|
||||
|
|
4
qb.js
4
qb.js
|
@ -620,6 +620,10 @@ var QB = new function() {
|
|||
return Math.floor(QB.func__Height() / QB.func__FontHeight());
|
||||
}
|
||||
|
||||
this.func_Hex = function(n) {
|
||||
return n.toString(16).toUpperCase();
|
||||
};
|
||||
|
||||
this.sub_Input = async function(values, preventNewline, addQuestionPrompt, prompt) {
|
||||
_lastKey = null;
|
||||
var str = "";
|
||||
|
|
1
qb2js.js
1
qb2js.js
|
@ -2515,6 +2515,7 @@ if (QB.halted()) { return; }
|
|||
await sub_AddQBMethod( "FUNCTION", "Cvl", False);
|
||||
await sub_AddQBMethod( "FUNCTION", "Exp", False);
|
||||
await sub_AddQBMethod( "FUNCTION", "Fix", False);
|
||||
await sub_AddQBMethod( "FUNCTION", "Hex$", False);
|
||||
await sub_AddQBMethod( "SUB", "Input", True);
|
||||
await sub_AddQBMethod( "FUNCTION", "InKey$", False);
|
||||
await sub_AddQBMethod( "FUNCTION", "InStr", False);
|
||||
|
|
|
@ -2657,6 +2657,7 @@ Sub InitQBMethods
|
|||
AddQBMethod "FUNCTION", "Cvl", False
|
||||
AddQBMethod "FUNCTION", "Exp", False
|
||||
AddQBMethod "FUNCTION", "Fix", False
|
||||
AddQBMethod "FUNCTION", "Hex$", False
|
||||
AddQBMethod "SUB", "Input", True
|
||||
AddQBMethod "FUNCTION", "InKey$", False
|
||||
AddQBMethod "FUNCTION", "InStr", False
|
||||
|
|
Loading…
Reference in a new issue