//common (dftcb)DebugOutput()*FormattedDebugOutput()IniFileDllFileDllInterface<>SingletonListType*Manager::SingletonTimer*Window::Singleton//graphics (dftgfx)Direct3D::SingletonTexture::ListTypeTexturePool::ManagerVertexBufferIndexBufferIFont::ListTypeFontEngine::Manager//input (dftin)enum InputMessagesenum InputKeysenum InputButtonsInputEventtypedef void (*EVENTPROC)(InputEvent Event)DirectInput*
Edit:
DebugOutput* - Forgot to mention that this uses html and CSS for output. The user has to state wether or not there was an error, if so the font class is changed to Error. The CSS is in a separate file so that the user can customize how it looks.
ListType* - This is a base class for any class that will be used with Manager. Manager assumes that the list type that it is using has 3 functions: GetID(), Compare(), and Release().
Timer* - My Timer class does not keep track of the frame rate. You use Start() and End() to figure out how long something took, be it a frame or just part of your code. End can take a string. If one is passed to it, it uses FormattedDebugOutput() to write a string in the form of Profile(Name:%s, Time Elapsed: %f). Where the %s is the string that you pass in.
DirectInput* - DirectInput allows for event based and non event based input. You can switch back and forth with a simple function call.
I also have taken some time to write out some render state classes. These are simple classes like this:
class rsAlphaBlending{ static bool m_bEnabled; static D3DBLEND m_SrcBlend, m_DestBlend;public: static void SetBlendMode(D3DBLEND SrcBlend, D3DBLEND DestBlend) { if(m_SrcBlend != SrcBlend) { dftcb::Direct3D::GetSingleton()->GetDeviceComPtr()->SetRenderState((D3DRENDERSTATETYPE)RS_SRCBLEND, SrcBlend); m_SrcBlend = SrcBlend; } if(m_DestBlend != DestBlend) { dftcb::Direct3D::GetSingleton()->GetDeviceComPtr()->SetRenderState((D3DRENDERSTATETYPE)RS_DESTBLEND, DestBlend); m_DestBlend = DestBlend; } } static void Enable() { if(!m_bEnabled) { dftcb::Direct3D::GetSingleton()->GetDeviceComPtr()->SetRenderState((D3DRENDERSTATETYPE)RS_ALPHABLENDENABLE, TRUE); m_bEnabled = true; } } static void Disable() { if(m_bEnabled) { dftcb::Direct3D::GetSingleton()->GetDeviceComPtr()->SetRenderState((D3DRENDERSTATETYPE)RS_ALPHABLENDENABLE, FALSE); m_bEnabled = false; } } static bool IsEnabled() { return m_bEnabled; } static D3DBLEND GetSrcBlendMode() { return m_SrcBlend; } static D3DBLEND GetDestBlendMode() { return m_DestBlend; }};bool rsAlphaBlending::m_bEnabled = false;D3DBLEND rsAlphaBlending::m_SrcBlend = D3DBLEND_ONE;D3DBLEND rsAlphaBlending::m_DestBlend = D3DBLEND_ZERO;// Then you use it like sorsAlphaBlending::SetBlendMode(D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);rsAlphaBlending::Enable();//draw alpha blended objectsrsAlphaBlending::Disable();//draw non alpha-blended objects
The source code for everything will be available (for free) once I finish the first game. I want to make sure it all works and works right before I release it.
Like... the surfaces they returned would just fit the glyph, meaning you have to figure out how to position each letter yourself. Quite the pain. I think the solution was to load each letter with the '|' character so they all were positioned right.
But yeah. I hate writing font buggers - and I'll need to fix up the one I have now so it doesn't create a new surface everytime you call drawText(..) [sad]