some fixes for working with engine master branch

This commit is contained in:
Alexander Biryukov 2018-03-30 16:16:49 +05:00
parent 4673422314
commit 2b875dfc2d
36 changed files with 2774 additions and 11 deletions

3
assets/config.json Executable file
View File

@ -0,0 +1,3 @@
{
"effect": "effects/ball-hit-spark.json"
}

102
assets/effects/O-func.json Executable file
View File

@ -0,0 +1,102 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/spark.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"value": 2
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 100, 0, 0]
},
{
"t": 0.1,
"value": [ 95, 30, 0]
},
{
"t": 0.5,
"value": [ 0, 100, 0]
},
{
"t": 1.0,
"value": [ -100, 0, 0]
},
{
"t": 1.5,
"value": [ 0, -100, 0]
},
{
"t": 1.9,
"value": [ 95, -30, 0]
},
{
"t": 2.000,
"value": [ 100, 0, 0]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

94
assets/effects/S-func.json Executable file
View File

@ -0,0 +1,94 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/spark.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"value": 2
},
"coords_system": "PARTICLE_EFFECT",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0]
},
{
"t": 0.5,
"value": [ 50, 20, 0]
},
{
"t": 1.0,
"value": [ 100, 100, 0]
},
{
"t": 1.5,
"value": [ 150, 180, 0]
},
{
"t": 2.000,
"value": [ 200, 200, 0]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

View File

@ -0,0 +1,85 @@
{
"name": "Simple Sparkler",
"emitters":
[
{
"name": "Spark",
"maxParticles": 5,
"preloading": 5,
"texturePath": "textures/spark-white.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timelineType": "LIMITED",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 0.050,
"value": 50
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 170 ]
},
"lifeTime":
{
"min": 0.05,
"max": 0.1
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 2,
"min": [ 300, 0, 0 ],
"max": [ 600, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

116
assets/effects/chaotic.json Executable file
View File

@ -0,0 +1,116 @@
{
"emitters":
[
{
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/spark.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"value": 3
},
"coords_system": "PARTICLE_EFFECT",
"offset_axis_system": "PARTICLE_EFFECT",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0]
},
{
"t": 3.000,
"value": [ 500, 0, 0]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 10, 0, 0]
},
{
"t": 0.025,
"value": [ 9.5, 3, 0]
},
{
"t": 0.125,
"value": [ 0, 10, 0]
},
{
"t": 0.25,
"value": [ -10, 0, 0]
},
{
"t": 0.375,
"value": [ 0, -10, 0]
},
{
"t": 0.475,
"value": [ 9.5, -3, 0]
},
{
"t": 0.5,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

861
assets/effects/confetti.json Executable file
View File

@ -0,0 +1,861 @@
{
"emitters":
[
{
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/star-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 15
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 0]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 100, 0, 0 ],
"max": [ 200, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeOffset":
{
"min": 0,
"max": 1
},
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 0, 1, 0, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/rect-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 15
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 0]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 100, 0, 0 ],
"max": [ 200, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeOffset":
{
"min": 0,
"max": 1
},
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 1, 0, 0, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/circle-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 15
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 0]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 100, 0, 0 ],
"max": [ 200, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeOffset":
{
"min": 0,
"max": 1
},
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 0, 0, 1, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/star-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 15
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 0]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 100, 0, 0 ],
"max": [ 200, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeOffset":
{
"min": 0,
"max": 1
},
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/rect-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 15
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 0]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 100, 0, 0 ],
"max": [ 200, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeOffset":
{
"min": 0,
"max": 1
},
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 0, 1, 1, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/circle-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 15
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 0]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 100, 0, 0 ],
"max": [ 200, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeOffset":
{
"min": 0,
"max": 1
},
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 1, 0, 1, 1 ]
}
}
]
}

274
assets/effects/magic-stars.json Executable file
View File

@ -0,0 +1,274 @@
{
"emitters":
[
{
"preloading": 20,
"texturePath": "textures/magic-star.png",
"textureSize": [ 22.625, 12.5 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 2
}
]
},
"spawnRange":
{
"value": [ 0, 30, 0, 45 ]
},
"lifeTime":
{
"min": 1.5,
"max": 3
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_BIRTH",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 300, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"value": 1
}
]
},
"color":
{
"value": [ 1, 1, 1, 1 ]
},
"emitters":
[
{
"name": "Spark",
"maxParticles": 110,
"preloading": 110,
"texturePath": "textures/spark-white.png",
"textureSize": [ 10, 10 ],
"gravity": [0, -100, 0],
"spawnRange_system": "PARTICLE_BIRTH",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"matchDeathTime": "true",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1,
"value": 50
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"min": 1,
"max": 2
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_BIRTH",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 0, 0, 0 ],
"max": [ 50, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 1, 1, 1 ]
},
{
"t": 1.000,
"value": [ 0, 0, 1, 1 ]
},
{
"t": 1.200,
"value": [ 0, 0, 1, 0 ]
}
]
}
},
{
"name": "Spark",
"maxParticles": 300,
"preloading": 300,
"texturePath": "textures/spark-white.png",
"textureSize": [ 10, 10 ],
"hasInertion": "true",
"gravity": [0, -100, 0],
"spawnRange_system": "PARTICLE_BIRTH",
"spawnTotal":
{
"interpolation": "DISCRETE",
"matchDeathTime": "true",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 2.000,
"value": 300
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"min": 1,
"max": 2
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_BIRTH",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 25, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 1, 1, 0, 1 ]
},
{
"t": 1.000,
"value": [ 1, 0, 0, 1 ]
},
{
"t": 1.200,
"value": [ 1, 0, 0, 0 ]
}
]
}
}
]
}
]
}

110
assets/effects/sine-comets.json Executable file
View File

@ -0,0 +1,110 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/comet.png",
"textureSize": [ 20, 7.12 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 3
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"value": 6
},
"coords_system": "PARTICLE_EFFECT",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 50, 0, 0 ]
},
{
"t": 0.001,
"value": [ 50, 0, 0 ]
},
{
"t": 1.000,
"value": [ 100, 100, 0 ]
},
{
"t": 2.000,
"value": [ 200, -100, 0 ]
},
{
"t": 3.000,
"value": [ 300, 100, 0 ]
},
{
"t": 4.000,
"value": [ 400, -100, 0 ]
},
{
"t": 5.000,
"value": [ 500, 100, 0 ]
},
{
"t": 5.999,
"value": [ 600, -100, 0 ]
},
{
"t": 6.000,
"value": [ 600, -100, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 1, 1 ]
}
}
]
}

110
assets/effects/sine-sparks.json Executable file
View File

@ -0,0 +1,110 @@
{
"name": "Sparkler - бенгальский огонь",
"emitters":
[
{
"name": "Spark",
"maxParticles": 300,
"preloading": 100,
"texturePath": "textures/spark.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0,
"value": 0
},
{
"t": 1,
"value": 20
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 0 ]
},
"lifeTime":
{
"value": 6
},
"coords_system": "PARTICLE_EFFECT",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "CUBIC_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 50, 0, 0 ]
},
{
"t": 0.001,
"value": [ 50, 0, 0 ]
},
{
"t": 1.000,
"value": [ 100, 100, 0 ]
},
{
"t": 2.000,
"value": [ 200, -100, 0 ]
},
{
"t": 3.000,
"value": [ 300, 100, 0 ]
},
{
"t": 4.000,
"value": [ 400, -100, 0 ]
},
{
"t": 5.000,
"value": [ 500, 100, 0 ]
},
{
"t": 5.999,
"value": [ 600, -100, 0 ]
},
{
"t": 6.000,
"value": [ 600, -100, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

View File

@ -0,0 +1,93 @@
{
"name": "Simple Sparkler",
"emitters":
[
{
"name": "Spark",
"maxParticles": 2000,
"preloading": 2000,
"texturePath": "textures/spark-white.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 0.001,
"value": 0
},
{
"t": 9.999,
"value": 10000
},
{
"t": 10.000,
"value": 10000
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"min": 0.1,
"max": 1
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1,
"min": [ 300, 0, 0 ],
"max": [ 600, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

85
assets/effects/sparkler.json Executable file
View File

@ -0,0 +1,85 @@
{
"name": "Simple Sparkler",
"emitters":
[
{
"name": "Spark",
"maxParticles": 1100,
"preloading": 1100,
"texturePath": "textures/spark-white.png",
"textureSize": [ 10, 10 ],
"hasInertion": "false",
"gravity": [0, 0, 0],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timelineType": "CONTINUED",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 1000
}
]
},
"spawnRange":
{
"value": [ 0, 0, 0, 360 ]
},
"lifeTime":
{
"min": 0.1,
"max": 1
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"rotation_system": "PARTICLE_EFFECT",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1,
"min": [ 300, 0, 0 ],
"max": [ 600, 0, 0 ]
}
]
},
"rotation":
{
"value": [ 0, 0, 0 ]
},
"scale":
{
"value": 1
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
}
]
}

646
assets/effects/test.json Executable file
View File

@ -0,0 +1,646 @@
{
"emitters":
[
{
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/star-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_ITSELF",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 150, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"offset":
{
"interpolation": "CUBIC_SPLINE",
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.00,
"value": [ 10, 0, 0]
},
{
"t": 0.05,
"value": [ 9.5, 3, 0]
},
{
"t": 0.25,
"value": [ 0, 10, 0]
},
{
"t": 0.5,
"value": [ -10, 0, 0]
},
{
"t": 0.75,
"value": [ 0, -10, 0]
},
{
"t": 0.95,
"value": [ 9.5, -3, 0]
},
{
"t": 1.0,
"value": [ 10, 0, 0]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 0, 1, 0, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/rect-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_ITSELF",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 150, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 1, 0, 0, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/circle-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_ITSELF",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 150, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 0, 0, 1, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/star-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_ITSELF",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 150, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 1, 1, 0, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/rect-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_ITSELF",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 150, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 0, 1, 1, 1 ]
}
},
{
"name": "Magic Star",
"maxParticles": 10000,
"preloading": 1000,
"texturePath": "textures/circle-white.png",
"textureSize": [ 5, 5 ],
"gravity": [ 0, -100, 0 ],
"spawnRange_system": "PARTICLE_EFFECT",
"spawnTotal":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": 0
},
{
"t": 1.000,
"value": 5
}
]
},
"spawnRange":
{
"value": [ 0, 0, 360, 180 ]
},
"lifeTime":
{
"min": 10,
"max": 10
},
"coords_system": "PARTICLE_BIRTH",
"coords_axis_system": "PARTICLE_BIRTH",
"offset_axis_system": "PARTICLE_ITSELF",
"rotation_system": "PARTICLE_ITSELF",
"coords":
{
"interpolation": "LINEAR_SPLINE",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 0, 0 ]
},
{
"t": 1.000,
"min": [ 150, 0, 0 ],
"max": [ 300, 0, 0 ]
}
]
},
"rotation":
{
"interpolation": "LINEAR_SPLINE",
"timeOffset":
{
"min": 0,
"max": 1
},
"timelineType": "LOOPED",
"timeline":
[
{
"t": 0.000,
"value": [ 0, 45, 0 ]
},
{
"t": 1.000,
"value": [ 360, 45, 0 ]
}
]
},
"scale":
{
"interpolation": "DISCRETE",
"timeline":
[
{
"min": 1,
"max": 2
}
]
},
"color":
{
"value": [ 1, 0, 1, 1 ]
}
}
]
}

View File

@ -0,0 +1,8 @@
precision mediump float;
uniform vec4 Color;
void main()
{
gl_FragColor = Color;
}

View File

@ -0,0 +1,8 @@
attribute vec3 vPosition;
uniform mat4 ProjectionMatrix;
void main()
{
gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
}

View File

@ -0,0 +1,11 @@
precision mediump float;
in vec2 texCoord;
flat in vec4 color;
uniform sampler2D Texture;
void main()
{
gl_FragColor = texture2D(Texture,texCoord) * color;
}

View File

@ -0,0 +1,15 @@
attribute vec3 vPosition;
attribute vec2 vTexCoord;
attribute vec4 vColor;
out vec2 texCoord;
flat out vec4 color;
uniform mat4 ProjectionMatrix;
void main()
{
gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
texCoord = vTexCoord;
color = vColor;
}

View File

@ -0,0 +1,10 @@
precision mediump float;
varying vec2 texCoord;
uniform sampler2D Texture;
void main()
{
gl_FragColor = texture2D(Texture,texCoord);
}

View File

@ -0,0 +1,12 @@
attribute vec3 vPosition;
attribute vec2 vTexCoord;
varying vec2 texCoord;
uniform mat4 ProjectionMatrix;
void main()
{
gl_Position = ProjectionMatrix * vec4(vPosition.xyz, 1.0);
texCoord = vTexCoord;
}

BIN
assets/textures/circle-white.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
assets/textures/comet-white.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
assets/textures/comet.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 KiB

BIN
assets/textures/magic-star.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

