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

Function ObjSetMicro

Source/objects.cpp:1807–1827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1805}
1806
1807void ObjSetMicro(int dx, int dy, int pn)
1808{
1809 WORD *v;
1810 MICROS *defs;
1811 int i;
1812
1813 dPiece[dx][dy] = pn;
1814 pn--;
1815 defs = &dpiece_defs_map_2[dx][dy];
1816 if (leveltype != DTYPE_HELL) {
1817 v = (WORD *)pLevelPieces + 10 * pn;
1818 for (i = 0; i < 10; i++) {
1819 defs->mt[i] = SDL_SwapLE16(v[(i & 1) - (i & 0xE) + 8]);
1820 }
1821 } else {
1822 v = (WORD *)pLevelPieces + 16 * pn;
1823 for (i = 0; i < 16; i++) {
1824 defs->mt[i] = SDL_SwapLE16(v[(i & 1) - (i & 0xE) + 14]);
1825 }
1826 }
1827}
1828
1829void objects_set_door_piece(int x, int y)
1830{

Callers 13

AddL2DoorFunction · 0.85
AddL3DoorFunction · 0.85
ObjSetMiniFunction · 0.85
DoorSetFunction · 0.85
OperateL1RDoorFunction · 0.85
OperateL1LDoorFunction · 0.85
OperateL2RDoorFunction · 0.85
OperateL2LDoorFunction · 0.85
OperateL3RDoorFunction · 0.85
OperateL3LDoorFunction · 0.85
SyncL1DoorsFunction · 0.85
SyncL2DoorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected