summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2015-10-29 16:21:27 (GMT)
committerMichele Bini <michele.bini@gmail.com>2015-10-29 16:21:27 (GMT)
commitc83eaa568721a955b9115a0a95701f2db6c887d1 (patch)
tree55cc53537f73f8d74bcfcc8560621803ab5f8ea3
parent74070e7d2a2a3b1e70b8cdd4818c90e4728805b3 (diff)
continued...
-rw-r--r--game.html.coffee48
1 files changed, 24 insertions, 24 deletions
diff --git a/game.html.coffee b/game.html.coffee
index 391499d..3fd3505 100644
--- a/game.html.coffee
+++ b/game.html.coffee
@@ -691,7 +691,7 @@ genPage = ->
event.stopPropagation()
touchInput[name](event,this) catch err
alert err.toString()
- @ColorPlane = ColorPlane = do->
+ false then @ColorPlane = do=>
document: document
init: @>
color <. @
@@ -706,7 +706,7 @@ genPage = ->
t.fillStyle = @color
t.fillRect 0,0,1024,1024
# t.restore()
- @GenericPlane = GenericPlane =
+ @GenericPlane =
document: document
init: @>
document <. @
@@ -742,9 +742,9 @@ genPage = ->
retroScaling(ctx)
@ctx = ctx.drawImage c0, 0, 0, w, height, 0, 0, w, h
- @ParallaxPlane = ParallaxPlane =
- __proto__: GenericPlane
- ParallaxPlaneSuper: GenericPlane
+ @ParallaxPlane =
+ __proto__: @GenericPlane
+ ParallaxPlaneSuper: @GenericPlane
lower: null
x: 0
y: 0
@@ -787,9 +787,9 @@ genPage = ->
l.logzoom? then l.abslogzoom ?= @logzoom + l.logzoom
l.init(options)
@ParallaxPlaneSuper.init.call @, options
- @BoundParallaxPlane = BoundParallaxPlane =
- __proto__: ParallaxPlane
- BoundParallaxPlaneProto: ParallaxPlane
+ @BoundParallaxPlane =
+ __proto__: @ParallaxPlane
+ BoundParallaxPlaneProto: @ParallaxPlane
pmul: 1
alert: alert
init: (options)@>
@@ -836,9 +836,9 @@ genPage = ->
t.drawImage canvas, -nx, -ny
# t.drawImage canvas, 0, 0, w, h, -nx, -ny, w*pmul, h*pmul
- @SeaFloor = SeaFloor = do->
- __proto__: BoundParallaxPlane
- SeaFloorProto: BoundParallaxPlane
+ @SeaFloor = do=>
+ __proto__: @BoundParallaxPlane
+ SeaFloorProto: @BoundParallaxPlane
# terror: CuteluTerror =
# img: cuteluterror
# zoom: 6
@@ -867,7 +867,7 @@ genPage = ->
ctx.fillRect 0, h - 1, w, 1
ctx.fillRect w - 1, 0, 1, h
- @SeamlessPlane = SeamlessPlane =
+ @SeamlessPlane =
withRect: (rx,ry,rw,rh,cb)@>
{ w, h } = @
if (ex = rx + rw) > w
@@ -885,10 +885,10 @@ genPage = ->
cb rx, 0, rw, ey - h, 0, h - ry
else
cb rx, ry, rw, rh, 0, 0
- __proto__: ParallaxPlane
+ __proto__: @ParallaxPlane
- @WaterPlane = WaterPlane = do->
- waterscapeSuper: waterscapeSuper = SeamlessPlane
+ @WaterPlane = do=>
+ waterscapeSuper: waterscapeSuper = @SeamlessPlane
__proto__: waterscapeSuper
random: Math.random
sqrt: Math.sqrt
@@ -960,7 +960,7 @@ genPage = ->
@ctx.drawImage glyphs, o, 0, w + 4, lineHeight, x, y * scale, (w + 4) * scale, lineHeight * scale
x += (w + 1) * scale
- @narrator = do->
+ @narrator = do=>
first: null
last: null
say: (t)@>
@@ -1097,13 +1097,13 @@ genPage = ->
# @waterscapeSuperFrame.apply @, arguments
# # t.restore()
# logzoom: 0
- @seafloor = seafloorPlane = __proto__: SeaFloor
+ @seafloor = __proto__: @SeaFloor
@getDepth = @>
r = @seafloor.fy / @seafloor.mfy
r < 0 then 0 else r
@resetDepth = @> @seafloor.fy = 0
- @waterscape = waterscape = do->
- __proto__: WaterPlane
+ @waterscape = do=>
+ __proto__: @WaterPlane
# color: "cyan"
# logzoom: 0
moltf: 12
@@ -1113,17 +1113,17 @@ genPage = ->
lower:
# __proto__: ColorPlane
# logzoom: 2
- __proto__: WaterPlane
+ __proto__: @WaterPlane
# color: "blue"
colors: [ "#000033", "#001155" ]
alpha: 0.3
# abslogzoom: 2
logzoom: 2
- lower: seafloorPlane
+ lower: @seafloor
@bluescape =
- __proto__: SeamlessPlane
- bluescapeSuper: SeamlessPlane
- lower: waterscape
+ __proto__: @SeamlessPlane
+ bluescapeSuper: @SeamlessPlane
+ lower: @waterscape
logzoom: 0
frame: (t,sx,sy)@>
{ ctx, random, w, h } = @