modified windows version, added rnet stubs

Signed-off-by: Jak Barnes <contact@jakbarnes.co.uk>
This commit is contained in:
Jak Barnes 2019-02-13 13:42:15 +00:00
parent 0a31f94343
commit 06ac5483a2
3 changed files with 298 additions and 191 deletions

View File

@ -22,7 +22,7 @@
<ProjectGuid>{E89D61AC-55DE-4482-AFD4-DF7242EBC859}</ProjectGuid> <ProjectGuid>{E89D61AC-55DE-4482-AFD4-DF7242EBC859}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>raylib</RootNamespace> <RootNamespace>raylib</RootNamespace>
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -163,6 +163,7 @@
<ClCompile Include="..\..\..\src\core.c" /> <ClCompile Include="..\..\..\src\core.c" />
<ClCompile Include="..\..\..\src\models.c" /> <ClCompile Include="..\..\..\src\models.c" />
<ClCompile Include="..\..\..\src\rglfw.c" /> <ClCompile Include="..\..\..\src\rglfw.c" />
<ClCompile Include="..\..\..\src\rnet.c" />
<ClCompile Include="..\..\..\src\shapes.c" /> <ClCompile Include="..\..\..\src\shapes.c" />
<ClCompile Include="..\..\..\src\text.c" /> <ClCompile Include="..\..\..\src\text.c" />
<ClCompile Include="..\..\..\src\textures.c" /> <ClCompile Include="..\..\..\src\textures.c" />
@ -184,6 +185,7 @@
<ClInclude Include="..\..\..\src\raylib.h" /> <ClInclude Include="..\..\..\src\raylib.h" />
<ClInclude Include="..\..\..\src\raymath.h" /> <ClInclude Include="..\..\..\src\raymath.h" />
<ClInclude Include="..\..\..\src\rlgl.h" /> <ClInclude Include="..\..\..\src\rlgl.h" />
<ClInclude Include="..\..\..\src\rnet.h" />
<ClInclude Include="..\..\..\src\utils.h" /> <ClInclude Include="..\..\..\src\utils.h" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

54
src/rnet.c Normal file
View File

@ -0,0 +1,54 @@
/**********************************************************************************************
*
* rnet - A simple and easy-to-use network module for raylib
*
* FEATURES:
* - Manage network stuff
*
* DEPENDENCIES:
* core.h - core stuff
*
* CONTRIBUTORS:
* Jak Barnes (github: @syphonx) (Feb. 2019):
* - Initial version
*
*
* LICENSE: zlib/libpng
*
* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
**********************************************************************************************/
#if defined(RNET_STANDALONE)
#include "raudio.h"
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
#else
#include "raylib.h" // Declares module functions
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
#endif
#include "utils.h" // Required for: fopen() Android mapping
#endif
void HelloWorld(void);
void HelloWorld()
{
TraceLog(LOG_DEBUG, "Hello, World!");
}

51
src/rnet.h Normal file
View File

@ -0,0 +1,51 @@
/**********************************************************************************************
*
* rnet - A simple and easy-to-use network module for raylib
*
* FEATURES:
* - Manage network stuff
*
* DEPENDENCIES:
* core.h - core stuff
*
* CONTRIBUTORS:
* Jak Barnes (github: @syphonx) (Feb. 2019):
* - Initial version
*
*
* LICENSE: zlib/libpng
*
* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, including commercial
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not claim that you
* wrote the original software. If you use this software in a product, an acknowledgment
* in the product documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
* as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
**********************************************************************************************/
#ifndef NET_H
#define NET_H
#ifdef __cplusplus
extern "C" { // Prevents name mangling of functions
#endif
void HelloWorld(void);
#ifdef __cplusplus
}
#endif
#endif // NET_H