diff --git a/examples/network/network_chat_client.c b/examples/network/network_chat_client.c deleted file mode 100644 index 7a424d933..000000000 --- a/examples/network/network_chat_client.c +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Basic window -* -* Welcome to raylib! -* -* To test examples, just press F6 and execute raylib_compile_execute script -* Note that compiled executable is placed in the same folder as .c file -* -* You can find all basic examples on C:\raylib\raylib\examples folder or -* raylib official webpage: www.raylib.com -* -* Enjoy using raylib. :) -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib.h" - -int main() -{ - int screenWidth = 800; - int screenHeight = 450; - InitWindow( - screenWidth, screenHeight, "raylib [core] example - basic window"); - SetTargetFPS(60); - - // Main game loop - while (!WindowShouldClose()) - { - BeginDrawing(); - ClearBackground(RAYWHITE); - DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); - EndDrawing(); - } - CloseWindow(); - - return 0; -} \ No newline at end of file diff --git a/examples/network/network_chat_server.c b/examples/network/network_chat_server.c deleted file mode 100644 index 7a424d933..000000000 --- a/examples/network/network_chat_server.c +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Basic window -* -* Welcome to raylib! -* -* To test examples, just press F6 and execute raylib_compile_execute script -* Note that compiled executable is placed in the same folder as .c file -* -* You can find all basic examples on C:\raylib\raylib\examples folder or -* raylib official webpage: www.raylib.com -* -* Enjoy using raylib. :) -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib.h" - -int main() -{ - int screenWidth = 800; - int screenHeight = 450; - InitWindow( - screenWidth, screenHeight, "raylib [core] example - basic window"); - SetTargetFPS(60); - - // Main game loop - while (!WindowShouldClose()) - { - BeginDrawing(); - ClearBackground(RAYWHITE); - DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); - EndDrawing(); - } - CloseWindow(); - - return 0; -} \ No newline at end of file diff --git a/examples/network/network_resolve_host.c b/examples/network/network_resolve_host.c index 12f489cd4..266d28ccb 100644 --- a/examples/network/network_resolve_host.c +++ b/examples/network/network_resolve_host.c @@ -1,6 +1,6 @@ /******************************************************************************************* * - * raylib [network] example - Resolve host + * raylib [network] example - Resolve Host * * Welcome to raylib! * diff --git a/examples/network/network_serialisation.c b/examples/network/network_serialisation.c deleted file mode 100644 index 7a424d933..000000000 --- a/examples/network/network_serialisation.c +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************************* -* -* raylib [core] example - Basic window -* -* Welcome to raylib! -* -* To test examples, just press F6 and execute raylib_compile_execute script -* Note that compiled executable is placed in the same folder as .c file -* -* You can find all basic examples on C:\raylib\raylib\examples folder or -* raylib official webpage: www.raylib.com -* -* Enjoy using raylib. :) -* -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -* -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) -* -********************************************************************************************/ - -#include "raylib.h" - -int main() -{ - int screenWidth = 800; - int screenHeight = 450; - InitWindow( - screenWidth, screenHeight, "raylib [core] example - basic window"); - SetTargetFPS(60); - - // Main game loop - while (!WindowShouldClose()) - { - BeginDrawing(); - ClearBackground(RAYWHITE); - DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); - EndDrawing(); - } - CloseWindow(); - - return 0; -} \ No newline at end of file diff --git a/examples/network/network_tcp_client.c b/examples/network/network_tcp_client.c index 7b9172708..3379c17b4 100644 --- a/examples/network/network_tcp_client.c +++ b/examples/network/network_tcp_client.c @@ -1,3 +1,25 @@ +/******************************************************************************************* + * + * raylib [network] example - TCP Client + * + * Welcome to raylib! + * + * To test examples, just press F6 and execute raylib_compile_execute script + * Note that compiled executable is placed in the same folder as .c file + * + * You can find all basic examples on C:\raylib\raylib\examples folder or + * raylib official webpage: www.raylib.com + * + * Enjoy using raylib. :) + * + * This example has been created using raylib 2.0 (www.raylib.com) + * raylib is licensed under an unmodified zlib/libpng license (View raylib.h + *for details) + * + * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) + * + ********************************************************************************************/ + #include "raylib.h" #include "rnet.c" diff --git a/examples/network/network_tcp_server.c b/examples/network/network_tcp_server.c index b6ae7b5e7..4f3489cf1 100644 --- a/examples/network/network_tcp_server.c +++ b/examples/network/network_tcp_server.c @@ -1,3 +1,25 @@ +/******************************************************************************************* + * + * raylib [network] example - TCP Server + * + * Welcome to raylib! + * + * To test examples, just press F6 and execute raylib_compile_execute script + * Note that compiled executable is placed in the same folder as .c file + * + * You can find all basic examples on C:\raylib\raylib\examples folder or + * raylib official webpage: www.raylib.com + * + * Enjoy using raylib. :) + * + * This example has been created using raylib 2.0 (www.raylib.com) + * raylib is licensed under an unmodified zlib/libpng license (View raylib.h + *for details) + * + * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) + * + ********************************************************************************************/ + #include "raylib.h" #include "rnet.c" diff --git a/examples/network/network_test.c b/examples/network/network_test.c index e843d454b..3169003e9 100644 --- a/examples/network/network_test.c +++ b/examples/network/network_test.c @@ -1,3 +1,25 @@ +/******************************************************************************************* + * + * raylib [network] example - Network Test + * + * Welcome to raylib! + * + * To test examples, just press F6 and execute raylib_compile_execute script + * Note that compiled executable is placed in the same folder as .c file + * + * You can find all basic examples on C:\raylib\raylib\examples folder or + * raylib official webpage: www.raylib.com + * + * Enjoy using raylib. :) + * + * This example has been created using raylib 2.0 (www.raylib.com) + * raylib is licensed under an unmodified zlib/libpng license (View raylib.h + *for details) + * + * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) + * + ********************************************************************************************/ + #include "raylib.h" #include @@ -71,7 +93,7 @@ void test_resolve_host() const char * address = "localhost"; const char * port = "80"; AddressInformation *addr = AllocAddressList(3); - int count = ResolveHost(address, port, ADDRESS_TYPE_IPV4, 0, addr); + int count = ResolveHost(address, port, ADDRESS_TYPE_ANY, 0, addr); assert(GetAddressFamily(addr[0]) == ADDRESS_TYPE_IPV6); assert(GetAddressFamily(addr[1]) == ADDRESS_TYPE_IPV4); @@ -109,8 +131,8 @@ int main() // Run the tests test_network_initialise(); - // test_resolve_host(); - test_socket_create(); + test_resolve_host(); + // test_socket_create(); // Main game loop while (!WindowShouldClose()) { diff --git a/examples/network/network_udp_client.c b/examples/network/network_udp_client.c index 091b8099a..7eb1fcbfc 100644 --- a/examples/network/network_udp_client.c +++ b/examples/network/network_udp_client.c @@ -1,3 +1,25 @@ +/******************************************************************************************* + * + * raylib [network] example - UDP Client + * + * Welcome to raylib! + * + * To test examples, just press F6 and execute raylib_compile_execute script + * Note that compiled executable is placed in the same folder as .c file + * + * You can find all basic examples on C:\raylib\raylib\examples folder or + * raylib official webpage: www.raylib.com + * + * Enjoy using raylib. :) + * + * This example has been created using raylib 2.0 (www.raylib.com) + * raylib is licensed under an unmodified zlib/libpng license (View raylib.h + *for details) + * + * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) + * + ********************************************************************************************/ + #include "raylib.h" #include diff --git a/examples/network/network_udp_server.c b/examples/network/network_udp_server.c index 97161a865..4406e56fb 100644 --- a/examples/network/network_udp_server.c +++ b/examples/network/network_udp_server.c @@ -1,3 +1,25 @@ +/******************************************************************************************* + * + * raylib [network] example - UDP Server + * + * Welcome to raylib! + * + * To test examples, just press F6 and execute raylib_compile_execute script + * Note that compiled executable is placed in the same folder as .c file + * + * You can find all basic examples on C:\raylib\raylib\examples folder or + * raylib official webpage: www.raylib.com + * + * Enjoy using raylib. :) + * + * This example has been created using raylib 2.0 (www.raylib.com) + * raylib is licensed under an unmodified zlib/libpng license (View raylib.h + *for details) + * + * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) + * + ********************************************************************************************/ + #include "raylib.h" #include diff --git a/projects/VS2017/examples/core_basic_window.vcxproj b/projects/VS2017/examples/core_basic_window.vcxproj index 87bef8d82..d3a955c29 100644 --- a/projects/VS2017/examples/core_basic_window.vcxproj +++ b/projects/VS2017/examples/core_basic_window.vcxproj @@ -1,182 +1,182 @@ - - - - - Debug.DLL - Win32 - - - Debug - Win32 - - - Release.DLL - Win32 - - - Release - Win32 - - - - {0981CA98-E4A5-4DF1-987F-A41D09131EFC} - Win32Proj - core_basic_window - 10.0.17763.0 - core_basic_window - - - - Application - true - v141 - Unicode - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(ProjectDir)$(ProjectName)\$(Configuration)\ - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - true - $(ProjectDir)$(ProjectName)\$(Configuration)\ - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - false - $(ProjectDir)$(ProjectName)\$(Configuration)\ - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - false - $(ProjectDir)$(ProjectName)\$(Configuration)\ - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) - CompileAsC - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - - - Console - true - %(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) - CompileAsC - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - - - Console - true - %(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - CompileAsC - true - - - Console - true - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - CompileAsC - true - - - Console - true - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - - - - - - - - {e89d61ac-55de-4482-afd4-df7242ebc859} - - - - - + + + + + Debug.DLL + Win32 + + + Debug + Win32 + + + Release.DLL + Win32 + + + Release + Win32 + + + + {0981CA98-E4A5-4DF1-987F-A41D09131EFC} + Win32Proj + core_basic_window + 10.0 + core_basic_window + + + + Application + true + v142 + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(ProjectDir)$(ProjectName)\$(Configuration)\ + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + true + $(ProjectDir)$(ProjectName)\$(Configuration)\ + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + false + $(ProjectDir)$(ProjectName)\$(Configuration)\ + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + false + $(ProjectDir)$(ProjectName)\$(Configuration)\ + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) + CompileAsC + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + %(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) + CompileAsC + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + %(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsC + true + + + Console + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsC + true + + + Console + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + + + + + + + + {e89d61ac-55de-4482-afd4-df7242ebc859} + + + + + \ No newline at end of file diff --git a/projects/VS2017/examples/core_basic_window_cpp.vcxproj b/projects/VS2017/examples/core_basic_window_cpp.vcxproj index cfe085241..f27faad10 100644 --- a/projects/VS2017/examples/core_basic_window_cpp.vcxproj +++ b/projects/VS2017/examples/core_basic_window_cpp.vcxproj @@ -1,180 +1,180 @@ - - - - - Debug.DLL - Win32 - - - Debug - Win32 - - - Release.DLL - Win32 - - - Release - Win32 - - - - {B655E850-3322-42F7-941D-6AC18FD66CA1} - Win32Proj - raylib_example_cpp - 10.0.17763.0 - core_basic_window_cpp - - - - Application - true - v141 - Unicode - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(ProjectDir)$(ProjectName)\$(Configuration) - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - true - $(ProjectDir)$(ProjectName)\$(Configuration) - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - false - $(ProjectDir)$(ProjectName)\$(Configuration) - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - false - $(ProjectDir)$(ProjectName)\$(Configuration) - $(ProjectDir)$(ProjectName)\$(Configuration)\temp - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - CompileAsCpp - - - Console - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - $(SolutionDir)..\..\release\libs\win32\msvc;%(AdditionalLibraryDirectories) - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - CompileAsCpp - - - Console - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - $(SolutionDir)..\..\release\libs\win32\msvc;%(AdditionalLibraryDirectories) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - CompileAsCpp - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - - - Console - true - true - true - $(SolutionDir)..\..\release\libs\win32\msvc;%(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - CompileAsCpp - $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) - - - Console - true - true - true - %(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - {e89d61ac-55de-4482-afd4-df7242ebc859} - - - - - - - - + + + + + Debug.DLL + Win32 + + + Debug + Win32 + + + Release.DLL + Win32 + + + Release + Win32 + + + + {B655E850-3322-42F7-941D-6AC18FD66CA1} + Win32Proj + raylib_example_cpp + 10.0 + core_basic_window_cpp + + + + Application + true + v142 + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(ProjectDir)$(ProjectName)\$(Configuration) + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + true + $(ProjectDir)$(ProjectName)\$(Configuration) + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + false + $(ProjectDir)$(ProjectName)\$(Configuration) + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + false + $(ProjectDir)$(ProjectName)\$(Configuration) + $(ProjectDir)$(ProjectName)\$(Configuration)\temp + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsCpp + + + Console + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)..\..\release\libs\win32\msvc;%(AdditionalLibraryDirectories) + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsCpp + + + Console + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)..\..\release\libs\win32\msvc;%(AdditionalLibraryDirectories) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + CompileAsCpp + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + true + true + $(SolutionDir)..\..\release\libs\win32\msvc;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + CompileAsCpp + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + true + true + %(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + {e89d61ac-55de-4482-afd4-df7242ebc859} + + + + + + + + \ No newline at end of file diff --git a/projects/VS2017/raylib.sln b/projects/VS2017/raylib.sln index da68e3ef7..e49f2afd3 100644 --- a/projects/VS2017/raylib.sln +++ b/projects/VS2017/raylib.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2024 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.156 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raylib", "raylib\raylib.vcxproj", "{E89D61AC-55DE-4482-AFD4-DF7242EBC859}" EndProject @@ -11,10 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{87 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_basic_window", "examples\core_basic_window.vcxproj", "{0981CA98-E4A5-4DF1-987F-A41D09131EFC}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_chat_client", "examples\network_chat_client.vcxproj", "{80AE5E50-FAC7-434F-A898-2878568E7D79}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_chat_server", "examples\network_chat_server.vcxproj", "{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_ping_pong", "examples\network_ping_pong.vcxproj", "{56EB485C-00A9-459E-B758-2E86316EB7FD}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_resolve_host", "examples\network_resolve_host.vcxproj", "{A16D19CB-6AF4-4D17-8318-EABD8805247C}" @@ -79,38 +75,6 @@ Global {0981CA98-E4A5-4DF1-987F-A41D09131EFC}.Release|x64.ActiveCfg = Release|Win32 {0981CA98-E4A5-4DF1-987F-A41D09131EFC}.Release|x86.ActiveCfg = Release|Win32 {0981CA98-E4A5-4DF1-987F-A41D09131EFC}.Release|x86.Build.0 = Release|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x64.ActiveCfg = Debug|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x64.Build.0 = Debug|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x86.ActiveCfg = Debug|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x86.Build.0 = Debug|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x64.ActiveCfg = Debug|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x64.Build.0 = Debug|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x86.ActiveCfg = Debug|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x86.Build.0 = Debug|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x64.ActiveCfg = Release|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x64.Build.0 = Release|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x86.ActiveCfg = Release|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x86.Build.0 = Release|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x64.ActiveCfg = Release|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x64.Build.0 = Release|x64 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x86.ActiveCfg = Release|Win32 - {80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x86.Build.0 = Release|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x64.ActiveCfg = Debug|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x64.Build.0 = Debug|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x86.ActiveCfg = Debug|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x86.Build.0 = Debug|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x64.ActiveCfg = Debug|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x64.Build.0 = Debug|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x86.ActiveCfg = Debug|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x86.Build.0 = Debug|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x64.ActiveCfg = Release|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x64.Build.0 = Release|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x86.ActiveCfg = Release|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x86.Build.0 = Release|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x64.ActiveCfg = Release|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x64.Build.0 = Release|x64 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x86.ActiveCfg = Release|Win32 - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x86.Build.0 = Release|Win32 {56EB485C-00A9-459E-B758-2E86316EB7FD}.Debug.DLL|x64.ActiveCfg = Debug|x64 {56EB485C-00A9-459E-B758-2E86316EB7FD}.Debug.DLL|x64.Build.0 = Debug|x64 {56EB485C-00A9-459E-B758-2E86316EB7FD}.Debug.DLL|x86.ActiveCfg = Debug|Win32 @@ -242,8 +206,6 @@ Global GlobalSection(NestedProjects) = preSolution {B655E850-3322-42F7-941D-6AC18FD66CA1} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} {0981CA98-E4A5-4DF1-987F-A41D09131EFC} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} - {80AE5E50-FAC7-434F-A898-2878568E7D79} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} - {BC49AAF0-E8C2-4F94-A60A-C56993023C6D} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} {56EB485C-00A9-459E-B758-2E86316EB7FD} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} {A16D19CB-6AF4-4D17-8318-EABD8805247C} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} {46B18968-56BC-4FB1-A7C0-FA418E095AFD} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1} diff --git a/projects/VS2017/raylib/raylib.vcxproj b/projects/VS2017/raylib/raylib.vcxproj index d7d4f6d00..36fcd423a 100644 --- a/projects/VS2017/raylib/raylib.vcxproj +++ b/projects/VS2017/raylib/raylib.vcxproj @@ -22,7 +22,7 @@ {E89D61AC-55DE-4482-AFD4-DF7242EBC859} Win32Proj raylib - 10.0.17763.0 + 10.0 @@ -163,6 +163,7 @@ + @@ -184,6 +185,7 @@ + diff --git a/src/raylib.h b/src/raylib.h index d873e1ad0..5934312c8 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -519,8 +519,8 @@ typedef struct SocketOpt typedef enum { - SOCKET_TCP = 1, // SOCK_STREAM - SOCKET_UDP = 2 // SOCK_DGRAM + SOCKET_TCP = 0, // SOCK_STREAM + SOCKET_UDP = 1 // SOCK_DGRAM } SocketType; typedef struct UDPChannel diff --git a/src/rnet.c b/src/rnet.c index f31aa5430..74d7341f6 100644 --- a/src/rnet.c +++ b/src/rnet.c @@ -62,18 +62,22 @@ typedef struct _SocketAddress { struct sockaddr address; } _SocketAddress; + typedef struct _SocketAddressIPv4 { struct sockaddr_in address; } _SocketAddressIPv4; + typedef struct _SocketAddressIPv6 { struct sockaddr_in6 address; } _SocketAddressIPv6; + typedef struct _SocketAddressStorage { struct sockaddr_storage address; } _SocketAddressStorage; + typedef struct _AddressInformation { struct addrinfo addr; @@ -310,7 +314,9 @@ static bool InitSocket(Socket *sock, struct addrinfo *addr) sock->channel = socket(AF_INET6, SOCK_DGRAM, 0); } break; - default: break; + default: + TraceLog(LOG_WARNING, "Invalid socket type specified."); + break; } return IsSocketValid(sock); } @@ -1005,6 +1011,10 @@ bool SocketListen(SocketConfig *config, SocketResult *result) else { success = false; + result->socket->status = SocketGetLastError(); + TraceLog(LOG_WARNING, "Socket Error: %s", + SocketErrorCodeToString(result->socket->status)); + SocketSetLastError(0); } } else @@ -1811,49 +1821,7 @@ int CheckSockets(SocketSet *set, unsigned int timeout) } } return (retval); -} - -// Allocate a Packet -// Packet *AllocPacket(int size) -// { -// struct Packet *packet; -// packet = (struct Packet *) malloc(sizeof(*packet)); -// if (packet != NULL) -// { -// memset(packet, 0, sizeof(*packet)); -// packet->size = 0; -// packet->offs = 0; -// packet->maxs = size; -// packet->data = (uint8_t *) malloc(size * sizeof(uint8_t)); -// memset(packet->data, '\0', size); -// if (packet->data == NULL) -// { -// free(packet); -// packet = NULL; -// } -// } -// else -// { -// free(packet); -// packet = NULL; -// } -// return packet; -// } - -// Free an allocated Packet -// void FreePacket(Packet *packet) -// { -// if (packet != NULL) -// { -// if (packet->data != NULL) -// { -// free(packet->data); -// packet->data = NULL; -// } -// free(packet); -// packet = NULL; -// } -// } +} // Allocate an AddressInformation AddressInformation AllocAddress() diff --git a/src/rnet.h b/src/rnet.h index 910486f18..26318cf1b 100644 --- a/src/rnet.h +++ b/src/rnet.h @@ -77,17 +77,17 @@ #define NOMSG // typedef MSG and associated routines #define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_* #define NOSCROLL // SB_* and scrolling routines -#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. -#define NOSOUND // Sound driver routines -#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines -#define NOWH // SetWindowsHook and WH_* -#define NOWINOFFSETS // GWL_*, GCL_*, associated routines -#define NOCOMM // COMM driver routines -#define NOKANJI // Kanji support stuff. -#define NOHELP // Help engine interface. -#define NOPROFILER // Profiler interface. -#define NODEFERWINDOWPOS // DeferWindowPos routines -#define NOMCX // Modem Configuration Extensions +#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. +#define NOSOUND // Sound driver routines +#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines +#define NOWH // SetWindowsHook and WH_* +#define NOWINOFFSETS // GWL_*, GCL_*, associated routines +#define NOCOMM // COMM driver routines +#define NOKANJI // Kanji support stuff. +#define NOHELP // Help engine interface. +#define NOPROFILER // Profiler interface. +#define NODEFERWINDOWPOS // DeferWindowPos routines +#define NOMCX // Modem Configuration Extensions #define MMNOSOUND //----------------------------------------------------------------------------------