Page 2 of 2

Posted: Wed Feb 11, 2009 5:04 pm
by VilleK
Updated today with the addition of the joyGetPOV(joyId) function for reading pov/hat control. It returns -1 when centered, otherwise 0-360 depending on direction. The attached joystick-demo is also updated to make use of the new function.

I also made some work in the scripting to make it easier to add new functions. This included a rewrite of the runtime stack-handling of scripting which can make a big performance boost on scripts that work on local data such as for-loops that performs simple arithmetic. Note that local variables are no longer initialized to zero, instead they are undefined just like in Pascal and C.

Also the built-in functions now perform type-checking on their parameters so for instance joyId-parameter in the joyGetPOV-function is an integer. Previously all built-in functions were using float-parameters and return values.

Posted: Fri Feb 27, 2009 8:24 pm
by VilleK
Kjell found a problem with user defined functions that does not return a value. I've fixed this and updated the beta again today. If no other problems are found then I'll make a proper release of 1.9.6 next week.