Advertisement
Guest User

Untitled

a guest
Aug 27th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. diff --git a/neo/game/Misc.cpp b/neo/game/Misc.cpp
  2. index bfde719..5d90d5c 100644
  3. --- a/neo/game/Misc.cpp
  4. +++ b/neo/game/Misc.cpp
  5. @@ -739,6 +739,8 @@ void idSpring::Spawn( void ) {
  6. PostEventMS( &EV_PostSpawn, 0 );
  7. }
  8.  
  9. +// FIXME: add idSpring::Save() and Restore() !
  10. +
  11. /*
  12. ===============================================================================
  13.  
  14. diff --git a/neo/sound/snd_local.h b/neo/sound/snd_local.h
  15. index 81e5d3e..68d7fda 100644
  16. --- a/neo/sound/snd_local.h
  17. +++ b/neo/sound/snd_local.h
  18. @@ -29,6 +29,13 @@ If you have questions concerning this license or the applicable additional terms
  19. #ifndef __SND_LOCAL_H__
  20. #define __SND_LOCAL_H__
  21.  
  22. +#ifdef ID_DEDICATED
  23. +// stub-only mode: AL_API and ALC_API shouldn't refer to any dll-stuff
  24. +// because the implemenations are in openal_stub.cpp
  25. +// this is ensured by defining AL_LIBTYPE_STATIC before including the AL headers
  26. +#define AL_LIBTYPE_STATIC
  27. +#endif
  28. +
  29. #include <AL/al.h>
  30. #include <AL/alc.h>
  31. #include <AL/alext.h>
  32. diff --git a/neo/sys/glimp.cpp b/neo/sys/glimp.cpp
  33. index 34e7a66..da76c90 100644
  34. --- a/neo/sys/glimp.cpp
  35. +++ b/neo/sys/glimp.cpp
  36. @@ -36,6 +36,9 @@ If you have questions concerning this license or the applicable additional terms
  37.  
  38. idCVar in_nograb("in_nograb", "0", CVAR_SYSTEM | CVAR_NOCHEAT, "prevents input grabbing");
  39.  
  40. +// when compiling a dedicated server binary, the GLimp_* stuff from stub_gl.cpp is used instead
  41. +#ifndef ID_DEDICATED
  42. +
  43. static bool grabbed = false;
  44.  
  45. #if SDL_VERSION_ATLEAST(2, 0, 0)
  46. @@ -287,9 +290,6 @@ GLExtension_t GLimp_ExtensionPointer(const char *name) {
  47. }
  48.  
  49. void GLimp_GrabInput(int flags) {
  50. -#if defined(ID_DEDICATED)
  51. - return;
  52. -#else
  53. bool grab = flags & GRAB_ENABLE;
  54.  
  55. if (grab && (flags & GRAB_REENABLE))
  56. @@ -314,5 +314,6 @@ void GLimp_GrabInput(int flags) {
  57. SDL_ShowCursor(flags & GRAB_HIDECURSOR ? SDL_DISABLE : SDL_ENABLE);
  58. SDL_WM_GrabInput(grab ? SDL_GRAB_ON : SDL_GRAB_OFF);
  59. #endif
  60. -#endif
  61. }
  62. +
  63. +#endif // ID_DEDICATED
  64. diff --git a/neo/sys/stub/openal_stub.cpp b/neo/sys/stub/openal_stub.cpp
  65. index 939acba..3da417b 100644
  66. --- a/neo/sys/stub/openal_stub.cpp
  67. +++ b/neo/sys/stub/openal_stub.cpp
  68. @@ -91,18 +91,6 @@ ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *deviceHandle, ALCe
  69. return NULL;
  70. }
  71.  
  72. -AL_API void AL_APIENTRY alBufferData( ALuint buffer,
  73. - ALenum format,
  74. - ALvoid* data,
  75. - ALsizei size,
  76. - ALsizei freq ) { }
  77. -
  78. -AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, ALuint* buffers ) { }
  79. -
  80. -AL_API ALboolean AL_APIENTRY alIsExtensionPresent( ALubyte* fname ) {
  81. - return AL_FALSE;
  82. -}
  83. -
  84. AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources ) { }
  85.  
  86. AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename ) {
  87. @@ -118,10 +106,6 @@ ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *dev,
  88. return NULL;
  89. }
  90.  
  91. -ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( ALubyte *tokstr ) {
  92. - return NULL;
  93. -}
  94. -
  95. AL_API void AL_APIENTRY alListenerfv( ALenum pname, const ALfloat* param ) { }
  96.  
  97. AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids ) { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement