tank-dev / tank

A 2D C++ game engine taking inspiration from FlashPunk
Boost Software License 1.0
12 stars 3 forks source link

initialise...? #26

Closed DavidTruby closed 11 years ago

DavidTruby commented 11 years ago

Someone mind explaining initialise functions to me? Surely that's what the constructor is for...?

qualiaa commented 11 years ago

Mostly, these are holdovers from when classes (e.g. Rendering) were singletons, and can be safely moved into ctors. I think in some cases, I used them so that the initialization could return false. However, these could be turned into exceptions from constructors.

DavidTruby commented 11 years ago

Right. Is this a holdover from the days when you used to think that throwing constructors were evil..? ;-) I'll mark this as an enhancement and assign you :-)

Anstow commented 11 years ago

Part of this is my fault. Its what I've seen done elsewhere.

qualiaa commented 11 years ago

All initialize functions have been removed, barring Game (which will be required if it's a static class) and Render (which will be removed once I get around to redoing the rendering pipeline)