Add self publishing scripts.

This commit is contained in:
2019-04-20 15:32:41 +02:00
parent 3990cd4b18
commit 7cf7582560
38 changed files with 285 additions and 1 deletions

62
Web/Deployer/index.php Normal file
View File

@@ -0,0 +1,62 @@
<?php
require_once(__DIR__."/utils.php");
$klogRoot=__DIR__."/../";
$method=$_SERVER['REQUEST_METHOD'];
$input=json_decode(file_get_contents('php://input'), true);
$config=ReadJsonFile(__DIR__."/priv/config.json");
if ($config==null) {
EchoError("Config not found, use \"config.example.json\", as base to \"config.json\".");
echo json_encode(["Error"=>"NotConfigured", "Message"=>"Config not found, use \"config.example.json\", as base to \"config.json\"."]);
return;
}
if (isset($input["Key"])===false || $input["Key"]!==$config["Key"]) {
EchoError("AccessDenied");
echo json_encode(["Error"=>"AccessDenied"]);
return;
}
if (isset($input["Action"])===false) {
EchoError("ActionNotSpecified");
echo json_encode(["Error"=>"ActionNotSpecified"]);
return;
}
if ($input["Action"]==="CheckFiles") {
$filesChecked=array();
$files=$input["Files"];
foreach ($files as $file) {
$destPath=$file["DestPath"];
$checksum=$file["Checksum"];
$filePath=$klogRoot.$destPath;
$data=file_get_contents($filePath);
$sha1=sha1($data);
$filesChecked[]=[
"DestPath"=>$destPath,
"ChecksumDifferent"=>($checksum!==$sha1),
];
}
echo json_encode($filesChecked);
return;
}
if ($input["Action"]==="UploadFile") {
$destPath=$input["DestPath"];
$data=base64_decode($input["Data"]);
EchoDebug("UploadFile: ".$destPath);
$destPathDir=dirname($klogRoot.$destPath."/");
mkdir($destPathDir, 0777, true);
file_put_contents($klogRoot.$destPath, $data);
if (isset($input["Timestamp"])) {
touch($klogRoot.$destPath, $input["Timestamp"]);
}
echo json_encode(true);
return;
}
echo json_encode(null);

View File

@@ -0,0 +1,2 @@
# Denegar desde cualquier sitio, todo
deny from all

View File

@@ -0,0 +1 @@
{"Key": "12345678"}

128
Web/Deployer/utils.php Normal file
View File

@@ -0,0 +1,128 @@
<?php
function EchoError($text)
{
file_put_contents('php://stderr', "!!!!! ".$text."\n");
}
function EchoDebug($text)
{
file_put_contents('php://stderr', "***** ".$text."\n");
}
function EchoInfo($text)
{
file_put_contents('php://stderr', "..... ".$text."\n");
}
function GetDocRoot()
{
$localPath=$_SERVER["SCRIPT_NAME"];
$localName=basename($localPath);
$absolutePath=realpath($localName);
$absolutePath=str_replace("\\", "/", $absolutePath);
$docRoot=substr($absolutePath, 0, strpos($absolutePath, $localPath));
return($docRoot);
}
function pcre_fnmatch($pattern, $string)
{
$patternQuoted='#'.$pattern.'#';
$pattern2=strtr($patternQuoted, array('*' => '.*', '?' => '.', '.' => '\\.'));
return (boolean)preg_match($pattern2, $string);
}
function ScanFilesRecursive($path, &$files, $ignores)
{
if (file_exists($path)===false) {
return;
}
$dirObj=@opendir($path);
if ($dirObj===false) {
return;
}
while (1) {
$file=readdir($dirObj);
if ($file===false) {
break;
}
$filePath=$path.$file;
if ($file==='.' || $file==='..') {
continue;
}
$ignoreThis=false;
foreach ($ignores as $ignore) {
if ($file===$ignore) {
$ignoreThis=true;
break;
}
if (pcre_fnmatch($ignore, $filePath)) {
$ignoreThis=true;
break;
}
}
if ($ignoreThis) {
continue;
}
if (is_dir($path.$file)) {
ScanFilesRecursive($path.$file."/", $files, $ignores);
} else {
if (is_file($path.$file)) {
$files[]=$path.$file;
}
}
}
closedir($dirObj);
}
function ReplacePrefix($text, $prefix)
{
if (substr($text, 0, strlen($prefix)) == $prefix) {
$text = substr($text, strlen($prefix));
}
return $text;
}
function PostRequest($url, $object)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($object));
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_NOBODY, false);
curl_setopt($curl, CURLOPT_HTTPGET, false);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0");
curl_setopt($curl, CURLOPT_AUTOREFERER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
#curl_setopt($curl, CURLOPT_VERBOSE, true);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($status!=200) {
EchoDebug($json_response);
EchoError("PostRequest.Code: ".$status." ".curl_error($curl));
return null;
}
curl_close($curl);
$response = json_decode($json_response, true);
return $response;
}
function ReadJsonFile($file)
{
$data=@file_get_contents($file);
return json_decode($data, true);
}

746
Web/code/CandyFucker.js Normal file
View File

