GL - Update uml, LevelParser.h.cpp ObjectDefines.h

This commit is contained in:
Pontus Fransson 2014-01-24 09:00:59 +01:00
parent 121fd51c45
commit 0f5517398d
5 changed files with 94 additions and 23 deletions

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="12.0"> <diagram program="umlet" version="12.1">
<zoom_level>8</zoom_level> <zoom_level>8</zoom_level>
<element> <element>
<type>com.umlet.element.Package</type> <type>com.umlet.element.Package</type>
<coordinates> <coordinates>
<x>552</x> <x>552</x>
<y>320</y> <y>360</y>
<w>584</w> <w>584</w>
<h>368</h> <h>368</h>
</coordinates> </coordinates>
@ -16,7 +16,7 @@
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>440</x> <x>440</x>
<y>88</y> <y>128</y>
<w>128</w> <w>128</w>
<h>40</h> <h>40</h>
</coordinates> </coordinates>
@ -28,7 +28,7 @@
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>768</x> <x>768</x>
<y>472</y> <y>512</y>
<w>136</w> <w>136</w>
<h>104</h> <h>104</h>
</coordinates> </coordinates>
@ -39,12 +39,12 @@
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>560</x> <x>560</x>
<y>544</y> <y>584</y>
<w>232</w> <w>232</w>
<h>136</h> <h>136</h>
</coordinates> </coordinates>
<panel_attributes>&lt;&lt;Interface&gt;&gt; <panel_attributes>&lt;&lt;Interface&gt;&gt;
Parser LevelParser
-- --
Functions: Functions:
vector&lt;struct&gt; Parse(); vector&lt;struct&gt; Parse();
@ -60,7 +60,7 @@ const int FileVersion;
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>624</x> <x>624</x>
<y>208</y> <y>248</y>
<w>80</w> <w>80</w>
<h>24</h> <h>24</h>
</coordinates> </coordinates>
@ -72,7 +72,7 @@ const int FileVersion;
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>640</x> <x>640</x>
<y>208</y> <y>248</y>
<w>40</w> <w>40</w>
<h>168</h> <h>168</h>
</coordinates> </coordinates>
@ -83,7 +83,7 @@ const int FileVersion;
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>384</x> <x>384</x>
<y>176</y> <y>216</y>
<w>256</w> <w>256</w>
<h>56</h> <h>56</h>
</coordinates> </coordinates>
@ -97,7 +97,7 @@ m2=1..1
<type>com.umlet.element.Package</type> <type>com.umlet.element.Package</type>
<coordinates> <coordinates>
<x>248</x> <x>248</x>
<y>320</y> <y>360</y>
<w>248</w> <w>248</w>
<h>160</h> <h>160</h>
</coordinates> </coordinates>
@ -108,7 +108,7 @@ m2=1..1
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>800</x> <x>800</x>
<y>360</y> <y>400</y>
<w>208</w> <w>208</w>
<h>136</h> <h>136</h>
</coordinates> </coordinates>
@ -127,7 +127,7 @@ Privates:</panel_attributes>
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>328</x> <x>328</x>
<y>208</y> <y>248</y>
<w>80</w> <w>80</w>
<h>24</h> <h>24</h>
</coordinates> </coordinates>
@ -138,11 +138,11 @@ Privates:</panel_attributes>
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>256</x> <x>256</x>
<y>360</y> <y>400</y>
<w>232</w> <w>232</w>
<h>104</h> <h>104</h>
</coordinates> </coordinates>
<panel_attributes>Defines.h <panel_attributes>ObjectDefines.h
&lt;&lt;Header file&gt;&gt; &lt;&lt;Header file&gt;&gt;
-- --
Enum ObjectType(static, dynamic, specials); Enum ObjectType(static, dynamic, specials);
@ -156,7 +156,7 @@ Struct specials</panel_attributes>
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>680</x> <x>680</x>
<y>176</y> <y>216</y>
<w>152</w> <w>152</w>
<h>56</h> <h>56</h>
</coordinates> </coordinates>
@ -170,7 +170,7 @@ Uses&gt;</panel_attributes>
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>816</x> <x>816</x>
<y>192</y> <y>232</y>
<w>128</w> <w>128</w>
<h>40</h> <h>40</h>
</coordinates> </coordinates>
@ -182,7 +182,7 @@ Uses&gt;</panel_attributes>
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>928</x> <x>928</x>
<y>560</y> <y>600</y>
<w>200</w> <w>200</w>
<h>120</h> <h>120</h>
</coordinates> </coordinates>
@ -196,7 +196,7 @@ functions for creating the right structs</panel_attributes>
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>768</x> <x>768</x>
<y>576</y> <y>616</y>
<w>176</w> <w>176</w>
<h>56</h> <h>56</h>
</coordinates> </coordinates>
@ -210,7 +210,7 @@ Uses&gt;</panel_attributes>
<type>com.umlet.element.Class</type> <type>com.umlet.element.Class</type>
<coordinates> <coordinates>
<x>560</x> <x>560</x>
<y>360</y> <y>400</y>
<w>232</w> <w>232</w>
<h>136</h> <h>136</h>
</coordinates> </coordinates>
@ -230,7 +230,7 @@ Privates:
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>344</x> <x>344</x>
<y>208</y> <y>248</y>
<w>40</w> <w>40</w>
<h>168</h> <h>168</h>
</coordinates> </coordinates>
@ -241,7 +241,7 @@ Privates:
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>840</x> <x>840</x>
<y>208</y> <y>248</y>
<w>88</w> <w>88</w>
<h>168</h> <h>168</h>
</coordinates> </coordinates>
@ -253,7 +253,7 @@ Privates:
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>656</x> <x>656</x>
<y>472</y> <y>512</y>
<w>40</w> <w>40</w>
<h>88</h> <h>88</h>
</coordinates> </coordinates>
@ -264,7 +264,7 @@ Privates:
<type>com.umlet.element.Relation</type> <type>com.umlet.element.Relation</type>
<coordinates> <coordinates>
<x>544</x> <x>544</x>
<y>64</y> <y>104</y>
<w>136</w> <w>136</w>
<h>160</h> <h>160</h>
</coordinates> </coordinates>

