Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
AIAssignment1LineOfSight
map.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <vector>
4
#include <string>
5
#include <fstream>
6
#include <iostream>
7
#include "
texture.h
"
8
#include "
wall.h
"
9
13
class
Map
14
{
15
private
:
19
struct
id
20
{
21
/*The type of the Entity - x = Blank, w = Wall*/
22
char
type
;
23
/*The index of the Entity within its array*/
24
int
index
;
25
32
id
(
char
inType,
int
inIndex)
33
{
34
type = inType;
35
index = inIndex;
36
}
37
};
38
40
std::vector<std::vector<id*>>
map
;
42
std::vector<Wall*>
walls
;
43
/*Vec2 positions of the Creature starts*/
44
Vec2
player
,
botA
,
botB
;
45
/*A pointer to the spritesheet Texture*/
46
Texture
*
spritesheet
;
47
52
void
loadMap
(std::string);
53
54
public
:
60
Map
(
Texture
*, std::string);
61
65
~Map
();
66
74
int
getMapPositionIndex
(
int
,
int
);
75
83
char
getMapPositionType
(
int
,
int
);
84
91
Wall
*
getWall
(
int
);
92
97
int
getNumberOfWalls
();
98
103
int
getNumberOfXObjects
();
104
109
int
getNumberOfYObjects
();
110
115
Vec2
getInitialPlayer
();
116
121
Vec2
getInitialBotA
();
122
127
Vec2
getInitialBotB
();
128
};
Map::getInitialBotB
Vec2 getInitialBotB()
Definition:
map.cpp:195
Map::spritesheet
Texture * spritesheet
Definition:
map.h:46
Map::map
std::vector< std::vector< id * > > map
Definition:
map.h:40
Map::id::type
char type
Definition:
map.h:22
Vec2
Creates a Vec2 structure with functions Creates a Vec2 structure with overloaded operators to create ...
Definition:
vec2.h:7
Map::loadMap
void loadMap(std::string)
Definition:
map.cpp:36
Map::id
Definition:
map.h:19
texture.h
Map::getInitialPlayer
Vec2 getInitialPlayer()
Definition:
map.cpp:177
Map::id::id
id(char inType, int inIndex)
Definition:
map.h:32
Map::~Map
~Map()
Definition:
map.cpp:17
Map::getNumberOfXObjects
int getNumberOfXObjects()
Definition:
map.cpp:159
Map::getNumberOfWalls
int getNumberOfWalls()
Definition:
map.cpp:150
Map::getInitialBotA
Vec2 getInitialBotA()
Definition:
map.cpp:186
Wall
Creates a Wall object that inherits Entity. Creates a Wall object that inherits Entity and contains t...
Definition:
wall.h:12
Map
Creates a Map object.
Definition:
map.h:13
Map::walls
std::vector< Wall * > walls
Definition:
map.h:42
Texture
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition:
texture.h:13
Map::getMapPositionIndex
int getMapPositionIndex(int, int)
Definition:
map.cpp:123
Map::id::index
int index
Definition:
map.h:24
Map::Map
Map(Texture *, std::string)
Definition:
map.cpp:6
Map::botB
Vec2 botB
Definition:
map.h:44
Map::getNumberOfYObjects
int getNumberOfYObjects()
Definition:
map.cpp:168
Map::getWall
Wall * getWall(int)
Definition:
map.cpp:141
Map::botA
Vec2 botA
Definition:
map.h:44
Map::player
Vec2 player
Definition:
map.h:44
Map::getMapPositionType
char getMapPositionType(int, int)
Definition:
map.cpp:132
wall.h
Generated on Wed Apr 1 2015 11:45:24 for Jamie Slowgrove - AI Assignment 1 by
1.8.8