sm64pc/sm64ex

incompatible function pointer types (web build)

carteeeee opened this issue · 2 comments

Describe the bug
when i compile sm64ex (us rom) for the web, it gives a large error that seems to be an issue with opengl (see attached screenshot)

To Reproduce
Steps to reproduce the behavior:

  1. extract game assets
  2. apply 60fps patch
  3. build with the flags VERSION=us TARGET_WEB=1 BETTERCAMERA=1 NODRAWINGDISTANCE=0 TEXTURE_FIX=1 EXT_OPTIONS_MENU=1 EXTERNAL_DATA=0 RENDER_API=GL

Expected behavior
it should finish compiling

Screenshots
Screenshot 2023-10-15 at 7 09 27 PM

Desktop (please complete the following information):

  • OS: ubuntu 22.04
  • architecture: x86_64
  • latest emsdk ver as of the time i wrote this (oct 15 2023)

Additional context
the build runs fine for a regular pc target

I guess new versions of emcc have made this an error by default or default to -Werror or something.
In gfx_opengl.c, change line 532 from

static void gfx_opengl_upload_texture(uint8_t *rgba32_buf, int width, int height) 

to

static void gfx_opengl_upload_texture(const uint8_t *rgba32_buf, int width, int height) 

i changed the code to what you said and it compiled fine. thank you!