Explorar o código

Dang, a rebase was a stupid move, wasn't it?

Eiyeron Fulmincendii %!s(int64=9) %!d(string=hai) anos
pai
achega
4eb2d3c0f5

+ 86 - 77
platform/3ds/Graphics.cpp

@@ -11,28 +11,29 @@ using namespace WalrusRPG; /*::Graphics*/
 using WalrusRPG::Graphics::Pixel;
 using WalrusRPG::Utils::Rect;
 
-sf2d_rendertarget* target = nullptr;
+sf2d_rendertarget *target = nullptr;
 
 inline u32 pixel2u32(const Pixel &pix)
 {
-  return RGBA8(pix.r<<3, pix.g<<2, pix.b<<3, 0xFF);
+    return RGBA8(pix.r << 3, pix.g << 2, pix.b << 3, 0xFF);
 }
 
-namespace {
-  constexpr int OFFSET_X = 40;
-  constexpr int OFFSET_Y = 0;
-  void set_scissor()
-  {
-    sf2d_set_scissor_test(GPU_SCISSOR_NORMAL, 80, 0, 320, 240);
-  }
+namespace
+{
+    constexpr int OFFSET_X = 40;
+    constexpr int OFFSET_Y = 0;
+    void set_scissor()
+    {
+        sf2d_set_scissor_test(GPU_SCISSOR_NORMAL, 80, 0, 320, 240);
+    }
 }
 
 void Graphics::init()
 {
     // Logger::log("Graphics init");
     sf2d_init();
-  	sf2d_set_clear_color(0);
-  	sf2d_set_3D(0);
+    sf2d_set_clear_color(0);
+    sf2d_set_3D(0);
     sf2d_set_vblank_wait(1);
     set_scissor();
 }
@@ -46,34 +47,39 @@ void Graphics::deinit()
 
 void Graphics::frame_begin()
 {
-  sf2d_start_frame(GFX_TOP, GFX_LEFT);
+    sf2d_start_frame(GFX_TOP, GFX_LEFT);
 }
 
 void Graphics::frame_end()
 {
-  sf2d_draw_rectangle(0, 0, OFFSET_X, 240, 0xFF000000);
-  sf2d_draw_rectangle(320+OFFSET_X, 0, OFFSET_X, 240, 0xFF000000);
-  sf2d_end_frame();
-  sf2d_swapbuffers();
+    sf2d_draw_rectangle(0, 0, OFFSET_X, 240, 0xFF000000);
+    sf2d_draw_rectangle(320 + OFFSET_X, 0, OFFSET_X, 240, 0xFF000000);
+    sf2d_end_frame();
+    sf2d_swapbuffers();
 }
 
 void Graphics::put_sprite(const Texture &sheet, int x, int y, const Rect &window)
 {
-    sf2d_draw_texture_part(sheet.data, x+OFFSET_X, y+OFFSET_Y, window.x, window.y, window.width, window.height);
+    sf2d_draw_texture_part(sheet.data, x + OFFSET_X, y + OFFSET_Y, window.x, window.y,
+                           window.width, window.height);
 }
 
 void Graphics::put_sprite_tint(const Texture &sheet, int x, int y, const Rect &window,
                                const Pixel &color)
 {
-  sf2d_draw_texture_part_blend(sheet.data, x+OFFSET_X, y+OFFSET_Y, window.x, window.y, window.width, window.height, pixel2u32(color));
+    sf2d_draw_texture_part_blend(sheet.data, x + OFFSET_X, y + OFFSET_Y, window.x,
+                                 window.y, window.width, window.height, pixel2u32(color));
 }
 
 void Graphics::put_sprite_clipping(const Texture &sheet, int x, int y,
                                    const Rect &sprite_window, const Rect &clipping_window)
 {
-  sf2d_set_scissor_test(GPU_SCISSOR_NORMAL, clipping_window.x+OFFSET_X, clipping_window.y+OFFSET_Y, clipping_window.width, clipping_window.height);
-  sf2d_draw_texture_part(sheet.data, x, y, sprite_window.x, sprite_window.y, sprite_window.width, sprite_window.height);
-  set_scissor();
+    sf2d_set_scissor_test(GPU_SCISSOR_NORMAL, clipping_window.x + OFFSET_X,
+                          clipping_window.y + OFFSET_Y, clipping_window.width,
+                          clipping_window.height);
+    sf2d_draw_texture_part(sheet.data, x, y, sprite_window.x, sprite_window.y,
+                           sprite_window.width, sprite_window.height);
+    set_scissor();
 }
 
 
@@ -84,76 +90,79 @@ void Graphics::fill(const Pixel &color)
 
 void Graphics::put_pixel(uint16_t x, uint16_t y, const Pixel &color)
 {
-  sf2d_set_pixel(&(target->texture), x+OFFSET_X, y+OFFSET_Y, pixel2u32(color));
+    sf2d_set_pixel(&(target->texture), x + OFFSET_X, y + OFFSET_Y, pixel2u32(color));
 }
 
 void Graphics::put_horizontal_line(uint16_t x, uint16_t x2, uint16_t y,
                                    const Pixel &color)
 {
-  // Because sf2dlib has issues with lines, let's port Nspire's functions.
-  if (x > x2)
-  {
-      uint16_t temp = x;
-      x = x2;
-      x2 = temp;
-  }
-  for (; x <= x2; x++)
-  {
-      put_pixel(x+OFFSET_X, y+OFFSET_Y, color);
-  }
+    // Because sf2dlib has issues with lines, let's port Nspire's functions.
+    if (x > x2)
+    {
+        uint16_t temp = x;
+        x = x2;
+        x2 = temp;
+    }
+    for (; x <= x2; x++)
+    {
+        put_pixel(x + OFFSET_X, y + OFFSET_Y, color);
+    }
 }
 
 void Graphics::put_vertical_line(uint16_t x, uint16_t y, uint16_t y2, const Pixel &color)
 {
-  // Because sf2dlib has issues with lines, let's port Nspire's functions.
-  if (y > y2)
-  {
-      uint16_t temp = y;
-      y = y2;
-      y2 = temp;
-  }
-  for (; y <= y2; y++)
-  {
-      put_pixel(x+OFFSET_X, y+OFFSET_Y, color);
-  }}
+    // Because sf2dlib has issues with lines, let's port Nspire's functions.
+    if (y > y2)
+    {
+        uint16_t temp = y;
+        y = y2;
+        y2 = temp;
+    }
+    for (; y <= y2; y++)
+    {
+        put_pixel(x + OFFSET_X, y + OFFSET_Y, color);
+    }
+}
 
 void Graphics::put_line(uint16_t x, uint16_t y, uint16_t x2, uint16_t y2,
                         const Pixel &color)
 {
-  // Because sf2dlib has issues with lines, let's port Nspire's functions.
-  if (x == x2)
-  {
-      put_vertical_line(x+OFFSET_X, y+OFFSET_Y, y2+OFFSET_Y, color);
-      return;
-  }
-  else if (y == y2)
-  {
-      put_horizontal_line(x+OFFSET_X, x2+OFFSET_X, y+OFFSET_Y, color);
-      return;
-  }
-  int dx = abs(x - x2), sx = x < x2 ? 1 : -1;
-  int dy = abs(y - y2), sy = y < y2 ? 1 : -1;
-  int err = (dx > dy ? dx : -dy) / 2, e2;
-
-  for (;;)
-  {
-      put_pixel(x+OFFSET_X, y+OFFSET_Y, color);
-      if (x == x2 && y == y2)
-          break;
-      e2 = err;
-      if (e2 > -dx)
-      {
-          err -= dy;
-          x += sx;
-      }
-      if (e2 < dy)
-      {
-          err += dx;
-          y += sy;
-      }
-  }}
+    // Because sf2dlib has issues with lines, let's port Nspire's functions.
+    if (x == x2)
+    {
+        put_vertical_line(x + OFFSET_X, y + OFFSET_Y, y2 + OFFSET_Y, color);
+        return;
+    }
+    else if (y == y2)
+    {
+        put_horizontal_line(x + OFFSET_X, x2 + OFFSET_X, y + OFFSET_Y, color);
+        return;
+    }
+    int dx = abs(x - x2), sx = x < x2 ? 1 : -1;
+    int dy = abs(y - y2), sy = y < y2 ? 1 : -1;
+    int err = (dx > dy ? dx : -dy) / 2, e2;
+
+    for (;;)
+    {
+        put_pixel(x + OFFSET_X, y + OFFSET_Y, color);
+        if (x == x2 && y == y2)
+            break;
+        e2 = err;
+        if (e2 > -dx)
+        {
+            err -= dy;
+            x += sx;
+        }
+        if (e2 < dy)
+        {
+            err += dx;
+            y += sy;
+        }
+    }
+}
 
 void Graphics::put_rectangle(const Rect &rect, const Pixel &color)
 {
-  sf2d_draw_rectangle(rect.x+OFFSET_X, rect.y+OFFSET_Y, rect.width, rect.height, pixel2u32(color));
+    sf2d_draw_rectangle(rect.x + OFFSET_X, rect.y + OFFSET_Y, rect.width, rect.height,
+                        pixel2u32(color));
 }

+ 2 - 3
platform/3ds/Logger.cpp

@@ -8,7 +8,7 @@ using namespace WalrusRPG;
 
 namespace
 {
-    PrintConsole* console;
+    PrintConsole *console;
     // TODO : Find a better name
     /**
      * Prints the timestamp and the message category/type.
@@ -27,12 +27,11 @@ namespace
 
 void Logger::init()
 {
-  console = consoleInit(GFX_BOTTOM, NULL);
+    console = consoleInit(GFX_BOTTOM, NULL);
 }
 
 void Logger::log(const char *fmt, ...)
 {
-
     print_premessage("  [LOG]");
     va_list args;
     va_start(args, fmt);

+ 28 - 26
platform/3ds/Quirks.cpp

@@ -8,50 +8,52 @@ using namespace WalrusRPG;
 
 void Quirks::init(const char *argv_0)
 {
-  WalrusRPG::Logger::log("Quirks init");
+    WalrusRPG::Logger::log("Quirks init");
 }
 
 void Quirks::deinit()
 {
-  WalrusRPG::Logger::log("Quirks deinit");
+    WalrusRPG::Logger::log("Quirks deinit");
 }
 
 std::unique_ptr<char> Quirks::solve_absolute_path(const char *path)
 {
-  std::unique_ptr<char> result(new char[strlen(path) + 1]);
-  strcpy(result.get(), path);
-  return result;
+    std::unique_ptr<char> result(new char[strlen(path) + 1]);
+    strcpy(result.get(), path);
+    return result;
 }
 
 bool Quirks::get_key(keycode_t key)
 {
-  return hidKeysDown() & key;
+    return hidKeysDown() & key;
 }
 
-
 #include <stdlib.h>
-#include <unistd.h>  /* for write(), also available on Windows */
-extern "C" void* emulate_cc_new(unsigned len) { \
-  void *p = malloc(len);
-  if (p == 0) {
-    /* Don't use stdio (e.g. fputs), because that may want to allocate more
-     * memory.
-     */
-    (void)!write(2, "out of memory\n", 14);
-    abort();
-  }
-  return p;
+#include <unistd.h> /* for write(), also available on Windows */
+extern "C" void *emulate_cc_new(unsigned len)
+{
+    void *p = malloc(len);
+    if (p == 0)
+    {
+        /* Don't use stdio (e.g. fputs), because that may want to allocate more
+         * memory.
+         */
+        (void) !write(2, "out of memory\n", 14);
+        abort();
+    }
+    return p;
 }
-extern "C" void emulate_cc_delete(void* p) {
-  if (p != 0)
-    free(p);
+extern "C" void emulate_cc_delete(void *p)
+{
+    if (p != 0)
+        free(p);
 }
-void* operator new  (unsigned len) __attribute__((alias("emulate_cc_new")));
-void* operator new[](unsigned len) __attribute__((alias("emulate_cc_new")));
-void  operator delete  (void* p)   __attribute__((alias("emulate_cc_delete")));
-void  operator delete[](void* p)   __attribute__((alias("emulate_cc_delete")));
+void *operator new(unsigned len) __attribute__((alias("emulate_cc_new")));
+void *operator new[](unsigned len) __attribute__((alias("emulate_cc_new")));
+void operator delete(void *p) __attribute__((alias("emulate_cc_delete")));
+void operator delete[](void *p) __attribute__((alias("emulate_cc_delete")));
 
 extern "C" void __cxa_pure_virtual()
 {
-  //while (1);
+    // while (1);
 }

+ 4 - 4
platform/3ds/Status.cpp

@@ -24,10 +24,10 @@ void Status::deinit()
 
 void Status::update()
 {
-  if(!aptMainLoop())
-    askedToQuit = true;
-  if(Quirks::get_key(KEY_ZL))
-    askedToQuit = true;
+    if (!aptMainLoop())
+        askedToQuit = true;
+    if (Quirks::get_key(KEY_ZL))
+        askedToQuit = true;
 }
 
 bool Status::mustQuit()

+ 14 - 13
platform/3ds/Texture.cpp

@@ -18,37 +18,38 @@ using WalrusRPG::Utils::Rect;
 Texture::Texture(char *data) : data()
 {
     uint16_t *data_16 = (uint16_t *) data;
-    this->data = sf2d_create_texture(data_16[0], data_16[1], TEXFMT_RGB565, SF2D_PLACE_VRAM);
-    memcpy(this->data->data, &data_16[3], data_16[0]*data_16[1]*sizeof(uint16_t));
+    this->data =
+        sf2d_create_texture(data_16[0], data_16[1], TEXFMT_RGB565, SF2D_PLACE_VRAM);
+    memcpy(this->data->data, &data_16[3], data_16[0] * data_16[1] * sizeof(uint16_t));
 }
 
 Texture::Texture(WalrusRPG::PIAF::File entry)
 {
-  unsigned char *pic;
-  unsigned width, height;
+    unsigned char *pic;
+    unsigned width, height;
 
-  signed result =
-  lodepng_decode32(&pic, &width, &height, (unsigned char *) entry.get(),
-  entry.file_size);
+    signed result = lodepng_decode32(&pic, &width, &height, (unsigned char *) entry.get(),
+                                     entry.file_size);
 
-  data = sf2d_create_texture_mem_RGBA8(pic, width, height, TEXFMT_RGBA8, SF2D_PLACE_RAM);
+    data =
+        sf2d_create_texture_mem_RGBA8(pic, width, height, TEXFMT_RGBA8, SF2D_PLACE_RAM);
 
-  Logger::debug("Ready : %p", data);
-  free(pic);
+    Logger::debug("Ready : %p", data);
+    free(pic);
 }
 
 Texture::~Texture()
 {
-  sf2d_free_texture(data);
+    sf2d_free_texture(data);
 }
 
 const Rect Texture::get_dimensions()
 {
-  return {0, 0, data->width, data->height};
+    return {0, 0, data->width, data->height};
 }
 
 const Pixel Texture::get_pixel(unsigned x, unsigned y)
 {
-  u32 pixel = sf2d_get_pixel(data, x, y);
+    u32 pixel = sf2d_get_pixel(data, x, y);
     return Pixel(RGBA8_GET_R(pixel), RGBA8_GET_G(pixel), RGBA8_GET_B(pixel));
 }

+ 1 - 1
platform/3ds/Timing.cpp

@@ -16,5 +16,5 @@ void Timing::deinit()
 
 unsigned Timing::gettime()
 {
-  return 1;
+    return 1;
 }

+ 1 - 1
platform/3ds/public/platform.h

@@ -7,7 +7,7 @@
 
 #define TIMER_FREQ 32768
 
-typedef sf2d_texture* texture_data_t;
+typedef sf2d_texture *texture_data_t;
 typedef unsigned keycode_t;
 
 #endif

+ 24 - 24
src/input/Input.cpp

@@ -45,11 +45,11 @@ static InputMap key_map[] = {
 #endif
 #ifdef TARGET_3DS
 static InputMap key_map[] = {
-    {Key::K_A, KEY_A},    {Key::K_B, KEY_B},
-    {Key::K_L, KEY_L},     {Key::K_R, KEY_R},
+    {Key::K_A, KEY_A},         {Key::K_B, KEY_B},
+    {Key::K_L, KEY_L},         {Key::K_R, KEY_R},
 
-    {Key::K_UP, KEY_UP},      {Key::K_DOWN, KEY_DOWN},
-    {Key::K_LEFT, KEY_LEFT},    {Key::K_RIGHT, KEY_RIGHT},
+    {Key::K_UP, KEY_UP},       {Key::K_DOWN, KEY_DOWN},
+    {Key::K_LEFT, KEY_LEFT},   {Key::K_RIGHT, KEY_RIGHT},
 
     {Key::K_START, KEY_START}, {Key::K_SELECT, KEY_SELECT},
 };
@@ -76,50 +76,50 @@ KeyState Input::key_get_state(Key key)
 
 void Input::key_poll()
 {
-  #ifdef TARGET_3DS
+#ifdef TARGET_3DS
     hidScanInput();
     kDown = hidKeysDown();
     kHeld = hidKeysHeld();
     kUp = hidKeysUp();
-  #else
-  for (unsigned i = 0; i < K_SIZE; i++)
-  {
-      key_states[i].previous = key_states[i].current;
-      key_states[i].current = WalrusRPG::Quirks::get_key(key_map[i].key_code);
-  }
-  #endif
+#else
+    for (unsigned i = 0; i < K_SIZE; i++)
+    {
+        key_states[i].previous = key_states[i].current;
+        key_states[i].current = WalrusRPG::Quirks::get_key(key_map[i].key_code);
+    }
+#endif
 }
 
 bool Input::key_pressed(Key key)
 {
-  #ifdef TARGET_3DS
+#ifdef TARGET_3DS
     return kDown & key_map[key].key_code;
-  #else
+#else
     return !key_states[key].previous && key_states[key].current;
-  #endif
+#endif
 }
 
 bool Input::key_released(Key key)
 {
-  #ifdef TARGET_3DS
+#ifdef TARGET_3DS
     return kUp & key_map[key].key_code;
-  #else
+#else
     return key_states[key].previous && !key_states[key].current;
-  #endif
+#endif
 }
 bool Input::key_down(Key key)
 {
-  #ifdef TARGET_3DS
+#ifdef TARGET_3DS
     return kHeld & key_map[key].key_code;
-  #else
+#else
     return key_states[key].current;
-  #endif
+#endif
 }
 bool Input::key_up(Key key)
 {
-  #ifdef TARGET_3DS
+#ifdef TARGET_3DS
     return !(~kDown & key_map[key].key_code);
-  #else
+#else
     return !key_states[key].current;
-  #endif
+#endif
 }

+ 1 - 1
src/map/StateMap.cpp

@@ -40,7 +40,7 @@ StateMap::StateMap(int x, int y, Map &map)
       tex_haeccity(data.get("t_haecci")), txt(tex_haeccity, data.get("f_haecci")),
       box(txt)
 {
-  Logger::debug("Start");
+    Logger::debug("Start");
     box.set_text((
         char *) "Hello world! I am "
                 "\xFF\x01\xf0\x00\x00Howard\xFF\x01\xff\xff\x00"

+ 22 - 21
src/piaf/Archive.cpp

@@ -76,8 +76,8 @@ Archive::Archive(const char *filepath)
     // Null pointer exception trigger
     if (filepath == nullptr)
     {
-      Logger::error("%s: Null path given", __FILE__);
-      //throw PIAF::PIAFException("%s: Null path given", __FILE__);
+        Logger::error("%s: Null path given", __FILE__);
+        // throw PIAF::PIAFException("%s: Null path given", __FILE__);
     }
     // Solves the absolute path for given relative path.
     // Must be needed in targets like Ndless as it doesn't support environment
@@ -89,8 +89,8 @@ Archive::Archive(const char *filepath)
     // Again another null pointer trigger
     if (file == nullptr || file == NULL)
     {
-      Logger::error("%s: Missing file : %s", __FILE__, filepath);
-        //throw PIAF::PIAFException("%s: Missing file : %s", __FILE__, filepath);
+        Logger::error("%s: Missing file : %s", __FILE__, filepath);
+        // throw PIAF::PIAFException("%s: Missing file : %s", __FILE__, filepath);
     }
 
     // Loading stuff happens NOW
@@ -101,9 +101,8 @@ Archive::Archive(const char *filepath)
     // File to small exception trigger
     if (filesize < 32)
     {
-        Logger::error("%s: File too small (%s): %d", __FILE__, filepath,
-                                  filesize);
-        //throw PIAF::PIAFException("%s: File too small (%s): %d", __FILE__, filepath,
+        Logger::error("%s: File too small (%s): %d", __FILE__, filepath, filesize);
+        // throw PIAF::PIAFException("%s: File too small (%s): %d", __FILE__, filepath,
         //                          filesize);
     }
 
@@ -113,7 +112,7 @@ Archive::Archive(const char *filepath)
     if (fread(header_container, sizeof(char), 32, file) != 32)
     {
         Logger::error("%s: Errorneous header : %s", __FILE__, filepath);
-        //throw PIAF::PIAFException("%s: Errorneous header : %s", __FILE__, filepath);
+        // throw PIAF::PIAFException("%s: Errorneous header : %s", __FILE__, filepath);
     }
     // Check if the magic cookie is the same.
     // It's a first way to detect if the file is correctly an archive.
@@ -121,7 +120,8 @@ Archive::Archive(const char *filepath)
     {
         // TODO throw bad header
         Logger::error("%s: Magic cookie mismatch : %s", __FILE__, filepath);
-        //throw PIAF::PIAFException("%s: Magic cookie mismatch : %s", __FILE__, filepath);
+        // throw PIAF::PIAFException("%s: Magic cookie mismatch : %s", __FILE__,
+        // filepath);
     }
     // Checksum time! Let's check if the header hasn"t been altered.
     uint32_t expected_checksum = read_big_endian_value<uint32_t>(&header_container[8]);
@@ -130,7 +130,7 @@ Archive::Archive(const char *filepath)
     {
         // TODO throw bad checksum
         Logger::error("%s: Bad checksum : %s", __FILE__, filepath);
-        //throw PIAF::PIAFException("%s: Bad checksum : %s", __FILE__, filepath);
+        // throw PIAF::PIAFException("%s: Bad checksum : %s", __FILE__, filepath);
     }
 
     // TODO : version checking
@@ -139,9 +139,9 @@ Archive::Archive(const char *filepath)
     {
         // std::exception up;
         // throw up; // haha
-        Logger::error("%s: Wrong(%s) : %08x is not supported by %08x",
-                                 __FILE__, filepath, version, ARCHIVE_VERSION);
-        //throw PIAF::PIAFException("%s: Wrong(%s) : %08x is not supported by %08x",
+        Logger::error("%s: Wrong(%s) : %08x is not supported by %08x", __FILE__, filepath,
+                      version, ARCHIVE_VERSION);
+        // throw PIAF::PIAFException("%s: Wrong(%s) : %08x is not supported by %08x",
         //                          __FILE__, filepath, version, ARCHIVE_VERSION);
     }
 
@@ -160,7 +160,7 @@ Archive::Archive(const char *filepath)
         // fprintf(stderr, "Bad data size : expected %u, got %lld\n", data_size,
         // calculated_data_size);
         Logger::error("Data size mismatch", __LINE__, filepath);
-        //throw PIAF::PIAFException("Data size mismatch", __LINE__, filepath);
+        // throw PIAF::PIAFException("Data size mismatch", __LINE__, filepath);
     }
     // Check if there are files to manage.
     if (nb_files != 0)
@@ -173,16 +173,17 @@ Archive::Archive(const char *filepath)
         fseek(file, 32, SEEK_SET);
         if (fread(file_entry_data, sizeof(char), 24 * nb_files, file) < 24 * nb_files)
         {
-           Logger::error("Can't read file entry data", __LINE__, filepath);
-          //  throw PIAF::PIAFException("Can't read file entry data", __LINE__, filepath);
+            Logger::error("Can't read file entry data", __LINE__, filepath);
+            //  throw PIAF::PIAFException("Can't read file entry data", __LINE__,
+            //  filepath);
         }
         // Compare and trigger an exception if the checksum doesn't match.
         if (expected_filetable_checksum !=
             crc32(0L, (unsigned char *) file_entry_data, 24 * nb_files))
         {
             // fprintf(stderr, "Bad filetable checksum\n");
-           Logger::error("Bad Filetable checksum", __LINE__, filepath);
-          //  throw PIAF::PIAFException("Bad Filetable checksum", __LINE__, filepath);
+            Logger::error("Bad Filetable checksum", __LINE__, filepath);
+            //  throw PIAF::PIAFException("Bad Filetable checksum", __LINE__, filepath);
         }
         // Create the filetable.
         entries = new File[nb_files];
@@ -204,7 +205,7 @@ Archive::Archive(const char *filepath)
 #if TARGET_NSPIRE
     Interrupts::init();
 #endif
-  Logger::debug("File done");
+    Logger::debug("File done");
 }
 
 Archive::~Archive()
@@ -258,8 +259,8 @@ File Archive::get(const char *filename)
                 if (fread(data, sizeof(uint8_t), entries[index].file_size, file) !=
                     entries[index].file_size)
                 {
-                  //  throw PIAF::PIAFException("%s: couldn't load %s from an archive.",
-                  //                            filename);
+                    //  throw PIAF::PIAFException("%s: couldn't load %s from an archive.",
+                    //                            filename);
                 }
                 else
                 {