ScummVM API documentation
ega.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 CHAMBER_EGA_H
23#define CHAMBER_EGA_H
24
25#include "graphics/surface.h"
26
27namespace Chamber {
28
29// EGA screen dimensions (same as CGA)
30#define EGA_WIDTH 320
31#define EGA_HEIGHT 200
32
33// EGA uses 1 byte per pixel (CLUT8 linear, no interlacing)
34#define EGA_BYTES_PER_LINE EGA_WIDTH
35#define EGA_SCREEN_SIZE (EGA_WIDTH * EGA_HEIGHT)
36
37// Planar background: 4 planes × 8000 bytes
38#define EGA_PLANAR_SIZE (EGA_WIDTH / 8 * EGA_HEIGHT) // 8000 bytes per plane
39
40extern byte *ega_backbuffer; // aliases backbuffer
41
42// CGA palette 1 high-intensity → EGA color index mapping
43extern const byte cga_to_ega_color[4];
44
45// --- resource loader ---
46Graphics::Surface *ega_loadFond(const char *filename);
47
48// --- background restore ---
49// Saved clean copy of decoded FOND.EGA for room background restoration
50extern byte ega_fond_clean[EGA_SCREEN_SIZE];
51void ega_drawBackground(byte *target);
52
53// --- zone-change transition ---
54// Reveal the new room (backbuffer) over the screen with a serpentine line wipe.
55void ega_zoneRevealWipe(void);
56
57} // End of namespace Chamber
58
59#endif // CHAMBER_EGA_H
Definition: surface.h:67