author | truebrain |
Fri, 13 Jun 2008 20:19:00 +0000 | |
branch | noai |
changeset 10958 | 65088d587094 |
parent 10891 | 5ebb6f9068d0 |
permissions | -rw-r--r-- |
9365
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
1 |
/* $Id$ */ |
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
2 |
|
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
3 |
/** @file squirrel.hpp declarations of the class for squirrel loader */ |
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
4 |
|
9422
33efcc5f1b09
(svn r9223) [NoAI] -Change: moved squirrel/engine.cpp to squirrel.cpp in root
truelight
parents:
9411
diff
changeset
|
5 |
#ifndef AI_SQUIRREL_HPP |
33efcc5f1b09
(svn r9223) [NoAI] -Change: moved squirrel/engine.cpp to squirrel.cpp in root
truelight
parents:
9411
diff
changeset
|
6 |
#define AI_SQUIRREL_HPP |
9365
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
7 |
|
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
8 |
#include <map> |
10958
65088d587094
(svn r13512) [NoAI] -Fix: don't load a library over and over, but keep track of which libraries we have loaded (per AI) and re-use it where possible (reduces memory-footprint)
truebrain
parents:
10891
diff
changeset
|
9 |
#ifndef AI_CONTROLLER_HPP |
10649
9034b80fdbdb
(svn r13193) [NoAI] -Add: allow AIs to be packed in a .tar. one AI per tar, always in a subdir. It looks for main.nut in the first dir it finds in the archive
truebrain
parents:
10643
diff
changeset
|
10 |
struct ltstr { bool operator()(const char *s1, const char *s2) const { return strcmp(s1, s2) < 0; } }; |
10958
65088d587094
(svn r13512) [NoAI] -Fix: don't load a library over and over, but keep track of which libraries we have loaded (per AI) and re-use it where possible (reduces memory-footprint)
truebrain
parents:
10891
diff
changeset
|
11 |
#endif /* AI_CONTROLLER_HPP */ |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
12 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
13 |
class AISquirrel { |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
14 |
public: |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
15 |
AISquirrel(); |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
16 |
~AISquirrel(); |
9375
8bbd77b18de4
(svn r9163) [NoAI] -Codechange: put AddMethod in his own function, so calling often is easier
truelight
parents:
9373
diff
changeset
|
17 |
|
8bbd77b18de4
(svn r9163) [NoAI] -Codechange: put AddMethod in his own function, so calling often is easier
truelight
parents:
9373
diff
changeset
|
18 |
/** |
10889
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
19 |
* Import a library inside the Squirrel VM. |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
20 |
*/ |
10958
65088d587094
(svn r13512) [NoAI] -Fix: don't load a library over and over, but keep track of which libraries we have loaded (per AI) and re-use it where possible (reduces memory-footprint)
truebrain
parents:
10891
diff
changeset
|
21 |
bool ImportLibrary(const char *library, const char *class_name, int version, HSQUIRRELVM vm, AIController *controller); |
10889
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
22 |
|
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
23 |
/** |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
24 |
* Register a library to be put in the available list. |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
25 |
*/ |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
26 |
void RegisterLibrary(class AILibrary *library); |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
27 |
|
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
28 |
/** |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
29 |
* Register an AI to be put in the available list. |
9373
d03563181088
(svn r9160) [NoAI] -Add: added AIController for Squirrel; all AIs, C++ or Squirrel, should extend this class
truelight
parents:
9365
diff
changeset
|
30 |
*/ |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
31 |
void RegisterAI(class AIInfo *info); |
9404
ef9e171617a3
(svn r9201) [NoAI] -Change: make adding a default-constructor for DefSQClass optional
truelight
parents:
9395
diff
changeset
|
32 |
|
9411
29c9dfcdb8e9
(svn r9209) [NoAI] -Add: added ScanDir(), which scans the 'ai' dir for main.nut scripts
truelight
parents:
9410
diff
changeset
|
33 |
/** |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
34 |
* Remove an AI from the available list. |
9411
29c9dfcdb8e9
(svn r9209) [NoAI] -Add: added ScanDir(), which scans the 'ai' dir for main.nut scripts
truelight
parents:
9410
diff
changeset
|
35 |
*/ |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
36 |
void UnregisterAI(class AIInfo *info); |
9385
56803dfb2ff6
(svn r9176) [NoAI] -Add: added a RegisterAI() proc, that makes the AI known to the
truelight
parents:
9381
diff
changeset
|
37 |
|
9411
29c9dfcdb8e9
(svn r9209) [NoAI] -Add: added ScanDir(), which scans the 'ai' dir for main.nut scripts
truelight
parents:
9410
diff
changeset
|
38 |
/** |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
39 |
* Select a Random AI. |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
40 |
*/ |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
41 |
class AIInfo *SelectRandomAI(); |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
42 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
43 |
/** |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
44 |
* Select an AI by name. |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
45 |
*/ |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
46 |
class AIInfo *SelectAI(const char *name); |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
47 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
48 |
/** |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
49 |
* Get the list of available AIs for the console. |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
50 |
*/ |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
51 |
char *GetAIConsoleList(char *p, const char *last); |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
52 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
53 |
/** |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
54 |
* Get the engine of the main squirrel handler (it indexes all avialable squirrels). |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
55 |
*/ |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
56 |
class Squirrel *GetEngine() { return this->engine; } |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
57 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
58 |
/** |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
59 |
* Get the current script the ScanDir is looking at. |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
60 |
*/ |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
61 |
const char *GetCurrentScript() { return this->current_script; } |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
62 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
63 |
/** |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
64 |
* Get the directory of the current script the ScanDir is looking at. |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
65 |
*/ |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
66 |
const char *GetCurrentDirName() { return this->current_dir; } |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
67 |
|
10891
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
68 |
/** |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
69 |
* Rescan the AI dir for scripts. |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
70 |
*/ |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
71 |
void RescanAIDir(); |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
72 |
|
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
73 |
private: |
10649
9034b80fdbdb
(svn r13193) [NoAI] -Add: allow AIs to be packed in a .tar. one AI per tar, always in a subdir. It looks for main.nut in the first dir it finds in the archive
truebrain
parents:
10643
diff
changeset
|
74 |
typedef std::map<const char *, class AIInfo *, ltstr> AIInfoList; |
10889
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
75 |
typedef std::map<const char *, class AILibrary *, ltstr> AILibraryList; |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
76 |
|
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
77 |
/** |
10891
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
78 |
* Scan the AI dir for scripts. |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
79 |
*/ |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
80 |
void ScanAIDir(); |
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
81 |
|
5ebb6f9068d0
(svn r13442) [NoAI] -Add: added 'rescan_ai' console command. Use it to rescan the ai dir when you add AIs or libraries without needing to exit and restart openttd.
glx
parents:
10889
diff
changeset
|
82 |
/** |
10889
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
83 |
* Scan a dir for AIs. |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
84 |
* For non-library-scan, if an AI is found, AIInfo is created, and the AI |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
85 |
* is registered to the central system. |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
86 |
* For library-scan, if a library is found, AILibrary is created, and the |
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
87 |
* library is registered to the central system. |
9411
29c9dfcdb8e9
(svn r9209) [NoAI] -Add: added ScanDir(), which scans the 'ai' dir for main.nut scripts
truelight
parents:
9410
diff
changeset
|
88 |
*/ |
10889
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
89 |
void ScanDir(const char *dirname, bool library_dir, char *library_depth = NULL); |
9411
29c9dfcdb8e9
(svn r9209) [NoAI] -Add: added ScanDir(), which scans the 'ai' dir for main.nut scripts
truelight
parents:
9410
diff
changeset
|
90 |
|
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
91 |
AIInfoList info_list; |
10889
ecb77cfc4a10
(svn r13440) [NoAI] -Add: introducing ai/library, a method to load libraries into your AI.
truebrain
parents:
10649
diff
changeset
|
92 |
AILibraryList library_list; |
10643
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
93 |
class Squirrel *engine; |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
94 |
char *current_script; |
970417eef395
(svn r13187) [NoAI] -Codechange: rewrote the AI register part; C++ AIs are completely impossible now, and registration happens directly via AISquirrel. This cleans up the registration flow, and makes everything readable again, as sure I made a mess out of it :)
truebrain
parents:
9789
diff
changeset
|
95 |
char *current_dir; |
9365
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
96 |
}; |
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
97 |
|
9422
33efcc5f1b09
(svn r9223) [NoAI] -Change: moved squirrel/engine.cpp to squirrel.cpp in root
truelight
parents:
9411
diff
changeset
|
98 |
#endif /* AI_SQUIRREL_HPP */ |