@@ -0,0 +1,746 @@
window.Images = new ImageLoader();
window.Sounds = new SoundLoader();
/////////////////////////////////////////
//
// Particle
//
var Particle = function (game, position, image) {
this.Game = game;
this.GameEntity = new GameEntity(
game.GameScreen,
position, {
X: image.naturalWidth,
Y: image.naturalHeight
},
image,
"Particle");
this.Speed = Vec2D.Scale(
Vec2D.Normalize({
X: Math.floor(Math.random() * 33) - 16,
Y: Math.floor(Math.random() * 33) - 16
}),
48);
};
Particle.prototype = {
Update: function () {
this.Speed = Vec2D.Scale(this.Speed, 1.5);
this.GameEntity.AddPosition(this.Speed);
if (this.GameEntity.InsideScreen() === false) {
this.GameEntity.Delete();
}
}
};
/////////////////////////////////////////
//
// CandyEntity
//
var CandyEntity = function (game, color, gridPosition) {
this.Game = game;
this.GridPosition = gridPosition || {
X: 0,
Y: 0
};
this.Color = color;
this.GameEntity = new GameEntity(
game.GameScreen,
null, {
X: 32,
Y: 32
},
Images.GetImage("Balls" + color),
"Candy");
this.SetGridPosition(gridPosition.X, gridPosition.Y);
};
CandyEntity.prototype = {
Update: function () {},
SetGridPosition: function (x, y) {
this.GridPosition.X = x;
this.GridPosition.Y = y;
this.GameEntity.UpdatePosition({
X: this.Game.GridOffset.X + (x * 32),
Y: this.Game.GridOffset.Y + (y * 32)
});
},
Explode: function () {
var frag;
var i;
for (i = 0; i < 4; i++) {
frag = new Particle(
this.Game,
this.GameEntity.PositionDest,
Images.GetImage("Frags" + this.Color));
frag.GameEntity.Update();
this.Game.GameScreen.AddEntity(frag);
}
this.GameEntity.Delete();
window.Sounds.PlaySound("Explosion");
},
Delete: function () {
this.GameEntity.Delete();
},
SetOffset: function (x, y) {
this.GameEntity.UpdatePosition({
X: (this.Game.GridOffset.X + (this.GridPosition.X * 32)) + x,
Y: (this.Game.GridOffset.Y + (this.GridPosition.Y * 32)) + y
});
},
ResetPosition: function () {
this.SetGridPosition(this.GridPosition.X, this.GridPosition.Y);
},
Debug: false
};
CandyEntity.RandomCandy = function () {
//var candyTypes = ["Red", "Blue", "Cyan", "Green", "Yellow"];
var candyTypes = ["Red", "Blue", "Cyan", "Yellow"];
return candyTypes[Math.floor(Math.random() * candyTypes.length)];
};
/////////////////////////////////////////
//
// CandyBoard
//
var CandyBoard = function (game) {
this.Game = game;
this.GridSize = {
X: 0,
Y: 0
};
this.Grid = null;
this.Changed = false;
};
CandyBoard.prototype = {
IsChanged: function () {
return this.Changed;
},
GetCandy: function (x, y) {
if (x < 0 || x > this.GridSize.X || y < 0 || y > this.GridSize.Y) {
return null;
}
return this.Grid[y][x];
},
SetCandy: function (x, y, candy) {
if (x < 0 || x > this.GridSize.X || y < 0 || y > this.GridSize.Y) {
return;
}
this.Grid[y][x] = candy;
this.Changed = true;
candy.SetGridPosition(x, y);
},
RemoveCandy: function (x, y) {
if (x < 0 || x > this.GridSize.X || y < 0 || y > this.GridSize.Y) {
return;
}
var candy = this.Grid[y][x];
this.Grid[y][x] = null;
this.Changed = true;
return candy;
},
BuildGrid: function (width, height) {
var x,
y;
this.GridSize = {
X: width,
Y: height
};
// Allocate Grid
this.Grid = [];
for (y = 0; y < height; y++) {
this.Grid.push([]);
for (x = 0; x < width; x++) {
this.Grid[y].push(null);
}
}
// Fill Grid
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
var entCandy = new CandyEntity(
this.Game,
CandyEntity.RandomCandy(), {
X: x,
Y: y
});
this.Game.GameScreen.AddEntity(entCandy);
this.SetCandy(x, y, entCandy);
}
}
this.Changed = true;
},
ScanHorizontalRuns: function () {
var x,
y;
var xPrev,
yPrev;
var currentColor;
var prevColor;
var horizontalRuns = [];
for (y = 0; y < this.GridSize.Y; y++) {
yPrev = y;
xPrev = 0;
prevColor = "";
for (x = 0; x < this.GridSize.X; x++) {
var candy = this.GetCandy(x, y);
if (candy) {
currentColor = candy.Color;
} else {
currentColor = "";
}
if (currentColor !== prevColor) {
if ((x - xPrev) > 2) {
if (prevColor !== "") {
// Run found
horizontalRuns.push({
Start: {
X: xPrev,
Y: yPrev
},
End: {
X: x - 1,
Y: y
},
Color: prevColor
});
}
}
xPrev = x;
yPrev = y;
prevColor = currentColor;
}
}
if ((x - xPrev) > 2) {
if (prevColor !== "") {
// Run found
horizontalRuns.push({
Start: {
X: xPrev,
Y: yPrev
},
End: {
X: x - 1,
Y: y
},
Color: prevColor
});
}
}
}
return horizontalRuns;
},
ScanVerticalRuns: function () {
var x,
y;
var xPrev,
yPrev;
var currentColor;
var prevColor;
var verticalRuns = [];
for (x = 0; x < this.GridSize.X; x++) {
yPrev = 0;
xPrev = x;
prevColor = "";
for (y = 0; y < this.GridSize.Y; y++) {
var candy = this.GetCandy(x, y);
if (candy) {
currentColor = candy.Color;
} else {
currentColor = "";
}
if (currentColor !== prevColor) {
if ((y - yPrev) > 2) {
if (prevColor !== "") {
// Run found
verticalRuns.push({
Start: {
X: xPrev,
Y: yPrev
},
End: {
X: x,
Y: y - 1
},
Color: prevColor
});
}
}
xPrev = x;
yPrev = y;
prevColor = currentColor;
}
}
if ((y - yPrev) > 2) {
if (prevColor !== "") {
// Run found
verticalRuns.push({
Start: {
X: xPrev,
Y: yPrev
},
End: {
X: x,
Y: y - 1
},
Color: prevColor
});
}
}
}
return verticalRuns;
},
ScanRuns: function () {
var horizontalRuns = this.ScanHorizontalRuns();
var verticalRuns = this.ScanVerticalRuns();
return horizontalRuns.concat(verticalRuns);
},
ExplodeCandy: function (x, y) {
var entCandy = this.RemoveCandy(x, y);
if (entCandy) {
entCandy.Explode();
return true;
}
return false;
},
DeleteCandy: function (x, y) {
var entCandy = this.RemoveCandy(x, y);
if (entCandy) {
entCandy.Delete();
return true;
}
return false;
},
ExplodeRuns: function (runs) {
var pointsMultiplier = 10;
var points = 0;
var i;
var n;
for (i = 0, n = runs.length; i < n; i++) {
var run = runs[i];
if (run.Start.X === run.End.X) {
// Vertical run
for (var y = run.Start.Y; y <= run.End.Y; y++) {
if (this.ExplodeCandy(run.Start.X, y)) {
points += pointsMultiplier;
pointsMultiplier = pointsMultiplier + 10;
}
}
} else {
// Horizontal run
for (var x = run.Start.X; x <= run.End.X; x++) {
if (this.ExplodeCandy(x, run.Start.Y)) {
points += pointsMultiplier;
pointsMultiplier = pointsMultiplier + 10;
}
}
}
}
return points;
},
RemoveRuns: function (runs) {
var i;
var n;
var entCandy;
for (i = 0, n = runs.length; i < n; i++) {
var run = runs[i];
if (run.Start.X === run.End.X) {
// Vertical run
for (var y = run.Start.Y; y <= run.End.Y; y++) {
this.DeleteCandy(run.Start.X, y);
}
} else {
// Horizontal run
for (var x = run.Start.X; x <= run.End.X; x++) {
this.DeleteCandy(x, run.Start.Y);
}
}
}
},
CandyFall: function () {
var falling = false;
var x;
var y;
for (y = (this.GridSize.Y - 1); y >= 0; y--) {
for (x = 0; x < this.GridSize.X; x++) {
var candy = this.GetCandy(x, y);
if (candy === null) {
if (y === 0) {
var entCandy = new CandyEntity(
this.Game,
CandyEntity.RandomCandy(), {
X: x,
Y: y - 1
});
this.Game.GameScreen.AddEntity(entCandy);
this.SetCandy(x, y, entCandy);
falling = true;
} else {
var candyUp = this.RemoveCandy(x, y - 1);
if (candyUp) {
this.SetCandy(x, y, candyUp);
falling = true;
}
}
}
}
}
return falling;
},
StabilizeBoard: function(){
do{
var runs = this.ScanRuns();
if(runs.length>0){
this.RemoveRuns(runs);
while(this.CandyFall()){}
}
}while(runs.length>0);
var x, y;
for (x = 0; x < this.GridSize.X; x++) {
for (y = 0; y < this.GridSize.Y; y++) {
var candy = this.GetCandy(x, y);
candy.SetGridPosition(x, y);
}
}
},
Debug: false
};
/////////////////////////////////////////
//
// CandyFucker
//
var CandyFucker = function (idScreen, idInfoDisplay) {
this.GameScreen = new GameScreen(idScreen,
this.Init.bind(this),
this.Proc.bind(this),
this.End.bind(this),
10);
this.Board = new CandyBoard(this);
this.Falling = false;
this.GridOffset = {
X: 0,
Y: 0
};
this.InfoDisplay = document.getElementById(idInfoDisplay);
this.Locked = false;
this.Score = 0;
this.SwapDirection = null;
this.SwapDistance = 0;
this.SwapCandy1 = null;
this.SwapCandy2 = null;
this.MaxSwapDistance = 32;
this.LoadImages();
};
CandyFucker.prototype = {
LoadImages: function () {
var self = this;
window.Images.LoadImages(
[
{
Name: "BallsRed",
Url: "gfx/BallsRed.png"
},
{
Name: "BallsBlue",
Url: "gfx/BallsBlue.png"
},
{
Name: "BallsCyan",
Url: "gfx/BallsCyan.png"
},
{
Name: "BallsGreen",
Url: "gfx/BallsGreen.png"
},
{
Name: "BallsYellow",
Url: "gfx/BallsYellow.png"
},
{
Name: "FragsRed",
Url: "gfx/FragsRed.png"
},
{
Name: "FragsBlue",
Url: "gfx/FragsBlue.png"
},
{
Name: "FragsCyan",
Url: "gfx/FragsCyan.png"
},
{
Name: "FragsGreen",
Url: "gfx/FragsGreen.png"
},
{
Name: "FragsYellow",
Url: "gfx/FragsYellow.png"
}
],
function () {
self.LoadSounds();
});
},
LoadSounds: function () {
var self = this;
window.Sounds.LoadSounds(
[
{
Name: "Explosion",
Url: "sfx/explosion1.wav",
Limit: 1
},
{
Name: "PickCandy",
Url: "sfx/pickcandy.wav"
},
{
Name: "SwapInvalid",
Url: "sfx/swapinvalid.wav"
}
],
function () {
self.GameScreen.Start();
});
},
Init: function () {
var width = 12;
var height = 12;
this.GridOffset.X = (this.GameScreen.Size.X - ((width - 1) * 32)) / 2.0;
this.GridOffset.Y = (this.GameScreen.Size.Y - ((height - 1) * 32)) / 2.0;
this.Board.BuildGrid(12, 12);
this.Board.StabilizeBoard();
this.UpdateInfoDisplay();
},
Proc: function () {
window.Sounds.ResetCounters();
if (this.Locked) {
if (this.Falling) {
if (!this.Board.CandyFall()) {
this.Falling = false;
}
} else {
if (this.ApplyRules()) {
this.Falling = this.Board.CandyFall();
} else {
this.Locked = false;
}
}
} else {
if (this.GameScreen.Mouse.Down) {
this.ProcessSwap();
} else {
this.CancelSwap();
}
if (this.Board.IsChanged()) {
if (this.ApplyRules()) {
this.Locked = true;
this.Falling = this.Board.CandyFall();
}
}
}
this.Changed = false;
},
End: function () {},
UpdateInfoDisplay: function () {
this.InfoDisplay.innerHTML = "Score: " + this.Score;
},
ApplyRules: function () {
var runs = this.Board.ScanRuns();
var points = this.Board.ExplodeRuns(runs);
if (points > 0) {
this.Score += points;
this.UpdateInfoDisplay();
console.log("Score: +" + points);
}
return (runs.length > 0);
},
ProcessSwap: function () {
if (this.SwapDirection === null) {
var candies = this.GameScreen.GetEntitiesUnderPoint(
this.GameScreen.Mouse.StartPosition,
"Candy");
if (candies === null || candies.length === 0) {
this.CancelSwap();
} else {
this.StartSwap(candies[0]);
}
}
if (this.SwapDirection !== null) {
var x = this.GameScreen.Mouse.EndPosition.X -
this.GameScreen.Mouse.StartPosition.X;
var y = this.GameScreen.Mouse.EndPosition.Y -
this.GameScreen.Mouse.StartPosition.Y;
if (Math.abs(x) > Math.abs(y)) {
if (x > 0) {
this.ProcSwapRight(x);
}
if (x < 0) {
this.ProcSwapLeft(-x);
}
} else {
if (y > 0) {
this.ProcSwapDown(y);
}
if (y < 0) {
this.ProcSwapUp(-y);
}
}
}
},
ProcSwapLeft: function (dist) {
if (this.SwapDirection != "Left") {
this.SwapDirection = "Left";
if (this.SwapCandy2) {
this.SwapCandy2.ResetPosition();
}
this.SwapCandy2 = this.Board.GetCandy(
this.SwapCandy1.GridPosition.X - 1,
this.SwapCandy1.GridPosition.Y);
}
this.SwapDistance = dist;
if (this.SwapDistance > this.MaxSwapDistance) {
this.DoSwap();
} else {
if (this.SwapCandy2) {
this.SwapCandy1.SetOffset(-this.SwapDistance, 0);
this.SwapCandy2.SetOffset(this.SwapDistance, 0);
} else {
this.SwapCandy1.ResetPosition();
}
}
},
ProcSwapRight: function (dist) {
if (this.SwapDirection != "Right") {
this.SwapDirection = "Right";
if (this.SwapCandy2) {
this.SwapCandy2.ResetPosition();
}
this.SwapCandy2 = this.Board.GetCandy(
this.SwapCandy1.GridPosition.X + 1,
this.SwapCandy1.GridPosition.Y);
}
this.SwapDistance = dist;
if (this.SwapDistance > this.MaxSwapDistance) {
this.DoSwap();
} else {
if (this.SwapCandy2) {
this.SwapCandy1.SetOffset(this.SwapDistance, 0);
this.SwapCandy2.SetOffset(-this.SwapDistance, 0);
} else {
this.SwapCandy1.ResetPosition();
}
}
},
ProcSwapUp: function (dist) {
if (this.SwapDirection != "Up") {
this.SwapDirection = "Up";
if (this.SwapCandy2) {
this.SwapCandy2.ResetPosition();
}
this.SwapCandy2 = this.Board.GetCandy(
this.SwapCandy1.GridPosition.X, this.SwapCandy1.GridPosition.Y - 1);
}
this.SwapDistance = dist;
if (this.SwapDistance > this.MaxSwapDistance) {
this.DoSwap();
} else {
if (this.SwapCandy2) {
this.SwapCandy1.SetOffset(0, -this.SwapDistance);
this.SwapCandy2.SetOffset(0, this.SwapDistance);
} else {
this.SwapCandy1.ResetPosition();
}
}
},
ProcSwapDown: function (dist) {
if (this.SwapDirection != "Down") {
this.SwapDirection = "Down";
if (this.SwapCandy2) {
this.SwapCandy2.ResetPosition();
}
this.SwapCandy2 = this.Board.GetCandy(
this.SwapCandy1.GridPosition.X,
this.SwapCandy1.GridPosition.Y + 1);
}
this.SwapDistance = dist;
if (this.SwapDistance > this.MaxSwapDistance) {
this.DoSwap();
} else {
if (this.SwapCandy2) {
this.SwapCandy1.SetOffset(0, this.SwapDistance);
this.SwapCandy2.SetOffset(0, -this.SwapDistance);
} else {
this.SwapCandy1.ResetPosition();
}
}
},
StartSwap: function (candy) {
this.SwapDirection = "";
this.SwapCandy1 = candy;
this.SwapCandy2 = null;
this.SwapDistance = 0;
window.Sounds.PlaySound("PickCandy");
},
CancelSwap: function () {
this.GameScreen.Mouse.Cancel();
this.SwapDirection = null;
if (this.SwapCandy1) {
this.SwapCandy1.ResetPosition();
}
if (this.SwapCandy2) {
this.SwapCandy2.ResetPosition();
}
this.SwapCandy1 = null;
this.SwapCandy2 = null;
this.SwapDistance = 0;
},
DoSwap: function () {
if (this.SwapCandy1 === null || this.SwapCandy2 === null) {
this.CancelSwap();
return;
}
var x1 = this.SwapCandy1.GridPosition.X;
var y1 = this.SwapCandy1.GridPosition.Y;
var x2 = this.SwapCandy2.GridPosition.X;
var y2 = this.SwapCandy2.GridPosition.Y;
// Try swapping
var candy1 = this.Board.RemoveCandy(x1, y1);
var candy2 = this.Board.RemoveCandy(x2, y2);
this.Board.SetCandy(x2, y2, candy1);
this.Board.SetCandy(x1, y1, candy2);
var runs = this.Board.ScanRuns();
if(runs.length === 0){
window.Sounds.PlaySound("SwapInvalid");
var candy1 = this.Board.RemoveCandy(x1, y1);
var candy2 = this.Board.RemoveCandy(x2, y2);
this.Board.SetCandy(x2, y2, candy1);
this.Board.SetCandy(x1, y1, candy2);
}
// Cleanup
this.GameScreen.Mouse.Cancel();
this.SwapDirection = null;
this.SwapCandy1 = null;
this.SwapCandy2 = null;
this.SwapDistance = 0;
},
Debug: false
};

