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

Function OperatePedistal

Source/objects.cpp:2742–2774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2740}
2741
2742void OperatePedistal(int pnum, int i)
2743{
2744 BYTE *mem;
2745 int iv;
2746
2747 if (object[i]._oVar6 != 3) {
2748 if (PlrHasItem(pnum, IDI_BLDSTONE, &iv) != NULL) {
2749 RemoveInvItem(pnum, iv);
2750 object[i]._oAnimFrame++;
2751 object[i]._oVar6++;
2752 }
2753 if (object[i]._oVar6 == 1) {
2754 if (!deltaload)
2755 PlaySfxLoc(LS_PUDDLE, object[i]._ox, object[i]._oy);
2756 ObjChangeMap(setpc_x, setpc_y + 3, setpc_x + 2, setpc_y + 7);
2757 }
2758 if (object[i]._oVar6 == 2) {
2759 if (!deltaload)
2760 PlaySfxLoc(LS_PUDDLE, object[i]._ox, object[i]._oy);
2761 ObjChangeMap(setpc_x + 6, setpc_y + 3, setpc_x + setpc_w, setpc_y + 7);
2762 }
2763 if (object[i]._oVar6 == 3) {
2764 if (!deltaload)
2765 PlaySfxLoc(LS_BLODSTAR, object[i]._ox, object[i]._oy);
2766 ObjChangeMap(object[i]._oVar1, object[i]._oVar2, object[i]._oVar3, object[i]._oVar4);
2767 mem = LoadFileInMem("Levels\\L2Data\\Blood2.DUN", NULL);
2768 LoadMapObjs(mem, 2 * setpc_x, 2 * setpc_y);
2769 mem_free_dbg(mem);
2770 CreateItem(7, 2 * setpc_x + 25, 2 * setpc_y + 19);
2771 object[i]._oSelFlag = 0;
2772 }
2773 }
2774}
2775
2776void TryDisarm(int pnum, int i)
2777{

Callers 2

OperateObjectFunction · 0.85
SyncOpObjectFunction · 0.85

Calls 8

PlrHasItemFunction · 0.85
RemoveInvItemFunction · 0.85
PlaySfxLocFunction · 0.85
ObjChangeMapFunction · 0.85
LoadFileInMemFunction · 0.85
LoadMapObjsFunction · 0.85
mem_free_dbgFunction · 0.85
CreateItemFunction · 0.85

Tested by

no test coverage detected