diff options
Diffstat (limited to 'src')
15 files changed, 33 insertions, 53 deletions
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..7920f28 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,9 +1,4 @@ -require 'scripts.tables' -require 'scripts.load.default' -require 'scripts.keypressed.default' -require 'scripts.keyreleased.default' -require 'scripts.update.default' -require 'scripts.draw.default' +require 'scripts.module.default' function love.load() main.load() 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 index 2a6250a..84112dc 100644 --- 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 @@ -1,10 +1,3 @@ -draw = {} - -require 'scripts.draw.fps' -require 'scripts.draw.scale' -require 'scripts.draw.printFPS' -require 'scripts.game.draw' - main.draw = function() draw.fps() draw.scale() diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/draw.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/draw.lua deleted file mode 100644 index 615fadd..0000000 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character/bola/draw.lua +++ /dev/null @@ -1,19 +0,0 @@ -local drawModule = {} - -function drawModule.motion() - game.draw = function(metaSprite, quad, character) - love.graphics.draw( - metaSprites.image, - quad, - character.position.x, - character.position.y, - character.orientation, - character.scale.x, - character.scale.y, - character.origin.x, - character.origin.y - ) - end -end - -return drawModule 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 index b34ba23..2599f0b 100644 --- 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 @@ -1,5 +1,3 @@ -character = {} - 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 index 45d5339..f4c19d3 100644 --- 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 @@ -1,13 +1,3 @@ -load = {} - -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() diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/default.lua new file mode 100644 index 0000000..3e16e2a --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/default.lua @@ -0,0 +1,7 @@ +require 'scripts.tables' +require 'scripts.module.game' +require 'scripts.module.load' +require 'scripts.module.keypressed' +require 'scripts.module.keyreleased' +require 'scripts.module.update' +require 'scripts.module.draw' diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/draw.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/draw.lua new file mode 100644 index 0000000..221825f --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/draw.lua @@ -0,0 +1,4 @@ +require 'scripts.draw.default' +require 'scripts.draw.fps' +require 'scripts.draw.scale' +require 'scripts.draw.printFPS' diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/game.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/game.lua new file mode 100644 index 0000000..7b46ba1 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/game.lua @@ -0,0 +1,2 @@ +require 'scripts.game.animation' +require 'scripts.game.draw' diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/keypressed.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/keypressed.lua new file mode 100644 index 0000000..d43466e --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/keypressed.lua @@ -0,0 +1 @@ +require 'scripts.keypressed.default' diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/keyreleased.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/keyreleased.lua new file mode 100644 index 0000000..839c6ff --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/keyreleased.lua @@ -0,0 +1 @@ +require 'scripts.keyreleased.default' diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/load.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/load.lua new file mode 100644 index 0000000..f0a78c2 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/load.lua @@ -0,0 +1,8 @@ +require 'scripts.load.default' +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' diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/update.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/update.lua new file mode 100644 index 0000000..4123173 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/module/update.lua @@ -0,0 +1,5 @@ +require 'scripts.update.default' +require 'scripts.update.fps' +require 'scripts.update.motion' +require 'scripts.update.gravity' +require 'scripts.update.limit' 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 index 44f3d6c..914a45f 100644 --- 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 @@ -1,2 +1,6 @@ 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 index e106f7d..877b60f 100644 --- 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 @@ -1,10 +1,3 @@ -update = {} - -require 'scripts.update.fps' -require 'scripts.update.motion' -require 'scripts.update.gravity' -require 'scripts.update.limit' - main.update = function(dt) update.fps() update.motion(dt) diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua index 6de1e63..34bd73d 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua @@ -1,5 +1,3 @@ -require 'scripts.game.animation' - update.motion = function(dt) game.animation(character.bola.stand, dt) metaSprites.bola.quad = character.bola.stand[character.bola.stand.currentFrame] |