forked from Stabyourself/mari0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c1bbdf7
Showing
425 changed files
with
24,471 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
bighatoffsets = {} | ||
bighatoffsets["idle"] = {-4, -2} | ||
bighatoffsets["fire"] = {-5, -4} | ||
bighatoffsets["running"] = {{-5, -4}, {-4, -3}, {-3, -2}} | ||
bighatoffsets["sliding"] = {-5, -2} | ||
bighatoffsets["jumping"] = {-4, -4} | ||
bighatoffsets["falling"] = {-4, -2} | ||
bighatoffsets["climbing"] = {{-4, -4}, {-4, -4}} | ||
bighatoffsets["swimming"] = {{-5, -4}, {-5, -4}} | ||
bighatoffsets["ducking"] = {-5, -12} | ||
bighatoffsets["dead"] = false | ||
|
||
bighat = {} | ||
|
||
table.insert(bighat, {x = 0, y = 0, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/standard.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -3, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/tyrolean.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -2, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/towering1.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -8, height = 9, graphic = love.graphics.newImage("graphics/SMB/bighats/towering2.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = -1, height = 2, graphic = love.graphics.newImage("graphics/SMB/bighats/towering3.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = -7, height = 10, graphic = love.graphics.newImage("graphics/SMB/bighats/drseuss.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = -8, height = 8, graphic = love.graphics.newImage("graphics/SMB/bighats/bird.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = -2, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/banana.png")}) | ||
|
||
table.insert(bighat, {x = 1, y = -3, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/beanie.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = -5, height = 8, graphic = love.graphics.newImage("graphics/SMB/bighats/toilet.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = -4, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/indian.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = -2, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/officerhat.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -3, height = 7, graphic = love.graphics.newImage("graphics/SMB/bighats/crown.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -7, height = 10, graphic = love.graphics.newImage("graphics/SMB/bighats/tophat.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = 1, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/batter.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = 0, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/bonk.png")}) | ||
|
||
table.insert(bighat, {x = 0, y = 0, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/bakerboy.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = 0, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/troublemaker.png")}) | ||
|
||
table.insert(bighat, {x = 0, y = 0, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/whoopee.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = -1, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/milkman.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = 1, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/bombingrun.png")}) | ||
|
||
table.insert(bighat, {x = -4, y = 3, height = 0, graphic = love.graphics.newImage("graphics/SMB/bighats/bonkboy.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -1, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/flippedtrilby.png")}) | ||
|
||
table.insert(bighat, {x = 0, y = -1, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/superfan.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = -2, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/familiarfez.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = -1, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/santahat.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = 0, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/sailor.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = 0, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/koopa.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = -5, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/blooper.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = 1, height = 3, graphic = love.graphics.newImage("graphics/SMB/bighats/shyguy.png")}) | ||
|
||
table.insert(bighat, {x = -1, y = 3, height = 4, graphic = love.graphics.newImage("graphics/SMB/bighats/goodnewseverybody.png")}) | ||
|
||
table.insert(bighat, {x = -3, y = -1, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/jetset.png")}) | ||
|
||
table.insert(bighat, {x = -2, y = 0, height = 5, graphic = love.graphics.newImage("graphics/SMB/bighats/bestpony.png")}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
blockdebris = class:new() | ||
|
||
function blockdebris:init(x, y, speedx, speedy) | ||
self.x = x | ||
self.y = y | ||
self.speedx = speedx | ||
self.speedy = speedy | ||
|
||
self.timer = 0 | ||
self.frame = 1 | ||
end | ||
|
||
function blockdebris:update(dt) | ||
self.timer = self.timer + dt | ||
while self.timer > blockdebrisanimationtime do | ||
self.timer = self.timer - blockdebrisanimationtime | ||
if self.frame == 1 then | ||
self.frame = 2 | ||
else | ||
self.frame = 1 | ||
end | ||
end | ||
|
||
self.speedy = self.speedy + blockdebrisgravity*dt | ||
|
||
self.x = self.x + self.speedx*dt | ||
self.y = self.y + self.speedy*dt | ||
|
||
|
||
if self.y > 15 then | ||
return true | ||
end | ||
|
||
return false | ||
end | ||
|
||
function blockdebris:draw() | ||
love.graphics.drawq(blockdebrisimage, blockdebrisquads[spriteset][self.frame], math.floor((self.x-xscroll)*16*scale), math.floor((self.y-.5)*16*scale), 0, scale, scale, 4, 4) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
bowser = class:new() | ||
|
||
function bowser:init(x, y, i) | ||
--PHYSICS STUFF | ||
self.x = x+4 | ||
self.y = y-27/16 | ||
self.level = i or marioworld | ||
self.startx = x+12 | ||
self.starty = y | ||
self.speedy = 0 | ||
self.speedx = 0 | ||
self.width = 30/16 | ||
self.height = 28/16 | ||
self.static = false | ||
self.active = true | ||
self.emancipatecheck = true | ||
self.category = 16 | ||
|
||
self.mask = { true, | ||
false, false, false, false, true, | ||
false, true, false, true, false, | ||
false, false, true, true, false, | ||
true, true, false, false, true, | ||
false, true, true, false, false, | ||
true, false, true, true, true} | ||
|
||
self.gravity = bowsergravity | ||
|
||
--IMAGE STUFF | ||
self.drawable = true | ||
self.graphic = bowserimg | ||
self.quad = bowserquad[1][1] | ||
self.walkframe = 1 | ||
self.offsetX = 14 | ||
self.offsetY = -2 | ||
self.quadcenterX = 16 | ||
self.quadcenterY = 12 | ||
|
||
self.rotation = 0 --for portals | ||
self.jump = false | ||
|
||
self.animationtimer = 0 | ||
self.animationdirection = "right" | ||
self.fireframe = 1 | ||
self.timer = 0 | ||
self.hammertimer = 0 | ||
self.hammertime = 1 --Stop! | ||
self.hammers = false | ||
if self.level >= 6 then | ||
self.hammers = true | ||
end | ||
|
||
self.hp = bowserhealth | ||
|
||
self.shot = false | ||
self.fall = false | ||
|
||
self:newtargetx("right") | ||
end | ||
|
||
function bowser:update(dt) | ||
if self.shot then | ||
self.speedy = self.speedy + shotgravity*dt | ||
|
||
self.x = self.x+self.speedx*dt | ||
self.y = self.y+self.speedy*dt | ||
|
||
if self.speedy > bowserfallspeed then | ||
self.speedy = bowserfallspeed | ||
end | ||
|
||
return false | ||
else | ||
if self.speedy > bowserfallspeed then | ||
self.speedy = bowserfallspeed | ||
end | ||
|
||
--rotate back to 0 (portals) | ||
self.rotation = math.mod(self.rotation, math.pi*2) | ||
if self.rotation > 0 then | ||
self.rotation = self.rotation - portalrotationalignmentspeed*dt | ||
if self.rotation < 0 then | ||
self.rotation = 0 | ||
end | ||
elseif self.rotation < 0 then | ||
self.rotation = self.rotation + portalrotationalignmentspeed*dt | ||
if self.rotation > 0 then | ||
self.rotation = 0 | ||
end | ||
end | ||
|
||
if not self.fall then | ||
self.animationtimer = self.animationtimer + dt | ||
while self.animationtimer > bowseranimationspeed do | ||
self.animationtimer = self.animationtimer - bowseranimationspeed | ||
if self.walkframe == 1 then | ||
self.walkframe = 2 | ||
else | ||
self.walkframe = 1 | ||
end | ||
end | ||
|
||
if self.x < self.targetx then | ||
self.speedx = bowserspeedforwards | ||
if self.x+self.speedx*dt >= self.targetx then | ||
self:newtargetx("left") | ||
end | ||
else | ||
self.speedx = -bowserspeedforwards | ||
if self.x+self.speedx*dt <= self.targetx then | ||
self:newtargetx("right") | ||
end | ||
end | ||
|
||
--stop, hammertime | ||
if self.hammers and self.backwards == false then | ||
self.hammertimer = self.hammertimer + dt | ||
while self.hammertimer > self.hammertime do | ||
table.insert(objects["hammer"], hammer:new(self.x+4/16, self.y+.5, "left")) | ||
self.hammertimer = self.hammertimer - self.hammertime | ||
|
||
--new delay | ||
self.hammertime = bowserhammertable[math.random(#bowserhammertable)] | ||
end | ||
end | ||
end | ||
|
||
if self.backwards == false and firestarted and firetimer > firedelay-0.5 then | ||
self.fireframe = 2 | ||
self.speedx = 0 | ||
else | ||
self.fireframe = 1 | ||
end | ||
|
||
self.quad = bowserquad[self.fireframe][self.walkframe] | ||
|
||
--left of player override | ||
if not self.fall then | ||
if objects["player"][getclosestplayer(self.x+15/16)].x > self.x+15/16 and self.jump == false then | ||
self.animationdirection = "left" | ||
self.speedx = bowserspeedbackwards | ||
self.backwards = true | ||
else | ||
self.backwards = false | ||
self.animationdirection = "right" | ||
self.timer = self.timer + dt | ||
if self.timer > bowserjumpdelay and self.jump == false then | ||
self.speedy = -bowserjumpforce | ||
self.jump = true | ||
self.timer = self.timer - bowserjumpdelay | ||
end | ||
end | ||
end | ||
end | ||
|
||
return false | ||
end | ||
|
||
function bowser:draw() | ||
--just for the hammers | ||
if not self.fall and not self.backwards then | ||
if self.hammertimer > self.hammertime - bowserhammerdrawtime then | ||
love.graphics.drawq(hammerimg, hammerquad[spriteset][1], math.floor((self.x-xscroll)*16*scale), (self.y-.5-11/16)*16*scale, 0, scale, scale) | ||
end | ||
end | ||
end | ||
|
||
function bowser:newtargetx(dir) | ||
if dir == "right" then | ||
self.targetx = self.startx-1-math.random(2) | ||
else | ||
self.targetx = self.startx-7-math.random(2) | ||
end | ||
end | ||
|
||
function bowser:shotted(dir) | ||
self.hp = self.hp - 1 | ||
if self.hp == 0 then | ||
self:firedeath() | ||
end | ||
end | ||
|
||
function bowser:firedeath() | ||
playsound(shotsound) | ||
playsound(bowserfallsound) | ||
self.shot = true | ||
self.speedy = -shotjumpforce | ||
self.direction = dir or "right" | ||
self.active = false | ||
self.gravity = shotgravity | ||
self.speedx = 0 | ||
|
||
addpoints(firepoints["bowser"], self.x+self.width/2, self.y) | ||
|
||
--image | ||
if marioworld <= 7 then | ||
self.graphic = decoysimg | ||
self.quad = decoysquad[marioworld] | ||
end | ||
end | ||
|
||
function bowser:leftcollide(a, b) | ||
if a == "player" then | ||
return false | ||
end | ||
end | ||
|
||
function bowser:rightcollide(a, b) | ||
if a == "player" then | ||
return false | ||
end | ||
end | ||
|
||
function bowser:ceilcollide(a, b) | ||
if a == "player" then | ||
return false | ||
end | ||
end | ||
|
||
function bowser:startfall() | ||
|
||
end | ||
|
||
function bowser:floorcollide(a, b) | ||
if self.jump then | ||
self.jump = false | ||
self.timer = 0 | ||
end | ||
if a == "player" then | ||
return false | ||
end | ||
end | ||
|
||
function bowser:startfall() | ||
self.jump = true | ||
end | ||
|
||
function bowser:emancipate(a) | ||
|
||
self:shotted() | ||
end |
Oops, something went wrong.