other fixes
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <renderer/3d/mesh/dynamic/dynamic_mesh.hpp>
|
||||
#include <renderer/3d/pipeline/dynamic/dynpip_options.hpp>
|
||||
#include "states/game/renderer/renderer_dynamic_pair.hpp"
|
||||
#include "states/game/terrain/heightmap.hpp"
|
||||
#include <renderer/renderer.hpp>
|
||||
|
||||
using Tyra::DynamicMesh;
|
||||
@@ -28,14 +29,14 @@ class Enemy {
|
||||
Enemy(TextureRepository* repo);
|
||||
~Enemy();
|
||||
|
||||
DynamicMesh* bodyMesh;
|
||||
DynamicMesh* gunMesh;
|
||||
DynamicMesh* mesh;
|
||||
DynPipOptions* options;
|
||||
std::vector<RendererDynamicPair*> pairs;
|
||||
RendererDynamicPair* pair;
|
||||
|
||||
void update(const Vec4& playerPosition);
|
||||
void update(const Heightmap& heightmap, const Vec4& playerPosition);
|
||||
|
||||
private:
|
||||
Vec4 direction;
|
||||
void allocateOptions();
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ class Heightmap {
|
||||
const Vec4& rightDown);
|
||||
~Heightmap();
|
||||
|
||||
const float& getHeightOffset(const Vec4& playerPosition);
|
||||
const float& getHeightOffset(const Vec4& playerPosition) const;
|
||||
|
||||
bool isOutside(const Vec4& position) const;
|
||||
|
||||
float** map;
|
||||
s16 mapWidth, mapHeight;
|
||||
@@ -31,12 +33,12 @@ class Heightmap {
|
||||
Vec4 leftUp, rightDown;
|
||||
|
||||
private:
|
||||
float getWidthPercentage(const Vec4& playerPosition);
|
||||
float getHeightPercentage(const Vec4& playerPosition);
|
||||
float getWidthPercentage(const Vec4& playerPosition) const;
|
||||
float getHeightPercentage(const Vec4& playerPosition) const;
|
||||
void allocateMap(const unsigned char* data, const int& width,
|
||||
const int& height);
|
||||
float getGameHeight(const u8& inputColor, const u8& minColor,
|
||||
const u8& maxColor);
|
||||
const u8& maxColor) const;
|
||||
};
|
||||
|
||||
} // namespace Demo
|
||||
|
||||
Reference in New Issue
Block a user