public void addObject(int objectId, int x, int y, int height, int type, int direction) { ObjectDef def = ObjectDef.getObjectDef(objectId); if (def == null) { return; } int xLength; int yLength; if (direction != 1 && direction != 3) { xLength = def.xLength(); yLength = def.yLength(); } else { xLength = def.yLength(); yLength = def.xLength(); } if (type == 22) { if (def.hasActions() && def.solid()) { addClipping(x, y, height, 0x200000); } } else if (type >= 9) { if (def.solid()) { addClippingForSolidObject(x, y, height, xLength, yLength, def.solidd()); } } else if (type >= 0 && type <= 3) { if (def.solid()) { addClippingForVariableObject(x, y, height, type, direction, def.solidd()); } } }