mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Return type of PutData is MxResult
This commit is contained in:
parent
d46f2e094b
commit
cfb7e0a974
@ -88,7 +88,7 @@ void MxEventPresenter::StartingTickle()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c2ef0
|
||||
undefined4 MxEventPresenter::PutData()
|
||||
MxResult MxEventPresenter::PutData()
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
@ -113,5 +113,5 @@ undefined4 MxEventPresenter::PutData()
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ class MxEventPresenter : public MxMediaPresenter {
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual undefined4 PutData() override; // vtable+0x4c
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void CopyData(MxStreamChunk* p_chunk); // vtable+0x5c
|
||||
|
||||
private:
|
||||
|
||||
@ -45,7 +45,7 @@ void MxLoopingMIDIPresenter::DoneTickle()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c2b00
|
||||
undefined4 MxLoopingMIDIPresenter::PutData()
|
||||
MxResult MxLoopingMIDIPresenter::PutData()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
@ -55,5 +55,5 @@ undefined4 MxLoopingMIDIPresenter::PutData()
|
||||
}
|
||||
|
||||
m_criticalSection.Leave();
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ class MxLoopingMIDIPresenter : public MxMIDIPresenter {
|
||||
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual undefined4 PutData() override; // vtable+0x4c
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
};
|
||||
|
||||
#endif // MXLOOPINGMIDIPRESENTER_H
|
||||
|
||||
@ -94,7 +94,7 @@ void MxMIDIPresenter::Destroy()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c2970
|
||||
undefined4 MxMIDIPresenter::PutData()
|
||||
MxResult MxMIDIPresenter::PutData()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
@ -106,7 +106,7 @@ undefined4 MxMIDIPresenter::PutData()
|
||||
}
|
||||
|
||||
m_criticalSection.Leave();
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c29e0
|
||||
|
||||
@ -30,7 +30,7 @@ class MxMIDIPresenter : public MxMusicPresenter {
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual undefined4 PutData() override; // vtable+0x4c
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
|
||||
private:
|
||||
|
||||
@ -96,9 +96,9 @@ MxBool MxPresenter::HasTickleStatePassed(TickleState p_tickleState)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1000bfc0
|
||||
undefined4 MxPresenter::PutData()
|
||||
MxResult MxPresenter::PutData()
|
||||
{
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1000bfd0
|
||||
|
||||
@ -61,7 +61,7 @@ class MxPresenter : public MxCore {
|
||||
__declspec(dllexport) virtual void EndAction(); // vtable+0x40
|
||||
virtual void SetTickleState(TickleState p_tickleState); // vtable+0x44
|
||||
virtual MxBool HasTickleStatePassed(TickleState p_tickleState); // vtable+0x48
|
||||
virtual undefined4 PutData(); // vtable+0x4c
|
||||
virtual MxResult PutData(); // vtable+0x4c
|
||||
virtual MxBool IsHit(MxS32 p_x, MxS32 p_y); // vtable+0x50
|
||||
__declspec(dllexport) virtual void Enable(MxBool p_enable); // vtable+0x54
|
||||
|
||||
|
||||
@ -477,14 +477,14 @@ void MxVideoPresenter::EndAction()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b3280
|
||||
undefined4 MxVideoPresenter::PutData()
|
||||
MxResult MxVideoPresenter::PutData()
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (IsEnabled() && m_currentTickleState >= TickleState_Streaming && m_currentTickleState <= TickleState_unk5)
|
||||
VTable0x6c();
|
||||
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b3300
|
||||
|
||||
@ -41,7 +41,7 @@ class MxVideoPresenter : public MxMediaPresenter {
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual undefined4 PutData() override; // vtable+0x4c
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk); // vtable+0x5c
|
||||
virtual void CreateBitmap(); // vtable+0x60
|
||||
|
||||
@ -245,7 +245,7 @@ void MxWavePresenter::AppendChunk(MxStreamChunk* p_chunk)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b2160
|
||||
undefined4 MxWavePresenter::PutData()
|
||||
MxResult MxWavePresenter::PutData()
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
@ -276,7 +276,7 @@ undefined4 MxWavePresenter::PutData()
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b2280
|
||||
|
||||
@ -34,7 +34,7 @@ class MxWavePresenter : public MxSoundPresenter {
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual undefined4 PutData() override; // vtable+0x4c
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void AppendChunk(MxStreamChunk* p_chunk) override; // vtable+0x58
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
|
||||
274
out.html
Normal file
274
out.html
Normal file
@ -0,0 +1,274 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Decompilation Status</title>
|
||||
<style>
|
||||
body {
|
||||
background: #202020;
|
||||
color: #f0f0f0;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 800px;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#search {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: #303030;
|
||||
color: #f0f0f0;
|
||||
border: 1px #f0f0f0 solid;
|
||||
padding: 0.5em;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
#search::placeholder {
|
||||
color: #b0b0b0;
|
||||
}
|
||||
|
||||
#listing {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.funcrow:hover {
|
||||
background: #404040 !important;
|
||||
}
|
||||
|
||||
.funcrow:nth-child(odd), #listing th {
|
||||
background: #282828;
|
||||
}
|
||||
|
||||
.funcrow:nth-child(even) {
|
||||
background: #383838;
|
||||
}
|
||||
|
||||
#listing td, #listing th {
|
||||
border: 1px #f0f0f0 solid;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.diffneg {
|
||||
color: #FF8080;
|
||||
}
|
||||
|
||||
.diffpos {
|
||||
color: #80FF80;
|
||||
}
|
||||
|
||||
.identical {
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sortind {
|
||||
margin: 0 0.5em;
|
||||
}
|
||||
|
||||
.filters {
|
||||
font-size: 10pt;
|
||||
text-align: center;
|
||||
margin: 0.5em 0 1em 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var data = [{"address": "0x401610", "name": "WinMain", "matching": 0.9830508474576272, "diff": ""}];
|
||||
|
||||
function diffCssClass(firstChar) {
|
||||
return firstChar === '-' ? 'diffneg' : (firstChar === '+' ? 'diffpos' : '');
|
||||
}
|
||||
|
||||
function asmLineToDiv(line) {
|
||||
const diff_line = document.createElement('div');
|
||||
diff_line.className = diffCssClass(line[0]);
|
||||
diff_line.innerText = line;
|
||||
return diff_line;
|
||||
}
|
||||
|
||||
function formatAsm(asm) {
|
||||
var lines = asm.split('\n');
|
||||
return lines.filter(line => line.length > 0)
|
||||
.map(asmLineToDiv);
|
||||
}
|
||||
|
||||
function rowClick() {
|
||||
if (this.dataset.expanded === 'true') {
|
||||
this.nextSibling.remove();
|
||||
this.dataset.expanded = false;
|
||||
} else {
|
||||
var row = this.parentNode.insertBefore(document.createElement('tr'), this.nextSibling);
|
||||
row.classList.add('diff');
|
||||
var decCel = row.appendChild(document.createElement('td'));
|
||||
decCel.colSpan = 3;
|
||||
var diff = data[this.dataset.index].diff;
|
||||
if (diff == '') {
|
||||
diff = document.createElement('div');
|
||||
diff.className = 'identical';
|
||||
diff.innerText = 'Identical function - no diff';
|
||||
decCel.appendChild(diff);
|
||||
} else {
|
||||
diff = formatAsm(diff);
|
||||
for (const el of diff) {
|
||||
decCel.appendChild(el);
|
||||
}
|
||||
}
|
||||
this.dataset.expanded = true;
|
||||
}
|
||||
}
|
||||
|
||||
function closeAllDiffs() {
|
||||
const collection = document.getElementsByClassName("diff");
|
||||
for (var ele of collection) {
|
||||
ele.remove();
|
||||
}
|
||||
}
|
||||
|
||||
const filterOptions = { text: '', hidePerfect: false };
|
||||
|
||||
function filter() {
|
||||
closeAllDiffs();
|
||||
|
||||
var ltext = filterOptions.text.toLowerCase();
|
||||
|
||||
const collection = document.getElementsByClassName("funcrow");
|
||||
var searchCount = 0;
|
||||
for (var ele of collection) {
|
||||
var eledata = data[ele.dataset.index];
|
||||
|
||||
const textOk = (ltext == ''
|
||||
|| eledata.address.toLowerCase().includes(ltext)
|
||||
|| eledata.name.toLowerCase().includes(ltext));
|
||||
|
||||
const perfOk = (!filterOptions.hidePerfect || (eledata.matching < 1));
|
||||
|
||||
if (textOk && perfOk) {
|
||||
ele.style.display = '';
|
||||
searchCount++;
|
||||
} else {
|
||||
ele.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var lastSortedCol = -1;
|
||||
var ascending = true;
|
||||
|
||||
function sortByColumn(column) {
|
||||
closeAllDiffs();
|
||||
|
||||
if (column == lastSortedCol) {
|
||||
ascending = !ascending;
|
||||
}
|
||||
lastSortedCol = column;
|
||||
|
||||
const collection = document.getElementsByClassName("funcrow");
|
||||
|
||||
var newOrder = [];
|
||||
|
||||
for (var ele of collection) {
|
||||
var inserted = false;
|
||||
|
||||
for (var i = 0; i < newOrder.length; i++) {
|
||||
var cmpEle = newOrder[i];
|
||||
|
||||
var ourCol = ele.childNodes[column];
|
||||
var cmpCol = cmpEle.childNodes[column];
|
||||
|
||||
if ((cmpCol.dataset.value > ourCol.dataset.value) == ascending) {
|
||||
newOrder.splice(i, 0, ele);
|
||||
inserted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!inserted) {
|
||||
newOrder.push(ele);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 1; i < newOrder.length; i++) {
|
||||
newOrder[i - 1].after(newOrder[i]);
|
||||
}
|
||||
|
||||
var sortIndicator = document.getElementById('sortind');
|
||||
if (!sortIndicator) {
|
||||
sortIndicator = document.createElement('span');
|
||||
sortIndicator.id = 'sortind';
|
||||
}
|
||||
sortIndicator.innerHTML = ascending ? '▲' : '▼';
|
||||
|
||||
var th = document.getElementById('listingheader').childNodes[column];
|
||||
th.appendChild(sortIndicator);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
var listing = document.getElementById('listing');
|
||||
|
||||
const headers = listing.getElementsByTagName('th');
|
||||
var headerCount = 0;
|
||||
for (const header of headers) {
|
||||
header.addEventListener('click', function(){
|
||||
sortByColumn(this.dataset.column, true);
|
||||
});
|
||||
|
||||
header.dataset.column = headerCount;
|
||||
headerCount++;
|
||||
}
|
||||
|
||||
data.forEach((element, index) => {
|
||||
var row = listing.appendChild(document.createElement('tr'));
|
||||
var addrCel = row.appendChild(document.createElement('td'));
|
||||
var nameCel = row.appendChild(document.createElement('td'));
|
||||
var matchCel = row.appendChild(document.createElement('td'));
|
||||
|
||||
addrCel.innerText = addrCel.dataset.value = element.address;
|
||||
nameCel.innerText = nameCel.dataset.value = element.name;
|
||||
|
||||
var effectiveNote = (element.matching == 1 && element.diff != '') ? '*' : '';
|
||||
matchCel.innerHTML = (element.matching * 100).toFixed(2) + '%' + effectiveNote;
|
||||
matchCel.dataset.value = element.matching;
|
||||
|
||||
row.classList.add('funcrow');
|
||||
row.addEventListener('click', rowClick);
|
||||
row.dataset.index = index;
|
||||
row.dataset.expanded = false;
|
||||
});
|
||||
|
||||
var search = document.getElementById('search');
|
||||
search.addEventListener('input', function (evt) {
|
||||
filterOptions.text = search.value;
|
||||
filter();
|
||||
});
|
||||
|
||||
const cbHidePerfect = document.getElementById('cbHidePerfect');
|
||||
cbHidePerfect.addEventListener('change', evt => {
|
||||
filterOptions.hidePerfect = evt.target.checked;
|
||||
filter();
|
||||
})
|
||||
|
||||
sortByColumn(0);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1>Decompilation Status</h1>
|
||||
<input id="search" type="search" placeholder="Search for offset or function name...">
|
||||
<div class="filters">
|
||||
<label for="cbHidePerfect">Hide 100% match</label>
|
||||
<input type="checkbox" id="cbHidePerfect" />
|
||||
</div>
|
||||
<table id="listing">
|
||||
<tr id='listingheader'><th style='width: 20%'>Address</th><th style="width:60%">Name</th><th style='width: 20%'>Matching</th></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user