Esempio n. 1
0
static void SortAllSprites(void)
{
	vissprite_t *VisPtr;
	Word i;
	Word *LocalPtr;
	
	VisPtr = vissprites;
	SpriteTotal = vissprite_p - VisPtr;		/* How many sprites to draw? */
	if (SpriteTotal) {		/* Any sprites to speak of? */
		LocalPtr = SortBuffer;	/* Init buffer pointer */
		i = 0;
		do {
			*LocalPtr++ = (VisPtr->yscale<<7)+i;	/* Create array of indexs */
			++VisPtr;
		} while (++i<SpriteTotal);	/* All done? */
		SortedSprites = SortWords(SortBuffer,&SortBuffer[MAXVISSPRITES],SpriteTotal);		/* Sort the sprites */
	}
}
Esempio n. 2
0
int CManageObject::Load()
{
    Clear();
    if(LoadWords() != 0)
        return -1;
    if(SortWords() != 0)
        return -1;

    if(InitSeed() != 0)
        return -1;

    _bBuilt = true;
    _iCacheScore = -1;

    g_objTrigger.OnMemoryDailyLoadOver();

    return 0;
}