This file contains 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
package.cpath = package.cpath..';C:/Program Files/LOVE/?.dll;./?.dll' | |
-- Modification of boot.lua | |
-- This file loads love but does not execute love.run or open a window | |
-- This file must be located in the root game directory | |
-- The root game directory must also be the working directory | |
-- Make sure love exists. | |
local love = require("love") |
This file contains 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
CSS_COLORS = { | |
aliceblue = {240, 248, 255}, | |
antiquewhite = {250, 235, 215}, | |
aqua = { 0, 255, 255}, | |
aquamarine = {127, 255, 212}, | |
azure = {240, 255, 255}, | |
beige = {245, 245, 220}, | |
bisque = {255, 228, 196}, | |
black = { 0, 0, 0}, | |
blanchedalmond = {255, 235, 205}, |
This file contains 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
-- $Id: utf8.lua 179 2009-04-03 18:10:03Z pasta $ | |
-- | |
-- Provides UTF-8 aware string functions implemented in pure lua: | |
-- * string.utf8len(s) | |
-- * string.utf8sub(s, i, j) | |
-- * string.utf8reverse(s) | |
-- * string.utf8char(unicode) | |
-- * string.utf8unicode(s, i, j) | |
-- * string.utf8gensub(s, sub_len) | |
-- |
This file contains 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
-- simple class | |
------------------------------------------------- | |
local mixin_reserved = { | |
['new'] = true, | |
['onMixin'] = true, | |
['__type'] = true, | |
['__index'] = true, | |
} | |
local base = {__type = 'Object'} |
This file contains 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
--[[ | |
v0.91 text.lua | |
Copyright (c) 2013 Minh Ngo | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWA |
This file contains 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
local assert = assert | |
local tostring = tostring | |
local pcall = pcall | |
local FORMAT_ASSERT_EQUALS = 'expected %s to be equal to %s' | |
local FORMAT_ASSERT_UNEQ = 'all values are %s' | |
asserteq = function(...) | |
local values = {...} | |
local first = values[1] |
This file contains 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
-- v1.0 | |
local floor = math.floor | |
-- cell_width being the width of the cell along an axis e.g. x/y axis | |
local initRayData = function(cell_width,i,f) | |
local d = f-i | |
local cell_i = floor(i/cell_width) | |
local dRatio,Delta,Step,Start | |
if d > 0 then |