Skip to content

Commit 8d54874

Browse files
committed
feat: start reverting colors
1 parent 0fa41fd commit 8d54874

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1111
-1151
lines changed

JSON.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ local function grok_array(self, text, start, etc)
482482
return VALUE, i + 1
483483
end
484484
if text:sub(i, i) ~= ',' then
485-
self:onDecodeError("expected comma or '['", text, i, etc)
485+
self:onDecodeError("expected comma or ']'", text, i, etc)
486486
end
487487
i = skip_whitespace(text, i + 1)
488488
end

andgate.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ end
5050

5151
function andgate:draw()
5252
if self.visible then
53-
love.graphics.setColor(1, 1, 1)
53+
love.graphics.setColor(255, 255, 255)
5454
love.graphics.draw(gateimg, gatequad[9], math.floor((self.x-1-xscroll)*16*scale), ((self.y-1-yscroll)*16-8)*scale, 0, scale, scale)
5555
--love.graphics.draw(andgateimg, math.floor((self.x-1-xscroll)*16*scale), ((self.y-yscroll-1)*16-8)*scale, 0, scale, scale)
5656
end

android.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ function androidLoad()
9393
buttons["portal1"].portal = true
9494
buttons["portal2"] = touchButton:new("r", "2", t["portal2"][1],t["portal2"][2],t["portal2"][3],t["portal2"][4], "round")
9595
buttons["portal2"].portal = true
96-
buttons["portal1"].color = {60/255, 188/255, 252/255}
97-
buttons["portal2"].color = {232/255, 130/255, 30/255}
96+
buttons["portal1"].color = {60, 188, 252}
97+
buttons["portal2"].color = {232, 130, 30}
9898

9999
-- shift keys to left
100100
if fourbythree then
@@ -216,7 +216,7 @@ function androidDraw()
216216
local x, y, w, h = skin["center"][1]:getViewport()
217217
skinSpriteBatch:add(skin["center"][1], skinData["center"][1], skinData["center"][2], 0, skinData["center"][3]/w, skinData["center"][4]/h)
218218
end
219-
love.graphics.setColor(1,1,1)
219+
love.graphics.setColor(255, 255, 255)
220220
love.graphics.draw(skinSpriteBatch,0,0)
221221
for name, b in pairs(buttons) do
222222
if skinData.highlightonpress or not b.held then
@@ -231,12 +231,12 @@ function androidDraw()
231231
end
232232

233233
--[[touch debug
234-
love.graphics.setColor(1,0,0)
234+
love.graphics.setColor(255,0,0)
235235
local mx,my= androidGetCoords(mouseTouchX,mouseTouchY)
236236
love.graphics.circle("fill",mx,my,2)
237-
love.graphics.setColor(1,1,0)
237+
love.graphics.setColor(255,255,0)
238238
love.graphics.circle("fill",lastTouchX,lastTouchY,1)
239-
love.graphics.setColor(0,1,1)
239+
love.graphics.setColor(0,255,255)
240240
love.graphics.circle("fill",lastReleaseX,lastReleaseY,1)]]
241241

242242
if not androidLowRes then

androidbutton.lua

+7-7
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,27 @@ function touchButton:draw(spriteBatch, quad)
6464
love.graphics.setLineWidth(1)
6565
end
6666
if self.held then
67-
love.graphics.setColor(100/255, 100/255, 100/255, 140/255)
67+
love.graphics.setColor(100, 100, 100, 140)
6868
elseif highlight then
69-
love.graphics.setColor(90/255, 90/255, 90/255, 140/255)
69+
love.graphics.setColor(90, 90, 90, 140)
7070
elseif self.color then
71-
love.graphics.setColor(self.color[1], self.color[2], self.color[3], 80/255)
71+
love.graphics.setColor(self.color[1], self.color[2], self.color[3], 80)
7272
else
73-
love.graphics.setColor(30/255, 30/255, 30/255, 80/255)
73+
love.graphics.setColor(30, 30, 30, 80)
7474
end
7575
if self.round then
7676
local x, y, r = self.x+self.w/2, self.y+self.h/2,self.r
7777
love.graphics.circle("fill", x, y, r, 8)
78-
love.graphics.setColor(1, 1, 1, 140/255)
78+
love.graphics.setColor(255, 255, 255, 140)
7979
love.graphics.circle("line", x, y, r, 8)
8080
else
8181
local x, y, w, h = self.x, self.y, self.w, self.h
8282
love.graphics.rectangle("fill", x, y, w, h)
83-
love.graphics.setColor(1, 1, 1, 140/255)
83+
love.graphics.setColor(255, 255, 255, 140)
8484
love.graphics.rectangle("line", x+.5, y+.5, w, h)
8585
end
8686

