MechCommander 2 Fix Guide

For anyone who is interested in the MechCommander 2 stuff I just wanted to let you know I've posted a guide with all the bugs we've found in our Shared Source Release and how to fix them. You can find the guide at:http://blogs.msdn.com/mklucher/articles/629796.aspx

If you have any comments please let me know!

[456 byte] By [MichaelKlucher-MSFT] at [2008-2-10]
# 1
DS3DSoundChannel::SetPan (in as of yet the unreleased src for GameOS):
The safety check if v is below -1? Seems to me there could be a copy'n'paste bug there. It seems to be:
if (v < -1) { v = 1; }
when it should be
if (v < -1) { v = -1; }
Can you ACK?
tamlin2 at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 2
In ACM.cpp (GameOS) it seems all (?) error handling is broken. Using the same idiom as in the DX proxy src files, but here in error treating the MMRESULT's as HRESULT's. Correct?
tamlin2 at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 3
GameOS, Texture API.cpp, gos_UnLockTexture.
The STOP if !IsLocked() is missing the actual argument (present in the fmt string). Add Handle to it.
tamlin2 at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 4
GameOS, ControlManager.cpp, CMAcquireControls(). Copy'n'paste bug.
Towards the end of the function, the "SetExtended(VK_CAPITAL," uses gNumLockMode. Change to gCapLockMode.
tamlin2 at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 5
GameOS: Sound Resource.cpp, SoundResource::ReadACM().
Just pure luck if this has worked. Please meditate upon the difference between memcpy and memmove. One of them is guaranteed to work with overlapped memory, the other is not.
tamlin2 at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...
# 6
GameOS, VertexBuffer.cpp, gos_CreateVertexBuffer.
Unless gos_Malloc works like calloc, i.e. returning zeroed-out memory (I'm fairly sure it doesn't), I think that one needs a "xyzzy->pNext = 0;" just before the call to CreateVB (xyzzy is obviously the newly allocated VertexBuffer).
For a reason as to why, just see what CreateVB does... :-)
tamlin2 at 2007-9-10 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technolgies: XNA Build...