Exemplo n.º 1
0
uint16 compareObjectParamRanges(uint16 objIdx1, uint16 xAdd1, uint16 yAdd1, uint16 maskAdd1, uint16 objIdx2, uint16 xAdd2, uint16 yAdd2, uint16 maskAdd2) {
	assert(objIdx1 < NUM_MAX_OBJECT && objIdx2 < NUM_MAX_OBJECT);
	const ObjectStruct &obj1 = g_cine->_objectTable[objIdx1];
	const ObjectStruct &obj2 = g_cine->_objectTable[objIdx2];

	if (compareRanges(obj1.x,    obj1.x    + xAdd1,    obj2.x,    obj2.x    + xAdd2) &&
		compareRanges(obj1.y,    obj1.y    + yAdd1,    obj2.y,    obj2.y    + yAdd2) &&
		compareRanges(obj1.mask, obj1.mask + maskAdd1, obj2.mask, obj2.mask + maskAdd2)) {
		return kCmpEQ;
	} else {
		return 0;
	}
}
Exemplo n.º 2
0
bool RangeDeleter::NSMinMaxCmp::operator()(const NSMinMax* lhs, const NSMinMax* rhs) const {
    const int nsComp = lhs->ns.compare(rhs->ns);

    if (nsComp < 0) {
        return true;
    }

    if (nsComp > 0) {
        return false;
    }

    return compareRanges(lhs->min, lhs->max, rhs->min, rhs->max) < 0;
}
Exemplo n.º 3
0
    bool DeletedRangeCmp::operator()(const DeletedRange& lhs,
                                     const DeletedRange& rhs) const {
        const int nsComp = lhs.ns.compare(rhs.ns);

       if (nsComp < 0) {
           return true;
       }

       if (nsComp > 0) {
           return false;
       }

       return compareRanges(lhs.min, lhs.max, rhs.min, rhs.max) < 0;
    }