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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #include "common/rect.h"
24 #include "graphics/cursorman.h"
25 
26 #include "private/private.h"
27 
28 namespace Private {
29 
30 static const byte MOUSECURSOR_SCI[] = {
31 	1,1,0,0,0,0,0,0,0,0,0,
32 	1,2,1,0,0,0,0,0,0,0,0,
33 	1,2,2,1,0,0,0,0,0,0,0,
34 	1,2,2,2,1,0,0,0,0,0,0,
35 	1,2,2,2,2,1,0,0,0,0,0,
36 	1,2,2,2,2,2,1,0,0,0,0,
37 	1,2,2,2,2,2,2,1,0,0,0,
38 	1,2,2,2,2,2,2,2,1,0,0,
39 	1,2,2,2,2,2,2,2,2,1,0,
40 	1,2,2,2,2,2,2,2,2,2,1,
41 	1,2,2,2,2,2,1,0,0,0,0,
42 	1,2,1,0,1,2,2,1,0,0,0,
43 	1,1,0,0,1,2,2,1,0,0,0,
44 	0,0,0,0,0,1,2,2,1,0,0,
45 	0,0,0,0,0,1,2,2,1,0,0,
46 	0,0,0,0,0,0,1,2,2,1,0
47 };
48 
49 static const byte MOUSECURSOR_kExit[] = {
50 	0,0,0,0,0,0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
51 	0,0,0,0,0,0,0,3,3,3,3,1,0,0,0,0,0,0,0,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Black / Transparent
296 	0x01, 0x01, 0x01,  // Gray
297 	0xff, 0xff, 0xff,  // White
298 	0xff, 0x00, 0x00   // Red
299 };
300 
301 struct CursorTable {
302 	const char *name;
303 	const char *aname;
304 	const void *buf;
305 	int w;
306 	int h;
307 	int hotspotX;
308 	int hotspotY;
309 };
310 
311 static const CursorTable cursorTable[] = {
312 	{ "kTurnLeft",  "k1", MOUSECURSOR_kTurnLeft,  32, 32, 29, 16 },
313 	{ "kTurnRight", "k2", MOUSECURSOR_kTurnRight, 32, 32, 1,  15 },
314 	{ "kZoomIn",    "k3", MOUSECURSOR_kZoomIn,    32, 32, 10, 8  },
315 	{ "kZoomOut",   "k4", MOUSECURSOR_kZoomOut,   32, 32, 13, 31 },
316 	{ "kExit",      "k5", MOUSECURSOR_kExit,      32, 32, 9,  0  },
317 	{ "kPhone",     "k6", MOUSECURSOR_kPhone,     32, 32, 17, 19 },
318 	{ "kInventory", "k7", MOUSECURSOR_kInventory, 32, 32, 15, 3  },
319 	{ "default",    "", MOUSECURSOR_SCI,        11, 16, 0,  0  },
320 	{ nullptr,      nullptr, nullptr,                0,  0,  0,  0  }
321 };
322 
changeCursor(const Common::String & cursor)323 void PrivateEngine::changeCursor(const Common::String &cursor) {
324 	const CursorTable *entry = cursorTable;
325 	while (entry->name) {
326 		if (cursor == entry->name || cursor == entry->aname)
327 			break;
328 		entry++;
329 	}
330 	if (!entry->name)
331 		return;
332 
333 	CursorMan.replaceCursor(entry->buf, entry->w, entry->h, entry->hotspotX, entry->hotspotY, 0);
334 	CursorMan.replaceCursorPalette(cursorPalette, 0, 3);
335 	CursorMan.showMouse(true);
336 }
337 
338 } // End of namespace Private
339