
7F04F9F8:	84528	display ammo collection text
	accepts: A0=type, A1=amount
27BDFF80	ADDIU	SP,SP,FF80
AFA40080	SW	A0,0080 (SP)	;SP+80=A0: ammo type
3C0E8005	LUI	T6,8005
27A4001C	ADDIU	A0,SP,001C	;A0=SP+1C: buffer for string
00A03025	OR	A2,A1,R0	;A2=A1: quantity
25CE29D8	ADDIU	T6,T6,29D8	;T6=800529D8: 0x64 of NULLs
8FA50080	LW	A1,0080 (SP)	;A1=SP+80: ammo type
AFBF0014	SW	RA,0014 (SP)
25D90060	ADDIU	T9,T6,0060	;T9=80052A30: endpoint of block
00804025	OR	T0,A0,R0	;T0=A0: p->buffer
//7F04FA20:	initialize buffer (memset)
8DC10000	LW	AT,0000 (T6)
25CE000C	ADDIU	T6,T6,000C
2508000C	ADDIU	T0,T0,000C
AD01FFF4	SW	AT,FFF4 (T0)
8DC1FFF8	LW	AT,FFF8 (T6)
AD01FFF8	SW	AT,FFF8 (T0)
8DC1FFFC	LW	AT,FFFC (T6)
15D9FFF8	BNE	T6,T9,7F04FA20
AD01FFFC	SW	AT,FFFC (T0)
//7F04FA44:	copy last NULL word, then send out for text
8DC10000	LW	AT,0000 (T6)
0FC13E48	JAL	7F04F920	;creates ammo collection string
AD010000	SW	AT,0000 (T0)
//7F04FA50:	display text
0FC228F2	JAL	7F08A3C8	;display A0 in lower-left corner
27A4001C	ADDIU	A0,SP,001C	;A0=SP+1C: p->final string
//7F04FA58:
8FBF0014	LW	RA,0014 (SP)
27BD0080	ADDIU	SP,SP,0080
03E00008	JR	RA
00000000	NOP


7F04F920:	84450	generate ammo type string
	accepts: A0=p->final string, A1=ammo type, A2=quantity
ADDIU	SP,SP,FFD8
SW	RA,0024 (SP)
SW	S2,0020 (SP)
SW	S1,001C (SP)
SW	S0,0018 (SP)
SB	R0,0000 (A0)	;NULL->final
LUI	T6,8005
LW	T6,84D0 (T6)	;T6=800484D0: language
OR	S0,A0,R0	;S0=A0: p->final
OR	S1,A1,R0	;S1=A1: type
BEQ	T6,R0,7F04F990	;branch if english
OR	S2,A2,R0	;A2=S2: quantity
//7F04F950:	japanese
JAL	7F04F40C	;append ammo type name
NOP
JAL	7F09A464	;V0=#players
NOP
SLTI	AT,V0,0003
BEQ	AT,R0,7F04F978	;branch if 3-4 player
OR	A0,S0,R0	;A0=S0: p->final
OR	A1,S1,R0	;A1=S1: ammo type
JAL	7F04F2B4	;append "Picked up "
OR	A2,S2,R0	;A2=S2: quantity
//7F04F978:	
LUI	A1,8005
ADDIU	A1,A1,29D0	;A1=800529D0: "\r"
JAL	7000A7FC	;append newline
OR	A0,S0,R0	;A0=S0: p->final
BEQ	R0,R0,7F04F9E4
LW	RA,0024 (SP)
//7F04F990:	english
JAL	7F09A464	;V0=#players
NOP
SLTI	AT,V0,0003
BEQ	AT,R0,7F04F9C0	;branch if 3-4 player
OR	A0,S0,R0	;A0=S0: p->final
//7F04F9A4:	append "Picked up "
OR	A1,S1,R0	;A1=S1: ammo type
JAL	7F04F2B4	;append "Picked up "
OR	A2,S2,R0	;A2=S2: quantity
OR	A0,S0,R0	;A0=S0: p->final
OR	A1,S1,R0	;A1=S1: ammo type
JAL	7F04F2EC	;append article to string
OR	A2,S2,R0	;A2=S2: quantity
//7F04F9C0:	append ammo type text
OR	A0,S0,R0	;A0=S0: p->final
OR	A1,S1,R0	;A1=S1: ammo type
JAL	7F04F40C	;append ammo type text
OR	A2,S2,R0	;A2=S2: quantity
//7F04F9D0:	append end of sentence
LUI	A1,8005
ADDIU	A1,A1,29D4	;A1=800529D4: "./r"
JAL	7000A7FC	;strcat(A0,"./r")
OR	A0,S0,R0	;A0=S0: p->final
//7F04F9E0:	return
LW	RA,0024 (SP)
LW	S0,0018 (SP)
LW	S1,001C (SP)
LW	S2,0020 (SP)
JR	RA
ADDIU	SP,SP,0028
