Thread: is this bad to do?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Liam, I think you're reading too much into the original post. And your reply was kind of harsh for someone new (especially if you don't fully understand what he/she is asking).

    Here's what I get from moose's post...

    Code:
    //game loop
    while(GameState==LoopOne)
    {
        if(ClickedOnBtn1()) shoot();
        if(ClickedOnBtn2()) 
        {
             GameState=LoopTwo;
             break;
        }
        if(ClickedOnBtn3())
        {
            GameState=LoopThree;
            break;
        }
        if(ClickedOnBtn4()) run();
    }
    
    //main menu loop
    while(GameState==LoopTwo)
    {
       //stuff in loop 2.
    }
    If function ClickedOnBtn2 returns true then you reset the GameState variable and exit the loop. Granted the code I provided is really generic, but from what I read of the original post that's a basic idea of what he's saying. If a certain condition is met you move on to another loop without ever completing the rest of the current loop. He never said infinite. He never said his loop didn't end. He said:

    without every getting to the end of the game loop.
    I think you need to re-read the original post.

    And this crap..

    Uraldor, hey ***got, dont get into someone's business u dumb ****...
    is completely uncalled for. Uraldor was simply telling you to go easy on a new poster.
    Last edited by jdinger; 05-20-2002 at 08:59 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bad and fail of steam
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 02-19-2008, 03:07 AM
  2. Can you still view the bios screen with a bad CPU?
    By HyperCreep in forum Tech Board
    Replies: 4
    Last Post: 12-31-2006, 06:57 PM
  3. data loss bad bad bad
    By RoD in forum Tech Board
    Replies: 4
    Last Post: 05-01-2003, 12:06 PM
  4. Shocking(kind of)
    By Shadow in forum A Brief History of Cprogramming.com
    Replies: 25
    Last Post: 12-10-2002, 08:52 PM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM