├── .clang-format ├── .github └── workflows │ └── build.yml ├── .gitignore ├── CMakeLists.txt ├── GMP_Client ├── Button.cpp ├── Button.h ├── CActiveAniID.cpp ├── CActiveAniID.h ├── CAnimMenu.cpp ├── CAnimMenu.h ├── CChat.cpp ├── CChat.h ├── CConfig.cpp ├── CConfig.h ├── CHeroClass.cpp ├── CHeroClass.h ├── CIngame.cpp ├── CIngame.h ├── CInterpolatePos.cpp ├── CInterpolatePos.h ├── CInventory.cpp ├── CInventory.h ├── CLanguage.cpp ├── CLanguage.h ├── CLocalPlayer.cpp ├── CLocalPlayer.h ├── CMainMenu.cpp ├── CMainMenu.h ├── CMakeLists.txt ├── CMap.cpp ├── CMap.h ├── CMenu.cpp ├── CMenu.h ├── CObjectMenu.cpp ├── CObjectMenu.h ├── CObservation.cpp ├── CObservation.h ├── CPlayer.cpp ├── CPlayer.h ├── CPlayerList.cpp ├── CPlayerList.h ├── CSelectClass.cpp ├── CSelectClass.h ├── CServerList.cpp ├── CServerList.h ├── CShrinker.cpp ├── CShrinker.h ├── CSpawnPoint.cpp ├── CSpawnPoint.h ├── CSyncFuncs.cpp ├── CSyncFuncs.h ├── CWatch.cpp ├── CWatch.h ├── ExceptionHandler.cpp ├── ExceptionHandler.h ├── ExtendedServerList.cpp ├── ExtendedServerList.h ├── Font.cpp ├── Font.h ├── G2W.h ├── GMPSPlash.h ├── GMPSplash.cpp ├── GMP_Client.cpp ├── HTTPDownloader.cpp ├── HTTPDownloader.h ├── HooksManager.cpp ├── HooksManager.h ├── Interface.cpp ├── Interface.h ├── Mod.cpp ├── Mod.h ├── Network.cpp ├── Network.h ├── PacketHandlers │ ├── Connection.hpp │ └── Game.hpp ├── StandardFonts.h ├── Table.cpp ├── Table.h ├── Voice │ ├── CMakeLists.txt │ ├── VoiceCapture.cpp │ ├── VoiceCapture.h │ ├── VoicePlayback.cpp │ ├── VoicePlayback.h │ └── VoiceTestApp │ │ ├── CMakeLists.txt │ │ └── voice_test_app.cpp ├── WorldBuilder │ ├── CBuilder.cpp │ ├── CBuilder.h │ ├── load.cpp │ ├── load.h │ ├── save.cpp │ └── save.h ├── common.h ├── config.cpp ├── config.h ├── dx7sdk │ ├── docs │ │ ├── directx.chi │ │ └── directx.chm │ ├── inc │ │ ├── d3d.h │ │ ├── d3dcaps.h │ │ ├── d3drm.h │ │ ├── d3drmdef.h │ │ ├── d3drmobj.h │ │ ├── d3drmwin.h │ │ ├── d3dtypes.h │ │ ├── d3dvec.inl │ │ ├── d3dx.h │ │ ├── d3dxcore.h │ │ ├── d3dxerr.h │ │ ├── d3dxmath.h │ │ ├── d3dxmath.inl │ │ ├── d3dxshapes.h │ │ ├── d3dxsprite.h │ │ ├── ddraw.h │ │ ├── dinput.h │ │ ├── dinputd.h │ │ ├── dls1.h │ │ ├── dls2.h │ │ ├── dmdls.h │ │ ├── dmerror.h │ │ ├── dmksctrl.h │ │ ├── dmusbuff.h │ │ ├── dmusicc.h │ │ ├── dmusicf.h │ │ ├── dmusici.h │ │ ├── dplobby.h │ │ ├── dvp.h │ │ ├── dxfile.h │ │ ├── dxsdk.inc │ │ ├── multimon.h │ │ ├── rmxfguid.h │ │ ├── rmxftmpl.h │ │ └── rmxftmpl.x │ └── lib │ │ ├── d3dim.lib │ │ ├── d3drm.lib │ │ ├── d3dx.lib │ │ ├── d3dxd.lib │ │ ├── d3dxof.lib │ │ ├── ddraw.lib │ │ └── dxguid.lib ├── g2api │ ├── CMakeLists.txt │ ├── cgamemanager.hpp │ ├── constants.hpp │ ├── g2Api.h │ ├── macros.hpp │ ├── ocanictrl_human.hpp │ ├── ocgame.cpp │ ├── ocgame.hpp │ ├── ocitem.hpp │ ├── ocmob.hpp │ ├── ocmsg.hpp │ ├── ocnpc.hpp │ ├── ocnpcinventory.hpp │ ├── ocobjectfactory.hpp │ ├── ocspawnmanager.hpp │ ├── ocspell.hpp │ ├── ocviewgothicprogressbar.hpp │ ├── ocviewprogressbar.hpp │ ├── ocviewstatusbar.hpp │ ├── ocvob.hpp │ ├── ocworld.hpp │ ├── ocworldtimer.hpp │ ├── oczone.hpp │ ├── osheader.hpp │ ├── utils.h │ ├── zCCsPlayer.h │ ├── zCQuat.hpp │ ├── zcaicamera.hpp │ ├── zcaiplayer.hpp │ ├── zcarchiver.hpp │ ├── zcarchiverfactory.hpp │ ├── zcbsptree.hpp │ ├── zcbuffer.hpp │ ├── zccamera.hpp │ ├── zcclassdef.hpp │ ├── zcconsole.hpp │ ├── zceffect.hpp │ ├── zceventmanager.hpp │ ├── zcfont.hpp │ ├── zcinput.hpp │ ├── zcinputcallback.hpp │ ├── zcmenu.hpp │ ├── zcmesh.hpp │ ├── zcmodel.hpp │ ├── zcmover.hpp │ ├── zcobject.hpp │ ├── zcoption.hpp │ ├── zcpar_symbol.hpp │ ├── zcparser.hpp │ ├── zcparticlefx.hpp │ ├── zcrenderer.hpp │ ├── zcsession.hpp │ ├── zcskycontroller.hpp │ ├── zcsoundsystem.hpp │ ├── zctexture.hpp │ ├── zctimer.hpp │ ├── zcview.hpp │ ├── zcvisual.hpp │ ├── zcvob.hpp │ ├── zcwaynet.hpp │ ├── zcworld.hpp │ ├── zfile.hpp │ ├── zstring.hpp │ ├── ztypes.hpp │ └── ztypes.inl ├── game_client.cpp ├── game_client.h ├── keyboard.cpp ├── keyboard.h ├── patch.cpp ├── patch.h ├── res │ ├── cws.rgn │ └── logo.bmp ├── resource.rc ├── zNet │ ├── CMakeLists.txt │ └── znet_client.h └── znet_rak │ ├── CMakeLists.txt │ ├── client.cpp │ └── client.h ├── GMP_Serv ├── CMakeLists.txt ├── HTTPServer.cpp ├── HTTPServer.h ├── Lua │ ├── event_bind.cpp │ ├── event_bind.h │ ├── function_bind.cpp │ ├── function_bind.h │ ├── spdlog_bind.cpp │ └── spdlog_bind.h ├── Script.cpp ├── Script.h ├── character_definition.cpp ├── character_definition.h ├── config.cpp ├── config.h ├── game_server.cpp ├── game_server.h ├── gothic_clock.cpp ├── gothic_clock.h ├── main.cpp ├── platform_depend.cpp ├── platform_depend.h ├── server_events.h ├── server_resources │ ├── bans.txt │ ├── class.json │ ├── class.xml │ ├── config.toml │ ├── moderators │ ├── permissions │ ├── scripts │ │ └── main.lua │ └── spawnpoint ├── znet │ ├── CMakeLists.txt │ └── znet_server.h └── znet_rak │ ├── CMakeLists.txt │ ├── server.cpp │ └── server.h ├── InjectMage ├── InjectMage.dll ├── InjectMage.h └── InjectMage.lib ├── LICENSES ├── Multiplayer ├── AnimMenu.txt ├── Data │ └── gmp_logo.vdf └── lang │ ├── PL.lang │ ├── de.lang │ ├── en.lang │ ├── index │ └── ru.lang ├── README.md ├── Shared ├── CMakeLists.txt ├── event.cpp ├── include │ └── shared │ │ ├── event.h │ │ ├── math.h │ │ └── toml_wrapper.h ├── math.cpp └── toml_wrapper.cpp ├── WorldBuilder ├── g2mobs.wb └── g2particles.wb ├── common ├── CMakeLists.txt ├── singleton.h └── znet │ ├── common_structs.h │ ├── net_enums.h │ └── packets.h ├── tests ├── CMakeLists.txt ├── connection_test.cpp ├── fake_client.cpp └── fake_client.h ├── thirdparty ├── BugTrap │ ├── BTAtlWindow.h │ ├── BTMfcWindow.h │ ├── BTTrace.h │ ├── BugTrap.dll │ ├── BugTrap.h │ ├── BugTrap.lib │ └── LICENSE ├── CMakeLists.txt ├── RakNet │ ├── CMakeLists.txt │ ├── LICENSE │ └── Source │ │ ├── AutopatcherPatchContext.h │ │ ├── AutopatcherRepositoryInterface.h │ │ ├── Base64Encoder.cpp │ │ ├── Base64Encoder.h │ │ ├── BitStream.cpp │ │ ├── BitStream.h │ │ ├── CCRakNetSlidingWindow.cpp │ │ ├── CCRakNetSlidingWindow.h │ │ ├── CCRakNetUDT.cpp │ │ ├── CCRakNetUDT.h │ │ ├── CMakeLists.txt │ │ ├── CheckSum.cpp │ │ ├── CheckSum.h │ │ ├── CloudClient.cpp │ │ ├── CloudClient.h │ │ ├── CloudCommon.cpp │ │ ├── CloudCommon.h │ │ ├── CloudServer.cpp │ │ ├── CloudServer.h │ │ ├── CommandParserInterface.cpp │ │ ├── CommandParserInterface.h │ │ ├── ConnectionGraph2.cpp │ │ ├── ConnectionGraph2.h │ │ ├── ConsoleServer.cpp │ │ ├── ConsoleServer.h │ │ ├── DR_SHA1.cpp │ │ ├── DR_SHA1.h │ │ ├── DS_BPlusTree.h │ │ ├── DS_BinarySearchTree.h │ │ ├── DS_BytePool.cpp │ │ ├── DS_BytePool.h │ │ ├── DS_ByteQueue.cpp │ │ ├── DS_ByteQueue.h │ │ ├── DS_Hash.h │ │ ├── DS_Heap.h │ │ ├── DS_HuffmanEncodingTree.cpp │ │ ├── DS_HuffmanEncodingTree.h │ │ ├── DS_HuffmanEncodingTreeFactory.h │ │ ├── DS_HuffmanEncodingTreeNode.h │ │ ├── DS_LinkedList.h │ │ ├── DS_List.h │ │ ├── DS_Map.h │ │ ├── DS_MemoryPool.h │ │ ├── DS_Multilist.h │ │ ├── DS_OrderedChannelHeap.h │ │ ├── DS_OrderedList.h │ │ ├── DS_Queue.h │ │ ├── DS_QueueLinkedList.h │ │ ├── DS_RangeList.h │ │ ├── DS_Table.cpp │ │ ├── DS_Table.h │ │ ├── DS_ThreadsafeAllocatingQueue.h │ │ ├── DS_Tree.h │ │ ├── DS_WeightedGraph.h │ │ ├── DataCompressor.cpp │ │ ├── DataCompressor.h │ │ ├── DirectoryDeltaTransfer.cpp │ │ ├── DirectoryDeltaTransfer.h │ │ ├── DynDNS.cpp │ │ ├── DynDNS.h │ │ ├── EmailSender.cpp │ │ ├── EmailSender.h │ │ ├── EmptyHeader.h │ │ ├── EpochTimeToString.cpp │ │ ├── EpochTimeToString.h │ │ ├── Export.h │ │ ├── FileList.cpp │ │ ├── FileList.h │ │ ├── FileListNodeContext.h │ │ ├── FileListTransfer.cpp │ │ ├── FileListTransfer.h │ │ ├── FileListTransferCBInterface.h │ │ ├── FileOperations.cpp │ │ ├── FileOperations.h │ │ ├── FormatString.cpp │ │ ├── FormatString.h │ │ ├── FullyConnectedMesh2.cpp │ │ ├── FullyConnectedMesh2.h │ │ ├── GetTime.cpp │ │ ├── GetTime.h │ │ ├── Getche.cpp │ │ ├── Getche.h │ │ ├── Gets.cpp │ │ ├── Gets.h │ │ ├── GridSectorizer.cpp │ │ ├── GridSectorizer.h │ │ ├── HTTPConnection.cpp │ │ ├── HTTPConnection.h │ │ ├── HTTPConnection2.cpp │ │ ├── HTTPConnection2.h │ │ ├── IncrementalReadInterface.cpp │ │ ├── IncrementalReadInterface.h │ │ ├── InternalPacket.h │ │ ├── Itoa.cpp │ │ ├── Itoa.h │ │ ├── Kbhit.h │ │ ├── LinuxStrings.cpp │ │ ├── LinuxStrings.h │ │ ├── LocklessTypes.cpp │ │ ├── LocklessTypes.h │ │ ├── LogCommandParser.cpp │ │ ├── LogCommandParser.h │ │ ├── MTUSize.h │ │ ├── MessageFilter.cpp │ │ ├── MessageFilter.h │ │ ├── MessageIdentifiers.h │ │ ├── NatPunchthroughClient.cpp │ │ ├── NatPunchthroughClient.h │ │ ├── NatPunchthroughServer.cpp │ │ ├── NatPunchthroughServer.h │ │ ├── NatTypeDetectionClient.cpp │ │ ├── NatTypeDetectionClient.h │ │ ├── NatTypeDetectionCommon.cpp │ │ ├── NatTypeDetectionCommon.h │ │ ├── NatTypeDetectionServer.cpp │ │ ├── NatTypeDetectionServer.h │ │ ├── NativeFeatureIncludes.h │ │ ├── NativeFeatureIncludesOverrides.h │ │ ├── NativeTypes.h │ │ ├── NetworkIDManager.cpp │ │ ├── NetworkIDManager.h │ │ ├── NetworkIDObject.cpp │ │ ├── NetworkIDObject.h │ │ ├── PS3Includes.h │ │ ├── PS4Includes.cpp │ │ ├── PS4Includes.h │ │ ├── PacketConsoleLogger.cpp │ │ ├── PacketConsoleLogger.h │ │ ├── PacketFileLogger.cpp │ │ ├── PacketFileLogger.h │ │ ├── PacketLogger.cpp │ │ ├── PacketLogger.h │ │ ├── PacketOutputWindowLogger.cpp │ │ ├── PacketOutputWindowLogger.h │ │ ├── PacketPool.h │ │ ├── PacketPriority.h │ │ ├── PacketizedTCP.cpp │ │ ├── PacketizedTCP.h │ │ ├── PluginInterface2.cpp │ │ ├── PluginInterface2.h │ │ ├── RPC4Plugin.cpp │ │ ├── RPC4Plugin.h │ │ ├── Rackspace.cpp │ │ ├── Rackspace.h │ │ ├── RakAlloca.h │ │ ├── RakAssert.h │ │ ├── RakMemoryOverride.cpp │ │ ├── RakMemoryOverride.h │ │ ├── RakNet.vcproj │ │ ├── RakNetCommandParser.cpp │ │ ├── RakNetCommandParser.h │ │ ├── RakNetDefines.h │ │ ├── RakNetDefinesOverrides.h │ │ ├── RakNetSmartPtr.h │ │ ├── RakNetSocket.cpp │ │ ├── RakNetSocket.h │ │ ├── RakNetSocket2.cpp │ │ ├── RakNetSocket2.h │ │ ├── RakNetSocket2_360_720.cpp │ │ ├── RakNetSocket2_Berkley.cpp │ │ ├── RakNetSocket2_Berkley_NativeClient.cpp │ │ ├── RakNetSocket2_NativeClient.cpp │ │ ├── RakNetSocket2_PS3_PS4.cpp │ │ ├── RakNetSocket2_PS4.cpp │ │ ├── RakNetSocket2_Vita.cpp │ │ ├── RakNetSocket2_WindowsStore8.cpp │ │ ├── RakNetSocket2_Windows_Linux.cpp │ │ ├── RakNetSocket2_Windows_Linux_360.cpp │ │ ├── RakNetStatistics.cpp │ │ ├── RakNetStatistics.h │ │ ├── RakNetTime.h │ │ ├── RakNetTransport2.cpp │ │ ├── RakNetTransport2.h │ │ ├── RakNetTypes.cpp │ │ ├── RakNetTypes.h │ │ ├── RakNetVersion.h │ │ ├── RakNet_vc8.vcproj │ │ ├── RakNet_vc9.vcproj │ │ ├── RakPeer.cpp │ │ ├── RakPeer.h │ │ ├── RakPeerInterface.h │ │ ├── RakSleep.cpp │ │ ├── RakSleep.h │ │ ├── RakString.cpp │ │ ├── RakString.h │ │ ├── RakThread.cpp │ │ ├── RakThread.h │ │ ├── RakWString.cpp │ │ ├── RakWString.h │ │ ├── Rand.cpp │ │ ├── Rand.h │ │ ├── RandSync.cpp │ │ ├── RandSync.h │ │ ├── ReadyEvent.cpp │ │ ├── ReadyEvent.h │ │ ├── RefCountedObj.h │ │ ├── RelayPlugin.cpp │ │ ├── RelayPlugin.h │ │ ├── ReliabilityLayer.cpp │ │ ├── ReliabilityLayer.h │ │ ├── ReplicaEnums.h │ │ ├── ReplicaManager3.cpp │ │ ├── ReplicaManager3.h │ │ ├── Router2.cpp │ │ ├── Router2.h │ │ ├── SecureHandshake.cpp │ │ ├── SecureHandshake.h │ │ ├── SendToThread.cpp │ │ ├── SendToThread.h │ │ ├── SignaledEvent.cpp │ │ ├── SignaledEvent.h │ │ ├── SimpleMutex.cpp │ │ ├── SimpleMutex.h │ │ ├── SimpleTCPServer.h │ │ ├── SingleProducerConsumer.h │ │ ├── SocketDefines.h │ │ ├── SocketIncludes.h │ │ ├── SocketLayer.cpp │ │ ├── SocketLayer.h │ │ ├── StatisticsHistory.cpp │ │ ├── StatisticsHistory.h │ │ ├── StringCompressor.cpp │ │ ├── StringCompressor.h │ │ ├── StringTable.cpp │ │ ├── StringTable.h │ │ ├── SuperFastHash.cpp │ │ ├── SuperFastHash.h │ │ ├── TCPInterface.cpp │ │ ├── TCPInterface.h │ │ ├── TableSerializer.cpp │ │ ├── TableSerializer.h │ │ ├── TeamBalancer.cpp │ │ ├── TeamBalancer.h │ │ ├── TeamManager.cpp │ │ ├── TeamManager.h │ │ ├── TelnetTransport.cpp │ │ ├── TelnetTransport.h │ │ ├── ThreadPool.h │ │ ├── ThreadsafePacketLogger.cpp │ │ ├── ThreadsafePacketLogger.h │ │ ├── TransportInterface.h │ │ ├── TwoWayAuthentication.cpp │ │ ├── TwoWayAuthentication.h │ │ ├── UDPForwarder.cpp │ │ ├── UDPForwarder.h │ │ ├── UDPProxyClient.cpp │ │ ├── UDPProxyClient.h │ │ ├── UDPProxyCommon.h │ │ ├── UDPProxyCoordinator.cpp │ │ ├── UDPProxyCoordinator.h │ │ ├── UDPProxyServer.cpp │ │ ├── UDPProxyServer.h │ │ ├── VariableDeltaSerializer.cpp │ │ ├── VariableDeltaSerializer.h │ │ ├── VariableListDeltaTracker.cpp │ │ ├── VariableListDeltaTracker.h │ │ ├── VariadicSQLParser.cpp │ │ ├── VariadicSQLParser.h │ │ ├── VitaIncludes.cpp │ │ ├── VitaIncludes.h │ │ ├── WSAStartupSingleton.cpp │ │ ├── WSAStartupSingleton.h │ │ ├── WindowsIncludes.h │ │ ├── XBox360Includes.h │ │ ├── _FindFirst.cpp │ │ ├── _FindFirst.h │ │ ├── gettimeofday.cpp │ │ └── gettimeofday.h ├── SDL3 │ ├── CMakeLists.txt │ ├── LICENSE.txt │ ├── VERSION │ ├── include │ │ └── SDL3 │ │ │ ├── SDL.h │ │ │ ├── SDL_assert.h │ │ │ ├── SDL_asyncio.h │ │ │ ├── SDL_atomic.h │ │ │ ├── SDL_audio.h │ │ │ ├── SDL_begin_code.h │ │ │ ├── SDL_bits.h │ │ │ ├── SDL_blendmode.h │ │ │ ├── SDL_camera.h │ │ │ ├── SDL_clipboard.h │ │ │ ├── SDL_close_code.h │ │ │ ├── SDL_copying.h │ │ │ ├── SDL_cpuinfo.h │ │ │ ├── SDL_dialog.h │ │ │ ├── SDL_egl.h │ │ │ ├── SDL_endian.h │ │ │ ├── SDL_error.h │ │ │ ├── SDL_events.h │ │ │ ├── SDL_filesystem.h │ │ │ ├── SDL_gamepad.h │ │ │ ├── SDL_gpu.h │ │ │ ├── SDL_guid.h │ │ │ ├── SDL_haptic.h │ │ │ ├── SDL_hidapi.h │ │ │ ├── SDL_hints.h │ │ │ ├── SDL_init.h │ │ │ ├── SDL_intrin.h │ │ │ ├── SDL_iostream.h │ │ │ ├── SDL_joystick.h │ │ │ ├── SDL_keyboard.h │ │ │ ├── SDL_keycode.h │ │ │ ├── SDL_loadso.h │ │ │ ├── SDL_locale.h │ │ │ ├── SDL_log.h │ │ │ ├── SDL_main.h │ │ │ ├── SDL_main_impl.h │ │ │ ├── SDL_messagebox.h │ │ │ ├── SDL_metal.h │ │ │ ├── SDL_misc.h │ │ │ ├── SDL_mouse.h │ │ │ ├── SDL_mutex.h │ │ │ ├── SDL_oldnames.h │ │ │ ├── SDL_opengl.h │ │ │ ├── SDL_opengl_glext.h │ │ │ ├── SDL_opengles.h │ │ │ ├── SDL_opengles2.h │ │ │ ├── SDL_opengles2_gl2.h │ │ │ ├── SDL_opengles2_gl2ext.h │ │ │ ├── SDL_opengles2_gl2platform.h │ │ │ ├── SDL_opengles2_khrplatform.h │ │ │ ├── SDL_pen.h │ │ │ ├── SDL_pixels.h │ │ │ ├── SDL_platform.h │ │ │ ├── SDL_platform_defines.h │ │ │ ├── SDL_power.h │ │ │ ├── SDL_process.h │ │ │ ├── SDL_properties.h │ │ │ ├── SDL_rect.h │ │ │ ├── SDL_render.h │ │ │ ├── SDL_revision.h │ │ │ ├── SDL_scancode.h │ │ │ ├── SDL_sensor.h │ │ │ ├── SDL_stdinc.h │ │ │ ├── SDL_storage.h │ │ │ ├── SDL_surface.h │ │ │ ├── SDL_system.h │ │ │ ├── SDL_test.h │ │ │ ├── SDL_test_assert.h │ │ │ ├── SDL_test_common.h │ │ │ ├── SDL_test_compare.h │ │ │ ├── SDL_test_crc32.h │ │ │ ├── SDL_test_font.h │ │ │ ├── SDL_test_fuzzer.h │ │ │ ├── SDL_test_harness.h │ │ │ ├── SDL_test_log.h │ │ │ ├── SDL_test_md5.h │ │ │ ├── SDL_test_memory.h │ │ │ ├── SDL_thread.h │ │ │ ├── SDL_time.h │ │ │ ├── SDL_timer.h │ │ │ ├── SDL_touch.h │ │ │ ├── SDL_tray.h │ │ │ ├── SDL_version.h │ │ │ ├── SDL_video.h │ │ │ └── SDL_vulkan.h │ └── lib │ │ ├── SDL3.dll │ │ └── SDL3.lib ├── chillout │ ├── .gitignore │ ├── .gitmodules │ ├── .travis.yml │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ └── src │ │ ├── chillout │ │ ├── CMakeLists.txt │ │ ├── chillout.cpp │ │ ├── chillout.h │ │ ├── common │ │ │ ├── common.cpp │ │ │ └── common.h │ │ ├── defines.h │ │ ├── posix │ │ │ ├── posixcrashhandler.cpp │ │ │ └── posixcrashhandler.h │ │ └── windows │ │ │ ├── StackWalker.cpp │ │ │ ├── StackWalker.h │ │ │ ├── windowscrashhandler.cpp │ │ │ └── windowscrashhandler.h │ │ └── tests │ │ ├── CMakeLists.txt │ │ ├── gtest_extensions.cpp │ │ ├── gtest_extensions.h │ │ ├── tests_crashes.cpp │ │ ├── tests_main.cpp │ │ ├── tests_recovery.cpp │ │ ├── tests_source.cpp │ │ └── tests_source.h ├── cpp-httplib │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── cmake │ │ └── FindBrotli.cmake │ ├── example │ │ ├── Dockerfile.hello │ │ ├── Makefile │ │ ├── benchmark.cc │ │ ├── ca-bundle.crt │ │ ├── client.cc │ │ ├── client.vcxproj │ │ ├── example.sln │ │ ├── hello.cc │ │ ├── redirect.cc │ │ ├── server.cc │ │ ├── server.vcxproj │ │ ├── simplecli.cc │ │ ├── simplesvr.cc │ │ ├── upload.cc │ │ └── uploader.sh │ ├── httplib.h │ ├── httplibConfig.cmake.in │ ├── meson.build │ ├── meson_options.txt │ ├── split.py │ └── test │ │ ├── Makefile │ │ ├── ca-bundle.crt │ │ ├── fuzzing │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── 1 │ │ │ ├── 2 │ │ │ ├── 3 │ │ │ ├── clusterfuzz-testcase-minimized-server_fuzzer-5372331946541056 │ │ │ ├── clusterfuzz-testcase-minimized-server_fuzzer-5386708825800704 │ │ │ ├── clusterfuzz-testcase-minimized-server_fuzzer-5667822731132928 │ │ │ ├── clusterfuzz-testcase-minimized-server_fuzzer-5942767436562432 │ │ │ ├── clusterfuzz-testcase-minimized-server_fuzzer-6007379124158464 │ │ │ ├── clusterfuzz-testcase-minimized-server_fuzzer-6508706672541696 │ │ │ └── issue1264 │ │ ├── server_fuzzer.cc │ │ ├── server_fuzzer.dict │ │ └── standalone_fuzz_target_runner.cpp │ │ ├── gtest │ │ ├── gtest-all.cc │ │ ├── gtest.h │ │ └── gtest_main.cc │ │ ├── image.jpg │ │ ├── include_httplib.cc │ │ ├── meson.build │ │ ├── proxy │ │ ├── Dockerfile │ │ ├── basic_passwd │ │ ├── basic_squid.conf │ │ ├── digest_passwd │ │ ├── digest_squid.conf │ │ └── docker-compose.yml │ │ ├── test.cc │ │ ├── test.conf │ │ ├── test.rootCA.conf │ │ ├── test.sln │ │ ├── test.vcxproj │ │ ├── test_proxy.cc │ │ ├── www │ │ └── dir │ │ │ ├── index.html │ │ │ ├── meson.build │ │ │ ├── test.abcde │ │ │ └── test.html │ │ ├── www2 │ │ └── dir │ │ │ ├── index.html │ │ │ ├── meson.build │ │ │ └── test.html │ │ └── www3 │ │ └── dir │ │ ├── index.html │ │ ├── meson.build │ │ └── test.html └── openal-soft │ ├── CMakeLists.txt │ ├── COPYING │ ├── README.md │ ├── VERSION │ ├── bin │ └── OpenAL32.dll │ ├── include │ └── AL │ │ ├── al.h │ │ ├── alc.h │ │ ├── alext.h │ │ ├── efx-creative.h │ │ ├── efx-presets.h │ │ └── efx.h │ └── libs │ └── OpenAL32.lib ├── triplets ├── x64-linux.cmake ├── x86-linux.cmake └── x86-windows.cmake └── vcpkg.json /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | --- 4 | Language: Cpp 5 | ColumnLimit: 150 6 | AccessModifierOffset: -2 7 | AllowShortFunctionsOnASingleLine: None 8 | AllowShortIfStatementsOnASingleLine: Never 9 | PointerAlignment: Left 10 | IndentWidth: 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.d 2 | 3 | *.slo 4 | *.lo 5 | *.o 6 | *.obj 7 | 8 | 9 | *.gch 10 | *.pch 11 | 12 | *.so 13 | *.dylib 14 | 15 | *.mod 16 | *.smod 17 | 18 | *.lai 19 | *.la 20 | *.a 21 | 22 | *.exe 23 | *.out 24 | *.app 25 | Release 26 | Debug 27 | 28 | .vscode 29 | .vs/* 30 | *.pdb 31 | *.ncb 32 | *.suo 33 | 34 | *.log -------------------------------------------------------------------------------- /GMP_Client/CActiveAniID.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #ifndef CACTIVEANIID_H 27 | #define CACTIVEANIID_H 28 | #include 29 | 30 | class CActiveAniID{ 31 | private: 32 | std::stack animation_stack; 33 | public: 34 | CActiveAniID(void); 35 | ~CActiveAniID(void); 36 | static CActiveAniID *GetInstance(); 37 | void AddAni(int id); 38 | void ValidateStack(void); 39 | int GetAniID(void); 40 | }; 41 | #endif 42 | -------------------------------------------------------------------------------- /GMP_Client/CMap.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | #include "g2Api.h" 28 | #include "singleton.h" 29 | 30 | enum CurrentMap 31 | { 32 | MNEWWORLD, 33 | MOLDWORLD, 34 | MJARKENDAR, 35 | MOLDVALLEY, 36 | MCOLONY 37 | }; 38 | 39 | class CMap : public TSingleton 40 | { 41 | private: 42 | char buffer[128]; 43 | zCView* PlayerMap; 44 | CurrentMap Map; 45 | bool watchwastrue; 46 | public: 47 | bool Opened; 48 | CMap(); 49 | ~CMap(); 50 | bool CheckMap(); 51 | void PrintMap(); 52 | void Close(); 53 | void Open(); 54 | }; -------------------------------------------------------------------------------- /GMP_Client/CObjectMenu.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | #include "WorldBuilder\load.h" 28 | 29 | class CObjectMenu 30 | { 31 | private: 32 | int PrintFrom; 33 | int PrintTo; 34 | zSTRING MenuTitle; 35 | char buffer[128]; 36 | public: 37 | int MenuPos; 38 | zMAT4 LastAngle; 39 | public: 40 | CObjectMenu(); 41 | ~CObjectMenu(); 42 | void Draw(); 43 | }; -------------------------------------------------------------------------------- /GMP_Client/CSelectClass.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | #include "CLanguage.h" 28 | #include "game_client.h" 29 | 30 | class CSelectClass{ 31 | public: 32 | CLanguage *lang; 33 | GameClient*client; 34 | CSelectClass(CLanguage *ptr, GameClient*cl); 35 | ~CSelectClass(void); 36 | static void Loop(void); 37 | void HandleInput(void); 38 | size_t GetSelected(void); 39 | bool CameraPrepared; 40 | private: 41 | void ChangeSpawnPointByClass(); 42 | void CleanUpBeforeNext();; 43 | size_t selected; 44 | }; 45 | -------------------------------------------------------------------------------- /GMP_Client/CSpawnPoint.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | #include 28 | #include "g2Api.h" 29 | 30 | using namespace std; 31 | 32 | class CSpawnPoint{ 33 | public: 34 | CSpawnPoint(const char* source); 35 | ~CSpawnPoint(void); 36 | DWORD GetSize(void); 37 | zVEC3* operator[] (size_t i); 38 | private: 39 | vector data; 40 | }; -------------------------------------------------------------------------------- /GMP_Client/ExceptionHandler.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/ExceptionHandler.cpp -------------------------------------------------------------------------------- /GMP_Client/ExceptionHandler.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | void SetupExceptionHandler(void); 29 | -------------------------------------------------------------------------------- /GMP_Client/G2W.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | 27 | //Library: Gothic 2 Wrappers 28 | //Author: Mecio 29 | // __ __ _ 30 | //| \/ | (_) 31 | //| \ / | ___ ___ _ ___ 32 | //| |\/| |/ _ \/ __| |/ _ \ 33 | //| | | | __/ (__| | (_) | 34 | //|_| |_|\___|\___|_|\___/ 35 | // 36 | //Coded for Gothic Multiplayer 37 | 38 | #pragma once 39 | 40 | #include "Font.h" 41 | #include "Button.h" 42 | #include "Table.h" 43 | -------------------------------------------------------------------------------- /GMP_Client/GMPSPlash.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | DWORD __stdcall SplashFunc(void* param); -------------------------------------------------------------------------------- /GMP_Client/HTTPDownloader.cpp: -------------------------------------------------------------------------------- 1 | #include "HTTPDownloader.h" 2 | 3 | #include 4 | 5 | using namespace std; 6 | using namespace httplib; 7 | 8 | string HTTPDownloader::GetContentOfHost(string address, string path) 9 | { 10 | Client client("http://" + address); 11 | auto response = client.Get("/" + path); 12 | return response->body; 13 | } 14 | 15 | string HTTPDownloader::GetWBFile(string serverAddress) 16 | { 17 | static const string wbFilePath = "wb_file"; 18 | return GetContentOfHost(serverAddress, wbFilePath); 19 | } 20 | 21 | string HTTPDownloader::GetClassFile(string serverAddress) 22 | { 23 | static const string classFilePath = "class"; 24 | return GetContentOfHost(serverAddress, classFilePath); 25 | } 26 | 27 | string HTTPDownloader::GetSpawnpointsFile(string serverAddress) 28 | { 29 | static const string spawnpointFilePath = "spawnpoint"; 30 | return GetContentOfHost(serverAddress, spawnpointFilePath); 31 | } -------------------------------------------------------------------------------- /GMP_Client/HTTPDownloader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace HTTPDownloader 5 | { 6 | std::string GetContentOfHost(std::string, std::string); 7 | std::string GetWBFile(std::string); 8 | std::string GetClassFile(std::string); 9 | std::string GetSpawnpointsFile(std::string); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /GMP_Client/Mod.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | #include "common.h" 29 | 30 | void Initialize(void); 31 | -------------------------------------------------------------------------------- /GMP_Client/StandardFonts.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | #include "Font.h" 29 | 30 | using namespace G2W; 31 | 32 | const Font FNT_WHITE_20(255,255,255, "FONT_OLD_20_WHITE.TGA"); 33 | const Font FNT_GREEN_20(0,255,0, "FONT_OLD_20_WHITE.TGA"); 34 | const Font FNT_WHITE_10(255,255,255, "FONT_OLD_10_WHITE.TGA"); 35 | const Font FNT_GREEN_10(0,255,0, "FONT_OLD_10_WHITE.TGA"); -------------------------------------------------------------------------------- /GMP_Client/Voice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Gothic Multiplayer Team. 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | set(SOURCES VoiceCapture.cpp VoicePlayback.cpp) 24 | 25 | add_library(Client.Voice STATIC ${SOURCES}) 26 | target_include_directories( 27 | Client.Voice 28 | PRIVATE ${OPENAL_INCLUDE_DIR}) 29 | 30 | target_link_libraries( 31 | Client.Voice 32 | PUBLIC SDL3 33 | PRIVATE spdlog::spdlog ZLIB::ZLIB) 34 | target_include_directories(Client.Voice PUBLIC .) 35 | 36 | add_subdirectory(VoiceTestApp) 37 | -------------------------------------------------------------------------------- /GMP_Client/Voice/VoiceCapture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class VoiceCapture 10 | { 11 | public: 12 | VoiceCapture(); 13 | ~VoiceCapture(); 14 | 15 | bool StartCapture(); 16 | bool GetAndFlushVoiceBuffer(char*, int&); 17 | int GetNumberOfChannels() const; 18 | 19 | std::vector GetInputDevices(); 20 | 21 | private: 22 | SDL_AudioStream* in; 23 | char* voiceBuffer; 24 | size_t voiceBufferSize; 25 | void Loop(); 26 | 27 | std::thread loopThread; 28 | }; -------------------------------------------------------------------------------- /GMP_Client/Voice/VoicePlayback.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | class VoicePlayback 8 | { 9 | public: 10 | VoicePlayback(); 11 | ~VoicePlayback(); 12 | 13 | void PlayVoice(char*, size_t); 14 | bool StartPlayback(); 15 | 16 | private: 17 | struct VoiceBuffer 18 | { 19 | char* data; 20 | size_t size; 21 | }; 22 | 23 | std::deque voiceBuffers; 24 | std::thread loopThread; 25 | 26 | SDL_AudioStream* out; 27 | 28 | void ClearBuffers(); 29 | void Loop(); 30 | }; -------------------------------------------------------------------------------- /GMP_Client/Voice/VoiceTestApp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Gothic Multiplayer Team. 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | set(SOURCES voice_test_app.cpp) 24 | 25 | add_executable(Client.Voice.TestApp ${SOURCES}) 26 | target_link_libraries(Client.Voice.TestApp PRIVATE Client.Voice SDL3) 27 | 28 | add_custom_command(TARGET Client.Voice.TestApp POST_BUILD 29 | COMMAND ${CMAKE_COMMAND} -E copy_if_different 30 | "${CMAKE_SOURCE_DIR}/thirdparty/SDL3/lib/SDL3.dll" 31 | "$/SDL3.dll" 32 | COMMENT "Copying SDL3.dll to output directory" 33 | ) -------------------------------------------------------------------------------- /GMP_Client/WorldBuilder/load.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | #include "save.h" 28 | 29 | namespace LoadWorld 30 | { 31 | void LoadWorld(const char* MapName, vector& Vobs); 32 | string GetZenName(const char* MapName); 33 | }; -------------------------------------------------------------------------------- /GMP_Client/common.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | //Wszedzie tam gdzie potrzebny windows 28 | #ifndef _WIN32_WINNT 29 | #define _WIN32_WINNT 0x0501 // Windows XP (NT 5.1) 30 | #endif 31 | 32 | #define WIN32_LEAN_AND_MEAN 33 | #include 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/docs/directx.chi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/docs/directx.chi -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/docs/directx.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/docs/directx.chm -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/inc/d3drmwin.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: d3drm.h 6 | * Content: Direct3DRM include file 7 | * 8 | ***************************************************************************/ 9 | 10 | #ifndef __D3DRMWIN_H__ 11 | #define __D3DRMWIN_H__ 12 | 13 | #ifndef WIN32 14 | #define WIN32 15 | #endif 16 | 17 | #include "d3drm.h" 18 | 19 | #include "ddraw.h" 20 | #include "d3d.h" 21 | 22 | /* 23 | * GUIDS used by Direct3DRM Windows interface 24 | */ 25 | DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); 26 | 27 | WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE); 28 | 29 | #undef INTERFACE 30 | #define INTERFACE IDirect3DRMWinDevice 31 | 32 | DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject) 33 | { 34 | IUNKNOWN_METHODS(PURE); 35 | IDIRECT3DRMOBJECT_METHODS(PURE); 36 | 37 | /* 38 | * IDirect3DRMWinDevice methods 39 | */ 40 | 41 | /* Repaint the window with the last frame which was rendered. */ 42 | STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE; 43 | 44 | /* Respond to a WM_ACTIVATE message. */ 45 | STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE; 46 | }; 47 | 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/inc/d3dx.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx.h 6 | // Content: D3DX utility library 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef __D3DX_H__ 11 | #define __D3DX_H__ 12 | 13 | #ifndef D3DXINLINE 14 | #ifdef __cplusplus 15 | #define D3DXINLINE inline 16 | #else 17 | #define D3DXINLINE _inline 18 | #endif 19 | #endif 20 | 21 | #include "d3dxcore.h" 22 | #include "d3dxmath.h" 23 | #include "d3dxshapes.h" 24 | #include "d3dxsprite.h" 25 | 26 | #endif //__D3DX_H__ 27 | -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/d3dim.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/d3dim.lib -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/d3drm.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/d3drm.lib -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/d3dx.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/d3dx.lib -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/d3dxd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/d3dxd.lib -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/d3dxof.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/d3dxof.lib -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/ddraw.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/ddraw.lib -------------------------------------------------------------------------------- /GMP_Client/dx7sdk/lib/dxguid.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/dx7sdk/lib/dxguid.lib -------------------------------------------------------------------------------- /GMP_Client/g2api/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # MIT License 3 | 4 | # Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 5 | 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | 24 | set (G2API_SOURCES 25 | ocgame.cpp 26 | ) 27 | 28 | add_library(g2api STATIC ${G2API_SOURCES}) 29 | target_include_directories(g2api PUBLIC . ${InjectMage_INCLUDE_DIR} ${DX7SDK_INCLUDE_DIR} ) -------------------------------------------------------------------------------- /GMP_Client/g2api/constants.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/g2api/constants.hpp -------------------------------------------------------------------------------- /GMP_Client/g2api/macros.hpp: -------------------------------------------------------------------------------- 1 | /*//////////////////////////////////////////////////////////////////////////// 2 | 3 | This file is part of the G2Ext SDK headers. 4 | 5 | ////////////////////////////////////////////////////////////////////////////// 6 | 7 | The G2Ext SDK headers 8 | 9 | Copyright © 2009, 2010 by Paindevs and Patrick Vogel 10 | 11 | All Rights reserved. 12 | 13 | THE WORK (AS DEFINED BELOW) IS PROVIDED 14 | UNDER THE TERMS OF THIS CREATIVE COMMONS 15 | PUBLIC LICENSE ("CCPL" OR "LICENSE"). 16 | THE WORK IS PROTECTED BY COPYRIGHT AND/OR 17 | OTHER APPLICABLE LAW. ANY USE OF THE WORK 18 | OTHER THAN AS AUTHORIZED UNDER THIS LICENSE 19 | OR COPYRIGHT LAW IS PROHIBITED. 20 | 21 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED 22 | HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE 23 | TERMS OF THIS LICENSE. TO THE EXTENT THIS 24 | LICENSE MAY BE CONSIDERED TO BE A CONTRACT, 25 | THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 26 | HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF 27 | SUCH TERMS AND CONDITIONS. 28 | 29 | Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode 30 | 31 | // Modified by Gothic Multiplayer Team (pampi, skejt23, mecio) 32 | 33 | /////////////////////////////////////////////////////////////////////////////*/ 34 | 35 | #pragma once 36 | 37 | #pragma warning(disable:4731) // -- suppress C4731:"frame pointer register 'ebp' modified by inline assembly code" 38 | 39 | // -- call macro from GothicX (thx, Zerxes!) 40 | 41 | #define XCALL(uAddr) \ 42 | __asm { mov esp, ebp } \ 43 | __asm { pop ebp } \ 44 | __asm { mov eax, uAddr } \ 45 | __asm { jmp eax } 46 | -------------------------------------------------------------------------------- /GMP_Client/g2api/ocmsg.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | class oCMsgManipulate 29 | { 30 | public: 31 | zCVob* GetVob() 32 | { 33 | return *(zCVob**)((DWORD)this+0x6C); 34 | }; 35 | }; -------------------------------------------------------------------------------- /GMP_Client/g2api/ocviewgothicprogressbar.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/g2api/ocviewgothicprogressbar.hpp -------------------------------------------------------------------------------- /GMP_Client/g2api/ocviewprogressbar.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/g2api/ocviewprogressbar.hpp -------------------------------------------------------------------------------- /GMP_Client/g2api/ocvob.hpp: -------------------------------------------------------------------------------- 1 | /*///////////////////////////////////////////////////////////////////////////// 2 | The G2Ext SDK headers 3 | Copyright (c) 2009, 2010 by Paindevs and Patrick Vogel 4 | All Rights reserved. 5 | 6 | THE WORK (AS DEFINED BELOW) IS PROVIDED 7 | UNDER THE TERMS OF THIS CREATIVE COMMONS 8 | PUBLIC LICENSE ("CCPL" OR "LICENSE"). 9 | THE WORK IS PROTECTED BY COPYRIGHT AND/OR 10 | OTHER APPLICABLE LAW. ANY USE OF THE WORK 11 | OTHER THAN AS AUTHORIZED UNDER THIS LICENSE 12 | OR COPYRIGHT LAW IS PROHIBITED. 13 | 14 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED 15 | HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE 16 | TERMS OF THIS LICENSE. TO THE EXTENT THIS 17 | LICENSE MAY BE CONSIDERED TO BE A CONTRACT, 18 | THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 19 | HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF 20 | SUCH TERMS AND CONDITIONS. 21 | 22 | Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode 23 | 24 | // Modified by Gothic Multiplayer Team (pampi, skejt23, mecio) 25 | 26 | /////////////////////////////////////////////////////////////////////////////*/ 27 | #pragma once 28 | #ifndef __API_G2_OCVOB_H__ 29 | #define __API_G2_OCVOB_H__ 30 | #include "ztypes.hpp" 31 | #include "macros.hpp" 32 | #include "zcobject.hpp" 33 | #include "zcvob.hpp" 34 | 35 | class oCVob : public zCVob 36 | { 37 | public: 38 | int GetInstance(void){XCALL(0x0077D2E0);}; 39 | static void ClearDebugList(void){XCALL(0x0077B730);}; 40 | }; 41 | #endif //__API_G2_OCVOB_H__ -------------------------------------------------------------------------------- /GMP_Client/g2api/oczone.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #ifndef __API_G2_OCZONE_HPP__ 27 | #define __API_G2_OCZONE_HPP__ 28 | 29 | class oCZoneMusic 30 | { 31 | public: 32 | int IsEnabled(void){XCALL(0x00641090)}; 33 | void SetEnabled(int){XCALL(0x00641080)}; 34 | inline static oCZoneMusic* GetMusicZone() { return *(oCZoneMusic**)0x009A4A24; }; 35 | }; 36 | 37 | #endif -------------------------------------------------------------------------------- /GMP_Client/g2api/osheader.hpp: -------------------------------------------------------------------------------- 1 | /*//////////////////////////////////////////////////////////////////////////// 2 | 3 | This file is part of the G2Ext SDK headers. 4 | 5 | ////////////////////////////////////////////////////////////////////////////// 6 | 7 | The G2Ext SDK headers 8 | 9 | Copyright © 2009, 2010 by Paindevs and Patrick Vogel 10 | 11 | All Rights reserved. 12 | 13 | THE WORK (AS DEFINED BELOW) IS PROVIDED 14 | UNDER THE TERMS OF THIS CREATIVE COMMONS 15 | PUBLIC LICENSE ("CCPL" OR "LICENSE"). 16 | THE WORK IS PROTECTED BY COPYRIGHT AND/OR 17 | OTHER APPLICABLE LAW. ANY USE OF THE WORK 18 | OTHER THAN AS AUTHORIZED UNDER THIS LICENSE 19 | OR COPYRIGHT LAW IS PROHIBITED. 20 | 21 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED 22 | HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE 23 | TERMS OF THIS LICENSE. TO THE EXTENT THIS 24 | LICENSE MAY BE CONSIDERED TO BE A CONTRACT, 25 | THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 26 | HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF 27 | SUCH TERMS AND CONDITIONS. 28 | 29 | Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode 30 | 31 | // Modified by Gothic Multiplayer Team (pampi, skejt23, mecio) 32 | 33 | /////////////////////////////////////////////////////////////////////////////*/ 34 | 35 | #pragma once 36 | 37 | #if _WIN32_WINNT < 0x0501 38 | #define _WIN32_WINNT 0x0501 // -- keep WinAPI compatibility with min. Windows XP (NT 5.1) 39 | #endif 40 | 41 | #define WIN32_LEAN_AND_MEAN 42 | #include 43 | 44 | #define OBJ_DELETE( obj ) if (obj != NULL){delete obj;obj = NULL;} 45 | 46 | -------------------------------------------------------------------------------- /GMP_Client/g2api/utils.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void *DisMember(size_t size, ...) 4 | { 5 | if (size != sizeof(void *)) 6 | return nullptr; 7 | va_list args; 8 | va_start(args, size); 9 | void *res = va_arg(args, void *); 10 | va_end(args); 11 | return res; 12 | } -------------------------------------------------------------------------------- /GMP_Client/g2api/zCCsPlayer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | 27 | #ifndef _ZCCSPLAYER_H 28 | #define _ZCCSPLAYER_H 29 | 30 | #include "macros.hpp" 31 | 32 | class zCCSCutsceneContext; 33 | 34 | class zCCSPlayer 35 | { 36 | public: 37 | zCCSCutsceneContext* GetPlayingGlobalCutscene(void){XCALL(0x00420770);}; 38 | }; 39 | 40 | #endif -------------------------------------------------------------------------------- /GMP_Client/g2api/zCQuat.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** ** 3 | ** Gothic Multiplayer Team. ** 4 | ** ** 5 | ** Copyright (C) 2012 - All Rights Reserved ** 6 | ** ** 7 | ****************************************************************************** 8 | ** ** 9 | ** PROJECT: Gothic Multiplayer ** 10 | ** ** 11 | ** FILE: ZenGin\Types\zCQuat.h ** 12 | ** ** 13 | ** CREATED: 27/05/12 ** 14 | ** ** 15 | ** DEVELOPERS: skejt23(skejt23@gmail.com) ** 16 | ** Pampi ** 17 | ** ** 18 | *****************************************************************************/ 19 | 20 | #pragma warning (disable : 4244) 21 | 22 | #ifndef _ZCQUAT_H 23 | #define _ZCQUAT_H 24 | 25 | #include 26 | #include "ztypes.hpp" 27 | 28 | // Gothic Quaternion Class 29 | class zCQuat 30 | { 31 | public: 32 | union { 33 | struct { 34 | zVEC3 v; 35 | float s; 36 | }; 37 | struct { float element[4]; }; 38 | }; 39 | public: 40 | zCQuat(){}; 41 | zCQuat(float real, float x, float y, float z): s(real), v(x,y,z) {} 42 | zCQuat(float real, const zVEC3 & i): s(real), v(i) {} 43 | 44 | void Matrix4ToQuat(const zMAT4 & matrix){XCALL(0x00518560);}; 45 | void QuatToMatrix4(const zMAT4 & matrix){XCALL(0x00518360);}; 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /GMP_Client/g2api/zcarchiverfactory.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | // 8th of may 2011, skejt23 28 | 29 | #ifndef __API_G2_ZCARCHIVERFACTORY_H__ 30 | #define __API_G2_ZCARCHIVERFACTORY_H__ 31 | 32 | #include "zcarchiver.hpp" 33 | 34 | class zCArchiverFactory 35 | { 36 | public: 37 | zCArchiver* CreateArchiverRead(const zSTRING & pA, int){XCALL(0x0051A120);}; 38 | inline static zCArchiverFactory* GetFactory(void) { return *(zCArchiverFactory**)0x008D472C; }; 39 | }; 40 | 41 | #endif -------------------------------------------------------------------------------- /GMP_Client/g2api/zcbuffer.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | // 8th of may 2011, skejt23 28 | 29 | #ifndef __API_G2_ZCBUFFER_H__ 30 | #define __API_G2_ZCBUFFER_H__ 31 | 32 | class zCBuffer 33 | { 34 | public: 35 | long GetSize(void){XCALL(0x004416A0);}; 36 | }; 37 | 38 | #endif -------------------------------------------------------------------------------- /GMP_Client/g2api/zcclassdef.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | class zCClassDef; 29 | 30 | // CLASS DEFINITIONS 31 | #define zCSkyControler_OutdoorDef *(zCClassDef**)(0x0099ACD8) 32 | #define oCMsgMovement_classDef *(zCClassDef**)(0x00AB2C50) 33 | 34 | class zCClassDef 35 | { 36 | public: 37 | static void ObjectCreated(DWORD OBJPTR, DWORD CLASSDEF){ 38 | DWORD OBJCREATED = 0x005AAEB0; 39 | __asm 40 | { 41 | push CLASSDEF 42 | push OBJPTR 43 | call OBJCREATED 44 | } 45 | } 46 | }; -------------------------------------------------------------------------------- /GMP_Client/g2api/zcconsole.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/g2api/zcconsole.hpp -------------------------------------------------------------------------------- /GMP_Client/g2api/zcmesh.hpp: -------------------------------------------------------------------------------- 1 | /*//////////////////////////////////////////////////////////////////////////// 2 | 3 | This file is part of the G2Ext SDK headers. 4 | 5 | ////////////////////////////////////////////////////////////////////////////// 6 | 7 | The G2Ext SDK headers 8 | 9 | Copyright © 2009, 2010 by Paindevs and Patrick Vogel 10 | 11 | All Rights reserved. 12 | 13 | THE WORK (AS DEFINED BELOW) IS PROVIDED 14 | UNDER THE TERMS OF THIS CREATIVE COMMONS 15 | PUBLIC LICENSE ("CCPL" OR "LICENSE"). 16 | THE WORK IS PROTECTED BY COPYRIGHT AND/OR 17 | OTHER APPLICABLE LAW. ANY USE OF THE WORK 18 | OTHER THAN AS AUTHORIZED UNDER THIS LICENSE 19 | OR COPYRIGHT LAW IS PROHIBITED. 20 | 21 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED 22 | HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE 23 | TERMS OF THIS LICENSE. TO THE EXTENT THIS 24 | LICENSE MAY BE CONSIDERED TO BE A CONTRACT, 25 | THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 26 | HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF 27 | SUCH TERMS AND CONDITIONS. 28 | 29 | Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode 30 | 31 | // Modified by Gothic Multiplayer Team (pampi, skejt23, mecio) 32 | 33 | /////////////////////////////////////////////////////////////////////////////*/ 34 | 35 | #pragma once 36 | 37 | #include "ztypes.h" 38 | #include "macros.h" 39 | 40 | class zCVisual; 41 | 42 | class zCMesh : public zCVisual 43 | { 44 | private: 45 | char m_data[87]; 46 | public: 47 | static zCMesh* Load(const zSTRING& pA, int pB){XCALL(0x00567600);}; 48 | }; 49 | -------------------------------------------------------------------------------- /GMP_Client/g2api/zcmover.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | struct zTMov_Keyframe 29 | { 30 | }; 31 | 32 | class zCMover : public zCVob 33 | { 34 | public: 35 | void TriggerMover(zCVob*){XCALL(0x00612CB0);}; 36 | }; -------------------------------------------------------------------------------- /GMP_Client/g2api/zctexture.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | // skejt23, 5th of June, 2011 28 | 29 | class zCMaterial 30 | { 31 | public: 32 | void SetTexture(const zSTRING& TextureName){XCALL(0x005649E0);}; 33 | }; 34 | 35 | class zCTexture 36 | { 37 | public: 38 | void GetPixelSize(int & x, int & y){XCALL(0x005F7C10);}; 39 | }; -------------------------------------------------------------------------------- /GMP_Client/g2api/zctimer.hpp: -------------------------------------------------------------------------------- 1 | /*//////////////////////////////////////////////////////////////////////////// 2 | 3 | This file is part of the G2Ext SDK headers. 4 | 5 | ////////////////////////////////////////////////////////////////////////////// 6 | 7 | The G2Ext SDK headers 8 | 9 | Copyright © 2009, 2010 by Paindevs and Patrick Vogel 10 | 11 | All Rights reserved. 12 | 13 | THE WORK (AS DEFINED BELOW) IS PROVIDED 14 | UNDER THE TERMS OF THIS CREATIVE COMMONS 15 | PUBLIC LICENSE ("CCPL" OR "LICENSE"). 16 | THE WORK IS PROTECTED BY COPYRIGHT AND/OR 17 | OTHER APPLICABLE LAW. ANY USE OF THE WORK 18 | OTHER THAN AS AUTHORIZED UNDER THIS LICENSE 19 | OR COPYRIGHT LAW IS PROHIBITED. 20 | 21 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED 22 | HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE 23 | TERMS OF THIS LICENSE. TO THE EXTENT THIS 24 | LICENSE MAY BE CONSIDERED TO BE A CONTRACT, 25 | THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 26 | HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF 27 | SUCH TERMS AND CONDITIONS. 28 | 29 | Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode 30 | 31 | // Modified by Gothic Multiplayer Team (pampi, skejt23, mecio) 32 | 33 | /////////////////////////////////////////////////////////////////////////////*/ 34 | 35 | #pragma once 36 | 37 | #include "ztypes.hpp" 38 | #include "macros.hpp" 39 | 40 | class zCTimer 41 | { 42 | public: 43 | void SetMotionFactor(float p1){XCALL(0x006370B0);}; 44 | static float GetMotionFactor(){return *(float*)0x0099B3D4;}; 45 | static zCTimer* GetTimer(){return (zCTimer*)0x0099B3D4;}; 46 | }; 47 | -------------------------------------------------------------------------------- /GMP_Client/g2api/zcvisual.hpp: -------------------------------------------------------------------------------- 1 | /*//////////////////////////////////////////////////////////////////////////// 2 | 3 | This file is part of the G2Ext SDK headers. 4 | 5 | ////////////////////////////////////////////////////////////////////////////// 6 | 7 | The G2Ext SDK headers 8 | 9 | Copyright © 2009, 2010 by Paindevs and Patrick Vogel 10 | 11 | All Rights reserved. 12 | 13 | THE WORK (AS DEFINED BELOW) IS PROVIDED 14 | UNDER THE TERMS OF THIS CREATIVE COMMONS 15 | PUBLIC LICENSE ("CCPL" OR "LICENSE"). 16 | THE WORK IS PROTECTED BY COPYRIGHT AND/OR 17 | OTHER APPLICABLE LAW. ANY USE OF THE WORK 18 | OTHER THAN AS AUTHORIZED UNDER THIS LICENSE 19 | OR COPYRIGHT LAW IS PROHIBITED. 20 | 21 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED 22 | HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE 23 | TERMS OF THIS LICENSE. TO THE EXTENT THIS 24 | LICENSE MAY BE CONSIDERED TO BE A CONTRACT, 25 | THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED 26 | HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF 27 | SUCH TERMS AND CONDITIONS. 28 | 29 | Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode 30 | 31 | // Modified by Gothic Multiplayer Team (pampi, skejt23, mecio) 32 | 33 | /////////////////////////////////////////////////////////////////////////////*/ 34 | 35 | #pragma once 36 | #include "ztypes.hpp" 37 | #include "macros.hpp" 38 | 39 | class zCVisual : public zCObject 40 | { 41 | private: 42 | char m_data[16]; 43 | public: 44 | static zCVisual* LoadVisual(const zSTRING& file){XCALL(0x00606AD0);}; 45 | }; 46 | -------------------------------------------------------------------------------- /GMP_Client/g2api/zcwaynet.hpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | 29 | class zCWaypoint; 30 | class zCWayNet : public zCObject 31 | { 32 | public: 33 | zCWaypoint* GetNearestWaypoint(const zVEC3 & pos){XCALL(0x007AD660)}; 34 | zCWaypoint* HasWaypoint(zVEC3 & pos){XCALL(0x007ACFA0)}; 35 | }; 36 | 37 | class zCWaypoint : public zCObject 38 | { 39 | public: 40 | void SetName(zSTRING & Name){XCALL(0x007AFBB0)}; 41 | zSTRING& GetName(void){XCALL(0x007AFD10)}; 42 | }; -------------------------------------------------------------------------------- /GMP_Client/keyboard.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | #include "g2Api.h" 29 | 30 | namespace GInput 31 | { 32 | char GetCharacterFormKeyboard(bool ignorekeyboardlayout = false); //false - cyrillic 33 | char GetNumberCharacterFromKeyboard(); 34 | } 35 | -------------------------------------------------------------------------------- /GMP_Client/res/cws.rgn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/res/cws.rgn -------------------------------------------------------------------------------- /GMP_Client/res/logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Client/res/logo.bmp -------------------------------------------------------------------------------- /GMP_Client/resource.rc: -------------------------------------------------------------------------------- 1 | RANGE RGN "res\\cws.rgn" 2 | 1000 BITMAP "res\\logo.bmp" -------------------------------------------------------------------------------- /GMP_Client/zNet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # MIT License 3 | 4 | # Copyright (c) 2022 Gothic Multiplayer Team. 5 | 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | 24 | 25 | add_library(zNetInterface INTERFACE) 26 | target_include_directories(zNetInterface INTERFACE .) 27 | target_link_libraries(zNetInterface INTERFACE common) -------------------------------------------------------------------------------- /GMP_Client/znet_rak/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # MIT License 3 | 4 | # Copyright (c) 2022 Gothic Multiplayer Team. 5 | 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | 24 | set (ZRAKNET_SOURCES 25 | client.cpp 26 | ) 27 | 28 | add_library(znet SHARED ${ZRAKNET_SOURCES}) 29 | target_link_libraries(znet PRIVATE RakNet spdlog::spdlog zNetInterface wsock32 ws2_32 Iphlpapi) -------------------------------------------------------------------------------- /GMP_Serv/HTTPServer.cpp: -------------------------------------------------------------------------------- 1 | #include "HTTPServer.h" 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | using namespace httplib; 10 | 11 | HTTPServer::HTTPServer() { 12 | } 13 | 14 | HTTPServer::~HTTPServer() { 15 | server.stop(); 16 | } 17 | 18 | void HTTPServer::Start(int port) { 19 | server.Get("/wb_file", [](const Request& req, Response& res) { 20 | ifstream file("world.wbm", ios::binary | ios::in); 21 | if (!file.is_open()) { 22 | res.set_content("EMPTY", "text/plain"); 23 | return; 24 | } 25 | stringstream buffer; 26 | buffer << file.rdbuf(); 27 | res.set_content(buffer.str(), "text/plain"); 28 | }); 29 | 30 | server.Get("/class", [](const Request& req, Response& res) { 31 | ifstream file("class.xml"); 32 | if (!file.is_open()) { 33 | res.set_content("EMPTY", "text/plain"); 34 | return; 35 | } 36 | stringstream buffer; 37 | buffer << file.rdbuf(); 38 | res.set_content(buffer.str(), "text/plain"); 39 | }); 40 | 41 | server.Get("/spawnpoint", [](const Request& req, Response& res) { 42 | ifstream file("spawnpoint"); 43 | if (!file.is_open()) { 44 | res.set_content("EMPTY", "text/plain"); 45 | return; 46 | } 47 | stringstream buffer; 48 | buffer << file.rdbuf(); 49 | res.set_content(buffer.str(), "text/plain"); 50 | }); 51 | 52 | http_thread_future_ = std::async([this, port] { 53 | bool result = server.listen("0.0.0.0", port + 1); 54 | if (!result) { 55 | SPDLOG_ERROR("File server cannot start"); 56 | } 57 | }); 58 | } -------------------------------------------------------------------------------- /GMP_Serv/HTTPServer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | class HTTPServer { 6 | private: 7 | int port; 8 | httplib::Server server; 9 | std::future http_thread_future_; 10 | 11 | public: 12 | HTTPServer(); 13 | ~HTTPServer(); 14 | 15 | void Start(int); 16 | }; 17 | -------------------------------------------------------------------------------- /GMP_Serv/Lua/event_bind.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "sol/sol.hpp" 27 | 28 | namespace lua { 29 | namespace bindings { 30 | void BindEvents(sol::state&); 31 | } 32 | } // namespace lua -------------------------------------------------------------------------------- /GMP_Serv/Lua/function_bind.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | */ 23 | 24 | #include "function_bind.h" 25 | 26 | #include 27 | 28 | #include 29 | using namespace std; 30 | 31 | // Functions 32 | int Function_Log(string name, string text) { 33 | ofstream logfile; 34 | logfile.open(name, std::ios_base::app); 35 | if (logfile.is_open()) { 36 | logfile << text << "\n"; 37 | logfile.close(); 38 | } 39 | return 0; 40 | } 41 | 42 | // Register Functions 43 | void lua::bindings::BindFunctions(sol::state& lua) { 44 | lua["Log"] = Function_Log; 45 | } -------------------------------------------------------------------------------- /GMP_Serv/Lua/function_bind.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "sol/sol.hpp" 27 | 28 | namespace lua { 29 | namespace bindings { 30 | void BindFunctions(sol::state&); 31 | } 32 | } // namespace lua -------------------------------------------------------------------------------- /GMP_Serv/Lua/spdlog_bind.cpp: -------------------------------------------------------------------------------- 1 | #include "spdlog_bind.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "shared/event.h" 7 | 8 | namespace lua { 9 | namespace bindings { 10 | 11 | template 12 | void log(std::string text, sol::variadic_args args) { 13 | auto store = fmt::dynamic_format_arg_store(); 14 | for (const auto& arg : args) { 15 | if (arg.get_type() == sol::type::string) { 16 | store.push_back(arg.as()); 17 | } else if (arg.get_type() == sol::type::number) { 18 | store.push_back(arg.as()); 19 | } else if (arg.get_type() == sol::type::boolean) { 20 | store.push_back(arg.as()); 21 | } else if (arg.get_type() == sol::type::userdata) { 22 | store.push_back(arg.as()); 23 | } else { 24 | store.push_back(arg.as()); 25 | } 26 | } 27 | logFunc(fmt::vformat(text, store)); 28 | } 29 | 30 | void Bind_spdlog(sol::state& lua) { 31 | lua["LOG_ERROR"] = log; 32 | lua["LOG_INFO"] = log; 33 | lua["LOG_DEBUG"] = log; 34 | lua["LOG_CRITICAL"] = log; 35 | lua["LOG_WARN"] = log; 36 | lua["LOG_TRACE"] = log; 37 | } 38 | 39 | } // namespace bindings 40 | } // namespace lua -------------------------------------------------------------------------------- /GMP_Serv/Lua/spdlog_bind.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "sol/sol.hpp" 4 | 5 | namespace lua { 6 | namespace bindings { 7 | void Bind_spdlog(sol::state&); 8 | } 9 | } // namespace lua -------------------------------------------------------------------------------- /GMP_Serv/Script.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include "sol/sol.hpp" 5 | class Script { 6 | private: 7 | sol::state lua; 8 | 9 | public: 10 | Script(std::vector); 11 | ~Script(); 12 | 13 | private: 14 | void Init(); 15 | void BindFunctionsAndVariables(); 16 | void LoadScripts(std::vector); 17 | void LoadScript(std::string); 18 | }; -------------------------------------------------------------------------------- /GMP_Serv/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "game_server.h" 34 | 35 | int main(int argc, char **argv) { 36 | srand(static_cast(time(NULL))); 37 | 38 | GameServer serv; 39 | if (!serv.Init()) { 40 | SPDLOG_ERROR("Server initialization failed!"); 41 | return 1; 42 | } 43 | while (true) { 44 | std::this_thread::sleep_for(std::chrono::seconds(1)); 45 | } 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /GMP_Serv/platform_depend.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | #ifndef WIN32 29 | namespace System { 30 | void MakeMeDaemon(bool stdout); 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /GMP_Serv/server_resources/bans.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/GMP_Serv/server_resources/bans.txt -------------------------------------------------------------------------------- /GMP_Serv/server_resources/config.toml: -------------------------------------------------------------------------------- 1 | name = "Gothic Multiplayer Server" 2 | port = 57005 3 | map = "NEWWORLD\\NEWWORLD.ZEN" 4 | slots = 23 5 | game_time.day = 1 6 | game_time.hour = 13 7 | game_time.min = 23 8 | allow_modification = true 9 | message_of_the_day = "Welcome to my server!" 10 | log_to_stdout = true 11 | log_level = "trace" 12 | scripts = ["main.lua"] 13 | character_definitions_file = "class.json" -------------------------------------------------------------------------------- /GMP_Serv/server_resources/moderators: -------------------------------------------------------------------------------- 1 | #moderator list 2 | #nickname first letter cannot be # 3 | #nickname and password cannot contain spaces 4 | #example: nickname password 5 | pampi test 6 | topolas espazma_hej_topolas 7 | skejt test2 -------------------------------------------------------------------------------- /GMP_Serv/server_resources/permissions: -------------------------------------------------------------------------------- 1 | #permissions for moderators 2 | #1-can; 0-cannot 3 | say 1 4 | kick 1 5 | ban 1 6 | banip 0 7 | unban 0 8 | savebans 0 9 | mute 0 10 | settime 0 -------------------------------------------------------------------------------- /GMP_Serv/server_resources/scripts/main.lua: -------------------------------------------------------------------------------- 1 | print('Hello GMP') 2 | 3 | -- Test logging functions 4 | LOG_WARN("Easy padding in numbers like {:08d}", 12); 5 | LOG_CRITICAL("Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}", 42); 6 | LOG_INFO("Positional args are {1} {0}..", "too", "supported"); 7 | LOG_INFO("{:>8} aligned, {:<8} aligned", "right", "left"); 8 | 9 | addEventHandler('onClockUpdate', function(day, hour, minute) 10 | print("Server clock has been updated. Day " .. day .. " Hour " .. hour .. " Minute " .. minute .. ".") 11 | end) 12 | 13 | addEventHandler('onPlayerConnect', function(id) 14 | print("Player " .. id .. " has connected.") 15 | end) -------------------------------------------------------------------------------- /GMP_Serv/server_resources/spawnpoint: -------------------------------------------------------------------------------- 1 | 0 0 0 2 | 1 1 1 3 | -------------------------------------------------------------------------------- /GMP_Serv/znet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Gothic Multiplayer Team. 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | add_library(zNetServerInterface INTERFACE) 24 | target_include_directories(zNetServerInterface INTERFACE .) 25 | target_link_libraries(zNetServerInterface INTERFACE common) 26 | -------------------------------------------------------------------------------- /GMP_Serv/znet_rak/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Gothic Multiplayer Team. 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | set(ZRAKNET_SOURCES server.cpp) 24 | 25 | add_library(znet_server SHARED ${ZRAKNET_SOURCES}) 26 | target_link_libraries(znet_server PRIVATE RakNet spdlog::spdlog 27 | zNetServerInterface) 28 | -------------------------------------------------------------------------------- /InjectMage/InjectMage.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/InjectMage/InjectMage.dll -------------------------------------------------------------------------------- /InjectMage/InjectMage.h: -------------------------------------------------------------------------------- 1 | /* 2 | LIBRARY InjectMage 3 | AUTHOR Mecio 4 | CopyRight 2010-2011 5 | All Rights Reserved 6 | */ 7 | 8 | #ifndef IMPORT 9 | #define IMPORT __declspec(dllimport) 10 | #endif 11 | 12 | #ifndef INJECTMAGE_INCLUDED 13 | #define INJECTMAGE_INCLUDED 14 | 15 | typedef unsigned char BYTE; 16 | typedef BYTE * PBYTE; 17 | typedef unsigned long DWORD; 18 | typedef void* LPVOID; 19 | 20 | 21 | struct sRegs 22 | { 23 | int EDI, 24 | ESI, 25 | EBP, 26 | ESP, 27 | EBX, 28 | EDX, 29 | ECX, 30 | EAX; 31 | }; 32 | 33 | 34 | void IMPORT WriteMemory(DWORD dwAddress, PBYTE pbBytes, DWORD dwLength); 35 | void IMPORT EraseMemory(DWORD dwAddress, BYTE bValue, DWORD dwLength); 36 | void IMPORT JmpPatch(DWORD dwAddress, DWORD dwDest); 37 | void IMPORT CallPatch(DWORD dwAddress, DWORD dwDest, int nNops); 38 | bool IMPORT CreateHook(DWORD destination, DWORD callback, BYTE ParamCount, bool Registers); 39 | 40 | #endif 41 | 42 | 43 | -------------------------------------------------------------------------------- /InjectMage/InjectMage.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/InjectMage/InjectMage.lib -------------------------------------------------------------------------------- /Multiplayer/AnimMenu.txt: -------------------------------------------------------------------------------- 1 | Sit S_SIT T_STAND_2_SIT T_SIT_2_STAND 2 | Piss S_PEE T_STAND_2_PEE T_PEE_2_STAND 3 | Guard S_HGUARD T_STAND_2_HGUARD T_HGUARD_2_STAND 4 | Wash S_WASH T_STAND_2_WASH T_WASH_2_STAND 5 | Pray S_PRAY T_STAND_2_PRAY T_PRAY_2_STAND 6 | Magic T_PRACTICEMAGIC3 7 | Magic2 T_PRACTICEMAGIC4 8 | Magic3 T_PRACTICEMAGIC2 9 | Dance T_DANCE_05 10 | WatchFight S_WATCHFIGHT T_STAND_2_WATCHFIGHT T_WATCHFIGHT_2_STAND 11 | Cello S_CELLO_S0 T_CELLO_STAND_2_S0 T_CELLO_S0_2_STAND 12 | Drumscheit S_DRUMSCHEIT_S0 T_DRUMSCHEIT_STAND_2_S0 T_DRUMSCHEIT_S0_2_STAND 13 | Dudel S_DUDEL_S0 T_DUDEL_STAND_2_S0 T_DUDEL_S0_2_STAND 14 | Harfe S_HARFE_S0 T_HARFE_STAND_2_S0 T_HARFE_S0_2_STAND 15 | Ielaute S_IELAUTE_S0 T_IELAUTE_STAND_2_S0 T_IELAUTE_S0_2_STAND 16 | Drums S_PAUKE_S0 T_PAUKE_STAND_2_S0 T_PAUKE_S0_2_STAND 17 | Plunder T_PLUNDER 18 | Kick T_BORINGKICK -------------------------------------------------------------------------------- /Multiplayer/Data/gmp_logo.vdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/Multiplayer/Data/gmp_logo.vdf -------------------------------------------------------------------------------- /Multiplayer/lang/PL.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/Multiplayer/lang/PL.lang -------------------------------------------------------------------------------- /Multiplayer/lang/de.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/Multiplayer/lang/de.lang -------------------------------------------------------------------------------- /Multiplayer/lang/index: -------------------------------------------------------------------------------- 1 | en.lang 2 | PL.lang 3 | de.lang 4 | ru.lang 5 | -------------------------------------------------------------------------------- /Multiplayer/lang/ru.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/Multiplayer/lang/ru.lang -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gothic Multiplayer (2011 version) 2 | The source code of Gothic Multiplayer that was first released in January 2011. 3 | This version of the code is probably the latest one (late 2011/early 2012), and it may contain changes that were not released at that time to players. 4 | It's worth noting that this is not the version shown later (codename "red") with scripting capabilities. 5 | 6 | The code is ~10 years old and belongs in a museum or on a comedy show (due to its exquisite quality :-)). 7 | I'm posting it here more as a curiosity than something usable. 8 | 9 | # How to build 10 | ## Prerequisites 11 | * vcpkg - Gothic Multiplayer build system uses vcpkg dependency manager, follow the instructions from https://vcpkg.io/en/getting-started.html to install vcpkg. 12 | * git bash - If you're on Windows, git bash is recommended to execute the commands from below. 13 | * cmake (https://cmake.org/) 14 | ## Instructions 15 | Set environment variable VCPKG_ROOT to root directory of vcpkg. 16 | ```bash 17 | git clone https://github.com/Pinemarten/GothicMultiplayer2011.git 18 | cd GothicMultiplayer2011 19 | mkdir build 20 | cd build 21 | cmake .. -A WIN32 22 | cmake --build . --config RelWithDebInfo 23 | ``` 24 | 25 | 26 | If you want to run this, you need to figure it out yourself. 27 | 28 | # Credits 29 | G2ext headers - Paindevs and Patrick Vogel (see https://github.com/DaDummy/g2ext) 30 | Gothic Multiplayer Server/Client/Starter - Gothic Multiplayer Team (pampi, skejt23, mecio) 31 | -------------------------------------------------------------------------------- /Shared/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | find_package(toml11 CONFIG REQUIRED) 24 | 25 | set(SHARED_SOURCES toml_wrapper.cpp event.cpp math.cpp) 26 | 27 | add_library(SharedLib STATIC ${SHARED_SOURCES}) 28 | target_link_libraries(SharedLib PUBLIC common toml11::toml11 glm::glm) 29 | target_include_directories(SharedLib PUBLIC include) 30 | -------------------------------------------------------------------------------- /Shared/include/shared/math.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2023 Gothic Multiplayer Team. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #pragma once 27 | 28 | #include 29 | 30 | /** 31 | * @brief Checks if two positions are within a given radius. 32 | * @param pos1 The first position. 33 | * @param pos2 The second position. 34 | * @param radiusSquared The squared radius. 35 | * @return True if the two positions are within the given radius, false otherwise. 36 | */ 37 | bool IsWithinRadius(const glm::vec3& pos1, const glm::vec3& pos2, double radiusSquared); -------------------------------------------------------------------------------- /Shared/math.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2023 Gothic Multiplayer Team. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #include "shared/math.h" 27 | 28 | bool IsWithinRadius(const glm::vec3& pos1, const glm::vec3& pos2, double radiusSquared) { 29 | double x1 = static_cast(pos1[0] - pos2[0]); 30 | double y1 = static_cast(pos1[1] - pos2[1]); 31 | double rp = x1 * x1 + y1 * y1; 32 | return rp < radiusSquared; 33 | } -------------------------------------------------------------------------------- /Shared/toml_wrapper.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | MIT License 4 | 5 | Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | */ 25 | 26 | #include "shared/toml_wrapper.h" 27 | 28 | #include 29 | #include 30 | 31 | TomlWrapper TomlWrapper::CreateFromFile(std::string_view file_path) { 32 | TomlWrapper val; 33 | val.data_ = toml::parse(std::string(file_path)); 34 | return val; 35 | } 36 | 37 | void TomlWrapper::Serialize(std::string_view file_path) const { 38 | if (!data_.is_empty()) { 39 | std::ofstream ofs(std::string(file_path), std::ios_base::out); 40 | ofs << data_; 41 | } 42 | } -------------------------------------------------------------------------------- /common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # MIT License 3 | 4 | # Copyright (c) 2022 Gothic Multiplayer Team (pampi, skejt23, mecio) 5 | 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | 24 | 25 | add_library(common INTERFACE) 26 | target_include_directories(common INTERFACE . znet) 27 | target_link_libraries(common INTERFACE glm::glm) 28 | -------------------------------------------------------------------------------- /thirdparty/BugTrap/BugTrap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/BugTrap/BugTrap.dll -------------------------------------------------------------------------------- /thirdparty/BugTrap/BugTrap.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/BugTrap/BugTrap.lib -------------------------------------------------------------------------------- /thirdparty/BugTrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2005, IntelleSoft, Maksim Pyatkovskiy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to 7 | deal in the Software without restriction, including without limitation the 8 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | sell copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /thirdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Gothic Multiplayer Team 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | add_subdirectory(cpp-httplib) 24 | add_subdirectory(RakNet) 25 | add_subdirectory(chillout) 26 | 27 | if(WIN32) 28 | add_subdirectory(openal-soft) 29 | add_subdirectory(SDL3) 30 | endif() 31 | -------------------------------------------------------------------------------- /thirdparty/RakNet/LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | For RakNet software 3 | 4 | Copyright (c) 2014, Oculus VR, Inc. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 18 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 22 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/AutopatcherPatchContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __AUTOPATCHER_PATCH_CONTEXT_H 12 | #define __AUTOPATCHER_PATCH_CONTEXT_H 13 | 14 | enum PatchContext 15 | { 16 | PC_HASH_1_WITH_PATCH, 17 | PC_HASH_2_WITH_PATCH, 18 | PC_WRITE_FILE, 19 | PC_ERROR_FILE_WRITE_FAILURE, 20 | PC_ERROR_PATCH_TARGET_MISSING, 21 | PC_ERROR_PATCH_APPLICATION_FAILURE, 22 | PC_ERROR_PATCH_RESULT_CHECKSUM_FAILURE, 23 | PC_NOTICE_WILL_COPY_ON_RESTART, 24 | PC_NOTICE_FILE_DOWNLOADED, 25 | PC_NOTICE_FILE_DOWNLOADED_PATCH, 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Base64Encoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __BASE_64_ENCODER_H 12 | #define __BASE_64_ENCODER_H 13 | 14 | #include "Export.h" 15 | 16 | extern "C" { 17 | /// \brief Returns how many bytes were written. 18 | // outputData should be at least the size of inputData * 2 + 6 19 | int Base64Encoding(const unsigned char *inputData, int dataLength, char *outputData); 20 | } 21 | 22 | extern "C" { 23 | const char *Base64Map(void); 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/CheckSum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// 12 | /// \file CheckSum.cpp 13 | /// \brief [Internal] CheckSum implementation from http://www.flounder.com/checksum.htm 14 | /// 15 | 16 | #ifndef __CHECKSUM_H 17 | #define __CHECKSUM_H 18 | 19 | #include "RakMemoryOverride.h" 20 | 21 | /// Generates and validates checksums 22 | class CheckSum 23 | { 24 | 25 | public: 26 | 27 | /// Default constructor 28 | 29 | CheckSum() 30 | { 31 | Clear(); 32 | } 33 | 34 | void Clear() 35 | { 36 | sum = 0; 37 | r = 55665; 38 | c1 = 52845; 39 | c2 = 22719; 40 | } 41 | 42 | void Add ( unsigned int w ); 43 | 44 | 45 | void Add ( unsigned short w ); 46 | 47 | void Add ( unsigned char* b, unsigned int length ); 48 | 49 | void Add ( unsigned char b ); 50 | 51 | unsigned int Get () 52 | { 53 | return sum; 54 | } 55 | 56 | protected: 57 | unsigned short r; 58 | unsigned short c1; 59 | unsigned short c2; 60 | unsigned int sum; 61 | }; 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/DS_BytePool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file DS_BytePool.h 12 | /// 13 | 14 | 15 | #ifndef __BYTE_POOL_H 16 | #define __BYTE_POOL_H 17 | 18 | #include "RakMemoryOverride.h" 19 | #include "DS_MemoryPool.h" 20 | #include "Export.h" 21 | #include "SimpleMutex.h" 22 | #include "RakAssert.h" 23 | 24 | // #define _DISABLE_BYTE_POOL 25 | // #define _THREADSAFE_BYTE_POOL 26 | 27 | namespace DataStructures 28 | { 29 | // Allocate some number of bytes from pools. Uses the heap if necessary. 30 | class RAK_DLL_EXPORT BytePool 31 | { 32 | public: 33 | BytePool(); 34 | ~BytePool(); 35 | // Should be at least 8 times bigger than 8192 36 | void SetPageSize(int size); 37 | unsigned char* Allocate(int bytesWanted, const char *file, unsigned int line); 38 | void Release(unsigned char *data, const char *file, unsigned int line); 39 | void Clear(const char *file, unsigned int line); 40 | protected: 41 | MemoryPool pool128; 42 | MemoryPool pool512; 43 | MemoryPool pool2048; 44 | MemoryPool pool8192; 45 | #ifdef _THREADSAFE_BYTE_POOL 46 | SimpleMutex mutex128; 47 | SimpleMutex mutex512; 48 | SimpleMutex mutex2048; 49 | SimpleMutex mutex8192; 50 | #endif 51 | }; 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/DS_ByteQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file DS_ByteQueue.h 12 | /// \internal 13 | /// \brief Byte queue 14 | /// 15 | 16 | 17 | #ifndef __BYTE_QUEUE_H 18 | #define __BYTE_QUEUE_H 19 | 20 | #include "RakMemoryOverride.h" 21 | #include "Export.h" 22 | 23 | /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures 24 | /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. 25 | namespace DataStructures 26 | { 27 | class ByteQueue 28 | { 29 | public: 30 | ByteQueue(); 31 | ~ByteQueue(); 32 | void WriteBytes(const char *in, unsigned length, const char *file, unsigned int line); 33 | bool ReadBytes(char *out, unsigned maxLengthToRead, bool peek); 34 | unsigned GetBytesWritten(void) const; 35 | char* PeekContiguousBytes(unsigned int *outLength) const; 36 | void IncrementReadOffset(unsigned length); 37 | void DecrementReadOffset(unsigned length); 38 | void Clear(const char *file, unsigned int line); 39 | void Print(void); 40 | 41 | protected: 42 | char *data; 43 | unsigned readOffset, writeOffset, lengthAllocated; 44 | }; 45 | } 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/DS_HuffmanEncodingTreeNode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief \b [Internal] A single node in the Huffman Encoding Tree. 13 | /// 14 | 15 | #ifndef __HUFFMAN_ENCODING_TREE_NODE 16 | #define __HUFFMAN_ENCODING_TREE_NODE 17 | 18 | struct HuffmanEncodingTreeNode 19 | { 20 | unsigned char value; 21 | unsigned weight; 22 | HuffmanEncodingTreeNode *left; 23 | HuffmanEncodingTreeNode *right; 24 | HuffmanEncodingTreeNode *parent; 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/DataCompressor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file DataCompressor.h 12 | /// \brief DataCompressor does compression on a block of data. 13 | /// \details Not very good compression, but it's small and fast so is something you can use per-message at runtime. 14 | /// 15 | 16 | 17 | #ifndef __DATA_COMPRESSOR_H 18 | #define __DATA_COMPRESSOR_H 19 | 20 | #include "RakMemoryOverride.h" 21 | #include "DS_HuffmanEncodingTree.h" 22 | #include "Export.h" 23 | 24 | namespace RakNet 25 | { 26 | 27 | /// \brief Does compression on a block of data. Not very good compression, but it's small and fast so is something you can compute at runtime. 28 | class RAK_DLL_EXPORT DataCompressor 29 | { 30 | public: 31 | // GetInstance() and DestroyInstance(instance*) 32 | STATIC_FACTORY_DECLARATIONS(DataCompressor) 33 | 34 | static void Compress( unsigned char *userData, unsigned sizeInBytes, RakNet::BitStream * output ); 35 | static unsigned DecompressAndAllocate( RakNet::BitStream * input, unsigned char **output ); 36 | }; 37 | 38 | } // namespace RakNet 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/EmptyHeader.h: -------------------------------------------------------------------------------- 1 | // This is here to remove Missing #include header? in the Unreal Engine 2 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/EpochTimeToString.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "FormatString.h" 12 | #include "EpochTimeToString.h" 13 | #include 14 | #include 15 | #include 16 | // localtime 17 | #include 18 | #include "LinuxStrings.h" 19 | 20 | char * EpochTimeToString(long long time) 21 | { 22 | static int textIndex=0; 23 | static char text[4][64]; 24 | 25 | if (++textIndex==4) 26 | textIndex=0; 27 | 28 | struct tm * timeinfo; 29 | time_t t = time; 30 | timeinfo = localtime ( &t ); 31 | strftime (text[textIndex],64,"%c.",timeinfo); 32 | 33 | /* 34 | time_t 35 | // Copied from the docs 36 | struct tm *newtime; 37 | newtime = _localtime64(& time); 38 | asctime_s( text[textIndex], sizeof(text[textIndex]), newtime ); 39 | 40 | while (text[textIndex][0] && (text[textIndex][strlen(text[textIndex])-1]=='\n' || text[textIndex][strlen(text[textIndex])-1]=='\r')) 41 | text[textIndex][strlen(text[textIndex])-1]=0; 42 | */ 43 | 44 | return text[textIndex]; 45 | } 46 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/EpochTimeToString.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | 12 | /// \file EpochTimeToString.h 13 | /// 14 | 15 | 16 | #ifndef __EPOCH_TIME_TO_STRING_H 17 | #define __EPOCH_TIME_TO_STRING_H 18 | 19 | #include "Export.h" 20 | 21 | RAK_DLL_EXPORT char * EpochTimeToString(long long time); 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Export.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "RakNetDefines.h" 12 | 13 | #if defined(_WIN32) && !(defined(__GNUC__) || defined(__GCCXML__)) && !defined(_RAKNET_LIB) && defined(_RAKNET_DLL) 14 | #define RAK_DLL_EXPORT __declspec(dllexport) 15 | #else 16 | #define RAK_DLL_EXPORT 17 | #endif 18 | 19 | #define STATIC_FACTORY_DECLARATIONS(x) static x* GetInstance(void); \ 20 | static void DestroyInstance( x *i); 21 | 22 | #define STATIC_FACTORY_DEFINITIONS(x,y) x* x::GetInstance(void) {return RakNet::OP_NEW( _FILE_AND_LINE_ );} \ 23 | void x::DestroyInstance( x *i) {RakNet::OP_DELETE(( y* ) i, _FILE_AND_LINE_);} 24 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/FileOperations.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file FileOperations.h 12 | /// 13 | 14 | 15 | #include "NativeFeatureIncludes.h" 16 | #if _RAKNET_SUPPORT_FileOperations==1 17 | 18 | #ifndef __FILE_OPERATIONS_H 19 | #define __FILE_OPERATIONS_H 20 | 21 | #include "Export.h" 22 | 23 | bool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength ); 24 | bool RAK_DLL_EXPORT IsSlash(unsigned char c); 25 | void RAK_DLL_EXPORT AddSlash( char *input ); 26 | void RAK_DLL_EXPORT QuoteIfSpaces(char *str); 27 | bool RAK_DLL_EXPORT DirectoryExists(const char *directory); 28 | unsigned int RAK_DLL_EXPORT GetFileLength(const char *path); 29 | 30 | #endif 31 | 32 | #endif // _RAKNET_SUPPORT_FileOperations 33 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/FormatString.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "FormatString.h" 12 | #include 13 | #include 14 | #include 15 | #include "LinuxStrings.h" 16 | 17 | char * FormatString(const char *format, ...) 18 | { 19 | static int textIndex=0; 20 | static char text[4][8096]; 21 | va_list ap; 22 | va_start(ap, format); 23 | 24 | if (++textIndex==4) 25 | textIndex=0; 26 | _vsnprintf(text[textIndex], 8096, format, ap); 27 | va_end(ap); 28 | text[textIndex][8096-1]=0; 29 | 30 | return text[textIndex]; 31 | } 32 | 33 | char * FormatStringTS(char *output, const char *format, ...) 34 | { 35 | va_list ap; 36 | va_start(ap, format); 37 | _vsnprintf(output, 512, format, ap); 38 | va_end(ap); 39 | return output; 40 | } 41 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/FormatString.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file FormatString.h 12 | /// 13 | 14 | 15 | #ifndef __FORMAT_STRING_H 16 | #define __FORMAT_STRING_H 17 | 18 | #include "Export.h" 19 | 20 | extern "C" { 21 | char * FormatString(const char *format, ...); 22 | } 23 | // Threadsafe 24 | extern "C" { 25 | char * FormatStringTS(char *output, const char *format, ...); 26 | } 27 | 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/GetTime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file GetTime.h 12 | /// \brief Returns the value from QueryPerformanceCounter. This is the function RakNet uses to represent time. This time won't match the time returned by GetTimeCount(). See http://www.jenkinssoftware.com/forum/index.php?topic=2798.0 13 | /// 14 | 15 | 16 | #ifndef __GET_TIME_H 17 | #define __GET_TIME_H 18 | 19 | #include "Export.h" 20 | #include "RakNetTime.h" // For RakNet::TimeMS 21 | 22 | namespace RakNet 23 | { 24 | /// Same as GetTimeMS 25 | /// Holds the time in either a 32 or 64 bit variable, depending on __GET_TIME_64BIT 26 | RakNet::Time RAK_DLL_EXPORT GetTime( void ); 27 | 28 | /// Return the time as 32 bit 29 | /// \note The maximum delta between returned calls is 1 second - however, RakNet calls this constantly anyway. See NormalizeTime() in the cpp. 30 | RakNet::TimeMS RAK_DLL_EXPORT GetTimeMS( void ); 31 | 32 | /// Return the time as 64 bit 33 | /// \note The maximum delta between returned calls is 1 second - however, RakNet calls this constantly anyway. See NormalizeTime() in the cpp. 34 | RakNet::TimeUS RAK_DLL_EXPORT GetTimeUS( void ); 35 | 36 | /// a > b? 37 | extern RAK_DLL_EXPORT bool GreaterThan(RakNet::Time a, RakNet::Time b); 38 | /// a < b? 39 | extern RAK_DLL_EXPORT bool LessThan(RakNet::Time a, RakNet::Time b); 40 | } 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Getche.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #if defined(_WIN32) 12 | #include /* getche() */ 13 | #elif defined(__S3E__) 14 | 15 | #else 16 | 17 | #include "Getche.h" 18 | 19 | char getche() 20 | { 21 | 22 | 23 | struct termios oldt, 24 | newt; 25 | char ch; 26 | tcgetattr( STDIN_FILENO, &oldt ); 27 | newt = oldt; 28 | newt.c_lflag &= ~( ICANON | ECHO ); 29 | tcsetattr( STDIN_FILENO, TCSANOW, &newt ); 30 | ch = getchar(); 31 | tcsetattr( STDIN_FILENO, TCSANOW, &oldt ); 32 | return ch; 33 | 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Getche.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #if defined(_WIN32) 12 | #include /* getche() */ 13 | 14 | #else 15 | #include 16 | #include 17 | #include 18 | char getche(); 19 | #endif 20 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Gets.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | char * Gets ( char * str, int num ) 19 | { 20 | fgets(str, num, stdin); 21 | if (str[0]=='\n' || str[0]=='\r') 22 | str[0]=0; 23 | 24 | size_t len=strlen(str); 25 | if (len>0 && (str[len-1]=='\n' || str[len-1]=='\r')) 26 | str[len-1]=0; 27 | if (len>1 && (str[len-2]=='\n' || str[len-2]=='\r')) 28 | str[len-2]=0; 29 | 30 | return str; 31 | } 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Gets.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __GETS__H_ 12 | #define __GETS__H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | char * Gets ( char * str, int num ); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/IncrementalReadInterface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "IncrementalReadInterface.h" 12 | #include 13 | 14 | using namespace RakNet; 15 | 16 | unsigned int IncrementalReadInterface::GetFilePart( const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, void *preallocatedDestination, FileListNodeContext context) 17 | { 18 | FILE *fp = fopen(filename, "rb"); 19 | if (fp==0) 20 | return 0; 21 | fseek(fp,startReadBytes,SEEK_SET); 22 | unsigned int numRead = (unsigned int) fread(preallocatedDestination,1,numBytesToRead, fp); 23 | fclose(fp); 24 | return numRead; 25 | } 26 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/IncrementalReadInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __INCREMENTAL_READ_INTERFACE_H 12 | #define __INCREMENTAL_READ_INTERFACE_H 13 | 14 | #include "FileListNodeContext.h" 15 | #include "Export.h" 16 | 17 | namespace RakNet 18 | { 19 | 20 | class RAK_DLL_EXPORT IncrementalReadInterface 21 | { 22 | public: 23 | IncrementalReadInterface() {} 24 | virtual ~IncrementalReadInterface() {} 25 | 26 | /// Read part of a file into \a destination 27 | /// Return the number of bytes written. Return 0 when file is done. 28 | /// \param[in] filename Filename to read 29 | /// \param[in] startReadBytes What offset from the start of the file to read from 30 | /// \param[in] numBytesToRead How many bytes to read. This is also how many bytes have been allocated to preallocatedDestination 31 | /// \param[out] preallocatedDestination Write your data here 32 | /// \return The number of bytes read, or 0 if none 33 | virtual unsigned int GetFilePart( const char *filename, unsigned int startReadBytes, unsigned int numBytesToRead, void *preallocatedDestination, FileListNodeContext context); 34 | }; 35 | 36 | } // namespace RakNet 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Itoa.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "EmptyHeader.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | // Fast itoa from http://www.jb.man.ac.uk/~slowe/cpp/itoa.html for Linux since it seems like Linux doesn't support this function. 18 | // I modified it to remove the std dependencies. 19 | char* Itoa( int value, char* result, int base ) 20 | { 21 | // check that the base if valid 22 | if (base < 2 || base > 16) { *result = 0; return result; } 23 | char* out = result; 24 | int quotient = value; 25 | 26 | int absQModB; 27 | 28 | do { 29 | // KevinJ - get rid of this dependency 30 | //*out = "0123456789abcdef"[ std::abs( quotient % base ) ]; 31 | absQModB=quotient % base; 32 | if (absQModB < 0) 33 | absQModB=-absQModB; 34 | *out = "0123456789abcdef"[ absQModB ]; 35 | ++out; 36 | quotient /= base; 37 | } while ( quotient ); 38 | 39 | // Only apply negative sign for base 10 40 | if ( value < 0 && base == 10) *out++ = '-'; 41 | 42 | // KevinJ - get rid of this dependency 43 | // std::reverse( result, out ); 44 | *out = 0; 45 | 46 | // KevinJ - My own reverse code 47 | char *start = result; 48 | char temp; 49 | out--; 50 | while (start < out) 51 | { 52 | temp=*start; 53 | *start=*out; 54 | *out=temp; 55 | start++; 56 | out--; 57 | } 58 | 59 | return result; 60 | } 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/Itoa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __RAK_ITOA_H 12 | #define __RAK_ITOA_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | char* Itoa( int value, char* result, int base ); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/LinuxStrings.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #if (defined(__GNUC__) || defined(__ARMCC_VERSION) || defined(__GCCXML__) || defined(__S3E__) ) && !defined(_WIN32) 12 | #include 13 | #ifndef _stricmp 14 | int _stricmp(const char* s1, const char* s2) 15 | { 16 | return strcasecmp(s1,s2); 17 | } 18 | #endif 19 | int _strnicmp(const char* s1, const char* s2, size_t n) 20 | { 21 | return strncasecmp(s1,s2,n); 22 | } 23 | #ifndef _vsnprintf 24 | #define _vsnprintf vsnprintf 25 | #endif 26 | #ifndef __APPLE__ 27 | char *_strlwr(char * str ) 28 | { 29 | if (str==0) 30 | return 0; 31 | for (int i=0; str[i]; i++) 32 | { 33 | if (str[i]>='A' && str[i]<='Z') 34 | str[i]+='a'-'A'; 35 | } 36 | return str; 37 | } 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/LinuxStrings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef _GCC_WIN_STRINGS 12 | #define _GCC_WIN_STRINGS 13 | 14 | #if defined(__native_client__) 15 | #ifndef _stricmp 16 | int _stricmp(const char* s1, const char* s2); 17 | #endif 18 | int _strnicmp(const char* s1, const char* s2, size_t n); 19 | char *_strlwr(char * str ); 20 | #define _vsnprintf vsnprintf 21 | #else 22 | #if (defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) ) && !defined(_WIN32) 23 | #ifndef _stricmp 24 | int _stricmp(const char* s1, const char* s2); 25 | #endif 26 | int _strnicmp(const char* s1, const char* s2, size_t n); 27 | // http://www.jenkinssoftware.com/forum/index.php?topic=5010.msg20920#msg20920 28 | // #ifndef _vsnprintf 29 | #define _vsnprintf vsnprintf 30 | // #endif 31 | #ifndef __APPLE__ 32 | char *_strlwr(char * str ); //this won't compile on OSX for some reason 33 | #endif 34 | 35 | 36 | 37 | #endif 38 | #endif 39 | 40 | #endif // _GCC_WIN_STRINGS 41 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/LocklessTypes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "LocklessTypes.h" 12 | 13 | using namespace RakNet; 14 | 15 | LocklessUint32_t::LocklessUint32_t() 16 | { 17 | value=0; 18 | } 19 | LocklessUint32_t::LocklessUint32_t(uint32_t initial) 20 | { 21 | value=initial; 22 | } 23 | uint32_t LocklessUint32_t::Increment(void) 24 | { 25 | #ifdef _WIN32 26 | return (uint32_t) InterlockedIncrement(&value); 27 | #elif defined(ANDROID) || defined(__S3E__) || defined(__APPLE__) 28 | uint32_t v; 29 | mutex.Lock(); 30 | ++value; 31 | v=value; 32 | mutex.Unlock(); 33 | return v; 34 | #else 35 | return __sync_fetch_and_add (&value, (uint32_t) 1); 36 | #endif 37 | } 38 | uint32_t LocklessUint32_t::Decrement(void) 39 | { 40 | #ifdef _WIN32 41 | return (uint32_t) InterlockedDecrement(&value); 42 | #elif defined(ANDROID) || defined(__S3E__) || defined(__APPLE__) 43 | uint32_t v; 44 | mutex.Lock(); 45 | --value; 46 | v=value; 47 | mutex.Unlock(); 48 | return v; 49 | #else 50 | return __sync_fetch_and_add (&value, (uint32_t) -1); 51 | #endif 52 | } 53 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/LocklessTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __LOCKLESS_TYPES_H 12 | #define __LOCKLESS_TYPES_H 13 | 14 | #include "Export.h" 15 | #include "NativeTypes.h" 16 | #include "WindowsIncludes.h" 17 | #if defined(ANDROID) || defined(__S3E__) || defined(__APPLE__) 18 | // __sync_fetch_and_add not supported apparently 19 | #include "SimpleMutex.h" 20 | #endif 21 | 22 | namespace RakNet 23 | { 24 | 25 | class RAK_DLL_EXPORT LocklessUint32_t 26 | { 27 | public: 28 | LocklessUint32_t(); 29 | explicit LocklessUint32_t(uint32_t initial); 30 | // Returns variable value after changing it 31 | uint32_t Increment(void); 32 | // Returns variable value after changing it 33 | uint32_t Decrement(void); 34 | uint32_t GetValue(void) const {return value;} 35 | 36 | protected: 37 | #ifdef _WIN32 38 | volatile LONG value; 39 | #elif defined(ANDROID) || defined(__S3E__) || defined(__APPLE__) 40 | // __sync_fetch_and_add not supported apparently 41 | SimpleMutex mutex; 42 | uint32_t value; 43 | #else 44 | volatile uint32_t value; 45 | #endif 46 | }; 47 | 48 | } 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/MTUSize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief \b [Internal] Defines the default maximum transfer unit. 13 | /// 14 | 15 | 16 | #ifndef MAXIMUM_MTU_SIZE 17 | 18 | /// \li \em 17914 16 Mbit/Sec Token Ring 19 | /// \li \em 4464 4 Mbits/Sec Token Ring 20 | /// \li \em 4352 FDDI 21 | /// \li \em 1500. The largest Ethernet packet size \b recommended. This is the typical setting for non-PPPoE, non-VPN connections. The default value for NETGEAR routers, adapters and switches. 22 | /// \li \em 1492. The size PPPoE prefers. 23 | /// \li \em 1472. Maximum size to use for pinging. (Bigger packets are fragmented.) 24 | /// \li \em 1468. The size DHCP prefers. 25 | /// \li \em 1460. Usable by AOL if you don't have large email attachments, etc. 26 | /// \li \em 1430. The size VPN and PPTP prefer. 27 | /// \li \em 1400. Maximum size for AOL DSL. 28 | /// \li \em 576. Typical value to connect to dial-up ISPs. 29 | /// The largest value for an UDP datagram 30 | 31 | 32 | 33 | #define MAXIMUM_MTU_SIZE 1492 34 | 35 | 36 | #define MINIMUM_MTU_SIZE 400 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/NativeFeatureIncludesOverrides.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | // USER EDITABLE FILE 12 | // See NativeFeatureIncludes.h 13 | 14 | #ifndef __NATIVE_FEATURE_INCLDUES_OVERRIDES_H 15 | #define __NATIVE_FEATURE_INCLDUES_OVERRIDES_H 16 | 17 | //#define LIBCAT_SECURITY 1 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/NativeTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __NATIVE_TYPES_H 12 | #define __NATIVE_TYPES_H 13 | 14 | #if defined(__GNUC__) || defined(__GCCXML__) || defined(__SNC__) || defined(__S3E__) 15 | #include 16 | #elif !defined(_STDINT_H) && !defined(_SN_STDINT_H) && !defined(_SYS_STDINT_H_) && !defined(_STDINT) && !defined(_MACHTYPES_H_) && !defined(_STDINT_H_) 17 | typedef unsigned char uint8_t; 18 | typedef unsigned short uint16_t; 19 | typedef unsigned __int32 uint32_t; 20 | typedef signed char int8_t; 21 | typedef signed short int16_t; 22 | typedef __int32 int32_t; 23 | #if defined(_MSC_VER) && _MSC_VER < 1300 24 | typedef unsigned __int64 uint64_t; 25 | typedef signed __int64 int64_t; 26 | #else 27 | typedef unsigned long long int uint64_t; 28 | typedef signed long long int64_t; 29 | #endif 30 | #endif 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PS3Includes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PS4Includes.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PS4Includes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketConsoleLogger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "NativeFeatureIncludes.h" 12 | #if _RAKNET_SUPPORT_LogCommandParser==1 && _RAKNET_SUPPORT_PacketLogger==1 13 | #include "PacketConsoleLogger.h" 14 | #include "LogCommandParser.h" 15 | #include 16 | 17 | using namespace RakNet; 18 | 19 | PacketConsoleLogger::PacketConsoleLogger() 20 | { 21 | logCommandParser=0; 22 | } 23 | 24 | void PacketConsoleLogger::SetLogCommandParser(LogCommandParser *lcp) 25 | { 26 | logCommandParser=lcp; 27 | if (logCommandParser) 28 | logCommandParser->AddChannel("PacketConsoleLogger"); 29 | } 30 | void PacketConsoleLogger::WriteLog(const char *str) 31 | { 32 | if (logCommandParser) 33 | logCommandParser->WriteLog("PacketConsoleLogger", str); 34 | } 35 | 36 | #endif // _RAKNET_SUPPORT_* 37 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketConsoleLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief This will write all incoming and outgoing network messages to the log command parser, which can be accessed through Telnet 13 | /// 14 | 15 | #include "NativeFeatureIncludes.h" 16 | #if _RAKNET_SUPPORT_LogCommandParser==1 && _RAKNET_SUPPORT_PacketLogger==1 17 | 18 | #ifndef __PACKET_CONSOLE_LOGGER_H_ 19 | #define __PACKET_CONSOLE_LOGGER_H_ 20 | 21 | #include "PacketLogger.h" 22 | 23 | namespace RakNet 24 | { 25 | /// Forward declarations 26 | class LogCommandParser; 27 | 28 | /// \ingroup PACKETLOGGER_GROUP 29 | /// \brief Packetlogger that logs to a remote command console 30 | class RAK_DLL_EXPORT PacketConsoleLogger : public PacketLogger 31 | { 32 | public: 33 | PacketConsoleLogger(); 34 | // Writes to the command parser used for logging, which is accessed through a secondary communication layer (such as Telnet or RakNet) - See ConsoleServer.h 35 | virtual void SetLogCommandParser(LogCommandParser *lcp); 36 | virtual void WriteLog(const char *str); 37 | protected: 38 | LogCommandParser *logCommandParser; 39 | }; 40 | 41 | } // namespace RakNet 42 | 43 | #endif 44 | 45 | #endif // _RAKNET_SUPPORT_* 46 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketFileLogger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "NativeFeatureIncludes.h" 12 | #if _RAKNET_SUPPORT_PacketLogger==1 13 | #include "PacketFileLogger.h" 14 | #include "GetTime.h" 15 | 16 | using namespace RakNet; 17 | 18 | PacketFileLogger::PacketFileLogger() 19 | { 20 | packetLogFile=0; 21 | } 22 | PacketFileLogger::~PacketFileLogger() 23 | { 24 | if (packetLogFile) 25 | { 26 | fflush(packetLogFile); 27 | fclose(packetLogFile); 28 | } 29 | } 30 | void PacketFileLogger::StartLog(const char *filenamePrefix) 31 | { 32 | // Open file for writing 33 | char filename[256]; 34 | if (filenamePrefix) 35 | sprintf(filename, "%s_%i.csv", filenamePrefix, (int) RakNet::GetTimeMS()); 36 | else 37 | sprintf(filename, "PacketLog_%i.csv", (int) RakNet::GetTimeMS()); 38 | packetLogFile = fopen(filename, "wt"); 39 | LogHeader(); 40 | if (packetLogFile) 41 | { 42 | fflush(packetLogFile); 43 | } 44 | } 45 | 46 | void PacketFileLogger::WriteLog(const char *str) 47 | { 48 | if (packetLogFile) 49 | { 50 | fprintf(packetLogFile, "%s\n", str); 51 | fflush(packetLogFile); 52 | } 53 | } 54 | 55 | #endif // _RAKNET_SUPPORT_* 56 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketFileLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief This will write all incoming and outgoing network messages to a file 13 | /// 14 | 15 | 16 | #include "NativeFeatureIncludes.h" 17 | #if _RAKNET_SUPPORT_PacketLogger==1 18 | 19 | #ifndef __PACKET_FILE_LOGGER_H_ 20 | #define __PACKET_FILE_LOGGER_H_ 21 | 22 | #include "PacketLogger.h" 23 | #include 24 | 25 | namespace RakNet 26 | { 27 | 28 | /// \ingroup PACKETLOGGER_GROUP 29 | /// \brief Packetlogger that outputs to a file 30 | class RAK_DLL_EXPORT PacketFileLogger : public PacketLogger 31 | { 32 | public: 33 | PacketFileLogger(); 34 | virtual ~PacketFileLogger(); 35 | void StartLog(const char *filenamePrefix); 36 | virtual void WriteLog(const char *str); 37 | protected: 38 | FILE *packetLogFile; 39 | }; 40 | 41 | } // namespace RakNet 42 | 43 | #endif 44 | 45 | #endif // _RAKNET_SUPPORT_* 46 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketOutputWindowLogger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "NativeFeatureIncludes.h" 12 | #if _RAKNET_SUPPORT_PacketLogger==1 13 | 14 | #if defined(UNICODE) 15 | #include "RakWString.h" 16 | #endif 17 | 18 | #include "PacketOutputWindowLogger.h" 19 | #include "RakString.h" 20 | #if defined(_WIN32) 21 | #include "WindowsIncludes.h" 22 | #endif 23 | 24 | using namespace RakNet; 25 | 26 | PacketOutputWindowLogger::PacketOutputWindowLogger() 27 | { 28 | } 29 | PacketOutputWindowLogger::~PacketOutputWindowLogger() 30 | { 31 | } 32 | void PacketOutputWindowLogger::WriteLog(const char *str) 33 | { 34 | #if defined(_WIN32) 35 | 36 | #if defined(UNICODE) 37 | RakNet::RakWString str2 = str; 38 | str2+="\n"; 39 | OutputDebugString(str2.C_String()); 40 | #else 41 | RakNet::RakString str2 = str; 42 | str2+="\n"; 43 | OutputDebugString(str2.C_String()); 44 | #endif 45 | // DS_APR 46 | #elif defined(__native_client__) 47 | fprintf(stderr, "%s\n", str); 48 | // /DS_APR 49 | #endif 50 | } 51 | 52 | #endif // _RAKNET_SUPPORT_* 53 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketOutputWindowLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief This will write all incoming and outgoing network messages to a file 13 | /// 14 | 15 | 16 | #include "NativeFeatureIncludes.h" 17 | #if _RAKNET_SUPPORT_PacketLogger==1 18 | 19 | #ifndef __PACKET_OUTPUT_WINDOW_LOGGER_H_ 20 | #define __PACKET_OUTPUT_WINDOW_LOGGER_H_ 21 | 22 | #include "PacketLogger.h" 23 | 24 | namespace RakNet 25 | { 26 | 27 | /// \ingroup PACKETLOGGER_GROUP 28 | /// \brief Packetlogger that outputs to the output window in the debugger. Windows only. 29 | class RAK_DLL_EXPORT PacketOutputWindowLogger : public PacketLogger 30 | { 31 | public: 32 | PacketOutputWindowLogger(); 33 | virtual ~PacketOutputWindowLogger(); 34 | virtual void WriteLog(const char *str); 35 | protected: 36 | }; 37 | 38 | } // namespace RakNet 39 | 40 | #endif 41 | 42 | #endif // _RAKNET_SUPPORT_* 43 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/PacketPool.h: -------------------------------------------------------------------------------- 1 | // REMOVEME -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakAlloca.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #if defined(__FreeBSD__) 12 | #include 13 | 14 | 15 | 16 | 17 | #elif defined ( __APPLE__ ) || defined ( __APPLE_CC__ ) 18 | #include 19 | #include 20 | #elif defined(_WIN32) 21 | #include 22 | #else 23 | #include 24 | // Alloca needed on Ubuntu apparently 25 | #include 26 | #endif 27 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakAssert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include 12 | #include "RakNetDefines.h" 13 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetDefinesOverrides.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | // USER EDITABLE FILE 12 | 13 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetSocket2_360_720.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "EmptyHeader.h" 12 | 13 | #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 14 | 15 | #ifndef RAKNETSOCKET2_360_720_CPP 16 | #define RAKNETSOCKET2_360_720_CPP 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | #endif // file header 85 | 86 | #endif // #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 87 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetSocket2_PS3_PS4.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "EmptyHeader.h" 12 | 13 | #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 14 | 15 | #ifndef RAKNETSOCKET2_PS3_PS4_CPP 16 | #define RAKNETSOCKET2_PS3_PS4_CPP 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | #endif // file header 127 | 128 | #endif // #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 129 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetSocket2_PS4.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "EmptyHeader.h" 12 | 13 | #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 14 | 15 | #ifndef RAKNETSOCKET2_PS4_CPP 16 | #define RAKNETSOCKET2_PS4_CPP 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | #endif // file header 71 | 72 | #endif // #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 73 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetSocket2_Vita.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "EmptyHeader.h" 12 | 13 | #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 14 | 15 | #ifndef RAKNETSOCKET2_VITA 16 | #define RAKNETSOCKET2_VITA 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | #endif // file header 158 | 159 | #endif // #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS 160 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetTime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __RAKNET_TIME_H 12 | #define __RAKNET_TIME_H 13 | 14 | #include "NativeTypes.h" 15 | #include "RakNetDefines.h" 16 | 17 | namespace RakNet { 18 | 19 | // Define __GET_TIME_64BIT if you want to use large types for GetTime (takes more bandwidth when you transmit time though!) 20 | // You would want to do this if your system is going to run long enough to overflow the millisecond counter (over a month) 21 | #if __GET_TIME_64BIT==1 22 | typedef uint64_t Time; 23 | typedef uint32_t TimeMS; 24 | typedef uint64_t TimeUS; 25 | #else 26 | typedef uint32_t Time; 27 | typedef uint32_t TimeMS; 28 | typedef uint64_t TimeUS; 29 | #endif 30 | 31 | } // namespace RakNet 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakNetVersion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #define RAKNET_VERSION "4.081" 12 | #define RAKNET_VERSION_NUMBER 4.081 13 | #define RAKNET_VERSION_NUMBER_INT 4081 14 | 15 | #define RAKNET_DATE "5/28/2014" 16 | 17 | // What compatible protocol version RakNet is using. When this value changes, it indicates this version of RakNet cannot connection to an older version. 18 | // ID_INCOMPATIBLE_PROTOCOL_VERSION will be returned on connection attempt in this case 19 | #define RAKNET_PROTOCOL_VERSION 6 20 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RakSleep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __RAK_SLEEP_H 12 | #define __RAK_SLEEP_H 13 | 14 | #include "Export.h" 15 | 16 | void RAK_DLL_EXPORT RakSleep(unsigned int ms); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RandSync.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief \b [Internal] Random number generator 13 | /// 14 | 15 | 16 | 17 | #ifndef __RAND_SYNC_H 18 | #define __RAND_SYNC_H 19 | 20 | #include "Export.h" 21 | #include "Rand.h" 22 | #include "DS_Queue.h" 23 | #include "NativeTypes.h" 24 | 25 | namespace RakNet { 26 | 27 | class BitStream; 28 | 29 | class RAK_DLL_EXPORT RakNetRandomSync 30 | { 31 | public: 32 | RakNetRandomSync(); 33 | virtual ~RakNetRandomSync(); 34 | void SeedMT( uint32_t _seed ); 35 | void SeedMT( uint32_t _seed, uint32_t skipValues ); 36 | float FrandomMT( void ); 37 | unsigned int RandomMT( void ); 38 | uint32_t GetSeed( void ) const; 39 | uint32_t GetCallCount( void ) const; 40 | void SetCallCount( uint32_t i ); 41 | 42 | virtual void SerializeConstruction(RakNet::BitStream *constructionBitstream); 43 | virtual bool DeserializeConstruction(RakNet::BitStream *constructionBitstream); 44 | virtual void Serialize(RakNet::BitStream *outputBitstream); 45 | virtual void Deserialize(RakNet::BitStream *outputBitstream); 46 | 47 | protected: 48 | void Skip( uint32_t count ); 49 | DataStructures::Queue usedValues; 50 | uint32_t seed; 51 | uint32_t callCount; 52 | uint32_t usedValueBufferCount; 53 | RakNetRandom rnr; 54 | }; 55 | } // namespace RakNet 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/RefCountedObj.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief \b Reference counted object. Very simple class for quick and dirty uses. 13 | /// 14 | 15 | 16 | 17 | #ifndef __REF_COUNTED_OBJ_H 18 | #define __REF_COUNTED_OBJ_H 19 | 20 | #include "RakMemoryOverride.h" 21 | 22 | /// World's simplest class :) 23 | class RefCountedObj 24 | { 25 | public: 26 | RefCountedObj() {refCount=1;} 27 | virtual ~RefCountedObj() {} 28 | void AddRef(void) {refCount++;} 29 | void Deref(void) {if (--refCount==0) RakNet::OP_DELETE(this, _FILE_AND_LINE_);} 30 | int refCount; 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/SecureHandshake.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// 13 | 14 | 15 | #ifndef SECURE_HANDSHAKE_H 16 | #define SECURE_HANDSHAKE_H 17 | 18 | #include "NativeFeatureIncludes.h" 19 | 20 | #if LIBCAT_SECURITY==1 21 | 22 | // If building a RakNet DLL, be sure to tweak the CAT_EXPORT macro meaning 23 | #if !defined(_RAKNET_LIB) && defined(_RAKNET_DLL) 24 | # define CAT_BUILD_DLL 25 | #else 26 | # define CAT_NEUTER_EXPORT 27 | #endif 28 | 29 | // Include DependentExtensions in your path to include this 30 | #include "cat/AllTunnel.hpp" 31 | 32 | #endif // LIBCAT_SECURITY 33 | 34 | #endif // SECURE_HANDSHAKE_H 35 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/SendToThread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __SENDTO_THREAD 12 | #define __SENDTO_THREAD 13 | 14 | #include "RakNetDefines.h" 15 | 16 | #ifdef USE_THREADED_SEND 17 | 18 | #include "InternalPacket.h" 19 | #include "SocketLayer.h" 20 | #include "DS_ThreadsafeAllocatingQueue.h" 21 | #include "ThreadPool.h" 22 | 23 | namespace RakNet 24 | { 25 | class SendToThread 26 | { 27 | public: 28 | SendToThread(); 29 | ~SendToThread(); 30 | 31 | struct SendToThreadBlock 32 | { 33 | SOCKET s; 34 | SystemAddress systemAddress; 35 | unsigned short remotePortRakNetWasStartedOn_PS3; 36 | unsigned int extraSocketOptions; 37 | char data[MAXIMUM_MTU_SIZE]; 38 | unsigned short dataWriteOffset; 39 | }; 40 | 41 | static SendToThreadBlock* AllocateBlock(void); 42 | static void ProcessBlock(SendToThreadBlock* threadedSend); 43 | 44 | static void AddRef(void); 45 | static void Deref(void); 46 | static DataStructures::ThreadsafeAllocatingQueue objectQueue; 47 | protected: 48 | static int refCount; 49 | static ThreadPool threadPool; 50 | 51 | }; 52 | } 53 | 54 | 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/SignaledEvent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __SIGNALED_EVENT_H 12 | #define __SIGNALED_EVENT_H 13 | 14 | 15 | 16 | #if defined(_WIN32) 17 | #include "WindowsIncludes.h" 18 | 19 | 20 | 21 | #else 22 | #include 23 | #include 24 | #include "SimpleMutex.h" 25 | 26 | 27 | 28 | 29 | #endif 30 | 31 | #include "Export.h" 32 | 33 | namespace RakNet 34 | { 35 | 36 | class RAK_DLL_EXPORT SignaledEvent 37 | { 38 | public: 39 | SignaledEvent(); 40 | ~SignaledEvent(); 41 | 42 | void InitEvent(void); 43 | void CloseEvent(void); 44 | void SetEvent(void); 45 | void WaitOnEvent(int timeoutMs); 46 | 47 | protected: 48 | #ifdef _WIN32 49 | HANDLE eventList; 50 | 51 | 52 | 53 | 54 | 55 | #else 56 | SimpleMutex isSignaledMutex; 57 | bool isSignaled; 58 | #if !defined(ANDROID) 59 | pthread_condattr_t condAttr; 60 | #endif 61 | pthread_cond_t eventList; 62 | pthread_mutex_t hMutex; 63 | pthread_mutexattr_t mutexAttr; 64 | #endif 65 | }; 66 | 67 | } // namespace RakNet 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/SimpleTCPServer.h: -------------------------------------------------------------------------------- 1 | // Eraseme -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/SuperFastHash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __SUPER_FAST_HASH_H 12 | #define __SUPER_FAST_HASH_H 13 | 14 | #include 15 | #include "NativeTypes.h" 16 | 17 | // From http://www.azillionmonkeys.com/qed/hash.html 18 | // Author of main code is Paul Hsieh 19 | // I just added some convenience functions 20 | // Also note http://burtleburtle.net/bob/hash/doobs.html, which shows that this is 20% faster than the one on that page but has more collisions 21 | 22 | uint32_t SuperFastHash (const char * data, int length); 23 | uint32_t SuperFastHashIncremental (const char * data, int len, unsigned int lastHash ); 24 | uint32_t SuperFastHashFile (const char * filename); 25 | uint32_t SuperFastHashFilePtr (FILE *fp); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/TCPInterface.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/RakNet/Source/TCPInterface.cpp -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/ThreadsafePacketLogger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #include "NativeFeatureIncludes.h" 12 | #if _RAKNET_SUPPORT_PacketLogger==1 13 | 14 | #include "ThreadsafePacketLogger.h" 15 | #include 16 | 17 | using namespace RakNet; 18 | 19 | ThreadsafePacketLogger::ThreadsafePacketLogger() 20 | { 21 | 22 | } 23 | ThreadsafePacketLogger::~ThreadsafePacketLogger() 24 | { 25 | char **msg; 26 | while ((msg = logMessages.ReadLock()) != 0) 27 | { 28 | rakFree_Ex((*msg), _FILE_AND_LINE_ ); 29 | } 30 | } 31 | void ThreadsafePacketLogger::Update(void) 32 | { 33 | char **msg; 34 | while ((msg = logMessages.ReadLock()) != 0) 35 | { 36 | WriteLog(*msg); 37 | rakFree_Ex((*msg), _FILE_AND_LINE_ ); 38 | } 39 | } 40 | void ThreadsafePacketLogger::AddToLog(const char *str) 41 | { 42 | char **msg = logMessages.WriteLock(); 43 | *msg = (char*) rakMalloc_Ex( strlen(str)+1, _FILE_AND_LINE_ ); 44 | strcpy(*msg, str); 45 | logMessages.WriteUnlock(); 46 | } 47 | 48 | #endif // _RAKNET_SUPPORT_* 49 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/ThreadsafePacketLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | /// \file 12 | /// \brief Derivation of the packet logger to defer the call to WriteLog until the user thread. 13 | /// 14 | 15 | 16 | #include "NativeFeatureIncludes.h" 17 | #if _RAKNET_SUPPORT_PacketLogger==1 18 | 19 | #ifndef __THREADSAFE_PACKET_LOGGER_H 20 | #define __THREADSAFE_PACKET_LOGGER_H 21 | 22 | #include "PacketLogger.h" 23 | #include "SingleProducerConsumer.h" 24 | 25 | namespace RakNet 26 | { 27 | 28 | /// \ingroup PACKETLOGGER_GROUP 29 | /// \brief Same as PacketLogger, but writes output in the user thread. 30 | class RAK_DLL_EXPORT ThreadsafePacketLogger : public PacketLogger 31 | { 32 | public: 33 | ThreadsafePacketLogger(); 34 | virtual ~ThreadsafePacketLogger(); 35 | 36 | virtual void Update(void); 37 | 38 | protected: 39 | virtual void AddToLog(const char *str); 40 | 41 | DataStructures::SingleProducerConsumer logMessages; 42 | }; 43 | 44 | } // namespace RakNet 45 | 46 | #endif 47 | 48 | #endif // _RAKNET_SUPPORT_* 49 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/VariadicSQLParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __VARIADIC_SQL_PARSER_H 12 | #define __VARIADIC_SQL_PARSER_H 13 | 14 | #include "DS_List.h" 15 | 16 | #include 17 | 18 | namespace VariadicSQLParser 19 | { 20 | struct IndexAndType 21 | { 22 | unsigned int strIndex; 23 | unsigned int typeMappingIndex; 24 | }; 25 | const char* GetTypeMappingAtIndex(int i); 26 | void GetTypeMappingIndices( const char *format, DataStructures::List &indices ); 27 | // Given an SQL string with variadic arguments, allocate argumentBinary and argumentLengths, and hold the parameters in binary format 28 | // Last 2 parameters are out parameters 29 | void ExtractArguments( va_list argptr, const DataStructures::List &indices, char ***argumentBinary, int **argumentLengths ); 30 | void FreeArguments(const DataStructures::List &indices, char **argumentBinary, int *argumentLengths); 31 | } 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/VitaIncludes.cpp: -------------------------------------------------------------------------------- 1 | #include "EmptyHeader.h" 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/VitaIncludes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/WSAStartupSingleton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #ifndef __WSA_STARTUP_SINGLETON_H 12 | #define __WSA_STARTUP_SINGLETON_H 13 | 14 | class WSAStartupSingleton 15 | { 16 | public: 17 | WSAStartupSingleton(); 18 | ~WSAStartupSingleton(); 19 | static void AddRef(void); 20 | static void Deref(void); 21 | 22 | protected: 23 | static int refCount; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/WindowsIncludes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Oculus VR, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #if defined (WINDOWS_STORE_RT) 12 | #include 13 | #include 14 | #elif defined (_WIN32) 15 | #include 16 | #include 17 | #include 18 | 19 | // Must always include Winsock2.h before windows.h 20 | // or else: 21 | // winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition 22 | // winsock2.h(134) : warning C4005: 'FD_SET' : macro redefinition 23 | // winsock.h(83) : see previous definition of 'FD_SET' 24 | // winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition 25 | // winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition 26 | // winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition 27 | // winsock2.h(219) : error C2011: 'servent' : 'struct' type redefinition 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /thirdparty/RakNet/Source/XBox360Includes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /thirdparty/SDL3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(SDL3 SHARED IMPORTED GLOBAL) 2 | set_target_properties(SDL3 PROPERTIES 3 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/thirdparty/SDL3/lib/SDL3.dll" 4 | IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/thirdparty/SDL3/lib/SDL3.lib" 5 | INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/thirdparty/SDL3/include" 6 | ) -------------------------------------------------------------------------------- /thirdparty/SDL3/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2025 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | -------------------------------------------------------------------------------- /thirdparty/SDL3/VERSION: -------------------------------------------------------------------------------- 1 | 3.2.8 -------------------------------------------------------------------------------- /thirdparty/SDL3/include/SDL3/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* Header file containing SDL's license. */ 23 | -------------------------------------------------------------------------------- /thirdparty/SDL3/include/SDL3/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 24 | */ 25 | 26 | #include 27 | 28 | #ifdef SDL_PLATFORM_IOS 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /thirdparty/SDL3/include/SDL3/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /thirdparty/SDL3/lib/SDL3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/SDL3/lib/SDL3.dll -------------------------------------------------------------------------------- /thirdparty/SDL3/lib/SDL3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/SDL3/lib/SDL3.lib -------------------------------------------------------------------------------- /thirdparty/chillout/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.dmp 3 | 4 | # Prerequisites 5 | *.d 6 | 7 | # Compiled Object files 8 | *.slo 9 | *.lo 10 | *.o 11 | *.obj 12 | 13 | # Precompiled Headers 14 | *.gch 15 | *.pch 16 | 17 | # Compiled Dynamic libraries 18 | *.so 19 | *.dylib 20 | *.dll 21 | 22 | # Fortran module files 23 | *.mod 24 | *.smod 25 | 26 | # Compiled Static libraries 27 | *.lai 28 | *.la 29 | *.a 30 | *.lib 31 | 32 | # Executables 33 | *.exe 34 | *.out 35 | *.app 36 | -------------------------------------------------------------------------------- /thirdparty/chillout/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendors/gtest"] 2 | path = vendors/gtest 3 | url = https://github.com/google/googletest.git 4 | -------------------------------------------------------------------------------- /thirdparty/chillout/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: cpp 3 | 4 | matrix: 5 | include: 6 | - os: linux 7 | compiler: gcc 8 | sudo : true 9 | env: BUILD_TYPE=Debug VERBOSE=1 GTEST_CATCH_EXCEPTIONS=0 10 | - os: osx 11 | compiler: clang 12 | env: BUILD_TYPE=Debug VERBOSE=1 GTEST_CATCH_EXCEPTIONS=0 13 | 14 | addons: 15 | apt: 16 | # List of whitelisted in travis packages for ubuntu-precise can be found here: 17 | # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise 18 | # List of whitelisted in travis apt-sources: 19 | # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json 20 | sources: 21 | - ubuntu-toolchain-r-test 22 | - llvm-toolchain-precise-3.7 23 | packages: 24 | - g++-4.9 25 | - clang-3.7 26 | 27 | before_script: 28 | - git submodule update --init --recursive 29 | 30 | script: 31 | - mkdir build && cd build 32 | - cmake .. -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" 33 | - make 34 | - make test ARGS=-V 35 | 36 | after_success: 37 | - for f in $(find ../src/tests -maxdepth 1 -name '*.bktr' -print); do cat "$f"; done; 38 | -------------------------------------------------------------------------------- /thirdparty/chillout/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(chillout CXX) 4 | 5 | set(CMAKE_CXX_STANDARD 14) 6 | set(CMAKE_CXX_STANDARD_REQUIRED on) 7 | 8 | set(GTEST_SOURCE_DIR ${PROJECT_SOURCE_DIR}/vendors/gtest) 9 | set(CHILLOUT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src/chillout) 10 | 11 | if (MSVC) 12 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") 13 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) 14 | endif (MSVC) 15 | 16 | #add_definitions(-DGTEST_HAS_SEH=0) 17 | 18 | add_subdirectory(src/chillout) 19 | 20 | option (BUILD_TESTING "Build the testing tree." OFF) 21 | # Only build all if we are the top-level project 22 | # Allows this to be used by super projects with `add_subdirectory` 23 | if (BUILD_TESTING OR (PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) 24 | enable_testing() 25 | 26 | add_subdirectory(vendors/gtest) 27 | add_subdirectory(src/tests) 28 | endif() 29 | -------------------------------------------------------------------------------- /thirdparty/chillout/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Taras Kushnir 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /thirdparty/chillout/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.0.{build}-{branch} 2 | 3 | clone_folder: c:\projects\chillout 4 | 5 | image: 6 | - Visual Studio 2017 7 | 8 | configuration: 9 | - Debug 10 | #- Release 11 | 12 | skip_commits: 13 | message: /.*\[ci skip\]/ # Regex for matching commit message 14 | 15 | platform: 16 | - x64 17 | 18 | before_build: 19 | - git submodule update --init --recursive 20 | - mkdir build 21 | - cd build 22 | - cmake --version 23 | - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" 24 | - cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug 25 | 26 | build_script: 27 | - nmake.exe 28 | 29 | test_script: 30 | - nmake test ARGS=-V 31 | - set "crash_dump=c:\projects\chillout\src\tests\chillout_test*.dmp" 32 | - if not exist "%crash_dump%" EXIT /B 1 33 | 34 | on_success: 35 | - ps: Get-ChildItem c:\projects\chillout\src\tests\*.dmp | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } 36 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(chillout CXX) 4 | 5 | set(SOURCES chillout.h chillout.cpp defines.h common/common.h common/common.cpp) 6 | 7 | if(WIN32) 8 | set(SOURCES ${SOURCES} windows/StackWalker.h windows/StackWalker.cpp windows/windowscrashhandler.h windows/windowscrashhandler.cpp) 9 | add_definitions(-D_UNICODE -D_MBCS -DUNICODE) 10 | else() 11 | set(SOURCES ${SOURCES} posix/posixcrashhandler.h posix/posixcrashhandler.cpp) 12 | endif() 13 | 14 | add_library(chillout SHARED STATIC ${SOURCES}) 15 | target_include_directories(chillout PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 16 | 17 | set_property(TARGET chillout PROPERTY POSITION_INDEPENDENT_CODE ON) 18 | 19 | if(UNIX) 20 | target_link_libraries(chillout dl) 21 | endif() 22 | 23 | if (WIN32) 24 | target_link_libraries(chillout DbgHelp) 25 | endif() 26 | 27 | install(TARGETS chillout DESTINATION lib) 28 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/chillout.h: -------------------------------------------------------------------------------- 1 | #ifndef CHILLOUT_H 2 | #define CHILLOUT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "common/common.h" 8 | 9 | namespace Debug { 10 | class Chillout { 11 | public: 12 | static Chillout& getInstance() 13 | { 14 | static Chillout instance; // Guaranteed to be destroyed. 15 | // Instantiated on first use. 16 | return instance; 17 | } 18 | 19 | public: 20 | #ifdef _WIN32 21 | typedef std::wstring string_t; 22 | #else 23 | typedef std::string string_t; 24 | #endif 25 | 26 | public: 27 | void init(const string_t &appName, const string_t &pathToDumpsDir); 28 | void deinit(); 29 | void setBacktraceCallback(const std::function &callback); 30 | void setCrashCallback(const std::function &callback); 31 | void backtrace(); 32 | 33 | #ifdef _WIN32 34 | public: 35 | void createCrashDump(CrashDumpSize size = CrashDumpNormal); 36 | #endif 37 | 38 | private: 39 | Chillout(): m_InitCounter(0) {} 40 | Chillout(Chillout const&); 41 | void operator=(Chillout const&); 42 | 43 | private: 44 | std::atomic_int m_InitCounter; 45 | }; 46 | } 47 | 48 | #endif // CHILLOUT_H 49 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/common/common.cpp: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include 3 | #include 4 | #include 5 | 6 | namespace Debug { 7 | tm now() { 8 | time_t now = time(0); 9 | return *localtime(&now); 10 | } 11 | 12 | #ifdef _WIN32 13 | std::wostream& formatDateTime(std::wostream& out, const tm& t, const wchar_t* fmt) { 14 | const std::time_put& dateWriter = std::use_facet >(out.getloc()); 15 | const size_t n = wcslen(fmt); 16 | #else 17 | std::ostream& formatDateTime(std::ostream& out, const tm& t, const char* fmt) { 18 | const std::time_put& dateWriter = std::use_facet >(out.getloc()); 19 | const size_t n = strlen(fmt); 20 | #endif 21 | dateWriter.put(out, out, ' ', &t, fmt, fmt + n); 22 | return out; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/common/common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H 2 | #define COMMON_H 3 | 4 | #include 5 | #include 6 | 7 | #define CHILLOUT_DATETIME "%Y%m%d_%H%M%S" 8 | 9 | namespace Debug { 10 | tm now(); 11 | #ifdef _WIN32 12 | std::wostream& formatDateTime(std::wostream& out, const tm& t, const wchar_t *fmt); 13 | #else 14 | std::ostream& formatDateTime(std::ostream& out, const tm& t, const char* fmt); 15 | #endif 16 | 17 | enum CrashDumpSize { 18 | CrashDumpSmall, 19 | CrashDumpNormal, 20 | CrashDumpFull 21 | }; 22 | } 23 | 24 | #endif // COMMON_H 25 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/defines.h: -------------------------------------------------------------------------------- 1 | #ifndef CHILLOUTDEFINES_H 2 | #define CHILLOUTDEFINES_H 3 | 4 | #define CHILLOUT_EXIT_CODE 3 5 | 6 | #define STRINGIZE_(x) #x 7 | #define STRINGIZE(x) STRINGIZE_(x) 8 | 9 | #ifdef _WIN32 10 | #define WIDEN(quote) WIDEN2(quote) 11 | #define WIDEN2(quote) L##quote 12 | #else 13 | #define WIDEN(quote) quote 14 | #endif 15 | 16 | #endif // CHILLOUTDEFINES_H 17 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/posix/posixcrashhandler.h: -------------------------------------------------------------------------------- 1 | #ifndef POSIXCRASHHANDLER_H 2 | #define POSIXCRASHHANDLER_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Debug { 8 | class PosixCrashHandler { 9 | public: 10 | static PosixCrashHandler& getInstance() 11 | { 12 | static PosixCrashHandler instance; // Guaranteed to be destroyed. 13 | // Instantiated on first use. 14 | return instance; 15 | } 16 | 17 | private: 18 | PosixCrashHandler(); 19 | ~PosixCrashHandler(); 20 | 21 | public: 22 | void setup(const std::string &appName, const std::string &crashDirPath); 23 | void teardown(); 24 | void handleCrash(); 25 | void setCrashCallback(const std::function &callback); 26 | void setBacktraceCallback(const std::function &callback); 27 | void backtrace(); 28 | 29 | private: 30 | void walkStackTrace(char *memory, size_t memorySize, int maxFrames=128); 31 | char *dlDemangle(void *addr, char *symbol, int frameIndex, char *stackMemory); 32 | 33 | private: 34 | std::function m_crashCallback; 35 | std::function m_backtraceCallback; 36 | char *m_stackMemory; 37 | char *m_demangleMemory; 38 | std::string m_backtraceFilePath; 39 | }; 40 | } 41 | 42 | #endif // POSIXCRASHHANDLER_H 43 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/chillout/windows/StackWalker.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/chillout/src/chillout/windows/StackWalker.cpp -------------------------------------------------------------------------------- /thirdparty/chillout/src/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(chillout_tests_project CXX) 4 | 5 | set(SOURCES tests_main.cpp tests_source.h tests_source.cpp tests_crashes.cpp tests_recovery.cpp gtest_extensions.h gtest_extensions.cpp) 6 | 7 | add_executable(chillout_test ${SOURCES}) 8 | 9 | FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_LIST_DIR} CRASH_DUMPS_ROOT) 10 | 11 | if(WIN32) 12 | STRING(REGEX REPLACE "\\\\" "\\\\\\\\" CRASH_DUMPS_ROOT ${CRASH_DUMPS_ROOT} ) 13 | endif() 14 | 15 | add_definitions(-DCRASHDUMPSDIR=${CRASH_DUMPS_ROOT}) 16 | message("Crash dumps root: ${CRASH_DUMPS_ROOT}") 17 | 18 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") 19 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") 20 | endif() 21 | 22 | target_include_directories(chillout_test PRIVATE ${CHILLOUT_SOURCE_DIR}) 23 | target_include_directories(chillout_test PRIVATE ${GTEST_SOURCE_DIR}/googletest/include) 24 | target_include_directories(chillout_test PRIVATE ${GTEST_SOURCE_DIR}/include) 25 | 26 | # GTest needs threading support 27 | 28 | if(WIN32) 29 | # stackwalker stuff 30 | target_link_libraries(chillout_test Advapi32 DbgHelp) 31 | endif() 32 | 33 | target_link_libraries(chillout_test gtest_main) 34 | target_link_libraries(chillout_test chillout) 35 | 36 | add_test(NAME ChilloutTest COMMAND chillout_test) 37 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/tests/gtest_extensions.cpp: -------------------------------------------------------------------------------- 1 | #include "gtest_extensions.h" 2 | 3 | namespace extensions { 4 | ExitedOrKilled::ExitedOrKilled(int exit_code, int signal): 5 | _exitedWithCode(exit_code) 6 | #ifndef _WIN32 7 | ,_killedBySignal(signal) 8 | #endif 9 | { } 10 | 11 | bool ExitedOrKilled::operator()(int value) const { 12 | return _exitedWithCode(value) || 13 | #ifndef _WIN32 14 | _killedBySignal(value); 15 | #else 16 | false; 17 | #endif 18 | } 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/tests/gtest_extensions.h: -------------------------------------------------------------------------------- 1 | #ifndef GTEST_EXTENSIONS_H 2 | #define GTEST_EXTENSIONS_H 3 | 4 | #include 5 | 6 | namespace extensions { 7 | // Tests that an exit code describes a normal exit with a given exit code. 8 | class GTEST_API_ ExitedOrKilled { 9 | public: 10 | explicit ExitedOrKilled(int exit_code, int signal); 11 | bool operator()(int value) const; 12 | 13 | private: 14 | // No implementation - assignment is unsupported. 15 | void operator=(const ExitedOrKilled& other); 16 | 17 | #ifndef _WIN32 18 | ::testing::KilledBySignal _killedBySignal; 19 | #endif 20 | ::testing::ExitedWithCode _exitedWithCode; 21 | }; 22 | } 23 | 24 | #endif // GTEST_EXTENSIONS_H 25 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/tests/tests_crashes.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "tests_source.h" 4 | 5 | TEST (CrashTest, PureVirtualMethodCallTest) { 6 | ASSERT_DEATH(Derived(), ""); 7 | } 8 | 9 | TEST (CrashTest, AccessViolationTest) { 10 | ASSERT_DEATH(AccessViolation(), ""); 11 | } 12 | 13 | // This test is disabled because of CRT assert window. 14 | // This window could be disabled for a process but 15 | // gtest starts new process for DEATH tests so it 16 | // makes no sense to run it. 17 | TEST (CrashTest, DISABLED_InvalidParameterTest) { 18 | ASSERT_DEATH(InvalidParameter(), ""); 19 | } 20 | 21 | TEST (CrashTest, SigillTest) { 22 | ASSERT_DEATH(RaiseSigill(), ""); 23 | } 24 | 25 | TEST (CrashTest, SigsegvTest) { 26 | ASSERT_DEATH(RaiseSigsegv(), ""); 27 | } 28 | 29 | TEST (CrashTest, SigtermTest) { 30 | ASSERT_DEATH(RaiseSigterm(), ""); 31 | } 32 | 33 | TEST (CrashTest, ThrowExceptionTest) { 34 | ASSERT_ANY_THROW(ThrowException()); 35 | } 36 | 37 | TEST (CrashTest, DISABLED_MemoryTest) { 38 | ASSERT_ANY_THROW(MemoryOverflow()); 39 | } 40 | 41 | TEST (CrashTest, DISABLED_StackOverflowTest) { 42 | ASSERT_DEATH(StackOverflow(), ""); 43 | } 44 | 45 | TEST (CrashTest, RaiseExceptionTest) { 46 | ASSERT_DEATH(RaiseSehException(), ""); 47 | } 48 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/tests/tests_main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char **argv) { 4 | ::testing::GTEST_FLAG(catch_exceptions) = false; 5 | ::testing::GTEST_FLAG(death_test_style) = "threadsafe"; 6 | //::testing::GTEST_FLAG(filter) = "RecoveryTest.AccessViolationTest"; 7 | 8 | ::testing::InitGoogleTest(&argc, argv); 9 | return RUN_ALL_TESTS(); 10 | } 11 | -------------------------------------------------------------------------------- /thirdparty/chillout/src/tests/tests_source.h: -------------------------------------------------------------------------------- 1 | #ifndef TESTS_SOURCE 2 | #define TESTS_SOURCE 3 | 4 | class Derived; 5 | 6 | class Base 7 | { 8 | public: 9 | Base(Derived *derived): m_pDerived(derived) {} 10 | ~Base(); 11 | virtual void function(void) = 0; 12 | 13 | Derived * m_pDerived; 14 | }; 15 | 16 | #pragma warning(disable:4355) 17 | class Derived : public Base 18 | { 19 | public: 20 | Derived() : Base(this) {}; // C4355 21 | virtual void function(void) {} 22 | }; 23 | 24 | void AccessViolation(); 25 | void InvalidParameter(); 26 | void RaiseSigill(); 27 | void RaiseSigsegv(); 28 | void RaiseSigterm(); 29 | void ThrowException(); 30 | void MemoryOverflow(); 31 | void StackOverflow(); 32 | void RaiseSehException(); 33 | 34 | #endif // TESTS_SOURCE 35 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 yhirose 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/Dockerfile.hello: -------------------------------------------------------------------------------- 1 | FROM alpine as builder 2 | WORKDIR /src/example 3 | RUN apk add g++ make openssl-dev zlib-dev brotli-dev 4 | COPY ./httplib.h /src 5 | COPY ./example/hello.cc /src/example 6 | COPY ./example/Makefile /src/example 7 | RUN make hello 8 | 9 | FROM alpine 10 | RUN apk --no-cache add brotli libstdc++ 11 | COPY --from=builder /src/example/hello /bin/hello 12 | CMD ["/bin/hello"] 13 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/benchmark.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | struct StopWatch { 8 | StopWatch(const string &label) : label_(label) { 9 | start_ = chrono::system_clock::now(); 10 | } 11 | ~StopWatch() { 12 | auto end = chrono::system_clock::now(); 13 | auto diff = end - start_; 14 | auto count = chrono::duration_cast(diff).count(); 15 | cout << label_ << ": " << count << " millisec." << endl; 16 | } 17 | string label_; 18 | chrono::system_clock::time_point start_; 19 | }; 20 | 21 | int main(void) { 22 | string body(1024 * 5, 'a'); 23 | 24 | httplib::Client cli("httpbin.org", 80); 25 | 26 | for (int i = 0; i < 3; i++) { 27 | StopWatch sw(to_string(i).c_str()); 28 | auto res = cli.Post("/post", body, "application/octet-stream"); 29 | assert(res->status == 200); 30 | } 31 | 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/client.cc: -------------------------------------------------------------------------------- 1 | // 2 | // client.cc 3 | // 4 | // Copyright (c) 2019 Yuji Hirose. All rights reserved. 5 | // MIT License 6 | // 7 | 8 | #include 9 | #include 10 | 11 | #define CA_CERT_FILE "./ca-bundle.crt" 12 | 13 | using namespace std; 14 | 15 | int main(void) { 16 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 17 | httplib::SSLClient cli("localhost", 8080); 18 | // httplib::SSLClient cli("google.com"); 19 | // httplib::SSLClient cli("www.youtube.com"); 20 | cli.set_ca_cert_path(CA_CERT_FILE); 21 | cli.enable_server_certificate_verification(true); 22 | #else 23 | httplib::Client cli("localhost", 8080); 24 | #endif 25 | 26 | if (auto res = cli.Get("/hi")) { 27 | cout << res->status << endl; 28 | cout << res->get_header_value("Content-Type") << endl; 29 | cout << res->body << endl; 30 | } else { 31 | cout << "error code: " << res.error() << std::endl; 32 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 33 | auto result = cli.get_openssl_verify_result(); 34 | if (result) { 35 | cout << "verify error: " << X509_verify_cert_error_string(result) << endl; 36 | } 37 | #endif 38 | } 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/hello.cc: -------------------------------------------------------------------------------- 1 | // 2 | // hello.cc 3 | // 4 | // Copyright (c) 2019 Yuji Hirose. All rights reserved. 5 | // MIT License 6 | // 7 | 8 | #include 9 | using namespace httplib; 10 | 11 | int main(void) { 12 | Server svr; 13 | 14 | svr.Get("/hi", [](const Request & /*req*/, Response &res) { 15 | res.set_content("Hello World!", "text/plain"); 16 | }); 17 | 18 | svr.listen("0.0.0.0", 8080); 19 | } 20 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/redirect.cc: -------------------------------------------------------------------------------- 1 | // 2 | // redirect.cc 3 | // 4 | // Copyright (c) 2019 Yuji Hirose. All rights reserved. 5 | // MIT License 6 | // 7 | 8 | #include 9 | 10 | #define SERVER_CERT_FILE "./cert.pem" 11 | #define SERVER_PRIVATE_KEY_FILE "./key.pem" 12 | 13 | using namespace httplib; 14 | 15 | int main(void) { 16 | // HTTP server 17 | Server http; 18 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 19 | SSLServer https(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE); 20 | #endif 21 | 22 | http.Get("/test", [](const Request & /*req*/, Response &res) { 23 | res.set_content("Test\n", "text/plain"); 24 | }); 25 | 26 | http.set_error_handler([](const Request & /*req*/, Response &res) { 27 | res.set_redirect("https://localhost:8081/"); 28 | }); 29 | 30 | // HTTPS server 31 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 32 | https.Get("/", [=](const Request & /*req*/, Response &res) { 33 | res.set_redirect("/hi"); 34 | }); 35 | 36 | https.Get("/hi", [](const Request & /*req*/, Response &res) { 37 | res.set_content("Hello World!\n", "text/plain"); 38 | }); 39 | 40 | https.Get("/stop", [&](const Request & /*req*/, Response & /*res*/) { 41 | https.stop(); 42 | http.stop(); 43 | }); 44 | #endif 45 | 46 | // Run servers 47 | auto httpThread = std::thread([&]() { http.listen("localhost", 8080); }); 48 | 49 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 50 | auto httpsThread = std::thread([&]() { https.listen("localhost", 8081); }); 51 | #endif 52 | 53 | httpThread.join(); 54 | 55 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 56 | httpsThread.join(); 57 | #endif 58 | 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/simplecli.cc: -------------------------------------------------------------------------------- 1 | // 2 | // simplecli.cc 3 | // 4 | // Copyright (c) 2019 Yuji Hirose. All rights reserved. 5 | // MIT License 6 | // 7 | 8 | #include 9 | #include 10 | 11 | using namespace std; 12 | 13 | int main(void) { 14 | #ifdef CPPHTTPLIB_OPENSSL_SUPPORT 15 | auto scheme_host_port = "https://localhost:8080"; 16 | #else 17 | auto scheme_host_port = "http://localhost:8080"; 18 | #endif 19 | 20 | if (auto res = httplib::Client(scheme_host_port).Get("/hi")) { 21 | cout << res->status << endl; 22 | cout << res->get_header_value("Content-Type") << endl; 23 | cout << res->body << endl; 24 | } else { 25 | cout << res.error() << endl; 26 | } 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/example/uploader.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | for i in {1..10000} 3 | do 4 | echo "#### $i ####" 5 | curl -X POST -F image_file=@$1 http://localhost:1234/post > /dev/null 6 | done 7 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/meson_options.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Andrea Pappacoda 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | option('cpp-httplib_openssl', type: 'feature', value: 'auto', description: 'Enable OpenSSL support') 6 | option('cpp-httplib_zlib', type: 'feature', value: 'auto', description: 'Enable zlib support') 7 | option('cpp-httplib_brotli', type: 'feature', value: 'auto', description: 'Enable Brotli support') 8 | option('cpp-httplib_compile', type: 'boolean', value: false, description: 'Split the header into a compilable header & source file (requires python3)') 9 | option('cpp-httplib_test', type: 'boolean', value: false, description: 'Build tests') 10 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #CXX = clang++ 3 | # Do not add default sanitizer flags here as OSS-fuzz adds its own sanitizer flags. 4 | CXXFLAGS += -ggdb -O0 -std=c++11 -DGTEST_USE_OWN_TR1_TUPLE -I../.. -I. -Wall -Wextra -Wtype-limits -Wconversion 5 | 6 | OPENSSL_DIR = /usr/local/opt/openssl@1.1 7 | 8 | # Using full path to libssl and libcrypto to avoid accidentally picking openssl libs brought in by msan. 9 | OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -I$(OPENSSL_DIR)/lib /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a 10 | 11 | ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz 12 | 13 | BROTLI_DIR = /usr/local/opt/brotli 14 | # BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/include -L$(BROTLI_DIR)/lib -lbrotlicommon -lbrotlienc -lbrotlidec 15 | 16 | # Runs all the tests and also fuzz tests against seed corpus. 17 | all : server_fuzzer 18 | ./server_fuzzer corpus/* 19 | 20 | # Fuzz target, so that you can choose which $(LIB_FUZZING_ENGINE) to use. 21 | server_fuzzer : server_fuzzer.cc ../../httplib.h 22 | # $(CXX) $(CXXFLAGS) -o $@ $< -Wl,-Bstatic $(OPENSSL_SUPPORT) -Wl,-Bdynamic -ldl $(ZLIB_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread 23 | $(CXX) $(CXXFLAGS) -o $@ $< $(ZLIB_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread 24 | zip -q -r server_fuzzer_seed_corpus.zip corpus 25 | 26 | clean: 27 | rm -f server_fuzzer pem *.0 *.o *.1 *.srl *.zip 28 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/1: -------------------------------------------------------------------------------- 1 | PUT /search/sample?a=12 HTTP/1.1 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/2: -------------------------------------------------------------------------------- 1 | GET /hello.htm HTTP/1.1 2 | User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) 3 | Accept-Language: en-us 4 | Accept-Encoding: gzip, deflate 5 | Connection: Keep-Alive -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/3 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5372331946541056: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5372331946541056 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5386708825800704: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5386708825800704 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5667822731132928: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5667822731132928 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5942767436562432: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-5942767436562432 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-6007379124158464: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-6007379124158464 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-6508706672541696: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/clusterfuzz-testcase-minimized-server_fuzzer-6508706672541696 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/corpus/issue1264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/fuzzing/corpus/issue1264 -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/fuzzing/standalone_fuzz_target_runner.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All Rights Reserved. 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | 4 | // This runner does not do any fuzzing, but allows us to run the fuzz target 5 | // on the test corpus or on a single file, 6 | // e.g. the one that comes from a bug report. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | // Forward declare the "fuzz target" interface. 14 | // We deliberately keep this inteface simple and header-free. 15 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); 16 | 17 | // It reads all files passed as parameters and feeds their contents 18 | // one by one into the fuzz target (LLVMFuzzerTestOneInput). 19 | int main(int argc, char **argv) { 20 | for (int i = 1; i < argc; i++) { 21 | std::ifstream in(argv[i]); 22 | in.seekg(0, in.end); 23 | size_t length = static_cast(in.tellg()); 24 | in.seekg (0, in.beg); 25 | std::cout << "Reading " << length << " bytes from " << argv[i] << std::endl; 26 | // Allocate exactly length bytes so that we reliably catch buffer overflows. 27 | std::vector bytes(length); 28 | in.read(bytes.data(), static_cast(bytes.size())); 29 | LLVMFuzzerTestOneInput(reinterpret_cast(bytes.data()), 30 | bytes.size()); 31 | std::cout << "Execution successful" << std::endl; 32 | } 33 | std::cout << "Execution finished" << std::endl; 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/cpp-httplib/test/image.jpg -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/include_httplib.cc: -------------------------------------------------------------------------------- 1 | // The sole purpose of this file is to include httplib.h in a separate 2 | // compilation unit, thus verifying that inline keywords have not been forgotten 3 | // when linked together with test.cc. 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:7 2 | 3 | ARG auth="basic" 4 | ARG port="3128" 5 | 6 | RUN yum install -y squid 7 | 8 | COPY ./${auth}_squid.conf /etc/squid/squid.conf 9 | COPY ./${auth}_passwd /etc/squid/passwd 10 | 11 | EXPOSE ${port} 12 | 13 | CMD ["/usr/sbin/squid", "-N"] 14 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/proxy/basic_passwd: -------------------------------------------------------------------------------- 1 | hello:$apr1$O6S28OBL$8dr3ixl4Mohf97hgsYvLy/ 2 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/proxy/digest_passwd: -------------------------------------------------------------------------------- 1 | hello:world 2 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/proxy/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | squid_basic: 5 | image: squid_basic 6 | restart: always 7 | ports: 8 | - "3128:3128" 9 | build: 10 | context: ./ 11 | args: 12 | auth: basic 13 | 14 | squid_digest: 15 | image: squid_digest 16 | restart: always 17 | ports: 18 | - "3129:3129" 19 | build: 20 | context: ./ 21 | args: 22 | auth: digest 23 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/test.conf: -------------------------------------------------------------------------------- 1 | [req] 2 | default_bits = 2048 3 | distinguished_name = req_distinguished_name 4 | attributes = req_attributes 5 | prompt = no 6 | output_password = mypass 7 | 8 | [req_distinguished_name] 9 | C = US 10 | ST = Test State or Province 11 | L = Test Locality 12 | O = Organization Name 13 | OU = Organizational Unit Name 14 | CN = Common Name 15 | emailAddress = test@email.address 16 | 17 | [req_attributes] 18 | challengePassword = 1234 19 | 20 | [SAN] 21 | subjectAltName=IP:127.0.0.1 22 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/test.rootCA.conf: -------------------------------------------------------------------------------- 1 | [req] 2 | default_bits = 2048 3 | distinguished_name = req_distinguished_name 4 | attributes = req_attributes 5 | prompt = no 6 | output_password = mypass 7 | 8 | [req_distinguished_name] 9 | C = US 10 | ST = Test State or Province 11 | L = Test Locality 12 | O = Organization Name 13 | OU = Organizational Unit Name 14 | CN = Root CA Name 15 | emailAddress = test@email.address 16 | 17 | [req_attributes] 18 | challengePassword = 1234 19 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/test.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2013 for Windows Desktop 4 | VisualStudioVersion = 12.0.20617.1 PREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|Win32.Build.0 = Debug|Win32 18 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|x64.ActiveCfg = Debug|x64 19 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Debug|x64.Build.0 = Debug|x64 20 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|Win32.ActiveCfg = Release|Win32 21 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|Win32.Build.0 = Release|Win32 22 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|x64.ActiveCfg = Release|x64 23 | {6B3E6769-052D-4BC0-9D2C-E9127C3DBB26}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www/dir/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test 6 | hi 7 | 8 | 9 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www/dir/meson.build: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Andrea Pappacoda 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | configure_file(input: 'index.html', output: 'index.html', copy: true) 6 | configure_file(input: 'test.abcde', output: 'test.abcde', copy: true) 7 | configure_file(input: 'test.html', output: 'test.html', copy: true) 8 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www/dir/test.abcde: -------------------------------------------------------------------------------- 1 | abcde -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www/dir/test.html: -------------------------------------------------------------------------------- 1 | test.html -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www2/dir/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test 6 | hi 7 | 8 | 9 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www2/dir/meson.build: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Andrea Pappacoda 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | configure_file(input: 'index.html', output: 'index.html', copy: true) 6 | configure_file(input: 'test.html', output: 'test.html', copy: true) 7 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www2/dir/test.html: -------------------------------------------------------------------------------- 1 | test.html -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www3/dir/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test 6 | hi 7 | 8 | 9 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www3/dir/meson.build: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Andrea Pappacoda 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | configure_file(input: 'index.html', output: 'index.html', copy: true) 6 | configure_file(input: 'test.html', output: 'test.html', copy: true) 7 | -------------------------------------------------------------------------------- /thirdparty/cpp-httplib/test/www3/dir/test.html: -------------------------------------------------------------------------------- 1 | test.html -------------------------------------------------------------------------------- /thirdparty/openal-soft/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(OpenAL SHARED IMPORTED GLOBAL) 2 | set_target_properties(OpenAL PROPERTIES 3 | IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/thirdparty/openal-soft/bin/OpenAL32.dll" 4 | IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/thirdparty/openal-soft/libs/OpenAL32.lib" 5 | INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/thirdparty/openal-soft/include" 6 | ) -------------------------------------------------------------------------------- /thirdparty/openal-soft/README.md: -------------------------------------------------------------------------------- 1 | OpenAL-soft is licensed under the LGPL 2.0 (see COPYING file). 2 | Source code is available at: https://github.com/kcat/openal-soft 3 | 4 | -------------------------------------------------------------------------------- /thirdparty/openal-soft/VERSION: -------------------------------------------------------------------------------- 1 | 1.24.2 -------------------------------------------------------------------------------- /thirdparty/openal-soft/bin/OpenAL32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/openal-soft/bin/OpenAL32.dll -------------------------------------------------------------------------------- /thirdparty/openal-soft/include/AL/efx-creative.h: -------------------------------------------------------------------------------- 1 | /* The tokens that would be defined here are already defined in efx.h. This 2 | * empty file is here to provide compatibility with Windows-based projects 3 | * that would include it. */ 4 | -------------------------------------------------------------------------------- /thirdparty/openal-soft/libs/OpenAL32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pinemarten/GothicMultiplayer/b80529865e3b51ff8f5d9027179431d4a236a590/thirdparty/openal-soft/libs/OpenAL32.lib -------------------------------------------------------------------------------- /triplets/x64-linux.cmake: -------------------------------------------------------------------------------- 1 | set(VCPKG_TARGET_ARCHITECTURE x64) 2 | set(VCPKG_CRT_LINKAGE static) 3 | set(VCPKG_LIBRARY_LINKAGE static) 4 | set(VCPKG_CMAKE_SYSTEM_NAME Linux) 5 | 6 | if(PORT MATCHES "openal-soft") 7 | set(VCPKG_LIBRARY_LINKAGE dynamic) 8 | endif() -------------------------------------------------------------------------------- /triplets/x86-linux.cmake: -------------------------------------------------------------------------------- 1 | set(VCPKG_TARGET_ARCHITECTURE x86) 2 | set(VCPKG_CRT_LINKAGE static) 3 | set(VCPKG_LIBRARY_LINKAGE static) 4 | set(VCPKG_CMAKE_SYSTEM_NAME Linux) 5 | 6 | if(PORT MATCHES "openal-soft") 7 | set(VCPKG_LIBRARY_LINKAGE dynamic) 8 | endif() -------------------------------------------------------------------------------- /triplets/x86-windows.cmake: -------------------------------------------------------------------------------- 1 | 2 | set(VCPKG_TARGET_ARCHITECTURE x86) 3 | set(VCPKG_CRT_LINKAGE static) 4 | set(VCPKG_LIBRARY_LINKAGE static) 5 | 6 | if(PORT MATCHES "openal-soft") 7 | set(VCPKG_LIBRARY_LINKAGE dynamic) 8 | endif() -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gothicmultiplayer", 3 | "version-string": "0.2", 4 | "dependencies": [ 5 | { 6 | "name": "fmt", 7 | "version>=": "11.0.2" 8 | }, 9 | { 10 | "name": "spdlog", 11 | "version>=": "1.15.1" 12 | }, 13 | { 14 | "name": "zlib", 15 | "version>=": "1.3.1" 16 | }, 17 | { 18 | "name": "toml11", 19 | "version>=": "4.3.0" 20 | }, 21 | { 22 | "name": "pugixml", 23 | "version>=": "1.15" 24 | }, 25 | { 26 | "name": "lua", 27 | "version>=": "5.4.7" 28 | }, 29 | { 30 | "name": "sol2", 31 | "version>=": "3.3.1" 32 | }, 33 | { 34 | "name": "gtest", 35 | "version>=": "1.16.0" 36 | }, 37 | { 38 | "name": "nlohmann-json", 39 | "version>=": "3.11.3" 40 | }, 41 | { 42 | "name": "glm", 43 | "version>=": "1.0.1#3" 44 | }, 45 | { 46 | "name": "bitsery", 47 | "version>=": "5.2.4" 48 | } 49 | ], 50 | "builtin-baseline": "300239058e33420acd153135b3f6e6b187828992" 51 | } --------------------------------------------------------------------------------