#pragma once
#include <windows.h>
#include <iostream>
using namespace std;
#include "C:\L\Map\IsoHexTile.h"
/*
	Setting up some definitive window sizes.
	These really should be in the specific game(s) themselves 
	so that each project will not impede upon anothers
*/

#define _PW_Buffer_MaxW	256
#define _PW_Buffer_MaxH 256
//Enumerate map mode...this is generic to each game - M. White 22 March, 2019
//Hex01 = Tiles flat side down, Hex02 Tile point down - M. White 22 March, 2019
enum MapModes { SQR_Map = 0, DIA_Map, RHO_Map, HEX_Map01, HEX_Map02, TOTAL_MAP_TYPES };
//A point in two-dimensional space
struct MyPoint
{
	int x, y;
};
class NewPlayWindow
{
public:
		 NewPlayWindow	();
		 ~NewPlayWindow	();
	void Reset			();

	//Use this to set up initially...
	void SetBasics		(int x, int y, int w, int h, int type);
	void Move			(int x, int y);
	void CalcMods		();								

	//Use these only as Maintainence for the Class-PlayWindow
	void SetOriginX		(int data);				int GetOriginX		() const;
	void SetOriginY		(int data);				int GetOriginY		() const;
	void SetWidth		(int data);				int GetWidth		() const;
	void SetHeight		(int data);				int GetHeight		() const;
/*	void SetCenterX		(int Pixel);*/			int GetCenterX		() const;
/*	void SetCenterY		(int Pixel);*/			int GetCenterY		() const;
	void SetType		(int data);				int GetType			() const;
	void SetTileW		(int W);				int GetTileW		() const;
	void SetTileH		(int H);				int GetTileH		() const;
/*	void SetTileOffX	(int xVar);*/			int GetTileOffX		() const;
/*	void SetTileOffY	(int yVar);*/			int GetTileOffY		() const;
	void SetNumCol		(int Number);			int GetNumCol		() const;
	void SetNumRow		(int Number);			int GetNumRow		() const;
/*	void SetCentTileX	(int xVar);*/			int GetCentCol		() const;
/*	void SetCentTileY	(int yVar);*/			int GetCentRow		() const;

	//Get the coordinates of the screen window
	int	gRectL			() { return scrnRect.left;		};
	int	gRectR			() { return scrnRect.right;		};
	int	gRectT			() { return scrnRect.top;		};
	int	gRectB			() { return scrnRect.bottom;	};
	RECT GetRect		() const { return scrnRect;		};

	IsoHexTile	PW_Buffer[_PW_Buffer_MaxW][_PW_Buffer_MaxH];

private:
	MyPoint		Origin;			//Where is the top left?
	RECT		scrnRect;		//Pre-calculated RECT
	int			Width;			//How wide in pixels?
	int			Height;			//How high in pixels?
	int			CenterX;		//Middle of screen (pixel point)
	int			CenterY;		//Middle of screen (pixel point)
	int			ScrnType;		//Square, SqrIso-, Iso-, Hex- map?

	int			TileW;			//Tile Width in Pixels...
	int			TileH;			//Tile Height in Pixels...

	int			NumCols;		//Used number of Columns...
	int			NumRows;		//Used number of Rows...
	int			CentCol;		//Middle of used columns
	int			CentRow;		//Middle of used rows

	int			OffSetX;		//Offset determines where off-screen data begins printing
	int			OffSetY;		//Offset determines where off-screen data begins printing
};