mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +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
|
||||
end
|
||||
end
|
||||
return current;
|
||||
return current
|
||||
end
|
||||
|
||||
--- @param current number
|
||||
--- @param target number
|
||||
--- @param inc number
|
||||
--- @param dec number
|
||||
--- @return number
|
||||
--- @param current integer
|
||||
--- @param target integer
|
||||
--- @param inc integer
|
||||
--- @param dec integer
|
||||
--- @return integer
|
||||
function approach_s32(current, target, inc, dec)
|
||||
if current < target then
|
||||
current = current + inc
|
||||
|
@ -299,9 +299,16 @@ function approach_s32(current, target, inc, dec)
|
|||
elseif current < -2147483648 then
|
||||
current = 2147483647 + (current - (-2147483648))
|
||||
end
|
||||
return current;
|
||||
return current
|
||||
end
|
||||
|
||||
-----------
|
||||
-- sound --
|
||||
-----------
|
||||
|
||||
--- @type Vec3f
|
||||
gGlobalSoundSource = { x = 0, y = 0, z = 0 }
|
||||
|
||||
--- @param bank number
|
||||
--- @param soundID number
|
||||
--- @param priority number
|
||||
|
|
|
@ -274,14 +274,14 @@ function approach_f32(current, target, inc, dec)
|
|||
current = target
|
||||
end
|
||||
end
|
||||
return current;
|
||||
return current
|
||||
end
|
||||
|
||||
--- @param current number
|
||||
--- @param target number
|
||||
--- @param inc number
|
||||
--- @param dec number
|
||||
--- @return number
|
||||
--- @param current integer
|
||||
--- @param target integer
|
||||
--- @param inc integer
|
||||
--- @param dec integer
|
||||
--- @return integer
|
||||
function approach_s32(current, target, inc, dec)
|
||||
if current < target then
|
||||
current = current + inc
|
||||
|
@ -301,9 +301,16 @@ function approach_s32(current, target, inc, dec)
|
|||
elseif current < -2147483648 then
|
||||
current = 2147483647 + (current - (-2147483648))
|
||||
end
|
||||
return current;
|
||||
return current
|
||||
end
|
||||
|
||||
-----------
|
||||
-- sound --
|
||||
-----------
|
||||
|
||||
--- @type Vec3f
|
||||
gGlobalSoundSource = { x = 0, y = 0, z = 0 }
|
||||
|
||||
--- @param bank number
|
||||
--- @param soundID number
|
||||
--- @param priority number
|
||||
|
|
|
@ -242,13 +242,13 @@ char gSmluaConstants[] = ""
|
|||
" current = target\n"
|
||||
" end\n"
|
||||
" end\n"
|
||||
" return current;\n"
|
||||
" return current\n"
|
||||
"end\n"
|
||||
"--- @param current number\n"
|
||||
"--- @param target number\n"
|
||||
"--- @param inc number\n"
|
||||
"--- @param dec number\n"
|
||||
"--- @return number\n"
|
||||
"--- @param current integer\n"
|
||||
"--- @param target integer\n"
|
||||
"--- @param inc integer\n"
|
||||
"--- @param dec integer\n"
|
||||
"--- @return integer\n"
|
||||
"function approach_s32(current, target, inc, dec)\n"
|
||||
" if current < target then\n"
|
||||
" current = current + inc\n"
|
||||
|
@ -267,8 +267,13 @@ char gSmluaConstants[] = ""
|
|||
" elseif current < -2147483648 then\n"
|
||||
" current = 2147483647 + (current - (-2147483648))\n"
|
||||
" end\n"
|
||||
" return current;\n"
|
||||
" return current\n"
|
||||
"end\n"
|
||||
"-----------\n"
|
||||
"-- sound --\n"
|
||||
"-----------\n"
|
||||
"--- @type Vec3f\n"
|
||||
"gGlobalSoundSource = { x = 0, y = 0, z = 0 }\n"
|
||||
"--- @param bank number\n"
|
||||
"--- @param soundID number\n"
|
||||
"--- @param priority number\n"
|
||||
|
|
Loading…
Reference in a new issue