Eiyeron Fulmincendii пре 9 година
родитељ
комит
3a319f5fe9
4 измењених фајлова са 7 додато и 9 уклоњено
  1. 1 1
      src/piaf/Archive.cpp
  2. 1 1
      src/render/Animator.cpp
  3. 5 5
      src/render/Camera.cpp
  4. 0 2
      src/render/Camera.h

+ 1 - 1
src/piaf/Archive.cpp

@@ -161,7 +161,7 @@ Archive::Archive(const char *filepath)
             read_big_endian_value<uint32_t>(&header_container[12]);
         char *file_entry_data = new char[24 * nb_files];
         fseek(file, 32, SEEK_SET);
-        if( fread(file_entry_data, sizeof(char), 24 * nb_files, file) < 24 * nb_files)
+        if (fread(file_entry_data, sizeof(char), 24 * nb_files, file) < 24 * nb_files)
         {
             throw PIAF::PIAFException("Can't read file entry data", __LINE__, filepath);
         }

+ 1 - 1
src/render/Animator.cpp

@@ -8,7 +8,7 @@ namespace
     unsigned get_animation_duration(const WalrusRPG::Animation &anim)
     {
         unsigned duration = 0;
-        for (unsigned index = 0; index < anim.stripe.size(); index++)
+        for (unsigned index = 0, end = anim.stripe.size(); index < end; index++)
         {
             duration += anim.stripe[index].duration;
         }

+ 5 - 5
src/render/Camera.cpp

@@ -7,7 +7,7 @@ using namespace WalrusRPG;
 using WalrusRPG::Input::Key;
 
 Camera::Camera(signed x, signed y)
-: x(x), y(y), render_area_width(320), render_area_height(240)
+    : x(x), y(y), render_area_width(320), render_area_height(240)
 {
 }
 
@@ -59,22 +59,22 @@ signed Camera::get_y() const
 
 void Camera::set_center_x(signed x)
 {
-    this->x = x - render_area_width/2;
+    this->x = x - render_area_width / 2;
 }
 
 signed Camera::get_center_x() const
 {
-    return this->x - render_area_height/2;
+    return this->x - render_area_height / 2;
 }
 
 void Camera::set_center_y(signed y)
 {
-    this->y = y - render_area_height/2;
+    this->y = y - render_area_height / 2;
 }
 
 signed Camera::get_center_y() const
 {
-    return this->y - render_area_height/2;
+    return this->y - render_area_height / 2;
 }
 
 

+ 0 - 2
src/render/Camera.h

@@ -5,7 +5,6 @@
 
 namespace WalrusRPG
 {
-
     class Camera
     {
       protected:
@@ -44,7 +43,6 @@ namespace WalrusRPG
 
         // Can you see me, senpai ? >.<
         bool is_visible(const WalrusRPG::Utils::Rect &object) const;
-
     };
 }