Use Priority enum in Object6A

This commit is contained in:
Tal Hayon 2022-01-29 15:38:13 +02:00
parent fd9049f598
commit c3e3b499e0
1 changed files with 11 additions and 11 deletions

View File

@ -212,7 +212,7 @@ void sub_08094C30(Object6AEntity* this) {
DeleteThisEntity(); DeleteThisEntity();
if (super->action == 0) { if (super->action == 0) {
super->action++; super->action++;
SetDefaultPriority(super, 2); SetDefaultPriority(super, PRIO_MESSAGE);
super->spriteRendering.b3 = gUnk_08114F30[p->spriteRendering.b3]; super->spriteRendering.b3 = gUnk_08114F30[p->spriteRendering.b3];
InitAnimationForceUpdate(super, 1); InitAnimationForceUpdate(super, 1);
} }
@ -231,7 +231,7 @@ void sub_08094C88(Object6AEntity* this) {
} else { } else {
super->action++; super->action++;
super->spriteSettings.draw = 1; super->spriteSettings.draw = 1;
SetDefaultPriority(super, 3); SetDefaultPriority(super, PRIO_NO_BLOCK);
switch (super->type2) { switch (super->type2) {
case 0x40: case 0x40:
case 0x41: case 0x41:
@ -290,7 +290,7 @@ void sub_08094D94(Object6AEntity* this) {
} else { } else {
super->action++; super->action++;
super->spriteSettings.draw = 1; super->spriteSettings.draw = 1;
SetDefaultPriority(super, 3); SetDefaultPriority(super, PRIO_NO_BLOCK);
InitAnimationForceUpdate(super, 0); InitAnimationForceUpdate(super, 0);
} }
UpdateAnimationSingleFrame(super); UpdateAnimationSingleFrame(super);
@ -330,7 +330,7 @@ void sub_08094E30(Object6AEntity* this) {
super->action++; super->action++;
super->z.WORD = -0xA00000; super->z.WORD = -0xA00000;
super->zVelocity = 0; super->zVelocity = 0;
SetDefaultPriority(super, 6); SetDefaultPriority(super, PRIO_PLAYER_EVENT);
InitializeAnimation(super, 0); InitializeAnimation(super, 0);
if (sub_080002B8(super) == 13) { if (sub_080002B8(super) == 13) {
super->action = 3; super->action = 3;
@ -472,7 +472,7 @@ void sub_08095088(Object6AEntity* this) {
void sub_08095120(Object6AEntity* this) { void sub_08095120(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action = 1; super->action = 1;
SetDefaultPriority(super, 3); SetDefaultPriority(super, PRIO_NO_BLOCK);
SortEntityBelow(super, super); SortEntityBelow(super, super);
sub_0807DD64(super); sub_0807DD64(super);
InitAnimationForceUpdate(super, 2); InitAnimationForceUpdate(super, 2);
@ -492,7 +492,7 @@ void sub_08095164(Object6AEntity* this) {
void sub_08095188(Object6AEntity* this) { void sub_08095188(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action = 1; super->action = 1;
SetDefaultPriority(super, 3); SetDefaultPriority(super, PRIO_NO_BLOCK);
SortEntityBelow(super, super); SortEntityBelow(super, super);
sub_0807DD64(super); sub_0807DD64(super);
InitAnimationForceUpdate(super, 0); InitAnimationForceUpdate(super, 0);
@ -547,7 +547,7 @@ void sub_08095288(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action++; super->action++;
super->subAction = 0; super->subAction = 0;
SetDefaultPriority(super, 3); SetDefaultPriority(super, PRIO_NO_BLOCK);
InitAnimationForceUpdate(super, 0); InitAnimationForceUpdate(super, 0);
} }
if (super->subAction != 0) { if (super->subAction != 0) {
@ -607,7 +607,7 @@ void sub_080953A4(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action++; super->action++;
super->z.HALF.HI = -16; super->z.HALF.HI = -16;
SetDefaultPriority(super, 2); SetDefaultPriority(super, PRIO_MESSAGE);
super->spriteRendering.b3 = gUnk_08114F30[super->spriteRendering.b3]; super->spriteRendering.b3 = gUnk_08114F30[super->spriteRendering.b3];
SortEntityAbove(super, super); SortEntityAbove(super, super);
sub_0807DD64(super); sub_0807DD64(super);
@ -847,7 +847,7 @@ void sub_080958D8(Object6AEntity* this) {
void sub_08095918(Object6AEntity* this) { void sub_08095918(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action++; super->action++;
SetDefaultPriority(super, 6); SetDefaultPriority(super, PRIO_PLAYER_EVENT);
sub_0807DD64(super); sub_0807DD64(super);
InitializeAnimation(super, 0); InitializeAnimation(super, 0);
} }
@ -882,7 +882,7 @@ void sub_080959CC(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action++; super->action++;
super->spriteSettings.draw = 0; super->spriteSettings.draw = 0;
SetDefaultPriority(super, 3); SetDefaultPriority(super, PRIO_NO_BLOCK);
sub_0807DD64(super); sub_0807DD64(super);
} }
ExecuteScriptForEntity(super, 0); ExecuteScriptForEntity(super, 0);
@ -1038,7 +1038,7 @@ void sub_08095CE0(Object6AEntity* this) {
if (super->action == 0) { if (super->action == 0) {
super->action++; super->action++;
super->spriteSettings.draw = 0; super->spriteSettings.draw = 0;
SetDefaultPriority(super, 6); SetDefaultPriority(super, PRIO_PLAYER_EVENT);
sub_0807DD64(super); sub_0807DD64(super);
} }
ExecuteScriptForEntity(super, 0); ExecuteScriptForEntity(super, 0);