From e5e5342a6ce0ac282ab36da5c207ab4ea1ddd133 Mon Sep 17 00:00:00 2001 From: pradyun Date: Thu, 14 Sep 2023 11:01:28 +1200 Subject: [PATCH] made sprite copy not silly --- .DS_Store | Bin 8196 -> 10244 bytes source/Sprite.cpp | 7 +------ source/main.cpp | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.DS_Store b/.DS_Store index 815a23f326224038a3aa22c90c481b9a2dae6b9d..4498e60e938070089e5984e0a296c9f38a96c6c2 100644 GIT binary patch delta 794 zcmZp1XbF&DU|?W$DortDU{C-uIe-{M3-C-V6q~50C@2Z!Far4uIq8PM$@#ej8w;ng zPizp}%+A5WQ4f-3VbEhpXUJqIfvEtB0Y!ZpKqO2qH{Zo2DJMS(D8@1WsL_}A505ya z%BSF!FUWw{4%EZIz%v0vvN9yqGn4`?&S6MFv6|B}4k8VcMYepQ=g}mI?_kS;1|U=* ztjDeb#Q~gP2QV{C78JO`4-FTPlNcEC<2K(CFlVbrw$d$inT5(du$9cfkV<2y$jwJs zhbfC<6~h6Lu~2?^1sf9= zvu|eSVBuh7nam=1bMtpW9k$7p68w|bNIn;22C4x932q?a3NmS9;&nYx)@OoR!l=LrA-L>!p_ diff --git a/source/Sprite.cpp b/source/Sprite.cpp index a1ea7bd..e349509 100644 --- a/source/Sprite.cpp +++ b/source/Sprite.cpp @@ -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)); } \ No newline at end of file diff --git a/source/main.cpp b/source/main.cpp index c138b36..1759d8b 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -185,7 +185,6 @@ int main(int argc, char* argv[]) { } - // Delete graphics C2D_SpriteSheetFree(spriteSheet); C2D_TextBufDelete(g_staticBuf);