mirror of
https://github.com/dylanbenzi/terminaltrainers.git
synced 2026-11-27 07:47:01 +00:00
add Map definition
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef TILEMAP_H
|
||||
#define TILEMAP_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class TileMap {
|
||||
public:
|
||||
//3 arrays to store the converted 2D map layer data
|
||||
vector<int> background;
|
||||
vector<int> foreground;
|
||||
vector<int> collision;
|
||||
|
||||
int mapWidth;
|
||||
int mapHeight;
|
||||
|
||||
int getTile(int x, int y) const;
|
||||
int setTile(int x, int y, int tileID) const;
|
||||
|
||||
void loadMap(string file);
|
||||
|
||||
};
|
||||
#endif
|
||||
Binary file not shown.
@@ -1,4 +1,3 @@
|
||||
#include <cstddef>
|
||||
#define OLC_PGE_APPLICATION
|
||||
#include "olcPixelGameEngine.h"
|
||||
|
||||
@@ -121,7 +120,7 @@ protected:
|
||||
|
||||
int main() {
|
||||
TerminalTrainers demo;
|
||||
if(demo.Construct(640, 360, 8, 8))
|
||||
if(demo.Construct(256, 240, 4, 4))
|
||||
demo.Start();
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user