Non-filled box drawing method added to graphics system
World system design startedGui_Panel_Refactor
parent
8ad6eb2880
commit
212545c67c
@ -0,0 +1,57 @@
|
||||
/******************************************************************************
|
||||
* File - world.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/01/12 (y/m/d)
|
||||
* Mod Date - 2022/01/12 (y/m/d)
|
||||
* Description - Manages a game "world". A world is made up of regions which
|
||||
* are subdivisions of the world. Each region contains: a set
|
||||
* of images for the maps layers, a list of objects that spawn
|
||||
* in this region and static collision data.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef WORLD_H_
|
||||
#define WORLD_H_
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <utils/types.h>
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
class Graphics;
|
||||
class Camera;
|
||||
class GameObject;
|
||||
class Script;
|
||||
class Image;
|
||||
|
||||
class World
|
||||
{
|
||||
public:
|
||||
struct Region
|
||||
{
|
||||
Script* mRegionScript;
|
||||
Point2Di mCoords;
|
||||
std::vector<GameObject*> mObjects;
|
||||
std::vector<Image*> mLayers;
|
||||
};
|
||||
|
||||
public: // INTERFACE
|
||||
|
||||
void OnLoad();
|
||||
void OnUnload();
|
||||
void Update(float dt);
|
||||
void Render(Graphics* pGraphics);
|
||||
void RenderToTexture(Graphics* pGraphics, Image* pTexture);
|
||||
|
||||
private:
|
||||
Camera* mpCamera;
|
||||
std::vector<GameObject*> mWorldObjects;
|
||||
std::vector<Script*> mWorldScripts; // Maybe just want 1 script?
|
||||
Sizei mRegionSize;
|
||||
std::map<Point2Di, Region*> mRegions;
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif // WORLD_H_
|
||||
Loading…
Reference in New Issue