summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--assets/biker.pngbin1702 -> 2209 bytes
-rw-r--r--assets/bison.pngbin1696 -> 1804 bytes
-rw-r--r--assets/boss.pngbin0 -> 2126 bytes
-rw-r--r--assets/bug.pngbin0 -> 2023 bytes
-rw-r--r--assets/calamari.pngbin1137 -> 11193 bytes
-rw-r--r--assets/capone.pngbin0 -> 1988 bytes
-rw-r--r--assets/gelato.pngbin2158 -> 2601 bytes
-rw-r--r--assets/girl.pngbin1948 -> 2178 bytes
-rw-r--r--assets/gorilla.pngbin0 -> 1892 bytes
-rw-r--r--assets/gramps.pngbin0 -> 2199 bytes
-rw-r--r--assets/gummybear.pngbin0 -> 2072 bytes
-rw-r--r--assets/lady.pngbin1948 -> 1912 bytes
-rw-r--r--assets/link.pngbin0 -> 2290 bytes
-rw-r--r--assets/marine.pngbin1945 -> 2267 bytes
-rw-r--r--assets/nemo.pngbin0 -> 2519 bytes
-rw-r--r--assets/phonebooth.pngbin0 -> 2608 bytes
-rw-r--r--assets/rock.pngbin0 -> 2762 bytes
-rw-r--r--assets/scissors.pngbin2062 -> 2086 bytes
-rw-r--r--assets/scooter.pngbin0 -> 2083 bytes
-rw-r--r--assets/veno.pngbin2242 -> 2305 bytes
-rw-r--r--assets/vrooom.pngbin0 -> 3314 bytes
-rw-r--r--assets/weed.pngbin2090 -> 2088 bytes
-rw-r--r--main.lua16
-rw-r--r--nautslist.lua18
-rw-r--r--player.lua3
25 files changed, 27 insertions, 10 deletions
diff --git a/assets/biker.png b/assets/biker.png
index 91d7b6e..4737a99 100644
--- a/assets/biker.png
+++ b/assets/biker.png
Binary files differ
diff --git a/assets/bison.png b/assets/bison.png
index 55b32fa..6c9dfc4 100644
--- a/assets/bison.png
+++ b/assets/bison.png
Binary files differ
diff --git a/assets/boss.png b/assets/boss.png
new file mode 100644
index 0000000..bed5b91
--- /dev/null
+++ b/assets/boss.png
Binary files differ
diff --git a/assets/bug.png b/assets/bug.png
new file mode 100644
index 0000000..04961f7
--- /dev/null
+++ b/assets/bug.png
Binary files differ
diff --git a/assets/calamari.png b/assets/calamari.png
index 3b3e1c9..6918325 100644
--- a/assets/calamari.png
+++ b/assets/calamari.png
Binary files differ
diff --git a/assets/capone.png b/assets/capone.png
new file mode 100644
index 0000000..50dbdac
--- /dev/null
+++ b/assets/capone.png
Binary files differ
diff --git a/assets/gelato.png b/assets/gelato.png
index 8d66684..761f3e1 100644
--- a/assets/gelato.png
+++ b/assets/gelato.png
Binary files differ
diff --git a/assets/girl.png b/assets/girl.png
index 5c5ad47..b393513 100644
--- a/assets/girl.png
+++ b/assets/girl.png
Binary files differ
diff --git a/assets/gorilla.png b/assets/gorilla.png
new file mode 100644
index 0000000..c4f1b20
--- /dev/null
+++ b/assets/gorilla.png
Binary files differ
diff --git a/assets/gramps.png b/assets/gramps.png
new file mode 100644
index 0000000..975c1be
--- /dev/null
+++ b/assets/gramps.png
Binary files differ
diff --git a/assets/gummybear.png b/assets/gummybear.png
new file mode 100644
index 0000000..0abacac
--- /dev/null
+++ b/assets/gummybear.png
Binary files differ
diff --git a/assets/lady.png b/assets/lady.png
index 14c5ab4..654f2ed 100644
--- a/assets/lady.png
+++ b/assets/lady.png
Binary files differ
diff --git a/assets/link.png b/assets/link.png
new file mode 100644
index 0000000..f8cadd8
--- /dev/null
+++ b/assets/link.png
Binary files differ
diff --git a/assets/marine.png b/assets/marine.png
index d6310c8..ab388ac 100644
--- a/assets/marine.png
+++ b/assets/marine.png
Binary files differ
diff --git a/assets/nemo.png b/assets/nemo.png
new file mode 100644
index 0000000..06c3540
--- /dev/null
+++ b/assets/nemo.png
Binary files differ
diff --git a/assets/phonebooth.png b/assets/phonebooth.png
new file mode 100644
index 0000000..c9cace5
--- /dev/null
+++ b/assets/phonebooth.png
Binary files differ
diff --git a/assets/rock.png b/assets/rock.png
new file mode 100644
index 0000000..d6e2156
--- /dev/null
+++ b/assets/rock.png
Binary files differ
diff --git a/assets/scissors.png b/assets/scissors.png
index 623a381..37ed9f7 100644
--- a/assets/scissors.png
+++ b/assets/scissors.png
Binary files differ
diff --git a/assets/scooter.png b/assets/scooter.png
new file mode 100644
index 0000000..e179b35
--- /dev/null
+++ b/assets/scooter.png
Binary files differ
diff --git a/assets/veno.png b/assets/veno.png
index 9ba8d84..3504e21 100644
--- a/assets/veno.png
+++ b/assets/veno.png
Binary files differ
diff --git a/assets/vrooom.png b/assets/vrooom.png
new file mode 100644
index 0000000..0244322
--- /dev/null
+++ b/assets/vrooom.png
Binary files differ
diff --git a/assets/weed.png b/assets/weed.png
index b1ff68f..9dc0e37 100644
--- a/assets/weed.png
+++ b/assets/weed.png
Binary files differ
diff --git a/main.lua b/main.lua
index 9be9eda..aa24c08 100644
--- a/main.lua
+++ b/main.lua
@@ -2,17 +2,33 @@
-- WHOLE CODE HAS FLAG OF "need a cleanup"
-- Pretend you didn't see this
+-- This is work for scene manager
Scene = nil
function changeScene(scene)
Scene = scene
end
+-- Should be moved to scene/camera
function getScale()
return math.max(1, math.floor(love.graphics.getWidth() / 320)-1, math.floor(love.graphics.getHeight() / 180)-1)
end
function getRealScale()
return math.max(love.graphics.getWidth() / 320, love.graphics.getHeight() / 180)
end
+-- Should be moved anywhere; engine object
+function newImage(path)
+ local imagedata = love.image.newImageData(path)
+ local transparency = function(x, y, r, g, b, a)
+ if (r == 0 and g == 128 and b == 64) or
+ (r == 0 and g == 240 and b == 6) then
+ a = 0
+ end
+ return r, g, b, a
+ end
+ imagedata:mapPixel(transparency)
+ local image = love.graphics.newImage(imagedata)
+ return image
+end
-- Require
require "world"
diff --git a/nautslist.lua b/nautslist.lua
index b81b327..d28b9ab 100644
--- a/nautslist.lua
+++ b/nautslist.lua
@@ -14,19 +14,19 @@ return {
"bison", -- skolldir
"bobito", -- yuri
"slugzor", -- derpl
- --"capone", -- vinnie
- --"nemo", -- spike
- --"bug", -- genji
+ "capone", -- vinnie
+ "nemo", -- spike
+ "bug", -- genji
"calamari", -- swiggins
--"quack", -- rocco
"scissors", -- ksenia
"marine", -- ted
- --"scooter", -- penny
- --"phonebooth", -- sentry
+ "scooter", -- penny
+ "phonebooth", -- sentry
"weed", -- skree
- --"gummybear", -- nibbs
- --"gramps", -- yoolip
+ "gummybear", -- nibbs
+ "gramps", -- yoolip
"biker", -- chucho
- --"vrooom", -- lux
- --"link" -- ix
+ "vrooom", -- lux
+ "link", -- ix
}
diff --git a/player.lua b/player.lua
index 2a5d270..f22bff8 100644
--- a/player.lua
+++ b/player.lua
@@ -63,7 +63,7 @@ function Player:new (game, world, x, y, name)
o.body:setFixedRotation(true)
-- Misc
o.name = name or "empty"
- o.sprite = love.graphics.newImage("assets/"..o.name..".png")
+ o.sprite = newImage("assets/"..o.name..".png")
o.world = game
-- Animation
o.initial = o.delay
@@ -82,6 +82,7 @@ function Player:delete()
self.sprite = nil
end
+-- Controller
function Player:assignController(controller)
self.controller = controller or nil
controller:setParent(self)