Ver código fonte

Reworked names of files and directories

igorbat99 6 anos atrás
pai
commit
2100e34b89

+ 2 - 0
assets/effects/README.md

@@ -0,0 +1,2 @@
+в файле effects.txt названия эффектов,
+в соответствующих папках файлы descr.txt, icon.png

+ 0 - 0
assets/skills/README.md → assets/spells/README.md


+ 0 - 0
assets/skills/melledamage/descr.txt → assets/spells/melledamage/descr.txt


+ 0 - 0
assets/skills/melledamage/icon.png → assets/spells/melledamage/icon.png


+ 0 - 0
assets/skills/melledamage/traits.txt → assets/spells/melledamage/traits.txt


+ 0 - 0
assets/skills/selfheal/descr.txt → assets/spells/selfheal/descr.txt


+ 0 - 0
assets/skills/selfheal/icon.png → assets/spells/selfheal/icon.png


+ 0 - 0
assets/skills/selfheal/traits.txt → assets/spells/selfheal/traits.txt


+ 0 - 0
assets/skills/skills.txt → assets/spells/spells.txt


+ 12 - 12
client.pro

@@ -88,9 +88,9 @@ SOURCES +=                                      \
     source/racemanager.cpp                      \
     source/soundengine.cpp                      \
                                                 \
-\    #source/effects/effect.cpp                   \
-\    #source/effects/melledamage.cpp              \
-\    #source/effects/selfheal.cpp                 \
+    source/effects/effect.cpp                   \
+    source/effects/melledamage.cpp              \
+    source/effects/selfheal.cpp                 \
                                                 \
     source/gui/guiscenemanager.cpp              \
     source/gui/scene.cpp                        \
@@ -100,9 +100,9 @@ SOURCES +=                                      \
     source/hotseatgame/gamemanager.cpp          \
     source/hotseatgame/unitsqueue.cpp           \
                                                 \
-\   #source/skills/spell.cpp                     \
-\   #source/skills/selfheal.cpp                  \
-\   #source/skills/melledamage.cpp               \
+    source/spells/spell.cpp                     \
+    source/spells/selfheal.cpp                  \
+    source/spells/melledamage.cpp               \
                                                 \
     source/units/mage.cpp                       \
     source/units/unit.cpp                       \
@@ -129,9 +129,9 @@ HEADERS +=                                      \
     include/racemanager.h                       \
     include/soundengine.h                       \
                                                 \
-\    #include/effects/effect.h                    \
-\    #include/effects/melledamage.h               \
-\    #include/effects/selfheal.h                  \
+    include/effects/effect.h                    \
+    include/effects/melledamage.h               \
+    include/effects/selfheal.h                  \
                                                 \
     include/gui/guiscenemanager.h               \
     include/gui/scene.h                         \
@@ -142,9 +142,9 @@ HEADERS +=                                      \
     include/hotseatgame/uniticon.h              \
     include/hotseatgame/unitsqueue.h            \
                                                 \
-\    #include/skills/melledamage.h                \
-\    #include/skills/selfheal.h                   \
-\    #include/skills/spell.h                      \
+    include/spells/melledamage.h                \
+    include/spells/selfheal.h                   \
+    include/spells/spell.h                      \
                                                 \
     include/units/mage.h                        \
     include/units/unit.h                        \

+ 1 - 1
include/effects/melledamage.h

@@ -8,7 +8,7 @@
 #include <cassert>
 #include "effects\effect.h"
 
