From 8d21db47f1b1f26837409fbcab4ab94c0215ecb3 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 21 May 2014 11:21:27 +0200 Subject: [PATCH] put engine in own folder --- src/{ => engine}/animator.lua | 4 ++-- src/{ => engine}/controllers/gridwalker.lua | 4 ++-- src/{engine.lua => engine/init.lua} | 10 ++++++---- src/{ => engine}/libs/30log.lua | 0 src/{ => engine}/libs/anim8.lua | 0 src/{ => engine}/libs/hardoncollider/README | 0 src/{ => engine}/libs/hardoncollider/class.lua | 0 src/{ => engine}/libs/hardoncollider/gjk.lua | 0 src/{ => engine}/libs/hardoncollider/init.lua | 0 src/{ => engine}/libs/hardoncollider/polygon.lua | 0 src/{ => engine}/libs/hardoncollider/shapes.lua | 0 src/{ => engine}/libs/hardoncollider/spatialhash.lua | 0 src/{ => engine}/libs/hardoncollider/vector-light.lua | 0 src/{ => engine}/libs/sti.lua | 0 src/{ => engine}/object.lua | 0 src/{ => engine}/ui.lua | 0 src/main.lua | 2 -- src/objects/matty.lua | 4 ++-- src/objects/player.lua | 4 ++-- 19 files changed, 14 insertions(+), 14 deletions(-) rename src/{ => engine}/animator.lua (84%) rename src/{ => engine}/controllers/gridwalker.lua (96%) rename src/{engine.lua => engine/init.lua} (93%) rename src/{ => engine}/libs/30log.lua (100%) rename src/{ => engine}/libs/anim8.lua (100%) rename src/{ => engine}/libs/hardoncollider/README (100%) rename src/{ => engine}/libs/hardoncollider/class.lua (100%) rename src/{ => engine}/libs/hardoncollider/gjk.lua (100%) rename src/{ => engine}/libs/hardoncollider/init.lua (100%) rename src/{ => engine}/libs/hardoncollider/polygon.lua (100%) rename src/{ => engine}/libs/hardoncollider/shapes.lua (100%) rename src/{ => engine}/libs/hardoncollider/spatialhash.lua (100%) rename src/{ => engine}/libs/hardoncollider/vector-light.lua (100%) rename src/{ => engine}/libs/sti.lua (100%) rename src/{ => engine}/object.lua (100%) rename src/{ => engine}/ui.lua (100%) diff --git a/src/animator.lua b/src/engine/animator.lua similarity index 84% rename from src/animator.lua rename to src/engine/animator.lua index 2975dab..1a27e86 100644 --- a/src/animator.lua +++ b/src/engine/animator.lua @@ -1,5 +1,5 @@ -local anim8 = require 'libs/anim8' -local object = require 'object' +local anim8 = require 'engine/libs/anim8' +local object = require 'engine/object' Animator = class() diff --git a/src/controllers/gridwalker.lua b/src/engine/controllers/gridwalker.lua similarity index 96% rename from src/controllers/gridwalker.lua rename to src/engine/controllers/gridwalker.lua index fe66607..b533eb0 100644 --- a/src/controllers/gridwalker.lua +++ b/src/engine/controllers/gridwalker.lua @@ -1,5 +1,5 @@ -local object = require '../object' -local animator = require '../animator' +local object = require '../engine/object' +local animator = require '../engine/animator' Gridwalker = class() diff --git a/src/engine.lua b/src/engine/init.lua similarity index 93% rename from src/engine.lua rename to src/engine/init.lua index 210cef6..c09a8df 100644 --- a/src/engine.lua +++ b/src/engine/init.lua @@ -1,10 +1,12 @@ -local HC = require 'libs/hardoncollider' +class = require 'engine/libs/30log' + +local HC = require 'engine/libs/hardoncollider' -- has to come before the sti initialization so I can add the collision tiles collider = HC(100) -local sti = require "libs/sti" -local object = require "object" -local ui = require "ui" +local sti = require "engine/libs/sti" +local object = require "engine/object" +local ui = require "engine/ui" Engine = class() diff --git a/src/libs/30log.lua b/src/engine/libs/30log.lua similarity index 100% rename from src/libs/30log.lua rename to src/engine/libs/30log.lua diff --git a/src/libs/anim8.lua b/src/engine/libs/anim8.lua similarity index 100% rename from src/libs/anim8.lua rename to src/engine/libs/anim8.lua diff --git a/src/libs/hardoncollider/README b/src/engine/libs/hardoncollider/README similarity index 100% rename from src/libs/hardoncollider/README rename to src/engine/libs/hardoncollider/README diff --git a/src/libs/hardoncollider/class.lua b/src/engine/libs/hardoncollider/class.lua similarity index 100% rename from src/libs/hardoncollider/class.lua rename to src/engine/libs/hardoncollider/class.lua diff --git a/src/libs/hardoncollider/gjk.lua b/src/engine/libs/hardoncollider/gjk.lua similarity index 100% rename from src/libs/hardoncollider/gjk.lua rename to src/engine/libs/hardoncollider/gjk.lua diff --git a/src/libs/hardoncollider/init.lua b/src/engine/libs/hardoncollider/init.lua similarity index 100% rename from src/libs/hardoncollider/init.lua rename to src/engine/libs/hardoncollider/init.lua diff --git a/src/libs/hardoncollider/polygon.lua b/src/engine/libs/hardoncollider/polygon.lua similarity index 100% rename from src/libs/hardoncollider/polygon.lua rename to src/engine/libs/hardoncollider/polygon.lua diff --git a/src/libs/hardoncollider/shapes.lua b/src/engine/libs/hardoncollider/shapes.lua similarity index 100% rename from src/libs/hardoncollider/shapes.lua rename to src/engine/libs/hardoncollider/shapes.lua diff --git a/src/libs/hardoncollider/spatialhash.lua b/src/engine/libs/hardoncollider/spatialhash.lua similarity index 100% rename from src/libs/hardoncollider/spatialhash.lua rename to src/engine/libs/hardoncollider/spatialhash.lua diff --git a/src/libs/hardoncollider/vector-light.lua b/src/engine/libs/hardoncollider/vector-light.lua similarity index 100% rename from src/libs/hardoncollider/vector-light.lua rename to src/engine/libs/hardoncollider/vector-light.lua diff --git a/src/libs/sti.lua b/src/engine/libs/sti.lua similarity index 100% rename from src/libs/sti.lua rename to src/engine/libs/sti.lua diff --git a/src/object.lua b/src/engine/object.lua similarity index 100% rename from src/object.lua rename to src/engine/object.lua diff --git a/src/ui.lua b/src/engine/ui.lua similarity index 100% rename from src/ui.lua rename to src/engine/ui.lua diff --git a/src/main.lua b/src/main.lua index c2e9f0a..89e8951 100644 --- a/src/main.lua +++ b/src/main.lua @@ -1,5 +1,3 @@ -class = require 'libs/30log' - local engine = require 'engine' function love.load(arg) diff --git a/src/objects/matty.lua b/src/objects/matty.lua index 91ee30a..14fe409 100644 --- a/src/objects/matty.lua +++ b/src/objects/matty.lua @@ -1,5 +1,5 @@ -local object = require "../object" -local gridwalker = require "../controllers/gridwalker" +local object = require "engine/object" +local gridwalker = require "engine/controllers/gridwalker" return { spritesheet = "assets/characters/matty.png", diff --git a/src/objects/player.lua b/src/objects/player.lua index 3a60487..8e74849 100644 --- a/src/objects/player.lua +++ b/src/objects/player.lua @@ -1,5 +1,5 @@ -local object = require "../object" -local gridwalker = require "../controllers/gridwalker" +local object = require "engine/object" +local gridwalker = require "engine/controllers/gridwalker" return { spritesheet = "assets/characters/player.png",