0
0
mirror of https://github.com/marcrobledo/savegame-editors.git synced 2025-04-29 09:35:13 +00:00

Change some constant values

This commit is contained in:
magiczocker10 2024-06-30 20:01:03 +02:00 committed by GitHub
parent c37cccd6f9
commit d994e0651c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,8 +13,8 @@ SavegameEditor={
/* Constants */ /* Constants */
Constants:{ Constants:{
BACKGROUND_MUSIC_OFFSET:0x2232, BACKGROUND_OFFSET:0x2232,
BACKGROUND_MUSIC:[ BACKGROUND:[
{value:0, name:'Argyle'}, {value:0, name:'Argyle'},
{value:1, name:'Clovers'}, {value:1, name:'Clovers'},
{value:2, name:'Flowers'}, {value:2, name:'Flowers'},
@ -50,8 +50,8 @@ SavegameEditor={
{value:2, name:'Profile 2', offset: 0x3B84}, // 15236 {value:2, name:'Profile 2', offset: 0x3B84}, // 15236
{value:3, name:'Profile 3', offset: 0x76FC}, // 30460 {value:3, name:'Profile 3', offset: 0x76FC}, // 30460
], ],
SFX_OFFSET:0x2243, BGM_MUSIC_OFFSET:0x2243,
SFX_MUSIC:[ BGM_MUSIC:[
{value:0, name:'Café'}, {value:0, name:'Café'},
{value:1, name:'Jazz'}, {value:1, name:'Jazz'},
{value:2, name:'Latin'}, {value:2, name:'Latin'},
@ -79,9 +79,9 @@ SavegameEditor={
_getProfileOffset:function(){ _getProfileOffset:function(){
return this.Constants.PROFILES[Number(getValue('profile-selector')) - 1].offset; return this.Constants.PROFILES[Number(getValue('profile-selector')) - 1].offset;
}, },
_write_background_music:function(){ _write_background:function(){
tempFile.writeU8( tempFile.writeU8(
this._getProfileOffset()+this.Constants.BACKGROUND_MUSIC_OFFSET, this._getProfileOffset()+this.Constants.BACKGROUND_OFFSET,
getValue('background') getValue('background')
); );
}, },
@ -91,9 +91,9 @@ SavegameEditor={
getValue('difficulty') getValue('difficulty')
); );
}, },
_write_sfx_music:function(){ _write_bgm_music:function(){
tempFile.writeU8( tempFile.writeU8(
this._getProfileOffset()+this.Constants.SFX_OFFSET(), this._getProfileOffset()+this.Constants.BGM_MUSIC_OFFSET(),
getValue('bgm-music') getValue('bgm-music')
); );
}, },
@ -117,8 +117,8 @@ SavegameEditor={
get('container-profile-name').innerHTML = ''; get('container-profile-name').innerHTML = '';
get('container-profile-name').appendChild(span(SavegameEditor._readU8String(profileStartOffset, 20))); get('container-profile-name').appendChild(span(SavegameEditor._readU8String(profileStartOffset, 20)));
setValue('background', tempFile.readU8(profileStartOffset + SavegameEditor.Constants.BACKGROUND_MUSIC_OFFSET)); setValue('background', tempFile.readU8(profileStartOffset + SavegameEditor.Constants.BACKGROUND_OFFSET));
setValue('bgm-music', tempFile.readU8(profileStartOffset + SavegameEditor.Constants.SFX_OFFSET)); setValue('bgm-music', tempFile.readU8(profileStartOffset + SavegameEditor.Constants.BGM_MUSIC_OFFSET));
setValue('difficulty', tempFile.readU8(profileStartOffset + SavegameEditor.Constants.DIFFICULTY_OFFSET)); setValue('difficulty', tempFile.readU8(profileStartOffset + SavegameEditor.Constants.DIFFICULTY_OFFSET));
var tmp = tempFile.readU8(profileStartOffset + 0x2231); var tmp = tempFile.readU8(profileStartOffset + 0x2231);
setValue('checkbox-help', tmp > 1 ? 'checked' : ''); setValue('checkbox-help', tmp > 1 ? 'checked' : '');
@ -188,11 +188,11 @@ SavegameEditor={
} }
} }
setValue('amiibocount', unlockedAmiibos); setValue('amiibocount', unlockedAmiibos);
get('container-background').appendChild(select('background', SavegameEditor.Constants.BACKGROUND_MUSIC, SavegameEditor._write_background_music)); get('container-background').appendChild(select('background', SavegameEditor.Constants.BACKGROUND, SavegameEditor._write_background));
get('container-bomb').appendChild(checkbox('checkbox-bomb')); get('container-bomb').appendChild(checkbox('checkbox-bomb'));
get('container-difficulty').appendChild(select('difficulty', SavegameEditor.Constants.DIFFICULTIES, SavegameEditor._write_difficulty)); get('container-difficulty').appendChild(select('difficulty', SavegameEditor.Constants.DIFFICULTIES, SavegameEditor._write_difficulty));
get('container-help').appendChild(checkbox('checkbox-help')); get('container-help').appendChild(checkbox('checkbox-help'));
get('container-bgm-music').appendChild(select('bgm-music', SavegameEditor.Constants.SFX_MUSIC, SavegameEditor._write_sfx_music)); get('container-bgm-music').appendChild(select('bgm-music', SavegameEditor.Constants.BGM_MUSIC, SavegameEditor._write_bgm_music));
this._load_profile(); this._load_profile();
}, },