diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-12-03 19:31:00 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-12-03 19:31:00 -0300 |
commit | 61207011c466bc9cd7d4f275d6befabee1b75ae7 (patch) | |
tree | 72613d0350f831ca1d37d1614ec138636a31dddf /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load | |
parent | ef5bce4721d1307200b1335565303a7832f77535 (diff) |
Keep the code more KISS - part 3
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load')
12 files changed, 321 insertions, 15 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button.lua new file mode 100644 index 0000000..b14e80b --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/button.lua @@ -0,0 +1,3 @@ +load.button = function() + button = require 'scripts.player.1.button' +end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character.lua new file mode 100644 index 0000000..bf1cc65 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/character.lua @@ -0,0 +1,5 @@ +character = {} + +load.character = function() + character.bola = require 'scripts.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 31b8f9b..e28d82b 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,18 +1,19 @@ -main.load = function() - fps = 30 - upTime = love.timer.getTime() - nextTime = upTime - windowProfile = require 'scripts.window.profile' - - 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) +load = {} - button = require 'scripts.player.1.button' - metaSprites = require 'scripts.meta_sprites' +require 'scripts.load.fps' +require 'scripts.load.window_profile' +require 'scripts.load.graphics' +require 'scripts.load.window' +require 'scripts.load.button' +require 'scripts.load.meta_sprites.default' +require 'scripts.load.character' - character = { - bola = require 'scripts.bola.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 new file mode 100644 index 0000000..33f7c8d --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/fps.lua @@ -0,0 +1,5 @@ +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/gpu/mali400.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/mali400.lua new file mode 100644 index 0000000..5570d82 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/mali400.lua @@ -0,0 +1,61 @@ +return { + screen = { + default = { + width = 1920, + height = 1080, + fps = 30 + origin = { + x = 0, + y = 0, + }, + }, + big = { + width = 3840, + height = 2160, + fps = 30 + origin = { + x = 0, + y = 0, + }, + }, + }, + api = 'opengl_es_2_0' + shader = { + true, + fragment = true, + }, + physic = true, + sprite = { + true, + layers = many, + limits = { + false, + screen = false, + line = false, + }, + size = { + default = { + width = 64, + height = 64, + }, + big = { + width = 128, + height = 128, + }, + }, + }, + tile = { + true, + layers = many, + size = { + default = { + width = 128, + height = 128, + }, + big = { + width = 256, + height = 256, + }, + }, + }, +} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/ppu_rp2c02.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/ppu_rp2c02.lua new file mode 100644 index 0000000..d60214d --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/ppu_rp2c02.lua @@ -0,0 +1,57 @@ +return { + screen = { + default = { + width = 256, + height = 224, + fps = 29.97 + origin = { + x = 0, + y = -8, + }, + }, + pal = { + width = 256, + height = 240, + fps = 25 + origin = { + x = 0, + y = 0, + }, + }, + }, + api = false, + shader = { + false, + fragment = false, + }, + physic = false, + sprite = { + true, + layers = 4, + limits = { + true, + screen = 64, + line = 8, + }, + size = { + default = { + width = 8, + height = 8, + }, + bigH = { + width = 8, + height = 16, + }, + }, + }, + tile = { + true, + layers = 4, + size = { + default = { + width = 16, + height = 16, + }, + }, + }, +} diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/s-ppux_5c7x-0x.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/s-ppux_5c7x-0x.lua new file mode 100644 index 0000000..928ee80 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/gpu/s-ppux_5c7x-0x.lua @@ -0,0 +1,143 @@ +return { + screen = { + default = { + width = 256, + height = 224, + fps = 29.97 + origin = { + x = 0, + y = 0, + }, + }, + pal = { + width = 256, + height = 240, + fps = 25 + origin = { + x = 0, + y = 0, + }, + }, + bigNTSC = { + width = 512, + height = 448, + fps = 29.97 + origin = { + x = 0, + y = 0, + }, + }, + bigPAL = { + width = 512, + height = 480, + fps = 25 + origin = { + x = 0, + y = 0, + }, + }, + }, + api = false, + shader = { + false, + fragment = false, + }, + physic = false, + sprite = { + true, + layers = 4, + limits = { + true, + screen = 128, + line = 34, + }, + size = { + small = { + width = 8, + height = 8, + }, + default = { + width = 16, + height = 16, + }, + defaultW = { + width = 16, + height = 8, + }, + defaultH = { + width = 8, + height = 16, + }, + big = { + width = 32, + height = 32, + }, + bigW = { + width = 32, + height = 16, + }, + bigH = { + width = 16, + height = 32, + }, + huge = { + width = 64, + height = 64, + }, + hugeW = { + width = 64, + height = 32, + }, + hugeH = { + width = 32, + height = 64, + }, + }, + }, + tile = { + true, + layers = 4, + size = { + tiny = { + width = 8, + height = 8, + }, + small = { + width = 16, + height = 16, + }, + smallW = { + width = 16, + height = 8, + }, + smallH = { + width = 8, + height = 16, + }, + default = { + width = 32, + height = 32, + }, + defaultW = { + width = 32, + height = 16, + }, + defaultH = { + width = 16, + height = 32, + }, + big = { + width = 64, + height = 64, + }, + bigW = { + width = 64, + height = 32, + }, + bigH = { + width = 32, + height = 64, + }, + }, + }, +} 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 new file mode 100644 index 0000000..3f78ca6 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/graphics.lua @@ -0,0 +1,4 @@ +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/meta_sprites/bola.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/bola.lua new file mode 100644 index 0000000..58e4fa6 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/bola.lua @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..a57a85b --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/meta_sprites/default.lua @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..eed886e --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window.lua @@ -0,0 +1,4 @@ +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 new file mode 100644 index 0000000..c336b79 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/load/window_profile.lua @@ -0,0 +1,13 @@ +load.windowProfile = function() + windowProfile = { + mode = { + width = 256, + height = 240, + }, + scale = { + x = 2, + y = 2, + }, + title = "GNU & Bola - The libre beat'em up game", + } +end |