thingsies

This commit is contained in:
pradyun 2023-03-17 12:38:16 +13:00
parent b86959df36
commit 6b89a9ec67
6 changed files with 11 additions and 4 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
*.3dsx
*.smdh
*.elf
build

BIN
Flappy3DS.smdh Normal file

Binary file not shown.

View File

@ -95,3 +95,12 @@ C2D_Sprite* Sprite::getSpr() {
void Sprite::setSpr(C2D_Sprite* newSpr) {
this->spr = *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));
}

View File

@ -33,6 +33,8 @@ public:
void setSpr(C2D_Sprite* newSpr);
void copy(Sprite* other);
C2D_Sprite spr;
private:

View File

@ -119,9 +119,6 @@ int main(int argc, char* argv[]) {
if (kDown & KEY_START)
break; // break in order to return to hbmenu
if (kDown & KEY_SELECT)
main(0, 0); // reset
// gravity calcs
v += a;