Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F131781
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/boardelem.cpp b/boardelem.cpp
index 1273f20..f956d3c 100644
--- a/boardelem.cpp
+++ b/boardelem.cpp
@@ -1,49 +1,30 @@
#include "boardelem.h"
namespace efc {
sf::RectangleShape createNeighbour(int pos) {
sf::RectangleShape rectangle(sf::Vector2f(efc::TILE_SIZE, efc::TILE_SIZE));
sf::Vector2i cords(efc::transPosition(pos));
rectangle.setFillColor(sf::Color(240, 240, 240,98));
rectangle.setOutlineColor(sf::Color(24,24,24, 90));
rectangle.setPosition(cords.x*efc::TILE_SIZE, cords.y*efc::TILE_SIZE);
-
-// rectangle.setOutlineThickness(0.5);
return rectangle;
}
}
-efc::BoardElem::BoardElem(TextureHolder *textures,int pos, int type)
+efc::BoardElem::BoardElem(int pos, int type)
{
-
-// textureTiles = &textures->textureTiles;
this->pos = pos;
this->type = type;
-
sf::Vector2i cords = efc::transPosition(pos);
int y_type = (int) type / efc::TILE_BOARD_SIZE;
int x_type = type % efc::TILE_BOARD_SIZE;
-
setPosition(cords.x*efc::TILE_SIZE,cords.y*efc::TILE_SIZE);
-// setTexture(textures->textureTiles);
setTextureRect(sf::IntRect(x_type*efc::TILE_SIZE, y_type*efc::TILE_SIZE, efc::TILE_SIZE, efc::TILE_SIZE));
-
-// Sprite::SetBlendMode(sf::BlendMode::BlendAdd);
-
-
-
-
-
-
-
-
-
-
}
diff --git a/boardelem.h b/boardelem.h
index b181769..739c2b9 100644
--- a/boardelem.h
+++ b/boardelem.h
@@ -1,34 +1,34 @@
#ifndef BOARDELEM_H
#define BOARDELEM_H
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "tilemap.h"
#include "textureholder.h"
namespace efc {
sf::RectangleShape createNeighbour(int pos);
class BoardElem: public sf::Sprite
{
public:
BoardElem();
- BoardElem(TextureHolder *textures,int pos, int type);
+ BoardElem(int pos, int type);
int pos;
int type;
sf::Texture* textureTiles;
private:
const sf::Texture* textureElem;
static const sf::Texture& textureElem2;
TextureHolder *textures;
TextureHolder myHolder;
};
}
#endif // BOARDELEM_H
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jun 16, 12:21 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71079
Default Alt Text
(2 KB)
Attached To
Mode
R82 deerportal
Attached
Detach File
Event Timeline