mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-01 16:42:37 +00:00
4578b1af0d
This breaks console scaling for now (con_width and con_height are gone), but is a major step towards window resize support as console stuff should never have been in viddef_t in the first place. The client screen init code now sets up a screen view (actually the renderer's scr_view) that is passed to the client console so it can know the size of the screen. The same view is used by the status bar code. Also, the ram/cache/paused icon drawing is moved into the client screen update code. A bit of duplication, but I do plan on merging that eventually.
62 lines
1.7 KiB
C
62 lines
1.7 KiB
C
/*
|
|
QF/plugin/console.h
|
|
|
|
General plugin data and structures
|
|
|
|
Copyright (C) 2001 Jeff Teunissen <deek@quakeforge.net>
|
|
|
|
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.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to:
|
|
|
|
Free Software Foundation, Inc.
|
|
59 Temple Place - Suite 330
|
|
Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
|
|
#ifndef __QF_plugin_console_h
|
|
#define __QF_plugin_console_h
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <QF/console.h>
|
|
#include <QF/plugin.h>
|
|
|
|
typedef struct console_funcs_s {
|
|
void (*init) (void);
|
|
void (*print) (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
|
void (*process_input) (void);
|
|
void (*draw_console) (void);
|
|
void (*new_map) (void);
|
|
void (*set_state) (con_state_t state);
|
|
} console_funcs_t;
|
|
|
|
typedef struct console_data_s {
|
|
struct dstring_s *dl_name;
|
|
int *dl_percent;
|
|
double *realtime;
|
|
double *frametime;
|
|
int force_commandline;
|
|
int ormask;
|
|
void (*quit) (void);
|
|
struct cbuf_s *cbuf;
|
|
struct view_s *screen_view;
|
|
struct view_s *view;
|
|
struct view_s *status_view;
|
|
float lines;
|
|
int (*exec_line)(void *data, const char *line);
|
|
void *exec_data;
|
|
} console_data_t;
|
|
|
|
#endif // __QF_plugin_console_h
|