BIN
assets/textures/rect-white.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
assets/textures/spark-white.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
assets/textures/spark.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
assets/textures/star-white.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -761,7 +761,7 @@ void TGameLevel::Draw()
Renderer->ScaleMatrix(scale);
Renderer->TranslateMatrix(-Vector3f(Renderer->GetMatrixWidth() * 0.5f, Renderer->GetMatrixHeight() * 0.5f, 0));
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[LevelScreenTexture]);
Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH)); // Game Screen Scale
Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH), Vector2f (0.f,0.f), Vector2f(1.f,1.f)); // Game Screen Scale
Renderer->PopMatrix();
CheckGlError();
return;
@ -805,7 +805,7 @@ void TGameLevel::Draw()
}
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[BkgTexture]);
Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH));
Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH),Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
std::list<TBall>::iterator iBall;
@ -846,22 +846,22 @@ void TGameLevel::Draw()
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_REFLECTOR_TEXTURE]);
float xRW = 210.f * tSW/700.f; // x Reflector Width
float yRH = 45.f * tSH/480.f; // y Reflector Height
Renderer->DrawRect(Vector2f(-xRW*0.5f, -yRH*0.5f)+ReflectorPos, Vector2f(xRW*0.5f, yRH*0.5f)+ReflectorPos);
Renderer->DrawRect(Vector2f(-xRW*0.5f, -yRH*0.5f)+ReflectorPos, Vector2f(xRW*0.5f, yRH*0.5f)+ReflectorPos, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
const Vector2f wallUpPos1(xlOffset, tSH-ylOffset-uWTW);
const Vector2f wallUpPos2(tSW + xlOffset, tSH-ylOffset);
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_UP_TEXTURE]);
Renderer->DrawRect(wallUpPos1, wallUpPos2);
Renderer->DrawRect(wallUpPos1, wallUpPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
const Vector2f wallLeftPos1(xlOffset, lrFBO+ylOffset);
const Vector2f wallLeftPos2(lWTW + xlOffset, tSH-ylOffset-uWTW);
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_LEFT_TEXTURE]);
Renderer->DrawRect(wallLeftPos1, wallLeftPos2);
Renderer->DrawRect(wallLeftPos1, wallLeftPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
const Vector2f wallRightPos1(tSW+xlOffset-rWTW, lrFBO+ylOffset);
const Vector2f wallRightPos2(tSW + xlOffset, tSH-ylOffset-uWTW);
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_RIGHT_TEXTURE]);
Renderer->DrawRect(wallRightPos1, wallRightPos2);
Renderer->DrawRect(wallRightPos1, wallRightPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
if (BonusFloorTimer>0.f)
@ -873,7 +873,7 @@ void TGameLevel::Draw()
const Vector2f wallBonusPos1(bWTO + xlOffset, ylOffset + wallDownPos(1) - bWTW*0.5f);
const Vector2f wallBonusPos2(tSW + xlOffset - bWTO, ylOffset + wallDownPos(1) + bWTW*0.5f);
Renderer->DrawRect(wallBonusPos1, wallBonusPos2);
Renderer->DrawRect(wallBonusPos1, wallBonusPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
}

View File

@ -8,6 +8,7 @@
#include "menucode.h"
#include "main_code.h"
#include <boost/property_tree/json_parser.hpp>
boost::signals2::signal<void (Vector2f)> OnTapUpSignal;
boost::signals2::signal<void (Vector2f)> OnTapUpAfterMoveSignal;
@ -96,6 +97,7 @@ void TMyApplication::InnerInit()
ResourceManager->TexList.AddTexture("console_bkg.bmp");
ResourceManager->FrameManager.AddFrameRenderBuffer("LevelBuffer", 512, 512);
OnDrawSignal.connect(boost::bind(&TGameLoading::Draw, boost::ref(GameLoading)));
@ -106,6 +108,7 @@ void TMyApplication::InnerInit()
Renderer->SetFullScreenViewport();
Application->SetGameLevelScreenScale();
//GameLevel.SetLevelScale();
}
void TMyApplication::InnerDeinit()
@ -324,6 +327,7 @@ void TMyApplication::InnerDraw()
{
glDisable(GL_DEPTH_TEST);
sparkler.draw();
OnDrawSignal();
@ -377,6 +381,7 @@ void TMyApplication::InnerUpdate(size_t dt)
{
//*SE::Console << "4CONST_GAMESTATE_MENU";
Menu.Update(dt);
}
else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_LEVEL)
{
@ -522,4 +527,20 @@ float TMyApplication::GetGameLevelScreenWidth()
float TMyApplication::GetGameLevelScreenHeight()
{
return levelScreenHeight;
}
}
void TMyApplication::InnerOnMouseDown(TMouseState& mouseState) {
/*
if (mouseState.LeftButtonPressed) {
if ((float)mouseState.X >= (Renderer->GetScreenWidth())*0.25f && (float)mouseState.X <= (Renderer->GetScreenWidth())*0.75f && (float)mouseState.Y >= (Renderer->GetScreenHeight())*0.25f && (float)mouseState.Y <= (Renderer->GetScreenHeight())*0.75f) {
// some tmp code
Application->GoFromMenuToGame(1);
}
}
*/
OnTapDownSignal(Vector2f(mouseState.X, ((Renderer->GetScreenHeight()) - mouseState.Y))); // Temporary mouse down action for WIN32
}
void TMyApplication::InnerOnMouseMove(TMouseState& mouseState) {
}

