|
|
|
@ -1,15 +1,8 @@
@@ -1,15 +1,8 @@
|
|
|
|
|
#include "ImageComponent.h" |
|
|
|
|
#include <cmath> |
|
|
|
|
#include <iostream> |
|
|
|
|
<<<<<<< Updated upstream:src/graphics/components/ImageComponent.cpp |
|
|
|
|
#include <cstring> |
|
|
|
|
#include "../../pnm.h" |
|
|
|
|
======= |
|
|
|
|
#include "../../parsers/images/netpbm/pnm.h" |
|
|
|
|
#ifdef __MINGW32__ |
|
|
|
|
#include "../../../anime.h" |
|
|
|
|
#endif |
|
|
|
|
>>>>>>> Stashed changes:src/interfaces/components/ImageComponent.cpp |
|
|
|
|
|
|
|
|
|
ImageComponent::ImageComponent(std::string filename, const float rawX, const float rawY, const float rawWidth, const float rawHeight, const int passedWindowWidth, const int passedWindowHeight) : BoxComponent(rawX, rawY, rawWidth, rawHeight, 0x00000000, passedWindowWidth, passedWindowHeight) { |
|
|
|
|
//std::cout << "ImageComponent::ImageComponent" << std::endl;
|
|
|
|
@ -39,15 +32,12 @@ ImageComponent::ImageComponent(std::string filename, const float rawX, const flo
@@ -39,15 +32,12 @@ ImageComponent::ImageComponent(std::string filename, const float rawX, const flo
|
|
|
|
|
anime = nullptr; |
|
|
|
|
} |
|
|
|
|
std::cout << "loading " << filename << " at " << loadWidth << "," << loadHeight << std::endl; |
|
|
|
|
<<<<<<< Updated upstream:src/graphics/components/ImageComponent.cpp |
|
|
|
|
======= |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
response->textureWidth = pow(2, ceil(log(response->width) / log(2))); |
|
|
|
|
response->textureHeight = pow(2, ceil(log(response->height) / log(2))); |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
>>>>>>> Stashed changes:src/interfaces/components/ImageComponent.cpp |
|
|
|
|
for (unsigned int py = 0; py < loadHeight; py++) { |
|
|
|
|
for (unsigned int px = 0; px < loadWidth; px++) { |
|
|
|
|
if (anime) { |
|
|
|
|