View File

@ -185,6 +185,8 @@
<ClInclude Include="IAttatchment.h" /> <ClInclude Include="IAttatchment.h" />
<ClInclude Include="Level.h" /> <ClInclude Include="Level.h" />
<ClInclude Include="Object.h" /> <ClInclude Include="Object.h" />
<ClInclude Include="ObjectDefines.h" />
<ClInclude Include="LevelParser.h" />
<ClInclude Include="Player.h" /> <ClInclude Include="Player.h" />
<ClInclude Include="StaticObject.h" /> <ClInclude Include="StaticObject.h" />
<ClInclude Include="Team.h" /> <ClInclude Include="Team.h" />
@ -202,6 +204,7 @@
<ClCompile Include="Game_PlayerData.cpp" /> <ClCompile Include="Game_PlayerData.cpp" />
<ClCompile Include="IAttatchment.cpp" /> <ClCompile Include="IAttatchment.cpp" />
<ClCompile Include="Level.cpp" /> <ClCompile Include="Level.cpp" />
<ClCompile Include="LevelParser.cpp" />
<ClCompile Include="Object.cpp" /> <ClCompile Include="Object.cpp" />
<ClCompile Include="Player.cpp" /> <ClCompile Include="Player.cpp" />
<ClCompile Include="StaticObject.cpp" /> <ClCompile Include="StaticObject.cpp" />

View File

@ -0,0 +1,2 @@
#include "LevelParser.h"

View File

@ -0,0 +1,28 @@
#ifndef LEVEL_PARSER_H
#define LEVEL_PARSER_H
#include <vector>
#include "ObjectDefines.h"
namespace GameLogic
{
namespace LevelLoader
{
class LevelParser
{
public:
LevelParser();
~LevelParser();
//
std::vector<ObjectTypeHeader> Parse();
//
ObjectTypeHeader ParseHeader();
private:
};
}
}
#endif

View File

@ -0,0 +1,38 @@
#ifndef OBJECT_DEFINES_H
#define OBJECT_DEFINES_H
namespace GameLogic
{
enum ObjectType
{
ObjectType_Static,
ObjectType_Dynamic,
ObjectType_NUM_OF_TYPES,
ObjectType_Unknow = -1,
};
struct ObjectTypeHeader
{
ObjectType typeID;
};
struct ObjectHeader : public ObjectTypeHeader
{
//Model,
//Texture
//Position
float position[3];
//Rotation
float rotation[3];
//Scale
float scale[3];
};
}
#endif