diff -r 6967c52c78c5 -r 37d15a8951b8 src/squirrel.hpp --- a/src/squirrel.hpp Mon Jun 30 12:15:10 2008 +0000 +++ b/src/squirrel.hpp Mon Jun 30 12:27:24 2008 +0000 @@ -155,6 +155,11 @@ void SetPrintFunction(SQPrintFunc *func) { this->print_func = func; } /** + * Set a custom suspend function. + */ + void SetSuspendControl(SQSuspendControlFunc func); + + /** * Throw a Squirrel error that will be nicely displayed to the user. */ void ThrowError(const char *error) { sq_throwerror(this->vm, OTTD2FS(error)); } @@ -163,6 +168,17 @@ * Release a SQ object. */ void ReleaseObject(HSQOBJECT *ptr) { sq_release(this->vm, ptr); } + + /** + * Reset the internal SQ counter which counts the opcodes executed and + * forces SQ to pause if the counter overflows. + */ + void ResetOpcodeCounter() { sq_resetopcodecounter(this->vm); } + + /** + * Set the maximum of opcodes before the suspend handler is called. + */ + void SetMaxOpcodes(int32 opcodes) { sq_setmaxopcodes(this->vm, opcodes); } }; #endif /* SQUIRREL_HPP */