//----------------------------------------------------------------------------
//  EDGE2 Console Main
//----------------------------------------------------------------------------
// 
//  Copyright (c) 1999-2009  The EDGE2 Team.
// 
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//----------------------------------------------------------------------------

#ifndef __CON_MAIN_H
#define __CON_MAIN_H

#include "../ddf/types.h"

#include <vector>

void CON_TryCommand(const char *cmd);

// Prints messages.  cf printf.
void CON_Printf(const char *message,...) GCCATTR((format(printf, 1, 2)));

// Like CON_Printf, but appends an extra '\n'. Should be used for player
// messages that need more than MessageLDF.

void CON_Message(const char *message, ...) GCCATTR((format(printf, 1, 2)));

// Looks up the string in LDF, appends an extra '\n', and then writes it to
// the console. Should be used for most player messages.
void CON_MessageLDF(const char *lookup, ...);

// -ACB- 1999/09/22
// Introduced because MSVC and DJGPP handle #defines differently
void CON_PlayerMessage(int plyr, const char *message, ...) GCCATTR((format(printf, 2, 3)));
// Looks up in LDF.
void CON_PlayerMessageLDF(int plyr, const char *message, ...);

// this color will apply to the next CON_Message or CON_Printf call.
void CON_MessageColor(rgbcol_t col);

typedef enum
{
	vs_notvisible,     // invisible
	vs_maximal,        // fullscreen + a command line
	vs_toggle
}
visible_t;

// Displays/Hides the console.
void CON_SetVisible(visible_t v);

int CON_MatchAllCmds(std::vector<const char *>& list,
                     const char *pattern);

// Camera-man system interface.[TODO: Move it to a separate file]
namespace cameraman
{
	void Reset();
	void Serialize(int reading, const char *map = NULL);
	void Activate(int activate);
	void Toggle();
	void ToggleHelpers();
	int Add(float x, float y, float z, float ax, float ay, float fov, const char *name);
	int Remove(int id);
	int SetPosition(int id, float x, float y, float z);
	int SetAngles(int id, float ax, float ay);
	int SetFov(int id, float fov);
	int IsActive();
	int GetId(std::string name);
	int GetStartId();
	int GetEndId();
	void SetStartId(int id);
	void SetEndId(int id);
	void SetStep(float value);
	void Print();
}

#endif // __CON_MAIN_H

//--- editor settings ---
// vi:ts=4:sw=4:noexpandtab
