WISP

Sign in to follow this  
  • entries
    9
  • comments
    7
  • views
    6812

Evil Bug, Good Progress

Sign in to follow this  
Agony

295 views

I did some refactoring today. And created a bug that took far too long to track down, and amounted to one single line that I forgot to add/copy during the refactoring. Typical.

But it seems to be working now. I attempted to make it easier to make states, by creating a couple of base states from which other states could inherit. One is just a basic state, has a base essence state with some things I plan on using in just about all states, as well as handles activating and deactivating a state, such as when a gameplay state goes into the background while the main menu is active. The other base state expands on this, and adds some standard GUI stuff, and is a basic menu state. All full-screen menus can inherit from this.

I also scrapped the single Process() call on states, and went back to two functions, PreProcess() and PostProcess(). It was getting way too messy otherwise. The PreProcess() primarily gets a list of components that need processing. These components are processed by the main loop, and then PostProcess() is called on the active state, which does anything it needs to in response to the processed components, and optionally sets the new state. I did it this time so that I still don't need boost::enable_shared_from_this, however, which is good.

In the way of progress, rather than the semi-progress of refactoring, I got the CEGUI component working pretty well. It followed the previous prototype's pattern pretty much, but I tweaked it here and there, and am happy with the changes.

I got the main menu actually displaying with CEGUI as well. I also added the options menu, not that it provides any options yet. I'm still mostly just copying from the old prototype, which did very little. Perhaps tomorrow (rather than my hoped-for last night) I'll have all the four menus available.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now