eeee
This commit is contained in:
parent
5a5a31430c
commit
1ddffb71e4
|
@ -34,7 +34,8 @@ IT WON'T BE LONG NOW, BEFORE WE GO TO OUR REWARD.
|
|||
TETÉLESTAI
|
||||
]],
|
||||
phoneRing = "THE PHONE RINGS IMPATIENTLY",
|
||||
phonePickup = "[%s]: PICK UP",
|
||||
phoneRedial = "[%s]: *69",
|
||||
phonePickup = "[%s]: PICK UP", --use key
|
||||
phoneRedial = "[%s]: *69", --use key
|
||||
phoneClue = "🔔🔔🔔🔔🔔🔔🔔",
|
||||
phoneWin = "WHAT IS WANTED",
|
||||
}
|
|
@ -92,4 +92,8 @@ function t.pickupPhone()
|
|||
return contempra.pickup()
|
||||
end
|
||||
|
||||
function t.ring( idx )
|
||||
return bell.ring( idx )
|
||||
end
|
||||
|
||||
return t
|
|
@ -71,32 +71,32 @@ local function lgMesh( primitive )
|
|||
local finalMesh
|
||||
for name, accIdx in pairs( primitive.attributes ) do
|
||||
local acc = asset.accessors[accIdx+1]
|
||||
|
||||
|
||||
local mesh = love.graphics.newMesh(
|
||||
{attributeFormat(name, acc)}, --vertexformat
|
||||
acc.count,
|
||||
"triangles",
|
||||
"static"
|
||||
)
|
||||
|
||||
|
||||
local bfv = bufferViews[1+acc.bufferView]
|
||||
mesh:setVertices( bfv )
|
||||
|
||||
|
||||
if finalMesh then
|
||||
finalMesh:attachAttribute( attributeNames[name], mesh )
|
||||
else
|
||||
finalMesh = mesh
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
do
|
||||
local acc = asset.accessors[1+primitive.indices]
|
||||
local bfv = bufferViews[1+acc.bufferView]
|
||||
finalMesh:setVertexMap(bfv, elementComponentTypes[acc.componentType] )
|
||||
end
|
||||
|
||||
|
||||
if primitive.material then finalMesh:setTexture( lgTexture( primitive.material ) ) end
|
||||
return finalMesh
|
||||
end
|
||||
|
@ -106,14 +106,20 @@ local bellMesh = lgMesh( asset.meshes[1].primitives[1] )
|
|||
--each bell has the following positional data:
|
||||
-- scale, x, z, colorparam
|
||||
local bells = {}
|
||||
local bellInstanceMesh
|
||||
local bellInstanceMesh
|
||||
local ringSource = love.audio.newSource( "sfx/bellC2.ogg", "static" )
|
||||
|
||||
do
|
||||
local c, s = math.cos( 2*math.pi / 7 ), -math.sin( 2*math.pi / 7 )
|
||||
|
||||
local x, z = math.cos(math.pi/7), -math.sin( math.pi/7 )
|
||||
local pitches = { 0, 5, 8, 12, 10, 22, 25 }
|
||||
for i = 1, #pitches do
|
||||
pitches[i] = math.pow( 2.0, pitches[i] / 12.0 )
|
||||
end
|
||||
|
||||
local r = 20
|
||||
for i = 1, 7 do
|
||||
bells[i] = { i / 2, r * x, r * z, (i-1)/6 }
|
||||
bells[i] = { 5.0 / pitches[i], r * x, r * z, (i-1)/6 }
|
||||
x, z = c*x+s*z, c*z-s*x
|
||||
end
|
||||
bellInstanceMesh = lg.newMesh({{"bellInstance","float",4}}, bells, nil, "static" )
|
||||
|
@ -139,11 +145,16 @@ end
|
|||
function t.transpose( i, j )
|
||||
print( "transposing:", i, j )
|
||||
io.flush()
|
||||
bells[i][2], bells[i][3], bells[j][2], bells[j][3] =
|
||||
bells[j][2], bells[j][3], bells[i][2], bells[i][3]
|
||||
bells[i][1], bells[j][1] = bells[j][1], bells[i][1]
|
||||
bellInstanceMesh:setVertices( bells )
|
||||
bellMesh:attachAttribute( "bellInstance", bellInstanceMesh,
|
||||
"perinstance" )
|
||||
end
|
||||
|
||||
function t.ring( i )
|
||||
ringSource:stop()
|
||||
ringSource:setPitch( bells[i][1] )
|
||||
ringSource:play()
|
||||
end
|
||||
|
||||
return t
|
|
@ -121,7 +121,7 @@ local shaders = {
|
|||
}
|
||||
|
||||
local function veilAlpha( x, z )
|
||||
return math.max( 0, math.min( 1.0, 1.0 - (x*x+z*z - 7.0) / 25.0))
|
||||
return math.max( 0, math.min( 1.0, 1.0 - (x*x+z*z - 3.0) / 90.0))
|
||||
end
|
||||
|
||||
function obj.draw( view, proj, light, x, z )
|
||||
|
|
|
@ -88,6 +88,9 @@ function t.keypressed( key, code, isrepeat )
|
|||
if code == "1" then
|
||||
return world.transposeBells( 2, 7 )
|
||||
end
|
||||
if code == "5" then
|
||||
return world.ring( 2 )
|
||||
end
|
||||
end
|
||||
|
||||
function t.keyreleased( key, code )
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue