Todo List

Member AbsCoordinate
This is a fantastic tweak that I'd like to take advantage of elsewhere in the code base along with a plain coordinate pair.

Class Broadcaster
Complete the description of how to properly work with a Broadcaster.

Member Broadcaster::addListener (Listener *listener)
Verify that the find function works properly.

Member Broadcaster::notify ()
This function is sloppy. Let's clean it up.

Class Button
Finish implementing broadcasting of events both upstream and downstream so that the button can respond appropriately.

Member Button::drawSkin ()
This method only supports type SkinPartType::PART_ENNEAD. This should also support SkinPartType::PART_TRIAD.

Class Camera
Properly document me.

Member Configuration::isGraphicsFullscreen (bool isFullscreen)
Needs proper value and error checking.

Member Configuration::isVsyncEnabled (bool isVsync)
Needs proper value and error checking.

Member Configuration::parseGraphics (TiXmlNode *node)
Check for sane configurations, particularly screen resolution.

Member Configuration::setAudioBufferSize (int audioBuffer)
Needs proper value and error checking.

Member Configuration::setAudioMixRate (int mixrate)
Needs proper value and error checking.

Member Configuration::setAudioMusicVolume (int musicVolume)
Needs proper value and error checking.

Member Configuration::setAudioSfxVolume (int sfxVolume)
Needs proper value and error checking.

Member Configuration::setAudioStereoChannels (int channels)
Needs proper value and error checking.

Member Configuration::setGraphicsColorDepth (int bpp)
Needs proper value and error checking.

Member Configuration::setGraphicsHeight (int height)
Needs proper value and error checking.

Member Configuration::setGraphicsWidth (int width)
Needs proper value and error checking.

Member Control::mGuiEventListener
Find a more sane way of dealing with this.

Member Control::setFocus (bool focus)
Make sure all child Control's lose focus when Parent loses focus. Make sure only 1 Child can have focus if Parent has focus.

Member Control::setHeight (Uint h)
Doesn't take into account a parent's margins.

Member Control::setRelative (int x, int y)
This function does not check for constraints within the Parent Control.

Member Control::setSize (Uint w, Uint h)
Doesn't take into account a parent's margins.

Member Control::setSkin (Skin *skin)
This should handle setting local copies of images and coordinates

Member Control::setWidth (Uint w)
Doesn't take into account a parent's margins.

Class EntityFactory
This class is not fully documented. In particular it does not explain any assumptions that are made nor how to properly implement the createEntity() function.

Class Event
Finish documenting the various interpretations of the Event class.

Member Font::getFont () const
This is mostly a design issue but we should probably never pass out a data type specific to an API other than our own framework. I would simply pass out a std::string but that would require that the Renderer using Font's do conversions on the fly which can cause a real performance bottleneck. I think our best bet would be to build a resource manager within the Renderer class that handles this sort of conversion for all related resources and stores them until they're no longer needed much like the OpenGL Renderer stores converted SDL_Surface's.

Class FpsCounter
Should we stick this in Common.h?

Member FpsCounter::think ()
Document magic number.

Member Game::go (State *state)
This should be done in the GUI as part of skin handling.

Member GameEventHandler::requestGameEvent (Event &event)
The current implementation simply regurgitates the requested Event without performing any validation. Validation will need to be implemented to make the GameEventHandler a proper mediator.

Member Gui::add (Control *control)
This is currently hard-coded but should instead be set via an internal skin descriptor.

Member Gui::controlHasFocus ()
I hate the name of this function. We need to come up with a better name.

Member Image::createSurface (const char *data, int dataLength)
This function is poorly named as it creates the surface that it then converts.

Member Image::Image ()
This constructor assumes that mPixels was properly initialized. The simple fact is that even though mPixels' initialization should never fail under normal circumstances there are times where it may and it needs to be prepared to handle such a case. For the time being I have an assert macro enabled but this will only work in debug builds.

Member Image::mPixels
This may be better off as a straight-up char* buffer which can be converted by the renderers as necessary. This will likely require a modification to the SDL Renderer that stores 'SDL_Surfaces' in a similar manner to the way the OpenGL Renderer stores references to OGL Textures.

Member IsoBlock::draw ()

We should probably build a list of Entities that need to be drawn this frame by examining each of them and determining which of them will actually be visible on the screen (or close to visible). Then the actual draw loop will run through those entities and draw them as necessary. However, I see this method as being very slow. We'll have to test this and see how it works. It may be easier to have the entities listed with an attached tile coordinate using an algorithim to determine roughly which tile they're on using the above tile coordinate finding approach. Then during rendering the drawing routine only needs to check in those coordinates for an entity and can determine rendering offsets that way. As the Map class itself is not responsible for actually performing Entity location calculations, entity tile locations can be updated whenever the map is notified of just such an update. At the same time, the map class purely keeps a list of the Entities but doesn't actually modify any of their locations so we may just have to do this on the fly and hope for the best.

