mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-29 07:23:01 +00:00
Add gGlobalSoundSource to Lua
This commit is contained in:
parent
13178af640
commit
b24c1731d0
3 changed files with 40 additions and 21 deletions
|
@ -272,14 +272,14 @@ function approach_f32(current, target, inc, dec)
|
||||||
current = target
|
current = target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return current;
|
return current
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param current number
|
--- @param current integer
|
||||||
--- @param target number
|
--- @param target integer
|
||||||
--- @param inc number
|
--- @param inc integer
|
||||||
--- @param dec number
|
--- @param dec integer
|
||||||
--- @return number
|
--- @return integer
|
||||||
function approach_s32(current, target, inc, dec)
|
function approach_s32(current, target, inc, dec)
|
||||||
if current < target then
|
if current < target then
|
||||||
current = current + inc
|
current = current + inc
|
||||||
|
@ -299,9 +299,16 @@ function approach_s32(current, target, inc, dec)
|
||||||
elseif current < -2147483648 then
|
elseif current < -2147483648 then
|
||||||
current = 2147483647 + (current - (-2147483648))
|
current = 2147483647 + (current - (-2147483648))
|
||||||
end
|
end
|
||||||
return current;
|
return current
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-----------
|
||||||
|
-- sound --
|
||||||
|
-----------
|
||||||
|
|
||||||
|
--- @type Vec3f
|
||||||
|
gGlobalSoundSource = { x = 0, y = 0, z = 0 }
|
||||||
|
|
||||||
--- @param bank number
|
--- @param bank number
|
||||||
--- @param soundID number
|
--- @param soundID number
|
||||||
--- @param priority number
|
--- @param priority number
|
||||||
|
|
|
@ -274,14 +274,14 @@ function approach_f32(current, target, inc, dec)
|
||||||
current = target
|
current = target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return current;
|
return current
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param current number
|
--- @param current integer
|
||||||
--- @param target number
|
--- @param target integer
|
||||||
--- @param inc number
|
--- @param inc integer
|
||||||
--- @param dec number
|
--- @param dec integer
|
||||||
--- @return number
|
--- @return integer
|
||||||
function approach_s32(current, target, inc, dec)
|
function approach_s32(current, target, inc, dec)
|
||||||
if current < target then
|
if current < target then
|
||||||
current = current + inc
|
current = current + inc
|
||||||
|
@ -301,9 +301,16 @@ function approach_s32(current, target, inc, dec)
|
||||||
elseif current < -2147483648 then
|
elseif current < -2147483648 then
|
||||||
current = 2147483647 + (current - (-2147483648))
|
current = 2147483647 + (current - (-2147483648))
|
||||||
end
|
end
|
||||||
return current;
|
return current
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-----------
|
||||||
|
-- sound --
|
||||||
|
-----------
|
||||||
|
|
||||||
|
--- @type Vec3f
|
||||||
|
gGlobalSoundSource = { x = 0, y = 0, z = 0 }
|
||||||
|
|
||||||
--- @param bank number
|
--- @param bank number
|
||||||
--- @param soundID number
|
--- @param soundID number
|
||||||
--- @param priority number
|
--- @param priority number
|
||||||
|
|
|
@ -242,13 +242,13 @@ char gSmluaConstants[] = ""
|
||||||
" current = target\n"
|
" current = target\n"
|
||||||
" end\n"
|
" end\n"
|
||||||
" end\n"
|
" end\n"
|
||||||
" return current;\n"
|
" return current\n"
|
||||||
"end\n"
|
"end\n"
|
||||||
"--- @param current number\n"
|
"--- @param current integer\n"
|
||||||
"--- @param target number\n"
|
"--- @param target integer\n"
|
||||||
"--- @param inc number\n"
|
"--- @param inc integer\n"
|
||||||
"--- @param dec number\n"
|
"--- @param dec integer\n"
|
||||||
"--- @return number\n"
|
"--- @return integer\n"
|
||||||
"function approach_s32(current, target, inc, dec)\n"
|
"function approach_s32(current, target, inc, dec)\n"
|
||||||
" if current < target then\n"
|
" if current < target then\n"
|
||||||
" current = current + inc\n"
|
" current = current + inc\n"
|
||||||
|
@ -267,8 +267,13 @@ char gSmluaConstants[] = ""
|
||||||
" elseif current < -2147483648 then\n"
|
" elseif current < -2147483648 then\n"
|
||||||
" current = 2147483647 + (current - (-2147483648))\n"
|
" current = 2147483647 + (current - (-2147483648))\n"
|
||||||
" end\n"
|
" end\n"
|
||||||
" return current;\n"
|
" return current\n"
|
||||||
"end\n"
|
"end\n"
|
||||||
|
"-----------\n"
|
||||||
|
"-- sound --\n"
|
||||||
|
"-----------\n"
|
||||||
|
"--- @type Vec3f\n"
|
||||||
|
"gGlobalSoundSource = { x = 0, y = 0, z = 0 }\n"
|
||||||
"--- @param bank number\n"
|
"--- @param bank number\n"
|
||||||
"--- @param soundID number\n"
|
"--- @param soundID number\n"
|
||||||
"--- @param priority number\n"
|
"--- @param priority number\n"
|
||||||
|
|
Loading…
Reference in a new issue