pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Port Renderer to C code

Open MightyJosip opened this issue 9 months ago • 3 comments
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.

MightyJosip avatar Feb 03 '25 12:02 MightyJosip

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);
                ^ ~~~~~~~~~~~~~~~~~~~

Starbuck5 avatar Feb 22 '25 09:02 Starbuck5

Fixed

MightyJosip avatar Feb 22 '25 11:02 MightyJosip

Alright, thanks. As soon as I test and confirm the ported features I'll approve it (if everything goes right)

damusss avatar Apr 26 '25 10:04 damusss