ScummVM API documentation
screen.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef MADS_CORE_SCREEN_H
23#define MADS_CORE_SCREEN_H
24
25#include "mads/core/window.h"
26
27namespace MADS {
28
29/* some colors */
30
31#define black 0x00
32#define blue 0x01
33#define green 0x02
34#define cyan 0x03
35#define red 0x04
36#define magenta 0x05
37#define yellow 0x06
38#define white 0x07
39#define hi_black 0x08
40#define hi_blue 0x09
41#define hi_green 0x0a
42#define hi_cyan 0x0b
43#define hi_red 0x0c
44#define hi_magenta 0x0d
45#define hi_yellow 0x0e
46#define hi_white 0x0f
47
48#define colorbyte(f,b) ( ( (b) << 4) + f )
49
50#define colorhash(color) ((long) ((((long)color.r) << 16) + (((long)color.g) << 8) + (((long)color.b) ) ))
51
52#define screen_char_add(x,y) ( ( ( (y) * 80) + x) * 2 )
53#define screen_color_add(x,y) ( ( ( ( (y) * 80) + x) * 2 ) + 1 )
54
55extern byte *screen;
56extern int *screen_bound_x;
57
58extern int screen_video_mode;
59extern int screen_max_x;
60extern int screen_max_y;
61
62extern int screen_center_x;
63extern int screen_center_y;
64
65extern int screen_save_mode;
66extern int screen_save_size;
67
68extern int screen_normal_color;
69extern int screen_hilite_color;
70
71extern int screen_line_width;
72
73extern Palette pal_orig;
74extern Buffer scr_live;
75
76extern Window screen_active;
77
81extern void screen_set_size(short numlines);
82
86extern void screen_wipe_line(short ul_x, short ul_y, short len, short wipe_color, byte wipe_char);
87
88extern short screen_out(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
89extern short screen_put(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
90extern void screen_set_colors(int normal_color, int hilite_color);
91extern void screen_set_line_width(int line_width);
92
93extern short screen_show_line(const char *outstring, short locx, short locy);
94extern short screen_write(const char *outstring);
95extern short screen_write_line(const char *outstring);
96extern void screen_clear(int clear_color);
97extern void screen_dominant_mode(int dominant_mode);
98extern void screen_init(int video_mode);
99extern void screen_init_dual(int mono_left);
100extern void screen_shutdown_dual(int clear_flag);
101extern void screen_init_graphics(int which_mode);
102extern void screen_shutdown_graphics(int clear_flag);
103extern void screen_show_spot(const char *message, int wx, int wy, int class_, int num);
104
105extern int screen_printf(int x, int y, const char *string, ...);
106extern int screen_print(const char *string, ...);
107
108extern void screen_init_text(int which_mode);
109extern void screen_shutdown_text(int clear_flag);
110extern void screen_save();
111extern void screen_restore();
112extern short screen_show_wide(const char *outstring, short locx, short locy, short width);
113
114} // namespace MADS
115
116#endif
Definition: display_client.h:113
Definition: atari-screen.h:42