Hey, this text is really obsolete! Who cares about 2003 Sep SDK now? :)
DX9 SDK Summer Update (2003 Sep) changes to "sample framework" code. I've just thrown old code into CVS, and diff'ed new one on that. There are very big chances that I've missed something here.
dxstdafx.cpp and dxstdafx.h - these are just common includes for precompiled headers.
These are scary! I've tried to bold the "serious" changes (like stuff added/removed). Usually these are in header files.
d3dapp.hHRESULT LaunchReadme()bool m_bCreateMultithreadDevicebool m_bAllowDialogBoxModeBuildPresentParamsFromSettings() became virtuald3dapp.cppCreate() :)Create(): pass false to AdjustWindowRect() if no menu presentChooseInitialD3DSettings(): m_d3dSettings.SetDeviceClip( false );MsgProc(), WM_PAINT: remove m_bWindowed from if; catch device lost on Present().MsgProc(): IDM_HELP handler added.HandlePossibleSizeChange(): set Windowed_Width and Windowed_Height.HandlePossibleSizeChange(): check for device loss after Reset3DEnvironment().Initialize3DEnvironment(): Added multithreaded option.BuildPresentParamsFromSettings(): Added device clip option. Use Windowed_Width and Windowed_Height in windowed case.
Added code to allow dialog boxes in fullscreen case.ToggleFullscreen(): Added GetClientRect( m_hWnd, &m_rcWindowClient ) at end.UserSelectNewDevice(): Added bool bDialogBoxMode and bOldWindowed. Bunch of code for dialog boxes in
fullscreen case instead of just ToggleFullscreen().Run(): remember HRESULT of Render3DEnvironment().Render3DEnvironment(): Display error instead of returning HRESULT if Reset3DEnvironment() fails.
Added m_fElapsedTime = fElapsedAppTime; as else case just before Render().DisplayErrorMsg(): Change HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) to 0x80070002.LaunchReadme() added.d3denumeration.hIDirect3D9* CD3DEnumeration::GetD3D()d3denumeration.cppd3dfile.hHRESULT CD3DMesh::SetVertexDecl()d3dfile.cppCD3DMesh::SetVertexDecl() added.CD3DMesh::RestoreDeviceObjects(): pass D3DXMESH_MANAGED to CloneMeshFVF().d3dfont.cppd3dres.hIDC_DEVICECLIP_CHECKIDM_HELPd3dsaver.hd3dsaver.cppSwitchToRenderUnit(): added "&& !m_bErrorMode" to if before "store rendertarget surface desc".Render3DEnvironment(): at end of render units loop, Render() only if( !m_bErrorMode ). Present() everything only
if( !m_bErrorMode ).d3dsettings.hbool CD3DSettings::bDeviceClip;, plus setter method.void CD3DSettingsDialog::DeviceClipChanged();d3dsettings.cppDialogProc(): added handler for IDC_DEVICECLIP_CHECK.AdapterChanged(): add code to if( m_d3dSettings.IsWindowed ) - starts at "// Set the windowed".WindowedFullscreenChanged(): update device clip checkbox.AdapterFormatChanged(): add bool bHasWindowedBackbuffer before combos loop. Add code at end of combos loop (starts at "// Count the number").
Add code after combos loop - "if(!bHasWindowedBackbuffer)" statement.DeviceClipChanged(); added.d3dutil.hD3DUtil_InitMaterial()D3DUtil_InitLight()D3DUtil_CreateTexture()enum D3DUtil_CameraKeys, plus defines after it.d3dutil.cppddutil.hddutil.cppdidevimg.h and didevimg.cppdiutil.cppAddDevice(): move "if(m_AddDeviceCallback)" after SetActionMap().dmutil.h and dmutil.cppdsutil.cppdxutil.h and dxutil.cppDXUtil_FindMediaFileCch(): lots of additional logic.DXUtil_ReadStringRegKeyCch(), DXUtil_ReadIntRegKey(), DXUtil_ReadBoolRegKey(), DXUtil_ReadGuidlRegKey(): return S_FALSE instead of E_FAIL.
Copy default value.DXUtil_ReadFloatRegKey(), DXUtil_WriteFloatRegKey()DXUtil_LaunchReadme(): lots of additional logic.netclient.h#define MAX_PLAYER_NAME 14netclient.cppnetconnect.h and netconnect.cpp#define MAX_PLAYER_NAME 14SessionInfo.h and netconnect.cpp