From 733979eb4e52c934307959aa74a30c25ddefebaa Mon Sep 17 00:00:00 2001 From: TML Date: Fri, 20 Sep 2019 23:09:42 +0800 Subject: [PATCH 1/4] BGM Enhancement * Replaced BGM_Fade with BGM_SetVolume * Added loop_start loop_end arguments for BGM_Play --- objects/battle_result_flee/Other_0.gml | 2 +- objects/trigger_warp/Other_10.gml | 2 +- objects/world/Step_0.gml | 1 + scripts/BGM_Fade/BGM_Fade.gml | 17 ----------------- scripts/BGM_Init/BGM_Init.gml | 2 ++ scripts/BGM_Play/BGM_Play.gml | 19 +++++++++++++++++-- scripts/BGM_SetVolume/BGM_SetVolume.gml | 11 ++++++++++- scripts/BGM_Step/BGM_Step.gml | 16 ++++++++++++++++ .../BGM_Fade.yy => BGM_Step/BGM_Step.yy} | 4 ++-- scripts/Battle_End/Battle_End.gml | 2 +- undertale_engine.yyp | 18 +++++++++--------- views/1d2372ca-97fc-43cb-9b4c-3a67dfdd4e44.yy | 4 ++-- 12 files changed, 62 insertions(+), 36 deletions(-) delete mode 100644 scripts/BGM_Fade/BGM_Fade.gml create mode 100644 scripts/BGM_Step/BGM_Step.gml rename scripts/{BGM_Fade/BGM_Fade.yy => BGM_Step/BGM_Step.yy} (56%) diff --git a/objects/battle_result_flee/Other_0.gml b/objects/battle_result_flee/Other_0.gml index 289ee57e..9bbbb394 100644 --- a/objects/battle_result_flee/Other_0.gml +++ b/objects/battle_result_flee/Other_0.gml @@ -1,6 +1,6 @@ if(!_ended){ alarm[0]=20; Fader_Fade(-1,1,18); - BGM_Fade(5,0,18); + BGM_SetVolume(5,0,18); _ended=true; } \ No newline at end of file diff --git a/objects/trigger_warp/Other_10.gml b/objects/trigger_warp/Other_10.gml index 4b92282d..92633f10 100644 --- a/objects/trigger_warp/Other_10.gml +++ b/objects/trigger_warp/Other_10.gml @@ -8,7 +8,7 @@ if(room_exists(target_room)){ char_player._moveable_warp=false; } if(bgm_fade){ - BGM_Fade(0,0,bgm_fade_time); + BGM_SetVolume(0,0,bgm_fade_time); } alarm[0]=fade_in_time+warp_wait+1; }else{ diff --git a/objects/world/Step_0.gml b/objects/world/Step_0.gml index 5746315b..3bc3a178 100644 --- a/objects/world/Step_0.gml +++ b/objects/world/Step_0.gml @@ -1,4 +1,5 @@ Anim_Step(); +BGM_Step(); if(_time>=60){ Flag_Set(FLAG_TYPE.STATIC,FLAG_STATIC.TIME,Flag_Get(FLAG_TYPE.STATIC,FLAG_STATIC.TIME)+1); diff --git a/scripts/BGM_Fade/BGM_Fade.gml b/scripts/BGM_Fade/BGM_Fade.gml deleted file mode 100644 index fe4dc3f0..00000000 --- a/scripts/BGM_Fade/BGM_Fade.gml +++ /dev/null @@ -1,17 +0,0 @@ -///@arg bgm_slot -///@arg volume -///@arg TIME -var SLOT=argument[0]; -var VOLUME=argument[1]; -var TIME=argument[2]*(1000/game_get_speed(gamespeed_fps)); - -if(BGM_IsSlotValid(SLOT)&&VOLUME>=0&&TIME>=0){ - if(BGM_IsPlaying(SLOT)){ - audio_sound_gain(BGM_GetID(SLOT),VOLUME,TIME); - return true; - }else{ - return false; - } -}else{ - return false; -} \ No newline at end of file diff --git a/scripts/BGM_Init/BGM_Init.gml b/scripts/BGM_Init/BGM_Init.gml index 42228f4a..5451c3d0 100644 --- a/scripts/BGM_Init/BGM_Init.gml +++ b/scripts/BGM_Init/BGM_Init.gml @@ -2,5 +2,7 @@ var proc=0; repeat(6){ global._bgm_id[proc]=-1; global._bgm_audio[proc]=-1; + global._bgm_loop_start[proc]=-1; + global._bgm_loop_end[proc]=-1; proc+=1; } \ No newline at end of file diff --git a/scripts/BGM_Play/BGM_Play.gml b/scripts/BGM_Play/BGM_Play.gml index 383abf5b..27b810df 100644 --- a/scripts/BGM_Play/BGM_Play.gml +++ b/scripts/BGM_Play/BGM_Play.gml @@ -1,13 +1,28 @@ ///@arg bgm_slot ///@arg audio ///@arg loop* +///@arg loop_start* +///@arg loop_end* var SLOT=argument[0]; var AUDIO=argument[1]; - +var LOOP=true; +var LOOP_START=-1; +var LOOP_END=-1; +if(argument_count>=3){ + LOOP=argument[2]; +} +if(argument_count>=4){ + LOOP_START=argument[3]; +} +if(argument_count>=5){ + LOOP_END=argument[4]; +} if(BGM_IsSlotValid(SLOT)&&audio_exists(AUDIO)){ BGM_Stop(SLOT); global._bgm_audio[SLOT]=AUDIO; - global._bgm_id[SLOT]=audio_play_sound(AUDIO,1,true); + global._bgm_id[SLOT]=audio_play_sound(AUDIO,1,LOOP); + global._bgm_loop_start[SLOT]=LOOP_START; + global._bgm_loop_end[SLOT]=LOOP_END; return true; }else{ return false; diff --git a/scripts/BGM_SetVolume/BGM_SetVolume.gml b/scripts/BGM_SetVolume/BGM_SetVolume.gml index 22cb92be..6a57d34a 100644 --- a/scripts/BGM_SetVolume/BGM_SetVolume.gml +++ b/scripts/BGM_SetVolume/BGM_SetVolume.gml @@ -1,11 +1,20 @@ ///@arg bgm_slot ///@arg volume +///@arg time* var SLOT=argument[0]; var VOLUME=argument[1]; +var TIME=0; +if(argument_count>=3){ + TIME=argument[2]*(1000/game_get_speed(gamespeed_fps)); +} if(BGM_IsSlotValid(SLOT)&&VOLUME>=0){ if(BGM_IsPlaying(SLOT)){ - audio_sound_gain(BGM_GetID(SLOT),VOLUME,0); + if(TIME>0){ + audio_sound_gain(BGM_GetID(SLOT),VOLUME,TIME); + }else{ + audio_sound_gain(BGM_GetID(SLOT),VOLUME,0); + } return true; }else{ return false; diff --git a/scripts/BGM_Step/BGM_Step.gml b/scripts/BGM_Step/BGM_Step.gml new file mode 100644 index 00000000..1fb8435c --- /dev/null +++ b/scripts/BGM_Step/BGM_Step.gml @@ -0,0 +1,16 @@ +var proc=0; +repeat(6){ + var audio=BGM_GetID(proc); + if(audio_exists(audio)){ + var start=global._bgm_loop_start[proc]; + var endt=global._bgm_loop_end[proc]; + if(start>=0 && endt>=0){ + var pos=audio_sound_get_track_position(audio); + if(pos>=endt){ + audio_sound_set_track_position(audio,start+(pos-endt)); + } + } + } + proc+=1; +} +return true; \ No newline at end of file diff --git a/scripts/BGM_Fade/BGM_Fade.yy b/scripts/BGM_Step/BGM_Step.yy similarity index 56% rename from scripts/BGM_Fade/BGM_Fade.yy rename to scripts/BGM_Step/BGM_Step.yy index e36a8ff9..fec369b7 100644 --- a/scripts/BGM_Fade/BGM_Fade.yy +++ b/scripts/BGM_Step/BGM_Step.yy @@ -1,8 +1,8 @@ { - "id": "d860e9dd-790d-4eb1-85b8-dbbe8c5eeb64", + "id": "a93203bf-575e-4332-88b0-45cbe88366f4", "modelName": "GMScript", "mvc": "1.0", - "name": "BGM_Fade", + "name": "BGM_Step", "IsCompatibility": false, "IsDnD": false } \ No newline at end of file diff --git a/scripts/Battle_End/Battle_End.gml b/scripts/Battle_End/Battle_End.gml index abd5c04d..668bf0ab 100644 --- a/scripts/Battle_End/Battle_End.gml +++ b/scripts/Battle_End/Battle_End.gml @@ -5,5 +5,5 @@ if(room_exists(room_return)){ Fader_Fade(-1,0,20); BGM_Resume(0); BGM_SetVolume(0,0); - BGM_Fade(0,1,50); + BGM_SetVolume(0,1,50); } \ No newline at end of file diff --git a/undertale_engine.yyp b/undertale_engine.yyp index d0163c43..c34bbabf 100644 --- a/undertale_engine.yyp +++ b/undertale_engine.yyp @@ -3358,6 +3358,14 @@ "resourceType": "GMLinuxOptions" } }, + { + "Key": "a93203bf-575e-4332-88b0-45cbe88366f4", + "Value": { + "id": "158c4c19-26a2-4b7a-a067-2481247e198c", + "resourcePath": "scripts\\BGM_Step\\BGM_Step.yy", + "resourceType": "GMScript" + } + }, { "Key": "a9bd20ba-6a00-4de6-b1ff-df13734ff8b4", "Value": { @@ -4318,14 +4326,6 @@ "resourceType": "GMScript" } }, - { - "Key": "d860e9dd-790d-4eb1-85b8-dbbe8c5eeb64", - "Value": { - "id": "03e6bd49-b674-42a3-ac24-3d9cab3e5678", - "resourcePath": "scripts\\BGM_Fade\\BGM_Fade.yy", - "resourceType": "GMScript" - } - }, { "Key": "d8c6c5cc-0e1d-4951-b97a-f44c5f9478d1", "Value": { @@ -5364,8 +5364,8 @@ "784ce4fe-7afb-474a-906e-cda2559e1961", "b92ff91b-e6e5-4d1f-b019-ce595e907bdd", "8c6b7d44-b4d1-4805-aff7-55dc30dd569d", - "d860e9dd-790d-4eb1-85b8-dbbe8c5eeb64", "1c851e96-e70f-40a6-9e51-effe5f07e4d8", + "a93203bf-575e-4332-88b0-45cbe88366f4", "0f02929d-7c23-4060-8e6a-d9dd4e54cdd7", "aca76236-2c67-44dd-ac16-aed1885167c8", "c0eb0dad-cbb0-46ee-a553-ee98b73a603f", diff --git a/views/1d2372ca-97fc-43cb-9b4c-3a67dfdd4e44.yy b/views/1d2372ca-97fc-43cb-9b4c-3a67dfdd4e44.yy index f192348f..9af23cd2 100644 --- a/views/1d2372ca-97fc-43cb-9b4c-3a67dfdd4e44.yy +++ b/views/1d2372ca-97fc-43cb-9b4c-3a67dfdd4e44.yy @@ -15,8 +15,8 @@ "784ce4fe-7afb-474a-906e-cda2559e1961", "b92ff91b-e6e5-4d1f-b019-ce595e907bdd", "8c6b7d44-b4d1-4805-aff7-55dc30dd569d", - "d860e9dd-790d-4eb1-85b8-dbbe8c5eeb64", - "1c851e96-e70f-40a6-9e51-effe5f07e4d8" + "1c851e96-e70f-40a6-9e51-effe5f07e4d8", + "a93203bf-575e-4332-88b0-45cbe88366f4" ], "filterType": "GMScript", "folderName": "BGM", From 4c14a60338b1695af02a06c0f2ce6eddd03d3b8f Mon Sep 17 00:00:00 2001 From: TML Date: Fri, 20 Sep 2019 23:31:25 +0800 Subject: [PATCH 2/4] Fixed encounter animation error --- objects/encounter_anim/Alarm_0.gml | 4 ++-- objects/encounter_anim/Alarm_1.gml | 4 ++-- sprites/spr_exclamation/spr_exclamation.yy | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/objects/encounter_anim/Alarm_0.gml b/objects/encounter_anim/Alarm_0.gml index bfae19ac..0dd7539f 100644 --- a/objects/encounter_anim/Alarm_0.gml +++ b/objects/encounter_anim/Alarm_0.gml @@ -1,8 +1,8 @@ if(Encounter_IsExists(_encounter)&&instance_exists(char_player)){ if(_exclam){ var inst=instance_create_depth(0,0,0,exclamation); - inst.x=char_player.x+sprite_get_xoffset(spr_exclamation); - inst.y=char_player.y-char_player.sprite_height-11+sprite_get_yoffset(spr_exclamation); + inst.x=char_player.x; + inst.y=char_player.y-char_player.sprite_height; var time=30+irandom(10); inst.time=time; audio_play_sound(snd_exclamation,0,false); diff --git a/objects/encounter_anim/Alarm_1.gml b/objects/encounter_anim/Alarm_1.gml index aca33595..1d0eacd9 100644 --- a/objects/encounter_anim/Alarm_1.gml +++ b/objects/encounter_anim/Alarm_1.gml @@ -1,7 +1,7 @@ _draw_black=true; _draw_player=true; -_draw_soul_x=(char_player.x-char_player.sprite_width/2+5-camera.x)*2+sprite_get_width(spr_battle_soul_red)/2; -_draw_soul_y=(char_player.y-char_player.sprite_height+17-camera.y)*2+sprite_get_height(spr_battle_soul_red)/2; +_draw_soul_x=(char_player.x-camera.x)*2; +_draw_soul_y=(char_player.y-char_player.sprite_height+17-camera.y)*2; if(Encounter_IsPauseBGM(_encounter)){ BGM_Pause(0); } diff --git a/sprites/spr_exclamation/spr_exclamation.yy b/sprites/spr_exclamation/spr_exclamation.yy index a13c9bc5..c6e5f561 100644 --- a/sprites/spr_exclamation/spr_exclamation.yy +++ b/sprites/spr_exclamation/spr_exclamation.yy @@ -98,7 +98,7 @@ "visible": true } ], - "origin": 7, + "origin": 9, "originLocked": false, "playbackSpeed": 15, "playbackSpeedType": 0, @@ -109,6 +109,6 @@ "textureGroupId": "1225f6b0-ac20-43bd-a82e-be73fa0b6f4f", "type": 0, "width": 10, - "xorig": 5, - "yorig": 11 + "xorig": 3, + "yorig": 12 } \ No newline at end of file From b660f93deda43be36add3282df114dd4ab08a6e1 Mon Sep 17 00:00:00 2001 From: TML Date: Fri, 20 Sep 2019 23:58:25 +0800 Subject: [PATCH 3/4] Save game enhancement * Add Player_Save Player_Load for saving and loading the game easily. --- objects/char_save/Other_10.gml | 4 ++- objects/menu/Step_0.gml | 3 +-- objects/ui_save/Other_10.gml | 4 +-- .../InstanceCreationCode_inst_6F1617EB.gml | 1 + rooms/room_area_0/room_area_0.yy | 24 +++++++++-------- scripts/Player_Load/Player_Load.gml | 10 +++++++ .../Player_Load.yy} | 4 +-- .../Player_Save.gml} | 8 ++++++ scripts/Player_Save/Player_Save.yy | 8 ++++++ undertale_engine.yyp | 27 ++++++++++++------- views/79ebe76d-454b-4d86-a469-b04d9b98fc82.yy | 5 ++-- 11 files changed, 68 insertions(+), 30 deletions(-) create mode 100644 rooms/room_area_0/InstanceCreationCode_inst_6F1617EB.gml create mode 100644 scripts/Player_Load/Player_Load.gml rename scripts/{Player_UpdateSaveInfo/Player_UpdateSaveInfo.yy => Player_Load/Player_Load.yy} (52%) rename scripts/{Player_UpdateSaveInfo/Player_UpdateSaveInfo.gml => Player_Save/Player_Save.gml} (72%) create mode 100644 scripts/Player_Save/Player_Save.yy diff --git a/objects/char_save/Other_10.gml b/objects/char_save/Other_10.gml index 8f62e13a..7498d239 100644 --- a/objects/char_save/Other_10.gml +++ b/objects/char_save/Other_10.gml @@ -1,4 +1,6 @@ -event_inherited(); +if(text!=""){ + event_inherited(); +} Player_Heal(999); audio_play_sound(snd_item_heal,0,false); diff --git a/objects/menu/Step_0.gml b/objects/menu/Step_0.gml index 3e5a8abb..9b57c56c 100644 --- a/objects/menu/Step_0.gml +++ b/objects/menu/Step_0.gml @@ -41,8 +41,7 @@ if(_menu==0){ } }else if(Input_IsPressed(INPUT.CONFIRM)){ if(_choice==0){ - Flag_Load(FLAG_TYPE.STATIC); - Flag_Load(FLAG_TYPE.DYNAMIC); + Player_Load(0); var target=Flag_Get(FLAG_TYPE.STATIC,FLAG_STATIC.ROOM,-1); if(room_exists(target)){ room_goto(target); diff --git a/objects/ui_save/Other_10.gml b/objects/ui_save/Other_10.gml index 49996b3a..c0b9a9df 100644 --- a/objects/ui_save/Other_10.gml +++ b/objects/ui_save/Other_10.gml @@ -24,9 +24,7 @@ if(_state==0){ _inst_return.text=_prefix+Lang_GetString("ui.save.return"); } if(_state==1){ - Flag_Save(FLAG_TYPE.STATIC); - Player_UpdateSaveInfo(); - Flag_Save(FLAG_TYPE.INFO); + Player_Save(0); audio_play_sound(snd_save,0,false); diff --git a/rooms/room_area_0/InstanceCreationCode_inst_6F1617EB.gml b/rooms/room_area_0/InstanceCreationCode_inst_6F1617EB.gml new file mode 100644 index 00000000..2d8cf174 --- /dev/null +++ b/rooms/room_area_0/InstanceCreationCode_inst_6F1617EB.gml @@ -0,0 +1 @@ +text="* DETERMINATION." \ No newline at end of file diff --git a/rooms/room_area_0/room_area_0.yy b/rooms/room_area_0/room_area_0.yy index 214261ba..fbef46e8 100644 --- a/rooms/room_area_0/room_area_0.yy +++ b/rooms/room_area_0/room_area_0.yy @@ -14,7 +14,8 @@ "ffb6a8c5-a301-4327-ae05-a286a934a0f7", "03a3aceb-2b60-4b00-8e57-dea72cfb9ee6", "a1338eee-7a9f-4264-8418-da673a5f02ff", - "bb55704a-bb77-4510-969c-230926753a25" + "bb55704a-bb77-4510-969c-230926753a25", + "a3d02403-21b6-47e7-9a1e-4af072cc30bf" ], "IsDnD": false, "layers": [ @@ -23,8 +24,8 @@ "name": "Instances", "id": "0ae18403-3e5e-49bc-9530-3820924224e5", "depth": 0, - "grid_x": 20, - "grid_y": 20, + "grid_x": 10, + "grid_y": 10, "hierarchyFrozen": false, "hierarchyVisible": true, "inheritLayerDepth": false, @@ -32,14 +33,15 @@ "inheritSubLayers": false, "inheritVisibility": false, "instances": [ -{"name": "inst_40A2516B","id": "5061e962-e7d9-415d-868c-e981e603b84b","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_40A2516B","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 9,"scaleY": 1,"mvc": "1.0","x": 60,"y": 60}, -{"name": "inst_B19D8C","id": "0b8cf8e8-9d2a-4bb5-846f-2d06f2a5b858","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_B19D8C","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 7,"mvc": "1.0","x": 60,"y": 80}, -{"name": "inst_4944F116","id": "6e418fc5-c567-494c-81c8-76636d8b79c3","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_4944F116","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 4,"mvc": "1.0","x": 220,"y": 80}, -{"name": "inst_592B7019","id": "ffb6a8c5-a301-4327-ae05-a286a934a0f7","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_592B7019","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 8,"scaleY": 1,"mvc": "1.0","x": 80,"y": 200}, -{"name": "inst_8BE49B8","id": "d9b9c90b-cda7-422e-aa1e-5d2f1e64e05d","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_8BE49B8","objId": "7164f880-1d5c-45f5-be69-ff9c6224c933","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.0","x": 150,"y": 140}, -{"name": "inst_244C311E","id": "03a3aceb-2b60-4b00-8e57-dea72cfb9ee6","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_244C311E.gml","creationCodeType": ".gml","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_244C311E","objId": "b1035071-e196-4f46-999c-c6d6b0355533","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.0","x": 120,"y": 160}, -{"name": "inst_68B03D3C","id": "a1338eee-7a9f-4264-8418-da673a5f02ff","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_68B03D3C.gml","creationCodeType": ".gml","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_68B03D3C","objId": "3faa5fb2-034f-429b-9366-32273e5f9170","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.0","x": 80,"y": 80}, -{"name": "inst_14B7C8A3","id": "bb55704a-bb77-4510-969c-230926753a25","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_14B7C8A3.gml","creationCodeType": ".gml","ignore": false,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_14B7C8A3","objId": "fa212389-f9e3-4a23-a2c9-e59e9ebb7769","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 2,"mvc": "1.0","x": 220,"y": 160} +{"name": "inst_40A2516B","id": "5061e962-e7d9-415d-868c-e981e603b84b","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_40A2516B","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 9,"scaleY": 1,"mvc": "1.0","x": 60,"y": 60}, +{"name": "inst_B19D8C","id": "0b8cf8e8-9d2a-4bb5-846f-2d06f2a5b858","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_B19D8C","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 7,"mvc": "1.0","x": 60,"y": 80}, +{"name": "inst_4944F116","id": "6e418fc5-c567-494c-81c8-76636d8b79c3","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_4944F116","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 4,"mvc": "1.0","x": 220,"y": 80}, +{"name": "inst_592B7019","id": "ffb6a8c5-a301-4327-ae05-a286a934a0f7","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_592B7019","objId": "b2a89c23-a716-4f1e-8a58-3649cd82560c","properties": null,"rotation": 0,"scaleX": 8,"scaleY": 1,"mvc": "1.0","x": 80,"y": 200}, +{"name": "inst_8BE49B8","id": "d9b9c90b-cda7-422e-aa1e-5d2f1e64e05d","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_8BE49B8","objId": "7164f880-1d5c-45f5-be69-ff9c6224c933","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.0","x": 150,"y": 140}, +{"name": "inst_244C311E","id": "03a3aceb-2b60-4b00-8e57-dea72cfb9ee6","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_244C311E.gml","creationCodeType": ".gml","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_244C311E","objId": "b1035071-e196-4f46-999c-c6d6b0355533","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.0","x": 120,"y": 160}, +{"name": "inst_68B03D3C","id": "a1338eee-7a9f-4264-8418-da673a5f02ff","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_68B03D3C.gml","creationCodeType": ".gml","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_68B03D3C","objId": "3faa5fb2-034f-429b-9366-32273e5f9170","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.0","x": 80,"y": 80}, +{"name": "inst_14B7C8A3","id": "bb55704a-bb77-4510-969c-230926753a25","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_14B7C8A3.gml","creationCodeType": ".gml","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_14B7C8A3","objId": "fa212389-f9e3-4a23-a2c9-e59e9ebb7769","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 2,"mvc": "1.0","x": 220,"y": 160}, +{"name": "inst_6F1617EB","id": "a3d02403-21b6-47e7-9a1e-4af072cc30bf","colour": { "Value": 4294967295 },"creationCodeFile": "InstanceCreationCode_inst_6F1617EB.gml","creationCodeType": ".gml","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_6F1617EB","objId": "ac0ce3c2-9a56-4701-94c1-a890bfff4a82","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.1","x": 150,"y": 120} ], "layers": [ diff --git a/scripts/Player_Load/Player_Load.gml b/scripts/Player_Load/Player_Load.gml new file mode 100644 index 00000000..6fa1a7dc --- /dev/null +++ b/scripts/Player_Load/Player_Load.gml @@ -0,0 +1,10 @@ +///@arg slot +var SLOT=argument[0]; + +Flag_SetSaveSlot(SLOT); + +Flag_Load(FLAG_TYPE.STATIC); +Flag_Load(FLAG_TYPE.DYNAMIC); +Flag_Load(FLAG_TYPE.INFO); + +return true; \ No newline at end of file diff --git a/scripts/Player_UpdateSaveInfo/Player_UpdateSaveInfo.yy b/scripts/Player_Load/Player_Load.yy similarity index 52% rename from scripts/Player_UpdateSaveInfo/Player_UpdateSaveInfo.yy rename to scripts/Player_Load/Player_Load.yy index 3162a5f8..cb5c6558 100644 --- a/scripts/Player_UpdateSaveInfo/Player_UpdateSaveInfo.yy +++ b/scripts/Player_Load/Player_Load.yy @@ -1,8 +1,8 @@ { - "id": "0b0d069a-2ee3-4fb2-b77f-e7062c4f48cd", + "id": "07f5542b-95fb-496b-a098-b421ca5dd453", "modelName": "GMScript", "mvc": "1.0", - "name": "Player_UpdateSaveInfo", + "name": "Player_Load", "IsCompatibility": false, "IsDnD": false } \ No newline at end of file diff --git a/scripts/Player_UpdateSaveInfo/Player_UpdateSaveInfo.gml b/scripts/Player_Save/Player_Save.gml similarity index 72% rename from scripts/Player_UpdateSaveInfo/Player_UpdateSaveInfo.gml rename to scripts/Player_Save/Player_Save.gml index c7d553ec..ec75f26d 100644 --- a/scripts/Player_UpdateSaveInfo/Player_UpdateSaveInfo.gml +++ b/scripts/Player_Save/Player_Save.gml @@ -1,5 +1,13 @@ +///@arg slot +var SLOT=argument[0]; + +Flag_SetSaveSlot(SLOT); + +Flag_Save(FLAG_TYPE.STATIC); Flag_Set(FLAG_TYPE.INFO,FLAG_INFO.LV,Flag_Get(FLAG_TYPE.STATIC,FLAG_STATIC.LV)); Flag_Set(FLAG_TYPE.INFO,FLAG_INFO.TIME,Flag_Get(FLAG_TYPE.STATIC,FLAG_STATIC.TIME)); Flag_Set(FLAG_TYPE.INFO,FLAG_INFO.ROOM,Flag_Get(FLAG_TYPE.STATIC,FLAG_STATIC.ROOM)); Flag_Set(FLAG_TYPE.INFO,FLAG_INFO.NAME,Flag_Get(FLAG_TYPE.STATIC,FLAG_STATIC.NAME)); +Flag_Save(FLAG_TYPE.INFO); + return true; \ No newline at end of file diff --git a/scripts/Player_Save/Player_Save.yy b/scripts/Player_Save/Player_Save.yy new file mode 100644 index 00000000..bb7218f1 --- /dev/null +++ b/scripts/Player_Save/Player_Save.yy @@ -0,0 +1,8 @@ +{ + "id": "78eb2428-ffd4-4cbd-95c5-3921bf9e2964", + "modelName": "GMScript", + "mvc": "1.0", + "name": "Player_Save", + "IsCompatibility": false, + "IsDnD": false +} \ No newline at end of file diff --git a/undertale_engine.yyp b/undertale_engine.yyp index c34bbabf..245c470b 100644 --- a/undertale_engine.yyp +++ b/undertale_engine.yyp @@ -190,6 +190,14 @@ "resourceType": "GMScript" } }, + { + "Key": "07f5542b-95fb-496b-a098-b421ca5dd453", + "Value": { + "id": "bdeda114-976f-48ef-b57d-45679368f4b6", + "resourcePath": "scripts\\Player_Load\\Player_Load.yy", + "resourceType": "GMScript" + } + }, { "Key": "080c8a8e-1ac7-4ab7-8ff1-c306e2455232", "Value": { @@ -262,14 +270,6 @@ "resourceType": "GMSound" } }, - { - "Key": "0b0d069a-2ee3-4fb2-b77f-e7062c4f48cd", - "Value": { - "id": "423c397d-4c7a-47c6-a165-1a1207a6ab06", - "resourcePath": "scripts\\Player_UpdateSaveInfo\\Player_UpdateSaveInfo.yy", - "resourceType": "GMScript" - } - }, { "Key": "0be45097-140b-4492-85f9-415d211753fa", "Value": { @@ -2382,6 +2382,14 @@ "resourceType": "GMScript" } }, + { + "Key": "78eb2428-ffd4-4cbd-95c5-3921bf9e2964", + "Value": { + "id": "9463e1a0-69da-4c69-bb59-6716a2952975", + "resourcePath": "scripts\\Player_Save\\Player_Save.yy", + "resourceType": "GMScript" + } + }, { "Key": "78fcf92f-89da-4a1d-b117-1e443277558b", "Value": { @@ -5295,7 +5303,6 @@ "bfcc815c-ae54-4cfd-9be1-df0d03096fb9", "a9bd20ba-6a00-4de6-b1ff-df13734ff8b4", "f81aa669-00f6-4e26-9cc9-9c1fb6e4afc8", - "0b0d069a-2ee3-4fb2-b77f-e7062c4f48cd", "889fce8f-94d0-45a8-9dbc-dbfc9956a218", "71b8b8dd-591d-46d2-bb82-feac2eb33c7e", "980f80b5-ef66-4917-b4c5-67a01c32dac6", @@ -5339,6 +5346,8 @@ "8a98a566-fba1-4513-8c37-551243c24851", "1fbb1f81-9d8e-4b69-a7d0-0737937996c9", "d6528e52-b252-4e7f-b035-3f4f8d18f93e", + "78eb2428-ffd4-4cbd-95c5-3921bf9e2964", + "07f5542b-95fb-496b-a098-b421ca5dd453", "9f8cca73-7064-4df7-a0d9-183eb8469fd9", "73f3215e-7994-434d-b78f-77ff4f280a80", "c1099f20-0cfa-4dfd-9b77-8af3d002680f", diff --git a/views/79ebe76d-454b-4d86-a469-b04d9b98fc82.yy b/views/79ebe76d-454b-4d86-a469-b04d9b98fc82.yy index 17de2a07..7a12f94c 100644 --- a/views/79ebe76d-454b-4d86-a469-b04d9b98fc82.yy +++ b/views/79ebe76d-454b-4d86-a469-b04d9b98fc82.yy @@ -9,12 +9,13 @@ "bfcc815c-ae54-4cfd-9be1-df0d03096fb9", "a9bd20ba-6a00-4de6-b1ff-df13734ff8b4", "f81aa669-00f6-4e26-9cc9-9c1fb6e4afc8", - "0b0d069a-2ee3-4fb2-b77f-e7062c4f48cd", "889fce8f-94d0-45a8-9dbc-dbfc9956a218", "71b8b8dd-591d-46d2-bb82-feac2eb33c7e", "a70f2963-33af-4c19-b2b4-cb7e494ee8ed", "46c7baab-bb7b-4170-9de1-8b653fc8a704", - "d6528e52-b252-4e7f-b035-3f4f8d18f93e" + "d6528e52-b252-4e7f-b035-3f4f8d18f93e", + "78eb2428-ffd4-4cbd-95c5-3921bf9e2964", + "07f5542b-95fb-496b-a098-b421ca5dd453" ], "filterType": "GMScript", "folderName": "Player", From 78de175ab35e31e634c2341ece90f8dccb4bed57 Mon Sep 17 00:00:00 2001 From: TML Date: Sat, 21 Sep 2019 00:04:38 +0800 Subject: [PATCH 4/4] Update Macro_Engine.gml --- scripts/Macro_Engine/Macro_Engine.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Macro_Engine/Macro_Engine.gml b/scripts/Macro_Engine/Macro_Engine.gml index 2d680085..13543871 100644 --- a/scripts/Macro_Engine/Macro_Engine.gml +++ b/scripts/Macro_Engine/Macro_Engine.gml @@ -1 +1 @@ -#macro ENGINE_VERSION "v0.5.1" \ No newline at end of file +#macro ENGINE_VERSION "v0.6.0" \ No newline at end of file