<commit_before>/*
    This code is released under the terms of the MIT license.
    See COPYING.txt for details.
*/

#include <QMessageBox>
#include <QPainter>
#include <algorithm>
#include "tileseteditwindow.h"
#include "ui_tileseteditwindow.h"
#include "stuff.h"
#include "level.h"
#include "graphics.h"
#include "hexspinbox.h"
#include "tileset.h"
#include "tilesetview.h"

TilesetEditWindow::TilesetEditWindow(QWidget *parent) :
    QDialog(parent, Qt::CustomizeWindowHint
            | Qt::WindowTitleHint
            | Qt::WindowCloseButtonHint
            | Qt::MSWindowsFixedSizeDialogHint
           ),
    ui(new Ui::TilesetEditWindow),
    tilesetBox(new HexSpinBox(this, 2)),
    tilePalBox(new HexSpinBox(this, 2)),
    subtractBox(new HexSpinBox(this, 2)),
    tileView(new TilesetView(this, &tilesetPixmap)),
    tile8View(new Tile8View(this, gfxBanks)),
    tilesetPixmap(256*TILE_SIZE, TILE_SIZE),
    animTimer(this), animFrame(0)
{
    ui->setupUi(this);

    // add spinboxes
    QGridLayout *layout = ui->gridLayout_Display;
    layout->addWidget(tilesetBox,      2, 2, 1, 1);<commit_msg>fix uninitialized tileset number<commit_after>/*
    This code is released under the terms of the MIT license.
    See COPYING.txt for details.
*/

#include <QMessageBox>
#include <QPainter>
#include <algorithm>
#include "tileseteditwindow.h"
#include "ui_tileseteditwindow.h"
#include "stuff.h"
#include "level.h"
#include "graphics.h"
#include "hexspinbox.h"
#include "tileset.h"
#include "tilesetview.h"

TilesetEditWindow::TilesetEditWindow(QWidget *parent) :
    QDialog(parent, Qt::CustomizeWindowHint
            | Qt::WindowTitleHint
            | Qt::WindowCloseButtonHint
            | Qt::MSWindowsFixedSizeDialogHint
           ),
    ui(new Ui::TilesetEditWindow),
    tilesetBox(new HexSpinBox(this, 2)),
    tilePalBox(new HexSpinBox(this, 2)),
    subtractBox(new HexSpinBox(this, 2)),
    tileView(new TilesetView(this, &tilesetPixmap)),
    tile8View(new Tile8View(this, gfxBanks)),
    tilesetPixmap(256*TILE_SIZE, TILE_SIZE),
    tileset(0), currentTile(0),
    animTimer(this), animFrame(0)
{
    ui->setupUi(this);

    // add spinboxes
    QGridLayout *layout = ui->gridLayout_Display;
    layout->addWidget(tilesetBox,      2, 2, 1, 1);
{'fraction_non_alphanumeric': 0.12604671661524902, 'fraction_numerical': 0.0123402379903041, 'mean_word_length': 4.089686098654709, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '4119414', 'n_tokens_mistral': 826, 'n_tokens_neox': 793, 'n_words': 158}