TIC-80
TIC-80 copied to clipboard
add remap function
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
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 we have conflicts in the PR, could you pls resove?
@nesbox done!
nvm this actually breaks bc of pocketpy update. stopped building on my machine
@nesbox there is no longer a diff between pocketpy on this branch and main + it builds, so i think it's ready now