87-
love.graphics.setColor(1, 1, 1)
87+
love.graphics.setColor(255, 255, 255)
8888
if self.text then
8989
properprintfast(self.text, math.floor(self.x+self.w/2-string.len(self.text)*4), math.floor(self.y+self.h/2-4))
9090
elseif self.img then

animation.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ function animation:update(dt)
598598
playmusic()
599599
end
600600
elseif v[1] == "changebackgroundcolor" then
601-
love.graphics.setBackgroundColor((tonumber(v[2]) or 255)/255, (tonumber(v[3]) or 255)/255, (tonumber(v[4]) or 255)/255)
601+
love.graphics.setBackgroundColor(tonumber(v[2]), tonumber(v[3]), tonumber(v[4]))
602602
elseif v[1] == "killplayer" then
603603
if v[2] == "everyone" then
604604
for i = 1, players do

animationguiline.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -1970,13 +1970,13 @@ function animationguiline:init(tabl, t2)
19701970
local firstwidth = 22--#animationstrings[self.type][start]
19711971

19721972
self.deletebutton = guielement:new("button", 0, 0, "x", function() self:delete() end, nil, nil, nil, 8, 0.1)
1973-
self.deletebutton.textcolor = {200/255, 0, 0}
1973+
self.deletebutton.textcolor = {200, 0, 0}
19741974

19751975
self.downbutton = guielement:new("button", 0, 0, "", function() self:movedown() end, nil, nil, nil, 8, 0.1)
1976-
self.downbutton.textcolor = {1, 1, 1}
1976+
self.downbutton.textcolor = {255, 255, 255}
19771977

19781978
self.upbutton = guielement:new("button", 0, 0, "", function() self:moveup() end, nil, nil, nil, 8, 0.1)
1979-
self.upbutton.textcolor = {1, 1, 1}
1979+
self.upbutton.textcolor = {255, 255, 255}
19801980

19811981
self.elements[1].gui = guielement:new("dropdown", 0, 0, firstwidth, function(val) self:changemainthing(val) end, start, unpack(animationstrings[self.type]))
19821982
self.elements[1].width = 14+firstwidth*8
@@ -2182,7 +2182,7 @@ end
21822182
function animationguiline:draw(x, y)
21832183
love.graphics.setColor(0, 0, 0)
21842184
love.graphics.rectangle("fill", x*scale, y*scale, (width*16-x)*scale, 11*scale)
2185-
love.graphics.setColor(1, 1, 1)
2185+
love.graphics.setColor(255, 255, 255)
21862186

21872187
local xadd = 0
21882188
self.deletebutton.x = x+xadd
@@ -2202,7 +2202,7 @@ function animationguiline:draw(x, y)
22022202

22032203
for i = 1, #self.elements do
22042204
if self.elements[i].t == "text" then
2205-
love.graphics.setColor(1, 1, 1)
2205+
love.graphics.setColor(255, 255, 255)
22062206
properprintF(self.elements[i].value, (x+xadd-1)*scale, (y+2)*scale)
22072207
xadd = xadd + self.elements[i].width
22082208
else

belt.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function drawbelt(x, y, length, i, color) --for editor
209209
end
210210
x, y = x-1, y-1
211211
length = math.min(99, math.max(2, math.floor(tonumber(length or 3))))
212-
love.graphics.setColor(1, 1, 1)
212+
love.graphics.setColor(255, 255, 255)
213213
love.graphics.draw(img, beltquad[row][1], math.floor((x-xscroll)*16*scale), math.floor((y-yscroll-.5)*16*scale), 0, scale, scale)
214214
for i = 1, length-2 do
215215
love.graphics.draw(img, beltquad[row][2], math.floor((x+i-xscroll)*16*scale), math.floor((y-yscroll-.5)*16*scale), 0, scale, scale)

blocktogglebutton.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ end
184184

185185
function blocktogglebutton:draw()
186186
if not self.drawable then
187-
love.graphics.setColor(1, 1, 1)
187+
love.graphics.setColor(255, 255, 255)
188188
love.graphics.draw(self.graphic, self.quad, math.floor(((self.x-xscroll)*16+self.offsetX)*scale), math.floor(((self.y-yscroll)*16-self.offsetY)*scale), self.rotation, scale, scale, self.quadcenterX, self.quadcenterY)
189189
end
190190
end
@@ -435,7 +435,7 @@ function buttonblock:init(x, y, color, solid)
435435
end
436436

