Upstream for PGE updates.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
olcPixelGameEngine/Videos/CarCrimeCity/Part2/cCell_Plane.h

35 lines
852 B

#pragma once
#include "cCell.h"
#include "olcPixelGameEngine.h"
#include "olcPGEX_Graphics3D.h"
#include <map>
enum CELL_PLANE
{
PLANE_GRASS,
PLANE_ASPHALT
};
class cCell_Plane : public cCell
{
public:
cCell_Plane(cCityMap* map, int x, int y, CELL_PLANE type);
~cCell_Plane();
protected:
CELL_PLANE nType = PLANE_GRASS;
private:
olc::GFX3D::mesh* meshUnitQuad = nullptr;
olc::Sprite* sprGrass = nullptr;
olc::Sprite* sprPavement = nullptr;
public:
virtual bool LinkAssets(std::map<std::string, olc::Sprite*> &mapTextures, std::map<std::string, olc::GFX3D::mesh*> &mapMesh, std::map<std::string, olc::GFX3D::mat4x4> &mapTransforms);
virtual bool Update(float fElapsedTime);
virtual bool DrawBase(olc::PixelGameEngine *pge, olc::GFX3D::PipeLine &pipe);
virtual bool DrawAlpha(olc::PixelGameEngine *pge, olc::GFX3D::PipeLine &pipe);
};