Skip to main content
GameDev.net gamedev.net
🔒 Locked

Reset?

Started by MetaKnight Jul 23, 2002 at 4:47 PM 2 replies 200+ views
Original Post
MetaKnight
MetaKnight
How do you reset a program in C++? Like presing a reset button on a console. Like within the program
griffenjam
griffenjam
Depends on the type of program.

If it''s windows application you just have to make sure that you open any windows that should be open when your program starts and close one that shouldn''t be, also clear variables that shouldn''t have values in them yet, and ut default values in variables that should have them.

If it''s a game then the easiest way I know of s to use a state machine and have a state like GAME_STARTUP, that way you can return your game to that point at any time, just as long as you don''t gather resources in that state, you don''t want to allocate resources twice.

Jason Mickela
ICQ : 873518
Excuse my speling.

The V-Town Have-Nots
Alimonster
Alimonster
LOL! Looks like I completely missed the point of the question . Wot that bloke just said ^^^...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.