Commits

mcc committed 8d42313

Cube, fix 'blanking' frame on door open/shut

Comments (0)

Files changed (8)

media/levels/rroad_3/onUpdate.lua

 if global_ticks % km.tickon == 0 then
-	au.tick:setVolume(0.125)
+	au.tick:setVolume(0.375)
 	au.tick:Play(false)
 	
 	tickRotate(gm.at)

media/levels/star/onUpdate.lua

 if global_ticks % km.tickon == 0 then
-	au.tick:setVolume(0.125)
+	au.tick:setVolume(1.0)
 	au.tick:Play(false)
 	
 	tickRotate(gm.at)

media/levels/temple_exit/entity/door_door/onClick.lua

 gm.door_state = 0
 trashScreen("temple_exit_door_door")
 actRemoveScreen("temple_exit_door_open")
+actExpedite()
 addScreen("temple_exit_door_shut", km.roomObj)

media/levels/temple_exit/entity/door_open/onClick.lua

+-- ENTER DOOR
+
 go("exit_chute")

media/maps/cube_path.svg

Old
Old image
New
New image
 <!-- Created with Inkscape (http://www.inkscape.org/) -->
 
 <svg
+   xmlns:polycode="http://msm.runhello.com/local/svg/polycode0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:cc="http://creativecommons.org/ns#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   xmlns:polycode="http://msm.runhello.com/local/svg/polycode0"
    width="1280"
    height="800"
    id="svg2"
    version="1.1"
    inkscape:version="0.48.1 r9760"
-   sodipodi:docname="temple.svg"
+   sodipodi:docname="cube_path.svg"
    xrule="center">
   <defs
      id="defs4" />
      borderopacity="1.0"
      inkscape:pageopacity="1"
      inkscape:pageshadow="2"
-     inkscape:zoom="0.49497475"
-     inkscape:cx="790.43661"
-     inkscape:cy="394.78016"
+     inkscape:zoom="0.48820752"
+     inkscape:cx="698.0969"
+     inkscape:cy="370.67667"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showgrid="false"
-     inkscape:window-width="1271"
-     inkscape:window-height="744"
-     inkscape:window-x="10"
+     inkscape:window-width="1210"
+     inkscape:window-height="729"
+     inkscape:window-x="38"
      inkscape:window-y="0"
      inkscape:window-maximized="0"
      showguides="true"
      inkscape:object-nodes="true"
      inkscape:snap-bbox="true"
      inkscape:snap-smooth-nodes="true"
-     inkscape:snap-nodes="true">
+     inkscape:snap-nodes="true"
+     inkscape:snap-global="false">
     <inkscape:grid
        type="xygrid"
        id="grid2996" />
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
     <polycode:dummy />
      inkscape:label="Layer 1"
      inkscape:groupmode="layer"
      id="layer1"
-     transform="translate(5.7142857,-248.57143)" />
+     transform="translate(5.7142857,-248.57143)">
+    <path
+       style="color:#000000;fill:#ff5555;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 695.21923,600.12447 1.44837,-238.98161 227.39462,-108.628 198.42718,0 -2.8968,265.05233 -121.66333,86.9024 z"
+       id="path3024"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 696.6676,361.14286 290.39887,-5.0693 0.72418,7.96605 -291.12305,3.62093"
+       id="path3026"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+    <path
+       style="color:#000000;fill:#55ffdd;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="M 982.72135,358.24612 z"
+       id="path3028"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+    <path
+       style="color:#000000;fill:#55ffdd;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="M 980.54879,358.24612 z"
+       id="path3030"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+    <path
+       style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 980.54879,358.9703 144.11311,-112.97312 8.6903,5.79349 -149.18248,111.52475 7.96605,244.77511 7.96603,0 -13.75952,-249.84441"
+       id="path3034"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+    <rect
+       style="fill:none;stroke:#ff8080;stroke-width:1.04787183px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       id="sensor_down"
+       width="377.72018"
+       height="872.81635"
+       x="-78.169304"
+       y="217.48189"
+       polycode:onClick="go(&quot;rroad&quot;)"
+       polycode:isVisible="0" />
+    <rect
+       polycode:isVisible="0"
+       polycode:onClick="go(&quot;star&quot;)"
+       y="149.86365"
+       x="1296.2224"
+       height="393.55969"
+       width="377.76813"
+       id="sensor_up"
+       style="fill:none;stroke:#ff8080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="color:#000000;fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m -559.18844,808.19324 878.72469,-292.90823 59.40097,40.96618 -764.01937,385.08215"
+       id="path3003"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="color:#000000;fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 319.53625,515.28501 159.76812,40.96618 30.72464,16.38648 -131.09179,-16.38648"
+       id="path3016"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+    <path
+       style="color:#000000;fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 510.02901,572.63767 38.91788,-22.5314 -24.57971,-20.4831 -45.06281,26.62802"
+       id="path3018"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+    <path
+       style="color:#000000;fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="M 548.94689,550.10627 659.73408,689.92362 622.07637,680.1471 519.1412,567.36219 548.94689,550.10627"
+       id="path3020"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="color:#000000;fill:#55ffdd;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="M 639.7908,664.7545 789.11116,561.88404 812.15464,561.37197 659.73408,689.92362"
+       id="path3022"
+       inkscape:connector-curvature="0"
+       transform="translate(-5.7142857,248.57143)" />
+  </g>
 </svg>

media/overlay/game/onUpdate.lua

 
 while not act:empty() do
 	action = act:peek()
+	if gm.expedite then action.wait = 0 gm.expedite = false end
 	if action.wait and action.wait > 0 then
 		action.wait = action.wait - 1
 		break
 	end
 	act:pop()
 	why = action[1]
---	print({ticks, why, action.wait})
+--	print({ticks, why, action.wait, action.target and bridge:room_name(action.target)})
 	
 	if why == "enable" then
 		bridge:setVisible(action.target, true)
 	elseif why == "do" then
 		action.this(action)
 	end
+end
+
+if _DEBUG and dx then
+	dx()
+	dx = nil
 end

media/overlay/pregame/onLoad.lua

 km = {wait=2, handticks = 20, tickon = 80,}
 
 function plant(child)
-	if not bridge:getVisible(child) then child.sensor = true return end
+	if not bridge:getVisible(child) or string_empty(bridge:room_name(child)) then
+		child.sensor = true
+		return
+	end
 	bridge:setVisible(child, false)
 	act:push({"enable", target=child, wait=km.wait})
 end
 end
 
 function actRemoveScreen(screenName, target)
-	act:push({"do", this=function() removeScreen(screenName, target) end})
+	act:push({"do", this=function() print({"remove", screenName}) removeScreen(screenName, target) end})
 end
 
 function actInstantAddScreen(name, objname, dontPlant)
-	act:push({"do", this=function() addScreen(name, objname, dontPlant) end})
+	act:push({"do", this=function() print({"add",name,dontPlant}) addScreen(name, objname, dontPlant) end})
+end
+
+function actExpedite()
+	act:push({"do", this=function() gm.expedite = true end})
 end
 
 function trashScreen(screenName, target)

source/project_util.lua

 	return t
 end
 
+function string_empty(s)
+	return not (s and #s>0)
+end
+
 function reboot() -- Or as near as possible anyway.
 	bridge:load_room_txt("media/init.txt")
 end
 
 -- I use this to check whether the target run-script phase in Xcode is acting up, ignore it
 function test()
-	print("BLARG4")
+	print("BLARG5")
 end