Skip to content

Commit

Permalink
Merge pull request #1 from 8street/fixes1
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
8street authored Feb 6, 2021
2 parents b78e6ce + cefee75 commit 3d1ddcf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Utility for the Bedlam 1996 game. Allows to view all images from the game files.

[![Lines of Code](https://tokei.rs/b1/github/8street/BedlamTools?category=code)](https://github.com/XAMPPRocky/tokei)

![preview](https://github.com/8street/BedlamTools/misc/bedlamtools.png)

# Project State

* Image: draw all images from binary files
Expand Down
Binary file added misc/bedlamtools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion qt/bedlamtools.ui
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
Expand Down
6 changes: 3 additions & 3 deletions src/bedlamtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ void BedlamTools::bin_redraw() {

// print img buffer to QImage
int i = 0;
for (int y = 0; y < 480; y++) {
for (int x = 0; x < 640; x++) {
for (int y = 0; y < image.height(); y++) {
for (int x = 0; x < image.width(); x++) {
image.setPixel(x, y, get_color(screen_bufer.at(i)));
i++;
}
Expand All @@ -129,4 +129,4 @@ QRgb BedlamTools::get_color(uint8_t value){
// input value is offset in .pal file. First 2 byte in .pal file is info and contain no color data
int brightness = 4;
return qRgb(file_pal.at(value * 3 + 2) * brightness, file_pal.at(value * 3 + 3) * brightness, file_pal.at(value * 3 + 4) * brightness);
}
}
10 changes: 5 additions & 5 deletions src/ui_bedlamtools.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/********************************************************************************
** Form generated from reading UI file 'bedlamtoolsElnYsu.ui'
** Form generated from reading UI file 'bedlamtoolsOYWAwv.ui'
**
** Created by: Qt User Interface Compiler version 5.12.10
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef BEDLAMTOOLSELNYSU_H
#define BEDLAMTOOLSELNYSU_H
#ifndef BEDLAMTOOLSOYWAWV_H
#define BEDLAMTOOLSOYWAWV_H

#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
Expand Down Expand Up @@ -79,7 +79,7 @@ class Ui_BedlamToolsClass
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(graphics->sizePolicy().hasHeightForWidth());
graphics->setSizePolicy(sizePolicy);
graphics->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
graphics->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
graphics->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
horizontalLayoutWidget = new QWidget(tab_img);
horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget"));
Expand Down Expand Up @@ -259,4 +259,4 @@ namespace Ui {

QT_END_NAMESPACE

#endif // BEDLAMTOOLSELNYSU_H
#endif // BEDLAMTOOLSOYWAWV_H

0 comments on commit 3d1ddcf

Please sign in to comment.