update to raylib 4.2

This commit is contained in:
richard 2022-08-11 21:58:54 +01:00
parent 3a6deb2c04
commit 3e011b329a
19 changed files with 78 additions and 49 deletions

1
docs-src/RPI.rst Symbolic link
View file

@ -0,0 +1 @@
../RPI.rst

View file

@ -3,7 +3,16 @@ Python API
This is a wrapper around the C API with some syntactic sugar.
The API is *still the same as Raylib*, so you should still reply on `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_, except:
The API is *still the same as Raylib*, so you should still reply on:
* `the C Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
* `the C Raylib examples <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
* `the C Raylib header file <https://github.com/raysan5/raylib/blob/master/src/raylib.h>`_
The *differences* are:
* the function names are in **snake_case**.
@ -11,6 +20,9 @@ The API is *still the same as Raylib*, so you should still reply on `the officia
* There are some helper functions to create structures.
Examples
--------
Example program:
.. code-block::
@ -45,9 +57,10 @@ Example program:
init_window(800, 450, "Raylib texture test")
...
You don't need to use the PyRay() class anymore.
(You don't need to use the PyRay() class anymore.)
`See all examples here <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/tests/test_pyray.py
API reference
-------------

View file

@ -1,7 +1,8 @@
C API
=============
The goal of the C API is make usage as similar to the original C as CFFI will allow. The `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
The goal of the C API is make usage as similar to the original C as CFFI will allow.
So the `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
are very, very similar to the C originals.
Example program:
@ -39,11 +40,16 @@ If you want to be more portable (i.e. same code will work with dynamic bindings)
...
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/tests/test_static.py
.. note:: Whenever you need to convert stuff between C and Python see https://cffi.readthedocs.io
.. important:: Your **primary reference** should always be `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
.. important:: Your **primary reference** should always be
* `the C Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
* `the C Raylib examples <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
* `the C Raylib header file <https://github.com/raysan5/raylib/blob/master/src/raylib.h>`_
However, here is a list of available functions: