Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

[Tutorial PSP] - Adding Menu Options to PSP Quake 1.1

| Inside3d Forums Forum Index -> Programming Tutorials

View previous topic :: View next topic
Author | Message
--- | ---
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

Code:
menu.c

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

Back to top |

LonePossum. Joined: 02 Nov 2009 Posts: 38 |

Posted: Mon Feb 01, 2010 7:42 am Post subject: |

Thanks a bunch, This Helps me with a lot of things im trying to do. Worked Like a Charm But on PSP With the no comunitcations Avalible thing it gets split inbetween them / Does not really bother me also they go far to low and theres a gap where more menu options could go and due to the ammount of Multiplayer Options the menu would not go down to the Remove Bot Function so I just modified it to 7 and I could reach it.
Either you could fix your tut to 7 or fix it so there isint a gap / Hope you get me. I did the tut on PSP Quake 1.1. Hope I didnt do something wrong causing this issue.
Thanks Again.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Programming Tutorials | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group