|
@@ -4,8 +4,10 @@ In order to update `raylib-d` to work with a newer version of `raylib`, the head
|
|
|
|
|
|
Three modules should be regenerated: `raylib`, `raymath` and `rlgl`.
|
|
Three modules should be regenerated: `raylib`, `raymath` and `rlgl`.
|
|
|
|
|
|
|
|
+Run the following command from the `raylib/src` directory. Note: path/to/raylib-d should be the path to the raylib-d repository that you have on your system.
|
|
|
|
+
|
|
```
|
|
```
|
|
-dstep raylib.h raymath.h rlgl.h -o ~/git/contrib/raylib-d/source --space-after-function-name=false --skip Vector2 \
|
|
|
|
|
|
+dstep raylib.h raymath.h rlgl.h -o path/to/raylib-d/source --space-after-function-name=false --skip Vector2 \
|
|
--skip Vector3 --skip Vector4 --skip Quaternion --skip Matrix --skip Rectangle --skip RL_MALLOC --skip RL_CALLOC \
|
|
--skip Vector3 --skip Vector4 --skip Quaternion --skip Matrix --skip Rectangle --skip RL_MALLOC --skip RL_CALLOC \
|
|
--skip RL_REALLOC --skip RL_FREE
|
|
--skip RL_REALLOC --skip RL_FREE
|
|
```
|
|
```
|
|
@@ -44,7 +46,9 @@ import raylib;
|
|
Additionally, each of those modules will have an automatically generated `extern (C):` line. We need to find it and
|
|
Additionally, each of those modules will have an automatically generated `extern (C):` line. We need to find it and
|
|
edit it to `extern (C) @nogc nothrow:`.
|
|
edit it to `extern (C) @nogc nothrow:`.
|
|
|
|
|
|
-dstep will also make a mistake in `raylib.d` and incorrectly define a couple `alias`es as `enums`. Those must be fixed.
|
|
|
|
|
|
+## For version 3.7.0 and possibly earlier versions
|
|
|
|
+
|
|
|
|
+dstep will also make a mistake in `raylib.d` and incorrectly define a few `alias`es as `enum`s. Those must be fixed.
|
|
Look for a block of code similar to this:
|
|
Look for a block of code similar to this:
|
|
|
|
|
|
```d
|
|
```d
|
|
@@ -60,7 +64,9 @@ enum MAP_DIFFUSE = MATERIAL_MAP_DIFFUSE;
|
|
enum PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = PixelFormat.PIXELFORMAT_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
|
enum PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = PixelFormat.PIXELFORMAT_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
|
```
|
|
```
|
|
|
|
|
|
-and replace each `enum` with `alias`.
|
|
|
|
|
|
+Change `enum` for each of the functions `FormatText`, `LoadText`, `GetExtension`, and `GetImageData` to `alias`. The others can remain `enum`s.
|
|
|
|
+
|
|
|
|
+These definitions are not present since 4.0.0
|
|
|
|
|
|
This should be enough. Run `dub test` and see if it compiles.
|
|
This should be enough. Run `dub test` and see if it compiles.
|
|
|
|
|