Browse Source

Create the WorldEntity class, for objects with world coordinates.

legacy
Sam Hocevar sam 14 years ago
parent
commit
de3da71331
8 changed files with 104 additions and 1 deletions
  1. +1
    -1
      src/Makefile.am
  2. +1
    -0
      src/core.h
  3. +46
    -0
      src/worldentity.cpp
  4. +40
    -0
      src/worldentity.h
  5. +2
    -0
      win32/deushax.vcxproj
  6. +6
    -0
      win32/deushax.vcxproj.filters
  7. +2
    -0
      win32/monsterz.vcxproj
  8. +6
    -0
      win32/monsterz.vcxproj.filters

+ 1
- 1
src/Makefile.am View File

@@ -8,7 +8,7 @@ liblol_a_SOURCES = \
forge.cpp forge.h video.cpp video.h timer.cpp timer.h bitfield.h \
profiler.cpp profiler.h input.h input.cpp world.cpp world.h \
sample.cpp sample.h sampler.cpp sampler.h text.cpp text.h \
emitter.cpp emitter.h numeric.h \
emitter.cpp emitter.h numeric.h worldentity.cpp worldentity.h \
\
sdlinput.cpp sdlinput.h \
\


+ 1
- 0
src/core.h View File

@@ -35,6 +35,7 @@
#include "sample.h"
#include "text.h"
#include "tileset.h"
#include "worldentity.h"
#include "world.h"

// Other objects


+ 46
- 0
src/worldentity.cpp View File

@@ -0,0 +1,46 @@
//
// Lol Engine
//
// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://sam.zoy.org/projects/COPYING.WTFPL for more details.
//

#if defined HAVE_CONFIG_H
# include "config.h"
#endif

#include <cstdlib>
#include <cstdio>

#include "core.h"

/*
* Public WorldEntity class
*/

WorldEntity::WorldEntity()
{
}

WorldEntity::~WorldEntity()
{
}

char const *WorldEntity::GetName()
{
return "<worldentity>";
}

void WorldEntity::TickGame(float deltams)
{
Entity::TickGame(deltams);
}

void WorldEntity::TickDraw(float deltams)
{
Entity::TickDraw(deltams);
}


+ 40
- 0
src/worldentity.h View File

@@ -0,0 +1,40 @@
//
// Lol Engine
//
// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://sam.zoy.org/projects/COPYING.WTFPL for more details.
//

//
// The GraphicEntity class
// -----------------------
//

#if !defined __DH_WORLDENTITY_H__
#define __DH_WORLDENTITY_H__

#include "entity.h"

class WorldEntity : public Entity
{
public:
float3 position;
float3 rotation;
float3 velocity;
float3 bbox[2];

protected:
WorldEntity();
virtual ~WorldEntity();

virtual char const *GetName();

virtual void TickGame(float deltams);
virtual void TickDraw(float deltams);
};

#endif // __DH_WORLDENTITY_H__


+ 2
- 0
win32/deushax.vcxproj View File

@@ -41,6 +41,7 @@
<ClInclude Include="..\src\tileset.h" />
<ClInclude Include="..\src\timer.h" />
<ClInclude Include="..\src\video.h" />
<ClInclude Include="..\src\worldentity.h" />
<ClInclude Include="..\src\world.h" />
</ItemGroup>
<ItemGroup>
@@ -72,6 +73,7 @@
<ClCompile Include="..\src\timer.cpp" />
<ClCompile Include="..\src\video.cpp" />
<ClCompile Include="..\src\world.cpp" />
<ClCompile Include="..\src\worldentity.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{EF1A4E80-63FA-4EB0-B834-12B6C500F31C}</ProjectGuid>


+ 6
- 0
win32/deushax.vcxproj.filters View File

@@ -81,6 +81,9 @@
<ClInclude Include="..\src\video.h">
<Filter>lolengine</Filter>
</ClInclude>
<ClInclude Include="..\src\worldentity.h">
<Filter>lolengine</Filter>
</ClInclude>
<ClInclude Include="..\src\world.h">
<Filter>lolengine</Filter>
</ClInclude>
@@ -163,6 +166,9 @@
<ClCompile Include="..\src\world.cpp">
<Filter>lolengine</Filter>
</ClCompile>
<ClCompile Include="..\src\worldentity.cpp">
<Filter>lolengine</Filter>
</ClCompile>
<ClCompile Include="..\deushax\debugsprite.cpp" />
<ClCompile Include="..\deushax\deushax.cpp" />
<ClCompile Include="..\deushax\game.cpp" />


+ 2
- 0
win32/monsterz.vcxproj View File

@@ -44,6 +44,7 @@
<ClInclude Include="..\src\tileset.h" />
<ClInclude Include="..\src\timer.h" />
<ClInclude Include="..\src\video.h" />
<ClInclude Include="..\src\worldentity.h" />
<ClInclude Include="..\src\world.h" />
</ItemGroup>
<ItemGroup>
@@ -77,6 +78,7 @@
<ClCompile Include="..\src\timer.cpp" />
<ClCompile Include="..\src\video.cpp" />
<ClCompile Include="..\src\world.cpp" />
<ClCompile Include="..\src\worldentity.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{17f0f184-4436-4d08-b8aa-16572ea238db}</ProjectGuid>


+ 6
- 0
win32/monsterz.vcxproj.filters View File

@@ -81,6 +81,9 @@
<ClInclude Include="..\src\video.h">
<Filter>lolengine</Filter>
</ClInclude>
<ClInclude Include="..\src\worldentity.h">
<Filter>lolengine</Filter>
</ClInclude>
<ClInclude Include="..\src\world.h">
<Filter>lolengine</Filter>
</ClInclude>
@@ -166,6 +169,9 @@
<ClCompile Include="..\src\world.cpp">
<Filter>lolengine</Filter>
</ClCompile>
<ClCompile Include="..\src\worldentity.cpp">
<Filter>lolengine</Filter>
</ClCompile>
<ClCompile Include="..\monsterz\board.cpp" />
<ClCompile Include="..\monsterz\game.cpp" />
<ClCompile Include="..\monsterz\monsterz.cpp" />


Loading…
Cancel
Save