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 
27 namespace 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 
55 extern byte *screen;
56 extern int *screen_bound_x;
57 
58 extern int screen_video_mode;
59 extern int screen_max_x;
60 extern int screen_max_y;
61 
62 extern int screen_center_x;
63 extern int screen_center_y;
64 
65 extern int screen_save_mode;
66 extern int screen_save_size;
67 
68 extern int screen_normal_color;
69 extern int screen_hilite_color;
70 
71 extern int screen_line_width;
72 
73 extern Palette pal_orig;
74 extern Buffer scr_live;
75 
76 extern Window screen_active;
77 
81 extern void screen_set_size(short numlines);
82 
86 extern void screen_wipe_line(short ul_x, short ul_y, short len, short wipe_color, byte wipe_char);
87 
88 extern short screen_out(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
89 extern short screen_put(const char *outstring, short strcolor, short selcolor, short str_x, short str_y);
90 extern void screen_set_colors(int normal_color, int hilite_color);
91 extern void screen_set_line_width(int line_width);
92 
93 extern short screen_show_line(const char *outstring, short locx, short locy);
94 extern short screen_write(const char *outstring);
95 extern short screen_write_line(const char *outstring);
96 extern void screen_clear(int clear_color);
97 extern void screen_dominant_mode(int dominant_mode);
98 extern void screen_init(int video_mode);
99 extern void screen_init_dual(int mono_left);
100 extern void screen_shutdown_dual(int clear_flag);
101 extern void screen_init_graphics(int which_mode);
102 extern void screen_shutdown_graphics(int clear_flag);
103 extern void screen_show_spot(const char *message, int wx, int wy, int class_, int num);
104 
105 extern int screen_printf(int x, int y, const char *string, ...);
106 extern int screen_print(const char *string, ...);
107 
108 extern void screen_init_text(int which_mode);
109 extern void screen_shutdown_text(int clear_flag);
110 extern void screen_save();
111 extern void screen_restore();
112 extern short screen_show_wide(const char *outstring, short locx, short locy, short width);
113 
114 } // namespace MADS
115 
116 #endif
Definition: anim_timer.h:27
Definition: display_client.h:113
Definition: atari-screen.h:42