x86UNIXStub.dedicated.cpp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #include "platform/platformInput.h"
  23. #include "platformX86UNIX/x86UNIXFont.h"
  24. #include "platform/nativeDialogs/fileDialog.h"
  25. #if 0
  26. // declare stub functions
  27. #define GL_FUNCTION(fn_return, fn_name, fn_args, fn_value) fn_return stub_##fn_name fn_args{ fn_value }
  28. #include "platform/GLCoreFunc.h"
  29. #include "platform/GLExtFunc.h"
  30. #include "platform/GLUFunc.h"
  31. #undef GL_FUNCTION
  32. // point gl function pointers at stub functions
  33. #define GL_FUNCTION(fn_return,fn_name,fn_args, fn_value) fn_return (*fn_name)fn_args = stub_##fn_name;
  34. #include "platform/GLCoreFunc.h"
  35. #include "platform/GLExtFunc.h"
  36. #include "platform/GLUFunc.h"
  37. #undef GL_FUNCTION
  38. GLState gGLState;
  39. bool gOpenGLDisablePT = false;
  40. bool gOpenGLDisableCVA = false;
  41. bool gOpenGLDisableTEC = false;
  42. bool gOpenGLDisableARBMT = false;
  43. bool gOpenGLDisableFC = false;
  44. bool gOpenGLDisableTCompress = false;
  45. bool gOpenGLNoEnvColor = false;
  46. float gOpenGLGammaCorrection = 0.5;
  47. bool gOpenGLNoDrawArraysAlpha = false;
  48. // AL stubs
  49. //#include <al/altypes.h>
  50. //#include <al/alctypes.h>
  51. //#define INITGUID
  52. //#include <al/eaxtypes.h>
  53. // Define the OpenAL and Extension Stub functions
  54. #define AL_FUNCTION(fn_return, fn_name, fn_args, fn_value) fn_return stub_##fn_name fn_args{ fn_value }
  55. #include <al/al_func.h>
  56. #include <al/alc_func.h>
  57. #include <al/eax_func.h>
  58. #undef AL_FUNCTION
  59. #include "platform/platformInput.h"
  60. // Declare the OpenAL and Extension Function pointers
  61. // And initialize them to the stub functions
  62. #define AL_FUNCTION(fn_return,fn_name,fn_args, fn_value) fn_return (*fn_name)fn_args = stub_##fn_name;
  63. #include <al/al_func.h>
  64. #include <al/alc_func.h>
  65. #include <al/eax_func.h>
  66. #undef AL_FUNCTION
  67. namespace Audio
  68. {
  69. bool OpenALDLLInit() { return false; }
  70. void OpenALDLLShutdown() {}
  71. }
  72. #endif
  73. // Platform Stubs
  74. bool Platform::excludeOtherInstances(const char*) { return true; }
  75. // clipboard
  76. const char* Platform::getClipboard() { return ""; }
  77. bool Platform::setClipboard(const char *text) { return false; }
  78. // fs
  79. void Platform::openFolder(const char *path) { }
  80. void Platform::openFile(const char *path) { }
  81. // window
  82. bool Platform::displaySplashWindow(String path) { return false; }
  83. // font
  84. PlatformFont *createPlatformFont(const char *name, U32 size, U32 charset) { return NULL; }
  85. bool x86UNIXFont::create(const char *name, U32 size, U32 charset) { return false; }
  86. // web
  87. bool Platform::openWebBrowser(const char *) { return false; }
  88. // messagebox
  89. void Platform::AlertOK(const char *, const char *) {}
  90. bool Platform::AlertOKCancel(const char *, const char *) { return false; }
  91. S32 Platform::messageBox(char const*, char const*, MBButtons, MBIcons) { return 0; }
  92. bool Platform::AlertRetry(char const*, char const*) { return false ; }
  93. // file dialog
  94. IMPLEMENT_CONOBJECT(FileDialog);
  95. FileDialog::FileDialog() {}
  96. FileDialog::~FileDialog() {}
  97. bool FileDialog::Execute() { return false; }
  98. void FileDialog::initPersistFields() { Parent::initPersistFields(); }
  99. class FileDialogOpaqueData {};
  100. FileDialogData::FileDialogData() {}
  101. FileDialogData::~FileDialogData() {}
  102. IMPLEMENT_CONOBJECT(OpenFileDialog);
  103. OpenFileDialog::OpenFileDialog() {}
  104. OpenFileDialog::~OpenFileDialog() {}
  105. void OpenFileDialog::initPersistFields() { Parent::initPersistFields(); }
  106. // Input stubs
  107. void Input::init() {}
  108. void Input::destroy() {}
  109. bool Input::enable() { return false; }
  110. void Input::disable() {}
  111. void Input::activate() {}
  112. void Input::deactivate() {}
  113. U16 Input::getAscii( U16 keyCode, KEY_STATE keyState ) { return 0; }
  114. U16 Input::getKeyCode( U16 asciiCode ) { return 0; }
  115. bool Input::isEnabled() { return false; }
  116. bool Input::isActive() { return false; }
  117. void Input::process() {}
  118. InputManager* Input::getManager() { return NULL; }
  119. InputEvent Input::smInputEvent;
  120. U8 Input::smModifierKeys;
  121. bool OpenGLInit() { return false; }