This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef ENGINE_H | |
| #define ENGINE_H | |
| #include "SDL.h" | |
| /** The base engine class **/ | |
| class CEngine { | |
| private: | |
| /** Last iteration's tick value **/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Choro - Tileset | |
| # Copyright (c) 2012 Nico Hämäläinen <nico@bender.fi> | |
| # MIT Licensed | |
| # | |
| # | |
| # Events: | |
| # - tilesetImageLoaded | |
| # This event is emitted when the initial tileset graphic is loaded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Choro - Map Layer | |
| # Copyright (c) 2012 Nico Hämäläinen <nico@bender.fi> | |
| # MIT Licensed | |
| # | |
| # Inspired by node-validator | |
| # | |
| net = require 'net' | |
| # Regular expressions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Choro - Tileset | |
| # Copyright (c) 2012 Nico Hämäläinen <nico@bender.fi> | |
| # MIT Licensed | |
| # | |
| # | |
| # Events: | |
| # - tilesetImageLoaded | |
| # This event is emitted when the initial tileset graphic is loaded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Loop through the whole tileset and create rectangles | |
| # for each tile position. | |
| tileIndex = 0 | |
| for y in [0..@tilesHigh] | |
| for x in [0..@tilesWide] | |
| @tileRectangles[tileIndex] = new Rectangle( | |
| x * @tileWidth, | |
| y * @tileHeight, | |
| @tileWidth, | |
| @tileHeight |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| <script type="text/javascript" src="https://raw.github.com/tuupola/jquery_lazyload/master/jquery.lazyload.min.js"></script> | |
| <script type="text/javascript"> | |
| $(function() { | |
| var images = $('[data-original]'); | |
| images.lazyload({ | |
| effect: 'fadeIn' | |
| }); | |
| }); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| background-color: #4080E0; | |
| font-family: "Helvetica Neue", Helvetica, sans-serif; | |
| font-size: 0.8em; | |
| } | |
| a { | |
| border: none; | |
| color: #000000; | |
| } | |
| a:visited { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### | |
| ### | |
| mapCanvas = document.getElementById 'map' | |
| createCanvas = (width, height) -> | |
| canvas = document.createElement 'canvas' | |
| canvas.width = width | |
| canvas.height = height | |
| canvas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clone = (obj) -> | |
| if not obj? or typeof obj isnt 'object' | |
| return obj | |
| if obj instanceof Date | |
| return new Date(obj.getTime()) | |
| if obj instanceof RegExp | |
| flags = '' | |
| flags += 'g' if obj.global? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # managers.coffee | |
| managers = | |
| playerManager: require './managers/player' | |
| spriteManager: require './managers/sprite' | |
| tileManager: require './managers/tile' | |
| mapManager: require './managers/map' | |
| # server.coffee | |
| # Load managers required by chronicle | |
| managers = require "#{paths.shared}/managers" |