d2item.c
1.39 KB
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
#include "d2item.h"
#define readBits(start,size) ((*((unsigned long *) &data[(start) / 8]) >> ((start) & 7)) & ((1 << (size)) - 1))
// This function translates the item identifiers (the 4
// character item ID used by the game, to an internal,
// sequential ID used for more efficient lookups instead
// of looping to find a match)
unsigned int _getItemIDIndex(D2S_ITEMDATA_IDENTIFIER itemID) {
// TODO (LONG!)
}
unsigned int _getRunewordIDIndex(D2S_ITEMDATA_RUNEWORD_IDENTIFIER runewordID) {
// TODO (LONG!)
}
unsigned int _getPrefixIDIndex(D2S_ITEMDATA_PREFIX_IDENTIFIER prefixID) {
// TODO (LONG!)
}
unsigned int _getSuffixIDIndex(D2S_ITEMDATA_SUFFIX_IDENTIFIER suffixID) {
// TODO (LONG!)
}
unsigned int _getMagicAttrIDIndex(D2S_ITEMDATA_MAGIC_ATTRIBUTE attrID) {
// TODO (LONG!)
}
void* _exportItemData(D2Item* item) {
// TODO
}
void* _findInventoryClassOffset(D2S_INVENTORYCLASS inv, void* charData, size_t dataLen) {
// TODO
}
D2Item* getItem(D2S_INVENTORYCLASS inv, unsigned int offset, void* charData, size_t dataLen) {
// TODO
}
void freeItem(D2Item* item) {
// TODO
}
int setItem(D2S_INVENTORYCLASS inv, unsigned int offset, D2Item* item, void* charData, size_t dataLen) {
// TODO
}
int exportItem(D2Item* item, const char* filename) {
// TODO
}
D2Item* importItem(const char* filename) {
// TODO
}
void printItem(D2Item* item) {
// TODO
}