• entries
707
1173
• views
436317

# Puzzles & Enumeration frustration

126 views

Ethereal Darkness Interactive Update

Got some really good ideas for puzzles done today (about 7) of which only 1 is going to be possible =/. The first is kind of viewpoint dependant, idea #2 is viable, #3 would require double the graphics for the main character, #4 was a subconscious rip from Monkey Island 3 (the hangover recipe. Raymond started laughing when I messaged him with it and I had no idea what he was talking about lol until I thought about it), #5 is cliche and boring that I wouldn't let him use it (one of the pole-section switching puzzles), #6 isn't even a puzzle (just an idea), and #7 would require extra graphics as well (not as many though, since it wouldn't be modifying the main character.)

I'm just going to start brainstorming and writing down every single thing that comes to mind and erasing the horrible/unuseable ones later.

DragonForge Technology

I'm trying to add some Direct3D debugging to my application and Microsoft has screwed me =/. I've added functions that return string version of stuff like render state types, sampler state types, etc (only in debug mode) and I was going to add some for stuff like the D3DBLEND enumerations, but that'd be impossible (since they share some of the same values.) It'd be really nice to have "D3DRS_SRCBLEND was set to D3DBLEND_SRCALPHA" or "D3DRS_ALPHABLENDENABLE was set to true", but that won't be viable evidentally. Erm... I might actually be able to do it (I'll reply later and let you know.

Discussion

Other news

I was going to share my current ailment with you guys, but I figure that I already drive enough people away with my constant ranting.

Yay, I got it to work. I have it setup like so:
template <typename T_VALUETYPE> HRESULT SetRenderState(D3DRENDERSTATETYPE State, T_VALUETYPE Value)
{
// These states all require float values, so they could possibly match even though they shouldn't
// so we pass those states right on through.
if(State == D3DRS_FOGSTART || State == D3DRS_FOGEND || State == D3DRS_FOGDENSITY ||
State == D3DRS_POINTSIZE || State == D3DRS_POINTSIZE_MIN || State == D3DRS_POINTSCALE_A ||
State == D3DRS_POINTSCALE_B || State == D3DRS_POINTSCALE_C || State == D3DRS_POINTSIZE_MAX ||
State == D3DRS_TWEENFACTOR || State == D3DRS_MINTESSELLATIONLEVEL ||
State == D3DRS_MAXTESSELLATIONLEVEL || State == D3DRS_ADAPTIVETESS_X ||
State == D3DRS_ADAPTIVETESS_W || m_dwRenderStates[State] != (DWORD)Value)
{
dft::HtmlLog::GetCurrentLog()->LogDebugOutput("%s was set to %s.", dft::DOT_TEXT, dft::GetRenderStateTypeString(State).c_str(), GetRenderStateValueString(Value).c_str());
return m_pDeviceComPtr->SetRenderState(State, Value);
}
dft::HtmlLog::GetCurrentLog()->LogDebugOutput("%s was already set to %s.", dft::DOT_TEXT, dft::GetRenderStateTypeString(State).c_str(), GetRenderStateValueString(Value).c_str());
return S_OK;
}



And I just have to supply a separate GetRenderStateValueString() for each type (which will take a little bit of time, but it will be worth it in the long run. Or not, either way I'm doing it. It will definitely help me figure out the different types and values .

Yea, I just finished doing all of the types required for SetRenderState and I thought to myself "Damn, that was pretty tedious, but hey its all done!" MY FUCKING ASS. I copy and paste the functions from one file to another and for some reason MSVC++ 2K3 decided that it was going to have an anuirism(sp?) so now I have to do it all over. YAY FOR ME! Atleast this time it will go faster because I can just copy the enums from the docs into my source code and modify them from their (using find and replace with wildcards.)

Edit: Ok, it went a lot faster that time (instead of modifying each function, I modified them all together.) I saved it. Twice. And backed it up.

Ok, for those that are interested:

Now I'm on to sampler and texture stage states. Yay...

Well, Microsoft screwed that up because for some reason they decided to use macros for the D3DTA stuff (some most of the TextureStageState calls won't do shit.)

Edit: Ok, I got all of those added. D3DTA don't show up, but there isn't anything I can do to help it (apart from declaring my own enums, but that would be a BAD idea.)

I'm moving onto the shader system next.

I think this the first time I've seen someone triple post in their own journal. Well done [lol]

ROFL, I do that all the time.

## Create an account

Register a new account