php-sdl
php-sdl copied to clipboard
SDL2 bindings for the PHP language
$keyboard = SDL_GetKeyboardState($var = null); if($keyboard(SDL_SCANCODE_LEFT)) { print('left'); $bar_x += -1; } if($keyboard(SDL_SCANCODE_RIGHT)) { print('left'); $bar_x += +1; }
I am following README file instructions. I am at the point where README file show first examples: ``` Standard SDL2 API is available in procedural style: $window = SDL_CreateWindow( "Foo...
On RHEL / CentOS / Alma / Rocky... 8 ``` In file included from /builddir/build/BUILD/php-pecl-sdl-2.6.0/NTS/src/php_sdl.c:33: /builddir/build/BUILD/php-pecl-sdl-2.6.0/NTS/src/rect.h:37:42: error: unknown type name 'SDL_FRect'; did you mean 'SDL_Rect'? zend_bool zval_to_sdl_frect(zval *value, SDL_FRect *rect);...
SDL_Text would allow displaying text in SDL using TrueType fonts. https://github.com/libsdl-org/SDL_ttf SDL_Image would allow working with a variety of modern image formats, most of them being a lot more php-ish...
Hi! I tried to compile the project to generate the DLL without luck, just got very very strange errors. Please, can you share the right instructions? BTW, compiling on Ubuntu...
``` $ gdb php GNU gdb (GDB) Fedora 10.2-3.fc34 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are...
Are there build instructions for Windows? I see a reference to the project in a book I am reading and I'm very interested in getting this to work for an...
It seems like SDL_SetRenderDrawBlendMode is not ported to PHP, is it planned in the future ? I'm trying to use the alpha value on a rect fill but it seems...
I installed sdl via brew: `$ brew install sdl2` Then I tried to install `php-sdl` via pecl, bit it failed with ``` /private/tmp/pear/temp/sdl/src/php_sdl.h:42:10: fatal error: 'SDL2/SDL.h' file not found #include...
The use of sdl2-config was deprecated here https://github.com/libsdl-org/SDL/pull/6467 I also moved the main extension C file and header to the project's root directory to permit the extension's build in the...