* Reset a script engine. It forgets the correct script it was executing, * and resets stack and frame pointer. It also loads in the scriptInfo given * by the parameter. * * @param script The script engine to reset. * @param scriptInfo The scriptInfo to load in the script. Can be NULL. */
| 255 | * @param scriptInfo The scriptInfo to load in the script. Can be NULL. |
| 256 | */ |
| 257 | void Script_Reset(ScriptEngine *script, ScriptInfo *scriptInfo) |
| 258 | { |
| 259 | if (script == NULL) return; |
| 260 | if (scriptInfo == NULL) return; |
| 261 | |
| 262 | script->script = NULL; |
| 263 | script->scriptInfo = scriptInfo; |
| 264 | script->isSubroutine = 0; |
| 265 | script->framePointer = 17; |
| 266 | script->stackPointer = 15; |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * Load a script in an engine. As script->scriptInfo already defines most |
no outgoing calls
no test coverage detected