diff --git a/SnowState.yyp b/SnowState.yyp index 682722e..37dfe1c 100644 --- a/SnowState.yyp +++ b/SnowState.yyp @@ -66,6 +66,7 @@ {"name":"Main","path":"options/main/options_main.yy",}, {"name":"tvOS","path":"options/tvos/options_tvos.yy",}, {"name":"Windows","path":"options/windows/options_windows.yy",}, + {"name":"HTML5","path":"options/html5/options_html5.yy",}, ], "isDnDProject": false, "isEcma": false, diff --git a/objects/oCamera/Create_0.gml b/objects/oCamera/Create_0.gml index 705fa8b..9627333 100644 --- a/objects/oCamera/Create_0.gml +++ b/objects/oCamera/Create_0.gml @@ -26,9 +26,9 @@ view_visible[0] = true; alarm[0] = 1; // State Machine -state = new SnowState("instance"); +fsm = new SnowState("instance"); -state +fsm .add("instance", { step: function() { var _targ = targetInst; diff --git a/objects/oCamera/Step_0.gml b/objects/oCamera/Step_0.gml index ff3669a..65fa6dd 100644 --- a/objects/oCamera/Step_0.gml +++ b/objects/oCamera/Step_0.gml @@ -1 +1 @@ -state.step(); \ No newline at end of file +fsm.step(); \ No newline at end of file diff --git a/objects/oGame/Draw_64.gml b/objects/oGame/Draw_64.gml index 6126449..9dd6160 100644 --- a/objects/oGame/Draw_64.gml +++ b/objects/oGame/Draw_64.gml @@ -28,7 +28,7 @@ if (showHistory) { _y = 10; var _str, _states, _i; - _states = oPlayer.state.get_history(); + _states = oPlayer.fsm.get_history(); _str = "groundAttack3"; draw_set_alpha(.9); diff --git a/objects/oPlayer/Create_0.gml b/objects/oPlayer/Create_0.gml index f7dcb5e..54a1426 100644 --- a/objects/oPlayer/Create_0.gml +++ b/objects/oPlayer/Create_0.gml @@ -50,9 +50,9 @@ input = {}; check_input(); // State Machine -state = new SnowState("idle"); +fsm = new SnowState("idle"); -state +fsm .history_enable() .set_history_max_size(20) .event_set_default_function("draw", function() { @@ -73,26 +73,26 @@ state // If left or right keys are pressed, run if (abs(input.hdir)) { - state.change("run"); + fsm.change("run"); return; } // If jump key is pressed, jump if (input.jump) { - state.change("jump"); + fsm.change("jump"); return; } if (hasSword) { // If attack key is pressed, go into groundAttack1 if (input.attack) { - state.change("groundAttack1"); + fsm.change("groundAttack1"); return; } // Throw the sword if (input.throwSword && hasSword) { - state.change("throwSword"); + fsm.change("throwSword"); return; } } else { @@ -109,7 +109,7 @@ state // Check if I'm flating if (!on_ground()) { - state.change("fall"); + fsm.change("fall"); return; } } @@ -127,7 +127,7 @@ state // If left and right keys are not pressed, switch back to idle if (_dir == 0) { - state.change("idle"); + fsm.change("idle"); return; } @@ -135,20 +135,20 @@ state // If jump key is pressed, jump if (input.jump) { - state.change("jump"); + fsm.change("jump"); return; } if (hasSword) { // If attack key is pressed, go into groundAttack1 if (input.attack) { - state.change("groundAttack1"); + fsm.change("groundAttack1"); return; } // Throw the sword if (input.throwSword && hasSword) { - state.change("throwSword"); + fsm.change("throwSword"); return; } } else { @@ -165,7 +165,7 @@ state // Check if I'm flating if (!on_ground()) { - state.change("fall"); + fsm.change("fall"); return; } } @@ -189,7 +189,7 @@ state // Throw the sword if (input.throwSword && hasSword) { - state.change("throwSword"); + fsm.change("throwSword"); return; } @@ -205,7 +205,7 @@ state // Check when we should start falling if (vspd >= 0) { - state.change("fall"); + fsm.change("fall"); return; } } @@ -218,7 +218,7 @@ state // If I have not done air attack when falling now, activate air attack // Air attack can be done once when falling - if (state.state_is("airAttack", state.get_previous_state())) canAirAttack = false; + if (fsm.state_is("airAttack", fsm.get_previous_state())) canAirAttack = false; else canAirAttack = true; }, @@ -237,13 +237,13 @@ state if (hasSword) { // If attack key is pressed, go into airAttack1 if (input.attack && canAirAttack) { - state.change("airAttack1"); + fsm.change("airAttack1"); return; } // Throw the sword if (input.throwSword) { - state.change("throwSword"); + fsm.change("throwSword"); return; } } else { @@ -255,10 +255,10 @@ state } // Coyote time - if ((state.get_time() <= coyoteDuration) && input.jump) { + if ((fsm.get_time() <= coyoteDuration) && input.jump) { // Apply only if we were running - if (state.get_previous_state() == "run") { - state.change("jump"); + if (fsm.get_previous_state() == "run") { + fsm.change("jump"); return; } } @@ -269,7 +269,7 @@ state // Check when we land if (on_ground()) { - state.change("idle"); + fsm.change("idle"); return; } } @@ -283,7 +283,7 @@ state nextAttack = false; // Create effect - var _sprite = effectSprites[$ state.get_current_state()]; + var _sprite = effectSprites[$ fsm.get_current_state()]; var _face = face; var _x = x + _face * 8; with (instance_create_depth(_x, y, depth, oEffect)) { @@ -304,7 +304,7 @@ state .add_child("attack", "groundAttack", { /// @override enter: function() { - state.inherit(); + fsm.inherit(); // Stop hspd = 0; @@ -313,18 +313,18 @@ state /// @override step: function() { - state.inherit(); + fsm.inherit(); // When the animation ends, go to the next attack state if attack has been pressed // Otherwise, just go idle if (animation_end()) { if (nextAttack) { - var _state = state.get_current_state(); + var _state = fsm.get_current_state(); var _curr = real(string_digits(_state)); var _next = string_letters(_state) + string(_curr+1); - state.change(_next); + fsm.change(_next); } else { - state.change("idle"); + fsm.change("idle"); } return; } @@ -337,7 +337,7 @@ state step: function() { // When the animation ends, go to idle state if (animation_end()) { - state.change("idle"); + fsm.change("idle"); return; } } @@ -345,7 +345,7 @@ state .add_child("attack", "airAttack", { /// @override enter: function() { - state.inherit(); + fsm.inherit(); // Lower the gravity grav = gravAttack; @@ -353,7 +353,7 @@ state }, /// @override step: function() { - state.inherit(); + fsm.inherit(); // Go down, slowly apply_gravity(); @@ -361,7 +361,7 @@ state // Check when we land if (on_ground()) { - state.change("idle"); + fsm.change("idle"); return; } @@ -369,12 +369,12 @@ state // Otherwise, just back to falling again if (animation_end()) { if (nextAttack) { - var _state = state.get_current_state(); + var _state = fsm.get_current_state(); var _curr = real(string_digits(_state)); var _next = string_letters(_state) + string(_curr+1); - state.change(_next); + fsm.change(_next); } else { - state.change("fall"); + fsm.change("fall"); } return; } @@ -393,7 +393,7 @@ state // When the animation ends, go to fall state again if (animation_end()) { - state.change("fall"); + fsm.change("fall"); return; } } @@ -415,9 +415,9 @@ state // Switch the state to idle or fall, // depending on what the previous state was var _state = "idle"; - if (state.get_previous_state() == "jump") _state = "fall"; - if (state.get_previous_state() == "fall") _state = "fall"; - state.change(_state); + if (fsm.get_previous_state() == "jump") _state = "fall"; + if (fsm.get_previous_state() == "fall") _state = "fall"; + fsm.change(_state); return; } diff --git a/objects/oPlayer/Draw_0.gml b/objects/oPlayer/Draw_0.gml index a2a20a5..12cc60f 100644 --- a/objects/oPlayer/Draw_0.gml +++ b/objects/oPlayer/Draw_0.gml @@ -1 +1 @@ -state.draw(); \ No newline at end of file +fsm.draw(); \ No newline at end of file diff --git a/objects/oPlayer/Other_25.gml b/objects/oPlayer/Other_25.gml index edbafca..7367024 100644 --- a/objects/oPlayer/Other_25.gml +++ b/objects/oPlayer/Other_25.gml @@ -22,7 +22,7 @@ init_effect_sprites = function() { }; get_sprite = function() { - return sprites[$ state.get_current_state()][@ hasSword]; + return sprites[$ fsm.get_current_state()][@ hasSword]; }; check_input = function() { @@ -61,7 +61,7 @@ spawn_sword = function() { with (instance_create_depth(x+6*face, y-14, depth, oSword)) { owner = other.id; face = owner.face; - state.change("spinning"); + fsm.change("spinning"); } }; diff --git a/objects/oPlayer/Other_76.gml b/objects/oPlayer/Other_76.gml index cc57222..e032452 100644 --- a/objects/oPlayer/Other_76.gml +++ b/objects/oPlayer/Other_76.gml @@ -1 +1 @@ -state.throwSword(); \ No newline at end of file +fsm.throwSword(); \ No newline at end of file diff --git a/objects/oPlayer/Step_0.gml b/objects/oPlayer/Step_0.gml index ff3669a..65fa6dd 100644 --- a/objects/oPlayer/Step_0.gml +++ b/objects/oPlayer/Step_0.gml @@ -1 +1 @@ -state.step(); \ No newline at end of file +fsm.step(); \ No newline at end of file diff --git a/objects/oSword/Create_0.gml b/objects/oSword/Create_0.gml index 4f319bc..d7990b4 100644 --- a/objects/oSword/Create_0.gml +++ b/objects/oSword/Create_0.gml @@ -11,9 +11,9 @@ hspd = 0; face = 1; // State Machine -state = new SnowState("NULL"); +fsm = new SnowState("NULL"); -state +fsm .event_set_default_function("draw", function() { // Draw this no matter what state we are in // (Unless it is overridden, ofcourse) @@ -32,7 +32,7 @@ state }, step: function() { if (place_meeting(x+hspd, y, oWall)) { - state.change("embedded"); + fsm.change("embedded"); return; } x += hspd; diff --git a/objects/oSword/Draw_0.gml b/objects/oSword/Draw_0.gml index a2a20a5..12cc60f 100644 --- a/objects/oSword/Draw_0.gml +++ b/objects/oSword/Draw_0.gml @@ -1 +1 @@ -state.draw(); \ No newline at end of file +fsm.draw(); \ No newline at end of file diff --git a/objects/oSword/Other_25.gml b/objects/oSword/Other_25.gml index 7c56a26..3daa5ba 100644 --- a/objects/oSword/Other_25.gml +++ b/objects/oSword/Other_25.gml @@ -1,7 +1,7 @@ /// @desc Methods recall = function() { - if (instance_exists(owner) && state.state_is("embedded")) { - state.change("recall"); + if (instance_exists(owner) && fsm.state_is("embedded")) { + fsm.change("recall"); } }; \ No newline at end of file diff --git a/objects/oSword/Step_0.gml b/objects/oSword/Step_0.gml index ff3669a..65fa6dd 100644 --- a/objects/oSword/Step_0.gml +++ b/objects/oSword/Step_0.gml @@ -1 +1 @@ -state.step(); \ No newline at end of file +fsm.step(); \ No newline at end of file diff --git a/options/amazonfire/options_amazonfire.yy b/options/amazonfire/options_amazonfire.yy index d310298..c4b6d7d 100644 --- a/options/amazonfire/options_amazonfire.yy +++ b/options/amazonfire/options_amazonfire.yy @@ -19,22 +19,22 @@ "option_amazonfire_lint": false, "option_amazonfire_install_location": 0, "option_amazonfire_sleep_margin": 4, - "option_amazonfire_splash_screens_landscape": "${base_options_dir}\\amazonfire\\splash\\landscape.png", - "option_amazonfire_splash_screens_portrait": "${base_options_dir}\\amazonfire\\splash\\portrait.png", + "option_amazonfire_splash_screens_landscape": "${base_options_dir}/amazonfire/splash/landscape.png", + "option_amazonfire_splash_screens_portrait": "${base_options_dir}/amazonfire/splash/portrait.png", "option_amazonfire_splash_time": 0, "option_amazonfire_launchscreen_fill": 0, "option_amazonfire_splashscreen_background_colour": 255, - "option_amazonfire_tv_banner": "${base_options_dir}\\amazonfire\\tv_banner.png", + "option_amazonfire_tv_banner": "${base_options_dir}/amazonfire/tv_banner.png", "option_amazonfire_interpolate_pixels": false, "option_amazonfire_screen_depth": 0, "option_amazonfire_scale": 0, "option_amazonfire_texture_page": "2048x2048", - "option_amazonfire_icon_ldpi": "${base_options_dir}\\android\\icons\\ldpi.png", - "option_amazonfire_icon_mdpi": "${base_options_dir}\\android\\icons\\mdpi.png", - "option_amazonfire_icon_hdpi": "${base_options_dir}\\android\\icons\\hdpi.png", - "option_amazonfire_icon_xhdpi": "${base_options_dir}\\android\\icons\\xhdpi.png", - "option_amazonfire_icon_xxhdpi": "${base_options_dir}\\android\\icons\\xxhdpi.png", - "option_amazonfire_icon_xxxhdpi": "${base_options_dir}\\android\\icons\\xxxhdpi.png", + "option_amazonfire_icon_ldpi": "${base_options_dir}/android/icons/ldpi.png", + "option_amazonfire_icon_mdpi": "${base_options_dir}/android/icons/mdpi.png", + "option_amazonfire_icon_hdpi": "${base_options_dir}/android/icons/hdpi.png", + "option_amazonfire_icon_xhdpi": "${base_options_dir}/android/icons/xhdpi.png", + "option_amazonfire_icon_xxhdpi": "${base_options_dir}/android/icons/xxhdpi.png", + "option_amazonfire_icon_xxxhdpi": "${base_options_dir}/android/icons/xxxhdpi.png", "option_amazonfire_permission_write_external_storage": false, "option_amazonfire_permission_read_phone_state": false, "option_amazonfire_permission_network_state": false, diff --git a/options/android/options_android.yy b/options/android/options_android.yy index 4ba54a8..328f326 100644 --- a/options/android/options_android.yy +++ b/options/android/options_android.yy @@ -23,36 +23,36 @@ "option_android_lint": false, "option_android_install_location": 0, "option_android_sleep_margin": 4, - "option_android_splash_screens_landscape": "${base_options_dir}\\android\\splash\\landscape.png", - "option_android_splash_screens_portrait": "${base_options_dir}\\android\\splash\\portrait.png", + "option_android_splash_screens_landscape": "${base_options_dir}/android/splash/landscape.png", + "option_android_splash_screens_portrait": "${base_options_dir}/android/splash/portrait.png", "option_android_splash_time": 0, "option_android_launchscreen_fill": 0, "option_android_splashscreen_background_colour": 255, - "option_android_tv_banner": "${base_options_dir}\\android\\tv_banner.png", + "option_android_tv_banner": "${base_options_dir}/android/tv_banner.png", "option_android_interpolate_pixels": false, "option_android_screen_depth": 0, "option_android_device_support": 0, "option_android_scale": 0, "option_android_texture_page": "2048x2048", - "option_android_icon_ldpi": "${base_options_dir}\\android\\icons\\ldpi.png", - "option_android_icon_mdpi": "${base_options_dir}\\android\\icons\\mdpi.png", - "option_android_icon_hdpi": "${base_options_dir}\\android\\icons\\hdpi.png", - "option_android_icon_xhdpi": "${base_options_dir}\\android\\icons\\xhdpi.png", - "option_android_icon_xxhdpi": "${base_options_dir}\\android\\icons\\xxhdpi.png", - "option_android_icon_xxxhdpi": "${base_options_dir}\\android\\icons\\xxxhdpi.png", + "option_android_icon_ldpi": "${base_options_dir}/android/icons/ldpi.png", + "option_android_icon_mdpi": "${base_options_dir}/android/icons/mdpi.png", + "option_android_icon_hdpi": "${base_options_dir}/android/icons/hdpi.png", + "option_android_icon_xhdpi": "${base_options_dir}/android/icons/xhdpi.png", + "option_android_icon_xxhdpi": "${base_options_dir}/android/icons/xxhdpi.png", + "option_android_icon_xxxhdpi": "${base_options_dir}/android/icons/xxxhdpi.png", "option_android_icon_adaptive_generate": false, - "option_android_icon_adaptive_ldpi": "${base_options_dir}\\android\\icons_adaptive\\ldpi.png", - "option_android_icon_adaptive_mdpi": "${base_options_dir}\\android\\icons_adaptive\\mdpi.png", - "option_android_icon_adaptive_hdpi": "${base_options_dir}\\android\\icons_adaptive\\hdpi.png", - "option_android_icon_adaptive_xhdpi": "${base_options_dir}\\android\\icons_adaptive\\xhdpi.png", - "option_android_icon_adaptive_xxhdpi": "${base_options_dir}\\android\\icons_adaptive\\xxhdpi.png", - "option_android_icon_adaptive_xxxhdpi": "${base_options_dir}\\android\\icons_adaptive\\xxxhdpi.png", - "option_android_icon_adaptivebg_ldpi": "${base_options_dir}\\android\\icons_adaptivebg\\ldpi.png", - "option_android_icon_adaptivebg_mdpi": "${base_options_dir}\\android\\icons_adaptivebg\\mdpi.png", - "option_android_icon_adaptivebg_hdpi": "${base_options_dir}\\android\\icons_adaptivebg\\hdpi.png", - "option_android_icon_adaptivebg_xhdpi": "${base_options_dir}\\android\\icons_adaptivebg\\xhdpi.png", - "option_android_icon_adaptivebg_xxhdpi": "${base_options_dir}\\android\\icons_adaptivebg\\xxhdpi.png", - "option_android_icon_adaptivebg_xxxhdpi": "${base_options_dir}\\android\\icons_adaptivebg\\xxxhdpi.png", + "option_android_icon_adaptive_ldpi": "${base_options_dir}/android/icons_adaptive/ldpi.png", + "option_android_icon_adaptive_mdpi": "${base_options_dir}/android/icons_adaptive/mdpi.png", + "option_android_icon_adaptive_hdpi": "${base_options_dir}/android/icons_adaptive/hdpi.png", + "option_android_icon_adaptive_xhdpi": "${base_options_dir}/android/icons_adaptive/xhdpi.png", + "option_android_icon_adaptive_xxhdpi": "${base_options_dir}/android/icons_adaptive/xxhdpi.png", + "option_android_icon_adaptive_xxxhdpi": "${base_options_dir}/android/icons_adaptive/xxxhdpi.png", + "option_android_icon_adaptivebg_ldpi": "${base_options_dir}/android/icons_adaptivebg/ldpi.png", + "option_android_icon_adaptivebg_mdpi": "${base_options_dir}/android/icons_adaptivebg/mdpi.png", + "option_android_icon_adaptivebg_hdpi": "${base_options_dir}/android/icons_adaptivebg/hdpi.png", + "option_android_icon_adaptivebg_xhdpi": "${base_options_dir}/android/icons_adaptivebg/xhdpi.png", + "option_android_icon_adaptivebg_xxhdpi": "${base_options_dir}/android/icons_adaptivebg/xxhdpi.png", + "option_android_icon_adaptivebg_xxxhdpi": "${base_options_dir}/android/icons_adaptivebg/xxxhdpi.png", "option_android_use_facebook": false, "option_android_facebook_id": "", "option_android_facebook_app_display_name": "", @@ -66,6 +66,7 @@ "option_android_permission_record_audio": false, "option_android_application_tag_inject": "", "option_android_google_apk_expansion": false, + "option_android_google_dynamic_asset_delivery": false, "option_android_google_licensing_public_key": "", "option_android_tv_isgame": true, "resourceVersion": "1.0", diff --git a/options/html5/options_html5.yy b/options/html5/options_html5.yy new file mode 100644 index 0000000..9b43ef0 --- /dev/null +++ b/options/html5/options_html5.yy @@ -0,0 +1,34 @@ +{ + "option_html5_browser_title": "Created with GameMaker Studio 2", + "option_html5_version": "1.0.0.0", + "option_html5_foldername": "html5game", + "option_html5_outputname": "index.html", + "option_html5_splash_png": "${base_options_dir}/html5/splash.png", + "option_html5_usesplash": false, + "option_html5_outputdebugtoconsole": true, + "option_html5_display_cursor": true, + "option_html5_localrunalert": true, + "option_html5_index": "", + "option_html5_loadingbar": "", + "option_html5_jsprepend": "", + "option_html5_icon": "${base_options_dir}/html5/fav.ico", + "option_html5_allow_fullscreen": true, + "option_html5_interpolate_pixels": true, + "option_html5_centregame": false, + "option_html5_usebuiltinparticles": true, + "option_html5_usebuiltinfont": true, + "option_html5_webgl": 2, + "option_html5_scale": 0, + "option_html5_texture_page": "2048x2048", + "option_html5_use_facebook": false, + "option_html5_facebook_id": "", + "option_html5_facebook_app_display_name": "", + "option_html5_flurry_enable": false, + "option_html5_flurry_id": "", + "option_html5_google_analytics_enable": false, + "option_html5_google_tracking_id": "", + "resourceVersion": "1.0", + "name": "HTML5", + "tags": [], + "resourceType": "GMHtml5Options", +} \ No newline at end of file diff --git a/options/linux/options_linux.yy b/options/linux/options_linux.yy index 356a804..4978896 100644 --- a/options/linux/options_linux.yy +++ b/options/linux/options_linux.yy @@ -5,9 +5,9 @@ "option_linux_homepage": "http://www.yoyogames.com", "option_linux_short_desc": "", "option_linux_long_desc": "", - "option_linux_splash_screen": "${base_options_dir}\\linux\\splash\\splash.png", + "option_linux_splash_screen": "${base_options_dir}/linux/splash/splash.png", "option_linux_display_splash": false, - "option_linux_icon": "${base_options_dir}\\linux\\icons\\64.png", + "option_linux_icon": "${base_options_dir}/linux/icons/64.png", "option_linux_start_fullscreen": false, "option_linux_allow_fullscreen": false, "option_linux_interpolate_pixels": true, diff --git a/options/mac/options_mac.yy b/options/mac/options_mac.yy index 78bf670..73e249f 100644 --- a/options/mac/options_mac.yy +++ b/options/mac/options_mac.yy @@ -6,8 +6,9 @@ "option_mac_team_id": "", "option_mac_signing_identity": "Developer ID Application:", "option_mac_copyright": "", - "option_mac_splash_png": "${base_options_dir}\\mac\\splash\\splash.png", - "option_mac_icon_png": "${base_options_dir}\\mac\\icons\\1024.png", + "option_mac_splash_png": "${base_options_dir}/mac/splash/splash.png", + "option_mac_icon_png": "${base_options_dir}/mac/icons/1024.png", + "option_mac_installer_background_png": "${base_options_dir}/mac/splash/installer_background.png", "option_mac_menu_dock": false, "option_mac_display_cursor": true, "option_mac_start_fullscreen": false, diff --git a/options/main/options_main.yy b/options/main/options_main.yy index ae925ee..10a9fa9 100644 --- a/options/main/options_main.yy +++ b/options/main/options_main.yy @@ -1,5 +1,6 @@ { "option_gameguid": "e853c891-a127-4810-a122-eb28266b9756", + "option_gameid": "0", "option_game_speed": 60, "option_mips_for_3d_textures": false, "option_draw_colour": 4294967295,