diff options
-rw-r--r-- | assets/biker.png | bin | 1702 -> 2209 bytes | |||
-rw-r--r-- | assets/bison.png | bin | 1696 -> 1804 bytes | |||
-rw-r--r-- | assets/boss.png | bin | 0 -> 2126 bytes | |||
-rw-r--r-- | assets/bug.png | bin | 0 -> 2023 bytes | |||
-rw-r--r-- | assets/calamari.png | bin | 1137 -> 11193 bytes | |||
-rw-r--r-- | assets/capone.png | bin | 0 -> 1988 bytes | |||
-rw-r--r-- | assets/gelato.png | bin | 2158 -> 2601 bytes | |||
-rw-r--r-- | assets/girl.png | bin | 1948 -> 2178 bytes | |||
-rw-r--r-- | assets/gorilla.png | bin | 0 -> 1892 bytes | |||
-rw-r--r-- | assets/gramps.png | bin | 0 -> 2199 bytes | |||
-rw-r--r-- | assets/gummybear.png | bin | 0 -> 2072 bytes | |||
-rw-r--r-- | assets/lady.png | bin | 1948 -> 1912 bytes | |||
-rw-r--r-- | assets/link.png | bin | 0 -> 2290 bytes | |||
-rw-r--r-- | assets/marine.png | bin | 1945 -> 2267 bytes | |||
-rw-r--r-- | assets/nemo.png | bin | 0 -> 2519 bytes | |||
-rw-r--r-- | assets/phonebooth.png | bin | 0 -> 2608 bytes | |||
-rw-r--r-- | assets/rock.png | bin | 0 -> 2762 bytes | |||
-rw-r--r-- | assets/scissors.png | bin | 2062 -> 2086 bytes | |||
-rw-r--r-- | assets/scooter.png | bin | 0 -> 2083 bytes | |||
-rw-r--r-- | assets/veno.png | bin | 2242 -> 2305 bytes | |||
-rw-r--r-- | assets/vrooom.png | bin | 0 -> 3314 bytes | |||
-rw-r--r-- | assets/weed.png | bin | 2090 -> 2088 bytes | |||
-rw-r--r-- | main.lua | 16 | ||||
-rw-r--r-- | nautslist.lua | 18 | ||||
-rw-r--r-- | player.lua | 3 |
25 files changed, 27 insertions, 10 deletions
diff --git a/assets/biker.png b/assets/biker.png Binary files differindex 91d7b6e..4737a99 100644 --- a/assets/biker.png +++ b/assets/biker.png diff --git a/assets/bison.png b/assets/bison.png Binary files differindex 55b32fa..6c9dfc4 100644 --- a/assets/bison.png +++ b/assets/bison.png diff --git a/assets/boss.png b/assets/boss.png Binary files differnew file mode 100644 index 0000000..bed5b91 --- /dev/null +++ b/assets/boss.png diff --git a/assets/bug.png b/assets/bug.png Binary files differnew file mode 100644 index 0000000..04961f7 --- /dev/null +++ b/assets/bug.png diff --git a/assets/calamari.png b/assets/calamari.png Binary files differindex 3b3e1c9..6918325 100644 --- a/assets/calamari.png +++ b/assets/calamari.png diff --git a/assets/capone.png b/assets/capone.png Binary files differnew file mode 100644 index 0000000..50dbdac --- /dev/null +++ b/assets/capone.png diff --git a/assets/gelato.png b/assets/gelato.png Binary files differindex 8d66684..761f3e1 100644 --- a/assets/gelato.png +++ b/assets/gelato.png diff --git a/assets/girl.png b/assets/girl.png Binary files differindex 5c5ad47..b393513 100644 --- a/assets/girl.png +++ b/assets/girl.png diff --git a/assets/gorilla.png b/assets/gorilla.png Binary files differnew file mode 100644 index 0000000..c4f1b20 --- /dev/null +++ b/assets/gorilla.png diff --git a/assets/gramps.png b/assets/gramps.png Binary files differnew file mode 100644 index 0000000..975c1be --- /dev/null +++ b/assets/gramps.png diff --git a/assets/gummybear.png b/assets/gummybear.png Binary files differnew file mode 100644 index 0000000..0abacac --- /dev/null +++ b/assets/gummybear.png diff --git a/assets/lady.png b/assets/lady.png Binary files differindex 14c5ab4..654f2ed 100644 --- a/assets/lady.png +++ b/assets/lady.png diff --git a/assets/link.png b/assets/link.png Binary files differnew file mode 100644 index 0000000..f8cadd8 --- /dev/null +++ b/assets/link.png diff --git a/assets/marine.png b/assets/marine.png Binary files differindex d6310c8..ab388ac 100644 --- a/assets/marine.png +++ b/assets/marine.png diff --git a/assets/nemo.png b/assets/nemo.png Binary files differnew file mode 100644 index 0000000..06c3540 --- /dev/null +++ b/assets/nemo.png diff --git a/assets/phonebooth.png b/assets/phonebooth.png Binary files differnew file mode 100644 index 0000000..c9cace5 --- /dev/null +++ b/assets/phonebooth.png diff --git a/assets/rock.png b/assets/rock.png Binary files differnew file mode 100644 index 0000000..d6e2156 --- /dev/null +++ b/assets/rock.png diff --git a/assets/scissors.png b/assets/scissors.png Binary files differindex 623a381..37ed9f7 100644 --- a/assets/scissors.png +++ b/assets/scissors.png diff --git a/assets/scooter.png b/assets/scooter.png Binary files differnew file mode 100644 index 0000000..e179b35 --- /dev/null +++ b/assets/scooter.png diff --git a/assets/veno.png b/assets/veno.png Binary files differindex 9ba8d84..3504e21 100644 --- a/assets/veno.png +++ b/assets/veno.png diff --git a/assets/vrooom.png b/assets/vrooom.png Binary files differnew file mode 100644 index 0000000..0244322 --- /dev/null +++ b/assets/vrooom.png diff --git a/assets/weed.png b/assets/weed.png Binary files differindex b1ff68f..9dc0e37 100644 --- a/assets/weed.png +++ b/assets/weed.png @@ -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 } @@ -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) |