7F08C86C:	C139C	handles pulling next item out of inventory
27BDFFD8	ADDIU	SP,SP,FFD8
3C038008	LUI	V1,8008
8C63A0B0	LW	V1,A0B0 (V1)
AFBF0024	SW	RA,0024 (SP)
AFB30020	SW	S3,0020 (SP)
AFB2001C	SW	S2,001C (SP)
AFB10018	SW	S1,0018 (SP)
AFB00014	SW	S0,0014 (SP)
AFA40028	SW	A0,0028 (SP)
AFA5002C	SW	A1,002C (SP)
8C7011E0	LW	S0,11E0 (V1)	;S0=p->inventory
00C09025	OR	S2,A2,R0
8C910000	LW	S1,0000 (A0)
1200003D	BEQ	S0,R0,7F08C998	;kill if no inventory
8CB30000	LW	S3,0000 (A1)
8E020000	LW	V0,0000 (S0)	;V0=type of entry
//7F08C8AC:	a later branch jumps here
24010001	ADDIU	AT,R0,0001
54410013	BNEL	V0,AT,7F08C900	;branch if not a right-handed weapon
24010003	ADDIU	AT,R0,0003	;AT=3: entry for doubles
8E040004	LW	A0,0004 (S0)
28810021	SLTI	AT,A0,0021
10200029	BEQ	AT,R0,7F08C968	;if >0x20 - gadget detected!
0224082A	SLT	AT,S1,A0
10200027	BEQ	AT,R0,7F08C968	;branch if next weapon < cur?
00000000	NOP
//7F08C8D0:		right weapon testing
52400008	BEQL	S2,R0,7F08C8F4
00808825	OR	S1,A0,R0	;S1=right weapon
0FC17817	JAL	7F05E05C	;TRUE if ammo for right weapon
00000000	NOP
10400021	BEQ	V0,R0,7F08C968	;branch if out!
3C038008	LUI	V1,8008
8C63A0B0	LW	V1,A0B0 (V1)	;V1=p->BONDdata
8E040004	LW	A0,0004 (S0)	;A0=right weapon
00808825	OR	S1,A0,R0	;S1=right weapon
//7F08C8F4:		
10000028	BEQ	R0,R0,7F08C998
00009825	OR	S3,R0,R0	;S3=left weapon
//7F08C8FC:		double weapon set
24010003	ADDIU	AT,R0,0003
14410019	BNE	V0,AT,7F08C968	;branch if not doubles!
00000000	NOP
8E040004	LW	A0,0004 (S0)	;A0=right weapon
0224082A	SLT	AT,S1,A0
14200007	BNEZ	AT,7F08C930
00000000	NOP
16240013	BNE	S1,A0,7F08C968
00000000	NOP
8E180008	LW	T8,0008 (S0)	;T8=left weapon
0278082A	SLT	AT,S3,T8
1020000F	BEQ	AT,R0,7F08C968
00000000	NOP
//7F08C930:
12400008	BEQ	S2,R0,7F08C954
00000000	NOP
0FC17817	JAL	7F05E05C	;TRUE if ammo for right weapon
00000000	NOP
14400004	BNEZ	V0,7F08C954	;branch if you're out!
00000000	NOP
0FC17817	JAL	7F05E05C	;TRUE if ammo for left weapon
8E040008	LW	A0,0008 (S0)	;A0=left weapon
10400005	BEQ	V0,R0,7F08C968	;branch if you're out!
//7F08C954:
3C038008	LUI	V1,8008
8E110004	LW	S1,0004 (S0)	;S1=right weapon
8E130008	LW	S3,0008 (S0)	;S3=left weapon
1000000D	BEQ	R0,R0,7F08C998
8C63A0B0	LW	V1,A0B0 (V1)	;V1=p->BONDdata
//7F08C968:	
...
//7F08C990:		loop backward
BNEL	S0,R0,7F08C8AC
LW	V0,0000 (S0)
...
//7F08CA2C		all guns - single weapon drawn
8FAF0028	LW	T7,0028 (SP)	;T7=p->right weapon# on stack
24030021	ADDIU	V1,R0,0021	;V1=all-guns activated range
8DF80000	LW	T8,0000 (T7)	;T8=right weapon
16380005	BNE	S1,T8,7F08CA50	;branch if it isn't the same as the next weapon in inventory
00000000	NOP
8FB9002C	LW	T9,002C (SP)	;T9=p->left weapon# on stack
8F280000	LW	T0,0000 (T9)	;T0=left weapon
56680027	BNEL	S3,T0,7F08CAE8	;branch if it isn't the same as the next left weapon
8FAB0028	LW	T3,0028 (SP)
//7F08CA50
26090001	ADDIU	T1,S0,0001	;T1=next weapon#
0123001A	DIV	T1,V1
00008010	MFHI	S0		;S0=next.wep# % allguns#
260A0001	ADDIU	T2,S0,0001	;T2=next.wep
14600002	BNEZ	V1,7F08CA6C	;branch if there wasn't division by zero
00000000	NOP
0007000D	BREAK
//7F08CA6C
2401FFFF	ADDIU	AT,R0,FFFF
14610004	BNE	V1,AT,7F08CA84	;branch if allguns# != -1
3C018000	LUI	AT,8000
15210002	BNE	T1,AT,7F08CA84
00000000	NOP
0006000D	BREAK
//7F08CA84
1600000C	BNEZ	S0,7F08CAB8
00000000	NOP
0143001A	DIV	T2,V1
00008010	MFHI	S0
14600002	BNEZ	V1,7F08CAA0
00000000	NOP
0007000D	BREAK
//7F08CAA0
2401FFFF	ADDIU	AT,R0,FFFF
14610004	BNE	V1,AT,7F08CAB8
3C018000	LUI	AT,8000
15410002	BNE	T2,AT,7F08CAB8
00000000	NOP
0006000D	BREAK
//7F08CAB8
52400006	BEQL	S2,R0,7F08CAD4
02008825	OR	S1,S0,R0
0FC17817	JAL	7F05E05C
02002025	OR	A0,S0,R0
10400004	BEQ	V0,R0,7F08CADC
24030021	ADDIU	V1,R0,0021	;V1=all-guns activated range
//7F08CAD0
02008825	OR	S1,S0,R0	;S1=S0: right weapon
10000003	BEQ	R0,R0,7F08CAE4
00009825	OR	S3,R0,R0	;S3=NULL left weapon
//7F08CADC
5611FFDD	BNEL	S0,S1,7F08CA54
26090001	ADDIU	T1,S0,0001
//7F08CAE4		return
8FAB0028	LW	T3,0028 (SP)
AD710000	SW	S1,0000 (T3)
8FAC002C	LW	T4,002C (SP)
AD930000	SW	S3,0000 (T4)
8FBF0024	LW	RA,0024 (SP)
8FB30020	LW	S3,0020 (SP)
8FB2001C	LW	S2,001C (SP)
8FB10018	LW	S1,0018 (SP)
8FB00014	LW	S0,0014 (SP)
03E00008	JR	RA
27BD0028	ADDIU	SP,SP,0028

