0
0
mirror of https://github.com/marcrobledo/savegame-editors.git synced 2025-04-28 09:05:10 +00:00

fixed botw add pins to map function, and some other small fixes aswell

This commit is contained in:
Marc Robledo 2020-02-18 09:44:17 +01:00
parent de1aa9fc49
commit afa2dba70d
4 changed files with 122 additions and 89 deletions

View File

@ -30,7 +30,7 @@ caches.keys().then(function(cacheNames){
});
var PRECACHE_ID='zelda-botw-editor';
var PRECACHE_VERSION='v3';
var PRECACHE_VERSION='v5';
var PRECACHE_URLS=[
//is hashes file too big for cacheing?
'/savegame-editors/zelda-botw/','/savegame-editors/zelda-botw/index.html',

View File

@ -276,13 +276,44 @@
<!-- TAB: HORSES -->
<div id="tab-horses">
<h3 class="border-blue">Horses</h3>
<div class="row">
<div class="twelve columns"><button class="with-icon icon10" onclick="SavegameEditor.editHorse(0)">Edit horse 0</button></div>
<div class="twelve columns"><button class="with-icon icon10" onclick="SavegameEditor.editHorse(1)">Edit horse 1</button></div>
<div class="twelve columns"><button class="with-icon icon10" onclick="SavegameEditor.editHorse(2)">Edit horse 2</button></div>
<div class="twelve columns"><button class="with-icon icon10" onclick="SavegameEditor.editHorse(3)">Edit horse 3</button></div>
<div class="twelve columns"><button class="with-icon icon10" onclick="SavegameEditor.editHorse(4)">Edit horse 4</button></div>
<div class="twelve columns"><button class="with-icon icon10" onclick="SavegameEditor.editHorse(5)">Edit untamed horse</button></div>
<div class="row"><div class="twelve columns">Horse #1</div></div>
<div class="row" id="row-horse0">
<div class="three columns"><select id="select-horse0-type"></select></div>
<div class="three columns"><input type="text" id="input-horse0-name" /></div>
<div class="three columns"><select id="select-horse0-saddles"></select></div>
<div class="three columns"><select id="select-horse0-reins"></select></div>
</div>
<div class="row"><div class="twelve columns">Horse #2</div></div>
<div class="row" id="row-horse1">
<div class="three columns"><select id="select-horse1-type"></select></div>
<div class="three columns"><input type="text" id="input-horse1-name" /></div>
<div class="three columns"><select id="select-horse1-saddles"></select></div>
<div class="three columns"><select id="select-horse1-reins"></select></div>
</div>
<div class="row"><div class="twelve columns">Horse #3</div></div>
<div class="row" id="row-horse2">
<div class="three columns"><select id="select-horse2-type"></select></div>
<div class="three columns"><input type="text" id="input-horse2-name" /></div>
<div class="three columns"><select id="select-horse2-saddles"></select></div>
<div class="three columns"><select id="select-horse2-reins"></select></div>
</div>
<div class="row"><div class="twelve columns">Horse #4</div></div>
<div class="row" id="row-horse3">
<div class="three columns"><select id="select-horse3-type"></select></div>
<div class="three columns"><input type="text" id="input-horse3-name" /></div>
<div class="three columns"><select id="select-horse3-saddles"></select></div>
<div class="three columns"><select id="select-horse3-reins"></select></div>
</div>
<div class="row"><div class="twelve columns">Horse #5</div></div>
<div class="row" id="row-horse4">
<div class="three columns"><select id="select-horse4-type"></select></div>
<div class="three columns"><input type="text" id="input-horse4-name" /></div>
<div class="three columns"><select id="select-horse4-saddles"></select></div>
<div class="three columns"><select id="select-horse4-reins"></select></div>
</div>
<div class="row"><div class="twelve columns">Untammed horse</div></div>
<div class="row" id="row-horse5">
<div class="three columns end"><select id="select-horse5-type"></select></div>
</div>
<div class="row">
<div class="six columns"><label for="float-pos-x-horse">Current horse coordinates (XYZ)</label></div>
@ -325,30 +356,5 @@
</div>
<!-- DIALOGS -->
<div id="dialog-horse" class="dialog">
<div id="row-tamed-horse">
<div class="row">
<div class="four columns"><label for="input-horse-name">Name</label></div>
<div class="eight columns"><input type="text" id="input-horse-name" /></div>
</div>
<div class="row">
<div class="four columns"><label for="select-horse-saddles">Saddles</label></div>
<div class="eight columns"><select id="select-horse-saddles"></select></div>
</div>
<div class="row">
<div class="four columns"><label for="select-horse-reins">Reins</label></div>
<div class="eight columns"><select id="select-horse-reins"></select></div>
</div>
</div>
<div class="row">
<div class="four columns"><label for="select-horse-type">Type</label></div>
<div class="eight columns"><select id="select-horse-type"></select></div>
</div>
<div class="buttons">
<button onclick="SavegameEditor.editHorse2(currentEditingItem, getValue('horse-name'), getValue('horse-saddles'), getValue('horse-reins'), getValue('horse-type'));MarcDialogs.close();">Change horse</button>
</div>
</div>
</body>
</html>

View File

@ -1,7 +1,7 @@
/*
The legend of Zelda: Breath of the wild Savegame Editor (Data) v20180526
The legend of Zelda: Breath of the wild Savegame Editor (Data) v20200217
by Marc Robledo 2017-2018
by Marc Robledo 2017-2020
names, korok and locations datamined by MrCheeze:
@ -30,7 +30,8 @@ var BOTW_Data={
HORSE_REINS:['GameRomHorseReins_00','GameRomHorseReins_01','GameRomHorseReins_02','GameRomHorseReins_03','GameRomHorseReins_04','GameRomHorseReins_05','GameRomHorseReins_06','GameRomHorseReins_00L','GameRomHorseReins_10'],
HORSE_SADDLES:['GameRomHorseSaddle_00','GameRomHorseSaddle_01','GameRomHorseSaddle_02','GameRomHorseSaddle_03','GameRomHorseSaddle_04','GameRomHorseSaddle_05','GameRomHorseSaddle_06','GameRomHorseSaddle_00L','GameRomHorseSaddle_00S','GameRomHorseSaddle_10'],
HORSE_TYPES:['GameRomHorse00','GameRomHorse01','GameRomHorse02','GameRomHorse03','GameRomHorse04','GameRomHorse05','GameRomHorse06','GameRomHorse07','GameRomHorse08','GameRomHorse09','GameRomHorse10','GameRomHorse11','GameRomHorse12','GameRomHorse13','GameRomHorse14','GameRomHorse15','GameRomHorse16','GameRomHorse17','GameRomHorse18','GameRomHorse19','GameRomHorse20','GameRomHorse21','GameRomHorse22','GameRomHorse23','GameRomHorseEpona','GameRomHorseZelda','GameRomHorse00L','GameRomHorseNushi','GameRomHorseBone'],
HORSE_TYPES:['GameRomHorse00','GameRomHorse01','GameRomHorse02','GameRomHorse03','GameRomHorse04','GameRomHorse05','GameRomHorse06','GameRomHorse07','GameRomHorse08','GameRomHorse09','GameRomHorse10','GameRomHorse11','GameRomHorse12','GameRomHorse13','GameRomHorse14','GameRomHorse15','GameRomHorse16','GameRomHorse17','GameRomHorse18','GameRomHorse19','GameRomHorse20','GameRomHorse21','GameRomHorse22','GameRomHorse23','GameRomHorseEpona','GameRomHorseZelda','GameRomHorse00L'],
HORSE_TYPES_UNTAMMED:['GameRomHorseNushi','GameRomHorseBone'],
Translations:[
{id:'weapons',items:{Weapon_Sword_001:"Traveler's Sword",Weapon_Sword_002:"Soldier's Broadsword",Weapon_Sword_003:"Knight's Broadsword",Weapon_Sword_004:"Boko Club",Weapon_Sword_005:"Spiked Boko Club",Weapon_Sword_006:"Dragonbone Boko Club",Weapon_Sword_007:"Lizal Boomerand",Weapon_Sword_008:"Lizal Forked Boomerang",Weapon_Sword_009:"Lizal Tri-Boomerang",Weapon_Sword_013:"Guardian Sword",Weapon_Sword_014:"Guardian Sword+",Weapon_Sword_015:"Guardian Sword++",Weapon_Sword_016:"Lynel Sword",Weapon_Sword_017:"Mighty Lynel Sword",Weapon_Sword_018:"Savage Lynel Sword",Weapon_Sword_019:"Bokoblin Arm",Weapon_Sword_020:"Lizalfos Arm",Weapon_Sword_021:"Rusty Broadsword",Weapon_Sword_022:"Soup ladle",Weapon_Sword_023:"Ancient Short Sword",Weapon_Sword_024:"Royal Broadsword",Weapon_Sword_025:"Forest Dweller's Sword",Weapon_Sword_027:"Zora Sword",Weapon_Sword_029:"Gerudo Scimitar",Weapon_Sword_030:"Moonlight Scimitar",Weapon_Sword_031:"Feathered Edge",Weapon_Sword_033:"Flameblade",Weapon_Sword_034:"Frostblade",Weapon_Sword_035:"Thunderblade",Weapon_Sword_040:"Spring-Loaded Hammer",Weapon_Sword_041:"Eightfold Blade",Weapon_Sword_043:"Torch",Weapon_Sword_044:"Tree Branch",Weapon_Sword_047:"Royal Guard's Sword",Weapon_Sword_048:"Meteor Rod",Weapon_Sword_049:"Blizzard Rod",Weapon_Sword_050:"Thunderstorm Rod",Weapon_Sword_051:"Boomerang",Weapon_Sword_052:"Scimitar of the Seven",Weapon_Sword_053:"Vicious Sickle",Weapon_Sword_056:"Master Sword (Broken/Unequippable)",Weapon_Sword_057:"Goddess Sword",Weapon_Sword_058:"Hero's Sword (amiibo 8-bit)",Weapon_Sword_059:"Sea-Breeze Boomerang (amiibo WW)",Weapon_Sword_060:"Fire Rod",Weapon_Sword_061:"Ice Rod",Weapon_Sword_062:"Lightning Rod",Weapon_Sword_070:"Master Sword",Weapon_Sword_071:"Master Sword (no near malice, no charge)",Weapon_Sword_072:"Master Sword (near malice, no charge)",Weapon_Sword_073:"Demon Carver",Weapon_Sword_500:"Lantern",Weapon_Lsword_001:"Traveler's Claymore",Weapon_Lsword_002:"Soldier's Claymore",Weapon_Lsword_003:"Knight's Claymore",Weapon_Lsword_004:"Boko Bat",Weapon_Lsword_005:"Spiked Boko Bat",Weapon_Lsword_006:"Dragonbone Boko Bat",Weapon_Lsword_010:"Moblin Club",Weapon_Lsword_011:"Spiked Moblin Club",Weapon_Lsword_012:"Dragonbone Moblin Club",Weapon_Lsword_013:"Ancient Battle Axe",Weapon_Lsword_014:"Ancient Battle Axe+",Weapon_Lsword_015:"Ancient Battle Axe++",Weapon_Lsword_016:"Lynel Crusher",Weapon_Lsword_017:"Mighty Lynel Crusher",Weapon_Lsword_018:"Savage Lynel Crusher",Weapon_Lsword_019:"Moblin Arm",Weapon_Lsword_020:"Rusty Claymore",Weapon_Lsword_023:"Ancient Bladesaw",Weapon_Lsword_024:"Royal Claymore",Weapon_Lsword_027:"Silver Longsword",Weapon_Lsword_029:"Golden Claymore",Weapon_Lsword_030:"Double Axe",Weapon_Lsword_031:"Iron Sledgehammer",Weapon_Lsword_032:"Woodcutter's Axe",Weapon_Lsword_033:"Great Flameblade",Weapon_Lsword_034:"Great Frostblade",Weapon_Lsword_035:"Great Thunderblade",Weapon_Lsword_036:"Cobble Crusher",Weapon_Lsword_037:"Stone Smasher",Weapon_Lsword_038:"Boat Oar",Weapon_Lsword_041:"Eightfold Longblade",Weapon_Lsword_045:"Farming Hoe",Weapon_Lsword_047:"Royal Guard's Claymore",Weapon_Lsword_051:"Giant Boomerang",Weapon_Lsword_054:"Boulder Breaker",Weapon_Lsword_055:"Edge of Duality",Weapon_Lsword_056:"Korok Leaf",Weapon_Lsword_057:"Sword of the Six Sages (amiibo TP)",Weapon_Lsword_059:"Biggoron's Sword (amiibo OoT)",Weapon_Lsword_060:"Fierce Deity Sword (amiibo MM)",Weapon_Lsword_074:"Windcleaver",Weapon_Spear_001:"Traveler's Spear",Weapon_Spear_002:"Soldier's Spear",Weapon_Spear_003:"Knight's Halberd",Weapon_Spear_004:"Boko Spear",Weapon_Spear_005:"Spiked Boko Spear",Weapon_Spear_006:"Dragonbone Boko Spear",Weapon_Spear_007:"Lizal Spear",Weapon_Spear_008:"Enhanced Lizal Spear",Weapon_Spear_009:"Forked Lizal Spear",Weapon_Spear_010:"Moblin Spear",Weapon_Spear_011:"Spiked Moblin Spear",Weapon_Spear_012:"Dragonbone Moblin Spear",Weapon_Spear_013:"Guardian Spear",Weapon_Spear_014:"Guardian Spear+",Weapon_Spear_015:"Guardian Spear++",Weapon_Spear_016:"Lynel Spear",Weapon_Spear_017:"Mighty Lynel Spear",Weapon_Spear_018:"Savage Lynel Spear",Weapon_Spear_021:"Rusty Halberd",Weapon_Spear_022:"Farmer's Pichfork",Weapon_Spear_023:"Ancient Spear",Weapon_Spear_024:"Royal Halberd",Weapon_Spear_025:"Forest Dweller's Spear",Weapon_Spear_027:"Zora Spear",Weapon_Spear_028:"Silverscale Spear",Weapon_Spear_029:"Gerudo Spear",Weapon_Spear_030:"Throwing Spear",Weapon_Spear_031:"Drillshaft",Weapon_Spear_032:"Feathered Spear",Weapon_Spear_033:"Flamespear",Weapon_Spear_034:"Frostspear",Weapon_Spear_035:"Thunderspear",Weapon_Spear_036:"Wooden Mop",Weapon_Spear_037:"Serpentine Spear",Weapon_Spear_038:"Fishing Harpoon",Weapon_Spear_047:"Royal Guard's Spear",Weapon_Spear_049:"Ceremonial Trident",Weapon_Spear_050:"Lightscale Trident",Weapon_Sword_502:"One-Hit Obliterator (v1.4)"}},

View File

@ -1,13 +1,13 @@
/*
The legend of Zelda: Breath of the wild v20200215
by Marc Robledo 2017-2019
The legend of Zelda: Breath of the wild v20200218
by Marc Robledo 2017-2020
*/
var currentEditingItem=0;
SavegameEditor={
Name:'The legend of Zelda: Breath of the wild',
Filename:'game_data.sav',
Version:20190625,
Version:20200218,
/* Constants */
Constants:{
@ -59,17 +59,13 @@ SavegameEditor={
0xf1cf4807, 'RELIC_GORON',
0xfda0cde4, 'RELIC_RITO'
],
Headers:{
'MapApp_MapIconNo':0x9383490e,
'MapApp_MapIconPos':0xea9def3f
},
/* private functions */
_toHexInt:function(i){var s=i.toString(16);while(s.length<8)s='0'+s;return '0x'+s},
_writeBoolean:function(offset,val,arrayPos){if(arrayPos)tempFile.writeU32(offset+8*arrayPos,val?1:0);else tempFile.writeU32(offset,val?1:0)},
_writeValue:function(offset,val,arrayPos){if(arrayPos)tempFile.writeU32(offset+8*arrayPos,val);else tempFile.writeU32(offset,val)},
_writeFloat32:function(offset,val,arrayPos){if(arrayPos)tempFile.writeF32(offset+8*arrayPos,val);else tempFile.writeF32(offset,val)},
_writeBoolean:function(offset,val,arrayIndex){if(arrayIndex)tempFile.writeU32(offset+8*arrayIndex,val?1:0);else tempFile.writeU32(offset,val?1:0)},
_writeValue:function(offset,val,arrayIndex){if(arrayIndex)tempFile.writeU32(offset+8*arrayIndex,val);else tempFile.writeU32(offset,val)},
_writeFloat32:function(offset,val,arrayIndex){if(arrayIndex)tempFile.writeF32(offset+8*arrayIndex,val);else tempFile.writeF32(offset,val)},
_writeString:function(offset,str,len){
len=len || 8;
for(var i=0; i<len; i++){
@ -81,7 +77,7 @@ SavegameEditor={
offset+=8;
}
},
_writeString64:function(offset,str){this._writeString(offset,str, 16);},
_writeString64:function(offset,str,arrayIndex){if(typeof arrayIndex==='number')offset+=this.Constants.STRING64_SIZE*arrayIndex;this._writeString(offset,str, 16);},
_writeString256:function(offset,str){this._writeString(offset,str, 64);},
_searchHash:function(hash){
@ -104,11 +100,13 @@ SavegameEditor={
_getOffsets:function(){
this.Offsets={};
this.Headers={};
var startSearchOffset=0x0c;
for(var i=0; i<this.Hashes.length; i+=2){
for(var j=startSearchOffset; j<tempFile.fileSize; j+=8){
if(this.Hashes[i]===tempFile.readU32(j)){
this.Offsets[this.Hashes[i+1]]=j+4;
this.Headers[this.Hashes[i+1]]=this.Hashes[i];
startSearchOffset=j+8;
break;
}
@ -142,10 +140,12 @@ SavegameEditor={
}
return txt
},
_readString64:function(offset){
_readString64:function(offset,arrayIndex){
if(typeof arrayIndex==='number')
offset+=this.Constants.STRING64_SIZE*arrayIndex;
return this._readString(offset, 16);
},
_readString256:function(offset){
_readString256:function(offset,){
return this._readString(offset, 64);
},
@ -153,7 +153,7 @@ SavegameEditor={
return this._readString64(this.Offsets.ITEMS+i*0x80);
},
_writeItemName:function(i,newItemNameId){
this._writeString64(this.Offsets.ITEMS+i*0x80, newItemNameId);
this._writeString64(this.Offsets.ITEMS, newItemNameId, i);
},
_getItemMaximumQuantity:function(itemId){
var cat=this._getItemCategory(itemId);
@ -232,7 +232,7 @@ SavegameEditor={
if(i<this.Constants.MAX_ITEMS){
if(this._getItemCategory(this.selectItem.value)===currentTab){
this.selectItem.selectedIndex++;
if(this._getItemCategory(this.selectItem.value)!==currentTab)
if(this._getItemCategory(this.selectItem.value)!==currentTab || this.selectItem.value==='')
this.selectItem.value=this.selectItem.categories[currentTab].children[0].value;
}else{
this.selectItem.value=this.selectItem.categories[currentTab].children[0].value;
@ -272,6 +272,9 @@ SavegameEditor={
if(document.getElementById('number-item'+i))
document.getElementById('number-item'+i).maxValue=this._getItemMaximumQuantity(nameId);
},
filterItems:function(category){
},
_getModifierOffset1:function(type){
if(type==='bows')
@ -295,37 +298,23 @@ SavegameEditor={
tempFile.writeU32(this._getModifierOffset2(type)+i*0x08, val);
},
editHorse:function(i){
currentEditingItem=i;
if(currentEditingItem==5){ /* untamed horse */
hide('row-tamed-horse');
if(!this._readString64(this.Offsets.HORSE_TYPES+this.Constants.STRING64_SIZE*5).startsWith('GameRomHorse')){
MarcDialogs.alert('Error: this will only work if your savegame has Link on an untamed horse.');
return false;
}
getField('horse-type').children[27].disabled=false;
getField('horse-type').children[28].disabled=false;
}else{
show('row-tamed-horse');
setValue('horse-name',this._readString64(this.Offsets.HORSE_NAMES+this.Constants.STRING64_SIZE*i));
setValue('horse-saddles',this._readString64(this.Offsets.HORSE_SADDLES+this.Constants.STRING64_SIZE*i));
setValue('horse-reins',this._readString64(this.Offsets.HORSE_REINS+this.Constants.STRING64_SIZE*i));
getField('horse-type').children[27].disabled=true;
getField('horse-type').children[28].disabled=true;
}
setValue('horse-type',this._readString64(this.Offsets.HORSE_TYPES+this.Constants.STRING64_SIZE*i));
MarcDialogs.open('horse');
setHorseName:function(i,val){
if(i<5)
this._writeString64(this.Offsets.HORSE_NAMES, val, i);
},
editHorse2:function(i,name,saddles,reins,type){
if(currentEditingItem<5){
this._writeString64(this.Offsets.HORSE_NAMES+this.Constants.STRING64_SIZE*i, getValue('horse-name'));
this._writeString64(this.Offsets.HORSE_SADDLES+this.Constants.STRING64_SIZE*i, getValue('horse-saddles'));
this._writeString64(this.Offsets.HORSE_REINS+this.Constants.STRING64_SIZE*i, getValue('horse-reins'));
}
this._writeString64(this.Offsets.HORSE_TYPES+this.Constants.STRING64_SIZE*i, getValue('horse-type'));
if(getValue('horse-type')==='GameRomHorse00L'){
this._writeString64(this.Offsets.HORSE_MANES+this.Constants.STRING64_SIZE*i, 'Horse_Link_Mane_00L');
setHorseSaddle:function(i,val){
if(i<5)
this._writeString64(this.Offsets.HORSE_SADDLES, val, i);
},
setHorseReins:function(i,val){
if(i<5)
this._writeString64(this.Offsets.HORSE_REINS, val, i);
},
setHorseType:function(i,val){
if(currentEditingItem<6){
this._writeString64(this.Offsets.HORSE_TYPES, val, i);
/* fix mane */
this._writeString64(this.Offsets.HORSE_MANES, (val==='GameRomHorse00L'?'Horse_Link_Mane_00L':'Horse_Link_Mane'), i);
}
},
@ -460,10 +449,24 @@ SavegameEditor={
}
});
/* dialogs */
select('horse-saddles', this._arrayToSelectOpts(BOTW_Data.HORSE_SADDLES));
select('horse-reins', this._arrayToSelectOpts(BOTW_Data.HORSE_REINS));
select('horse-type', this._arrayToSelectOpts(BOTW_Data.HORSE_TYPES));
/* horses */
for(var i=0; i<6; i++){
if(i<5){
get('input-horse'+i+'-name').horseIndex=i;
get('input-horse'+i+'-name').addEventListener('change', function(){SavegameEditor.setHorseName(this.horseIndex, this.value)}, false);
get('select-horse'+i+'-saddles').horseIndex=i;
get('select-horse'+i+'-saddles').addEventListener('change', function(){SavegameEditor.setHorseSaddle(this.horseIndex, this.value)}, false);
get('select-horse'+i+'-reins').horseIndex=i;
get('select-horse'+i+'-reins').addEventListener('change', function(){SavegameEditor.setHorseReins(this.horseIndex, this.value)}, false);
}
get('select-horse'+i+'-type').horseIndex=i;
get('select-horse'+i+'-type').addEventListener('change', function(){SavegameEditor.setHorseType(this.horseIndex, this.value)}, false);
select('horse'+i+'-saddles', this._arrayToSelectOpts(BOTW_Data.HORSE_SADDLES));
select('horse'+i+'-reins', this._arrayToSelectOpts(BOTW_Data.HORSE_REINS));
select('horse'+i+'-type', this._arrayToSelectOpts(i===5?BOTW_Data.HORSE_TYPES.concat(BOTW_Data.HORSE_TYPES_UNTAMMED):BOTW_Data.HORSE_TYPES));
}
@ -529,7 +532,7 @@ SavegameEditor={
/* map pins */
loadMapPins()
loadMapPins();
/* items */
@ -591,7 +594,29 @@ SavegameEditor={
additional.appendChild(inputNumber('modifier-'+modifierColumn+'s-value-'+i, 0, 0xffffffff, tempFile.readU32(this.Offsets['FLAGSV_'+modifierColumn.toUpperCase()]+i*8)));
}
}
/* horses */
for(var i=0; i<6; i++){
if(i<5){
setValue('horse'+i+'-name',this._readString64(this.Offsets.HORSE_NAMES, i));
setValue('horse'+i+'-saddles',this._readString64(this.Offsets.HORSE_SADDLES, i));
setValue('horse'+i+'-reins',this._readString64(this.Offsets.HORSE_REINS, i));
}
var horseType=this._readString64(this.Offsets.HORSE_TYPES, i);
if(horseType){
setValue('horse'+i+'-type',horseType);
get('row-horse'+i).style.visibility='visible';
}else{
get('row-horse'+i).style.visibility='hidden';
}
}
showTab('home');
},
@ -871,11 +896,12 @@ function clearMapPins(){
}
function iterateMapPins(f){
var offset = SavegameEditor.Offsets.MapApp_MapIconNo;
var offset = SavegameEditor.Offsets.MapApp_MapIconNo-4;
for (var i = 0;; i++){
var base = offset + (8 * i)
var hdr = tempFile.readU32(base)
var val = tempFile.readU32(base + 4)
//if (hdr != SavegameEditor.Constants.MAP_ICONS){
if (hdr != SavegameEditor.Headers.MapApp_MapIconNo){
break
}
@ -885,7 +911,7 @@ function iterateMapPins(f){
}
}
function iterateMapPinLocations(f){
offset = SavegameEditor.Offsets.MapApp_MapIconPos;
offset = SavegameEditor.Offsets.MapApp_MapIconPos-4;
for (var i = 0;; i++){
var base = offset + (8 * i)
var hdr = tempFile.readU32(base)