View File

@ -90,7 +90,7 @@ class TMyApplication : public TApplication
protected:
int levelScreenWidth;
int levelScreenHeight;
float levelScreenRatio = 1.5f;
float levelScreenRatio = 1.6;
TGameMenu Menu;
TGameLevel GameLevel;
@ -114,6 +114,12 @@ protected:
void ApplySignalsToCredits();
void DisapplySignalsToCredits();
// Mouse new methods
virtual void InnerOnMouseDown(TMouseState& mouseState);
virtual void InnerOnMouseMove(TMouseState& mouseState);
ParticleEffect sparkler;
public:
bool Loaded;
@ -160,6 +166,10 @@ public:
extern TMyApplication* Application;
class TMySalmonRenderer : public TSalmonRenderer
{
public:
void DrawRect(const Vector2f& p1, const Vector2f& p2);
};
#endif

View File

@ -1,6 +1,7 @@
#include "menucode.h"
#include "main_code.h"
const float CONST_SPEED_NEG_ACCELERATION_K = 0.03f;
const float CONST_MENU_POS_K = 0.25f;
@ -135,7 +136,7 @@ void TGameMenu::OnTapDown(Vector2f pos)
{
*SE::Console << "TGameMenu::OnTapDown";
HoldToTap = true;
if (pos(1)<64.f && pos(0)>=265.f-128.f && pos(0)<=265.f+128.f)
{
Application->GoFromMenuToCredits();
@ -172,6 +173,11 @@ void TGameMenu::OnTapUp(Vector2f pos)
*SE::Console << "TGameMenu::OnTapUp";
HoldToTap = false;
std::fstream tapLog;
tapLog.open("tapLog.txt", std::ios::app);
tapLog << "Tapped up:: " << pos(0) << " " << pos(1) << endl;
tapLog.close();
if (SelectedGame != -1)
{
MenuPos = -CONST_MENU_WINDOW_DISTANCE*SelectedGame-40.f;

View File

@ -0,0 +1,37 @@
Tapped up:: 445 35Tapped up:: 638 34Tapped up:: 582 87Tapped up:: 282 45
Tapped up:: 602 49
Tapped up:: 314 93
Tapped up:: 434 12
Tapped up:: 410 26
Tapped up:: 398 21
Tapped up:: 264 269
Tapped up:: 286 218
Tapped up:: 286 17
Tapped up:: 286 17
Tapped up:: 186 36
Tapped up:: 266 95
Tapped up:: 306 169
Tapped up:: 234 257
Tapped up:: 539 47
Tapped up:: 523 361
Tapped up:: 367 345
Tapped up:: 5 4
Tapped up:: 785 10
Tapped up:: 777 468
Tapped up:: 11 473
Tapped up:: 19 12
Tapped up:: 783 11
Tapped up:: 780 468
Tapped up:: 13 471
Tapped up:: 406 240
Tapped up:: 10 13
Tapped up:: 786 10
Tapped up:: 784 468
Tapped up:: 8 471
Tapped up:: 410 241
Tapped up:: 304 160
Tapped up:: 352 184
Tapped up:: 277 135
Tapped up:: 337 145
Tapped up:: 274 106
Tapped up:: 548 155

View File

@ -0,0 +1,46 @@
Tapped down::Before_signal
10 467
Tapped down::After_signal
10 13
Tapped down::Before_signal
786 470
Tapped down::After_signal
786 10
Tapped down::Before_signal
784 12
Tapped down::After_signal
784 468
Tapped down::Before_signal
8 9
Tapped down::After_signal
8 471
Tapped down::Before_signal
410 239
Tapped down::After_signal
410 241
Tapped down::Before_signal
230 351
Tapped down::After_signal
230 129
Tapped down::Before_signal
233 461
Tapped down::After_signal
233 19
Tapped down::Before_signal
295 179
Tapped down::Before_signal
304 320
Tapped down::After_signal
304 160
Tapped down::Before_signal
383 419
Tapped down::Before_signal
374 71
Tapped down::Before_signal
240 424
Tapped down::Before_signal
259 261
Tapped down::Before_signal
390 51
Tapped down::Before_signal
245 400