From f255905c739aa3ff56a48e7788f744b56c839fb6 Mon Sep 17 00:00:00 2001 From: Tiberiu Chibici Date: Fri, 2 Dec 2016 20:29:40 +0200 Subject: [PATCH] Implemented many things. Refactored parsers. Added some behaviors and items. Added weapons. --- .cproject | 8 +- assets/items/Tools.items | 17 + assets/items/Weapons.items | 28 ++ assets/items/lvl1_sword.item | 15 - assets/items/stone_pickaxe.item | 16 - assets/scenes/Game.scene | 50 +-- assets/sprites/items/Lvl1Sword.sprite | 10 + assets/sprites/items/Lvl2Sword.sprite | 11 + assets/sprites/items/lvl1_sword.sprite | 36 -- assets/sprites/items/sword.png | Bin 0 -> 284 bytes assets_original/sword.xcf | Bin 0 -> 1447 bytes build/prepareAssets.py | 1 + src/GameState.cpp | 3 +- src/GameState.h | 12 +- src/base/Camera.cpp | 23 +- src/base/Camera.h | 6 +- src/base/Component.cpp | 8 + src/base/Component.h | 11 +- src/base/GameObject.cpp | 155 ++++++- src/base/GameObject.h | 72 +++- src/base/ICloneable.h | 27 ++ src/base/INonAssignable.h | 28 ++ src/base/RenderContext.cpp | 7 + src/base/RenderContext.h | 3 + src/base/Transform.cpp | 78 ++++ src/base/Transform.h | 24 +- src/controller/DebugController.cpp | 16 + src/controller/DebugController.h | 3 + src/controller/FarmlandsGame.cpp | 1 + src/controller/GuiController.cpp | 21 +- src/controller/GuiController.h | 3 + src/controller/items/Giftable.cpp | 50 +++ src/controller/items/Giftable.h | 35 ++ src/controller/items/ItemController.cpp | 30 -- src/controller/items/ItemController.h | 30 -- src/controller/items/Weapon.cpp | 83 ++++ src/controller/items/Weapon.h | 53 +++ src/controller/player/PlayerController.cpp | 116 +++++- src/controller/player/PlayerController.h | 10 +- src/graphics/BackgroundRenderer.cpp | 14 + src/graphics/BackgroundRenderer.h | 3 + src/graphics/SpriteRenderer.cpp | 60 ++- src/graphics/SpriteRenderer.h | 3 + src/input/Input.cpp | 4 +- src/model/Background.cpp | 19 + src/model/Background.h | 3 + src/model/Item.h | 65 +++ src/{base => model}/Scene.h | 8 +- src/resources/ResourceInfo.h | 1 + src/resources/ResourceManager.cpp | 5 +- src/resources/Resources.g.h | 48 ++- src/storage/Parse.h | 74 ++++ src/storage/Parsers.cpp | 385 ++++++++++++++++++ src/storage/Parsers.h | 90 +++- src/storage/parsers/ParseComponents_base.cpp | 39 -- src/storage/parsers/ParseComponents_base.h | 27 -- .../parsers/ParseComponents_controller.cpp | 36 -- .../parsers/ParseComponents_controller.h | 27 -- .../parsers/ParseComponents_graphics.cpp | 42 -- .../parsers/ParseComponents_graphics.h | 27 -- src/storage/parsers/ParseComponents_model.cpp | 92 ----- src/storage/parsers/ParseComponents_model.h | 27 -- src/storage/parsers/ParseConfiguration.cpp | 30 -- src/storage/parsers/ParseConfiguration.h | 23 -- src/storage/parsers/ParseGameObject.cpp | 61 --- src/storage/parsers/ParseGameObject.h | 30 -- src/storage/parsers/ParseScene.cpp | 39 -- src/storage/parsers/ParseScene.h | 27 -- src/storage/parsers/ParseSprite.cpp | 84 ---- src/storage/parsers/ParseSprite.h | 29 -- 70 files changed, 1614 insertions(+), 908 deletions(-) create mode 100644 assets/items/Tools.items create mode 100644 assets/items/Weapons.items delete mode 100644 assets/items/lvl1_sword.item delete mode 100644 assets/items/stone_pickaxe.item create mode 100644 assets/sprites/items/Lvl1Sword.sprite create mode 100644 assets/sprites/items/Lvl2Sword.sprite delete mode 100644 assets/sprites/items/lvl1_sword.sprite create mode 100644 assets/sprites/items/sword.png create mode 100644 assets_original/sword.xcf create mode 100644 src/base/ICloneable.h create mode 100644 src/base/INonAssignable.h create mode 100644 src/base/Transform.cpp create mode 100644 src/controller/items/Giftable.cpp create mode 100644 src/controller/items/Giftable.h delete mode 100644 src/controller/items/ItemController.cpp delete mode 100644 src/controller/items/ItemController.h create mode 100644 src/controller/items/Weapon.cpp create mode 100644 src/controller/items/Weapon.h create mode 100644 src/model/Item.h rename src/{base => model}/Scene.h (72%) create mode 100644 src/storage/Parsers.cpp delete mode 100644 src/storage/parsers/ParseComponents_base.cpp delete mode 100644 src/storage/parsers/ParseComponents_base.h delete mode 100644 src/storage/parsers/ParseComponents_controller.cpp delete mode 100644 src/storage/parsers/ParseComponents_controller.h delete mode 100644 src/storage/parsers/ParseComponents_graphics.cpp delete mode 100644 src/storage/parsers/ParseComponents_graphics.h delete mode 100644 src/storage/parsers/ParseComponents_model.cpp delete mode 100644 src/storage/parsers/ParseComponents_model.h delete mode 100644 src/storage/parsers/ParseConfiguration.cpp delete mode 100644 src/storage/parsers/ParseConfiguration.h delete mode 100644 src/storage/parsers/ParseGameObject.cpp delete mode 100644 src/storage/parsers/ParseGameObject.h delete mode 100644 src/storage/parsers/ParseScene.cpp delete mode 100644 src/storage/parsers/ParseScene.h delete mode 100644 src/storage/parsers/ParseSprite.cpp delete mode 100644 src/storage/parsers/ParseSprite.h diff --git a/.cproject b/.cproject index 21efad7..3ff248b 100644 --- a/.cproject +++ b/.cproject @@ -16,7 +16,7 @@ - +