/* The universe class handles global data, such as timing and camera position data. */
/* Note that the universe *type* is called "universe_t"; "universe" is used for the instance. */
/* Philip Richard Boulain <prb102@ecs.soton.ac.uk> */

#include "world.h" /* Also brings in GLUT, defining GLfloat; and movable */

typedef struct {
	int lastidle;   /* Time of last idle(), for animation (milliseconds) */
	int lastsecond; /* Time of last full second (milliseconds) */
	int fps;        /* Frames rendered within the last second */
	movable camera; /* Position of the camera */
	                /* Remember, this is an actual instance, not a pointer */
	movable helppos;/* Camera position for help screen */
	movable scrnpos;/* Camera position for screenshot */
	movable* tour;  /* Camera positions for tour */
	char yinvert;   /* True if the mouse y-axis should be inverted */
	char frozen;    /* True if mouselook is enabled */
	world* world;   /* Current world */
} universe_t;

void universe_init(universe_t* u);

/* There is no universe_destroy, as it would only be called on exit. */
/* However, GLUT design issues have already scuppered chances of a clean exit. */
