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

Function GetObjectStr

Source/objects.cpp:4317–4457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4315}
4316
4317void GetObjectStr(int i)
4318{
4319 switch (object[i]._otype) {
4320 case OBJ_LEVER:
4321 case OBJ_FLAMELVR:
4322 strcpy(infostr, "Lever");
4323 break;
4324 case OBJ_CHEST1:
4325 case OBJ_TCHEST1:
4326 strcpy(infostr, "Small Chest");
4327 break;
4328 case OBJ_L1LDOOR:
4329 case OBJ_L1RDOOR:
4330 case OBJ_L2LDOOR:
4331 case OBJ_L2RDOOR:
4332 case OBJ_L3LDOOR:
4333 case OBJ_L3RDOOR:
4334 if (object[i]._oVar4 == 1)
4335 strcpy(infostr, "Open Door");
4336 if (object[i]._oVar4 == 0)
4337 strcpy(infostr, "Closed Door");
4338 if (object[i]._oVar4 == 2)
4339 strcpy(infostr, "Blocked Door");
4340 break;
4341 case OBJ_BOOK2L:
4342 if (setlevel) {
4343 if (setlvlnum == SL_BONECHAMB) {
4344 strcpy(infostr, "Ancient Tome");
4345 } else if (setlvlnum == SL_VILEBETRAYER) {
4346 strcpy(infostr, "Book of Vileness");
4347 }
4348 }
4349 break;
4350 case OBJ_SWITCHSKL:
4351 strcpy(infostr, "Skull Lever");
4352 break;
4353 case OBJ_BOOK2R:
4354 strcpy(infostr, "Mythical Book");
4355 break;
4356
4357 case OBJ_CHEST2:
4358 case OBJ_TCHEST2:
4359 strcpy(infostr, "Chest");
4360 break;
4361 case OBJ_CHEST3:
4362 case OBJ_TCHEST3:
4363 case OBJ_SIGNCHEST:
4364 strcpy(infostr, "Large Chest");
4365 break;
4366 case OBJ_CRUX1:
4367 case OBJ_CRUX2:
4368 case OBJ_CRUX3:
4369 strcpy(infostr, "Crucified Skeleton");
4370 break;
4371 case OBJ_SARC:
4372 strcpy(infostr, "Sarcophagus");
4373 break;
4374 case OBJ_BOOKSHELF:

Callers 1

DrawInfoBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected