Exiting my menu..
Displaying 1-10 of 10 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
jesusfreak

I started to make a menu, lots of new ideas coming up.. But I am limited due to one small problem.. .. I cannot exit my meni back to the screen!

I have tried everything i know (" Render(); Free();
all kinds of stuff!")
can someone help me?
here is my menu code.


void Shop()
{
int Pointer, PImage, BG;
PImage=LoadImage("pointer.pcx");
BG=LoadImage("BG.pcx");
While(1)
{
Render();
TCopySprite(0,0,320,240,BG);
GotoXY(14,14); PrintString(0, "Potion 50Gp");
GotoXY(14,29); PrintString(0, "X Potion 100Gp");
GotoXY(14,44); PrintString(0, "S Potion 150Gp");
GotoXY(14,59); PrintString(0, "Protein 15Gp");
GotoXY(14,74); PrintString(0, "X Protein 30Gp");
GotoXY(14,89); PrintString(0, "Exit Menu");
SetLucent(1);
TCopySprite(5, 13+(15*Pointer), 95, 16, PImage);
SetLucent(0);
ShowPage();
UpdateControls();
If(up && pointer0) { Unpress(5); pointer--; }
If(down && pointer


any help would be hot!



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!!)

Posted on 2001-01-04 01:07:02

jesusfreak


If(down && pointer



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!!)

Posted on 2001-01-04 01:11:22

jesusfreak


If(down && pointer
any help?



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!!)

Posted on 2001-01-04 01:13:04

jesusfreak

void Shop()
{
int Pointer, PImage, BG;
PImage=LoadImage("pointer.pcx");
BG=LoadImage("BG.pcx");
While(1)
{
Render();
TCopySprite(0,0,320,240,BG);
GotoXY(14,14); PrintString(0, "Potion 50Gp");
GotoXY(14,29); PrintString(0, "X Potion 100Gp");
GotoXY(14,44); PrintString(0, "S Potion 150Gp");
GotoXY(14,59); PrintString(0, "Protein 15Gp");
GotoXY(14,74); PrintString(0, "X Protein 30Gp");
GotoXY(14,89); PrintString(0, "Exit Menu");
SetLucent(1);
TCopySprite(5, 13+(15*Pointer), 95, 16, PImage);
SetLucent(0);
ShowPage();
UpdateControls();
If(up && pointer0) { Unpress(5); pointer--; }
If(down && pointerhttp://members.safepages.com/jcgospel/menu.html



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!!)

Posted on 2001-01-04 01:14:59

jesusfreak

sorry, limit on the board!! ( i am mad )

here go here

http://members.safepages.com/jcgospel/menu.html


any help would be appreciated!



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!!)

Posted on 2001-01-04 01:17:53

Lunarbeam

talk about worthless thread...btw try using return



-- Lunarbeam @

Posted on 2001-01-04 01:40:19

stevenmarine

Well, since the thread was useless, I can be OT on it.
Exitting was spelt exiting, and so I read this entire thread. I'm sleepy. I should sleep more. I fell asleep in french, and the teacher didn't wake me up when class ended. When a boy who used my desk in the next class did, I had missed a class, and asked for a pass, and he told me I look like the living dead (because I was so sleepy I guess), all I said was "no", and I left the class without a pass. I must have been very sleepy. Faulty school. I'm going to bed at 8:00 from now on.
Anyway, I'm so glad the blue is back. My drawer's obsession of color study prevented me from using nuetral shades to overpower the large green verge, and I was burning my eyes out in the name of aesthetics. Why do I match my windows color with verge? Because that's the only place I go other than my mailbox, and verge tools (which have their own (well done) color schemes). Plus I'm an aesthetic's freak (I think I'll name my cat Beuwulf, Polixenes, Macavity, or Aesthetic cat. which do you think?), and someone incorporated a coloring system. BTW, should I incorporate the bauhaus color study on my sight? Too much brown and green together everywhere in this world.
BTW, what's the limit on this board that forced JF to move the thread? I don't understand. *yawn* sleepy.



"I am the savior, 'mouchee mouse'! look at my face!"-Mouchee mouse, the savior. from little ninja brothers

Posted on 2001-01-04 17:12:16

Ear

Your menu is inside an infinite loop. You obviously don't understand how a loop works, which is very, very sad. while( ) loops until the condition in the brackets is met. while(1) loops until one equals zero. Which is impossible. Making it loop forever. To escape this, you can either alter the condition the while loop uses, or return from the function. (Since v2 has no break; as of yet.)

Case 5: // here is the problem when I hit exit, nothing happens.

...could be changed to...

Case 5: Free(PImage); return;

Exiting the whole function. Another method would be to use a variable that tells v2 when the loop is over.

int a;

while (!a)
{
// ...
}

...and then set a to a positive integer when case 5 is executed.

case 5: a = 1;

There. Done.




- Ear

Posted on 2001-01-04 19:10:07

jesusfreak

I know, th board ate my code...
umm. hey what you mean by return?
like..
is there a funciton i do not know about or... umm..



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!! click on te house link!)

Posted on 2001-01-04 19:18:56

jesusfreak

Thank You SO MUCH!!



...D...0.......T...H...E......D...E...W... ( hey look @ my new site!! click on te house link!)

Posted on 2001-01-04 19:23:35


Displaying 1-10 of 10 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.