aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/graphics.h
blob: 3931677441d11f9d6cb8ccb02d51a70fa3c4ba6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2006 The ScummVM project
 *
 * Copyright (C) 1999-2001 Sarien 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.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * $URL$
 * $Id$
 *
 */

#ifndef __AGI_GRAPHICS_H
#define __AGI_GRAPHICS_H

#include "common/stdafx.h"

#include "agi/agi.h"

namespace Agi {

#define GFX_WIDTH	320
#define GFX_HEIGHT	200
#define CHAR_COLS	8
#define CHAR_LINES	8

extern uint8 palette[];

/* Transparent layer */
extern uint8 layer1_data[];
extern uint8 layer2_data[];

void gfx_putpixels(int x, int y, int w, uint8 * p);
void gfx_putblock(int x1, int y1, int x2, int y2);

void put_text_character(int, int, int, unsigned int, int, int);
void shake_screen(int);
void shake_start(void);
void shake_end(void);
void save_screen(void);
void restore_screen(void);

int init_video(void);
int deinit_video(void);
void schedule_update(int, int, int, int);
void do_update(void);
void put_screen(void);
void flush_block(int, int, int, int);
void flush_block_a(int, int, int, int);
void put_pixels_a(int, int, int, uint8 *);
void flush_screen(void);
void clear_screen(int);
void clear_console_screen(int);
void draw_box(int, int, int, int, int, int, int);
void draw_button(int, int, char *, int, int);
int test_button(int, int, char *);
void draw_rectangle(int, int, int, int, int);
void save_block(int, int, int, int, uint8 *);
void restore_block(int, int, int, int, uint8 *);
void init_palette(uint8 *);

void put_pixel(int, int, int);

#ifdef USE_HIRES
void put_pixels_hires(int x, int y, int n, uint8 * p);
#endif
int keypress(void);
int get_key(void);
void print_character(int, int, char, int, int);
void poll_timer(void);

} // End of namespace Agi

#endif				/* __AGI_GRAPHICS_H */