MCPcopy Create free account
hub / github.com/diasurgical/devilution / AddStoryBook

Function AddStoryBook

Source/objects.cpp:1242–1259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1240}
1241
1242void AddStoryBook(int i)
1243{
1244 int bookframe;
1245
1246 SetRndSeed(glSeedTbl[16]);
1247 bookframe = random_(0, 3);
1248
1249 object[i]._oVar1 = bookframe;
1250 if (currlevel == 4)
1251 object[i]._oVar2 = StoryText[bookframe][0];
1252 if (currlevel == 8)
1253 object[i]._oVar2 = StoryText[bookframe][1];
1254 if (currlevel == 12)
1255 object[i]._oVar2 = StoryText[bookframe][2];
1256 object[i]._oVar3 = (currlevel >> 2) + 3 * bookframe - 1;
1257 object[i]._oAnimFrame = 5 - 2 * bookframe;
1258 object[i]._oVar4 = object[i]._oAnimFrame + 1;
1259}
1260
1261void AddWeaponRack(int i)
1262{

Callers 1

AddObjectFunction · 0.85

Calls 2

SetRndSeedFunction · 0.85
random_Function · 0.85

Tested by

no test coverage detected