516
Web/code/GameLib.js Normal file
View File

@@ -0,0 +1,516 @@
/////////////////////////////////////////
//
// Mouse
//
var Mouse = function (screen, size) {
this.Screen = screen;
this.Size = size || {
X: screen.width,
Y: screen.height
};
this.Down = false;
this.StartPosition = {
X: 0,
Y: 0
};
this.EndPosition = {
X: 0,
Y: 0
};
this.Screen.addEventListener("mousedown", this.OnMouseDown.bind(this), false);
this.Screen.addEventListener("mousemove", this.OnMouseMove.bind(this), false);
this.Screen.addEventListener("mouseup", this.OnMouseUp.bind(this), false);
this.Screen.addEventListener("mouseleave", this.OnMouseLeave.bind(this),
false);
this.Screen.addEventListener("touchstart", this.OnTouchStart.bind(this),
false);
this.Screen.addEventListener("touchmove", this.OnTouchMove.bind(this), false);
this.Screen.addEventListener("touchend", this.OnTouchEnd.bind(this), false);
this.Screen.addEventListener("touchcancel", this.OnTouchEnd.bind(this), false);
};
Mouse.prototype = {
GetEventPoistion: function (positionEvent) {
var position = {
X: positionEvent.X,
Y: positionEvent.Y
};
var element = this.Screen;
while (element) {
position.X -= element.offsetLeft;
position.Y -= element.offsetTop;
element = element.offsetParent;
}
position.X = (position.X / this.Screen.offsetWidth) * this.Size.X;
position.Y = (position.Y / this.Screen.offsetHeight) * this.Size.Y;
return position;
},
OnMouseDown: function (event) {
var position = this.GetEventPoistion({
X: event.clientX,
Y: event.clientY
});
this.RealDown = true;
this.Down = true;
this.StartPosition.X = position.X;
this.StartPosition.Y = position.Y;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
},
OnMouseMove: function (event) {
if (this.RealDown === false) {
return;
}
var position = this.GetEventPoistion({
X: event.clientX,
Y: event.clientY
});
this.RealDown = true;
this.Down = true;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
},
OnMouseUp: function (event) {
var position = this.GetEventPoistion({
X: event.clientX,
Y: event.clientY
});
this.RealDown = false;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
},
OnMouseLeave: function () {
this.RealDown = false;
this.Down = false;
},
OnTouchStart: function (event) {
var position = this.GetEventPoistion({
X: event.touches[0].clientX,
Y: event.touches[0].clientY
});
this.RealDown = true;
this.Down = true;
this.StartPosition.X = position.X;
this.StartPosition.Y = position.Y;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
},
OnTouchMove: function (event) {
if (this.RealDown === false) {
return;
}
var position = this.GetEventPoistion({
X: event.touches[0].clientX,
Y: event.touches[0].clientY
});
this.RealDown = true;
this.Down = true;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
},
OnTouchEnd: function () {
this.RealDown = false;
},
Update: function () {
if (this.RealDown === false) {
this.Down = false;
}
},
Cancel: function () {
this.RealDown = false;
this.Down = false;
},
Debug: false
};
/////////////////////////////////////////
//
// Vec2D
//
var Vec2D = {
Scale: function (vecIn, scale) {
return {
X: vecIn.X * scale,
Y: vecIn.Y * scale
};
},
Normalize: function (vecIn) {
var len =
Math.sqrt(
(vecIn.X * vecIn.X) +
(vecIn.Y * vecIn.Y));
return {
X: vecIn.X / len,
Y: vecIn.Y / len
};
}
};
/////////////////////////////////////////
//
// GameScreen
//
var GameScreen = function (idScreen, funcInit, funcProc, funcEnd, tps) {
this.Screen = document.getElementById(idScreen);
this.Ctx = this.Screen.getContext('2d');
this.Size = {
X: this.Screen.width,
Y: this.Screen.height
};
this.Entities = [];
this.NewEntities = [];
this.Running = false;
this.FuncInit = funcInit;
this.FuncProc = funcProc;
this.FuncEnd = funcEnd;
this.TPS = tps || 10;
this.TickTime = 1000 / this.TPS;
this.AccTickTime = this.TickTime;
this.PreviousTime = 0;
this.Mouse = new Mouse(this.Screen, this.Size);
var self = this;
this.Tick = function () {
while (self.AccTickTime >= self.TickTime) {
self.Update();
if (self.FuncProc) {
self.FuncProc(self);
}
self.Mouse.Update();
self.CleanDead();
self.InsertAdded();
self.AccTickTime -= self.TickTime;
}
self.Draw(self.AccTickTime / self.TickTime);
var timeNow = performance.now();
self.AccTickTime += timeNow - self.PreviousTime;
self.PreviousTime = timeNow;
if (self.Running) {
window.requestAnimationFrame(self.Tick);
} else {
if (self.FuncEnd) {
self.FuncEnd(self);
}
}
};
};
GameScreen.prototype = {
// For internal use
CleanDead: function () {
var i = this.Entities.length - 1;
while (i > 0) {
if (this.Entities[i].GameEntity.Deleted) {
this.Entities.splice(i, 1);
}
i--;
}
},
InsertAdded: function () {
var i;
for (i = 0, n = this.NewEntities.length; i < n; i++) {
this.Entities.push(this.NewEntities[i]);
}
this.NewEntities = [];
},
Update: function () {
for (var i = 0, n = this.Entities.length; i < n; i++) {
var entity = this.Entities[i];
if (entity.GameEntity.Deleted) {
continue;
}
entity.GameEntity.Update();
if (entity.Update) {
entity.Update();
}
}
},
Draw: function (factor) {
this.Ctx.clearRect(0, 0, this.Size.X, this.Size.Y);
for (var i = 0, n = this.Entities.length; i < n; i++) {
var entity = this.Entities[i];
if (entity.GameEntity.Deleted) {
continue;
}
entity.GameEntity.Draw(factor);
}
},
// For public use
Start: function () {
if (this.Running === false && this.FuncInit) {
this.FuncInit(this);
}
this.Running = true;
this.PreviousTime = performance.now();
this.Tick();
},
Stop: function () {
this.Running = false;
},
AddEntity: function (newEntity) {
this.NewEntities.push(newEntity);
},
GetEntitiesUnderPoint: function (point, type) {
var entities = [];
for (var i = 0, n = this.Entities.length; i < n; i++) {
var entity = this.Entities[i];
if (entity.GameEntity.Deleted) {
continue;
}
if (type) {
if (entity.GameEntity.Type !== type) {
continue;
}
}
if (entity.GameEntity.IntersectPoint(point)) {
entities.push(entity);
}
}
return entities;
},
Debug: false
};
/////////////////////////////////////////
//
// GameEntity
//
var GameEntity = function (gameScreen, position, size, image, type) {
this.GameScreen = gameScreen;
if (position) {
this.Position = {
X: position.X,
Y: position.Y
};
this.PositionDest = {
X: position.X,
Y: position.Y
};
} else {
this.Position = {
X: 0,
Y: 0
};
this.PositionDest = {
X: 0,
Y: 0
};
}
this.Size = size || {
X: 0,
Y: 0
};
this.Type = type || "Undefined";
this.Image = image;
this.Deleted = false;
};
GameEntity.prototype = {
Update: function () {
this.Position.X = this.PositionDest.X;
this.Position.Y = this.PositionDest.Y;
},
Draw: function (factor) {
if (!this.Image) {
return;
}
var x = this.Position.X - factor * (this.Position.X - this.PositionDest.X);
var y = this.Position.Y - factor * (this.Position.Y - this.PositionDest.Y);
this.GameScreen.Ctx.drawImage(this.Image,
x - (this.Size.X / 2),
y - (this.Size.Y / 2));
},
SetImage: function (image) {
this.Image = image;
},
SetPosition: function (position) {
this.Position.X = position.X;
this.Position.Y = position.Y;
this.PositionDest.X = position.X;
this.PositionDest.Y = position.Y;
},
UpdatePosition: function (position) {
this.Position.X = this.PositionDest.X;
this.Position.Y = this.PositionDest.Y;
this.PositionDest.X = position.X;
this.PositionDest.Y = position.Y;
},
AddPosition: function (delta) {
this.PositionDest.X = this.Position.X + delta.X;
this.PositionDest.Y = this.Position.Y + delta.Y;
},
Delete: function () {
this.Deleted = true;
},
IntersectPoint: function (point) {
return (
point.X < (this.PositionDest.X + (this.Size.X / 2)) &&
point.X > (this.PositionDest.X - (this.Size.X / 2)) &&
point.Y < (this.PositionDest.Y + (this.Size.Y / 2)) &&
point.Y > (this.PositionDest.Y - (this.Size.Y / 2)) &&
true);
},
InsideScreen: function () {
return (
(this.Position.X + (this.Size.X / 2)) > 0 &&
(this.Position.Y + (this.Size.Y / 2)) > 0 &&
(this.Position.X - (this.Size.X / 2)) < this.GameScreen.Size.X &&
(this.Position.Y - (this.Size.Y / 2)) < this.GameScreen.Size.Y);
},
Debug: false
};
/////////////////////////////////////////
//
// ImageLoader
//
var ImageLoader = function () {
this.Images = {};
};
ImageLoader.prototype = {
IsImageOk: function (img) {
if (!img.complete) {
return false;
}
if (typeof img.naturalWidth !== "undefined" && img.naturalWidth === 0) {
return false;
}
return true;
},
LoadImages: function (imageList, funcOnLoad) {
this.ImageCount = imageList.length;
this.FuncOnLoad = funcOnLoad;
var imageName;
var i,
n;
for (i = 0, n = imageList.length; i < n; i++) {
imageName = imageList[i].Name;
this.Images[imageName] = new Image();
}
var self = this;
var launched = false;
var privateOnLoad = function () {
if (launched) {
return;
}
var count = 0;
for (var name in self.Images) {
if (self.Images.hasOwnProperty(name)) {
if (self.IsImageOk(self.Images[name])) {
count++;
}
}
}
console.log("Images: " + count + "/" + self.ImageCount);
if (count == self.ImageCount) {
launched = true;
if (self.FuncOnLoad) {
self.FuncOnLoad();
}
}
};
for (i = 0, n = imageList.length; i < n; i++) {
imageName = imageList[i].Name;
this.Images[imageName].onload = privateOnLoad;
this.Images[imageName].src = imageList[i].Url;
}
privateOnLoad();
},
GetImage: function (name) {
return this.Images[name];
},
Debug: false
};
/////////////////////////////////////////
//
// SoundLoader
//
var SoundLoader = function () {
this.Sounds = {};
this.Limits = {};
};
SoundLoader.prototype = {
LoadSounds: function (soundsList, funcOnLoad) {
this.SoundsCount = soundsList.length;
this.FuncOnLoad = funcOnLoad;
var soundName;
var i, n;
for (i = 0, n = soundsList.length; i < n; i++) {
soundName = soundsList[i].Name;
this.Sounds[soundName] = new Audio();
if (soundsList[i].Limit) {
this.Limits[soundName] = {
Max: soundsList[i].Limit,
Count: 0
};
}
}
var self = this;
var launched = false;
var privateOnLoad = function () {
if (launched) {
return;
}
var count = 0;
for (var name in self.Sounds) {
if (self.Sounds.hasOwnProperty(name)) {
if (self.Sounds[name].readyState) {
count++;
}
}
}
console.log("Sounds: " + count + "/" + self.SoundsCount);
if (count == self.SoundsCount) {
launched = true;
if (self.FuncOnLoad) {
self.FuncOnLoad();
}
}
};
for (i = 0, n = soundsList.length; i < n; i++) {
soundName = soundsList[i].Name;
this.Sounds[soundName].onloadeddata = privateOnLoad;
this.Sounds[soundName].src = soundsList[i].Url;
}
privateOnLoad();
},
PlaySound: function (name) {
if (this.Limits[name]) {
if (this.Limits[name].Max <= this.Limits[name].Count){
return;
}
this.Limits[name].Count++;
}
var sndOrig = this.Sounds[name];
var sndCopy = sndOrig.cloneNode();
sndCopy.play();
},
ResetCounters: function () {
for (var name in this.Limits) {
if (this.Limits.hasOwnProperty(name)) {
this.Limits[name].Count = 0;
}
}
},
Debug: false
};

BIN
Web/gfx/BallsBlue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

144
Web/gfx/BallsBlue.svg Normal file
View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 32 32.000001"
id="svg8130"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="BallsBlue.svg"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\BallsBlue.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs8132">
<linearGradient
inkscape:collect="always"
id="linearGradient8722">
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="0"
id="stop8724" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop8726" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8706">
<stop
style="stop-color:#0000ff;stop-opacity:1"
offset="0"
id="stop8708" />
<stop
id="stop8714"
offset="0.49999884"
style="stop-color:#0000ff;stop-opacity:1" />
<stop
style="stop-color:#000000;stop-opacity:1"
offset="1"
id="stop8710" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8706"
id="radialGradient8712"
cx="15.697598"
cy="1036.8323"
fx="15.697598"
fy="1036.8323"
r="15.000004"
gradientTransform="matrix(1.3333329,1.3028181e-7,-1.381062e-7,1.3333327,-10.429983,-350.58015)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8722"
id="radialGradient8728"
cx="10.029435"
cy="1030.4045"
fx="10.029435"
fy="1030.4045"
r="15.000004"
gradientTransform="matrix(0.33333396,0.33333261,-0.33333352,0.33333486,349.62524,684.04945)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="-1.7142857"
inkscape:cy="15.960843"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid8146"
originy="0.50000002"
originx="0.5" />
<inkscape:grid
type="xygrid"
id="grid8732"
color="#3f3f0f"
opacity="0.1254902"
empcolor="#3f3f3a"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata8135">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)">
<path
style="opacity:1;fill:url(#radialGradient8712);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499968,1036.3316 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.5575144,-14.415 14.5,14.5 0 0 1 14.3877044,-14.5845 14.5,14.5 0 0 1 14.611379,14.3604"
id="path8156" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Capa 2"
style="display:inline">
<path
transform="translate(0,-1020.3622)"
style="opacity:1;fill:url(#radialGradient8728);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499973,1036.3315 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.557515,-14.415 14.5,14.5 0 0 1 14.387705,-14.5844 14.5,14.5 0 0 1 14.611379,14.3603"
id="path8720"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
Web/gfx/BallsCyan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