437437
function buttonblock:draw()
438-
--love.graphics.setColor(1, 1, 1)
438+
--love.graphics.setColor(255, 255, 255)
439439
love.graphics.draw(self.graphic, self.quad, math.floor(((self.x-xscroll)*16+self.offsetX)*scale), math.floor(((self.y-yscroll)*16-self.offsetY)*scale), 0, scale, scale, self.quadcenterX, self.quadcenterY)
440440
end
441441

cappy.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function cappy:draw()
200200
if self.hat == 1 then
201201
love.graphics.setColor(self.player.colors[1])
202202
else
203-
love.graphics.setColor(1, 1, 1)
203+
love.graphics.setColor(255, 255, 255)
204204
end
205205
local graphic = hat[self.hat].graphic
206206
local quad = hat[self.hat].quad[1]

characters.lua

+1-32
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,8 @@
11
--I have no idea what i'm even doing
2-
local colorvariables = {"colors", "defaultcolors", "starcolors", "flowercolor", "hammersuitcolor", "frogsuitcolor", "leafcolor", "iceflowercolor", "tanookisuitcolor", "statuecolor", "superballcolor", "blueshellcolor", "boomerangcolor", "graphiccolor"}
32
local animfiles = {"", "big", "fire", "ice", "superball", "hammer", "frog", "raccoon", "tiny", "tanooki", "skinny", "cape", "shell", "boomerang"}
43
local blankimg = love.graphics.newImage(love.image.newImageData(1, 1))
54
local splitimage
65

7-
function iscolorvariable(key)
8-
for i, v in ipairs(colorvariables) do
9-
if v == key then
10-
return true
11-
end
12-
end
13-
return false
14-
end
15-
16-
function convertcolors(table)
17-
if table == nil or #table == 0 then
18-
return
19-
end
20-
for i, v in ipairs(table) do
21-
if type(v) == "table" then
22-
convertcolors(v)
23-
else
24-
table[i] = tonumber(v)/255
25-
end
26-
end
27-
end
28-
29-
function convertcolorsif(key, table)
30-
if iscolorvariable(key) then
31-
convertcolors(table)
32-
end
33-
end
34-
356
function loadcustomplayers()
367
characters = {list = {}, data = {}}
378
local dir = love.filesystem.getDirectoryItems("alesans_entities/characters")
@@ -372,8 +343,6 @@ function loadcustomplayers()
372343
temp = err
373344
--works! so set properties
374345
for i, v in pairs(temp) do
375-
-- convert numbers to 0..1
376-
convertcolorsif(i, v)
377346
-- set properties
378347
playerstuff[i] = v
379348
if i == "health" or i == "fireenemy" then
@@ -518,7 +487,7 @@ function splitimage(img, color, exclude, imagedata) --split singe image into col
518487
if exclude then
519488
output:setPixel(x, y, r, g, b, a)
520489
else
521-
output:setPixel(x, y, 1, 1, 1, a)
490+
output:setPixel(x, y, 255, 255, 255, a)
522491
end
523492
end
524493
end

checkpointflag.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function checkpointflag:init(x, y, r, i)
99
self.r = r
1010
self.i = i
1111
self.color = {0,0,0}
12-
self.symbolcolor = {1,1,1}
12+
self.symbolcolor = {255,255,255}
1313
self.activatetimer = false
1414

1515
local v = convertr(r[3], {"string", "num"}, true)
@@ -99,7 +99,7 @@ function checkpointflag:draw(drop)
9999
end
100100
end
101101
if not drop then
102-
love.graphics.setColor(1, 1, 1)
102+
love.graphics.setColor(255, 255, 255)
103103
end
104104
love.graphics.draw(checkpointflagimg, checkpointflagquad[spriteset][quadi], math.floor(((self.x+self.width/2-xscroll)*16+offx)*scale), math.floor(((self.y+self.height/2-yscroll-.5)*16+offy)*scale), self.rotation, scale, scale, 16, 16)
105105
end

clearpipe.lua

