1
/* ScummVM - Graphic Adventure Engine
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.
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.
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.
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.
21
* $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/tags/release-1-1-1/common/macresman.h $
22
* $Id: macresman.h 47258 2010-01-11 20:41:07Z sev $
26
#include "common/array.h"
27
#include "common/file.h"
29
#ifndef COMMON_MACRESMAN_H
30
#define COMMON_MACRESMAN_H
34
typedef Common::Array<int16> MacResIDArray;
37
* Class for reading Mac Binary files.
38
* Is able to read dumped resource forks too.
43
MacResManager(Common::String fileName);
47
* Read resource from the Mac Binary file
48
* @param typeID FourCC with type ID
49
* @param resID Resource ID to fetch
50
* @param size Pointer to int where loaded data size will be stored
51
* @return Pointer to memory with loaded resource. Malloc()'ed
53
byte *getResource(const char *typeID, int16 resID, int *size);
55
char *getResName(const char *typeID, int16 resID);
57
* Convert cursor from Mac format to format suitable for feeding to CursorMan
58
* @param data Pointer to the cursor data
59
* @param datasize Size of the cursor data
60
* @param cursor Pointer to memory where result cursor will be stored. The memory
61
* block will be malloc()'ed
62
* @param w Pointer to int where the cursor width will be stored
63
* @param h Pointer to int where the cursor height will be stored
64
* @param hotspot_x Storage for cursor hotspot X coordinate
65
* @param hotspot_Y Storage for cursor hotspot Y coordinate
66
* @param keycolor Pointer to int where the transpared color value will be stored
67
* @param colored If set to true then colored cursor will be returned (if any).
68
* b/w version will be used otherwise
69
* @param palette Pointer to memory where the cursor palette will be stored.
70
* The memory will be malloc()'ed
71
* @param palSize Pointer to integer where the palette size will be stored.
73
void convertCursor(byte *data, int datasize, byte **cursor, int *w, int *h,
74
int *hotspot_x, int *hotspot_y, int *keycolor, bool colored, byte **palette, int *palSize);
77
* Return list of resource IDs with specified type ID
79
MacResIDArray getResIDArray(const char *typeID);
81
Common::String getFileName() { return _fileName; }
84
int extractResource(int id, byte **buf);
109
typedef Resource *ResPtr;
121
Common::String _fileName;
122
Common::File _resFile;
125
} // End of namespace Common