I am writeing this to answer LonePossum's question and for anyone else that might wonder how to do this.
This is a tutorial on how to add menu options to psp quake 1.1 I use Add Bot and Remove Bot for the options to answer LovePossum's question.
Step 1.
Open
Code: Select all
menu.c
If you have implemented Adhoc support follow go to Part A if not go to Part B.
**NOTICE**
This tutorial assumes impulse 101 adds a bot and impulse 103 removes a bot changes these impulses to whichever impulse you need, if they aren't already the ones you need
Part A.
Search for the Multiplayer Menu section
At the top of that section it says this:
Code: Select all
#ifdef PSP
#define MULTIPLAYER_ITEMS 4
#else
#define MULTIPLAYER_ITEMS 3
#endif
Code: Select all
#ifdef PSP
#define MULTIPLAYER_ITEMS 6
#else
#define MULTIPLAYER_ITEMS 3
#endif
Scroll down to this:
Code: Select all
ifdef PSP
M_Print (72, 97, "Infrastructure ");
M_DrawCheckbox (220, 97, tcpipAvailable );
#if 0
// Sort out adhoc later
M_Print (72, 117, "Adhoc ");
M_DrawCheckbox (220, 117, adhocAvailable);
#endif
The second number is the Y value which measures the y axis.
They work just like cordinates do (X, Y) ex (4, 5)
As we can see the x value stays at 72 We will follow this pattern.
Lets subtract the y values.
117 - 97 = x
We get this
117 - 97 = 20
x = 20
So each options has a distance of 20 units between them on the y axis we will also follow this pattern.
Right after this:
Code: Select all
ifdef PSP
M_Print (72, 97, "Infrastructure ");
M_DrawCheckbox (220, 97, tcpipAvailable );
#if 0
// Sort out adhoc later
M_Print (72, 117, "Adhoc ");
M_DrawCheckbox (220, 117, adhocAvailable);
#endif
Code: Select all
M_Print (72, 137, "Add Bot ");
M_Print (72, 157, "Remove Bot ");
Code: Select all
#ifdef PSP
case 3:
Datagram_Shutdown();
tcpipAvailable = !tcpipAvailable;
if(tcpipAvailable)
Datagram_Init();
break;
#if 0
// Dont need adhoc at the moment
case 4:
Datagram_Shutdown();
adhocAvailable = !adhocAvailable;
tcpipAvailable = 0;
if(adhocAvailable)
Datagram_Init();
break;
#endif
Code: Select all
case 5:
Cbuf_AddText ("impulse 101\n");
break;
case 6:
Cbuf_AddText ("impulse 103\n");
break;
Scroll down to this:
Code: Select all
ifdef PSP
M_Print (72, 97, "Infrastructure ");
M_DrawCheckbox (220, 97, tcpipAvailable );
#if 0
// Sort out adhoc later
M_Print (72, 117, "Adhoc ");
M_DrawCheckbox (220, 117, adhocAvailable);
#endif
Code: Select all
M_Print (72, 117, "Add Bot ");
M_Print (72, 137, "Remove Bot ");
Code: Select all
#ifdef PSP
case 3:
Datagram_Shutdown();
tcpipAvailable = !tcpipAvailable;
if(tcpipAvailable)
Datagram_Init();
break;
#if 0
// Dont need adhoc at the moment
case 4:
Datagram_Shutdown();
adhocAvailable = !adhocAvailable;
tcpipAvailable = 0;
if(adhocAvailable)
Datagram_Init();
break;
#endif
Code: Select all
case 4:
Cbuf_AddText ("impulse 101\n");
break;
case 5:
Cbuf_AddText ("impulse 103\n");
break;
Congratulations.