#ifndef __SCENE_H__
#define __SCENE_H__

#include <SDL2/SDL.h>

#define CAMERA_WIDTH 160
#define CAMERA_HEIGHT 90


typedef int RenderId_t;

typedef struct RenderObject {
    int z;
    float width, height; //ratio between 0 & 1 of the monitor resolution
    float angle_degre;
	float angle_x, angle_y; // position for the center of the rotation
    SDL_Surface * surface;
	char name[40];
} RenderObject_t;

typedef struct SceneObject {
	float x,y;
	RenderObject_t renderObj;
	SDL_Texture * cache;
	RenderId_t id;
} SceneObject_t;

typedef struct Scene {
	SceneObject_t * objects;
	int objectCount;
	unsigned long objectArraySize;
	int lastId;
    float x,y;
} Scene_t;

extern const RenderObject_t EMPTY_RENDER_OBJECT;

void scene_render(const Scene_t * scene);
void scene_removeRenderObject(Scene_t * scene, RenderId_t id);
void scene_moveRenderObject(Scene_t * scene, RenderId_t id, float x, float y);
RenderId_t scene_addRenderObject(Scene_t * scene, RenderObject_t object, int x, int y);
void scene_free(Scene_t * scene);

#endif
