aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/computer.h
blob: 6632213bfe2d7e03cb17dabfa6a299ec43083c32 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/* ScummVM - Graphic Adventure Engine
 *
 * ScummVM is the legal property of its developers, whose names
 * are too numerous to list here. Please refer to the COPYRIGHT
 * file distributed with this source distribution.
 *
 * 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.
 *
 */

#ifndef HOPKINS_COMPUTER_H
#define HOPKINS_COMPUTER_H

#include "common/scummsys.h"
#include "common/rect.h"
#include "common/str.h"

namespace Hopkins {

class HopkinsEngine;

struct MenuItem {
	bool _actvFl;
	int  _lineSize;
	char _line[90];
};

struct ScoreItem {
	Common::String name;
	Common::String score;
};

enum ComputerEnum { COMPUTER_HOPKINS = 1, COMPUTER_SAMANTHAS = 2, COMPUTER_PUBLIC = 3 };

class ComputerManager {
private:
	HopkinsEngine *_vm;
	MenuItem MenuText[50];
	char Sup_string[200];
	ScoreItem Score[6];
	int TEXT_COL;
	Common::Point _textPosition;
	Common::Point BALLE;
	byte *CASSESPR;
	int16 *CASSETAB;
	bool FMOUSE;
	int NBBRIQUES;

	/**
	 * Breakout score
	 */
	int CASSESCORE;

	/**
	 * Number of Breakout lives remaining
	 */
	int CASSEVIE;

	/**
	 * Breakout game speed
	 */
	int CASSESPEED;

	/**
	 * Breakout ball horizontal position
	 */
	int BALLEHORI;

	/**
	 * Breakout ball vertical position
	 */
	int BALLEVERTI;

	int NB_TABLE;
	int RAQX;
	int CASSE_HISCORE;
	int CASSEP1;
	int CASSEP2;
	int CASSDER;
	int Menu_lignes; // CHECKME: Useless variable

	/**
	 * Load the menu text
	 */
	void Charge_Menu();

	void TXT4(int xp, int yp, int textIdx);

	/**
	 * Restores the scene for the FBI headquarters room
	 */
	void RESTORE_POLICE();

	/**
	 * Sets up textual entry mode. Used by the code for Hopkins computer.
	 */
	void setvideomode();

	/**
	 * Sets up textual entry mode. Used by the code for Hopkins computer.
	 */
	void TEXT_MODE();

	/**
	 * Clear the screen
	 */
	void clearscreen();

	/**
	 * Sets the text mode color
	 */
	void settextcolor(int col);

	/**
	 * Sets the text position.
	 * @param yp		Y position
	 * @param xp		X position
	 * @remarks		Yes, the reverse co-ordinate pair is really like that in the original game.
	 */
	void settextposition(int yp, int xp);

	/**
	 * Outputs a text string
	 */
	void outtext(const Common::String &msg);

	/**
	 * Outputs a text string
	 */
	void outtext2(const Common::String &msg);

	void GAMES();
	void LIT_TEXTE(int a1);
	void CHARGE_SCORE();
	void MODE_VGA256();
	void NEWTAB();
	void AFF_BRIQUES();
	void AFF_VIE();

	/**
	 * Play the Breakout game
	 */
	void PLAY_BRIQUE();

	/**
	 * Show the high scores for the Breakout game
	 * @return		The selected button index: 1 = Game, 2 = Quit
	 */
	int HIGHT_SCORE();
	void NAME_SCORE();
	void IMPSCORE(int a1, int a2);
	void SAUVE_SCORE();
	void PRINT_HSCORE(byte *objectData, int a2, int a3, int a4);
	void IMPRIMESCORE();
	int DEP_BALLE();
	void VERIFBRIQUES();
public:
	ComputerManager();
	void setParent(HopkinsEngine *vm);

	/**
	 * Show a computer in the FBI office
	 * @param mode		Which computer to display
	 */
	void COMPUT_HOPKINS(ComputerEnum mode);
};

} // End of namespace Hopkins

#endif /* HOPKINS_COMPUTER_H */