Nicholas Hayashi
4 years ago
10 changed files with 160 additions and 82 deletions
-
34src/color.lua
-
9src/extra.lua
-
33src/grid.lua
-
42src/hexyz.lua
-
56src/main.lua
-
9src/math.lua
-
23src/mob.lua
-
11src/texture.lua
-
15src/tower.lua
-
10src/util.lua
@ -1,26 +1,26 @@ |
|||||
|
|
||||
|
|
||||
COLORS = { |
COLORS = { |
||||
TRANSPARENT = vec4(0.4), |
|
||||
|
TRANSPARENT = vec4(0.4), |
||||
|
|
||||
-- tones |
-- tones |
||||
WHITE = vec4(0.8, 0.8, 0.7, 1), |
|
||||
BLACK = vec4(0, 0, 0, 1), |
|
||||
TRUEBLACK = vec4(0, 0, 0, 1), |
|
||||
|
WHITE = vec4(0.8, 0.8, 0.7, 1), |
||||
|
BLACK = vec4(0, 0, 0, 1), |
||||
|
TRUE_BLACK = vec4(0, 0, 0, 1), |
||||
|
|
||||
-- hues |
-- hues |
||||
BLUE_STONE = vec4(0.12, 0.3, 0.3, 1), |
|
||||
MYRTLE = vec4(0.10, 0.25, 0.10, 1), |
|
||||
BROWN_POD = vec4(0.25, 0.20, 0.10, 1), |
|
||||
BOTTLE_GREEN = vec4(0.15, 0.30, 0.20, 1), |
|
||||
MAGENTA = vec4(1, 0, 1, 1), |
|
||||
TEAL = vec4(16/255, 126/255, 124/244, 1), |
|
||||
YALE_BLUE = vec4(4/255, 75/255, 127/255, 1), |
|
||||
OLIVE = vec4(111/255, 124/254, 18/255, 1), |
|
||||
LIGHT_CYAN = vec4(224/255, 251/255, 252/255, 1), |
|
||||
PALE_SILVER = vec4(193/255, 178/255, 171/255, 1), |
|
||||
CLARET = vec4(139/255, 30/255, 63/255, 1), |
|
||||
BISTRO = vec4(73/255, 44/255, 29/255, 1), |
|
||||
DEEP_SPACE_SPARKLE = vec4(61/255, 90/255, 108/255, 1) |
|
||||
|
BLUE_STONE = vec4(0.12, 0.3, 0.3, 1), |
||||
|
MYRTLE = vec4(0.10, 0.25, 0.10, 1), |
||||
|
BROWN_POD = vec4(0.25, 0.20, 0.10, 1), |
||||
|
BOTTLE_GREEN = vec4(0.15, 0.30, 0.20, 1), |
||||
|
MAGENTA = vec4(1, 0, 1, 1), |
||||
|
TEAL = vec4(16/255, 126/255, 124/244, 1), |
||||
|
YALE_BLUE = vec4(4/255, 75/255, 127/255, 1), |
||||
|
OLIVE = vec4(111/255, 124/254, 18/255, 1), |
||||
|
LIGHT_CYAN = vec4(224/255, 251/255, 252/255, 1), |
||||
|
PALE_SILVER = vec4(193/255, 178/255, 171/255, 1), |
||||
|
CLARET = vec4(139/255, 30/255, 63/255, 1), |
||||
|
BISTRO = vec4(73/255, 44/255, 29/255, 1), |
||||
|
DEEP_SPACE_SPARKLE = vec4(61/255, 90/255, 108/255, 1) |
||||
} |
} |
||||
|
|
@ -1,4 +1,13 @@ |
|||||
|
|
||||
|
|
||||
|
function math.wrapf(float, range) |
||||
|
return float - range * math.floor(float / range) |
||||
|
end |
||||
|
|
||||
|
function math.lerpv2(v1, v2, t) |
||||
|
return v1 * t + v2 * (1 - t) |
||||
|
end |
||||
|
|
||||
function table.rchoice(t) |
function table.rchoice(t) |
||||
return t[math.floor(math.random() * #t) + 1] |
return t[math.floor(math.random() * #t) + 1] |
||||
end |
end |
@ -1,9 +0,0 @@ |
|||||
|
|
||||
function math.wrapf(float, range) |
|
||||
return float - range * math.floor(float / range) |
|
||||
end |
|
||||
|
|
||||
function math.lerpv2(v1, v2, t) |
|
||||
return v1 * t + v2 * (1 - t) |
|
||||
end |
|
||||
|
|
@ -0,0 +1,15 @@ |
|||||
|
|
||||
|
TOWERS = {} |
||||
|
|
||||
|
function is_buildable(tile, tower) |
||||
|
|
||||
|
end |
||||
|
|
||||
|
function make_tower() |
||||
|
|
||||
|
end |
||||
|
|
||||
|
function do_tower_updates() |
||||
|
|
||||
|
end |
||||
|
|
@ -1,10 +0,0 @@ |
|||||
|
|
||||
function pack_texture_into_sprite(texture, width, height) |
|
||||
return am.sprite{ |
|
||||
texture = texture, |
|
||||
s1 = 0, s2 = 1, t1 = 0, t2 = 1, |
|
||||
x1 = 0, x2 = width, width = width, |
|
||||
y1 = 0, y2 = height, height = height |
|
||||
} |
|
||||
end |
|
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue