diff --git a/art/food/beer_mug.png b/art/food/beer_mug.png new file mode 100644 index 0000000..383a48c Binary files /dev/null and b/art/food/beer_mug.png differ diff --git a/art/food/orig/beer_mug.png b/art/food/orig/beer_mug.png new file mode 100644 index 0000000..84e0822 Binary files /dev/null and b/art/food/orig/beer_mug.png differ diff --git a/art/food/processed/beer_mug_b.png b/art/food/processed/beer_mug_b.png new file mode 100644 index 0000000..62c7ff9 Binary files /dev/null and b/art/food/processed/beer_mug_b.png differ diff --git a/art/food/processed/beer_mug_g.png b/art/food/processed/beer_mug_g.png new file mode 100644 index 0000000..7042125 Binary files /dev/null and b/art/food/processed/beer_mug_g.png differ diff --git a/art/food/processed/beer_mug_r.png b/art/food/processed/beer_mug_r.png new file mode 100644 index 0000000..7042125 Binary files /dev/null and b/art/food/processed/beer_mug_r.png differ diff --git a/art/food/processed/beer_mug_reduced.png b/art/food/processed/beer_mug_reduced.png new file mode 100644 index 0000000..7c1a5aa Binary files /dev/null and b/art/food/processed/beer_mug_reduced.png differ diff --git a/art/food/processed/bread_b.png b/art/food/processed/bread_b.png index 8757d0c..3392eb7 100644 Binary files a/art/food/processed/bread_b.png and b/art/food/processed/bread_b.png differ diff --git a/art/food/processed/bread_g.png b/art/food/processed/bread_g.png index 2700004..deb1d47 100644 Binary files a/art/food/processed/bread_g.png and b/art/food/processed/bread_g.png differ diff --git a/art/food/processed/bread_r.png b/art/food/processed/bread_r.png index b0fb240..6b7fde7 100644 Binary files a/art/food/processed/bread_r.png and b/art/food/processed/bread_r.png differ diff --git a/art/food/processed/bread_reduced.png b/art/food/processed/bread_reduced.png index 72c6c5d..91a8cbc 100644 Binary files a/art/food/processed/bread_reduced.png and b/art/food/processed/bread_reduced.png differ diff --git a/art/house/books_stack.png b/art/house/books_stack.png new file mode 100644 index 0000000..d6496b2 Binary files /dev/null and b/art/house/books_stack.png differ diff --git a/art/house/bookshelf.png b/art/house/bookshelf.png new file mode 100644 index 0000000..ef26d44 Binary files /dev/null and b/art/house/bookshelf.png differ diff --git a/art/house/orig/book_open.jpg b/art/house/orig/book_open.jpg new file mode 100644 index 0000000..ba1c68c Binary files /dev/null and b/art/house/orig/book_open.jpg differ diff --git a/art/house/orig/books_stack.png b/art/house/orig/books_stack.png new file mode 100644 index 0000000..6dccb58 Binary files /dev/null and b/art/house/orig/books_stack.png differ diff --git a/art/house/orig/bookshelf.png b/art/house/orig/bookshelf.png new file mode 100644 index 0000000..33e38c0 Binary files /dev/null and b/art/house/orig/bookshelf.png differ diff --git a/art/house/orig/toilet.png b/art/house/orig/toilet.png new file mode 100644 index 0000000..b7421be Binary files /dev/null and b/art/house/orig/toilet.png differ diff --git a/art/house/processed/books_stack_b.png b/art/house/processed/books_stack_b.png new file mode 100644 index 0000000..ef8bf33 Binary files /dev/null and b/art/house/processed/books_stack_b.png differ diff --git a/art/house/processed/books_stack_g.png b/art/house/processed/books_stack_g.png new file mode 100644 index 0000000..8b1ebc8 Binary files /dev/null and b/art/house/processed/books_stack_g.png differ diff --git a/art/house/processed/books_stack_r.png b/art/house/processed/books_stack_r.png new file mode 100644 index 0000000..fd3789e Binary files /dev/null and b/art/house/processed/books_stack_r.png differ diff --git a/art/house/processed/books_stack_reduced.png b/art/house/processed/books_stack_reduced.png new file mode 100644 index 0000000..9f198fe Binary files /dev/null and b/art/house/processed/books_stack_reduced.png differ diff --git a/art/house/processed/bookshelf_b.png b/art/house/processed/bookshelf_b.png new file mode 100644 index 0000000..4c23b41 Binary files /dev/null and b/art/house/processed/bookshelf_b.png differ diff --git a/art/house/processed/bookshelf_g.png b/art/house/processed/bookshelf_g.png new file mode 100644 index 0000000..a6d1c8f Binary files /dev/null and b/art/house/processed/bookshelf_g.png differ diff --git a/art/house/processed/bookshelf_r.png b/art/house/processed/bookshelf_r.png new file mode 100644 index 0000000..3053bf3 Binary files /dev/null and b/art/house/processed/bookshelf_r.png differ diff --git a/art/house/processed/bookshelf_reduced.png b/art/house/processed/bookshelf_reduced.png new file mode 100644 index 0000000..3f0a2e7 Binary files /dev/null and b/art/house/processed/bookshelf_reduced.png differ diff --git a/art/house/processed/table_b.png b/art/house/processed/table_b.png index 5c5d3f4..4194607 100644 Binary files a/art/house/processed/table_b.png and b/art/house/processed/table_b.png differ diff --git a/art/house/processed/table_g.png b/art/house/processed/table_g.png index 84946a9..2311131 100644 Binary files a/art/house/processed/table_g.png and b/art/house/processed/table_g.png differ diff --git a/art/house/processed/table_r.png b/art/house/processed/table_r.png index 5236b50..5f6008f 100644 Binary files a/art/house/processed/table_r.png and b/art/house/processed/table_r.png differ diff --git a/art/house/processed/table_reduced.png b/art/house/processed/table_reduced.png index 0eb0686..decd085 100644 Binary files a/art/house/processed/table_reduced.png and b/art/house/processed/table_reduced.png differ diff --git a/art/house/processed/toilet_b.png b/art/house/processed/toilet_b.png new file mode 100644 index 0000000..ee2fa12 Binary files /dev/null and b/art/house/processed/toilet_b.png differ diff --git a/art/house/processed/toilet_g.png b/art/house/processed/toilet_g.png new file mode 100644 index 0000000..b091a42 Binary files /dev/null and b/art/house/processed/toilet_g.png differ diff --git a/art/house/processed/toilet_r.png b/art/house/processed/toilet_r.png new file mode 100644 index 0000000..776080c Binary files /dev/null and b/art/house/processed/toilet_r.png differ diff --git a/art/house/processed/toilet_reduced.png b/art/house/processed/toilet_reduced.png new file mode 100644 index 0000000..77e4172 Binary files /dev/null and b/art/house/processed/toilet_reduced.png differ diff --git a/art/house/toilet.png b/art/house/toilet.png new file mode 100644 index 0000000..37ee470 Binary files /dev/null and b/art/house/toilet.png differ diff --git a/art/switch_pressed.png b/art/switch_pressed.png new file mode 100644 index 0000000..f6d2db0 Binary files /dev/null and b/art/switch_pressed.png differ diff --git a/door.lua b/door.lua index df0e35a..0e2dabb 100644 --- a/door.lua +++ b/door.lua @@ -58,7 +58,6 @@ function Door:setColors(colors) end function Door:unlock() - print("wow") self.locked = false self.collision = "none" end diff --git a/entity.lua b/entity.lua index 2fcc4be..e5758d0 100644 --- a/entity.lua +++ b/entity.lua @@ -98,6 +98,9 @@ function Entity:move(axis, direction) self[axis] = self[axis] + direction end +function Entity:setSprite(sprite) + self.sprite = sprite +end function Entity:sha() return math.random(-worldSha, worldSha) * .5 diff --git a/main.lua b/main.lua index 7e2d1f2..75c3e70 100644 --- a/main.lua +++ b/main.lua @@ -1,3 +1,6 @@ +love.graphics.setDefaultFilter("linear", "nearest") + + class = require "libs/middleclass" Timer = require "libs/hump/timer" sfxr = require "libs/sfxrlua/sfxr" diff --git a/room.lua b/room.lua index 9e635c5..316b2d6 100644 --- a/room.lua +++ b/room.lua @@ -59,11 +59,11 @@ function Room:initialize(t) -- if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "animals/processed/", "me_rach") end local x, y = 1, 1 - if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "tech/processed/", "mac_smaller") end + if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "house/processed/", "toilet") end self.collideables[color]["n: " .. x .. ", " .. y]:getOccupiedCells() local x, y = 7, 7 - if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "tech/processed/", "cd") end + if active then self.collideables[color]["n: " .. x .. ", " .. y] = Ass:new(x, y, color, "food/processed/", "beer_mug") end end @@ -348,10 +348,11 @@ function Room:switchCheck() --switch is on switch:activate() table.insert(onSwitches, switch) --doesn't rly matter what we put here as long as it's true-y + else + switch:deactivate() end end if #onSwitches == #switchArray then doorsToUnlock[color] = true else doorsToUnlock[color] = false end - print(color, doorsToUnlock[color]) end return doorsToUnlock diff --git a/switch.lua b/switch.lua index a072519..e8a73b3 100644 --- a/switch.lua +++ b/switch.lua @@ -2,19 +2,33 @@ require "entity" Switch = class("Switch", Entity) +Switch.static.sprites = { + red = love.graphics.newImage("art/switch_r.png"), + green = love.graphics.newImage("art/switch_g.png"), + blue = love.graphics.newImage("art/switch_b.png"), + pressed = love.graphics.newImage("art/switch_pressed.png") +} + function Switch:initialize(x, y, color) Entity.initialize(self, { x = x, y = y, color = color, collision = "none", --switches are floor elements that can't be pushed or bloc movement!! - sprite = switchSprite[color] + sprite = Switch.sprites[color] }) self.activated = false end function Switch:activate() - if self.activated == false then self.activated = true end - print("i am: ", self.activated) + if self.activated == false then + self.activated = true + end +end + +function Switch:deactivate() + if self.activated == true then + self.activated = false + end end \ No newline at end of file