-
Notifications
You must be signed in to change notification settings - Fork 0
Operators
Converts the top of the stack into a long, if possible.
Converts the top of the stack into a double, if possible.
Pops the top two values on the stack and pushes their sum to the stack (adds them).
-
1 2 addleaves3on the stack.
Pops the top two values on the stack and pushes their difference to the stack (subtracts them).
-
1 2 subleaves-1on the stack.
Pops the top two values on the stack and pushes their quotient to the stack (multiplies them).
-
2 3 mulleaves6on the stack.
Pops the top two values on the stack and pushes their quotient to the stack (divides them).
-
6 3 divleaves2on the stack.
exp (since 6c345a9)
Pops the top two values on the stack and pushes the second popped number raised to the power of the first.
-
3.0 2.0 expleaves9.0on the stack. -
4.0 0.5 expleaves2.0on the stack.
Pops the top two values on the stack and pushes true if the second value popped is less than the first, otherwise false.
-
4 2 ltleavesfalseon the stack. -
2 4 ltleavestrueon the stack. -
3 3 ltleavesfalseon the stack.
Pops the top two values on the stack and pushes true if the second value popped is less than or equal to the first, otherwise false.
-
4 2 lteleavesfalseon the stack. -
2 4 lteleavestrueon the stack. -
3 3 lteleavestrueon the stack.
Pops the top two values on the stack and pushes true if the second value popped is greater than the first, otherwise false.
-
4 2 gtleavestrueon the stack. -
2 4 gtleavesfalseon the stack. -
3 3 gtleavesfalseon the stack.
Pops the top two values on the stack and pushes true if the second value popped is greater than or equal to the first, otherwise false.
-
4 2 gteleavestrueon the stack. -
2 4 gteleavesfalseon the stack. -
3 3 gteleavestrueon the stack.
Pops the top two values on the stack and pushes true if the two values are equal, otherwise false.
-
4 2 eqleavesfalseon the stack. -
2 4 eqleavesfalseon the stack. -
3 3 eqleavestrueon the stack.
Pops the top two values on the stack and pushes true if the two values are not equal, otherwise false.
-
4 2 neqleavestrueon the stack. -
2 4 neqleavestrueon the stack. -
3 3 neqleavesfalseon the stack.
Pops the top two values on the stack and pushes true if both values are true, otherwise false.
-
true true andleavestrueon the stack. -
false true andleavesfalseon the stack. -
false false andleavesfalseon the stack.
Pops the top two values on the stack and pushes true if either value is true, otherwise false.
-
true true orleavestrueon the stack. -
false true orleavestrueon the stack. -
false false orleavesfalseon the stack.
Pops the top value on the stack and pushes true if the value is false, otherwise true.
-
true notleavesfalseon the stack. -
false notleavestrueon the stack.
Duplicates the top value on the stack and pushes it to the stack.
1 dup leaves 1 1 on the stack.
"test string" dup leaves "test string" "test string" on the stack.
Pops the top value on the stack.
1 pop leaves nothing on the stack.
Pops the top value on the stack and prints it.
1 print leaves nothing on the stack.
Pops the top value on the stack and prints it and a trailing newline.
1 println leaves nothing on the stack.
Adds the top value on the stack to the tracelog along with a trailing newline. Does not pop it.
1 trace leaves 1 on the stack.
Prints the tracelog. Does not touch the stack.
Clears the tracelog. Does not touch the stack.
Initializes raylib window. Pops three values: title (string), height (long), width (long).
-
200 400 "test window" @initwindowinitializes a window titled "test window" with a width of 200 and a height of 400.
Pushes a boolean to the stack representing whether the window should close (the user has closed the window).
Closes the window.
Shows the cursor.
@showcursor
Hides the cursor.
Pops RGBA (0-255 long) values off the stack and clears the background.
-
200 150 100 255 @clearbackgroundclears the background with a color of 200 red, 150 green, 100 blue, and 255 alpha.
Begins drawing (can only draw while drawing) and processes window input (like mouse clicks).
Ends drawing.
Sets target update frequency. Pops a long from the stack.
-
60 @settargetfpsmakes the window target 60 updates per second.
Returns a random long value within a range. Pops two longs from the stack and pushes one long to the stack.
-
-100 100 @getrandomvalueresults in a random value between -100 and 100 on the stack. Put the lower number first.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the key is pressed but not held (this is the first frame it has been down).
-
@key_a @iskeypressedpushes true to the stack if a was pressed.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the key is held down.
-
@key_a @iskeypressedpushes true to the stack if a was held.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the key was just released (first frame it has not been held down).
-
@key_a @iskeyreleasedpushes true to the stack if a was released.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the key is not held down.
-
@key_a @iskeyuppushes true to the stack if a is not held down.
Pushes a long to the stack. Gets the latest key pressed.
@getkeypressed @key_a eq if "last key pressed was a" else "last key pressed was not a" endif println
Pops a long from the stack. Sets the key that closes the program. Escape by default.
-
@key_a @setexitkeymakes the a key close the program.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the mouse button was pressed but not held (first frame it is pressed).
-
@mouse_left @ismousebuttonpressedpushes true if left mouse button was pressed.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the mouse button is held down.
-
@mouse_left @ismousebuttondownpushes true if left mouse button is held.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the mouse button was just released (first frame not held down).
-
@mouse_left @ismousebuttonreleasedpushes true if left mouse button was released.
Pops a long from the stack and pushes a boolean to the stack. Pushes true if the mouse button is not held down.
-
@mouse_left @ismousebuttonuppushes true if the left mouse button is not held down.
Pushes the X coordinate of the mouse to the stack as a long.
Pushes the Y coordinate of the mouse to the stack as a long.
Same as @getmousex @getmousey. Pushes X then Y coordinates of the mouse to the stack as longs.
Pops the Y then the X position (longs) and sets the mouse position to those coordinates.
-
150 250 @setmouseposmoves the mouse to (150, 250)
Pops the Y then the X offset (longs) and sets the mouse offset as specified.
-
150 250 @setmouseoffsetsets the mouse offset to (150, 250)
Pops the Y then the X scale (doubles) and sets the mouse scale as specified.
-
1.5 2.5 @setmousescalesets the mouse scale to (1.5, 2.5)
Pushes the mouse wheel movement to the stack as a long.
Pops RGBA values (0-255 longs) then XY (longs) position. Draws the RGBA color at the XY position.
-
10 20 200 150 100 255 @drawpixeldraws the color #c89664ff (200, 150, 100, 255) at (10, 20).
Pops RGBA values (0-255 longs), thickness (double), and then two XY positions (longs). Draws a line between the two positions of the given color and thickness.
-
10 20 40 80 2.0 200 150 100 255 @drawlinedraws a #c89664ff (200, 150, 100, 255) line between (10, 20) and (40, 80) of thickness 2.0.
Pops RGBA values (0-255 longs), radius (double) and an XY position (longs). Draws a circle at the XY position of the given color and radius.
-
10 20 7.5 200 150 100 255 @drawcircledraws a #c89664ff (200, 150, 100, 255) circle of radius 7.5 at (10, 20).
Same as @drawcircle but only draws the outline.
Pops RGBA values (0-255 longs), XY radius (doubles) and an XY position (longs). Draws an ellipse at the XY position of the given color and radii.
Same as @drawellipse but only draws the outline.
Pops RGBA values (0-255 longs), width, height, and XY position (longs). XY position denotes the top left of the rectangle.
-
10 15 20 25 200 150 100 255 @drawrectangledraws a #c89664ff (200, 150, 100, 255) rectangle 20 wide and 25 high with the top left corner at (10, 15).
Same as @drawrectangle but only draws the outline.
@drawtriangle (since 4e02b8b)
Pops RGBA values (0-255 longs) and 3 XY positions (longs).
-
20 30 50 60 80 15 200 150 100 255 @drawtrirangledraws a #c89664ff (200, 150, 100, 255) triangle with vertices (20, 30), (50, 60), and (80, 15).
@drawtrianglelines (since 4e02b8b)
Same as @drawtriangle but only draws the outline.