This is a decision that can be made outside of this function.

Member IsoMap::mMouseMap
This should be a temporary object that's destroyed once the mousemap hash is created.

Member ListBox::areaChanged ()
Comment me.

Class Lua
Comment Me!

Member Lua::mLuaState
Comment me!

Member Map::insertProp (Prop *prop, int x, int y)
Because of the possibility of inserting multiple props at the same coordinates this function should ensure that no two props can occupy the same coordinate.

Member Map::insertTile (Uint tsetId, Uint tsetIndex, Uint layerId, int mapX, int mapY)
This function does absolutely no sanity or bounds checking so expect crashing should garbage data be passed in.

Member Map::parseInteractors (TiXmlElement *xmlRootElement)
Finish these functions.

Member OGL_Renderer::drawImage (Image *image, int rasterX, int rasterY, int x, int y, int width, int height)
Currently this function doesn't actually render a sub image of a larger image. Instead, it just stretches the texture across the entire surface of the quad.

Member OGL_Renderer::generateTexture (SDL_Surface *src)
When compiling in nightmare mode with Visual Studio, it indicated that textureFormat could be potentially uninitialized should nColors be anything other than '3' or '4' (24 bit and 32 bit color modes, respectively). The only other expected values would be '2' (16 bit color mode) or '1' (8 bit color mode). While in practice neither of these cases is likely to show up, it's extremely important that textureFormat is initialized to a good default value that will work for generally all modes or one that will at least not cause a crash.

Member OGL_Renderer::imageDesaturate (Image *image)
There ought to be a better/faster way of doing this with OpenGL than we could possibly do with SDL's functions.

Member Renderer::drawImageRect (int x, int y, int w, int h, Image *topLeft, Image *top, Image *topRight, Image *left, Image *center, Image *right, Image *bottomLeft, Image *bottom, Image *bottomRight)
Comment me!

Member Renderer::drawImageRect (int x, int y, int w, int h, ImageList &images)
Document the expected order of images to properly draw a rectangle.

Member Renderer::drawPointer (int x, int y)
Do we actually use this??

Member REPORT_MESSAGE ("\n\nPlease report the error and the steps taken to\nreproduce it to the development team.")
Find a sane place to define this.

Class Resource
Determine if the 'GUID' field is necessary.

Class ScrollBar
Currently only supports Vertical scroll bars.

Member ScrollBar::initialize ()
I would like to go through all of the code here and clean it up as best as possible. It's a bit cludgy and I'm sure it can be done a little better.

Member SDL_Renderer::clearScreen (int r, int g, int b)
It may be overkill to do it here but we should probably attempt to clamp the values where they should be.

Member SDL_Renderer::isPixelTransparent (Image *src, int x, int y)
Add support for color-keyed images.

Class Slider

Currently only Veritcal type sliders are supported. Horizontal should be pretty straight forward.

There's a bit of odd behavior when the mouse is dragged passed the slide area. This should be fairly straight forward to fix using the mMouseX and mMouseY values although it requires that this Control respond to onMouseMove() events.

Member Slider::initialize ()
I'm not thrilled with the way the slider determines its width. I'd like to go through this code to ensure that 1) it's correct and 2) it's cleaner than it is.

Member Sprite::parseActions (TiXmlElement *root)
Make use of mErrorMessage.

Member Sprite::parseImageSheets (TiXmlElement *root)
Make use of mErrorMessage.

Member StateManager::updateState ()
Check to see if there are any memory leaks in the 'if' block. I have a sneaking suspicion that we may be leaking a few KB's when we switch to a different state.

Member StateManager::~StateManager ()
Ensure that all objects are properly destroyed and cleared.

Member TextBox::mLines
Clarify this comment: Vector containing broken lines based on where
was found.

Member TextBox::mTokens
Clarify this comment: Vector containing each individual word.

Class TileSet
Fucking hell this should really be a base class with derived implementations for each type of tile (square, isometric, hexagonal, whatever else).

Member TileSet::parseSheet (TiXmlNode *node)

Implement processing of the various attributes of sheet.

The current method of processing allows for the user to define more than one 'img' or 'blend' node and the parser will blindly accept it. A sheet should have exactly one 'img' node and exactly one 'blend' node.

The current method of processing allows the user to define the 'img' and 'blend' nodes in whatever order they want and it goes ahead and calls functions whenever if finds a valid node. This should instead first check for the 'blend' node and, once that's been found, should then go and find the 'img' node.

Class Timer
Should we add in functions to calculate delta times for framerate independant animation or is that too specific for what this class should be used for?

Member Window::initialize ()
The positioning of the close button should be defined within the skin file and not hard coded here.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines