Well, I couldn't resist to post another version, this is the list of implemented features:
Script console (basic)
2D functions
3D functions
Animation functions
Bitmap functions
Camera functions
Core functions (see below)
At the moment I don't know how to implement the array/queue functions because they get an array as parameter and I doubt a VBArray will make the trick, so probably these won't be implemented (I have to make some tests). Also the make/fill/copy/delete memory functions are not implemented, these are more likely to be implemented but tests are required.
String tables were added, so you may copy the dll to your plugin-user folder and copy the INI file to the editor/keywords folder to have
syntax color in your editor. There is an issue with this: you can't call the commands directly in your main file, you need to add a new file to your project and paste this code:
remstart
Programmer: DavidOC
Date: 05/08/2005
Comments: You need this file to call script functions, if you call the
commands directly in your main loop after some calls the
program crashes
remend
#CONSTANT SCRIPT_LANGUAGE "VBScript"
function RunStatement(statement$)
SCRIPT RUN STATEMENT statement$
endfunction
function RunFile(filename$)
SCRIPT RUN FILE filename$
endfunction
function ShowConsole()
SCRIPT SHOW CONSOLE
endfunction
function InitScript()
intTemp as integer
rem preload animation commands
intTemp = animation exist(1)
rem preload 2D commands
intTemp = rgb(0,0,0)
SCRIPT INITIALIZE
SCRIPT SET LANGUAGE SCRIPT_LANGUAGE
endfunction
function DropScript()
SCRIPT FINALIZE
endfunction
And this is a sample code you may use in your main file:
InitScript()
sync on
backdrop on
RunStatement("DBpro3D.load_object " + chr$(34) + "cube.dbo" + chr$(34) + ", 2")
position object 2,-5,5,0
RunFile("script.txt")
RunStatement("DBpro3D.make_object_box 1, 10.5,10.5,10.5")
make object box 5, -10.5, -10.5, -10.5
position object 5, 5,-5,0
rem RunStatement("DBproCore.wait_key")
do
if returnkey()= 1 then ShowConsole()
text 0,0, str$(object size x(1))
text 0,10, str$(object size y(1))
text 0,20, str$(object size z(1))
text 0,30, str$(object size(2))
text 0,400, str$(screen fps())
RunStatement("DBpro2D.box 200,200,300,300")
RunStatement("DBpro2D.box 300,300,400,400, &HFF, &HFF,0,0")
RunStatement("DBpro2D.dot 300,300")
RunStatement("DBpro2D.dot 301,301, &Hff0000")
box 100,100,200,200
control camera using arrowkeys 0,1,1
RunStatement("DBproCore.sync")
loop
Ce Acatl Xochitzin