Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "Headers/WarSceneActions.h"

#include "Core/Headers/Console.h"
#include "Scenes/WarScene/Headers/WarSceneAISceneImpl.h"

namespace Divide {
namespace AI {

    WarSceneAction::WarSceneAction(ActionType type, const stringImpl& name, F32 cost) : GOAPAction(stringAlg::fromBase(name), cost)
    {
        _type = type;
        _parentScene = nullptr;
    }

    WarSceneAction::~WarSceneAction()
    {
    }

    bool WarSceneAction::preAction() const {
        return _parentScene->preAction(_type, this);
    }

    bool WarSceneAction::postAction() const {
        return _parentScene->postAction(_type, this);
    }

	ApproachFlag::ApproachFlag(const stringImpl& name, F32 cost) : WarSceneAction(ACTION_APPROACH_FLAG, name, cost)
    {
    }

	CaptureFlag::CaptureFlag(const stringImpl& name, F32 cost) : WarSceneAction(ACTION_CAPTURE_FLAG, name, cost)
    {
    }

	ReturnFlag::ReturnFlag(const stringImpl& name, F32 cost) : WarSceneAction(ACTION_RETURN_FLAG, name, cost)
    {
    }

	ProtectFlagCarrier::ProtectFlagCarrier(const stringImpl& name,
                                           F32 cost) : WarSceneAction(ACTION_PROTECT_FLAG_CARRIER, name, cost)
    {
    }

	RecoverFlag::RecoverFlag(const stringImpl& name, F32 cost) : WarSceneAction(ACTION_RECOVER_FLAG, name, cost)
    {
    }

	KillEnemy::KillEnemy(const stringImpl& name, F32 cost) : WarSceneAction(ACTION_KILL_ENEMY, name, cost)
	{
	}

	ReturnHome::ReturnHome(const stringImpl& name, F32 cost) : WarSceneAction(ACTION_RETURN_TO_BASE, name, cost)
	{
	}
	 
}; //namespace AI
}; //namespace Divide

Commits for Divide-Framework/trunk/Source Code/Scenes/WarScene/AESOPActions/WarSceneActions.cpp

Diff revisions: vs.
Revision Author Commited Message
331 Diff Diff IonutCava picture IonutCava Sat 06 Dec, 2014 20:53:45 +0000

[Ionut]
- Limited line length to 132 characters to improve readability and diff-comparisons
- Refactored memory allocation/deallocation functions
- Fixed a few compatibility issues with HashMap.h
- Fixed a bug in GPU Skinning shaders (cast a float to int)

322 Diff Diff IonutCava picture IonutCava Sat 06 Sep, 2014 20:33:47 +0000

[Ionut]
- Refactored most of Boost related code to be C++11 based
— Boost is only used for ThreadPool, Mutex handling, XML parsing and networking (ASIO)
— Function binds, threads, regex, NonCopyable base, Hashing algorithms and more are now using C++11 libraries
- Replaced all FOR_EACH calls with standard, range, “for” calls

321 Diff Diff IonutCava picture IonutCava Wed 03 Sep, 2014 22:05:15 +0000

[Ionut]
- Added support (and enabled by default) for the EASTL library (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html / https://github.com/paulhodge/EASTL)
— Strings, vectors and hash_maps can be combined from EASTL, STL and Boost (not all combinations work. e.g. EASTL strings with STL/Boost containers due to the lack of a proper hash function)

320 Diff Diff IonutCava picture IonutCava Sun 31 Aug, 2014 21:45:33 +0000

[Ionut]
- More AI work (entity captures flag and returns it to base)

318 Diff Diff IonutCava picture IonutCava Sat 30 Aug, 2014 17:35:53 +0000

[Ionut]
- Wrapped the entire code in a “Divide” namespace
- VertexBuffers now call “shrink_to_fit” on all internal data storage
- Improved some vector performance by preferring “emplace_back” instead of “push_back” + proepr usage of reserve / resize
- Wrapped OIS specific types and classes in Divide::Input namespace
- Added the messageBox.layout file (forgot it in the previous few commits)

317 Diff Diff IonutCava picture IonutCava Tue 26 Aug, 2014 22:08:06 +0000

[Ionut]
- More AI Work

316 Diff Diff IonutCava picture IonutCava Mon 25 Aug, 2014 22:04:03 +0000

[Ionut]
- Cleaned up AI classes
- Added basic Order <-> Goal system

312 Diff Diff IonutCava picture IonutCava Fri 22 Aug, 2014 22:46:19 +0000

[Ionut]
- Replaced AESOP with CPPGOAP (https://github.com/cpowell/cppgoap)
- Added a better interface to GOAP classes and objects via the AISceneImpl
- Actions, goals and orders basic infrastructure

311 IonutCava picture IonutCava Mon 18 Aug, 2014 21:40:52 +0000

[Ionut]
- Added a basic AESOP implementation
- Moved all AI related classes under the “AI” namespace