diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-12-11 01:08:16 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-12-11 01:09:17 -0300 |
commit | 5d954dbb24fee12215c713aad893361777c8bd59 (patch) | |
tree | 5622f244b59ba16150ebaa9ae4ccdabb03a13078 /src | |
parent | 1835b872037f3966dfd03320082240412effb42b (diff) |
Remove modularizing since it is under testing for now
Diffstat (limited to 'src')
42 files changed, 273 insertions, 439 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/jump.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/jump.lua index c74d5de..4035b26 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/jump.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/jump.lua @@ -3,8 +3,6 @@ return { currentFrame = 1, elapsedTime = 0, fps = 9, - loop = false, - restart = true, height = -250, velocity = 0, ground = windowProfile.mode.height / 2, diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua index fc8fc51..4e9512b 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua @@ -1,26 +1,286 @@ -require 'scripts.tables' -require 'scripts.load.default' -require 'scripts.keypressed.default' -require 'scripts.keyreleased.default' -require 'scripts.update.default' -require 'scripts.draw.default' - function love.load() - main.load() + fps = 30 + upTime = love.timer.getTime() + nextTime = upTime + + windowProfile = { + mode = { + width = 256, + height = 240, + }, + scale = { + x = 2, + y = 2, + }, + title = "GNU & Bola - The libre beat'em up game", + } + + love.graphics.setBackgroundColor(0, 232, 216) + love.graphics.setDefaultFilter('nearest', 'nearest') + + love.window.setMode(windowProfile.mode.width * windowProfile.scale.x, windowProfile.mode.height * windowProfile.scale.y) + love.window.setTitle(windowProfile.title) + + button = { + left = 'a', + right = 'd', + up = 'w', + down = 's', + a = 'j', + b = 'k', + select = 'g', + start = 'h', + quit = 'escape', + } + + metaSprites = { + bola = { + image = love.graphics.newImage('multimedia/ppu_rp2c0x/meta_sprites/bola/default_sheet_color0_alpha.png'), + x = 24, + y = 32, + } + } + + character = { + bola = { + orientation = 0, + acceleration = 0, + velocity = 125, + gravity = -500, + position = { + x = windowProfile.mode.width / 2, + y = windowProfile.mode.height / 2, + }, + scale = { + x = 1, + y = 1, + }, + origin = { + x = metaSprites.bola.x / 2, + y = metaSprites.bola.y / 2, + }, + stand = require 'stand', + walk = require 'walk', + jump = require 'jump', + actionLeft = false, + actionRight = false, + actionUp = false, + actionDown = false, + actionA = false, + actionB = false, + }, + } + quad = { + bola = require 'stand', + } end -function love.keypressed(key, scancode, isrepeat) - main.keypressed(key, scancode, isrepeat) +function love.keypressed(key, scancode) + keypressed = function(character, metaSprites, key, scancode) + if scancode == button.quit then + love.event.quit() + end + + if scancode == button.a then + character.actionA = true + character.actionDown = false + character.actionUp = false + quad.bola = require 'jump' + end + + if scancode == button.left then + character.actionLeft = true + end + + if scancode == button.right then + character.actionRight = true + end + + if scancode == button.up and character.jump.isJumping == false then + character.actionUp = true + end + + if scancode == button.down and character.jump.isJumping == false then + character.actionDown = true + end + end + keypressed(character.bola, metaSprites.bola, key, scancode) end function love.keyreleased(key, scancode) - main.keyreleased(key, scancode) + keyreleased = function(character, key, scancode) + if scancode == button.a then + character.actionA = false + end + + if scancode == button.left then + character.actionLeft = false + end + + if scancode == button.right then + character.actionRight = false + end + + if scancode == button.up then + character.actionUp = false + end + + if scancode == button.down then + character.actionDown = false + end + + if scancode == button.b then + character.actionB = false + end + + if scancode == button.a then + character.actionA = false + + if character.jump.velocity ~= 0 then + character.jump.limitButtonJump = true + end + end + end + keyreleased(character.bola, key, scancode) end function love.update(dt) - main.update(dt) + nextTime = nextTime + (1 / fps) + + animation = function(character, metaSprites, dt) + local frameStart = function() + character.currentFrame = 1 + end + local frameCounter = function() + character.currentFrame = character.currentFrame + 1 + end + local animationStart = function() + character.elapsedTime = character.elapsedTime + dt + end + local animationCounter = function() + if character.elapsedTime >= (1 / character.fps) then + character.elapsedTime = character.elapsedTime - (1 / character.fps) + if character.currentFrame == # character then + frameStart() + else + frameCounter() + end + end + end + + animationStart() + animationCounter() + metaSprites.quad = character[character.currentFrame] + end + animation(quad.bola, metaSprites.bola, dt) + + motion = function(character, metaSprites, dt) + if character.jump.higher > 0 and character.actionA == true then + if character.jump.limitButtonJump == false then + character.jump.higher = character.jump.higher - dt + character.jump.velocity = character.jump.velocity + character.jump.height * (dt / character.jump.higherMax) + end + end + + if character.actionLeft == true and character.actionRight == false then + quad.bola = require 'walk' + character.position.x = character.position.x - (character.velocity * dt) + character.scale.x = -1 + end + + if character.actionRight == true and character.actionLeft == false then + quad.bola = require 'walk' + character.position.x = character.position.x + (character.velocity * dt) + character.scale.x = 1 + end + + if character.actionUp == true and character.actionDown == false then + quad.bola = require 'walk' + character.position.y = character.position.y - (character.velocity * dt) + character.jump.ground = character.position.y + end + + if character.actionDown == true and character.actionUp == false then + quad.bola = require 'walk' + character.position.y = character.position.y + (character.velocity * dt) + character.jump.ground = character.position.y + end + + if character.actionUp == true and character.actionDown == true then + quad.bola = require 'stand' + elseif character.actionLeft == true and character.actionRight == true then + quad.bola = require 'stand' + elseif character.actionLeft == false and character.actionRight == false and character.actionUp == false and character.actionDown == false then + quad.bola = require 'stand' + end + end + motion(character.bola, metaSprites.bola, dt) + + gravity = function(character, dt) + if character.jump.velocity ~= 0 then + character.jump.isJumping = true + character.position.y = character.position.y + (character.jump.velocity * dt) + character.jump.velocity = character.jump.velocity - (character.gravity * dt) + end + + if character.position.y > character.jump.ground then + character.jump.velocity = 0 + character.position.y = character.jump.ground + character.jump.higher = character.jump.higherMax + + character.jump.limitButtonJump = false + character.jump.isJumping = false + character.actionA = false + + if love.keyboard.isScancodeDown(button.up) then + character.actionUp = true + elseif love.keyboard.isScancodeDown(button.down) then + character.actionDown = true + end + end + end + gravity(character.bola, dt) + + limit = function(character, dt) + if character.position.x <= character.origin.x then + character.position.x = character.origin.x + elseif character.position.x >= windowProfile.mode.width - character.origin.x then + character.position.x = windowProfile.mode.width - character.origin.x + end + + if character.position.y <= character.origin.y then + character.position.y = character.origin.y + elseif character.position.y >= windowProfile.mode.height - character.origin.y then + character.position.y = windowProfile.mode.height - character.origin.y + end + end + limit(character.bola, dt) end function love.draw() - main.draw() + local currentTime = love.timer.getTime() + if nextTime <= currentTime then + nextTime = currentTime + return + end + love.timer.sleep(nextTime - currentTime) + + love.graphics.scale(windowProfile.scale.x, windowProfile.scale.y) + + love.graphics.print('FPS: ' .. love.timer.getFPS(), 0, 0) + + draw = function(metaSprites, character) + love.graphics.draw( + metaSprites.image, + metaSprites.quad, + character.position.x, + character.position.y, + character.orientation, + character.scale.x, + character.scale.y, + character.origin.x, + character.origin.y + ) + end + draw(metaSprites.bola, character.bola) end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua deleted file mode 100644 index 9f148f8..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua +++ /dev/null @@ -1,11 +0,0 @@ -require 'scripts.draw.fps' -require 'scripts.draw.scale' -require 'scripts.draw.printFPS' -require 'scripts.game.draw' - -main.draw = function() - draw.fps() - draw.scale() - draw.printFPS() - draw.player1 = game.draw(metaSprites.bola, character.bola) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua deleted file mode 100644 index efb2652..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua +++ /dev/null @@ -1,8 +0,0 @@ -draw.fps = function() - local currentTime = love.timer.getTime() - if nextTime <= currentTime then - nextTime = currentTime - return - end - love.timer.sleep(nextTime - currentTime) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/printFPS.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/printFPS.lua deleted file mode 100644 index 774deb4..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/printFPS.lua +++ /dev/null @@ -1,3 +0,0 @@ -draw.printFPS = function() - love.graphics.print('FPS: ' .. love.timer.getFPS(), 0, 0) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/scale.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/scale.lua deleted file mode 100644 index 3e6f2e6..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/scale.lua +++ /dev/null @@ -1,3 +0,0 @@ -draw.scale = function() - love.graphics.scale(windowProfile.scale.x, windowProfile.scale.y) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/animation.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/animation.lua deleted file mode 100644 index 655d1a4..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/animation.lua +++ /dev/null @@ -1,48 +0,0 @@ -game.animation = function(character, dt) - local frameStart = function() - character.currentFrame = 1 - end - local frameCounter = function() - character.currentFrame = character.currentFrame + 1 - end - local animationStart = function() - character.elapsedTime = character.elapsedTime + dt - end - local animationCounter = function(value) - if character.elapsedTime >= (1 / character.fps) then - character.elapsedTime = character.elapsedTime - (1 / character.fps) - if character.currentFrame == # character then - frameStart() - if value == 'start' then - loopCounter = 1 - elseif value == 'counter' then - loopCounter = loopCounter + 1 - end - else - frameCounter() - end - end - end - local animationEnd = function() - character.elapsedTime = 0 - end - - if type(character.loop) == 'number' and character.loop > 0 then - if loopCounter == nil then - animationStart() - animationCounter('start') - elseif loopCounter < character.loop then - animationStart() - animationCounter('counter') - else - animationEnd() - frameStart() - end - elseif character.loop == 0 or character.loop == false then - animationEnd() - frameStart() - elseif character.loop == -1 or character.loop == true then - animationStart() - animationCounter() - end -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua deleted file mode 100644 index 0e0b603..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua +++ /dev/null @@ -1,13 +0,0 @@ -game.draw = function(metaSprites, character) - love.graphics.draw( - metaSprites.image, - metaSprites.quad, - character.position.x, - character.position.y, - character.orientation, - character.scale.x, - character.scale.y, - character.origin.x, - character.origin.y - ) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/gravity.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/gravity.lua deleted file mode 100644 index 42fd2d9..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/gravity.lua +++ /dev/null @@ -1,23 +0,0 @@ -game.gravity = function(character, dt) - if character.jump.velocity ~= 0 then - character.jump.isJumping = true - character.position.y = character.position.y + (character.jump.velocity * dt) - character.jump.velocity = character.jump.velocity - (character.gravity * dt) - end - - if character.position.y > character.jump.ground then - character.jump.velocity = 0 - character.position.y = character.jump.ground - character.jump.higher = character.jump.higherMax - - character.jump.limitButtonJump = false - character.jump.isJumping = false - character.actionA = false - - if love.keyboard.isScancodeDown(button.up) then - character.actionUp = true - elseif love.keyboard.isScancodeDown(button.down) then - character.actionDown = true - end - end -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/keypressed.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/keypressed.lua deleted file mode 100644 index 1035b05..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/keypressed.lua +++ /dev/null @@ -1,29 +0,0 @@ -game.keypressed = function(character, key, scancode, isrepeat) - isrepeat = true - - if scancode == button.quit then - love.event.quit() - end - - if scancode == button.a then - character.actionA = true - character.actionDown = false - character.actionUp = false - end - - if scancode == button.left then - character.actionLeft = true - end - - if scancode == button.right then - character.actionRight = true - end - - if scancode == button.up and character.jump.isJumping == false then - character.actionUp = true - end - - if scancode == button.down and character.jump.isJumping == false then - character.actionDown = true - end -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/keyreleased.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/keyreleased.lua deleted file mode 100644 index fef6cf2..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/keyreleased.lua +++ /dev/null @@ -1,33 +0,0 @@ -game.keyreleased = function(character, key, scancode) - if scancode == button.a then - character.actionA = false - end - - if scancode == button.left then - character.actionLeft = false - end - - if scancode == button.right then - character.actionRight = false - end - - if scancode == button.up then - character.actionUp = false - end - - if scancode == button.down then - character.actionDown = false - end - - if scancode == button.b then - character.actionB = false - end - - if scancode == button.a then - character.actionA = false - - if character.jump.velocity ~= 0 then - character.jump.limitButtonJump = true - end - end -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/limit.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/limit.lua deleted file mode 100644 index 4cd94f2..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/limit.lua +++ /dev/null @@ -1,13 +0,0 @@ -game.limit = function(character, dt) - if character.position.x <= character.origin.x then - character.position.x = character.origin.x - elseif character.position.x >= windowProfile.mode.width - character.origin.x then - character.position.x = windowProfile.mode.width - character.origin.x - end - - if character.position.y <= character.origin.y then - character.position.y = character.origin.y - elseif character.position.y >= windowProfile.mode.height - character.origin.y then - character.position.y = windowProfile.mode.height - character.origin.y - end -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua deleted file mode 100644 index c43db43..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua +++ /dev/null @@ -1,68 +0,0 @@ -require 'scripts.game.animation' - -game.motion = function(metaSprites, character, dt) - game.animation(character.stand, dt) - metaSprites.quad = character.stand[character.stand.currentFrame] - - if character.jump.higher > 0 and character.actionA == true then - if character.jump.limitButtonJump == false then ---[[ - game.animation(character.jump, dt) - metaSprites.quad = character.jump[character.jump.currentFrame] -]] - - character.jump.higher = character.jump.higher - dt - character.jump.velocity = character.jump.velocity + character.jump.height * (dt / character.jump.higherMax) - end - end - - if character.actionLeft == true and character.actionRight == false then - if character.actionUp == false and character.actionDown == false then - game.animation(character.walk, dt) - metaSprites.quad = character.walk[character.walk.currentFrame] - end - - character.position.x = character.position.x - (character.velocity * dt) - character.scale.x = -1 - end - - if character.actionRight == true and character.actionLeft == false then - if character.actionUp == false and character.actionDown == false then - game.animation(character.walk, dt) - metaSprites.quad = character.walk[character.walk.currentFrame] - end - - character.position.x = character.position.x + (character.velocity * dt) - character.scale.x = 1 - end - - if character.actionLeft == true and character.actionRight == true then - game.animation(character.stand, dt) - metaSprites.quad = character.stand[character.stand.currentFrame] - end - - if character.actionUp == true and character.actionDown == false then - game.animation(character.walk, dt) - metaSprites.quad = character.walk[character.walk.currentFrame] - - character.position.y = character.position.y - (character.velocity * dt) - character.jump.ground = character.position.y - end - - if character.actionDown == true and character.actionUp == false then - game.animation(character.walk, dt) - metaSprites.quad = character.walk[character.walk.currentFrame] - - character.position.y = character.position.y + (character.velocity * dt) - character.jump.ground = character.position.y - end - - if character.actionUp == true and character.actionDown == true then - game.animation(character.stand, dt) - metaSprites.quad = character.stand[character.stand.currentFrame] - if character.actionLeft == true then - end - if character.actionRight == true then - end - end -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua deleted file mode 100644 index f61d64e..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua +++ /dev/null @@ -1,5 +0,0 @@ -require 'scripts.game.keypressed' - -main.keypressed = function(key, scancode, isrepeat) - game.keypressed(character.bola, key, scancode, isrepeat) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua deleted file mode 100644 index 694f81d..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua +++ /dev/null @@ -1,5 +0,0 @@ -require 'scripts.game.keyreleased' - -main.keyreleased = function(key, scancode) - game.keyreleased(character.bola, key, scancode) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button/default.lua deleted file mode 100644 index dafde7a..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button/default.lua +++ /dev/null @@ -1,3 +0,0 @@ -load.button = function() - button = require 'scripts.load.button.player1' -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button/player1.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button/player1.lua deleted file mode 100644 index 2875f74..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button/player1.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - left = 'a', - right = 'd', - up = 'w', - down = 's', - a = 'j', - b = 'k', - select = 'g', - start = 'h', - quit = 'escape', -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/default.lua deleted file mode 100644 index ce9f92d..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/default.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - orientation = 0, - acceleration = 0, - velocity = 125, - gravity = -500, - position = require 'scripts.load.character.bola.position', - scale = require 'scripts.load.character.bola.scale', - origin = require 'scripts.load.character.bola.origin', - stand = require 'scripts.load.character.bola.stand', - walk = require 'scripts.load.character.bola.walk', - run = require 'scripts.load.character.bola.run', - jump = require 'scripts.load.character.bola.jump', - actionLeft = false, - actionRight = false, - actionUp = false, - actionDown = false, - actionA = false, - actionB = false, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/fall.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/fall.lua deleted file mode 100644 index 6f3a948..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/fall.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - love.graphics.newQuad(metaSprites.bola.x * 9, metaSprites.bola.y * 2, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - start = 1, - fps = 9, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/origin.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/origin.lua deleted file mode 100644 index b84ffb5..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/origin.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - x = metaSprites.bola.x / 2, - y = metaSprites.bola.y / 2, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/position.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/position.lua deleted file mode 100644 index fc4a1a9..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/position.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - x = windowProfile.mode.width / 2, - y = windowProfile.mode.height / 2, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/postJump.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/postJump.lua deleted file mode 100644 index 25dd237..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/postJump.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - love.graphics.newQuad(metaSprites.bola.x * 6, metaSprites.bola.y * 2, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 7, metaSprites.bola.y * 2, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 8, metaSprites.bola.y * 2, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - start = 1, - fps = 9, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/previousJump.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/previousJump.lua deleted file mode 100644 index cb3a8fa..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/previousJump.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - love.graphics.newQuad(metaSprites.bola.x * 5, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 6, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 7, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 8, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 9, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - start = 1, - fps = 9, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/run.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/run.lua deleted file mode 100644 index f3b5f76..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/run.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - love.graphics.newQuad(metaSprites.bola.x * 0, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 1, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 2, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 1, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 0, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 3, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 4, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - love.graphics.newQuad(metaSprites.bola.x * 3, metaSprites.bola.y * 1, metaSprites.bola.x, metaSprites.bola.y, metaSprites.bola.image:getDimensions()), - start = 1, - fps = 12, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/scale.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/scale.lua deleted file mode 100644 index fefc961..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/scale.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - x = 1, - y = 1, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/default.lua deleted file mode 100644 index 2599f0b..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/default.lua +++ /dev/null @@ -1,3 +0,0 @@ -load.character = function() - character.bola = require 'scripts.load.character.bola.default' -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/default.lua deleted file mode 100644 index 92e5502..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/default.lua +++ /dev/null @@ -1,17 +0,0 @@ -require 'scripts.load.fps' -require 'scripts.load.window_profile' -require 'scripts.load.graphics' -require 'scripts.load.window' -require 'scripts.load.button.default' -require 'scripts.load.meta_sprites.default' -require 'scripts.load.character.default' - -main.load = function() - load.fps() - load.windowProfile() - load.graphics() - load.window() - load.button() - load.metaSprites() - load.character() -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/fps.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/fps.lua deleted file mode 100644 index 33f7c8d..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/fps.lua +++ /dev/null @@ -1,5 +0,0 @@ -load.fps = function() - fps = 30 - upTime = love.timer.getTime() - nextTime = upTime -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics.lua deleted file mode 100644 index 3f78ca6..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics.lua +++ /dev/null @@ -1,4 +0,0 @@ -load.graphics = function() - love.graphics.setBackgroundColor(0, 232, 216) - love.graphics.setDefaultFilter('nearest', 'nearest') -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/mali400.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/mali400.lua deleted file mode 120000 index b8a03d5..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/mali400.lua +++ /dev/null @@ -1 +0,0 @@ -../../../../hardware_data/scripts/load/graphics/mali400.lua
\ No newline at end of file diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/ppu_rp2c02.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/ppu_rp2c02.lua deleted file mode 120000 index ff1f87a..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/ppu_rp2c02.lua +++ /dev/null @@ -1 +0,0 @@ -../../../../hardware_data/scripts/load/graphics/ppu_rp2c02.lua
\ No newline at end of file diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/s-ppux_5c7x-0x_mode1.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/s-ppux_5c7x-0x_mode1.lua deleted file mode 120000 index 1c3f176..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/s-ppux_5c7x-0x_mode1.lua +++ /dev/null @@ -1 +0,0 @@ -../../../../hardware_data/scripts/load/graphics/s-ppux_5c7x-0x_mode1.lua
\ No newline at end of file diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/s-ppux_5c7x-0x_mode7.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/s-ppux_5c7x-0x_mode7.lua deleted file mode 120000 index fb45967..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics/s-ppux_5c7x-0x_mode7.lua +++ /dev/null @@ -1 +0,0 @@ -../../../../hardware_data/scripts/load/graphics/s-ppux_5c7x-0x_mode7.lua
\ No newline at end of file diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/bola.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/bola.lua deleted file mode 100644 index 58e4fa6..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/bola.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - image = love.graphics.newImage('multimedia/ppu_rp2c0x/meta_sprites/bola/default_sheet_color0_alpha.png'), - x = 24, - y = 32, -} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/default.lua deleted file mode 100644 index a57a85b..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/default.lua +++ /dev/null @@ -1,5 +0,0 @@ -load.metaSprites = function() - metaSprites = { - bola = require 'scripts.load.meta_sprites.bola', - } -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window.lua deleted file mode 100644 index eed886e..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window.lua +++ /dev/null @@ -1,4 +0,0 @@ -load.window = function() - love.window.setMode(windowProfile.mode.width * windowProfile.scale.x, windowProfile.mode.height * windowProfile.scale.y) - love.window.setTitle(windowProfile.title) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window_profile.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window_profile.lua deleted file mode 100644 index c336b79..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window_profile.lua +++ /dev/null @@ -1,13 +0,0 @@ -load.windowProfile = function() - windowProfile = { - mode = { - width = 256, - height = 240, - }, - scale = { - x = 2, - y = 2, - }, - title = "GNU & Bola - The libre beat'em up game", - } -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/tables.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/tables.lua deleted file mode 100644 index 914a45f..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/tables.lua +++ /dev/null @@ -1,6 +0,0 @@ -main = {} -game = {} -load = {} -update = {} -draw = {} -character = {} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/default.lua deleted file mode 100644 index 9593a45..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/default.lua +++ /dev/null @@ -1,11 +0,0 @@ -require 'scripts.update.fps' -require 'scripts.game.motion' -require 'scripts.game.gravity' -require 'scripts.game.limit' - -main.update = function(dt) - update.fps() - game.motion(metaSprites.bola, character.bola, dt) - game.gravity(character.bola, dt) - game.limit(character.bola, dt) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/fps.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/fps.lua deleted file mode 100644 index f446902..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/fps.lua +++ /dev/null @@ -1,3 +0,0 @@ -update.fps = function() - nextTime = nextTime + (1 / fps) -end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/stand.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/stand.lua index eb5c68a..d71d935 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/stand.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/stand.lua @@ -69,6 +69,4 @@ return { currentFrame = 1, elapsedTime = 0, fps = 9, - loop = true, - restart = true, } diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/walk.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/walk.lua index df7d396..0633457 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/walk.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/walk.lua @@ -10,6 +10,4 @@ return { currentFrame = 1, elapsedTime = 0, fps = 9, - loop = true, - restart = true, } |