1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
function drawDesktop()
love.graphics.setColor(255,255,255)
if desktop.bg.current ~= 0 then
love.graphics.draw(desktop.bg.current, 0, 0, 0, sys.w/1920, sys.h/1280)
end
if scene == 2 and v1.c.chat.msgs > 35 then
drawTentacles()
removeTentacles()
end
if v1.explodeintro == true and v1.yes == true then
if expl.frame >= 20 or v1.c.chat.msgs > 1 then
love.graphics.draw(v1.scorch, win[2].x-300, win[2].y-100)
end
if expl.deb.load == false then
expl.deb[1].x = win[2].x
expl.deb[1].y = win[2].y
expl.deb[2].x = win[2].x+300
expl.deb[2].y = win[2].y
expl.deb[3].x = win[2].x
expl.deb[3].y = win[2].y+300
expl.deb.load = true
end
if expl.deb[1].y < sys.h or expl.deb[2].y < sys.h or expl.deb[3].y < sys.h then
for i=1,3 do
love.graphics.draw(expl.deb[i].pic, expl.deb[i].x, expl.deb[i].y, expl.deb[i].r)
expl.deb[i].y = expl.deb[i].y - (expl.deb[i].ym*sys.s)
expl.deb[i].ym = expl.deb[i].ym - (1*sys.s)
expl.deb[i].x = expl.deb[i].x + (expl.deb[i].xm*sys.s)
expl.deb[i].r = expl.deb[i].r + (expl.deb[i].rm*sys.s)
end
end
if expl.frame <= 89 and v1.c.chat.msgs < 2 then
love.graphics.setColor(255,255,255)
love.graphics.draw(expl.pic, expl.frames[math.floor(expl.frame)], win[2].x-750, win[2].y-500, 0, 7, 7)
expl.frame = expl.frame + 1*sys.s
end
end
for i=1,6 do
drawIcon(i)
checkIcon(i)
end
if sys.mouse.p.p == true and sys.mouse.drag == false then
love.graphics.setColor(0,80,160,80)
love.graphics.rectangle("fill", sys.mouse.p.x, sys.mouse.p.y, sys.mouse.x-sys.mouse.p.x, sys.mouse.y-sys.mouse.p.y)
love.graphics.rectangle("line", sys.mouse.p.x, sys.mouse.p.y, sys.mouse.x-sys.mouse.p.x, sys.mouse.y-sys.mouse.p.y)
end
end
function drawIcon(id, x, y)
if icon[id].hl == true then
love.graphics.setColor(0,0,120)
love.graphics.rectangle("fill", icon[id].x+55-pressstart:getWidth(win[id].title)/2-6,
icon[id].y+45, pressstart:getWidth(win[id].title)+10, 25)
end
love.graphics.setColor(colors.font.light)
love.graphics.print(win[id].title, icon[id].x+55, icon[id].y+55, 0, 1, 1, pressstart:getWidth(win[id].title)/2)
love.graphics.setColor(255,255,255)
love.graphics.draw(win[id].icon32, icon[id].x+30, icon[id].y, 0, 1.5, 1.5)
end
function checkIcon(id)
if(sys.mouse.p.x >= icon[id].x+4 and sys.mouse.p.x <= icon[id].x+100 and sys.mouse.p.p == true
and sys.mouse.p.y >= icon[id].y and sys.mouse.p.y <= icon[id].y+75 and v1.yes == false) then
if icon[id].hl == false and icon[id].cl == false then
icon[id].hl = true
icon[id].cl = true
elseif icon[id].hl == true and icon[id].cl == false then
icon[id].hl = false
icon[id].cl = true
if win[id].ex == true then
win[id].ex = false
win[id].s = 0.2
win[id].oldlayer = win[id].layer
layer.sentToFront = id
end
end
elseif sys.mouse.drag == true or sys.mouse.p.x > 120 or sys.mouse.p.y > 550 then
icon[id].hl = false
end
end
function addTentacle(x,y,s,sp,dy,d,rl,sy)
table.insert(v1.t.t, 1, {x=x,y=y,s=s,sy=sy,sp=sp,dy=dy,d=d,rl=rl,t=math.random(1,2),r=0,rm=false})
end
function drawTentacles()
v1.t.time = v1.t.time - delta
if v1.t.x <= 0 then
v1.t.x = v1.t.x + delta*2
elseif v1.t.x > 0 then
v1.t.x = 0
end
if v1.t.time <= 0 then
v1.t.time = 0.5
addTentacle(math.random(-20,0),sys.h+200,math.random(3,6),
math.random(2,6),-100,true,math.random(5,45),math.random(4,6))
end
for i=1,#v1.t.t do
if v1.t.t[i].t == 1 then
love.graphics.draw(v1.tent1,v1.t.t[i].x+v1.t.x,v1.t.t[i].y,math.rad(-90),v1.t.t[i].s,v1.t.t[i].sy)
elseif v1.t.t[i].t == 2 then
love.graphics.draw(v1.tent2,v1.t.t[i].x+v1.t.x,v1.t.t[i].y,math.rad(-90),v1.t.t[i].s,v1.t.t[i].sy)
end
if v1.t.t[i].d == false then
v1.t.t[i].y = v1.t.t[i].y + v1.t.t[i].sp
else
v1.t.t[i].y = v1.t.t[i].y - v1.t.t[i].sp
end
if v1.t.t[i].y <= v1.t.t[i].dy then
v1.t.t[i].rm = true
end
end
end
function removeTentacles()
for i=1,#v1.t.t do
if v1.t.t[i].rm == true then
table.remove(v1.t.t, i)
return
end
end
end
|