144
Web/gfx/BallsCyan.svg Normal file
View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 32 32.000001"
id="svg8130"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="BallsCyan.svg"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\BallsCyan.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs8132">
<linearGradient
inkscape:collect="always"
id="linearGradient8722">
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="0"
id="stop8724" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop8726" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8706">
<stop
style="stop-color:#00ffff;stop-opacity:1"
offset="0"
id="stop8708" />
<stop
id="stop8714"
offset="0.49999884"
style="stop-color:#00ffff;stop-opacity:1" />
<stop
style="stop-color:#000000;stop-opacity:1"
offset="1"
id="stop8710" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8706"
id="radialGradient8712"
cx="15.697598"
cy="1036.8323"
fx="15.697598"
fy="1036.8323"
r="15.000004"
gradientTransform="matrix(1.3333329,1.3028181e-7,-1.381062e-7,1.3333327,-10.429983,-350.58015)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8722"
id="radialGradient8728"
cx="10.029435"
cy="1030.4045"
fx="10.029435"
fy="1030.4045"
r="15.000004"
gradientTransform="matrix(0.33333396,0.33333261,-0.33333352,0.33333486,349.62524,684.04945)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="12.236529"
inkscape:cy="15.960843"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid8146"
originy="0.50000002"
originx="0.5" />
<inkscape:grid
type="xygrid"
id="grid8732"
color="#3f3f0f"
opacity="0.1254902"
empcolor="#3f3f3a"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata8135">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)">
<path
style="opacity:1;fill:url(#radialGradient8712);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499968,1036.3316 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.5575144,-14.415 14.5,14.5 0 0 1 14.3877044,-14.5845 14.5,14.5 0 0 1 14.611379,14.3604"
id="path8156" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Capa 2"
style="display:inline">
<path
transform="translate(0,-1020.3622)"
style="opacity:1;fill:url(#radialGradient8728);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499973,1036.3315 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.557515,-14.415 14.5,14.5 0 0 1 14.387705,-14.5844 14.5,14.5 0 0 1 14.611379,14.3603"
id="path8720"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
Web/gfx/BallsGreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
Web/gfx/BallsRed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

