Skip to content

Commit ad7bdce

Browse files
Strega's GateStrega's Gate
authored andcommitted
Finish 4.0 upgrade.
Heavily refactor, reorganize, and update RaylibC
1 parent fb65b1e commit ad7bdce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3131
-2546
lines changed

Package.swift

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,24 @@ import PackageDescription
55

66
var cSettings: [CSetting] {
77
var array: [CSetting] = []
8-
9-
#if os(macOS)
10-
array.append(.define("HOST_PLATFORM_OS", to: "OSX"))
11-
#elseif os(Windows)
12-
array.append(.define("HOST_PLATFORM_OS", to: "WINDOWS"))
13-
#elseif os(Linux)
14-
array.append(.define("HOST_PLATFORM_OS", to: "LINUX"))
15-
#endif
16-
8+
179
array.append(.define("PLATFORM_DESKTOP", .when(platforms: [.macOS, .windows, .linux])))
1810
array.append(.define("SUPPORT_DEFAULT_FONT"))
1911

2012
// Windows
13+
array.append(.define("HOST_PLATFORM_OS", to: "WINDOWS", .when(platforms: [.windows])))
2114
array.append(.define("_GLFW_WIN32", .when(platforms: [.windows])))
2215

2316
// Linux
17+
array.append(.define("HOST_PLATFORM_OS", to: "LINUX", .when(platforms: [.linux])))
2418
array.append(.define("_GLFW_X11", .when(platforms: [.linux])))
2519

2620
// macOS
21+
array.append(.define("HOST_PLATFORM_OS", to: "OSX", .when(platforms: [.macOS])))
2722
array.append(.define("_GLFW_COCOA", .when(platforms: [.macOS])))
2823
array.append(.unsafeFlags(["-x", "objective-c", "-fno-objc-arc"], .when(platforms: [.macOS])))
2924

25+
3026
array.append(.headerSearchPath("UnmodifiedRaylibSrc/external/glfw/include"))
3127
array.append(.headerSearchPath("UnmodifiedRaylibSrc"))
3228

@@ -132,6 +128,8 @@ var exclude: [String] {
132128
"UnmodifiedRaylibSrc/external/glfw/src/wl_init.c",
133129
"UnmodifiedRaylibSrc/external/glfw/deps/glad_vulkan.c",
134130
"UnmodifiedRaylibSrc/external/glfw/src/glx_context.c",
131+
"UnmodifiedRaylibSrc/build.zig",
132+
"UnmodifiedRaylibSrc/minshell.html",
135133
]
136134
}
137135
#endif
@@ -194,7 +192,9 @@ var exclude: [String] {
194192
"UnmodifiedRaylibSrc/external/glfw/deps/getopt.c",
195193
"UnmodifiedRaylibSrc/external/glfw/deps/glad_gl.c",
196194
"UnmodifiedRaylibSrc/raylib.ico",
197-
"UnmodifiedRaylibSrc/external/glfw/CMake/GenerateMappings.cmake"
195+
"UnmodifiedRaylibSrc/external/glfw/CMake/GenerateMappings.cmake",
196+
"UnmodifiedRaylibSrc/build.zig",
197+
"UnmodifiedRaylibSrc/minshell.html",
198198
]
199199
}
200200
#endif
@@ -256,7 +256,9 @@ var exclude: [String] {
256256
"UnmodifiedRaylibSrc/external/glfw/deps/glad_gl.c",
257257
"UnmodifiedRaylibSrc/external/glfw/src/glfw_config.h.in",
258258
"UnmodifiedRaylibSrc/external/glfw/CMake/modules/FindOSMesa.cmake",
259-
"UnmodifiedRaylibSrc/external/glfw/src/wgl_context.c"
259+
"UnmodifiedRaylibSrc/external/glfw/src/wgl_context.c",
260+
"UnmodifiedRaylibSrc/build.zig",
261+
"UnmodifiedRaylibSrc/minshell.html",
260262
]
261263
}
262264
#endif

Sources/Example/SnakeGame.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2021 Dustin Collins (Strega's Gate)
2+
* Copyright (c) 2022 Dustin Collins (Strega's Gate)
33
* All Rights Reserved.
44
* Licensed under MIT License
55
*
@@ -47,7 +47,7 @@ class SnakeGame {
4747
var snakeSegmentCount = 0
4848
var fruit: Food = Food()
4949

50-
50+
5151
func run() {
5252
//MARK: - Initialization
5353
Raylib.initWindow(screenWidth, screenHeight, "Classic Game: Snake")

Sources/Example/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2021 Dustin Collins (Strega's Gate)
2+
* Copyright (c) 2022 Dustin Collins (Strega's Gate)
33
* All Rights Reserved.
44
* Licensed under MIT License
55
*

Sources/Raylib/Basic3dShapes.swift

Lines changed: 0 additions & 129 deletions
This file was deleted.

Sources/Raylib/CursorRelated.swift

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)