This repository has been archived by the owner on Feb 23, 2021. It is now read-only.
forked from litchie/exult-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exult.h
106 lines (90 loc) · 3.17 KB
/
exult.h
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
* Copyright (C) 2001-2013 The Exult 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef EXULT_H
#define EXULT_H
#include "mouse.h"
class Actor;
class Cheat;
class Configuration;
class Game_window;
class KeyBinder;
class Tile_coord;
class Paintable;
class GameManager;
/*
* Get a click, or, optionally, a keyboard char.
*
* Output: 0 if user hit ESC.
* Chr gets keyboard char., or 0 if it's was a mouse click.
*/
extern bool g_waiting_for_click;
extern int Get_click(
int &x, int &y, // Location returned (if not ESC).
Mouse::Mouse_shapes shape, // Mouse shape to use.
char *chr = 0, // Char. returned if not null.
bool drag_ok = false, // Can drag while here.
Paintable *paint = 0, // Paint over everything else.
bool rotate_colors = false // If the palette colors should rotate.
);
#ifdef __IPHONEOS__
static int last_b1down_click;
#endif
/*
* Make a screenshot of the current screen display
*/
extern void make_screenshot(
bool silent = false // If false, will display a success/failure message
);
/*
* Wait for someone to stop walking. If a timeout is given, at least
* one animation cycle will still always occur.
*/
extern void Wait_for_arrival(
Actor *actor, // Whom to wait for.
const Tile_coord& dest, // Where he's going.
long maxticks = 0 // Max. # msecs. to wait, or 0.
);
extern void change_gamma(bool down);
extern void increase_scaleval();
extern void decrease_scaleval();
extern void setup_video(bool fullscreen, int setup_video_type,
int resx = 0, int resy = 0, int gw = 0,
int gh = 0, int scaleval = 0, int scaler = 0,
Image_window::FillMode fillmode = Image_window::Fill,
int fill_scaler = 0);
enum setup_video_type {
VIDEO_INIT = 0, // read and write initial settings and create gwin
TOGGLE_FULLSCREEN = 1, // toggle fullscreen using proper settings
MENU_INIT = 2, // read and set initial settings for video gump menu
SET_CONFIG = 3 // sets the config settings (doesn't write)
};
typedef enum {
QUIT_TIME_NO = 0,
QUIT_TIME_YES = 1,
QUIT_TIME_RESTART = 2
} quitting_time_enum;
extern KeyBinder *keybinder;
extern Configuration *config;
extern GameManager *gamemanager;
extern quitting_time_enum quitting_time;
extern class ShortcutBar_gump *g_shortcutBar;
#ifdef __IPHONEOS__
#include "ios_utils.h"
extern class TouchUI *touchui;
#endif
#endif