From 9642084c3b2e4ecfa3533e4bebdc9f74d5f8c0b5 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 6 Feb 2020 22:45:39 +1000 Subject: [PATCH] Attempt to decompile currentPlayerHasProp --- src/game/game_111600.c | 32 ++++++++++++++++++++++++++++++++ src/include/game/game_111600.h | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/game/game_111600.c b/src/game/game_111600.c index 7cbf55191..7cb5f476c 100644 --- a/src/game/game_111600.c +++ b/src/game/game_111600.c @@ -1269,6 +1269,38 @@ glabel currentPlayerHasProp /* f11294c: 00000000 */ sll $zero,$zero,0x0 ); +// regalloc when assigning item and first +//bool currentPlayerHasProp(struct prop *prop) +//{ +// struct invitem *item = g_Vars.currentplayer->weapons; +// struct invitem *first = item; +// struct prop *child; +// +// while (item) { +// if (item->type == INVITEMTYPE_PROP && item->type_prop.prop == prop) { +// return true; +// } +// +// item = item->next; +// +// if (item == first) { +// break; +// } +// } +// +// child = g_Vars.currentplayer->prop->child; +// +// while (child) { +// if (child == prop) { +// return true; +// } +// +// child = child->next; +// } +// +// return false; +//} + GLOBAL_ASM( glabel func0f112950 /* f112950: 3c08800a */ lui $t0,0x800a diff --git a/src/include/game/game_111600.h b/src/include/game/game_111600.h index 9763f941c..14c96173e 100644 --- a/src/include/game/game_111600.h +++ b/src/include/game/game_111600.h @@ -30,7 +30,7 @@ u32 func0f11253c(void); u32 func0f112790(void); bool currentPlayerHasBriefcase(void); bool currentPlayerHasDataUplink(void); -u32 currentPlayerHasProp(struct prop *prop); +bool currentPlayerHasProp(struct prop *prop); u32 func0f112950(void); u32 func0f112a58(void); struct textoverride *objGetTextOverride(struct defaultobj *obj);