OpenTTD Source  12.0-beta2
squirrel.hpp File Reference
#include <squirrel.h>

Go to the source code of this file.

Data Structures

class  Squirrel
 
class  ScriptAllocatorScope
 

Enumerations

enum  ScriptType { ST_AI, ST_GS }
 The type of script we're working with, i.e. More...
 

Variables

ScriptAllocator_squirrel_allocator
 In the memory allocator for Squirrel we want to directly use malloc/realloc, so when the OS does not have enough memory the game does not go into unrecoverable error mode and kill the whole game, but rather let the AI die though then we need to circumvent MallocT/ReallocT. More...
 

Detailed Description

defines the Squirrel class

Definition in file squirrel.hpp.

Enumeration Type Documentation

◆ ScriptType

enum ScriptType

The type of script we're working with, i.e.

for who is it?

Enumerator
ST_AI 

The script is for AI scripts.

ST_GS 

The script is for Game scripts.

Definition at line 16 of file squirrel.hpp.

Variable Documentation

◆ _squirrel_allocator

ScriptAllocator* _squirrel_allocator

In the memory allocator for Squirrel we want to directly use malloc/realloc, so when the OS does not have enough memory the game does not go into unrecoverable error mode and kill the whole game, but rather let the AI die though then we need to circumvent MallocT/ReallocT.

For the rest of this code, the safeguards should be in place though!

Definition at line 183 of file squirrel.cpp.