• entries
707
1173
• views
434653

# Complete awesomeness!!!

95 views

Well, that day finally came. I was going to kick myself in the balls, but I guess my engine decided that it'd do it for me. I found a MAJOR flaw in the engine today, along with several small ones, mostly having to do with the way I designed my Manager class. So, I'm spending tonight and tomorrow fixing my engine (totally recoding some parts of it, especially my debug output). Funny thing is, if I would have worked a little harder on my debug output class in the beginning I wouldn't be having this problem. Oh well...

But, on the bright side my code will be separated (up until now its all been in header files), at least where applicable (my templated classes can't be separate of course and I probably won't separate my math classes either). It will also be commented (I've tried commenting before, but it hasn't worked out, I always put in useless info, but I'm going to work at it this time). I'm also going to replace D3DX because I'm sick of this DLL bullshit.

## 1 Comment

Even more awesomeness!!! Yay for me! I just realized that if I want to replace D3DX, not only do I have to replace the math and texture functions (which I was prepared to do), but also the D3DX shader functions and mesh mesh loading functions. Which, is doable, but a lot more of a hassle than I want. So, I guess I'm sticking with D3DX [sad].

On the other hand, I got a really good debug logging class and resource manager done. I switch to using maps for my resource manager instead of a vector. I also implemented a SmartSingleton class which (using reference counting) calls Singleton<TYPE>::Release() and overrides the -> operator. So the user can use:

dft::SmartDebugOutput g_DebugOutput;
dft::DebugOutput* g_pDebugOutput = dft::DebugOutput::GetSingleton();
// Or they can call this everwhere
dft::DebugOutput::GetSingleton()

// So use would be:
g_DebugOutput.GetSingleton()->Foo();
// or
g_DebugOutput->Foo();
g_pDebugOutput->Foo();
dft::DebugOutput::GetSingleton()->Foo();


g_DebugOutput is used exactly the same way as g_pDebugOutput, other than it doesn't have a p.

## Create an account

Register a new account