42 lines
786 B
C++
42 lines
786 B
C++
/*
|
|
* BackgroundRenderer.h
|
|
*
|
|
* Created on: Nov 30, 2016
|
|
* Author: tibi
|
|
*/
|
|
|
|
#ifndef GRAPHICS_BACKGROUNDRENDERER_H_
|
|
#define GRAPHICS_BACKGROUNDRENDERER_H_
|
|
|
|
#include <base/Component.h>
|
|
#include <base/Camera.h>
|
|
#include <base/Transform.h>
|
|
#include <model/Level.h>
|
|
|
|
namespace farmlands {
|
|
namespace graphics {
|
|
|
|
class BackgroundRenderer: public base::Component
|
|
{
|
|
public:
|
|
BackgroundRenderer();
|
|
virtual ~BackgroundRenderer();
|
|
|
|
virtual void onInitialize() override;
|
|
virtual void onRender() override;
|
|
|
|
// Public fields
|
|
model::Level* level;
|
|
|
|
private:
|
|
void getCell(SDL_Texture* texture, uint32_t cell, int* outX, int* outY);
|
|
|
|
// Private fields
|
|
base::RenderContext* m_context;
|
|
};
|
|
|
|
} /* namespace graphics */
|
|
} /* namespace farmlands */
|
|
|
|
#endif /* GRAPHICS_BACKGROUNDRENDERER_H_ */
|