//Identical to function @ 0x00498E00 CImage* CSprite::createOverlay(u32 imageId, s8 x, s8 y, u32 direction) { assert(this); CImage *overlay = unusedImages.popHead(); if (overlay) { if (this->images.head) this->images.insertBefore<&CImage::link>(overlay, this->mainGraphic); else { this->mainGraphic = overlay; this->images.insertAfterHead<&CImage::link>(overlay); } overlay->initializeData(this, imageId, x, y); createUpdateImageSomething(overlay); updateImageDirection(overlay, direction); } return overlay; }
//Identical to function @ 0x00498E00 CImage* CSprite::createOverlay(u32 imageId, s8 x, s8 y, u32 direction) { assert(this); CImage *overlay = unusedImages.popHead(); if (overlay) { const CListExtern<CImage, &CImage::link> images(this->imageHead, this->imageTail); if (this->imageHead) { images.insertBefore(overlay, this->mainGraphic); } else { this->mainGraphic = overlay; images.insertAfterHead(overlay); } overlay->initializeData(this, imageId, x, y); createUpdateImageSomething(overlay); updateImageDirection(overlay, direction); } return overlay; }