Add movingobject
This commit is contained in:
parent
f1467d7d99
commit
629a3d9e08
4 changed files with 26 additions and 1 deletions
|
@ -63,6 +63,7 @@ add_executable(${PROJECT_NAME}
|
|||
src/inputbag.cpp
|
||||
src/tileiterator.cpp
|
||||
src/texture.cpp
|
||||
src/movingobject.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} SYSTEM
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "mycurryConfig.h"
|
||||
#include "key.hpp"
|
||||
#include "inputbag.hpp"
|
||||
#include "movingobject.hpp"
|
||||
#include "worldgrid.hpp"
|
||||
#include "worldviewport.hpp"
|
||||
#include "texture.hpp"
|
||||
|
@ -32,13 +33,15 @@ namespace curry {
|
|||
struct IngameScene::LocalData {
|
||||
LocalData (const vec2us& parTileSize, const vec2us& parTileCount, cloonel::SDLMain* parSDLMain) :
|
||||
world(parTileSize, parTileCount),
|
||||
viewport(&world, vec2i(parSDLMain->WidthHeight()))
|
||||
viewport(&world, vec2i(parSDLMain->WidthHeight())),
|
||||
player(parTileSize)
|
||||
{
|
||||
}
|
||||
|
||||
WorldGrid world;
|
||||
WorldViewport viewport;
|
||||
Texture worldtiles;
|
||||
MovingObject player;
|
||||
};
|
||||
|
||||
IngameScene::IngameScene (cloonel::SDLMain* parSDLMain) :
|
||||
|
|
8
src/movingobject.cpp
Normal file
8
src/movingobject.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "movingobject.hpp"
|
||||
|
||||
namespace curry {
|
||||
MovingObject::MovingObject (const vec2us& parSize) :
|
||||
m_size(parSize)
|
||||
{
|
||||
}
|
||||
} //namespace curry
|
13
src/movingobject.hpp
Normal file
13
src/movingobject.hpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "vector.hpp"
|
||||
|
||||
namespace curry {
|
||||
class MovingObject {
|
||||
public:
|
||||
MovingObject (const vec2us& parSize);
|
||||
|
||||
private:
|
||||
vec2us m_size;
|
||||
};
|
||||
} //namespace curry
|
Loading…
Add table
Reference in a new issue