+_+

7F08C488:	C0FB8	collect weapon of type - returns V0=1 if gadget or all guns in effect
27BDFFE8	ADDIU	SP,SP,FFE8
AFBF0014	SW	RA,0014 (SP)
0FC230C5	JAL	7F08C314	;TRUE if item A0 is in inventory
AFA40018	SW	A0,0018 (SP)	;SP+18=item#
54400018	BNEL	V0,R0,7F08C4FC	;if no ammo, return
00001025	OR	V0,R0,R0	;V0=0: return FALSE
0FC23091	JAL	7F08C244	;V0=p->next available weapon?
00000000	NOP
10400006	BEQ	V0,R0,7F08C4C4	;branch if NULL pointer
00402025	OR	A0,V0,R0	;A0=V0: entry type-right handed
240E0001	ADDIU	T6,R0,0001
AC4E0000	SW	T6,0000 (V0)	;1->thingy
8FAF0018	LW	T7,0018 (SP)	;T7=SP+18: item#
0FC23065	JAL	7F08C194	;add an addition entry to inventory
AC4F0004	SW	T7,0004 (V0)	;item#->V0+4: item type
//7F08C4C4	C0FF4	
3C188008	LUI	T8,8008
8F18A0B0	LW	T8,A0B0 (T8)	;T8=p->BONDdata
8FA80018	LW	T0,0018 (SP)	;T0=weapon type
8F1911EC	LW	T9,11EC (T8)	;T9=all guns flag
29010021	SLTI	AT,T0,0021	;TRUE if weapon, not gadget
13200005	BEQ	T9,R0,7F08C4F0	;branch if all guns in effect
00000000	NOP
10200003	BEQ	AT,R0,7F08C4F0	;branch if a gadget
00000000	NOP
10000004	BEQ	R0,R0,7F08C4FC	;otherwise return false
00001025	OR	V0,R0,R0
//7F08C4F0	C1020	all guns and gadgets return 1
10000002	BEQ	R0,R0,7F08C4FC
24020001	ADDIU	V0,R0,0001
00001025	OR	V0,R0,R0
//7F08C4FC	
8FBF0014	LW	RA,0014 (SP)
27BD0018	ADDIU	SP,SP,0018
03E00008	JR	RA
00000000	NOP

=_=

