/*
 * Client.h
 *
 *  Created on: 14.01.2011
 *      Author: gmueller
 */

#ifndef CLIENT_H_
#define CLIENT_H_

#include "Application.h"
#include "Schedule.h"
#include "Renderer.h"
#include "Window.h"

#include "oglfont.h"

namespace gln {

class Client: public Application {
public:
	void initialize(Config &config);
	void update();
	void shutdown();
private:
	Window window;
	Renderer renderer;
	double last_bomb; //TODO: use bomb schedule;
	int last_x, last_y;
	double phi, theta;
	double camX, camY, camZ;
	Schedule accelerate_schudule;
	int width, height;
	//TrueTyeFont font;
	oglf_font_t font;
void processInput(double step);
	void accelerate(double x, double y, double z);
	void drop_bomb(double rx, double ry, double rz, double ttl);
	void loadConsoleFont();

	void onExplosion(double x, double y, double z);

	void drawLevel();
	void drawPlayer(player_t *player);
};

} // namespace grln

#endif /* CLIENT_H_ */
