Browse Source

fix transpose params, gcc fixes

pull/2/head
Odilitime 5 years ago
parent
commit
9be99bf735
  1. 6
      src/graphics/components/AnimeComponent.cpp

6
src/graphics/components/AnimeComponent.cpp

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
#include "AnimeComponent.h"
#include <cmath>
#include <iostream>
#include "pnm.h"
#include "../../pnm.h"
AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const int passedWindowWidth, const int passedWindowHeight) : BoxComponent(rawX, rawY, rawWidth, rawHeight, passedWindowWidth, 0x000000FF, passedWindowHeight){
AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float rawWidth, const float rawHeight, const int passedWindowWidth, const int passedWindowHeight) : BoxComponent(rawX, rawY, rawWidth, rawHeight, 0x000000FF, passedWindowWidth, passedWindowHeight){
//std::cout << "AnimeComponent::AnimeComponent" << std::endl;
windowWidth = passedWindowWidth;
@ -24,7 +24,7 @@ AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float r @@ -24,7 +24,7 @@ AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float r
if (anime) {
for (int i = 0; i < 4; i++) {
//data[1023 - py][px][i] = anime.pixel_data[((px * 4) + (py * 4 * 1024)) + i];
data[1023 - py][px][i] = anime->m_Ptr[((px * 4) + (py * 4 * 1024)) + i];
data[1023 - py][px][i] = static_cast<unsigned char>(anime->m_Ptr[((px * 4) + (py * 4 * 1024)) + i]);
}
} else {
data[1023 - py][px][3] = 0x00; // just make it all transparent for now

Loading…
Cancel
Save