initial
This commit is contained in:
parent
cd300d256e
commit
a703659c9d
76 changed files with 87245 additions and 0 deletions
34
raylib/__init__.py
Normal file
34
raylib/__init__.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
__version__ = "2.5.dev1"
|
||||
|
||||
from ._raylib_cffi import ffi, lib as rl
|
||||
from _raylib_cffi.lib import *
|
||||
|
||||
def Vector3(x, y, z):
|
||||
return ffi.new("struct Vector3 *", [x, y, z])[0]
|
||||
|
||||
LIGHTGRAY =( 200, 200, 200, 255 )
|
||||
GRAY =( 130, 130, 130, 255 )
|
||||
DARKGRAY =( 80, 80, 80, 255 )
|
||||
YELLOW =( 253, 249, 0, 255 )
|
||||
GOLD =( 255, 203, 0, 255 )
|
||||
ORANGE =( 255, 161, 0, 255 )
|
||||
PINK =( 255, 109, 194, 255 )
|
||||
RED =( 230, 41, 55, 255 )
|
||||
MAROON =( 190, 33, 55, 255 )
|
||||
GREEN =( 0, 228, 48, 255 )
|
||||
LIME =( 0, 158, 47, 255 )
|
||||
DARKGREEN =( 0, 117, 44, 255 )
|
||||
SKYBLUE =( 102, 191, 255, 255 )
|
||||
BLUE =( 0, 121, 241, 255 )
|
||||
DARKBLUE =( 0, 82, 172, 255 )
|
||||
PURPLE =( 200, 122, 255, 255 )
|
||||
VIOLET =( 135, 60, 190, 255 )
|
||||
DARKPURPLE =( 112, 31, 126, 255 )
|
||||
BEIGE =( 211, 176, 131, 255 )
|
||||
BROWN =( 127, 106, 79, 255 )
|
||||
DARKBROWN =( 76, 63, 47, 255 )
|
||||
WHITE =( 255, 255, 255, 255 )
|
||||
BLACK =( 0, 0, 0, 255 )
|
||||
BLANK =( 0, 0, 0, 0 )
|
||||
MAGENTA =( 255, 0, 255, 255 )
|
||||
RAYWHITE =( 245, 245, 245, 255 )
|
21455
raylib/_raylib_cffi.c
Normal file
21455
raylib/_raylib_cffi.c
Normal file
File diff suppressed because it is too large
Load diff
BIN
raylib/_raylib_cffi.o
Normal file
BIN
raylib/_raylib_cffi.o
Normal file
Binary file not shown.
26
raylib/build.py
Normal file
26
raylib/build.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
from cffi import FFI
|
||||
import os
|
||||
ffibuilder = FFI()
|
||||
|
||||
# cdef() expects a single string declaring the C types, functions and
|
||||
# globals needed to use the shared object. It must be in valid C syntax.
|
||||
ffibuilder.cdef(open("raylib_modified.h").read().replace('RLAPI ', ''))
|
||||
|
||||
# set_source() gives the name of the python extension module to
|
||||
# produce, and some C source code as a string. This C code needs
|
||||
# to make the declarated functions, types and globals available,
|
||||
# so it is often just the "#include".
|
||||
ffibuilder.set_source("_raylib_cffi",
|
||||
"""
|
||||
#include "raylib.h" // the C header of the library
|
||||
""",
|
||||
#library_dirs=['/Volumes/Home/rich/raylib-latest/src'],
|
||||
# extra_link_args=['-Wl,-rpath,.'],
|
||||
#extra_link_args=["/usr/local/lib/libraylib.a","-framework OpenGL"]# -F/System/Library/Frameworks -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo"]
|
||||
# library_dirs=[os.path.dirname(__file__)+"/../lib"],
|
||||
#libraries=['raylib']
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
ffibuilder.compile(verbose=True)
|
||||
os.system("clang -bundle -undefined dynamic_lookup ./_raylib_cffi.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib libraylib.a -F/System/Library/Frameworks -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo -o ./_raylib_cffi.cpython-37m-darwin.so")
|
BIN
raylib/libraylib.a
Normal file
BIN
raylib/libraylib.a
Normal file
Binary file not shown.
1406
raylib/raylib.h
Normal file
1406
raylib/raylib.h
Normal file
File diff suppressed because it is too large
Load diff
1065
raylib/raylib_cheatsheet_copy_paste.h
Normal file
1065
raylib/raylib_cheatsheet_copy_paste.h
Normal file
File diff suppressed because it is too large
Load diff
1318
raylib/raylib_modified.h
Normal file
1318
raylib/raylib_modified.h
Normal file
File diff suppressed because it is too large
Load diff
1181
raylib/raylib_modified_2.0.h
Normal file
1181
raylib/raylib_modified_2.0.h
Normal file
File diff suppressed because it is too large
Load diff
Reference in a new issue