Blame view

d2item.c 1.39 KB
Imanol-Mikel Barba Sabariego authored
1
2
3
4
#include "d2item.h"

#define readBits(start,size) ((*((unsigned long *) &data[(start) / 8]) >> ((start) & 7)) & ((1 << (size)) - 1))
5
6
7
8
// 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)
Imanol-Mikel Barba Sabariego authored
9
unsigned int _getItemIDIndex(D2S_ITEMDATA_IDENTIFIER itemID) {
10
11
12
    // TODO (LONG!)
}
Imanol-Mikel Barba Sabariego authored
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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!)
}
30
31
32
33
34
35
36
37
void* _exportItemData(D2Item* item) {
    // TODO
}

void* _findInventoryClassOffset(D2S_INVENTORYCLASS inv, void* charData, size_t dataLen) {
    // TODO
}
38
39
40
41
42
D2Item* getItem(D2S_INVENTORYCLASS inv, unsigned int offset, void* charData, size_t dataLen) {
    // TODO
}

void freeItem(D2Item* item) {
43
44
45
46
47
48
49
50
51
52
53
    // 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
}
54
D2Item* importItem(const char* filename) {
55
56
57
58
59
    // TODO
}

void printItem(D2Item* item) {
    // TODO
Imanol-Mikel Barba Sabariego authored
60
}