<commit_before>#include "graphics.h"
#include "romfile.h"
#include <QPixmap>

QImage *banks = 0;
uint numBanks = 0;

void loadCHRBanks(ROMFile& rom) {
    if (banks)
        delete[] banks;

    numBanks = rom.getNumCHRBanks();
    banks = new QImage[numBanks];
    for (uint i = 0; i < numBanks; i++)
        banks[i] = rom.readCHRBank(i);
}

// get single CHR bank with applied palette
// (TODO: the palette thing)
QImage getCHRBank(uint bank, uint pal) {
    if (banks) {
        QImage newBank(banks[bank % numBanks]);
        // test: save bank to image
        newBank.save(QString("bank%1.png").arg(bank));
        // apply palette here eventually
        return newBank;
    } else return QImage();
}
<commit_msg>get rid of debug image output<commit_after>#include "graphics.h"
#include "romfile.h"
#include <QPixmap>

QImage *banks = 0;
uint numBanks = 0;

void loadCHRBanks(ROMFile& rom) {
    if (banks)
        delete[] banks;

    numBanks = rom.getNumCHRBanks();
    banks = new QImage[numBanks];
    for (uint i = 0; i < numBanks; i++)
        banks[i] = rom.readCHRBank(i);
}

// get single CHR bank with applied palette
// (TODO: the palette thing)
QImage getCHRBank(uint bank, uint pal) {
    if (banks) {
        QImage newBank(banks[bank % numBanks]);

        // apply palette here eventually
        return newBank;
    } else return QImage();
}

{'fraction_non_alphanumeric': 0.1301169590643275, 'fraction_numerical': 0.005116959064327485, 'mean_word_length': 2.9002849002849005, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1254741', 'n_tokens_mistral': 496, 'n_tokens_neox': 470, 'n_words': 137}