Lua: Further centralize code, fix Bizhawk 2.9 (#1685)

* Fixes the socket library for bizhawk 2.9/lua 5.4 by including another one in parallel
* Fixes lua 5.4 support by making socket.lua into a "modern" module (the `module` keyword is gone)
* Adds the linux version and 32 bit windows socket dlls because why not
* Merges common functions into `common.lua` - the only functional change of this should be that:
  * Some things that were locals are globals now - this can be changed, I just was lazy and it likely doesn't matter
  * `drawText` now uses middle/bottom for all prints - feel free to do what you like with that change
This commit is contained in:
zig-for
2023-04-15 00:17:33 -07:00
committed by GitHub
parent 808203a50f
commit 5a7d20d393
41 changed files with 255 additions and 2570 deletions

View File

@@ -0,0 +1,12 @@
function bit.rshift(a, b)
return a >> b
end
function bit.lshift(a, b)
return a << b
end
function bit.bor(a, b)
return a | b
end
function bit.band(a, b)
return a & b
end