144
Web/gfx/BallsRed.svg Normal file
View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 32 32.000001"
id="svg8130"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="BallsRed.svg"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\BallsRed.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs8132">
<linearGradient
inkscape:collect="always"
id="linearGradient8722">
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="0"
id="stop8724" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop8726" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8706">
<stop
style="stop-color:#ff0000;stop-opacity:1"
offset="0"
id="stop8708" />
<stop
id="stop8714"
offset="0.49999884"
style="stop-color:#ff0000;stop-opacity:1" />
<stop
style="stop-color:#000000;stop-opacity:1"
offset="1"
id="stop8710" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8706"
id="radialGradient8712"
cx="15.697598"
cy="1036.8323"
fx="15.697598"
fy="1036.8323"
r="15.000004"
gradientTransform="matrix(1.3333329,1.3028181e-7,-1.381062e-7,1.3333327,-10.429983,-350.58015)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8722"
id="radialGradient8728"
cx="10.029435"
cy="1030.4045"
fx="10.029435"
fy="1030.4045"
r="15.000004"
gradientTransform="matrix(0.33333396,0.33333261,-0.33333352,0.33333486,349.62524,684.04945)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="-4.2366853"
inkscape:cy="15.960843"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid8146"
originy="0.50000002"
originx="0.5" />
<inkscape:grid
type="xygrid"
id="grid8732"
color="#3f3f0f"
opacity="0.1254902"
empcolor="#3f3f3a"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata8135">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)">
<path
style="opacity:1;fill:url(#radialGradient8712);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499968,1036.3316 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.5575144,-14.415 14.5,14.5 0 0 1 14.3877044,-14.5845 14.5,14.5 0 0 1 14.611379,14.3604"
id="path8156" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Capa 2"
style="display:inline">
<path
transform="translate(0,-1020.3622)"
style="opacity:1;fill:url(#radialGradient8728);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499973,1036.3315 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.557515,-14.415 14.5,14.5 0 0 1 14.387705,-14.5844 14.5,14.5 0 0 1 14.611379,14.3603"
id="path8720"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
Web/gfx/BallsYellow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

