made sprite copy not silly

This commit is contained in:
pradyun 2023-09-14 11:01:28 +12:00
parent 6b89a9ec67
commit e5e5342a6c
3 changed files with 1 additions and 7 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -97,10 +97,5 @@ void Sprite::setSpr(C2D_Sprite* newSpr) {
}
void Sprite::copy(Sprite* other) {
memcpy(&other->x, &this->x, sizeof(this->x));
memcpy(&other->y, &this->y, sizeof(this->y));
memcpy(&other->width, &this->width, sizeof(this->width));
memcpy(&other->height, &this->height, sizeof(this->height));
memcpy(other->center, this->center, sizeof(this->center));
memcpy(&other->spr, &this->spr, sizeof(this->spr));
memcpy(&other, this, sizeof(this));
}

View File

@ -185,7 +185,6 @@ int main(int argc, char* argv[]) {
}
// Delete graphics
C2D_SpriteSheetFree(spriteSheet);
C2D_TextBufDelete(g_staticBuf);