Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / help on understanding Dark Invaders Tutorial

Author
Message
archie456
16
Years of Service
User Offline
Joined: 13th Feb 2008
Location:
Posted: 13th Feb 2008 21:50
Hi,

I'm trying to work through the Dark Invaders tutorial - but I'm a bit of a newbe to c++.

At the top of dark invaders.cpp there is:



I understand what the eMode variable does, but I don't understand the reason for the "eMode g_eGameMode = eGameSetup;" line - what does this do?

Thanks for any help!!
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 13th Feb 2008 22:40
The values are "integers" and they are starting at 0 (that's zero)and adding 1 to each other value.

Currently the value of g_eGameMode = 0

Your mod has been erased by a signature
MikeyK65
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Cheltenham, UK
Posted: 15th Feb 2008 11:49
Hi there

eMode is a type created as an enum because it can use more englishy words instead of just numbers.

The e_gGameMode variable is a variable used to hold what stage of the game you are in, e.g. set up, reset mode, title screen, plying, dead, etc.

The line
eMode g_eGameMode = eGameSetup;
basically sets the variable to say that the game mode is going to start in game setup mode.

Hope that helps?
Cheers
Mike

Login to post a reply

Server time is: 2024-10-08 11:33:47
Your offset time is: 2024-10-08 11:33:47