Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F632911
tilemap.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
981 B
Referenced Files
None
Subscribers
None
tilemap.h
View Options
#ifndef TILEMAP_H
#define TILEMAP_H
#include
<iostream>
#include
<set>
#include
<SFML/Window.hpp>
#include
<SFML/Graphics.hpp>
#include
<SFML/System.hpp>
#include
"textureholder.h"
namespace
DP
{
enum
{
TILE_SIZE
=
40
,
BOARD_SIZE
=
16
,
TILE_BOARD_SIZE
=
80
};
sf
::
Vector2i
transPosition
(
int
pos
);
int
transCords
(
sf
::
Vector2i
cords
);
std
::
set
<
int
>
getNeighbours
(
int
pos
);
sf
::
IntRect
transPosIntoRect
(
int
pos
);
sf
::
Vector2i
transTilePosition
(
int
pos
);
sf
::
Vector2i
getCords
(
sf
::
Vector2f
position
);
sf
::
Vector2f
getScreenPos
(
sf
::
Vector2i
cords
);
}
class
TileMap
:
public
sf
::
Drawable
,
public
sf
::
Transformable
{
public
:
// bool load(TextureHolder *textures, sf::Vector2u tileSize, const int* tiles, unsigned int width, unsigned int height);
TileMap
();
private
:
virtual
void
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
;
sf
::
VertexArray
m_vertices
;
sf
::
Texture
*
m_tileset
;
TextureHolder
*
textures
;
};
#endif
// TILEMAP_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 3:36 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140067
Default Alt Text
tilemap.h (981 B)
Attached To
Mode
R82 deerportal
Attached
Detach File
Event Timeline