| 1 | #cxx . . $ `<file>/src/TileViewer.cpp`/include "TileViewer.h"cxx . . $ `<file>/src/TileViewer.h`/ |
| 2 | #include "ui_TileViewer.h"cxx . . $ `<file>/derived/src/ui_TileViewer.h`/ |
| 3 | #include "VramTiledView.h"cxx . . $ `<file>/src/VramTiledView.h`/ |
| 4 | #include "VDPDataStore.h"cxx . . $ `<file>/src/VDPDataStore.h`/ |
| 5 | #include "PaletteDialog.h"cxx . . $ `<file>/src/PaletteDialog.h`/ |
| 6 | #include "Convert.h"cxx . . $ `<file>/src/Convert.h`/ |
| 7 | #include <QMessageBox> |
| 8 | |
| 9 | |
| 10 | static uint8_tcxx . . $ uint8_t# currentPalettecxx . . $ currentPalette.[32] = { 0 }; |
| 11 | |
| 12 | TileViewercxx . . $ TileViewer#::TileViewercxx . . $ TileViewer#TileViewer(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent) |
| 13 | : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d).(parent), image4labelcxx . . $ TileViewer#image4label.(32, 32, QImagecxx . . $ QImage#::Format_RGB32cxx . . $ QImage#Format_RGB32.) |
| 14 | { |
| 15 | setupUicxx . . $ Ui_TileViewer#setupUi(d194de0c0f68c28b).(this); |
| 16 | // No QMetaObject::connectSlotsByName available now since we dropped the slots: in the header; |
| 17 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_tilemapsourcecxx . . $ Ui_TileViewer#cb_tilemapsource., qOverloadcxx . . $ qOverload.<int>(cxx . . $ QNonConstOverload#`operator()`(a8f97e06674de5d1).&QComboBoxcxx . . $ QComboBox#::currentIndexChangedcxx . . $ QComboBox#currentIndexChanged(d4f767463ce0a6b3).), this, &TileViewercxx . . $ TileViewer#::on_cb_tilemapsource_currentIndexChangedcxx . . $ TileViewer#on_cb_tilemapsource_currentIndexChanged(d4f767463ce0a6b3).); |
| 18 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_screencxx . . $ Ui_TileViewer#cb_screen., qOverloadcxx . . $ qOverload.<int>(cxx . . $ QNonConstOverload#`operator()`(a8f97e06674de5d1).&QComboBoxcxx . . $ QComboBox#::currentIndexChangedcxx . . $ QComboBox#currentIndexChanged(d4f767463ce0a6b3).) ,this ,&TileViewercxx . . $ TileViewer#::on_cb_screen_currentIndexChangedcxx . . $ TileViewer#on_cb_screen_currentIndexChanged(d4f767463ce0a6b3).); |
| 19 | connectcxx . . $ QObject#connect(835f87066c895669).(le_nametablecxx . . $ Ui_TileViewer#le_nametable., &QLineEditcxx . . $ QLineEdit#::textChangedcxx . . $ QLineEdit#textChanged(3520e46b33348bf6)., this, &TileViewercxx . . $ TileViewer#::on_le_nametable_textChangedcxx . . $ TileViewer#on_le_nametable_textChanged(3520e46b33348bf6).); |
| 20 | connectcxx . . $ QObject#connect(835f87066c895669).(le_colortablecxx . . $ Ui_TileViewer#le_colortable., &QLineEditcxx . . $ QLineEdit#::textChangedcxx . . $ QLineEdit#textChanged(3520e46b33348bf6)., this, &TileViewercxx . . $ TileViewer#::on_le_colortable_textChangedcxx . . $ TileViewer#on_le_colortable_textChanged(3520e46b33348bf6).); |
| 21 | connectcxx . . $ QObject#connect(835f87066c895669).(le_patterntablecxx . . $ Ui_TileViewer#le_patterntable., &QLineEditcxx . . $ QLineEdit#::textChangedcxx . . $ QLineEdit#textChanged(3520e46b33348bf6)., this, &TileViewercxx . . $ TileViewer#::on_le_patterntable_textChangedcxx . . $ TileViewer#on_le_patterntable_textChanged(3520e46b33348bf6).); |
| 22 | |
| 23 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_color0cxx . . $ Ui_TileViewer#cb_color0., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &TileViewercxx . . $ TileViewer#::on_cb_color0_stateChangedcxx . . $ TileViewer#on_cb_color0_stateChanged(d4f767463ce0a6b3).); |
| 24 | connectcxx . . $ QObject#connect(835f87066c895669).(useVDPRegisterscxx . . $ Ui_TileViewer#useVDPRegisters., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &TileViewercxx . . $ TileViewer#::on_useVDPRegisters_stateChangedcxx . . $ TileViewer#on_useVDPRegisters_stateChanged(d4f767463ce0a6b3).); |
| 25 | |
| 26 | connectcxx . . $ QObject#connect(835f87066c895669).(editPaletteButtoncxx . . $ Ui_TileViewer#editPaletteButton., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &TileViewercxx . . $ TileViewer#::on_editPaletteButton_clickedcxx . . $ TileViewer#on_editPaletteButton_clicked(b45ddcbc8423892c).); |
| 27 | connectcxx . . $ QObject#connect(835f87066c895669).(useVDPPalettecxx . . $ Ui_TileViewer#useVDPPalette., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &TileViewercxx . . $ TileViewer#::on_useVDPPalette_stateChangedcxx . . $ TileViewer#on_useVDPPalette_stateChanged(d4f767463ce0a6b3).); |
| 28 | connectcxx . . $ QObject#connect(835f87066c895669).(zoomLevelcxx . . $ Ui_TileViewer#zoomLevel., qOverloadcxx . . $ qOverload.<double>(cxx . . $ QNonConstOverload#`operator()`(a8f97e06674de5d1).&QDoubleSpinBoxcxx . . $ QDoubleSpinBox#::valueChangedcxx . . $ QDoubleSpinBox#valueChanged(ba8836b59fb42830).), this, &TileViewercxx . . $ TileViewer#::on_zoomLevel_valueChangedcxx . . $ TileViewer#on_zoomLevel_valueChanged(ba8836b59fb42830).); |
| 29 | |
| 30 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_drawgridcxx . . $ Ui_TileViewer#cb_drawgrid., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &TileViewercxx . . $ TileViewer#::on_cb_drawgrid_stateChangedcxx . . $ TileViewer#on_cb_drawgrid_stateChanged(d4f767463ce0a6b3).); |
| 31 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_highlightcxx . . $ Ui_TileViewer#cb_highlight., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &TileViewercxx . . $ TileViewer#::on_cb_highlight_stateChangedcxx . . $ TileViewer#on_cb_highlight_stateChanged(d4f767463ce0a6b3).); |
| 32 | connectcxx . . $ QObject#connect(835f87066c895669).(sp_highlightcxx . . $ Ui_TileViewer#sp_highlight., qOverloadcxx . . $ qOverload.<int>(cxx . . $ QNonConstOverload#`operator()`(a8f97e06674de5d1).&QSpinBoxcxx . . $ QSpinBox#::valueChangedcxx . . $ QSpinBox#valueChanged(d4f767463ce0a6b3).), this, &TileViewercxx . . $ TileViewer#::on_sp_highlight_valueChangedcxx . . $ TileViewer#on_sp_highlight_valueChanged(d4f767463ce0a6b3).); |
| 33 | connectcxx . . $ QObject#connect(835f87066c895669).(sp_bordercolorcxx . . $ Ui_TileViewer#sp_bordercolor., qOverloadcxx . . $ qOverload.<int>(cxx . . $ QNonConstOverload#`operator()`(a8f97e06674de5d1).&QSpinBoxcxx . . $ QSpinBox#::valueChangedcxx . . $ QSpinBox#valueChanged(d4f767463ce0a6b3).), this, &TileViewercxx . . $ TileViewer#::on_sp_bordercolor_valueChangedcxx . . $ TileViewer#on_sp_bordercolor_valueChanged(d4f767463ce0a6b3).); |
| 34 | |
| 35 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_blinkcolorscxx . . $ Ui_TileViewer#cb_blinkcolors., &QCheckBoxcxx . . $ QCheckBox#::stateChangedcxx . . $ QCheckBox#stateChanged(d4f767463ce0a6b3)., this, &TileViewercxx . . $ TileViewer#::on_cb_blinkcolors_stateChangedcxx . . $ TileViewer#on_cb_blinkcolors_stateChanged(d4f767463ce0a6b3).); |
| 36 | connectcxx . . $ QObject#connect(835f87066c895669).(cb_screenrowscxx . . $ Ui_TileViewer#cb_screenrows., qOverloadcxx . . $ qOverload.<int>(cxx . . $ QNonConstOverload#`operator()`(a8f97e06674de5d1).&QComboBoxcxx . . $ QComboBox#::currentIndexChangedcxx . . $ QComboBox#currentIndexChanged(d4f767463ce0a6b3).), this, &TileViewercxx . . $ TileViewer#::on_cb_screenrows_currentIndexChangedcxx . . $ TileViewer#on_cb_screenrows_currentIndexChanged(d4f767463ce0a6b3).); |
| 37 | |
| 38 | |
| 39 | |
| 40 | const QFontcxx . . $ QFont# fixedFont = QFontDatabasecxx . . $ QFontDatabase#::systemFontcxx . . $ QFontDatabase#systemFont(2e2fed7ba119aa62).(QFontDatabasecxx . . $ QFontDatabase#::FixedFontcxx . . $ QFontDatabase#FixedFont.); |
| 41 | plainTextEditcxx . . $ Ui_TileViewer#plainTextEdit.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(fixedFont); |
| 42 | label_charpatcxx . . $ Ui_TileViewer#label_charpat.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(fixedFont); |
| 43 | label_charadrcxx . . $ Ui_TileViewer#label_charadr.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(fixedFont); |
| 44 | |
| 45 | // Now hook up some signals and slots. |
| 46 | // This way we have created the VDPDataStore::instance before our imagewidget. |
| 47 | // This allows the VDPDatastore to start asking for data as quickly as possible. |
| 48 | connectcxx . . $ QObject#connect(835f87066c895669).(refreshButtoncxx . . $ Ui_TileViewer#refreshButton., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., |
| 49 | &VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).(), &VDPDataStorecxx . . $ VDPDataStore#::refreshcxx . . $ VDPDataStore#refresh(49f6e7a06ebc5aa8).); |
| 50 | connectcxx . . $ QObject#connect(835f87066c895669).(&VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).(), &VDPDataStorecxx . . $ VDPDataStore#::dataRefreshedcxx . . $ VDPDataStore#dataRefreshed(49f6e7a06ebc5aa8)., |
| 51 | this, &TileViewercxx . . $ TileViewer#::VDPDataStoreDataRefreshedcxx . . $ TileViewer#VDPDataStoreDataRefreshed(49f6e7a06ebc5aa8).); |
| 52 | |
| 53 | imageWidgetcxx . . $ TileViewer#imageWidget. = new VramTiledViewcxx . . $ VramTiledView#VramTiledView(108f35f7aa7f3cf9).(); |
| 54 | QSizePolicycxx . . $ QSizePolicy# sizePolicy1cxx . . $ QSizePolicy#QSizePolicy(dc90913e2b9d0ddb).(QSizePolicycxx . . $ QSizePolicy#::Fixedcxx . . $ QSizePolicy#Fixed., QSizePolicycxx . . $ QSizePolicy#::Fixedcxx . . $ QSizePolicy#Fixed.); |
| 55 | sizePolicy1.setHorizontalStretchcxx . . $ QSizePolicy#setHorizontalStretch(d4f767463ce0a6b3).(0); |
| 56 | sizePolicy1.setVerticalStretchcxx . . $ QSizePolicy#setVerticalStretch(d4f767463ce0a6b3).(0); |
| 57 | sizePolicy1.setHeightForWidthcxx . . $ QSizePolicy#setHeightForWidth(9f0ba574c1c44ffc).(imageWidgetcxx . . $ TileViewer#imageWidget.->sizePolicycxx . . $ QWidget#sizePolicy(32ae450071346403).().hasHeightForWidthcxx . . $ QSizePolicy#hasHeightForWidth(3482b152b9333168).()); |
| 58 | imageWidgetcxx . . $ TileViewer#imageWidget.->setSizePolicycxx . . $ QWidget#setSizePolicy(41340f53ecd443dd).(sizePolicy1); |
| 59 | imageWidgetcxx . . $ TileViewer#imageWidget.->setMinimumSizecxx . . $ QWidget#setMinimumSize(1c5f201b4c2f0aba).(QSizecxx . . $ QSize#QSize(c0d38f4800714fae).(256, 212)); |
| 60 | connectcxx . . $ QObject#connect(835f87066c895669).(&VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).(), &VDPDataStorecxx . . $ VDPDataStore#::dataRefreshedcxx . . $ VDPDataStore#dataRefreshed(49f6e7a06ebc5aa8)., |
| 61 | imageWidgetcxx . . $ TileViewer#imageWidget., &VramTiledViewcxx . . $ VramTiledView#::refreshcxx . . $ VramTiledView#refresh(49f6e7a06ebc5aa8).); |
| 62 | |
| 63 | scrollAreacxx . . $ Ui_TileViewer#scrollArea.->setWidgetcxx . . $ QScrollArea#setWidget(108f35f7aa7f3cf9).(imageWidgetcxx . . $ TileViewer#imageWidget.); |
| 64 | |
| 65 | imageWidgetcxx . . $ TileViewer#imageWidget.->setPaletteSourcecxx . . $ VramTiledView#setPaletteSource(28caea9380bfac8a).(VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().getDefaultPalettePointercxx . . $ VDPDataStore#getDefaultPalettePointer(7eb257f306f79f97).()); |
| 66 | imageWidgetcxx . . $ TileViewer#imageWidget.->setUseBlinkcxx . . $ VramTiledView#setUseBlink(b45ddcbc8423892c).(cb_blinkcolorscxx . . $ Ui_TileViewer#cb_blinkcolors.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 67 | imageWidgetcxx . . $ TileViewer#imageWidget.->setDrawGridcxx . . $ VramTiledView#setDrawGrid(b45ddcbc8423892c).(cb_drawgridcxx . . $ Ui_TileViewer#cb_drawgrid.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 68 | |
| 69 | connectcxx . . $ QObject#connect(835f87066c895669).(imageWidgetcxx . . $ TileViewer#imageWidget., &VramTiledViewcxx . . $ VramTiledView#::highlightCountcxx . . $ VramTiledView#highlightCount(d5cb1b1d97598ec6)., |
| 70 | this, &TileViewercxx . . $ TileViewer#::highlightInfocxx . . $ TileViewer#highlightInfo(d5cb1b1d97598ec6).); |
| 71 | connectcxx . . $ QObject#connect(835f87066c895669).(imageWidgetcxx . . $ TileViewer#imageWidget., &VramTiledViewcxx . . $ VramTiledView#::imageHoveredcxx . . $ VramTiledView#imageHovered(b1146eedae1e1d0b)., |
| 72 | this, &TileViewercxx . . $ TileViewer#::imageMouseOvercxx . . $ TileViewer#imageMouseOver(b1146eedae1e1d0b).); |
| 73 | connectcxx . . $ QObject#connect(835f87066c895669).(imageWidgetcxx . . $ TileViewer#imageWidget., &VramTiledViewcxx . . $ VramTiledView#::imageClickedcxx . . $ VramTiledView#imageClicked(13c75376313d168e)., |
| 74 | this, &TileViewercxx . . $ TileViewer#::displayCharInfocxx . . $ TileViewer#displayCharInfo(9fd1ba4ff6701d34).); |
| 75 | |
| 76 | VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().refreshcxx . . $ VDPDataStore#refresh(49f6e7a06ebc5aa8).(); |
| 77 | } |
| 78 | |
| 79 | void TileViewercxx . . $ TileViewer#::VDPDataStoreDataRefreshedcxx . . $ TileViewer#VDPDataStoreDataRefreshed(49f6e7a06ebc5aa8).() |
| 80 | { |
| 81 | const auto* vram = VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().getVramPointercxx . . $ VDPDataStore#getVramPointer(7eb257f306f79f97).(); |
| 82 | imageWidgetcxx . . $ TileViewer#imageWidget.->setVramSourcecxx . . $ VramTiledView#setVramSource(28caea9380bfac8a).(vram); |
| 83 | |
| 84 | if (useVDPPalettecxx . . $ Ui_TileViewer#useVDPPalette.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) { |
| 85 | imageWidgetcxx . . $ TileViewer#imageWidget.->setPaletteSourcecxx . . $ VramTiledView#setPaletteSource(28caea9380bfac8a).(VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().getPalettePointercxx . . $ VDPDataStore#getPalettePointer(7eb257f306f79f97).()); |
| 86 | } |
| 87 | decodeVDPregscxx . . $ TileViewer#decodeVDPregs(49f6e7a06ebc5aa8).(); |
| 88 | } |
| 89 | |
| 90 | void TileViewercxx . . $ TileViewer#::highlightInfocxx . . $ TileViewer#highlightInfo(d5cb1b1d97598ec6).(uint8_tcxx . . $ uint8_t# character, int count) |
| 91 | { |
| 92 | label_highligtinfocxx . . $ Ui_TileViewer#label_highligtinfo.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).( |
| 93 | (count == 0) ? QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1 (not in nametabel)").argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(character, 2)) |
| 94 | : QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1 (%2 in nametabel)").argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(character, 2)).argcxx . . $ QString#arg(64ab2ed17cc11715).(count)); |
| 95 | } |
| 96 | |
| 97 | void TileViewercxx . . $ TileViewer#::update_label_characterimagecxx . . $ TileViewer#update_label_characterimage(49f6e7a06ebc5aa8).() |
| 98 | { |
| 99 | imageWidgetcxx . . $ TileViewer#imageWidget.->drawCharAtImagecxx . . $ VramTiledView#drawCharAtImage(53669dd2d54c178f).(mouseOverCharcxx . . $ TileViewer#mouseOverChar., mouseOverXcxx . . $ TileViewer#mouseOverX., mouseOverYcxx . . $ TileViewer#mouseOverY., image4labelcxx . . $ TileViewer#image4label.); |
| 100 | label_characterimagecxx . . $ Ui_TileViewer#label_characterimage.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(QPixmapcxx . . $ QPixmap#::fromImagecxx . . $ QPixmap#fromImage(e89e6101063912f).(image4labelcxx . . $ TileViewer#image4label.)); |
| 101 | } |
| 102 | |
| 103 | void TileViewercxx . . $ TileViewer#::imageMouseOvercxx . . $ TileViewer#imageMouseOver(b1146eedae1e1d0b).(int screenX, int screenY, int character) |
| 104 | { |
| 105 | mouseOverXcxx . . $ TileViewer#mouseOverX. = screenX; |
| 106 | mouseOverYcxx . . $ TileViewer#mouseOverY. = screenY; |
| 107 | mouseOverCharcxx . . $ TileViewer#mouseOverChar. = character; |
| 108 | update_label_characterimagecxx . . $ TileViewer#update_label_characterimage(49f6e7a06ebc5aa8).(); |
| 109 | |
| 110 | label_mouseovercxx . . $ Ui_TileViewer#label_mouseover.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("col %1 row %2").argcxx . . $ QString#arg(64ab2ed17cc11715).(screenX).argcxx . . $ QString#arg(64ab2ed17cc11715).(screenY)); |
| 111 | int screenMode = imageWidgetcxx . . $ TileViewer#imageWidget.->getScreenModecxx . . $ VramTiledView#getScreenMode(455f465bc33b4cdf).(); |
| 112 | |
| 113 | // Screen 2 and 4 have 3 pattern/colortables so add 256/512 to get to 2nd and 3th bank depending on y |
| 114 | //printf("screenmode %i screen y %i character %i \n", screenMode, screenY, character); |
| 115 | label_charpatcxx . . $ Ui_TileViewer#label_charpat.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).( |
| 116 | (screenMode == 2 || screenMode == 4) |
| 117 | ? QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1/%2 (%3/%4)").argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(character & 255, 2)).argcxx . . $ QString#arg(64ab2ed17cc11715).(character >> 8).argcxx . . $ QString#arg(64ab2ed17cc11715).(character & 255).argcxx . . $ QString#arg(64ab2ed17cc11715).(character >> 8) |
| 118 | : QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1 (%2)").argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(character, 2)).argcxx . . $ QString#arg(64ab2ed17cc11715).(character)); |
| 119 | imageWidgetcxx . . $ TileViewer#imageWidget.->drawCharAtImagecxx . . $ VramTiledView#drawCharAtImage(53669dd2d54c178f).(character, screenX, screenY, image4labelcxx . . $ TileViewer#image4label.); |
| 120 | label_characterimagecxx . . $ Ui_TileViewer#label_characterimage.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(QPixmapcxx . . $ QPixmap#::fromImagecxx . . $ QPixmap#fromImage(e89e6101063912f).(image4labelcxx . . $ TileViewer#image4label.)); |
| 121 | |
| 122 | auto nametable = imageWidgetcxx . . $ TileViewer#imageWidget.->getNameTableAddresscxx . . $ VramTiledView#getNameTableAddress(ddd8539a2fcdd4ce).(); |
| 123 | auto patterntable = imageWidgetcxx . . $ TileViewer#imageWidget.->getPatternTableAddresscxx . . $ VramTiledView#getPatternTableAddress(ddd8539a2fcdd4ce).(); |
| 124 | auto colortable = imageWidgetcxx . . $ TileViewer#imageWidget.->getColorTableAddresscxx . . $ VramTiledView#getColorTableAddress(ddd8539a2fcdd4ce).(); |
| 125 | |
| 126 | QStringcxx . . $ QString# pgt = hexValuecxx . . $ hexValue(f4fd9db251ca774b).(patterntable + 8 * character, 4); |
| 127 | QStringcxx . . $ QString# ctcxx . . $ QString#QString(85c52e162fed56f9).("-"); |
| 128 | //printf("Tileviewer screenmode %i", screenMode); |
| 129 | switch (screenMode) { |
| 130 | case 0: |
| 131 | case 3: |
| 132 | //no colortable used in these modes |
| 133 | break; |
| 134 | case 1: |
| 135 | ct =cxx . . $ QString#`operator=`(4f35bf974e7f8568). hexValuecxx . . $ hexValue(f4fd9db251ca774b).(colortable + (character >> 3), 4); |
| 136 | break; |
| 137 | case 2: |
| 138 | case 4: |
| 139 | //regular 8 bytes per char colortable, show adr of row 0 |
| 140 | ct =cxx . . $ QString#`operator=`(4f35bf974e7f8568). hexValuecxx . . $ hexValue(f4fd9db251ca774b).(colortable + 8 * character, 4); |
| 141 | break; |
| 142 | case 80: |
| 143 | //show the coloraddres for the blink info |
| 144 | ct =cxx . . $ QString#`operator=`(4f35bf974e7f8568). hexValuecxx . . $ hexValue(f4fd9db251ca774b).(colortable + (screenX >> 3) + 10 * screenY, 4); |
| 145 | break; |
| 146 | } |
| 147 | QStringcxx . . $ QString# ntcxx . . $ QString#QString(85c52e162fed56f9).(""); |
| 148 | if (cb_tilemapsourcecxx . . $ Ui_TileViewer#cb_tilemapsource.->currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).() > 0) { |
| 149 | int scrWidth = screenMode == 80 ? 80 |
| 150 | : screenMode == 0 ? 40 |
| 151 | : 32; |
| 152 | nt =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QStringcxx . . $ QString#QString(85c52e162fed56f9).("\nNT: %1 (base+%2) )") |
| 153 | .argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(nametable + scrWidth * screenY + screenX, 4)) |
| 154 | .argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(scrWidth * screenY + screenX, 3)); |
| 155 | } |
| 156 | label_charadrcxx . . $ Ui_TileViewer#label_charadr.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("PGT: %1, CT: %2%3").argcxx . . $ QString#arg(bc823072288cbbb5).(pgt).argcxx . . $ QString#arg(bc823072288cbbb5).(ct).argcxx . . $ QString#arg(bc823072288cbbb5).(nt)); |
| 157 | } |
| 158 | |
| 159 | void TileViewercxx . . $ TileViewer#::decodeVDPregscxx . . $ TileViewer#decodeVDPregs(49f6e7a06ebc5aa8).() |
| 160 | { |
| 161 | const uint8_tcxx . . $ uint8_t#* regs = VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().getRegsPointercxx . . $ VDPDataStore#getRegsPointer(7eb257f306f79f97).(); |
| 162 | |
| 163 | // // Get current screenmode |
| 164 | // static const int bits_modetxt[32] = { |
| 165 | // 1, 3, 0, 255, 2, 255, 255, 255, |
| 166 | // 4, 255, 80, 255, 5, 255, 255, 255, |
| 167 | // 6, 255, 255, 255, 7, 255, 255, 255, |
| 168 | // 255, 255, 255, 255, 8, 255, 255, 255, |
| 169 | // }; |
| 170 | |
| 171 | //int v = ((regs[0] & 0x0E) << 1) | ((regs[1] & 0x10) >> 4) | ((regs[1] & 0x08) >> 2); |
| 172 | int v = ((regs[0] & 0x0E) << 1) | ((regs[1] & 0x18) >> 3); |
| 173 | |
| 174 | label_M1cxx . . $ Ui_TileViewer#label_M1.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(v & 0x02); |
| 175 | label_M2cxx . . $ Ui_TileViewer#label_M2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(v & 0x01); |
| 176 | label_M3cxx . . $ Ui_TileViewer#label_M3.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(v & 0x04); |
| 177 | label_M4cxx . . $ Ui_TileViewer#label_M4.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(v & 0x08); |
| 178 | label_M5cxx . . $ Ui_TileViewer#label_M5.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(v & 0x10); |
| 179 | |
| 180 | QStringcxx . . $ QString# modeTextcxx . . $ QString#QString(ced63f7c635d850d).; |
| 181 | int cbIndex = 6; // "not tile based" |
| 182 | int reg2mask = 255; // mask for nametable (aka pattern layout table) |
| 183 | int reg3mask = 255; // mask for colortable |
| 184 | int reg4mask = 255; // mask for patterntable |
| 185 | bool usesBlink = false; |
| 186 | switch (v) { |
| 187 | case 0: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic1"; cbIndex = 2; break; |
| 188 | case 1: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "MultiColor"; cbIndex = 4; break; |
| 189 | case 2: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Text1"; cbIndex = 0; reg3mask = 0x80; break; |
| 190 | case 4: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic2"; cbIndex = 3; reg3mask = 0x80; reg4mask = 0x3c; break; |
| 191 | case 8: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic3"; cbIndex = 5; reg3mask = 0x80; reg4mask = 0x3c; break; |
| 192 | case 10: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Text2"; cbIndex = 1; reg3mask = 0xf8; reg2mask = 0xfc; usesBlink = true; break; |
| 193 | case 12: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic4"; break; |
| 194 | case 16: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic5"; break; |
| 195 | case 20: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic6"; break; |
| 196 | case 28: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "Graphic7"; break; |
| 197 | default: modeText =cxx . . $ QString#`operator=`(d02845eef0c33901). "unknown"; break; |
| 198 | } |
| 199 | label_screenmodecxx . . $ Ui_TileViewer#label_screenmode.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(modeText); |
| 200 | |
| 201 | if (useVDPRegisterscxx . . $ Ui_TileViewer#useVDPRegisters.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) { |
| 202 | cb_screencxx . . $ Ui_TileViewer#cb_screen.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(cbIndex); |
| 203 | int nameTable = (regs[2] & reg2mask) << 10; |
| 204 | int patternTable = (regs[4] & reg4mask) << 11; |
| 205 | int colorTable = ((regs[3] & reg3mask) << 6) | (regs[10] << 14); |
| 206 | le_nametablecxx . . $ Ui_TileViewer#le_nametable.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(nameTable, 4)); |
| 207 | le_patterntablecxx . . $ Ui_TileViewer#le_patterntable.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(patternTable, 4)); |
| 208 | le_colortablecxx . . $ Ui_TileViewer#le_colortable.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(colorTable, 4)); |
| 209 | cb_blinkcolorscxx . . $ Ui_TileViewer#cb_blinkcolors.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(usesBlink ? regs[13] & 0xf0 : false); |
| 210 | cb_screenrowscxx . . $ Ui_TileViewer#cb_screenrows.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).((regs[9] & 128) ? 1 : 0 ); |
| 211 | sp_bordercolorcxx . . $ Ui_TileViewer#sp_bordercolor.->setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(regs[7] & 15); |
| 212 | cb_color0cxx . . $ Ui_TileViewer#cb_color0.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(regs[8] & 32); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | void TileViewercxx . . $ TileViewer#::refreshcxx . . $ TileViewer#refresh(49f6e7a06ebc5aa8).() |
| 217 | { |
| 218 | // All of the code is in the VDPDataStore; |
| 219 | VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().refreshcxx . . $ VDPDataStore#refresh(49f6e7a06ebc5aa8).(); |
| 220 | } |
| 221 | |
| 222 | void TileViewercxx . . $ TileViewer#::displayCharInfocxx . . $ TileViewer#displayCharInfo(9fd1ba4ff6701d34).(int screenX, int screenY, int character, const QStringcxx . . $ QString#& textInfo) |
| 223 | { |
| 224 | label_charpatcxx . . $ Ui_TileViewer#label_charpat.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(character)); |
| 225 | plainTextEditcxx . . $ Ui_TileViewer#plainTextEdit.->setPlainTextcxx . . $ QPlainTextEdit#setPlainText(3520e46b33348bf6).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("info for character %1 (%2)\n%3") |
| 226 | .argcxx . . $ QString#arg(64ab2ed17cc11715).(character) |
| 227 | .argcxx . . $ QString#arg(bc823072288cbbb5).(hexValuecxx . . $ hexValue(f4fd9db251ca774b).(character, 2)) |
| 228 | .argcxx . . $ QString#arg(bc823072288cbbb5).(textInfo)); |
| 229 | imageWidgetcxx . . $ TileViewer#imageWidget.->drawCharAtImagecxx . . $ VramTiledView#drawCharAtImage(53669dd2d54c178f).(character, screenX, screenY, image4labelcxx . . $ TileViewer#image4label.); |
| 230 | label_clickedcharimagecxx . . $ Ui_TileViewer#label_clickedcharimage.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(QPixmapcxx . . $ QPixmap#::fromImagecxx . . $ QPixmap#fromImage(e89e6101063912f).(image4labelcxx . . $ TileViewer#image4label.)); |
| 231 | } |
| 232 | |
| 233 | void TileViewercxx . . $ TileViewer#::on_cb_tilemapsource_currentIndexChangedcxx . . $ TileViewer#on_cb_tilemapsource_currentIndexChanged(d4f767463ce0a6b3).(int index) |
| 234 | { |
| 235 | imageWidgetcxx . . $ TileViewer#imageWidget.->setTabletoShowcxx . . $ VramTiledView#setTabletoShow(d4f767463ce0a6b3).(index); |
| 236 | } |
| 237 | |
| 238 | void TileViewercxx . . $ TileViewer#::on_cb_screen_currentIndexChangedcxx . . $ TileViewer#on_cb_screen_currentIndexChanged(d4f767463ce0a6b3).(int index) |
| 239 | { |
| 240 | int i = [&] { |
| 241 | switch (index) { |
| 242 | case 0: return 0; |
| 243 | case 1: return 80; |
| 244 | case 2: return 1; |
| 245 | case 3: return 2; |
| 246 | case 4: return 3; |
| 247 | case 5: return 4; |
| 248 | case 6: return 255; |
| 249 | default: return 0; |
| 250 | } |
| 251 | }(cxx . . $ TileViewer#on_cb_screen_currentIndexChanged(d4f767463ce0a6b3).$anonymous_type_0#`operator()`(455f465bc33b4cdf).); |
| 252 | imageWidgetcxx . . $ TileViewer#imageWidget.->setScreenModecxx . . $ VramTiledView#setScreenMode(d4f767463ce0a6b3).(i); |
| 253 | // blink checkbox depends on screenMode and manuel usage |
| 254 | cb_blinkcolorscxx . . $ Ui_TileViewer#cb_blinkcolors.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(i == 80 && !useVDPRegisterscxx . . $ Ui_TileViewer#useVDPRegisters.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 255 | } |
| 256 | |
| 257 | void TileViewercxx . . $ TileViewer#::on_le_nametable_textChangedcxx . . $ TileViewer#on_le_nametable_textChanged(3520e46b33348bf6).(const QStringcxx . . $ QString#& text) |
| 258 | { |
| 259 | auto font = le_nametablecxx . . $ QFont#QFont(d0a4bd0c8524b912).->fontcxx . . $ QWidget#font(c5040538afc47120).(); |
| 260 | if (auto i = stringToValuecxx . . $ stringToValue(e8c2a6ba39be27fd).<int>(text)) { |
| 261 | imageWidgetcxx . . $ TileViewer#imageWidget.->setNameTableAddresscxx . . $ VramTiledView#setNameTableAddress(d4f767463ce0a6b3).(*cxx . . $ std/optional#`operator*`(47e1a15210ec6306).i); |
| 262 | font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(false); |
| 263 | } else { |
| 264 | font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(true); |
| 265 | } |
| 266 | le_nametablecxx . . $ Ui_TileViewer#le_nametable.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(font); |
| 267 | } |
| 268 | |
| 269 | void TileViewercxx . . $ TileViewer#::on_le_colortable_textChangedcxx . . $ TileViewer#on_le_colortable_textChanged(3520e46b33348bf6).(const QStringcxx . . $ QString#& text) |
| 270 | { |
| 271 | auto font = le_colortablecxx . . $ QFont#QFont(d0a4bd0c8524b912).->fontcxx . . $ QWidget#font(c5040538afc47120).(); |
| 272 | if (auto i = stringToValuecxx . . $ stringToValue(e8c2a6ba39be27fd).<int>(text)) { |
| 273 | imageWidgetcxx . . $ TileViewer#imageWidget.->setColorTableAddresscxx . . $ VramTiledView#setColorTableAddress(d4f767463ce0a6b3).(*cxx . . $ std/optional#`operator*`(47e1a15210ec6306).i); |
| 274 | font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(false); |
| 275 | } else { |
| 276 | font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(true); |
| 277 | } |
| 278 | le_colortablecxx . . $ Ui_TileViewer#le_colortable.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(font); |
| 279 | } |
| 280 | |
| 281 | void TileViewercxx . . $ TileViewer#::on_le_patterntable_textChangedcxx . . $ TileViewer#on_le_patterntable_textChanged(3520e46b33348bf6).(const QStringcxx . . $ QString#& text) |
| 282 | { |
| 283 | auto font = le_patterntablecxx . . $ QFont#QFont(d0a4bd0c8524b912).->fontcxx . . $ QWidget#font(c5040538afc47120).(); |
| 284 | if (auto i = stringToValuecxx . . $ stringToValue(e8c2a6ba39be27fd).<int>(text)) { |
| 285 | imageWidgetcxx . . $ TileViewer#imageWidget.->setPatternTableAddresscxx . . $ VramTiledView#setPatternTableAddress(d4f767463ce0a6b3).(*cxx . . $ std/optional#`operator*`(47e1a15210ec6306).i); |
| 286 | font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(false); |
| 287 | } else { |
| 288 | font.setItaliccxx . . $ QFont#setItalic(b45ddcbc8423892c).(true); |
| 289 | } |
| 290 | le_patterntablecxx . . $ Ui_TileViewer#le_patterntable.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(font); |
| 291 | } |
| 292 | |
| 293 | void TileViewercxx . . $ TileViewer#::on_cb_color0_stateChangedcxx . . $ TileViewer#on_cb_color0_stateChanged(d4f767463ce0a6b3).(int state) |
| 294 | { |
| 295 | imageWidgetcxx . . $ TileViewer#imageWidget.->setTpBitcxx . . $ VramTiledView#setTpBit(b45ddcbc8423892c).(state != Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 296 | } |
| 297 | |
| 298 | void TileViewercxx . . $ TileViewer#::on_useVDPRegisters_stateChangedcxx . . $ TileViewer#on_useVDPRegisters_stateChanged(d4f767463ce0a6b3).(int state) |
| 299 | { |
| 300 | bool useManual = state == Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.; |
| 301 | const uint8_tcxx . . $ uint8_t#* regs = VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().getRegsPointercxx . . $ VDPDataStore#getRegsPointer(7eb257f306f79f97).(); |
| 302 | decodeVDPregscxx . . $ TileViewer#decodeVDPregs(49f6e7a06ebc5aa8).(); |
| 303 | cb_screencxx . . $ Ui_TileViewer#cb_screen.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 304 | le_colortablecxx . . $ Ui_TileViewer#le_colortable.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 305 | le_nametablecxx . . $ Ui_TileViewer#le_nametable.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 306 | le_patterntablecxx . . $ Ui_TileViewer#le_patterntable.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 307 | cb_screenrowscxx . . $ Ui_TileViewer#cb_screenrows.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 308 | cb_screenrowscxx . . $ Ui_TileViewer#cb_screenrows.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(regs[9] & 128 ? 1 : 0); |
| 309 | sp_bordercolorcxx . . $ Ui_TileViewer#sp_bordercolor.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 310 | int v = ((regs[0] & 0x0E) << 1) | ((regs[1] & 0x18) >> 3); |
| 311 | cb_blinkcolorscxx . . $ Ui_TileViewer#cb_blinkcolors.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual && v == 10); // screenMode == 80 |
| 312 | cb_color0cxx . . $ Ui_TileViewer#cb_color0.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(useManual); |
| 313 | } |
| 314 | |
| 315 | void TileViewercxx . . $ TileViewer#::on_editPaletteButton_clickedcxx . . $ TileViewer#on_editPaletteButton_clicked(b45ddcbc8423892c).(bool /*checked*/) |
| 316 | { |
| 317 | auto* p = new PaletteDialogcxx . . $ PaletteDialog#(); |
| 318 | p->setPalettecxx . . $ PaletteDialog#setPalette(f25546b61a629de7).(currentPalettecxx . . $ currentPalette.); |
| 319 | p->setAutoSynccxx . . $ PaletteDialog#setAutoSync(b45ddcbc8423892c).(true); |
| 320 | connectcxx . . $ QObject#connect(835f87066c895669).(p, &PaletteDialogcxx . . $ PaletteDialog#::paletteSyncedcxx . . $ PaletteDialog#paletteSynced(49f6e7a06ebc5aa8)., imageWidgetcxx . . $ TileViewer#imageWidget., &VramTiledViewcxx . . $ VramTiledView#::refreshcxx . . $ VramTiledView#refresh(49f6e7a06ebc5aa8).); |
| 321 | connectcxx . . $ QObject#connect(835f87066c895669).(p, &PaletteDialogcxx . . $ PaletteDialog#::paletteSyncedcxx . . $ PaletteDialog#paletteSynced(49f6e7a06ebc5aa8)., this, &TileViewercxx . . $ TileViewer#::update_label_characterimagecxx . . $ TileViewer#update_label_characterimage(49f6e7a06ebc5aa8).); |
| 322 | p->showcxx . . $ QWidget#show(49f6e7a06ebc5aa8).(); |
| 323 | //useVDPPalette->setChecked(false); |
| 324 | //QMessageBox::information( |
| 325 | // this, |
| 326 | // "Not yet implemented", |
| 327 | // "Sorry, the palette editor is not yet implemented, " |
| 328 | // "only disabling 'Use VDP palette registers' for now"); |
| 329 | } |
| 330 | |
| 331 | void TileViewercxx . . $ TileViewer#::on_useVDPPalette_stateChangedcxx . . $ TileViewer#on_useVDPPalette_stateChanged(d4f767463ce0a6b3).(int state) |
| 332 | { |
| 333 | const uint8_tcxx . . $ uint8_t#* palette = VDPDataStorecxx . . $ VDPDataStore#::instancecxx . . $ VDPDataStore#instance(6179f7cf4255f5b).().getPalettePointercxx . . $ VDPDataStore#getPalettePointer(7eb257f306f79f97).(); |
| 334 | if (state) { |
| 335 | imageWidgetcxx . . $ TileViewer#imageWidget.->setPaletteSourcecxx . . $ VramTiledView#setPaletteSource(28caea9380bfac8a).(palette); |
| 336 | } else { |
| 337 | if (palette) memcpy(currentPalettecxx . . $ currentPalette., palette, 32); |
| 338 | imageWidgetcxx . . $ TileViewer#imageWidget.->setPaletteSourcecxx . . $ VramTiledView#setPaletteSource(28caea9380bfac8a).(currentPalettecxx . . $ currentPalette.); |
| 339 | } |
| 340 | imageWidgetcxx . . $ TileViewer#imageWidget.->refreshcxx . . $ VramTiledView#refresh(49f6e7a06ebc5aa8).(); |
| 341 | editPaletteButtoncxx . . $ Ui_TileViewer#editPaletteButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!state); |
| 342 | } |
| 343 | |
| 344 | void TileViewercxx . . $ TileViewer#::on_zoomLevel_valueChangedcxx . . $ TileViewer#on_zoomLevel_valueChanged(ba8836b59fb42830).(double d) |
| 345 | { |
| 346 | imageWidgetcxx . . $ TileViewer#imageWidget.->setZoomcxx . . $ VramTiledView#setZoom(9364e6e7bff7660).(float(d)); |
| 347 | } |
| 348 | |
| 349 | void TileViewercxx . . $ TileViewer#::on_cb_drawgrid_stateChangedcxx . . $ TileViewer#on_cb_drawgrid_stateChanged(d4f767463ce0a6b3).(int state) |
| 350 | { |
| 351 | imageWidgetcxx . . $ TileViewer#imageWidget.->setDrawGridcxx . . $ VramTiledView#setDrawGrid(b45ddcbc8423892c).(state == Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 352 | } |
| 353 | |
| 354 | void TileViewercxx . . $ TileViewer#::on_cb_highlight_stateChangedcxx . . $ TileViewer#on_cb_highlight_stateChanged(d4f767463ce0a6b3).(int state) |
| 355 | { |
| 356 | imageWidgetcxx . . $ TileViewer#imageWidget.->setHighlightCharcxx . . $ VramTiledView#setHighlightChar(d4f767463ce0a6b3).(state == Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked. ? -1 : sp_highlightcxx . . $ Ui_TileViewer#sp_highlight.->valuecxx . . $ QSpinBox#value(455f465bc33b4cdf).()); |
| 357 | } |
| 358 | |
| 359 | void TileViewercxx . . $ TileViewer#::on_sp_highlight_valueChangedcxx . . $ TileViewer#on_sp_highlight_valueChanged(d4f767463ce0a6b3).(int i) |
| 360 | { |
| 361 | if (cb_highlightcxx . . $ Ui_TileViewer#cb_highlight.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) { |
| 362 | imageWidgetcxx . . $ TileViewer#imageWidget.->setHighlightCharcxx . . $ VramTiledView#setHighlightChar(d4f767463ce0a6b3).(i); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | void TileViewercxx . . $ TileViewer#::on_sp_bordercolor_valueChangedcxx . . $ TileViewer#on_sp_bordercolor_valueChanged(d4f767463ce0a6b3).(int i) |
| 367 | { |
| 368 | imageWidgetcxx . . $ TileViewer#imageWidget.->setBorderColorcxx . . $ VramTiledView#setBorderColor(d4f767463ce0a6b3).(i); |
| 369 | } |
| 370 | |
| 371 | void TileViewercxx . . $ TileViewer#::on_cb_blinkcolors_stateChangedcxx . . $ TileViewer#on_cb_blinkcolors_stateChanged(d4f767463ce0a6b3).(int arg1) |
| 372 | { |
| 373 | imageWidgetcxx . . $ TileViewer#imageWidget.->setUseBlinkcxx . . $ VramTiledView#setUseBlink(b45ddcbc8423892c).(arg1 == Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 374 | } |
| 375 | |
| 376 | void TileViewercxx . . $ TileViewer#::on_cb_screenrows_currentIndexChangedcxx . . $ TileViewer#on_cb_screenrows_currentIndexChanged(d4f767463ce0a6b3).(int index) |
| 377 | { |
| 378 | auto rows = cb_screenrowscxx . . $ Ui_TileViewer#cb_screenrows.->isEnabledcxx . . $ QWidget#isEnabled(50ce9a9e25b4a850).() ? (index == 0 ? 24.0f : |
| 379 | index == 1 ? 26.5f |
| 380 | : 32.0f) |
| 381 | : 0.0f; |
| 382 | imageWidgetcxx . . $ TileViewer#imageWidget.->setForcedScreenRowscxx . . $ VramTiledView#setForcedScreenRows(9364e6e7bff7660).(rows); |
| 383 | } |