144
Web/gfx/BallsYellow.svg Normal file
View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 32 32.000001"
id="svg8130"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="BallsYellow.svg"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\BallsGreen.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs8132">
<linearGradient
inkscape:collect="always"
id="linearGradient8722">
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="0"
id="stop8724" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop8726" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8706">
<stop
style="stop-color:#00ff00;stop-opacity:1"
offset="0"
id="stop8708" />
<stop
id="stop8714"
offset="0.49999884"
style="stop-color:#00ff00;stop-opacity:1" />
<stop
style="stop-color:#000000;stop-opacity:1"
offset="1"
id="stop8710" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8706"
id="radialGradient8712"
cx="15.697598"
cy="1036.8323"
fx="15.697598"
fy="1036.8323"
r="15.000004"
gradientTransform="matrix(1.3333329,1.3028181e-7,-1.381062e-7,1.3333327,-10.429983,-350.58015)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8722"
id="radialGradient8728"
cx="10.029435"
cy="1030.4045"
fx="10.029435"
fy="1030.4045"
r="15.000004"
gradientTransform="matrix(0.33333396,0.33333261,-0.33333352,0.33333486,349.62524,684.04945)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="12.236529"
inkscape:cy="15.960843"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid8146"
originy="0.50000002"
originx="0.5" />
<inkscape:grid
type="xygrid"
id="grid8732"
color="#3f3f0f"
opacity="0.1254902"
empcolor="#3f3f3a"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata8135">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)">
<path
style="opacity:1;fill:url(#radialGradient8712);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499968,1036.3316 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.5575144,-14.415 14.5,14.5 0 0 1 14.3877044,-14.5845 14.5,14.5 0 0 1 14.611379,14.3604"
id="path8156" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Capa 2"
style="display:inline">
<path
transform="translate(0,-1020.3622)"
style="opacity:1;fill:url(#radialGradient8728);fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 30.499973,1036.3315 a 14.5,14.5 0 0 1 -14.442205,14.5305 14.5,14.5 0 0 1 -14.557515,-14.415 14.5,14.5 0 0 1 14.387705,-14.5844 14.5,14.5 0 0 1 14.611379,14.3603"
id="path8720"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
Web/gfx/Frags.xcf Normal file

Binary file not shown.

BIN
Web/gfx/FragsBlue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
Web/gfx/FragsCyan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Web/gfx/FragsGreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
Web/gfx/FragsRed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
Web/gfx/FragsYellow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Web/gfx/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
Web/gfx/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

179
Web/gfx/favicon.svg Normal file
View File

@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\favicon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:docname="favicon.svg">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient8122">
<stop
style="stop-color:#413f00;stop-opacity:1"
offset="0"
id="stop8124" />
<stop
style="stop-color:#ffff00;stop-opacity:1"
offset="1"
id="stop8126" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient6778">
<stop
style="stop-color:#c5c500;stop-opacity:1"
offset="0"
id="stop6780" />
<stop
style="stop-color:#ffff00;stop-opacity:0"
offset="1"
id="stop6782" />
</linearGradient>
<linearGradient
id="linearGradient6274"
osb:paint="solid">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6276" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6778"
id="linearGradient6800"
x1="110.5"
y1="1041.8622"
x2="110.5"
y2="961.86212"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient8122"
id="linearGradient8128"
x1="33.5"
y1="1021.8622"
x2="33.5"
y2="1013.863"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0000442,0,0,1.0000442,-29.001281,26.908219)" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
inkscape:cx="6.5747889"
inkscape:cy="7.6910858"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-page="true"
inkscape:snap-grids="true"
inkscape:snap-text-baseline="true"
units="px"
inkscape:snap-to-guides="true"
borderlayer="true"
objecttolerance="20"
guidetolerance="20"
gridtolerance="10000"
inkscape:snap-tangential="false"
showguides="true"
inkscape:snap-path-clip="true"
inkscape:snap-path-mask="true"
inkscape:snap-perpendicular="false"
inkscape:object-paths="false"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4144"
visible="true"
originy="0.5"
originx="0.50000001"
enabled="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3621)"
style="display:inline">
<rect
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4828"
width="15"
height="15.000039"
x="0.5"
y="1036.8621"
ry="3.0000393" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Capa 2">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'AR CENA';-inkscape-font-specification:'AR CENA, Thin';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:url(#linearGradient8128);fill-opacity:1;stroke:#ffff00;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
x="1.5000665"
y="1048.8157"
id="text4816"
sodipodi:linespacing="125%"
transform="matrix(0.9999557,0,0,1.0000443,0,-1036.3621)"><tspan
sodipodi:role="line"
x="1.5000665"
y="1048.8157"
id="tspan4820"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'AR CENA';-inkscape-font-specification:'AR CENA, Thin';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient8128);fill-opacity:1;stroke:#ffff00;stroke-width:0.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1">C</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'AR DARLING';-inkscape-font-specification:'AR DARLING, Thin';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="7.5"
y="12.5"
id="text4824"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4826"
x="7.5"
y="12.5">F</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

