Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
901 B

  1. #include "stdafx.h"
  2. #include <Windows.h>
  3. #include <mmsystem.h>
  4. #include <strsafe.h>
  5. #pragma comment(lib,"d3d9.lib")
  6. #pragma comment(lib,"d3dx9.lib")
  7. #include "sqplus.h"
  8. LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) {
  9. switch( msg ) {
  10. case WM_CLOSE:
  11. PostQuitMessage( 0 );
  12. return 0;
  13. }
  14. return DefWindowProc( hWnd, msg, wParam, lParam );
  15. }
  16. BOOL DXSquirrel_Initialize();
  17. void DXSquirrel_Shutdown();
  18. INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT ) {
  19. if(!DXSquirrel_Initialize()) {
  20. MessageBox(NULL,_SC("Error initilizing the app"),_SC("DXSquirrel"),MB_OK);
  21. return -1;
  22. }
  23. try {
  24. SquirrelObject main = SquirrelVM::CompileScript(_SC("dxsquirrel.nut"));
  25. SquirrelVM::RunScript(main);
  26. }
  27. catch(SquirrelError &e) {
  28. MessageBox(NULL,e.desc,_SC("DXSquirrel"),MB_OK);
  29. return -2;
  30. }
  31. DXSquirrel_Shutdown();
  32. return 0;
  33. }