Attempt to decompile currentPlayerHasKeyFlags
This commit is contained in:
parent
1aa01a684d
commit
46c34b738d
|
@ -43663,7 +43663,7 @@ glabel func0f08bd00
|
|||
/* f08bd24: 24030001 */ addiu $v1,$zero,0x1
|
||||
.L0f08bd28:
|
||||
/* f08bd28: afa30018 */ sw $v1,0x18($sp)
|
||||
/* f08bd2c: 0fc449e4 */ jal func0f112790
|
||||
/* f08bd2c: 0fc449e4 */ jal currentPlayerHasKeyFlags
|
||||
/* f08bd30: afa7001c */ sw $a3,0x1c($sp)
|
||||
/* f08bd34: 8fa30018 */ lw $v1,0x18($sp)
|
||||
/* f08bd38: 10400003 */ beqz $v0,.L0f08bd48
|
||||
|
|
|
@ -1046,7 +1046,7 @@ glabel func0f11253c
|
|||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f112790
|
||||
glabel currentPlayerHasKeyFlags
|
||||
/* f112790: 3c0e800a */ lui $t6,0x800a
|
||||
/* f112794: 8dcea244 */ lw $t6,-0x5dbc($t6)
|
||||
/* f112798: 27bdfff8 */ addiu $sp,$sp,-8
|
||||
|
@ -1094,6 +1094,46 @@ glabel func0f112790
|
|||
/* f112830: 8fb00004 */ lw $s0,0x4($sp)
|
||||
/* f112834: 03e00008 */ jr $ra
|
||||
/* f112838: 27bd0008 */ addiu $sp,$sp,0x8
|
||||
);
|
||||
|
||||
//bool currentPlayerHasKeyFlags(u32 wantkeyflags)
|
||||
//{
|
||||
// struct invitem *item = g_Vars.currentplayer->weapons;
|
||||
// u32 heldkeyflags = 0;
|
||||
// bool unlocked = false;
|
||||
//
|
||||
// while (item) {
|
||||
// if (item->type == INVITEMTYPE_PROP) {
|
||||
// struct prop *prop = item->type_prop.prop;
|
||||
//
|
||||
// if (prop && prop->type == PROPTYPE_OBJ) {
|
||||
// struct defaultobj *obj = prop->obj;
|
||||
//
|
||||
// if (obj && obj->type == OBJTYPE_KEY) {
|
||||
// struct keyobj *key = (struct keyobj *)obj;
|
||||
//
|
||||
// heldkeyflags |= key->keyflags;
|
||||
//
|
||||
// if ((wantkeyflags & heldkeyflags) == wantkeyflags) {
|
||||
// unlocked = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// item = item->next;
|
||||
//
|
||||
// if (item == g_Vars.currentplayer->weapons) {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return unlocked;
|
||||
//}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f11283c
|
||||
/* f11283c: 03e00008 */ jr $ra
|
||||
/* f112840: 00001025 */ or $v0,$zero,$zero
|
||||
);
|
||||
|
|
|
@ -27,7 +27,7 @@ void currentPlayerRemoveProp(struct prop *prop);
|
|||
u32 func0f1120f0(void);
|
||||
u32 func0f1122ec(void);
|
||||
u32 func0f11253c(void);
|
||||
u32 func0f112790(void);
|
||||
bool currentPlayerHasKeyFlags(u32 wantkeyflags);
|
||||
bool currentPlayerHasBriefcase(void);
|
||||
bool currentPlayerHasDataUplink(void);
|
||||
bool currentPlayerHasProp(struct prop *prop);
|
||||
|
|
|
@ -747,6 +747,11 @@ struct doorobj { // objtype 0x01
|
|||
/*0xcc*/ u8 laserfade;
|
||||
};
|
||||
|
||||
struct keyobj { // objtype 0x04
|
||||
struct defaultobj base;
|
||||
u32 keyflags;
|
||||
};
|
||||
|
||||
struct image {
|
||||
/*0x00*/ u32 unk00;
|
||||
/*0x04*/ u32 unk04;
|
||||
|
|
Loading…
Reference in New Issue