Compare commits
68 Commits
caaf848722
...
flotillas
Author | SHA1 | Date | |
---|---|---|---|
3151db5430
|
|||
2964159858
|
|||
95d4b6eb37
|
|||
96312e3adf
|
|||
bf9a45d87e
|
|||
36f7c6572f
|
|||
45b70d3aca
|
|||
35980d801a
|
|||
734811bd62
|
|||
4fddbea82c
|
|||
f675e31967
|
|||
0bd1463416
|
|||
267f8a3667
|
|||
fa206c37c5
|
|||
928e7f7418
|
|||
2439fda068
|
|||
d13290f438
|
|||
e3a2810f0a
|
|||
3764063b20
|
|||
90f6df2922
|
|||
b7c3e6ee92
|
|||
c91e5f4bd1
|
|||
ea2ddadb15
|
|||
9333c03bf3
|
|||
1b45bd3dc3
|
|||
71a7351d77
|
|||
80bb848468
|
|||
b227844d12
|
|||
ce14d03669
|
|||
ccd2c64103
|
|||
e5b8a30cb6
|
|||
7ed305d2d9
|
|||
288b7f64c8
|
|||
aea2a8c481
|
|||
9b24f10c23
|
|||
511c18f90e
|
|||
142810ee2d
|
|||
50beae1852
|
|||
9c95fc1784
|
|||
cb2d24c9d0
|
|||
67603f8496
|
|||
2cebea663f
|
|||
eed7b6af87
|
|||
26c3a5b91e
|
|||
44c70a028f
|
|||
a90caeba85
|
|||
cd5b79ef4a
|
|||
637eed1eb8
|
|||
55ab256539
|
|||
22d13121a9
|
|||
58da8e6dc3
|
|||
8ff0732cbc
|
|||
c88e7c0657
|
|||
ff3552bc45
|
|||
2dcb95b0cd
|
|||
87451bbd3a
|
|||
89a42e6c8b
|
|||
e2be11a2da
|
|||
175099d778
|
|||
33fede4ed8
|
|||
afa1f22170
|
|||
78b200272e
|
|||
42ac2abc20
|
|||
c55ea000fd
|
|||
2c1ad0a0b3
|
|||
e0b784ce7d
|
|||
e1a70cc6fc
|
|||
cbdf2a27cd
|
@ -54,18 +54,11 @@ end
|
||||
function _draw()
|
||||
cls()
|
||||
draw_hud_placeholder()
|
||||
-- draw_static()
|
||||
left_pane:draw()
|
||||
right_pane:draw()
|
||||
rearm_pane_instance:draw()
|
||||
end
|
||||
|
||||
function draw_static()
|
||||
draw_weap_opt(0,0,frame_col(item==1),1,"hull","\n +1\n max\n health")
|
||||
draw_weap_opt(56,0,frame_col(item==2),2,"vulc"," rate\n\n faster\n firing\n rate")
|
||||
draw_rearm(frame_col(item<0))
|
||||
end
|
||||
|
||||
function _init()
|
||||
item=1
|
||||
bfm=1
|
||||
@ -80,8 +73,8 @@ function _init()
|
||||
rearm_pane_instance = rearm_pane.new{hot=function() return item < 0 end}
|
||||
end
|
||||
|
||||
function _update()
|
||||
crt_frm += 0.5
|
||||
function _update60()
|
||||
crt_frm += 0.25
|
||||
if (crt_frm >= 9) crt_frm = 1
|
||||
if (btn(3) and item > 0 or btn(2) and item < 0) item = -item
|
||||
if (btn(0)) item = 1
|
||||
@ -122,10 +115,10 @@ end
|
||||
crt={-91,-166,-2641,-1441,-23041,23295,-20491,24570}
|
||||
|
||||
function glow_box(x0, y0, x1, y1, c, cf)
|
||||
rect(x0, y0, x1, y1, c[1])
|
||||
rect(x0+1, y0+1, x1-1, y1-1, c[2])
|
||||
rect(x0+2, y0+2, x1-2, y1-2, c[1])
|
||||
rect(x0+3, y0+3, x1-3, y1-3, 0)
|
||||
for i,v in ipairs{c[1],c[2],c[1],0} do
|
||||
i -= 1
|
||||
rect(x0+i,y0+i,x1-i,y1-i,v)
|
||||
end
|
||||
fillp(crt[crt_frm&0xff])
|
||||
rectfill(x0+4, y0+4, x1-4, y1-4, cf)
|
||||
fillp()
|
||||
@ -156,22 +149,21 @@ end
|
||||
-- rearm pane objects
|
||||
easing_pane = mknew{
|
||||
-- to enter: pos = -1; to exit: pos = 1
|
||||
-- runs for 16 frames
|
||||
-- runs for 32 frames in, 16 frames out
|
||||
}
|
||||
|
||||
function easing_pane:frac()
|
||||
local pos = self.pos
|
||||
if (not pos) return
|
||||
if (pos < 0) return 1-easeoutbounce(1+pos)
|
||||
if (pos > 0) return easeoutbounce(1-pos)
|
||||
if (pos > 0) return (1-pos)*(1-pos)
|
||||
return 0
|
||||
end
|
||||
|
||||
function easing_pane:update()
|
||||
local pos = self.pos
|
||||
if (not pos or pos == 0) return
|
||||
-- increment is 0x0.1 -- 1/16th of pos
|
||||
if (pos < 0) pos = min(pos + 0x0.1, 0)
|
||||
if (pos < 0) pos = min(pos + 0x0.05, 0)
|
||||
if pos > 0 then
|
||||
pos -= 0x0.1
|
||||
if (pos <= 0) pos = nil
|
||||
@ -206,7 +198,7 @@ function rearm_pane:draw()
|
||||
local frac = self:frac()
|
||||
if (not frac) return
|
||||
camera(0, -28 * frac)
|
||||
glow_box(0,101,111,127,frame_col(self:hot()),5)
|
||||
glow_box(0,101,111,127,frame_col(self:hot()),1)
|
||||
spr(5,15,107,4,2)
|
||||
print("full ammo\nfull shield\n+50% health",54, 106, 6)
|
||||
camera()
|
||||
|
1467
vacuum_gambit.p8
1467
vacuum_gambit.p8
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user