Fake commit

This commit is contained in:
Macrepeh 2020-10-18 15:28:07 -04:00 committed by GitHub
parent baa826e062
commit a215cfd7f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
void FloatingBlock(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->frameIndex=this->entityType.form;
this->spritePriority.b0 = 0xe;
this->collisionLayer = 1;
UpdateSpriteForCollisionLayer(this);
}
}

43
src/object/pinwheel.c Normal file
View File

@ -0,0 +1,43 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
extern u32 ReadBit(u32*, u32);
extern void DeleteThisEntity();
extern u32 CheckLocalFlag(u32);
extern u32 gUnk_020342F8;
extern u16 gUnk_08125050[];
extern void (*gUnk_0812505C[])(Entity*);
void Pinwheel(Entity* this) {
u16 x = this->currentHealth;
if ((x & 0x7f) != 0) {
if (ReadBit(&gUnk_020342F8,x-1) == 0) {
DeleteThisEntity();
}
}
gUnk_0812505C[this->action](this);
}
void sub_080A23DC(Entity *this) {
this->field_0x68.HWORD = gUnk_08125050[this->entityType.parameter];
this->spritePriority.b0 = 7;
if (CheckLocalFlag(this->field_0x68.HWORD) !=0) {
this->action = 2;
}
else {
this->action = 1;
}
InitializeAnimation(this,0);
}
void sub_080A2420(Entity *this) {
if (CheckLocalFlag(this->field_0x68.HWORD) != 0) {
this->action = 2;
CreateDust(this);
}
}
void sub_080A243C(Entity *this) {
GetNextFrame(this);
}