Attempt to decompile currentPlayerFindPropForInteract
This commit is contained in:
parent
f5b8854e7a
commit
3aec8c6320
|
|
@ -159,7 +159,7 @@ void func0f01e250(void)
|
|||
value = func0f07e474(prop);
|
||||
} else if (prop->type == PROPTYPE_EXPLOSION) {
|
||||
value = func0f12bbdc(prop);
|
||||
} else if (prop->type == PROPTYPE_EFFECT) {
|
||||
} else if (prop->type == PROPTYPE_SMOKE) {
|
||||
value = func0f12e848(prop);
|
||||
} else if (prop->type == PROPTYPE_PLAYER) {
|
||||
value = func0f0c228c(prop);
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@ bool coreCheckCmpFollowThreat(struct threat *threat, s32 index)
|
|||
case PROPTYPE_DOOR:
|
||||
case PROPTYPE_EYESPY:
|
||||
case PROPTYPE_EXPLOSION:
|
||||
case PROPTYPE_EFFECT:
|
||||
case PROPTYPE_SMOKE:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha)
|
|||
case PROPTYPE_EXPLOSION:
|
||||
gdl = explosionRender(prop, gdl, withalpha);
|
||||
break;
|
||||
case PROPTYPE_EFFECT:
|
||||
case PROPTYPE_SMOKE:
|
||||
gdl = smokeRender(prop, gdl, withalpha);
|
||||
break;
|
||||
}
|
||||
|
|
@ -3033,6 +3033,51 @@ glabel currentPlayerFindPropForInteract
|
|||
/* f062dcc: 27bd0040 */ addiu $sp,$sp,0x40
|
||||
);
|
||||
|
||||
// Mismatch due to regalloc.
|
||||
// It's likely a switch was used, and using one comes close but doesn't match
|
||||
// as well. Another problem is that 8 (PROPTYPE_SMOKE) needs to be loaded into
|
||||
// a register, but referencing prop an extra time time promotes it to s0. This
|
||||
// is resolved below by passing *ptr to those functions instead of prop, but
|
||||
// this seems unlikely.
|
||||
// If attempting to use a switch, note that the door part needs to be an if
|
||||
// statement inside the default case.
|
||||
//struct prop *currentPlayerFindPropForInteract(bool usingeyespy)
|
||||
//{
|
||||
// struct prop **ptr;
|
||||
// bool result;
|
||||
//
|
||||
// var8009cda8 = NULL;
|
||||
// ptr = g_Vars.unk00034c - 1;
|
||||
// result = true;
|
||||
//
|
||||
// // Iterate tangible list in reverse
|
||||
// while (ptr >= g_Vars.tangibleprops) {
|
||||
// struct prop *prop = *ptr;
|
||||
//
|
||||
// if (prop) {
|
||||
// if (prop->type != PROPTYPE_CHR) {
|
||||
// if (prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_WEAPON) {
|
||||
// if (!usingeyespy) {
|
||||
// result = func0f0869cc(*ptr);
|
||||
// }
|
||||
// } else if (prop->type == PROPTYPE_DOOR) {
|
||||
// result = func0f08fcb8(*ptr);
|
||||
//
|
||||
// if (prop->type == PROPTYPE_SMOKE);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (!result) {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// ptr--;
|
||||
// }
|
||||
//
|
||||
// return var8009cda8;
|
||||
//}
|
||||
|
||||
void func0f062dd0(void)
|
||||
{
|
||||
struct prop **ptr = g_Vars.unk00034c - 1;
|
||||
|
|
@ -3076,7 +3121,7 @@ bool currentPlayerInteract(bool eyespy)
|
|||
case PROPTYPE_EYESPY:
|
||||
case PROPTYPE_PLAYER:
|
||||
case PROPTYPE_EXPLOSION:
|
||||
case PROPTYPE_EFFECT:
|
||||
case PROPTYPE_SMOKE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1234,7 +1234,7 @@ glabel smokeCreate
|
|||
// struct prop *prop = propAllocate();
|
||||
//
|
||||
// if (prop) {
|
||||
// prop->type = PROPTYPE_EFFECT;
|
||||
// prop->type = PROPTYPE_SMOKE;
|
||||
// prop->smoke = smoke;
|
||||
// prop->pos.x = pos->x;
|
||||
// prop->pos.y = pos->y;
|
||||
|
|
|
|||
|
|
@ -14573,7 +14573,7 @@ u8 g_RecentQuipsIndex = 0;
|
|||
u32 var8009cd9c = 0;
|
||||
s16 *var8009cda0 = NULL;
|
||||
struct var8009cda4 *var8009cda4 = NULL;
|
||||
u32 var8009cda8 = 0;
|
||||
struct prop *var8009cda8 = NULL;
|
||||
u32 var8009cdac = 0;
|
||||
u32 var8009cdb0 = 0;
|
||||
u32 var8009cdb4 = 0;
|
||||
|
|
|
|||
|
|
@ -2618,7 +2618,7 @@
|
|||
#define PROPTYPE_EYESPY 5
|
||||
#define PROPTYPE_PLAYER 6
|
||||
#define PROPTYPE_EXPLOSION 7
|
||||
#define PROPTYPE_EFFECT 8
|
||||
#define PROPTYPE_SMOKE 8
|
||||
|
||||
#define QUADRANT_BACK 0x01
|
||||
#define QUADRANT_SIDE1 0x02
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ void doorDoCalc(struct doorobj *door);
|
|||
u32 func0f08f538(void);
|
||||
u32 func0f08f604(void);
|
||||
u32 func0f08f968(void);
|
||||
u32 func0f08fcb8(void);
|
||||
bool func0f08fcb8(struct prop *prop);
|
||||
void doorActivateWrapper(struct prop *prop, bool arg1);
|
||||
u32 func0f08fffc(void);
|
||||
void func0f0900c0(struct prop *prop, struct doorobj *door);
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@ extern s32 g_RecentQuipsPlayed[5];
|
|||
extern u8 g_RecentQuipsIndex;
|
||||
extern s16 *var8009cda0;
|
||||
extern struct var8009cda4 *var8009cda4;
|
||||
extern struct prop *var8009cda8;
|
||||
extern u32 var8009cdac;
|
||||
extern u32 var8009cdb0;
|
||||
extern struct weaponobj *g_ProxyMines[30];
|
||||
|
|
|
|||
Loading…
Reference in New Issue