MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / unserializeInt

Function unserializeInt

src/Savegame/SerializationHelper.cpp:25–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23{
24
25int unserializeInt(Uint8 **buffer, Uint8 sizeKey)
26{
27 int ret = 0;
28 switch(sizeKey)
29 {
30 case 1:
31 ret = **buffer;
32 break;
33 case 2:
34 ret = *(Sint16*)*buffer;
35 break;
36 case 3:
37 assert(false); // no.
38 break;
39 case 4:
40 ret = *(Uint32*)*buffer;
41 break;
42 default:
43 assert(false); // get out.
44 }
45
46 *buffer += sizeKey;
47
48 return ret;
49}
50
51void serializeInt(Uint8 **buffer, Uint8 sizeKey, int value)
52{

Callers 2

loadMethod · 0.85
loadBinaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected