attempt fix booleans on windows build
This commit is contained in:
parent
1b8598fa55
commit
f9d52edd50
4 changed files with 40 additions and 4 deletions
BIN
examples/audio/resources/country.mp3
Normal file
BIN
examples/audio/resources/country.mp3
Normal file
Binary file not shown.
|
@ -169,10 +169,10 @@ def build_unix():
|
||||||
|
|
||||||
def build_windows():
|
def build_windows():
|
||||||
print("BUILDING FOR WINDOWS")
|
print("BUILDING FOR WINDOWS")
|
||||||
ffibuilder.cdef(open("raylib/raylib.h.modified").read())
|
ffibuilder.cdef(open("raylib/raylib.h.modified").read().replace("bool", "int"))
|
||||||
ffibuilder.cdef(open("raylib/rlgl.h.modified").read())
|
ffibuilder.cdef(open("raylib/rlgl.h.modified").read().replace("bool", "int"))
|
||||||
ffibuilder.cdef(open("raylib/raygui.h.modified").read())
|
ffibuilder.cdef(open("raylib/raygui.h.modified").read().replace("bool", "int"))
|
||||||
ffibuilder.cdef(open("raylib/physac.h.modified").read())
|
ffibuilder.cdef(open("raylib/physac.h.modified").read().replace("bool", "int"))
|
||||||
ffibuilder.set_source("raylib._raylib_cffi", """
|
ffibuilder.set_source("raylib._raylib_cffi", """
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "rlgl.h"
|
#include "rlgl.h"
|
||||||
|
|
17
tests/test_gamepad.py
Normal file
17
tests/test_gamepad.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import pyray as pr
|
||||||
|
pr.set_config_flags(pr.FLAG_MSAA_4X_HINT)
|
||||||
|
pr.init_window(800, 600, 'Test gamepad')
|
||||||
|
pr.set_target_fps(60)
|
||||||
|
while not pr.window_should_close():
|
||||||
|
pr.begin_drawing()
|
||||||
|
pr.clear_background(pr.BLACK)
|
||||||
|
if pr.is_gamepad_available(0):
|
||||||
|
pr.draw_text(f'GP0: {pr.get_gamepad_name(0)}', 5, 5, 20, pr.RAYWHITE)
|
||||||
|
pr.draw_text(f'Axis: {pr.get_gamepad_axis_count(0)}', 5, 30, 20, pr.RAYWHITE)
|
||||||
|
pr.draw_text(f'Button: {pr.get_gamepad_button_pressed()}', 5, 55, 20, pr.RAYWHITE)
|
||||||
|
_hy_anon_var_1 = pr.draw_text(
|
||||||
|
f'Axis 0: {pr.get_gamepad_axis_movement(0, 0)}', 5, 85, 20, pr.RAYWHITE)
|
||||||
|
else:
|
||||||
|
_hy_anon_var_1 = None
|
||||||
|
pr.end_drawing()
|
||||||
|
pr.close_window()
|
19
tests/test_music.py
Normal file
19
tests/test_music.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
from pyray import *
|
||||||
|
init_window(800, 450, "Hello")
|
||||||
|
|
||||||
|
init_audio_device()
|
||||||
|
|
||||||
|
music = load_music_stream("examples/audio/resources/country.mp3")
|
||||||
|
music.looping = True
|
||||||
|
play_music_stream(music);
|
||||||
|
|
||||||
|
|
||||||
|
while not window_should_close():
|
||||||
|
update_music_stream(music);
|
||||||
|
begin_drawing()
|
||||||
|
clear_background(WHITE)
|
||||||
|
draw_text("music "+str(music.looping), 190, 200, 20, VIOLET)
|
||||||
|
end_drawing()
|
||||||
|
unload_music_stream(music)
|
||||||
|
close_audio_device()
|
||||||
|
close_window()
|
Reference in a new issue