ScummVM API documentation
portrait_view.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 NUVIE_VIEWS_PORTRAIT_VIEW_H
23#define NUVIE_VIEWS_PORTRAIT_VIEW_H
24
25#include "ultima/nuvie/views/view.h"
26
27namespace Ultima {
28namespace Nuvie {
29
30class Configuration;
31class TileManager;
32class Portrait;
33class Screen;
34class Font;
35class ObjManager;
36class Party;
37class Player;
38class Actor;
39class DollWidget;
40class U6Shape;
41
42class PortraitView : public View {
43
44 nuvie_game_t gametype;
45
46 uint8 cur_actor_num;
47 Portrait *portrait;
48 Common::String *name_string;
49
50 unsigned char *portrait_data;
51 U6Shape *bg_data;
52 uint8 portrait_width;
53 uint8 portrait_height;
54
55 bool waiting; // waiting for input, then will return to previous view
56 bool show_cursor; // indicate waiting for input
57// uint16 cursor_x, cursor_y;
58
59 DollWidget *doll_widget;
60 bool display_doll;
61
62public:
63 PortraitView(const Configuration *cfg);
64 ~PortraitView() override;
65
66 bool init(uint16 x, uint16 y, Font *f, Party *p, Player *player, TileManager *tm, ObjManager *om, Portrait *port);
67 void Display(bool full_redraw) override;
68 GUI_status HandleEvent(const Common::Event *event) override;
69
70 bool set_portrait(Actor *actor, const char *name);
71 void set_show_cursor(bool state) {
72 show_cursor = state;
73 }
74 void set_waiting(bool state);
75 bool get_waiting() const {
76 return waiting;
77 }
78
79protected:
80
81 void display_name(uint16 y_offset);
82
83private:
84 void load_background(const char *filename, uint8 lib_offset);
85
86};
87
88} // End of namespace Nuvie
89} // End of namespace Ultima
90
91#endif
Definition: str.h:59
Definition: actor.h:174
Definition: configuration.h:60
Definition: doll_widget.h:37
Definition: font.h:42
Definition: obj_manager.h:74
Definition: party.h:92
Definition: player.h:41
Definition: portrait.h:40
Definition: portrait_view.h:42
Definition: tile_manager.h:145
Definition: u6_shape.h:47
Definition: view.h:42
Definition: events.h:218
Definition: atari-screen.h:58