More skeleton code for simulating a turn
Use enum classes for safe enums
This commit is contained in:
parent
b43248e89f
commit
e310acfaf8
9 changed files with 983 additions and 25 deletions
228
CMakeLists.txt.user
Normal file
228
CMakeLists.txt.user
Normal file
|
@ -0,0 +1,228 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 2.7.1, 2014-12-13T15:54:53. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QByteArray" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QString" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QByteArray" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap"/>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">{4857d833-10e4-4a1a-ab3c-1fb012a1b975}</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeBuildConfiguration.BuildDirectory">/home/mdiluzio/Projects/ttrts/build</value>
|
||||||
|
<value type="bool" key="CMakeProjectManager.CMakeBuildConfiguration.UseNinja">false</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
|
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||||
|
<value type="QString">all</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.UseNinja">false</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments">clean</value>
|
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"/>
|
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.UseNinja">false</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">all</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="int" key="CMakeProjectManager.BaseEnvironmentBase">2</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">ttrts</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
|
||||||
|
<value type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value>
|
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.CMakeRunConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">ttrts</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.ttrts</value>
|
||||||
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
|
||||||
|
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="int" key="CMakeProjectManager.BaseEnvironmentBase">2</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">ttrts-test</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
|
||||||
|
<value type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value>
|
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.CMakeRunConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">ttrts-test</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.ttrts-test</value>
|
||||||
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||||
|
<value type="QString">{3beffcb8-4a04-420b-880b-3a95e17b2e51}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">12</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
|
@ -98,7 +98,7 @@ int CTTRTSGame::AddUnits( CUnitVector&& units )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify any order
|
// Verify any order
|
||||||
int CTTRTSGame::VerifyOrder( player_id_t player, const COrder& order )
|
int CTTRTSGame::VerifyOrder( player_id_t player, const COrder& order ) const
|
||||||
{
|
{
|
||||||
// Grab the unit ID
|
// Grab the unit ID
|
||||||
const unit_id_t unitID = order.unit;
|
const unit_id_t unitID = order.unit;
|
||||||
|
@ -118,17 +118,68 @@ int CTTRTSGame::VerifyOrder( player_id_t player, const COrder& order )
|
||||||
return unitFound;
|
return unitFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get unit by unit ID
|
||||||
|
const CUnit& CTTRTSGame::GetUnitByID( unit_id_t id ) const
|
||||||
|
{
|
||||||
|
CUnitVector::const_iterator it;
|
||||||
|
|
||||||
|
for ( it = m_allUnits.begin(); it != m_allUnits.end(); it++ )
|
||||||
|
{
|
||||||
|
// Attempt the unit add
|
||||||
|
if ( (*it).getID() )
|
||||||
|
return *it;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return an invalid unit
|
||||||
|
static CUnit invalid_unit;
|
||||||
|
return invalid_unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify an order unit pair
|
||||||
|
int CTTRTSGame::VerifyOrderUnitPair( const OrderUnitPair& pair ) const
|
||||||
|
{
|
||||||
|
switch ( pair.order.order )
|
||||||
|
{
|
||||||
|
case order_c::F:
|
||||||
|
{
|
||||||
|
// Verify new unit position will be on the board
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case order_c::L:
|
||||||
|
case order_c::R:
|
||||||
|
case order_c::A:
|
||||||
|
// Nothing needed here, orders can always be carried out
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Simulate all movements
|
// Simulate all movements
|
||||||
int CTTRTSGame::SimulateMovements()
|
int CTTRTSGame::SimulateMovements()
|
||||||
{
|
{
|
||||||
// Grab all movement orders
|
OrderUnitPairVector movements;
|
||||||
COrderVector movements;
|
|
||||||
|
// Grab all movement orders
|
||||||
for ( COrderVector::const_iterator it = m_orders.begin(); it != m_orders.end(); it++ )
|
for ( COrderVector::const_iterator it = m_orders.begin(); it != m_orders.end(); it++ )
|
||||||
{
|
{
|
||||||
if( isMovementOrder(*it) )
|
if( isMovementOrder(*it) )
|
||||||
movements.push_back(*it);
|
{
|
||||||
|
const OrderUnitPair pair = { *it, GetUnitByID((*it).unit) };
|
||||||
|
movements.push_back(pair);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove all orders with straight up impossible movements
|
||||||
|
for ( OrderUnitPairVector::const_iterator it = movements.begin(); it != movements.end(); it++ )
|
||||||
|
{
|
||||||
|
if( VerifyOrderUnitPair(*it) )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate movements
|
// Calculate movements
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
24
game/game.h
24
game/game.h
|
@ -9,6 +9,15 @@
|
||||||
|
|
||||||
typedef std::vector< CUnit > CUnitVector;
|
typedef std::vector< CUnit > CUnitVector;
|
||||||
|
|
||||||
|
// Type for order and unit pairs
|
||||||
|
struct OrderUnitPair
|
||||||
|
{
|
||||||
|
const COrder& order;
|
||||||
|
const CUnit& unit;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::vector< OrderUnitPair > OrderUnitPairVector;
|
||||||
|
|
||||||
class CTTRTSGame
|
class CTTRTSGame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -44,6 +53,9 @@ public:
|
||||||
// Get unit by index as above (not unit ID)
|
// Get unit by index as above (not unit ID)
|
||||||
inline const CUnit& GetUnitByIndex( unsigned int i ) const { return m_allUnits[i]; }
|
inline const CUnit& GetUnitByIndex( unsigned int i ) const { return m_allUnits[i]; }
|
||||||
|
|
||||||
|
// Get unit by unit ID
|
||||||
|
const CUnit& GetUnitByID( unit_id_t id ) const;
|
||||||
|
|
||||||
// Get the number of order
|
// Get the number of order
|
||||||
inline unsigned int GetNumOrders() const { return m_orders.size(); }
|
inline unsigned int GetNumOrders() const { return m_orders.size(); }
|
||||||
|
|
||||||
|
@ -51,7 +63,7 @@ public:
|
||||||
inline const COrder& GetOrdersByIndex( unsigned int i ) const { return m_orders[i]; }
|
inline const COrder& GetOrdersByIndex( unsigned int i ) const { return m_orders[i]; }
|
||||||
|
|
||||||
// Get dimentions
|
// Get dimentions
|
||||||
inline const uvector2& GetDimentions() const { return dimentions; };
|
inline const uvector2& GetDimentions() const { return dimentions; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -61,11 +73,13 @@ private:
|
||||||
// Simulate all actions
|
// Simulate all actions
|
||||||
int SimulateActions();
|
int SimulateActions();
|
||||||
|
|
||||||
// Verify any order
|
int VerifyOrderUnitPair( const OrderUnitPair& pair ) const;
|
||||||
int VerifyOrder( player_id_t player, const COrder& order );
|
|
||||||
|
|
||||||
// Verify any order
|
// Verify any order
|
||||||
int VerifyUnit( const CUnit& unit );
|
int VerifyOrder( player_id_t player, const COrder& order ) const;
|
||||||
|
|
||||||
|
// Verify any order
|
||||||
|
int VerifyUnit( const CUnit& unit ) const;
|
||||||
|
|
||||||
// Vector to store points to all units
|
// Vector to store points to all units
|
||||||
CUnitVector m_allUnits;
|
CUnitVector m_allUnits;
|
||||||
|
@ -77,4 +91,4 @@ private:
|
||||||
uvector2 dimentions;
|
uvector2 dimentions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_GAME_H_
|
#endif //_GAME_H_
|
||||||
|
|
|
@ -8,7 +8,7 @@ std::string GetStringFromOrder(const COrder& order )
|
||||||
std::string ret;
|
std::string ret;
|
||||||
ret += std::to_string(order.unit);
|
ret += std::to_string(order.unit);
|
||||||
ret += ORDER_DELIMITER;
|
ret += ORDER_DELIMITER;
|
||||||
ret += order.order;
|
ret += (char)order.order;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ COrder GetOrderFromString( const std::string& _order )
|
||||||
order.erase(0, pos + 1);
|
order.erase(0, pos + 1);
|
||||||
|
|
||||||
// Next single char is the order
|
// Next single char is the order
|
||||||
ret.order = order[0];
|
ret.order = (order_c)order[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -56,4 +56,4 @@ bool isActionOrder( const COrder& order )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,20 +9,26 @@
|
||||||
#define ORDER_DELIMITER ' '
|
#define ORDER_DELIMITER ' '
|
||||||
|
|
||||||
// Type for all orders ( as a char )
|
// Type for all orders ( as a char )
|
||||||
typedef char order_c;
|
enum class order_c : char
|
||||||
|
{
|
||||||
|
F = 'F',
|
||||||
|
L = 'L',
|
||||||
|
R = 'R',
|
||||||
|
A = 'A'
|
||||||
|
};
|
||||||
|
|
||||||
// Movement orders
|
// Movement orders
|
||||||
static const order_c sk_movementOrders[] =
|
static const order_c sk_movementOrders[] =
|
||||||
{
|
{
|
||||||
'F', // Forward
|
order_c::F, // Forward
|
||||||
};
|
};
|
||||||
|
|
||||||
// Action orders
|
// Action orders
|
||||||
static const order_c sk_actionOrders[] =
|
static const order_c sk_actionOrders[] =
|
||||||
{
|
{
|
||||||
'L', // Left
|
order_c::L, // Left
|
||||||
'R', // Right
|
order_c::R, // Right
|
||||||
'A', // Attack
|
order_c::A, // Attack
|
||||||
};
|
};
|
||||||
|
|
||||||
// Container for an order
|
// Container for an order
|
||||||
|
@ -56,4 +62,4 @@ COrder GetOrderFromString( const std::string& order );
|
||||||
bool isMovementOrder( const COrder& order );
|
bool isMovementOrder( const COrder& order );
|
||||||
bool isActionOrder( const COrder& order );
|
bool isActionOrder( const COrder& order );
|
||||||
|
|
||||||
#endif //_ORDERS_H_
|
#endif //_ORDERS_H_
|
||||||
|
|
|
@ -17,12 +17,12 @@ static const coord_t coord_invalid = std::numeric_limits<coord_t>::max();
|
||||||
static const ucoord_t ucoord_invalid = std::numeric_limits<ucoord_t>::max();
|
static const ucoord_t ucoord_invalid = std::numeric_limits<ucoord_t>::max();
|
||||||
|
|
||||||
// Direction representation
|
// Direction representation
|
||||||
enum dir_t : char
|
enum class dir_t : char
|
||||||
{
|
{
|
||||||
N = 'N',
|
N = 'N',
|
||||||
S = 'S',
|
S = 'S',
|
||||||
E = 'E',
|
E = 'E',
|
||||||
W = 'W',
|
W = 'W'
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_BASETYPES_H_
|
#endif //_BASETYPES_H_
|
||||||
|
|
|
@ -34,7 +34,7 @@ const char* tests()
|
||||||
|
|
||||||
{
|
{
|
||||||
COrder order;
|
COrder order;
|
||||||
order.order = 'F';
|
order.order = order_c::F;
|
||||||
order.unit = 10;
|
order.unit = 10;
|
||||||
std::string order_string = GetStringFromOrder(order);
|
std::string order_string = GetStringFromOrder(order);
|
||||||
COrder order2 = GetOrderFromString(order_string);
|
COrder order2 = GetOrderFromString(order_string);
|
||||||
|
@ -45,7 +45,7 @@ const char* tests()
|
||||||
|
|
||||||
{
|
{
|
||||||
COrder order;
|
COrder order;
|
||||||
order.order = 'F';
|
order.order = order_c::F;
|
||||||
if (!isMovementOrder(order) )
|
if (!isMovementOrder(order) )
|
||||||
return "Failed to detect a movement order";
|
return "Failed to detect a movement order";
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ const char* tests()
|
||||||
|
|
||||||
{
|
{
|
||||||
COrder order;
|
COrder order;
|
||||||
order.order = 'L';
|
order.order = order_c::A;
|
||||||
if (! isActionOrder(order) )
|
if (! isActionOrder(order) )
|
||||||
return "Failed to detect a action order";
|
return "Failed to detect a action order";
|
||||||
|
|
||||||
|
@ -93,4 +93,4 @@ int main()
|
||||||
|
|
||||||
std::cout<<"Tests succeeded"<<std::endl;
|
std::cout<<"Tests succeeded"<<std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
8
ttrts.sublime-project
Normal file
8
ttrts.sublime-project
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"folders":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"path": "/home/mdiluzio/Projects/ttrts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
651
ttrts.sublime-workspace
Normal file
651
ttrts.sublime-workspace
Normal file
|
@ -0,0 +1,651 @@
|
||||||
|
{
|
||||||
|
"auto_complete":
|
||||||
|
{
|
||||||
|
"selected_items":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
"eErr",
|
||||||
|
"eError_noErr"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"g",
|
||||||
|
"gMainWindow"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"buffers":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"file": "game/unit.cpp",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 486,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "game/game.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 1722,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "game/board.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 0,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "game/CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 320,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "ui/CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 293,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 307,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "test/CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 384,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "ui/board.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 1299,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "game/unit.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 557,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "game/gametypes.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 367,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "game/game.cpp",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 18,
|
||||||
|
"line_ending": "Unix"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build_system": "",
|
||||||
|
"command_palette":
|
||||||
|
{
|
||||||
|
"height": 54.0,
|
||||||
|
"selected_items":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
"install",
|
||||||
|
"Package Control: Install Package"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"insta",
|
||||||
|
"Package Control: Install Package"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"width": 449.0
|
||||||
|
},
|
||||||
|
"console":
|
||||||
|
{
|
||||||
|
"height": 139.0
|
||||||
|
},
|
||||||
|
"distraction_free":
|
||||||
|
{
|
||||||
|
"menu_visible": true,
|
||||||
|
"show_minimap": false,
|
||||||
|
"show_open_files": false,
|
||||||
|
"show_tabs": false,
|
||||||
|
"side_bar_visible": false,
|
||||||
|
"status_bar_visible": false
|
||||||
|
},
|
||||||
|
"file_history":
|
||||||
|
[
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/game.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/game.cpp",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/ttrts/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/ttrts/main.cpp",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/test/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/README.md",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/maths/vector2.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/gametypes.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/unit.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/unitv.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/maths/mathtypes.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/orders.h",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/orders.cpp",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/game/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/ttrts/test/test.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/SDLGame.sublime-workspace",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/src/SDLThread.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/LEngine/src/LEngine.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/src/SDLWindow.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/src/SDLEventLoop.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Util/include/error.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Docs/html/types_8h_source.html",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Util/include/debug.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Util/src/debug.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Util/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/LEngine/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/src/main.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Util/include/types.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/src/SDLMain.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/include/SDLWindow.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/src/SDLRenderer.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/LEngine/include/LEngine.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/LEngine/include/LGameBase.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/LEngine/include/LObject.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/include/SDLEventLoop.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/include/SDLMain.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/include/SDLRenderer.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/include/GameOne.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/readme.md",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/include/TestDoxy.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/SDLInterface/SDL2/BUGS.txt",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/src/GameOne.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/LEngine/src/LGameBase.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/.gitignore",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/CMakeFiles/SDLGame.dir/CXX.includecache",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/CMakeFiles/SDLGame.dir/build.make",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/CMakeFiles/SDLGame.dir/depend.internal",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/CMakeFiles/SDLGame.dir/depend.make",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/CXX.includecache",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/DependInfo.cmake",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/build.make",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/cmake_clean.cmake",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/depend.internal",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/depend.make",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/sdlinterface/build/CMakeFiles/sdlinterface.dir/build.make",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/sdlinterface/build/util/build/CMakeFiles/util.dir/build.make",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/CMakeFiles/lengine.dir/link.txt",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/Libraries/LEngine/Makefile",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Engine/include/GameBase.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Engine/src/GameBase.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Engine/include/Engine.h",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/Libraries/Engine/src/Engine.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/include/GameOne.cpp",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/include/Prefix.pch",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/include/untitled",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame/Source/build/game",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/Engine/src/Engine.h",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/src/main.cpp",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/Util/include/types.h",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/SDLInterface/src/SDLEventLoop.cpp",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/SDLInterface/src/SDLWindow.cpp",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/SDLInterface/include/SDLEventLoop.h",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/SDLInterface/src/SDLMain.cpp",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/SDLInterface/include/SDLWindow.h",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/Engine/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/SDLInterface/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/Source/Libraries/Util/CMakeLists.txt",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/makeAndRun.sh",
|
||||||
|
"/home/mdiluzio/.config/sublime-text-2/Packages/User/cmake.sublime-build",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/include/types.h",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/build.sh",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/src/main.cpp"
|
||||||
|
],
|
||||||
|
"find":
|
||||||
|
{
|
||||||
|
"height": 35.0
|
||||||
|
},
|
||||||
|
"find_in_files":
|
||||||
|
{
|
||||||
|
"height": 0.0,
|
||||||
|
"where_history":
|
||||||
|
[
|
||||||
|
"/home/mdiluzio/Projects/ttrts",
|
||||||
|
"/home/mdiluzio/Projects/SDLGame",
|
||||||
|
"/home/mdiluzio/Projects/TestGame/src"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"find_state":
|
||||||
|
{
|
||||||
|
"case_sensitive": true,
|
||||||
|
"find_history":
|
||||||
|
[
|
||||||
|
"dir_t",
|
||||||
|
"tBoardPiece",
|
||||||
|
"piece_t",
|
||||||
|
"TBoardPiece",
|
||||||
|
"eError_quitRequested",
|
||||||
|
"eError_noErr",
|
||||||
|
"eError_SDL_Error",
|
||||||
|
"_GAMEBASE_H_",
|
||||||
|
"_OBJECT_H_",
|
||||||
|
"Object",
|
||||||
|
"GameBase",
|
||||||
|
"_ENGINE_H_",
|
||||||
|
"Engine",
|
||||||
|
"err = eError_noErr",
|
||||||
|
"err == eError_noErr",
|
||||||
|
"build",
|
||||||
|
")\n",
|
||||||
|
"success",
|
||||||
|
"["
|
||||||
|
],
|
||||||
|
"highlight": true,
|
||||||
|
"in_selection": false,
|
||||||
|
"preserve_case": false,
|
||||||
|
"regex": false,
|
||||||
|
"replace_history":
|
||||||
|
[
|
||||||
|
"square",
|
||||||
|
"square_t",
|
||||||
|
"piece_t",
|
||||||
|
"eError_quitRequest",
|
||||||
|
"_LGAMEBASE_H_",
|
||||||
|
"_LOBJECT_H_",
|
||||||
|
"LObject",
|
||||||
|
"LGameBase",
|
||||||
|
"_LENGINE_H_",
|
||||||
|
"LEngine",
|
||||||
|
"eError_noErr == err",
|
||||||
|
"err"
|
||||||
|
],
|
||||||
|
"reverse": false,
|
||||||
|
"show_context": true,
|
||||||
|
"use_buffer2": true,
|
||||||
|
"whole_word": false,
|
||||||
|
"wrap": true
|
||||||
|
},
|
||||||
|
"groups":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"selected": 1,
|
||||||
|
"sheets":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"buffer": 0,
|
||||||
|
"file": "game/unit.cpp",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 486,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
204,
|
||||||
|
204
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage",
|
||||||
|
"translate_tabs_to_spaces": false
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 1,
|
||||||
|
"file": "game/game.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 1722,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
301,
|
||||||
|
301
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage",
|
||||||
|
"translate_tabs_to_spaces": false
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 2,
|
||||||
|
"file": "game/board.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 0,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage",
|
||||||
|
"translate_tabs_to_spaces": false
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 3,
|
||||||
|
"file": "game/CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 320,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
253,
|
||||||
|
253
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/CMake/CMake.tmLanguage"
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 4,
|
||||||
|
"file": "ui/CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 293,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
293,
|
||||||
|
293
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/CMake/CMake.tmLanguage"
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 5,
|
||||||
|
"file": "CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 307,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
304,
|
||||||
|
304
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/CMake/CMake.tmLanguage"
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 6,
|
||||||
|
"file": "test/CMakeLists.txt",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 384,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
382,
|
||||||
|
382
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/CMake/CMake.tmLanguage"
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 7,
|
||||||
|
"file": "ui/board.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 1299,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
59,
|
||||||
|
59
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage",
|
||||||
|
"translate_tabs_to_spaces": false
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 8,
|
||||||
|
"file": "game/unit.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 557,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
115,
|
||||||
|
115
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage",
|
||||||
|
"translate_tabs_to_spaces": false
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 9,
|
||||||
|
"file": "game/gametypes.h",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 367,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
162,
|
||||||
|
162
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage"
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer": 10,
|
||||||
|
"file": "game/game.cpp",
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"buffer_size": 18,
|
||||||
|
"regions":
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"selection":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
18,
|
||||||
|
18
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"settings":
|
||||||
|
{
|
||||||
|
"syntax": "Packages/C++/C++.tmLanguage"
|
||||||
|
},
|
||||||
|
"translation.x": 0.0,
|
||||||
|
"translation.y": 0.0,
|
||||||
|
"zoom_level": 1.0
|
||||||
|
},
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"incremental_find":
|
||||||
|
{
|
||||||
|
"height": 0.0
|
||||||
|
},
|
||||||
|
"input":
|
||||||
|
{
|
||||||
|
"height": 33.0
|
||||||
|
},
|
||||||
|
"layout":
|
||||||
|
{
|
||||||
|
"cells":
|
||||||
|
[
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"cols":
|
||||||
|
[
|
||||||
|
0.0,
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
"rows":
|
||||||
|
[
|
||||||
|
0.0,
|
||||||
|
1.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"menu_visible": true,
|
||||||
|
"output.exec":
|
||||||
|
{
|
||||||
|
"height": 112.0
|
||||||
|
},
|
||||||
|
"replace":
|
||||||
|
{
|
||||||
|
"height": 0.0
|
||||||
|
},
|
||||||
|
"save_all_on_build": true,
|
||||||
|
"select_file":
|
||||||
|
{
|
||||||
|
"height": 0.0,
|
||||||
|
"selected_items":
|
||||||
|
[
|
||||||
|
],
|
||||||
|
"width": 0.0
|
||||||
|
},
|
||||||
|
"select_project":
|
||||||
|
{
|
||||||
|
"height": 0.0,
|
||||||
|
"selected_items":
|
||||||
|
[
|
||||||
|
],
|
||||||
|
"width": 0.0
|
||||||
|
},
|
||||||
|
"show_minimap": true,
|
||||||
|
"show_open_files": false,
|
||||||
|
"show_tabs": true,
|
||||||
|
"side_bar_visible": true,
|
||||||
|
"side_bar_width": 153.0,
|
||||||
|
"status_bar_visible": true
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue