Skip to content

Commit f551fca

Browse files
hack stub files because enum from Physac isn't recognised by raylib header parser
1 parent 11c5b1a commit f551fca

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

create_enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ def process(filename):
3535
process("raylib.json")
3636
process("raygui.json")
3737
process("glfw3.json")
38+
process("physac.json")

create_stub_pyray.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def ctype_to_python_type(t):
8383
import _cffi_backend # type: ignore
8484
8585
ffi: _cffi_backend.FFI
86+
PhysicsShapeType = int
8687
""")
8788

8889
# These words can be used for c arg names, but not in python

create_stub_static.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def ctype_to_python_type(t):
7474
7575
ffi: _cffi_backend.FFI
7676
rl: _cffi_backend.Lib
77+
PhysicsShapeType = int
7778
7879
class struct: ...
7980

dynamic/raylib/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import _cffi_backend # type: ignore
44

55
ffi: _cffi_backend.FFI
66
rl: _cffi_backend.Lib
7+
PhysicsShapeType = int
78

89
class struct: ...
910

pyray/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,7 @@ from warnings import deprecated
908908
import _cffi_backend # type: ignore
909909

910910
ffi: _cffi_backend.FFI
911+
PhysicsShapeType = int
911912

912913
def attach_audio_mixed_processor(processor: Any,) -> None:
913914
"""Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'."""

raylib/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import _cffi_backend # type: ignore
44

55
ffi: _cffi_backend.FFI
66
rl: _cffi_backend.Lib
7+
PhysicsShapeType = int
78

89
class struct: ...
910

0 commit comments

Comments
 (0)