From 692a3bb08abc79a0427afb39e282db9ba6fb572b Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sun, 10 Feb 2008 20:45:56 +0000 Subject: [PATCH] translate some GreatLordish comments into something more similar to English svn path=/trunk/; revision=32279 --- reactos/dll/directx/ddraw/cleanup.c | 2 +- reactos/dll/directx/ddraw/main.c | 43 ++++++++++++++--------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/reactos/dll/directx/ddraw/cleanup.c b/reactos/dll/directx/ddraw/cleanup.c index 5e55ff3dfae..5b6d70974e6 100644 --- a/reactos/dll/directx/ddraw/cleanup.c +++ b/reactos/dll/directx/ddraw/cleanup.c @@ -35,7 +35,7 @@ Cleanup(LPDDRAWI_DIRECTDRAW_INT This) DdDeleteDirectDrawObject(&ddgbl); /* - are it any more I forget to release ? + anything else to release? */ /* release the linked interface */ diff --git a/reactos/dll/directx/ddraw/main.c b/reactos/dll/directx/ddraw/main.c index 3bf932e8e55..fd261101bab 100644 --- a/reactos/dll/directx/ddraw/main.c +++ b/reactos/dll/directx/ddraw/main.c @@ -77,8 +77,8 @@ HRESULT WINAPI DirectDrawCreateClipper (DWORD dwFlags, * . * * @param pUnkOuter -* Alwas set to NULL other wise will DirectDrawCreate fail it return -* errror code CLASS_E_NOAGGREGATION +* Always set to NULL otherwise DirectDrawCreate will fail and return +* error code CLASS_E_NOAGGREGATION * * @return . * @@ -94,14 +94,14 @@ DirectDrawCreate (LPGUID lpGUID, { HRESULT retVal = DDERR_GENERIC; /* - remove this when UML digram are in place - this api is finish and is working as it should + remove this when UML diagram is in place + this api is finished and is working as it should */ DX_WINDBG_trace(); _SEH_TRY { - /* check see if pUnkOuter is null or not */ + /* check if pUnkOuter is null or not */ if (pUnkOuter) { retVal = CLASS_E_NOAGGREGATION; @@ -131,8 +131,8 @@ DirectDrawCreate (LPGUID lpGUID, * . * * @param pUnkOuter -* Alwas set to NULL other wise will DirectDrawCreateEx fail it return -* errror code CLASS_E_NOAGGREGATION +* Always set to NULL otherwise DirectDrawCreateEx will fail and return +* error code CLASS_E_NOAGGREGATION * * @return . * @@ -148,8 +148,8 @@ DirectDrawCreateEx(LPGUID lpGUID, { HRESULT retVal = DDERR_GENERIC; /* - remove this when UML digram are in place - this api is finish and is working as it should + remove this when UML diagram is in place + this api is finished and is working as it should */ DX_WINDBG_trace(); @@ -249,17 +249,17 @@ DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA lpCallback, RegCloseKey(hKey); } - /* Call the user supplyed callback function */ + /* Call the user supplied callback function */ rc = lpCallback(NULL, strMsg, "display", lpContext, NULL); - /* If the callback function returns DDENUMRET_CANCEL, we will stop enumerating devices now */ + /* If the callback function returns DDENUMRET_CANCEL, we will stop enumerating devices */ if(rc == DDENUMRET_CANCEL) { retVal = DD_OK; } else { - // not finish + // not finished retVal = DDERR_UNSUPPORTED; } } @@ -295,11 +295,10 @@ DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW lpCallback, See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ Display_d/hh/Display_d/d3d_21ac30ea-9803-401e-b541-6b08af79653d.xml.asp - for more info about this command + for more info about this command see msdn documentation - summuer the msdn - - The buffer start with D3DHAL_DP2COMMAND struct afer that it follow either one struct or no struct at at all + The buffer start with D3DHAL_DP2COMMAND struct afer that follows either one struct or + no struct at at all example for command D3DDP2OP_VIEWPORTINFO then lpCmd will look like this @@ -311,9 +310,9 @@ DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW lpCallback, | D3DHAL_DP2VIEWPORTINFO | 0x04 - xxxx | --------------------------------------- - to calc end of the lpCmd buffer in this exmaple + to calculate the end of the lpCmd buffer in this exmaple D3DHAL_DP2COMMAND->wStateCount * sizeof(D3DHAL_DP2VIEWPORTINFO); - now you got number of bytes but we need add the size of D3DHAL_DP2COMMAND + now you got number of bytes but we need to add the size of D3DHAL_DP2COMMAND to get this right. the end should be sizeof(D3DHAL_DP2COMMAND) + ( D3DHAL_DP2COMMAND->wStateCount * sizeof(D3DHAL_DP2VIEWPORTINFO)); to get the xxxx end positions. @@ -338,12 +337,12 @@ DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW lpCallback, * } D3DHAL_DP2COMMAND, *LPD3DHAL_DP2COMMAND; * * lpCmd->bCommand -* only accpect D3DDP2OP_VIEWPORTINFO, and undocument command 0x0D -* rest of the command will be return error code for. +* only accept D3DDP2OP_VIEWPORTINFO, and undocumented command 0x0D +* anything else will result in an error * Command 0x0D * dp2command->bReserved -* is how big struect we got in wStateCount or how many wStateCount we got +* is the size of the struct we got in wStateCount or how many wStateCount we got * do not known more about it, no info in msdn about it either. * * Command D3DDP2OP_VIEWPORTINFO @@ -378,7 +377,7 @@ D3DParseUnknownCommand( LPVOID lpCmd, switch (dp2command->bCommand) { - /* check for vaild command, only 3 command is vaild */ + /* check for vaild command, only 3 commands are vaild */ case D3DDP2OP_VIEWPORTINFO: *(PBYTE)lpRetCmd += ((dp2command->wStateCount * sizeof(D3DHAL_DP2VIEWPORTINFO)) + sizeof(D3DHAL_DP2COMMAND)); break;