173
Web/gfx/icon.svg Normal file
View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\logo.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:docname="icon.svg">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient8122">
<stop
style="stop-color:#413f00;stop-opacity:1"
offset="0"
id="stop8124" />
<stop
style="stop-color:#ffff00;stop-opacity:1"
offset="1"
id="stop8126" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient6778">
<stop
style="stop-color:#c5c500;stop-opacity:1"
offset="0"
id="stop6780" />
<stop
style="stop-color:#ffff00;stop-opacity:0"
offset="1"
id="stop6782" />
</linearGradient>
<linearGradient
id="linearGradient6274"
osb:paint="solid">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6276" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6778"
id="linearGradient6800"
x1="110.5"
y1="1041.8622"
x2="110.5"
y2="961.86212"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient8122"
id="linearGradient8128"
x1="33.5"
y1="1021.8622"
x2="33.5"
y2="1013.863"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0000442,0,0,1.0000442,-29.001281,26.908219)" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="8"
inkscape:cx="-4.8045512"
inkscape:cy="14.666337"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-page="true"
inkscape:snap-grids="true"
inkscape:snap-text-baseline="true"
units="px"
inkscape:snap-to-guides="true"
borderlayer="true"
objecttolerance="20"
guidetolerance="20"
gridtolerance="10000"
inkscape:snap-tangential="false"
showguides="true"
inkscape:snap-path-clip="true"
inkscape:snap-path-mask="true"
inkscape:snap-perpendicular="false"
inkscape:object-paths="false"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4144"
visible="true"
originy="0.5"
originx="0.50000001"
enabled="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3621)">
<rect
style="fill:#000000;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round"
id="rect4828"
width="17"
height="16.99996"
x="-0.5"
y="1035.8621"
ry="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'AR CENA';-inkscape-font-specification:'AR CENA, Thin';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:url(#linearGradient8128);fill-opacity:1;stroke:#ffff00;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
x="1.5000665"
y="1048.8157"
id="text4816"
sodipodi:linespacing="125%"
transform="scale(0.9999557,1.0000443)"><tspan
sodipodi:role="line"
x="1.5000665"
y="1048.8157"
id="tspan4820"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'AR CENA';-inkscape-font-specification:'AR CENA, Thin';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient8128);fill-opacity:1;stroke:#ffff00;stroke-width:0.25;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1">C</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:12.5px;line-height:125%;font-family:'AR DARLING';-inkscape-font-specification:'AR DARLING, Thin';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="8.5"
y="1048.8621"
id="text4824"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4826"
x="8.5"
y="1048.8621">F</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
Web/gfx/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

179
Web/gfx/logo.svg Normal file
View File

@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="128"
viewBox="0 0 512.00001 128"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:export-filename="C:\Users\VAR\source\CandyFucker\gfx\logo.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:docname="logo.svg">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient8122">
<stop
style="stop-color:#413f00;stop-opacity:1"
offset="0"
id="stop8124" />
<stop
style="stop-color:#ffff00;stop-opacity:1"
offset="1"
id="stop8126" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient6778">
<stop
style="stop-color:#c5c500;stop-opacity:1"
offset="0"
id="stop6780" />
<stop
style="stop-color:#ffff00;stop-opacity:0"
offset="1"
id="stop6782" />
</linearGradient>
<linearGradient
id="linearGradient6274"
osb:paint="solid">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6276" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6778"
id="linearGradient6800"
x1="110.5"
y1="1041.8622"
x2="110.5"
y2="961.86212"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient8122"
id="linearGradient8128"
x1="110.5"
y1="1041.8622"
x2="110.5"
y2="961.86212"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="291.08657"
inkscape:cy="101.53833"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:snap-page="true"
inkscape:snap-grids="true"
inkscape:snap-text-baseline="true"
units="px"
inkscape:snap-to-guides="true"
borderlayer="true"
objecttolerance="20"
guidetolerance="20"
gridtolerance="10000"
inkscape:snap-tangential="false"
showguides="true"
inkscape:snap-path-clip="true"
inkscape:snap-path-mask="true"
inkscape:snap-perpendicular="false"
inkscape:object-paths="false"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="false"
inkscape:snap-midpoints="false"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4144"
visible="true"
originy="0.5"
originx="0.50000001"
enabled="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-924.36214)"
style="display:inline">
<rect
style="fill:#000000;fill-opacity:1;stroke-linecap:round;stroke-linejoin:round"
id="rect4828"
width="511"
height="127.00002"
x="0.5"
y="924.86212"
ry="32.000019" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Capa 2">
<text
transform="translate(0,-924.36214)"
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:90px;line-height:125%;font-family:'AR CENA';-inkscape-font-specification:'AR CENA, Thin';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient8128);fill-opacity:1;stroke:#ffff00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-dashoffset:0;opacity:1"
x="30.5"
y="1021.8621"
id="text4816"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
x="30.5"
y="1021.8621"
id="tspan4820"
style="stroke:#ffff00;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill:url(#linearGradient8128);fill-opacity:1;stroke-dashoffset:0;">Candy</tspan></text>
<text
transform="translate(0,-924.36214)"
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:90px;line-height:125%;font-family:'AR DARLING';-inkscape-font-specification:'AR DARLING, Thin';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="220.5"
y="1021.8621"
id="text4824"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4826"
x="220.5"
y="1021.8621">Fucker</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

25
Web/index.html Normal file
View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Candy Fucker</title>
<link rel="shortcut icon" href="gfx/favicon.ico" type="image/x-icon" />
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1" />
<link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="divLogo">
<img src="gfx/logo.png" alt="Candy Fucker"/>
</div>
<div id="divInfoDisplay"></div>
<div id="divScreen">
<canvas id="cnvScreen" width="416" height="416" />
</div>
<script src="code/GameLib.js"></script>
<script src="code/CandyFucker.js"></script>
<script>
new CandyFucker("cnvScreen", "divInfoDisplay");
</script>
</body>
</html>

BIN
Web/sfx/explosion1.wav Normal file

Binary file not shown.

BIN
Web/sfx/pickcandy.wav Normal file

Binary file not shown.

BIN
Web/sfx/swapinvalid.wav Normal file

Binary file not shown.

50
Web/style.css Normal file
View File

@@ -0,0 +1,50 @@
html{
height: 100%;
}
body{
background-color: rgb(20,20,20);
color: grey;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
text-align: center;
height: 100%;
}
#divLogo{
display:block;
height: auto;
width: 100%;
padding: 0;
margin: 0;
}
#divLogo img{
max-width: 100%;
height: auto;
}
#divInfoDisplay{
display:block;
height:20px;
width: 100%;
line-height: 20px;
font-size: 15px;
color: rgb(220,220,220);
padding: 0;
margin: 0;
}
#divScreen {
display: block;
position: relative;
width: 100%;
height: calc(100% - 84px);
height: 70%;
overflow: visible;
}
#cnvScreen {
display: block;
position: absolute;
margin: auto;
top: 0; left: 0; bottom: 0; right: 0;
max-width: 100%;
max-height: 100%;
box-shadow: 0 0 20px rgb(0,0,0);
}