+13-13
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ function clearpipe:draw()
774774
ox, oy = t[2]*dx+self.sucklen*math.max(0,-dx), t[1]
775775
end
776776
local v = (t[2]/self.sucklen)
777-
love.graphics.setColor(1, 1, 1, v)
777+
love.graphics.setColor(255, 255, 255, 255*v)
778778
love.graphics.draw(dustimg, dustquad[t[5]], (x+ox-xscroll)*16*scale, (y+oy-.5-yscroll)*16*scale, t[3], scale, scale, 8, 8)
779779
if self.suckentranceportalx then
780780
local dir = self.suckentranceportalfacing
@@ -785,7 +785,7 @@ function clearpipe:draw()
785785
ox, oy = t[2]*dx+self.sucklen*math.max(0,-dx), t[1]
786786
end
787787
local v = (t[2]/self.sucklen)
788-
love.graphics.setColor(1, 1, 1, v)
788+
love.graphics.setColor(255, 255, 255, 255*v)
789789
love.graphics.draw(dustimg, dustquad[t[5]], (x+ox-xscroll)*16*scale, (y+oy-.5-yscroll)*16*scale, t[3], scale, scale, 8, 8)
790790
end
791791
end
@@ -798,7 +798,7 @@ function clearpipe:draw()
798798
ox, oy = t[2]*dx+self.sucklen*math.max(0,-dx), t[1]
799799
end
800800
local v = 1-(t[2]/self.sucklen)
801-
love.graphics.setColor(1, 1, 1, v)
801+
love.graphics.setColor(255, 255, 255, 255*v)
802802
love.graphics.draw(dustimg, dustquad[t[5]], (x+ox-xscroll)*16*scale, (y+oy-.5-yscroll)*16*scale, t[3], scale, scale, 8, 8)
803803
if self.suckexitportalx then
804804
local dir = self.suckexitportalfacing
@@ -809,7 +809,7 @@ function clearpipe:draw()
809809
ox, oy = t[2]*dx+self.sucklen*math.max(0,-dx), t[1]
810810
end
811811
local v = 1-(t[2]/self.sucklen)
812-
love.graphics.setColor(1, 1, 1, v)
812+
love.graphics.setColor(255, 255, 255, 255*v)
813813
love.graphics.draw(dustimg, dustquad[t[5]], (x+ox-xscroll)*16*scale, (y+oy-.5-yscroll)*16*scale, t[3], scale, scale, 8, 8)
814814
end
815815
end
@@ -819,7 +819,7 @@ function clearpipe:draw()
819819
local dir = self.entrance
820820
local cx, cy = self.path[1][1]-1, self.path[1][2]-1
821821
local cx, cy, cw, ch, dx, dy = self:getsuck(dir,"entrance",cx,cy)
822-
love.graphics.setColor(1,1,1,180/255) if self.suckentranceportalx then love.graphics.setColor(1,0,0,180/255) end
822+
love.graphics.setColor(255,255,255,180) if self.suckentranceportalx then love.graphics.setColor(255,0,0,180) end
823823
love.graphics.rectangle("line",(cx-xscroll)*16*scale, (cy-0.5-yscroll)*16*scale, cw*16*scale, ch*16*scale)
824824
if self.suckentranceportalx then
825825
local cx, cy = self.suckentranceportalx-1, self.suckentranceportaly-1
@@ -829,7 +829,7 @@ function clearpipe:draw()
829829
local dir = self.exit
830830
local cx, cy = self.path[#self.path][1]-1, self.path[#self.path][2]-1
831831
local cx, cy, cw, ch, dx, dy = self:getsuck(dir,"exit",cx,cy)
832-
love.graphics.setColor(1,1,1,180/255) if self.suckexitportalx then love.graphics.setColor(1,0,0,180/255) end
832+
love.graphics.setColor(255,255,255,180) if self.suckexitportalx then love.graphics.setColor(255,0,0,180) end
833833
love.graphics.rectangle("line",(cx-xscroll)*16*scale, (cy-0.5-yscroll)*16*scale, cw*16*scale, ch*16*scale)
834834
if self.suckexitportalx then
835835
local cx, cy = self.suckexitportalx-1, self.suckexitportaly-1
@@ -840,9 +840,9 @@ function clearpipe:draw()
840840

841841
--[[DEBUG
842842
for i = 1, #self.path do
843-
love.graphics.setColor(1, 0, 0, 100/255)
843+
love.graphics.setColor(255, 0, 0, 100)
844844
love.graphics.rectangle("fill", (self.path[i][1]-1-xscroll)*16*scale, (self.path[i][2]-1.5-yscroll)*16*scale, 16*scale, 16*scale)
845-
love.graphics.setColor(0, 0, 0, 210/255)
845+
love.graphics.setColor(0, 0, 0, 210)
846846
love.graphics.circle("fill", (self.path[i][1]-1-xscroll)*16*scale, (self.path[i][2]-1.5-yscroll)*16*scale, 2*scale)
847847
end]]
848848
end
@@ -858,7 +858,7 @@ addsegment = function(x, y, parent, quad, stage, dir, entrance, exit, graphic)
858858
end
859859
function clearpipe:getstage(v,dir)
860860
if dir == "forward" then
861-
return math.max(1, math.min(#self.path, math.floor(v)))
861+
return math.max(1, math.min(#self.path, math.floor(v)))
862862
else
863863
return math.max(1, math.min(#self.path, math.ceil(v)))
864864
end
@@ -1053,12 +1053,12 @@ function clearpipesegment:init(x, y, parent, quad, stage, dir, entrance, exit, g
10531053
self.static = true
10541054
self.category = 2
10551055
self.mask = {true}
1056-
1056+
10571057
self.emancipatecheck = false
10581058
self.autodelete = false
10591059
self.drawable = false
10601060
self.portalable = false
1061-
1061+
10621062
self.rotation = 0 --for portals
10631063
self.graphic = {graphic or clearpipeimg}
10641064
self.quadi = {quad[1], quad[2]}
@@ -1072,7 +1072,7 @@ function clearpipesegment:init(x, y, parent, quad, stage, dir, entrance, exit, g
10721072
self.entrance = entrance or false
10731073
self.exit = exit or false
10741074
self.stage = stage
1075-
1075+
10761076
if self.entrance or self.exit then
10771077
self.hollow = true
10781078
end
@@ -1090,7 +1090,7 @@ end
10901090

10911091
function clearpipesegment:draw(drop)
10921092
if onscreen(self.x, self.y, 1, 1) then
1093-
--love.graphics.setColor(1, 1, 1)
1093+
--love.graphics.setColor(255, 255, 255)
10941094
for i = 1, #self.quad do
10951095
love.graphics.draw(self.graphic[i], self.quad[i], math.floor(((self.x-xscroll)*16+self.offsetX)*scale), math.floor(((self.y-yscroll)*16-self.offsetY)*scale), 0, scale, scale, self.quadcenterX, self.quadcenterY)
10961096
end

delayer.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ end
7272

7373
function delayer:draw()
7474
if self.visible then
75-
love.graphics.setColor(1, 1, 1)
75+
love.graphics.setColor(255, 255, 255)
7676
love.graphics.draw(gateimg, gatequad[3], math.floor((self.x-1-xscroll)*16*scale), ((self.y-yscroll-1)*16-8)*scale, 0, scale, scale)
7777
end
7878
end

dialogbox.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function dialogbox:init(text, speaker, color)
4545
self.text = string.sub(self.text, 1, i-1) .. string.sub(self.text, j+1)
4646
else
4747
if newcolor then
48-
self.textcolors[i] = {tonumber(curcolor[1])/255, tonumber(curcolor[2])/255, tonumber(curcolor[3])/255}
48+
self.textcolors[i] = {tonumber(curcolor[1]), tonumber(curcolor[2]), tonumber(curcolor[3])}
4949
newcolor = false
5050
end
5151
i = i + 1
@@ -72,9 +72,9 @@ function dialogbox:draw()
7272
local boxheight = 45
7373
local margin = 4
7474
local lineheight = 10
75-
love.graphics.setColor(0, 0, 0, .5)
75+
love.graphics.setColor(0, 0, 0, 127)
7676
love.graphics.rectangle("fill", scale*margin, (height*16-boxheight-margin)*scale, (width*16-margin*2)*scale, boxheight*scale)
77-
love.graphics.setColor(1, 1, 1)
77+
love.graphics.setColor(255, 255, 255)
7878
drawrectangle(5, (height*16-margin-boxheight+1), (width*16-margin*2-2), boxheight-2)
7979

8080
local availablepixelsx = width*16-margin*2-6
@@ -99,10 +99,10 @@ function dialogbox:draw()
9999
end
100100

101101
if self.speaker and #self.speaker ~= 0 then
102-
love.graphics.setColor(0, 0, 0, .5)
102+
love.graphics.setColor(0, 0, 0, 127)
103103
love.graphics.rectangle("fill", scale*margin, (height*16-boxheight-margin-10)*scale, (5+#self.speaker*8)*scale, 10*scale)
104104

105-
--love.graphics.setColor(1, 1, 1)
105+
--love.graphics.setColor(255, 255, 255)
106106
--drawrectangle(5, (height*16-margin-boxheight+1-10), (3+#self.speaker*8), 11)
107107

108108
love.graphics.setColor(self.color or textcolors["orange"])

0 commit comments

Comments
 (0)