7F08C40C	C0F3C	
	accepts: A0=weapon, A1=hand (0-R:1-L)
3C0E8008	LUI	T6,8008
8DCEA0B0	LW	T6,A0B0 (T6)	;T6=p->BONDdata
27BDFFE8	ADDIU	SP,SP,FFE8
AFBF0014	SW	RA,0014 (SP)
AFA5001C	SW	A1,001C (SP)	;SP+1C=A1: hand
8DCF11EC	LW	T7,11EC (T6)	;T7=all guns flag
28810021	SLTI	AT,A0,0021
11E00011	BEQ	T7,R0,7F08C470	;branch if all guns not set
00000000	NOP
1020000F	BEQ	AT,R0,7F08C470	;branch if weapon# is gadget
00000000	NOP
1485000D	BNE	A0,A1,7F08C470	;branch if hand != weapon?
00000000	NOP
0FC26919	JAL	7F09A464	;ret V0=# players
AFA40018	SW	A0,0018 (SP)	;SP+18=A0: right weapon
24010001	ADDIU	AT,R0,0001
14410008	BNE	V0,AT,7F08C470	;branch if multiplayer
8FA40018	LW	A0,0018 (SP)
//7F08C454	solo - determine if capable of doubles?
3C050010	LUI	A1,0010
0FC1782D	JAL	7F05E0B4	;TRUE if mask 00100000 is set in weapon A0's stats
AFA40018	SW	A0,0018 (SP)
10400003	BEQ	V0,R0,7F08C470	;branch if it wasn't set
8FA40018	LW	A0,0018 (SP)
10000003	BEQ	R0,R0,7F08C478	;return TRUE!
24020001	ADDIU	V0,R0,0001
//7F08C470	multiplayer and default
0FC230E7	JAL	7F08C39C	;TRUE if item A0 for hand A1 in inventory
8FA5001C	LW	A1,001C (SP)
//7F08C478	
8FBF0014	LW	RA,0014 (SP)
27BD0018	ADDIU	SP,SP,0018
03E00008	JR	RA
00000000	NOP

%_%

7F08C3C0:	C0EF0	V0=TRUE if item is available
	accepts: A0=weapon#
	fries: AT,V1,A0,A1,T6,T7,T8
3C0E8008	LUI	T6,8008
8DCEA0B0	LW	T6,A0B0 (T6)	;T6=p->BONDdata
27BDFFE8	ADDIU	SP,SP,FFE8
AFBF0014	SW	RA,0014 (SP)
8DCF11EC	LW	T7,11EC (T6)	;T7=all guns flag
11E00007	BEQ	T7,R0,7F08C3F4	;branch if all guns not set
00000000	NOP
10800005	BEQ	A0,R0,7F08C3F4	;branch if no weapon
28810021	SLTI	AT,A0,0021
10200003	BEQ	AT,R0,7F08C3F4	;branch if a gadget
00000000	NOP
10000003	BEQ	R0,R0,7F08C3FC	;if all guns and a weapon 1-20, V0=1
24020001	ADDIU	V0,R0,0001	
//7F08C3F4	C0F24	determine if the player owns the thing
0FC230C5	JAL	7F08C314	;V0=TRUE if weapon A0 in inventory
00000000	NOP
//7F08C3FC	C0F2C	return
8FBF0014	LW	RA,0014 (SP)
27BD0018	ADDIU	SP,SP,0018
03E00008	JR	RA
00000000	NOP

+.+

this one only in part
deals with determining the next item with ammo for it
...
//7F08D0C8	C1BF8	proceeding from weapon w/o ammo
55420009	BNEL	T2,V0,7F08D0F0	;branch if not a right-handed weapon
8CA5000C	LW	A1,000C (A1)	;doesn't increment V1...
50800006	BEQL	A0,R0,7F08D0EC	;branch if all guns is not set
24630001	ADDIU	V1,V1,0001
8CAD0004	LW	T5,0004 (A1)	;T5=right weapon
29A10059	SLTI	AT,T5,0021	;loop through this many items
54200003	BNEL	AT,R0,7F08D0F0	;branch if not a gadget
8CA5000C	LW	A1,000C (A1)	;doesn't increment V1...
//7F08D0E8	C1C18	various things branch here, so it can't move easily
24630001	ADDIU	V1,V1,0001	;V1=counter?
8CA5000C	LW	A1,000C (A1)	;A1=p->next item in inventory
10A60003	BEQ	A1,A2,7F08D100	;
00000000	NOP
54A0FFDD	BNEL	A1,R0,7F08D070
8CA20000	LW	V0,0000 (A1)
//7F08D100	C1C30	kill at EOL
03E00008	JR	RA
00601025	OR	V0,V1,R0

