TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

add remap function

Open TheDrawingCoder-Gamer opened this issue 5 months ago • 1 comments

Changes:

  • update wasm3 to latest commit
  • changes the remap argument in wasm's map to a pointer holding a struct with data
  • this data is used to call the remap function
  • signature is the same so it's compatible

TheDrawingCoder-Gamer avatar Feb 07 '24 19:02 TheDrawingCoder-Gamer

can't figure out how to call WASM functions that return a value. if you can do that you could remove the res_ptr arg. the user_data arg could also possibly be removed if we made a holder struct that held a pointer and function pointer.

Edit: return by value is the same as taking a pointer argument. reason why res_ptr is needed is bc from what I know I can't actually allocate memory from the host side. Working on making the signature compatible with old versions

TheDrawingCoder-Gamer avatar Feb 08 '24 00:02 TheDrawingCoder-Gamer

@TheDrawingCoder-Gamer we have conflicts in the PR, could you pls resove?

nesbox avatar Feb 18 '24 10:02 nesbox

@nesbox done!

nvm this actually breaks bc of pocketpy update. stopped building on my machine

TheDrawingCoder-Gamer avatar Feb 18 '24 17:02 TheDrawingCoder-Gamer

@nesbox there is no longer a diff between pocketpy on this branch and main + it builds, so i think it's ready now

TheDrawingCoder-Gamer avatar Feb 20 '24 16:02 TheDrawingCoder-Gamer