Skip to content

Commit

Permalink
Merge branch 'release/0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
npruehs committed Nov 19, 2016
2 parents 73197c1 + 5cfcacb commit fd10499
Show file tree
Hide file tree
Showing 285 changed files with 3,155 additions and 652 deletions.
6 changes: 0 additions & 6 deletions Doc/Example/CSharp.texportf

This file was deleted.

1 change: 0 additions & 1 deletion Doc/Example/CSharp.texportv

This file was deleted.

26 changes: 0 additions & 26 deletions Doc/Example/Tome Example Project.tproj

This file was deleted.

34 changes: 0 additions & 34 deletions Doc/Example/Tome Example Project.ttypes

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Template Version="2" ExportRoots="true">
<Name>CSharp</Name>
<Name>Event Classes (CSharp)</Name>
<FileExtension>.cs</FileExtension>
<TypeMap>
<Mapping TomeType="Armor Type" ExportedType="TomeExampleProject.Data.ArmorType"/>
<Mapping TomeType="Boolean" ExportedType="bool"/>
<Mapping TomeType="Color" ExportedType="string"/>
<Mapping TomeType="Damage Type" ExportedType="TomeExampleProject.Data.DamageType"/>
<Mapping TomeType="Integer" ExportedType="int"/>
<Mapping TomeType="Movement Type" ExportedType="TomeExampleProject.Data.MovementType"/>
<Mapping TomeType="Real" ExportedType="float"/>
<Mapping TomeType="Reference" ExportedType="string"/>
<Mapping TomeType="Resource" ExportedType="TomeExampleProject.Data.ResourceType"/>
<Mapping TomeType="String" ExportedType="string"/>
</TypeMap>
<IgnoredRecords/>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace TomeExampleProject.Events
{
using System.Collections.Generic;

public class Event
{
/// <summary>
/// Data of this event.
/// </summary>
public object Data { get; set; }

/// <summary>
/// Type of this event.
/// </summary>
public EventType Type { get; set; }
}

$RECORDS$
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// <summary>
/// $FIELD_DESCRIPTION$
/// </summary>
public $FIELD_TYPE$ $FIELD_ID$ { get; set; }
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Template Version="2" ExportRoots="true">
<Name>Event Deserializer (CSharp)</Name>
<FileExtension>.cs</FileExtension>
<TypeMap>
<Mapping TomeType="Boolean" ExportedType="Boolean"/>
<Mapping TomeType="Color" ExportedType="String"/>
<Mapping TomeType="Integer" ExportedType="Int32"/>
<Mapping TomeType="Real" ExportedType="Single"/>
<Mapping TomeType="Reference" ExportedType="String"/>
<Mapping TomeType="String" ExportedType="String"/>
</TypeMap>
<IgnoredRecords/>
<IgnoredFields/>
</Template>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace TomeExampleProject.Events
{
using System;
using System.IO;

public class BinaryEventDeserializer
{
public Event Deserialize(BinaryReader reader)
{
EventType type = (EventType)Enum.Parse(typeof(EventType), reader.ReadString());

switch (type)
{
$RECORDS$
}

throw new ArgumentException(string.Format("Unknown event type: {0}", type), "reader");
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
case EventType.$RECORD_ID$:
$RECORD_ID$ $RECORD_ID$ = new $RECORD_ID$();
$RECORD_FIELDS$
return new Event { Type = EventType.$RECORD_ID$, Data = $RECORD_ID$ };
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$RECORD_ID$.$FIELD_ID$ = reader.Read$FIELD_TYPE$();
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Template Version="2" ExportRoots="true">
<Name>Event Serializer (CSharp)</Name>
<FileExtension>.cs</FileExtension>
<TypeMap>
<Mapping TomeType="Boolean" ExportedType="bool"/>
<Mapping TomeType="Color" ExportedType="string"/>
<Mapping TomeType="Integer" ExportedType="int"/>
<Mapping TomeType="Real" ExportedType="float"/>
<Mapping TomeType="Reference" ExportedType="string"/>
<Mapping TomeType="String" ExportedType="string"/>
</TypeMap>
<IgnoredRecords/>
<IgnoredFields/>
</Template>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace TomeExampleProject.Events
{
using System;
using System.IO;

public class BinaryEventSerializer
{
public void Serialize(BinaryWriter writer, Event e)
{
writer.Write(e.Type.ToString());

switch (e.Type)
{
$RECORDS$
}

throw new ArgumentException(string.Format("Unknown event type: {0}", e.Type), "e");
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
case EventType.$RECORD_ID$:
$RECORD_ID$ $RECORD_ID$ = ($RECORD_ID$)e.Data;
$RECORD_FIELDS$
return;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
writer.Write($RECORD_ID$.$FIELD_ID$);
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Template Version="2" ExportRoots="true">
<Name>Event Types (CSharp)</Name>
<FileExtension>.cs</FileExtension>
<TypeMap>
<Mapping TomeType="Boolean" ExportedType="bool"/>
<Mapping TomeType="Color" ExportedType="string"/>
<Mapping TomeType="Integer" ExportedType="int"/>
<Mapping TomeType="Real" ExportedType="float"/>
<Mapping TomeType="Reference" ExportedType="string"/>
<Mapping TomeType="String" ExportedType="string"/>
</TypeMap>
<IgnoredRecords/>
<IgnoredFields/>
</Template>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace TomeExampleProject.Events
{
public enum EventType
{
$RECORDS$
}
}
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$RECORD_ID$
File renamed without changes.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Components/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<Records>
<Record Id="CooldownFinishedEvent" DisplayName="CooldownFinishedEvent">
<EntityId Value="0"/>
</Record>
<Record Id="DamageTakenEvent" DisplayName="DamageTakenEvent">
<EntityId Value="0"/>
<NewHealth Value="0"/>
<OldHealth Value="0"/>
</Record>
<Record Id="EffectAppliedEvent" DisplayName="EffectAppliedEvent">
<EffectId Value="0"/>
<EntityId Value="0"/>
</Record>
<Record Id="EntityAttackedEvent" DisplayName="EntityAttackedEvent">
<AttackerId Value="0"/>
<DefenderId Value="0"/>
</Record>
<Record Id="EntityCreatedEvent" DisplayName="EntityCreatedEvent">
<EntityId Value="0"/>
</Record>
<Record Id="EventKilledEvent" DisplayName="EventKilledEvent">
<EntityId Value="0"/>
</Record>
<Record Id="LevelLoadedEvent" DisplayName="LevelLoadedEvent">
<LevelName Value=""/>
</Record>
<Record Id="OwnerChangedEvent" DisplayName="OwnerChangedEvent">
<EntityId Value="0"/>
<NewOwnerId Value="0"/>
<OldOwnerId Value="0"/>
</Record>
<Record Id="TargetAcquiredEvent" DisplayName="TargetAcquiredEvent">
<EntityId Value="0"/>
<TargetId Value="0"/>
</Record>
<Record Id="TimerElapsedEvent" DisplayName="TimerElapsedEvent">
<EntityId Value="0"/>
</Record>
<Record Id="TimerStartedEvent" DisplayName="TimerStartedEvent">
<EntityId Value="0"/>
</Record>
</Records>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Fields>
<Field Id="AttackerId" DisplayName="AttackerId" Description="Id of the attacking entity." Type="Integer" DefaultValue="0"/>
<Field Id="DefenderId" DisplayName="DefenderId" Description="Id of the attacked entity." Type="Integer" DefaultValue="0"/>
<Field Id="EffectId" DisplayName="EffectId" Description="Id of the effect." Type="Integer" DefaultValue="0"/>
<Field Id="EntityId" DisplayName="EntityId" Description="Id of the entity." Type="Integer" DefaultValue="0"/>
<Field Id="LevelName" DisplayName="LevelName" Description="Name of the level." Type="String" DefaultValue=""/>
<Field Id="NewHealth" DisplayName="NewHealth" Description="Health of the entity after the change." Type="Integer" DefaultValue="0"/>
<Field Id="NewOwnerId" DisplayName="NewOwnerId" Description="Id of the owner after the change." Type="Integer" DefaultValue="0"/>
<Field Id="OldHealth" DisplayName="OldHealth" Description="Health of the entity before the change." Type="Integer" DefaultValue="0"/>
<Field Id="OldOwnerId" DisplayName="OldOwnerId" Description="Id of the owner before the change." Type="Integer" DefaultValue="0"/>
<Field Id="TargetId" DisplayName="TargetId" Description="Entity id of the target that entered the acquisition range." Type="Integer" DefaultValue="0"/>
</Fields>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<TomeProject Version="4">
<Name>Tome Example Code Generation Project</Name>
<Locale>en_US</Locale>
<Components>
<Path>Tome Example Code Generation Project</Path>
</Components>
<FieldDefinitions>
<Path>Tome Example Code Generation Project</Path>
</FieldDefinitions>
<Records>
<Path>Tome Example Code Generation Project</Path>
</Records>
<RecordExportTemplates>
<Path>CSharpEventTypes.texport</Path>
<Path>CSharpEventClasses.texport</Path>
<Path>CSharpEventSerializer.texport</Path>
<Path>CSharpEventDeserializer.texport</Path>
</RecordExportTemplates>
<Types>
<Path>Tome Example Code Generation Project</Path>
</Types>
</TomeProject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Types Version="2"/>
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/INI.texportvd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/JSON.texportvd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
,
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/Slash XML.texportcd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/Slash XML.texportld
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/Slash XML.texportmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/Slash XML.texportrd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
1 change: 1 addition & 0 deletions Doc/Examples/Tome Example Data Project/Slash XML.texportvd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,23 @@
<Field Id="AttackRange" DisplayName="Attack Range" Description="Range of attack of this entity, in m." Type="Real" Component="RangeComponent" DefaultValue="18.250"/>
<Field Id="Cooldown" DisplayName="Cooldown" Description="Time between two attacks of this entity, in seconds." Type="Real" Component="AttackComponent" DefaultValue="1.200"/>
<Field Id="DamageType" DisplayName="Damage Type" Description="Type of the damage dealt by this entity. Affects actual damage dealt by its attacks, depending on the target's armor type." Type="Damage Type" Component="AttackComponent" DefaultValue="Normal"/>
<Field Id="Health" DisplayName="Health" Description="Maximum health of this entity. If reduced to zero, it dies." Type="Integer" Component="HealthComponent" DefaultValue="200">
<Facet Key="Max" Value="2147483647"/>
<Facet Key="Min" Value="0"/>
</Field>
<Field Id="Health" DisplayName="Health" Description="Maximum health of this entity. If reduced to zero, it dies." Type="NonNegativeInteger" Component="HealthComponent" DefaultValue="200"/>
<Field Id="HealthRegeneration" DisplayName="Health Regeneration" Description="Health regeneration rate of this entity, in health / second." Type="Integer" Component="HealthComponent" DefaultValue="0"/>
<Field Id="Invulnerable" DisplayName="Invulnerable" Description="Whether this entity can take damage and be targeted, or not." Type="Boolean" Component="InvulnerabilityComponent" DefaultValue="False"/>
<Field Id="Mana" DisplayName="Mana" Description="Maximum mana of this entity. Regenerates automatically. Required for most spells." Type="Integer" Component="ManaComponent" DefaultValue="100">
<Facet Key="Max" Value="2147483647"/>
<Facet Key="Min" Value="0"/>
</Field>
<Field Id="Mana" DisplayName="Mana" Description="Maximum mana of this entity. Regenerates automatically. Required for most spells." Type="NonNegativeInteger" Component="ManaComponent" DefaultValue="100"/>
<Field Id="MP5" DisplayName="Mana Regeneration" Description="Mana regeneration rate of this entity, in mana / 5 seconds." Type="Integer" Component="ManaComponent" DefaultValue="3"/>
<Field Id="Mass" DisplayName="Mass" Description="Mass of this entity, in kg. Affects physics and collision separation." Type="Real" Component="PhysicsComponent" DefaultValue="1.0000">
<Facet Key="Max" Value="3.4028234663852886e+38"/>
<Facet Key="Min" Value="0"/>
</Field>
<Field Id="MovementSpeed" DisplayName="Movement Speed" Description="Speed of this entity, in m/s." Type="Real" Component="PhysicsComponent" DefaultValue="12.7500">
<Facet Key="Max" Value="3.4028234663852886e+38"/>
<Facet Key="Min" Value="0"/>
</Field>
<Field Id="Name" DisplayName="Name" Description="Name of this entity." Type="String" Component="NameComponent" DefaultValue="">
<Facet Key="MaxLength" Value="64"/>
</Field>
<Field Id="Projectile" DisplayName="Projectile" Description="Type of the projectile fired by this entity when attacking." Type="Reference" Component="AttackComponent" DefaultValue="">
<Facet Key="RequiredAncestor" Value="Projectile"/>
</Field>
<Field Id="Mass" DisplayName="Mass" Description="Mass of this entity, in kg. Affects physics and collision separation." Type="NonNegativeReal" Component="PhysicsComponent" DefaultValue="1.0000"/>
<Field Id="MovementSpeed" DisplayName="Movement Speed" Description="Speed of this entity, in m/s." Type="NonNegativeReal" Component="PhysicsComponent" DefaultValue="12.7500"/>
<Field Id="Name" DisplayName="Name" Description="Name of this entity." Type="ShortString" Component="NameComponent" DefaultValue=""/>
<Field Id="Projectile" DisplayName="Projectile" Description="Type of the projectile fired by this entity when attacking." Type="ProjectileReference" Component="AttackComponent" DefaultValue=""/>
<Field Id="ProjectileBase" DisplayName="Projectile Base" Description="Position to spawn projectiles at, relative to the position of this entity." Type="Vector (3D Real)" Component="AttackComponent">
<DefaultValue Key="X" Value="0"/>
<DefaultValue Key="Y" Value="5"/>
<DefaultValue Key="Z" Value="0"/>
</Field>
<Field Id="ResourceCosts" DisplayName="Resource Costs" Description="Resources to pay in order to create this entity." Type="ResourceCostMap" Component="CostsComponent" DefaultValue=""/>
<Field Id="RotationSpeed" DisplayName="Rotation Speed" Description="Rotation speed of this entity, in degrees / second." Type="Real" Component="PhysicsComponent" DefaultValue="360.0000">
<Facet Key="Max" Value="3.4028234663852886e+38"/>
<Facet Key="Min" Value="0"/>
</Field>
<Field Id="SightRadius" DisplayName="Sight Radius" Description="Range of sight of this entity, in m." Type="Real" Component="SightComponent" DefaultValue="25.0000">
<Facet Key="Max" Value="3.4028234663852886e+38"/>
<Facet Key="Min" Value="0"/>
</Field>
<Field Id="RotationSpeed" DisplayName="Rotation Speed" Description="Rotation speed of this entity, in degrees / second." Type="NonNegativeReal" Component="PhysicsComponent" DefaultValue="360.0000"/>
<Field Id="SightRadius" DisplayName="Sight Radius" Description="Range of sight of this entity, in m." Type="NonNegativeReal" Component="SightComponent" DefaultValue="25.0000"/>
<Field Id="Sprite" DisplayName="Sprite" Description="Name of the sprite used to visualize this entity." Type="String" Component="VisualizationComponent" DefaultValue=""/>
<Field Id="SpriteColor" DisplayName="Sprite Color" Description="Color to render the sprite of this entity with." Type="Color" Component="VisualizationComponent" DefaultValue="#ffffff"/>
</Fields>
Loading

0 comments on commit fd10499

Please sign in to comment.