init.cpp 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* $Header: /Commando/Code/Tests/movietest/init.cpp 4 5/06/98 3:10p Greg_h $ */
  19. /***********************************************************************************************
  20. *** Confidential - Westwood Studios ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Commando *
  24. * *
  25. * $Archive:: /Commando/Code/Tests/movietest/init.cpp $*
  26. * *
  27. * $Author:: Greg_h $*
  28. * *
  29. * $Modtime:: 3/24/98 10:43a $*
  30. * *
  31. * $Revision:: 4 $*
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #include "init.h"
  37. #include <sr.hpp>
  38. #include "_viewpt.h"
  39. #include "_world.h"
  40. #include "winmain.h"
  41. #include "ww3d.h"
  42. bool Init(void)
  43. {
  44. ScreenResolution.X = 0;
  45. ScreenResolution.Y = 0;
  46. ScreenResolution.Width = 640;
  47. ScreenResolution.Height = 480;
  48. MainViewport.X = 16;
  49. MainViewport.Y = 16;
  50. MainViewport.Width = 640-32;
  51. MainViewport.Height = 480-32;
  52. WW3D::Init(hWndMain);
  53. WW3D::Set_Resolution(ScreenResolution.Width,ScreenResolution.Height,16,false);
  54. const DynamicVectorClass<RenderDeviceDescClass> & RDDescriptions = WW3D::Enumerate_Render_Devices();
  55. char buf[1024];
  56. char tmp[64];
  57. char title[64];
  58. for (int ri=0; ri<RDDescriptions.Count(); ri++) {
  59. sprintf(title,"Render Device: %d",ri);
  60. buf[0] = 0;
  61. sprintf(tmp,"Device Name: %s\n",RDDescriptions[ri].Get_Device_Name());
  62. strcat(buf,tmp);
  63. sprintf(tmp,"Device Vendor: %s\n",RDDescriptions[ri].Get_Device_Vendor());
  64. strcat(buf,tmp);
  65. sprintf(tmp,"Device Platform: %s\n",RDDescriptions[ri].Get_Device_Platform());
  66. strcat(buf,tmp);
  67. sprintf(tmp,"Driver Name: %s\n",RDDescriptions[ri].Get_Driver_Name());
  68. strcat(buf,tmp);
  69. sprintf(tmp,"Driver Vendor: %s\n",RDDescriptions[ri].Get_Driver_Vendor());
  70. strcat(buf,tmp);
  71. sprintf(tmp,"Driver Version: %s\n",RDDescriptions[ri].Get_Driver_Version());
  72. strcat(buf,tmp);
  73. sprintf(tmp,"Hardware Name: %s\n",RDDescriptions[ri].Get_Hardware_Name());
  74. strcat(buf,tmp);
  75. sprintf(tmp,"Hardware Vendor: %s\n",RDDescriptions[ri].Get_Hardware_Vendor());
  76. strcat(buf,tmp);
  77. sprintf(tmp,"Hardware Chipset: %s\n",RDDescriptions[ri].Get_Hardware_Chipset());
  78. strcat(buf,tmp);
  79. MessageBox(NULL,buf,title,MB_OK);
  80. }
  81. return true;
  82. }