-class melledamage : public Effect {
+class MelleDamage : public Effect {
     void OperateOnCell(Cell* cell);
     void OperateOnUnit(Unit* unit);
 };

+ 2 - 2
include/effects/selfheal.h

@@ -6,9 +6,9 @@
 #define GAME_CLIENT_SELFHEAL_H
 #pragma once
 #include <cassert>
-#include "effect\effect.h"
+#include "effects\effect.h"
 
-class selfheal : public Effect {
+class SelfHeal : public Effect {
     void OperateOnCell(Cell* cell);
     void OperateOnUnit(Unit* unit);
 };

+ 2 - 2
include/skills/melledamage.h → include/spells/melledamage.h

@@ -6,9 +6,9 @@
 #define GAME_CLIENT_MELLEDAMAGE_H
 #pragma once
 #include <cassert>
-#include "skills\spell.h"
+#include "spells\spell.h"
 
-class melledamage : public Spell {
+class MelleDamage : public Spell {
     void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom);
 };
 

+ 2 - 2
include/skills/selfheal.h → include/spells/selfheal.h

@@ -6,9 +6,9 @@
 #define GAME_CLIENT_SELFHEAL_H
 #pragma once
 #include <cassert>
-#include "skills\spell.h"
+#include "spells\spell.h"
 
-class selfheal : public Spell {
+class SelfHeal : public Spell {
     void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom);
 };
 

+ 1 - 1
include/skills/spell.h → include/spells/spell.h

@@ -10,7 +10,7 @@
 #include <vector>
 #include <list>
 //#include "AbstractFactory.h"
-#include "effect.h"
+#include "effects/effect.h"
 
 class Unit{
     std :: list <Effect> effectsOnUnit;

+ 3 - 3
source/effects/melledamage.cpp

@@ -8,12 +8,12 @@
 #include "units\unit.h"
 #include <string>
 
-void melledamage::OperateOnCell(Cell* cell){
+void MelleDamage::OperateOnCell(Cell* cell){
     throw std :: string("CAN'T TOUCH THIS");
 }
 
-void melledamage::OperateOnUnit(Unit* unit){
-    int temp = unit -> reduceIncomingDamage("p", count_);
+void MelleDamage::OperateOnUnit(Unit* unit){
+    //int temp = unit -> reduceIncomingDamage("p", count_);
     //unit ->setHealthPoints(unit -> getHealthPoints() - temp);
     //check_on_death
 }

+ 5 - 5
source/effects/selfheal.cpp

@@ -5,15 +5,15 @@
 
 #pragma once
 #include <cassert>
-#include "effect\selfdamage.h"
+#include "effects\selfheal.h"
 #include "units\unit.h"
 #include <string>
 
-void melledamage::OperateOnCell(Cell* cell){
+void SelfHeal::OperateOnCell(Cell* cell){
     throw std :: string("CAN'T TOUCH THIS")
 }
 
-void melledamage::OperateOnUnit(Unit* unit){
+void SelfHeal::OperateOnUnit(Unit* unit){
     unit.setHealthPoints(unit.getHealthPoints() + count_);
-    //check_on_death
-}
+    //check_on_is_it_max
+}

+ 1 - 1
source/main.cpp

@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
     QApplication a(argc, argv);
 
     QRect resolution = a.desktop()->screenGeometry(0);
-    if (resolution.width() <= 1024 || resolution.height() <= 768) {
+    if (resolution.width() < 1024 || resolution.height() < 768) {
         QMessageBox msg(QMessageBox::Critical, QString("Ошибка разрешения!")
                         , QString("Запуск игры при таком разрешении невозможен! "
                           "Минимальное разрешение экрана для корректной работы: 1024x768. Текущее разрешение: ")

+ 2 - 2
source/skills/melledamage.cpp → source/spells/melledamage.cpp

@@ -2,6 +2,6 @@
 // Created by IgorBat on 23.04.2018.
 //
 
-void melledamage::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
+void MelleDamage::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
     effects_[0] -> OperateOnUnit(whom);
-}
+}

+ 2 - 2
source/skills/selfheal.cpp → source/spells/selfheal.cpp

@@ -2,6 +2,6 @@
 // Created by IgorBat on 23.04.2018.
 //
 
-void selfheal::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
+void SelfHeal::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
     effects_[0] -> OperateOnUnit(who);
-}
+}

+ 1 - 1
source/skills/spell.cpp → source/spells/spell.cpp

@@ -3,7 +3,7 @@
 //
 
 #include "abstractfactory.h"
-#include "skills/spell.h"
+#include "spells/spell.h"
 
 #include <iostream>
 #include <algorithm>