diff options
Diffstat (limited to 'src/old')
-rw-r--r-- | src/old/camera.cpp | 18 | ||||
-rw-r--r-- | src/old/d3dapp.cpp | 86 | ||||
-rw-r--r-- | src/old/d3dengine.cpp | 30 | ||||
-rw-r--r-- | src/old/d3dengine.h | 2 | ||||
-rw-r--r-- | src/old/d3denum.cpp | 16 | ||||
-rw-r--r-- | src/old/d3dframe.cpp | 8 | ||||
-rw-r--r-- | src/old/d3dmath.cpp | 30 | ||||
-rw-r--r-- | src/old/d3dtextr.cpp | 10 | ||||
-rw-r--r-- | src/old/joystick.cpp | 34 | ||||
-rw-r--r-- | src/old/math3d.cpp | 2 | ||||
-rw-r--r-- | src/old/model.cpp | 16 | ||||
-rw-r--r-- | src/old/particule.cpp | 10 | ||||
-rw-r--r-- | src/old/pyro.cpp | 6 | ||||
-rw-r--r-- | src/old/resource.h | 2 | ||||
-rw-r--r-- | src/old/sound.cpp | 28 | ||||
-rw-r--r-- | src/old/terrain.cpp | 6 | ||||
-rw-r--r-- | src/old/terrain.h | 2 | ||||
-rw-r--r-- | src/old/text.cpp | 10 |
18 files changed, 158 insertions, 158 deletions
diff --git a/src/old/camera.cpp b/src/old/camera.cpp index cea9113..554fb11 100644 --- a/src/old/camera.cpp +++ b/src/old/camera.cpp @@ -1438,7 +1438,7 @@ D3DMouse CCamera::RetMouseDef(Math::Point pos) { m_mouseDirV = 1.0f - (1.0f-pos.y)/m_mouseMarging; } - + if ( m_type == CAMERA_FREE || m_type == CAMERA_EDIT || m_type == CAMERA_BACK || @@ -1455,7 +1455,7 @@ D3DMouse CCamera::RetMouseDef(Math::Point pos) type = D3DMOUSESCROLLL; } } - + if ( m_type == CAMERA_FREE || m_type == CAMERA_EDIT ) { @@ -1535,7 +1535,7 @@ bool CCamera::EventFrameFree(const Event &event) } m_terrain->ValidPosition(m_eyePt, 10.0f); - + if ( m_terrain->MoveOnFloor(m_eyePt, true) ) { m_eyePt.y += m_heightEye; @@ -1560,7 +1560,7 @@ bool CCamera::EventFrameFree(const Event &event) } SetViewTime(m_eyePt, vLookatPt, event.rTime); - + return true; } @@ -1595,7 +1595,7 @@ bool CCamera::EventFrameEdit(const Event &event) } m_terrain->ValidPosition(m_eyePt, 10.0f); - + if ( m_terrain->MoveOnFloor(m_eyePt, false) ) { m_eyePt.y += m_editHeight; @@ -1620,7 +1620,7 @@ bool CCamera::EventFrameEdit(const Event &event) } SetViewTime(m_eyePt, vLookatPt, event.rTime); - + return true; } @@ -1762,7 +1762,7 @@ bool CCamera::EventFrameBack(const Event &event) else vLookatPt.y += 4.0f; h = -m_cameraObj->RetAngleY(0); // angle vehicle / building - + if ( type == OBJECT_DERRICK || type == OBJECT_FACTORY || type == OBJECT_REPAIR || @@ -1909,7 +1909,7 @@ bool CCamera::EventFrameExplo(const Event &event) } m_terrain->ValidPosition(m_eyePt, 10.0f); - + if ( m_terrain->MoveOnFloor(m_eyePt, false) ) { m_eyePt.y += m_heightEye; @@ -1934,7 +1934,7 @@ bool CCamera::EventFrameExplo(const Event &event) } SetViewTime(m_eyePt, vLookatPt, event.rTime); - + return true; } diff --git a/src/old/d3dapp.cpp b/src/old/d3dapp.cpp index 351971f..b44bf6f 100644 --- a/src/old/d3dapp.cpp +++ b/src/old/d3dapp.cpp @@ -170,7 +170,7 @@ CD3DApplication::CD3DApplication() g_pD3DApp = this; // Request event sent by Logitech. - m_mshMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL); + m_mshMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL); _mkdir("files\\"); } @@ -538,7 +538,7 @@ HRESULT CD3DApplication::Create( HINSTANCE hInst, TCHAR* strCmdLine ) // Register the window class WNDCLASS wndClass = { 0, WndProc, 0, 0, hInst, LoadIcon( hInst, MAKEINTRESOURCE(IDI_MAIN_ICON) ), - LoadCursor( NULL, IDC_ARROW ), + LoadCursor( NULL, IDC_ARROW ), (HBRUSH)GetStockObject(WHITE_BRUSH), NULL, _T("D3D Window") }; RegisterClass( &wndClass ); @@ -550,7 +550,7 @@ HRESULT CD3DApplication::Create( HINSTANCE hInst, TCHAR* strCmdLine ) //? WS_OVERLAPPEDWINDOW|WS_VISIBLE, style, CW_USEDEFAULT, CW_USEDEFAULT, WINDOW_DX, WINDOW_DY, 0L, -//? LoadMenu( hInst, MAKEINTRESOURCE(IDR_MENU) ), +//? LoadMenu( hInst, MAKEINTRESOURCE(IDR_MENU) ), NULL, hInst, 0L ); UpdateWindow( m_hWnd ); @@ -738,7 +738,7 @@ void CD3DApplication::SetMousePos(Math::Point pos) p.x = (int)pos.x; p.y = (int)pos.y; ClientToScreen(m_hWnd, &p); - + SetCursorPos(p.x, p.y); } @@ -1426,7 +1426,7 @@ LRESULT CD3DApplication::MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, return DefWindowProc( hWnd, uMsg, wParam, lParam ); } - + // Enumeration function to report valid pixel formats for z-buffers. HRESULT WINAPI EnumZBufferFormatsCallback(DDPIXELFORMAT* pddpf, @@ -1482,7 +1482,7 @@ HRESULT CD3DApplication::CreateZBuffer(GUID* pDeviceGUID) ddsd.ddpfPixelFormat.dwRGBBitCount = 16; m_pD3D->EnumZBufferFormats( *pDeviceGUID, EnumZBufferFormatsCallback, (VOID*)&ddsd.ddpfPixelFormat ); - + if( 0 == ddsd.ddpfPixelFormat.dwSize ) { DEBUG_MSG( _T("Device doesn't support requested zbuffer format") ); @@ -1523,9 +1523,9 @@ HRESULT CD3DApplication::CreateZBuffer(GUID* pDeviceGUID) HRESULT CD3DApplication::Initialize3DEnvironment() { HRESULT hr; - DDSCAPS2 ddsCaps2; + DDSCAPS2 ddsCaps2; DWORD dwFrameworkFlags = 0L; - DWORD dwTotal; + DWORD dwTotal; DWORD dwFree; dwFrameworkFlags |= ( !m_pDeviceInfo->bWindowed ? D3DFW_FULLSCREEN : 0L ); @@ -1550,9 +1550,9 @@ HRESULT CD3DApplication::Initialize3DEnvironment() // Request the amount of video memory. ZeroMemory(&ddsCaps2, sizeof(ddsCaps2)); - ddsCaps2.dwCaps = DDSCAPS_TEXTURE; + ddsCaps2.dwCaps = DDSCAPS_TEXTURE; dwTotal = 0; - hr = m_pDD->GetAvailableVidMem(&ddsCaps2, &dwTotal, &dwFree); + hr = m_pDD->GetAvailableVidMem(&ddsCaps2, &dwTotal, &dwFree); m_vidMemTotal = dwTotal; // Let the app run its startup code which creates the 3d scene. @@ -1577,7 +1577,7 @@ HRESULT CD3DApplication::Initialize3DEnvironment() D3DEnum_SelectDefaultDevice( &m_pDeviceInfo, D3DENUM_SOFTWAREONLY ); return Initialize3DEnvironment(); } - + return hr; } @@ -1611,7 +1611,7 @@ HRESULT CD3DApplication::Change3DEnvironment() // Coming from fullscreen mode, so restore window properties SetWindowLong( m_hWnd, GWL_STYLE, dwSavedStyle ); SetWindowPos( m_hWnd, HWND_NOTOPMOST, rcSaved.left, rcSaved.top, - ( rcSaved.right - rcSaved.left ), + ( rcSaved.right - rcSaved.left ), ( rcSaved.bottom - rcSaved.top ), SWP_SHOWWINDOW ); } else @@ -1841,7 +1841,7 @@ LRESULT CD3DApplication::OnQuerySuspend( DWORD dwFlags ) // Called when the app receives a PBT_APMRESUMESUSPEND message, meaning -// the computer has just resumed from a suspended state. At this point, +// the computer has just resumed from a suspended state. At this point, // the app should recover any data, network connections, files, etc.., // and resume running from when the app was suspended. @@ -1971,7 +1971,7 @@ VOID CD3DApplication::ShowStats() // Setup the text buffer to write out dimensions TCHAR buffer[100]; sprintf( buffer, _T("%7.02f fps T=%d (%dx%dx%d)"), fFPS, t, - m_ddsdRenderTarget.dwWidth, m_ddsdRenderTarget.dwHeight, + m_ddsdRenderTarget.dwWidth, m_ddsdRenderTarget.dwHeight, m_ddsdRenderTarget.ddpfPixelFormat.dwRGBBitCount ); OutputText( 400, 2, buffer ); @@ -2017,28 +2017,28 @@ VOID CD3DApplication::OutputText( DWORD x, DWORD y, TCHAR* str ) // members within a BITMAPINFOHEADER structure PBITMAPINFO CD3DApplication::CreateBitmapInfoStruct(HBITMAP hBmp) -{ +{ BITMAP bmp; PBITMAPINFO pbmi; WORD cClrBits; - + // Retrieve the bitmap's color format, width, and height. if ( !GetObject(hBmp, sizeof(BITMAP), (LPSTR)&bmp) ) return 0; - + // Convert the color format to a count of bits. cClrBits = (WORD)(bmp.bmPlanes * bmp.bmBitsPixel); - + if ( cClrBits == 1 ) cClrBits = 1; else if ( cClrBits <= 4 ) cClrBits = 4; else if ( cClrBits <= 8 ) cClrBits = 8; else if ( cClrBits <= 16 ) cClrBits = 16; else if ( cClrBits <= 24 ) cClrBits = 24; else cClrBits = 32; - - // Allocate memory for the BITMAPINFO structure. (This structure - // contains a BITMAPINFOHEADER structure and an array of RGBQUAD data - // structures.) + + // Allocate memory for the BITMAPINFO structure. (This structure + // contains a BITMAPINFOHEADER structure and an array of RGBQUAD data + // structures.) if ( cClrBits != 24 ) { pbmi = (PBITMAPINFO)LocalAlloc(LPTR, @@ -2051,7 +2051,7 @@ PBITMAPINFO CD3DApplication::CreateBitmapInfoStruct(HBITMAP hBmp) pbmi = (PBITMAPINFO)LocalAlloc(LPTR, sizeof(BITMAPINFOHEADER)); } - + // Initialize the fields in the BITMAPINFO structure. pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); pbmi->bmiHeader.biWidth = bmp.bmWidth; @@ -2060,77 +2060,77 @@ PBITMAPINFO CD3DApplication::CreateBitmapInfoStruct(HBITMAP hBmp) pbmi->bmiHeader.biBitCount = bmp.bmBitsPixel; if ( cClrBits < 24 ) pbmi->bmiHeader.biClrUsed = 2^cClrBits; - + // If the bitmap is not compressed, set the BI_RGB flag. pbmi->bmiHeader.biCompression = BI_RGB; - + // Compute the number of bytes in the array of color // indices and store the result in biSizeImage. pbmi->bmiHeader.biSizeImage = (pbmi->bmiHeader.biWidth + 7) /8 * pbmi->bmiHeader.biHeight * cClrBits; - + // Set biClrImportant to 0, indicating that all of the // device colors are important. pbmi->bmiHeader.biClrImportant = 0; return pbmi; -} - +} + // Defines a function that initializes the remaining structures, // retrieves the array of palette indices, opens the file, copies -// the data, and closes the file. +// the data, and closes the file. bool CD3DApplication::CreateBMPFile(LPTSTR pszFile, PBITMAPINFO pbi, HBITMAP hBMP, HDC hDC) -{ +{ FILE* file; // file handle BITMAPFILEHEADER hdr; // bitmap file-header PBITMAPINFOHEADER pbih; // bitmap info-header LPBYTE lpBits; // memory pointer DWORD dwTotal; // total count of bytes - + pbih = (PBITMAPINFOHEADER)pbi; lpBits = (LPBYTE)GlobalAlloc(GMEM_FIXED, pbih->biSizeImage); if ( !lpBits ) return false; - + // Retrieve the color table (RGBQUAD array) and the bits // (array of palette indices) from the DIB. if ( !GetDIBits(hDC, hBMP, 0, (WORD)pbih->biHeight, lpBits, pbi, DIB_RGB_COLORS) ) return false; - + // Create the .BMP file. file = fopen(pszFile, "wb"); if ( file == NULL ) return false; - + hdr.bfType = 0x4d42; // 0x42 = "B" 0x4d = "M" - + // Compute the size of the entire file. hdr.bfSize = (DWORD)(sizeof(BITMAPFILEHEADER) + pbih->biSize + pbih->biClrUsed * sizeof(RGBQUAD) + pbih->biSizeImage); - + hdr.bfReserved1 = 0; hdr.bfReserved2 = 0; - + // Compute the offset to the array of color indices. hdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + pbih->biSize + pbih->biClrUsed * sizeof (RGBQUAD); - + // Copy the BITMAPFILEHEADER into the .BMP file. fwrite(&hdr, sizeof(BITMAPFILEHEADER), 1, file); - + // Copy the BITMAPINFOHEADER and RGBQUAD array into the file. fwrite(pbih, sizeof(BITMAPINFOHEADER)+pbih->biClrUsed*sizeof(RGBQUAD), 1, file); - + // Copy the array of color indices into the .BMP file. dwTotal = pbih->biSizeImage; fwrite(lpBits, dwTotal, 1, file); - + // Close the .BMP file. fclose(file); - + // Free memory. GlobalFree((HGLOBAL)lpBits); return true; @@ -2389,7 +2389,7 @@ VOID CD3DApplication::DisplayFrameworkError( HRESULT hr, DWORD dwType ) break; case D3DFWERR_NO3DDEVICE: lstrcpy( strMsg, _T("Could not create the Direct3DDevice object.") ); - + if( MSGWARN_SWITCHEDTOSOFTWARE == dwType ) lstrcat( strMsg, _T("\nThe 3D hardware chipset may not support" "\nrendering in the current display mode.") ); diff --git a/src/old/d3dengine.cpp b/src/old/d3dengine.cpp index 79e4646..f9e953d 100644 --- a/src/old/d3dengine.cpp +++ b/src/old/d3dengine.cpp @@ -205,7 +205,7 @@ CD3DEngine::CD3DEngine(CInstanceManager *iMan, CD3DApplication *app) m_bForceStateColor = false; m_bStateColor = false; } - + m_blackSrcBlend[0] = 0; m_blackDestBlend[0] = 0; m_whiteSrcBlend[0] = 0; @@ -1294,8 +1294,8 @@ int CD3DEngine::RetTotalTriangles(int objRank) return m_objectParam[objRank].totalTriangle; } -// Return qq triangles of an object. -// qq triangles used to extract an object that explodes. +// Return qq triangles of an object. +// qq triangles used to extract an object that explodes. // "Percent" is between 0 and 1. int CD3DEngine::GetTriangles(int objRank, float min, float max, @@ -1489,7 +1489,7 @@ bool CD3DEngine::ChangeTextureMapping(int objRank, // [p] = distance in the 3D world // [t] = position in the texture (pixels) -// ^ y 5 +// ^ y 5 // | 6 o---------o 4 // | / \ // | o o @@ -2166,7 +2166,7 @@ void CD3DEngine::ShadowDelete(int objRank) } } -// Specifies if the shadow is visible. +// Specifies if the shadow is visible. // For example, when an object is carried, he has no shadow. bool CD3DEngine::SetObjectShadowHide(int objRank, bool bHide) @@ -3632,7 +3632,7 @@ D3DCOLORVALUE GetDot(DDSURFACEDESC2* ddsd, int x, int y) // 0 | 1 2 253 254|255 // |---|---|---|-- ... --|---|---|---| // -// So we draw in 254x254 pixels surfaces. +// So we draw in 254x254 pixels surfaces. // The pixel margin around it is drawn twice (in two adjacent surfaces), // so that the filter produces the same results! @@ -3655,7 +3655,7 @@ void CD3DEngine::RenderGroundSpot() m_groundMark.drawPos.z == m_groundMark.pos.z && m_groundMark.drawRadius == m_groundMark.radius && m_groundMark.drawIntensity == m_groundMark.intensity ) return; - + for ( s=0 ; s<16 ; s++ ) { min.x = (s%4)*254.0f-1.0f; // 1 pixel cover @@ -3716,7 +3716,7 @@ void CD3DEngine::RenderGroundSpot() { bSet = true; } - + if ( bClear || bSet ) { // Load the song. @@ -4120,7 +4120,7 @@ void CD3DEngine::DrawShadow() } -// Called ounces per frame, the call is the entry point for 3d rendering. +// Called ounces per frame, the call is the entry point for 3d rendering. // This function sets up render states, clears the // viewport, and renders the scene. @@ -4642,7 +4642,7 @@ void CD3DEngine::DrawBackgroundGradient(D3DCOLOR up, D3DCOLOR down) m_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, vertex, 4, NULL); AddStatisticTriangle(2); } - + // Draws a portion of the image background. void CD3DEngine::DrawBackgroundImageQuarter(Math::Point p1, Math::Point p2, char *name) @@ -4947,7 +4947,7 @@ bool CD3DEngine::GetBBox2D(int objRank, Math::Point &min, Math::Point &max) if ( pp.y > max.y ) max.y = pp.y; } } - + if ( min.x == 1000000.0f || min.y == 1000000.0f || max.x == -1000000.0f || @@ -5034,7 +5034,7 @@ bool CD3DEngine::GetSpriteCoord(int &x, int &y) v.y *= vp.dwHeight/2; v.x = v.x+vp.dwWidth/2; v.y = vp.dwHeight-(v.y+vp.dwHeight/2); - + x = (int)v.x; y = (int)v.y; return true; @@ -5435,7 +5435,7 @@ float CD3DEngine::RetFocus() return m_focus; } -// +// void CD3DEngine::UpdateMatProj() { @@ -5544,7 +5544,7 @@ HRESULT CD3DEngine::InitDeviceObjects() m_matProjInterface.Set(4, 3, 1.0f); m_matProjInterface.Set(3, 4, -1.0f); m_matProjInterface.Set(4, 4, 0.0f); - + return S_OK; } @@ -5576,7 +5576,7 @@ HRESULT CD3DEngine::FinalCleanup() } -// Overrrides the main WndProc, so the sample can do custom message +// Overrrides the main WndProc, so the sample can do custom message // handling (e.g. processing mouse, keyboard, or menu commands). LRESULT CD3DEngine::MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) diff --git a/src/old/d3dengine.h b/src/old/d3dengine.h index 700e7b3..3e073c3 100644 --- a/src/old/d3dengine.h +++ b/src/old/d3dengine.h @@ -352,7 +352,7 @@ public: bool GroundMarkDelete(int rank); void Update(); - + void SetViewParams(const Math::Vector &vEyePt, const Math::Vector &vLookatPt, const Math::Vector &vUpVec, FLOAT fEyeDistance); bool FreeTexture(char* name); diff --git a/src/old/d3denum.cpp b/src/old/d3denum.cpp index 234ce5a..1f02eb2 100644 --- a/src/old/d3denum.cpp +++ b/src/old/d3denum.cpp @@ -212,7 +212,7 @@ static bool WINAPI DriverEnumCallback( GUID* pGUID, TCHAR* strDesc, LPDIRECTDRAW7 pDD; LPDIRECT3D7 pD3D; HRESULT hr; - + // Use the GUID to create the DirectDraw object hr = DirectDrawCreateEx( pGUID, (VOID**)&pDD, IID_IDirectDraw7, NULL ); if( FAILED(hr) ) @@ -280,7 +280,7 @@ HRESULT D3DEnum_EnumerateDevices( HRESULT (*AppConfirmFn)(DDCAPS*, D3DDEVICEDESC g_fnAppConfirmFn = AppConfirmFn; // Enumerate drivers, devices, and modes - DirectDrawEnumerateEx( DriverEnumCallback, NULL, + DirectDrawEnumerateEx( DriverEnumCallback, NULL, DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES | DDENUM_NONDISPLAYDEVICES ); @@ -370,7 +370,7 @@ static VOID UpdateDialogControls( HWND hDlg, D3DEnum_DeviceInfo* pCurrentDevice, // Add device name to the combo box DWORD dwItem = ComboBox_AddString( hwndDevice, pDevice->strDesc ); - + // Set the remaining UI states for the current device if( pDevice == pCurrentDevice ) { @@ -383,7 +383,7 @@ static VOID UpdateDialogControls( HWND hDlg, D3DEnum_DeviceInfo* pCurrentDevice, EnableWindow( hwndWindowed, pDevice->bDesktopCompatible ); Button_SetCheck( hwndWindowed, bWindowed ); } - + // Enable/set the stereo checkbox, as appropriate if( hwndStereo ) { @@ -436,7 +436,7 @@ static VOID UpdateDialogControls( HWND hDlg, D3DEnum_DeviceInfo* pCurrentDevice, // Name: ChangeDeviceProc() // Desc: Windows message handling function for the device select dialog //----------------------------------------------------------------------------- -static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, +static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam ) { static D3DEnum_DeviceInfo** ppDeviceArg; @@ -453,7 +453,7 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, // Handle the initialization message if( WM_INITDIALOG == uiMsg ) { - // Get the app's current device, passed in as an lParam argument + // Get the app's current device, passed in as an lParam argument ppDeviceArg = (D3DEnum_DeviceInfo**)lParam; if( NULL == ppDeviceArg ) return false; @@ -484,7 +484,7 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, bool bStereo = hwndStereo ? Button_GetCheck( hwndStereo ) : 0; D3DEnum_DeviceInfo* pDevice = &pDeviceList[dwDevice]; - + if( IDOK == LOWORD(wParam) ) { // Handle the case when the user hits the OK button. Check if any @@ -608,7 +608,7 @@ HRESULT D3DEnum_SelectDefaultDevice( D3DEnum_DeviceInfo** ppDevice, else return D3DENUMERR_NOCOMPATIBLEDEVICES; - // Set the windowed state of the newly selected device + // Set the windowed state of the newly selected device (*ppDevice)->bWindowed = true; return S_OK; diff --git a/src/old/d3dframe.cpp b/src/old/d3dframe.cpp index 370babb..1305739 100644 --- a/src/old/d3dframe.cpp +++ b/src/old/d3dframe.cpp @@ -41,11 +41,11 @@ CD3DFramework7::CD3DFramework7() m_bIsStereo = false; m_dwRenderWidth = 0L; m_dwRenderHeight = 0L; - + m_pddsFrontBuffer = NULL; m_pddsBackBuffer = NULL; m_pddsBackBufferLeft = NULL; - + m_pddsZBuffer = NULL; m_pd3dDevice = NULL; m_pDD = NULL; @@ -124,7 +124,7 @@ HRESULT CD3DFramework7::Initialize( HWND hWnd, GUID* pDriverGUID, HRESULT hr; // Check params. Note: A NULL mode is valid for windowed modes only. - if( ( NULL==hWnd ) || ( NULL==pDeviceGUID ) || + if( ( NULL==hWnd ) || ( NULL==pDeviceGUID ) || ( NULL==pMode && (dwFlags&D3DFW_FULLSCREEN) ) ) return E_INVALIDARG; @@ -491,7 +491,7 @@ HRESULT CD3DFramework7::CreateZBuffer( GUID* pDeviceGUID ) ddsd.ddpfPixelFormat.dwRGBBitCount = 16; m_pD3D->EnumZBufferFormats( *pDeviceGUID, EnumZBufferFormatsCallback, (VOID*)&ddsd.ddpfPixelFormat ); - + if( 0 == ddsd.ddpfPixelFormat.dwSize ) { DEBUG_MSG( _T("Device doesn't support requested zbuffer format") ); diff --git a/src/old/d3dmath.cpp b/src/old/d3dmath.cpp index 15308fe..77ce492 100644 --- a/src/old/d3dmath.cpp +++ b/src/old/d3dmath.cpp @@ -43,9 +43,9 @@ VOID D3DMath_MatrixMultiply( D3DMATRIX& q, D3DMATRIX& a, D3DMATRIX& b ) ZeroMemory( pM, sizeof(D3DMATRIX) ); - for( WORD i=0; i<4; i++ ) - for( WORD j=0; j<4; j++ ) - for( WORD k=0; k<4; k++ ) + for( WORD i=0; i<4; i++ ) + for( WORD j=0; j<4; j++ ) + for( WORD k=0; k<4; k++ ) pM[4*i+j] += pA[4*i+k] * pB[4*k+j]; memcpy( &q, pM, sizeof(D3DMATRIX) ); @@ -107,7 +107,7 @@ HRESULT D3DMath_VectorMatrixMultiply( D3DVECTOR& vDest, D3DVECTOR& vSrc, FLOAT y = vSrc.x*mat._12 + vSrc.y*mat._22 + vSrc.z* mat._32 + mat._42; FLOAT z = vSrc.x*mat._13 + vSrc.y*mat._23 + vSrc.z* mat._33 + mat._43; FLOAT w = vSrc.x*mat._14 + vSrc.y*mat._24 + vSrc.z* mat._34 + mat._44; - + if( fabs( w ) < g_EPSILON ) return E_INVALIDARG; @@ -167,7 +167,7 @@ VOID D3DMath_QuaternionFromRotation( FLOAT& x, FLOAT& y, FLOAT& z, FLOAT& w, //----------------------------------------------------------------------------- VOID D3DMath_RotationFromQuaternion( D3DVECTOR& v, FLOAT& fTheta, FLOAT x, FLOAT y, FLOAT z, FLOAT w ) - + { fTheta = acosf(w) * 2.0f; v.x = x / sinf( fTheta/2.0f ); @@ -184,7 +184,7 @@ VOID D3DMath_RotationFromQuaternion( D3DVECTOR& v, FLOAT& fTheta, //----------------------------------------------------------------------------- VOID D3DMath_QuaternionFromAngles( FLOAT& x, FLOAT& y, FLOAT& z, FLOAT& w, FLOAT fYaw, FLOAT fPitch, FLOAT fRoll ) - + { FLOAT fSinYaw = sinf( fYaw/2.0f ); FLOAT fSinPitch = sinf( fPitch/2.0f ); @@ -212,8 +212,8 @@ VOID D3DMath_MatrixFromQuaternion( D3DMATRIX& mat, FLOAT x, FLOAT y, FLOAT z, FLOAT xx = x*x; FLOAT yy = y*y; FLOAT zz = z*z; FLOAT xy = x*y; FLOAT xz = x*z; FLOAT yz = y*z; FLOAT wx = w*x; FLOAT wy = w*y; FLOAT wz = w*z; - - mat._11 = 1 - 2 * ( yy + zz ); + + mat._11 = 1 - 2 * ( yy + zz ); mat._12 = 2 * ( xy - wz ); mat._13 = 2 * ( xz + wy ); @@ -257,8 +257,8 @@ VOID D3DMath_QuaternionFromMatrix( FLOAT& x, FLOAT& y, FLOAT& z, FLOAT& w, FLOAT xx = x*x; FLOAT yy = y*y; FLOAT zz = z*z; FLOAT xy = x*y; FLOAT xz = x*z; FLOAT yz = y*z; FLOAT wx = w*x; FLOAT wy = w*y; FLOAT wz = w*z; - - mat._11 = 1 - 2 * ( yy + zz ); + + mat._11 = 1 - 2 * ( yy + zz ); mat._12 = 2 * ( xy - wz ); mat._13 = 2 * ( xz + wy ); @@ -311,7 +311,7 @@ VOID D3DMath_QuaternionSlerp( FLOAT& Qx, FLOAT& Qy, FLOAT& Qz, FLOAT& Qw, FLOAT fCosTheta = Ax*Bx + Ay*By + Az*Bz + Aw*Bw; // Check angle to see if quaternions are in opposite hemispheres - if( fCosTheta < 0.0f ) + if( fCosTheta < 0.0f ) { // If so, flip one of the quaterions fCosTheta = -fCosTheta; @@ -321,12 +321,12 @@ VOID D3DMath_QuaternionSlerp( FLOAT& Qx, FLOAT& Qy, FLOAT& Qz, FLOAT& Qw, // Set factors to do linear interpolation, as a special case where the // quaternions are close together. FLOAT fBeta = 1.0f - fAlpha; - + // If the quaternions aren't close, proceed with spherical interpolation - if( 1.0f - fCosTheta > 0.001f ) - { + if( 1.0f - fCosTheta > 0.001f ) + { FLOAT fTheta = acosf( fCosTheta ); - + fBeta = sinf( fTheta*fBeta ) / sinf( fTheta); fAlpha = sinf( fTheta*fAlpha ) / sinf( fTheta); } diff --git a/src/old/d3dtextr.cpp b/src/old/d3dtextr.cpp index f035e65..4885457 100644 --- a/src/old/d3dtextr.cpp +++ b/src/old/d3dtextr.cpp @@ -347,7 +347,7 @@ HRESULT TextureContainer::LoadBitmapFile( TCHAR* strPathname ) LR_LOADFROMFILE|LR_CREATEDIBSECTION ); if( m_hbmBitmap ) return S_OK; - + return DDERR_NOTFOUND; } @@ -381,7 +381,7 @@ HRESULT TextureContainer::LoadTargaFile( TCHAR* strMetaname, TCHAR* strFilename g_metafile.Read(&tga, sizeof(TargaHeader)); // Only true color, non-mapped images are supported - if( ( 0 != tga.ColormapType ) || + if( ( 0 != tga.ColormapType ) || ( tga.ImageType != 10 && tga.ImageType != 2 ) ) { g_metafile.Close(); @@ -478,7 +478,7 @@ HRESULT TextureContainer::LoadTargaFile( TCHAR* strMetaname, TCHAR* strFilename break; } } - + return S_OK; } @@ -852,7 +852,7 @@ HRESULT TextureContainer::CopyRGBADataToSurface() else pDstData16[x] = (WORD)(dr+dg+db+da); } - + pBytes += ddsd.lPitch; } @@ -935,7 +935,7 @@ HRESULT D3DTextr_CreateTextureFromFile( TCHAR* strName, DWORD dwStage, // Desc: Creates an empty texture. //----------------------------------------------------------------------------- HRESULT D3DTextr_CreateEmptyTexture( TCHAR* strName, DWORD dwWidth, - DWORD dwHeight, DWORD dwStage, + DWORD dwHeight, DWORD dwStage, DWORD dwFlags ) { // Check parameters diff --git a/src/old/joystick.cpp b/src/old/joystick.cpp index 3415047..269c09d 100644 --- a/src/old/joystick.cpp +++ b/src/old/joystick.cpp @@ -29,8 +29,8 @@ // Global variables. -LPDIRECTINPUT7 g_pDI = NULL; -LPDIRECTINPUTDEVICE2 g_pJoystick = NULL; +LPDIRECTINPUT7 g_pDI = NULL; +LPDIRECTINPUTDEVICE2 g_pJoystick = NULL; DIDEVCAPS g_diDevCaps; @@ -51,7 +51,7 @@ bool CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, // If it failed, then we can't use this joystick. (Maybe the user unplugged // it while we were in the middle of enumerating it.) - if( FAILED(hr) ) + if( FAILED(hr) ) return DIENUM_CONTINUE; @@ -66,14 +66,14 @@ bool CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance, bool CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext ) { - DIPROPRANGE diprg; - diprg.diph.dwSize = sizeof(DIPROPRANGE); - diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER); - diprg.diph.dwHow = DIPH_BYOFFSET; + DIPROPRANGE diprg; + diprg.diph.dwSize = sizeof(DIPROPRANGE); + diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER); + diprg.diph.dwHow = DIPH_BYOFFSET; diprg.diph.dwObj = pdidoi->dwOfs; // Specify the enumerated axis - diprg.lMin = -1000; - diprg.lMax = +1000; - + diprg.lMin = -1000; + diprg.lMax = +1000; + // Set the range for the axis if( FAILED( g_pJoystick->SetProperty( DIPROP_RANGE, &diprg.diph ) ) ) return DIENUM_STOP; @@ -136,12 +136,12 @@ bool InitDirectInput(HINSTANCE hInst, HWND hWnd) // Make sure we got a joystick if( NULL == g_pJoystick ) { -//? MessageBox( NULL, "Joystick not found", "DInput Sample", +//? MessageBox( NULL, "Joystick not found", "DInput Sample", //? MB_ICONERROR | MB_OK ); return false; } - // Set the data format to "simple joystick" - a predefined data format + // Set the data format to "simple joystick" - a predefined data format // // A data format specifies which controls on a device we are interested in, // and how they should be reported. This tells DInput that we will be @@ -189,7 +189,7 @@ bool UpdateInputState( DIJOYSTATE &js ) { HRESULT hr; - if ( g_pJoystick ) + if ( g_pJoystick ) { do { @@ -212,7 +212,7 @@ bool UpdateInputState( DIJOYSTATE &js ) } while ( DIERR_INPUTLOST == hr ); if ( FAILED(hr) ) return false; - } + } return true; } @@ -222,9 +222,9 @@ bool UpdateInputState( DIJOYSTATE &js ) bool FreeDirectInput() { // Unacquire and release any DirectInputDevice objects. - if( NULL != g_pJoystick ) + if( NULL != g_pJoystick ) { - // Unacquire the device one last time just in case + // Unacquire the device one last time just in case // the app tried to exit while the device is still acquired. g_pJoystick->Unacquire(); g_pJoystick->Release(); @@ -233,7 +233,7 @@ bool FreeDirectInput() // Release any DirectInput objects. - if( g_pDI ) + if( g_pDI ) { g_pDI->Release(); g_pDI = NULL; diff --git a/src/old/math3d.cpp b/src/old/math3d.cpp index 5282ac1..a099df4 100644 --- a/src/old/math3d.cpp +++ b/src/old/math3d.cpp @@ -420,7 +420,7 @@ FPOINT RotatePoint(float angle, float dist) // | / | // |/)a | // ----o----o--> -// | x +// | x // | float RotateAngle(float x, float y) diff --git a/src/old/model.cpp b/src/old/model.cpp index 987a870..701df9e 100644 --- a/src/old/model.cpp +++ b/src/old/model.cpp @@ -2724,28 +2724,28 @@ static int tablePartDr[] = // drawer.tga 40, 104, 48, 160, // bocal 24, 152, 48, 160, // bocal fond 0, 240, 32, 256, // crayon 1: couleur (22) - 0, 160, 32, 192, // crayon 1: dessus + 0, 160, 32, 192, // crayon 1: dessus 0, 192, 32, 256, // crayon 1: pointe 32, 240, 64, 256, // crayon 2: couleur - 32, 160, 64, 192, // crayon 2: dessus + 32, 160, 64, 192, // crayon 2: dessus 32, 192, 64, 256, // crayon 2: pointe 64, 240, 96, 256, // crayon 3: couleur - 64, 160, 96, 192, // crayon 3: dessus + 64, 160, 96, 192, // crayon 3: dessus 64, 192, 96, 256, // crayon 3: pointe 96, 240, 128, 256, // crayon 4: couleur - 96, 160, 128, 192, // crayon 4: dessus + 96, 160, 128, 192, // crayon 4: dessus 96, 192, 128, 256, // crayon 4: pointe 128, 240, 160, 256, // crayon 5: couleur - 128, 160, 160, 192, // crayon 5: dessus + 128, 160, 160, 192, // crayon 5: dessus 128, 192, 160, 256, // crayon 5: pointe 160, 240, 192, 256, // crayon 6: couleur - 160, 160, 192, 192, // crayon 6: dessus + 160, 160, 192, 192, // crayon 6: dessus 160, 192, 192, 256, // crayon 6: pointe 192, 240, 224, 256, // crayon 7: couleur - 192, 160, 224, 192, // crayon 7: dessus + 192, 160, 224, 192, // crayon 7: dessus 192, 192, 224, 256, // crayon 7: pointe 224, 240, 256, 256, // crayon 8: couleur - 224, 160, 256, 192, // crayon 8: dessus + 224, 160, 256, 192, // crayon 8: dessus 224, 192, 256, 256, // crayon 8: pointe -1 }; diff --git a/src/old/particule.cpp b/src/old/particule.cpp index b807e3d..de40b51 100644 --- a/src/old/particule.cpp +++ b/src/old/particule.cpp @@ -1322,7 +1322,7 @@ void CParticule::FrameParticule(float rTime) duration = Math::Rand()*1.0f+1.0f; mass = 0.0f; CreateParticule(pos, speed, dim, PARTIEXPLOG1, duration, mass, 1.0f); - + pos.y += 1.0f; total = (int)(2.0f*m_engine->RetParticuleDensity()); for ( j=0 ; j<total ; j++ ) @@ -1366,7 +1366,7 @@ void CParticule::FrameParticule(float rTime) duration = Math::Rand()*1.0f+1.0f; mass = 0.0f; CreateParticule(pos, speed, dim, PARTIEXPLOG1, duration, mass, 1.0f); - + pos.y += 1.0f; total = (int)(2.0f*m_engine->RetParticuleDensity()); for ( j=0 ; j<total ; j++ ) @@ -3534,7 +3534,7 @@ void CParticule::DrawParticuleSphere(int i) // Generate the group of rings for the sphere. j = 0; for ( ring=0 ; ring<numRings ; ring++ ) - { + { r0 = sinf((ring+0)*deltaRingAngle); r1 = sinf((ring+1)*deltaRingAngle); v0.y = cosf((ring+0)*deltaRingAngle); @@ -3562,7 +3562,7 @@ void CParticule::DrawParticuleSphere(int i) vertex[j++] = D3DVERTEX2(v1,v1, tu1,tv1); } } - + m_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, j, NULL); m_engine->AddStatisticTriangle(j); @@ -3680,7 +3680,7 @@ void CParticule::DrawParticuleCylinder(int i) vertex[j++] = D3DVERTEX2(v1,v1, tu1,tv1); } } - + m_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_VERTEX2, vertex, j, NULL); m_engine->AddStatisticTriangle(j); diff --git a/src/old/pyro.cpp b/src/old/pyro.cpp index 96fc776..eaad499 100644 --- a/src/old/pyro.cpp +++ b/src/old/pyro.cpp @@ -488,7 +488,7 @@ bool CPyro::Create(PyroType type, CObject* pObj, float force) } if ( m_type == PT_SHOTW ) return true; - + // Generates the triangles of the explosion. if ( m_type == PT_FRAGT || m_type == PT_FRAGO || @@ -1200,7 +1200,7 @@ bool CPyro::EventProcess(const Event &event) dim.x = (Math::Rand()*2.5f+2.5f)*(1.0f-m_progress*0.9f); dim.y = dim.x; pos.y += dim.y; - m_particule->CreateParticule(pos, speed, dim, + m_particule->CreateParticule(pos, speed, dim, (ParticuleType)(PARTILENS1+rand()%4), Math::Rand()*2.5f+2.5f, Math::Rand()*5.0f+5.0f, 0.0f); @@ -1390,7 +1390,7 @@ void CPyro::CutObjectLink(CObject* pObj) Error CPyro::IsEnded() { - // Destroys the object that exploded. + // Destroys the object that exploded. //It should not be destroyed at the end of the Create, //because it is sometimes the object itself that makes the Create: // pyro->Create(PT_FRAGT, this); diff --git a/src/old/resource.h b/src/old/resource.h index 959592d..4666323 100644 --- a/src/old/resource.h +++ b/src/old/resource.h @@ -43,7 +43,7 @@ #define IDM_EXIT 40006 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 diff --git a/src/old/sound.cpp b/src/old/sound.cpp index 9aca05a..f6e4640 100644 --- a/src/old/sound.cpp +++ b/src/old/sound.cpp @@ -295,7 +295,7 @@ bool InitAudioTrackVolume(int volume) CSound::CSound(CInstanceManager* iMan) { int i; - + m_iMan = iMan; m_iMan->AddInstance(CLASS_SOUND, this); @@ -428,7 +428,7 @@ bool CSound::Create(HWND hWnd, bool b3D) if ( m_ctrl3D ) { - hr = primary->QueryInterface( IID_IDirectSound3DListener, + hr = primary->QueryInterface( IID_IDirectSound3DListener, (VOID**)&m_listener ); if ( hr != S_OK ) { @@ -806,7 +806,7 @@ bool CSound::SearchFreeBuffer(Sound sound, int &channel, bool &bAlreadyLoaded) // Reads in data from a wave file. -bool CSound::ReadData(LPDIRECTSOUNDBUFFER lpDSB, Sound sound, DWORD size) +bool CSound::ReadData(LPDIRECTSOUNDBUFFER lpDSB, Sound sound, DWORD size) { LPVOID pData1; DWORD dwData1Size; @@ -822,13 +822,13 @@ bool CSound::ReadData(LPDIRECTSOUNDBUFFER lpDSB, Sound sound, DWORD size) } // Read in first chunk of data. - if ( dwData1Size > 0 ) + if ( dwData1Size > 0 ) { memcpy(pData1, m_files[sound]+sizeof(WaveHeader), dwData1Size); } // Read in second chunk if necessary. - if ( dwData2Size > 0 ) + if ( dwData2Size > 0 ) { memcpy(pData2, m_files[sound]+sizeof(WaveHeader)+dwData1Size, dwData2Size); } @@ -853,10 +853,10 @@ bool CSound::CreateSoundBuffer(int channel, DWORD size, DWORD freq, DSBUFFERDESC dsbdesc; DS3DBUFFER bufferParams; // 3D buffer properties HRESULT hr; - + // Set up wave format structure. memset( &pcmwf, 0, sizeof(PCMWAVEFORMAT) ); - pcmwf.wf.wFormatTag = WAVE_FORMAT_PCM; + pcmwf.wf.wFormatTag = WAVE_FORMAT_PCM; pcmwf.wf.nChannels = bStereo ? 2 : 1; pcmwf.wf.nSamplesPerSec = freq; pcmwf.wf.nBlockAlign = (WORD)blkAlign; @@ -864,7 +864,7 @@ bool CSound::CreateSoundBuffer(int channel, DWORD size, DWORD freq, pcmwf.wBitsPerSample = (WORD)bitsPerSample; // Set up DSBUFFERDESC structure. - memset(&dsbdesc, 0, sizeof(DSBUFFERDESC)); // Zero it out. + memset(&dsbdesc, 0, sizeof(DSBUFFERDESC)); // Zero it out. dsbdesc.dwSize = sizeof(DSBUFFERDESC); if ( m_ctrl3D ) { @@ -876,7 +876,7 @@ bool CSound::CreateSoundBuffer(int channel, DWORD size, DWORD freq, { dsbdesc.dwFlags = DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN|DSBCAPS_CTRLFREQUENCY; } - dsbdesc.dwBufferBytes = size; + dsbdesc.dwBufferBytes = size; dsbdesc.lpwfxFormat = (LPWAVEFORMATEX)&pcmwf; hr = m_lpDS->CreateSoundBuffer(&dsbdesc, &m_channel[channel].soundBuffer, NULL); @@ -886,12 +886,12 @@ bool CSound::CreateSoundBuffer(int channel, DWORD size, DWORD freq, { hr = m_channel[channel].soundBuffer->QueryInterface ( - IID_IDirectSound3DBuffer, + IID_IDirectSound3DBuffer, (VOID**)&m_channel[channel].soundBuffer3D ); if ( hr != DS_OK ) return false; } - + m_channel[channel].bUsed = true; m_channel[channel].bMute = false; return true; @@ -1484,11 +1484,11 @@ bool CSound::PlayMusic(int rank, bool bRepeat) // The device opened successfully; get the device ID. m_MidiDeviceID = mciOpenParms.wDeviceID; - // Begin playback. + // Begin playback. mciPlayParms.dwCallback = (DWORD)m_hWnd; dwReturn = mciSendCommand(m_MidiDeviceID, MCI_PLAY, - MCI_NOTIFY, + MCI_NOTIFY, (DWORD)(LPVOID)&mciPlayParms); if ( dwReturn != 0 ) { @@ -1570,7 +1570,7 @@ bool CSound::PlayAudioTrack(int rank) mciGetErrorString(dwReturn, filename, 128); StopMusic(); return false; - } + } // Begin playback. memset(&mciPlayParms, 0, sizeof(MCI_PLAY_PARMS)); diff --git a/src/old/terrain.cpp b/src/old/terrain.cpp index 2f2250c..9804261 100644 --- a/src/old/terrain.cpp +++ b/src/old/terrain.cpp @@ -108,7 +108,7 @@ CTerrain::~CTerrain() // +---+---o---+---+---> x // | | | | | // | | | | | -// +---+---+---+---+ +// +---+---+---+---+ // | | | | | The land is viewed from above here. // | | | | | // +---+---+---+---+ @@ -759,7 +759,7 @@ D3DVERTEX2 CTerrain::RetVertex(int x, int y, int step) // | // +-------------------> x -bool CTerrain::CreateMosaic(int ox, int oy, int step, int objRank, +bool CTerrain::CreateMosaic(int ox, int oy, int step, int objRank, const D3DMATERIAL7 &mat, float min, float max) { @@ -1794,7 +1794,7 @@ float CTerrain::RetFloorLevel(const Math::Vector &p, bool bBrut, bool bWater) return ps.y; } -// Returns the height to the ground. +// Returns the height to the ground. // This height is positive when you are above the ground. float CTerrain::RetFloorHeight(const Math::Vector &p, bool bBrut, bool bWater) diff --git a/src/old/terrain.h b/src/old/terrain.h index 38e7287..c763682 100644 --- a/src/old/terrain.h +++ b/src/old/terrain.h @@ -188,7 +188,7 @@ protected: char m_texBaseName[20]; char m_texBaseExt[10]; float m_defHardness; - + TerrainMaterial m_levelMat[MAXMATTERRAIN+1]; int m_levelMatTotal; int m_levelMatMax; diff --git a/src/old/text.cpp b/src/old/text.cpp index d174358..8573816 100644 --- a/src/old/text.cpp +++ b/src/old/text.cpp @@ -130,7 +130,7 @@ static short table_text_colobot[] = 218,17, 227,33, // Y 227,17, 236,33, // Z 236,17, 241,33, // [ - 241,17, 248,33, // \ + 241,17, 248,33, // \ 248,17, 252,33, // ] 219,0, 229,16, // ^ 0, 34, 9, 50, // _ @@ -166,7 +166,7 @@ static short table_text_colobot[] = 201,34, 203,50, // | 203,34, 209,50, // } 209,34, 219,50, // ~ - 219,34, 228,50, // + 219,34, 228,50, // 219,34, 225,50, // 128 219,34, 225,50, @@ -1223,7 +1223,7 @@ void CText::DimText(char *string, char *format, int len, Math::Point pos, start.y -= RetDescent(size, FONT_COLOBOT); end.y += RetAscent(size, FONT_COLOBOT); } - + // Returns the size of a multi-font text. void CText::DimText(char *string, char *format, Math::Point pos, int justif, @@ -1259,7 +1259,7 @@ void CText::DimText(char *string, int len, Math::Point pos, int justif, start.y -= RetDescent(size, font); end.y += RetAscent(size, font); } - + // Returns the size of a text. void CText::DimText(char *string, Math::Point pos, int justif, @@ -1291,7 +1291,7 @@ float CText::RetHeight(float size, FontType font) return (16.0f/256.0f)*(size/20.0f); } - + // Returns the width of a string of multi-font characters. float CText::RetStringWidth(char *string, char *format, int len, |