pygame-ce
pygame-ce copied to clipboard
Port Renderer to C code
trafficstars
This PR converts pygame._sdl2.video.Renderer to C code. It has the implementation of all the Renderer methods and attributes. It doesn't have docs/type hints/tests or stuff like that.
Pulled the relevant bit of logs for the WASM build failure:
src_c/render.c:412:19: error: call to undeclared function 'pgSurface_New'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
surface = pgSurface_New(surf);
^
src_c/render.c:412:19: note: did you mean 'pgSurface_New2'?
src_c/surface.c:343:1: note: 'pgSurface_New2' declared here
pgSurface_New2(SDL_Surface *s, int owner)
^
In file included from src_c/static.c:372:
src_c/render.c:412:17: error: incompatible integer to pointer conversion assigning to 'pgSurfaceObject *' from 'int' [-Wint-conversion]
surface = pgSurface_New(surf);
^ ~~~~~~~~~~~~~~~~~~~
Fixed
Alright, thanks. As soon as I test and confirm the ported features I'll approve it (if everything goes right)