Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualDragonsoulj

Posted 16 March 2013 - 05:35 PM

It should be OK but, if I'm not wrong you need virtual keyword before void's :-)

 

You only need virtual if you plan on overwriting the function in child classes. "void" works if you are not returning anything from a function.

 

 

how do I actually implement this code, I have 14 pages of code, where should I start

.

 

I am assuming you already have some game code? Perhaps a running game? Since you want to run the splash before opening any real window (assuming you are using a windowed design), you could just create a splash screen window that does not have any windowed effects (ie title bar, minimize button, close button) to show your splash screen, and while that is displayed, load your resources. When your resources are loaded, call the rest of your already established code, for instance your game window that does have a title bar and a close button.

 

With the structure you posted*, just put the splash screen code in your init() function, at the start, show a splash image, then start loading resources and data. When it finishes, start the game code.

 

* - edited


#1Dragonsoulj

Posted 16 March 2013 - 05:35 PM

It should be OK but, if I'm not wrong you need virtual keyword before void's :-)

 

You only need virtual if you plan on overwriting the function in child classes. "void" works if you are not returning anything from a function.

 

how do I actually implement this code, I have 14 pages of code, where should I start

.

 

I am assuming you already have some game code? Perhaps a running game? Since you want to run the splash before opening any real window (assuming you are using a windowed design), you could just create a splash screen window that does not have any windowed effects (ie title bar, minimize button, close button) to show your splash screen, and while that is displayed, load your resources. When your resources are loaded, call the rest of your already established code, for instance your game window that does have a title bar and a close button.

 

With the structure you have, just put the splash screen code in your init() function, at the start, show a splash image, then start loading resources and data. When it finishes, start the game code.


PARTNERS