HD Pack Builder update
1. Removed an unused parameter in ProcessTile function call. 2 Added a warning to the tool tip of 8x16 sprite option about when it should be used. 3. Added an option to output BG tiles only or Sprite tiles only.
This commit is contained in:
parent
e66b1aa804
commit
eaf6656b56
10 changed files with 121 additions and 24 deletions
|
@ -1243,7 +1243,7 @@ void Console::LoadHdPack(VirtualFile &romFile, VirtualFile &patchFile)
|
|||
}
|
||||
}
|
||||
|
||||
void Console::StartRecordingHdPack(string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize)
|
||||
void Console::StartRecordingHdPack(string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, uint32_t outTileType)
|
||||
{
|
||||
ConsolePauseHelper helper(this);
|
||||
|
||||
|
@ -1251,7 +1251,7 @@ void Console::StartRecordingHdPack(string saveFolder, ScaleFilterType filterType
|
|||
SaveState(saveState);
|
||||
|
||||
_hdPackBuilder.reset();
|
||||
_hdPackBuilder.reset(new HdPackBuilder(shared_from_this(), saveFolder, filterType, scale, flags, chrRamBankSize, !_mapper->HasChrRom()));
|
||||
_hdPackBuilder.reset(new HdPackBuilder(shared_from_this(), saveFolder, filterType, scale, flags, chrRamBankSize, outTileType, !_mapper->HasChrRom()));
|
||||
|
||||
_memoryManager->UnregisterIODevice(_ppu.get());
|
||||
_ppu.reset();
|
||||
|
|
|
@ -227,7 +227,7 @@ public:
|
|||
shared_ptr<HdPackData> GetHdData();
|
||||
bool IsHdPpu();
|
||||
|
||||
void StartRecordingHdPack(string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize);
|
||||
void StartRecordingHdPack(string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, uint32_t outTileType);
|
||||
void StopRecordingHdPack();
|
||||
|
||||
void CopyRewindData(shared_ptr<Console> sourceConsole);
|
||||
|
|
|
@ -77,7 +77,7 @@ protected:
|
|||
}
|
||||
_console->GetMapper()->CopyChrTile(_lastSprite->AbsoluteTileAddr & 0xFFFFFFF0, sprite.TileData);
|
||||
|
||||
_hdPackBuilder->ProcessTile(_cycle - 1, _scanline, _lastSprite->AbsoluteTileAddr, sprite, mapper, false, _bankHashes[_lastSprite->TileAddr / _chrRamBankSize], false);
|
||||
_hdPackBuilder->ProcessTile(_cycle - 1, _scanline, _lastSprite->AbsoluteTileAddr, sprite, mapper, _bankHashes[_lastSprite->TileAddr / _chrRamBankSize], false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ protected:
|
|||
tile.OffsetY = lastTile->OffsetY;
|
||||
_console->GetMapper()->CopyChrTile(lastTile->AbsoluteTileAddr & 0xFFFFFFF0, tile.TileData);
|
||||
|
||||
_hdPackBuilder->ProcessTile(_cycle - 1, _scanline, lastTile->AbsoluteTileAddr, tile, mapper, false, _bankHashes[lastTile->TileAddr / _chrRamBankSize], hasBgSprite);
|
||||
_hdPackBuilder->ProcessTile(_cycle - 1, _scanline, lastTile->AbsoluteTileAddr, tile, mapper, _bankHashes[lastTile->TileAddr / _chrRamBankSize], hasBgSprite);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
|
||||
HdPackBuilder* HdPackBuilder::_instance = nullptr;
|
||||
|
||||
enum HDPackOuputTileType
|
||||
{
|
||||
Both = 0,
|
||||
BG = 1,
|
||||
Sprite = 2
|
||||
};
|
||||
|
||||
enum HdPackRecordFlags
|
||||
{
|
||||
None = 0,
|
||||
|
@ -19,7 +26,7 @@ enum HdPackRecordFlags
|
|||
SaveFrame = 16,
|
||||
};
|
||||
|
||||
HdPackBuilder::HdPackBuilder(shared_ptr<Console> console, string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, bool isChrRam)
|
||||
HdPackBuilder::HdPackBuilder(shared_ptr<Console> console, string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, uint32_t outTileType, bool isChrRam)
|
||||
{
|
||||
_console = console;
|
||||
_saveFolder = saveFolder;
|
||||
|
@ -27,6 +34,7 @@ HdPackBuilder::HdPackBuilder(shared_ptr<Console> console, string saveFolder, Sca
|
|||
_chrRamBankSize = chrRamBankSize;
|
||||
_flags = flags;
|
||||
_isChrRam = isChrRam;
|
||||
_outTileType = outTileType;
|
||||
_hasNewTile = false;
|
||||
_frameID = 0;
|
||||
string existingPackDefinition = FolderUtilities::CombinePath(saveFolder, "hires.txt");
|
||||
|
@ -211,7 +219,7 @@ void HdPackBuilder::AddTile(HdPackTileInfo *tile, uint32_t usageCount)
|
|||
_hasNewTile = true;
|
||||
}
|
||||
|
||||
void HdPackBuilder::ProcessTile(uint32_t x, uint32_t y, uint16_t tileAddr, HdPpuTileInfo &tile, BaseMapper *mapper, bool isSprite, uint32_t chrBankHash, bool transparencyRequired)
|
||||
void HdPackBuilder::ProcessTile(uint32_t x, uint32_t y, uint16_t tileAddr, HdPpuTileInfo &tile, BaseMapper *mapper, uint32_t chrBankHash, bool transparencyRequired)
|
||||
{
|
||||
if(_flags & HdPackRecordFlags::IgnoreOverscan) {
|
||||
OverscanDimensions overscan = _console->GetSettings()->GetOverscanDimensions();
|
||||
|
@ -221,6 +229,14 @@ void HdPackBuilder::ProcessTile(uint32_t x, uint32_t y, uint16_t tileAddr, HdPpu
|
|||
}
|
||||
}
|
||||
|
||||
if(_outTileType == HDPackOuputTileType::BG && tile.IsSpriteTile()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_outTileType == HDPackOuputTileType::Sprite && !tile.IsSpriteTile()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto result = _tileUsageCount.find(tile.GetKey(false));
|
||||
if(result == _tileUsageCount.end()) {
|
||||
//Check to see if a default tile matches
|
||||
|
|
|
@ -31,6 +31,7 @@ private:
|
|||
string _saveFolder;
|
||||
string _romName;
|
||||
uint32_t _flags;
|
||||
uint32_t _outTileType;
|
||||
bool _hasNewTile;
|
||||
uint32_t _frameID;
|
||||
vector<HdScreenTileInfo> spritesOnScreen;
|
||||
|
@ -46,11 +47,11 @@ private:
|
|||
void DrawTile(HdPackTileInfo *tile, int tileIndex, uint32_t* pngBuffer, int pageNumber, bool containsSpritesOnly);
|
||||
|
||||
public:
|
||||
HdPackBuilder(shared_ptr<Console> console, string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, bool isChrRam);
|
||||
HdPackBuilder(shared_ptr<Console> console, string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, uint32_t outTileType, bool isChrRam);
|
||||
~HdPackBuilder();
|
||||
|
||||
void endFrame();
|
||||
void ProcessTile(uint32_t x, uint32_t y, uint16_t tileAddr, HdPpuTileInfo& tile, BaseMapper* mapper, bool isSprite, uint32_t chrBankHash, bool transparencyRequired);
|
||||
void ProcessTile(uint32_t x, uint32_t y, uint16_t tileAddr, HdPpuTileInfo& tile, BaseMapper* mapper, uint32_t chrBankHash, bool transparencyRequired);
|
||||
void SaveHdPack();
|
||||
|
||||
static void GetChrBankList(uint32_t *banks);
|
||||
|
|
|
@ -625,6 +625,7 @@
|
|||
<Control ID="chkGroupBlankTiles">Group blank tiles</Control>
|
||||
<Control ID="chkIgnoreOverscan">Ignore tiles at the edges of the screen (overscan)</Control>
|
||||
<Control ID="chkSaveFrame">Save frames which the tiles are first shown</Control>
|
||||
<Control ID="chkTileType">Choose which tiles are recorded</Control>
|
||||
<Control ID="lblFolder">Save Folder:</Control>
|
||||
<Control ID="btnSelectFolder">Browse...</Control>
|
||||
<Control ID="btnStartRecording">Start Recording</Control>
|
||||
|
@ -868,9 +869,10 @@
|
|||
<Message ID="HdPackBuilderBankSizeHelp">This option is only available for CHR RAM games. CHR RAM games have no
fixed "banks" - they are dynamically created by the game's code.
This option alters the HD Pack Builder's behavior when grouping the tiles into 
the PNG files - a smaller bank size will usually result in less PNG 
files (but depending on the game's code, larger values may produce 
better results).</Message>
|
||||
<Message ID="HdPackBuilderFrequencyHelp">When this option is enabled, the tiles in PNG files are sorted by the
frequency at which they are shown on the screen while recording (more 
common palettes will be grouped together in the first PNG for a specific bank 
number. If this option is unchecked, the PNGs will be sorted by palette - 
each PNG will only contain up to 4 different colors in this case.</Message>
|
||||
<Message ID="HdPackBuilderGroupBlankHelp">This option groups all the blank tiles sequentially into the same PNG
files - this helps reduce the number of PNG files produced by removing 
almost-empty PNG files containing only blank tiles.</Message>
|
||||
<Message ID="HdPackBuilderLargeSpritesHelp">When enabled, this option will alter the display order of CHR banks
that contain only sprites to make the sprites easier to edit in the PNG file.</Message>
|
||||
<Message ID="HdPackBuilderLargeSpritesHelp">When enabled, this option will alter the display order of CHR banks
that contain only sprites to make the sprites easier to edit in the PNG file.
This should be used only when the game is a CHR-ROM game and uses 8x16 sprites.</Message>
|
||||
<Message ID="HdPackBuilderIgnoreOverscanHelp">When enabled, this will make the builder ignore any pixels in the overscan area.
This is useful in games that contain glitches on the outer edge of the screen.
Incorrect palette combinations due to these glitches will be ignored and won't be shown in the PNG files.</Message>
|
||||
<Message ID="HdPackBuilderSaveFrameHelp">When enabled, the builder will save a screenshot and the composition of the screen in the pack folder when it encounters new tile in a frame.
This is useful for checking where that tile is used.
These files are not needed in the pack and should be deleted when sharing the pack.</Message>
|
||||
<Message ID="HdPackBuilderTileTypeHelp">Choose which of the tiles are recorded</Message>
|
||||
|
||||
<Message ID="InstallHdPackWrongRom">The selected HD Pack is not compatible with the currently running game and cannot be installed.</Message>
|
||||
<Message ID="InstallHdPackError">An error occurred while trying to install the HD Pack: 

{0}</Message>
|
||||
|
@ -1373,5 +1375,10 @@
|
|||
<Value ID="GenericMulticart">Generic Multicart</Value>
|
||||
<Value ID="SnesControllers">SNES Controllers</Value>
|
||||
</Enum>
|
||||
<Enum ID="HDPackOuputTileType">
|
||||
<Value ID="Both">BG + Sprite</Value>
|
||||
<Value ID="BG">BG Only</Value>
|
||||
<Value ID="Sprite">Sprite Only</Value>
|
||||
</Enum>
|
||||
</Enums>
|
||||
</Resources>
|
|
@ -62,6 +62,10 @@
|
|||
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.chkSaveFrame = new System.Windows.Forms.CheckBox();
|
||||
this.picSaveFrameHelp = new System.Windows.Forms.PictureBox();
|
||||
this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.cboTileType = new System.Windows.Forms.ComboBox();
|
||||
this.picTileTypeHelp = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btnSelectFolder = new System.Windows.Forms.Button();
|
||||
this.txtSaveFolder = new System.Windows.Forms.TextBox();
|
||||
|
@ -87,6 +91,8 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.picScaleHelp)).BeginInit();
|
||||
this.flowLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picSaveFrameHelp)).BeginInit();
|
||||
this.flowLayoutPanel7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picTileTypeHelp)).BeginInit();
|
||||
this.tableLayoutPanel4.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -240,10 +246,12 @@
|
|||
this.tableLayoutPanel2.Controls.Add(this.flpBankSize, 1, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel6, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel2, 0, 7);
|
||||
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel7, 1, 8);
|
||||
this.tableLayoutPanel2.Controls.Add(this.label1, 0, 8);
|
||||
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 18);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 9;
|
||||
this.tableLayoutPanel2.RowCount = 10;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
|
@ -252,7 +260,8 @@
|
|||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(325, 265);
|
||||
this.tableLayoutPanel2.TabIndex = 0;
|
||||
//
|
||||
|
@ -285,7 +294,7 @@
|
|||
this.picIgnoreOverscanHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picIgnoreOverscanHelp.Location = new System.Drawing.Point(256, 3);
|
||||
this.picIgnoreOverscanHelp.Name = "picIgnoreOverscanHelp";
|
||||
this.picIgnoreOverscanHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picIgnoreOverscanHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picIgnoreOverscanHelp.TabIndex = 18;
|
||||
this.picIgnoreOverscanHelp.TabStop = false;
|
||||
//
|
||||
|
@ -340,7 +349,7 @@
|
|||
this.picGroupBlankHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picGroupBlankHelp.Location = new System.Drawing.Point(113, 3);
|
||||
this.picGroupBlankHelp.Name = "picGroupBlankHelp";
|
||||
this.picGroupBlankHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picGroupBlankHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picGroupBlankHelp.TabIndex = 12;
|
||||
this.picGroupBlankHelp.TabStop = false;
|
||||
//
|
||||
|
@ -375,7 +384,7 @@
|
|||
this.picFrequencyHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picFrequencyHelp.Location = new System.Drawing.Point(175, 3);
|
||||
this.picFrequencyHelp.Name = "picFrequencyHelp";
|
||||
this.picFrequencyHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picFrequencyHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picFrequencyHelp.TabIndex = 12;
|
||||
this.picFrequencyHelp.TabStop = false;
|
||||
//
|
||||
|
@ -408,7 +417,7 @@
|
|||
this.picLargeSpritesHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picLargeSpritesHelp.Location = new System.Drawing.Point(170, 3);
|
||||
this.picLargeSpritesHelp.Name = "picLargeSpritesHelp";
|
||||
this.picLargeSpritesHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picLargeSpritesHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picLargeSpritesHelp.TabIndex = 12;
|
||||
this.picLargeSpritesHelp.TabStop = false;
|
||||
//
|
||||
|
@ -444,7 +453,7 @@
|
|||
this.picBankSizeHelp.Location = new System.Drawing.Point(114, 6);
|
||||
this.picBankSizeHelp.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.picBankSizeHelp.Name = "picBankSizeHelp";
|
||||
this.picBankSizeHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picBankSizeHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picBankSizeHelp.TabIndex = 12;
|
||||
this.picBankSizeHelp.TabStop = false;
|
||||
//
|
||||
|
@ -476,7 +485,7 @@
|
|||
this.picScaleHelp.Location = new System.Drawing.Point(114, 6);
|
||||
this.picScaleHelp.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.picScaleHelp.Name = "picScaleHelp";
|
||||
this.picScaleHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picScaleHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picScaleHelp.TabIndex = 12;
|
||||
this.picScaleHelp.TabStop = false;
|
||||
//
|
||||
|
@ -509,10 +518,52 @@
|
|||
this.picSaveFrameHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picSaveFrameHelp.Location = new System.Drawing.Point(229, 3);
|
||||
this.picSaveFrameHelp.Name = "picSaveFrameHelp";
|
||||
this.picSaveFrameHelp.Size = new System.Drawing.Size(16, 15);
|
||||
this.picSaveFrameHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picSaveFrameHelp.TabIndex = 19;
|
||||
this.picSaveFrameHelp.TabStop = false;
|
||||
//
|
||||
// flowLayoutPanel7
|
||||
//
|
||||
this.flowLayoutPanel7.Controls.Add(this.cboTileType);
|
||||
this.flowLayoutPanel7.Controls.Add(this.picTileTypeHelp);
|
||||
this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel7.Location = new System.Drawing.Point(88, 140);
|
||||
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
|
||||
this.flowLayoutPanel7.Size = new System.Drawing.Size(237, 22);
|
||||
this.flowLayoutPanel7.TabIndex = 22;
|
||||
//
|
||||
// cboTileType
|
||||
//
|
||||
this.cboTileType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboTileType.DropDownWidth = 105;
|
||||
this.cboTileType.FormattingEnabled = true;
|
||||
this.cboTileType.Location = new System.Drawing.Point(3, 3);
|
||||
this.cboTileType.Name = "cboTileType";
|
||||
this.cboTileType.Size = new System.Drawing.Size(105, 20);
|
||||
this.cboTileType.TabIndex = 0;
|
||||
//
|
||||
// picTileTypeHelp
|
||||
//
|
||||
this.picTileTypeHelp.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.picTileTypeHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help;
|
||||
this.picTileTypeHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picTileTypeHelp.Location = new System.Drawing.Point(114, 5);
|
||||
this.picTileTypeHelp.Name = "picTileTypeHelp";
|
||||
this.picTileTypeHelp.Size = new System.Drawing.Size(16, 16);
|
||||
this.picTileTypeHelp.TabIndex = 20;
|
||||
this.picTileTypeHelp.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 145);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||
this.label1.TabIndex = 21;
|
||||
this.label1.Text = "Tile Type:";
|
||||
//
|
||||
// tableLayoutPanel4
|
||||
//
|
||||
this.tableLayoutPanel4.ColumnCount = 3;
|
||||
|
@ -608,6 +659,8 @@
|
|||
this.flowLayoutPanel2.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picSaveFrameHelp)).EndInit();
|
||||
this.flowLayoutPanel7.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picTileTypeHelp)).EndInit();
|
||||
this.tableLayoutPanel4.ResumeLayout(false);
|
||||
this.tableLayoutPanel4.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
@ -655,5 +708,9 @@
|
|||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||
private System.Windows.Forms.CheckBox chkSaveFrame;
|
||||
private System.Windows.Forms.PictureBox picSaveFrameHelp;
|
||||
}
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel7;
|
||||
private System.Windows.Forms.ComboBox cboTileType;
|
||||
private System.Windows.Forms.PictureBox picTileTypeHelp;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
|
@ -44,8 +44,14 @@ namespace Mesen.GUI.Forms.HdPackEditor
|
|||
toolTip.SetToolTip(picLargeSpritesHelp, ResourceHelper.GetMessage("HdPackBuilderLargeSpritesHelp"));
|
||||
toolTip.SetToolTip(picIgnoreOverscanHelp, ResourceHelper.GetMessage("HdPackBuilderIgnoreOverscanHelp"));
|
||||
toolTip.SetToolTip(picSaveFrameHelp, ResourceHelper.GetMessage("HdPackBuilderSaveFrameHelp"));
|
||||
toolTip.SetToolTip(picTileTypeHelp, ResourceHelper.GetMessage("HdPackBuilderTileTypeHelp"));
|
||||
|
||||
UpdateUI(false);
|
||||
cboTileType.Items.Add(ResourceHelper.GetEnumText(HDPackOuputTileType.Both));
|
||||
cboTileType.Items.Add(ResourceHelper.GetEnumText(HDPackOuputTileType.BG));
|
||||
cboTileType.Items.Add(ResourceHelper.GetEnumText(HDPackOuputTileType.Sprite));
|
||||
cboTileType.SelectedIndex = 0;
|
||||
|
||||
UpdateUI(false);
|
||||
}
|
||||
|
||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||
|
@ -126,6 +132,7 @@ namespace Mesen.GUI.Forms.HdPackEditor
|
|||
chkGroupBlankTiles.Enabled = !isRecording;
|
||||
chkIgnoreOverscan.Enabled = !isRecording;
|
||||
chkSaveFrame.Enabled = !isRecording;
|
||||
cboTileType.Enabled = !isRecording;
|
||||
|
||||
cboChrBankSize.Enabled = !isRecording;
|
||||
cboScale.Enabled = !isRecording;
|
||||
|
@ -162,7 +169,8 @@ namespace Mesen.GUI.Forms.HdPackEditor
|
|||
if(chkSaveFrame.Checked) {
|
||||
flags |= HdPackRecordFlags.SaveFrame;
|
||||
}
|
||||
InteropEmu.HdBuilderStartRecording(txtSaveFolder.Text, ((FilterInfo)cboScale.SelectedItem).FilterType, ((FilterInfo)cboScale.SelectedItem).Scale, flags, (UInt32)Math.Pow(2, cboChrBankSize.SelectedIndex) * 0x400);
|
||||
HDPackOuputTileType tileType = (HDPackOuputTileType)cboTileType.SelectedIndex;
|
||||
InteropEmu.HdBuilderStartRecording(txtSaveFolder.Text, ((FilterInfo)cboScale.SelectedItem).FilterType, ((FilterInfo)cboScale.SelectedItem).Scale, flags, (UInt32)Math.Pow(2, cboChrBankSize.SelectedIndex) * 0x400, tileType);
|
||||
tmrRefresh.Start();
|
||||
|
||||
UpdateUI(true);
|
||||
|
|
|
@ -678,7 +678,8 @@ namespace Mesen.GUI
|
|||
ScaleFilterType filterType,
|
||||
UInt32 scale,
|
||||
HdPackRecordFlags flags,
|
||||
UInt32 chrRamBankSize);
|
||||
UInt32 chrRamBankSize,
|
||||
HDPackOuputTileType tileType);
|
||||
|
||||
[DllImport(DLLPath)] public static extern void HdBuilderStopRecording();
|
||||
|
||||
|
@ -2356,6 +2357,13 @@ namespace Mesen.GUI
|
|||
Prescale10x = 24,
|
||||
}
|
||||
|
||||
public enum HDPackOuputTileType
|
||||
{
|
||||
Both = 0,
|
||||
BG = 1,
|
||||
Sprite= 2
|
||||
}
|
||||
|
||||
public enum VideoResizeFilter
|
||||
{
|
||||
NearestNeighbor = 0,
|
||||
|
|
|
@ -769,7 +769,7 @@ namespace InteropEmu {
|
|||
|
||||
DllExport bool __stdcall IsHdPpu() { return _console->IsHdPpu(); }
|
||||
|
||||
DllExport void __stdcall HdBuilderStartRecording(char* saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize) { _console->StartRecordingHdPack(saveFolder, filterType, scale, flags, chrRamBankSize); }
|
||||
DllExport void __stdcall HdBuilderStartRecording(char* saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize, uint32_t outTileType) { _console->StartRecordingHdPack(saveFolder, filterType, scale, flags, chrRamBankSize, outTileType); }
|
||||
DllExport void __stdcall HdBuilderStopRecording() { _console->StopRecordingHdPack(); }
|
||||
|
||||
DllExport void __stdcall HdBuilderGetChrBankList(uint32_t* bankBuffer) { HdPackBuilder::GetChrBankList(bankBuffer); }
|
||||
|
|
Loading…
Add table
Reference in a new issue