mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r23524) -Codechange: move the name of the scanner to a level deeper
This commit is contained in:
parent
7bfc3ccd84
commit
df0f8f8422
@ -143,9 +143,9 @@
|
||||
if (AI::scanner_info == NULL) {
|
||||
TarScanner::DoScan(TarScanner::AI);
|
||||
AI::scanner_info = new AIScannerInfo();
|
||||
AI::scanner_info->Initialize("AIScanner");
|
||||
AI::scanner_info->Initialize();
|
||||
AI::scanner_library = new AIScannerLibrary();
|
||||
AI::scanner_library->Initialize("AISCanner");
|
||||
AI::scanner_library->Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,9 @@ AIScannerInfo::AIScannerInfo() :
|
||||
{
|
||||
}
|
||||
|
||||
void AIScannerInfo::Initialize(const char *name)
|
||||
void AIScannerInfo::Initialize()
|
||||
{
|
||||
ScriptScanner::Initialize(name);
|
||||
ScriptScanner::Initialize("AIScanner");
|
||||
|
||||
/* Create the dummy AI */
|
||||
free(this->main_script);
|
||||
@ -140,6 +140,11 @@ AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool fo
|
||||
}
|
||||
|
||||
|
||||
void AIScannerLibrary::Initialize()
|
||||
{
|
||||
ScriptScanner::Initialize("AIScanner");
|
||||
}
|
||||
|
||||
void AIScannerLibrary::GetScriptName(ScriptInfo *info, char *name, int len)
|
||||
{
|
||||
AILibrary *library = static_cast<AILibrary *>(info);
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
AIScannerInfo();
|
||||
~AIScannerInfo();
|
||||
|
||||
/* virtual */ void Initialize(const char *name);
|
||||
/* virtual */ void Initialize();
|
||||
|
||||
/**
|
||||
* Select a random AI.
|
||||
@ -54,6 +54,8 @@ private:
|
||||
|
||||
class AIScannerLibrary : public ScriptScanner {
|
||||
public:
|
||||
/* virtual */ void Initialize();
|
||||
|
||||
/**
|
||||
* Find a library in the pool.
|
||||
* @param library The library name to find.
|
||||
|
Loading…
Reference in New Issue
Block a user