Team Xlink
Joined: 25 Jun 2009 Posts: 320
|
Posted: Mon Feb 01, 2010 1:58 am Post subject: [Tutorial PSP] - Adding Menu Options to PSP Quake 1.1 |
|
|
Hello.
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
Step 2.
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: | #ifdef PSP
#define MULTIPLAYER_ITEMS 4
#else
#define MULTIPLAYER_ITEMS 3
#endif |
Change it to this:
Code: | #ifdef PSP
#define MULTIPLAYER_ITEMS 6
#else
#define MULTIPLAYER_ITEMS 3
#endif |
Step 3
Scroll down to this:
Code: | 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 first number is the X value which measures the x axis
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: | 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
|
Add this:
Code: |
M_Print (72, 137, "Add Bot ");
M_Print (72, 157, "Remove Bot "); |
Scroll down to this:
Code: | #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 |
After that add this:
Code: | case 5:
Cbuf_AddText ("impulse 101\n");
break;
case 6:
Cbuf_AddText ("impulse 103\n");
break; |
Part B.
Scroll down to this:
Code: | 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
|
Add this:
Code: |
M_Print (72, 117, "Add Bot ");
M_Print (72, 137, "Remove Bot "); |
Scroll down to this:
Code: | #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 |
After that add this:
Code: | case 4:
Cbuf_AddText ("impulse 101\n");
break;
case 5:
Cbuf_AddText ("impulse 103\n");
break; |
Now you are done.
Congratulations. _________________
Anonymous wrote: | if it works, it works. if it doesn't, HAHAHA! |
Last edited by Team Xlink on Sun Jul 11, 2010 6:56 pm; edited 1 time in total |
|