ScummVM API documentation
dialog.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_DIALOG_H
23#define CHAMBER_DIALOG_H
24
25namespace Chamber {
26
27extern uint16 cur_str_index;
28extern uint16 cur_dlg_index;
29
30enum DirtyRectKind {
31 DirtyRectFree = 0,
32 DirtyRectBubble = 1, /*bubble with spike*/
33 DirtyRectSprite = 2, /*portrait*/
34 DirtyRectText = 3 /*text bubble w/o spike*/
35};
36
37typedef struct dirty_rect_t {
38 byte kind;
39 uint16 offs;
40 byte height;
41 byte width;
42 byte y; /*for DirtyRectBubble this is spike offs*/
43 byte x;
45
46#define MAX_DIRTY_RECT 10
47extern dirty_rect_t dirty_rects[];
48extern dirty_rect_t *last_dirty_rect;
49
50#define SPIKE_MASK 0xE0
51#define SPIKE_UPLEFT 0
52#define SPIKE_UPRIGHT 0x20
53#define SPIKE_DNRIGHT 0x80
54#define SPIKE_DNLEFT 0xA0
55#define SPIKE_BUBBLES 0x40
56#define SPIKE_BUBRIGHT 0xC0
57#define SPIKE_BUBLEFT 0xE0
58
59void addDirtyRect(byte kind, byte x, byte y, byte w, byte h, uint16 offs);
60void getDirtyRectAndFree(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs);
61void getDirtyRectAndSetSprite(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs);
62
63void popDirtyRects(byte kind);
64void drawPersonBubble(byte x, byte y, byte flags, byte *msg);
65void desciTextBox(uint16 x, uint16 y, uint16 width, byte *msg);
66
67void promptWait(void);
68
69byte *seekToString(byte *bank, uint16 num);
70byte *seekToStringScr(byte *bank, uint16 num, byte **ptr);
71
72} // End of namespace Chamber
73
74#endif
Definition: dialog.h:37