mirror of https://github.com/rusefi/RomRaider.git
Fixes Rom/Table load errors reported in pull request 41:
- parameter ramOffset was hiding the table ramOffset. The parameter has been renamed and usage was updated appropriately.
This commit is contained in:
parent
55bd417dd2
commit
df8221749e
|
@ -414,13 +414,13 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
this.data = data;
|
||||
}
|
||||
|
||||
public void populateTable(byte[] input, int ramOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
public void populateTable(byte[] input, int romRamOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
// temporarily remove lock
|
||||
boolean tempLock = locked;
|
||||
locked = false;
|
||||
|
||||
if (!beforeRam) {
|
||||
this.ramOffset = ramOffset;
|
||||
this.ramOffset = romRamOffset;
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
|
|
|
@ -52,12 +52,12 @@ public class Table1D extends Table {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void populateTable(byte[] input, int ramOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
public void populateTable(byte[] input, int romRamOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
loaded = false;
|
||||
centerLayout.setRows(1);
|
||||
centerLayout.setColumns(this.getDataSize());
|
||||
|
||||
super.populateTable(input, ramOffset);
|
||||
super.populateTable(input, romRamOffset);
|
||||
loaded = false;
|
||||
|
||||
// add to table
|
||||
|
|
|
@ -126,13 +126,13 @@ public class Table2D extends Table {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void populateTable(byte[] input, int ramOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
public void populateTable(byte[] input, int romRamOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
centerLayout.setRows(2);
|
||||
centerLayout.setColumns(this.getDataSize());
|
||||
|
||||
try {
|
||||
axis.populateTable(input, ramOffset);
|
||||
super.populateTable(input, ramOffset);
|
||||
axis.populateTable(input, romRamOffset);
|
||||
super.populateTable(input, romRamOffset);
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
throw new ArrayIndexOutOfBoundsException();
|
||||
}
|
||||
|
|
|
@ -157,12 +157,12 @@ public class Table3D extends Table {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void populateTable(byte[] input, int ramOffset) throws NullPointerException, ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
public void populateTable(byte[] input, int romRamOffset) throws NullPointerException, ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
loaded = false;
|
||||
// fill first empty cell
|
||||
centerPanel.add(new JLabel());
|
||||
if (!beforeRam) {
|
||||
this.ramOffset = ramOffset;
|
||||
this.ramOffset = romRamOffset;
|
||||
}
|
||||
|
||||
// temporarily remove lock
|
||||
|
@ -171,8 +171,8 @@ public class Table3D extends Table {
|
|||
|
||||
// populate axiis
|
||||
try {
|
||||
xAxis.populateTable(input, ramOffset);
|
||||
yAxis.populateTable(input, ramOffset);
|
||||
xAxis.populateTable(input, romRamOffset);
|
||||
yAxis.populateTable(input, romRamOffset);
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
throw new ArrayIndexOutOfBoundsException();
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class TableSwitch extends Table {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void populateTable(byte[] input, int ramOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
public void populateTable(byte[] input, int romRamOffset) throws ArrayIndexOutOfBoundsException, IndexOutOfBoundsException {
|
||||
JPanel radioPanel = new JPanel(new GridLayout(0, 1));
|
||||
radioPanel.add(new JLabel(" " + name));
|
||||
for (String stateName : switchStates.keySet()) {
|
||||
|
@ -119,7 +119,7 @@ public class TableSwitch extends Table {
|
|||
// the appropriate switch setting or throw an error if there is a
|
||||
// mismatch and disable this table's editing ability.
|
||||
if (!beforeRam) {
|
||||
this.ramOffset = ramOffset;
|
||||
this.ramOffset = romRamOffset;
|
||||
}
|
||||
Map<String, Integer> sourceStatus = new HashMap<String, Integer>();
|
||||
for (String stateName : switchStates.keySet()) {
|
||||
|
|
Loading…
Reference in New Issue