Initial commit of Dink Smallwood HD source. See the "Programmer readme.txt" for information on how to set it up.
git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1469 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
dfbc2348a5
commit
d4f66a5d2e
115 changed files with 37737 additions and 0 deletions
38
source/dink/ScriptAccelerator.cpp
Normal file
38
source/dink/ScriptAccelerator.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include "PlatformPrecomp.h"
|
||||
#include "ScriptAccelerator.h"
|
||||
#include "util/MiscUtils.h"
|
||||
|
||||
ScriptAccelerator::ScriptAccelerator()
|
||||
{
|
||||
}
|
||||
|
||||
ScriptAccelerator::~ScriptAccelerator()
|
||||
{
|
||||
}
|
||||
|
||||
void ScriptAccelerator::Kill()
|
||||
{
|
||||
m_data.clear();
|
||||
}
|
||||
|
||||
void ScriptAccelerator::AddPosition(string label, int current)
|
||||
{
|
||||
label = ToUpperCaseString(label);
|
||||
m_data[label] = ScriptPosition(current);
|
||||
}
|
||||
|
||||
ScriptPosition * ScriptAccelerator::GetPositionByName( string label )
|
||||
{
|
||||
label = ToUpperCaseString(label);
|
||||
|
||||
ScriptMap::iterator itor = m_data.find(label);
|
||||
|
||||
if (itor != m_data.end())
|
||||
{
|
||||
//bingo!
|
||||
return &(itor->second);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue