Skip to content
Snippets Groups Projects
Commit 30b2a955 authored by despair's avatar despair
Browse files

activated animu grill in nt builds

parent 65c61d9e
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,9 @@
#include <cmath>
#include <iostream>
#include "../../pnm.h"
#ifdef __MINGW32__
#include "../../../anime.h"
#endif
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, 0x00000000, passedWindowWidth, passedWindowHeight) {
//std::cout << "AnimeComponent::AnimeComponent" << std::endl;
......@@ -14,11 +17,20 @@ AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float r
width = rawWidth;
height = rawHeight;
#ifdef __MINGW32__ // the old "huge string" works fine with mingw
for (int py = 0; py < 1024; py++) {
for (int px = 0; px < 1024; px++) {
for (int i = 0; i < 4; i++) {
data[1023 - py][px][i] = anime.pixel_data[((px * 4) + (py * 4 * 1024)) + i];
}
}
}
#else // this is either non-Windows or using Microsoft C/C++
RGBAPNMObject *anime = readPPM("anime.pnm");
if (!anime) {
std::cout << "Can't set up anime component, couldn't read anime.pnm" << std::endl;
}
for (int py = 0; py < 1024; py++) {
for (int px = 0; px < 1024; px++) {
if (anime) {
......@@ -31,6 +43,7 @@ AnimeComponent::AnimeComponent(const float rawX, const float rawY, const float r
}
}
}
#endif
float vx = rawX;
float vy = rawY;
......
......@@ -8,11 +8,11 @@
#include <ctime>
#include <iostream>
#include <sys/stat.h>
#ifdef _WIN32
extern "C"{
#ifdef _WIN32
void init_heap();
#endif
}
#endif
#if defined(_WIN32) && !defined(_WIN64)
#define PLATFORM "i686-pc-winnt"
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment