Move console.cpp specific constants out of header

This commit is contained in:
Kp 2017-03-18 18:07:36 +00:00
parent 0f57787601
commit 056115642b
2 changed files with 13 additions and 9 deletions

View file

@ -29,16 +29,8 @@ enum con_priority
CON_DEBUG
};
#define CON_LINES_ONSCREEN 18
#define CON_SCROLL_OFFSET (CON_LINES_ONSCREEN - 3)
#define CON_LINES_MAX 128
constexpr std::size_t CON_LINE_LENGTH = 2048;
#define CON_STATE_OPEN 2
#define CON_STATE_OPENING 1
#define CON_STATE_CLOSING -1
#define CON_STATE_CLOSED -2
struct console_buffer
{
char line[CON_LINE_LENGTH];

View file

@ -34,9 +34,21 @@
#include "dxxsconf.h"
#include "compiler-array.h"
constexpr unsigned CON_LINES_ONSCREEN = 18;
constexpr auto CON_SCROLL_OFFSET = CON_LINES_ONSCREEN - 3;
constexpr unsigned CON_LINES_MAX = 128;
enum con_state {
CON_STATE_CLOSING = -1,
CON_STATE_CLOSED = 0,
CON_STATE_OPENING = 1,
CON_STATE_OPEN = 2
};
static RAIIPHYSFS_File gamelog_fp;
static array<console_buffer, CON_LINES_MAX> con_buffer;
static int con_state = CON_STATE_CLOSED, con_scroll_offset = 0, con_size = 0;
static con_state con_state;
static int con_scroll_offset, con_size;
static void con_add_buffer_line(const con_priority priority, const char *const buffer, const size_t len)
{