Skip to content

Commit

Permalink
Update the version to 3.6.35
Browse files Browse the repository at this point in the history
  • Loading branch information
cainhuang committed Jul 12, 2017
1 parent b2caeb9 commit b5e3f05
Show file tree
Hide file tree
Showing 418 changed files with 7,198 additions and 16,722 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cmake_minimum_required (VERSION 2.8)
# set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Profile" CACHE STRING "" FORCE)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)

set (BEHAVIAC_PACKAGE_VERSION 3.6.34)
set (BEHAVIAC_PACKAGE_VERSION 3.6.35)

#option( BUILD_SHARED_LIBS "set to OFF to build static libraries" ON )
SET(BUILD_SHARED_LIBS ON CACHE BOOL "set to OFF to build static libraries")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/Tencent/behaviac/blob/master/license.txt)
[![Release Version](https://img.shields.io/badge/release-3.6.34-red.svg)](https://github.com/Tencent/behaviac/releases)
[![Release Version](https://img.shields.io/badge/release-3.6.35-red.svg)](https://github.com/Tencent/behaviac/releases)
[![Updates](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20%7C%20Windows%20%7C%20Linux%20-brightgreen.svg)](https://github.com/Tencent/behaviac/blob/master/history.txt)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/behaviac/pulls)

Expand Down
Binary file removed docs/behaviac.chm
Binary file not shown.
7 changes: 7 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2017-7-11 3.6.35
Improve the C++ types generation.
Fix a bug of time edition of the Wait node.
Fix a bug of renaming the agent.
Fix a bug of reentering the SelectorProbability node.
Fix other bugs of the editor.

2017-5-16 3.6.34
Fix a bug for the Parallel node.
Fix a bug for exporting the return type of the method.
Expand Down
2 changes: 1 addition & 1 deletion inc/behaviac/common/_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#define BEHAVIAC_RELEASE 0
#endif

#define BEHAVIAC_VERSION_STRING "3.6.34"
#define BEHAVIAC_VERSION_STRING "3.6.35"

9 changes: 8 additions & 1 deletion inc/behaviac/common/member.h
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,10 @@ namespace behaviac {
return NULL;
}

virtual bool IsMethod() const {
return true;
}

virtual void load(const char* instance, behaviac::vector<behaviac::string>& paramStrs) {
BEHAVIAC_UNUSED_VAR(instance);
BEHAVIAC_UNUSED_VAR(paramStrs);
Expand Down Expand Up @@ -1734,7 +1738,10 @@ namespace behaviac {
}

virtual IValue* GetIValueFrom(behaviac::Agent* self, IInstanceMember* firstParam) {
BEHAVIAC_UNUSED_VAR(firstParam);
BEHAVIAC_ASSERT(firstParam->IsMethod());
Agent* agent = Agent::GetParentAgent(self, this->_instance);
firstParam->run(agent);

return GetIValue(self);
}

Expand Down
37 changes: 17 additions & 20 deletions inc/behaviac/common/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ namespace behaviac {
static BehaviorLoader* ms_behaviorLoader;

static behaviac::map<behaviac::string, TypeCreator*> _Creators;
//static behaviac::map<behaviac::string, Type*> _typesRegistered;

public:
BEHAVIAC_DECLARE_MEMORY_OPERATORS(AgentMeta);
Expand Down Expand Up @@ -165,15 +164,16 @@ namespace behaviac {
const behaviac::map<uint32_t, IProperty*>& GetMemberProperties();
IInstanceMember* GetMethod(uint32_t methodId);

static IProperty* CreateProperty(const behaviac::string& typeName, uint32_t propId, const char* propName, const char* valueStr);
static IProperty* CreateArrayItemProperty(const behaviac::string& typeName, uint32_t parentId, const char* parentName);
static IInstanceMember* CreateInstanceProperty(const behaviac::string& typeName, const char* instance, IInstanceMember* indexMember, uint32_t varId);
static IInstanceMember* CreateInstanceConst(const behaviac::string& typeName, const char* valueStr);
static IProperty* CreateCustomizedProperty(const behaviac::string& typeName, uint32_t propId, const char* propName, const char* valueStr);
static IProperty* CreateCustomizedArrayItemProperty(const behaviac::string& typeName, uint32_t parentId, const char* parentName);
static IProperty* CreateProperty(const char* typeName, uint32_t propId, const char* propName, const char* valueStr);
static IProperty* CreateArrayItemProperty(const char* typeName, uint32_t parentId, const char* parentName);
static IInstanceMember* CreateInstanceProperty(const char* typeName, const char* instance, IInstanceMember* indexMember, uint32_t varId);
static IInstanceMember* CreateInstanceConst(const char* typeName, const char* valueStr);
static IProperty* CreateCustomizedProperty(const char* typeName, uint32_t propId, const char* propName, const char* valueStr);
static IProperty* CreateCustomizedArrayItemProperty(const char* typeName, uint32_t parentId, const char* parentName);

static void CreatorAddElement(const behaviac::string& typeName, TypeCreator* tc);
static void CreatorRemoveElement(const behaviac::string& typeName);
static TypeCreator* GetTypeCreator(const char* typeName);
static void AddTypeCreator(const char* typeName, TypeCreator* tc);
static void RemoveTypeCreator(const char* typeName);

static const char* ParseInstanceNameProperty(const char* fullName, char* instanceName, char* agentType);

Expand Down Expand Up @@ -214,8 +214,9 @@ namespace behaviac {
&CreatorCustomizedProperty<RegisteredType>,
&CreatorCustomizedArrayItemProperty<RegisteredType>
);
//_Creators[typeName] = tc;
CreatorAddElement(typeName, tc);

AddTypeCreator(typeName, tc);

char vectorTypeName[1024];
string_sprintf(vectorTypeName, "vector<%s>", typeName);

Expand All @@ -226,25 +227,21 @@ namespace behaviac {
CreatorInstanceConst<behaviac::vector<RegisteredType> >,
&CreatorCustomizedProperty<behaviac::vector<RegisteredType> >,
&CreatorCustomizedArrayItemProperty<behaviac::vector<RegisteredType> >);
//_Creators[vectorTypeName] = tcl;
CreatorAddElement(vectorTypeName, tcl);

AddTypeCreator(vectorTypeName, tcl);
}

return true;
}

template<typename T>
static void UnRegister(const char* typeName) {
//_typesRegistered.Remove(typeName);

//_Creators.erase(typeName);
CreatorRemoveElement(typeName);
RemoveTypeCreator(typeName);

char vectorTypeName[1024];
string_sprintf(vectorTypeName, "vector<%s>", typeName);

//_Creators.erase(vectorTypeName);
CreatorRemoveElement(vectorTypeName);
RemoveTypeCreator(vectorTypeName);
}

private:
Expand Down Expand Up @@ -278,7 +275,7 @@ namespace behaviac {

behaviac::string typeName = behaviac::GetTypeDescString<Type>();

return AgentMeta::CreateInstanceConst(typeName, value);
return AgentMeta::CreateInstanceConst(typeName.c_str(), value);
}

return ParseProperty(value);
Expand Down
5 changes: 3 additions & 2 deletions inc/behaviac/common/socket/socketconnect_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "behaviac/common/thread/wrapper.h"
#include "behaviac/common/container/string.h"


#include <string>

#define USING_BEHAVIAC_SEQUENTIAL 1
Expand Down Expand Up @@ -106,11 +107,11 @@ namespace behaviac {
#endif

struct ModuleInfo {
enum { MAX_PATH_LEN = 128 };
enum { BEHAVIAC_MAX_PATH_LEN = 128 };

unsigned long moduleBase;
unsigned long moduleSize;
char debugInfoFile[MAX_PATH_LEN];
char debugInfoFile[BEHAVIAC_MAX_PATH_LEN];
};

namespace CommandId {
Expand Down
6 changes: 6 additions & 0 deletions integration/demo_running/behaviac/Base/Member.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,9 @@ public virtual IValue GetIValue(Agent self)

public virtual IValue GetIValue(Agent self, IInstanceMember firstParam)
{
Agent agent = Utils.GetParentAgent(self, _instance);
firstParam.Run(agent);

return GetIValue(self);
}

Expand Down Expand Up @@ -3988,6 +3991,9 @@ public object GetValueObject(Agent self)

public IValue GetIValue(Agent self, IInstanceMember firstParam)
{
//Agent agent = Utils.GetParentAgent(self, _instance);
//firstParam.Run(agent);

return GetIValue(self);
}

Expand Down
23 changes: 19 additions & 4 deletions integration/demo_running/behaviac/Base/Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,15 @@ public ICustomizedProperty CreateCustomizedArrayItemProperty(uint id, string nam
}
}

public static string GetTypeName(string typeName)
{
typeName = typeName.Replace("*", "");
return typeName;
}

public static ICustomizedProperty CreateProperty(string typeName, uint propId, string propName, string valueStr)
{
typeName = GetTypeName(typeName);
if (_Creators.ContainsKey(typeName))
{
TypeCreator creator = _Creators[typeName];
Expand All @@ -350,6 +357,7 @@ public static ICustomizedProperty CreateProperty(string typeName, uint propId, s

public static ICustomizedProperty CreateArrayItemProperty(string typeName, uint parentId, string parentName)
{
typeName = GetTypeName(typeName);
if (_Creators.ContainsKey(typeName))
{
TypeCreator creator = _Creators[typeName];
Expand All @@ -362,6 +370,7 @@ public static ICustomizedProperty CreateArrayItemProperty(string typeName, uint

public static IInstanceMember CreateInstanceProperty(string typeName, string instance, IInstanceMember indexMember, uint varId)
{
typeName = GetTypeName(typeName);
if (_Creators.ContainsKey(typeName))
{
TypeCreator creator = _Creators[typeName];
Expand All @@ -374,6 +383,7 @@ public static IInstanceMember CreateInstanceProperty(string typeName, string ins

public static IInstanceMember CreateInstanceConst(string typeName, string valueStr)
{
typeName = GetTypeName(typeName);
if (_Creators.ContainsKey(typeName))
{
TypeCreator creator = _Creators[typeName];
Expand All @@ -386,6 +396,7 @@ public static IInstanceMember CreateInstanceConst(string typeName, string valueS

public static ICustomizedProperty CreateCustomizedProperty(string typeName, uint id, string name, string valueStr)
{
typeName = GetTypeName(typeName);
if (_Creators.ContainsKey(typeName))
{
TypeCreator creator = _Creators[typeName];
Expand All @@ -398,6 +409,7 @@ public static ICustomizedProperty CreateCustomizedProperty(string typeName, uint

public static ICustomizedProperty CreateCustomizedArrayItemProperty(string typeName, uint id, string name)
{
typeName = GetTypeName(typeName);
if (_Creators.ContainsKey(typeName))
{
TypeCreator creator = _Creators[typeName];
Expand Down Expand Up @@ -729,11 +741,14 @@ public static IInstanceMember ParseProperty(string value, List<string> tokens =
uint propId = Utils.MakeVariableId(propName + arrayItem);

// property
IProperty p = meta.GetProperty(propId);

if (p != null)
if (meta != null)
{
return p.CreateInstance(instantceName, indexMember);
IProperty p = meta.GetProperty(propId);

if (p != null)
{
return p.CreateInstance(instantceName, indexMember);
}
}

// local var
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ public override void load(ISerializableNode node)
protected override bool onenter(Agent pAgent)
{
Debug.Check(this.m_children.Count > 0);
Debug.Check(this.m_activeChildIndex == CompositeTask.InvalidChildIndex);

//if the following assert failed, just comment it out
//Debug.Check(this.m_activeChildIndex == CompositeTask.InvalidChildIndex);

//to reset it anyway in case onexit is not called for some reason
this.m_activeChildIndex = CompositeTask.InvalidChildIndex;

//SelectorProbability pSelectorProbabilityNode = this.GetNode() is SelectorProbability;

Expand Down
2 changes: 1 addition & 1 deletion integration/demo_running/behaviac/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.34
3.6.35
5 changes: 0 additions & 5 deletions integration/unity/Assets/AssetStoreTools.meta

This file was deleted.

5 changes: 0 additions & 5 deletions integration/unity/Assets/AssetStoreTools/Editor.meta

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
47 changes: 0 additions & 47 deletions integration/unity/Assets/AssetStoreTools/Editor/icon.png.meta

This file was deleted.

Binary file not shown.
Loading

0 comments on commit b5e3f05

Please sign in to comment.